@pixelmatters/markup 1.15.0 → 1.16.1
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/README.md +94 -22
- package/dist/widget.js +1095 -1003
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -65,19 +65,19 @@ function O() {
|
|
|
65
65
|
}
|
|
66
66
|
function ee(e, t, n, r, i, a, o, s, c, l, u) {
|
|
67
67
|
var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
|
|
68
|
-
for (c =
|
|
68
|
+
for (c = te(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = ie(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && le(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = k(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
|
|
69
69
|
return n.__e = _, c;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function te(e, t, n, r, i) {
|
|
72
72
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
73
|
-
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i =
|
|
73
|
+
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = A(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
74
74
|
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), ue(s, s));
|
|
75
75
|
return r;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function k(e, t, n, r) {
|
|
78
78
|
var i, a;
|
|
79
79
|
if (typeof e.type == "function") {
|
|
80
|
-
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t =
|
|
80
|
+
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t = k(i[a], t, n, r));
|
|
81
81
|
return t;
|
|
82
82
|
}
|
|
83
83
|
e.__e != t && (r && (t && e.type && !t.parentNode && (t = w(e)), n.insertBefore(e.__e, t || null)), t = e.__e);
|
|
@@ -86,7 +86,7 @@ function A(e, t, n, r) {
|
|
|
86
86
|
while (t != null && t.nodeType == 8);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function A(e, t, n, r) {
|
|
90
90
|
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && (2 & l.__u) == 0;
|
|
91
91
|
if (l === null && s == null || u && s == l.key && c == l.type) return n;
|
|
92
92
|
if (r > +!!u) {
|
|
@@ -125,7 +125,7 @@ function re(e) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
function ie(e, n, r, i, a, o, s, c, l, u) {
|
|
128
|
-
var d, f, p, m, g, b, x, w, T, E, D, O, k, A,
|
|
128
|
+
var d, f, p, m, g, b, x, w, T, E, D, O, te, k, A, j = n.type;
|
|
129
129
|
if (n.constructor !== void 0) return null;
|
|
130
130
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
|
|
131
131
|
n: if (typeof j == "function") try {
|
|
@@ -141,17 +141,17 @@ function ie(e, n, r, i, a, o, s, c, l, u) {
|
|
|
141
141
|
f.componentDidUpdate(m, g, b);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r,
|
|
144
|
+
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r, te = 0, T) f.state = f.__s, f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), h.push.apply(f.__h, f._sb), f._sb = [];
|
|
145
145
|
else do
|
|
146
146
|
f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), f.state = f.__s;
|
|
147
|
-
while (f.__d && ++
|
|
148
|
-
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)),
|
|
147
|
+
while (f.__d && ++te < 25);
|
|
148
|
+
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), k = d != null && d.type === S && d.key == null ? se(d.props.children) : d, c = ee(e, _(k) ? k : [k], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
|
|
149
149
|
} catch (e) {
|
|
150
150
|
if (n.__v = null, l || o != null) if (e.then) {
|
|
151
151
|
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
152
152
|
o[o.indexOf(c)] = null, n.__e = c;
|
|
153
153
|
} else {
|
|
154
|
-
for (
|
|
154
|
+
for (A = o.length; A--;) y(o[A]);
|
|
155
155
|
ae(n);
|
|
156
156
|
}
|
|
157
157
|
else n.__e = r.__e, n.__k = r.__k, e.then || ae(n);
|
|
@@ -248,7 +248,7 @@ e = h.slice, t = { __e: function(e, t, n, r) {
|
|
|
248
248
|
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = re(!1), p = re(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var pe = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s;display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;display:inline-flex;position:absolute;top:0;right:0}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:360px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-popover-path{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;white-space:nowrap;text-overflow:ellipsis;flex:auto;align-items:baseline;gap:0;font-size:11px;line-height:1;display:inline-flex;overflow:hidden}.markup-popover-path-host{color:var(--markup-muted);flex-shrink:0}.markup-popover-path-route{color:var(--markup-ink);text-overflow:ellipsis;min-width:0;overflow:hidden}.markup-popover-path-tag{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;flex-shrink:0;margin-left:6px;padding:1px 6px;font-size:9px}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;margin-left:auto;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10.5px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;align-items:center;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10px}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-toolbar,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-inbox-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-inbox-pop-right{right:22px}.markup-inbox-pop-left{left:22px}.markup-inbox-pop-center{left:50%;transform:translate(-50%)}.markup-inbox-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-inbox-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-inbox-pop .markup-notifications-panel-header{padding:12px 14px}.markup-inbox-pop .markup-notifications-panel-header .markup-icon-btn{display:none}", M = class extends C {
|
|
251
|
+
var pe = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s;display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;display:inline-flex;position:absolute;top:0;right:0}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}.markup-kbd.is-inline{background:color-mix(in srgb, var(--markup-ink) 8%, transparent);min-width:14px;height:14px;color:var(--markup-muted);border-radius:3px;padding:0 3px;font-size:9.5px}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:360px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-popover-title{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:11px;line-height:1;overflow:hidden}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-header+.markup-popover-body{border-top:none}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;margin-top:-3px;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-avatar-initials{text-box-trim:trim-both;text-box-edge:cap alphabetic;line-height:1}.markup-avatar-img{object-fit:cover;width:100%;height:100%;display:block}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-badge.is-agent{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:normal;justify-content:center;width:14px;padding:0}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);align-items:center;gap:3px;font-size:10.5px;display:inline-flex}.markup-composer-hint-label{margin-left:2px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;align-items:center;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-row.is-failed{opacity:.85;border-style:dotted}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10px}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-toolbar,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-inbox-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-inbox-pop-right{right:22px}.markup-inbox-pop-left{left:22px}.markup-inbox-pop-center{left:50%;transform:translate(-50%)}.markup-inbox-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-inbox-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-inbox-pop .markup-notifications-panel-header{padding:12px 14px}.markup-inbox-pop .markup-notifications-panel-header .markup-icon-btn{display:none}", M = class extends C {
|
|
252
252
|
state = { hasError: !1 };
|
|
253
253
|
static getDerivedStateFromError() {
|
|
254
254
|
return { hasError: !0 };
|
|
@@ -311,68 +311,68 @@ function N(e, t) {
|
|
|
311
311
|
}
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/runtime/theme-store.ts
|
|
314
|
-
var Se = "markup:widget:theme",
|
|
315
|
-
function
|
|
314
|
+
var Se = "markup:widget:theme", Ce = null, P = Ee() ?? "auto", we = Ee() != null, Te = /* @__PURE__ */ new Set();
|
|
315
|
+
function Ee() {
|
|
316
316
|
try {
|
|
317
317
|
let e = localStorage.getItem(Se);
|
|
318
318
|
if (e === "light" || e === "dark" || e === "auto") return e;
|
|
319
319
|
} catch {}
|
|
320
320
|
return null;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
function De(e, t) {
|
|
326
|
-
P = e, !Ce && t && (F = t), Ee();
|
|
322
|
+
function De() {
|
|
323
|
+
Ce && (P === "auto" ? delete Ce.dataset.theme : Ce.dataset.theme = P);
|
|
327
324
|
}
|
|
328
|
-
function Oe() {
|
|
329
|
-
|
|
325
|
+
function Oe(e, t) {
|
|
326
|
+
Ce = e, !we && t && (P = t), De();
|
|
330
327
|
}
|
|
331
328
|
function ke() {
|
|
332
|
-
return
|
|
329
|
+
return P;
|
|
330
|
+
}
|
|
331
|
+
function Ae() {
|
|
332
|
+
return P === "dark" ? "dark" : P === "light" ? "light" : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
if (e !==
|
|
336
|
-
|
|
334
|
+
function je(e) {
|
|
335
|
+
if (e !== P) {
|
|
336
|
+
P = e, we = !0;
|
|
337
337
|
try {
|
|
338
338
|
localStorage.setItem(Se, e);
|
|
339
339
|
} catch {}
|
|
340
|
-
|
|
341
|
-
for (let e of
|
|
340
|
+
De();
|
|
341
|
+
for (let e of Te) e(P);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
346
|
-
|
|
344
|
+
function Me(e) {
|
|
345
|
+
return Te.add(e), () => {
|
|
346
|
+
Te.delete(e);
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Ne() {
|
|
350
350
|
if (typeof window > "u" || !window.matchMedia) return () => {};
|
|
351
351
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => {
|
|
352
|
-
if (
|
|
352
|
+
if (P === "auto") for (let e of Te) e(P);
|
|
353
353
|
};
|
|
354
354
|
return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
355
355
|
}
|
|
356
356
|
//#endregion
|
|
357
357
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/hooks/dist/hooks.module.js
|
|
358
|
-
var
|
|
359
|
-
function
|
|
360
|
-
|
|
361
|
-
var n =
|
|
358
|
+
var Pe, F, Fe, Ie, Le = 0, Re = [], I = t, ze = I.__b, Be = I.__r, Ve = I.diffed, He = I.__c, Ue = I.unmount, We = I.__;
|
|
359
|
+
function Ge(e, t) {
|
|
360
|
+
I.__h && I.__h(F, e, Le || t), Le = 0;
|
|
361
|
+
var n = F.__H ||= {
|
|
362
362
|
__: [],
|
|
363
363
|
__h: []
|
|
364
364
|
};
|
|
365
365
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
return
|
|
367
|
+
function L(e) {
|
|
368
|
+
return Le = 1, Ke(et, e);
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
var r =
|
|
372
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
370
|
+
function Ke(e, t, n) {
|
|
371
|
+
var r = Ge(Pe++, 2);
|
|
372
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : et(void 0, t), function(e) {
|
|
373
373
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
374
374
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
375
|
-
}], r.__c =
|
|
375
|
+
}], r.__c = F, !F.__f)) {
|
|
376
376
|
var i = function(e, t, n) {
|
|
377
377
|
if (!r.__c.__H) return !0;
|
|
378
378
|
var i = r.__c.__H.__.filter(function(e) {
|
|
@@ -389,115 +389,115 @@ function Ge(e, t, n) {
|
|
|
389
389
|
}
|
|
390
390
|
}), a && a.call(this, e, t, n) || o;
|
|
391
391
|
};
|
|
392
|
-
|
|
393
|
-
var a =
|
|
394
|
-
|
|
392
|
+
F.__f = !0;
|
|
393
|
+
var a = F.shouldComponentUpdate, o = F.componentWillUpdate;
|
|
394
|
+
F.componentWillUpdate = function(e, t, n) {
|
|
395
395
|
if (this.__e) {
|
|
396
396
|
var r = a;
|
|
397
397
|
a = void 0, i(e, t, n), a = r;
|
|
398
398
|
}
|
|
399
399
|
o && o.call(this, e, t, n);
|
|
400
|
-
},
|
|
400
|
+
}, F.shouldComponentUpdate = i;
|
|
401
401
|
}
|
|
402
402
|
return r.__N || r.__;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
var n =
|
|
406
|
-
!
|
|
404
|
+
function R(e, t) {
|
|
405
|
+
var n = Ge(Pe++, 3);
|
|
406
|
+
!I.__s && $e(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
var n =
|
|
410
|
-
!
|
|
408
|
+
function qe(e, t) {
|
|
409
|
+
var n = Ge(Pe++, 4);
|
|
410
|
+
!I.__s && $e(n.__H, t) && (n.__ = e, n.u = t, F.__h.push(n));
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
return
|
|
412
|
+
function z(e) {
|
|
413
|
+
return Le = 5, B(function() {
|
|
414
414
|
return { current: e };
|
|
415
415
|
}, []);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
var n =
|
|
419
|
-
return
|
|
417
|
+
function B(e, t) {
|
|
418
|
+
var n = Ge(Pe++, 7);
|
|
419
|
+
return $e(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
422
|
-
return
|
|
421
|
+
function V(e, t) {
|
|
422
|
+
return Le = 8, B(function() {
|
|
423
423
|
return e;
|
|
424
424
|
}, t);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
for (var e; e =
|
|
426
|
+
function Je() {
|
|
427
|
+
for (var e; e = Re.shift();) {
|
|
428
428
|
var t = e.__H;
|
|
429
429
|
if (e.__P && t) try {
|
|
430
|
-
t.__h.some(
|
|
430
|
+
t.__h.some(Ze), t.__h.some(Qe), t.__h = [];
|
|
431
431
|
} catch (n) {
|
|
432
|
-
t.__h = [],
|
|
432
|
+
t.__h = [], I.__e(n, e.__v);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m),
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
var t = (
|
|
443
|
-
t && (
|
|
436
|
+
I.__b = function(e) {
|
|
437
|
+
F = null, ze && ze(e);
|
|
438
|
+
}, I.__ = function(e, t) {
|
|
439
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), We && We(e, t);
|
|
440
|
+
}, I.__r = function(e) {
|
|
441
|
+
Be && Be(e), Pe = 0;
|
|
442
|
+
var t = (F = e.__c).__H;
|
|
443
|
+
t && (Fe === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
|
|
444
444
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
445
|
-
})) : (t.__h.some(
|
|
446
|
-
},
|
|
447
|
-
|
|
445
|
+
})) : (t.__h.some(Ze), t.__h.some(Qe), t.__h = [], Pe = 0)), Fe = F;
|
|
446
|
+
}, I.diffed = function(e) {
|
|
447
|
+
Ve && Ve(e);
|
|
448
448
|
var t = e.__c;
|
|
449
|
-
t && t.__H && (t.__H.__h.length && (
|
|
449
|
+
t && t.__H && (t.__H.__h.length && (Re.push(t) !== 1 && Ie === I.requestAnimationFrame || ((Ie = I.requestAnimationFrame) || Xe)(Je)), t.__H.__.some(function(e) {
|
|
450
450
|
e.u && (e.__H = e.u), e.u = void 0;
|
|
451
|
-
})),
|
|
452
|
-
},
|
|
451
|
+
})), Fe = F = null;
|
|
452
|
+
}, I.__c = function(e, t) {
|
|
453
453
|
t.some(function(e) {
|
|
454
454
|
try {
|
|
455
|
-
e.__h.some(
|
|
456
|
-
return !e.__ ||
|
|
455
|
+
e.__h.some(Ze), e.__h = e.__h.filter(function(e) {
|
|
456
|
+
return !e.__ || Qe(e);
|
|
457
457
|
});
|
|
458
458
|
} catch (n) {
|
|
459
459
|
t.some(function(e) {
|
|
460
460
|
e.__h &&= [];
|
|
461
|
-
}), t = [],
|
|
461
|
+
}), t = [], I.__e(n, e.__v);
|
|
462
462
|
}
|
|
463
|
-
}),
|
|
464
|
-
},
|
|
465
|
-
|
|
463
|
+
}), He && He(e, t);
|
|
464
|
+
}, I.unmount = function(e) {
|
|
465
|
+
Ue && Ue(e);
|
|
466
466
|
var t, n = e.__c;
|
|
467
467
|
n && n.__H && (n.__H.__.some(function(e) {
|
|
468
468
|
try {
|
|
469
|
-
|
|
469
|
+
Ze(e);
|
|
470
470
|
} catch (e) {
|
|
471
471
|
t = e;
|
|
472
472
|
}
|
|
473
|
-
}), n.__H = void 0, t &&
|
|
473
|
+
}), n.__H = void 0, t && I.__e(t, n.__v));
|
|
474
474
|
};
|
|
475
|
-
var
|
|
476
|
-
function
|
|
475
|
+
var Ye = typeof requestAnimationFrame == "function";
|
|
476
|
+
function Xe(e) {
|
|
477
477
|
var t, n = function() {
|
|
478
|
-
clearTimeout(r),
|
|
478
|
+
clearTimeout(r), Ye && cancelAnimationFrame(t), setTimeout(e);
|
|
479
479
|
}, r = setTimeout(n, 35);
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
function Xe(e) {
|
|
483
|
-
var t = I, n = e.__c;
|
|
484
|
-
typeof n == "function" && (e.__c = void 0, n()), I = t;
|
|
480
|
+
Ye && (t = requestAnimationFrame(n));
|
|
485
481
|
}
|
|
486
482
|
function Ze(e) {
|
|
487
|
-
var t =
|
|
488
|
-
e.__c =
|
|
483
|
+
var t = F, n = e.__c;
|
|
484
|
+
typeof n == "function" && (e.__c = void 0, n()), F = t;
|
|
485
|
+
}
|
|
486
|
+
function Qe(e) {
|
|
487
|
+
var t = F;
|
|
488
|
+
e.__c = e.__(), F = t;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function $e(e, t) {
|
|
491
491
|
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
492
492
|
return t !== e[n];
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function et(e, t) {
|
|
496
496
|
return typeof t == "function" ? t(e) : t;
|
|
497
497
|
}
|
|
498
|
-
for (var
|
|
499
|
-
|
|
500
|
-
function
|
|
498
|
+
for (var tt = "1.38.0", H = [], U = [], nt = Uint8Array, rt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", it = 0, at = rt.length; it < at; ++it) H[it] = rt[it], U[rt.charCodeAt(it)] = it;
|
|
499
|
+
U[45] = 62, U[95] = 63;
|
|
500
|
+
function ot(e) {
|
|
501
501
|
var t = e.length;
|
|
502
502
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
503
503
|
var n = e.indexOf("=");
|
|
@@ -505,33 +505,33 @@ function at(e) {
|
|
|
505
505
|
var r = n === t ? 0 : 4 - n % 4;
|
|
506
506
|
return [n, r];
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function st(e, t, n) {
|
|
509
509
|
return (t + n) * 3 / 4 - n;
|
|
510
510
|
}
|
|
511
|
-
function st(e) {
|
|
512
|
-
var t, n = at(e), r = n[0], i = n[1], a = new tt(ot(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
513
|
-
for (c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
514
|
-
return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
515
|
-
}
|
|
516
511
|
function ct(e) {
|
|
517
|
-
|
|
512
|
+
var t, n = ot(e), r = n[0], i = n[1], a = new nt(st(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
513
|
+
for (c = 0; c < s; c += 4) t = U[e.charCodeAt(c)] << 18 | U[e.charCodeAt(c + 1)] << 12 | U[e.charCodeAt(c + 2)] << 6 | U[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
514
|
+
return i === 2 && (t = U[e.charCodeAt(c)] << 2 | U[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = U[e.charCodeAt(c)] << 10 | U[e.charCodeAt(c + 1)] << 4 | U[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
515
|
+
}
|
|
516
|
+
function lt(e) {
|
|
517
|
+
return H[e >> 18 & 63] + H[e >> 12 & 63] + H[e >> 6 & 63] + H[e & 63];
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(
|
|
519
|
+
function ut(e, t, n) {
|
|
520
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(lt(r));
|
|
521
521
|
return i.join("");
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(
|
|
525
|
-
return r === 1 ? (t = e[n - 1], i.push(
|
|
523
|
+
function dt(e) {
|
|
524
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(ut(e, o, o + a > s ? s : o + a));
|
|
525
|
+
return r === 1 ? (t = e[n - 1], i.push(H[t >> 2] + H[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(H[t >> 10] + H[t >> 4 & 63] + H[t << 2 & 63] + "=")), i.join("");
|
|
526
526
|
}
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/common/index.js
|
|
529
|
-
function
|
|
529
|
+
function ft(e) {
|
|
530
530
|
if (e === void 0) return {};
|
|
531
|
-
if (!
|
|
531
|
+
if (!mt(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
|
|
532
532
|
return e;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function pt(e) {
|
|
535
535
|
if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
|
|
536
536
|
if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
|
|
537
537
|
if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
|
|
@@ -542,146 +542,146 @@ function ft(e) {
|
|
|
542
542
|
}
|
|
543
543
|
if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function mt(e) {
|
|
546
546
|
let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
|
|
547
547
|
return t && r;
|
|
548
548
|
}
|
|
549
549
|
//#endregion
|
|
550
550
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/value.js
|
|
551
|
-
var
|
|
552
|
-
function
|
|
551
|
+
var ht = !0, gt = BigInt("-9223372036854775808"), _t = BigInt("9223372036854775807"), vt = BigInt("0"), yt = BigInt("8"), bt = BigInt("256");
|
|
552
|
+
function xt(e) {
|
|
553
553
|
return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
e <
|
|
555
|
+
function St(e) {
|
|
556
|
+
e < vt && (e -= gt + gt);
|
|
557
557
|
let t = e.toString(16);
|
|
558
558
|
t.length % 2 == 1 && (t = "0" + t);
|
|
559
559
|
let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
|
|
560
|
-
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>=
|
|
561
|
-
return
|
|
560
|
+
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= yt;
|
|
561
|
+
return dt(n);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
let t =
|
|
563
|
+
function Ct(e) {
|
|
564
|
+
let t = ct(e);
|
|
565
565
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
566
|
-
let n =
|
|
567
|
-
for (let e of t) n += BigInt(e) *
|
|
568
|
-
return n >
|
|
566
|
+
let n = vt, r = vt;
|
|
567
|
+
for (let e of t) n += BigInt(e) * bt ** r, r++;
|
|
568
|
+
return n > _t && (n += gt + gt), n;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
if (e <
|
|
570
|
+
function wt(e) {
|
|
571
|
+
if (e < gt || _t < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
572
572
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
573
|
-
return new DataView(t).setBigInt64(0, e, !0),
|
|
573
|
+
return new DataView(t).setBigInt64(0, e, !0), dt(new Uint8Array(t));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
let t =
|
|
575
|
+
function Tt(e) {
|
|
576
|
+
let t = ct(e);
|
|
577
577
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
578
578
|
return new DataView(t.buffer).getBigInt64(0, !0);
|
|
579
579
|
}
|
|
580
|
-
var
|
|
581
|
-
function
|
|
582
|
-
if (e.length >
|
|
580
|
+
var Et = DataView.prototype.setBigInt64 ? wt : St, Dt = DataView.prototype.getBigInt64 ? Tt : Ct, Ot = 1024;
|
|
581
|
+
function kt(e) {
|
|
582
|
+
if (e.length > Ot) throw Error(`Field name ${e} exceeds maximum field name length ${Ot}.`);
|
|
583
583
|
if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
|
|
584
584
|
for (let t = 0; t < e.length; t += 1) {
|
|
585
585
|
let n = e.charCodeAt(t);
|
|
586
586
|
if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function At(e) {
|
|
590
590
|
if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
|
|
591
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
591
|
+
if (Array.isArray(e)) return e.map((e) => At(e));
|
|
592
592
|
if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
|
|
593
593
|
let t = Object.entries(e);
|
|
594
594
|
if (t.length === 1) {
|
|
595
595
|
let n = t[0][0];
|
|
596
596
|
if (n === "$bytes") {
|
|
597
597
|
if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
|
|
598
|
-
return
|
|
598
|
+
return ct(e.$bytes).buffer;
|
|
599
599
|
}
|
|
600
600
|
if (n === "$integer") {
|
|
601
601
|
if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
|
|
602
|
-
return
|
|
602
|
+
return Dt(e.$integer);
|
|
603
603
|
}
|
|
604
604
|
if (n === "$float") {
|
|
605
605
|
if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
|
|
606
|
-
let t =
|
|
606
|
+
let t = ct(e.$float);
|
|
607
607
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
|
|
608
|
-
let n = new DataView(t.buffer).getFloat64(0,
|
|
609
|
-
if (!
|
|
608
|
+
let n = new DataView(t.buffer).getFloat64(0, ht);
|
|
609
|
+
if (!xt(n)) throw Error(`Float ${n} should be encoded as a number`);
|
|
610
610
|
return n;
|
|
611
611
|
}
|
|
612
612
|
if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
|
|
613
613
|
if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
|
|
614
614
|
}
|
|
615
615
|
let n = {};
|
|
616
|
-
for (let [t, r] of Object.entries(e))
|
|
616
|
+
for (let [t, r] of Object.entries(e)) kt(t), n[t] = At(r);
|
|
617
617
|
return n;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
function
|
|
619
|
+
var jt = 16384;
|
|
620
|
+
function Mt(e) {
|
|
621
621
|
let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
|
|
622
|
-
if (t.length >
|
|
623
|
-
let e =
|
|
622
|
+
if (t.length > jt) {
|
|
623
|
+
let e = jt - 14, n = t.codePointAt(e - 1);
|
|
624
624
|
return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
|
|
625
625
|
}
|
|
626
626
|
return t;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Nt(e, t, n, r) {
|
|
629
629
|
if (e === void 0) {
|
|
630
|
-
let e = n && ` (present at path ${n} in original object ${
|
|
630
|
+
let e = n && ` (present at path ${n} in original object ${Mt(t)})`;
|
|
631
631
|
throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
|
|
632
632
|
}
|
|
633
633
|
if (e === null) return e;
|
|
634
634
|
if (typeof e == "bigint") {
|
|
635
|
-
if (e <
|
|
636
|
-
return { $integer:
|
|
635
|
+
if (e < gt || _t < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
636
|
+
return { $integer: Et(e) };
|
|
637
637
|
}
|
|
638
|
-
if (typeof e == "number") if (
|
|
638
|
+
if (typeof e == "number") if (xt(e)) {
|
|
639
639
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
640
|
-
return new DataView(t).setFloat64(0, e,
|
|
640
|
+
return new DataView(t).setFloat64(0, e, ht), { $float: dt(new Uint8Array(t)) };
|
|
641
641
|
} else return e;
|
|
642
642
|
if (typeof e == "boolean" || typeof e == "string") return e;
|
|
643
|
-
if (e instanceof ArrayBuffer) return { $bytes:
|
|
644
|
-
if (Array.isArray(e)) return e.map((e, r) =>
|
|
645
|
-
if (e instanceof Set) throw Error(
|
|
646
|
-
if (e instanceof Map) throw Error(
|
|
647
|
-
if (!
|
|
643
|
+
if (e instanceof ArrayBuffer) return { $bytes: dt(new Uint8Array(e)) };
|
|
644
|
+
if (Array.isArray(e)) return e.map((e, r) => Nt(e, t, n + `[${r}]`, !1));
|
|
645
|
+
if (e instanceof Set) throw Error(Pt(n, "Set", [...e], t));
|
|
646
|
+
if (e instanceof Map) throw Error(Pt(n, "Map", [...e], t));
|
|
647
|
+
if (!mt(e)) {
|
|
648
648
|
let r = e?.constructor?.name, i = r ? `${r} ` : "";
|
|
649
|
-
throw Error(
|
|
649
|
+
throw Error(Pt(n, i, e, t));
|
|
650
650
|
}
|
|
651
651
|
let i = {}, a = Object.entries(e);
|
|
652
652
|
a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
|
|
653
|
-
for (let [e, o] of a) o === void 0 ? r && (
|
|
653
|
+
for (let [e, o] of a) o === void 0 ? r && (kt(e), i[e] = Ft(o, t, n + `.${e}`)) : (kt(e), i[e] = Nt(o, t, n + `.${e}`, !1));
|
|
654
654
|
return i;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return e ? `${t}${
|
|
656
|
+
function Pt(e, t, n, r) {
|
|
657
|
+
return e ? `${t}${Mt(n)} is not a supported Convex type (present at path ${e} in original object ${Mt(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${Mt(n)} is not a supported Convex type.`;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Ft(e, t, n) {
|
|
660
660
|
if (e === void 0) return { $undefined: null };
|
|
661
|
-
if (t === void 0) throw Error(`Programming error. Current value is ${
|
|
662
|
-
return
|
|
661
|
+
if (t === void 0) throw Error(`Programming error. Current value is ${Mt(e)} but original value is undefined`);
|
|
662
|
+
return Nt(e, t, n, !1);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
664
|
+
function It(e) {
|
|
665
|
+
return Nt(e, e, "", !1);
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/errors.js
|
|
669
|
-
var
|
|
669
|
+
var Lt = Object.defineProperty, Rt = (e, t, n) => t in e ? Lt(e, t, {
|
|
670
670
|
enumerable: !0,
|
|
671
671
|
configurable: !0,
|
|
672
672
|
writable: !0,
|
|
673
673
|
value: n
|
|
674
|
-
}) : e[t] = n,
|
|
674
|
+
}) : e[t] = n, zt = (e, t, n) => Rt(e, typeof t == "symbol" ? t : t + "", n), Bt, Vt, Ht = Symbol.for("ConvexError"), Ut = class extends (Vt = Error, Bt = Ht, Vt) {
|
|
675
675
|
constructor(e) {
|
|
676
|
-
super(typeof e == "string" ? e :
|
|
676
|
+
super(typeof e == "string" ? e : Mt(e)), zt(this, "name", "ConvexError"), zt(this, "data"), zt(this, Bt, !0), this.data = e;
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, Wt = Object.defineProperty, Gt = (e, t, n) => t in e ? Wt(e, t, {
|
|
679
679
|
enumerable: !0,
|
|
680
680
|
configurable: !0,
|
|
681
681
|
writable: !0,
|
|
682
682
|
value: n
|
|
683
|
-
}) : e[t] = n,
|
|
684
|
-
function
|
|
683
|
+
}) : e[t] = n, Kt = (e, t, n) => Gt(e, typeof t == "symbol" ? t : t + "", n), qt = "color:rgb(0, 145, 255)";
|
|
684
|
+
function Jt(e) {
|
|
685
685
|
switch (e) {
|
|
686
686
|
case "query": return "Q";
|
|
687
687
|
case "mutation": return "M";
|
|
@@ -689,9 +689,9 @@ function qt(e) {
|
|
|
689
689
|
case "any": return "?";
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var Yt = class {
|
|
693
693
|
constructor(e) {
|
|
694
|
-
|
|
694
|
+
Kt(this, "_onLogLineFuncs"), Kt(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
695
695
|
}
|
|
696
696
|
addLogLineListener(e) {
|
|
697
697
|
let t = Math.random().toString(36).substring(2, 15);
|
|
@@ -713,8 +713,8 @@ var Jt = class {
|
|
|
713
713
|
for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
function
|
|
717
|
-
let t = new
|
|
716
|
+
function Xt(e) {
|
|
717
|
+
let t = new Yt(e);
|
|
718
718
|
return t.addLogLineListener((e, ...t) => {
|
|
719
719
|
switch (e) {
|
|
720
720
|
case "debug":
|
|
@@ -733,11 +733,11 @@ function Yt(e) {
|
|
|
733
733
|
}
|
|
734
734
|
}), t;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return new
|
|
736
|
+
function Zt(e) {
|
|
737
|
+
return new Yt(e);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
let a =
|
|
739
|
+
function Qt(e, t, n, r, i) {
|
|
740
|
+
let a = Jt(n);
|
|
741
741
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
|
|
742
742
|
let t = i.match(/^\[.*?\] /);
|
|
743
743
|
if (t === null) {
|
|
@@ -745,57 +745,57 @@ function Zt(e, t, n, r, i) {
|
|
|
745
745
|
return;
|
|
746
746
|
}
|
|
747
747
|
let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
|
|
748
|
-
e.log(`%c[CONVEX ${a}(${r})] [${n}]`,
|
|
748
|
+
e.log(`%c[CONVEX ${a}(${r})] [${n}]`, qt, o);
|
|
749
749
|
} else e.error(`[CONVEX ${a}(${r})] ${i}`);
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function $t(e, t) {
|
|
752
752
|
let n = `[CONVEX FATAL ERROR] ${t}`;
|
|
753
753
|
return e.error(n), Error(n);
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return `[CONVEX ${
|
|
755
|
+
function en(e, t, n) {
|
|
756
|
+
return `[CONVEX ${Jt(e)}(${t})] ${n.errorMessage}
|
|
757
757
|
Called by client`;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function tn(e, t) {
|
|
760
760
|
return t.data = e.errorData, t;
|
|
761
761
|
}
|
|
762
762
|
//#endregion
|
|
763
763
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
|
|
764
|
-
function
|
|
764
|
+
function nn(e) {
|
|
765
765
|
let t = e.split(":"), n, r;
|
|
766
766
|
return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function rn(e, t) {
|
|
769
769
|
return JSON.stringify({
|
|
770
|
-
udfPath:
|
|
771
|
-
args:
|
|
770
|
+
udfPath: nn(e),
|
|
771
|
+
args: It(t)
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function an(e, t, n) {
|
|
775
775
|
let { initialNumItems: r, id: i } = n;
|
|
776
776
|
return JSON.stringify({
|
|
777
777
|
type: "paginated",
|
|
778
|
-
udfPath:
|
|
779
|
-
args:
|
|
780
|
-
options:
|
|
778
|
+
udfPath: nn(e),
|
|
779
|
+
args: It(t),
|
|
780
|
+
options: It({
|
|
781
781
|
initialNumItems: r,
|
|
782
782
|
id: i
|
|
783
783
|
})
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function on(e) {
|
|
787
787
|
return JSON.parse(e).type === "paginated";
|
|
788
788
|
}
|
|
789
789
|
//#endregion
|
|
790
790
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/local_state.js
|
|
791
|
-
var
|
|
791
|
+
var sn = Object.defineProperty, cn = (e, t, n) => t in e ? sn(e, t, {
|
|
792
792
|
enumerable: !0,
|
|
793
793
|
configurable: !0,
|
|
794
794
|
writable: !0,
|
|
795
795
|
value: n
|
|
796
|
-
}) : e[t] = n,
|
|
796
|
+
}) : e[t] = n, W = (e, t, n) => cn(e, typeof t == "symbol" ? t : t + "", n), ln = class {
|
|
797
797
|
constructor() {
|
|
798
|
-
|
|
798
|
+
W(this, "nextQueryId"), W(this, "querySetVersion"), W(this, "querySet"), W(this, "queryIdToToken"), W(this, "identityVersion"), W(this, "auth"), W(this, "outstandingQueriesOlderThanRestart"), W(this, "outstandingAuthOlderThanRestart"), W(this, "paused"), W(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
799
799
|
}
|
|
800
800
|
hasSyncedPastLastReconnect() {
|
|
801
801
|
return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
|
|
@@ -804,7 +804,7 @@ var on = Object.defineProperty, sn = (e, t, n) => t in e ? on(e, t, {
|
|
|
804
804
|
this.outstandingAuthOlderThanRestart = !1;
|
|
805
805
|
}
|
|
806
806
|
subscribe(e, t, n, r) {
|
|
807
|
-
let i =
|
|
807
|
+
let i = nn(e), a = rn(i, t), o = this.querySet.get(a);
|
|
808
808
|
if (o !== void 0) return o.numSubscribers += 1, {
|
|
809
809
|
queryToken: a,
|
|
810
810
|
modification: null,
|
|
@@ -824,7 +824,7 @@ var on = Object.defineProperty, sn = (e, t, n) => t in e ? on(e, t, {
|
|
|
824
824
|
type: "Add",
|
|
825
825
|
queryId: e,
|
|
826
826
|
udfPath: i,
|
|
827
|
-
args: [
|
|
827
|
+
args: [It(t)],
|
|
828
828
|
journal: n,
|
|
829
829
|
componentPath: r
|
|
830
830
|
};
|
|
@@ -859,7 +859,7 @@ var on = Object.defineProperty, sn = (e, t, n) => t in e ? on(e, t, {
|
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
queryId(e, t) {
|
|
862
|
-
let n = nn(
|
|
862
|
+
let n = rn(nn(e), t), r = this.querySet.get(n);
|
|
863
863
|
return r === void 0 ? null : r.id;
|
|
864
864
|
}
|
|
865
865
|
isCurrentOrNewerAuthVersion(e) {
|
|
@@ -931,7 +931,7 @@ var on = Object.defineProperty, sn = (e, t, n) => t in e ? on(e, t, {
|
|
|
931
931
|
type: "Add",
|
|
932
932
|
queryId: t.id,
|
|
933
933
|
udfPath: t.canonicalizedUdfPath,
|
|
934
|
-
args: [
|
|
934
|
+
args: [It(t.args)],
|
|
935
935
|
journal: t.journal,
|
|
936
936
|
componentPath: t.componentPath
|
|
937
937
|
};
|
|
@@ -1016,19 +1016,19 @@ var on = Object.defineProperty, sn = (e, t, n) => t in e ? on(e, t, {
|
|
|
1016
1016
|
let t = this.inflightRequests.get(e.requestId);
|
|
1017
1017
|
if (t === void 0 || t.status.status === "Completed") return null;
|
|
1018
1018
|
let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
|
|
1019
|
-
for (let t of e.logLines)
|
|
1019
|
+
for (let t of e.logLines) Qt(this.logger, "info", n, r, t);
|
|
1020
1020
|
let i = t.status, a, o;
|
|
1021
1021
|
if (e.success) a = {
|
|
1022
1022
|
success: !0,
|
|
1023
1023
|
logLines: e.logLines,
|
|
1024
|
-
value:
|
|
1024
|
+
value: At(e.result)
|
|
1025
1025
|
}, o = () => i.onResult(a);
|
|
1026
1026
|
else {
|
|
1027
1027
|
let t = e.result, { errorData: s } = e;
|
|
1028
|
-
|
|
1028
|
+
Qt(this.logger, "error", n, r, t), a = {
|
|
1029
1029
|
success: !1,
|
|
1030
1030
|
errorMessage: t,
|
|
1031
|
-
errorData: s === void 0 ? void 0 :
|
|
1031
|
+
errorData: s === void 0 ? void 0 : At(s),
|
|
1032
1032
|
logLines: e.logLines
|
|
1033
1033
|
}, o = () => i.onResult(a);
|
|
1034
1034
|
}
|
|
@@ -1158,19 +1158,19 @@ var Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
|
1158
1158
|
wn(this, "queryResults"), wn(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1159
1159
|
}
|
|
1160
1160
|
getQuery(t, ...n) {
|
|
1161
|
-
let r =
|
|
1161
|
+
let r = ft(n[0]), i = yn(t), a = this.queryResults.get(rn(i, r));
|
|
1162
1162
|
if (a !== void 0) return e.queryValue(a.result);
|
|
1163
1163
|
}
|
|
1164
1164
|
getAllQueries(t) {
|
|
1165
1165
|
let n = [], r = yn(t);
|
|
1166
|
-
for (let t of this.queryResults.values()) t.udfPath ===
|
|
1166
|
+
for (let t of this.queryResults.values()) t.udfPath === nn(r) && n.push({
|
|
1167
1167
|
args: t.args,
|
|
1168
1168
|
value: e.queryValue(t.result)
|
|
1169
1169
|
});
|
|
1170
1170
|
return n;
|
|
1171
1171
|
}
|
|
1172
1172
|
setQuery(e, t, n) {
|
|
1173
|
-
let r =
|
|
1173
|
+
let r = ft(t), i = yn(e), a = rn(i, r), o;
|
|
1174
1174
|
o = n === void 0 ? void 0 : {
|
|
1175
1175
|
success: !0,
|
|
1176
1176
|
value: n,
|
|
@@ -1221,7 +1221,7 @@ var Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
|
1221
1221
|
let n = t.result;
|
|
1222
1222
|
if (n !== void 0) {
|
|
1223
1223
|
if (n.success) return n.value;
|
|
1224
|
-
throw n.errorData === void 0 ? Error(
|
|
1224
|
+
throw n.errorData === void 0 ? Error(en("query", t.udfPath, n)) : tn(n, new Ut(en("query", t.udfPath, n)));
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
hasQueryResult(e) {
|
|
@@ -1298,8 +1298,8 @@ var Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
|
1298
1298
|
for (let t of e.modifications) switch (t.type) {
|
|
1299
1299
|
case "QueryUpdated": {
|
|
1300
1300
|
let e = this.queryPath(t.queryId);
|
|
1301
|
-
if (e) for (let n of t.logLines)
|
|
1302
|
-
let n =
|
|
1301
|
+
if (e) for (let n of t.logLines) Qt(this.logger, "info", "query", e, n);
|
|
1302
|
+
let n = At(t.value ?? null);
|
|
1303
1303
|
this.remoteQuerySet.set(t.queryId, {
|
|
1304
1304
|
success: !0,
|
|
1305
1305
|
value: n,
|
|
@@ -1309,12 +1309,12 @@ var Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
case "QueryFailed": {
|
|
1311
1311
|
let e = this.queryPath(t.queryId);
|
|
1312
|
-
if (e) for (let n of t.logLines)
|
|
1312
|
+
if (e) for (let n of t.logLines) Qt(this.logger, "info", "query", e, n);
|
|
1313
1313
|
let { errorData: n } = t;
|
|
1314
1314
|
this.remoteQuerySet.set(t.queryId, {
|
|
1315
1315
|
success: !1,
|
|
1316
1316
|
errorMessage: t.errorMessage,
|
|
1317
|
-
errorData: n === void 0 ? void 0 :
|
|
1317
|
+
errorData: n === void 0 ? void 0 : At(n),
|
|
1318
1318
|
logLines: t.logLines
|
|
1319
1319
|
});
|
|
1320
1320
|
break;
|
|
@@ -1336,11 +1336,11 @@ var Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
|
|
|
1336
1336
|
//#endregion
|
|
1337
1337
|
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/protocol.js
|
|
1338
1338
|
function Bn(e) {
|
|
1339
|
-
let t =
|
|
1339
|
+
let t = ct(e);
|
|
1340
1340
|
return An.fromBytesLE(Array.from(t));
|
|
1341
1341
|
}
|
|
1342
1342
|
function Vn(e) {
|
|
1343
|
-
return
|
|
1343
|
+
return dt(new Uint8Array(e.toBytesLE()));
|
|
1344
1344
|
}
|
|
1345
1345
|
function Hn(e) {
|
|
1346
1346
|
switch (e.type) {
|
|
@@ -1969,17 +1969,17 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
1969
1969
|
}), q(this, "mark", (e) => {
|
|
1970
1970
|
this.debug && mr(e, this.sessionId);
|
|
1971
1971
|
}), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
|
|
1972
|
-
n?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
1972
|
+
n?.skipConvexDeploymentUrlCheck !== !0 && pt(e), n = { ...n };
|
|
1973
1973
|
let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
|
|
1974
1974
|
if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
|
|
1975
|
-
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ?
|
|
1975
|
+
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? Zt({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : Xt({ verbose: n.verbose ?? !1 });
|
|
1976
1976
|
let a = e.search("://");
|
|
1977
1977
|
if (a === -1) throw Error("Provided address was not an absolute URL.");
|
|
1978
1978
|
let o = e.substring(a + 3), s = e.substring(0, a), c;
|
|
1979
1979
|
if (s === "http") c = "ws";
|
|
1980
1980
|
else if (s === "https") c = "wss";
|
|
1981
1981
|
else throw Error(`Unknown parent protocol ${s}`);
|
|
1982
|
-
let l = `${c}://${o}/api/${
|
|
1982
|
+
let l = `${c}://${o}/api/${tt}/sync`;
|
|
1983
1983
|
this.state = new ln(), this.remoteQuerySet = new zn((e) => this.state.queryPath(e), this.logger), this.requestManager = new pn(this.logger, this.markConnectionStateDirty);
|
|
1984
1984
|
let u = () => {
|
|
1985
1985
|
this.webSocketManager.pause(), this.state.pause();
|
|
@@ -2050,7 +2050,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2050
2050
|
this.authenticationManager.onAuthError(e);
|
|
2051
2051
|
break;
|
|
2052
2052
|
case "FatalError": {
|
|
2053
|
-
let t =
|
|
2053
|
+
let t = $t(this.logger, e.error);
|
|
2054
2054
|
throw this.webSocketManager.terminate(), t;
|
|
2055
2055
|
}
|
|
2056
2056
|
default:
|
|
@@ -2133,7 +2133,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2133
2133
|
this.webSocketManager.sendMessage(e);
|
|
2134
2134
|
}
|
|
2135
2135
|
subscribe(e, t, n) {
|
|
2136
|
-
let r =
|
|
2136
|
+
let r = ft(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
|
|
2137
2137
|
return i !== null && this.webSocketManager.sendMessage(i), {
|
|
2138
2138
|
queryToken: a,
|
|
2139
2139
|
unsubscribe: () => {
|
|
@@ -2143,7 +2143,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
2145
|
localQueryResult(e, t) {
|
|
2146
|
-
let n =
|
|
2146
|
+
let n = rn(e, ft(t));
|
|
2147
2147
|
return this.optimisticQueryResults.queryResult(n);
|
|
2148
2148
|
}
|
|
2149
2149
|
localQueryResultByToken(e) {
|
|
@@ -2153,11 +2153,11 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2153
2153
|
return this.optimisticQueryResults.hasQueryResult(e);
|
|
2154
2154
|
}
|
|
2155
2155
|
localQueryLogs(e, t) {
|
|
2156
|
-
let n =
|
|
2156
|
+
let n = rn(e, ft(t));
|
|
2157
2157
|
return this.optimisticQueryResults.queryLogs(n);
|
|
2158
2158
|
}
|
|
2159
2159
|
queryJournal(e, t) {
|
|
2160
|
-
let n =
|
|
2160
|
+
let n = rn(e, ft(t));
|
|
2161
2161
|
return this.state.queryJournal(n);
|
|
2162
2162
|
}
|
|
2163
2163
|
connectionState() {
|
|
@@ -2181,7 +2181,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
async mutation(e, t, n) {
|
|
2183
2183
|
let r = await this.mutationInternal(e, t, n);
|
|
2184
|
-
if (!r.success) throw r.errorData === void 0 ? Error(
|
|
2184
|
+
if (!r.success) throw r.errorData === void 0 ? Error(en("mutation", e, r)) : tn(r, new Ut(en("mutation", e, r)));
|
|
2185
2185
|
return r.value;
|
|
2186
2186
|
}
|
|
2187
2187
|
async mutationInternal(e, t, n, r) {
|
|
@@ -2189,7 +2189,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2189
2189
|
return i;
|
|
2190
2190
|
}
|
|
2191
2191
|
enqueueMutation(e, t, n, r) {
|
|
2192
|
-
let i =
|
|
2192
|
+
let i = ft(t);
|
|
2193
2193
|
this.tryReportLongDisconnect();
|
|
2194
2194
|
let a = this.nextRequestId;
|
|
2195
2195
|
if (this._nextRequestId++, n !== void 0) {
|
|
@@ -2223,7 +2223,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2223
2223
|
requestId: a,
|
|
2224
2224
|
udfPath: e,
|
|
2225
2225
|
componentPath: r,
|
|
2226
|
-
args: [
|
|
2226
|
+
args: [It(i)]
|
|
2227
2227
|
}, s = this.webSocketManager.sendMessage(o);
|
|
2228
2228
|
return {
|
|
2229
2229
|
requestId: a,
|
|
@@ -2232,18 +2232,18 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
async action(e, t) {
|
|
2234
2234
|
let n = await this.actionInternal(e, t);
|
|
2235
|
-
if (!n.success) throw n.errorData === void 0 ? Error(
|
|
2235
|
+
if (!n.success) throw n.errorData === void 0 ? Error(en("action", e, n)) : tn(n, new Ut(en("action", e, n)));
|
|
2236
2236
|
return n.value;
|
|
2237
2237
|
}
|
|
2238
2238
|
async actionInternal(e, t, n) {
|
|
2239
|
-
let r =
|
|
2239
|
+
let r = ft(t), i = this.nextRequestId;
|
|
2240
2240
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
2241
2241
|
let a = {
|
|
2242
2242
|
type: "Action",
|
|
2243
2243
|
requestId: i,
|
|
2244
2244
|
udfPath: e,
|
|
2245
2245
|
componentPath: n,
|
|
2246
|
-
args: [
|
|
2246
|
+
args: [It(r)]
|
|
2247
2247
|
}, o = this.webSocketManager.sendMessage(a);
|
|
2248
2248
|
return this.requestManager.request(a, o);
|
|
2249
2249
|
}
|
|
@@ -2278,7 +2278,7 @@ var _r = Object.defineProperty, vr = (e, t, n) => t in e ? _r(e, t, {
|
|
|
2278
2278
|
method: "POST",
|
|
2279
2279
|
headers: {
|
|
2280
2280
|
"Content-Type": "application/json",
|
|
2281
|
-
"Convex-Client": `npm-${
|
|
2281
|
+
"Convex-Client": `npm-${tt}`
|
|
2282
2282
|
},
|
|
2283
2283
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
2284
2284
|
}).then((e) => {
|
|
@@ -2306,7 +2306,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
|
|
|
2306
2306
|
this.client = e, this.onTransition = t, Cr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Cr(this, "lastTransitionTs"), this.lastTransitionTs = An.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
|
|
2307
2307
|
}
|
|
2308
2308
|
subscribe(e, t, n) {
|
|
2309
|
-
let r =
|
|
2309
|
+
let r = nn(e), i = an(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
|
|
2310
2310
|
return o ? (o.numSubscribers += 1, {
|
|
2311
2311
|
paginatedQueryToken: i,
|
|
2312
2312
|
unsubscribe: a
|
|
@@ -2328,7 +2328,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
|
|
|
2328
2328
|
});
|
|
2329
2329
|
}
|
|
2330
2330
|
localQueryResult(e, t, n) {
|
|
2331
|
-
let r =
|
|
2331
|
+
let r = an(nn(e), t, n);
|
|
2332
2332
|
return this.localQueryResultByToken(r);
|
|
2333
2333
|
}
|
|
2334
2334
|
localQueryResultByToken(e) {
|
|
@@ -2486,7 +2486,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
|
|
|
2486
2486
|
value: n
|
|
2487
2487
|
}) : e[t] = n, Dr = (e, t, n) => Er(e, typeof t == "symbol" ? t : t + "", n), Or, kr = class {
|
|
2488
2488
|
constructor(e, t = {}) {
|
|
2489
|
-
Dr(this, "listeners"), Dr(this, "_client"), Dr(this, "_paginatedClient"), Dr(this, "callNewListenersWithCurrentValuesTimer"), Dr(this, "_closed"), Dr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2489
|
+
Dr(this, "listeners"), Dr(this, "_client"), Dr(this, "_paginatedClient"), Dr(this, "callNewListenersWithCurrentValuesTimer"), Dr(this, "_closed"), Dr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && pt(e);
|
|
2490
2490
|
let { disabled: n, ...r } = t;
|
|
2491
2491
|
this._closed = !1, this._disabled = !!n, Or && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = Or), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new yr(e, () => {}, r), this._paginatedClient = new wr(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
|
|
2492
2492
|
}
|
|
@@ -2584,7 +2584,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
|
|
|
2584
2584
|
_transition({ queries: e, paginatedQueries: t }, n = !1) {
|
|
2585
2585
|
let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
|
|
2586
2586
|
for (let e of this.listeners) {
|
|
2587
|
-
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s =
|
|
2587
|
+
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = on(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
|
|
2588
2588
|
if (r.includes(i) || n && !o && c) {
|
|
2589
2589
|
e.hasEverRun = !0;
|
|
2590
2590
|
let n;
|
|
@@ -2632,10 +2632,10 @@ function Ar(e) {
|
|
|
2632
2632
|
return e;
|
|
2633
2633
|
}
|
|
2634
2634
|
function jr(e, t) {
|
|
2635
|
-
let n =
|
|
2635
|
+
let n = z(e);
|
|
2636
2636
|
n.current = e;
|
|
2637
|
-
let [r, i] =
|
|
2638
|
-
return [r,
|
|
2637
|
+
let [r, i] = L(() => typeof t == "function" ? t() : t);
|
|
2638
|
+
return [r, V((e) => {
|
|
2639
2639
|
i((t) => {
|
|
2640
2640
|
let r = n.current[t.kind]?.[e.type];
|
|
2641
2641
|
return r ? r(t, e) : t;
|
|
@@ -2714,9 +2714,9 @@ var Lr = Ar({
|
|
|
2714
2714
|
}
|
|
2715
2715
|
});
|
|
2716
2716
|
function Rr() {
|
|
2717
|
-
let [e, t] = jr(Lr, { kind: "idle" }), n = e, r =
|
|
2717
|
+
let [e, t] = jr(Lr, { kind: "idle" }), n = e, r = z(n);
|
|
2718
2718
|
r.current = n;
|
|
2719
|
-
let i =
|
|
2719
|
+
let i = V(async (e, n) => {
|
|
2720
2720
|
if (r.current.kind !== "pending") {
|
|
2721
2721
|
t({ type: "start" });
|
|
2722
2722
|
try {
|
|
@@ -2734,7 +2734,7 @@ function Rr() {
|
|
|
2734
2734
|
return;
|
|
2735
2735
|
}
|
|
2736
2736
|
}
|
|
2737
|
-
}, [t]), a =
|
|
2737
|
+
}, [t]), a = V(() => t({ type: "reset" }), [t]);
|
|
2738
2738
|
return {
|
|
2739
2739
|
state: n,
|
|
2740
2740
|
isIdle: n.kind === "idle",
|
|
@@ -2930,7 +2930,7 @@ function* ii(e, t, n, r, i) {
|
|
|
2930
2930
|
//#endregion
|
|
2931
2931
|
//#region src/runtime/anchor.ts
|
|
2932
2932
|
function ai(e, t) {
|
|
2933
|
-
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ?
|
|
2933
|
+
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? ci(s) : void 0, l, u;
|
|
2934
2934
|
if (s) {
|
|
2935
2935
|
let t = s.getBoundingClientRect();
|
|
2936
2936
|
t.width > 0 && t.height > 0 && (l = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), u = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)));
|
|
@@ -2947,24 +2947,26 @@ function ai(e, t) {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
function oi(e) {
|
|
2949
2949
|
if (e.anchorSelector) try {
|
|
2950
|
-
let t = document.querySelector(e.anchorSelector);
|
|
2951
|
-
if (t) {
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
};
|
|
2958
|
-
}
|
|
2950
|
+
let t = document.querySelector(e.anchorSelector), n = t?.getBoundingClientRect();
|
|
2951
|
+
if (t && n && si(n)) return {
|
|
2952
|
+
pageX: n.left + window.scrollX + (e.anchorOffsetX ?? .5) * n.width,
|
|
2953
|
+
pageY: n.top + window.scrollY + (e.anchorOffsetY ?? .5) * n.height,
|
|
2954
|
+
resolved: !0,
|
|
2955
|
+
element: t
|
|
2956
|
+
};
|
|
2959
2957
|
} catch {}
|
|
2960
2958
|
let t = document.documentElement, n = Math.max(t.scrollWidth, t.clientWidth), r = Math.max(t.scrollHeight, t.clientHeight);
|
|
2961
2959
|
return {
|
|
2962
2960
|
pageX: e.anchorX * n,
|
|
2963
2961
|
pageY: e.anchorY * r,
|
|
2964
|
-
resolved: !1
|
|
2962
|
+
resolved: !1,
|
|
2963
|
+
element: null
|
|
2965
2964
|
};
|
|
2966
2965
|
}
|
|
2967
2966
|
function si(e) {
|
|
2967
|
+
return e.width !== 0 || e.height !== 0 || e.top !== 0 || e.left !== 0;
|
|
2968
|
+
}
|
|
2969
|
+
function ci(e) {
|
|
2968
2970
|
try {
|
|
2969
2971
|
return Wr(e, { timeoutMs: 1e3 });
|
|
2970
2972
|
} catch {
|
|
@@ -2973,22 +2975,22 @@ function si(e) {
|
|
|
2973
2975
|
}
|
|
2974
2976
|
//#endregion
|
|
2975
2977
|
//#region src/runtime/api.ts
|
|
2976
|
-
var
|
|
2978
|
+
var li = class extends Error {
|
|
2977
2979
|
status;
|
|
2978
2980
|
constructor(e, t) {
|
|
2979
2981
|
super(e), this.name = "WidgetApiError", this.status = t;
|
|
2980
2982
|
}
|
|
2981
|
-
},
|
|
2983
|
+
}, ui = class extends li {
|
|
2982
2984
|
category;
|
|
2983
2985
|
constructor(e, t) {
|
|
2984
2986
|
super(`${e} took too long — check your connection`, 0), this.name = "WidgetTimeoutError", this.category = t;
|
|
2985
2987
|
}
|
|
2986
|
-
},
|
|
2987
|
-
function
|
|
2988
|
+
}, di = 15e3, J = 3e4;
|
|
2989
|
+
function fi(e, t) {
|
|
2988
2990
|
let n = AbortSignal.timeout(e);
|
|
2989
2991
|
return t ? AbortSignal.any([t, n]) : n;
|
|
2990
2992
|
}
|
|
2991
|
-
function
|
|
2993
|
+
function pi(e) {
|
|
2992
2994
|
let t = e.apiUrl.replace(/\/+$/, "");
|
|
2993
2995
|
async function n(n, r, i) {
|
|
2994
2996
|
let a = {
|
|
@@ -3002,23 +3004,23 @@ function fi(e) {
|
|
|
3002
3004
|
let l = e.getStorageMode?.() === "cookies", u = {
|
|
3003
3005
|
...r,
|
|
3004
3006
|
headers: a,
|
|
3005
|
-
signal:
|
|
3007
|
+
signal: fi(i.timeoutMs, i.signal)
|
|
3006
3008
|
};
|
|
3007
3009
|
l && (u.credentials = "include");
|
|
3008
3010
|
let d;
|
|
3009
3011
|
try {
|
|
3010
3012
|
d = await fetch(`${t}${n}`, u);
|
|
3011
3013
|
} catch (e) {
|
|
3012
|
-
throw e instanceof DOMException && e.name === "TimeoutError" ? new
|
|
3014
|
+
throw e instanceof DOMException && e.name === "TimeoutError" ? new ui(i.operation, i.category) : e;
|
|
3013
3015
|
}
|
|
3014
|
-
let f = await d.text(), p = f ?
|
|
3015
|
-
if (!d.ok) throw d.status === 401 && (s || l) && e.onUnauthorized?.(), new
|
|
3016
|
+
let f = await d.text(), p = f ? mi(f) : null;
|
|
3017
|
+
if (!d.ok) throw d.status === 401 && (s || l) && e.onUnauthorized?.(), new li((p && typeof p == "object" && "error" in p && typeof p.error == "string" ? p.error : null) ?? `Request failed with ${d.status}`, d.status);
|
|
3016
3018
|
return p;
|
|
3017
3019
|
}
|
|
3018
3020
|
return {
|
|
3019
3021
|
mintAnonIdentity(e) {
|
|
3020
3022
|
return n("/widget/anon-identity", { method: "POST" }, {
|
|
3021
|
-
timeoutMs:
|
|
3023
|
+
timeoutMs: di,
|
|
3022
3024
|
category: "read",
|
|
3023
3025
|
operation: "mint-anon-identity",
|
|
3024
3026
|
signal: e?.signal
|
|
@@ -3026,7 +3028,7 @@ function fi(e) {
|
|
|
3026
3028
|
},
|
|
3027
3029
|
getSubscriptionToken(e) {
|
|
3028
3030
|
return n("/widget/subscription-token", { method: "POST" }, {
|
|
3029
|
-
timeoutMs:
|
|
3031
|
+
timeoutMs: di,
|
|
3030
3032
|
category: "read",
|
|
3031
3033
|
operation: "mint-subscription-token",
|
|
3032
3034
|
signal: e?.signal
|
|
@@ -3034,7 +3036,7 @@ function fi(e) {
|
|
|
3034
3036
|
},
|
|
3035
3037
|
getScreenshotUploadUrl(e) {
|
|
3036
3038
|
return n("/widget/screenshots/upload-url", { method: "POST" }, {
|
|
3037
|
-
timeoutMs:
|
|
3039
|
+
timeoutMs: di,
|
|
3038
3040
|
category: "read",
|
|
3039
3041
|
operation: "mint-screenshot-upload-url",
|
|
3040
3042
|
signal: e?.signal
|
|
@@ -3042,7 +3044,7 @@ function fi(e) {
|
|
|
3042
3044
|
},
|
|
3043
3045
|
listThreads(e, t) {
|
|
3044
3046
|
return n(`/widget/threads?route=${encodeURIComponent(e)}`, { method: "GET" }, {
|
|
3045
|
-
timeoutMs:
|
|
3047
|
+
timeoutMs: di,
|
|
3046
3048
|
category: "read",
|
|
3047
3049
|
operation: "list-threads",
|
|
3048
3050
|
signal: t?.signal
|
|
@@ -3050,7 +3052,7 @@ function fi(e) {
|
|
|
3050
3052
|
},
|
|
3051
3053
|
listMembers(e) {
|
|
3052
3054
|
return n("/widget/members", { method: "GET" }, {
|
|
3053
|
-
timeoutMs:
|
|
3055
|
+
timeoutMs: di,
|
|
3054
3056
|
category: "read",
|
|
3055
3057
|
operation: "list-members",
|
|
3056
3058
|
signal: e?.signal
|
|
@@ -3058,7 +3060,7 @@ function fi(e) {
|
|
|
3058
3060
|
},
|
|
3059
3061
|
listNotifications(e) {
|
|
3060
3062
|
return n("/widget/notifications", { method: "GET" }, {
|
|
3061
|
-
timeoutMs:
|
|
3063
|
+
timeoutMs: di,
|
|
3062
3064
|
category: "read",
|
|
3063
3065
|
operation: "list-notifications",
|
|
3064
3066
|
signal: e?.signal
|
|
@@ -3169,7 +3171,7 @@ function fi(e) {
|
|
|
3169
3171
|
}
|
|
3170
3172
|
};
|
|
3171
3173
|
}
|
|
3172
|
-
function
|
|
3174
|
+
function mi(e) {
|
|
3173
3175
|
try {
|
|
3174
3176
|
return JSON.parse(e);
|
|
3175
3177
|
} catch {
|
|
@@ -3178,10 +3180,10 @@ function pi(e) {
|
|
|
3178
3180
|
}
|
|
3179
3181
|
//#endregion
|
|
3180
3182
|
//#region src/runtime/cookie-probe.ts
|
|
3181
|
-
var
|
|
3182
|
-
async function
|
|
3183
|
+
var hi = "markup.cookieProbe";
|
|
3184
|
+
async function gi(e, t) {
|
|
3183
3185
|
try {
|
|
3184
|
-
let e = sessionStorage.getItem(
|
|
3186
|
+
let e = sessionStorage.getItem(hi);
|
|
3185
3187
|
if (e === "supported") return !0;
|
|
3186
3188
|
if (e === "unsupported") return !1;
|
|
3187
3189
|
} catch {}
|
|
@@ -3200,7 +3202,7 @@ async function hi(e, t) {
|
|
|
3200
3202
|
if (!e.ok) return !1;
|
|
3201
3203
|
let { supported: t } = await e.json(), i = t === !0;
|
|
3202
3204
|
try {
|
|
3203
|
-
sessionStorage.setItem(
|
|
3205
|
+
sessionStorage.setItem(hi, i ? "supported" : "unsupported");
|
|
3204
3206
|
} catch {}
|
|
3205
3207
|
return i;
|
|
3206
3208
|
} catch (e) {
|
|
@@ -3209,8 +3211,8 @@ async function hi(e, t) {
|
|
|
3209
3211
|
}
|
|
3210
3212
|
//#endregion
|
|
3211
3213
|
//#region src/runtime/history-observer.ts
|
|
3212
|
-
var
|
|
3213
|
-
function
|
|
3214
|
+
var _i = "__markup_history_observer__", vi = "__markup_history_listeners__";
|
|
3215
|
+
function yi(e) {
|
|
3214
3216
|
e.forEach((e) => {
|
|
3215
3217
|
try {
|
|
3216
3218
|
e();
|
|
@@ -3219,60 +3221,75 @@ function vi(e) {
|
|
|
3219
3221
|
}
|
|
3220
3222
|
});
|
|
3221
3223
|
}
|
|
3222
|
-
var
|
|
3223
|
-
function
|
|
3224
|
+
var bi = "__markup_history_restore__";
|
|
3225
|
+
function xi() {
|
|
3224
3226
|
let e = history.pushState;
|
|
3225
|
-
if (e[
|
|
3226
|
-
listeners: e[
|
|
3227
|
-
restore: e[
|
|
3227
|
+
if (e[_i]) return {
|
|
3228
|
+
listeners: e[vi],
|
|
3229
|
+
restore: e[bi]
|
|
3228
3230
|
};
|
|
3229
3231
|
let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
|
|
3230
3232
|
function i(...e) {
|
|
3231
|
-
n.apply(this, e),
|
|
3233
|
+
n.apply(this, e), yi(t);
|
|
3232
3234
|
}
|
|
3233
3235
|
function a(...e) {
|
|
3234
|
-
r.apply(this, e),
|
|
3236
|
+
r.apply(this, e), yi(t);
|
|
3235
3237
|
}
|
|
3236
|
-
let o = () =>
|
|
3238
|
+
let o = () => yi(t), s = () => {
|
|
3237
3239
|
history.pushState === i && (history.pushState = n), history.replaceState === a && (history.replaceState = r), window.removeEventListener("popstate", o), t.clear();
|
|
3238
3240
|
};
|
|
3239
|
-
return Object.defineProperty(i,
|
|
3241
|
+
return Object.defineProperty(i, _i, { value: 1 }), Object.defineProperty(i, vi, { value: t }), Object.defineProperty(i, bi, { value: s }), Object.defineProperty(a, _i, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", o), {
|
|
3240
3242
|
listeners: t,
|
|
3241
3243
|
restore: s
|
|
3242
3244
|
};
|
|
3243
3245
|
}
|
|
3244
|
-
var
|
|
3245
|
-
function
|
|
3246
|
-
|
|
3247
|
-
let t =
|
|
3246
|
+
var Si = null;
|
|
3247
|
+
function Ci(e) {
|
|
3248
|
+
Si ||= xi();
|
|
3249
|
+
let t = Si;
|
|
3248
3250
|
t.listeners.add(e);
|
|
3249
3251
|
let n = !1;
|
|
3250
3252
|
return () => {
|
|
3251
|
-
n || (n = !0, t.listeners.delete(e), t.listeners.size === 0 && (t.restore(),
|
|
3253
|
+
n || (n = !0, t.listeners.delete(e), t.listeners.size === 0 && (t.restore(), Si === t && (Si = null)));
|
|
3252
3254
|
};
|
|
3253
3255
|
}
|
|
3254
3256
|
//#endregion
|
|
3257
|
+
//#region src/runtime/safe-url.ts
|
|
3258
|
+
var wi = new Set(["http:", "https:"]);
|
|
3259
|
+
function Ti(e, t) {
|
|
3260
|
+
let n;
|
|
3261
|
+
try {
|
|
3262
|
+
n = new URL(e, t);
|
|
3263
|
+
} catch {
|
|
3264
|
+
return null;
|
|
3265
|
+
}
|
|
3266
|
+
return wi.has(n.protocol) ? n : null;
|
|
3267
|
+
}
|
|
3268
|
+
//#endregion
|
|
3255
3269
|
//#region src/runtime/identity-store.ts
|
|
3256
|
-
var
|
|
3257
|
-
function
|
|
3270
|
+
var Ei = "markup.identity";
|
|
3271
|
+
function Di() {
|
|
3258
3272
|
try {
|
|
3259
|
-
let e = localStorage.getItem(
|
|
3273
|
+
let e = localStorage.getItem(Ei);
|
|
3260
3274
|
return e ? JSON.parse(e) : null;
|
|
3261
3275
|
} catch {
|
|
3262
3276
|
return null;
|
|
3263
3277
|
}
|
|
3264
3278
|
}
|
|
3265
|
-
function
|
|
3279
|
+
function Oi(e) {
|
|
3280
|
+
if (typeof e.image == "string") return Ti(e.image, location.href)?.href ?? void 0;
|
|
3281
|
+
}
|
|
3282
|
+
function ki(e) {
|
|
3266
3283
|
try {
|
|
3267
3284
|
if (e == null) {
|
|
3268
|
-
localStorage.removeItem(
|
|
3285
|
+
localStorage.removeItem(Ei);
|
|
3269
3286
|
return;
|
|
3270
3287
|
}
|
|
3271
|
-
localStorage.setItem(
|
|
3288
|
+
localStorage.setItem(Ei, JSON.stringify(e));
|
|
3272
3289
|
} catch {}
|
|
3273
3290
|
}
|
|
3274
|
-
function
|
|
3275
|
-
let e =
|
|
3291
|
+
function Ai() {
|
|
3292
|
+
let e = Di(), t = {
|
|
3276
3293
|
name: e?.name,
|
|
3277
3294
|
email: e?.email
|
|
3278
3295
|
};
|
|
@@ -3290,7 +3307,8 @@ function Ei() {
|
|
|
3290
3307
|
tokenExpiresAt: e.tokenExpiresAt,
|
|
3291
3308
|
refreshTokenExpiresAt: e.refreshTokenExpiresAt,
|
|
3292
3309
|
name: e.name,
|
|
3293
|
-
email: e.email
|
|
3310
|
+
email: e.email,
|
|
3311
|
+
image: Oi(e)
|
|
3294
3312
|
}
|
|
3295
3313
|
},
|
|
3296
3314
|
preserved: t
|
|
@@ -3310,7 +3328,8 @@ function Ei() {
|
|
|
3310
3328
|
refreshTokenExpiresAt: e.refreshTokenExpiresAt
|
|
3311
3329
|
} : {},
|
|
3312
3330
|
name: e.name,
|
|
3313
|
-
email: e.email
|
|
3331
|
+
email: e.email,
|
|
3332
|
+
image: Oi(e)
|
|
3314
3333
|
}
|
|
3315
3334
|
},
|
|
3316
3335
|
preserved: t
|
|
@@ -3332,10 +3351,10 @@ function Ei() {
|
|
|
3332
3351
|
preserved: t
|
|
3333
3352
|
};
|
|
3334
3353
|
}
|
|
3335
|
-
function
|
|
3354
|
+
function ji(e) {
|
|
3336
3355
|
switch (e.kind) {
|
|
3337
3356
|
case "verified":
|
|
3338
|
-
|
|
3357
|
+
ki({
|
|
3339
3358
|
clientId: e.identity.clientId,
|
|
3340
3359
|
storage: e.identity.storage,
|
|
3341
3360
|
token: e.identity.storage === "cookies" ? void 0 : e.identity.token,
|
|
@@ -3344,11 +3363,12 @@ function Di(e) {
|
|
|
3344
3363
|
refreshTokenExpiresAt: e.identity.refreshTokenExpiresAt,
|
|
3345
3364
|
isVerified: !0,
|
|
3346
3365
|
name: e.identity.name,
|
|
3347
|
-
email: e.identity.email
|
|
3366
|
+
email: e.identity.email,
|
|
3367
|
+
image: e.identity.image
|
|
3348
3368
|
});
|
|
3349
3369
|
return;
|
|
3350
3370
|
case "anon":
|
|
3351
|
-
|
|
3371
|
+
ki({
|
|
3352
3372
|
clientId: e.identity.clientId,
|
|
3353
3373
|
anonToken: e.identity.anonToken,
|
|
3354
3374
|
name: e.identity.name,
|
|
@@ -3356,23 +3376,23 @@ function Di(e) {
|
|
|
3356
3376
|
});
|
|
3357
3377
|
return;
|
|
3358
3378
|
case "recovering":
|
|
3359
|
-
|
|
3379
|
+
ki({
|
|
3360
3380
|
name: e.preserved.name,
|
|
3361
3381
|
email: e.preserved.email
|
|
3362
3382
|
});
|
|
3363
3383
|
return;
|
|
3364
3384
|
case "unresolved":
|
|
3365
|
-
|
|
3385
|
+
ki(null);
|
|
3366
3386
|
return;
|
|
3367
3387
|
}
|
|
3368
3388
|
}
|
|
3369
|
-
function
|
|
3389
|
+
function Mi(e) {
|
|
3370
3390
|
if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
|
|
3371
3391
|
}
|
|
3372
|
-
function
|
|
3392
|
+
function Ni(e) {
|
|
3373
3393
|
return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
|
|
3374
3394
|
}
|
|
3375
|
-
function
|
|
3395
|
+
function Pi(e) {
|
|
3376
3396
|
if (e.kind === "anon") {
|
|
3377
3397
|
let t = e.identity.name;
|
|
3378
3398
|
return t ? {
|
|
@@ -3387,8 +3407,8 @@ function Ai(e) {
|
|
|
3387
3407
|
}
|
|
3388
3408
|
//#endregion
|
|
3389
3409
|
//#region src/runtime/popup-auth.ts
|
|
3390
|
-
var
|
|
3391
|
-
async function
|
|
3410
|
+
var Fi = "MARKUP_AUTH_RESULT", Ii = "MARKUP_AUTH_RETRY", Li = "MARKUP_AUTH_EXPIRED", Ri = 5;
|
|
3411
|
+
async function zi(e) {
|
|
3392
3412
|
let { apiUrl: t, apiKey: n, useCookies: r } = e, i = new URL(t).origin, a = r ? "refresh,cookies" : "refresh";
|
|
3393
3413
|
async function o() {
|
|
3394
3414
|
let e = await fetch(`${t.replace(/\/+$/, "")}/widget/popup-exchange`, {
|
|
@@ -3419,7 +3439,7 @@ async function Fi(e) {
|
|
|
3419
3439
|
let s = (e) => {
|
|
3420
3440
|
if (!r) {
|
|
3421
3441
|
if (e) {
|
|
3422
|
-
if (n >=
|
|
3442
|
+
if (n >= Ri) {
|
|
3423
3443
|
a(), t(/* @__PURE__ */ Error("Sign-in could not be restarted — close the window and try again"));
|
|
3424
3444
|
return;
|
|
3425
3445
|
}
|
|
@@ -3437,15 +3457,15 @@ async function Fi(e) {
|
|
|
3437
3457
|
function c(n) {
|
|
3438
3458
|
if (n.origin !== i || n.source !== u) return;
|
|
3439
3459
|
let r = n.data;
|
|
3440
|
-
if (r?.type ===
|
|
3460
|
+
if (r?.type === Ii) {
|
|
3441
3461
|
s(!1);
|
|
3442
3462
|
return;
|
|
3443
3463
|
}
|
|
3444
|
-
if (r?.type ===
|
|
3464
|
+
if (r?.type === Li) {
|
|
3445
3465
|
s(!0);
|
|
3446
3466
|
return;
|
|
3447
3467
|
}
|
|
3448
|
-
r?.type ===
|
|
3468
|
+
r?.type === Fi && (a(), r.identity?.id && r.identity?.name ? e({
|
|
3449
3469
|
mode: r.mode === "cookies" ? "cookies" : "localStorage",
|
|
3450
3470
|
identity: r.identity,
|
|
3451
3471
|
token: typeof r.token == "string" ? r.token : null,
|
|
@@ -3487,58 +3507,46 @@ async function Fi(e) {
|
|
|
3487
3507
|
return d;
|
|
3488
3508
|
}
|
|
3489
3509
|
//#endregion
|
|
3490
|
-
//#region src/runtime/safe-url.ts
|
|
3491
|
-
var Ii = new Set(["http:", "https:"]);
|
|
3492
|
-
function Li(e, t) {
|
|
3493
|
-
let n;
|
|
3494
|
-
try {
|
|
3495
|
-
n = new URL(e, t);
|
|
3496
|
-
} catch {
|
|
3497
|
-
return null;
|
|
3498
|
-
}
|
|
3499
|
-
return Ii.has(n.protocol) ? n : null;
|
|
3500
|
-
}
|
|
3501
|
-
//#endregion
|
|
3502
3510
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
|
|
3503
|
-
function
|
|
3511
|
+
function Bi(e, t) {
|
|
3504
3512
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
3505
3513
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
3506
3514
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
3507
3515
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
3508
3516
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
3509
3517
|
}
|
|
3510
|
-
var
|
|
3518
|
+
var Vi = (() => {
|
|
3511
3519
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
3512
3520
|
return () => (e += 1, `u${t()}${e}`);
|
|
3513
3521
|
})();
|
|
3514
|
-
function
|
|
3522
|
+
function Hi(e) {
|
|
3515
3523
|
let t = [];
|
|
3516
3524
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
3517
3525
|
return t;
|
|
3518
3526
|
}
|
|
3519
|
-
var
|
|
3520
|
-
function
|
|
3521
|
-
return
|
|
3527
|
+
var Ui = null;
|
|
3528
|
+
function Wi(e = {}) {
|
|
3529
|
+
return Ui || (e.includeStyleProperties ? (Ui = e.includeStyleProperties, Ui) : (Ui = Hi(window.getComputedStyle(document.documentElement)), Ui));
|
|
3522
3530
|
}
|
|
3523
|
-
function
|
|
3531
|
+
function Gi(e, t) {
|
|
3524
3532
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
3525
3533
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
3526
3534
|
}
|
|
3527
|
-
function
|
|
3528
|
-
let t =
|
|
3535
|
+
function Ki(e) {
|
|
3536
|
+
let t = Gi(e, "border-left-width"), n = Gi(e, "border-right-width");
|
|
3529
3537
|
return e.clientWidth + t + n;
|
|
3530
3538
|
}
|
|
3531
|
-
function
|
|
3532
|
-
let t =
|
|
3539
|
+
function qi(e) {
|
|
3540
|
+
let t = Gi(e, "border-top-width"), n = Gi(e, "border-bottom-width");
|
|
3533
3541
|
return e.clientHeight + t + n;
|
|
3534
3542
|
}
|
|
3535
|
-
function
|
|
3543
|
+
function Ji(e, t = {}) {
|
|
3536
3544
|
return {
|
|
3537
|
-
width: t.width ||
|
|
3538
|
-
height: t.height ||
|
|
3545
|
+
width: t.width || Ki(e),
|
|
3546
|
+
height: t.height || qi(e)
|
|
3539
3547
|
};
|
|
3540
3548
|
}
|
|
3541
|
-
function
|
|
3549
|
+
function Yi() {
|
|
3542
3550
|
let e, t;
|
|
3543
3551
|
try {
|
|
3544
3552
|
t = process;
|
|
@@ -3547,10 +3555,10 @@ function qi() {
|
|
|
3547
3555
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
3548
3556
|
}
|
|
3549
3557
|
var Y = 16384;
|
|
3550
|
-
function
|
|
3558
|
+
function Xi(e) {
|
|
3551
3559
|
(e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
|
|
3552
3560
|
}
|
|
3553
|
-
function
|
|
3561
|
+
function Zi(e) {
|
|
3554
3562
|
return new Promise((t, n) => {
|
|
3555
3563
|
let r = new Image();
|
|
3556
3564
|
r.onload = () => {
|
|
@@ -3560,12 +3568,12 @@ function Yi(e) {
|
|
|
3560
3568
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
3561
3569
|
});
|
|
3562
3570
|
}
|
|
3563
|
-
async function
|
|
3571
|
+
async function Qi(e) {
|
|
3564
3572
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
3565
3573
|
}
|
|
3566
|
-
async function
|
|
3574
|
+
async function $i(e, t, n) {
|
|
3567
3575
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
3568
|
-
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e),
|
|
3576
|
+
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Qi(i);
|
|
3569
3577
|
}
|
|
3570
3578
|
var X = (e, t) => {
|
|
3571
3579
|
if (e instanceof t) return !0;
|
|
@@ -3574,66 +3582,66 @@ var X = (e, t) => {
|
|
|
3574
3582
|
};
|
|
3575
3583
|
//#endregion
|
|
3576
3584
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
|
|
3577
|
-
function
|
|
3585
|
+
function ea(e) {
|
|
3578
3586
|
let t = e.getPropertyValue("content");
|
|
3579
3587
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
3580
3588
|
}
|
|
3581
|
-
function
|
|
3582
|
-
return
|
|
3589
|
+
function ta(e, t) {
|
|
3590
|
+
return Wi(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
3583
3591
|
}
|
|
3584
|
-
function
|
|
3585
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
3592
|
+
function na(e, t, n, r) {
|
|
3593
|
+
let i = `.${e}:${t}`, a = n.cssText ? ea(n) : ta(n, r);
|
|
3586
3594
|
return document.createTextNode(`${i}{${a}}`);
|
|
3587
3595
|
}
|
|
3588
|
-
function
|
|
3596
|
+
function ra(e, t, n, r) {
|
|
3589
3597
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
3590
3598
|
if (a === "" || a === "none") return;
|
|
3591
|
-
let o =
|
|
3599
|
+
let o = Vi();
|
|
3592
3600
|
try {
|
|
3593
3601
|
t.className = `${t.className} ${o}`;
|
|
3594
3602
|
} catch {
|
|
3595
3603
|
return;
|
|
3596
3604
|
}
|
|
3597
3605
|
let s = document.createElement("style");
|
|
3598
|
-
s.appendChild(
|
|
3606
|
+
s.appendChild(na(o, n, i, r)), t.appendChild(s);
|
|
3599
3607
|
}
|
|
3600
|
-
function
|
|
3601
|
-
|
|
3608
|
+
function ia(e, t, n) {
|
|
3609
|
+
ra(e, t, ":before", n), ra(e, t, ":after", n);
|
|
3602
3610
|
}
|
|
3603
3611
|
//#endregion
|
|
3604
3612
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
|
|
3605
|
-
var
|
|
3606
|
-
woff:
|
|
3607
|
-
woff2:
|
|
3613
|
+
var aa = "application/font-woff", oa = "image/jpeg", sa = {
|
|
3614
|
+
woff: aa,
|
|
3615
|
+
woff2: aa,
|
|
3608
3616
|
ttf: "application/font-truetype",
|
|
3609
3617
|
eot: "application/vnd.ms-fontobject",
|
|
3610
3618
|
png: "image/png",
|
|
3611
|
-
jpg:
|
|
3612
|
-
jpeg:
|
|
3619
|
+
jpg: oa,
|
|
3620
|
+
jpeg: oa,
|
|
3613
3621
|
gif: "image/gif",
|
|
3614
3622
|
tiff: "image/tiff",
|
|
3615
3623
|
svg: "image/svg+xml",
|
|
3616
3624
|
webp: "image/webp"
|
|
3617
3625
|
};
|
|
3618
|
-
function
|
|
3626
|
+
function ca(e) {
|
|
3619
3627
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
3620
3628
|
return t ? t[1] : "";
|
|
3621
3629
|
}
|
|
3622
|
-
function
|
|
3623
|
-
return
|
|
3630
|
+
function la(e) {
|
|
3631
|
+
return sa[ca(e).toLowerCase()] || "";
|
|
3624
3632
|
}
|
|
3625
3633
|
//#endregion
|
|
3626
3634
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
|
|
3627
|
-
function
|
|
3635
|
+
function ua(e) {
|
|
3628
3636
|
return e.split(/,/)[1];
|
|
3629
3637
|
}
|
|
3630
|
-
function
|
|
3638
|
+
function da(e) {
|
|
3631
3639
|
return e.search(/^(data:)/) !== -1;
|
|
3632
3640
|
}
|
|
3633
|
-
function
|
|
3641
|
+
function fa(e, t) {
|
|
3634
3642
|
return `data:${t};base64,${e}`;
|
|
3635
3643
|
}
|
|
3636
|
-
async function
|
|
3644
|
+
async function pa(e, t, n) {
|
|
3637
3645
|
let r = await fetch(e, t);
|
|
3638
3646
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
3639
3647
|
let i = await r.blob();
|
|
@@ -3651,78 +3659,78 @@ async function da(e, t, n) {
|
|
|
3651
3659
|
}, a.readAsDataURL(i);
|
|
3652
3660
|
});
|
|
3653
3661
|
}
|
|
3654
|
-
var
|
|
3655
|
-
function
|
|
3662
|
+
var ma = {};
|
|
3663
|
+
function ha(e, t, n) {
|
|
3656
3664
|
let r = e.replace(/\?.*/, "");
|
|
3657
3665
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
3658
3666
|
}
|
|
3659
|
-
async function
|
|
3660
|
-
let r =
|
|
3661
|
-
if (
|
|
3667
|
+
async function ga(e, t, n) {
|
|
3668
|
+
let r = ha(e, t, n.includeQueryParams);
|
|
3669
|
+
if (ma[r] != null) return ma[r];
|
|
3662
3670
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
3663
3671
|
let i;
|
|
3664
3672
|
try {
|
|
3665
|
-
i =
|
|
3673
|
+
i = fa(await pa(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", ua(n))), t);
|
|
3666
3674
|
} catch (t) {
|
|
3667
3675
|
i = n.imagePlaceholder || "";
|
|
3668
3676
|
let r = `Failed to fetch resource: ${e}`;
|
|
3669
3677
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
3670
3678
|
}
|
|
3671
|
-
return
|
|
3679
|
+
return ma[r] = i, i;
|
|
3672
3680
|
}
|
|
3673
3681
|
//#endregion
|
|
3674
3682
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
|
|
3675
|
-
async function
|
|
3683
|
+
async function _a(e) {
|
|
3676
3684
|
let t = e.toDataURL();
|
|
3677
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
3685
|
+
return t === "data:," ? e.cloneNode(!1) : Zi(t);
|
|
3678
3686
|
}
|
|
3679
|
-
async function
|
|
3687
|
+
async function va(e, t) {
|
|
3680
3688
|
if (e.currentSrc) {
|
|
3681
3689
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
3682
|
-
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height),
|
|
3690
|
+
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Zi(t.toDataURL());
|
|
3683
3691
|
}
|
|
3684
3692
|
let n = e.poster;
|
|
3685
|
-
return
|
|
3693
|
+
return Zi(await ga(n, la(n), t));
|
|
3686
3694
|
}
|
|
3687
|
-
async function
|
|
3695
|
+
async function ya(e, t) {
|
|
3688
3696
|
try {
|
|
3689
|
-
if (e?.contentDocument?.body) return await
|
|
3697
|
+
if (e?.contentDocument?.body) return await ka(e.contentDocument.body, t, !0);
|
|
3690
3698
|
} catch {}
|
|
3691
3699
|
return e.cloneNode(!1);
|
|
3692
3700
|
}
|
|
3693
|
-
async function
|
|
3694
|
-
return X(e, HTMLCanvasElement) ?
|
|
3701
|
+
async function ba(e, t) {
|
|
3702
|
+
return X(e, HTMLCanvasElement) ? _a(e) : X(e, HTMLVideoElement) ? va(e, t) : X(e, HTMLIFrameElement) ? ya(e, t) : e.cloneNode(Sa(e));
|
|
3695
3703
|
}
|
|
3696
|
-
var
|
|
3697
|
-
async function
|
|
3698
|
-
if (
|
|
3704
|
+
var xa = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Sa = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3705
|
+
async function Ca(e, t, n) {
|
|
3706
|
+
if (Sa(t)) return t;
|
|
3699
3707
|
let r = [];
|
|
3700
|
-
return r =
|
|
3708
|
+
return r = xa(e) && e.assignedNodes ? Hi(e.assignedNodes()) : X(e, HTMLIFrameElement) && e.contentDocument?.body ? Hi(e.contentDocument.body.childNodes) : Hi((e.shadowRoot ?? e).childNodes), r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => ka(r, n)).then((e) => {
|
|
3701
3709
|
e && t.appendChild(e);
|
|
3702
3710
|
}), Promise.resolve()), t;
|
|
3703
3711
|
}
|
|
3704
|
-
function
|
|
3712
|
+
function wa(e, t, n) {
|
|
3705
3713
|
let r = t.style;
|
|
3706
3714
|
if (!r) return;
|
|
3707
3715
|
let i = window.getComputedStyle(e);
|
|
3708
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3716
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : Wi(n).forEach((n) => {
|
|
3709
3717
|
let a = i.getPropertyValue(n);
|
|
3710
3718
|
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), X(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
|
|
3711
3719
|
});
|
|
3712
3720
|
}
|
|
3713
|
-
function
|
|
3721
|
+
function Ta(e, t) {
|
|
3714
3722
|
X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
3715
3723
|
}
|
|
3716
|
-
function
|
|
3724
|
+
function Ea(e, t) {
|
|
3717
3725
|
if (X(e, HTMLSelectElement)) {
|
|
3718
3726
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
3719
3727
|
r && r.setAttribute("selected", "");
|
|
3720
3728
|
}
|
|
3721
3729
|
}
|
|
3722
|
-
function
|
|
3723
|
-
return X(t, Element) && (
|
|
3730
|
+
function Da(e, t, n) {
|
|
3731
|
+
return X(t, Element) && (wa(e, t, n), ia(e, t, n), Ta(e, t), Ea(e, t)), t;
|
|
3724
3732
|
}
|
|
3725
|
-
async function
|
|
3733
|
+
async function Oa(e, t) {
|
|
3726
3734
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
3727
3735
|
if (n.length === 0) return e;
|
|
3728
3736
|
let r = {};
|
|
@@ -3730,7 +3738,7 @@ async function Ea(e, t) {
|
|
|
3730
3738
|
let a = n[i].getAttribute("xlink:href");
|
|
3731
3739
|
if (a) {
|
|
3732
3740
|
let n = e.querySelector(a), i = document.querySelector(a);
|
|
3733
|
-
!n && i && !r[a] && (r[a] = await
|
|
3741
|
+
!n && i && !r[a] && (r[a] = await ka(i, t, !0));
|
|
3734
3742
|
}
|
|
3735
3743
|
}
|
|
3736
3744
|
let i = Object.values(r);
|
|
@@ -3744,61 +3752,61 @@ async function Ea(e, t) {
|
|
|
3744
3752
|
}
|
|
3745
3753
|
return e;
|
|
3746
3754
|
}
|
|
3747
|
-
async function
|
|
3748
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3755
|
+
async function ka(e, t, n) {
|
|
3756
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => ba(e, t)).then((n) => Ca(e, n, t)).then((n) => Da(e, n, t)).then((e) => Oa(e, t));
|
|
3749
3757
|
}
|
|
3750
3758
|
//#endregion
|
|
3751
3759
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
|
|
3752
|
-
var
|
|
3753
|
-
function
|
|
3760
|
+
var Aa = /url\((['"]?)([^'"]+?)\1\)/g, ja = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Ma = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3761
|
+
function Na(e) {
|
|
3754
3762
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3755
3763
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3756
3764
|
}
|
|
3757
|
-
function
|
|
3765
|
+
function Pa(e) {
|
|
3758
3766
|
let t = [];
|
|
3759
|
-
return e.replace(
|
|
3767
|
+
return e.replace(Aa, (e, n, r) => (t.push(r), e)), t.filter((e) => !da(e));
|
|
3760
3768
|
}
|
|
3761
|
-
async function
|
|
3769
|
+
async function Fa(e, t, n, r, i) {
|
|
3762
3770
|
try {
|
|
3763
|
-
let a = n ?
|
|
3764
|
-
return s = i ?
|
|
3771
|
+
let a = n ? Bi(t, n) : t, o = la(t), s;
|
|
3772
|
+
return s = i ? fa(await i(a), o) : await ga(a, o, r), e.replace(Na(t), `$1${s}$3`);
|
|
3765
3773
|
} catch {}
|
|
3766
3774
|
return e;
|
|
3767
3775
|
}
|
|
3768
|
-
function
|
|
3769
|
-
return t ? e.replace(
|
|
3776
|
+
function Ia(e, { preferredFontFormat: t }) {
|
|
3777
|
+
return t ? e.replace(Ma, (e) => {
|
|
3770
3778
|
for (;;) {
|
|
3771
|
-
let [n, , r] =
|
|
3779
|
+
let [n, , r] = ja.exec(e) || [];
|
|
3772
3780
|
if (!r) return "";
|
|
3773
3781
|
if (r === t) return `src: ${n};`;
|
|
3774
3782
|
}
|
|
3775
3783
|
}) : e;
|
|
3776
3784
|
}
|
|
3777
|
-
function
|
|
3778
|
-
return e.search(
|
|
3785
|
+
function La(e) {
|
|
3786
|
+
return e.search(Aa) !== -1;
|
|
3779
3787
|
}
|
|
3780
|
-
async function
|
|
3781
|
-
if (!
|
|
3782
|
-
let r =
|
|
3783
|
-
return
|
|
3788
|
+
async function Ra(e, t, n) {
|
|
3789
|
+
if (!La(e)) return e;
|
|
3790
|
+
let r = Ia(e, n);
|
|
3791
|
+
return Pa(r).reduce((e, r) => e.then((e) => Fa(e, r, t, n)), Promise.resolve(r));
|
|
3784
3792
|
}
|
|
3785
3793
|
//#endregion
|
|
3786
3794
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
|
|
3787
|
-
async function
|
|
3795
|
+
async function za(e, t, n) {
|
|
3788
3796
|
let r = t.style?.getPropertyValue(e);
|
|
3789
3797
|
if (r) {
|
|
3790
|
-
let i = await
|
|
3798
|
+
let i = await Ra(r, null, n);
|
|
3791
3799
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3792
3800
|
}
|
|
3793
3801
|
return !1;
|
|
3794
3802
|
}
|
|
3795
|
-
async function
|
|
3796
|
-
await
|
|
3803
|
+
async function Ba(e, t) {
|
|
3804
|
+
await za("background", e, t) || await za("background-image", e, t), await za("mask", e, t) || await za("-webkit-mask", e, t) || await za("mask-image", e, t) || await za("-webkit-mask-image", e, t);
|
|
3797
3805
|
}
|
|
3798
|
-
async function
|
|
3806
|
+
async function Va(e, t) {
|
|
3799
3807
|
let n = X(e, HTMLImageElement);
|
|
3800
|
-
if (!(n && !
|
|
3801
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3808
|
+
if (!(n && !da(e.src)) && !(X(e, SVGImageElement) && !da(e.href.baseVal))) return;
|
|
3809
|
+
let r = n ? e.src : e.href.baseVal, i = await ga(r, la(r), t);
|
|
3802
3810
|
await new Promise((r, a) => {
|
|
3803
3811
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3804
3812
|
try {
|
|
@@ -3811,16 +3819,16 @@ async function za(e, t) {
|
|
|
3811
3819
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3812
3820
|
});
|
|
3813
3821
|
}
|
|
3814
|
-
async function
|
|
3815
|
-
let n =
|
|
3822
|
+
async function Ha(e, t) {
|
|
3823
|
+
let n = Hi(e.childNodes).map((e) => Ua(e, t));
|
|
3816
3824
|
await Promise.all(n).then(() => e);
|
|
3817
3825
|
}
|
|
3818
|
-
async function
|
|
3819
|
-
X(e, Element) && (await
|
|
3826
|
+
async function Ua(e, t) {
|
|
3827
|
+
X(e, Element) && (await Ba(e, t), await Va(e, t), await Ha(e, t));
|
|
3820
3828
|
}
|
|
3821
3829
|
//#endregion
|
|
3822
3830
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
|
|
3823
|
-
function
|
|
3831
|
+
function Wa(e, t) {
|
|
3824
3832
|
let { style: n } = e;
|
|
3825
3833
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3826
3834
|
let r = t.style;
|
|
@@ -3830,22 +3838,22 @@ function Ha(e, t) {
|
|
|
3830
3838
|
}
|
|
3831
3839
|
//#endregion
|
|
3832
3840
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
|
|
3833
|
-
var
|
|
3834
|
-
async function
|
|
3835
|
-
let t =
|
|
3841
|
+
var Ga = {};
|
|
3842
|
+
async function Ka(e) {
|
|
3843
|
+
let t = Ga[e];
|
|
3836
3844
|
return t ?? (t = {
|
|
3837
3845
|
url: e,
|
|
3838
3846
|
cssText: await (await fetch(e)).text()
|
|
3839
|
-
},
|
|
3847
|
+
}, Ga[e] = t, t);
|
|
3840
3848
|
}
|
|
3841
|
-
async function
|
|
3849
|
+
async function qa(e, t) {
|
|
3842
3850
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3843
3851
|
let a = i.replace(r, "$1");
|
|
3844
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3852
|
+
return a.startsWith("https://") || (a = new URL(a, e.url).href), pa(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
|
|
3845
3853
|
});
|
|
3846
3854
|
return Promise.all(i).then(() => n);
|
|
3847
3855
|
}
|
|
3848
|
-
function
|
|
3856
|
+
function Ja(e) {
|
|
3849
3857
|
if (e == null) return [];
|
|
3850
3858
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3851
3859
|
for (;;) {
|
|
@@ -3865,13 +3873,13 @@ function Ka(e) {
|
|
|
3865
3873
|
}
|
|
3866
3874
|
return t;
|
|
3867
3875
|
}
|
|
3868
|
-
async function
|
|
3876
|
+
async function Ya(e, t) {
|
|
3869
3877
|
let n = [], r = [];
|
|
3870
3878
|
return e.forEach((n) => {
|
|
3871
3879
|
if ("cssRules" in n) try {
|
|
3872
|
-
|
|
3880
|
+
Hi(n.cssRules || []).forEach((e, i) => {
|
|
3873
3881
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3874
|
-
let a = i + 1, o = e.href, s =
|
|
3882
|
+
let a = i + 1, o = e.href, s = Ka(o).then((e) => qa(e, t)).then((e) => Ja(e).forEach((e) => {
|
|
3875
3883
|
try {
|
|
3876
3884
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3877
3885
|
} catch (t) {
|
|
@@ -3888,7 +3896,7 @@ async function qa(e, t) {
|
|
|
3888
3896
|
});
|
|
3889
3897
|
} catch (i) {
|
|
3890
3898
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3891
|
-
n.href != null && r.push(
|
|
3899
|
+
n.href != null && r.push(Ka(n.href).then((e) => qa(e, t)).then((e) => Ja(e).forEach((e) => {
|
|
3892
3900
|
a.insertRule(e, a.cssRules.length);
|
|
3893
3901
|
})).catch((e) => {
|
|
3894
3902
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3896,7 +3904,7 @@ async function qa(e, t) {
|
|
|
3896
3904
|
}
|
|
3897
3905
|
}), Promise.all(r).then(() => (e.forEach((e) => {
|
|
3898
3906
|
if ("cssRules" in e) try {
|
|
3899
|
-
|
|
3907
|
+
Hi(e.cssRules || []).forEach((e) => {
|
|
3900
3908
|
n.push(e);
|
|
3901
3909
|
});
|
|
3902
3910
|
} catch (t) {
|
|
@@ -3904,36 +3912,36 @@ async function qa(e, t) {
|
|
|
3904
3912
|
}
|
|
3905
3913
|
}), n));
|
|
3906
3914
|
}
|
|
3907
|
-
function
|
|
3908
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
3915
|
+
function Xa(e) {
|
|
3916
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => La(e.style.getPropertyValue("src")));
|
|
3909
3917
|
}
|
|
3910
|
-
async function
|
|
3918
|
+
async function Za(e, t) {
|
|
3911
3919
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3912
|
-
return
|
|
3920
|
+
return Xa(await Ya(Hi(e.ownerDocument.styleSheets), t));
|
|
3913
3921
|
}
|
|
3914
|
-
function
|
|
3922
|
+
function Qa(e) {
|
|
3915
3923
|
return e.trim().replace(/["']/g, "");
|
|
3916
3924
|
}
|
|
3917
|
-
function
|
|
3925
|
+
function $a(e) {
|
|
3918
3926
|
let t = /* @__PURE__ */ new Set();
|
|
3919
3927
|
function n(e) {
|
|
3920
3928
|
(e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
|
|
3921
|
-
t.add(
|
|
3929
|
+
t.add(Qa(e));
|
|
3922
3930
|
}), Array.from(e.children).forEach((e) => {
|
|
3923
3931
|
e instanceof HTMLElement && n(e);
|
|
3924
3932
|
});
|
|
3925
3933
|
}
|
|
3926
3934
|
return n(e), t;
|
|
3927
3935
|
}
|
|
3928
|
-
async function
|
|
3929
|
-
let n = await
|
|
3930
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
3936
|
+
async function eo(e, t) {
|
|
3937
|
+
let n = await Za(e, t), r = $a(e);
|
|
3938
|
+
return (await Promise.all(n.filter((e) => r.has(Qa(e.style.fontFamily))).map((e) => {
|
|
3931
3939
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
3932
|
-
return
|
|
3940
|
+
return Ra(e.cssText, n, t);
|
|
3933
3941
|
}))).join("\n");
|
|
3934
3942
|
}
|
|
3935
|
-
async function
|
|
3936
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
3943
|
+
async function to(e, t) {
|
|
3944
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await eo(e, t) : t.fontEmbedCSS;
|
|
3937
3945
|
if (n) {
|
|
3938
3946
|
let t = document.createElement("style"), r = document.createTextNode(n);
|
|
3939
3947
|
t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -3941,18 +3949,35 @@ async function $a(e, t) {
|
|
|
3941
3949
|
}
|
|
3942
3950
|
//#endregion
|
|
3943
3951
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
|
|
3944
|
-
async function
|
|
3945
|
-
let { width: n, height: r } =
|
|
3946
|
-
return await
|
|
3952
|
+
async function no(e, t = {}) {
|
|
3953
|
+
let { width: n, height: r } = Ji(e, t), i = await ka(e, t, !0);
|
|
3954
|
+
return await to(i, t), await Ua(i, t), Wa(i, t), await $i(i, n, r);
|
|
3947
3955
|
}
|
|
3948
|
-
async function
|
|
3949
|
-
let { width: n, height: r } =
|
|
3950
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
3956
|
+
async function ro(e, t = {}) {
|
|
3957
|
+
let { width: n, height: r } = Ji(e, t), i = await Zi(await no(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Yi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
3958
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || Xi(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
|
|
3951
3959
|
}
|
|
3952
3960
|
//#endregion
|
|
3953
3961
|
//#region src/runtime/screenshot.ts
|
|
3954
|
-
var
|
|
3955
|
-
|
|
3962
|
+
var io = 2 * 1024 * 1024, ao = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", oo = [
|
|
3963
|
+
{
|
|
3964
|
+
quality: .85,
|
|
3965
|
+
scale: 1
|
|
3966
|
+
},
|
|
3967
|
+
{
|
|
3968
|
+
quality: .6,
|
|
3969
|
+
scale: 1
|
|
3970
|
+
},
|
|
3971
|
+
{
|
|
3972
|
+
quality: .6,
|
|
3973
|
+
scale: .75
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
quality: .6,
|
|
3977
|
+
scale: .5
|
|
3978
|
+
}
|
|
3979
|
+
], so = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", co = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
|
|
3980
|
+
function lo(e) {
|
|
3956
3981
|
let t = e.parentElement;
|
|
3957
3982
|
for (; t;) {
|
|
3958
3983
|
if (t.hasAttribute("data-markup-safe")) return !0;
|
|
@@ -3960,37 +3985,37 @@ function ao(e) {
|
|
|
3960
3985
|
}
|
|
3961
3986
|
return !1;
|
|
3962
3987
|
}
|
|
3963
|
-
function
|
|
3988
|
+
function uo(e) {
|
|
3964
3989
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
3965
3990
|
function r(e) {
|
|
3966
3991
|
t.has(e) || (t.add(e), n.push(e));
|
|
3967
3992
|
}
|
|
3968
3993
|
for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
|
|
3969
|
-
for (let e of document.querySelectorAll(
|
|
3994
|
+
for (let e of document.querySelectorAll(co)) lo(e) || r(e);
|
|
3970
3995
|
if (e.redactSelector) try {
|
|
3971
|
-
for (let t of document.querySelectorAll(e.redactSelector))
|
|
3996
|
+
for (let t of document.querySelectorAll(e.redactSelector)) lo(t) || r(t);
|
|
3972
3997
|
} catch (e) {
|
|
3973
3998
|
N(e, { context: "screenshot-redact-selector" });
|
|
3974
3999
|
}
|
|
3975
|
-
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea"))
|
|
4000
|
+
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) lo(e) || r(e);
|
|
3976
4001
|
return n;
|
|
3977
4002
|
}
|
|
3978
|
-
function
|
|
4003
|
+
function fo(e) {
|
|
3979
4004
|
let t = e.getAttribute("style");
|
|
3980
|
-
return e.setAttribute("style", t ? `${t};${
|
|
4005
|
+
return e.setAttribute("style", t ? `${t};${so}` : so), () => {
|
|
3981
4006
|
t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
|
|
3982
4007
|
};
|
|
3983
4008
|
}
|
|
3984
|
-
function
|
|
4009
|
+
function po(e) {
|
|
3985
4010
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
3986
4011
|
let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
|
|
3987
4012
|
return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
|
|
3988
4013
|
}
|
|
3989
|
-
async function
|
|
4014
|
+
async function mo(e, t, n) {
|
|
3990
4015
|
try {
|
|
3991
|
-
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ?
|
|
4016
|
+
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? uo(n) : [], s = o.map(po), c = o.map(fo), l;
|
|
3992
4017
|
try {
|
|
3993
|
-
l = await
|
|
4018
|
+
l = await ro(document.documentElement, {
|
|
3994
4019
|
width: r,
|
|
3995
4020
|
height: i,
|
|
3996
4021
|
cacheBust: !0,
|
|
@@ -3999,6 +4024,8 @@ async function lo(e, t, n) {
|
|
|
3999
4024
|
filter(t) {
|
|
4000
4025
|
return !(e && (t === e || e.contains(t)) || t instanceof Element && t.hasAttribute("data-markup-skip"));
|
|
4001
4026
|
},
|
|
4027
|
+
imagePlaceholder: ao,
|
|
4028
|
+
onImageErrorHandler: () => {},
|
|
4002
4029
|
style: {
|
|
4003
4030
|
transform: `translateY(-${window.scrollY}px)`,
|
|
4004
4031
|
transformOrigin: "top left"
|
|
@@ -4009,29 +4036,41 @@ async function lo(e, t, n) {
|
|
|
4009
4036
|
}
|
|
4010
4037
|
if (t) {
|
|
4011
4038
|
let e = l.getContext("2d");
|
|
4012
|
-
e &&
|
|
4039
|
+
e && vo(e, t.x, t.y, a);
|
|
4013
4040
|
}
|
|
4014
|
-
let u = await
|
|
4015
|
-
|
|
4016
|
-
if (u.size <= no) return {
|
|
4041
|
+
let u = await _o(l);
|
|
4042
|
+
return u ? {
|
|
4017
4043
|
blob: u,
|
|
4018
4044
|
redactedCount: s.length,
|
|
4019
4045
|
redactedSelectors: s
|
|
4020
|
-
};
|
|
4021
|
-
let d = await uo(l, .5);
|
|
4022
|
-
return !d || d.size > no ? null : {
|
|
4023
|
-
blob: d,
|
|
4024
|
-
redactedCount: s.length,
|
|
4025
|
-
redactedSelectors: s
|
|
4026
|
-
};
|
|
4046
|
+
} : null;
|
|
4027
4047
|
} catch (e) {
|
|
4028
4048
|
return N(e, { context: "screenshot-capture" }), null;
|
|
4029
4049
|
}
|
|
4030
4050
|
}
|
|
4031
|
-
function
|
|
4051
|
+
function ho(e, t) {
|
|
4032
4052
|
return new Promise((n) => e.toBlob(n, "image/jpeg", t));
|
|
4033
4053
|
}
|
|
4034
|
-
function
|
|
4054
|
+
function go(e, t) {
|
|
4055
|
+
let n = document.createElement("canvas");
|
|
4056
|
+
n.width = Math.max(1, Math.round(e.width * t)), n.height = Math.max(1, Math.round(e.height * t));
|
|
4057
|
+
let r = n.getContext("2d");
|
|
4058
|
+
return r ? (r.imageSmoothingQuality = "high", r.drawImage(e, 0, 0, n.width, n.height), n) : null;
|
|
4059
|
+
}
|
|
4060
|
+
async function _o(e) {
|
|
4061
|
+
let t = null;
|
|
4062
|
+
for (let { quality: n, scale: r } of oo) {
|
|
4063
|
+
let i = r === 1 ? e : go(e, r);
|
|
4064
|
+
if (!i) continue;
|
|
4065
|
+
let a = await ho(i, n);
|
|
4066
|
+
if (a) {
|
|
4067
|
+
if (a.size <= io) return a;
|
|
4068
|
+
t = t == null ? a.size : Math.min(t, a.size);
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
return N(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${io})`), { context: "screenshot-encode" }), null;
|
|
4072
|
+
}
|
|
4073
|
+
function vo(e, t, n, r) {
|
|
4035
4074
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
4036
4075
|
e.save();
|
|
4037
4076
|
let l = 2 * i;
|
|
@@ -4049,7 +4088,7 @@ function fo(e, t, n, r) {
|
|
|
4049
4088
|
}
|
|
4050
4089
|
//#endregion
|
|
4051
4090
|
//#region src/runtime/use-subscription-token.ts
|
|
4052
|
-
var
|
|
4091
|
+
var yo = Ar({
|
|
4053
4092
|
idle: { issued: (e, t) => ({
|
|
4054
4093
|
kind: "active",
|
|
4055
4094
|
token: t.token,
|
|
@@ -4060,10 +4099,10 @@ var po = Ar({
|
|
|
4060
4099
|
token: t.token,
|
|
4061
4100
|
expiresAt: t.expiresAt
|
|
4062
4101
|
}) }
|
|
4063
|
-
}),
|
|
4064
|
-
function
|
|
4065
|
-
let [t, n] = jr(
|
|
4066
|
-
return
|
|
4102
|
+
}), bo = 30 * 6e4, xo = 6e4, So = 6e4;
|
|
4103
|
+
function Co(e) {
|
|
4104
|
+
let [t, n] = jr(yo, { kind: "idle" });
|
|
4105
|
+
return R(() => {
|
|
4067
4106
|
let t = !1, r = null;
|
|
4068
4107
|
async function i() {
|
|
4069
4108
|
try {
|
|
@@ -4074,11 +4113,11 @@ function _o(e) {
|
|
|
4074
4113
|
token: a.token,
|
|
4075
4114
|
expiresAt: a.expiresAt
|
|
4076
4115
|
});
|
|
4077
|
-
let o = Math.max(
|
|
4116
|
+
let o = Math.max(xo, a.expiresAt - Date.now() - bo);
|
|
4078
4117
|
r = setTimeout(i, o);
|
|
4079
4118
|
} catch (e) {
|
|
4080
4119
|
if (t) return;
|
|
4081
|
-
e?.name !== "TypeError" && N(e, { context: "subscription-token-refresh" }), r = setTimeout(i,
|
|
4120
|
+
e?.name !== "TypeError" && N(e, { context: "subscription-token-refresh" }), r = setTimeout(i, So);
|
|
4082
4121
|
}
|
|
4083
4122
|
}
|
|
4084
4123
|
return i(), () => {
|
|
@@ -4088,7 +4127,7 @@ function _o(e) {
|
|
|
4088
4127
|
}
|
|
4089
4128
|
//#endregion
|
|
4090
4129
|
//#region src/runtime/refresh-token.ts
|
|
4091
|
-
async function
|
|
4130
|
+
async function wo(e) {
|
|
4092
4131
|
try {
|
|
4093
4132
|
let t = {
|
|
4094
4133
|
method: "POST",
|
|
@@ -4124,18 +4163,18 @@ async function vo(e) {
|
|
|
4124
4163
|
}
|
|
4125
4164
|
//#endregion
|
|
4126
4165
|
//#region src/runtime/use-token-refresh.ts
|
|
4127
|
-
var
|
|
4128
|
-
function
|
|
4166
|
+
var To = 6e4, Eo = 500;
|
|
4167
|
+
function Do(e, t, n, r, i) {
|
|
4129
4168
|
let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
|
|
4130
|
-
|
|
4169
|
+
R(() => {
|
|
4131
4170
|
if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
|
|
4132
4171
|
let u = Date.now();
|
|
4133
4172
|
if (c <= u) {
|
|
4134
4173
|
i();
|
|
4135
4174
|
return;
|
|
4136
4175
|
}
|
|
4137
|
-
let d = Math.max(
|
|
4138
|
-
let a = await
|
|
4176
|
+
let d = Math.max(Eo, l - To - u), f = new AbortController(), p = window.setTimeout(async () => {
|
|
4177
|
+
let a = await wo({
|
|
4139
4178
|
apiUrl: t,
|
|
4140
4179
|
apiKey: n,
|
|
4141
4180
|
mode: o,
|
|
@@ -4178,9 +4217,18 @@ function xo(e, t, n, r, i) {
|
|
|
4178
4217
|
function Z(...e) {
|
|
4179
4218
|
return e.filter(Boolean).join(" ");
|
|
4180
4219
|
}
|
|
4220
|
+
function Oo() {
|
|
4221
|
+
return typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? {
|
|
4222
|
+
mod: "⌘",
|
|
4223
|
+
enter: "↵"
|
|
4224
|
+
} : {
|
|
4225
|
+
mod: "Ctrl",
|
|
4226
|
+
enter: "Enter"
|
|
4227
|
+
};
|
|
4228
|
+
}
|
|
4181
4229
|
//#endregion
|
|
4182
4230
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
4183
|
-
var
|
|
4231
|
+
var ko = 0;
|
|
4184
4232
|
Array.isArray;
|
|
4185
4233
|
function Q(e, n, r, i, a, o) {
|
|
4186
4234
|
n ||= {};
|
|
@@ -4197,7 +4245,7 @@ function Q(e, n, r, i, a, o) {
|
|
|
4197
4245
|
__e: null,
|
|
4198
4246
|
__c: null,
|
|
4199
4247
|
constructor: void 0,
|
|
4200
|
-
__v: --
|
|
4248
|
+
__v: --ko,
|
|
4201
4249
|
__i: -1,
|
|
4202
4250
|
__u: 0,
|
|
4203
4251
|
__source: a,
|
|
@@ -4208,7 +4256,7 @@ function Q(e, n, r, i, a, o) {
|
|
|
4208
4256
|
}
|
|
4209
4257
|
//#endregion
|
|
4210
4258
|
//#region src/runtime/ui/icons.tsx
|
|
4211
|
-
function
|
|
4259
|
+
function Ao({ size: e = 16 }) {
|
|
4212
4260
|
return /* @__PURE__ */ Q("svg", {
|
|
4213
4261
|
width: e,
|
|
4214
4262
|
height: e,
|
|
@@ -4218,7 +4266,7 @@ function Co({ size: e = 16 }) {
|
|
|
4218
4266
|
children: /* @__PURE__ */ Q("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
|
|
4219
4267
|
});
|
|
4220
4268
|
}
|
|
4221
|
-
function
|
|
4269
|
+
function jo({ size: e = 16 }) {
|
|
4222
4270
|
return /* @__PURE__ */ Q("svg", {
|
|
4223
4271
|
width: e,
|
|
4224
4272
|
height: e,
|
|
@@ -4227,7 +4275,7 @@ function wo({ size: e = 16 }) {
|
|
|
4227
4275
|
children: /* @__PURE__ */ Q("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
4228
4276
|
});
|
|
4229
4277
|
}
|
|
4230
|
-
function
|
|
4278
|
+
function Mo({ size: e = 16 }) {
|
|
4231
4279
|
return /* @__PURE__ */ Q("svg", {
|
|
4232
4280
|
width: e,
|
|
4233
4281
|
height: e,
|
|
@@ -4237,7 +4285,7 @@ function To({ size: e = 16 }) {
|
|
|
4237
4285
|
children: /* @__PURE__ */ Q("path", { d: "M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z" })
|
|
4238
4286
|
});
|
|
4239
4287
|
}
|
|
4240
|
-
function
|
|
4288
|
+
function No({ size: e = 16 }) {
|
|
4241
4289
|
return /* @__PURE__ */ Q("svg", {
|
|
4242
4290
|
width: e,
|
|
4243
4291
|
height: e,
|
|
@@ -4246,7 +4294,7 @@ function Eo({ size: e = 16 }) {
|
|
|
4246
4294
|
children: /* @__PURE__ */ Q("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
|
|
4247
4295
|
});
|
|
4248
4296
|
}
|
|
4249
|
-
function
|
|
4297
|
+
function Po({ size: e = 16 }) {
|
|
4250
4298
|
return /* @__PURE__ */ Q("svg", {
|
|
4251
4299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4252
4300
|
width: e,
|
|
@@ -4256,7 +4304,7 @@ function Do({ size: e = 16 }) {
|
|
|
4256
4304
|
children: /* @__PURE__ */ Q("path", { d: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" })
|
|
4257
4305
|
});
|
|
4258
4306
|
}
|
|
4259
|
-
function
|
|
4307
|
+
function Fo({ size: e = 16 }) {
|
|
4260
4308
|
return /* @__PURE__ */ Q("svg", {
|
|
4261
4309
|
width: e,
|
|
4262
4310
|
height: e,
|
|
@@ -4270,7 +4318,7 @@ function Oo({ size: e = 16 }) {
|
|
|
4270
4318
|
})
|
|
4271
4319
|
});
|
|
4272
4320
|
}
|
|
4273
|
-
function
|
|
4321
|
+
function Io({ size: e = 16 }) {
|
|
4274
4322
|
return /* @__PURE__ */ Q("svg", {
|
|
4275
4323
|
width: e,
|
|
4276
4324
|
height: e,
|
|
@@ -4279,7 +4327,7 @@ function ko({ size: e = 16 }) {
|
|
|
4279
4327
|
children: /* @__PURE__ */ Q("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
|
|
4280
4328
|
});
|
|
4281
4329
|
}
|
|
4282
|
-
function
|
|
4330
|
+
function Lo({ size: e = 16 }) {
|
|
4283
4331
|
return /* @__PURE__ */ Q("svg", {
|
|
4284
4332
|
width: e,
|
|
4285
4333
|
height: e,
|
|
@@ -4303,19 +4351,19 @@ function $({ size: e = 16, children: t }) {
|
|
|
4303
4351
|
children: t
|
|
4304
4352
|
});
|
|
4305
4353
|
}
|
|
4306
|
-
function
|
|
4354
|
+
function Ro({ size: e = 16 }) {
|
|
4307
4355
|
return /* @__PURE__ */ Q($, {
|
|
4308
4356
|
size: e,
|
|
4309
4357
|
children: /* @__PURE__ */ Q("path", { d: "M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8v.5z" })
|
|
4310
4358
|
});
|
|
4311
4359
|
}
|
|
4312
|
-
function
|
|
4360
|
+
function zo({ size: e = 16 }) {
|
|
4313
4361
|
return /* @__PURE__ */ Q($, {
|
|
4314
4362
|
size: e,
|
|
4315
4363
|
children: [/* @__PURE__ */ Q("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" }), /* @__PURE__ */ Q("path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })]
|
|
4316
4364
|
});
|
|
4317
4365
|
}
|
|
4318
|
-
function
|
|
4366
|
+
function Bo({ size: e = 16 }) {
|
|
4319
4367
|
return /* @__PURE__ */ Q($, {
|
|
4320
4368
|
size: e,
|
|
4321
4369
|
children: [/* @__PURE__ */ Q("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ Q("circle", {
|
|
@@ -4325,7 +4373,7 @@ function No({ size: e = 16 }) {
|
|
|
4325
4373
|
})]
|
|
4326
4374
|
});
|
|
4327
4375
|
}
|
|
4328
|
-
function
|
|
4376
|
+
function Vo({ size: e = 16 }) {
|
|
4329
4377
|
return /* @__PURE__ */ Q($, {
|
|
4330
4378
|
size: e,
|
|
4331
4379
|
children: [
|
|
@@ -4336,13 +4384,13 @@ function Po({ size: e = 16 }) {
|
|
|
4336
4384
|
]
|
|
4337
4385
|
});
|
|
4338
4386
|
}
|
|
4339
|
-
function
|
|
4387
|
+
function Ho({ size: e = 16 }) {
|
|
4340
4388
|
return /* @__PURE__ */ Q($, {
|
|
4341
4389
|
size: e,
|
|
4342
4390
|
children: /* @__PURE__ */ Q("path", { d: "M3 6h18M3 12h18M3 18h18" })
|
|
4343
4391
|
});
|
|
4344
4392
|
}
|
|
4345
|
-
function
|
|
4393
|
+
function Uo({ size: e = 16 }) {
|
|
4346
4394
|
return /* @__PURE__ */ Q($, {
|
|
4347
4395
|
size: e,
|
|
4348
4396
|
children: [/* @__PURE__ */ Q("circle", {
|
|
@@ -4352,13 +4400,13 @@ function Io({ size: e = 16 }) {
|
|
|
4352
4400
|
}), /* @__PURE__ */ Q("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })]
|
|
4353
4401
|
});
|
|
4354
4402
|
}
|
|
4355
|
-
function
|
|
4403
|
+
function Wo({ size: e = 16 }) {
|
|
4356
4404
|
return /* @__PURE__ */ Q($, {
|
|
4357
4405
|
size: e,
|
|
4358
4406
|
children: /* @__PURE__ */ Q("path", { d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z" })
|
|
4359
4407
|
});
|
|
4360
4408
|
}
|
|
4361
|
-
function
|
|
4409
|
+
function Go({ size: e = 16 }) {
|
|
4362
4410
|
return /* @__PURE__ */ Q($, {
|
|
4363
4411
|
size: e,
|
|
4364
4412
|
children: [/* @__PURE__ */ Q("rect", {
|
|
@@ -4370,13 +4418,13 @@ function Ro({ size: e = 16 }) {
|
|
|
4370
4418
|
}), /* @__PURE__ */ Q("path", { d: "M8 21h8M12 17v4" })]
|
|
4371
4419
|
});
|
|
4372
4420
|
}
|
|
4373
|
-
function
|
|
4421
|
+
function Ko({ size: e = 16 }) {
|
|
4374
4422
|
return /* @__PURE__ */ Q($, {
|
|
4375
4423
|
size: e,
|
|
4376
4424
|
children: /* @__PURE__ */ Q("path", { d: "M12 22s8-3.5 8-10V5l-8-3-8 3v7c0 6.5 8 10 8 10z" })
|
|
4377
4425
|
});
|
|
4378
4426
|
}
|
|
4379
|
-
function
|
|
4427
|
+
function qo({ size: e = 16 }) {
|
|
4380
4428
|
return /* @__PURE__ */ Q($, {
|
|
4381
4429
|
size: e,
|
|
4382
4430
|
children: [/* @__PURE__ */ Q("rect", {
|
|
@@ -4388,19 +4436,19 @@ function Bo({ size: e = 16 }) {
|
|
|
4388
4436
|
}), /* @__PURE__ */ Q("path", { d: "M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M10 14h4" })]
|
|
4389
4437
|
});
|
|
4390
4438
|
}
|
|
4391
|
-
function
|
|
4439
|
+
function Jo({ size: e = 16 }) {
|
|
4392
4440
|
return /* @__PURE__ */ Q($, {
|
|
4393
4441
|
size: e,
|
|
4394
4442
|
children: [/* @__PURE__ */ Q("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }), /* @__PURE__ */ Q("path", { d: "M10 17l5-5-5-5M15 12H3" })]
|
|
4395
4443
|
});
|
|
4396
4444
|
}
|
|
4397
|
-
function
|
|
4445
|
+
function Yo({ size: e = 16 }) {
|
|
4398
4446
|
return /* @__PURE__ */ Q($, {
|
|
4399
4447
|
size: e,
|
|
4400
4448
|
children: [/* @__PURE__ */ Q("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ Q("path", { d: "M16 17l5-5-5-5M21 12H9" })]
|
|
4401
4449
|
});
|
|
4402
4450
|
}
|
|
4403
|
-
function
|
|
4451
|
+
function Xo({ size: e = 16 }) {
|
|
4404
4452
|
return /* @__PURE__ */ Q($, {
|
|
4405
4453
|
size: e,
|
|
4406
4454
|
children: [/* @__PURE__ */ Q("circle", {
|
|
@@ -4410,7 +4458,26 @@ function Uo({ size: e = 16 }) {
|
|
|
4410
4458
|
}), /* @__PURE__ */ Q("path", { d: "M4 21a8 8 0 0 1 16 0" })]
|
|
4411
4459
|
});
|
|
4412
4460
|
}
|
|
4413
|
-
function
|
|
4461
|
+
function Zo({ size: e = 16 }) {
|
|
4462
|
+
return /* @__PURE__ */ Q($, {
|
|
4463
|
+
size: e,
|
|
4464
|
+
children: [
|
|
4465
|
+
/* @__PURE__ */ Q("path", { d: "M12 8V4H8" }),
|
|
4466
|
+
/* @__PURE__ */ Q("rect", {
|
|
4467
|
+
x: "4",
|
|
4468
|
+
y: "8",
|
|
4469
|
+
width: "16",
|
|
4470
|
+
height: "12",
|
|
4471
|
+
rx: "2"
|
|
4472
|
+
}),
|
|
4473
|
+
/* @__PURE__ */ Q("path", { d: "M2 14h2" }),
|
|
4474
|
+
/* @__PURE__ */ Q("path", { d: "M20 14h2" }),
|
|
4475
|
+
/* @__PURE__ */ Q("path", { d: "M15 13v2" }),
|
|
4476
|
+
/* @__PURE__ */ Q("path", { d: "M9 13v2" })
|
|
4477
|
+
]
|
|
4478
|
+
});
|
|
4479
|
+
}
|
|
4480
|
+
function Qo({ size: e = 16 }) {
|
|
4414
4481
|
return /* @__PURE__ */ Q($, {
|
|
4415
4482
|
size: e,
|
|
4416
4483
|
children: [
|
|
@@ -4422,9 +4489,9 @@ function Wo({ size: e = 16 }) {
|
|
|
4422
4489
|
}
|
|
4423
4490
|
//#endregion
|
|
4424
4491
|
//#region src/runtime/ui/identity-menu.tsx
|
|
4425
|
-
function
|
|
4426
|
-
let [c, l] =
|
|
4427
|
-
|
|
4492
|
+
function $o({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, onSignIn: a, onSignOut: o, onForgetMe: s }) {
|
|
4493
|
+
let [c, l] = L(!1), [u, d] = L(!1), [f, p] = L(!1), m = z(null);
|
|
4494
|
+
R(() => {
|
|
4428
4495
|
if (!c) return;
|
|
4429
4496
|
function e(e) {
|
|
4430
4497
|
let t = m.current;
|
|
@@ -4436,10 +4503,10 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4436
4503
|
return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
|
|
4437
4504
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
4438
4505
|
};
|
|
4439
|
-
}, [c]),
|
|
4506
|
+
}, [c]), R(() => {
|
|
4440
4507
|
c || (d(!1), p(!1));
|
|
4441
4508
|
}, [c]);
|
|
4442
|
-
let h =
|
|
4509
|
+
let h = Ni(e), g = es(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = L(null), x = _ && v != null && y !== v, C = _ ? e.identity.email : null, w = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
|
|
4443
4510
|
return /* @__PURE__ */ Q("div", {
|
|
4444
4511
|
ref: m,
|
|
4445
4512
|
style: {
|
|
@@ -4462,13 +4529,23 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4462
4529
|
children: [/* @__PURE__ */ Q("span", {
|
|
4463
4530
|
class: Z("markup-tb-avatar", !_ && "is-anon"),
|
|
4464
4531
|
"aria-hidden": "true",
|
|
4465
|
-
children:
|
|
4532
|
+
children: x ? /* @__PURE__ */ Q("img", {
|
|
4533
|
+
class: "markup-avatar-img",
|
|
4534
|
+
src: v,
|
|
4535
|
+
alt: "",
|
|
4536
|
+
decoding: "async",
|
|
4537
|
+
referrerpolicy: "no-referrer",
|
|
4538
|
+
onError: () => b(v)
|
|
4539
|
+
}) : _ && g ? /* @__PURE__ */ Q("span", {
|
|
4540
|
+
class: "markup-avatar-initials",
|
|
4541
|
+
children: g
|
|
4542
|
+
}) : /* @__PURE__ */ Q(Xo, { size: 14 })
|
|
4466
4543
|
}), _ && h ? /* @__PURE__ */ Q("span", {
|
|
4467
4544
|
class: "markup-sr-only",
|
|
4468
4545
|
children: h
|
|
4469
4546
|
}) : null]
|
|
4470
4547
|
}), c ? /* @__PURE__ */ Q("div", {
|
|
4471
|
-
class: Z("markup-pop",
|
|
4548
|
+
class: Z("markup-pop", w),
|
|
4472
4549
|
"data-pop": "identity",
|
|
4473
4550
|
role: "menu",
|
|
4474
4551
|
children: _ ? /* @__PURE__ */ Q(S, { children: [
|
|
@@ -4477,9 +4554,9 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4477
4554
|
children: [/* @__PURE__ */ Q("span", {
|
|
4478
4555
|
class: "nm",
|
|
4479
4556
|
children: h ?? "Account"
|
|
4480
|
-
}),
|
|
4557
|
+
}), C ? /* @__PURE__ */ Q("span", {
|
|
4481
4558
|
class: "em",
|
|
4482
|
-
children:
|
|
4559
|
+
children: C
|
|
4483
4560
|
}) : null]
|
|
4484
4561
|
}),
|
|
4485
4562
|
i ? /* @__PURE__ */ Q("a", {
|
|
@@ -4491,7 +4568,7 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4491
4568
|
onClick: () => l(!1),
|
|
4492
4569
|
children: [/* @__PURE__ */ Q("span", {
|
|
4493
4570
|
class: "ic",
|
|
4494
|
-
children: /* @__PURE__ */ Q(
|
|
4571
|
+
children: /* @__PURE__ */ Q(Qo, { size: 16 })
|
|
4495
4572
|
}), /* @__PURE__ */ Q("span", {
|
|
4496
4573
|
class: "lbl",
|
|
4497
4574
|
children: "Account"
|
|
@@ -4507,7 +4584,7 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4507
4584
|
},
|
|
4508
4585
|
children: [/* @__PURE__ */ Q("span", {
|
|
4509
4586
|
class: "ic",
|
|
4510
|
-
children: /* @__PURE__ */ Q(
|
|
4587
|
+
children: /* @__PURE__ */ Q(Yo, { size: 16 })
|
|
4511
4588
|
}), /* @__PURE__ */ Q("span", {
|
|
4512
4589
|
class: "lbl",
|
|
4513
4590
|
children: r ? "Signing out…" : f ? "Confirm — sign out of this site" : "Sign out"
|
|
@@ -4530,7 +4607,7 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4530
4607
|
onClick: () => {
|
|
4531
4608
|
l(!1), a();
|
|
4532
4609
|
},
|
|
4533
|
-
children: [/* @__PURE__ */ Q(
|
|
4610
|
+
children: [/* @__PURE__ */ Q(Jo, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
|
|
4534
4611
|
}),
|
|
4535
4612
|
/* @__PURE__ */ Q("button", {
|
|
4536
4613
|
type: "button",
|
|
@@ -4549,12 +4626,12 @@ function Go({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4549
4626
|
}) : null]
|
|
4550
4627
|
});
|
|
4551
4628
|
}
|
|
4552
|
-
function
|
|
4629
|
+
function es(e) {
|
|
4553
4630
|
return e && e.trim().split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || null;
|
|
4554
4631
|
}
|
|
4555
4632
|
//#endregion
|
|
4556
4633
|
//#region src/runtime/ui/notifications-panel.tsx
|
|
4557
|
-
function
|
|
4634
|
+
function ts({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMarkAllRead: a, isMarkingAll: o }) {
|
|
4558
4635
|
let s = e.some((e) => e.readAt == null);
|
|
4559
4636
|
return /* @__PURE__ */ Q("div", {
|
|
4560
4637
|
class: "markup-notifications-panel",
|
|
@@ -4569,7 +4646,7 @@ function qo({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
4569
4646
|
title: "Back to menu",
|
|
4570
4647
|
"aria-label": "Back to menu",
|
|
4571
4648
|
onClick: r,
|
|
4572
|
-
children: /* @__PURE__ */ Q(
|
|
4649
|
+
children: /* @__PURE__ */ Q(Mo, { size: 16 })
|
|
4573
4650
|
}),
|
|
4574
4651
|
/* @__PURE__ */ Q("span", {
|
|
4575
4652
|
class: "markup-eyebrow",
|
|
@@ -4621,13 +4698,20 @@ function qo({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
4621
4698
|
class: "markup-notifications-panel-actor",
|
|
4622
4699
|
children: e.actorName
|
|
4623
4700
|
}),
|
|
4701
|
+
e.actorVia === "mcp" ? /* @__PURE__ */ Q("span", {
|
|
4702
|
+
class: "markup-comment-badge is-agent",
|
|
4703
|
+
role: "img",
|
|
4704
|
+
"aria-label": "Written by an AI agent",
|
|
4705
|
+
title: "Written by an AI agent on this person's behalf",
|
|
4706
|
+
children: /* @__PURE__ */ Q(Zo, { size: 11 })
|
|
4707
|
+
}) : null,
|
|
4624
4708
|
/* @__PURE__ */ Q("span", {
|
|
4625
4709
|
class: "markup-notifications-panel-sep",
|
|
4626
4710
|
children: "·"
|
|
4627
4711
|
}),
|
|
4628
4712
|
/* @__PURE__ */ Q("span", {
|
|
4629
4713
|
class: "markup-notifications-panel-time",
|
|
4630
|
-
children:
|
|
4714
|
+
children: ns(e.createdAt)
|
|
4631
4715
|
})
|
|
4632
4716
|
]
|
|
4633
4717
|
}),
|
|
@@ -4656,7 +4740,7 @@ function qo({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
4656
4740
|
})]
|
|
4657
4741
|
});
|
|
4658
4742
|
}
|
|
4659
|
-
function
|
|
4743
|
+
function ns(e) {
|
|
4660
4744
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
4661
4745
|
if (n < 60) return "just now";
|
|
4662
4746
|
let r = Math.floor(n / 60);
|
|
@@ -4668,9 +4752,9 @@ function Jo(e) {
|
|
|
4668
4752
|
}
|
|
4669
4753
|
//#endregion
|
|
4670
4754
|
//#region src/runtime/ui/inbox-popover.tsx
|
|
4671
|
-
function
|
|
4672
|
-
let c =
|
|
4673
|
-
return
|
|
4755
|
+
function rs({ position: e, items: t, isLoading: n, error: r, isMarkingAll: i, onClose: a, onItemClick: o, onMarkAllRead: s }) {
|
|
4756
|
+
let c = z(null);
|
|
4757
|
+
return R(() => {
|
|
4674
4758
|
function e(e) {
|
|
4675
4759
|
let t = c.current;
|
|
4676
4760
|
if (t && !e.composedPath().includes(t)) {
|
|
@@ -4692,7 +4776,7 @@ function Yo({ position: e, items: t, isLoading: n, error: r, isMarkingAll: i, on
|
|
|
4692
4776
|
children: /* @__PURE__ */ Q("div", {
|
|
4693
4777
|
class: "markup-pop",
|
|
4694
4778
|
"data-pop": "inbox",
|
|
4695
|
-
children: /* @__PURE__ */ Q(
|
|
4779
|
+
children: /* @__PURE__ */ Q(ts, {
|
|
4696
4780
|
items: t,
|
|
4697
4781
|
isLoading: n,
|
|
4698
4782
|
error: r,
|
|
@@ -4706,12 +4790,12 @@ function Yo({ position: e, items: t, isLoading: n, error: r, isMarkingAll: i, on
|
|
|
4706
4790
|
}
|
|
4707
4791
|
//#endregion
|
|
4708
4792
|
//#region src/runtime/use-drag.ts
|
|
4709
|
-
function
|
|
4710
|
-
let t =
|
|
4793
|
+
function is(e) {
|
|
4794
|
+
let t = z(e);
|
|
4711
4795
|
t.current = e;
|
|
4712
|
-
let [n, r] =
|
|
4796
|
+
let [n, r] = L(!1);
|
|
4713
4797
|
return {
|
|
4714
|
-
onPointerDown:
|
|
4798
|
+
onPointerDown: V((e) => {
|
|
4715
4799
|
let n = t.current;
|
|
4716
4800
|
if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
4717
4801
|
let i = e.currentTarget;
|
|
@@ -4734,8 +4818,8 @@ function Xo(e) {
|
|
|
4734
4818
|
h = !0, r(!0), t.current.onStart?.();
|
|
4735
4819
|
}
|
|
4736
4820
|
let a = Math.max(p, window.innerWidth - u - p), _ = Math.max(p, window.innerHeight - d - p), v = {
|
|
4737
|
-
left:
|
|
4738
|
-
top:
|
|
4821
|
+
left: as(c + n, p, a),
|
|
4822
|
+
top: as(l + i, p, _)
|
|
4739
4823
|
};
|
|
4740
4824
|
g = v, t.current.onMove(v);
|
|
4741
4825
|
}
|
|
@@ -4750,12 +4834,12 @@ function Xo(e) {
|
|
|
4750
4834
|
isDragging: n
|
|
4751
4835
|
};
|
|
4752
4836
|
}
|
|
4753
|
-
function
|
|
4837
|
+
function as(e, t, n) {
|
|
4754
4838
|
return Math.max(t, Math.min(n, e));
|
|
4755
4839
|
}
|
|
4756
4840
|
//#endregion
|
|
4757
4841
|
//#region src/runtime/use-focus-trap.ts
|
|
4758
|
-
var
|
|
4842
|
+
var os = [
|
|
4759
4843
|
"a[href]",
|
|
4760
4844
|
"button:not([disabled])",
|
|
4761
4845
|
"input:not([disabled])",
|
|
@@ -4763,14 +4847,14 @@ var Qo = [
|
|
|
4763
4847
|
"textarea:not([disabled])",
|
|
4764
4848
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
4765
4849
|
].join(",");
|
|
4766
|
-
function
|
|
4767
|
-
|
|
4850
|
+
function ss(e, t) {
|
|
4851
|
+
R(() => {
|
|
4768
4852
|
if (!t) return;
|
|
4769
4853
|
let n = e.current;
|
|
4770
4854
|
if (!n) return;
|
|
4771
4855
|
function r(e) {
|
|
4772
4856
|
if (e.key !== "Tab") return;
|
|
4773
|
-
let t = Array.from(n.querySelectorAll(
|
|
4857
|
+
let t = Array.from(n.querySelectorAll(os)), r = t[0], i = t[t.length - 1];
|
|
4774
4858
|
if (!r || !i) return;
|
|
4775
4859
|
let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
|
|
4776
4860
|
(e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
|
|
@@ -4780,9 +4864,9 @@ function $o(e, t) {
|
|
|
4780
4864
|
}
|
|
4781
4865
|
//#endregion
|
|
4782
4866
|
//#region src/runtime/use-object-url.ts
|
|
4783
|
-
function
|
|
4784
|
-
let [t, n] =
|
|
4785
|
-
return
|
|
4867
|
+
function cs(e) {
|
|
4868
|
+
let [t, n] = L(null);
|
|
4869
|
+
return R(() => {
|
|
4786
4870
|
if (!e) {
|
|
4787
4871
|
n(null);
|
|
4788
4872
|
return;
|
|
@@ -4793,9 +4877,9 @@ function es(e) {
|
|
|
4793
4877
|
}
|
|
4794
4878
|
//#endregion
|
|
4795
4879
|
//#region src/runtime/ui/author-prompt.tsx
|
|
4796
|
-
function
|
|
4797
|
-
let [o, s] =
|
|
4798
|
-
|
|
4880
|
+
function ls({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
|
|
4881
|
+
let [o, s] = L(""), [c, l] = L(""), u = z(null);
|
|
4882
|
+
R(() => {
|
|
4799
4883
|
u.current?.focus();
|
|
4800
4884
|
}, []);
|
|
4801
4885
|
function d(n) {
|
|
@@ -4872,27 +4956,27 @@ function ts({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
|
|
|
4872
4956
|
}
|
|
4873
4957
|
//#endregion
|
|
4874
4958
|
//#region src/runtime/mention-input.ts
|
|
4875
|
-
var
|
|
4959
|
+
var us = "data-markup-mention", ds = "data-markup-mention-name", fs = new Set([
|
|
4876
4960
|
"DIV",
|
|
4877
4961
|
"P",
|
|
4878
4962
|
"LI",
|
|
4879
4963
|
"BLOCKQUOTE",
|
|
4880
4964
|
"PRE"
|
|
4881
|
-
]),
|
|
4882
|
-
function
|
|
4965
|
+
]), ps = 3, ms = 1;
|
|
4966
|
+
function hs(e) {
|
|
4883
4967
|
let t = "", n = (r) => {
|
|
4884
4968
|
let i = r.childNodes;
|
|
4885
4969
|
for (let a = 0; a < i.length; a++) {
|
|
4886
4970
|
let o = i[a];
|
|
4887
4971
|
if (!o) continue;
|
|
4888
|
-
if (o.nodeType ===
|
|
4972
|
+
if (o.nodeType === ps) {
|
|
4889
4973
|
t += o.data;
|
|
4890
4974
|
continue;
|
|
4891
4975
|
}
|
|
4892
|
-
if (o.nodeType !==
|
|
4893
|
-
let s = o, c = s.getAttribute(
|
|
4976
|
+
if (o.nodeType !== ms) continue;
|
|
4977
|
+
let s = o, c = s.getAttribute(us);
|
|
4894
4978
|
if (c) {
|
|
4895
|
-
let e =
|
|
4979
|
+
let e = gs(s);
|
|
4896
4980
|
t += Ir({
|
|
4897
4981
|
userId: c,
|
|
4898
4982
|
name: e
|
|
@@ -4903,77 +4987,77 @@ function ss(e) {
|
|
|
4903
4987
|
r === e && a === i.length - 1 || (t += "\n");
|
|
4904
4988
|
continue;
|
|
4905
4989
|
}
|
|
4906
|
-
|
|
4990
|
+
fs.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
|
|
4907
4991
|
}
|
|
4908
4992
|
};
|
|
4909
4993
|
return n(e), t;
|
|
4910
4994
|
}
|
|
4911
|
-
function
|
|
4912
|
-
return e.getAttribute(
|
|
4995
|
+
function gs(e) {
|
|
4996
|
+
return e.getAttribute(ds) || (e.textContent ?? "").replace(/^@/, "");
|
|
4913
4997
|
}
|
|
4914
|
-
function
|
|
4998
|
+
function _s(e, t, n) {
|
|
4915
4999
|
let r = e.createElement("span");
|
|
4916
|
-
return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(
|
|
5000
|
+
return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(us, t.userId), r.setAttribute(ds, t.name), r.textContent = `@${t.name}`, r;
|
|
4917
5001
|
}
|
|
4918
|
-
function
|
|
5002
|
+
function vs(e, t, n) {
|
|
4919
5003
|
let r = e.createDocumentFragment();
|
|
4920
5004
|
for (let i of Nr(t)) {
|
|
4921
5005
|
if (i.type === "text") {
|
|
4922
5006
|
i.value && r.appendChild(e.createTextNode(i.value));
|
|
4923
5007
|
continue;
|
|
4924
5008
|
}
|
|
4925
|
-
r.appendChild(
|
|
5009
|
+
r.appendChild(_s(e, {
|
|
4926
5010
|
userId: i.userId,
|
|
4927
5011
|
name: i.name
|
|
4928
5012
|
}, n));
|
|
4929
5013
|
}
|
|
4930
5014
|
return r;
|
|
4931
5015
|
}
|
|
4932
|
-
function
|
|
5016
|
+
function ys(e) {
|
|
4933
5017
|
let t = e.getRootNode();
|
|
4934
5018
|
return typeof t.getSelection == "function" ? t.getSelection() : e.ownerDocument.getSelection();
|
|
4935
5019
|
}
|
|
4936
|
-
function
|
|
4937
|
-
let t =
|
|
5020
|
+
function bs(e) {
|
|
5021
|
+
let t = ys(e);
|
|
4938
5022
|
if (!t || t.rangeCount === 0 || !t.isCollapsed) return null;
|
|
4939
5023
|
let n = t.focusNode;
|
|
4940
|
-
return !n || n.nodeType !==
|
|
5024
|
+
return !n || n.nodeType !== ps || !e.contains(n) || xs(n, e) ? null : {
|
|
4941
5025
|
node: n,
|
|
4942
5026
|
offset: t.focusOffset
|
|
4943
5027
|
};
|
|
4944
5028
|
}
|
|
4945
|
-
function
|
|
5029
|
+
function xs(e, t) {
|
|
4946
5030
|
let n = e;
|
|
4947
5031
|
for (; n && n !== t;) {
|
|
4948
|
-
if (n.nodeType ===
|
|
5032
|
+
if (n.nodeType === ms && n.hasAttribute("data-markup-mention")) return n;
|
|
4949
5033
|
n = n.parentNode;
|
|
4950
5034
|
}
|
|
4951
5035
|
return null;
|
|
4952
5036
|
}
|
|
4953
|
-
function
|
|
4954
|
-
let t =
|
|
5037
|
+
function Ss(e) {
|
|
5038
|
+
let t = ys(e);
|
|
4955
5039
|
if (!t || t.rangeCount === 0 || !t.isCollapsed) return;
|
|
4956
5040
|
let n = t.focusNode;
|
|
4957
5041
|
if (!n || !e.contains(n)) return;
|
|
4958
|
-
let r =
|
|
5042
|
+
let r = xs(n, e);
|
|
4959
5043
|
if (!r) return;
|
|
4960
5044
|
let i = r.nextSibling;
|
|
4961
|
-
(!i || i.nodeType !==
|
|
5045
|
+
(!i || i.nodeType !== ps) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), Cs(e, i, 0);
|
|
4962
5046
|
}
|
|
4963
|
-
function
|
|
4964
|
-
let r =
|
|
5047
|
+
function Cs(e, t, n) {
|
|
5048
|
+
let r = ys(e);
|
|
4965
5049
|
if (!r) return;
|
|
4966
5050
|
let i = e.ownerDocument.createRange();
|
|
4967
5051
|
i.setStart(t, n), i.collapse(!0), r.removeAllRanges(), r.addRange(i);
|
|
4968
5052
|
}
|
|
4969
|
-
function
|
|
5053
|
+
function ws(e) {
|
|
4970
5054
|
let t = Fr(e.node.data, e.offset);
|
|
4971
5055
|
return t ? {
|
|
4972
5056
|
...t,
|
|
4973
5057
|
textNode: e.node
|
|
4974
5058
|
} : null;
|
|
4975
5059
|
}
|
|
4976
|
-
function
|
|
5060
|
+
function Ts(e, t, n, r) {
|
|
4977
5061
|
if (Ir(n) == null) return !1;
|
|
4978
5062
|
let i = t.textNode;
|
|
4979
5063
|
if (!e.contains(i)) return !1;
|
|
@@ -4981,31 +5065,31 @@ function _s(e, t, n, r) {
|
|
|
4981
5065
|
if (!a || t.caret > i.data.length) return !1;
|
|
4982
5066
|
i.deleteData(t.at, t.caret - t.at);
|
|
4983
5067
|
let o = i.splitText(t.at);
|
|
4984
|
-
return a.insertBefore(
|
|
5068
|
+
return a.insertBefore(_s(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), Cs(e, o, 1), !0;
|
|
4985
5069
|
}
|
|
4986
|
-
function
|
|
4987
|
-
let n =
|
|
5070
|
+
function Es(e, t) {
|
|
5071
|
+
let n = ys(e);
|
|
4988
5072
|
if (!n || n.rangeCount === 0) return;
|
|
4989
5073
|
let r = n.getRangeAt(0);
|
|
4990
5074
|
if (!e.contains(r.commonAncestorContainer)) return;
|
|
4991
5075
|
r.deleteContents();
|
|
4992
5076
|
let { startContainer: i, startOffset: a } = r;
|
|
4993
|
-
if (i.nodeType ===
|
|
5077
|
+
if (i.nodeType === ps) {
|
|
4994
5078
|
let n = i;
|
|
4995
|
-
n.insertData(a, t),
|
|
5079
|
+
n.insertData(a, t), Cs(e, n, a + t.length);
|
|
4996
5080
|
return;
|
|
4997
5081
|
}
|
|
4998
5082
|
let o = e.ownerDocument.createTextNode(t);
|
|
4999
|
-
r.insertNode(o),
|
|
5083
|
+
r.insertNode(o), Cs(e, o, o.data.length);
|
|
5000
5084
|
}
|
|
5001
|
-
function
|
|
5085
|
+
function Ds(e, t) {
|
|
5002
5086
|
let n = e.ownerDocument, r = null, i = null, a = !0;
|
|
5003
5087
|
function o(t) {
|
|
5004
5088
|
let n = t.length === 0;
|
|
5005
5089
|
n === a && e.hasAttribute("data-empty") === n || (a = n, e.toggleAttribute("data-empty", n));
|
|
5006
5090
|
}
|
|
5007
5091
|
function s() {
|
|
5008
|
-
let n =
|
|
5092
|
+
let n = hs(e);
|
|
5009
5093
|
o(n), t.onChange(n);
|
|
5010
5094
|
}
|
|
5011
5095
|
function c(e) {
|
|
@@ -5021,7 +5105,7 @@ function ys(e, t) {
|
|
|
5021
5105
|
c(null);
|
|
5022
5106
|
return;
|
|
5023
5107
|
}
|
|
5024
|
-
let n =
|
|
5108
|
+
let n = bs(e), r = n ? ws(n) : null;
|
|
5025
5109
|
if (r && i && r.textNode === i.node && r.at === i.at) {
|
|
5026
5110
|
c(null);
|
|
5027
5111
|
return;
|
|
@@ -5029,29 +5113,29 @@ function ys(e, t) {
|
|
|
5029
5113
|
i = null, c(r);
|
|
5030
5114
|
}
|
|
5031
5115
|
function u(r) {
|
|
5032
|
-
e.replaceChildren(
|
|
5116
|
+
e.replaceChildren(vs(n, r, t.chipClass)), o(hs(e)), i = null, c(null);
|
|
5033
5117
|
}
|
|
5034
5118
|
let d = () => {
|
|
5035
5119
|
s(), l();
|
|
5036
5120
|
}, f = () => l(), p = () => {
|
|
5037
|
-
|
|
5121
|
+
Ss(e), l();
|
|
5038
5122
|
}, m = (t) => {
|
|
5039
5123
|
let n = t.clipboardData?.getData("text/plain");
|
|
5040
|
-
t.preventDefault(), n && (
|
|
5124
|
+
t.preventDefault(), n && (Es(e, n.replace(/\r\n?/g, "\n")), s(), l());
|
|
5041
5125
|
}, h = (e) => {
|
|
5042
5126
|
e.preventDefault();
|
|
5043
5127
|
};
|
|
5044
5128
|
return e.addEventListener("input", d), e.addEventListener("keyup", f), e.addEventListener("mouseup", p), e.addEventListener("focus", p), e.addEventListener("paste", m), e.addEventListener("drop", h), u(t.initialValue ?? ""), {
|
|
5045
|
-
getValue: () =>
|
|
5129
|
+
getValue: () => hs(e),
|
|
5046
5130
|
setValue: u,
|
|
5047
5131
|
focus() {
|
|
5048
5132
|
e.focus();
|
|
5049
5133
|
let t = e.lastChild;
|
|
5050
|
-
t && (t.nodeType ===
|
|
5134
|
+
t && (t.nodeType === ps ? Cs(e, t, t.data.length) : Cs(e, e, e.childNodes.length));
|
|
5051
5135
|
},
|
|
5052
5136
|
insertMention(n) {
|
|
5053
|
-
let a =
|
|
5054
|
-
o &&
|
|
5137
|
+
let a = bs(e), o = (a ? ws(a) : null) ?? r;
|
|
5138
|
+
o && Ts(e, o, n, t.chipClass) && (s(), i = null, c(null));
|
|
5055
5139
|
},
|
|
5056
5140
|
syncTrigger: l,
|
|
5057
5141
|
clearTrigger: () => c(null),
|
|
@@ -5066,37 +5150,37 @@ function ys(e, t) {
|
|
|
5066
5150
|
}
|
|
5067
5151
|
};
|
|
5068
5152
|
}
|
|
5069
|
-
var
|
|
5070
|
-
function
|
|
5071
|
-
if (
|
|
5153
|
+
var Os = null;
|
|
5154
|
+
function ks() {
|
|
5155
|
+
if (Os) return Os;
|
|
5072
5156
|
if (typeof document > "u") return "true";
|
|
5073
5157
|
let e = document.createElement("div");
|
|
5074
5158
|
try {
|
|
5075
|
-
e.contentEditable = "plaintext-only",
|
|
5159
|
+
e.contentEditable = "plaintext-only", Os = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
|
|
5076
5160
|
} catch {
|
|
5077
|
-
|
|
5161
|
+
Os = "true";
|
|
5078
5162
|
}
|
|
5079
|
-
return
|
|
5163
|
+
return Os;
|
|
5080
5164
|
}
|
|
5081
5165
|
//#endregion
|
|
5082
5166
|
//#region src/runtime/ui/mentions.tsx
|
|
5083
|
-
function
|
|
5084
|
-
let r =
|
|
5167
|
+
function As({ body: e, mentions: t, trailing: n }) {
|
|
5168
|
+
let r = B(() => new Set(t), [t]);
|
|
5085
5169
|
return /* @__PURE__ */ Q("p", {
|
|
5086
5170
|
class: "markup-comment-body",
|
|
5087
|
-
children: [
|
|
5171
|
+
children: [B(() => Nr(e), [e]).map((e, t) => e.type === "mention" && r.has(e.userId) ? /* @__PURE__ */ Q("span", {
|
|
5088
5172
|
class: "markup-mention-chip",
|
|
5089
5173
|
children: ["@", e.name]
|
|
5090
5174
|
}, t) : /* @__PURE__ */ Q("span", { children: e.type === "mention" ? `@${e.name}` : e.value }, t)), n]
|
|
5091
5175
|
});
|
|
5092
5176
|
}
|
|
5093
|
-
function
|
|
5094
|
-
let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] =
|
|
5177
|
+
function js(e) {
|
|
5178
|
+
let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = L(0), s = B(() => {
|
|
5095
5179
|
if (!n) return [];
|
|
5096
5180
|
let e = n.query.toLowerCase();
|
|
5097
5181
|
return t.filter((t) => t.name.toLowerCase().includes(e)).slice(0, 6);
|
|
5098
5182
|
}, [n, t]);
|
|
5099
|
-
|
|
5183
|
+
R(() => {
|
|
5100
5184
|
o((e) => e >= s.length ? 0 : e);
|
|
5101
5185
|
}, [s]);
|
|
5102
5186
|
function c(e) {
|
|
@@ -5118,7 +5202,7 @@ function Cs(e) {
|
|
|
5118
5202
|
handleKeyDown: c
|
|
5119
5203
|
};
|
|
5120
5204
|
}
|
|
5121
|
-
function
|
|
5205
|
+
function Ms({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
|
|
5122
5206
|
return e.length === 0 ? null : /* @__PURE__ */ Q("ul", {
|
|
5123
5207
|
class: "markup-mention-picker",
|
|
5124
5208
|
role: "listbox",
|
|
@@ -5144,16 +5228,16 @@ function ws({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
|
|
|
5144
5228
|
}
|
|
5145
5229
|
//#endregion
|
|
5146
5230
|
//#region src/runtime/ui/mention-input.tsx
|
|
5147
|
-
function
|
|
5148
|
-
let u =
|
|
5231
|
+
function Ns({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
|
|
5232
|
+
let u = z(null), d = z(null), [f, p] = L(null), m = z(t);
|
|
5149
5233
|
m.current = t;
|
|
5150
|
-
let h =
|
|
5234
|
+
let h = z(r);
|
|
5151
5235
|
h.current = r;
|
|
5152
|
-
let g =
|
|
5153
|
-
|
|
5236
|
+
let g = z(e);
|
|
5237
|
+
qe(() => {
|
|
5154
5238
|
let e = u.current;
|
|
5155
5239
|
if (!e) return;
|
|
5156
|
-
let t =
|
|
5240
|
+
let t = Ds(e, {
|
|
5157
5241
|
chipClass: "markup-mention-chip",
|
|
5158
5242
|
initialValue: g.current,
|
|
5159
5243
|
onChange: (e) => m.current(e),
|
|
@@ -5163,17 +5247,17 @@ function Ts({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5163
5247
|
return d.current = t, () => {
|
|
5164
5248
|
t.destroy(), d.current = null;
|
|
5165
5249
|
};
|
|
5166
|
-
}, []),
|
|
5250
|
+
}, []), qe(() => {
|
|
5167
5251
|
if (l) return l.current = { focus: () => d.current?.focus() }, () => {
|
|
5168
5252
|
l.current = null;
|
|
5169
5253
|
};
|
|
5170
|
-
}, [l]),
|
|
5254
|
+
}, [l]), qe(() => {
|
|
5171
5255
|
s && d.current?.focus();
|
|
5172
|
-
}, [s]),
|
|
5256
|
+
}, [s]), qe(() => {
|
|
5173
5257
|
let t = d.current;
|
|
5174
5258
|
t && t.getValue() !== e && t.setValue(e);
|
|
5175
5259
|
}, [e]);
|
|
5176
|
-
let _ =
|
|
5260
|
+
let _ = js({
|
|
5177
5261
|
members: r ?? [],
|
|
5178
5262
|
trigger: f,
|
|
5179
5263
|
onSelect: (e) => d.current?.insertMention(e),
|
|
@@ -5186,7 +5270,7 @@ function Ts({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5186
5270
|
"aria-label": i,
|
|
5187
5271
|
"aria-disabled": o || void 0,
|
|
5188
5272
|
class: Z("markup-mention-input", c),
|
|
5189
|
-
contentEditable: o ? "false" :
|
|
5273
|
+
contentEditable: o ? "false" : ks(),
|
|
5190
5274
|
"data-placeholder": a,
|
|
5191
5275
|
tabIndex: o ? -1 : 0,
|
|
5192
5276
|
onKeyDown: (e) => {
|
|
@@ -5195,7 +5279,7 @@ function Ts({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5195
5279
|
onBlur: () => {
|
|
5196
5280
|
setTimeout(() => d.current?.clearTrigger(), 120);
|
|
5197
5281
|
}
|
|
5198
|
-
}), _.isOpen ? /* @__PURE__ */ Q(
|
|
5282
|
+
}), _.isOpen ? /* @__PURE__ */ Q(Ms, {
|
|
5199
5283
|
items: _.items,
|
|
5200
5284
|
highlight: _.highlight,
|
|
5201
5285
|
setHighlight: _.setHighlight,
|
|
@@ -5204,13 +5288,13 @@ function Ts({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5204
5288
|
}
|
|
5205
5289
|
//#endregion
|
|
5206
5290
|
//#region src/runtime/ui/composer.tsx
|
|
5207
|
-
var
|
|
5208
|
-
function
|
|
5209
|
-
let [c, l] =
|
|
5210
|
-
|
|
5291
|
+
var Ps = 4e3;
|
|
5292
|
+
function Fs({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, members: s }) {
|
|
5293
|
+
let [c, l] = L(""), u = z(null), d = z(!1);
|
|
5294
|
+
R(() => {
|
|
5211
5295
|
d.current && !i && !a && (l(""), u.current?.focus()), d.current = i;
|
|
5212
5296
|
}, [i, a]);
|
|
5213
|
-
let f =
|
|
5297
|
+
let f = Ps - c.length, p = f < 0;
|
|
5214
5298
|
function m(e) {
|
|
5215
5299
|
e?.preventDefault();
|
|
5216
5300
|
let t = c.trim();
|
|
@@ -5219,8 +5303,8 @@ function Ds({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5219
5303
|
function h(e) {
|
|
5220
5304
|
(e.metaKey || e.ctrlKey) && e.key === "Enter" && m(e);
|
|
5221
5305
|
}
|
|
5222
|
-
let g = c.length > 0;
|
|
5223
|
-
function
|
|
5306
|
+
let g = c.length > 0, _ = Oo();
|
|
5307
|
+
function v(e) {
|
|
5224
5308
|
return /* @__PURE__ */ Q("button", {
|
|
5225
5309
|
type: "submit",
|
|
5226
5310
|
class: "markup-btn markup-btn-primary",
|
|
@@ -5228,14 +5312,14 @@ function Ds({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5228
5312
|
"aria-label": i ? "Sending…" : n,
|
|
5229
5313
|
title: i ? "Sending…" : n,
|
|
5230
5314
|
tabIndex: e,
|
|
5231
|
-
children: /* @__PURE__ */ Q(
|
|
5315
|
+
children: /* @__PURE__ */ Q(Io, { size: 14 })
|
|
5232
5316
|
});
|
|
5233
5317
|
}
|
|
5234
5318
|
return /* @__PURE__ */ Q("form", {
|
|
5235
5319
|
class: Z("markup-composer", g && "is-filled"),
|
|
5236
5320
|
onSubmit: m,
|
|
5237
5321
|
children: [
|
|
5238
|
-
/* @__PURE__ */ Q(
|
|
5322
|
+
/* @__PURE__ */ Q(Ns, {
|
|
5239
5323
|
class: "markup-composer-input",
|
|
5240
5324
|
label: e,
|
|
5241
5325
|
placeholder: t,
|
|
@@ -5259,87 +5343,87 @@ function Ds({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5259
5343
|
}) : p ? /* @__PURE__ */ Q("span", {
|
|
5260
5344
|
class: "markup-composer-error",
|
|
5261
5345
|
children: [Math.abs(f), " too long"]
|
|
5262
|
-
}) : /* @__PURE__ */ Q(
|
|
5346
|
+
}) : /* @__PURE__ */ Q(S, { children: [
|
|
5347
|
+
/* @__PURE__ */ Q("kbd", {
|
|
5348
|
+
class: "markup-kbd is-inline",
|
|
5349
|
+
children: _.mod
|
|
5350
|
+
}),
|
|
5351
|
+
/* @__PURE__ */ Q("kbd", {
|
|
5352
|
+
class: "markup-kbd is-inline",
|
|
5353
|
+
children: _.enter
|
|
5354
|
+
}),
|
|
5355
|
+
/* @__PURE__ */ Q("span", {
|
|
5356
|
+
class: "markup-composer-hint-label",
|
|
5357
|
+
children: "to send"
|
|
5358
|
+
})
|
|
5359
|
+
] })
|
|
5263
5360
|
}), /* @__PURE__ */ Q("div", {
|
|
5264
5361
|
class: "markup-composer-actions",
|
|
5265
|
-
children:
|
|
5362
|
+
children: v(g ? void 0 : -1)
|
|
5266
5363
|
})]
|
|
5267
5364
|
})
|
|
5268
5365
|
}),
|
|
5269
5366
|
/* @__PURE__ */ Q("span", {
|
|
5270
5367
|
class: "markup-composer-actions-empty",
|
|
5271
5368
|
"aria-hidden": g || void 0,
|
|
5272
|
-
children:
|
|
5369
|
+
children: v(g ? -1 : void 0)
|
|
5273
5370
|
})
|
|
5274
5371
|
]
|
|
5275
5372
|
});
|
|
5276
5373
|
}
|
|
5277
5374
|
//#endregion
|
|
5278
5375
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
5279
|
-
function
|
|
5280
|
-
let
|
|
5281
|
-
|
|
5282
|
-
let [
|
|
5283
|
-
targetRef:
|
|
5376
|
+
function Is({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotFailed: u, screenshotRedactedCount: d, screenshotRedactedSelectors: f, members: p = [], onAuthor: m, onSignIn: h, onSubmit: g, onClose: _ }) {
|
|
5377
|
+
let v = z(null);
|
|
5378
|
+
ss(v, !0);
|
|
5379
|
+
let [y, b] = L(!1), [x, C] = L(!1), w = cs(c), [T, E] = L(null), { onPointerDown: D, isDragging: O } = is({
|
|
5380
|
+
targetRef: v,
|
|
5284
5381
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
5285
|
-
onMove:
|
|
5382
|
+
onMove: E
|
|
5286
5383
|
});
|
|
5287
|
-
|
|
5288
|
-
let e =
|
|
5384
|
+
R(() => {
|
|
5385
|
+
let e = v.current;
|
|
5289
5386
|
if (!e) return;
|
|
5290
5387
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
5291
5388
|
e.showPopover();
|
|
5292
5389
|
} catch {}
|
|
5293
5390
|
function t(e) {
|
|
5294
|
-
e.newState === "closed" &&
|
|
5391
|
+
e.newState === "closed" && _();
|
|
5295
5392
|
}
|
|
5296
5393
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
5297
|
-
}, [
|
|
5298
|
-
let
|
|
5394
|
+
}, [_]);
|
|
5395
|
+
let ee = Ls(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), te = Ls(t - window.scrollY - 16, 12, window.innerHeight - 220), k = typeof window < "u" ? window.location.href : "", A = c != null, j = l || A || u;
|
|
5299
5396
|
return /* @__PURE__ */ Q("div", {
|
|
5300
|
-
ref:
|
|
5301
|
-
class: Z("markup-popover",
|
|
5397
|
+
ref: v,
|
|
5398
|
+
class: Z("markup-popover", T && "is-floating", O && "is-dragging"),
|
|
5302
5399
|
popover: "auto",
|
|
5303
5400
|
style: {
|
|
5304
|
-
"--markup-pop-x": `${
|
|
5305
|
-
"--markup-pop-y": `${
|
|
5401
|
+
"--markup-pop-x": `${T?.left ?? ee}px`,
|
|
5402
|
+
"--markup-pop-y": `${T?.top ?? te}px`
|
|
5306
5403
|
},
|
|
5307
5404
|
role: "dialog",
|
|
5308
5405
|
"aria-label": "New markup",
|
|
5309
5406
|
children: [/* @__PURE__ */ Q("header", {
|
|
5310
5407
|
class: "markup-popover-header",
|
|
5311
|
-
onPointerDown:
|
|
5408
|
+
onPointerDown: D,
|
|
5312
5409
|
children: [/* @__PURE__ */ Q("span", {
|
|
5313
|
-
class: "markup-popover-
|
|
5410
|
+
class: "markup-popover-title",
|
|
5314
5411
|
title: k,
|
|
5315
|
-
children:
|
|
5316
|
-
/* @__PURE__ */ Q("span", {
|
|
5317
|
-
class: "markup-popover-path-host",
|
|
5318
|
-
children: As(k)
|
|
5319
|
-
}),
|
|
5320
|
-
/* @__PURE__ */ Q("span", {
|
|
5321
|
-
class: "markup-popover-path-route",
|
|
5322
|
-
children: js(k)
|
|
5323
|
-
}),
|
|
5324
|
-
/* @__PURE__ */ Q("span", {
|
|
5325
|
-
class: "markup-popover-path-tag",
|
|
5326
|
-
children: "new"
|
|
5327
|
-
})
|
|
5328
|
-
]
|
|
5412
|
+
children: "New comment"
|
|
5329
5413
|
}), /* @__PURE__ */ Q("button", {
|
|
5330
5414
|
type: "button",
|
|
5331
5415
|
class: "markup-icon-btn",
|
|
5332
5416
|
"aria-label": "Discard pin",
|
|
5333
|
-
onClick:
|
|
5334
|
-
children: /* @__PURE__ */ Q(
|
|
5417
|
+
onClick: _,
|
|
5418
|
+
children: /* @__PURE__ */ Q(jo, { size: 16 })
|
|
5335
5419
|
})]
|
|
5336
|
-
}), n == null ? /* @__PURE__ */ Q(
|
|
5420
|
+
}), n == null ? /* @__PURE__ */ Q(ls, {
|
|
5337
5421
|
isPending: o,
|
|
5338
5422
|
isConnecting: i,
|
|
5339
5423
|
isSigningIn: a,
|
|
5340
|
-
onSubmit:
|
|
5341
|
-
onCancel:
|
|
5342
|
-
onSignIn:
|
|
5424
|
+
onSubmit: m,
|
|
5425
|
+
onCancel: _,
|
|
5426
|
+
onSignIn: h
|
|
5343
5427
|
}) : /* @__PURE__ */ Q("div", {
|
|
5344
5428
|
class: "markup-popover-body",
|
|
5345
5429
|
children: [
|
|
@@ -5357,17 +5441,17 @@ function Os({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5357
5441
|
}) : null
|
|
5358
5442
|
]
|
|
5359
5443
|
}),
|
|
5360
|
-
/* @__PURE__ */ Q(
|
|
5444
|
+
/* @__PURE__ */ Q(Fs, {
|
|
5361
5445
|
label: "Feedback",
|
|
5362
5446
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
5363
5447
|
submitLabel: "Post markup",
|
|
5364
5448
|
isPending: o,
|
|
5365
5449
|
error: s,
|
|
5366
|
-
onSubmit: (e) =>
|
|
5367
|
-
members:
|
|
5450
|
+
onSubmit: (e) => g(e, y && A),
|
|
5451
|
+
members: p
|
|
5368
5452
|
}),
|
|
5369
|
-
|
|
5370
|
-
class: "markup-screenshot-row",
|
|
5453
|
+
j ? /* @__PURE__ */ Q("div", {
|
|
5454
|
+
class: Z("markup-screenshot-row", u && "is-failed"),
|
|
5371
5455
|
children: [l ? /* @__PURE__ */ Q("span", {
|
|
5372
5456
|
class: "markup-screenshot-status",
|
|
5373
5457
|
children: [
|
|
@@ -5376,45 +5460,49 @@ function Os({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5376
5460
|
class: "markup-screenshot-checkbox",
|
|
5377
5461
|
disabled: !0
|
|
5378
5462
|
}),
|
|
5379
|
-
/* @__PURE__ */ Q(
|
|
5463
|
+
/* @__PURE__ */ Q(Fo, { size: 12 }),
|
|
5380
5464
|
/* @__PURE__ */ Q("span", { children: "Capturing…" })
|
|
5381
5465
|
]
|
|
5466
|
+
}) : u ? /* @__PURE__ */ Q("span", {
|
|
5467
|
+
class: "markup-screenshot-status",
|
|
5468
|
+
title: "This page has something the capture can't read — often a third-party image. Your comment will post without a screenshot.",
|
|
5469
|
+
children: [/* @__PURE__ */ Q(Fo, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
|
|
5382
5470
|
}) : /* @__PURE__ */ Q("label", {
|
|
5383
5471
|
class: "markup-screenshot-toggle",
|
|
5384
5472
|
children: [
|
|
5385
5473
|
/* @__PURE__ */ Q("input", {
|
|
5386
5474
|
type: "checkbox",
|
|
5387
5475
|
class: "markup-screenshot-checkbox",
|
|
5388
|
-
checked:
|
|
5389
|
-
onChange: (e) =>
|
|
5476
|
+
checked: y,
|
|
5477
|
+
onChange: (e) => b(e.currentTarget.checked)
|
|
5390
5478
|
}),
|
|
5391
|
-
/* @__PURE__ */ Q(
|
|
5479
|
+
/* @__PURE__ */ Q(Fo, { size: 12 }),
|
|
5392
5480
|
/* @__PURE__ */ Q("span", { children: "Attach screenshot" }),
|
|
5393
|
-
|
|
5481
|
+
w && y ? /* @__PURE__ */ Q("img", {
|
|
5394
5482
|
class: "markup-screenshot-thumb",
|
|
5395
|
-
src:
|
|
5483
|
+
src: w,
|
|
5396
5484
|
alt: "Screenshot preview"
|
|
5397
5485
|
}) : null
|
|
5398
5486
|
]
|
|
5399
|
-
}),
|
|
5487
|
+
}), y && A ? /* @__PURE__ */ Q(S, { children: [d > 0 ? /* @__PURE__ */ Q("div", {
|
|
5400
5488
|
class: "markup-screenshot-redacted",
|
|
5401
5489
|
children: [/* @__PURE__ */ Q("button", {
|
|
5402
5490
|
type: "button",
|
|
5403
5491
|
class: "markup-screenshot-redacted-chip",
|
|
5404
|
-
onClick: () =>
|
|
5492
|
+
onClick: () => C((e) => !e),
|
|
5405
5493
|
children: [
|
|
5406
5494
|
/* @__PURE__ */ Q("em", {
|
|
5407
5495
|
class: "markup-screenshot-redacted-arrow",
|
|
5408
|
-
children:
|
|
5496
|
+
children: x ? "▾" : "▸"
|
|
5409
5497
|
}),
|
|
5410
|
-
|
|
5498
|
+
d,
|
|
5411
5499
|
" ",
|
|
5412
|
-
|
|
5500
|
+
d === 1 ? "field" : "fields",
|
|
5413
5501
|
" redacted"
|
|
5414
5502
|
]
|
|
5415
|
-
}),
|
|
5503
|
+
}), x ? /* @__PURE__ */ Q("div", {
|
|
5416
5504
|
class: "markup-screenshot-redacted-list",
|
|
5417
|
-
children:
|
|
5505
|
+
children: f.map((e) => /* @__PURE__ */ Q("code", {
|
|
5418
5506
|
class: "markup-screenshot-redacted-selector",
|
|
5419
5507
|
children: e
|
|
5420
5508
|
}, e))
|
|
@@ -5436,39 +5524,24 @@ function Os({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
|
|
|
5436
5524
|
})]
|
|
5437
5525
|
});
|
|
5438
5526
|
}
|
|
5439
|
-
function
|
|
5527
|
+
function Ls(e, t, n) {
|
|
5440
5528
|
return Math.max(t, Math.min(n, e));
|
|
5441
5529
|
}
|
|
5442
|
-
function As(e) {
|
|
5443
|
-
try {
|
|
5444
|
-
return new URL(e).host;
|
|
5445
|
-
} catch {
|
|
5446
|
-
return "";
|
|
5447
|
-
}
|
|
5448
|
-
}
|
|
5449
|
-
function js(e) {
|
|
5450
|
-
try {
|
|
5451
|
-
let t = new URL(e);
|
|
5452
|
-
return `${t.pathname}${t.search}` || "/";
|
|
5453
|
-
} catch {
|
|
5454
|
-
return "";
|
|
5455
|
-
}
|
|
5456
|
-
}
|
|
5457
5530
|
//#endregion
|
|
5458
5531
|
//#region src/runtime/use-theme.ts
|
|
5459
|
-
function
|
|
5460
|
-
let [, e] =
|
|
5461
|
-
return
|
|
5462
|
-
mode:
|
|
5463
|
-
resolved:
|
|
5464
|
-
set:
|
|
5532
|
+
function Rs() {
|
|
5533
|
+
let [, e] = L(0);
|
|
5534
|
+
return R(() => Me(() => e((e) => e + 1)), []), {
|
|
5535
|
+
mode: ke(),
|
|
5536
|
+
resolved: Ae(),
|
|
5537
|
+
set: je
|
|
5465
5538
|
};
|
|
5466
5539
|
}
|
|
5467
5540
|
//#endregion
|
|
5468
5541
|
//#region src/runtime/ui/overflow-menu.tsx
|
|
5469
|
-
function
|
|
5470
|
-
let [u, d] =
|
|
5471
|
-
|
|
5542
|
+
function zs({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, onOpenPrivacy: a, onOpenShortcuts: o, onHideForSession: s, version: c, dashboardUrl: l }) {
|
|
5543
|
+
let [u, d] = L(!1), f = z(null), p = Rs();
|
|
5544
|
+
R(() => {
|
|
5472
5545
|
if (!u) return;
|
|
5473
5546
|
function e(e) {
|
|
5474
5547
|
let t = f.current;
|
|
@@ -5481,7 +5554,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5481
5554
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
5482
5555
|
};
|
|
5483
5556
|
}, [u]);
|
|
5484
|
-
let m = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right",
|
|
5557
|
+
let m = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: h } = Oo();
|
|
5485
5558
|
return /* @__PURE__ */ Q("div", {
|
|
5486
5559
|
ref: f,
|
|
5487
5560
|
style: {
|
|
@@ -5500,7 +5573,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5500
5573
|
onClick: (e) => {
|
|
5501
5574
|
e.preventDefault(), e.stopPropagation(), d((e) => !e);
|
|
5502
5575
|
},
|
|
5503
|
-
children: /* @__PURE__ */ Q(
|
|
5576
|
+
children: /* @__PURE__ */ Q(Ho, { size: 16 })
|
|
5504
5577
|
}), u ? /* @__PURE__ */ Q("div", {
|
|
5505
5578
|
class: Z("markup-pop", m),
|
|
5506
5579
|
"data-pop": "overflow",
|
|
@@ -5524,7 +5597,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5524
5597
|
title: "Light",
|
|
5525
5598
|
class: Z(p.mode === "light" && "is-on"),
|
|
5526
5599
|
onClick: () => p.set("light"),
|
|
5527
|
-
children: /* @__PURE__ */ Q(
|
|
5600
|
+
children: /* @__PURE__ */ Q(Uo, { size: 14 })
|
|
5528
5601
|
}),
|
|
5529
5602
|
/* @__PURE__ */ Q("button", {
|
|
5530
5603
|
type: "button",
|
|
@@ -5534,7 +5607,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5534
5607
|
title: "Dark",
|
|
5535
5608
|
class: Z(p.mode === "dark" && "is-on"),
|
|
5536
5609
|
onClick: () => p.set("dark"),
|
|
5537
|
-
children: /* @__PURE__ */ Q(
|
|
5610
|
+
children: /* @__PURE__ */ Q(Wo, { size: 14 })
|
|
5538
5611
|
}),
|
|
5539
5612
|
/* @__PURE__ */ Q("button", {
|
|
5540
5613
|
type: "button",
|
|
@@ -5544,7 +5617,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5544
5617
|
title: `Auto — currently ${p.resolved}`,
|
|
5545
5618
|
class: Z(p.mode === "auto" && "is-on"),
|
|
5546
5619
|
onClick: () => p.set("auto"),
|
|
5547
|
-
children: /* @__PURE__ */ Q(
|
|
5620
|
+
children: /* @__PURE__ */ Q(Go, { size: 14 })
|
|
5548
5621
|
})
|
|
5549
5622
|
]
|
|
5550
5623
|
})]
|
|
@@ -5567,7 +5640,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5567
5640
|
title: "Bottom left",
|
|
5568
5641
|
class: Z(e === "bottom-left" && "is-on"),
|
|
5569
5642
|
onClick: () => t("bottom-left"),
|
|
5570
|
-
children: /* @__PURE__ */ Q(
|
|
5643
|
+
children: /* @__PURE__ */ Q(Bs, { side: "left" })
|
|
5571
5644
|
}),
|
|
5572
5645
|
/* @__PURE__ */ Q("button", {
|
|
5573
5646
|
type: "button",
|
|
@@ -5577,7 +5650,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5577
5650
|
title: "Bottom center",
|
|
5578
5651
|
class: Z(e === "bottom-center" && "is-on"),
|
|
5579
5652
|
onClick: () => t("bottom-center"),
|
|
5580
|
-
children: /* @__PURE__ */ Q(
|
|
5653
|
+
children: /* @__PURE__ */ Q(Bs, { side: "center" })
|
|
5581
5654
|
}),
|
|
5582
5655
|
/* @__PURE__ */ Q("button", {
|
|
5583
5656
|
type: "button",
|
|
@@ -5587,7 +5660,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5587
5660
|
title: "Bottom right",
|
|
5588
5661
|
class: Z(e === "bottom-right" && "is-on"),
|
|
5589
5662
|
onClick: () => t("bottom-right"),
|
|
5590
|
-
children: /* @__PURE__ */ Q(
|
|
5663
|
+
children: /* @__PURE__ */ Q(Bs, { side: "right" })
|
|
5591
5664
|
})
|
|
5592
5665
|
]
|
|
5593
5666
|
})]
|
|
@@ -5609,7 +5682,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5609
5682
|
children: [
|
|
5610
5683
|
/* @__PURE__ */ Q("span", {
|
|
5611
5684
|
class: "ic",
|
|
5612
|
-
children: /* @__PURE__ */ Q(
|
|
5685
|
+
children: /* @__PURE__ */ Q(Vs, {})
|
|
5613
5686
|
}),
|
|
5614
5687
|
/* @__PURE__ */ Q("span", {
|
|
5615
5688
|
class: "lbl",
|
|
@@ -5634,7 +5707,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5634
5707
|
},
|
|
5635
5708
|
children: [/* @__PURE__ */ Q("span", {
|
|
5636
5709
|
class: "ic",
|
|
5637
|
-
children: /* @__PURE__ */ Q(
|
|
5710
|
+
children: /* @__PURE__ */ Q(Ko, { size: 16 })
|
|
5638
5711
|
}), /* @__PURE__ */ Q("span", {
|
|
5639
5712
|
class: "lbl",
|
|
5640
5713
|
children: "Privacy & data"
|
|
@@ -5651,7 +5724,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5651
5724
|
children: [
|
|
5652
5725
|
/* @__PURE__ */ Q("span", {
|
|
5653
5726
|
class: "ic",
|
|
5654
|
-
children: /* @__PURE__ */ Q(
|
|
5727
|
+
children: /* @__PURE__ */ Q(qo, { size: 16 })
|
|
5655
5728
|
}),
|
|
5656
5729
|
/* @__PURE__ */ Q("span", {
|
|
5657
5730
|
class: "lbl",
|
|
@@ -5674,7 +5747,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5674
5747
|
children: [
|
|
5675
5748
|
/* @__PURE__ */ Q("span", {
|
|
5676
5749
|
class: "ic",
|
|
5677
|
-
children: /* @__PURE__ */ Q(
|
|
5750
|
+
children: /* @__PURE__ */ Q(Hs, {})
|
|
5678
5751
|
}),
|
|
5679
5752
|
/* @__PURE__ */ Q("span", {
|
|
5680
5753
|
class: "lbl",
|
|
@@ -5692,7 +5765,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5692
5765
|
target: "_blank",
|
|
5693
5766
|
rel: "noopener noreferrer",
|
|
5694
5767
|
children: [
|
|
5695
|
-
/* @__PURE__ */ Q(
|
|
5768
|
+
/* @__PURE__ */ Q(Ao, { size: 12 }),
|
|
5696
5769
|
/* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
|
|
5697
5770
|
/* @__PURE__ */ Q("span", {
|
|
5698
5771
|
class: "ver",
|
|
@@ -5704,7 +5777,7 @@ function Ns({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5704
5777
|
}) : null]
|
|
5705
5778
|
});
|
|
5706
5779
|
}
|
|
5707
|
-
function
|
|
5780
|
+
function Bs({ side: e }) {
|
|
5708
5781
|
return /* @__PURE__ */ Q("svg", {
|
|
5709
5782
|
width: 14,
|
|
5710
5783
|
height: 14,
|
|
@@ -5730,7 +5803,7 @@ function Ps({ side: e }) {
|
|
|
5730
5803
|
})]
|
|
5731
5804
|
});
|
|
5732
5805
|
}
|
|
5733
|
-
function
|
|
5806
|
+
function Vs() {
|
|
5734
5807
|
return /* @__PURE__ */ Q("svg", {
|
|
5735
5808
|
width: 16,
|
|
5736
5809
|
height: 16,
|
|
@@ -5748,7 +5821,7 @@ function Fs() {
|
|
|
5748
5821
|
})]
|
|
5749
5822
|
});
|
|
5750
5823
|
}
|
|
5751
|
-
function
|
|
5824
|
+
function Hs() {
|
|
5752
5825
|
return /* @__PURE__ */ Q("svg", {
|
|
5753
5826
|
width: 16,
|
|
5754
5827
|
height: 16,
|
|
@@ -5769,7 +5842,7 @@ function Is() {
|
|
|
5769
5842
|
}
|
|
5770
5843
|
//#endregion
|
|
5771
5844
|
//#region src/runtime/ui/pin.tsx
|
|
5772
|
-
function
|
|
5845
|
+
function Us({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
|
|
5773
5846
|
let o = t - window.scrollY, s = e - window.scrollX;
|
|
5774
5847
|
return /* @__PURE__ */ Q("button", {
|
|
5775
5848
|
type: "button",
|
|
@@ -5789,7 +5862,7 @@ function Ls({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClic
|
|
|
5789
5862
|
})
|
|
5790
5863
|
});
|
|
5791
5864
|
}
|
|
5792
|
-
function
|
|
5865
|
+
function Ws({ pageX: e, pageY: t }) {
|
|
5793
5866
|
let n = t - window.scrollY, r = e - window.scrollX;
|
|
5794
5867
|
return /* @__PURE__ */ Q("div", {
|
|
5795
5868
|
class: "markup-pin markup-pin-ghost is-anchor",
|
|
@@ -5806,8 +5879,8 @@ function Rs({ pageX: e, pageY: t }) {
|
|
|
5806
5879
|
}
|
|
5807
5880
|
//#endregion
|
|
5808
5881
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
5809
|
-
function
|
|
5810
|
-
|
|
5882
|
+
function Gs({ onPlace: e, onCancel: t }) {
|
|
5883
|
+
R(() => {
|
|
5811
5884
|
function e(e) {
|
|
5812
5885
|
e.key === "Escape" && t();
|
|
5813
5886
|
}
|
|
@@ -5832,14 +5905,14 @@ function zs({ onPlace: e, onCancel: t }) {
|
|
|
5832
5905
|
}
|
|
5833
5906
|
//#endregion
|
|
5834
5907
|
//#region src/runtime/ui/thread-popover.tsx
|
|
5835
|
-
var
|
|
5908
|
+
var Ks = [
|
|
5836
5909
|
"👍",
|
|
5837
5910
|
"❤️",
|
|
5838
5911
|
"🎉",
|
|
5839
5912
|
"😮",
|
|
5840
5913
|
"😄",
|
|
5841
5914
|
"❓"
|
|
5842
|
-
],
|
|
5915
|
+
], qs = Ar({
|
|
5843
5916
|
none: {
|
|
5844
5917
|
"toggle-thread-menu": () => ({
|
|
5845
5918
|
kind: "thread-menu",
|
|
@@ -5895,22 +5968,22 @@ var Bs = [
|
|
|
5895
5968
|
dismiss: () => ({ kind: "none" })
|
|
5896
5969
|
}
|
|
5897
5970
|
});
|
|
5898
|
-
function
|
|
5899
|
-
let b =
|
|
5971
|
+
function Js({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, members: u = [], onAuthor: d, onSignIn: f, onClose: p, onReply: m, onEditComment: h, onDeleteComment: g, onToggleReaction: _, onResolve: v, onDelete: y }) {
|
|
5972
|
+
let b = z(null), x = z(null), S = z(null), C = z(null), [w, T] = jr(qs, { kind: "none" }), [E, D] = L(null), { onPointerDown: O, isDragging: ee } = is({
|
|
5900
5973
|
targetRef: b,
|
|
5901
5974
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
5902
5975
|
onMove: D
|
|
5903
5976
|
});
|
|
5904
|
-
|
|
5905
|
-
let
|
|
5906
|
-
|
|
5977
|
+
ss(b, !0);
|
|
5978
|
+
let te = e.resolvedAt != null, k = B(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
5979
|
+
R(() => {
|
|
5907
5980
|
if (w.kind === "none" || w.kind === "editing") return;
|
|
5908
5981
|
function e(e) {
|
|
5909
5982
|
let t = C.current;
|
|
5910
5983
|
t && !e.composedPath().includes(t) && T({ type: "dismiss" });
|
|
5911
5984
|
}
|
|
5912
5985
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
5913
|
-
}, [w.kind, T]),
|
|
5986
|
+
}, [w.kind, T]), R(() => {
|
|
5914
5987
|
if (w.kind !== "editing") return;
|
|
5915
5988
|
let t = e.comments.find((e) => e._id === w.commentId);
|
|
5916
5989
|
(!t || t.deleted) && T({ type: "dismiss" });
|
|
@@ -5919,17 +5992,17 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
5919
5992
|
w,
|
|
5920
5993
|
T
|
|
5921
5994
|
]);
|
|
5922
|
-
let
|
|
5923
|
-
|
|
5995
|
+
let A = z(!0);
|
|
5996
|
+
R(() => {
|
|
5924
5997
|
let e = x.current;
|
|
5925
5998
|
if (e) {
|
|
5926
|
-
if (
|
|
5927
|
-
|
|
5999
|
+
if (A.current) {
|
|
6000
|
+
A.current = !1, e.scrollTop = e.scrollHeight;
|
|
5928
6001
|
return;
|
|
5929
6002
|
}
|
|
5930
6003
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
5931
6004
|
}
|
|
5932
|
-
}, [
|
|
6005
|
+
}, [k.length]), R(() => {
|
|
5933
6006
|
let e = b.current;
|
|
5934
6007
|
if (!e) return;
|
|
5935
6008
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
@@ -5940,15 +6013,15 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
5940
6013
|
}
|
|
5941
6014
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
5942
6015
|
}, [p]);
|
|
5943
|
-
let j =
|
|
6016
|
+
let j = B(() => {
|
|
5944
6017
|
let t = oi({
|
|
5945
6018
|
anchorX: e.anchorX,
|
|
5946
6019
|
anchorY: e.anchorY,
|
|
5947
6020
|
anchorSelector: e.anchorSelector
|
|
5948
6021
|
});
|
|
5949
6022
|
return {
|
|
5950
|
-
left:
|
|
5951
|
-
top:
|
|
6023
|
+
left: Qs(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
|
|
6024
|
+
top: Qs(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
|
|
5952
6025
|
};
|
|
5953
6026
|
}, [
|
|
5954
6027
|
e.anchorX,
|
|
@@ -5972,15 +6045,9 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
5972
6045
|
class: "markup-popover-header",
|
|
5973
6046
|
onPointerDown: O,
|
|
5974
6047
|
children: [/* @__PURE__ */ Q("span", {
|
|
5975
|
-
class: "markup-popover-
|
|
6048
|
+
class: "markup-popover-title",
|
|
5976
6049
|
title: e.url,
|
|
5977
|
-
children:
|
|
5978
|
-
class: "markup-popover-path-host",
|
|
5979
|
-
children: qs(e.url)
|
|
5980
|
-
}), /* @__PURE__ */ Q("span", {
|
|
5981
|
-
class: "markup-popover-path-route",
|
|
5982
|
-
children: Js(e.url)
|
|
5983
|
-
})]
|
|
6050
|
+
children: k.length === 1 ? "1 comment" : `${k.length} comments`
|
|
5984
6051
|
}), /* @__PURE__ */ Q("div", {
|
|
5985
6052
|
class: "markup-popover-header-actions",
|
|
5986
6053
|
children: [
|
|
@@ -5994,7 +6061,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
5994
6061
|
class: Z("markup-icon-btn", w.kind === "thread-menu" && "is-open"),
|
|
5995
6062
|
title: "More options",
|
|
5996
6063
|
onClick: () => T({ type: "toggle-thread-menu" }),
|
|
5997
|
-
children: /* @__PURE__ */ Q(
|
|
6064
|
+
children: /* @__PURE__ */ Q(No, { size: 16 })
|
|
5998
6065
|
}), w.kind === "thread-menu" ? /* @__PURE__ */ Q("div", {
|
|
5999
6066
|
class: "markup-thread-menu-list",
|
|
6000
6067
|
children: [/* @__PURE__ */ Q("button", {
|
|
@@ -6022,14 +6089,14 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6022
6089
|
title: "Mark as resolved",
|
|
6023
6090
|
disabled: s,
|
|
6024
6091
|
onClick: v,
|
|
6025
|
-
children: /* @__PURE__ */ Q(
|
|
6092
|
+
children: /* @__PURE__ */ Q(Po, { size: 16 })
|
|
6026
6093
|
}) : null,
|
|
6027
6094
|
/* @__PURE__ */ Q("button", {
|
|
6028
6095
|
type: "button",
|
|
6029
6096
|
class: "markup-icon-btn",
|
|
6030
6097
|
title: "Close thread",
|
|
6031
6098
|
onClick: p,
|
|
6032
|
-
children: /* @__PURE__ */ Q(
|
|
6099
|
+
children: /* @__PURE__ */ Q(jo, { size: 16 })
|
|
6033
6100
|
})
|
|
6034
6101
|
]
|
|
6035
6102
|
})]
|
|
@@ -6037,16 +6104,15 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6037
6104
|
/* @__PURE__ */ Q("ol", {
|
|
6038
6105
|
ref: x,
|
|
6039
6106
|
class: "markup-comments",
|
|
6040
|
-
children:
|
|
6041
|
-
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !
|
|
6107
|
+
children: k.map((t, r) => {
|
|
6108
|
+
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !te && !t.deleted, c = i && !te && !t.deleted && !a, l = w.kind === "editing" && w.commentId === t._id, d = (o || c) && !l && !t.deleted, f = w.kind === "comment-menu" && w.commentId === t._id, p = f && w.confirmDelete, m = w.kind === "reaction-picker" && w.commentId === t._id, v = m ? w.direction : "down", y = f ? w.direction : "down";
|
|
6042
6109
|
return /* @__PURE__ */ Q("li", {
|
|
6043
|
-
class:
|
|
6110
|
+
class: "markup-comment",
|
|
6044
6111
|
children: [
|
|
6045
|
-
/* @__PURE__ */ Q(
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
children: Ys(t.authorName)
|
|
6112
|
+
/* @__PURE__ */ Q($s, {
|
|
6113
|
+
name: t.authorName,
|
|
6114
|
+
image: t.authorImage,
|
|
6115
|
+
tone: tc(t.authorClientId ?? t.authorName)
|
|
6050
6116
|
}),
|
|
6051
6117
|
/* @__PURE__ */ Q("div", {
|
|
6052
6118
|
class: "markup-comment-meta",
|
|
@@ -6055,29 +6121,32 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6055
6121
|
class: "markup-comment-author",
|
|
6056
6122
|
children: t.authorName
|
|
6057
6123
|
}),
|
|
6058
|
-
t.
|
|
6059
|
-
class: "markup-comment-badge",
|
|
6060
|
-
|
|
6124
|
+
t.authoredVia === "mcp" ? /* @__PURE__ */ Q("span", {
|
|
6125
|
+
class: "markup-comment-badge is-agent",
|
|
6126
|
+
role: "img",
|
|
6127
|
+
"aria-label": "Written by an AI agent",
|
|
6128
|
+
title: "Written by an AI agent",
|
|
6129
|
+
children: /* @__PURE__ */ Q(Zo, { size: 11 })
|
|
6061
6130
|
}) : null,
|
|
6062
6131
|
/* @__PURE__ */ Q("time", {
|
|
6063
6132
|
class: "markup-comment-time",
|
|
6064
6133
|
datetime: new Date(t.createdAt).toISOString(),
|
|
6065
|
-
title:
|
|
6066
|
-
children:
|
|
6134
|
+
title: rc(t.createdAt),
|
|
6135
|
+
children: nc(t.createdAt)
|
|
6067
6136
|
}),
|
|
6068
6137
|
t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
|
|
6069
6138
|
class: "markup-comment-edited",
|
|
6070
6139
|
datetime: new Date(t.editedAt).toISOString(),
|
|
6071
|
-
title:
|
|
6140
|
+
title: rc(t.editedAt),
|
|
6072
6141
|
children: "edited"
|
|
6073
6142
|
}),
|
|
6074
6143
|
/* @__PURE__ */ Q("div", {
|
|
6075
6144
|
class: "markup-thread-actions",
|
|
6076
|
-
children: [!
|
|
6145
|
+
children: [!te && !l ? /* @__PURE__ */ Q(Ys, {
|
|
6077
6146
|
comment: t,
|
|
6078
6147
|
pickerOpen: m,
|
|
6079
6148
|
pickerDirection: v,
|
|
6080
|
-
pickerSide:
|
|
6149
|
+
pickerSide: k.length === 1,
|
|
6081
6150
|
pickerRef: (e) => {
|
|
6082
6151
|
m && (C.current = e);
|
|
6083
6152
|
},
|
|
@@ -6090,7 +6159,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6090
6159
|
});
|
|
6091
6160
|
return;
|
|
6092
6161
|
}
|
|
6093
|
-
if (
|
|
6162
|
+
if (k.length === 1) {
|
|
6094
6163
|
T({
|
|
6095
6164
|
type: "toggle-reaction-picker",
|
|
6096
6165
|
commentId: t._id,
|
|
@@ -6109,7 +6178,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6109
6178
|
T({ type: "dismiss" }), _(t._id, e);
|
|
6110
6179
|
}
|
|
6111
6180
|
}) : null, d ? /* @__PURE__ */ Q("div", {
|
|
6112
|
-
class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up",
|
|
6181
|
+
class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up", k.length === 1 && "is-side"),
|
|
6113
6182
|
ref: (e) => {
|
|
6114
6183
|
f && (C.current = e);
|
|
6115
6184
|
},
|
|
@@ -6126,7 +6195,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6126
6195
|
});
|
|
6127
6196
|
return;
|
|
6128
6197
|
}
|
|
6129
|
-
if (
|
|
6198
|
+
if (k.length === 1) {
|
|
6130
6199
|
T({
|
|
6131
6200
|
type: "toggle-comment-menu",
|
|
6132
6201
|
commentId: t._id,
|
|
@@ -6141,7 +6210,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6141
6210
|
direction: a < i ? "up" : "down"
|
|
6142
6211
|
});
|
|
6143
6212
|
},
|
|
6144
|
-
children: /* @__PURE__ */ Q(
|
|
6213
|
+
children: /* @__PURE__ */ Q(No, { size: 16 })
|
|
6145
6214
|
}), f ? /* @__PURE__ */ Q("div", {
|
|
6146
6215
|
class: "markup-thread-menu-list",
|
|
6147
6216
|
children: [o ? /* @__PURE__ */ Q("button", {
|
|
@@ -6181,7 +6250,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6181
6250
|
await h(t._id, n), T({ type: "dismiss" });
|
|
6182
6251
|
} catch {}
|
|
6183
6252
|
},
|
|
6184
|
-
children: [/* @__PURE__ */ Q(
|
|
6253
|
+
children: [/* @__PURE__ */ Q(Ns, {
|
|
6185
6254
|
class: "markup-comment-edit-input",
|
|
6186
6255
|
label: "Edit comment",
|
|
6187
6256
|
value: w.draft,
|
|
@@ -6207,7 +6276,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6207
6276
|
children: "Save"
|
|
6208
6277
|
})]
|
|
6209
6278
|
})]
|
|
6210
|
-
}) : /* @__PURE__ */ Q(
|
|
6279
|
+
}) : /* @__PURE__ */ Q(As, {
|
|
6211
6280
|
body: t.body,
|
|
6212
6281
|
mentions: t.mentions
|
|
6213
6282
|
}),
|
|
@@ -6220,9 +6289,9 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6220
6289
|
alt: "Screenshot"
|
|
6221
6290
|
})
|
|
6222
6291
|
}) : null,
|
|
6223
|
-
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(
|
|
6292
|
+
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(Xs, {
|
|
6224
6293
|
comment: t,
|
|
6225
|
-
isResolved:
|
|
6294
|
+
isResolved: te,
|
|
6226
6295
|
onToggle: (e) => _(t._id, e)
|
|
6227
6296
|
}) : null
|
|
6228
6297
|
]
|
|
@@ -6240,7 +6309,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6240
6309
|
onClick: (e) => {
|
|
6241
6310
|
e.stopPropagation(), S.current?.close();
|
|
6242
6311
|
},
|
|
6243
|
-
children: /* @__PURE__ */ Q(
|
|
6312
|
+
children: /* @__PURE__ */ Q(jo, { size: 16 })
|
|
6244
6313
|
}), /* @__PURE__ */ Q("img", {
|
|
6245
6314
|
class: "markup-lightbox-img",
|
|
6246
6315
|
src: e.screenshotUrl,
|
|
@@ -6248,7 +6317,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6248
6317
|
onClick: (e) => e.stopPropagation()
|
|
6249
6318
|
})]
|
|
6250
6319
|
}) : null,
|
|
6251
|
-
t == null ? /* @__PURE__ */ Q(
|
|
6320
|
+
t == null ? /* @__PURE__ */ Q(ls, {
|
|
6252
6321
|
isPending: s,
|
|
6253
6322
|
isConnecting: i,
|
|
6254
6323
|
isSigningIn: a,
|
|
@@ -6270,7 +6339,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6270
6339
|
children: "team"
|
|
6271
6340
|
}) : null
|
|
6272
6341
|
]
|
|
6273
|
-
}), /* @__PURE__ */ Q(
|
|
6342
|
+
}), /* @__PURE__ */ Q(Fs, {
|
|
6274
6343
|
label: "Reply",
|
|
6275
6344
|
placeholder: "Write a reply…",
|
|
6276
6345
|
submitLabel: "Reply",
|
|
@@ -6284,7 +6353,7 @@ function Hs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
|
|
|
6284
6353
|
]
|
|
6285
6354
|
});
|
|
6286
6355
|
}
|
|
6287
|
-
function
|
|
6356
|
+
function Ys({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
|
|
6288
6357
|
return /* @__PURE__ */ Q("div", {
|
|
6289
6358
|
class: Z("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
|
|
6290
6359
|
ref: i,
|
|
@@ -6294,11 +6363,11 @@ function Us({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
6294
6363
|
title: "Add reaction",
|
|
6295
6364
|
"aria-label": "Add reaction",
|
|
6296
6365
|
onClick: a,
|
|
6297
|
-
children: /* @__PURE__ */ Q(
|
|
6366
|
+
children: /* @__PURE__ */ Q(Lo, { size: 16 })
|
|
6298
6367
|
}), t ? /* @__PURE__ */ Q("div", {
|
|
6299
6368
|
class: "markup-reaction-picker",
|
|
6300
6369
|
role: "menu",
|
|
6301
|
-
children:
|
|
6370
|
+
children: Ks.map((t) => /* @__PURE__ */ Q("button", {
|
|
6302
6371
|
type: "button",
|
|
6303
6372
|
role: "menuitem",
|
|
6304
6373
|
class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
|
|
@@ -6308,11 +6377,11 @@ function Us({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
6308
6377
|
}) : null]
|
|
6309
6378
|
});
|
|
6310
6379
|
}
|
|
6311
|
-
function
|
|
6380
|
+
function Xs({ comment: e, isResolved: t, onToggle: n }) {
|
|
6312
6381
|
return /* @__PURE__ */ Q("div", {
|
|
6313
6382
|
class: "markup-reactions",
|
|
6314
6383
|
children: e.reactions.map((e) => {
|
|
6315
|
-
let r =
|
|
6384
|
+
let r = Zs(e.reactors, e.mine, e.count, e.emoji);
|
|
6316
6385
|
return /* @__PURE__ */ Q("button", {
|
|
6317
6386
|
type: "button",
|
|
6318
6387
|
class: Z("markup-reaction-chip", e.mine && "is-mine"),
|
|
@@ -6333,29 +6402,34 @@ function Ws({ comment: e, isResolved: t, onToggle: n }) {
|
|
|
6333
6402
|
})
|
|
6334
6403
|
});
|
|
6335
6404
|
}
|
|
6336
|
-
function
|
|
6405
|
+
function Zs(e, t, n, r) {
|
|
6337
6406
|
let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
|
|
6338
6407
|
return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
|
|
6339
6408
|
}
|
|
6340
|
-
function
|
|
6409
|
+
function Qs(e, t, n) {
|
|
6341
6410
|
return Math.max(t, Math.min(n, e));
|
|
6342
6411
|
}
|
|
6343
|
-
function
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6412
|
+
function $s({ name: e, image: t, tone: n }) {
|
|
6413
|
+
let [r, i] = L(null);
|
|
6414
|
+
return /* @__PURE__ */ Q("span", {
|
|
6415
|
+
class: "markup-comment-avatar",
|
|
6416
|
+
"data-tone": n,
|
|
6417
|
+
"aria-hidden": !0,
|
|
6418
|
+
children: t != null && r !== t ? /* @__PURE__ */ Q("img", {
|
|
6419
|
+
class: "markup-avatar-img",
|
|
6420
|
+
src: t,
|
|
6421
|
+
alt: "",
|
|
6422
|
+
loading: "lazy",
|
|
6423
|
+
decoding: "async",
|
|
6424
|
+
referrerpolicy: "no-referrer",
|
|
6425
|
+
onError: () => i(t)
|
|
6426
|
+
}) : /* @__PURE__ */ Q("span", {
|
|
6427
|
+
class: "markup-avatar-initials",
|
|
6428
|
+
children: ec(e)
|
|
6429
|
+
})
|
|
6430
|
+
});
|
|
6357
6431
|
}
|
|
6358
|
-
function
|
|
6432
|
+
function ec(e) {
|
|
6359
6433
|
let t = e.trim();
|
|
6360
6434
|
if (!t) return "??";
|
|
6361
6435
|
let n = t.split(/\s+/).filter(Boolean), r = n[0] ?? "";
|
|
@@ -6363,12 +6437,12 @@ function Ys(e) {
|
|
|
6363
6437
|
let i = n[n.length - 1] ?? "";
|
|
6364
6438
|
return ((r[0] ?? "") + (i[0] ?? "")).toUpperCase();
|
|
6365
6439
|
}
|
|
6366
|
-
function
|
|
6440
|
+
function tc(e) {
|
|
6367
6441
|
let t = 0;
|
|
6368
6442
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
|
|
6369
6443
|
return Math.abs(t) % 5 + 1;
|
|
6370
6444
|
}
|
|
6371
|
-
function
|
|
6445
|
+
function nc(e) {
|
|
6372
6446
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
6373
6447
|
if (n < 60) return "just now";
|
|
6374
6448
|
let r = Math.floor(n / 60);
|
|
@@ -6385,7 +6459,7 @@ function Zs(e) {
|
|
|
6385
6459
|
year: "numeric"
|
|
6386
6460
|
});
|
|
6387
6461
|
}
|
|
6388
|
-
function
|
|
6462
|
+
function rc(e) {
|
|
6389
6463
|
return new Date(e).toLocaleDateString([], {
|
|
6390
6464
|
month: "long",
|
|
6391
6465
|
day: "numeric",
|
|
@@ -6396,7 +6470,7 @@ function Qs(e) {
|
|
|
6396
6470
|
}
|
|
6397
6471
|
//#endregion
|
|
6398
6472
|
//#region src/runtime/ui/toolbar.tsx
|
|
6399
|
-
function
|
|
6473
|
+
function ic({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d }) {
|
|
6400
6474
|
let f = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
|
|
6401
6475
|
function p(e) {
|
|
6402
6476
|
if (e.preventDefault(), e.stopPropagation(), (e.metaKey || e.ctrlKey) && n) {
|
|
@@ -6418,7 +6492,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
6418
6492
|
title: e ? "Cancel placing markup" : "Leave a markup",
|
|
6419
6493
|
"aria-pressed": e,
|
|
6420
6494
|
onClick: p,
|
|
6421
|
-
children: Q(e ?
|
|
6495
|
+
children: Q(e ? jo : Ro, { size: 16 })
|
|
6422
6496
|
}),
|
|
6423
6497
|
a ? /* @__PURE__ */ Q("button", {
|
|
6424
6498
|
type: "button",
|
|
@@ -6430,7 +6504,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
6430
6504
|
onClick: (e) => {
|
|
6431
6505
|
e.preventDefault(), e.stopPropagation(), o?.();
|
|
6432
6506
|
},
|
|
6433
|
-
children: [/* @__PURE__ */ Q(
|
|
6507
|
+
children: [/* @__PURE__ */ Q(zo, { size: 16 }), i > 0 ? /* @__PURE__ */ Q("span", {
|
|
6434
6508
|
class: "markup-tb-badge",
|
|
6435
6509
|
"aria-hidden": "true",
|
|
6436
6510
|
children: i > 9 ? "9+" : i
|
|
@@ -6449,7 +6523,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
6449
6523
|
onClick: (e) => {
|
|
6450
6524
|
e.preventDefault(), e.stopPropagation(), l();
|
|
6451
6525
|
},
|
|
6452
|
-
children: Q(c ?
|
|
6526
|
+
children: Q(c ? Bo : Vo, { size: 16 })
|
|
6453
6527
|
})] }) : null,
|
|
6454
6528
|
u || d ? /* @__PURE__ */ Q("div", {
|
|
6455
6529
|
class: "markup-tb-sep",
|
|
@@ -6463,18 +6537,19 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
6463
6537
|
"data-kind": "overflow",
|
|
6464
6538
|
"aria-label": "More options",
|
|
6465
6539
|
disabled: !0,
|
|
6466
|
-
children: /* @__PURE__ */ Q(
|
|
6540
|
+
children: /* @__PURE__ */ Q(Ho, { size: 16 })
|
|
6467
6541
|
})
|
|
6468
6542
|
]
|
|
6469
6543
|
});
|
|
6470
6544
|
}
|
|
6471
6545
|
//#endregion
|
|
6472
6546
|
//#region src/runtime/ui/app.tsx
|
|
6473
|
-
function
|
|
6547
|
+
function ac(e) {
|
|
6474
6548
|
let t = {
|
|
6475
6549
|
clientId: `markup_user_${e.identity.id}`,
|
|
6476
6550
|
name: e.identity.name,
|
|
6477
|
-
email: e.identity.email
|
|
6551
|
+
email: e.identity.email,
|
|
6552
|
+
image: e.identity.image == null ? void 0 : Ti(e.identity.image, location.href)?.href ?? void 0
|
|
6478
6553
|
};
|
|
6479
6554
|
if (e.mode === "cookies") return e.tokenExpiresAt == null || e.refreshTokenExpiresAt == null ? null : {
|
|
6480
6555
|
storage: "cookies",
|
|
@@ -6495,17 +6570,17 @@ function ec(e) {
|
|
|
6495
6570
|
} : {}
|
|
6496
6571
|
};
|
|
6497
6572
|
}
|
|
6498
|
-
function
|
|
6573
|
+
function oc() {
|
|
6499
6574
|
let e = document.activeElement;
|
|
6500
6575
|
for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
|
|
6501
6576
|
if (!e) return !1;
|
|
6502
6577
|
let t = e.tagName;
|
|
6503
6578
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" ? !0 : e.isContentEditable;
|
|
6504
6579
|
}
|
|
6505
|
-
function
|
|
6580
|
+
function sc() {
|
|
6506
6581
|
return window.location.host + window.location.pathname;
|
|
6507
6582
|
}
|
|
6508
|
-
var
|
|
6583
|
+
var cc = Ar({
|
|
6509
6584
|
visible: {
|
|
6510
6585
|
"hide-with-toast": () => ({ kind: "hidden-with-toast" }),
|
|
6511
6586
|
toggle: () => ({ kind: "hidden" })
|
|
@@ -6516,26 +6591,26 @@ var rc = Ar({
|
|
|
6516
6591
|
},
|
|
6517
6592
|
hidden: { toggle: () => ({ kind: "visible" }) }
|
|
6518
6593
|
});
|
|
6519
|
-
function
|
|
6520
|
-
return
|
|
6594
|
+
function lc(e) {
|
|
6595
|
+
return ji(e), e;
|
|
6521
6596
|
}
|
|
6522
|
-
var
|
|
6597
|
+
var uc = Ar({
|
|
6523
6598
|
unresolved: {
|
|
6524
|
-
"mint-success": (e, t) =>
|
|
6599
|
+
"mint-success": (e, t) => lc({
|
|
6525
6600
|
kind: "anon",
|
|
6526
6601
|
identity: t.identity
|
|
6527
6602
|
}),
|
|
6528
|
-
"signed-in": (e, t) =>
|
|
6603
|
+
"signed-in": (e, t) => lc({
|
|
6529
6604
|
kind: "verified",
|
|
6530
6605
|
identity: t.identity
|
|
6531
6606
|
})
|
|
6532
6607
|
},
|
|
6533
6608
|
anon: {
|
|
6534
|
-
"signed-in": (e, t) =>
|
|
6609
|
+
"signed-in": (e, t) => lc({
|
|
6535
6610
|
kind: "verified",
|
|
6536
6611
|
identity: t.identity
|
|
6537
6612
|
}),
|
|
6538
|
-
"author-set": (e, t) =>
|
|
6613
|
+
"author-set": (e, t) => lc({
|
|
6539
6614
|
kind: "anon",
|
|
6540
6615
|
identity: {
|
|
6541
6616
|
...e.identity,
|
|
@@ -6543,49 +6618,49 @@ var ac = Ar({
|
|
|
6543
6618
|
email: t.email
|
|
6544
6619
|
}
|
|
6545
6620
|
}),
|
|
6546
|
-
"forget-me": () =>
|
|
6621
|
+
"forget-me": () => lc({ kind: "unresolved" })
|
|
6547
6622
|
},
|
|
6548
6623
|
verified: {
|
|
6549
|
-
"signed-in": (e, t) =>
|
|
6624
|
+
"signed-in": (e, t) => lc({
|
|
6550
6625
|
kind: "verified",
|
|
6551
6626
|
identity: t.identity
|
|
6552
6627
|
}),
|
|
6553
|
-
unauthorized: (e) =>
|
|
6628
|
+
unauthorized: (e) => lc({
|
|
6554
6629
|
kind: "recovering",
|
|
6555
6630
|
preserved: {
|
|
6556
6631
|
name: e.identity.name,
|
|
6557
6632
|
email: e.identity.email
|
|
6558
6633
|
}
|
|
6559
6634
|
}),
|
|
6560
|
-
"signed-out": () =>
|
|
6635
|
+
"signed-out": () => lc({ kind: "unresolved" })
|
|
6561
6636
|
},
|
|
6562
6637
|
recovering: {
|
|
6563
|
-
"mint-success": (e, t) =>
|
|
6638
|
+
"mint-success": (e, t) => lc({
|
|
6564
6639
|
kind: "anon",
|
|
6565
6640
|
identity: t.identity
|
|
6566
6641
|
}),
|
|
6567
|
-
"signed-in": (e, t) =>
|
|
6642
|
+
"signed-in": (e, t) => lc({
|
|
6568
6643
|
kind: "verified",
|
|
6569
6644
|
identity: t.identity
|
|
6570
6645
|
})
|
|
6571
6646
|
}
|
|
6572
6647
|
});
|
|
6573
|
-
function
|
|
6574
|
-
let [a, o] =
|
|
6575
|
-
|
|
6648
|
+
function dc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
|
|
6649
|
+
let [a, o] = L(sc), [s, c] = L([]), [l, u] = L(!1), d = B(() => Ai(), []), [f, p] = jr(uc, d.state), [m, h] = L(null);
|
|
6650
|
+
R(() => {
|
|
6576
6651
|
let n = !1;
|
|
6577
|
-
return
|
|
6652
|
+
return gi(e, t).then((e) => {
|
|
6578
6653
|
n || h(e);
|
|
6579
6654
|
}), () => {
|
|
6580
6655
|
n = !0;
|
|
6581
6656
|
};
|
|
6582
6657
|
}, [e, t]);
|
|
6583
|
-
let [g, _] =
|
|
6584
|
-
w.current = f,
|
|
6658
|
+
let [g, _] = L(n), [v, y] = L(!0), [b, x] = L(!0), [S, C] = L(!1), w = z(f);
|
|
6659
|
+
w.current = f, Do(f, e, t, (e) => p({
|
|
6585
6660
|
type: "signed-in",
|
|
6586
6661
|
identity: e
|
|
6587
6662
|
}), () => p({ type: "unauthorized" }));
|
|
6588
|
-
let T =
|
|
6663
|
+
let T = B(() => pi({
|
|
6589
6664
|
apiUrl: e,
|
|
6590
6665
|
apiKey: t,
|
|
6591
6666
|
getToken: () => {
|
|
@@ -6610,8 +6685,8 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6610
6685
|
e,
|
|
6611
6686
|
t,
|
|
6612
6687
|
p
|
|
6613
|
-
]), [E, D] =
|
|
6614
|
-
|
|
6688
|
+
]), [E, D] = L({ kind: "idle" }), [O, ee] = L([]);
|
|
6689
|
+
R(() => {
|
|
6615
6690
|
let e = !1;
|
|
6616
6691
|
return T.listMembers().then((t) => {
|
|
6617
6692
|
e || ee(t.members);
|
|
@@ -6619,7 +6694,7 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6619
6694
|
e = !0;
|
|
6620
6695
|
};
|
|
6621
6696
|
}, [T]);
|
|
6622
|
-
let [
|
|
6697
|
+
let [te, k] = L(0), [A, j] = L([]), [ne, re] = L(!1), [ie, ae] = L(void 0), [oe, se] = L(!1), ce = V(() => {
|
|
6623
6698
|
re(!0), ae(void 0), T.listNotifications().then((e) => {
|
|
6624
6699
|
j(e.notifications);
|
|
6625
6700
|
}).catch((e) => {
|
|
@@ -6627,8 +6702,8 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6627
6702
|
}).finally(() => {
|
|
6628
6703
|
re(!1);
|
|
6629
6704
|
});
|
|
6630
|
-
}, [T]), le = Rr(), ue = Rr(), de = Rr(), fe = Rr(), pe = Rr(), { run: M, reset: me } = le, { run: he } = ue, { run: ge, reset: _e } = de, { run: ve } = fe, { run: ye } = pe, be = pe.isPending, xe = le.isPending, N = le.error ?? ue.error ?? de.error, [Se,
|
|
6631
|
-
|
|
6705
|
+
}, [T]), le = Rr(), ue = Rr(), de = Rr(), fe = Rr(), pe = Rr(), { run: M, reset: me } = le, { run: he } = ue, { run: ge, reset: _e } = de, { run: ve } = fe, { run: ye } = pe, be = pe.isPending, xe = le.isPending, N = le.error ?? ue.error ?? de.error, [Se, Ce] = jr(cc, { kind: "visible" }), P = Se.kind !== "visible", [we, Te] = L(0), Ee = z(null), De = Ni(f), Oe = f.kind === "verified", ke = f.kind === "unresolved" || f.kind === "recovering", Ae = Mi(f);
|
|
6706
|
+
R(() => {
|
|
6632
6707
|
if (f.kind !== "unresolved" && f.kind !== "recovering") return;
|
|
6633
6708
|
let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
|
|
6634
6709
|
function i() {
|
|
@@ -6655,43 +6730,43 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6655
6730
|
p,
|
|
6656
6731
|
d
|
|
6657
6732
|
]);
|
|
6658
|
-
let
|
|
6659
|
-
|
|
6733
|
+
let je = Co(T), [Me, Ne] = L(null);
|
|
6734
|
+
R(() => {
|
|
6660
6735
|
let t = new kr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
6661
|
-
return
|
|
6662
|
-
t.close(),
|
|
6736
|
+
return Ne(t), () => {
|
|
6737
|
+
t.close(), Ne((e) => e === t ? null : e);
|
|
6663
6738
|
};
|
|
6664
6739
|
}, [e]);
|
|
6665
|
-
let
|
|
6666
|
-
|
|
6667
|
-
if (!(!
|
|
6668
|
-
subscriptionToken:
|
|
6740
|
+
let Pe = z(!1);
|
|
6741
|
+
R(() => {
|
|
6742
|
+
if (!(!Me || !je)) return me(), _e(), Me.onUpdate(bn("widget/queries:subscribeThreadsForRoute"), {
|
|
6743
|
+
subscriptionToken: je,
|
|
6669
6744
|
route: a,
|
|
6670
|
-
viewerClientId:
|
|
6745
|
+
viewerClientId: Ae
|
|
6671
6746
|
}, (e) => {
|
|
6672
6747
|
e !== void 0 && (c(e), u(!0));
|
|
6673
6748
|
});
|
|
6674
6749
|
}, [
|
|
6750
|
+
Me,
|
|
6675
6751
|
je,
|
|
6676
|
-
Ae,
|
|
6677
6752
|
a,
|
|
6678
|
-
|
|
6753
|
+
Ae,
|
|
6679
6754
|
me,
|
|
6680
6755
|
_e
|
|
6681
|
-
]),
|
|
6756
|
+
]), R(() => {
|
|
6682
6757
|
if (f.kind !== "verified") {
|
|
6683
|
-
|
|
6758
|
+
k(0);
|
|
6684
6759
|
return;
|
|
6685
6760
|
}
|
|
6686
|
-
if (!(!
|
|
6687
|
-
e !== void 0 &&
|
|
6761
|
+
if (!(!Me || !je)) return Me.onUpdate(bn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: je }, (e) => {
|
|
6762
|
+
e !== void 0 && k(e.count);
|
|
6688
6763
|
});
|
|
6689
6764
|
}, [
|
|
6765
|
+
Me,
|
|
6690
6766
|
je,
|
|
6691
|
-
Ae,
|
|
6692
6767
|
f.kind
|
|
6693
|
-
]),
|
|
6694
|
-
if (
|
|
6768
|
+
]), R(() => {
|
|
6769
|
+
if (Pe.current || !l) return;
|
|
6695
6770
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
6696
6771
|
if (e) {
|
|
6697
6772
|
let t = decodeURIComponent(e[1] ?? "");
|
|
@@ -6700,21 +6775,21 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6700
6775
|
threadId: t
|
|
6701
6776
|
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
6702
6777
|
}
|
|
6703
|
-
|
|
6704
|
-
}, [s, l]),
|
|
6778
|
+
Pe.current = !0;
|
|
6779
|
+
}, [s, l]), R(() => Ci(() => o(sc())), []), R(() => {
|
|
6705
6780
|
function e(e) {
|
|
6706
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
6781
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), Ce({ type: "toggle" })));
|
|
6707
6782
|
}
|
|
6708
6783
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
6709
|
-
}, [
|
|
6784
|
+
}, [Ce]), R(() => {
|
|
6710
6785
|
if (Se.kind !== "hidden-with-toast") return;
|
|
6711
|
-
let e = window.setTimeout(() =>
|
|
6786
|
+
let e = window.setTimeout(() => Ce({ type: "dismiss-toast" }), 5e3);
|
|
6712
6787
|
return () => window.clearTimeout(e);
|
|
6713
|
-
}, [Se.kind,
|
|
6788
|
+
}, [Se.kind, Ce]), R(() => {
|
|
6714
6789
|
let e = null;
|
|
6715
6790
|
function t() {
|
|
6716
6791
|
e ??= requestAnimationFrame(() => {
|
|
6717
|
-
e = null,
|
|
6792
|
+
e = null, Te((e) => e + 1);
|
|
6718
6793
|
});
|
|
6719
6794
|
}
|
|
6720
6795
|
window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
|
|
@@ -6723,23 +6798,23 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6723
6798
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
6724
6799
|
};
|
|
6725
6800
|
}, []);
|
|
6726
|
-
let
|
|
6801
|
+
let F = V(() => {
|
|
6727
6802
|
me(), _e(), D({ kind: "placing" });
|
|
6728
6803
|
}, [me, _e]);
|
|
6729
|
-
|
|
6804
|
+
R(() => {
|
|
6730
6805
|
function e(e) {
|
|
6731
|
-
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || E.kind === "idle" && (
|
|
6806
|
+
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || E.kind === "idle" && (P || oc() || (e.preventDefault(), F())));
|
|
6732
6807
|
}
|
|
6733
6808
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
6734
6809
|
}, [
|
|
6735
6810
|
E.kind,
|
|
6736
|
-
|
|
6737
|
-
|
|
6811
|
+
P,
|
|
6812
|
+
F
|
|
6738
6813
|
]);
|
|
6739
|
-
let
|
|
6814
|
+
let Fe = V(() => {
|
|
6740
6815
|
D({ kind: "idle" }), me(), _e();
|
|
6741
|
-
}, [me, _e]),
|
|
6742
|
-
let i = t + window.scrollX, a = n + window.scrollY, o = ++
|
|
6816
|
+
}, [me, _e]), Ie = z(0), Le = V((e, t, n) => {
|
|
6817
|
+
let i = t + window.scrollX, a = n + window.scrollY, o = ++Ie.current;
|
|
6743
6818
|
if (r?.enabled === !1 || !b) {
|
|
6744
6819
|
D({
|
|
6745
6820
|
kind: "composing-new",
|
|
@@ -6748,6 +6823,7 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6748
6823
|
pageY: a,
|
|
6749
6824
|
screenshot: null,
|
|
6750
6825
|
isScreenshotCapturing: !1,
|
|
6826
|
+
screenshotFailed: !1,
|
|
6751
6827
|
screenshotRedactedCount: 0,
|
|
6752
6828
|
screenshotRedactedSelectors: [],
|
|
6753
6829
|
captureToken: o
|
|
@@ -6761,15 +6837,16 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6761
6837
|
pageY: a,
|
|
6762
6838
|
screenshot: null,
|
|
6763
6839
|
isScreenshotCapturing: !0,
|
|
6840
|
+
screenshotFailed: !1,
|
|
6764
6841
|
screenshotRedactedCount: 0,
|
|
6765
6842
|
screenshotRedactedSelectors: [],
|
|
6766
6843
|
captureToken: o
|
|
6767
6844
|
});
|
|
6768
|
-
let s =
|
|
6845
|
+
let s = Ee.current != null && Ee.current.getRootNode() instanceof ShadowRoot ? Ee.current.getRootNode().host : null, c = {
|
|
6769
6846
|
strictScrub: r?.strictScrub,
|
|
6770
6847
|
redactSelector: r?.redactSelector
|
|
6771
6848
|
};
|
|
6772
|
-
|
|
6849
|
+
mo(s, {
|
|
6773
6850
|
x: t,
|
|
6774
6851
|
y: n
|
|
6775
6852
|
}, c).then((e) => {
|
|
@@ -6777,19 +6854,20 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6777
6854
|
...t,
|
|
6778
6855
|
screenshot: e?.blob ?? null,
|
|
6779
6856
|
isScreenshotCapturing: !1,
|
|
6857
|
+
screenshotFailed: e == null,
|
|
6780
6858
|
screenshotRedactedCount: e?.redactedCount ?? 0,
|
|
6781
6859
|
screenshotRedactedSelectors: e?.redactedSelectors ?? []
|
|
6782
6860
|
});
|
|
6783
6861
|
});
|
|
6784
|
-
}, [r, b]),
|
|
6862
|
+
}, [r, b]), Re = V((e, t) => {
|
|
6785
6863
|
p({
|
|
6786
6864
|
type: "author-set",
|
|
6787
6865
|
name: e,
|
|
6788
6866
|
email: t
|
|
6789
6867
|
});
|
|
6790
|
-
}, [p]),
|
|
6868
|
+
}, [p]), I = ue.isPending, ze = V(async () => {
|
|
6791
6869
|
await he(async () => {
|
|
6792
|
-
let n =
|
|
6870
|
+
let n = ac(await zi({
|
|
6793
6871
|
apiUrl: e,
|
|
6794
6872
|
apiKey: t,
|
|
6795
6873
|
useCookies: m === !0
|
|
@@ -6806,9 +6884,9 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6806
6884
|
m,
|
|
6807
6885
|
he,
|
|
6808
6886
|
p
|
|
6809
|
-
]),
|
|
6887
|
+
]), Be = V(async (e, t) => {
|
|
6810
6888
|
if (E.kind !== "composing-new") return;
|
|
6811
|
-
let n =
|
|
6889
|
+
let n = Pi(f);
|
|
6812
6890
|
n && await M(async () => {
|
|
6813
6891
|
let r;
|
|
6814
6892
|
if (t && E.screenshot) {
|
|
@@ -6855,7 +6933,7 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6855
6933
|
E,
|
|
6856
6934
|
a,
|
|
6857
6935
|
M
|
|
6858
|
-
]),
|
|
6936
|
+
]), Ve = V(async () => {
|
|
6859
6937
|
if (E.kind !== "thread") return;
|
|
6860
6938
|
let e = E.threadId;
|
|
6861
6939
|
await M(async () => {
|
|
@@ -6865,19 +6943,19 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6865
6943
|
T,
|
|
6866
6944
|
E,
|
|
6867
6945
|
M
|
|
6868
|
-
]),
|
|
6946
|
+
]), He = V(async () => {
|
|
6869
6947
|
if (E.kind !== "thread") return;
|
|
6870
6948
|
let e = E.threadId;
|
|
6871
6949
|
await M(async () => {
|
|
6872
|
-
await T.resolveThread(e,
|
|
6950
|
+
await T.resolveThread(e, Ae), c((t) => t.filter((t) => t._id !== e)), D({ kind: "idle" });
|
|
6873
6951
|
});
|
|
6874
6952
|
}, [
|
|
6875
6953
|
T,
|
|
6876
6954
|
E,
|
|
6877
|
-
|
|
6955
|
+
Ae,
|
|
6878
6956
|
M
|
|
6879
|
-
]),
|
|
6880
|
-
if (e.readAt ?? (
|
|
6957
|
+
]), Ue = V((e) => {
|
|
6958
|
+
if (e.readAt ?? (k((e) => Math.max(0, e - 1)), j((t) => t.map((t) => t._id === e._id ? {
|
|
6881
6959
|
...t,
|
|
6882
6960
|
readAt: Date.now()
|
|
6883
6961
|
} : t)), T.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) D({
|
|
@@ -6885,17 +6963,17 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6885
6963
|
threadId: e.threadId
|
|
6886
6964
|
});
|
|
6887
6965
|
else {
|
|
6888
|
-
let t =
|
|
6966
|
+
let t = Ti(e.threadUrl, window.location.href);
|
|
6889
6967
|
t && (t.hash = `markup-thread=${e.threadId}`, window.location.href = t.toString());
|
|
6890
6968
|
}
|
|
6891
|
-
}, [T, s]),
|
|
6892
|
-
se(!0),
|
|
6969
|
+
}, [T, s]), We = V(() => {
|
|
6970
|
+
se(!0), k(0), j((e) => e.map((e) => e.readAt == null ? {
|
|
6893
6971
|
...e,
|
|
6894
6972
|
readAt: Date.now()
|
|
6895
6973
|
} : e)), T.markAllNotificationsRead().catch(() => {}).finally(() => se(!1));
|
|
6896
|
-
}, [T]),
|
|
6974
|
+
}, [T]), Ge = V(async (e) => {
|
|
6897
6975
|
if (E.kind !== "thread") return;
|
|
6898
|
-
let t =
|
|
6976
|
+
let t = Pi(f);
|
|
6899
6977
|
if (!t) return;
|
|
6900
6978
|
let n = E.threadId;
|
|
6901
6979
|
await M(async () => {
|
|
@@ -6912,7 +6990,7 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6912
6990
|
f,
|
|
6913
6991
|
E,
|
|
6914
6992
|
M
|
|
6915
|
-
]),
|
|
6993
|
+
]), Ke = V(async (e, t) => {
|
|
6916
6994
|
if (E.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
6917
6995
|
let n = E.threadId;
|
|
6918
6996
|
await M(async () => {
|
|
@@ -6927,7 +7005,7 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6927
7005
|
f,
|
|
6928
7006
|
E,
|
|
6929
7007
|
M
|
|
6930
|
-
]),
|
|
7008
|
+
]), qe = V(async (e) => {
|
|
6931
7009
|
if (E.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
6932
7010
|
let t = E.threadId;
|
|
6933
7011
|
await M(async () => {
|
|
@@ -6939,9 +7017,9 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6939
7017
|
f,
|
|
6940
7018
|
E,
|
|
6941
7019
|
M
|
|
6942
|
-
]),
|
|
7020
|
+
]), Je = V(async (e, t) => {
|
|
6943
7021
|
if (E.kind !== "thread") return;
|
|
6944
|
-
let n =
|
|
7022
|
+
let n = Pi(f);
|
|
6945
7023
|
if (!n) return;
|
|
6946
7024
|
let r = E.threadId;
|
|
6947
7025
|
await ge(async () => {
|
|
@@ -6956,35 +7034,35 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6956
7034
|
f,
|
|
6957
7035
|
E,
|
|
6958
7036
|
ge
|
|
6959
|
-
]), [
|
|
7037
|
+
]), [Ye, Xe] = L(!1), Ze = V(async () => {
|
|
6960
7038
|
await ve(async () => {
|
|
6961
|
-
await T.forgetMe(), D({ kind: "idle" }), p({ type: "forget-me" }),
|
|
7039
|
+
await T.forgetMe(), D({ kind: "idle" }), p({ type: "forget-me" }), Xe(!0);
|
|
6962
7040
|
});
|
|
6963
7041
|
}, [
|
|
6964
7042
|
T,
|
|
6965
7043
|
ve,
|
|
6966
7044
|
p
|
|
6967
7045
|
]);
|
|
6968
|
-
|
|
6969
|
-
if (!
|
|
6970
|
-
let e = window.setTimeout(() =>
|
|
7046
|
+
R(() => {
|
|
7047
|
+
if (!Ye) return;
|
|
7048
|
+
let e = window.setTimeout(() => Xe(!1), 5e3);
|
|
6971
7049
|
return () => window.clearTimeout(e);
|
|
6972
|
-
}, [
|
|
6973
|
-
let [
|
|
7050
|
+
}, [Ye]);
|
|
7051
|
+
let [Qe, $e] = L(!1), et = V(async () => {
|
|
6974
7052
|
await ye(async () => {
|
|
6975
|
-
await T.signOut(), D({ kind: "idle" }), p({ type: "signed-out" }),
|
|
7053
|
+
await T.signOut(), D({ kind: "idle" }), p({ type: "signed-out" }), $e(!0);
|
|
6976
7054
|
});
|
|
6977
7055
|
}, [
|
|
6978
7056
|
T,
|
|
6979
7057
|
ye,
|
|
6980
7058
|
p
|
|
6981
7059
|
]);
|
|
6982
|
-
|
|
6983
|
-
if (!
|
|
6984
|
-
let e = window.setTimeout(() =>
|
|
7060
|
+
R(() => {
|
|
7061
|
+
if (!Qe) return;
|
|
7062
|
+
let e = window.setTimeout(() => $e(!1), 5e3);
|
|
6985
7063
|
return () => window.clearTimeout(e);
|
|
6986
|
-
}, [
|
|
6987
|
-
let
|
|
7064
|
+
}, [Qe]);
|
|
7065
|
+
let tt = E.kind === "thread" ? s.find((e) => e._id === E.threadId) ?? null : null, H = Oe || Ae != null && Ae === tt?.authorClientId, U = B(() => s.map((e) => ({
|
|
6988
7066
|
thread: e,
|
|
6989
7067
|
point: oi({
|
|
6990
7068
|
anchorX: e.anchorX,
|
|
@@ -6993,37 +7071,50 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
6993
7071
|
anchorOffsetX: e.anchorOffsetX,
|
|
6994
7072
|
anchorOffsetY: e.anchorOffsetY
|
|
6995
7073
|
})
|
|
6996
|
-
})), [s,
|
|
6997
|
-
|
|
6998
|
-
|
|
7074
|
+
})), [s, we]), nt = z({
|
|
7075
|
+
retryable: !1,
|
|
7076
|
+
elements: []
|
|
7077
|
+
});
|
|
7078
|
+
R(() => {
|
|
7079
|
+
nt.current = {
|
|
7080
|
+
retryable: U.some((e) => !e.point.resolved && e.thread.anchorSelector != null),
|
|
7081
|
+
elements: U.flatMap((e) => e.point.element ? [e.point.element] : [])
|
|
7082
|
+
};
|
|
7083
|
+
}, [U]);
|
|
7084
|
+
let rt = s.some((e) => e.anchorSelector != null);
|
|
7085
|
+
return R(() => {
|
|
7086
|
+
if (!rt) return;
|
|
6999
7087
|
let e = null;
|
|
7000
7088
|
function t() {
|
|
7001
7089
|
e ??= requestAnimationFrame(() => {
|
|
7002
|
-
e = null,
|
|
7090
|
+
e = null, Te((e) => e + 1);
|
|
7003
7091
|
});
|
|
7004
7092
|
}
|
|
7005
|
-
let n = new MutationObserver(
|
|
7093
|
+
let n = new MutationObserver(() => {
|
|
7094
|
+
let { retryable: e, elements: n } = nt.current;
|
|
7095
|
+
!e && n.every((e) => e.isConnected) || t();
|
|
7096
|
+
});
|
|
7006
7097
|
return n.observe(document.body, {
|
|
7007
7098
|
childList: !0,
|
|
7008
7099
|
subtree: !0
|
|
7009
7100
|
}), () => {
|
|
7010
7101
|
n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
7011
7102
|
};
|
|
7012
|
-
}, [
|
|
7013
|
-
E.kind === "thread" &&
|
|
7103
|
+
}, [rt]), R(() => {
|
|
7104
|
+
E.kind === "thread" && tt == null && Fe();
|
|
7014
7105
|
}, [
|
|
7015
7106
|
E,
|
|
7016
|
-
|
|
7017
|
-
|
|
7107
|
+
tt,
|
|
7108
|
+
Fe
|
|
7018
7109
|
]), /* @__PURE__ */ Q("div", {
|
|
7019
7110
|
class: "markup-root",
|
|
7020
|
-
ref:
|
|
7111
|
+
ref: Ee,
|
|
7021
7112
|
children: [
|
|
7022
7113
|
E.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
|
|
7023
7114
|
class: "markup-pins-layer",
|
|
7024
|
-
children: [!
|
|
7115
|
+
children: [!P && v ? U.map(({ thread: e, point: t }) => {
|
|
7025
7116
|
let n = E.kind === "thread" && E.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
7026
|
-
return /* @__PURE__ */ Q(
|
|
7117
|
+
return /* @__PURE__ */ Q(Us, {
|
|
7027
7118
|
pageX: t.pageX,
|
|
7028
7119
|
pageY: t.pageY,
|
|
7029
7120
|
count: r,
|
|
@@ -7034,63 +7125,64 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7034
7125
|
threadId: e._id
|
|
7035
7126
|
})
|
|
7036
7127
|
}, e._id);
|
|
7037
|
-
}) : null, E.kind === "composing-new" ? /* @__PURE__ */ Q(
|
|
7128
|
+
}) : null, E.kind === "composing-new" ? /* @__PURE__ */ Q(Ws, {
|
|
7038
7129
|
pageX: E.pageX,
|
|
7039
7130
|
pageY: E.pageY
|
|
7040
7131
|
}) : null]
|
|
7041
7132
|
}),
|
|
7042
|
-
E.kind === "placing" ? /* @__PURE__ */ Q(
|
|
7043
|
-
onPlace:
|
|
7044
|
-
onCancel:
|
|
7133
|
+
E.kind === "placing" ? /* @__PURE__ */ Q(Gs, {
|
|
7134
|
+
onPlace: Le,
|
|
7135
|
+
onCancel: Fe
|
|
7045
7136
|
}) : null,
|
|
7046
|
-
E.kind === "thread" &&
|
|
7047
|
-
thread:
|
|
7048
|
-
authorName:
|
|
7049
|
-
currentClientId:
|
|
7050
|
-
isVerified:
|
|
7051
|
-
isIdentityResolving:
|
|
7052
|
-
isSigningIn:
|
|
7053
|
-
canDelete:
|
|
7137
|
+
E.kind === "thread" && tt ? /* @__PURE__ */ Q(Js, {
|
|
7138
|
+
thread: tt,
|
|
7139
|
+
authorName: De,
|
|
7140
|
+
currentClientId: Ae ?? null,
|
|
7141
|
+
isVerified: Oe,
|
|
7142
|
+
isIdentityResolving: ke,
|
|
7143
|
+
isSigningIn: I,
|
|
7144
|
+
canDelete: H,
|
|
7054
7145
|
isPending: xe,
|
|
7055
7146
|
error: N,
|
|
7056
|
-
isHidden:
|
|
7147
|
+
isHidden: P,
|
|
7057
7148
|
members: O,
|
|
7058
|
-
onAuthor:
|
|
7059
|
-
onSignIn:
|
|
7060
|
-
onClose:
|
|
7061
|
-
onReply:
|
|
7062
|
-
onEditComment:
|
|
7063
|
-
onDeleteComment:
|
|
7064
|
-
onToggleReaction:
|
|
7065
|
-
onDelete:
|
|
7066
|
-
onResolve:
|
|
7067
|
-
},
|
|
7068
|
-
E.kind === "composing-new" ? /* @__PURE__ */ Q(
|
|
7149
|
+
onAuthor: Re,
|
|
7150
|
+
onSignIn: ze,
|
|
7151
|
+
onClose: Fe,
|
|
7152
|
+
onReply: Ge,
|
|
7153
|
+
onEditComment: Ke,
|
|
7154
|
+
onDeleteComment: qe,
|
|
7155
|
+
onToggleReaction: Je,
|
|
7156
|
+
onDelete: Ve,
|
|
7157
|
+
onResolve: He
|
|
7158
|
+
}, tt._id) : null,
|
|
7159
|
+
E.kind === "composing-new" ? /* @__PURE__ */ Q(Is, {
|
|
7069
7160
|
pageX: E.pageX,
|
|
7070
7161
|
pageY: E.pageY,
|
|
7071
|
-
authorName:
|
|
7072
|
-
isVerified:
|
|
7073
|
-
isIdentityResolving:
|
|
7074
|
-
isSigningIn:
|
|
7162
|
+
authorName: De,
|
|
7163
|
+
isVerified: Oe,
|
|
7164
|
+
isIdentityResolving: ke,
|
|
7165
|
+
isSigningIn: I,
|
|
7075
7166
|
isPending: xe,
|
|
7076
7167
|
error: N,
|
|
7077
7168
|
screenshot: E.screenshot,
|
|
7078
7169
|
isScreenshotCapturing: E.isScreenshotCapturing,
|
|
7170
|
+
screenshotFailed: E.screenshotFailed,
|
|
7079
7171
|
screenshotRedactedCount: E.screenshotRedactedCount,
|
|
7080
7172
|
screenshotRedactedSelectors: E.screenshotRedactedSelectors,
|
|
7081
7173
|
members: O,
|
|
7082
|
-
onAuthor:
|
|
7083
|
-
onSignIn:
|
|
7084
|
-
onSubmit:
|
|
7085
|
-
onClose:
|
|
7174
|
+
onAuthor: Re,
|
|
7175
|
+
onSignIn: ze,
|
|
7176
|
+
onSubmit: Be,
|
|
7177
|
+
onClose: Fe
|
|
7086
7178
|
}) : null,
|
|
7087
|
-
!
|
|
7179
|
+
!P || E.kind === "placing" || E.kind === "composing-new" ? /* @__PURE__ */ Q(ic, {
|
|
7088
7180
|
isActive: E.kind === "placing",
|
|
7089
|
-
onToggle: () => E.kind === "placing" ?
|
|
7090
|
-
onHide: () =>
|
|
7181
|
+
onToggle: () => E.kind === "placing" ? Fe() : F(),
|
|
7182
|
+
onHide: () => Ce({ type: "hide-with-toast" }),
|
|
7091
7183
|
position: g,
|
|
7092
|
-
showInbox:
|
|
7093
|
-
unreadCount:
|
|
7184
|
+
showInbox: Oe,
|
|
7185
|
+
unreadCount: Oe ? te : 0,
|
|
7094
7186
|
inboxOpen: S,
|
|
7095
7187
|
onOpenInbox: () => {
|
|
7096
7188
|
let e = !S;
|
|
@@ -7098,47 +7190,47 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7098
7190
|
},
|
|
7099
7191
|
pinsVisible: v,
|
|
7100
7192
|
onTogglePins: () => y((e) => !e),
|
|
7101
|
-
identityButton: /* @__PURE__ */ Q(
|
|
7193
|
+
identityButton: /* @__PURE__ */ Q($o, {
|
|
7102
7194
|
identity: f,
|
|
7103
7195
|
position: g,
|
|
7104
|
-
isSigningIn:
|
|
7196
|
+
isSigningIn: I,
|
|
7105
7197
|
isSigningOut: be,
|
|
7106
7198
|
dashboardUrl: i,
|
|
7107
|
-
onSignIn:
|
|
7108
|
-
onSignOut:
|
|
7109
|
-
onForgetMe:
|
|
7199
|
+
onSignIn: ze,
|
|
7200
|
+
onSignOut: et,
|
|
7201
|
+
onForgetMe: Ze
|
|
7110
7202
|
}),
|
|
7111
|
-
overflowButton: /* @__PURE__ */ Q(
|
|
7203
|
+
overflowButton: /* @__PURE__ */ Q(zs, {
|
|
7112
7204
|
position: g,
|
|
7113
7205
|
onSetPosition: _,
|
|
7114
7206
|
autoCapture: b && r?.enabled !== !1,
|
|
7115
7207
|
autoCaptureLocked: r?.enabled === !1,
|
|
7116
7208
|
onToggleAutoCapture: () => x((e) => !e),
|
|
7117
|
-
onHideForSession: () =>
|
|
7118
|
-
version: "1.
|
|
7209
|
+
onHideForSession: () => Ce({ type: "hide-with-toast" }),
|
|
7210
|
+
version: "1.16.1",
|
|
7119
7211
|
dashboardUrl: i
|
|
7120
7212
|
})
|
|
7121
7213
|
}) : null,
|
|
7122
|
-
S &&
|
|
7214
|
+
S && Oe ? /* @__PURE__ */ Q(rs, {
|
|
7123
7215
|
position: g,
|
|
7124
|
-
items:
|
|
7216
|
+
items: A,
|
|
7125
7217
|
isLoading: ne,
|
|
7126
7218
|
error: ie,
|
|
7127
7219
|
isMarkingAll: oe,
|
|
7128
7220
|
onClose: () => C(!1),
|
|
7129
7221
|
onItemClick: (e) => {
|
|
7130
|
-
C(!1),
|
|
7222
|
+
C(!1), Ue(e);
|
|
7131
7223
|
},
|
|
7132
|
-
onMarkAllRead:
|
|
7224
|
+
onMarkAllRead: We
|
|
7133
7225
|
}) : null,
|
|
7134
|
-
Se.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(
|
|
7135
|
-
|
|
7136
|
-
|
|
7226
|
+
Se.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(fc, { position: g }) : null,
|
|
7227
|
+
Ye ? /* @__PURE__ */ Q(pc, { position: g }) : null,
|
|
7228
|
+
Qe ? /* @__PURE__ */ Q(mc, { position: g }) : null
|
|
7137
7229
|
]
|
|
7138
7230
|
});
|
|
7139
7231
|
}
|
|
7140
|
-
function
|
|
7141
|
-
let t =
|
|
7232
|
+
function fc({ position: e }) {
|
|
7233
|
+
let { mod: t } = Oo();
|
|
7142
7234
|
return /* @__PURE__ */ Q("div", {
|
|
7143
7235
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7144
7236
|
role: "status",
|
|
@@ -7157,7 +7249,7 @@ function sc({ position: e }) {
|
|
|
7157
7249
|
]
|
|
7158
7250
|
});
|
|
7159
7251
|
}
|
|
7160
|
-
function
|
|
7252
|
+
function pc({ position: e }) {
|
|
7161
7253
|
return /* @__PURE__ */ Q("div", {
|
|
7162
7254
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7163
7255
|
role: "status",
|
|
@@ -7165,7 +7257,7 @@ function cc({ position: e }) {
|
|
|
7165
7257
|
children: "Forgotten on this site — your name and email were cleared."
|
|
7166
7258
|
});
|
|
7167
7259
|
}
|
|
7168
|
-
function
|
|
7260
|
+
function mc({ position: e }) {
|
|
7169
7261
|
return /* @__PURE__ */ Q("div", {
|
|
7170
7262
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7171
7263
|
role: "status",
|
|
@@ -7175,48 +7267,48 @@ function lc({ position: e }) {
|
|
|
7175
7267
|
}
|
|
7176
7268
|
//#endregion
|
|
7177
7269
|
//#region src/runtime/mount.tsx
|
|
7178
|
-
function
|
|
7179
|
-
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none",
|
|
7180
|
-
let n =
|
|
7270
|
+
function hc(e, t) {
|
|
7271
|
+
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Oe(e, t.theme ?? "auto");
|
|
7272
|
+
let n = Ne(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
7181
7273
|
i.textContent = pe, r.appendChild(i);
|
|
7182
7274
|
let a = document.createElement("div");
|
|
7183
7275
|
a.className = "markup-shadow-root", r.appendChild(a), xe({
|
|
7184
7276
|
apiUrl: t.apiUrl,
|
|
7185
7277
|
apiKey: t.apiKey,
|
|
7186
|
-
widgetVersion: "1.
|
|
7278
|
+
widgetVersion: "1.16.1"
|
|
7187
7279
|
});
|
|
7188
7280
|
let { theme: o, ...s } = t;
|
|
7189
7281
|
return fe(/* @__PURE__ */ Q(M, {
|
|
7190
7282
|
onError: (e) => N(e, { context: "render" }),
|
|
7191
|
-
children: /* @__PURE__ */ Q(
|
|
7283
|
+
children: /* @__PURE__ */ Q(dc, { ...s })
|
|
7192
7284
|
}), a), () => {
|
|
7193
7285
|
n(), xe(null), fe(null, a);
|
|
7194
7286
|
};
|
|
7195
7287
|
}
|
|
7196
7288
|
//#endregion
|
|
7197
7289
|
//#region src/widget.ts
|
|
7198
|
-
var
|
|
7199
|
-
function
|
|
7290
|
+
var gc = null, _c = null, vc = null, yc = !1;
|
|
7291
|
+
function bc(e) {
|
|
7200
7292
|
if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
|
|
7201
|
-
e.fab != null && !
|
|
7293
|
+
e.fab != null && !yc && (yc = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major — the toolbar replaced the floating action button. Remove it from your config.")), xc();
|
|
7202
7294
|
let t = () => {
|
|
7203
|
-
if (
|
|
7295
|
+
if (vc = null, !document.body) return;
|
|
7204
7296
|
let t = document.createElement("div");
|
|
7205
|
-
t.id = "markup-widget", document.body.appendChild(t),
|
|
7297
|
+
t.id = "markup-widget", document.body.appendChild(t), _c = t, gc = hc(t, e);
|
|
7206
7298
|
};
|
|
7207
7299
|
if (document.readyState === "loading" || !document.body) {
|
|
7208
7300
|
let e = () => t();
|
|
7209
|
-
|
|
7301
|
+
vc = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
|
|
7210
7302
|
} else t();
|
|
7211
|
-
return
|
|
7303
|
+
return xc;
|
|
7212
7304
|
}
|
|
7213
|
-
function
|
|
7214
|
-
|
|
7305
|
+
function xc() {
|
|
7306
|
+
vc &&= (vc(), null), gc &&= (gc(), null), _c?.parentNode && _c.parentNode.removeChild(_c), _c = null;
|
|
7215
7307
|
}
|
|
7216
7308
|
if (typeof document < "u") {
|
|
7217
7309
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
7218
7310
|
if (t && n) {
|
|
7219
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = () =>
|
|
7311
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = () => bc({
|
|
7220
7312
|
apiUrl: t,
|
|
7221
7313
|
apiKey: n,
|
|
7222
7314
|
position: r,
|
|
@@ -7228,6 +7320,6 @@ if (typeof document < "u") {
|
|
|
7228
7320
|
}
|
|
7229
7321
|
}
|
|
7230
7322
|
//#endregion
|
|
7231
|
-
export {
|
|
7323
|
+
export { xc as destroy, bc as init };
|
|
7232
7324
|
|
|
7233
7325
|
//# sourceMappingURL=widget.js.map
|