@pixelmatters/markup 1.0.2 → 1.2.0
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 +24 -15
- package/dist/react.js +570 -429
- package/dist/widget.js +1028 -887
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -66,13 +66,13 @@ function k() {
|
|
|
66
66
|
}
|
|
67
67
|
function A(e, t, n, r, i, a, o, s, c, l, u) {
|
|
68
68
|
var d, f, p, m, _, v, y, b = r && r.__k || g, x = t.length;
|
|
69
|
-
for (c = ee(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || h, p.__i = d, v = re(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref &&
|
|
69
|
+
for (c = ee(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || h, p.__i = d, v = re(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && ce(f.ref, null, p), u.push(p.ref, p.__c || m, p)), _ == null && m != null && (_ = m), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = j(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : m && (c = m.nextSibling), p.__u &= -7);
|
|
70
70
|
return n.__e = _, c;
|
|
71
71
|
}
|
|
72
72
|
function ee(e, t, n, r, i) {
|
|
73
73
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
74
74
|
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] = S(null, o, null, null, null) : v(o) ? o = e.__k[a] = S(C, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = S(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 = M(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;
|
|
75
|
-
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = T(s)),
|
|
75
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = T(s)), le(s, s));
|
|
76
76
|
return r;
|
|
77
77
|
}
|
|
78
78
|
function j(e, t, n, r) {
|
|
@@ -130,7 +130,7 @@ function re(e, t, r, i, a, o, s, c, l, u) {
|
|
|
130
130
|
if (t.constructor !== void 0) return null;
|
|
131
131
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = t.__e = r.__e]), (d = n.__b) && d(t);
|
|
132
132
|
n: if (typeof M == "function") try {
|
|
133
|
-
if (S = t.props, T = M.prototype && M.prototype.render, E = (d = M.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = t.__c = r.__c).__ = f.__E : (T ? t.__c = f = new M(S, D) : (t.__c = f = new w(S, D), f.constructor = M, f.render =
|
|
133
|
+
if (S = t.props, T = M.prototype && M.prototype.render, E = (d = M.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = t.__c = r.__c).__ = f.__E : (T ? t.__c = f = new M(S, D) : (t.__c = f = new w(S, D), f.constructor = M, f.render = ue), E && E.sub(f), f.state ||= {}, f.__n = i, p = f.__d = !0, f.__h = [], f._sb = []), T && f.__s == null && (f.__s = f.state), T && M.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = y({}, f.__s)), y(f.__s, M.getDerivedStateFromProps(S, f.__s))), m = f.props, h = f.state, f.__v = t, p) T && M.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), T && f.componentDidMount != null && f.__h.push(f.componentDidMount);
|
|
134
134
|
else {
|
|
135
135
|
if (T && M.getDerivedStateFromProps == null && S !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(S, D), t.__v == r.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(S, f.__s, D)) {
|
|
136
136
|
t.__v != r.__v && (f.props = S, f.state = f.__s, f.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(e) {
|
|
@@ -158,14 +158,14 @@ function re(e, t, r, i, a, o, s, c, l, u) {
|
|
|
158
158
|
else t.__e = r.__e, t.__k = r.__k, e.then || ie(t);
|
|
159
159
|
n.__e(e, t, r);
|
|
160
160
|
}
|
|
161
|
-
else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e =
|
|
161
|
+
else o == null && t.__v == r.__v ? (t.__k = r.__k, t.__e = r.__e) : c = t.__e = se(r.__e, t, r, i, a, o, s, l, u);
|
|
162
162
|
return (d = n.diffed) && d(t), 128 & t.__u ? void 0 : c;
|
|
163
163
|
}
|
|
164
164
|
function ie(e) {
|
|
165
165
|
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ie));
|
|
166
166
|
}
|
|
167
167
|
function ae(e, t, r) {
|
|
168
|
-
for (var i = 0; i < r.length; i++)
|
|
168
|
+
for (var i = 0; i < r.length; i++) ce(r[i], r[++i], r[++i]);
|
|
169
169
|
n.__c && n.__c(t, e), e.some(function(t) {
|
|
170
170
|
try {
|
|
171
171
|
e = t.__h, t.__h = [], e.some(function(e) {
|
|
@@ -179,7 +179,7 @@ function ae(e, t, r) {
|
|
|
179
179
|
function oe(e) {
|
|
180
180
|
return typeof e != "object" || !e || e.__b > 0 ? e : v(e) ? e.map(oe) : y({}, e);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function se(e, r, i, a, o, s, c, l, u) {
|
|
183
183
|
var d, f, p, m, g, _, y, x = i.props || h, S = r.props, C = r.type;
|
|
184
184
|
if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o ||= "http://www.w3.org/1999/xhtml", s != null) {
|
|
185
185
|
for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
|
|
@@ -202,7 +202,7 @@ function P(e, r, i, a, o, s, c, l, u) {
|
|
|
202
202
|
}
|
|
203
203
|
return e;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ce(e, t, r) {
|
|
206
206
|
try {
|
|
207
207
|
if (typeof e == "function") {
|
|
208
208
|
var i = typeof e.__u == "function";
|
|
@@ -212,9 +212,9 @@ function se(e, t, r) {
|
|
|
212
212
|
n.__e(e, r);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function le(e, t, r) {
|
|
216
216
|
var i, a;
|
|
217
|
-
if (n.unmount && n.unmount(e), (i = e.ref) && (i.current && i.current != e.__e ||
|
|
217
|
+
if (n.unmount && n.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || ce(i, null, t)), (i = e.__c) != null) {
|
|
218
218
|
if (i.componentWillUnmount) try {
|
|
219
219
|
i.componentWillUnmount();
|
|
220
220
|
} catch (e) {
|
|
@@ -222,13 +222,13 @@ function ce(e, t, r) {
|
|
|
222
222
|
}
|
|
223
223
|
i.base = i.__P = null;
|
|
224
224
|
}
|
|
225
|
-
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] &&
|
|
225
|
+
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && le(i[a], t, r || typeof e.type != "function");
|
|
226
226
|
r || b(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function ue(e, t, n) {
|
|
229
229
|
return this.constructor(e, n);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function de(e, r, i) {
|
|
232
232
|
var a, o, s, c;
|
|
233
233
|
r == document && (r = document.documentElement), n.__ && n.__(e, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], re(r, e = (!a && i || r).__k = x(C, null, [e]), o || h, h, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? t.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), ae(s, e, c);
|
|
234
234
|
}
|
|
@@ -249,7 +249,7 @@ t = g.slice, n = { __e: function(e, t, n, r) {
|
|
|
249
249
|
}, k.__r = 0, c = Math.random().toString(8), l = "__d" + c, u = "__a" + c, d = /(PointerCapture)$|Capture$/i, f = 0, p = ne(!1), m = ne(!0);
|
|
250
250
|
//#endregion
|
|
251
251
|
//#region src/styles.css?inline
|
|
252
|
-
var de = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--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-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.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-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.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-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{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 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:320px;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}}@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);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.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{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.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{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.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;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.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)}@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:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, 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:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.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{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.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-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-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.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{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;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:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.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-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-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;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-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-fab,.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}}", fe, F, pe, me, he = 0, ge = [], I = n, _e = I.__b, ve = I.__r, ye = I.diffed, be = I.__c, xe = I.unmount, Se = I.__;
|
|
252
|
+
var fe = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--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-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.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-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.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-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{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 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:320px;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}}@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-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{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.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{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.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;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.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)}@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:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, 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:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.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{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.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-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-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.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{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;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:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.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-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-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;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-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-fab,.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}}", P, F, pe, me, he = 0, ge = [], I = n, _e = I.__b, ve = I.__r, ye = I.diffed, be = I.__c, xe = I.unmount, Se = I.__;
|
|
253
253
|
function Ce(e, t) {
|
|
254
254
|
I.__h && I.__h(F, e, he || t), he = 0;
|
|
255
255
|
var n = F.__H ||= {
|
|
@@ -262,7 +262,7 @@ function L(e) {
|
|
|
262
262
|
return he = 1, we(Me, e);
|
|
263
263
|
}
|
|
264
264
|
function we(e, t, n) {
|
|
265
|
-
var r = Ce(
|
|
265
|
+
var r = Ce(P++, 2);
|
|
266
266
|
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Me(void 0, t), function(e) {
|
|
267
267
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
268
268
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
@@ -296,7 +296,7 @@ function we(e, t, n) {
|
|
|
296
296
|
return r.__N || r.__;
|
|
297
297
|
}
|
|
298
298
|
function R(e, t) {
|
|
299
|
-
var n = Ce(
|
|
299
|
+
var n = Ce(P++, 3);
|
|
300
300
|
!I.__s && je(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
|
|
301
301
|
}
|
|
302
302
|
function z(e) {
|
|
@@ -305,7 +305,7 @@ function z(e) {
|
|
|
305
305
|
}, []);
|
|
306
306
|
}
|
|
307
307
|
function Te(e, t) {
|
|
308
|
-
var n = Ce(
|
|
308
|
+
var n = Ce(P++, 7);
|
|
309
309
|
return je(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
310
310
|
}
|
|
311
311
|
function B(e, t) {
|
|
@@ -328,11 +328,11 @@ I.__b = function(e) {
|
|
|
328
328
|
}, I.__ = function(e, t) {
|
|
329
329
|
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Se && Se(e, t);
|
|
330
330
|
}, I.__r = function(e) {
|
|
331
|
-
ve && ve(e),
|
|
331
|
+
ve && ve(e), P = 0;
|
|
332
332
|
var t = (F = e.__c).__H;
|
|
333
333
|
t && (pe === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
|
|
334
334
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
335
|
-
})) : (t.__h.some(ke), t.__h.some(Ae), t.__h = [],
|
|
335
|
+
})) : (t.__h.some(ke), t.__h.some(Ae), t.__h = [], P = 0)), pe = F;
|
|
336
336
|
}, I.diffed = function(e) {
|
|
337
337
|
ye && ye(e);
|
|
338
338
|
var t = e.__c;
|
|
@@ -2752,14 +2752,22 @@ function Ar(e) {
|
|
|
2752
2752
|
...r.headers ?? {}
|
|
2753
2753
|
}, a = e.getToken?.() ?? null, o = a != null && a.token.length > 0 && a.expiresAt > Date.now();
|
|
2754
2754
|
o && a && (i.authorization = `Bearer ${a.token}`);
|
|
2755
|
-
let s =
|
|
2755
|
+
let s = e.getAnonToken?.() ?? null;
|
|
2756
|
+
s && (i["x-markup-anon-token"] = s);
|
|
2757
|
+
let c = await fetch(`${t}${n}`, {
|
|
2756
2758
|
...r,
|
|
2757
2759
|
headers: i
|
|
2758
|
-
}),
|
|
2759
|
-
if (!
|
|
2760
|
-
return
|
|
2760
|
+
}), l = await c.text(), u = l ? jr(l) : null;
|
|
2761
|
+
if (!c.ok) throw c.status === 401 && o && e.onUnauthorized?.(), new kr((u && typeof u == "object" && "error" in u && typeof u.error == "string" ? u.error : null) ?? `Request failed with ${c.status}`, c.status);
|
|
2762
|
+
return u;
|
|
2761
2763
|
}
|
|
2762
2764
|
return {
|
|
2765
|
+
mintAnonIdentity() {
|
|
2766
|
+
return n("/widget/anon-identity", { method: "POST" });
|
|
2767
|
+
},
|
|
2768
|
+
getSubscriptionToken() {
|
|
2769
|
+
return n("/widget/subscription-token", { method: "POST" });
|
|
2770
|
+
},
|
|
2763
2771
|
getScreenshotUploadUrl() {
|
|
2764
2772
|
return n("/widget/screenshots/upload-url", { method: "POST" });
|
|
2765
2773
|
},
|
|
@@ -2793,11 +2801,8 @@ function Ar(e) {
|
|
|
2793
2801
|
body: JSON.stringify(r)
|
|
2794
2802
|
});
|
|
2795
2803
|
},
|
|
2796
|
-
deleteComment(e, t
|
|
2797
|
-
return n(`/widget/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`, {
|
|
2798
|
-
method: "DELETE",
|
|
2799
|
-
body: JSON.stringify(r)
|
|
2800
|
-
});
|
|
2804
|
+
deleteComment(e, t) {
|
|
2805
|
+
return n(`/widget/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`, { method: "DELETE" });
|
|
2801
2806
|
},
|
|
2802
2807
|
toggleReaction(e, t) {
|
|
2803
2808
|
return n(`/widget/comments/${encodeURIComponent(e)}/reactions`, {
|
|
@@ -2832,20 +2837,26 @@ function Pr(e) {
|
|
|
2832
2837
|
localStorage.setItem(Mr, JSON.stringify(e));
|
|
2833
2838
|
} catch {}
|
|
2834
2839
|
}
|
|
2835
|
-
function Fr() {
|
|
2836
|
-
let e = crypto;
|
|
2837
|
-
if ("randomUUID" in e && typeof e.randomUUID == "function") return e.randomUUID();
|
|
2838
|
-
let t = new Uint8Array(16);
|
|
2839
|
-
e.getRandomValues(t), t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128;
|
|
2840
|
-
let n = Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
2841
|
-
return `${n.slice(0, 8)}-${n.slice(8, 12)}-${n.slice(12, 16)}-${n.slice(16, 20)}-${n.slice(20)}`;
|
|
2842
|
-
}
|
|
2843
2840
|
//#endregion
|
|
2844
2841
|
//#region src/runtime/popup-auth.ts
|
|
2845
|
-
function
|
|
2846
|
-
let n = new URL(e).origin, r
|
|
2847
|
-
|
|
2848
|
-
|
|
2842
|
+
async function Fr(e, t) {
|
|
2843
|
+
let n = new URL(e).origin, r;
|
|
2844
|
+
try {
|
|
2845
|
+
let n = await fetch(`${e.replace(/\/+$/, "")}/widget/popup-exchange`, {
|
|
2846
|
+
method: "POST",
|
|
2847
|
+
headers: {
|
|
2848
|
+
"content-type": "application/json",
|
|
2849
|
+
"x-markup-api-key": t
|
|
2850
|
+
},
|
|
2851
|
+
body: "{}"
|
|
2852
|
+
});
|
|
2853
|
+
if (!n.ok) throw Error(`popup-exchange responded with ${n.status}`);
|
|
2854
|
+
let { code: i } = await n.json(), a = new URL("/widget/auth", e);
|
|
2855
|
+
a.searchParams.set("code", i), r = a.toString();
|
|
2856
|
+
} catch (e) {
|
|
2857
|
+
return Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
|
|
2858
|
+
}
|
|
2859
|
+
let i = Math.max(0, window.screenX + (window.outerWidth - 420) / 2), a = Math.max(0, window.screenY + (window.outerHeight - 560) / 2), o = window.open(r, "markup-auth", `width=420,height=560,left=${i},top=${a}`);
|
|
2849
2860
|
return o ? new Promise((e, t) => {
|
|
2850
2861
|
function r() {
|
|
2851
2862
|
window.removeEventListener("message", i), clearInterval(a);
|
|
@@ -2867,14 +2878,14 @@ function Ir(e, t) {
|
|
|
2867
2878
|
}
|
|
2868
2879
|
//#endregion
|
|
2869
2880
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
|
|
2870
|
-
function
|
|
2881
|
+
function Ir(e, t) {
|
|
2871
2882
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
2872
2883
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
2873
2884
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
2874
2885
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
2875
2886
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
2876
2887
|
}
|
|
2877
|
-
var
|
|
2888
|
+
var Lr = (() => {
|
|
2878
2889
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
2879
2890
|
return () => (e += 1, `u${t()}${e}`);
|
|
2880
2891
|
})();
|
|
@@ -2883,29 +2894,29 @@ function Y(e) {
|
|
|
2883
2894
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
2884
2895
|
return t;
|
|
2885
2896
|
}
|
|
2886
|
-
var
|
|
2887
|
-
function
|
|
2888
|
-
return
|
|
2897
|
+
var Rr = null;
|
|
2898
|
+
function zr(e = {}) {
|
|
2899
|
+
return Rr || (e.includeStyleProperties ? (Rr = e.includeStyleProperties, Rr) : (Rr = Y(window.getComputedStyle(document.documentElement)), Rr));
|
|
2889
2900
|
}
|
|
2890
|
-
function
|
|
2901
|
+
function Br(e, t) {
|
|
2891
2902
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
2892
2903
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
2893
2904
|
}
|
|
2894
|
-
function
|
|
2895
|
-
let t =
|
|
2905
|
+
function Vr(e) {
|
|
2906
|
+
let t = Br(e, "border-left-width"), n = Br(e, "border-right-width");
|
|
2896
2907
|
return e.clientWidth + t + n;
|
|
2897
2908
|
}
|
|
2898
|
-
function
|
|
2899
|
-
let t =
|
|
2909
|
+
function Hr(e) {
|
|
2910
|
+
let t = Br(e, "border-top-width"), n = Br(e, "border-bottom-width");
|
|
2900
2911
|
return e.clientHeight + t + n;
|
|
2901
2912
|
}
|
|
2902
|
-
function
|
|
2913
|
+
function Ur(e, t = {}) {
|
|
2903
2914
|
return {
|
|
2904
|
-
width: t.width ||
|
|
2905
|
-
height: t.height ||
|
|
2915
|
+
width: t.width || Vr(e),
|
|
2916
|
+
height: t.height || Hr(e)
|
|
2906
2917
|
};
|
|
2907
2918
|
}
|
|
2908
|
-
function
|
|
2919
|
+
function Wr() {
|
|
2909
2920
|
let e, t;
|
|
2910
2921
|
try {
|
|
2911
2922
|
t = process;
|
|
@@ -2914,10 +2925,10 @@ function Gr() {
|
|
|
2914
2925
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
2915
2926
|
}
|
|
2916
2927
|
var X = 16384;
|
|
2917
|
-
function
|
|
2928
|
+
function Gr(e) {
|
|
2918
2929
|
(e.width > X || e.height > X) && (e.width > X && e.height > X ? e.width > e.height ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X) : e.width > X ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X));
|
|
2919
2930
|
}
|
|
2920
|
-
function
|
|
2931
|
+
function Kr(e) {
|
|
2921
2932
|
return new Promise((t, n) => {
|
|
2922
2933
|
let r = new Image();
|
|
2923
2934
|
r.onload = () => {
|
|
@@ -2927,12 +2938,12 @@ function qr(e) {
|
|
|
2927
2938
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
2928
2939
|
});
|
|
2929
2940
|
}
|
|
2930
|
-
async function
|
|
2941
|
+
async function qr(e) {
|
|
2931
2942
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2932
2943
|
}
|
|
2933
|
-
async function
|
|
2944
|
+
async function Jr(e, t, n) {
|
|
2934
2945
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
2935
|
-
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),
|
|
2946
|
+
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), qr(i);
|
|
2936
2947
|
}
|
|
2937
2948
|
var Z = (e, t) => {
|
|
2938
2949
|
if (e instanceof t) return !0;
|
|
@@ -2941,66 +2952,66 @@ var Z = (e, t) => {
|
|
|
2941
2952
|
};
|
|
2942
2953
|
//#endregion
|
|
2943
2954
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
|
|
2944
|
-
function
|
|
2955
|
+
function Yr(e) {
|
|
2945
2956
|
let t = e.getPropertyValue("content");
|
|
2946
2957
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
2947
2958
|
}
|
|
2948
|
-
function
|
|
2949
|
-
return
|
|
2959
|
+
function Xr(e, t) {
|
|
2960
|
+
return zr(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
2950
2961
|
}
|
|
2951
|
-
function
|
|
2952
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
2962
|
+
function Zr(e, t, n, r) {
|
|
2963
|
+
let i = `.${e}:${t}`, a = n.cssText ? Yr(n) : Xr(n, r);
|
|
2953
2964
|
return document.createTextNode(`${i}{${a}}`);
|
|
2954
2965
|
}
|
|
2955
|
-
function
|
|
2966
|
+
function Qr(e, t, n, r) {
|
|
2956
2967
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
2957
2968
|
if (a === "" || a === "none") return;
|
|
2958
|
-
let o =
|
|
2969
|
+
let o = Lr();
|
|
2959
2970
|
try {
|
|
2960
2971
|
t.className = `${t.className} ${o}`;
|
|
2961
2972
|
} catch {
|
|
2962
2973
|
return;
|
|
2963
2974
|
}
|
|
2964
2975
|
let s = document.createElement("style");
|
|
2965
|
-
s.appendChild(
|
|
2976
|
+
s.appendChild(Zr(o, n, i, r)), t.appendChild(s);
|
|
2966
2977
|
}
|
|
2967
|
-
function
|
|
2968
|
-
|
|
2978
|
+
function $r(e, t, n) {
|
|
2979
|
+
Qr(e, t, ":before", n), Qr(e, t, ":after", n);
|
|
2969
2980
|
}
|
|
2970
2981
|
//#endregion
|
|
2971
2982
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
|
|
2972
|
-
var
|
|
2973
|
-
woff:
|
|
2974
|
-
woff2:
|
|
2983
|
+
var ei = "application/font-woff", ti = "image/jpeg", ni = {
|
|
2984
|
+
woff: ei,
|
|
2985
|
+
woff2: ei,
|
|
2975
2986
|
ttf: "application/font-truetype",
|
|
2976
2987
|
eot: "application/vnd.ms-fontobject",
|
|
2977
2988
|
png: "image/png",
|
|
2978
|
-
jpg:
|
|
2979
|
-
jpeg:
|
|
2989
|
+
jpg: ti,
|
|
2990
|
+
jpeg: ti,
|
|
2980
2991
|
gif: "image/gif",
|
|
2981
2992
|
tiff: "image/tiff",
|
|
2982
2993
|
svg: "image/svg+xml",
|
|
2983
2994
|
webp: "image/webp"
|
|
2984
2995
|
};
|
|
2985
|
-
function
|
|
2996
|
+
function ri(e) {
|
|
2986
2997
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
2987
2998
|
return t ? t[1] : "";
|
|
2988
2999
|
}
|
|
2989
|
-
function
|
|
2990
|
-
return ri
|
|
3000
|
+
function ii(e) {
|
|
3001
|
+
return ni[ri(e).toLowerCase()] || "";
|
|
2991
3002
|
}
|
|
2992
3003
|
//#endregion
|
|
2993
3004
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
|
|
2994
|
-
function
|
|
3005
|
+
function ai(e) {
|
|
2995
3006
|
return e.split(/,/)[1];
|
|
2996
3007
|
}
|
|
2997
|
-
function
|
|
3008
|
+
function oi(e) {
|
|
2998
3009
|
return e.search(/^(data:)/) !== -1;
|
|
2999
3010
|
}
|
|
3000
|
-
function
|
|
3011
|
+
function si(e, t) {
|
|
3001
3012
|
return `data:${t};base64,${e}`;
|
|
3002
3013
|
}
|
|
3003
|
-
async function
|
|
3014
|
+
async function ci(e, t, n) {
|
|
3004
3015
|
let r = await fetch(e, t);
|
|
3005
3016
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
3006
3017
|
let i = await r.blob();
|
|
@@ -3018,78 +3029,78 @@ async function li(e, t, n) {
|
|
|
3018
3029
|
}, a.readAsDataURL(i);
|
|
3019
3030
|
});
|
|
3020
3031
|
}
|
|
3021
|
-
var
|
|
3022
|
-
function
|
|
3032
|
+
var li = {};
|
|
3033
|
+
function ui(e, t, n) {
|
|
3023
3034
|
let r = e.replace(/\?.*/, "");
|
|
3024
3035
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
3025
3036
|
}
|
|
3026
|
-
async function
|
|
3027
|
-
let r =
|
|
3028
|
-
if (
|
|
3037
|
+
async function di(e, t, n) {
|
|
3038
|
+
let r = ui(e, t, n.includeQueryParams);
|
|
3039
|
+
if (li[r] != null) return li[r];
|
|
3029
3040
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
3030
3041
|
let i;
|
|
3031
3042
|
try {
|
|
3032
|
-
i =
|
|
3043
|
+
i = si(await ci(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", ai(n))), t);
|
|
3033
3044
|
} catch (t) {
|
|
3034
3045
|
i = n.imagePlaceholder || "";
|
|
3035
3046
|
let r = `Failed to fetch resource: ${e}`;
|
|
3036
3047
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
3037
3048
|
}
|
|
3038
|
-
return
|
|
3049
|
+
return li[r] = i, i;
|
|
3039
3050
|
}
|
|
3040
3051
|
//#endregion
|
|
3041
3052
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
|
|
3042
|
-
async function
|
|
3053
|
+
async function fi(e) {
|
|
3043
3054
|
let t = e.toDataURL();
|
|
3044
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
3055
|
+
return t === "data:," ? e.cloneNode(!1) : Kr(t);
|
|
3045
3056
|
}
|
|
3046
|
-
async function
|
|
3057
|
+
async function pi(e, t) {
|
|
3047
3058
|
if (e.currentSrc) {
|
|
3048
3059
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
3049
|
-
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height),
|
|
3060
|
+
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Kr(t.toDataURL());
|
|
3050
3061
|
}
|
|
3051
3062
|
let n = e.poster;
|
|
3052
|
-
return
|
|
3063
|
+
return Kr(await di(n, ii(n), t));
|
|
3053
3064
|
}
|
|
3054
|
-
async function
|
|
3065
|
+
async function mi(e, t) {
|
|
3055
3066
|
try {
|
|
3056
|
-
if (e?.contentDocument?.body) return await
|
|
3067
|
+
if (e?.contentDocument?.body) return await wi(e.contentDocument.body, t, !0);
|
|
3057
3068
|
} catch {}
|
|
3058
3069
|
return e.cloneNode(!1);
|
|
3059
3070
|
}
|
|
3060
|
-
async function
|
|
3061
|
-
return Z(e, HTMLCanvasElement) ?
|
|
3071
|
+
async function hi(e, t) {
|
|
3072
|
+
return Z(e, HTMLCanvasElement) ? fi(e) : Z(e, HTMLVideoElement) ? pi(e, t) : Z(e, HTMLIFrameElement) ? mi(e, t) : e.cloneNode(_i(e));
|
|
3062
3073
|
}
|
|
3063
|
-
var
|
|
3064
|
-
async function
|
|
3065
|
-
if (
|
|
3074
|
+
var gi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", _i = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3075
|
+
async function vi(e, t, n) {
|
|
3076
|
+
if (_i(t)) return t;
|
|
3066
3077
|
let r = [];
|
|
3067
|
-
return r =
|
|
3078
|
+
return r = gi(e) && e.assignedNodes ? Y(e.assignedNodes()) : Z(e, HTMLIFrameElement) && e.contentDocument?.body ? Y(e.contentDocument.body.childNodes) : Y((e.shadowRoot ?? e).childNodes), r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => wi(r, n)).then((e) => {
|
|
3068
3079
|
e && t.appendChild(e);
|
|
3069
3080
|
}), Promise.resolve()), t;
|
|
3070
3081
|
}
|
|
3071
|
-
function
|
|
3082
|
+
function yi(e, t, n) {
|
|
3072
3083
|
let r = t.style;
|
|
3073
3084
|
if (!r) return;
|
|
3074
3085
|
let i = window.getComputedStyle(e);
|
|
3075
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3086
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : zr(n).forEach((n) => {
|
|
3076
3087
|
let a = i.getPropertyValue(n);
|
|
3077
3088
|
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), Z(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));
|
|
3078
3089
|
});
|
|
3079
3090
|
}
|
|
3080
|
-
function
|
|
3091
|
+
function bi(e, t) {
|
|
3081
3092
|
Z(e, HTMLTextAreaElement) && (t.innerHTML = e.value), Z(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
3082
3093
|
}
|
|
3083
|
-
function
|
|
3094
|
+
function xi(e, t) {
|
|
3084
3095
|
if (Z(e, HTMLSelectElement)) {
|
|
3085
3096
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
3086
3097
|
r && r.setAttribute("selected", "");
|
|
3087
3098
|
}
|
|
3088
3099
|
}
|
|
3089
|
-
function
|
|
3090
|
-
return Z(t, Element) && (
|
|
3100
|
+
function Si(e, t, n) {
|
|
3101
|
+
return Z(t, Element) && (yi(e, t, n), $r(e, t, n), bi(e, t), xi(e, t)), t;
|
|
3091
3102
|
}
|
|
3092
|
-
async function
|
|
3103
|
+
async function Ci(e, t) {
|
|
3093
3104
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
3094
3105
|
if (n.length === 0) return e;
|
|
3095
3106
|
let r = {};
|
|
@@ -3097,7 +3108,7 @@ async function wi(e, t) {
|
|
|
3097
3108
|
let a = n[i].getAttribute("xlink:href");
|
|
3098
3109
|
if (a) {
|
|
3099
3110
|
let n = e.querySelector(a), i = document.querySelector(a);
|
|
3100
|
-
!n && i && !r[a] && (r[a] = await
|
|
3111
|
+
!n && i && !r[a] && (r[a] = await wi(i, t, !0));
|
|
3101
3112
|
}
|
|
3102
3113
|
}
|
|
3103
3114
|
let i = Object.values(r);
|
|
@@ -3111,61 +3122,61 @@ async function wi(e, t) {
|
|
|
3111
3122
|
}
|
|
3112
3123
|
return e;
|
|
3113
3124
|
}
|
|
3114
|
-
async function
|
|
3115
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3125
|
+
async function wi(e, t, n) {
|
|
3126
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => hi(e, t)).then((n) => vi(e, n, t)).then((n) => Si(e, n, t)).then((e) => Ci(e, t));
|
|
3116
3127
|
}
|
|
3117
3128
|
//#endregion
|
|
3118
3129
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
|
|
3119
|
-
var
|
|
3120
|
-
function
|
|
3130
|
+
var Ti = /url\((['"]?)([^'"]+?)\1\)/g, Ei = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Di = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3131
|
+
function Oi(e) {
|
|
3121
3132
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3122
3133
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3123
3134
|
}
|
|
3124
|
-
function
|
|
3135
|
+
function ki(e) {
|
|
3125
3136
|
let t = [];
|
|
3126
|
-
return e.replace(
|
|
3137
|
+
return e.replace(Ti, (e, n, r) => (t.push(r), e)), t.filter((e) => !oi(e));
|
|
3127
3138
|
}
|
|
3128
|
-
async function
|
|
3139
|
+
async function Ai(e, t, n, r, i) {
|
|
3129
3140
|
try {
|
|
3130
|
-
let a = n ?
|
|
3131
|
-
return s = i ?
|
|
3141
|
+
let a = n ? Ir(t, n) : t, o = ii(t), s;
|
|
3142
|
+
return s = i ? si(await i(a), o) : await di(a, o, r), e.replace(Oi(t), `$1${s}$3`);
|
|
3132
3143
|
} catch {}
|
|
3133
3144
|
return e;
|
|
3134
3145
|
}
|
|
3135
|
-
function
|
|
3136
|
-
return t ? e.replace(
|
|
3146
|
+
function ji(e, { preferredFontFormat: t }) {
|
|
3147
|
+
return t ? e.replace(Di, (e) => {
|
|
3137
3148
|
for (;;) {
|
|
3138
|
-
let [n, , r] =
|
|
3149
|
+
let [n, , r] = Ei.exec(e) || [];
|
|
3139
3150
|
if (!r) return "";
|
|
3140
3151
|
if (r === t) return `src: ${n};`;
|
|
3141
3152
|
}
|
|
3142
3153
|
}) : e;
|
|
3143
3154
|
}
|
|
3144
|
-
function
|
|
3145
|
-
return e.search(
|
|
3155
|
+
function Mi(e) {
|
|
3156
|
+
return e.search(Ti) !== -1;
|
|
3146
3157
|
}
|
|
3147
|
-
async function
|
|
3148
|
-
if (!
|
|
3149
|
-
let r =
|
|
3150
|
-
return
|
|
3158
|
+
async function Ni(e, t, n) {
|
|
3159
|
+
if (!Mi(e)) return e;
|
|
3160
|
+
let r = ji(e, n);
|
|
3161
|
+
return ki(r).reduce((e, r) => e.then((e) => Ai(e, r, t, n)), Promise.resolve(r));
|
|
3151
3162
|
}
|
|
3152
3163
|
//#endregion
|
|
3153
3164
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
|
|
3154
|
-
async function
|
|
3165
|
+
async function Pi(e, t, n) {
|
|
3155
3166
|
let r = t.style?.getPropertyValue(e);
|
|
3156
3167
|
if (r) {
|
|
3157
|
-
let i = await
|
|
3168
|
+
let i = await Ni(r, null, n);
|
|
3158
3169
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3159
3170
|
}
|
|
3160
3171
|
return !1;
|
|
3161
3172
|
}
|
|
3162
|
-
async function
|
|
3163
|
-
await
|
|
3173
|
+
async function Fi(e, t) {
|
|
3174
|
+
await Pi("background", e, t) || await Pi("background-image", e, t), await Pi("mask", e, t) || await Pi("-webkit-mask", e, t) || await Pi("mask-image", e, t) || await Pi("-webkit-mask-image", e, t);
|
|
3164
3175
|
}
|
|
3165
|
-
async function
|
|
3176
|
+
async function Ii(e, t) {
|
|
3166
3177
|
let n = Z(e, HTMLImageElement);
|
|
3167
|
-
if (!(n && !
|
|
3168
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3178
|
+
if (!(n && !oi(e.src)) && !(Z(e, SVGImageElement) && !oi(e.href.baseVal))) return;
|
|
3179
|
+
let r = n ? e.src : e.href.baseVal, i = await di(r, ii(r), t);
|
|
3169
3180
|
await new Promise((r, a) => {
|
|
3170
3181
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3171
3182
|
try {
|
|
@@ -3178,16 +3189,16 @@ async function Li(e, t) {
|
|
|
3178
3189
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3179
3190
|
});
|
|
3180
3191
|
}
|
|
3181
|
-
async function
|
|
3182
|
-
let n = Y(e.childNodes).map((e) =>
|
|
3192
|
+
async function Li(e, t) {
|
|
3193
|
+
let n = Y(e.childNodes).map((e) => Ri(e, t));
|
|
3183
3194
|
await Promise.all(n).then(() => e);
|
|
3184
3195
|
}
|
|
3185
|
-
async function
|
|
3186
|
-
Z(e, Element) && (await
|
|
3196
|
+
async function Ri(e, t) {
|
|
3197
|
+
Z(e, Element) && (await Fi(e, t), await Ii(e, t), await Li(e, t));
|
|
3187
3198
|
}
|
|
3188
3199
|
//#endregion
|
|
3189
3200
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
|
|
3190
|
-
function
|
|
3201
|
+
function zi(e, t) {
|
|
3191
3202
|
let { style: n } = e;
|
|
3192
3203
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3193
3204
|
let r = t.style;
|
|
@@ -3197,22 +3208,22 @@ function Bi(e, t) {
|
|
|
3197
3208
|
}
|
|
3198
3209
|
//#endregion
|
|
3199
3210
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
|
|
3200
|
-
var
|
|
3201
|
-
async function
|
|
3202
|
-
let t =
|
|
3211
|
+
var Bi = {};
|
|
3212
|
+
async function Vi(e) {
|
|
3213
|
+
let t = Bi[e];
|
|
3203
3214
|
return t ?? (t = {
|
|
3204
3215
|
url: e,
|
|
3205
3216
|
cssText: await (await fetch(e)).text()
|
|
3206
|
-
},
|
|
3217
|
+
}, Bi[e] = t, t);
|
|
3207
3218
|
}
|
|
3208
|
-
async function
|
|
3219
|
+
async function Hi(e, t) {
|
|
3209
3220
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3210
3221
|
let a = i.replace(r, "$1");
|
|
3211
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3222
|
+
return a.startsWith("https://") || (a = new URL(a, e.url).href), ci(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
|
|
3212
3223
|
});
|
|
3213
3224
|
return Promise.all(i).then(() => n);
|
|
3214
3225
|
}
|
|
3215
|
-
function
|
|
3226
|
+
function Ui(e) {
|
|
3216
3227
|
if (e == null) return [];
|
|
3217
3228
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3218
3229
|
for (;;) {
|
|
@@ -3232,13 +3243,13 @@ function Wi(e) {
|
|
|
3232
3243
|
}
|
|
3233
3244
|
return t;
|
|
3234
3245
|
}
|
|
3235
|
-
async function
|
|
3246
|
+
async function Wi(e, t) {
|
|
3236
3247
|
let n = [], r = [];
|
|
3237
3248
|
return e.forEach((n) => {
|
|
3238
3249
|
if ("cssRules" in n) try {
|
|
3239
3250
|
Y(n.cssRules || []).forEach((e, i) => {
|
|
3240
3251
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3241
|
-
let a = i + 1, o = e.href, s =
|
|
3252
|
+
let a = i + 1, o = e.href, s = Vi(o).then((e) => Hi(e, t)).then((e) => Ui(e).forEach((e) => {
|
|
3242
3253
|
try {
|
|
3243
3254
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3244
3255
|
} catch (t) {
|
|
@@ -3255,7 +3266,7 @@ async function Gi(e, t) {
|
|
|
3255
3266
|
});
|
|
3256
3267
|
} catch (i) {
|
|
3257
3268
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3258
|
-
n.href != null && r.push(
|
|
3269
|
+
n.href != null && r.push(Vi(n.href).then((e) => Hi(e, t)).then((e) => Ui(e).forEach((e) => {
|
|
3259
3270
|
a.insertRule(e, a.cssRules.length);
|
|
3260
3271
|
})).catch((e) => {
|
|
3261
3272
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3271,36 +3282,36 @@ async function Gi(e, t) {
|
|
|
3271
3282
|
}
|
|
3272
3283
|
}), n));
|
|
3273
3284
|
}
|
|
3274
|
-
function
|
|
3275
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
3285
|
+
function Gi(e) {
|
|
3286
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Mi(e.style.getPropertyValue("src")));
|
|
3276
3287
|
}
|
|
3277
|
-
async function
|
|
3288
|
+
async function Ki(e, t) {
|
|
3278
3289
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3279
|
-
return
|
|
3290
|
+
return Gi(await Wi(Y(e.ownerDocument.styleSheets), t));
|
|
3280
3291
|
}
|
|
3281
|
-
function
|
|
3292
|
+
function qi(e) {
|
|
3282
3293
|
return e.trim().replace(/["']/g, "");
|
|
3283
3294
|
}
|
|
3284
|
-
function
|
|
3295
|
+
function Ji(e) {
|
|
3285
3296
|
let t = /* @__PURE__ */ new Set();
|
|
3286
3297
|
function n(e) {
|
|
3287
3298
|
(e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
|
|
3288
|
-
t.add(
|
|
3299
|
+
t.add(qi(e));
|
|
3289
3300
|
}), Array.from(e.children).forEach((e) => {
|
|
3290
3301
|
e instanceof HTMLElement && n(e);
|
|
3291
3302
|
});
|
|
3292
3303
|
}
|
|
3293
3304
|
return n(e), t;
|
|
3294
3305
|
}
|
|
3295
|
-
async function
|
|
3296
|
-
let n = await
|
|
3297
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
3306
|
+
async function Yi(e, t) {
|
|
3307
|
+
let n = await Ki(e, t), r = Ji(e);
|
|
3308
|
+
return (await Promise.all(n.filter((e) => r.has(qi(e.style.fontFamily))).map((e) => {
|
|
3298
3309
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
3299
|
-
return
|
|
3310
|
+
return Ni(e.cssText, n, t);
|
|
3300
3311
|
}))).join("\n");
|
|
3301
3312
|
}
|
|
3302
|
-
async function
|
|
3303
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
3313
|
+
async function Xi(e, t) {
|
|
3314
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await Yi(e, t) : t.fontEmbedCSS;
|
|
3304
3315
|
if (n) {
|
|
3305
3316
|
let t = document.createElement("style"), r = document.createTextNode(n);
|
|
3306
3317
|
t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -3308,23 +3319,23 @@ async function Zi(e, t) {
|
|
|
3308
3319
|
}
|
|
3309
3320
|
//#endregion
|
|
3310
3321
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
|
|
3311
|
-
async function
|
|
3312
|
-
let { width: n, height: r } =
|
|
3313
|
-
return await
|
|
3322
|
+
async function Zi(e, t = {}) {
|
|
3323
|
+
let { width: n, height: r } = Ur(e, t), i = await wi(e, t, !0);
|
|
3324
|
+
return await Xi(i, t), await Ri(i, t), zi(i, t), await Jr(i, n, r);
|
|
3314
3325
|
}
|
|
3315
|
-
async function
|
|
3316
|
-
let { width: n, height: r } =
|
|
3317
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
3326
|
+
async function Qi(e, t = {}) {
|
|
3327
|
+
let { width: n, height: r } = Ur(e, t), i = await Kr(await Zi(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Wr(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
3328
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || Gr(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;
|
|
3318
3329
|
}
|
|
3319
3330
|
//#endregion
|
|
3320
3331
|
//#region src/runtime/screenshot.ts
|
|
3321
|
-
var
|
|
3322
|
-
async function
|
|
3332
|
+
var $i = 2 * 1024 * 1024;
|
|
3333
|
+
async function ea(e, t) {
|
|
3323
3334
|
try {
|
|
3324
3335
|
function n(t) {
|
|
3325
3336
|
return !(e && (t === e || e.contains(t)));
|
|
3326
3337
|
}
|
|
3327
|
-
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = await
|
|
3338
|
+
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = await Qi(document.documentElement, {
|
|
3328
3339
|
width: r,
|
|
3329
3340
|
height: i,
|
|
3330
3341
|
cacheBust: !0,
|
|
@@ -3338,21 +3349,21 @@ async function ta(e, t) {
|
|
|
3338
3349
|
});
|
|
3339
3350
|
if (t) {
|
|
3340
3351
|
let e = o.getContext("2d");
|
|
3341
|
-
e &&
|
|
3352
|
+
e && na(e, t.x, t.y, a);
|
|
3342
3353
|
}
|
|
3343
|
-
let s = await
|
|
3354
|
+
let s = await ta(o, .85);
|
|
3344
3355
|
if (!s) return null;
|
|
3345
|
-
if (s.size <=
|
|
3346
|
-
let c = await
|
|
3347
|
-
return !c || c.size >
|
|
3356
|
+
if (s.size <= $i) return s;
|
|
3357
|
+
let c = await ta(o, .5);
|
|
3358
|
+
return !c || c.size > $i ? null : c;
|
|
3348
3359
|
} catch {
|
|
3349
3360
|
return null;
|
|
3350
3361
|
}
|
|
3351
3362
|
}
|
|
3352
|
-
function
|
|
3363
|
+
function ta(e, t) {
|
|
3353
3364
|
return new Promise((n) => e.toBlob(n, "image/jpeg", t));
|
|
3354
3365
|
}
|
|
3355
|
-
function
|
|
3366
|
+
function na(e, t, n, r) {
|
|
3356
3367
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
3357
3368
|
e.save(), e.translate(s, c), e.rotate(-Math.PI / 4);
|
|
3358
3369
|
let l = 2 * i;
|
|
@@ -3375,7 +3386,7 @@ function Q(...e) {
|
|
|
3375
3386
|
}
|
|
3376
3387
|
//#endregion
|
|
3377
3388
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
3378
|
-
var
|
|
3389
|
+
var ra = 0;
|
|
3379
3390
|
Array.isArray;
|
|
3380
3391
|
function $(e, t, r, i, a, o) {
|
|
3381
3392
|
t ||= {};
|
|
@@ -3392,7 +3403,7 @@ function $(e, t, r, i, a, o) {
|
|
|
3392
3403
|
__e: null,
|
|
3393
3404
|
__c: null,
|
|
3394
3405
|
constructor: void 0,
|
|
3395
|
-
__v: --
|
|
3406
|
+
__v: --ra,
|
|
3396
3407
|
__i: -1,
|
|
3397
3408
|
__u: 0,
|
|
3398
3409
|
__source: a,
|
|
@@ -3403,7 +3414,7 @@ function $(e, t, r, i, a, o) {
|
|
|
3403
3414
|
}
|
|
3404
3415
|
//#endregion
|
|
3405
3416
|
//#region src/runtime/ui/icons.tsx
|
|
3406
|
-
function
|
|
3417
|
+
function ia({ size: e = 16 }) {
|
|
3407
3418
|
return /* @__PURE__ */ $("svg", {
|
|
3408
3419
|
width: e,
|
|
3409
3420
|
height: e,
|
|
@@ -3413,7 +3424,7 @@ function aa({ size: e = 16 }) {
|
|
|
3413
3424
|
children: /* @__PURE__ */ $("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" })
|
|
3414
3425
|
});
|
|
3415
3426
|
}
|
|
3416
|
-
function
|
|
3427
|
+
function aa({ size: e = 16 }) {
|
|
3417
3428
|
return /* @__PURE__ */ $("svg", {
|
|
3418
3429
|
width: e,
|
|
3419
3430
|
height: e,
|
|
@@ -3422,7 +3433,7 @@ function oa({ size: e = 16 }) {
|
|
|
3422
3433
|
children: /* @__PURE__ */ $("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" })
|
|
3423
3434
|
});
|
|
3424
3435
|
}
|
|
3425
|
-
function
|
|
3436
|
+
function oa({ size: e = 16 }) {
|
|
3426
3437
|
return /* @__PURE__ */ $("svg", {
|
|
3427
3438
|
width: e,
|
|
3428
3439
|
height: e,
|
|
@@ -3431,7 +3442,7 @@ function sa({ size: e = 16 }) {
|
|
|
3431
3442
|
children: /* @__PURE__ */ $("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" })
|
|
3432
3443
|
});
|
|
3433
3444
|
}
|
|
3434
|
-
function
|
|
3445
|
+
function sa({ size: e = 16 }) {
|
|
3435
3446
|
return /* @__PURE__ */ $("svg", {
|
|
3436
3447
|
width: e,
|
|
3437
3448
|
height: e,
|
|
@@ -3444,7 +3455,7 @@ function ca({ size: e = 16 }) {
|
|
|
3444
3455
|
})
|
|
3445
3456
|
});
|
|
3446
3457
|
}
|
|
3447
|
-
function
|
|
3458
|
+
function ca({ size: e = 16 }) {
|
|
3448
3459
|
return /* @__PURE__ */ $("svg", {
|
|
3449
3460
|
width: e,
|
|
3450
3461
|
height: e,
|
|
@@ -3458,7 +3469,7 @@ function la({ size: e = 16 }) {
|
|
|
3458
3469
|
})
|
|
3459
3470
|
});
|
|
3460
3471
|
}
|
|
3461
|
-
function
|
|
3472
|
+
function la({ size: e = 16 }) {
|
|
3462
3473
|
return /* @__PURE__ */ $("svg", {
|
|
3463
3474
|
width: e,
|
|
3464
3475
|
height: e,
|
|
@@ -3467,7 +3478,7 @@ function ua({ size: e = 16 }) {
|
|
|
3467
3478
|
children: /* @__PURE__ */ $("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" })
|
|
3468
3479
|
});
|
|
3469
3480
|
}
|
|
3470
|
-
function
|
|
3481
|
+
function ua({ size: e = 16 }) {
|
|
3471
3482
|
return /* @__PURE__ */ $("svg", {
|
|
3472
3483
|
width: e,
|
|
3473
3484
|
height: e,
|
|
@@ -3479,31 +3490,76 @@ function da({ size: e = 16 }) {
|
|
|
3479
3490
|
}
|
|
3480
3491
|
//#endregion
|
|
3481
3492
|
//#region src/runtime/ui/fab.tsx
|
|
3482
|
-
function
|
|
3493
|
+
function da({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i }) {
|
|
3494
|
+
let a = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", o = z(null), [s, c] = L(null), [l, u] = L(!1), d = z(!1);
|
|
3495
|
+
function f(e) {
|
|
3496
|
+
if (e.stopPropagation(), e.button !== 0) return;
|
|
3497
|
+
let t = o.current;
|
|
3498
|
+
if (!t) return;
|
|
3499
|
+
let n = t, a = n.getBoundingClientRect(), s = e.clientX, l = e.clientY, f = a.left, p = a.top, m = a.width, h = a.height, g = !1;
|
|
3500
|
+
d.current = !1;
|
|
3501
|
+
try {
|
|
3502
|
+
n.setPointerCapture(e.pointerId);
|
|
3503
|
+
} catch {}
|
|
3504
|
+
function _(e) {
|
|
3505
|
+
let t = e.clientX - s, n = e.clientY - l;
|
|
3506
|
+
if (!g) {
|
|
3507
|
+
if (Math.abs(t) + Math.abs(n) < 4) return;
|
|
3508
|
+
g = !0, d.current = !0, u(!0);
|
|
3509
|
+
}
|
|
3510
|
+
let r = Math.max(8, window.innerWidth - m - 8), i = Math.max(8, window.innerHeight - h - 8);
|
|
3511
|
+
c({
|
|
3512
|
+
left: fa(f + t, 8, r),
|
|
3513
|
+
top: fa(p + n, 8, i)
|
|
3514
|
+
});
|
|
3515
|
+
}
|
|
3516
|
+
function v(e) {
|
|
3517
|
+
try {
|
|
3518
|
+
n.releasePointerCapture(e.pointerId);
|
|
3519
|
+
} catch {}
|
|
3520
|
+
if (n.removeEventListener("pointermove", _), n.removeEventListener("pointerup", v), n.removeEventListener("pointercancel", v), g) {
|
|
3521
|
+
let t = e.clientX < window.innerWidth / 2 ? "bottom-left" : "bottom-right";
|
|
3522
|
+
t !== r && i?.(t);
|
|
3523
|
+
}
|
|
3524
|
+
c(null), u(!1);
|
|
3525
|
+
}
|
|
3526
|
+
n.addEventListener("pointermove", _), n.addEventListener("pointerup", v), n.addEventListener("pointercancel", v);
|
|
3527
|
+
}
|
|
3528
|
+
function p(e) {
|
|
3529
|
+
if (e.preventDefault(), e.stopPropagation(), d.current) {
|
|
3530
|
+
d.current = !1;
|
|
3531
|
+
return;
|
|
3532
|
+
}
|
|
3533
|
+
if ((e.metaKey || e.ctrlKey) && n) {
|
|
3534
|
+
n();
|
|
3535
|
+
return;
|
|
3536
|
+
}
|
|
3537
|
+
t();
|
|
3538
|
+
}
|
|
3483
3539
|
return /* @__PURE__ */ $("button", {
|
|
3540
|
+
ref: o,
|
|
3484
3541
|
type: "button",
|
|
3485
|
-
class: Q("markup-fab",
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
},
|
|
3493
|
-
onPointerDown: (e) => {
|
|
3494
|
-
e.preventDefault(), e.stopPropagation();
|
|
3495
|
-
},
|
|
3542
|
+
class: Q("markup-fab", !s && a, s && "is-floating", l && "is-dragging", e && "is-active"),
|
|
3543
|
+
style: s ? {
|
|
3544
|
+
left: `${s.left}px`,
|
|
3545
|
+
top: `${s.top}px`
|
|
3546
|
+
} : void 0,
|
|
3547
|
+
onClick: p,
|
|
3548
|
+
onPointerDown: f,
|
|
3496
3549
|
"aria-label": e ? "Cancel placing markup" : "Leave a markup",
|
|
3497
3550
|
"aria-pressed": e,
|
|
3498
3551
|
children: [/* @__PURE__ */ $("span", {
|
|
3499
3552
|
class: "markup-fab-icon",
|
|
3500
|
-
children: $(e ?
|
|
3553
|
+
children: $(e ? aa : ia, { size: 16 })
|
|
3501
3554
|
}), /* @__PURE__ */ $("span", {
|
|
3502
3555
|
class: "markup-fab-label",
|
|
3503
3556
|
children: e ? "Cancel" : "Markup"
|
|
3504
3557
|
})]
|
|
3505
3558
|
});
|
|
3506
3559
|
}
|
|
3560
|
+
function fa(e, t, n) {
|
|
3561
|
+
return Math.max(t, Math.min(n, e));
|
|
3562
|
+
}
|
|
3507
3563
|
//#endregion
|
|
3508
3564
|
//#region src/runtime/use-focus-trap.ts
|
|
3509
3565
|
var pa = [
|
|
@@ -3631,7 +3687,7 @@ function _a({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3631
3687
|
"aria-label": i ? "Sending…" : n,
|
|
3632
3688
|
title: i ? "Sending…" : n,
|
|
3633
3689
|
tabIndex: e,
|
|
3634
|
-
children: /* @__PURE__ */ $(
|
|
3690
|
+
children: /* @__PURE__ */ $(la, { size: 14 })
|
|
3635
3691
|
});
|
|
3636
3692
|
}
|
|
3637
3693
|
return /* @__PURE__ */ $("form", {
|
|
@@ -3683,7 +3739,7 @@ function _a({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3683
3739
|
function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, error: a, screenshot: o, screenshotCapturing: s, onAuthor: c, onSignIn: l, onSubmit: u, onClose: d }) {
|
|
3684
3740
|
let f = z(null);
|
|
3685
3741
|
ma(f, !0);
|
|
3686
|
-
let [p, m] = L(!1), [h, g] = L(null);
|
|
3742
|
+
let [p, m] = L(!1), [h, g] = L(null), [_, v] = L(null), [y, b] = L(!1);
|
|
3687
3743
|
R(() => {
|
|
3688
3744
|
if (!o) return;
|
|
3689
3745
|
let e = URL.createObjectURL(o);
|
|
@@ -3699,19 +3755,48 @@ function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3699
3755
|
}
|
|
3700
3756
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3701
3757
|
}, [d]);
|
|
3702
|
-
let
|
|
3758
|
+
let x = ya(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), S = ya(t - window.scrollY - 16, 12, window.innerHeight - 220), C = o != null, w = s || C;
|
|
3759
|
+
function T(e) {
|
|
3760
|
+
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
3761
|
+
let t = f.current;
|
|
3762
|
+
if (!t) return;
|
|
3763
|
+
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
3764
|
+
try {
|
|
3765
|
+
l.setPointerCapture(e.pointerId);
|
|
3766
|
+
} catch {}
|
|
3767
|
+
function d(e) {
|
|
3768
|
+
let t = e.clientX - r, n = e.clientY - i;
|
|
3769
|
+
if (!u) {
|
|
3770
|
+
if (Math.abs(t) + Math.abs(n) < 4) return;
|
|
3771
|
+
u = !0, b(!0);
|
|
3772
|
+
}
|
|
3773
|
+
let l = Math.max(8, window.innerWidth - s - 8), d = Math.max(8, window.innerHeight - c - 8);
|
|
3774
|
+
v({
|
|
3775
|
+
left: ya(a + t, 8, l),
|
|
3776
|
+
top: ya(o + n, 8, d)
|
|
3777
|
+
});
|
|
3778
|
+
}
|
|
3779
|
+
function p(e) {
|
|
3780
|
+
try {
|
|
3781
|
+
l.releasePointerCapture(e.pointerId);
|
|
3782
|
+
} catch {}
|
|
3783
|
+
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", p), l.removeEventListener("pointercancel", p), b(!1);
|
|
3784
|
+
}
|
|
3785
|
+
l.addEventListener("pointermove", d), l.addEventListener("pointerup", p), l.addEventListener("pointercancel", p);
|
|
3786
|
+
}
|
|
3703
3787
|
return /* @__PURE__ */ $("div", {
|
|
3704
3788
|
ref: f,
|
|
3705
|
-
class: "markup-popover",
|
|
3789
|
+
class: Q("markup-popover", _ && "is-floating", y && "is-dragging"),
|
|
3706
3790
|
popover: "auto",
|
|
3707
3791
|
style: {
|
|
3708
|
-
"--markup-pop-x": `${_}px`,
|
|
3709
|
-
"--markup-pop-y": `${
|
|
3792
|
+
"--markup-pop-x": `${_?.left ?? x}px`,
|
|
3793
|
+
"--markup-pop-y": `${_?.top ?? S}px`
|
|
3710
3794
|
},
|
|
3711
3795
|
role: "dialog",
|
|
3712
3796
|
"aria-label": "New markup",
|
|
3713
3797
|
children: [/* @__PURE__ */ $("header", {
|
|
3714
3798
|
class: "markup-popover-header",
|
|
3799
|
+
onPointerDown: T,
|
|
3715
3800
|
children: [/* @__PURE__ */ $("span", {
|
|
3716
3801
|
class: "markup-eyebrow",
|
|
3717
3802
|
children: "new · markup"
|
|
@@ -3720,7 +3805,7 @@ function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3720
3805
|
class: "markup-icon-btn",
|
|
3721
3806
|
"aria-label": "Discard pin",
|
|
3722
3807
|
onClick: d,
|
|
3723
|
-
children: /* @__PURE__ */ $(
|
|
3808
|
+
children: /* @__PURE__ */ $(aa, { size: 16 })
|
|
3724
3809
|
})]
|
|
3725
3810
|
}), n == null ? /* @__PURE__ */ $(ha, {
|
|
3726
3811
|
pending: i,
|
|
@@ -3750,9 +3835,9 @@ function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3750
3835
|
submitLabel: "Post markup",
|
|
3751
3836
|
pending: i,
|
|
3752
3837
|
error: a,
|
|
3753
|
-
onSubmit: (e) => u(e, p &&
|
|
3838
|
+
onSubmit: (e) => u(e, p && C)
|
|
3754
3839
|
}),
|
|
3755
|
-
|
|
3840
|
+
w ? /* @__PURE__ */ $("div", {
|
|
3756
3841
|
class: "markup-screenshot-row",
|
|
3757
3842
|
children: s ? /* @__PURE__ */ $("span", {
|
|
3758
3843
|
class: "markup-screenshot-status",
|
|
@@ -3762,7 +3847,7 @@ function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3762
3847
|
class: "markup-screenshot-checkbox",
|
|
3763
3848
|
disabled: !0
|
|
3764
3849
|
}),
|
|
3765
|
-
/* @__PURE__ */ $(
|
|
3850
|
+
/* @__PURE__ */ $(ca, { size: 12 }),
|
|
3766
3851
|
/* @__PURE__ */ $("span", { children: "Capturing…" })
|
|
3767
3852
|
]
|
|
3768
3853
|
}) : /* @__PURE__ */ $("label", {
|
|
@@ -3774,7 +3859,7 @@ function va({ pageX: e, pageY: t, authorName: n, isVerified: r, pending: i, erro
|
|
|
3774
3859
|
checked: p,
|
|
3775
3860
|
onChange: (e) => m(e.currentTarget.checked)
|
|
3776
3861
|
}),
|
|
3777
|
-
/* @__PURE__ */ $(
|
|
3862
|
+
/* @__PURE__ */ $(ca, { size: 12 }),
|
|
3778
3863
|
/* @__PURE__ */ $("span", { children: "Attach screenshot" }),
|
|
3779
3864
|
h && p ? /* @__PURE__ */ $("img", {
|
|
3780
3865
|
class: "markup-screenshot-thumb",
|
|
@@ -3867,31 +3952,31 @@ var Ca = [
|
|
|
3867
3952
|
"❓"
|
|
3868
3953
|
];
|
|
3869
3954
|
function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDelete: i, pending: a, error: o, onAuthor: s, onSignIn: c, onClose: l, onReply: u, onEditComment: d, onDeleteComment: f, onToggleReaction: p, onResolve: m, onDelete: h }) {
|
|
3870
|
-
let g = z(null), _ = z(null), v = z(null), y = z(null), b = z(null), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(null), [D, O] = L(""), [k, A] = L(null), [ee, j] = L("down"), [M, te] = L(null), [N, ne] = L(null), [re, ie] = L("down"), ae = z(null);
|
|
3955
|
+
let g = z(null), _ = z(null), v = z(null), y = z(null), b = z(null), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(null), [D, O] = L(""), [k, A] = L(null), [ee, j] = L("down"), [M, te] = L(null), [N, ne] = L(null), [re, ie] = L("down"), ae = z(null), [oe, se] = L(null), [ce, le] = L(!1);
|
|
3871
3956
|
ma(g, !0);
|
|
3872
|
-
let
|
|
3873
|
-
function
|
|
3957
|
+
let ue = e.resolvedAt != null, de = Te(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
3958
|
+
function fe(e, t) {
|
|
3874
3959
|
E(e), O(t);
|
|
3875
3960
|
}
|
|
3876
|
-
function
|
|
3961
|
+
function P() {
|
|
3877
3962
|
E(null), O("");
|
|
3878
3963
|
}
|
|
3879
3964
|
R(() => {
|
|
3880
3965
|
if (!T) return;
|
|
3881
3966
|
let t = e.comments.find((e) => e._id === T);
|
|
3882
|
-
(!t || t.deleted) &&
|
|
3967
|
+
(!t || t.deleted) && P();
|
|
3883
3968
|
}, [e.comments, T]);
|
|
3884
|
-
let
|
|
3969
|
+
let F = z(!0);
|
|
3885
3970
|
R(() => {
|
|
3886
3971
|
let e = y.current;
|
|
3887
3972
|
if (e) {
|
|
3888
|
-
if (
|
|
3889
|
-
|
|
3973
|
+
if (F.current) {
|
|
3974
|
+
F.current = !1, e.scrollTop = e.scrollHeight;
|
|
3890
3975
|
return;
|
|
3891
3976
|
}
|
|
3892
3977
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
3893
3978
|
}
|
|
3894
|
-
}, [
|
|
3979
|
+
}, [de.length]), R(() => {
|
|
3895
3980
|
if (!x) {
|
|
3896
3981
|
w(!1);
|
|
3897
3982
|
return;
|
|
@@ -3926,7 +4011,35 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
3926
4011
|
}
|
|
3927
4012
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3928
4013
|
}, [l]);
|
|
3929
|
-
|
|
4014
|
+
function pe(e) {
|
|
4015
|
+
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
4016
|
+
let t = g.current;
|
|
4017
|
+
if (!t) return;
|
|
4018
|
+
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
4019
|
+
try {
|
|
4020
|
+
l.setPointerCapture(e.pointerId);
|
|
4021
|
+
} catch {}
|
|
4022
|
+
function d(e) {
|
|
4023
|
+
let t = e.clientX - r, n = e.clientY - i;
|
|
4024
|
+
if (!u) {
|
|
4025
|
+
if (Math.abs(t) + Math.abs(n) < 4) return;
|
|
4026
|
+
u = !0, le(!0);
|
|
4027
|
+
}
|
|
4028
|
+
let l = Math.max(8, window.innerWidth - s - 8), d = Math.max(8, window.innerHeight - c - 8);
|
|
4029
|
+
se({
|
|
4030
|
+
left: Oa(a + t, 8, l),
|
|
4031
|
+
top: Oa(o + n, 8, d)
|
|
4032
|
+
});
|
|
4033
|
+
}
|
|
4034
|
+
function f(e) {
|
|
4035
|
+
try {
|
|
4036
|
+
l.releasePointerCapture(e.pointerId);
|
|
4037
|
+
} catch {}
|
|
4038
|
+
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f), le(!1);
|
|
4039
|
+
}
|
|
4040
|
+
l.addEventListener("pointermove", d), l.addEventListener("pointerup", f), l.addEventListener("pointercancel", f);
|
|
4041
|
+
}
|
|
4042
|
+
let me = Te(() => {
|
|
3930
4043
|
let t = Dr({
|
|
3931
4044
|
anchorX: e.anchorX,
|
|
3932
4045
|
anchorY: e.anchorY,
|
|
@@ -3944,24 +4057,25 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
3944
4057
|
return /* @__PURE__ */ $("div", {
|
|
3945
4058
|
ref: g,
|
|
3946
4059
|
id: "markup-thread-popover",
|
|
3947
|
-
class: "markup-popover",
|
|
4060
|
+
class: Q("markup-popover", oe && "is-floating", ce && "is-dragging"),
|
|
3948
4061
|
popover: "auto",
|
|
3949
4062
|
style: {
|
|
3950
|
-
"--markup-pop-x": `${
|
|
3951
|
-
"--markup-pop-y": `${
|
|
4063
|
+
"--markup-pop-x": `${oe?.left ?? me.left}px`,
|
|
4064
|
+
"--markup-pop-y": `${oe?.top ?? me.top}px`
|
|
3952
4065
|
},
|
|
3953
4066
|
role: "dialog",
|
|
3954
4067
|
"aria-label": "Markup thread",
|
|
3955
4068
|
children: [
|
|
3956
4069
|
/* @__PURE__ */ $("header", {
|
|
3957
4070
|
class: "markup-popover-header",
|
|
4071
|
+
onPointerDown: pe,
|
|
3958
4072
|
children: [/* @__PURE__ */ $("span", {
|
|
3959
4073
|
class: "markup-eyebrow",
|
|
3960
4074
|
children: [
|
|
3961
4075
|
"thread · ",
|
|
3962
|
-
|
|
4076
|
+
de.length,
|
|
3963
4077
|
" ",
|
|
3964
|
-
|
|
4078
|
+
de.length === 1 ? "comment" : "comments"
|
|
3965
4079
|
]
|
|
3966
4080
|
}), /* @__PURE__ */ $("div", {
|
|
3967
4081
|
class: "markup-popover-header-actions",
|
|
@@ -3974,7 +4088,7 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
3974
4088
|
class: Q("markup-icon-btn", x && "is-open"),
|
|
3975
4089
|
title: "More options",
|
|
3976
4090
|
onClick: () => S((e) => !e),
|
|
3977
|
-
children: /* @__PURE__ */ $(
|
|
4091
|
+
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
3978
4092
|
}), x ? /* @__PURE__ */ $("div", {
|
|
3979
4093
|
class: "markup-thread-menu-list",
|
|
3980
4094
|
children: [/* @__PURE__ */ $("button", {
|
|
@@ -4002,14 +4116,14 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4002
4116
|
title: "Mark as resolved",
|
|
4003
4117
|
disabled: a,
|
|
4004
4118
|
onClick: m,
|
|
4005
|
-
children: /* @__PURE__ */ $(
|
|
4119
|
+
children: /* @__PURE__ */ $(sa, { size: 16 })
|
|
4006
4120
|
}) : null,
|
|
4007
4121
|
/* @__PURE__ */ $("button", {
|
|
4008
4122
|
type: "button",
|
|
4009
4123
|
class: "markup-icon-btn",
|
|
4010
4124
|
title: "Close thread",
|
|
4011
4125
|
onClick: l,
|
|
4012
|
-
children: /* @__PURE__ */ $(
|
|
4126
|
+
children: /* @__PURE__ */ $(aa, { size: 16 })
|
|
4013
4127
|
})
|
|
4014
4128
|
]
|
|
4015
4129
|
})]
|
|
@@ -4017,8 +4131,8 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4017
4131
|
/* @__PURE__ */ $("ol", {
|
|
4018
4132
|
ref: y,
|
|
4019
4133
|
class: "markup-comments",
|
|
4020
|
-
children:
|
|
4021
|
-
let i = !t.fromDashboard && n != null && t.authorClientId === n, o = r === 0, s = i && !
|
|
4134
|
+
children: de.map((t, r) => {
|
|
4135
|
+
let i = !t.fromDashboard && n != null && t.authorClientId === n, o = r === 0, s = i && !ue && !t.deleted, c = i && !ue && !t.deleted && !o, l = T === t._id, u = (s || c) && !l && !t.deleted, m = k === t._id, h = M === t._id;
|
|
4022
4136
|
return /* @__PURE__ */ $("li", {
|
|
4023
4137
|
class: Q("markup-comment", t.fromDashboard && "is-team"),
|
|
4024
4138
|
children: [
|
|
@@ -4041,7 +4155,7 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4041
4155
|
}),
|
|
4042
4156
|
/* @__PURE__ */ $("div", {
|
|
4043
4157
|
class: "markup-thread-actions",
|
|
4044
|
-
children: [!
|
|
4158
|
+
children: [!ue && !l ? /* @__PURE__ */ $(Ta, {
|
|
4045
4159
|
comment: t,
|
|
4046
4160
|
pickerOpen: N === t._id,
|
|
4047
4161
|
pickerDirection: re,
|
|
@@ -4076,14 +4190,14 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4076
4190
|
let n = e.currentTarget.getBoundingClientRect(), r = y.current?.getBoundingClientRect(), i = (+!!s + +!!c) * 32 + 8 + 6;
|
|
4077
4191
|
j((r ? r.bottom - n.bottom : Infinity) < i ? "up" : "down"), A(t._id);
|
|
4078
4192
|
},
|
|
4079
|
-
children: /* @__PURE__ */ $(
|
|
4193
|
+
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
4080
4194
|
}), m ? /* @__PURE__ */ $("div", {
|
|
4081
4195
|
class: "markup-thread-menu-list",
|
|
4082
4196
|
children: [s ? /* @__PURE__ */ $("button", {
|
|
4083
4197
|
type: "button",
|
|
4084
4198
|
class: "markup-thread-menu-item",
|
|
4085
4199
|
onClick: () => {
|
|
4086
|
-
A(null),
|
|
4200
|
+
A(null), fe(t._id, t.body);
|
|
4087
4201
|
},
|
|
4088
4202
|
children: "Edit"
|
|
4089
4203
|
}) : null, c ? /* @__PURE__ */ $("button", {
|
|
@@ -4105,11 +4219,11 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4105
4219
|
e.preventDefault();
|
|
4106
4220
|
let n = D.trim();
|
|
4107
4221
|
if (!n || n === t.body) {
|
|
4108
|
-
|
|
4222
|
+
P();
|
|
4109
4223
|
return;
|
|
4110
4224
|
}
|
|
4111
4225
|
try {
|
|
4112
|
-
await d(t._id, n),
|
|
4226
|
+
await d(t._id, n), P();
|
|
4113
4227
|
} catch {}
|
|
4114
4228
|
},
|
|
4115
4229
|
children: [/* @__PURE__ */ $("textarea", {
|
|
@@ -4124,7 +4238,7 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4124
4238
|
children: [/* @__PURE__ */ $("button", {
|
|
4125
4239
|
type: "button",
|
|
4126
4240
|
class: "markup-btn markup-btn-ghost",
|
|
4127
|
-
onClick:
|
|
4241
|
+
onClick: P,
|
|
4128
4242
|
disabled: a,
|
|
4129
4243
|
children: "Cancel"
|
|
4130
4244
|
}), /* @__PURE__ */ $("button", {
|
|
@@ -4145,7 +4259,7 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4145
4259
|
}),
|
|
4146
4260
|
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(Ea, {
|
|
4147
4261
|
comment: t,
|
|
4148
|
-
isResolved:
|
|
4262
|
+
isResolved: ue,
|
|
4149
4263
|
onToggle: (e) => p(t._id, e)
|
|
4150
4264
|
}) : null,
|
|
4151
4265
|
r === 0 && e.screenshotUrl ? /* @__PURE__ */ $("button", {
|
|
@@ -4172,7 +4286,7 @@ function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, canDe
|
|
|
4172
4286
|
onClick: (e) => {
|
|
4173
4287
|
e.stopPropagation(), b.current?.close();
|
|
4174
4288
|
},
|
|
4175
|
-
children: /* @__PURE__ */ $(
|
|
4289
|
+
children: /* @__PURE__ */ $(aa, { size: 16 })
|
|
4176
4290
|
}), /* @__PURE__ */ $("img", {
|
|
4177
4291
|
class: "markup-lightbox-img",
|
|
4178
4292
|
src: e.screenshotUrl,
|
|
@@ -4223,7 +4337,7 @@ function Ta({ comment: e, pickerOpen: t, pickerDirection: n, pickerRef: r, onPic
|
|
|
4223
4337
|
title: "Add reaction",
|
|
4224
4338
|
"aria-label": "Add reaction",
|
|
4225
4339
|
onClick: i,
|
|
4226
|
-
children: /* @__PURE__ */ $(
|
|
4340
|
+
children: /* @__PURE__ */ $(ua, { size: 16 })
|
|
4227
4341
|
}), t ? /* @__PURE__ */ $("div", {
|
|
4228
4342
|
class: "markup-reaction-picker",
|
|
4229
4343
|
role: "menu",
|
|
@@ -4308,72 +4422,107 @@ function ja(e) {
|
|
|
4308
4422
|
};
|
|
4309
4423
|
}
|
|
4310
4424
|
function Ma({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
4311
|
-
let [r, i] = L(() => window.location.pathname), [a, o] = L([]), [s, c] = L(null), l = z(null);
|
|
4312
|
-
|
|
4313
|
-
let
|
|
4425
|
+
let [r, i] = L(() => window.location.pathname), [a, o] = L([]), [s, c] = L(null), [l, u] = L(n), d = z(null);
|
|
4426
|
+
d.current = s;
|
|
4427
|
+
let f = Te(() => Ar({
|
|
4314
4428
|
apiUrl: e,
|
|
4315
4429
|
apiKey: t,
|
|
4316
4430
|
getToken: () => {
|
|
4317
|
-
let e =
|
|
4431
|
+
let e = d.current;
|
|
4318
4432
|
return e?.token && e.tokenExpiresAt ? {
|
|
4319
4433
|
token: e.token,
|
|
4320
4434
|
expiresAt: e.tokenExpiresAt
|
|
4321
4435
|
} : null;
|
|
4322
4436
|
},
|
|
4437
|
+
getAnonToken: () => {
|
|
4438
|
+
let e = d.current;
|
|
4439
|
+
return e?.token && e.tokenExpiresAt ? null : e?.anonToken ?? null;
|
|
4440
|
+
},
|
|
4323
4441
|
onUnauthorized: () => {
|
|
4324
|
-
let e =
|
|
4442
|
+
let e = d.current;
|
|
4325
4443
|
if (!e) return;
|
|
4326
4444
|
let t = {
|
|
4327
4445
|
clientId: e.clientId,
|
|
4328
4446
|
name: e.name,
|
|
4329
|
-
email: e.email
|
|
4447
|
+
email: e.email,
|
|
4448
|
+
anonToken: e.anonToken
|
|
4330
4449
|
};
|
|
4331
|
-
|
|
4450
|
+
d.current = t, c(t), Pr(t);
|
|
4332
4451
|
}
|
|
4333
|
-
}), [e, t]), [
|
|
4452
|
+
}), [e, t]), [p, m] = L({ kind: "idle" }), [h, g] = L(!1), [_, v] = L(null), [y, b] = L(!1), [x, S] = L(!1), [, C] = L(0), w = z(null), T = s?.name ?? null, E = s?.isVerified ?? !1;
|
|
4334
4453
|
R(() => {
|
|
4335
4454
|
let e = Nr();
|
|
4336
|
-
if (e) {
|
|
4455
|
+
if (e?.anonToken || e?.isVerified) {
|
|
4337
4456
|
c(e);
|
|
4338
4457
|
return;
|
|
4339
4458
|
}
|
|
4340
|
-
let t =
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4459
|
+
let t = !1, n = null, r = 1e3;
|
|
4460
|
+
function i() {
|
|
4461
|
+
f.mintAnonIdentity().then(({ clientId: n, token: r }) => {
|
|
4462
|
+
if (t) return;
|
|
4463
|
+
let i = {
|
|
4464
|
+
...e ?? {},
|
|
4465
|
+
clientId: n,
|
|
4466
|
+
anonToken: r
|
|
4467
|
+
};
|
|
4468
|
+
Pr(i), c(i);
|
|
4469
|
+
}).catch(() => {
|
|
4470
|
+
t || (n = setTimeout(i, Math.min(r, 3e4)), r = Math.min(r * 2, 3e4));
|
|
4471
|
+
});
|
|
4472
|
+
}
|
|
4473
|
+
return i(), () => {
|
|
4474
|
+
t = !0, n && clearTimeout(n);
|
|
4475
|
+
};
|
|
4476
|
+
}, [f]);
|
|
4477
|
+
let [D, O] = L(null);
|
|
4344
4478
|
R(() => {
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4479
|
+
let e = !1, t = null;
|
|
4480
|
+
async function n() {
|
|
4481
|
+
try {
|
|
4482
|
+
let r = await f.getSubscriptionToken();
|
|
4483
|
+
if (e) return;
|
|
4484
|
+
O(r.token);
|
|
4485
|
+
let i = Math.max(6e4, r.expiresAt - Date.now() - 30 * 6e4);
|
|
4486
|
+
t = setTimeout(n, i);
|
|
4487
|
+
} catch {
|
|
4488
|
+
if (e) return;
|
|
4489
|
+
t = setTimeout(n, 6e4);
|
|
4490
|
+
}
|
|
4491
|
+
}
|
|
4492
|
+
return n(), () => {
|
|
4493
|
+
e = !0, t && clearTimeout(t);
|
|
4494
|
+
};
|
|
4495
|
+
}, [f]);
|
|
4496
|
+
let k = z(null);
|
|
4348
4497
|
R(() => {
|
|
4349
4498
|
let t = new ar(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
4350
|
-
return
|
|
4351
|
-
t.close(),
|
|
4499
|
+
return k.current = t, () => {
|
|
4500
|
+
t.close(), k.current = null;
|
|
4352
4501
|
};
|
|
4353
4502
|
}, [e]);
|
|
4354
|
-
let
|
|
4503
|
+
let A = z(!1);
|
|
4355
4504
|
R(() => {
|
|
4356
|
-
let e =
|
|
4357
|
-
if (!(!e || !
|
|
4358
|
-
|
|
4505
|
+
let e = k.current;
|
|
4506
|
+
if (!(!e || !D)) return A.current = !1, v(null), e.onUpdate(Yt("widget/queries:subscribeThreadsForRoute"), {
|
|
4507
|
+
subscriptionToken: D,
|
|
4359
4508
|
route: r,
|
|
4360
4509
|
viewerClientId: s?.clientId ?? void 0
|
|
4361
4510
|
}, (e) => {
|
|
4362
4511
|
e !== void 0 && o(e);
|
|
4363
4512
|
});
|
|
4364
4513
|
}, [
|
|
4365
|
-
|
|
4514
|
+
D,
|
|
4366
4515
|
r,
|
|
4367
4516
|
s?.clientId
|
|
4368
4517
|
]), R(() => {
|
|
4369
|
-
if (
|
|
4518
|
+
if (A.current) return;
|
|
4370
4519
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
4371
4520
|
if (!e) {
|
|
4372
|
-
|
|
4521
|
+
A.current = !0;
|
|
4373
4522
|
return;
|
|
4374
4523
|
}
|
|
4375
4524
|
let t = decodeURIComponent(e[1] ?? "");
|
|
4376
|
-
a.find((e) => e._id === t) && (
|
|
4525
|
+
a.find((e) => e._id === t) && (A.current = !0, m({
|
|
4377
4526
|
kind: "thread",
|
|
4378
4527
|
threadId: t
|
|
4379
4528
|
}), history.replaceState(null, "", window.location.pathname + window.location.search));
|
|
@@ -4392,20 +4541,20 @@ function Ma({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4392
4541
|
};
|
|
4393
4542
|
}, []), R(() => {
|
|
4394
4543
|
function e(e) {
|
|
4395
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
4544
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), b((e) => !e)));
|
|
4396
4545
|
}
|
|
4397
4546
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4398
4547
|
}, []), R(() => {
|
|
4399
|
-
if (!
|
|
4400
|
-
if (!
|
|
4401
|
-
|
|
4548
|
+
if (!x) return;
|
|
4549
|
+
if (!y) {
|
|
4550
|
+
S(!1);
|
|
4402
4551
|
return;
|
|
4403
4552
|
}
|
|
4404
|
-
let e = window.setTimeout(() =>
|
|
4553
|
+
let e = window.setTimeout(() => S(!1), 5e3);
|
|
4405
4554
|
return () => window.clearTimeout(e);
|
|
4406
|
-
}, [
|
|
4555
|
+
}, [x, y]), R(() => {
|
|
4407
4556
|
function e() {
|
|
4408
|
-
|
|
4557
|
+
C((e) => e + 1);
|
|
4409
4558
|
}
|
|
4410
4559
|
window.addEventListener("scroll", e, { passive: !0 }), window.addEventListener("resize", e);
|
|
4411
4560
|
let t = new ResizeObserver(e);
|
|
@@ -4413,200 +4562,195 @@ function Ma({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4413
4562
|
window.removeEventListener("scroll", e), window.removeEventListener("resize", e), t.disconnect();
|
|
4414
4563
|
};
|
|
4415
4564
|
}, []);
|
|
4416
|
-
let
|
|
4417
|
-
|
|
4418
|
-
}, []),
|
|
4419
|
-
|
|
4420
|
-
}, []),
|
|
4421
|
-
|
|
4565
|
+
let ee = B(() => {
|
|
4566
|
+
v(null), m({ kind: "placing" });
|
|
4567
|
+
}, []), j = B(() => {
|
|
4568
|
+
m({ kind: "idle" }), v(null);
|
|
4569
|
+
}, []), M = B((e, t, n) => {
|
|
4570
|
+
m({
|
|
4422
4571
|
kind: "composing-new",
|
|
4423
4572
|
coords: e,
|
|
4424
4573
|
pageX: t + window.scrollX,
|
|
4425
4574
|
pageY: n + window.scrollY,
|
|
4426
4575
|
screenshot: null,
|
|
4427
4576
|
screenshotCapturing: !0
|
|
4428
|
-
}),
|
|
4577
|
+
}), ea(w.current != null && w.current.getRootNode() instanceof ShadowRoot ? w.current.getRootNode().host : null, {
|
|
4429
4578
|
x: t,
|
|
4430
4579
|
y: n
|
|
4431
4580
|
}).then((e) => {
|
|
4432
|
-
|
|
4581
|
+
m((t) => t.kind === "composing-new" ? {
|
|
4433
4582
|
...t,
|
|
4434
4583
|
screenshot: e,
|
|
4435
4584
|
screenshotCapturing: !1
|
|
4436
4585
|
} : t);
|
|
4437
4586
|
});
|
|
4438
|
-
}, []),
|
|
4587
|
+
}, []), te = B((e, t) => {
|
|
4588
|
+
if (!s) return;
|
|
4439
4589
|
let n = {
|
|
4440
|
-
|
|
4590
|
+
...s,
|
|
4441
4591
|
name: e,
|
|
4442
4592
|
email: t
|
|
4443
4593
|
};
|
|
4444
4594
|
Pr(n), c(n);
|
|
4445
|
-
}, [s]),
|
|
4446
|
-
|
|
4595
|
+
}, [s]), N = B(async () => {
|
|
4596
|
+
v(null);
|
|
4447
4597
|
try {
|
|
4448
|
-
let n = ja(await
|
|
4598
|
+
let n = ja(await Fr(e, t));
|
|
4449
4599
|
Pr(n), c(n);
|
|
4450
4600
|
} catch (e) {
|
|
4451
|
-
|
|
4601
|
+
v(e instanceof Error ? e.message : "Sign-in failed");
|
|
4452
4602
|
}
|
|
4453
|
-
}, [e, t]),
|
|
4454
|
-
if (!(
|
|
4455
|
-
|
|
4603
|
+
}, [e, t]), ne = B(async (e, t) => {
|
|
4604
|
+
if (!(p.kind !== "composing-new" || !s?.name)) {
|
|
4605
|
+
g(!0), v(null);
|
|
4456
4606
|
try {
|
|
4457
4607
|
let n;
|
|
4458
|
-
if (t &&
|
|
4459
|
-
let { uploadUrl: e } = await
|
|
4608
|
+
if (t && p.screenshot) {
|
|
4609
|
+
let { uploadUrl: e } = await f.getScreenshotUploadUrl(), t = await fetch(e, {
|
|
4460
4610
|
method: "POST",
|
|
4461
|
-
headers: { "Content-Type":
|
|
4462
|
-
body:
|
|
4611
|
+
headers: { "Content-Type": p.screenshot.type || "image/png" },
|
|
4612
|
+
body: p.screenshot
|
|
4463
4613
|
});
|
|
4464
4614
|
if (t.ok) {
|
|
4465
4615
|
let { storageId: e } = await t.json();
|
|
4466
4616
|
n = e;
|
|
4467
4617
|
}
|
|
4468
4618
|
}
|
|
4469
|
-
let i = await
|
|
4619
|
+
let i = await f.createThread({
|
|
4470
4620
|
url: window.location.href,
|
|
4471
4621
|
route: r,
|
|
4472
|
-
anchorSelector:
|
|
4473
|
-
anchorX:
|
|
4474
|
-
anchorY:
|
|
4475
|
-
anchorOffsetX:
|
|
4476
|
-
anchorOffsetY:
|
|
4477
|
-
viewportW:
|
|
4478
|
-
viewportY:
|
|
4622
|
+
anchorSelector: p.coords.anchorSelector,
|
|
4623
|
+
anchorX: p.coords.anchorX,
|
|
4624
|
+
anchorY: p.coords.anchorY,
|
|
4625
|
+
anchorOffsetX: p.coords.anchorOffsetX,
|
|
4626
|
+
anchorOffsetY: p.coords.anchorOffsetY,
|
|
4627
|
+
viewportW: p.coords.viewportW,
|
|
4628
|
+
viewportY: p.coords.viewportY,
|
|
4479
4629
|
userAgent: navigator.userAgent,
|
|
4480
4630
|
authorName: s.name,
|
|
4481
4631
|
authorEmail: s.email,
|
|
4482
|
-
authorClientId: s.clientId,
|
|
4483
4632
|
body: e,
|
|
4484
4633
|
screenshotStorageId: n
|
|
4485
4634
|
});
|
|
4486
|
-
o((e) => [...e, i.thread]),
|
|
4635
|
+
o((e) => [...e, i.thread]), m({
|
|
4487
4636
|
kind: "thread",
|
|
4488
4637
|
threadId: i.thread._id
|
|
4489
4638
|
});
|
|
4490
4639
|
} catch (e) {
|
|
4491
|
-
|
|
4640
|
+
v(e instanceof Error ? e.message : "Failed to post");
|
|
4492
4641
|
} finally {
|
|
4493
|
-
|
|
4642
|
+
g(!1);
|
|
4494
4643
|
}
|
|
4495
4644
|
}
|
|
4496
4645
|
}, [
|
|
4497
|
-
|
|
4646
|
+
f,
|
|
4498
4647
|
s,
|
|
4499
|
-
|
|
4648
|
+
p,
|
|
4500
4649
|
r
|
|
4501
|
-
]),
|
|
4502
|
-
if (
|
|
4503
|
-
let e =
|
|
4504
|
-
|
|
4650
|
+
]), re = B(async () => {
|
|
4651
|
+
if (p.kind !== "thread") return;
|
|
4652
|
+
let e = p.threadId;
|
|
4653
|
+
g(!0), v(null);
|
|
4505
4654
|
try {
|
|
4506
|
-
await
|
|
4655
|
+
await f.deleteThread(e), o((t) => t.filter((t) => t._id !== e)), m({ kind: "idle" });
|
|
4507
4656
|
} catch (e) {
|
|
4508
|
-
|
|
4657
|
+
v(e instanceof Error ? e.message : "Failed to delete");
|
|
4509
4658
|
} finally {
|
|
4510
|
-
|
|
4659
|
+
g(!1);
|
|
4511
4660
|
}
|
|
4512
|
-
}, [
|
|
4513
|
-
if (
|
|
4514
|
-
let e =
|
|
4515
|
-
|
|
4661
|
+
}, [f, p]), ie = B(async () => {
|
|
4662
|
+
if (p.kind !== "thread") return;
|
|
4663
|
+
let e = p.threadId;
|
|
4664
|
+
g(!0), v(null);
|
|
4516
4665
|
try {
|
|
4517
|
-
await
|
|
4666
|
+
await f.resolveThread(e, s?.clientId), o((t) => t.filter((t) => t._id !== e)), m({ kind: "idle" });
|
|
4518
4667
|
} catch (e) {
|
|
4519
|
-
|
|
4668
|
+
v(e instanceof Error ? e.message : "Failed to resolve");
|
|
4520
4669
|
} finally {
|
|
4521
|
-
|
|
4670
|
+
g(!1);
|
|
4522
4671
|
}
|
|
4523
4672
|
}, [
|
|
4524
|
-
|
|
4525
|
-
|
|
4673
|
+
f,
|
|
4674
|
+
p,
|
|
4526
4675
|
s?.clientId
|
|
4527
|
-
]),
|
|
4528
|
-
if (
|
|
4529
|
-
let t =
|
|
4530
|
-
|
|
4676
|
+
]), ae = B(async (e) => {
|
|
4677
|
+
if (p.kind !== "thread" || !s?.name) return;
|
|
4678
|
+
let t = p.threadId;
|
|
4679
|
+
g(!0), v(null);
|
|
4531
4680
|
try {
|
|
4532
|
-
let n = await
|
|
4681
|
+
let n = await f.addComment(t, {
|
|
4533
4682
|
body: e,
|
|
4534
4683
|
authorName: s.name,
|
|
4535
|
-
authorEmail: s.email
|
|
4536
|
-
authorClientId: s.clientId
|
|
4684
|
+
authorEmail: s.email
|
|
4537
4685
|
});
|
|
4538
4686
|
o((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4539
4687
|
} catch (e) {
|
|
4540
|
-
|
|
4688
|
+
v(e instanceof Error ? e.message : "Failed to reply");
|
|
4541
4689
|
} finally {
|
|
4542
|
-
|
|
4690
|
+
g(!1);
|
|
4543
4691
|
}
|
|
4544
4692
|
}, [
|
|
4545
|
-
|
|
4693
|
+
f,
|
|
4546
4694
|
s,
|
|
4547
|
-
|
|
4548
|
-
]),
|
|
4549
|
-
if (
|
|
4550
|
-
let n =
|
|
4551
|
-
|
|
4695
|
+
p
|
|
4696
|
+
]), oe = B(async (e, t) => {
|
|
4697
|
+
if (p.kind !== "thread" || !s) return;
|
|
4698
|
+
let n = p.threadId;
|
|
4699
|
+
g(!0), v(null);
|
|
4552
4700
|
try {
|
|
4553
|
-
let r = await
|
|
4554
|
-
body: t,
|
|
4555
|
-
authorClientId: s.clientId
|
|
4556
|
-
});
|
|
4701
|
+
let r = await f.editComment(n, e, { body: t });
|
|
4557
4702
|
o((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4558
4703
|
} catch (e) {
|
|
4559
|
-
throw
|
|
4704
|
+
throw v(e instanceof Error ? e.message : "Failed to edit"), e;
|
|
4560
4705
|
} finally {
|
|
4561
|
-
|
|
4706
|
+
g(!1);
|
|
4562
4707
|
}
|
|
4563
4708
|
}, [
|
|
4564
|
-
|
|
4709
|
+
f,
|
|
4565
4710
|
s,
|
|
4566
|
-
|
|
4567
|
-
]),
|
|
4568
|
-
if (
|
|
4569
|
-
let t =
|
|
4570
|
-
|
|
4711
|
+
p
|
|
4712
|
+
]), se = B(async (e) => {
|
|
4713
|
+
if (p.kind !== "thread" || !s) return;
|
|
4714
|
+
let t = p.threadId;
|
|
4715
|
+
g(!0), v(null);
|
|
4571
4716
|
try {
|
|
4572
|
-
let n = await
|
|
4717
|
+
let n = await f.deleteComment(t, e);
|
|
4573
4718
|
o((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4574
4719
|
} catch (e) {
|
|
4575
|
-
|
|
4720
|
+
v(e instanceof Error ? e.message : "Failed to delete");
|
|
4576
4721
|
} finally {
|
|
4577
|
-
|
|
4722
|
+
g(!1);
|
|
4578
4723
|
}
|
|
4579
4724
|
}, [
|
|
4580
|
-
|
|
4725
|
+
f,
|
|
4581
4726
|
s,
|
|
4582
|
-
|
|
4583
|
-
]),
|
|
4584
|
-
if (
|
|
4585
|
-
let n =
|
|
4586
|
-
|
|
4727
|
+
p
|
|
4728
|
+
]), ce = B(async (e, t) => {
|
|
4729
|
+
if (p.kind !== "thread" || !s) return;
|
|
4730
|
+
let n = p.threadId;
|
|
4731
|
+
v(null);
|
|
4587
4732
|
try {
|
|
4588
|
-
let r = await
|
|
4733
|
+
let r = await f.toggleReaction(e, {
|
|
4589
4734
|
emoji: t,
|
|
4590
|
-
authorClientId: s.clientId,
|
|
4591
4735
|
authorName: s.name
|
|
4592
4736
|
});
|
|
4593
4737
|
o((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4594
4738
|
} catch (e) {
|
|
4595
|
-
|
|
4739
|
+
v(e instanceof Error ? e.message : "Failed to react");
|
|
4596
4740
|
}
|
|
4597
4741
|
}, [
|
|
4598
|
-
|
|
4742
|
+
f,
|
|
4599
4743
|
s,
|
|
4600
|
-
|
|
4601
|
-
]),
|
|
4744
|
+
p
|
|
4745
|
+
]), le = p.kind === "thread" ? a.find((e) => e._id === p.threadId) ?? null : null, ue = E || s?.clientId != null && s.clientId === le?.authorClientId;
|
|
4602
4746
|
return /* @__PURE__ */ $("div", {
|
|
4603
4747
|
class: "markup-root",
|
|
4604
|
-
ref:
|
|
4748
|
+
ref: w,
|
|
4605
4749
|
children: [
|
|
4606
|
-
|
|
4750
|
+
p.kind === "placing" ? null : /* @__PURE__ */ $("div", {
|
|
4607
4751
|
class: "markup-pins-layer",
|
|
4608
|
-
children: [
|
|
4609
|
-
let t =
|
|
4752
|
+
children: [y ? null : a.map((e) => {
|
|
4753
|
+
let t = p.kind === "thread" && p.threadId === e._id, n = Dr({
|
|
4610
4754
|
anchorX: e.anchorX,
|
|
4611
4755
|
anchorY: e.anchorY,
|
|
4612
4756
|
anchorSelector: e.anchorSelector,
|
|
@@ -4618,61 +4762,62 @@ function Ma({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4618
4762
|
pageY: n.pageY,
|
|
4619
4763
|
count: r,
|
|
4620
4764
|
active: t,
|
|
4621
|
-
onClick: () =>
|
|
4765
|
+
onClick: () => m({
|
|
4622
4766
|
kind: "thread",
|
|
4623
4767
|
threadId: e._id
|
|
4624
4768
|
})
|
|
4625
4769
|
}, e._id);
|
|
4626
|
-
}),
|
|
4627
|
-
pageX:
|
|
4628
|
-
pageY:
|
|
4770
|
+
}), p.kind === "composing-new" ? /* @__PURE__ */ $(xa, {
|
|
4771
|
+
pageX: p.pageX,
|
|
4772
|
+
pageY: p.pageY
|
|
4629
4773
|
}) : null]
|
|
4630
4774
|
}),
|
|
4631
|
-
|
|
4632
|
-
onPlace:
|
|
4633
|
-
onCancel:
|
|
4775
|
+
p.kind === "placing" ? /* @__PURE__ */ $(Sa, {
|
|
4776
|
+
onPlace: M,
|
|
4777
|
+
onCancel: j
|
|
4634
4778
|
}) : null,
|
|
4635
|
-
|
|
4636
|
-
thread:
|
|
4637
|
-
authorName:
|
|
4779
|
+
p.kind === "thread" && le && !y ? /* @__PURE__ */ $(wa, {
|
|
4780
|
+
thread: le,
|
|
4781
|
+
authorName: T,
|
|
4638
4782
|
currentClientId: s?.clientId ?? null,
|
|
4639
|
-
isVerified:
|
|
4640
|
-
canDelete:
|
|
4641
|
-
pending:
|
|
4642
|
-
error:
|
|
4643
|
-
onAuthor:
|
|
4644
|
-
onSignIn:
|
|
4645
|
-
onClose:
|
|
4646
|
-
onReply:
|
|
4647
|
-
onEditComment:
|
|
4648
|
-
onDeleteComment:
|
|
4649
|
-
onToggleReaction:
|
|
4650
|
-
onDelete:
|
|
4651
|
-
onResolve:
|
|
4783
|
+
isVerified: E,
|
|
4784
|
+
canDelete: ue,
|
|
4785
|
+
pending: h,
|
|
4786
|
+
error: _,
|
|
4787
|
+
onAuthor: te,
|
|
4788
|
+
onSignIn: N,
|
|
4789
|
+
onClose: j,
|
|
4790
|
+
onReply: ae,
|
|
4791
|
+
onEditComment: oe,
|
|
4792
|
+
onDeleteComment: se,
|
|
4793
|
+
onToggleReaction: ce,
|
|
4794
|
+
onDelete: re,
|
|
4795
|
+
onResolve: ie
|
|
4652
4796
|
}) : null,
|
|
4653
|
-
|
|
4654
|
-
pageX:
|
|
4655
|
-
pageY:
|
|
4656
|
-
authorName:
|
|
4657
|
-
isVerified:
|
|
4658
|
-
pending:
|
|
4659
|
-
error:
|
|
4660
|
-
screenshot:
|
|
4661
|
-
screenshotCapturing:
|
|
4662
|
-
onAuthor:
|
|
4663
|
-
onSignIn:
|
|
4664
|
-
onSubmit:
|
|
4665
|
-
onClose:
|
|
4797
|
+
p.kind === "composing-new" ? /* @__PURE__ */ $(va, {
|
|
4798
|
+
pageX: p.pageX,
|
|
4799
|
+
pageY: p.pageY,
|
|
4800
|
+
authorName: T,
|
|
4801
|
+
isVerified: E,
|
|
4802
|
+
pending: h,
|
|
4803
|
+
error: _,
|
|
4804
|
+
screenshot: p.screenshot,
|
|
4805
|
+
screenshotCapturing: p.screenshotCapturing,
|
|
4806
|
+
onAuthor: te,
|
|
4807
|
+
onSignIn: N,
|
|
4808
|
+
onSubmit: ne,
|
|
4809
|
+
onClose: j
|
|
4666
4810
|
}) : null,
|
|
4667
|
-
!
|
|
4668
|
-
active:
|
|
4669
|
-
onToggle: () =>
|
|
4811
|
+
!y || p.kind === "placing" || p.kind === "composing-new" ? /* @__PURE__ */ $(da, {
|
|
4812
|
+
active: p.kind === "placing",
|
|
4813
|
+
onToggle: () => p.kind === "placing" ? j() : ee(),
|
|
4670
4814
|
onHide: () => {
|
|
4671
|
-
|
|
4815
|
+
b(!0), S(!0);
|
|
4672
4816
|
},
|
|
4673
|
-
position:
|
|
4817
|
+
position: l,
|
|
4818
|
+
onPositionChange: u
|
|
4674
4819
|
}) : null,
|
|
4675
|
-
|
|
4820
|
+
y && x ? /* @__PURE__ */ $(Na, { position: l }) : null
|
|
4676
4821
|
]
|
|
4677
4822
|
});
|
|
4678
4823
|
}
|
|
@@ -4696,38 +4841,34 @@ function Na({ position: e }) {
|
|
|
4696
4841
|
]
|
|
4697
4842
|
});
|
|
4698
4843
|
}
|
|
4699
|
-
async function Pa(e) {
|
|
4700
|
-
let t = new TextEncoder().encode(e), n = await crypto.subtle.digest("SHA-256", t);
|
|
4701
|
-
return Array.from(new Uint8Array(n)).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
4702
|
-
}
|
|
4703
4844
|
//#endregion
|
|
4704
4845
|
//#region src/runtime/mount.tsx
|
|
4705
|
-
function
|
|
4846
|
+
function Pa(e, t) {
|
|
4706
4847
|
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
|
|
4707
4848
|
let n = t.theme ?? "auto";
|
|
4708
4849
|
n !== "auto" && (e.dataset.theme = n);
|
|
4709
4850
|
let r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
4710
|
-
i.textContent =
|
|
4851
|
+
i.textContent = fe, r.appendChild(i);
|
|
4711
4852
|
let a = document.createElement("div");
|
|
4712
4853
|
a.className = "markup-shadow-root", r.appendChild(a);
|
|
4713
4854
|
let { theme: o, ...s } = t;
|
|
4714
|
-
return
|
|
4855
|
+
return de(/* @__PURE__ */ $(Ma, { ...s }), a), () => de(null, a);
|
|
4715
4856
|
}
|
|
4716
4857
|
//#endregion
|
|
4717
4858
|
//#region src/widget.ts
|
|
4718
|
-
var
|
|
4719
|
-
function
|
|
4720
|
-
|
|
4859
|
+
var Fa = null, Ia = null;
|
|
4860
|
+
function La(e) {
|
|
4861
|
+
Ra();
|
|
4721
4862
|
let t = document.createElement("div");
|
|
4722
|
-
return t.id = "markup-widget", document.body.appendChild(t),
|
|
4863
|
+
return t.id = "markup-widget", document.body.appendChild(t), Ia = t, Fa = Pa(t, e), Ra;
|
|
4723
4864
|
}
|
|
4724
|
-
function
|
|
4725
|
-
|
|
4865
|
+
function Ra() {
|
|
4866
|
+
Fa &&= (Fa(), null), Ia?.parentNode && Ia.parentNode.removeChild(Ia), Ia = null;
|
|
4726
4867
|
}
|
|
4727
4868
|
if (typeof document < "u") {
|
|
4728
4869
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
4729
4870
|
if (t && n) {
|
|
4730
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = () =>
|
|
4871
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = () => La({
|
|
4731
4872
|
apiUrl: t,
|
|
4732
4873
|
apiKey: n,
|
|
4733
4874
|
position: r,
|
|
@@ -4738,13 +4879,13 @@ if (typeof document < "u") {
|
|
|
4738
4879
|
}
|
|
4739
4880
|
//#endregion
|
|
4740
4881
|
//#region src/react.tsx
|
|
4741
|
-
function
|
|
4742
|
-
return e(() => (
|
|
4882
|
+
function za(t) {
|
|
4883
|
+
return e(() => (La({
|
|
4743
4884
|
apiUrl: t.apiUrl,
|
|
4744
4885
|
apiKey: t.apiKey,
|
|
4745
4886
|
position: t.position,
|
|
4746
4887
|
theme: t.theme
|
|
4747
|
-
}), () =>
|
|
4888
|
+
}), () => Ra()), [
|
|
4748
4889
|
t.apiUrl,
|
|
4749
4890
|
t.apiKey,
|
|
4750
4891
|
t.position,
|
|
@@ -4752,4 +4893,4 @@ function Ba(t) {
|
|
|
4752
4893
|
]), null;
|
|
4753
4894
|
}
|
|
4754
4895
|
//#endregion
|
|
4755
|
-
export {
|
|
4896
|
+
export { za as MarkupWidget };
|