@pixelmatters/markup 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/widget.js +1299 -1134
- package/package.json +3 -3
package/dist/widget.js
CHANGED
|
@@ -45,7 +45,7 @@ function w(e, t) {
|
|
|
45
45
|
function T(e) {
|
|
46
46
|
if (e.__P && e.__d) {
|
|
47
47
|
var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
|
|
48
|
-
o.__v = n.__v + 1, t.vnode && t.vnode(o),
|
|
48
|
+
o.__v = n.__v + 1, t.vnode && t.vnode(o), ne(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, ie(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
function E(e) {
|
|
@@ -65,7 +65,7 @@ function O() {
|
|
|
65
65
|
}
|
|
66
66
|
function k(e, t, n, r, i, a, o, s, c, l, u) {
|
|
67
67
|
var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
|
|
68
|
-
for (c = A(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v =
|
|
68
|
+
for (c = A(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = ne(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && oe(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = j(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
|
|
69
69
|
return n.__e = _, c;
|
|
70
70
|
}
|
|
71
71
|
function A(e, t, n, r, i) {
|
|
@@ -114,7 +114,7 @@ function ee(e, t, n, r, i) {
|
|
|
114
114
|
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function te(e) {
|
|
118
118
|
return function(n) {
|
|
119
119
|
if (this.l) {
|
|
120
120
|
var r = this.l[n.type + e];
|
|
@@ -124,7 +124,7 @@ function P(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function ne(e, n, r, i, a, o, s, c, l, u) {
|
|
128
128
|
var d, f, p, m, g, b, x, w, T, E, D, O, A, j, M, N = n.type;
|
|
129
129
|
if (n.constructor !== void 0) return null;
|
|
130
130
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
|
|
@@ -145,25 +145,25 @@ function te(e, n, r, i, a, o, s, c, l, u) {
|
|
|
145
145
|
else do
|
|
146
146
|
f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), f.state = f.__s;
|
|
147
147
|
while (f.__d && ++A < 25);
|
|
148
|
-
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), j = d != null && d.type === S && d.key == null ?
|
|
148
|
+
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), j = d != null && d.type === S && d.key == null ? P(d.props.children) : d, c = k(e, _(j) ? j : [j], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
|
|
149
149
|
} catch (e) {
|
|
150
150
|
if (n.__v = null, l || o != null) if (e.then) {
|
|
151
151
|
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
152
152
|
o[o.indexOf(c)] = null, n.__e = c;
|
|
153
153
|
} else {
|
|
154
154
|
for (M = o.length; M--;) y(o[M]);
|
|
155
|
-
|
|
155
|
+
re(n);
|
|
156
156
|
}
|
|
157
|
-
else n.__e = r.__e, n.__k = r.__k, e.then ||
|
|
157
|
+
else n.__e = r.__e, n.__k = r.__k, e.then || re(n);
|
|
158
158
|
t.__e(e, n, r);
|
|
159
159
|
}
|
|
160
160
|
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = ae(r.__e, n, r, i, a, o, s, l, u);
|
|
161
161
|
return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(
|
|
163
|
+
function re(e) {
|
|
164
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(re));
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function ie(e, n, r) {
|
|
167
167
|
for (var i = 0; i < r.length; i++) oe(r[i], r[++i], r[++i]);
|
|
168
168
|
t.__c && t.__c(n, e), e.some(function(n) {
|
|
169
169
|
try {
|
|
@@ -175,8 +175,8 @@ function re(e, n, r) {
|
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(
|
|
178
|
+
function P(e) {
|
|
179
|
+
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(P) : v({}, e);
|
|
180
180
|
}
|
|
181
181
|
function ae(n, r, i, a, o, s, c, l, u) {
|
|
182
182
|
var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
|
|
@@ -229,7 +229,7 @@ function ce(e, t, n) {
|
|
|
229
229
|
}
|
|
230
230
|
function le(n, r, i) {
|
|
231
231
|
var a, o, s, c;
|
|
232
|
-
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [],
|
|
232
|
+
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], ne(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), ie(s, n, c);
|
|
233
233
|
}
|
|
234
234
|
e = h.slice, t = { __e: function(e, t, n, r) {
|
|
235
235
|
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
|
|
@@ -245,27 +245,27 @@ e = h.slice, t = { __e: function(e, t, n, r) {
|
|
|
245
245
|
this.__v && (this.__e = !0, e && this.__h.push(e), D(this));
|
|
246
246
|
}, C.prototype.render = S, r = [], a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, o = function(e, t) {
|
|
247
247
|
return e.__v.__b - t.__v.__b;
|
|
248
|
-
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f =
|
|
248
|
+
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = te(!1), p = te(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var ue = ":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-center{width:max-content;margin-inline:auto;left:0;right:0}.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-fab.is-icon-only{gap:0;padding:9px}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{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,opacity .15s,top .2s,left .2s;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.is-unresolved{opacity:.5}.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}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top: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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-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-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-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-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-top:4px;font-size:10px}.markup-screenshot-redacted-chip{cursor:pointer;color:var(--markup-muted);font:inherit;background:0 0;border:none;align-items:center;gap:3px;padding:0;display:inline-flex}.markup-screenshot-redacted-chip:hover{color:var(--markup-ink)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-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}}", F, I, de, fe, pe = 0, me = [], L = t, he = L.__b, ge = L.__r, _e = L.diffed, ve = L.__c, ye = L.unmount, be = L.__;
|
|
251
|
+
var ue = ":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-center{width:max-content;margin-inline:auto;left:0;right:0}.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-fab.is-icon-only{gap:0;padding:9px}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{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,opacity .15s,top .2s,left .2s;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.is-unresolved{opacity:.5}.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}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top: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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-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-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-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-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-top:4px;font-size:10px}.markup-screenshot-redacted-chip{cursor:pointer;color:var(--markup-muted);font:inherit;background:0 0;border:none;align-items:center;gap:3px;padding:0;display:inline-flex}.markup-screenshot-redacted-chip:hover{color:var(--markup-ink)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-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}}", de, F, fe, pe, me = 0, he = [], I = t, ge = I.__b, _e = I.__r, ve = I.diffed, ye = I.__c, be = I.unmount, L = I.__;
|
|
252
252
|
function xe(e, t) {
|
|
253
|
-
|
|
254
|
-
var n =
|
|
253
|
+
I.__h && I.__h(F, e, me || t), me = 0;
|
|
254
|
+
var n = F.__H ||= {
|
|
255
255
|
__: [],
|
|
256
256
|
__h: []
|
|
257
257
|
};
|
|
258
258
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
259
259
|
}
|
|
260
260
|
function R(e) {
|
|
261
|
-
return
|
|
261
|
+
return me = 1, Se(Ae, e);
|
|
262
262
|
}
|
|
263
263
|
function Se(e, t, n) {
|
|
264
|
-
var r = xe(
|
|
264
|
+
var r = xe(de++, 2);
|
|
265
265
|
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ae(void 0, t), function(e) {
|
|
266
266
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
267
267
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
268
|
-
}], r.__c =
|
|
268
|
+
}], r.__c = F, !F.__f)) {
|
|
269
269
|
var i = function(e, t, n) {
|
|
270
270
|
if (!r.__c.__H) return !0;
|
|
271
271
|
var i = r.__c.__H.__.filter(function(e) {
|
|
@@ -282,63 +282,63 @@ function Se(e, t, n) {
|
|
|
282
282
|
}
|
|
283
283
|
}), a && a.call(this, e, t, n) || o;
|
|
284
284
|
};
|
|
285
|
-
|
|
286
|
-
var a =
|
|
287
|
-
|
|
285
|
+
F.__f = !0;
|
|
286
|
+
var a = F.shouldComponentUpdate, o = F.componentWillUpdate;
|
|
287
|
+
F.componentWillUpdate = function(e, t, n) {
|
|
288
288
|
if (this.__e) {
|
|
289
289
|
var r = a;
|
|
290
290
|
a = void 0, i(e, t, n), a = r;
|
|
291
291
|
}
|
|
292
292
|
o && o.call(this, e, t, n);
|
|
293
|
-
},
|
|
293
|
+
}, F.shouldComponentUpdate = i;
|
|
294
294
|
}
|
|
295
295
|
return r.__N || r.__;
|
|
296
296
|
}
|
|
297
297
|
function z(e, t) {
|
|
298
|
-
var n = xe(
|
|
299
|
-
!
|
|
298
|
+
var n = xe(de++, 3);
|
|
299
|
+
!I.__s && ke(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
|
|
300
300
|
}
|
|
301
301
|
function B(e) {
|
|
302
|
-
return
|
|
302
|
+
return me = 5, Ce(function() {
|
|
303
303
|
return { current: e };
|
|
304
304
|
}, []);
|
|
305
305
|
}
|
|
306
306
|
function Ce(e, t) {
|
|
307
|
-
var n = xe(
|
|
307
|
+
var n = xe(de++, 7);
|
|
308
308
|
return ke(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
309
309
|
}
|
|
310
310
|
function V(e, t) {
|
|
311
|
-
return
|
|
311
|
+
return me = 8, Ce(function() {
|
|
312
312
|
return e;
|
|
313
313
|
}, t);
|
|
314
314
|
}
|
|
315
315
|
function we() {
|
|
316
|
-
for (var e; e =
|
|
316
|
+
for (var e; e = he.shift();) {
|
|
317
317
|
var t = e.__H;
|
|
318
318
|
if (e.__P && t) try {
|
|
319
319
|
t.__h.some(De), t.__h.some(Oe), t.__h = [];
|
|
320
320
|
} catch (n) {
|
|
321
|
-
t.__h = [],
|
|
321
|
+
t.__h = [], I.__e(n, e.__v);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m),
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
var t = (
|
|
332
|
-
t && (
|
|
325
|
+
I.__b = function(e) {
|
|
326
|
+
F = null, ge && ge(e);
|
|
327
|
+
}, I.__ = function(e, t) {
|
|
328
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), L && L(e, t);
|
|
329
|
+
}, I.__r = function(e) {
|
|
330
|
+
_e && _e(e), de = 0;
|
|
331
|
+
var t = (F = e.__c).__H;
|
|
332
|
+
t && (fe === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
|
|
333
333
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
334
|
-
})) : (t.__h.some(De), t.__h.some(Oe), t.__h = [],
|
|
335
|
-
},
|
|
336
|
-
|
|
334
|
+
})) : (t.__h.some(De), t.__h.some(Oe), t.__h = [], de = 0)), fe = F;
|
|
335
|
+
}, I.diffed = function(e) {
|
|
336
|
+
ve && ve(e);
|
|
337
337
|
var t = e.__c;
|
|
338
|
-
t && t.__H && (t.__H.__h.length && (
|
|
338
|
+
t && t.__H && (t.__H.__h.length && (he.push(t) !== 1 && pe === I.requestAnimationFrame || ((pe = I.requestAnimationFrame) || Ee)(we)), t.__H.__.some(function(e) {
|
|
339
339
|
e.u && (e.__H = e.u), e.u = void 0;
|
|
340
|
-
})),
|
|
341
|
-
},
|
|
340
|
+
})), fe = F = null;
|
|
341
|
+
}, I.__c = function(e, t) {
|
|
342
342
|
t.some(function(e) {
|
|
343
343
|
try {
|
|
344
344
|
e.__h.some(De), e.__h = e.__h.filter(function(e) {
|
|
@@ -347,11 +347,11 @@ L.__b = function(e) {
|
|
|
347
347
|
} catch (n) {
|
|
348
348
|
t.some(function(e) {
|
|
349
349
|
e.__h &&= [];
|
|
350
|
-
}), t = [],
|
|
350
|
+
}), t = [], I.__e(n, e.__v);
|
|
351
351
|
}
|
|
352
|
-
}),
|
|
353
|
-
},
|
|
354
|
-
|
|
352
|
+
}), ye && ye(e, t);
|
|
353
|
+
}, I.unmount = function(e) {
|
|
354
|
+
be && be(e);
|
|
355
355
|
var t, n = e.__c;
|
|
356
356
|
n && n.__H && (n.__H.__.some(function(e) {
|
|
357
357
|
try {
|
|
@@ -359,7 +359,7 @@ L.__b = function(e) {
|
|
|
359
359
|
} catch (e) {
|
|
360
360
|
t = e;
|
|
361
361
|
}
|
|
362
|
-
}), n.__H = void 0, t &&
|
|
362
|
+
}), n.__H = void 0, t && I.__e(t, n.__v));
|
|
363
363
|
};
|
|
364
364
|
var Te = typeof requestAnimationFrame == "function";
|
|
365
365
|
function Ee(e) {
|
|
@@ -369,12 +369,12 @@ function Ee(e) {
|
|
|
369
369
|
Te && (t = requestAnimationFrame(n));
|
|
370
370
|
}
|
|
371
371
|
function De(e) {
|
|
372
|
-
var t =
|
|
373
|
-
typeof n == "function" && (e.__c = void 0, n()),
|
|
372
|
+
var t = F, n = e.__c;
|
|
373
|
+
typeof n == "function" && (e.__c = void 0, n()), F = t;
|
|
374
374
|
}
|
|
375
375
|
function Oe(e) {
|
|
376
|
-
var t =
|
|
377
|
-
e.__c = e.__(),
|
|
376
|
+
var t = F;
|
|
377
|
+
e.__c = e.__(), F = t;
|
|
378
378
|
}
|
|
379
379
|
function ke(e, t) {
|
|
380
380
|
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
@@ -384,7 +384,7 @@ function ke(e, t) {
|
|
|
384
384
|
function Ae(e, t) {
|
|
385
385
|
return typeof t == "function" ? t(e) : t;
|
|
386
386
|
}
|
|
387
|
-
for (var je = "1.
|
|
387
|
+
for (var je = "1.38.0", H = [], U = [], Me = Uint8Array, Ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Pe = 0, Fe = Ne.length; Pe < Fe; ++Pe) H[Pe] = Ne[Pe], U[Ne.charCodeAt(Pe)] = Pe;
|
|
388
388
|
U[45] = 62, U[95] = 63;
|
|
389
389
|
function Ie(e) {
|
|
390
390
|
var t = e.length;
|
|
@@ -414,13 +414,13 @@ function Ve(e) {
|
|
|
414
414
|
return r === 1 ? (t = e[n - 1], i.push(H[t >> 2] + H[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(H[t >> 10] + H[t >> 4 & 63] + H[t << 2 & 63] + "=")), i.join("");
|
|
415
415
|
}
|
|
416
416
|
//#endregion
|
|
417
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
418
|
-
function
|
|
417
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/common/index.js
|
|
418
|
+
function He(e) {
|
|
419
419
|
if (e === void 0) return {};
|
|
420
|
-
if (!
|
|
420
|
+
if (!We(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
|
|
421
421
|
return e;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Ue(e) {
|
|
424
424
|
if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
|
|
425
425
|
if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
|
|
426
426
|
if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
|
|
@@ -431,53 +431,53 @@ function He(e) {
|
|
|
431
431
|
}
|
|
432
432
|
if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function We(e) {
|
|
435
435
|
let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
|
|
436
436
|
return t && r;
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
440
|
-
var
|
|
441
|
-
function
|
|
439
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/value.js
|
|
440
|
+
var Ge = !0, Ke = BigInt("-9223372036854775808"), qe = BigInt("9223372036854775807"), Je = BigInt("0"), Ye = BigInt("8"), Xe = BigInt("256");
|
|
441
|
+
function Ze(e) {
|
|
442
442
|
return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
e <
|
|
444
|
+
function Qe(e) {
|
|
445
|
+
e < Je && (e -= Ke + Ke);
|
|
446
446
|
let t = e.toString(16);
|
|
447
447
|
t.length % 2 == 1 && (t = "0" + t);
|
|
448
448
|
let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
|
|
449
|
-
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>=
|
|
449
|
+
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= Ye;
|
|
450
450
|
return Ve(n);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function $e(e) {
|
|
453
453
|
let t = Re(e);
|
|
454
454
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
455
|
-
let n =
|
|
456
|
-
for (let e of t) n += BigInt(e) *
|
|
457
|
-
return n >
|
|
455
|
+
let n = Je, r = Je;
|
|
456
|
+
for (let e of t) n += BigInt(e) * Xe ** r, r++;
|
|
457
|
+
return n > qe && (n += Ke + Ke), n;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
if (e <
|
|
459
|
+
function et(e) {
|
|
460
|
+
if (e < Ke || qe < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
461
461
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
462
462
|
return new DataView(t).setBigInt64(0, e, !0), Ve(new Uint8Array(t));
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function tt(e) {
|
|
465
465
|
let t = Re(e);
|
|
466
466
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
467
467
|
return new DataView(t.buffer).getBigInt64(0, !0);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
471
|
-
if (e.length >
|
|
469
|
+
var nt = DataView.prototype.setBigInt64 ? et : Qe, rt = DataView.prototype.getBigInt64 ? tt : $e, it = 1024;
|
|
470
|
+
function at(e) {
|
|
471
|
+
if (e.length > it) throw Error(`Field name ${e} exceeds maximum field name length ${it}.`);
|
|
472
472
|
if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
|
|
473
473
|
for (let t = 0; t < e.length; t += 1) {
|
|
474
474
|
let n = e.charCodeAt(t);
|
|
475
475
|
if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function ot(e) {
|
|
479
479
|
if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
|
|
480
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
480
|
+
if (Array.isArray(e)) return e.map((e) => ot(e));
|
|
481
481
|
if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
|
|
482
482
|
let t = Object.entries(e);
|
|
483
483
|
if (t.length === 1) {
|
|
@@ -488,89 +488,89 @@ function at(e) {
|
|
|
488
488
|
}
|
|
489
489
|
if (n === "$integer") {
|
|
490
490
|
if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
|
|
491
|
-
return
|
|
491
|
+
return rt(e.$integer);
|
|
492
492
|
}
|
|
493
493
|
if (n === "$float") {
|
|
494
494
|
if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
|
|
495
495
|
let t = Re(e.$float);
|
|
496
496
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
|
|
497
|
-
let n = new DataView(t.buffer).getFloat64(0,
|
|
498
|
-
if (!
|
|
497
|
+
let n = new DataView(t.buffer).getFloat64(0, Ge);
|
|
498
|
+
if (!Ze(n)) throw Error(`Float ${n} should be encoded as a number`);
|
|
499
499
|
return n;
|
|
500
500
|
}
|
|
501
501
|
if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
|
|
502
502
|
if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
|
|
503
503
|
}
|
|
504
504
|
let n = {};
|
|
505
|
-
for (let [t, r] of Object.entries(e))
|
|
505
|
+
for (let [t, r] of Object.entries(e)) at(t), n[t] = ot(r);
|
|
506
506
|
return n;
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
508
|
+
var st = 16384;
|
|
509
|
+
function ct(e) {
|
|
510
510
|
let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
|
|
511
|
-
if (t.length >
|
|
512
|
-
let e =
|
|
511
|
+
if (t.length > st) {
|
|
512
|
+
let e = st - 14, n = t.codePointAt(e - 1);
|
|
513
513
|
return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
|
|
514
514
|
}
|
|
515
515
|
return t;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function lt(e, t, n, r) {
|
|
518
518
|
if (e === void 0) {
|
|
519
|
-
let e = n && ` (present at path ${n} in original object ${
|
|
519
|
+
let e = n && ` (present at path ${n} in original object ${ct(t)})`;
|
|
520
520
|
throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
|
|
521
521
|
}
|
|
522
522
|
if (e === null) return e;
|
|
523
523
|
if (typeof e == "bigint") {
|
|
524
|
-
if (e <
|
|
525
|
-
return { $integer:
|
|
524
|
+
if (e < Ke || qe < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
525
|
+
return { $integer: nt(e) };
|
|
526
526
|
}
|
|
527
|
-
if (typeof e == "number") if (
|
|
527
|
+
if (typeof e == "number") if (Ze(e)) {
|
|
528
528
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
529
|
-
return new DataView(t).setFloat64(0, e,
|
|
529
|
+
return new DataView(t).setFloat64(0, e, Ge), { $float: Ve(new Uint8Array(t)) };
|
|
530
530
|
} else return e;
|
|
531
531
|
if (typeof e == "boolean" || typeof e == "string") return e;
|
|
532
532
|
if (e instanceof ArrayBuffer) return { $bytes: Ve(new Uint8Array(e)) };
|
|
533
|
-
if (Array.isArray(e)) return e.map((e, r) =>
|
|
534
|
-
if (e instanceof Set) throw Error(
|
|
535
|
-
if (e instanceof Map) throw Error(
|
|
536
|
-
if (!
|
|
533
|
+
if (Array.isArray(e)) return e.map((e, r) => lt(e, t, n + `[${r}]`, !1));
|
|
534
|
+
if (e instanceof Set) throw Error(ut(n, "Set", [...e], t));
|
|
535
|
+
if (e instanceof Map) throw Error(ut(n, "Map", [...e], t));
|
|
536
|
+
if (!We(e)) {
|
|
537
537
|
let r = e?.constructor?.name, i = r ? `${r} ` : "";
|
|
538
|
-
throw Error(
|
|
538
|
+
throw Error(ut(n, i, e, t));
|
|
539
539
|
}
|
|
540
540
|
let i = {}, a = Object.entries(e);
|
|
541
541
|
a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
|
|
542
|
-
for (let [e, o] of a) o === void 0 ? r && (
|
|
542
|
+
for (let [e, o] of a) o === void 0 ? r && (at(e), i[e] = dt(o, t, n + `.${e}`)) : (at(e), i[e] = lt(o, t, n + `.${e}`, !1));
|
|
543
543
|
return i;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
546
|
-
return e ? `${t}${
|
|
545
|
+
function ut(e, t, n, r) {
|
|
546
|
+
return e ? `${t}${ct(n)} is not a supported Convex type (present at path ${e} in original object ${ct(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${ct(n)} is not a supported Convex type.`;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function dt(e, t, n) {
|
|
549
549
|
if (e === void 0) return { $undefined: null };
|
|
550
|
-
if (t === void 0) throw Error(`Programming error. Current value is ${
|
|
551
|
-
return
|
|
550
|
+
if (t === void 0) throw Error(`Programming error. Current value is ${ct(e)} but original value is undefined`);
|
|
551
|
+
return lt(e, t, n, !1);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
553
|
+
function ft(e) {
|
|
554
|
+
return lt(e, e, "", !1);
|
|
555
555
|
}
|
|
556
556
|
//#endregion
|
|
557
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
558
|
-
var
|
|
557
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/errors.js
|
|
558
|
+
var pt = Object.defineProperty, mt = (e, t, n) => t in e ? pt(e, t, {
|
|
559
559
|
enumerable: !0,
|
|
560
560
|
configurable: !0,
|
|
561
561
|
writable: !0,
|
|
562
562
|
value: n
|
|
563
|
-
}) : e[t] = n,
|
|
563
|
+
}) : e[t] = n, ht = (e, t, n) => mt(e, typeof t == "symbol" ? t : t + "", n), gt, _t, vt = Symbol.for("ConvexError"), yt = class extends (_t = Error, gt = vt, _t) {
|
|
564
564
|
constructor(e) {
|
|
565
|
-
super(typeof e == "string" ? e :
|
|
565
|
+
super(typeof e == "string" ? e : ct(e)), ht(this, "name", "ConvexError"), ht(this, "data"), ht(this, gt, !0), this.data = e;
|
|
566
566
|
}
|
|
567
|
-
},
|
|
567
|
+
}, bt = Object.defineProperty, xt = (e, t, n) => t in e ? bt(e, t, {
|
|
568
568
|
enumerable: !0,
|
|
569
569
|
configurable: !0,
|
|
570
570
|
writable: !0,
|
|
571
571
|
value: n
|
|
572
|
-
}) : e[t] = n,
|
|
573
|
-
function
|
|
572
|
+
}) : e[t] = n, St = (e, t, n) => xt(e, typeof t == "symbol" ? t : t + "", n), Ct = "color:rgb(0, 145, 255)";
|
|
573
|
+
function wt(e) {
|
|
574
574
|
switch (e) {
|
|
575
575
|
case "query": return "Q";
|
|
576
576
|
case "mutation": return "M";
|
|
@@ -578,9 +578,9 @@ function Ct(e) {
|
|
|
578
578
|
case "any": return "?";
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
var
|
|
581
|
+
var Tt = class {
|
|
582
582
|
constructor(e) {
|
|
583
|
-
|
|
583
|
+
St(this, "_onLogLineFuncs"), St(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
584
584
|
}
|
|
585
585
|
addLogLineListener(e) {
|
|
586
586
|
let t = Math.random().toString(36).substring(2, 15);
|
|
@@ -602,8 +602,8 @@ var wt = class {
|
|
|
602
602
|
for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
|
-
function
|
|
606
|
-
let t = new
|
|
605
|
+
function Et(e) {
|
|
606
|
+
let t = new Tt(e);
|
|
607
607
|
return t.addLogLineListener((e, ...t) => {
|
|
608
608
|
switch (e) {
|
|
609
609
|
case "debug":
|
|
@@ -622,11 +622,11 @@ function Tt(e) {
|
|
|
622
622
|
}
|
|
623
623
|
}), t;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
return new
|
|
625
|
+
function Dt(e) {
|
|
626
|
+
return new Tt(e);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
let a =
|
|
628
|
+
function Ot(e, t, n, r, i) {
|
|
629
|
+
let a = wt(n);
|
|
630
630
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
|
|
631
631
|
let t = i.match(/^\[.*?\] /);
|
|
632
632
|
if (t === null) {
|
|
@@ -634,57 +634,57 @@ function Dt(e, t, n, r, i) {
|
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
636
|
let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
|
|
637
|
-
e.log(`%c[CONVEX ${a}(${r})] [${n}]`,
|
|
637
|
+
e.log(`%c[CONVEX ${a}(${r})] [${n}]`, Ct, o);
|
|
638
638
|
} else e.error(`[CONVEX ${a}(${r})] ${i}`);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function kt(e, t) {
|
|
641
641
|
let n = `[CONVEX FATAL ERROR] ${t}`;
|
|
642
642
|
return e.error(n), Error(n);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return `[CONVEX ${
|
|
644
|
+
function At(e, t, n) {
|
|
645
|
+
return `[CONVEX ${wt(e)}(${t})] ${n.errorMessage}
|
|
646
646
|
Called by client`;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function jt(e, t) {
|
|
649
649
|
return t.data = e.errorData, t;
|
|
650
650
|
}
|
|
651
651
|
//#endregion
|
|
652
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
653
|
-
function
|
|
652
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
|
|
653
|
+
function Mt(e) {
|
|
654
654
|
let t = e.split(":"), n, r;
|
|
655
655
|
return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Nt(e, t) {
|
|
658
658
|
return JSON.stringify({
|
|
659
|
-
udfPath:
|
|
660
|
-
args:
|
|
659
|
+
udfPath: Mt(e),
|
|
660
|
+
args: ft(t)
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Pt(e, t, n) {
|
|
664
664
|
let { initialNumItems: r, id: i } = n;
|
|
665
665
|
return JSON.stringify({
|
|
666
666
|
type: "paginated",
|
|
667
|
-
udfPath:
|
|
668
|
-
args:
|
|
669
|
-
options:
|
|
667
|
+
udfPath: Mt(e),
|
|
668
|
+
args: ft(t),
|
|
669
|
+
options: ft({
|
|
670
670
|
initialNumItems: r,
|
|
671
671
|
id: i
|
|
672
672
|
})
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Ft(e) {
|
|
676
676
|
return JSON.parse(e).type === "paginated";
|
|
677
677
|
}
|
|
678
678
|
//#endregion
|
|
679
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
680
|
-
var
|
|
679
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/local_state.js
|
|
680
|
+
var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
681
681
|
enumerable: !0,
|
|
682
682
|
configurable: !0,
|
|
683
683
|
writable: !0,
|
|
684
684
|
value: n
|
|
685
|
-
}) : e[t] = n,
|
|
685
|
+
}) : e[t] = n, W = (e, t, n) => Lt(e, typeof t == "symbol" ? t : t + "", n), Rt = class {
|
|
686
686
|
constructor() {
|
|
687
|
-
|
|
687
|
+
W(this, "nextQueryId"), W(this, "querySetVersion"), W(this, "querySet"), W(this, "queryIdToToken"), W(this, "identityVersion"), W(this, "auth"), W(this, "outstandingQueriesOlderThanRestart"), W(this, "outstandingAuthOlderThanRestart"), W(this, "paused"), W(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
688
688
|
}
|
|
689
689
|
hasSyncedPastLastReconnect() {
|
|
690
690
|
return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
|
|
@@ -693,7 +693,7 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
693
693
|
this.outstandingAuthOlderThanRestart = !1;
|
|
694
694
|
}
|
|
695
695
|
subscribe(e, t, n, r) {
|
|
696
|
-
let i =
|
|
696
|
+
let i = Mt(e), a = Nt(i, t), o = this.querySet.get(a);
|
|
697
697
|
if (o !== void 0) return o.numSubscribers += 1, {
|
|
698
698
|
queryToken: a,
|
|
699
699
|
modification: null,
|
|
@@ -713,7 +713,7 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
713
713
|
type: "Add",
|
|
714
714
|
queryId: e,
|
|
715
715
|
udfPath: i,
|
|
716
|
-
args: [
|
|
716
|
+
args: [ft(t)],
|
|
717
717
|
journal: n,
|
|
718
718
|
componentPath: r
|
|
719
719
|
};
|
|
@@ -748,7 +748,7 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
queryId(e, t) {
|
|
751
|
-
let n = Mt(
|
|
751
|
+
let n = Nt(Mt(e), t), r = this.querySet.get(n);
|
|
752
752
|
return r === void 0 ? null : r.id;
|
|
753
753
|
}
|
|
754
754
|
isCurrentOrNewerAuthVersion(e) {
|
|
@@ -820,7 +820,7 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
820
820
|
type: "Add",
|
|
821
821
|
queryId: t.id,
|
|
822
822
|
udfPath: t.canonicalizedUdfPath,
|
|
823
|
-
args: [
|
|
823
|
+
args: [ft(t.args)],
|
|
824
824
|
journal: t.journal,
|
|
825
825
|
componentPath: t.componentPath
|
|
826
826
|
};
|
|
@@ -878,14 +878,14 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
},
|
|
881
|
+
}, zt = Object.defineProperty, Bt = (e, t, n) => t in e ? zt(e, t, {
|
|
882
882
|
enumerable: !0,
|
|
883
883
|
configurable: !0,
|
|
884
884
|
writable: !0,
|
|
885
885
|
value: n
|
|
886
|
-
}) : e[t] = n,
|
|
886
|
+
}) : e[t] = n, Vt = (e, t, n) => Bt(e, typeof t == "symbol" ? t : t + "", n), Ht = class {
|
|
887
887
|
constructor(e, t) {
|
|
888
|
-
this.logger = e, this.markConnectionStateDirty = t,
|
|
888
|
+
this.logger = e, this.markConnectionStateDirty = t, Vt(this, "inflightRequests"), Vt(this, "requestsOlderThanRestart"), Vt(this, "inflightMutationsCount", 0), Vt(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
889
889
|
}
|
|
890
890
|
request(e, t) {
|
|
891
891
|
let n = new Promise((n) => {
|
|
@@ -905,19 +905,19 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
905
905
|
let t = this.inflightRequests.get(e.requestId);
|
|
906
906
|
if (t === void 0 || t.status.status === "Completed") return null;
|
|
907
907
|
let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
|
|
908
|
-
for (let t of e.logLines)
|
|
908
|
+
for (let t of e.logLines) Ot(this.logger, "info", n, r, t);
|
|
909
909
|
let i = t.status, a, o;
|
|
910
910
|
if (e.success) a = {
|
|
911
911
|
success: !0,
|
|
912
912
|
logLines: e.logLines,
|
|
913
|
-
value:
|
|
913
|
+
value: ot(e.result)
|
|
914
914
|
}, o = () => i.onResult(a);
|
|
915
915
|
else {
|
|
916
916
|
let t = e.result, { errorData: s } = e;
|
|
917
|
-
|
|
917
|
+
Ot(this.logger, "error", n, r, t), a = {
|
|
918
918
|
success: !1,
|
|
919
919
|
errorMessage: t,
|
|
920
|
-
errorData: s === void 0 ? void 0 :
|
|
920
|
+
errorData: s === void 0 ? void 0 : ot(s),
|
|
921
921
|
logLines: e.logLines
|
|
922
922
|
}, o = () => i.onResult(a);
|
|
923
923
|
}
|
|
@@ -989,41 +989,41 @@ var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
|
989
989
|
inflightActions() {
|
|
990
990
|
return this.inflightActionsCount;
|
|
991
991
|
}
|
|
992
|
-
},
|
|
993
|
-
function Wt(e) {
|
|
994
|
-
return e[Ut] ?? null;
|
|
995
|
-
}
|
|
992
|
+
}, Ut = Symbol.for("functionName"), Wt = Symbol.for("toReferencePath");
|
|
996
993
|
function Gt(e) {
|
|
997
|
-
return e
|
|
994
|
+
return e[Wt] ?? null;
|
|
998
995
|
}
|
|
999
996
|
function Kt(e) {
|
|
997
|
+
return e.startsWith("function://");
|
|
998
|
+
}
|
|
999
|
+
function qt(e) {
|
|
1000
1000
|
let t;
|
|
1001
|
-
if (typeof e == "string") t =
|
|
1002
|
-
else if (e[
|
|
1001
|
+
if (typeof e == "string") t = Kt(e) ? { functionHandle: e } : { name: e };
|
|
1002
|
+
else if (e[Ut]) t = { name: e[Ut] };
|
|
1003
1003
|
else {
|
|
1004
|
-
let n =
|
|
1004
|
+
let n = Gt(e);
|
|
1005
1005
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1006
1006
|
t = { reference: n };
|
|
1007
1007
|
}
|
|
1008
1008
|
return t;
|
|
1009
1009
|
}
|
|
1010
1010
|
//#endregion
|
|
1011
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1012
|
-
function
|
|
1013
|
-
let t =
|
|
1011
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/server/api.js
|
|
1012
|
+
function G(e) {
|
|
1013
|
+
let t = qt(e);
|
|
1014
1014
|
if (t.name === void 0) throw t.functionHandle === void 0 ? t.reference === void 0 ? Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`) : Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`) : Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);
|
|
1015
1015
|
if (typeof e == "string") return e;
|
|
1016
|
-
let n = e[
|
|
1016
|
+
let n = e[Ut];
|
|
1017
1017
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1018
1018
|
return n;
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return { [
|
|
1020
|
+
function Jt(e) {
|
|
1021
|
+
return { [Ut]: e };
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Yt(e = []) {
|
|
1024
1024
|
return new Proxy({}, { get(t, n) {
|
|
1025
|
-
if (typeof n == "string") return
|
|
1026
|
-
if (n ===
|
|
1025
|
+
if (typeof n == "string") return Yt([...e, n]);
|
|
1026
|
+
if (n === Ut) {
|
|
1027
1027
|
if (e.length < 2) {
|
|
1028
1028
|
let t = ["api", ...e].join(".");
|
|
1029
1029
|
throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``);
|
|
@@ -1034,32 +1034,32 @@ function Jt(e = []) {
|
|
|
1034
1034
|
else return;
|
|
1035
1035
|
} });
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1037
|
+
Yt();
|
|
1038
1038
|
//#endregion
|
|
1039
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1040
|
-
var
|
|
1039
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/optimistic_updates_impl.js
|
|
1040
|
+
var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
1041
1041
|
enumerable: !0,
|
|
1042
1042
|
configurable: !0,
|
|
1043
1043
|
writable: !0,
|
|
1044
1044
|
value: n
|
|
1045
|
-
}) : e[t] = n,
|
|
1045
|
+
}) : e[t] = n, Qt = (e, t, n) => Zt(e, typeof t == "symbol" ? t : t + "", n), $t = class e {
|
|
1046
1046
|
constructor(e) {
|
|
1047
|
-
|
|
1047
|
+
Qt(this, "queryResults"), Qt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1048
1048
|
}
|
|
1049
1049
|
getQuery(t, ...n) {
|
|
1050
|
-
let r =
|
|
1050
|
+
let r = He(n[0]), i = G(t), a = this.queryResults.get(Nt(i, r));
|
|
1051
1051
|
if (a !== void 0) return e.queryValue(a.result);
|
|
1052
1052
|
}
|
|
1053
1053
|
getAllQueries(t) {
|
|
1054
|
-
let n = [], r =
|
|
1055
|
-
for (let t of this.queryResults.values()) t.udfPath ===
|
|
1054
|
+
let n = [], r = G(t);
|
|
1055
|
+
for (let t of this.queryResults.values()) t.udfPath === Mt(r) && n.push({
|
|
1056
1056
|
args: t.args,
|
|
1057
1057
|
value: e.queryValue(t.result)
|
|
1058
1058
|
});
|
|
1059
1059
|
return n;
|
|
1060
1060
|
}
|
|
1061
1061
|
setQuery(e, t, n) {
|
|
1062
|
-
let r =
|
|
1062
|
+
let r = He(t), i = G(e), a = Nt(i, r), o;
|
|
1063
1063
|
o = n === void 0 ? void 0 : {
|
|
1064
1064
|
success: !0,
|
|
1065
1065
|
value: n,
|
|
@@ -1075,15 +1075,15 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1075
1075
|
static queryValue(e) {
|
|
1076
1076
|
if (e !== void 0 && e.success) return e.value;
|
|
1077
1077
|
}
|
|
1078
|
-
},
|
|
1078
|
+
}, en = class {
|
|
1079
1079
|
constructor() {
|
|
1080
|
-
|
|
1080
|
+
Qt(this, "queryResults"), Qt(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1081
1081
|
}
|
|
1082
1082
|
ingestQueryResultsFromServer(e, t) {
|
|
1083
1083
|
this.optimisticUpdates = this.optimisticUpdates.filter((e) => !t.has(e.mutationId));
|
|
1084
1084
|
let n = this.queryResults;
|
|
1085
1085
|
this.queryResults = new Map(e);
|
|
1086
|
-
let r = new
|
|
1086
|
+
let r = new $t(this.queryResults);
|
|
1087
1087
|
for (let e of this.optimisticUpdates) e.update(r);
|
|
1088
1088
|
let i = [];
|
|
1089
1089
|
for (let [e, t] of this.queryResults) {
|
|
@@ -1097,7 +1097,7 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1097
1097
|
update: e,
|
|
1098
1098
|
mutationId: t
|
|
1099
1099
|
});
|
|
1100
|
-
let n = new
|
|
1100
|
+
let n = new $t(this.queryResults);
|
|
1101
1101
|
return e(n), n.modifiedQueries;
|
|
1102
1102
|
}
|
|
1103
1103
|
rawQueryResult(e) {
|
|
@@ -1110,7 +1110,7 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1110
1110
|
let n = t.result;
|
|
1111
1111
|
if (n !== void 0) {
|
|
1112
1112
|
if (n.success) return n.value;
|
|
1113
|
-
throw n.errorData === void 0 ? Error(
|
|
1113
|
+
throw n.errorData === void 0 ? Error(At("query", t.udfPath, n)) : jt(n, new yt(At("query", t.udfPath, n)));
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
hasQueryResult(e) {
|
|
@@ -1119,14 +1119,14 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1119
1119
|
queryLogs(e) {
|
|
1120
1120
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, tn = Object.defineProperty, nn = (e, t, n) => t in e ? tn(e, t, {
|
|
1123
1123
|
enumerable: !0,
|
|
1124
1124
|
configurable: !0,
|
|
1125
1125
|
writable: !0,
|
|
1126
1126
|
value: n
|
|
1127
|
-
}) : e[t] = n,
|
|
1127
|
+
}) : e[t] = n, rn = (e, t, n) => nn(e, typeof t == "symbol" ? t : t + "", n), an = class e {
|
|
1128
1128
|
constructor(e, t) {
|
|
1129
|
-
|
|
1129
|
+
rn(this, "low"), rn(this, "high"), rn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
|
|
1130
1130
|
}
|
|
1131
1131
|
static isLong(e) {
|
|
1132
1132
|
return (e && e.__isUnsignedLong__) === !0;
|
|
@@ -1148,10 +1148,10 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1148
1148
|
];
|
|
1149
1149
|
}
|
|
1150
1150
|
static fromNumber(t) {
|
|
1151
|
-
return isNaN(t) || t < 0 ?
|
|
1151
|
+
return isNaN(t) || t < 0 ? on : t >= ln ? un : new e(t % cn | 0, t / cn | 0);
|
|
1152
1152
|
}
|
|
1153
1153
|
toString() {
|
|
1154
|
-
return (BigInt(this.high) * BigInt(
|
|
1154
|
+
return (BigInt(this.high) * BigInt(cn) + BigInt(this.low)).toString();
|
|
1155
1155
|
}
|
|
1156
1156
|
equals(t) {
|
|
1157
1157
|
return e.isLong(t) || (t = e.fromValue(t)), this.high >>> 31 == 1 && t.high >>> 31 == 1 ? !1 : this.high === t.high && this.low === t.low;
|
|
@@ -1168,16 +1168,16 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1168
1168
|
static fromValue(t) {
|
|
1169
1169
|
return typeof t == "number" ? e.fromNumber(t) : new e(t.low, t.high);
|
|
1170
1170
|
}
|
|
1171
|
-
},
|
|
1171
|
+
}, on = new an(0, 0), sn = 65536, cn = sn * sn, ln = cn * cn, un = new an(-1, -1), dn = Object.defineProperty, fn = (e, t, n) => t in e ? dn(e, t, {
|
|
1172
1172
|
enumerable: !0,
|
|
1173
1173
|
configurable: !0,
|
|
1174
1174
|
writable: !0,
|
|
1175
1175
|
value: n
|
|
1176
|
-
}) : e[t] = n,
|
|
1176
|
+
}) : e[t] = n, pn = (e, t, n) => fn(e, typeof t == "symbol" ? t : t + "", n), mn = class {
|
|
1177
1177
|
constructor(e, t) {
|
|
1178
|
-
|
|
1178
|
+
pn(this, "version"), pn(this, "remoteQuerySet"), pn(this, "queryPath"), pn(this, "logger"), this.version = {
|
|
1179
1179
|
querySet: 0,
|
|
1180
|
-
ts:
|
|
1180
|
+
ts: an.fromNumber(0),
|
|
1181
1181
|
identity: 0
|
|
1182
1182
|
}, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = t;
|
|
1183
1183
|
}
|
|
@@ -1187,8 +1187,8 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1187
1187
|
for (let t of e.modifications) switch (t.type) {
|
|
1188
1188
|
case "QueryUpdated": {
|
|
1189
1189
|
let e = this.queryPath(t.queryId);
|
|
1190
|
-
if (e) for (let n of t.logLines)
|
|
1191
|
-
let n =
|
|
1190
|
+
if (e) for (let n of t.logLines) Ot(this.logger, "info", "query", e, n);
|
|
1191
|
+
let n = ot(t.value ?? null);
|
|
1192
1192
|
this.remoteQuerySet.set(t.queryId, {
|
|
1193
1193
|
success: !0,
|
|
1194
1194
|
value: n,
|
|
@@ -1198,12 +1198,12 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
case "QueryFailed": {
|
|
1200
1200
|
let e = this.queryPath(t.queryId);
|
|
1201
|
-
if (e) for (let n of t.logLines)
|
|
1201
|
+
if (e) for (let n of t.logLines) Ot(this.logger, "info", "query", e, n);
|
|
1202
1202
|
let { errorData: n } = t;
|
|
1203
1203
|
this.remoteQuerySet.set(t.queryId, {
|
|
1204
1204
|
success: !1,
|
|
1205
1205
|
errorMessage: t.errorMessage,
|
|
1206
|
-
errorData: n === void 0 ? void 0 :
|
|
1206
|
+
errorData: n === void 0 ? void 0 : ot(n),
|
|
1207
1207
|
logLines: t.logLines
|
|
1208
1208
|
});
|
|
1209
1209
|
break;
|
|
@@ -1223,15 +1223,15 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
};
|
|
1225
1225
|
//#endregion
|
|
1226
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1227
|
-
function
|
|
1226
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/protocol.js
|
|
1227
|
+
function hn(e) {
|
|
1228
1228
|
let t = Re(e);
|
|
1229
|
-
return
|
|
1229
|
+
return an.fromBytesLE(Array.from(t));
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function gn(e) {
|
|
1232
1232
|
return Ve(new Uint8Array(e.toBytesLE()));
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function _n(e) {
|
|
1235
1235
|
switch (e.type) {
|
|
1236
1236
|
case "FatalError":
|
|
1237
1237
|
case "AuthError":
|
|
@@ -1240,23 +1240,23 @@ function gn(e) {
|
|
|
1240
1240
|
case "Ping": return { ...e };
|
|
1241
1241
|
case "MutationResponse": return e.success ? {
|
|
1242
1242
|
...e,
|
|
1243
|
-
ts:
|
|
1243
|
+
ts: hn(e.ts)
|
|
1244
1244
|
} : { ...e };
|
|
1245
1245
|
case "Transition": return {
|
|
1246
1246
|
...e,
|
|
1247
1247
|
startVersion: {
|
|
1248
1248
|
...e.startVersion,
|
|
1249
|
-
ts:
|
|
1249
|
+
ts: hn(e.startVersion.ts)
|
|
1250
1250
|
},
|
|
1251
1251
|
endVersion: {
|
|
1252
1252
|
...e.endVersion,
|
|
1253
|
-
ts:
|
|
1253
|
+
ts: hn(e.endVersion.ts)
|
|
1254
1254
|
}
|
|
1255
1255
|
};
|
|
1256
1256
|
default:
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function vn(e) {
|
|
1260
1260
|
switch (e.type) {
|
|
1261
1261
|
case "Authenticate":
|
|
1262
1262
|
case "ModifyQuerySet":
|
|
@@ -1268,26 +1268,26 @@ function _n(e) {
|
|
|
1268
1268
|
maxObservedTimestamp: void 0
|
|
1269
1269
|
} : {
|
|
1270
1270
|
...e,
|
|
1271
|
-
maxObservedTimestamp:
|
|
1271
|
+
maxObservedTimestamp: gn(e.maxObservedTimestamp)
|
|
1272
1272
|
};
|
|
1273
1273
|
default:
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
1276
|
//#endregion
|
|
1277
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1278
|
-
var
|
|
1277
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/web_socket_manager.js
|
|
1278
|
+
var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
|
|
1279
1279
|
enumerable: !0,
|
|
1280
1280
|
configurable: !0,
|
|
1281
1281
|
writable: !0,
|
|
1282
1282
|
value: n
|
|
1283
|
-
}) : e[t] = n,
|
|
1284
|
-
function Tn() {
|
|
1285
|
-
return wn === void 0 && (wn = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(wn + performance.now());
|
|
1286
|
-
}
|
|
1283
|
+
}) : e[t] = n, K = (e, t, n) => bn(e, typeof t == "symbol" ? t : t + "", n), xn = 1e3, Sn = 1001, Cn = 1005, wn = 4040, Tn;
|
|
1287
1284
|
function En() {
|
|
1288
|
-
return
|
|
1285
|
+
return Tn === void 0 && (Tn = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(Tn + performance.now());
|
|
1286
|
+
}
|
|
1287
|
+
function Dn() {
|
|
1288
|
+
return `t=${Math.round((En() - Tn) / 100) / 10}s`;
|
|
1289
1289
|
}
|
|
1290
|
-
var
|
|
1290
|
+
var On = {
|
|
1291
1291
|
InternalServerError: { timeout: 1e3 },
|
|
1292
1292
|
SubscriptionsWorkerFullError: { timeout: 3e3 },
|
|
1293
1293
|
TooManyConcurrentRequests: { timeout: 3e3 },
|
|
@@ -1303,14 +1303,14 @@ var Dn = {
|
|
|
1303
1303
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1304
1304
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1305
1305
|
};
|
|
1306
|
-
function
|
|
1306
|
+
function kn(e) {
|
|
1307
1307
|
if (e === void 0) return "Unknown";
|
|
1308
|
-
for (let t of Object.keys(
|
|
1308
|
+
for (let t of Object.keys(On)) if (e.startsWith(t)) return t;
|
|
1309
1309
|
return "Unknown";
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1311
|
+
var An = class {
|
|
1312
1312
|
constructor(e, t, n, r, i, a) {
|
|
1313
|
-
this.markConnectionStateDirty = i, this.debug = a,
|
|
1313
|
+
this.markConnectionStateDirty = i, this.debug = a, K(this, "socket"), K(this, "connectionCount"), K(this, "_hasEverConnected", !1), K(this, "lastCloseReason"), K(this, "transitionChunkBuffer", null), K(this, "defaultInitialBackoff"), K(this, "maxBackoff"), K(this, "retries"), K(this, "serverInactivityThreshold"), K(this, "reconnectDueToServerInactivityTimeout"), K(this, "scheduledReconnect", null), K(this, "networkOnlineHandler", null), K(this, "pendingNetworkRecoveryInfo", null), K(this, "uri"), K(this, "onOpen"), K(this, "onResume"), K(this, "onMessage"), K(this, "webSocketConstructor"), K(this, "logger"), K(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
|
|
1314
1314
|
}
|
|
1315
1315
|
setSocketState(e) {
|
|
1316
1316
|
this.socket = e, this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused" in this.socket ? this.socket.paused : void 0}`), this.markConnectionStateDirty();
|
|
@@ -1336,7 +1336,7 @@ var kn = class {
|
|
|
1336
1336
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1337
1337
|
let e = this.transitionChunkBuffer.chunks.join("");
|
|
1338
1338
|
this.transitionChunkBuffer = null;
|
|
1339
|
-
let t =
|
|
1339
|
+
let t = _n(JSON.parse(e));
|
|
1340
1340
|
if (t.type !== "Transition") throw Error(`Expected Transition, got ${t.type} after assembling chunks`);
|
|
1341
1341
|
return t;
|
|
1342
1342
|
}
|
|
@@ -1359,8 +1359,8 @@ var kn = class {
|
|
|
1359
1359
|
}), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
|
|
1360
1360
|
connectionCount: this.connectionCount,
|
|
1361
1361
|
lastCloseReason: this.lastCloseReason,
|
|
1362
|
-
clientTs:
|
|
1363
|
-
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at",
|
|
1362
|
+
clientTs: En()
|
|
1363
|
+
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", Dn(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", Dn())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1364
1364
|
let { timeSavedMs: e } = this.pendingNetworkRecoveryInfo;
|
|
1365
1365
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1366
1366
|
type: "Event",
|
|
@@ -1374,7 +1374,7 @@ var kn = class {
|
|
|
1374
1374
|
t && this.logger.log(`WebSocket error message: ${t}`);
|
|
1375
1375
|
}, e.onmessage = (e) => {
|
|
1376
1376
|
this.resetServerInactivityTimeout();
|
|
1377
|
-
let t = e.data.length, n =
|
|
1377
|
+
let t = e.data.length, n = _n(JSON.parse(e.data));
|
|
1378
1378
|
if (this._logVerbose(`received ws message with type ${n.type}`), n.type !== "Ping") {
|
|
1379
1379
|
if (n.type === "TransitionChunk") {
|
|
1380
1380
|
let e = this.assembleTransition(n);
|
|
@@ -1387,11 +1387,11 @@ var kn = class {
|
|
|
1387
1387
|
}), this.onMessage(n).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1388
1388
|
}
|
|
1389
1389
|
}, e.onclose = (e) => {
|
|
1390
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !==
|
|
1390
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== xn && e.code !== Sn && e.code !== Cn && e.code !== wn) {
|
|
1391
1391
|
let t = `WebSocket closed with code ${e.code}`;
|
|
1392
1392
|
e.reason && (t += `: ${e.reason}`), this.logger.log(t), this.onServerDisconnectError && e.reason && this.onServerDisconnectError(t);
|
|
1393
1393
|
}
|
|
1394
|
-
let t =
|
|
1394
|
+
let t = kn(e.reason);
|
|
1395
1395
|
this.scheduleReconnect(t);
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
@@ -1404,7 +1404,7 @@ var kn = class {
|
|
|
1404
1404
|
...e.type === "Authenticate" && e.tokenType === "User" ? { value: `...${e.value.slice(-7)}` } : {}
|
|
1405
1405
|
};
|
|
1406
1406
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1407
|
-
let n =
|
|
1407
|
+
let n = vn(e), r = JSON.stringify(n), i = !1;
|
|
1408
1408
|
try {
|
|
1409
1409
|
this.socket.ws.send(r), i = !0;
|
|
1410
1410
|
} catch (e) {
|
|
@@ -1423,7 +1423,7 @@ var kn = class {
|
|
|
1423
1423
|
this.scheduledReconnect &&= (clearTimeout(this.scheduledReconnect.timeout), null), this.socket = { state: "disconnected" };
|
|
1424
1424
|
let t = this.nextBackoff(e);
|
|
1425
1425
|
this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);
|
|
1426
|
-
let n =
|
|
1426
|
+
let n = En(), r = setTimeout(() => {
|
|
1427
1427
|
this.scheduledReconnect?.timeout === r && (this.scheduledReconnect = null, this.connect());
|
|
1428
1428
|
}, t);
|
|
1429
1429
|
this.scheduledReconnect = {
|
|
@@ -1541,7 +1541,7 @@ var kn = class {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
let e = null;
|
|
1543
1543
|
if (this.scheduledReconnect) {
|
|
1544
|
-
let t =
|
|
1544
|
+
let t = En() - this.scheduledReconnect.scheduledAt;
|
|
1545
1545
|
e = Math.max(0, this.scheduledReconnect.backoffMs - t), this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
|
|
1546
1546
|
}
|
|
1547
1547
|
this.logger.log("Network recovery detected, reconnecting immediately"), this.pendingNetworkRecoveryInfo = e === null ? null : { timeSavedMs: e }, this.connect();
|
|
@@ -1561,7 +1561,7 @@ var kn = class {
|
|
|
1561
1561
|
}, this._hasEverConnected = !0, this.onOpen({
|
|
1562
1562
|
connectionCount: this.connectionCount,
|
|
1563
1563
|
lastCloseReason: this.lastCloseReason,
|
|
1564
|
-
clientTs:
|
|
1564
|
+
clientTs: En()
|
|
1565
1565
|
})) : this.socket.paused === "yes" && (this.socket = {
|
|
1566
1566
|
...this.socket,
|
|
1567
1567
|
paused: "no"
|
|
@@ -1586,14 +1586,14 @@ var kn = class {
|
|
|
1586
1586
|
this.logger.logVerbose(e);
|
|
1587
1587
|
}
|
|
1588
1588
|
nextBackoff(e) {
|
|
1589
|
-
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
1589
|
+
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : On[e].timeout) * 2 ** this.retries;
|
|
1590
1590
|
this.retries += 1;
|
|
1591
1591
|
let n = Math.min(t, this.maxBackoff);
|
|
1592
1592
|
return n + n * (Math.random() - .5);
|
|
1593
1593
|
}
|
|
1594
1594
|
reportLargeTransition({ transition: e, messageLength: t }) {
|
|
1595
1595
|
if (e.clientClockSkew === void 0 || e.serverTs === void 0) return;
|
|
1596
|
-
let n =
|
|
1596
|
+
let n = En() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
|
|
1597
1597
|
this._logVerbose(`received ${i} transition in ${r} at ${o}`), t > 2e7 ? this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`) : n > 2e4 && this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`), this.debug && this.sendMessage({
|
|
1598
1598
|
type: "Event",
|
|
1599
1599
|
eventType: "ClientReceivedTransition",
|
|
@@ -1605,27 +1605,27 @@ var kn = class {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
1607
|
//#endregion
|
|
1608
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1609
|
-
function An() {
|
|
1610
|
-
return jn();
|
|
1611
|
-
}
|
|
1608
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/session.js
|
|
1612
1609
|
function jn() {
|
|
1610
|
+
return Mn();
|
|
1611
|
+
}
|
|
1612
|
+
function Mn() {
|
|
1613
1613
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
1614
1614
|
let t = Math.random() * 16 | 0;
|
|
1615
1615
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
1616
1616
|
});
|
|
1617
1617
|
}
|
|
1618
1618
|
//#endregion
|
|
1619
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1620
|
-
var
|
|
1621
|
-
|
|
1622
|
-
function
|
|
1619
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/vendor/jwt-decode/index.js
|
|
1620
|
+
var Nn = class extends Error {};
|
|
1621
|
+
Nn.prototype.name = "InvalidTokenError";
|
|
1622
|
+
function Pn(e) {
|
|
1623
1623
|
return decodeURIComponent(atob(e).replace(/(.)/g, (e, t) => {
|
|
1624
1624
|
let n = t.charCodeAt(0).toString(16).toUpperCase();
|
|
1625
1625
|
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
1626
1626
|
}));
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function Fn(e) {
|
|
1629
1629
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
1630
1630
|
switch (t.length % 4) {
|
|
1631
1631
|
case 0: break;
|
|
@@ -1638,38 +1638,38 @@ function Pn(e) {
|
|
|
1638
1638
|
default: throw Error("base64 string is not of the correct length");
|
|
1639
1639
|
}
|
|
1640
1640
|
try {
|
|
1641
|
-
return
|
|
1641
|
+
return Pn(t);
|
|
1642
1642
|
} catch {
|
|
1643
1643
|
return atob(t);
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1647
|
-
if (typeof e != "string") throw new
|
|
1646
|
+
function In(e, t) {
|
|
1647
|
+
if (typeof e != "string") throw new Nn("Invalid token specified: must be a string");
|
|
1648
1648
|
t ||= {};
|
|
1649
1649
|
let n = t.header === !0 ? 0 : 1, r = e.split(".")[n];
|
|
1650
|
-
if (typeof r != "string") throw new
|
|
1650
|
+
if (typeof r != "string") throw new Nn(`Invalid token specified: missing part #${n + 1}`);
|
|
1651
1651
|
let i;
|
|
1652
1652
|
try {
|
|
1653
|
-
i =
|
|
1653
|
+
i = Fn(r);
|
|
1654
1654
|
} catch (e) {
|
|
1655
|
-
throw new
|
|
1655
|
+
throw new Nn(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
|
|
1656
1656
|
}
|
|
1657
1657
|
try {
|
|
1658
1658
|
return JSON.parse(i);
|
|
1659
1659
|
} catch (e) {
|
|
1660
|
-
throw new
|
|
1660
|
+
throw new Nn(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
1663
|
//#endregion
|
|
1664
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1665
|
-
var
|
|
1664
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/authentication_manager.js
|
|
1665
|
+
var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
|
|
1666
1666
|
enumerable: !0,
|
|
1667
1667
|
configurable: !0,
|
|
1668
1668
|
writable: !0,
|
|
1669
1669
|
value: n
|
|
1670
|
-
}) : e[t] = n,
|
|
1670
|
+
}) : e[t] = n, q = (e, t, n) => Rn(e, typeof t == "symbol" ? t : t + "", n), zn = 480 * 60 * 60 * 1e3, Bn = 2, Vn = class {
|
|
1671
1671
|
constructor(e, t, n) {
|
|
1672
|
-
|
|
1672
|
+
q(this, "authState", { state: "noAuth" }), q(this, "configVersion", 0), q(this, "syncState"), q(this, "authenticate"), q(this, "stopSocket"), q(this, "tryRestartSocket"), q(this, "pauseSocket"), q(this, "resumeSocket"), q(this, "clearAuth"), q(this, "logger"), q(this, "refreshTokenLeewaySeconds"), q(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
|
|
1673
1673
|
}
|
|
1674
1674
|
async setConfig(e, t) {
|
|
1675
1675
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -1711,11 +1711,11 @@ var In = Object.defineProperty, Ln = (e, t, n) => t in e ? In(e, t, {
|
|
|
1711
1711
|
this.tryToReauthenticate(e);
|
|
1712
1712
|
}
|
|
1713
1713
|
async tryToReauthenticate(e) {
|
|
1714
|
-
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
1714
|
+
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= Bn) {
|
|
1715
1715
|
this.logger.error(`Failed to authenticate: "${e.error}", check your server auth config`), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
1716
1716
|
return;
|
|
1717
1717
|
}
|
|
1718
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${
|
|
1718
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${Bn - this.tokenConfirmationAttempts} attempts remaining`)), await this.stopSocket();
|
|
1719
1719
|
let t = await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken, { forceRefreshToken: !0 });
|
|
1720
1720
|
t.isFromOutdatedConfig || (t.value && this.syncState.isNewAuth(t.value) ? (this.authenticate(t.value), this.setAuthState({
|
|
1721
1721
|
state: "waitingForServerConfirmationOfFreshToken",
|
|
@@ -1755,7 +1755,7 @@ var In = Object.defineProperty, Ln = (e, t, n) => t in e ? In(e, t, {
|
|
|
1755
1755
|
this.logger.error("Auth token does not live long enough, cannot refetch the token");
|
|
1756
1756
|
return;
|
|
1757
1757
|
}
|
|
1758
|
-
let a = Math.min(
|
|
1758
|
+
let a = Math.min(zn, (i - this.refreshTokenLeewaySeconds) * 1e3);
|
|
1759
1759
|
a <= 0 && (this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${i}s`), a = 0);
|
|
1760
1760
|
let o = setTimeout(() => {
|
|
1761
1761
|
this._logVerbose("running scheduled token refetch"), this.refetchToken();
|
|
@@ -1805,7 +1805,7 @@ var In = Object.defineProperty, Ln = (e, t, n) => t in e ? In(e, t, {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
decodeToken(e) {
|
|
1807
1807
|
try {
|
|
1808
|
-
return
|
|
1808
|
+
return In(e);
|
|
1809
1809
|
} catch (e) {
|
|
1810
1810
|
return this._logVerbose(`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`), null;
|
|
1811
1811
|
}
|
|
@@ -1813,41 +1813,41 @@ var In = Object.defineProperty, Ln = (e, t, n) => t in e ? In(e, t, {
|
|
|
1813
1813
|
_logVerbose(e) {
|
|
1814
1814
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
1815
1815
|
}
|
|
1816
|
-
},
|
|
1816
|
+
}, Hn = [
|
|
1817
1817
|
"convexClientConstructed",
|
|
1818
1818
|
"convexWebSocketOpen",
|
|
1819
1819
|
"convexFirstMessageReceived"
|
|
1820
1820
|
];
|
|
1821
|
-
function
|
|
1821
|
+
function Un(e, t) {
|
|
1822
1822
|
let n = { sessionId: t };
|
|
1823
1823
|
typeof performance > "u" || !performance.mark || performance.mark(e, { detail: n });
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function Wn(e) {
|
|
1826
1826
|
let t = e.name.slice(6);
|
|
1827
1827
|
return t = t.charAt(0).toLowerCase() + t.slice(1), {
|
|
1828
1828
|
name: t,
|
|
1829
1829
|
startTime: e.startTime
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function Gn(e) {
|
|
1833
1833
|
if (typeof performance > "u" || !performance.getEntriesByName) return [];
|
|
1834
1834
|
let t = [];
|
|
1835
|
-
for (let n of
|
|
1835
|
+
for (let n of Hn) {
|
|
1836
1836
|
let r = performance.getEntriesByName(n).filter((e) => e.entryType === "mark").filter((t) => t.detail.sessionId === e);
|
|
1837
1837
|
t.push(...r);
|
|
1838
1838
|
}
|
|
1839
|
-
return t.map(
|
|
1839
|
+
return t.map(Wn);
|
|
1840
1840
|
}
|
|
1841
1841
|
//#endregion
|
|
1842
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
1843
|
-
var
|
|
1842
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/client.js
|
|
1843
|
+
var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
1844
1844
|
enumerable: !0,
|
|
1845
1845
|
configurable: !0,
|
|
1846
1846
|
writable: !0,
|
|
1847
1847
|
value: n
|
|
1848
|
-
}) : e[t] = n,
|
|
1848
|
+
}) : e[t] = n, J = (e, t, n) => qn(e, typeof t == "symbol" ? t : t + "", n), Jn = class {
|
|
1849
1849
|
constructor(e, t, n) {
|
|
1850
|
-
if (
|
|
1850
|
+
if (J(this, "address"), J(this, "state"), J(this, "requestManager"), J(this, "webSocketManager"), J(this, "authenticationManager"), J(this, "remoteQuerySet"), J(this, "optimisticQueryResults"), J(this, "_transitionHandlerCounter", 0), J(this, "_nextRequestId"), J(this, "_onTransitionFns", /* @__PURE__ */ new Map()), J(this, "_sessionId"), J(this, "firstMessageReceived", !1), J(this, "debug"), J(this, "logger"), J(this, "maxObservedTimestamp"), J(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), J(this, "nextConnectionStateSubscriberId", 0), J(this, "_lastPublishedConnectionState"), J(this, "markConnectionStateDirty", () => {
|
|
1851
1851
|
Promise.resolve().then(() => {
|
|
1852
1852
|
let e = this.connectionState();
|
|
1853
1853
|
if (JSON.stringify(e) !== JSON.stringify(this._lastPublishedConnectionState)) {
|
|
@@ -1855,13 +1855,13 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1855
1855
|
for (let t of this.connectionStateSubscribers.values()) t(e);
|
|
1856
1856
|
}
|
|
1857
1857
|
});
|
|
1858
|
-
}),
|
|
1859
|
-
this.debug &&
|
|
1858
|
+
}), J(this, "mark", (e) => {
|
|
1859
|
+
this.debug && Un(e, this.sessionId);
|
|
1860
1860
|
}), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
|
|
1861
|
-
n?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
1861
|
+
n?.skipConvexDeploymentUrlCheck !== !0 && Ue(e), n = { ...n };
|
|
1862
1862
|
let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
|
|
1863
1863
|
if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
|
|
1864
|
-
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ?
|
|
1864
|
+
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? Dt({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : Et({ verbose: n.verbose ?? !1 });
|
|
1865
1865
|
let a = e.search("://");
|
|
1866
1866
|
if (a === -1) throw Error("Provided address was not an absolute URL.");
|
|
1867
1867
|
let o = e.substring(a + 3), s = e.substring(0, a), c;
|
|
@@ -1869,11 +1869,11 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1869
1869
|
else if (s === "https") c = "wss";
|
|
1870
1870
|
else throw Error(`Unknown parent protocol ${s}`);
|
|
1871
1871
|
let l = `${c}://${o}/api/${je}/sync`;
|
|
1872
|
-
this.state = new
|
|
1872
|
+
this.state = new Rt(), this.remoteQuerySet = new mn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Ht(this.logger, this.markConnectionStateDirty);
|
|
1873
1873
|
let u = () => {
|
|
1874
1874
|
this.webSocketManager.pause(), this.state.pause();
|
|
1875
1875
|
};
|
|
1876
|
-
this.authenticationManager = new
|
|
1876
|
+
this.authenticationManager = new Vn(this.state, {
|
|
1877
1877
|
authenticate: (e) => {
|
|
1878
1878
|
let t = this.state.setAuth(e);
|
|
1879
1879
|
return this.webSocketManager.sendMessage(t), t.baseVersion;
|
|
@@ -1888,9 +1888,9 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1888
1888
|
}, {
|
|
1889
1889
|
logger: this.logger,
|
|
1890
1890
|
refreshTokenLeewaySeconds: r
|
|
1891
|
-
}), this.optimisticQueryResults = new
|
|
1891
|
+
}), this.optimisticQueryResults = new en(), this.addOnTransitionHandler((e) => {
|
|
1892
1892
|
t(e.queries.map((e) => e.token));
|
|
1893
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
1893
|
+
}), this._nextRequestId = 0, this._sessionId = jn();
|
|
1894
1894
|
let { unsavedChangesWarning: d } = n;
|
|
1895
1895
|
if (typeof window > "u" || window.addEventListener === void 0) {
|
|
1896
1896
|
if (d === !0) throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.");
|
|
@@ -1901,14 +1901,14 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1901
1901
|
return (e || window.event).returnValue = t, t;
|
|
1902
1902
|
}
|
|
1903
1903
|
});
|
|
1904
|
-
this.webSocketManager = new
|
|
1904
|
+
this.webSocketManager = new An(l, {
|
|
1905
1905
|
onOpen: (e) => {
|
|
1906
1906
|
this.mark("convexWebSocketOpen"), this.webSocketManager.sendMessage({
|
|
1907
1907
|
...e,
|
|
1908
1908
|
type: "Connect",
|
|
1909
1909
|
sessionId: this._sessionId,
|
|
1910
1910
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
1911
|
-
}), this.remoteQuerySet = new
|
|
1911
|
+
}), this.remoteQuerySet = new mn((e) => this.state.queryPath(e), this.logger);
|
|
1912
1912
|
let [t, n] = this.state.restart();
|
|
1913
1913
|
n && this.webSocketManager.sendMessage(n), this.webSocketManager.sendMessage(t);
|
|
1914
1914
|
for (let e of this.requestManager.restart()) this.webSocketManager.sendMessage(e);
|
|
@@ -1939,7 +1939,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1939
1939
|
this.authenticationManager.onAuthError(e);
|
|
1940
1940
|
break;
|
|
1941
1941
|
case "FatalError": {
|
|
1942
|
-
let t =
|
|
1942
|
+
let t = kt(this.logger, e.error);
|
|
1943
1943
|
throw this.webSocketManager.terminate(), t;
|
|
1944
1944
|
}
|
|
1945
1945
|
default:
|
|
@@ -1997,7 +1997,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1997
1997
|
getCurrentAuthClaims() {
|
|
1998
1998
|
let e = this.state.getAuth(), t = {};
|
|
1999
1999
|
if (e && e.tokenType === "User") try {
|
|
2000
|
-
t = e ?
|
|
2000
|
+
t = e ? In(e.value) : {};
|
|
2001
2001
|
} catch {
|
|
2002
2002
|
t = {};
|
|
2003
2003
|
}
|
|
@@ -2022,7 +2022,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2022
2022
|
this.webSocketManager.sendMessage(e);
|
|
2023
2023
|
}
|
|
2024
2024
|
subscribe(e, t, n) {
|
|
2025
|
-
let r =
|
|
2025
|
+
let r = He(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
|
|
2026
2026
|
return i !== null && this.webSocketManager.sendMessage(i), {
|
|
2027
2027
|
queryToken: a,
|
|
2028
2028
|
unsubscribe: () => {
|
|
@@ -2032,7 +2032,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
2034
|
localQueryResult(e, t) {
|
|
2035
|
-
let n =
|
|
2035
|
+
let n = Nt(e, He(t));
|
|
2036
2036
|
return this.optimisticQueryResults.queryResult(n);
|
|
2037
2037
|
}
|
|
2038
2038
|
localQueryResultByToken(e) {
|
|
@@ -2042,11 +2042,11 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2042
2042
|
return this.optimisticQueryResults.hasQueryResult(e);
|
|
2043
2043
|
}
|
|
2044
2044
|
localQueryLogs(e, t) {
|
|
2045
|
-
let n =
|
|
2045
|
+
let n = Nt(e, He(t));
|
|
2046
2046
|
return this.optimisticQueryResults.queryLogs(n);
|
|
2047
2047
|
}
|
|
2048
2048
|
queryJournal(e, t) {
|
|
2049
|
-
let n =
|
|
2049
|
+
let n = Nt(e, He(t));
|
|
2050
2050
|
return this.state.queryJournal(n);
|
|
2051
2051
|
}
|
|
2052
2052
|
connectionState() {
|
|
@@ -2070,7 +2070,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
async mutation(e, t, n) {
|
|
2072
2072
|
let r = await this.mutationInternal(e, t, n);
|
|
2073
|
-
if (!r.success) throw r.errorData === void 0 ? Error(
|
|
2073
|
+
if (!r.success) throw r.errorData === void 0 ? Error(At("mutation", e, r)) : jt(r, new yt(At("mutation", e, r)));
|
|
2074
2074
|
return r.value;
|
|
2075
2075
|
}
|
|
2076
2076
|
async mutationInternal(e, t, n, r) {
|
|
@@ -2078,7 +2078,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2078
2078
|
return i;
|
|
2079
2079
|
}
|
|
2080
2080
|
enqueueMutation(e, t, n, r) {
|
|
2081
|
-
let i =
|
|
2081
|
+
let i = He(t);
|
|
2082
2082
|
this.tryReportLongDisconnect();
|
|
2083
2083
|
let a = this.nextRequestId;
|
|
2084
2084
|
if (this._nextRequestId++, n !== void 0) {
|
|
@@ -2112,7 +2112,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2112
2112
|
requestId: a,
|
|
2113
2113
|
udfPath: e,
|
|
2114
2114
|
componentPath: r,
|
|
2115
|
-
args: [
|
|
2115
|
+
args: [ft(i)]
|
|
2116
2116
|
}, s = this.webSocketManager.sendMessage(o);
|
|
2117
2117
|
return {
|
|
2118
2118
|
requestId: a,
|
|
@@ -2121,18 +2121,18 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
async action(e, t) {
|
|
2123
2123
|
let n = await this.actionInternal(e, t);
|
|
2124
|
-
if (!n.success) throw n.errorData === void 0 ? Error(
|
|
2124
|
+
if (!n.success) throw n.errorData === void 0 ? Error(At("action", e, n)) : jt(n, new yt(At("action", e, n)));
|
|
2125
2125
|
return n.value;
|
|
2126
2126
|
}
|
|
2127
2127
|
async actionInternal(e, t, n) {
|
|
2128
|
-
let r =
|
|
2128
|
+
let r = He(t), i = this.nextRequestId;
|
|
2129
2129
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
2130
2130
|
let a = {
|
|
2131
2131
|
type: "Action",
|
|
2132
2132
|
requestId: i,
|
|
2133
2133
|
udfPath: e,
|
|
2134
2134
|
componentPath: n,
|
|
2135
|
-
args: [
|
|
2135
|
+
args: [ft(r)]
|
|
2136
2136
|
}, o = this.webSocketManager.sendMessage(a);
|
|
2137
2137
|
return this.requestManager.request(a, o);
|
|
2138
2138
|
}
|
|
@@ -2150,7 +2150,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
reportMarks() {
|
|
2152
2152
|
if (this.debug) {
|
|
2153
|
-
let e =
|
|
2153
|
+
let e = Gn(this.sessionId);
|
|
2154
2154
|
this.webSocketManager.sendMessage({
|
|
2155
2155
|
type: "Event",
|
|
2156
2156
|
eventType: "ClientConnect",
|
|
@@ -2178,24 +2178,24 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
};
|
|
2180
2180
|
//#endregion
|
|
2181
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
2182
|
-
function
|
|
2181
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/pagination.js
|
|
2182
|
+
function Yn(e) {
|
|
2183
2183
|
if (typeof e != "object" || !e || !Array.isArray(e.page) || typeof e.isDone != "boolean" || typeof e.continueCursor != "string") throw Error(`Not a valid paginated query result: ${e?.toString()}`);
|
|
2184
2184
|
return e;
|
|
2185
2185
|
}
|
|
2186
2186
|
//#endregion
|
|
2187
|
-
//#region ../../node_modules/.pnpm/convex@1.
|
|
2188
|
-
var
|
|
2187
|
+
//#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/paginated_query_client.js
|
|
2188
|
+
var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
2189
2189
|
enumerable: !0,
|
|
2190
2190
|
configurable: !0,
|
|
2191
2191
|
writable: !0,
|
|
2192
2192
|
value: n
|
|
2193
|
-
}) : e[t] = n,
|
|
2193
|
+
}) : e[t] = n, Qn = (e, t, n) => Zn(e, typeof t == "symbol" ? t : t + "", n), $n = class {
|
|
2194
2194
|
constructor(e, t) {
|
|
2195
|
-
this.client = e, this.onTransition = t,
|
|
2195
|
+
this.client = e, this.onTransition = t, Qn(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Qn(this, "lastTransitionTs"), this.lastTransitionTs = an.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
|
|
2196
2196
|
}
|
|
2197
2197
|
subscribe(e, t, n) {
|
|
2198
|
-
let r =
|
|
2198
|
+
let r = Mt(e), i = Pt(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
|
|
2199
2199
|
return o ? (o.numSubscribers += 1, {
|
|
2200
2200
|
paginatedQueryToken: i,
|
|
2201
2201
|
unsubscribe: a
|
|
@@ -2217,7 +2217,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2217
2217
|
});
|
|
2218
2218
|
}
|
|
2219
2219
|
localQueryResult(e, t, n) {
|
|
2220
|
-
let r =
|
|
2220
|
+
let r = Pt(Mt(e), t, n);
|
|
2221
2221
|
return this.localQueryResultByToken(r);
|
|
2222
2222
|
}
|
|
2223
2223
|
localQueryResultByToken(e) {
|
|
@@ -2236,7 +2236,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2236
2236
|
i = !0, a = !1;
|
|
2237
2237
|
continue;
|
|
2238
2238
|
}
|
|
2239
|
-
let n =
|
|
2239
|
+
let n = Yn(t);
|
|
2240
2240
|
r = r.concat(n.page), a = !!n.isDone;
|
|
2241
2241
|
}
|
|
2242
2242
|
let o;
|
|
@@ -2265,7 +2265,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2265
2265
|
this.mustGetPaginatedQuery(e);
|
|
2266
2266
|
let n = this.queryTokenForLastPageOfPaginatedQuery(e), r = this.client.localQueryResultByToken(n);
|
|
2267
2267
|
if (!r) return !1;
|
|
2268
|
-
let i =
|
|
2268
|
+
let i = Yn(r);
|
|
2269
2269
|
if (i.isDone) return !1;
|
|
2270
2270
|
this.addPageToPaginatedQuery(e, i.continueCursor, t);
|
|
2271
2271
|
let a = {
|
|
@@ -2299,7 +2299,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2299
2299
|
if (r.has(n)) continue;
|
|
2300
2300
|
let a = i.get(n).queryToken, o = t(a);
|
|
2301
2301
|
if (!o) continue;
|
|
2302
|
-
let s =
|
|
2302
|
+
let s = Yn(o);
|
|
2303
2303
|
s.splitCursor && (s.pageStatus === "SplitRecommended" || s.pageStatus === "SplitRequired" || s.page.length > e.options.initialNumItems * 2) && this.splitPaginatedQueryPage(e, n, s.splitCursor, s.continueCursor);
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
@@ -2368,16 +2368,16 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2368
2368
|
if (!t) throw Error("paginated query no longer exists for token " + e);
|
|
2369
2369
|
return t;
|
|
2370
2370
|
}
|
|
2371
|
-
},
|
|
2371
|
+
}, er = Object.defineProperty, tr = (e, t, n) => t in e ? er(e, t, {
|
|
2372
2372
|
enumerable: !0,
|
|
2373
2373
|
configurable: !0,
|
|
2374
2374
|
writable: !0,
|
|
2375
2375
|
value: n
|
|
2376
|
-
}) : e[t] = n,
|
|
2376
|
+
}) : e[t] = n, nr = (e, t, n) => tr(e, typeof t == "symbol" ? t : t + "", n), rr, ir = class {
|
|
2377
2377
|
constructor(e, t = {}) {
|
|
2378
|
-
|
|
2378
|
+
nr(this, "listeners"), nr(this, "_client"), nr(this, "_paginatedClient"), nr(this, "callNewListenersWithCurrentValuesTimer"), nr(this, "_closed"), nr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && Ue(e);
|
|
2379
2379
|
let { disabled: n, ...r } = t;
|
|
2380
|
-
this._closed = !1, this._disabled = !!n,
|
|
2380
|
+
this._closed = !1, this._disabled = !!n, rr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = rr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new Jn(e, () => {}, r), this._paginatedClient = new $n(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
|
|
2381
2381
|
}
|
|
2382
2382
|
get closed() {
|
|
2383
2383
|
return this._closed;
|
|
@@ -2395,7 +2395,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
onUpdate(e, t, n, r) {
|
|
2397
2397
|
if (this.disabled) return this.createDisabledUnsubscribe();
|
|
2398
|
-
let { queryToken: i, unsubscribe: a } = this.client.subscribe(
|
|
2398
|
+
let { queryToken: i, unsubscribe: a } = this.client.subscribe(G(e), t), o = {
|
|
2399
2399
|
queryToken: i,
|
|
2400
2400
|
callback: n,
|
|
2401
2401
|
onError: r,
|
|
@@ -2420,7 +2420,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2420
2420
|
let a = {
|
|
2421
2421
|
initialNumItems: n.initialNumItems,
|
|
2422
2422
|
id: -1
|
|
2423
|
-
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(
|
|
2423
|
+
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(G(e), t, a), c = {
|
|
2424
2424
|
queryToken: o,
|
|
2425
2425
|
callback: r,
|
|
2426
2426
|
onError: i,
|
|
@@ -2435,7 +2435,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2435
2435
|
unsubscribe: () => {
|
|
2436
2436
|
this.closed || (this.listeners.delete(c), s());
|
|
2437
2437
|
},
|
|
2438
|
-
getCurrentValue: () => this.paginatedClient.localQueryResult(
|
|
2438
|
+
getCurrentValue: () => this.paginatedClient.localQueryResult(G(e), t, a),
|
|
2439
2439
|
getQueryLogs: () => []
|
|
2440
2440
|
}, u = l.unsubscribe;
|
|
2441
2441
|
return Object.assign(u, l), u;
|
|
@@ -2473,7 +2473,7 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2473
2473
|
_transition({ queries: e, paginatedQueries: t }, n = !1) {
|
|
2474
2474
|
let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
|
|
2475
2475
|
for (let e of this.listeners) {
|
|
2476
|
-
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s =
|
|
2476
|
+
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = Ft(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
|
|
2477
2477
|
if (r.includes(i) || n && !o && c) {
|
|
2478
2478
|
e.hasEverRun = !0;
|
|
2479
2479
|
let n;
|
|
@@ -2490,15 +2490,15 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2490
2490
|
}
|
|
2491
2491
|
async mutation(e, t, n) {
|
|
2492
2492
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2493
|
-
return await this.client.mutation(
|
|
2493
|
+
return await this.client.mutation(G(e), t, n);
|
|
2494
2494
|
}
|
|
2495
2495
|
async action(e, t) {
|
|
2496
2496
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2497
|
-
return await this.client.action(
|
|
2497
|
+
return await this.client.action(G(e), t);
|
|
2498
2498
|
}
|
|
2499
2499
|
async query(e, t) {
|
|
2500
2500
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2501
|
-
let n = this.client.localQueryResult(
|
|
2501
|
+
let n = this.client.localQueryResult(G(e), t);
|
|
2502
2502
|
return n === void 0 ? new Promise((n, r) => {
|
|
2503
2503
|
let { unsubscribe: i } = this.onUpdate(e, t, (e) => {
|
|
2504
2504
|
i(), n(e);
|
|
@@ -2514,37 +2514,113 @@ var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
|
2514
2514
|
subscribeToConnectionState(e) {
|
|
2515
2515
|
return this.disabled ? () => {} : this.client.subscribeToConnectionState(e);
|
|
2516
2516
|
}
|
|
2517
|
-
}
|
|
2517
|
+
};
|
|
2518
|
+
//#endregion
|
|
2519
|
+
//#region src/lib/machine.ts
|
|
2520
|
+
function ar(e) {
|
|
2521
|
+
return e;
|
|
2522
|
+
}
|
|
2523
|
+
function or(e, t) {
|
|
2524
|
+
let n = B(e);
|
|
2525
|
+
n.current = e;
|
|
2526
|
+
let [r, i] = R(() => typeof t == "function" ? t() : t);
|
|
2527
|
+
return [r, V((e) => {
|
|
2528
|
+
i((t) => {
|
|
2529
|
+
let r = n.current[t.kind]?.[e.type];
|
|
2530
|
+
return r ? r(t, e) : t;
|
|
2531
|
+
});
|
|
2532
|
+
}, [])];
|
|
2533
|
+
}
|
|
2534
|
+
//#endregion
|
|
2535
|
+
//#region src/lib/use-async-action.ts
|
|
2536
|
+
var sr = ar({
|
|
2537
|
+
idle: { start: () => ({ kind: "pending" }) },
|
|
2538
|
+
pending: {
|
|
2539
|
+
success: (e, t) => ({
|
|
2540
|
+
kind: "success",
|
|
2541
|
+
data: t.data
|
|
2542
|
+
}),
|
|
2543
|
+
failure: (e, t) => ({
|
|
2544
|
+
kind: "error",
|
|
2545
|
+
message: t.message
|
|
2546
|
+
})
|
|
2547
|
+
},
|
|
2548
|
+
success: {
|
|
2549
|
+
start: () => ({ kind: "pending" }),
|
|
2550
|
+
reset: () => ({ kind: "idle" })
|
|
2551
|
+
},
|
|
2552
|
+
error: {
|
|
2553
|
+
start: () => ({ kind: "pending" }),
|
|
2554
|
+
reset: () => ({ kind: "idle" })
|
|
2555
|
+
}
|
|
2556
|
+
});
|
|
2557
|
+
function cr() {
|
|
2558
|
+
let [e, t] = or(sr, { kind: "idle" }), n = e, r = B(n);
|
|
2559
|
+
r.current = n;
|
|
2560
|
+
let i = V(async (e, n) => {
|
|
2561
|
+
if (r.current.kind !== "pending") {
|
|
2562
|
+
t({ type: "start" });
|
|
2563
|
+
try {
|
|
2564
|
+
let r = await e();
|
|
2565
|
+
return t({
|
|
2566
|
+
type: "success",
|
|
2567
|
+
data: r
|
|
2568
|
+
}), n?.onSuccess?.(r), n?.onSettled?.(), r;
|
|
2569
|
+
} catch (e) {
|
|
2570
|
+
let r = e instanceof Error ? e.message : "Action failed";
|
|
2571
|
+
if (t({
|
|
2572
|
+
type: "failure",
|
|
2573
|
+
message: r
|
|
2574
|
+
}), n?.onError?.(r), n?.onSettled?.(), n?.rethrow) throw e;
|
|
2575
|
+
return;
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
}, [t]), a = V(() => t({ type: "reset" }), [t]);
|
|
2579
|
+
return {
|
|
2580
|
+
state: n,
|
|
2581
|
+
isIdle: n.kind === "idle",
|
|
2582
|
+
isPending: n.kind === "pending",
|
|
2583
|
+
isSuccess: n.kind === "success",
|
|
2584
|
+
isError: n.kind === "error",
|
|
2585
|
+
data: n.kind === "success" ? n.data : void 0,
|
|
2586
|
+
error: n.kind === "error" ? n.message : void 0,
|
|
2587
|
+
run: i,
|
|
2588
|
+
reset: a
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
//#endregion
|
|
2592
|
+
//#region ../../node_modules/.pnpm/@medv+finder@4.0.2/node_modules/@medv/finder/finder.js
|
|
2593
|
+
var lr = new Set([
|
|
2518
2594
|
"role",
|
|
2519
2595
|
"name",
|
|
2520
2596
|
"aria-label",
|
|
2521
2597
|
"rel",
|
|
2522
2598
|
"href"
|
|
2523
2599
|
]);
|
|
2524
|
-
function
|
|
2525
|
-
let n =
|
|
2526
|
-
n ||= e.startsWith("data-") &&
|
|
2527
|
-
let r =
|
|
2528
|
-
return r ||= t.startsWith("#") &&
|
|
2600
|
+
function ur(e, t) {
|
|
2601
|
+
let n = lr.has(e);
|
|
2602
|
+
n ||= e.startsWith("data-") && gr(e);
|
|
2603
|
+
let r = gr(t) && t.length < 100;
|
|
2604
|
+
return r ||= t.startsWith("#") && gr(t.slice(1)), n && r;
|
|
2529
2605
|
}
|
|
2530
|
-
function
|
|
2531
|
-
return
|
|
2606
|
+
function dr(e) {
|
|
2607
|
+
return gr(e);
|
|
2532
2608
|
}
|
|
2533
|
-
function
|
|
2534
|
-
return
|
|
2609
|
+
function fr(e) {
|
|
2610
|
+
return gr(e);
|
|
2535
2611
|
}
|
|
2536
|
-
function
|
|
2612
|
+
function pr(e) {
|
|
2537
2613
|
return !0;
|
|
2538
2614
|
}
|
|
2539
|
-
function
|
|
2615
|
+
function mr(e, t) {
|
|
2540
2616
|
if (e.nodeType !== Node.ELEMENT_NODE) throw Error("Can't generate CSS selector for non-element node type.");
|
|
2541
2617
|
if (e.tagName.toLowerCase() === "html") return "html";
|
|
2542
2618
|
let n = {
|
|
2543
2619
|
root: document.body,
|
|
2544
|
-
idName:
|
|
2545
|
-
className:
|
|
2546
|
-
tagName:
|
|
2547
|
-
attr:
|
|
2620
|
+
idName: dr,
|
|
2621
|
+
className: fr,
|
|
2622
|
+
tagName: pr,
|
|
2623
|
+
attr: ur,
|
|
2548
2624
|
timeoutMs: 1e3,
|
|
2549
2625
|
seedMinLength: 3,
|
|
2550
2626
|
optimizedMinLength: 2,
|
|
@@ -2552,37 +2628,37 @@ function lr(e, t) {
|
|
|
2552
2628
|
}, r = /* @__PURE__ */ new Date(), i = {
|
|
2553
2629
|
...n,
|
|
2554
2630
|
...t
|
|
2555
|
-
}, a =
|
|
2556
|
-
for (let t of
|
|
2631
|
+
}, a = Er(i.root, n), o, s = 0;
|
|
2632
|
+
for (let t of hr(e, i, a)) {
|
|
2557
2633
|
if ((/* @__PURE__ */ new Date()).getTime() - r.getTime() > i.timeoutMs || s >= i.maxNumberOfPathChecks) {
|
|
2558
|
-
let t =
|
|
2634
|
+
let t = Sr(e, a);
|
|
2559
2635
|
if (!t) throw Error(`Timeout: Can't find a unique selector after ${i.timeoutMs}ms`);
|
|
2560
|
-
return
|
|
2636
|
+
return vr(t);
|
|
2561
2637
|
}
|
|
2562
|
-
if (s++,
|
|
2638
|
+
if (s++, Dr(t, a)) {
|
|
2563
2639
|
o = t;
|
|
2564
2640
|
break;
|
|
2565
2641
|
}
|
|
2566
2642
|
}
|
|
2567
2643
|
if (!o) throw Error("Selector was not found.");
|
|
2568
|
-
let c = [...
|
|
2569
|
-
return c.sort(
|
|
2644
|
+
let c = [...Or(o, e, i, a, r)];
|
|
2645
|
+
return c.sort(br), c.length > 0 ? vr(c[0]) : vr(o);
|
|
2570
2646
|
}
|
|
2571
|
-
function*
|
|
2647
|
+
function* hr(e, t, n) {
|
|
2572
2648
|
let r = [], i = [], a = e, o = 0;
|
|
2573
2649
|
for (; a && a !== n;) {
|
|
2574
|
-
let e =
|
|
2650
|
+
let e = _r(a, t);
|
|
2575
2651
|
for (let t of e) t.level = o;
|
|
2576
|
-
if (r.push(e), a = a.parentElement, o++, i.push(...
|
|
2577
|
-
i.sort(
|
|
2652
|
+
if (r.push(e), a = a.parentElement, o++, i.push(...Tr(r)), o >= t.seedMinLength) {
|
|
2653
|
+
i.sort(br);
|
|
2578
2654
|
for (let e of i) yield e;
|
|
2579
2655
|
i = [];
|
|
2580
2656
|
}
|
|
2581
2657
|
}
|
|
2582
|
-
i.sort(
|
|
2658
|
+
i.sort(br);
|
|
2583
2659
|
for (let e of i) yield e;
|
|
2584
2660
|
}
|
|
2585
|
-
function
|
|
2661
|
+
function gr(e) {
|
|
2586
2662
|
if (/^[a-z\-]{3,}$/i.test(e)) {
|
|
2587
2663
|
let t = e.split(/-|[A-Z]/);
|
|
2588
2664
|
for (let e of t) if (e.length <= 2 || /[^aeiou]{4,}/i.test(e)) return !1;
|
|
@@ -2590,7 +2666,7 @@ function dr(e) {
|
|
|
2590
2666
|
}
|
|
2591
2667
|
return !1;
|
|
2592
2668
|
}
|
|
2593
|
-
function
|
|
2669
|
+
function _r(e, t) {
|
|
2594
2670
|
let n = [], r = e.getAttribute("id");
|
|
2595
2671
|
r && t.idName(r) && n.push({
|
|
2596
2672
|
name: "#" + CSS.escape(r),
|
|
@@ -2616,19 +2692,19 @@ function fr(e, t) {
|
|
|
2616
2692
|
name: i,
|
|
2617
2693
|
penalty: 5
|
|
2618
2694
|
});
|
|
2619
|
-
let t =
|
|
2695
|
+
let t = xr(e, i);
|
|
2620
2696
|
t !== void 0 && n.push({
|
|
2621
|
-
name:
|
|
2697
|
+
name: wr(i, t),
|
|
2622
2698
|
penalty: 10
|
|
2623
2699
|
});
|
|
2624
2700
|
}
|
|
2625
|
-
let a =
|
|
2701
|
+
let a = xr(e);
|
|
2626
2702
|
return a !== void 0 && n.push({
|
|
2627
|
-
name:
|
|
2703
|
+
name: Cr(i, a),
|
|
2628
2704
|
penalty: 50
|
|
2629
2705
|
}), n;
|
|
2630
2706
|
}
|
|
2631
|
-
function
|
|
2707
|
+
function vr(e) {
|
|
2632
2708
|
let t = e[0], n = t.name;
|
|
2633
2709
|
for (let r = 1; r < e.length; r++) {
|
|
2634
2710
|
let i = e[r].level || 0;
|
|
@@ -2636,13 +2712,13 @@ function pr(e) {
|
|
|
2636
2712
|
}
|
|
2637
2713
|
return n;
|
|
2638
2714
|
}
|
|
2639
|
-
function
|
|
2715
|
+
function yr(e) {
|
|
2640
2716
|
return e.map((e) => e.penalty).reduce((e, t) => e + t, 0);
|
|
2641
2717
|
}
|
|
2642
|
-
function
|
|
2643
|
-
return
|
|
2718
|
+
function br(e, t) {
|
|
2719
|
+
return yr(e) - yr(t);
|
|
2644
2720
|
}
|
|
2645
|
-
function
|
|
2721
|
+
function xr(e, t) {
|
|
2646
2722
|
let n = e.parentNode;
|
|
2647
2723
|
if (!n) return;
|
|
2648
2724
|
let r = n.firstChild;
|
|
@@ -2651,51 +2727,51 @@ function gr(e, t) {
|
|
|
2651
2727
|
for (; r && (r.nodeType === Node.ELEMENT_NODE && (t === void 0 || r.tagName.toLowerCase() === t) && i++, r !== e);) r = r.nextSibling;
|
|
2652
2728
|
return i;
|
|
2653
2729
|
}
|
|
2654
|
-
function
|
|
2730
|
+
function Sr(e, t) {
|
|
2655
2731
|
let n = 0, r = e, i = [];
|
|
2656
2732
|
for (; r && r !== t;) {
|
|
2657
|
-
let e = r.tagName.toLowerCase(), t =
|
|
2733
|
+
let e = r.tagName.toLowerCase(), t = xr(r, e);
|
|
2658
2734
|
if (t === void 0) return;
|
|
2659
2735
|
i.push({
|
|
2660
|
-
name:
|
|
2736
|
+
name: wr(e, t),
|
|
2661
2737
|
penalty: NaN,
|
|
2662
2738
|
level: n
|
|
2663
2739
|
}), r = r.parentElement, n++;
|
|
2664
2740
|
}
|
|
2665
|
-
if (
|
|
2741
|
+
if (Dr(i, t)) return i;
|
|
2666
2742
|
}
|
|
2667
|
-
function
|
|
2743
|
+
function Cr(e, t) {
|
|
2668
2744
|
return e === "html" ? "html" : `${e}:nth-child(${t})`;
|
|
2669
2745
|
}
|
|
2670
|
-
function
|
|
2746
|
+
function wr(e, t) {
|
|
2671
2747
|
return e === "html" ? "html" : `${e}:nth-of-type(${t})`;
|
|
2672
2748
|
}
|
|
2673
|
-
function*
|
|
2674
|
-
if (e.length > 0) for (let n of e[0]) yield*
|
|
2749
|
+
function* Tr(e, t = []) {
|
|
2750
|
+
if (e.length > 0) for (let n of e[0]) yield* Tr(e.slice(1, e.length), t.concat(n));
|
|
2675
2751
|
else yield t;
|
|
2676
2752
|
}
|
|
2677
|
-
function
|
|
2753
|
+
function Er(e, t) {
|
|
2678
2754
|
return e.nodeType === Node.DOCUMENT_NODE ? e : e === t.root ? e.ownerDocument : e;
|
|
2679
2755
|
}
|
|
2680
|
-
function
|
|
2681
|
-
let n =
|
|
2756
|
+
function Dr(e, t) {
|
|
2757
|
+
let n = vr(e);
|
|
2682
2758
|
switch (t.querySelectorAll(n).length) {
|
|
2683
2759
|
case 0: throw Error(`Can't select any node with this selector: ${n}`);
|
|
2684
2760
|
case 1: return !0;
|
|
2685
2761
|
default: return !1;
|
|
2686
2762
|
}
|
|
2687
2763
|
}
|
|
2688
|
-
function*
|
|
2764
|
+
function* Or(e, t, n, r, i) {
|
|
2689
2765
|
if (e.length > 2 && e.length > n.optimizedMinLength) for (let a = 1; a < e.length - 1; a++) {
|
|
2690
2766
|
if ((/* @__PURE__ */ new Date()).getTime() - i.getTime() > n.timeoutMs) return;
|
|
2691
2767
|
let o = [...e];
|
|
2692
|
-
o.splice(a, 1),
|
|
2768
|
+
o.splice(a, 1), Dr(o, r) && r.querySelector(vr(o)) === t && (yield o, yield* Or(o, t, n, r, i));
|
|
2693
2769
|
}
|
|
2694
2770
|
}
|
|
2695
2771
|
//#endregion
|
|
2696
2772
|
//#region src/runtime/anchor.ts
|
|
2697
|
-
function
|
|
2698
|
-
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ?
|
|
2773
|
+
function kr(e, t) {
|
|
2774
|
+
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? jr(s) : void 0, l, u;
|
|
2699
2775
|
if (s) {
|
|
2700
2776
|
let t = s.getBoundingClientRect();
|
|
2701
2777
|
t.width > 0 && t.height > 0 && (l = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), u = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)));
|
|
@@ -2710,7 +2786,7 @@ function wr(e, t) {
|
|
|
2710
2786
|
anchorOffsetY: u
|
|
2711
2787
|
};
|
|
2712
2788
|
}
|
|
2713
|
-
function
|
|
2789
|
+
function Ar(e) {
|
|
2714
2790
|
if (e.anchorSelector) try {
|
|
2715
2791
|
let t = document.querySelector(e.anchorSelector);
|
|
2716
2792
|
if (t) {
|
|
@@ -2729,22 +2805,22 @@ function Tr(e) {
|
|
|
2729
2805
|
resolved: !1
|
|
2730
2806
|
};
|
|
2731
2807
|
}
|
|
2732
|
-
function
|
|
2808
|
+
function jr(e) {
|
|
2733
2809
|
try {
|
|
2734
|
-
return
|
|
2810
|
+
return mr(e, { timeoutMs: 1e3 });
|
|
2735
2811
|
} catch {
|
|
2736
2812
|
return;
|
|
2737
2813
|
}
|
|
2738
2814
|
}
|
|
2739
2815
|
//#endregion
|
|
2740
2816
|
//#region src/runtime/api.ts
|
|
2741
|
-
var
|
|
2817
|
+
var Mr = class extends Error {
|
|
2742
2818
|
status;
|
|
2743
2819
|
constructor(e, t) {
|
|
2744
2820
|
super(e), this.name = "WidgetApiError", this.status = t;
|
|
2745
2821
|
}
|
|
2746
2822
|
};
|
|
2747
|
-
function
|
|
2823
|
+
function Nr(e) {
|
|
2748
2824
|
let t = e.apiUrl.replace(/\/+$/, "");
|
|
2749
2825
|
async function n(n, r = {}) {
|
|
2750
2826
|
let i = {
|
|
@@ -2758,8 +2834,8 @@ function Or(e) {
|
|
|
2758
2834
|
let c = await fetch(`${t}${n}`, {
|
|
2759
2835
|
...r,
|
|
2760
2836
|
headers: i
|
|
2761
|
-
}), l = await c.text(), u = l ?
|
|
2762
|
-
if (!c.ok) throw c.status === 401 && o && e.onUnauthorized?.(), new
|
|
2837
|
+
}), l = await c.text(), u = l ? Pr(l) : null;
|
|
2838
|
+
if (!c.ok) throw c.status === 401 && o && e.onUnauthorized?.(), new Mr((u && typeof u == "object" && "error" in u && typeof u.error == "string" ? u.error : null) ?? `Request failed with ${c.status}`, c.status);
|
|
2763
2839
|
return u;
|
|
2764
2840
|
}
|
|
2765
2841
|
return {
|
|
@@ -2813,7 +2889,7 @@ function Or(e) {
|
|
|
2813
2889
|
}
|
|
2814
2890
|
};
|
|
2815
2891
|
}
|
|
2816
|
-
function
|
|
2892
|
+
function Pr(e) {
|
|
2817
2893
|
try {
|
|
2818
2894
|
return JSON.parse(e);
|
|
2819
2895
|
} catch {
|
|
@@ -2822,48 +2898,48 @@ function kr(e) {
|
|
|
2822
2898
|
}
|
|
2823
2899
|
//#endregion
|
|
2824
2900
|
//#region src/runtime/history-observer.ts
|
|
2825
|
-
var
|
|
2826
|
-
function
|
|
2901
|
+
var Fr = "__markup_history_observer__", Ir = "__markup_history_listeners__";
|
|
2902
|
+
function Lr(e) {
|
|
2827
2903
|
e.forEach((e) => e());
|
|
2828
2904
|
}
|
|
2829
|
-
function
|
|
2905
|
+
function Rr() {
|
|
2830
2906
|
let e = history.pushState;
|
|
2831
|
-
if (e[
|
|
2907
|
+
if (e[Fr]) return e[Ir];
|
|
2832
2908
|
let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
|
|
2833
2909
|
function i(...e) {
|
|
2834
|
-
n.apply(this, e),
|
|
2910
|
+
n.apply(this, e), Lr(t);
|
|
2835
2911
|
}
|
|
2836
2912
|
function a(...e) {
|
|
2837
|
-
r.apply(this, e),
|
|
2913
|
+
r.apply(this, e), Lr(t);
|
|
2838
2914
|
}
|
|
2839
|
-
return Object.defineProperty(i,
|
|
2915
|
+
return Object.defineProperty(i, Fr, { value: 1 }), Object.defineProperty(i, Ir, { value: t }), Object.defineProperty(a, Fr, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", () => Lr(t)), t;
|
|
2840
2916
|
}
|
|
2841
|
-
var
|
|
2842
|
-
function
|
|
2843
|
-
return
|
|
2917
|
+
var zr = null;
|
|
2918
|
+
function Br(e) {
|
|
2919
|
+
return zr ||= Rr(), zr.add(e), () => zr.delete(e);
|
|
2844
2920
|
}
|
|
2845
2921
|
//#endregion
|
|
2846
2922
|
//#region src/runtime/identity-store.ts
|
|
2847
|
-
var
|
|
2848
|
-
function
|
|
2923
|
+
var Vr = "markup.identity";
|
|
2924
|
+
function Hr() {
|
|
2849
2925
|
try {
|
|
2850
|
-
let e = localStorage.getItem(
|
|
2926
|
+
let e = localStorage.getItem(Vr);
|
|
2851
2927
|
return e ? JSON.parse(e) : null;
|
|
2852
2928
|
} catch {
|
|
2853
2929
|
return null;
|
|
2854
2930
|
}
|
|
2855
2931
|
}
|
|
2856
|
-
function
|
|
2932
|
+
function Ur(e) {
|
|
2857
2933
|
try {
|
|
2858
2934
|
if (e == null) {
|
|
2859
|
-
localStorage.removeItem(
|
|
2935
|
+
localStorage.removeItem(Vr);
|
|
2860
2936
|
return;
|
|
2861
2937
|
}
|
|
2862
|
-
localStorage.setItem(
|
|
2938
|
+
localStorage.setItem(Vr, JSON.stringify(e));
|
|
2863
2939
|
} catch {}
|
|
2864
2940
|
}
|
|
2865
|
-
function
|
|
2866
|
-
let e =
|
|
2941
|
+
function Wr() {
|
|
2942
|
+
let e = Hr(), t = {
|
|
2867
2943
|
name: e?.name,
|
|
2868
2944
|
email: e?.email
|
|
2869
2945
|
};
|
|
@@ -2898,10 +2974,10 @@ function zr() {
|
|
|
2898
2974
|
preserved: t
|
|
2899
2975
|
};
|
|
2900
2976
|
}
|
|
2901
|
-
function
|
|
2977
|
+
function Gr(e) {
|
|
2902
2978
|
switch (e.kind) {
|
|
2903
2979
|
case "verified":
|
|
2904
|
-
|
|
2980
|
+
Ur({
|
|
2905
2981
|
clientId: e.identity.clientId,
|
|
2906
2982
|
token: e.identity.token,
|
|
2907
2983
|
tokenExpiresAt: e.identity.tokenExpiresAt,
|
|
@@ -2911,7 +2987,7 @@ function Br(e) {
|
|
|
2911
2987
|
});
|
|
2912
2988
|
return;
|
|
2913
2989
|
case "anon":
|
|
2914
|
-
|
|
2990
|
+
Ur({
|
|
2915
2991
|
clientId: e.identity.clientId,
|
|
2916
2992
|
anonToken: e.identity.anonToken,
|
|
2917
2993
|
name: e.identity.name,
|
|
@@ -2919,23 +2995,23 @@ function Br(e) {
|
|
|
2919
2995
|
});
|
|
2920
2996
|
return;
|
|
2921
2997
|
case "recovering":
|
|
2922
|
-
|
|
2998
|
+
Ur({
|
|
2923
2999
|
name: e.preserved.name,
|
|
2924
3000
|
email: e.preserved.email
|
|
2925
3001
|
});
|
|
2926
3002
|
return;
|
|
2927
3003
|
case "unresolved":
|
|
2928
|
-
|
|
3004
|
+
Ur(null);
|
|
2929
3005
|
return;
|
|
2930
3006
|
}
|
|
2931
3007
|
}
|
|
2932
|
-
function
|
|
3008
|
+
function Kr(e) {
|
|
2933
3009
|
if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
|
|
2934
3010
|
}
|
|
2935
|
-
function
|
|
3011
|
+
function qr(e) {
|
|
2936
3012
|
return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
|
|
2937
3013
|
}
|
|
2938
|
-
function
|
|
3014
|
+
function Jr(e) {
|
|
2939
3015
|
if (e.kind === "anon") {
|
|
2940
3016
|
let t = e.identity.name;
|
|
2941
3017
|
return t ? {
|
|
@@ -2950,7 +3026,7 @@ function Ur(e) {
|
|
|
2950
3026
|
}
|
|
2951
3027
|
//#endregion
|
|
2952
3028
|
//#region src/runtime/popup-auth.ts
|
|
2953
|
-
async function
|
|
3029
|
+
async function Yr(e, t) {
|
|
2954
3030
|
let n = new URL(e).origin, r;
|
|
2955
3031
|
try {
|
|
2956
3032
|
let n = await fetch(`${e.replace(/\/+$/, "")}/widget/popup-exchange`, {
|
|
@@ -2991,45 +3067,45 @@ async function Wr(e, t) {
|
|
|
2991
3067
|
}
|
|
2992
3068
|
//#endregion
|
|
2993
3069
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
|
|
2994
|
-
function
|
|
3070
|
+
function Xr(e, t) {
|
|
2995
3071
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
2996
3072
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
2997
3073
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
2998
3074
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
2999
3075
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
3000
3076
|
}
|
|
3001
|
-
var
|
|
3077
|
+
var Zr = (() => {
|
|
3002
3078
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
3003
3079
|
return () => (e += 1, `u${t()}${e}`);
|
|
3004
3080
|
})();
|
|
3005
|
-
function
|
|
3081
|
+
function Qr(e) {
|
|
3006
3082
|
let t = [];
|
|
3007
3083
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
3008
3084
|
return t;
|
|
3009
3085
|
}
|
|
3010
|
-
var
|
|
3011
|
-
function
|
|
3012
|
-
return
|
|
3086
|
+
var $r = null;
|
|
3087
|
+
function ei(e = {}) {
|
|
3088
|
+
return $r || (e.includeStyleProperties ? ($r = e.includeStyleProperties, $r) : ($r = Qr(window.getComputedStyle(document.documentElement)), $r));
|
|
3013
3089
|
}
|
|
3014
|
-
function
|
|
3090
|
+
function ti(e, t) {
|
|
3015
3091
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
3016
3092
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
3017
3093
|
}
|
|
3018
|
-
function
|
|
3019
|
-
let t =
|
|
3094
|
+
function ni(e) {
|
|
3095
|
+
let t = ti(e, "border-left-width"), n = ti(e, "border-right-width");
|
|
3020
3096
|
return e.clientWidth + t + n;
|
|
3021
3097
|
}
|
|
3022
|
-
function
|
|
3023
|
-
let t =
|
|
3098
|
+
function ri(e) {
|
|
3099
|
+
let t = ti(e, "border-top-width"), n = ti(e, "border-bottom-width");
|
|
3024
3100
|
return e.clientHeight + t + n;
|
|
3025
3101
|
}
|
|
3026
|
-
function
|
|
3102
|
+
function ii(e, t = {}) {
|
|
3027
3103
|
return {
|
|
3028
|
-
width: t.width ||
|
|
3029
|
-
height: t.height ||
|
|
3104
|
+
width: t.width || ni(e),
|
|
3105
|
+
height: t.height || ri(e)
|
|
3030
3106
|
};
|
|
3031
3107
|
}
|
|
3032
|
-
function
|
|
3108
|
+
function ai() {
|
|
3033
3109
|
let e, t;
|
|
3034
3110
|
try {
|
|
3035
3111
|
t = process;
|
|
@@ -3037,11 +3113,11 @@ function ei() {
|
|
|
3037
3113
|
let n = t && t.env ? t.env.devicePixelRatio : null;
|
|
3038
3114
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
3039
3115
|
}
|
|
3040
|
-
var
|
|
3041
|
-
function
|
|
3042
|
-
(e.width >
|
|
3116
|
+
var Y = 16384;
|
|
3117
|
+
function oi(e) {
|
|
3118
|
+
(e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
|
|
3043
3119
|
}
|
|
3044
|
-
function
|
|
3120
|
+
function si(e) {
|
|
3045
3121
|
return new Promise((t, n) => {
|
|
3046
3122
|
let r = new Image();
|
|
3047
3123
|
r.onload = () => {
|
|
@@ -3051,80 +3127,80 @@ function ni(e) {
|
|
|
3051
3127
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
3052
3128
|
});
|
|
3053
3129
|
}
|
|
3054
|
-
async function
|
|
3130
|
+
async function ci(e) {
|
|
3055
3131
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
3056
3132
|
}
|
|
3057
|
-
async function
|
|
3133
|
+
async function li(e, t, n) {
|
|
3058
3134
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
3059
|
-
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),
|
|
3135
|
+
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), ci(i);
|
|
3060
3136
|
}
|
|
3061
|
-
var
|
|
3137
|
+
var X = (e, t) => {
|
|
3062
3138
|
if (e instanceof t) return !0;
|
|
3063
3139
|
let n = Object.getPrototypeOf(e);
|
|
3064
|
-
return n === null ? !1 : n.constructor.name === t.name ||
|
|
3140
|
+
return n === null ? !1 : n.constructor.name === t.name || X(n, t);
|
|
3065
3141
|
};
|
|
3066
3142
|
//#endregion
|
|
3067
3143
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
|
|
3068
|
-
function
|
|
3144
|
+
function ui(e) {
|
|
3069
3145
|
let t = e.getPropertyValue("content");
|
|
3070
3146
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
3071
3147
|
}
|
|
3072
|
-
function
|
|
3073
|
-
return
|
|
3148
|
+
function di(e, t) {
|
|
3149
|
+
return ei(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
3074
3150
|
}
|
|
3075
|
-
function
|
|
3076
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
3151
|
+
function fi(e, t, n, r) {
|
|
3152
|
+
let i = `.${e}:${t}`, a = n.cssText ? ui(n) : di(n, r);
|
|
3077
3153
|
return document.createTextNode(`${i}{${a}}`);
|
|
3078
3154
|
}
|
|
3079
|
-
function
|
|
3155
|
+
function pi(e, t, n, r) {
|
|
3080
3156
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
3081
3157
|
if (a === "" || a === "none") return;
|
|
3082
|
-
let o =
|
|
3158
|
+
let o = Zr();
|
|
3083
3159
|
try {
|
|
3084
3160
|
t.className = `${t.className} ${o}`;
|
|
3085
3161
|
} catch {
|
|
3086
3162
|
return;
|
|
3087
3163
|
}
|
|
3088
3164
|
let s = document.createElement("style");
|
|
3089
|
-
s.appendChild(
|
|
3165
|
+
s.appendChild(fi(o, n, i, r)), t.appendChild(s);
|
|
3090
3166
|
}
|
|
3091
|
-
function
|
|
3092
|
-
|
|
3167
|
+
function mi(e, t, n) {
|
|
3168
|
+
pi(e, t, ":before", n), pi(e, t, ":after", n);
|
|
3093
3169
|
}
|
|
3094
3170
|
//#endregion
|
|
3095
3171
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
|
|
3096
|
-
var
|
|
3097
|
-
woff:
|
|
3098
|
-
woff2:
|
|
3172
|
+
var hi = "application/font-woff", gi = "image/jpeg", _i = {
|
|
3173
|
+
woff: hi,
|
|
3174
|
+
woff2: hi,
|
|
3099
3175
|
ttf: "application/font-truetype",
|
|
3100
3176
|
eot: "application/vnd.ms-fontobject",
|
|
3101
3177
|
png: "image/png",
|
|
3102
|
-
jpg:
|
|
3103
|
-
jpeg:
|
|
3178
|
+
jpg: gi,
|
|
3179
|
+
jpeg: gi,
|
|
3104
3180
|
gif: "image/gif",
|
|
3105
3181
|
tiff: "image/tiff",
|
|
3106
3182
|
svg: "image/svg+xml",
|
|
3107
3183
|
webp: "image/webp"
|
|
3108
3184
|
};
|
|
3109
|
-
function
|
|
3185
|
+
function vi(e) {
|
|
3110
3186
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
3111
3187
|
return t ? t[1] : "";
|
|
3112
3188
|
}
|
|
3113
|
-
function
|
|
3114
|
-
return
|
|
3189
|
+
function yi(e) {
|
|
3190
|
+
return _i[vi(e).toLowerCase()] || "";
|
|
3115
3191
|
}
|
|
3116
3192
|
//#endregion
|
|
3117
3193
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
|
|
3118
|
-
function
|
|
3194
|
+
function bi(e) {
|
|
3119
3195
|
return e.split(/,/)[1];
|
|
3120
3196
|
}
|
|
3121
|
-
function
|
|
3197
|
+
function xi(e) {
|
|
3122
3198
|
return e.search(/^(data:)/) !== -1;
|
|
3123
3199
|
}
|
|
3124
|
-
function
|
|
3200
|
+
function Si(e, t) {
|
|
3125
3201
|
return `data:${t};base64,${e}`;
|
|
3126
3202
|
}
|
|
3127
|
-
async function
|
|
3203
|
+
async function Ci(e, t, n) {
|
|
3128
3204
|
let r = await fetch(e, t);
|
|
3129
3205
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
3130
3206
|
let i = await r.blob();
|
|
@@ -3142,78 +3218,78 @@ async function vi(e, t, n) {
|
|
|
3142
3218
|
}, a.readAsDataURL(i);
|
|
3143
3219
|
});
|
|
3144
3220
|
}
|
|
3145
|
-
var
|
|
3146
|
-
function
|
|
3221
|
+
var wi = {};
|
|
3222
|
+
function Ti(e, t, n) {
|
|
3147
3223
|
let r = e.replace(/\?.*/, "");
|
|
3148
3224
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
3149
3225
|
}
|
|
3150
|
-
async function
|
|
3151
|
-
let r =
|
|
3152
|
-
if (
|
|
3226
|
+
async function Ei(e, t, n) {
|
|
3227
|
+
let r = Ti(e, t, n.includeQueryParams);
|
|
3228
|
+
if (wi[r] != null) return wi[r];
|
|
3153
3229
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
3154
3230
|
let i;
|
|
3155
3231
|
try {
|
|
3156
|
-
i =
|
|
3232
|
+
i = Si(await Ci(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", bi(n))), t);
|
|
3157
3233
|
} catch (t) {
|
|
3158
3234
|
i = n.imagePlaceholder || "";
|
|
3159
3235
|
let r = `Failed to fetch resource: ${e}`;
|
|
3160
3236
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
3161
3237
|
}
|
|
3162
|
-
return
|
|
3238
|
+
return wi[r] = i, i;
|
|
3163
3239
|
}
|
|
3164
3240
|
//#endregion
|
|
3165
3241
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
|
|
3166
|
-
async function
|
|
3242
|
+
async function Di(e) {
|
|
3167
3243
|
let t = e.toDataURL();
|
|
3168
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
3244
|
+
return t === "data:," ? e.cloneNode(!1) : si(t);
|
|
3169
3245
|
}
|
|
3170
|
-
async function
|
|
3246
|
+
async function Oi(e, t) {
|
|
3171
3247
|
if (e.currentSrc) {
|
|
3172
3248
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
3173
|
-
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height),
|
|
3249
|
+
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), si(t.toDataURL());
|
|
3174
3250
|
}
|
|
3175
3251
|
let n = e.poster;
|
|
3176
|
-
return
|
|
3252
|
+
return si(await Ei(n, yi(n), t));
|
|
3177
3253
|
}
|
|
3178
|
-
async function
|
|
3254
|
+
async function ki(e, t) {
|
|
3179
3255
|
try {
|
|
3180
|
-
if (e?.contentDocument?.body) return await
|
|
3256
|
+
if (e?.contentDocument?.body) return await zi(e.contentDocument.body, t, !0);
|
|
3181
3257
|
} catch {}
|
|
3182
3258
|
return e.cloneNode(!1);
|
|
3183
3259
|
}
|
|
3184
|
-
async function
|
|
3185
|
-
return
|
|
3260
|
+
async function Ai(e, t) {
|
|
3261
|
+
return X(e, HTMLCanvasElement) ? Di(e) : X(e, HTMLVideoElement) ? Oi(e, t) : X(e, HTMLIFrameElement) ? ki(e, t) : e.cloneNode(Mi(e));
|
|
3186
3262
|
}
|
|
3187
|
-
var
|
|
3188
|
-
async function
|
|
3189
|
-
if (
|
|
3263
|
+
var ji = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Mi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3264
|
+
async function Ni(e, t, n) {
|
|
3265
|
+
if (Mi(t)) return t;
|
|
3190
3266
|
let r = [];
|
|
3191
|
-
return r =
|
|
3267
|
+
return r = ji(e) && e.assignedNodes ? Qr(e.assignedNodes()) : X(e, HTMLIFrameElement) && e.contentDocument?.body ? Qr(e.contentDocument.body.childNodes) : Qr((e.shadowRoot ?? e).childNodes), r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => zi(r, n)).then((e) => {
|
|
3192
3268
|
e && t.appendChild(e);
|
|
3193
3269
|
}), Promise.resolve()), t;
|
|
3194
3270
|
}
|
|
3195
|
-
function
|
|
3271
|
+
function Pi(e, t, n) {
|
|
3196
3272
|
let r = t.style;
|
|
3197
3273
|
if (!r) return;
|
|
3198
3274
|
let i = window.getComputedStyle(e);
|
|
3199
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3275
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : ei(n).forEach((n) => {
|
|
3200
3276
|
let a = i.getPropertyValue(n);
|
|
3201
|
-
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`),
|
|
3277
|
+
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), X(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
|
|
3202
3278
|
});
|
|
3203
3279
|
}
|
|
3204
|
-
function
|
|
3205
|
-
|
|
3280
|
+
function Fi(e, t) {
|
|
3281
|
+
X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
3206
3282
|
}
|
|
3207
|
-
function
|
|
3208
|
-
if (
|
|
3283
|
+
function Ii(e, t) {
|
|
3284
|
+
if (X(e, HTMLSelectElement)) {
|
|
3209
3285
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
3210
3286
|
r && r.setAttribute("selected", "");
|
|
3211
3287
|
}
|
|
3212
3288
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return
|
|
3289
|
+
function Li(e, t, n) {
|
|
3290
|
+
return X(t, Element) && (Pi(e, t, n), mi(e, t, n), Fi(e, t), Ii(e, t)), t;
|
|
3215
3291
|
}
|
|
3216
|
-
async function
|
|
3292
|
+
async function Ri(e, t) {
|
|
3217
3293
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
3218
3294
|
if (n.length === 0) return e;
|
|
3219
3295
|
let r = {};
|
|
@@ -3221,7 +3297,7 @@ async function Ni(e, t) {
|
|
|
3221
3297
|
let a = n[i].getAttribute("xlink:href");
|
|
3222
3298
|
if (a) {
|
|
3223
3299
|
let n = e.querySelector(a), i = document.querySelector(a);
|
|
3224
|
-
!n && i && !r[a] && (r[a] = await
|
|
3300
|
+
!n && i && !r[a] && (r[a] = await zi(i, t, !0));
|
|
3225
3301
|
}
|
|
3226
3302
|
}
|
|
3227
3303
|
let i = Object.values(r);
|
|
@@ -3235,61 +3311,61 @@ async function Ni(e, t) {
|
|
|
3235
3311
|
}
|
|
3236
3312
|
return e;
|
|
3237
3313
|
}
|
|
3238
|
-
async function
|
|
3239
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3314
|
+
async function zi(e, t, n) {
|
|
3315
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Ai(e, t)).then((n) => Ni(e, n, t)).then((n) => Li(e, n, t)).then((e) => Ri(e, t));
|
|
3240
3316
|
}
|
|
3241
3317
|
//#endregion
|
|
3242
3318
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
|
|
3243
|
-
var
|
|
3244
|
-
function
|
|
3319
|
+
var Bi = /url\((['"]?)([^'"]+?)\1\)/g, Vi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Hi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3320
|
+
function Ui(e) {
|
|
3245
3321
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3246
3322
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3247
3323
|
}
|
|
3248
|
-
function
|
|
3324
|
+
function Wi(e) {
|
|
3249
3325
|
let t = [];
|
|
3250
|
-
return e.replace(
|
|
3326
|
+
return e.replace(Bi, (e, n, r) => (t.push(r), e)), t.filter((e) => !xi(e));
|
|
3251
3327
|
}
|
|
3252
|
-
async function
|
|
3328
|
+
async function Gi(e, t, n, r, i) {
|
|
3253
3329
|
try {
|
|
3254
|
-
let a = n ?
|
|
3255
|
-
return s = i ?
|
|
3330
|
+
let a = n ? Xr(t, n) : t, o = yi(t), s;
|
|
3331
|
+
return s = i ? Si(await i(a), o) : await Ei(a, o, r), e.replace(Ui(t), `$1${s}$3`);
|
|
3256
3332
|
} catch {}
|
|
3257
3333
|
return e;
|
|
3258
3334
|
}
|
|
3259
|
-
function
|
|
3260
|
-
return t ? e.replace(
|
|
3335
|
+
function Ki(e, { preferredFontFormat: t }) {
|
|
3336
|
+
return t ? e.replace(Hi, (e) => {
|
|
3261
3337
|
for (;;) {
|
|
3262
|
-
let [n, , r] =
|
|
3338
|
+
let [n, , r] = Vi.exec(e) || [];
|
|
3263
3339
|
if (!r) return "";
|
|
3264
3340
|
if (r === t) return `src: ${n};`;
|
|
3265
3341
|
}
|
|
3266
3342
|
}) : e;
|
|
3267
3343
|
}
|
|
3268
|
-
function
|
|
3269
|
-
return e.search(
|
|
3344
|
+
function qi(e) {
|
|
3345
|
+
return e.search(Bi) !== -1;
|
|
3270
3346
|
}
|
|
3271
|
-
async function
|
|
3272
|
-
if (!
|
|
3273
|
-
let r =
|
|
3274
|
-
return
|
|
3347
|
+
async function Ji(e, t, n) {
|
|
3348
|
+
if (!qi(e)) return e;
|
|
3349
|
+
let r = Ki(e, n);
|
|
3350
|
+
return Wi(r).reduce((e, r) => e.then((e) => Gi(e, r, t, n)), Promise.resolve(r));
|
|
3275
3351
|
}
|
|
3276
3352
|
//#endregion
|
|
3277
3353
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
|
|
3278
|
-
async function
|
|
3354
|
+
async function Yi(e, t, n) {
|
|
3279
3355
|
let r = t.style?.getPropertyValue(e);
|
|
3280
3356
|
if (r) {
|
|
3281
|
-
let i = await
|
|
3357
|
+
let i = await Ji(r, null, n);
|
|
3282
3358
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3283
3359
|
}
|
|
3284
3360
|
return !1;
|
|
3285
3361
|
}
|
|
3286
|
-
async function
|
|
3287
|
-
await
|
|
3362
|
+
async function Xi(e, t) {
|
|
3363
|
+
await Yi("background", e, t) || await Yi("background-image", e, t), await Yi("mask", e, t) || await Yi("-webkit-mask", e, t) || await Yi("mask-image", e, t) || await Yi("-webkit-mask-image", e, t);
|
|
3288
3364
|
}
|
|
3289
|
-
async function
|
|
3290
|
-
let n =
|
|
3291
|
-
if (!(n && !
|
|
3292
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3365
|
+
async function Zi(e, t) {
|
|
3366
|
+
let n = X(e, HTMLImageElement);
|
|
3367
|
+
if (!(n && !xi(e.src)) && !(X(e, SVGImageElement) && !xi(e.href.baseVal))) return;
|
|
3368
|
+
let r = n ? e.src : e.href.baseVal, i = await Ei(r, yi(r), t);
|
|
3293
3369
|
await new Promise((r, a) => {
|
|
3294
3370
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3295
3371
|
try {
|
|
@@ -3302,16 +3378,16 @@ async function Ki(e, t) {
|
|
|
3302
3378
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3303
3379
|
});
|
|
3304
3380
|
}
|
|
3305
|
-
async function
|
|
3306
|
-
let n =
|
|
3381
|
+
async function Qi(e, t) {
|
|
3382
|
+
let n = Qr(e.childNodes).map((e) => $i(e, t));
|
|
3307
3383
|
await Promise.all(n).then(() => e);
|
|
3308
3384
|
}
|
|
3309
|
-
async function
|
|
3310
|
-
|
|
3385
|
+
async function $i(e, t) {
|
|
3386
|
+
X(e, Element) && (await Xi(e, t), await Zi(e, t), await Qi(e, t));
|
|
3311
3387
|
}
|
|
3312
3388
|
//#endregion
|
|
3313
3389
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
|
|
3314
|
-
function
|
|
3390
|
+
function ea(e, t) {
|
|
3315
3391
|
let { style: n } = e;
|
|
3316
3392
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3317
3393
|
let r = t.style;
|
|
@@ -3321,22 +3397,22 @@ function Yi(e, t) {
|
|
|
3321
3397
|
}
|
|
3322
3398
|
//#endregion
|
|
3323
3399
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
|
|
3324
|
-
var
|
|
3325
|
-
async function
|
|
3326
|
-
let t =
|
|
3400
|
+
var ta = {};
|
|
3401
|
+
async function na(e) {
|
|
3402
|
+
let t = ta[e];
|
|
3327
3403
|
return t ?? (t = {
|
|
3328
3404
|
url: e,
|
|
3329
3405
|
cssText: await (await fetch(e)).text()
|
|
3330
|
-
},
|
|
3406
|
+
}, ta[e] = t, t);
|
|
3331
3407
|
}
|
|
3332
|
-
async function
|
|
3408
|
+
async function ra(e, t) {
|
|
3333
3409
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3334
3410
|
let a = i.replace(r, "$1");
|
|
3335
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3411
|
+
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]));
|
|
3336
3412
|
});
|
|
3337
3413
|
return Promise.all(i).then(() => n);
|
|
3338
3414
|
}
|
|
3339
|
-
function
|
|
3415
|
+
function ia(e) {
|
|
3340
3416
|
if (e == null) return [];
|
|
3341
3417
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3342
3418
|
for (;;) {
|
|
@@ -3356,13 +3432,13 @@ function $i(e) {
|
|
|
3356
3432
|
}
|
|
3357
3433
|
return t;
|
|
3358
3434
|
}
|
|
3359
|
-
async function
|
|
3435
|
+
async function aa(e, t) {
|
|
3360
3436
|
let n = [], r = [];
|
|
3361
3437
|
return e.forEach((n) => {
|
|
3362
3438
|
if ("cssRules" in n) try {
|
|
3363
|
-
|
|
3439
|
+
Qr(n.cssRules || []).forEach((e, i) => {
|
|
3364
3440
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3365
|
-
let a = i + 1, o = e.href, s =
|
|
3441
|
+
let a = i + 1, o = e.href, s = na(o).then((e) => ra(e, t)).then((e) => ia(e).forEach((e) => {
|
|
3366
3442
|
try {
|
|
3367
3443
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3368
3444
|
} catch (t) {
|
|
@@ -3379,7 +3455,7 @@ async function ea(e, t) {
|
|
|
3379
3455
|
});
|
|
3380
3456
|
} catch (i) {
|
|
3381
3457
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3382
|
-
n.href != null && r.push(
|
|
3458
|
+
n.href != null && r.push(na(n.href).then((e) => ra(e, t)).then((e) => ia(e).forEach((e) => {
|
|
3383
3459
|
a.insertRule(e, a.cssRules.length);
|
|
3384
3460
|
})).catch((e) => {
|
|
3385
3461
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3387,7 +3463,7 @@ async function ea(e, t) {
|
|
|
3387
3463
|
}
|
|
3388
3464
|
}), Promise.all(r).then(() => (e.forEach((e) => {
|
|
3389
3465
|
if ("cssRules" in e) try {
|
|
3390
|
-
|
|
3466
|
+
Qr(e.cssRules || []).forEach((e) => {
|
|
3391
3467
|
n.push(e);
|
|
3392
3468
|
});
|
|
3393
3469
|
} catch (t) {
|
|
@@ -3395,36 +3471,36 @@ async function ea(e, t) {
|
|
|
3395
3471
|
}
|
|
3396
3472
|
}), n));
|
|
3397
3473
|
}
|
|
3398
|
-
function
|
|
3399
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
3474
|
+
function oa(e) {
|
|
3475
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => qi(e.style.getPropertyValue("src")));
|
|
3400
3476
|
}
|
|
3401
|
-
async function
|
|
3477
|
+
async function sa(e, t) {
|
|
3402
3478
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3403
|
-
return
|
|
3479
|
+
return oa(await aa(Qr(e.ownerDocument.styleSheets), t));
|
|
3404
3480
|
}
|
|
3405
|
-
function
|
|
3481
|
+
function ca(e) {
|
|
3406
3482
|
return e.trim().replace(/["']/g, "");
|
|
3407
3483
|
}
|
|
3408
|
-
function
|
|
3484
|
+
function la(e) {
|
|
3409
3485
|
let t = /* @__PURE__ */ new Set();
|
|
3410
3486
|
function n(e) {
|
|
3411
3487
|
(e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
|
|
3412
|
-
t.add(
|
|
3488
|
+
t.add(ca(e));
|
|
3413
3489
|
}), Array.from(e.children).forEach((e) => {
|
|
3414
3490
|
e instanceof HTMLElement && n(e);
|
|
3415
3491
|
});
|
|
3416
3492
|
}
|
|
3417
3493
|
return n(e), t;
|
|
3418
3494
|
}
|
|
3419
|
-
async function
|
|
3420
|
-
let n = await
|
|
3421
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
3495
|
+
async function ua(e, t) {
|
|
3496
|
+
let n = await sa(e, t), r = la(e);
|
|
3497
|
+
return (await Promise.all(n.filter((e) => r.has(ca(e.style.fontFamily))).map((e) => {
|
|
3422
3498
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
3423
|
-
return
|
|
3499
|
+
return Ji(e.cssText, n, t);
|
|
3424
3500
|
}))).join("\n");
|
|
3425
3501
|
}
|
|
3426
|
-
async function
|
|
3427
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
3502
|
+
async function da(e, t) {
|
|
3503
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await ua(e, t) : t.fontEmbedCSS;
|
|
3428
3504
|
if (n) {
|
|
3429
3505
|
let t = document.createElement("style"), r = document.createTextNode(n);
|
|
3430
3506
|
t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -3432,18 +3508,18 @@ async function oa(e, t) {
|
|
|
3432
3508
|
}
|
|
3433
3509
|
//#endregion
|
|
3434
3510
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
|
|
3435
|
-
async function
|
|
3436
|
-
let { width: n, height: r } =
|
|
3437
|
-
return await
|
|
3511
|
+
async function fa(e, t = {}) {
|
|
3512
|
+
let { width: n, height: r } = ii(e, t), i = await zi(e, t, !0);
|
|
3513
|
+
return await da(i, t), await $i(i, t), ea(i, t), await li(i, n, r);
|
|
3438
3514
|
}
|
|
3439
|
-
async function
|
|
3440
|
-
let { width: n, height: r } =
|
|
3441
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
3515
|
+
async function pa(e, t = {}) {
|
|
3516
|
+
let { width: n, height: r } = ii(e, t), i = await si(await fa(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || ai(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
3517
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || oi(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;
|
|
3442
3518
|
}
|
|
3443
3519
|
//#endregion
|
|
3444
3520
|
//#region src/runtime/screenshot.ts
|
|
3445
|
-
var
|
|
3446
|
-
function
|
|
3521
|
+
var ma = 2 * 1024 * 1024, ha = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", ga = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
|
|
3522
|
+
function _a(e) {
|
|
3447
3523
|
let t = e.parentElement;
|
|
3448
3524
|
for (; t;) {
|
|
3449
3525
|
if (t.hasAttribute("data-markup-safe")) return !0;
|
|
@@ -3451,35 +3527,35 @@ function fa(e) {
|
|
|
3451
3527
|
}
|
|
3452
3528
|
return !1;
|
|
3453
3529
|
}
|
|
3454
|
-
function
|
|
3530
|
+
function va(e) {
|
|
3455
3531
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
3456
3532
|
function r(e) {
|
|
3457
3533
|
t.has(e) || (t.add(e), n.push(e));
|
|
3458
3534
|
}
|
|
3459
3535
|
for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
|
|
3460
|
-
for (let e of document.querySelectorAll(
|
|
3536
|
+
for (let e of document.querySelectorAll(ga)) _a(e) || r(e);
|
|
3461
3537
|
if (e.redactSelector) try {
|
|
3462
|
-
for (let t of document.querySelectorAll(e.redactSelector))
|
|
3538
|
+
for (let t of document.querySelectorAll(e.redactSelector)) _a(t) || r(t);
|
|
3463
3539
|
} catch {}
|
|
3464
|
-
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea"))
|
|
3540
|
+
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) _a(e) || r(e);
|
|
3465
3541
|
return n;
|
|
3466
3542
|
}
|
|
3467
|
-
function
|
|
3543
|
+
function ya(e) {
|
|
3468
3544
|
let t = e.getAttribute("style");
|
|
3469
|
-
return e.setAttribute("style", t ? `${t};${
|
|
3545
|
+
return e.setAttribute("style", t ? `${t};${ha}` : ha), () => {
|
|
3470
3546
|
t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
|
|
3471
3547
|
};
|
|
3472
3548
|
}
|
|
3473
|
-
function
|
|
3549
|
+
function ba(e) {
|
|
3474
3550
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
3475
3551
|
let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
|
|
3476
3552
|
return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
|
|
3477
3553
|
}
|
|
3478
|
-
async function
|
|
3554
|
+
async function xa(e, t, n) {
|
|
3479
3555
|
try {
|
|
3480
|
-
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ?
|
|
3556
|
+
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? va(n) : [], s = o.map(ba), c = o.map(ya), l;
|
|
3481
3557
|
try {
|
|
3482
|
-
l = await
|
|
3558
|
+
l = await pa(document.documentElement, {
|
|
3483
3559
|
width: r,
|
|
3484
3560
|
height: i,
|
|
3485
3561
|
cacheBust: !0,
|
|
@@ -3498,17 +3574,17 @@ async function ga(e, t, n) {
|
|
|
3498
3574
|
}
|
|
3499
3575
|
if (t) {
|
|
3500
3576
|
let e = l.getContext("2d");
|
|
3501
|
-
e &&
|
|
3577
|
+
e && Ca(e, t.x, t.y, a);
|
|
3502
3578
|
}
|
|
3503
|
-
let u = await
|
|
3579
|
+
let u = await Sa(l, .85);
|
|
3504
3580
|
if (!u) return null;
|
|
3505
|
-
if (u.size <=
|
|
3581
|
+
if (u.size <= ma) return {
|
|
3506
3582
|
blob: u,
|
|
3507
3583
|
redactedCount: s.length,
|
|
3508
3584
|
redactedSelectors: s
|
|
3509
3585
|
};
|
|
3510
|
-
let d = await
|
|
3511
|
-
return !d || d.size >
|
|
3586
|
+
let d = await Sa(l, .5);
|
|
3587
|
+
return !d || d.size > ma ? null : {
|
|
3512
3588
|
blob: d,
|
|
3513
3589
|
redactedCount: s.length,
|
|
3514
3590
|
redactedSelectors: s
|
|
@@ -3517,10 +3593,10 @@ async function ga(e, t, n) {
|
|
|
3517
3593
|
return null;
|
|
3518
3594
|
}
|
|
3519
3595
|
}
|
|
3520
|
-
function
|
|
3596
|
+
function Sa(e, t) {
|
|
3521
3597
|
return new Promise((n) => e.toBlob(n, "image/jpeg", t));
|
|
3522
3598
|
}
|
|
3523
|
-
function
|
|
3599
|
+
function Ca(e, t, n, r) {
|
|
3524
3600
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
3525
3601
|
e.save();
|
|
3526
3602
|
let l = 2 * i;
|
|
@@ -3537,13 +3613,52 @@ function va(e, t, n, r) {
|
|
|
3537
3613
|
]), e.fillStyle = "#1a1614", e.fill(), e.beginPath(), e.arc(s + o, c - o, 3 * i, 0, Math.PI * 2), e.fillStyle = "#e35d2a", e.fill(), e.restore();
|
|
3538
3614
|
}
|
|
3539
3615
|
//#endregion
|
|
3616
|
+
//#region src/runtime/use-subscription-token.ts
|
|
3617
|
+
var wa = ar({
|
|
3618
|
+
idle: { issued: (e, t) => ({
|
|
3619
|
+
kind: "active",
|
|
3620
|
+
token: t.token,
|
|
3621
|
+
expiresAt: t.expiresAt
|
|
3622
|
+
}) },
|
|
3623
|
+
active: { issued: (e, t) => ({
|
|
3624
|
+
kind: "active",
|
|
3625
|
+
token: t.token,
|
|
3626
|
+
expiresAt: t.expiresAt
|
|
3627
|
+
}) }
|
|
3628
|
+
}), Ta = 30 * 6e4, Ea = 6e4, Da = 6e4;
|
|
3629
|
+
function Oa(e) {
|
|
3630
|
+
let [t, n] = or(wa, { kind: "idle" });
|
|
3631
|
+
return z(() => {
|
|
3632
|
+
let t = !1, r = null;
|
|
3633
|
+
async function i() {
|
|
3634
|
+
try {
|
|
3635
|
+
let a = await e.getSubscriptionToken();
|
|
3636
|
+
if (t) return;
|
|
3637
|
+
n({
|
|
3638
|
+
type: "issued",
|
|
3639
|
+
token: a.token,
|
|
3640
|
+
expiresAt: a.expiresAt
|
|
3641
|
+
});
|
|
3642
|
+
let o = Math.max(Ea, a.expiresAt - Date.now() - Ta);
|
|
3643
|
+
r = setTimeout(i, o);
|
|
3644
|
+
} catch {
|
|
3645
|
+
if (t) return;
|
|
3646
|
+
r = setTimeout(i, Da);
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
return i(), () => {
|
|
3650
|
+
t = !0, r && clearTimeout(r);
|
|
3651
|
+
};
|
|
3652
|
+
}, [e, n]), t.kind === "active" ? t.token : null;
|
|
3653
|
+
}
|
|
3654
|
+
//#endregion
|
|
3540
3655
|
//#region src/runtime/utils.ts
|
|
3541
|
-
function
|
|
3656
|
+
function Z(...e) {
|
|
3542
3657
|
return e.filter(Boolean).join(" ");
|
|
3543
3658
|
}
|
|
3544
3659
|
//#endregion
|
|
3545
3660
|
//#region src/runtime/use-drag.ts
|
|
3546
|
-
function
|
|
3661
|
+
function ka(e) {
|
|
3547
3662
|
let t = B(e);
|
|
3548
3663
|
t.current = e;
|
|
3549
3664
|
let [n, r] = R(!1), i = B(!1);
|
|
@@ -3572,8 +3687,8 @@ function ya(e) {
|
|
|
3572
3687
|
g = !0, i.current = !0, r(!0), t.current.onStart?.();
|
|
3573
3688
|
}
|
|
3574
3689
|
let o = Math.max(m, window.innerWidth - d - m), v = Math.max(m, window.innerHeight - f - m), y = {
|
|
3575
|
-
left:
|
|
3576
|
-
top:
|
|
3690
|
+
left: Aa(l + n, m, o),
|
|
3691
|
+
top: Aa(u + a, m, v)
|
|
3577
3692
|
};
|
|
3578
3693
|
_ = y, t.current.onMove(y);
|
|
3579
3694
|
}
|
|
@@ -3589,14 +3704,14 @@ function ya(e) {
|
|
|
3589
3704
|
consumeClickIfDragged: V(() => i.current ? (i.current = !1, !0) : !1, [])
|
|
3590
3705
|
};
|
|
3591
3706
|
}
|
|
3592
|
-
function
|
|
3707
|
+
function Aa(e, t, n) {
|
|
3593
3708
|
return Math.max(t, Math.min(n, e));
|
|
3594
3709
|
}
|
|
3595
3710
|
//#endregion
|
|
3596
3711
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
3597
|
-
var
|
|
3712
|
+
var ja = 0;
|
|
3598
3713
|
Array.isArray;
|
|
3599
|
-
function
|
|
3714
|
+
function Q(e, n, r, i, a, o) {
|
|
3600
3715
|
n ||= {};
|
|
3601
3716
|
var s, c, l = n;
|
|
3602
3717
|
if ("ref" in l) for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
|
|
@@ -3611,7 +3726,7 @@ function $(e, n, r, i, a, o) {
|
|
|
3611
3726
|
__e: null,
|
|
3612
3727
|
__c: null,
|
|
3613
3728
|
constructor: void 0,
|
|
3614
|
-
__v: --
|
|
3729
|
+
__v: --ja,
|
|
3615
3730
|
__i: -1,
|
|
3616
3731
|
__u: 0,
|
|
3617
3732
|
__source: a,
|
|
@@ -3622,84 +3737,84 @@ function $(e, n, r, i, a, o) {
|
|
|
3622
3737
|
}
|
|
3623
3738
|
//#endregion
|
|
3624
3739
|
//#region src/runtime/ui/icons.tsx
|
|
3625
|
-
function
|
|
3626
|
-
return /* @__PURE__ */
|
|
3740
|
+
function Ma({ size: e = 16 }) {
|
|
3741
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3627
3742
|
width: e,
|
|
3628
3743
|
height: e,
|
|
3629
3744
|
viewBox: "0 0 126 126",
|
|
3630
3745
|
fill: "currentColor",
|
|
3631
3746
|
"aria-hidden": !0,
|
|
3632
|
-
children: /* @__PURE__ */
|
|
3747
|
+
children: /* @__PURE__ */ Q("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
|
|
3633
3748
|
});
|
|
3634
3749
|
}
|
|
3635
|
-
function
|
|
3636
|
-
return /* @__PURE__ */
|
|
3750
|
+
function Na({ size: e = 16 }) {
|
|
3751
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3637
3752
|
width: e,
|
|
3638
3753
|
height: e,
|
|
3639
3754
|
viewBox: "0 0 20 20",
|
|
3640
3755
|
fill: "currentColor",
|
|
3641
|
-
children: /* @__PURE__ */
|
|
3756
|
+
children: /* @__PURE__ */ Q("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
3642
3757
|
});
|
|
3643
3758
|
}
|
|
3644
|
-
function
|
|
3645
|
-
return /* @__PURE__ */
|
|
3759
|
+
function Pa({ size: e = 16 }) {
|
|
3760
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3646
3761
|
width: e,
|
|
3647
3762
|
height: e,
|
|
3648
3763
|
viewBox: "0 0 20 20",
|
|
3649
3764
|
fill: "currentColor",
|
|
3650
|
-
children: /* @__PURE__ */
|
|
3765
|
+
children: /* @__PURE__ */ Q("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
|
|
3651
3766
|
});
|
|
3652
3767
|
}
|
|
3653
|
-
function
|
|
3654
|
-
return /* @__PURE__ */
|
|
3768
|
+
function Fa({ size: e = 16 }) {
|
|
3769
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3655
3770
|
width: e,
|
|
3656
3771
|
height: e,
|
|
3657
3772
|
viewBox: "0 0 16 16",
|
|
3658
3773
|
fill: "currentColor",
|
|
3659
|
-
children: /* @__PURE__ */
|
|
3774
|
+
children: /* @__PURE__ */ Q("path", {
|
|
3660
3775
|
fillRule: "evenodd",
|
|
3661
3776
|
d: "M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",
|
|
3662
3777
|
clipRule: "evenodd"
|
|
3663
3778
|
})
|
|
3664
3779
|
});
|
|
3665
3780
|
}
|
|
3666
|
-
function
|
|
3667
|
-
return /* @__PURE__ */
|
|
3781
|
+
function Ia({ size: e = 16 }) {
|
|
3782
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3668
3783
|
width: e,
|
|
3669
3784
|
height: e,
|
|
3670
3785
|
viewBox: "0 0 20 20",
|
|
3671
3786
|
fill: "currentColor",
|
|
3672
3787
|
"aria-hidden": !0,
|
|
3673
|
-
children: /* @__PURE__ */
|
|
3788
|
+
children: /* @__PURE__ */ Q("path", {
|
|
3674
3789
|
"fill-rule": "evenodd",
|
|
3675
3790
|
d: "M1 8a2 2 0 0 1 2-2h.93a2 2 0 0 0 1.664-.89l.812-1.22A2 2 0 0 1 8.07 3h3.86a2 2 0 0 1 1.664.89l.812 1.22A2 2 0 0 0 16.07 6H17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8Zm13.5 3a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM10 14a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",
|
|
3676
3791
|
"clip-rule": "evenodd"
|
|
3677
3792
|
})
|
|
3678
3793
|
});
|
|
3679
3794
|
}
|
|
3680
|
-
function
|
|
3681
|
-
return /* @__PURE__ */
|
|
3795
|
+
function La({ size: e = 16 }) {
|
|
3796
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3682
3797
|
width: e,
|
|
3683
3798
|
height: e,
|
|
3684
3799
|
viewBox: "0 0 16 16",
|
|
3685
3800
|
fill: "currentColor",
|
|
3686
|
-
children: /* @__PURE__ */
|
|
3801
|
+
children: /* @__PURE__ */ Q("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
|
|
3687
3802
|
});
|
|
3688
3803
|
}
|
|
3689
|
-
function
|
|
3690
|
-
return /* @__PURE__ */
|
|
3804
|
+
function Ra({ size: e = 16 }) {
|
|
3805
|
+
return /* @__PURE__ */ Q("svg", {
|
|
3691
3806
|
width: e,
|
|
3692
3807
|
height: e,
|
|
3693
3808
|
viewBox: "0 0 256 256",
|
|
3694
3809
|
fill: "currentColor",
|
|
3695
3810
|
"aria-hidden": !0,
|
|
3696
|
-
children: /* @__PURE__ */
|
|
3811
|
+
children: /* @__PURE__ */ Q("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM80,108a12,12,0,1,1,12,12A12,12,0,0,1,80,108Zm96,0a12,12,0,1,1-12-12A12,12,0,0,1,176,108Zm-1.07,48c-10.29,17.79-27.4,28-46.93,28s-36.63-10.2-46.92-28a8,8,0,1,1,13.84-8c7.47,12.91,19.21,20,33.08,20s25.61-7.1,33.07-20a8,8,0,0,1,13.86,8Z" })
|
|
3697
3812
|
});
|
|
3698
3813
|
}
|
|
3699
3814
|
//#endregion
|
|
3700
3815
|
//#region src/runtime/ui/fab.tsx
|
|
3701
|
-
function
|
|
3702
|
-
let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : r === "bottom-center" ? "markup-fab-center" : "markup-fab-right", [c, l] = R(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } =
|
|
3816
|
+
function za({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i, variant: a = "default" }) {
|
|
3817
|
+
let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : r === "bottom-center" ? "markup-fab-center" : "markup-fab-right", [c, l] = R(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } = ka({
|
|
3703
3818
|
preventDefault: !0,
|
|
3704
3819
|
stopPropagation: !0,
|
|
3705
3820
|
onMove: l,
|
|
@@ -3718,9 +3833,9 @@ function ka({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", o
|
|
|
3718
3833
|
t();
|
|
3719
3834
|
}
|
|
3720
3835
|
}
|
|
3721
|
-
return /* @__PURE__ */
|
|
3836
|
+
return /* @__PURE__ */ Q("button", {
|
|
3722
3837
|
type: "button",
|
|
3723
|
-
class:
|
|
3838
|
+
class: Z("markup-fab", !c && s, c && "is-floating", d && "is-dragging", e && "is-active", o && "is-icon-only"),
|
|
3724
3839
|
style: c ? {
|
|
3725
3840
|
left: `${c.left}px`,
|
|
3726
3841
|
top: `${c.top}px`
|
|
@@ -3729,10 +3844,10 @@ function ka({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", o
|
|
|
3729
3844
|
onPointerDown: u,
|
|
3730
3845
|
"aria-label": e ? "Cancel placing markup" : "Leave a markup",
|
|
3731
3846
|
"aria-pressed": e,
|
|
3732
|
-
children: [/* @__PURE__ */
|
|
3847
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
3733
3848
|
class: "markup-fab-icon",
|
|
3734
|
-
children:
|
|
3735
|
-
}), o ? null : /* @__PURE__ */
|
|
3849
|
+
children: Q(e ? Na : Ma, { size: 16 })
|
|
3850
|
+
}), o ? null : /* @__PURE__ */ Q("span", {
|
|
3736
3851
|
class: "markup-fab-label",
|
|
3737
3852
|
children: e ? "Cancel" : "Markup"
|
|
3738
3853
|
})]
|
|
@@ -3740,7 +3855,7 @@ function ka({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", o
|
|
|
3740
3855
|
}
|
|
3741
3856
|
//#endregion
|
|
3742
3857
|
//#region src/runtime/use-focus-trap.ts
|
|
3743
|
-
var
|
|
3858
|
+
var Ba = [
|
|
3744
3859
|
"a[href]",
|
|
3745
3860
|
"button:not([disabled])",
|
|
3746
3861
|
"input:not([disabled])",
|
|
@@ -3748,14 +3863,14 @@ var Aa = [
|
|
|
3748
3863
|
"textarea:not([disabled])",
|
|
3749
3864
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
3750
3865
|
].join(",");
|
|
3751
|
-
function
|
|
3866
|
+
function Va(e, t) {
|
|
3752
3867
|
z(() => {
|
|
3753
3868
|
if (!t) return;
|
|
3754
3869
|
let n = e.current;
|
|
3755
3870
|
if (!n) return;
|
|
3756
3871
|
function r(e) {
|
|
3757
3872
|
if (e.key !== "Tab") return;
|
|
3758
|
-
let t = Array.from(n.querySelectorAll(
|
|
3873
|
+
let t = Array.from(n.querySelectorAll(Ba)), r = t[0], i = t[t.length - 1];
|
|
3759
3874
|
if (!r || !i) return;
|
|
3760
3875
|
let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
|
|
3761
3876
|
(e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
|
|
@@ -3765,7 +3880,7 @@ function ja(e, t) {
|
|
|
3765
3880
|
}
|
|
3766
3881
|
//#endregion
|
|
3767
3882
|
//#region src/runtime/use-object-url.ts
|
|
3768
|
-
function
|
|
3883
|
+
function Ha(e) {
|
|
3769
3884
|
let [t, n] = R(null);
|
|
3770
3885
|
return z(() => {
|
|
3771
3886
|
if (!e) {
|
|
@@ -3778,7 +3893,7 @@ function Ma(e) {
|
|
|
3778
3893
|
}
|
|
3779
3894
|
//#endregion
|
|
3780
3895
|
//#region src/runtime/ui/author-prompt.tsx
|
|
3781
|
-
function
|
|
3896
|
+
function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
|
|
3782
3897
|
let [o, s] = R(""), [c, l] = R(""), u = B(null);
|
|
3783
3898
|
z(() => {
|
|
3784
3899
|
u.current?.focus();
|
|
@@ -3789,24 +3904,24 @@ function Na({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3789
3904
|
!i || e || t || r(i, c.trim() || void 0);
|
|
3790
3905
|
}
|
|
3791
3906
|
let f = e || t;
|
|
3792
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ Q("form", {
|
|
3793
3908
|
class: "markup-author-prompt",
|
|
3794
3909
|
onSubmit: d,
|
|
3795
3910
|
children: [
|
|
3796
|
-
a ? /* @__PURE__ */
|
|
3911
|
+
a ? /* @__PURE__ */ Q(S, { children: [/* @__PURE__ */ Q("button", {
|
|
3797
3912
|
type: "button",
|
|
3798
3913
|
class: "markup-btn markup-btn-primary",
|
|
3799
3914
|
onClick: a,
|
|
3800
3915
|
disabled: e || n,
|
|
3801
3916
|
children: n ? "Signing in…" : "Sign in with Markup"
|
|
3802
|
-
}), /* @__PURE__ */
|
|
3917
|
+
}), /* @__PURE__ */ Q("p", {
|
|
3803
3918
|
class: "markup-author-divider",
|
|
3804
3919
|
children: "or continue as a guest"
|
|
3805
|
-
})] }) : /* @__PURE__ */
|
|
3920
|
+
})] }) : /* @__PURE__ */ Q("p", {
|
|
3806
3921
|
class: "markup-eyebrow",
|
|
3807
3922
|
children: "who's leaving feedback?"
|
|
3808
3923
|
}),
|
|
3809
|
-
/* @__PURE__ */
|
|
3924
|
+
/* @__PURE__ */ Q("input", {
|
|
3810
3925
|
ref: u,
|
|
3811
3926
|
class: "markup-input",
|
|
3812
3927
|
type: "text",
|
|
@@ -3819,7 +3934,7 @@ function Na({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3819
3934
|
disabled: f,
|
|
3820
3935
|
"data-1p-ignore": !0
|
|
3821
3936
|
}),
|
|
3822
|
-
/* @__PURE__ */
|
|
3937
|
+
/* @__PURE__ */ Q("input", {
|
|
3823
3938
|
class: "markup-input",
|
|
3824
3939
|
type: "email",
|
|
3825
3940
|
name: "email",
|
|
@@ -3831,21 +3946,21 @@ function Na({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3831
3946
|
disabled: f,
|
|
3832
3947
|
"data-1p-ignore": !0
|
|
3833
3948
|
}),
|
|
3834
|
-
t ? /* @__PURE__ */
|
|
3949
|
+
t ? /* @__PURE__ */ Q("p", {
|
|
3835
3950
|
class: "markup-author-status",
|
|
3836
3951
|
role: "status",
|
|
3837
3952
|
"aria-live": "polite",
|
|
3838
3953
|
children: "Connecting…"
|
|
3839
3954
|
}) : null,
|
|
3840
|
-
/* @__PURE__ */
|
|
3955
|
+
/* @__PURE__ */ Q("div", {
|
|
3841
3956
|
class: "markup-composer-actions",
|
|
3842
|
-
children: [/* @__PURE__ */
|
|
3957
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
3843
3958
|
type: "button",
|
|
3844
3959
|
class: "markup-btn markup-btn-ghost",
|
|
3845
3960
|
onClick: i,
|
|
3846
3961
|
disabled: e,
|
|
3847
3962
|
children: "Cancel"
|
|
3848
|
-
}), /* @__PURE__ */
|
|
3963
|
+
}), /* @__PURE__ */ Q("button", {
|
|
3849
3964
|
type: "submit",
|
|
3850
3965
|
class: "markup-btn markup-btn-primary",
|
|
3851
3966
|
disabled: !o.trim() || f,
|
|
@@ -3857,8 +3972,8 @@ function Na({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3857
3972
|
}
|
|
3858
3973
|
//#endregion
|
|
3859
3974
|
//#region src/runtime/ui/composer.tsx
|
|
3860
|
-
var
|
|
3861
|
-
function
|
|
3975
|
+
var Wa = 4e3;
|
|
3976
|
+
function Ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o }) {
|
|
3862
3977
|
let [s, c] = R(""), l = B(null), u = B(!1);
|
|
3863
3978
|
z(() => {
|
|
3864
3979
|
r && l.current?.focus();
|
|
@@ -3868,7 +3983,7 @@ function Fa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3868
3983
|
}, [s]), z(() => {
|
|
3869
3984
|
u.current && !i && !a && (c(""), l.current?.focus()), u.current = i;
|
|
3870
3985
|
}, [i, a]);
|
|
3871
|
-
let d =
|
|
3986
|
+
let d = Wa - s.length, f = d < 0;
|
|
3872
3987
|
function p(e) {
|
|
3873
3988
|
e?.preventDefault();
|
|
3874
3989
|
let t = s.trim();
|
|
@@ -3879,53 +3994,53 @@ function Fa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3879
3994
|
}
|
|
3880
3995
|
let h = s.length > 0;
|
|
3881
3996
|
function g(e) {
|
|
3882
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ Q("button", {
|
|
3883
3998
|
type: "submit",
|
|
3884
3999
|
class: "markup-btn markup-btn-primary",
|
|
3885
4000
|
disabled: i || !s.trim() || f,
|
|
3886
4001
|
"aria-label": i ? "Sending…" : n,
|
|
3887
4002
|
title: i ? "Sending…" : n,
|
|
3888
4003
|
tabIndex: e,
|
|
3889
|
-
children: /* @__PURE__ */
|
|
4004
|
+
children: /* @__PURE__ */ Q(La, { size: 14 })
|
|
3890
4005
|
});
|
|
3891
4006
|
}
|
|
3892
|
-
return /* @__PURE__ */
|
|
3893
|
-
class:
|
|
4007
|
+
return /* @__PURE__ */ Q("form", {
|
|
4008
|
+
class: Z("markup-composer", h && "is-filled"),
|
|
3894
4009
|
onSubmit: p,
|
|
3895
4010
|
children: [
|
|
3896
|
-
/* @__PURE__ */
|
|
4011
|
+
/* @__PURE__ */ Q("textarea", {
|
|
3897
4012
|
ref: l,
|
|
3898
4013
|
name: "reply",
|
|
3899
4014
|
class: "markup-composer-input",
|
|
3900
4015
|
placeholder: t,
|
|
3901
4016
|
rows: h ? 2 : 1,
|
|
3902
|
-
maxLength:
|
|
4017
|
+
maxLength: Wa + 100,
|
|
3903
4018
|
value: s,
|
|
3904
4019
|
onInput: (e) => c(e.currentTarget.value),
|
|
3905
4020
|
onKeyDown: m,
|
|
3906
4021
|
disabled: i,
|
|
3907
4022
|
"aria-label": e
|
|
3908
4023
|
}),
|
|
3909
|
-
/* @__PURE__ */
|
|
4024
|
+
/* @__PURE__ */ Q("div", {
|
|
3910
4025
|
class: "markup-composer-footer-wrap",
|
|
3911
|
-
children: /* @__PURE__ */
|
|
4026
|
+
children: /* @__PURE__ */ Q("div", {
|
|
3912
4027
|
class: "markup-composer-footer",
|
|
3913
|
-
children: [/* @__PURE__ */
|
|
4028
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
3914
4029
|
class: "markup-composer-hint",
|
|
3915
|
-
children: a ? /* @__PURE__ */
|
|
4030
|
+
children: a ? /* @__PURE__ */ Q("span", {
|
|
3916
4031
|
class: "markup-composer-error",
|
|
3917
4032
|
children: a
|
|
3918
|
-
}) : f ? /* @__PURE__ */
|
|
4033
|
+
}) : f ? /* @__PURE__ */ Q("span", {
|
|
3919
4034
|
class: "markup-composer-error",
|
|
3920
4035
|
children: [Math.abs(d), " too long"]
|
|
3921
|
-
}) : /* @__PURE__ */
|
|
3922
|
-
}), /* @__PURE__ */
|
|
4036
|
+
}) : /* @__PURE__ */ Q("span", { children: "⌘↵ to send" })
|
|
4037
|
+
}), /* @__PURE__ */ Q("div", {
|
|
3923
4038
|
class: "markup-composer-actions",
|
|
3924
4039
|
children: g(h ? void 0 : -1)
|
|
3925
4040
|
})]
|
|
3926
4041
|
})
|
|
3927
4042
|
}),
|
|
3928
|
-
/* @__PURE__ */
|
|
4043
|
+
/* @__PURE__ */ Q("span", {
|
|
3929
4044
|
class: "markup-composer-actions-empty",
|
|
3930
4045
|
"aria-hidden": h || void 0,
|
|
3931
4046
|
children: g(h ? -1 : void 0)
|
|
@@ -3935,10 +4050,10 @@ function Fa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3935
4050
|
}
|
|
3936
4051
|
//#endregion
|
|
3937
4052
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
3938
|
-
function
|
|
4053
|
+
function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotRedactedCount: u, screenshotRedactedSelectors: d, onAuthor: f, onSignIn: p, onSubmit: m, onClose: h }) {
|
|
3939
4054
|
let g = B(null);
|
|
3940
|
-
|
|
3941
|
-
let [_, v] = R(!1), [y, b] = R(!1), x =
|
|
4055
|
+
Va(g, !0);
|
|
4056
|
+
let [_, v] = R(!1), [y, b] = R(!1), x = Ha(c), [C, w] = R(null), { onPointerDown: T, isDragging: E } = ka({
|
|
3942
4057
|
targetRef: g,
|
|
3943
4058
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
3944
4059
|
onMove: w
|
|
@@ -3954,10 +4069,10 @@ function Ia({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3954
4069
|
}
|
|
3955
4070
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3956
4071
|
}, [h]);
|
|
3957
|
-
let D =
|
|
3958
|
-
return /* @__PURE__ */
|
|
4072
|
+
let D = qa(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), O = qa(t - window.scrollY - 16, 12, window.innerHeight - 220), k = c != null, A = l || k;
|
|
4073
|
+
return /* @__PURE__ */ Q("div", {
|
|
3959
4074
|
ref: g,
|
|
3960
|
-
class:
|
|
4075
|
+
class: Z("markup-popover", C && "is-floating", E && "is-dragging"),
|
|
3961
4076
|
popover: "auto",
|
|
3962
4077
|
style: {
|
|
3963
4078
|
"--markup-pop-x": `${C?.left ?? D}px`,
|
|
@@ -3965,89 +4080,89 @@ function Ia({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3965
4080
|
},
|
|
3966
4081
|
role: "dialog",
|
|
3967
4082
|
"aria-label": "New markup",
|
|
3968
|
-
children: [/* @__PURE__ */
|
|
4083
|
+
children: [/* @__PURE__ */ Q("header", {
|
|
3969
4084
|
class: "markup-popover-header",
|
|
3970
4085
|
onPointerDown: T,
|
|
3971
|
-
children: [/* @__PURE__ */
|
|
4086
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
3972
4087
|
class: "markup-eyebrow",
|
|
3973
4088
|
children: "new · markup"
|
|
3974
|
-
}), /* @__PURE__ */
|
|
4089
|
+
}), /* @__PURE__ */ Q("button", {
|
|
3975
4090
|
type: "button",
|
|
3976
4091
|
class: "markup-icon-btn",
|
|
3977
4092
|
"aria-label": "Discard pin",
|
|
3978
4093
|
onClick: h,
|
|
3979
|
-
children: /* @__PURE__ */
|
|
4094
|
+
children: /* @__PURE__ */ Q(Na, { size: 16 })
|
|
3980
4095
|
})]
|
|
3981
|
-
}), n == null ? /* @__PURE__ */
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
4096
|
+
}), n == null ? /* @__PURE__ */ Q(Ua, {
|
|
4097
|
+
isPending: o,
|
|
4098
|
+
isConnecting: i,
|
|
4099
|
+
isSigningIn: a,
|
|
3985
4100
|
onSubmit: f,
|
|
3986
4101
|
onCancel: h,
|
|
3987
4102
|
onSignIn: p
|
|
3988
|
-
}) : /* @__PURE__ */
|
|
4103
|
+
}) : /* @__PURE__ */ Q("div", {
|
|
3989
4104
|
class: "markup-popover-body",
|
|
3990
4105
|
children: [
|
|
3991
|
-
/* @__PURE__ */
|
|
4106
|
+
/* @__PURE__ */ Q("p", {
|
|
3992
4107
|
class: "markup-popover-byline",
|
|
3993
4108
|
children: [
|
|
3994
4109
|
"posting as ",
|
|
3995
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ Q("span", {
|
|
3996
4111
|
class: "markup-popover-name",
|
|
3997
4112
|
children: n
|
|
3998
4113
|
}),
|
|
3999
|
-
r ? /* @__PURE__ */
|
|
4114
|
+
r ? /* @__PURE__ */ Q("span", {
|
|
4000
4115
|
class: "markup-comment-badge",
|
|
4001
4116
|
children: "team"
|
|
4002
4117
|
}) : null
|
|
4003
4118
|
]
|
|
4004
4119
|
}),
|
|
4005
|
-
/* @__PURE__ */
|
|
4120
|
+
/* @__PURE__ */ Q(Ga, {
|
|
4006
4121
|
label: "Feedback",
|
|
4007
4122
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
4008
4123
|
submitLabel: "Post markup",
|
|
4009
|
-
|
|
4124
|
+
isPending: o,
|
|
4010
4125
|
error: s,
|
|
4011
4126
|
onSubmit: (e) => m(e, _ && k)
|
|
4012
4127
|
}),
|
|
4013
|
-
A ? /* @__PURE__ */
|
|
4128
|
+
A ? /* @__PURE__ */ Q("div", {
|
|
4014
4129
|
class: "markup-screenshot-row",
|
|
4015
|
-
children: [l ? /* @__PURE__ */
|
|
4130
|
+
children: [l ? /* @__PURE__ */ Q("span", {
|
|
4016
4131
|
class: "markup-screenshot-status",
|
|
4017
4132
|
children: [
|
|
4018
|
-
/* @__PURE__ */
|
|
4133
|
+
/* @__PURE__ */ Q("input", {
|
|
4019
4134
|
type: "checkbox",
|
|
4020
4135
|
class: "markup-screenshot-checkbox",
|
|
4021
4136
|
disabled: !0
|
|
4022
4137
|
}),
|
|
4023
|
-
/* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ Q(Ia, { size: 12 }),
|
|
4139
|
+
/* @__PURE__ */ Q("span", { children: "Capturing…" })
|
|
4025
4140
|
]
|
|
4026
|
-
}) : /* @__PURE__ */
|
|
4141
|
+
}) : /* @__PURE__ */ Q("label", {
|
|
4027
4142
|
class: "markup-screenshot-toggle",
|
|
4028
4143
|
children: [
|
|
4029
|
-
/* @__PURE__ */
|
|
4144
|
+
/* @__PURE__ */ Q("input", {
|
|
4030
4145
|
type: "checkbox",
|
|
4031
4146
|
class: "markup-screenshot-checkbox",
|
|
4032
4147
|
checked: _,
|
|
4033
4148
|
onChange: (e) => v(e.currentTarget.checked)
|
|
4034
4149
|
}),
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4037
|
-
x && _ ? /* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ Q(Ia, { size: 12 }),
|
|
4151
|
+
/* @__PURE__ */ Q("span", { children: "Attach screenshot" }),
|
|
4152
|
+
x && _ ? /* @__PURE__ */ Q("img", {
|
|
4038
4153
|
class: "markup-screenshot-thumb",
|
|
4039
4154
|
src: x,
|
|
4040
4155
|
alt: "Screenshot preview"
|
|
4041
4156
|
}) : null
|
|
4042
4157
|
]
|
|
4043
|
-
}), _ && k ? /* @__PURE__ */
|
|
4158
|
+
}), _ && k ? /* @__PURE__ */ Q(S, { children: [u > 0 ? /* @__PURE__ */ Q("div", {
|
|
4044
4159
|
class: "markup-screenshot-redacted",
|
|
4045
|
-
children: [/* @__PURE__ */
|
|
4160
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4046
4161
|
type: "button",
|
|
4047
4162
|
class: "markup-screenshot-redacted-chip",
|
|
4048
4163
|
onClick: () => b((e) => !e),
|
|
4049
4164
|
children: [
|
|
4050
|
-
/* @__PURE__ */
|
|
4165
|
+
/* @__PURE__ */ Q("em", {
|
|
4051
4166
|
class: "markup-screenshot-redacted-arrow",
|
|
4052
4167
|
children: y ? "▾" : "▸"
|
|
4053
4168
|
}),
|
|
@@ -4056,19 +4171,19 @@ function Ia({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
4056
4171
|
u === 1 ? "field" : "fields",
|
|
4057
4172
|
" redacted"
|
|
4058
4173
|
]
|
|
4059
|
-
}), y ? /* @__PURE__ */
|
|
4174
|
+
}), y ? /* @__PURE__ */ Q("div", {
|
|
4060
4175
|
class: "markup-screenshot-redacted-list",
|
|
4061
|
-
children: d.map((e) => /* @__PURE__ */
|
|
4176
|
+
children: d.map((e) => /* @__PURE__ */ Q("code", {
|
|
4062
4177
|
class: "markup-screenshot-redacted-selector",
|
|
4063
4178
|
children: e
|
|
4064
4179
|
}, e))
|
|
4065
4180
|
}) : null]
|
|
4066
|
-
}) : null, /* @__PURE__ */
|
|
4181
|
+
}) : null, /* @__PURE__ */ Q("p", {
|
|
4067
4182
|
class: "markup-screenshot-help",
|
|
4068
4183
|
children: [
|
|
4069
4184
|
"Password and credit-card fields are blacked out automatically. Add",
|
|
4070
4185
|
" ",
|
|
4071
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ Q("code", {
|
|
4072
4187
|
class: "markup-screenshot-help-code",
|
|
4073
4188
|
children: "data-markup-private"
|
|
4074
4189
|
}),
|
|
@@ -4080,16 +4195,16 @@ function Ia({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
4080
4195
|
})]
|
|
4081
4196
|
});
|
|
4082
4197
|
}
|
|
4083
|
-
function
|
|
4198
|
+
function qa(e, t, n) {
|
|
4084
4199
|
return Math.max(t, Math.min(n, e));
|
|
4085
4200
|
}
|
|
4086
4201
|
//#endregion
|
|
4087
4202
|
//#region src/runtime/ui/pin.tsx
|
|
4088
|
-
function
|
|
4203
|
+
function Ja({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
|
|
4089
4204
|
let o = t - window.scrollY, s = e - window.scrollX;
|
|
4090
|
-
return /* @__PURE__ */
|
|
4205
|
+
return /* @__PURE__ */ Q("button", {
|
|
4091
4206
|
type: "button",
|
|
4092
|
-
class:
|
|
4207
|
+
class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved"),
|
|
4093
4208
|
style: {
|
|
4094
4209
|
top: `${o}px`,
|
|
4095
4210
|
left: `${s}px`
|
|
@@ -4099,24 +4214,24 @@ function Ra({ pageX: e, pageY: t, count: n, active: r, unresolved: i, onClick: a
|
|
|
4099
4214
|
onClick: a,
|
|
4100
4215
|
"aria-label": `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
4101
4216
|
title: `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
4102
|
-
children: [/* @__PURE__ */
|
|
4217
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
4103
4218
|
class: "markup-pin-dot",
|
|
4104
4219
|
"aria-hidden": !0
|
|
4105
|
-
}), n > 1 ? /* @__PURE__ */
|
|
4220
|
+
}), n > 1 ? /* @__PURE__ */ Q("span", {
|
|
4106
4221
|
class: "markup-pin-count",
|
|
4107
4222
|
children: n
|
|
4108
4223
|
}) : null]
|
|
4109
4224
|
});
|
|
4110
4225
|
}
|
|
4111
|
-
function
|
|
4226
|
+
function Ya({ pageX: e, pageY: t }) {
|
|
4112
4227
|
let n = t - window.scrollY, r = e - window.scrollX;
|
|
4113
|
-
return /* @__PURE__ */
|
|
4228
|
+
return /* @__PURE__ */ Q("div", {
|
|
4114
4229
|
class: "markup-pin markup-pin-ghost is-anchor",
|
|
4115
4230
|
style: {
|
|
4116
4231
|
top: `${n}px`,
|
|
4117
4232
|
left: `${r}px`
|
|
4118
4233
|
},
|
|
4119
|
-
children: /* @__PURE__ */
|
|
4234
|
+
children: /* @__PURE__ */ Q("span", {
|
|
4120
4235
|
class: "markup-pin-dot",
|
|
4121
4236
|
"aria-hidden": !0
|
|
4122
4237
|
})
|
|
@@ -4124,7 +4239,7 @@ function za({ pageX: e, pageY: t }) {
|
|
|
4124
4239
|
}
|
|
4125
4240
|
//#endregion
|
|
4126
4241
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
4127
|
-
function
|
|
4242
|
+
function Xa({ onPlace: e, onCancel: t }) {
|
|
4128
4243
|
z(() => {
|
|
4129
4244
|
function e(e) {
|
|
4130
4245
|
e.key === "Escape" && t();
|
|
@@ -4132,52 +4247,111 @@ function Ba({ onPlace: e, onCancel: t }) {
|
|
|
4132
4247
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4133
4248
|
}, [t]);
|
|
4134
4249
|
function n(t) {
|
|
4135
|
-
t.stopPropagation(), t.preventDefault(), e(
|
|
4250
|
+
t.stopPropagation(), t.preventDefault(), e(kr(t, document.elementsFromPoint(t.clientX, t.clientY).find((e) => !e.shadowRoot) ?? null), t.clientX, t.clientY);
|
|
4136
4251
|
}
|
|
4137
4252
|
function r(e) {
|
|
4138
4253
|
e.preventDefault(), e.stopPropagation();
|
|
4139
4254
|
}
|
|
4140
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ Q("div", {
|
|
4141
4256
|
class: "markup-placement-overlay",
|
|
4142
4257
|
onPointerDown: r,
|
|
4143
4258
|
onClick: n,
|
|
4144
4259
|
role: "presentation",
|
|
4145
|
-
children: /* @__PURE__ */
|
|
4260
|
+
children: /* @__PURE__ */ Q("div", {
|
|
4146
4261
|
class: "markup-placement-cursor-help",
|
|
4147
|
-
children: /* @__PURE__ */
|
|
4262
|
+
children: /* @__PURE__ */ Q("span", { children: "Click anywhere to drop a pin · ESC to cancel" })
|
|
4148
4263
|
})
|
|
4149
4264
|
});
|
|
4150
4265
|
}
|
|
4151
4266
|
//#endregion
|
|
4152
4267
|
//#region src/runtime/ui/thread-popover.tsx
|
|
4153
|
-
var
|
|
4268
|
+
var Za = [
|
|
4154
4269
|
"👍",
|
|
4155
4270
|
"❤️",
|
|
4156
4271
|
"🎉",
|
|
4157
4272
|
"😮",
|
|
4158
4273
|
"😄",
|
|
4159
4274
|
"❓"
|
|
4160
|
-
]
|
|
4161
|
-
|
|
4162
|
-
|
|
4275
|
+
], Qa = ar({
|
|
4276
|
+
none: {
|
|
4277
|
+
"toggle-thread-menu": () => ({
|
|
4278
|
+
kind: "thread-menu",
|
|
4279
|
+
confirmDelete: !1
|
|
4280
|
+
}),
|
|
4281
|
+
"toggle-comment-menu": (e, t) => ({
|
|
4282
|
+
kind: "comment-menu",
|
|
4283
|
+
commentId: t.commentId,
|
|
4284
|
+
direction: t.direction,
|
|
4285
|
+
confirmDelete: !1
|
|
4286
|
+
}),
|
|
4287
|
+
"toggle-reaction-picker": (e, t) => ({
|
|
4288
|
+
kind: "reaction-picker",
|
|
4289
|
+
commentId: t.commentId,
|
|
4290
|
+
direction: t.direction
|
|
4291
|
+
}),
|
|
4292
|
+
"start-edit": (e, t) => ({
|
|
4293
|
+
kind: "editing",
|
|
4294
|
+
commentId: t.commentId,
|
|
4295
|
+
draft: t.body
|
|
4296
|
+
})
|
|
4297
|
+
},
|
|
4298
|
+
"thread-menu": {
|
|
4299
|
+
"toggle-thread-menu": () => ({ kind: "none" }),
|
|
4300
|
+
"arm-thread-delete": (e) => ({
|
|
4301
|
+
...e,
|
|
4302
|
+
confirmDelete: !0
|
|
4303
|
+
}),
|
|
4304
|
+
dismiss: () => ({ kind: "none" })
|
|
4305
|
+
},
|
|
4306
|
+
"comment-menu": {
|
|
4307
|
+
"toggle-comment-menu": (e, t) => e.commentId === t.commentId ? { kind: "none" } : e,
|
|
4308
|
+
"arm-comment-delete": (e) => ({
|
|
4309
|
+
...e,
|
|
4310
|
+
confirmDelete: !0
|
|
4311
|
+
}),
|
|
4312
|
+
"start-edit": (e, t) => ({
|
|
4313
|
+
kind: "editing",
|
|
4314
|
+
commentId: t.commentId,
|
|
4315
|
+
draft: t.body
|
|
4316
|
+
}),
|
|
4317
|
+
dismiss: () => ({ kind: "none" })
|
|
4318
|
+
},
|
|
4319
|
+
"reaction-picker": {
|
|
4320
|
+
"toggle-reaction-picker": (e, t) => e.commentId === t.commentId ? { kind: "none" } : e,
|
|
4321
|
+
dismiss: () => ({ kind: "none" })
|
|
4322
|
+
},
|
|
4323
|
+
editing: {
|
|
4324
|
+
"update-draft": (e, t) => ({
|
|
4325
|
+
...e,
|
|
4326
|
+
draft: t.draft
|
|
4327
|
+
}),
|
|
4328
|
+
dismiss: () => ({ kind: "none" })
|
|
4329
|
+
}
|
|
4330
|
+
});
|
|
4331
|
+
function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, onAuthor: u, onSignIn: d, onClose: f, onReply: p, onEditComment: m, onDeleteComment: h, onToggleReaction: g, onResolve: _, onDelete: v }) {
|
|
4332
|
+
let y = B(null), b = B(null), x = B(null), S = B(null), [C, w] = or(Qa, { kind: "none" }), [T, E] = R(null), { onPointerDown: D, isDragging: O } = ka({
|
|
4163
4333
|
targetRef: y,
|
|
4164
4334
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
4165
4335
|
onMove: E
|
|
4166
4336
|
});
|
|
4167
|
-
|
|
4337
|
+
Va(y, !0);
|
|
4168
4338
|
let k = e.resolvedAt != null, A = Ce(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
4169
4339
|
z(() => {
|
|
4170
4340
|
if (C.kind === "none" || C.kind === "editing") return;
|
|
4171
4341
|
function e(e) {
|
|
4172
4342
|
let t = S.current;
|
|
4173
|
-
t && !e.composedPath().includes(t) && w({
|
|
4343
|
+
t && !e.composedPath().includes(t) && w({ type: "dismiss" });
|
|
4174
4344
|
}
|
|
4175
4345
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4176
|
-
}, [C.kind]), z(() => {
|
|
4346
|
+
}, [C.kind, w]), z(() => {
|
|
4177
4347
|
if (C.kind !== "editing") return;
|
|
4178
4348
|
let t = e.comments.find((e) => e._id === C.commentId);
|
|
4179
|
-
(!t || t.deleted) && w({
|
|
4180
|
-
}, [
|
|
4349
|
+
(!t || t.deleted) && w({ type: "dismiss" });
|
|
4350
|
+
}, [
|
|
4351
|
+
e.comments,
|
|
4352
|
+
C,
|
|
4353
|
+
w
|
|
4354
|
+
]);
|
|
4181
4355
|
let j = B(!0);
|
|
4182
4356
|
z(() => {
|
|
4183
4357
|
let e = b.current;
|
|
@@ -4200,24 +4374,24 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4200
4374
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
4201
4375
|
}, [f]);
|
|
4202
4376
|
let M = Ce(() => {
|
|
4203
|
-
let t =
|
|
4377
|
+
let t = Ar({
|
|
4204
4378
|
anchorX: e.anchorX,
|
|
4205
4379
|
anchorY: e.anchorY,
|
|
4206
4380
|
anchorSelector: e.anchorSelector
|
|
4207
4381
|
});
|
|
4208
4382
|
return {
|
|
4209
|
-
left:
|
|
4210
|
-
top:
|
|
4383
|
+
left: ro(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
|
|
4384
|
+
top: ro(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
|
|
4211
4385
|
};
|
|
4212
4386
|
}, [
|
|
4213
4387
|
e.anchorX,
|
|
4214
4388
|
e.anchorY,
|
|
4215
4389
|
e.anchorSelector
|
|
4216
4390
|
]);
|
|
4217
|
-
return /* @__PURE__ */
|
|
4391
|
+
return /* @__PURE__ */ Q("div", {
|
|
4218
4392
|
ref: y,
|
|
4219
4393
|
id: "markup-thread-popover",
|
|
4220
|
-
class:
|
|
4394
|
+
class: Z("markup-popover", T && "is-floating", O && "is-dragging", l && "is-hud-hidden"),
|
|
4221
4395
|
popover: "auto",
|
|
4222
4396
|
style: {
|
|
4223
4397
|
"--markup-pop-x": `${T?.left ?? M.left}px`,
|
|
@@ -4227,10 +4401,10 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4227
4401
|
"aria-label": "Markup thread",
|
|
4228
4402
|
"aria-hidden": l || void 0,
|
|
4229
4403
|
children: [
|
|
4230
|
-
/* @__PURE__ */
|
|
4404
|
+
/* @__PURE__ */ Q("header", {
|
|
4231
4405
|
class: "markup-popover-header",
|
|
4232
4406
|
onPointerDown: D,
|
|
4233
|
-
children: [/* @__PURE__ */
|
|
4407
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
4234
4408
|
class: "markup-eyebrow",
|
|
4235
4409
|
children: [
|
|
4236
4410
|
"thread · ",
|
|
@@ -4238,95 +4412,87 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4238
4412
|
" ",
|
|
4239
4413
|
A.length === 1 ? "comment" : "comments"
|
|
4240
4414
|
]
|
|
4241
|
-
}), /* @__PURE__ */
|
|
4415
|
+
}), /* @__PURE__ */ Q("div", {
|
|
4242
4416
|
class: "markup-popover-header-actions",
|
|
4243
4417
|
children: [
|
|
4244
|
-
/* @__PURE__ */
|
|
4418
|
+
/* @__PURE__ */ Q("div", {
|
|
4245
4419
|
class: "markup-thread-menu",
|
|
4246
4420
|
ref: (e) => {
|
|
4247
4421
|
C.kind === "thread-menu" && (S.current = e);
|
|
4248
4422
|
},
|
|
4249
|
-
children: [/* @__PURE__ */
|
|
4423
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4250
4424
|
type: "button",
|
|
4251
|
-
class:
|
|
4425
|
+
class: Z("markup-icon-btn", C.kind === "thread-menu" && "is-open"),
|
|
4252
4426
|
title: "More options",
|
|
4253
|
-
onClick: () => {
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
confirmDelete: !1
|
|
4257
|
-
});
|
|
4258
|
-
},
|
|
4259
|
-
children: /* @__PURE__ */ $(wa, { size: 16 })
|
|
4260
|
-
}), C.kind === "thread-menu" ? /* @__PURE__ */ $("div", {
|
|
4427
|
+
onClick: () => w({ type: "toggle-thread-menu" }),
|
|
4428
|
+
children: /* @__PURE__ */ Q(Pa, { size: 16 })
|
|
4429
|
+
}), C.kind === "thread-menu" ? /* @__PURE__ */ Q("div", {
|
|
4261
4430
|
class: "markup-thread-menu-list",
|
|
4262
|
-
children: [/* @__PURE__ */
|
|
4431
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4263
4432
|
type: "button",
|
|
4264
4433
|
class: "markup-thread-menu-item",
|
|
4265
4434
|
onClick: () => {
|
|
4266
4435
|
let t = new URL(e.url);
|
|
4267
|
-
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}), w({
|
|
4436
|
+
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}), w({ type: "dismiss" });
|
|
4268
4437
|
},
|
|
4269
4438
|
children: "Copy link"
|
|
4270
|
-
}), o ? /* @__PURE__ */
|
|
4439
|
+
}), o ? /* @__PURE__ */ Q("button", {
|
|
4271
4440
|
type: "button",
|
|
4272
|
-
class:
|
|
4441
|
+
class: Z("markup-thread-menu-item", C.confirmDelete && "is-danger"),
|
|
4273
4442
|
disabled: s,
|
|
4274
4443
|
onClick: () => {
|
|
4275
|
-
C.kind === "thread-menu" && (C.confirmDelete ? (w({
|
|
4276
|
-
...C,
|
|
4277
|
-
confirmDelete: !0
|
|
4278
|
-
}));
|
|
4444
|
+
C.kind === "thread-menu" && (C.confirmDelete ? (w({ type: "dismiss" }), v()) : w({ type: "arm-thread-delete" }));
|
|
4279
4445
|
},
|
|
4280
4446
|
children: C.confirmDelete ? "Confirm delete" : "Delete thread…"
|
|
4281
4447
|
}) : null]
|
|
4282
4448
|
}) : null]
|
|
4283
4449
|
}),
|
|
4284
|
-
r ? /* @__PURE__ */
|
|
4450
|
+
r ? /* @__PURE__ */ Q("button", {
|
|
4285
4451
|
type: "button",
|
|
4286
4452
|
class: "markup-icon-btn",
|
|
4287
4453
|
title: "Mark as resolved",
|
|
4288
4454
|
disabled: s,
|
|
4289
4455
|
onClick: _,
|
|
4290
|
-
children: /* @__PURE__ */
|
|
4456
|
+
children: /* @__PURE__ */ Q(Fa, { size: 16 })
|
|
4291
4457
|
}) : null,
|
|
4292
|
-
/* @__PURE__ */
|
|
4458
|
+
/* @__PURE__ */ Q("button", {
|
|
4293
4459
|
type: "button",
|
|
4294
4460
|
class: "markup-icon-btn",
|
|
4295
4461
|
title: "Close thread",
|
|
4296
4462
|
onClick: f,
|
|
4297
|
-
children: /* @__PURE__ */
|
|
4463
|
+
children: /* @__PURE__ */ Q(Na, { size: 16 })
|
|
4298
4464
|
})
|
|
4299
4465
|
]
|
|
4300
4466
|
})]
|
|
4301
4467
|
}),
|
|
4302
|
-
/* @__PURE__ */
|
|
4468
|
+
/* @__PURE__ */ Q("ol", {
|
|
4303
4469
|
ref: b,
|
|
4304
4470
|
class: "markup-comments",
|
|
4305
4471
|
children: A.map((t, r) => {
|
|
4306
4472
|
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !k && !t.deleted, c = i && !k && !t.deleted && !a, l = C.kind === "editing" && C.commentId === t._id, u = (o || c) && !l && !t.deleted, d = C.kind === "comment-menu" && C.commentId === t._id, f = d && C.confirmDelete, p = C.kind === "reaction-picker" && C.commentId === t._id, _ = p ? C.direction : "down", v = d ? C.direction : "down";
|
|
4307
|
-
return /* @__PURE__ */
|
|
4308
|
-
class:
|
|
4473
|
+
return /* @__PURE__ */ Q("li", {
|
|
4474
|
+
class: Z("markup-comment", t.fromDashboard && "is-team"),
|
|
4309
4475
|
children: [
|
|
4310
|
-
/* @__PURE__ */
|
|
4476
|
+
/* @__PURE__ */ Q("div", {
|
|
4311
4477
|
class: "markup-comment-meta",
|
|
4312
4478
|
children: [
|
|
4313
|
-
/* @__PURE__ */
|
|
4479
|
+
/* @__PURE__ */ Q("span", {
|
|
4314
4480
|
class: "markup-comment-author",
|
|
4315
4481
|
children: t.authorName
|
|
4316
4482
|
}),
|
|
4317
|
-
t.fromDashboard ? /* @__PURE__ */
|
|
4483
|
+
t.fromDashboard ? /* @__PURE__ */ Q("span", {
|
|
4318
4484
|
class: "markup-comment-badge",
|
|
4319
4485
|
children: "team"
|
|
4320
4486
|
}) : null,
|
|
4321
|
-
/* @__PURE__ */
|
|
4487
|
+
/* @__PURE__ */ Q("time", {
|
|
4322
4488
|
class: "markup-comment-time",
|
|
4323
4489
|
datetime: new Date(t.createdAt).toISOString(),
|
|
4324
|
-
title:
|
|
4325
|
-
children:
|
|
4490
|
+
title: ao(t.createdAt),
|
|
4491
|
+
children: io(t.createdAt)
|
|
4326
4492
|
}),
|
|
4327
|
-
/* @__PURE__ */
|
|
4493
|
+
/* @__PURE__ */ Q("div", {
|
|
4328
4494
|
class: "markup-thread-actions",
|
|
4329
|
-
children: [!k && !l ? /* @__PURE__ */
|
|
4495
|
+
children: [!k && !l ? /* @__PURE__ */ Q(eo, {
|
|
4330
4496
|
comment: t,
|
|
4331
4497
|
pickerOpen: p,
|
|
4332
4498
|
pickerDirection: _,
|
|
@@ -4336,12 +4502,16 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4336
4502
|
},
|
|
4337
4503
|
onPickerClick: (e) => {
|
|
4338
4504
|
if (p) {
|
|
4339
|
-
w({
|
|
4505
|
+
w({
|
|
4506
|
+
type: "toggle-reaction-picker",
|
|
4507
|
+
commentId: t._id,
|
|
4508
|
+
direction: "down"
|
|
4509
|
+
});
|
|
4340
4510
|
return;
|
|
4341
4511
|
}
|
|
4342
4512
|
if (A.length === 1) {
|
|
4343
4513
|
w({
|
|
4344
|
-
|
|
4514
|
+
type: "toggle-reaction-picker",
|
|
4345
4515
|
commentId: t._id,
|
|
4346
4516
|
direction: "down"
|
|
4347
4517
|
});
|
|
@@ -4349,67 +4519,66 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4349
4519
|
}
|
|
4350
4520
|
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect(), i = r ? r.bottom - n.bottom : Infinity;
|
|
4351
4521
|
w({
|
|
4352
|
-
|
|
4522
|
+
type: "toggle-reaction-picker",
|
|
4353
4523
|
commentId: t._id,
|
|
4354
4524
|
direction: i < 44 ? "up" : "down"
|
|
4355
4525
|
});
|
|
4356
4526
|
},
|
|
4357
4527
|
onPickerSelect: (e) => {
|
|
4358
|
-
w({
|
|
4528
|
+
w({ type: "dismiss" }), g(t._id, e);
|
|
4359
4529
|
}
|
|
4360
|
-
}) : null, u ? /* @__PURE__ */
|
|
4361
|
-
class:
|
|
4530
|
+
}) : null, u ? /* @__PURE__ */ Q("div", {
|
|
4531
|
+
class: Z("markup-thread-menu markup-comment-menu", d && "is-open", d && v === "up" && "is-up", A.length === 1 && "is-side"),
|
|
4362
4532
|
ref: (e) => {
|
|
4363
4533
|
d && (S.current = e);
|
|
4364
4534
|
},
|
|
4365
|
-
children: [/* @__PURE__ */
|
|
4535
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4366
4536
|
type: "button",
|
|
4367
|
-
class:
|
|
4537
|
+
class: Z("markup-icon-btn", d && "is-open"),
|
|
4368
4538
|
title: "More options",
|
|
4369
4539
|
onClick: (e) => {
|
|
4370
4540
|
if (d) {
|
|
4371
|
-
w({
|
|
4541
|
+
w({
|
|
4542
|
+
type: "toggle-comment-menu",
|
|
4543
|
+
commentId: t._id,
|
|
4544
|
+
direction: "down"
|
|
4545
|
+
});
|
|
4372
4546
|
return;
|
|
4373
4547
|
}
|
|
4374
4548
|
if (A.length === 1) {
|
|
4375
4549
|
w({
|
|
4376
|
-
|
|
4550
|
+
type: "toggle-comment-menu",
|
|
4377
4551
|
commentId: t._id,
|
|
4378
|
-
direction: "down"
|
|
4379
|
-
confirmDelete: !1
|
|
4552
|
+
direction: "down"
|
|
4380
4553
|
});
|
|
4381
4554
|
return;
|
|
4382
4555
|
}
|
|
4383
4556
|
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect(), i = (+!!o + +!!c) * 32 + 8 + 6, a = r ? r.bottom - n.bottom : Infinity;
|
|
4384
4557
|
w({
|
|
4385
|
-
|
|
4558
|
+
type: "toggle-comment-menu",
|
|
4386
4559
|
commentId: t._id,
|
|
4387
|
-
direction: a < i ? "up" : "down"
|
|
4388
|
-
confirmDelete: !1
|
|
4560
|
+
direction: a < i ? "up" : "down"
|
|
4389
4561
|
});
|
|
4390
4562
|
},
|
|
4391
|
-
children: /* @__PURE__ */
|
|
4392
|
-
}), d ? /* @__PURE__ */
|
|
4563
|
+
children: /* @__PURE__ */ Q(Pa, { size: 16 })
|
|
4564
|
+
}), d ? /* @__PURE__ */ Q("div", {
|
|
4393
4565
|
class: "markup-thread-menu-list",
|
|
4394
|
-
children: [o ? /* @__PURE__ */
|
|
4566
|
+
children: [o ? /* @__PURE__ */ Q("button", {
|
|
4395
4567
|
type: "button",
|
|
4396
4568
|
class: "markup-thread-menu-item",
|
|
4397
4569
|
onClick: () => {
|
|
4398
4570
|
w({
|
|
4399
|
-
|
|
4571
|
+
type: "start-edit",
|
|
4400
4572
|
commentId: t._id,
|
|
4401
|
-
|
|
4573
|
+
body: t.body
|
|
4402
4574
|
});
|
|
4403
4575
|
},
|
|
4404
4576
|
children: "Edit"
|
|
4405
|
-
}) : null, c ? /* @__PURE__ */
|
|
4577
|
+
}) : null, c ? /* @__PURE__ */ Q("button", {
|
|
4406
4578
|
type: "button",
|
|
4407
|
-
class:
|
|
4579
|
+
class: Z("markup-thread-menu-item", f && "is-danger"),
|
|
4408
4580
|
onClick: () => {
|
|
4409
|
-
C.kind === "comment-menu" && (C.confirmDelete ? (w({
|
|
4410
|
-
...C,
|
|
4411
|
-
confirmDelete: !0
|
|
4412
|
-
}));
|
|
4581
|
+
C.kind === "comment-menu" && (C.confirmDelete ? (w({ type: "dismiss" }), h(t._id)) : w({ type: "arm-comment-delete" }));
|
|
4413
4582
|
},
|
|
4414
4583
|
children: f ? "Confirm delete" : "Delete…"
|
|
4415
4584
|
}) : null]
|
|
@@ -4418,66 +4587,65 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4418
4587
|
})
|
|
4419
4588
|
]
|
|
4420
4589
|
}),
|
|
4421
|
-
l && C.kind === "editing" ? /* @__PURE__ */
|
|
4590
|
+
l && C.kind === "editing" ? /* @__PURE__ */ Q("form", {
|
|
4422
4591
|
class: "markup-comment-edit-form",
|
|
4423
4592
|
onSubmit: async (e) => {
|
|
4424
4593
|
if (e.preventDefault(), C.kind !== "editing") return;
|
|
4425
4594
|
let n = C.draft.trim();
|
|
4426
4595
|
if (!n || n === t.body) {
|
|
4427
|
-
w({
|
|
4596
|
+
w({ type: "dismiss" });
|
|
4428
4597
|
return;
|
|
4429
4598
|
}
|
|
4430
4599
|
try {
|
|
4431
|
-
await m(t._id, n), w({
|
|
4600
|
+
await m(t._id, n), w({ type: "dismiss" });
|
|
4432
4601
|
} catch {}
|
|
4433
4602
|
},
|
|
4434
|
-
children: [/* @__PURE__ */
|
|
4603
|
+
children: [/* @__PURE__ */ Q("textarea", {
|
|
4435
4604
|
class: "markup-textarea",
|
|
4436
4605
|
value: C.draft,
|
|
4437
4606
|
onInput: (e) => {
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
} : e);
|
|
4607
|
+
w({
|
|
4608
|
+
type: "update-draft",
|
|
4609
|
+
draft: e.currentTarget.value
|
|
4610
|
+
});
|
|
4443
4611
|
},
|
|
4444
4612
|
rows: 3,
|
|
4445
4613
|
autoFocus: !0,
|
|
4446
4614
|
disabled: s
|
|
4447
|
-
}), /* @__PURE__ */
|
|
4615
|
+
}), /* @__PURE__ */ Q("div", {
|
|
4448
4616
|
class: "markup-comment-edit-actions",
|
|
4449
|
-
children: [/* @__PURE__ */
|
|
4617
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4450
4618
|
type: "button",
|
|
4451
4619
|
class: "markup-btn markup-btn-ghost",
|
|
4452
|
-
onClick: () => w({
|
|
4620
|
+
onClick: () => w({ type: "dismiss" }),
|
|
4453
4621
|
disabled: s,
|
|
4454
4622
|
children: "Cancel"
|
|
4455
|
-
}), /* @__PURE__ */
|
|
4623
|
+
}), /* @__PURE__ */ Q("button", {
|
|
4456
4624
|
type: "submit",
|
|
4457
4625
|
class: "markup-btn markup-btn-primary",
|
|
4458
4626
|
disabled: s || C.draft.trim().length === 0,
|
|
4459
4627
|
children: "Save"
|
|
4460
4628
|
})]
|
|
4461
4629
|
})]
|
|
4462
|
-
}) : /* @__PURE__ */
|
|
4630
|
+
}) : /* @__PURE__ */ Q("p", {
|
|
4463
4631
|
class: "markup-comment-body",
|
|
4464
|
-
children: [t.body, t.editedAt == null ? null : /* @__PURE__ */
|
|
4632
|
+
children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
|
|
4465
4633
|
class: "markup-comment-edited",
|
|
4466
4634
|
datetime: new Date(t.editedAt).toISOString(),
|
|
4467
|
-
title:
|
|
4635
|
+
title: ao(t.editedAt),
|
|
4468
4636
|
children: [" ", "(edited)"]
|
|
4469
4637
|
})]
|
|
4470
4638
|
}),
|
|
4471
|
-
r === 0 && e.screenshotUrl ? /* @__PURE__ */
|
|
4639
|
+
r === 0 && e.screenshotUrl ? /* @__PURE__ */ Q("button", {
|
|
4472
4640
|
type: "button",
|
|
4473
4641
|
class: "markup-comment-screenshot",
|
|
4474
4642
|
onClick: () => x.current?.showModal(),
|
|
4475
|
-
children: /* @__PURE__ */
|
|
4643
|
+
children: /* @__PURE__ */ Q("img", {
|
|
4476
4644
|
src: e.screenshotUrl,
|
|
4477
4645
|
alt: "Screenshot"
|
|
4478
4646
|
})
|
|
4479
4647
|
}) : null,
|
|
4480
|
-
!l && t.reactions.length > 0 ? /* @__PURE__ */
|
|
4648
|
+
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(to, {
|
|
4481
4649
|
comment: t,
|
|
4482
4650
|
isResolved: k,
|
|
4483
4651
|
onToggle: (e) => g(t._id, e)
|
|
@@ -4486,53 +4654,53 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4486
4654
|
}, t._id);
|
|
4487
4655
|
})
|
|
4488
4656
|
}),
|
|
4489
|
-
e.screenshotUrl ? /* @__PURE__ */
|
|
4657
|
+
e.screenshotUrl ? /* @__PURE__ */ Q("dialog", {
|
|
4490
4658
|
ref: x,
|
|
4491
4659
|
class: "markup-lightbox",
|
|
4492
4660
|
onClick: () => x.current?.close(),
|
|
4493
|
-
children: [/* @__PURE__ */
|
|
4661
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4494
4662
|
type: "button",
|
|
4495
4663
|
class: "markup-lightbox-close markup-icon-btn",
|
|
4496
4664
|
"aria-label": "Close screenshot",
|
|
4497
4665
|
onClick: (e) => {
|
|
4498
4666
|
e.stopPropagation(), x.current?.close();
|
|
4499
4667
|
},
|
|
4500
|
-
children: /* @__PURE__ */
|
|
4501
|
-
}), /* @__PURE__ */
|
|
4668
|
+
children: /* @__PURE__ */ Q(Na, { size: 16 })
|
|
4669
|
+
}), /* @__PURE__ */ Q("img", {
|
|
4502
4670
|
class: "markup-lightbox-img",
|
|
4503
4671
|
src: e.screenshotUrl,
|
|
4504
4672
|
alt: "Screenshot",
|
|
4505
4673
|
onClick: (e) => e.stopPropagation()
|
|
4506
4674
|
})]
|
|
4507
4675
|
}) : null,
|
|
4508
|
-
t == null ? /* @__PURE__ */
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4676
|
+
t == null ? /* @__PURE__ */ Q(Ua, {
|
|
4677
|
+
isPending: s,
|
|
4678
|
+
isConnecting: i,
|
|
4679
|
+
isSigningIn: a,
|
|
4512
4680
|
onSubmit: u,
|
|
4513
4681
|
onCancel: f,
|
|
4514
4682
|
onSignIn: d
|
|
4515
|
-
}) : /* @__PURE__ */
|
|
4683
|
+
}) : /* @__PURE__ */ Q("div", {
|
|
4516
4684
|
class: "markup-popover-body",
|
|
4517
|
-
children: [/* @__PURE__ */
|
|
4685
|
+
children: [/* @__PURE__ */ Q("p", {
|
|
4518
4686
|
class: "markup-popover-byline",
|
|
4519
4687
|
children: [
|
|
4520
4688
|
"replying as ",
|
|
4521
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ Q("span", {
|
|
4522
4690
|
class: "markup-popover-name",
|
|
4523
4691
|
children: t
|
|
4524
4692
|
}),
|
|
4525
|
-
r ? /* @__PURE__ */
|
|
4693
|
+
r ? /* @__PURE__ */ Q("span", {
|
|
4526
4694
|
class: "markup-comment-badge",
|
|
4527
4695
|
children: "team"
|
|
4528
4696
|
}) : null
|
|
4529
4697
|
]
|
|
4530
|
-
}), /* @__PURE__ */
|
|
4698
|
+
}), /* @__PURE__ */ Q(Ga, {
|
|
4531
4699
|
label: "Reply",
|
|
4532
4700
|
placeholder: "Write a reply…",
|
|
4533
4701
|
submitLabel: "Reply",
|
|
4534
4702
|
initialFocus: !1,
|
|
4535
|
-
|
|
4703
|
+
isPending: s,
|
|
4536
4704
|
error: c,
|
|
4537
4705
|
onSubmit: p
|
|
4538
4706
|
})]
|
|
@@ -4540,48 +4708,48 @@ function Ha({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4540
4708
|
]
|
|
4541
4709
|
});
|
|
4542
4710
|
}
|
|
4543
|
-
function
|
|
4544
|
-
return /* @__PURE__ */
|
|
4545
|
-
class:
|
|
4711
|
+
function eo({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
|
|
4712
|
+
return /* @__PURE__ */ Q("div", {
|
|
4713
|
+
class: Z("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
|
|
4546
4714
|
ref: i,
|
|
4547
|
-
children: [/* @__PURE__ */
|
|
4715
|
+
children: [/* @__PURE__ */ Q("button", {
|
|
4548
4716
|
type: "button",
|
|
4549
|
-
class:
|
|
4717
|
+
class: Z("markup-icon-btn", t && "is-open"),
|
|
4550
4718
|
title: "Add reaction",
|
|
4551
4719
|
"aria-label": "Add reaction",
|
|
4552
4720
|
onClick: a,
|
|
4553
|
-
children: /* @__PURE__ */
|
|
4554
|
-
}), t ? /* @__PURE__ */
|
|
4721
|
+
children: /* @__PURE__ */ Q(Ra, { size: 16 })
|
|
4722
|
+
}), t ? /* @__PURE__ */ Q("div", {
|
|
4555
4723
|
class: "markup-reaction-picker",
|
|
4556
4724
|
role: "menu",
|
|
4557
|
-
children:
|
|
4725
|
+
children: Za.map((t) => /* @__PURE__ */ Q("button", {
|
|
4558
4726
|
type: "button",
|
|
4559
4727
|
role: "menuitem",
|
|
4560
|
-
class:
|
|
4728
|
+
class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
|
|
4561
4729
|
onClick: () => o(t),
|
|
4562
4730
|
children: t
|
|
4563
4731
|
}, t))
|
|
4564
4732
|
}) : null]
|
|
4565
4733
|
});
|
|
4566
4734
|
}
|
|
4567
|
-
function
|
|
4568
|
-
return /* @__PURE__ */
|
|
4735
|
+
function to({ comment: e, isResolved: t, onToggle: n }) {
|
|
4736
|
+
return /* @__PURE__ */ Q("div", {
|
|
4569
4737
|
class: "markup-reactions",
|
|
4570
4738
|
children: e.reactions.map((e) => {
|
|
4571
|
-
let r =
|
|
4572
|
-
return /* @__PURE__ */
|
|
4739
|
+
let r = no(e.reactors, e.mine, e.count, e.emoji);
|
|
4740
|
+
return /* @__PURE__ */ Q("button", {
|
|
4573
4741
|
type: "button",
|
|
4574
|
-
class:
|
|
4742
|
+
class: Z("markup-reaction-chip", e.mine && "is-mine"),
|
|
4575
4743
|
disabled: t,
|
|
4576
4744
|
onClick: () => n(e.emoji),
|
|
4577
4745
|
"aria-pressed": e.mine,
|
|
4578
4746
|
"aria-label": r,
|
|
4579
4747
|
title: r,
|
|
4580
|
-
children: [/* @__PURE__ */
|
|
4748
|
+
children: [/* @__PURE__ */ Q("span", {
|
|
4581
4749
|
class: "markup-reaction-emoji",
|
|
4582
4750
|
"aria-hidden": !0,
|
|
4583
4751
|
children: e.emoji
|
|
4584
|
-
}), /* @__PURE__ */
|
|
4752
|
+
}), /* @__PURE__ */ Q("span", {
|
|
4585
4753
|
class: "markup-reaction-count",
|
|
4586
4754
|
children: e.count
|
|
4587
4755
|
})]
|
|
@@ -4589,14 +4757,14 @@ function Wa({ comment: e, isResolved: t, onToggle: n }) {
|
|
|
4589
4757
|
})
|
|
4590
4758
|
});
|
|
4591
4759
|
}
|
|
4592
|
-
function
|
|
4760
|
+
function no(e, t, n, r) {
|
|
4593
4761
|
let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
|
|
4594
4762
|
return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
|
|
4595
4763
|
}
|
|
4596
|
-
function
|
|
4764
|
+
function ro(e, t, n) {
|
|
4597
4765
|
return Math.max(t, Math.min(n, e));
|
|
4598
4766
|
}
|
|
4599
|
-
function
|
|
4767
|
+
function io(e) {
|
|
4600
4768
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
4601
4769
|
if (n < 60) return "just now";
|
|
4602
4770
|
let r = Math.floor(n / 60);
|
|
@@ -4613,7 +4781,7 @@ function qa(e) {
|
|
|
4613
4781
|
year: "numeric"
|
|
4614
4782
|
});
|
|
4615
4783
|
}
|
|
4616
|
-
function
|
|
4784
|
+
function ao(e) {
|
|
4617
4785
|
return new Date(e).toLocaleDateString([], {
|
|
4618
4786
|
month: "long",
|
|
4619
4787
|
day: "numeric",
|
|
@@ -4624,7 +4792,7 @@ function Ja(e) {
|
|
|
4624
4792
|
}
|
|
4625
4793
|
//#endregion
|
|
4626
4794
|
//#region src/runtime/ui/app.tsx
|
|
4627
|
-
function
|
|
4795
|
+
function oo(e) {
|
|
4628
4796
|
return !e.token || e.tokenExpiresAt == null ? null : {
|
|
4629
4797
|
clientId: `markup_user_${e.identity.id}`,
|
|
4630
4798
|
token: e.token,
|
|
@@ -4633,136 +4801,172 @@ function Ya(e) {
|
|
|
4633
4801
|
email: e.identity.email
|
|
4634
4802
|
};
|
|
4635
4803
|
}
|
|
4636
|
-
function
|
|
4804
|
+
function so() {
|
|
4637
4805
|
return window.location.host + window.location.pathname;
|
|
4638
4806
|
}
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4807
|
+
var co = ar({
|
|
4808
|
+
visible: {
|
|
4809
|
+
"hide-with-toast": () => ({ kind: "hidden-with-toast" }),
|
|
4810
|
+
toggle: () => ({ kind: "hidden" })
|
|
4811
|
+
},
|
|
4812
|
+
"hidden-with-toast": {
|
|
4813
|
+
toggle: () => ({ kind: "visible" }),
|
|
4814
|
+
"dismiss-toast": () => ({ kind: "hidden" })
|
|
4815
|
+
},
|
|
4816
|
+
hidden: { toggle: () => ({ kind: "visible" }) }
|
|
4817
|
+
});
|
|
4818
|
+
function $(e) {
|
|
4819
|
+
return Gr(e), e;
|
|
4820
|
+
}
|
|
4821
|
+
var lo = ar({
|
|
4822
|
+
unresolved: {
|
|
4823
|
+
"mint-success": (e, t) => $({
|
|
4824
|
+
kind: "anon",
|
|
4825
|
+
identity: t.identity
|
|
4826
|
+
}),
|
|
4827
|
+
"signed-in": (e, t) => $({
|
|
4828
|
+
kind: "verified",
|
|
4829
|
+
identity: t.identity
|
|
4830
|
+
})
|
|
4831
|
+
},
|
|
4832
|
+
anon: {
|
|
4833
|
+
"signed-in": (e, t) => $({
|
|
4834
|
+
kind: "verified",
|
|
4835
|
+
identity: t.identity
|
|
4836
|
+
}),
|
|
4837
|
+
"author-set": (e, t) => $({
|
|
4838
|
+
kind: "anon",
|
|
4839
|
+
identity: {
|
|
4840
|
+
...e.identity,
|
|
4841
|
+
name: t.name,
|
|
4842
|
+
email: t.email
|
|
4843
|
+
}
|
|
4844
|
+
})
|
|
4845
|
+
},
|
|
4846
|
+
verified: {
|
|
4847
|
+
"signed-in": (e, t) => $({
|
|
4848
|
+
kind: "verified",
|
|
4849
|
+
identity: t.identity
|
|
4850
|
+
}),
|
|
4851
|
+
unauthorized: (e) => $({
|
|
4852
|
+
kind: "recovering",
|
|
4853
|
+
preserved: {
|
|
4854
|
+
name: e.identity.name,
|
|
4855
|
+
email: e.identity.email
|
|
4856
|
+
}
|
|
4857
|
+
})
|
|
4858
|
+
},
|
|
4859
|
+
recovering: {
|
|
4860
|
+
"mint-success": (e, t) => $({
|
|
4861
|
+
kind: "anon",
|
|
4862
|
+
identity: t.identity
|
|
4863
|
+
}),
|
|
4864
|
+
"signed-in": (e, t) => $({
|
|
4865
|
+
kind: "verified",
|
|
4866
|
+
identity: t.identity
|
|
4867
|
+
})
|
|
4868
|
+
}
|
|
4869
|
+
});
|
|
4870
|
+
function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "default", screenshots: i }) {
|
|
4871
|
+
let [a, o] = R(so), [s, c] = R([]), [l, u] = R(!1), d = Ce(() => Wr(), []), [f, p] = or(lo, d.state), [m, h] = R(n), g = B(f);
|
|
4872
|
+
g.current = f;
|
|
4873
|
+
let _ = Ce(() => Nr({
|
|
4643
4874
|
apiUrl: e,
|
|
4644
4875
|
apiKey: t,
|
|
4645
4876
|
getToken: () => {
|
|
4646
|
-
let e =
|
|
4877
|
+
let e = g.current;
|
|
4647
4878
|
return e.kind === "verified" ? {
|
|
4648
4879
|
token: e.identity.token,
|
|
4649
4880
|
expiresAt: e.identity.tokenExpiresAt
|
|
4650
4881
|
} : null;
|
|
4651
4882
|
},
|
|
4652
4883
|
getAnonToken: () => {
|
|
4653
|
-
let e =
|
|
4884
|
+
let e = g.current;
|
|
4654
4885
|
return e.kind === "anon" ? e.identity.anonToken : null;
|
|
4655
4886
|
},
|
|
4656
4887
|
onUnauthorized: () => {
|
|
4657
|
-
|
|
4658
|
-
if (e.kind !== "verified") return;
|
|
4659
|
-
let t = {
|
|
4660
|
-
kind: "recovering",
|
|
4661
|
-
preserved: {
|
|
4662
|
-
name: e.identity.name,
|
|
4663
|
-
email: e.identity.email
|
|
4664
|
-
}
|
|
4665
|
-
};
|
|
4666
|
-
h.current = t, f(t), Br(t), _((e) => e + 1);
|
|
4888
|
+
p({ type: "unauthorized" });
|
|
4667
4889
|
}
|
|
4668
|
-
}), [
|
|
4890
|
+
}), [
|
|
4891
|
+
e,
|
|
4892
|
+
t,
|
|
4893
|
+
p
|
|
4894
|
+
]), [v, y] = R({ kind: "idle" }), b = cr(), x = cr(), S = cr(), { run: C, reset: w } = b, { run: T } = x, { run: E, reset: D } = S, O = b.isPending, k = b.error ?? x.error ?? S.error, [A, j] = or(co, { kind: "visible" }), M = A.kind !== "visible", [N, ee] = R(0), te = B(null), ne = qr(f), re = f.kind === "verified", ie = f.kind === "unresolved" || f.kind === "recovering", P = Kr(f);
|
|
4669
4895
|
z(() => {
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
function a() {
|
|
4677
|
-
v.mintAnonIdentity().then(({ clientId: e, token: r }) => {
|
|
4678
|
-
if (n) return;
|
|
4679
|
-
let i = {
|
|
4680
|
-
kind: "anon",
|
|
4896
|
+
if (f.kind !== "unresolved" && f.kind !== "recovering") return;
|
|
4897
|
+
let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
|
|
4898
|
+
function i() {
|
|
4899
|
+
_.mintAnonIdentity().then(({ clientId: n, token: r }) => {
|
|
4900
|
+
t || p({
|
|
4901
|
+
type: "mint-success",
|
|
4681
4902
|
identity: {
|
|
4682
|
-
clientId:
|
|
4903
|
+
clientId: n,
|
|
4683
4904
|
anonToken: r,
|
|
4684
|
-
name:
|
|
4685
|
-
email:
|
|
4905
|
+
name: e.name,
|
|
4906
|
+
email: e.email
|
|
4686
4907
|
}
|
|
4687
|
-
};
|
|
4688
|
-
Br(i), f(i);
|
|
4908
|
+
});
|
|
4689
4909
|
}).catch(() => {
|
|
4690
|
-
|
|
4910
|
+
t || (n = setTimeout(i, Math.min(r, 3e4)), r = Math.min(r * 2, 3e4));
|
|
4691
4911
|
});
|
|
4692
4912
|
}
|
|
4693
|
-
return
|
|
4694
|
-
|
|
4695
|
-
};
|
|
4696
|
-
}, [v, g]);
|
|
4697
|
-
let [te, ne] = R(null);
|
|
4698
|
-
z(() => {
|
|
4699
|
-
let e = !1, t = null;
|
|
4700
|
-
async function n() {
|
|
4701
|
-
try {
|
|
4702
|
-
let r = await v.getSubscriptionToken();
|
|
4703
|
-
if (e) return;
|
|
4704
|
-
ne(r.token);
|
|
4705
|
-
let i = Math.max(6e4, r.expiresAt - Date.now() - 30 * 6e4);
|
|
4706
|
-
t = setTimeout(n, i);
|
|
4707
|
-
} catch {
|
|
4708
|
-
if (e) return;
|
|
4709
|
-
t = setTimeout(n, 6e4);
|
|
4710
|
-
}
|
|
4711
|
-
}
|
|
4712
|
-
return n(), () => {
|
|
4713
|
-
e = !0, t && clearTimeout(t);
|
|
4913
|
+
return i(), () => {
|
|
4914
|
+
t = !0, n && clearTimeout(n);
|
|
4714
4915
|
};
|
|
4715
|
-
}, [
|
|
4716
|
-
|
|
4916
|
+
}, [
|
|
4917
|
+
_,
|
|
4918
|
+
f,
|
|
4919
|
+
p,
|
|
4920
|
+
d
|
|
4921
|
+
]);
|
|
4922
|
+
let ae = Oa(_), [oe, se] = R(null);
|
|
4717
4923
|
z(() => {
|
|
4718
|
-
let t = new
|
|
4719
|
-
return
|
|
4720
|
-
t.close(),
|
|
4924
|
+
let t = new ir(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
4925
|
+
return se(t), () => {
|
|
4926
|
+
t.close(), se((e) => e === t ? null : e);
|
|
4721
4927
|
};
|
|
4722
4928
|
}, [e]);
|
|
4723
|
-
let
|
|
4929
|
+
let ce = B(!1);
|
|
4724
4930
|
z(() => {
|
|
4725
|
-
if (!(!
|
|
4726
|
-
subscriptionToken:
|
|
4931
|
+
if (!(!oe || !ae)) return w(), D(), oe.onUpdate(Jt("widget/queries:subscribeThreadsForRoute"), {
|
|
4932
|
+
subscriptionToken: ae,
|
|
4727
4933
|
route: a,
|
|
4728
4934
|
viewerClientId: P
|
|
4729
4935
|
}, (e) => {
|
|
4730
4936
|
e !== void 0 && (c(e), u(!0));
|
|
4731
4937
|
});
|
|
4732
4938
|
}, [
|
|
4733
|
-
|
|
4734
|
-
|
|
4939
|
+
oe,
|
|
4940
|
+
ae,
|
|
4735
4941
|
a,
|
|
4736
|
-
P
|
|
4942
|
+
P,
|
|
4943
|
+
w,
|
|
4944
|
+
D
|
|
4737
4945
|
]), z(() => {
|
|
4738
|
-
if (
|
|
4946
|
+
if (ce.current || !l) return;
|
|
4739
4947
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
4740
4948
|
if (e) {
|
|
4741
4949
|
let t = decodeURIComponent(e[1] ?? "");
|
|
4742
|
-
s.find((e) => e._id === t) &&
|
|
4950
|
+
s.find((e) => e._id === t) && y({
|
|
4743
4951
|
kind: "thread",
|
|
4744
4952
|
threadId: t
|
|
4745
4953
|
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
4746
4954
|
}
|
|
4747
|
-
|
|
4748
|
-
}, [s, l]), z(() =>
|
|
4955
|
+
ce.current = !0;
|
|
4956
|
+
}, [s, l]), z(() => Br(() => o(so())), []), z(() => {
|
|
4749
4957
|
function e(e) {
|
|
4750
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
4958
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), j({ type: "toggle" })));
|
|
4751
4959
|
}
|
|
4752
4960
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4753
|
-
}, []), z(() => {
|
|
4754
|
-
if (
|
|
4755
|
-
|
|
4756
|
-
O(!1);
|
|
4757
|
-
return;
|
|
4758
|
-
}
|
|
4759
|
-
let e = window.setTimeout(() => O(!1), 5e3);
|
|
4961
|
+
}, [j]), z(() => {
|
|
4962
|
+
if (A.kind !== "hidden-with-toast") return;
|
|
4963
|
+
let e = window.setTimeout(() => j({ type: "dismiss-toast" }), 5e3);
|
|
4760
4964
|
return () => window.clearTimeout(e);
|
|
4761
|
-
}, [
|
|
4965
|
+
}, [A.kind, j]), z(() => {
|
|
4762
4966
|
let e = null;
|
|
4763
4967
|
function t() {
|
|
4764
4968
|
e ??= requestAnimationFrame(() => {
|
|
4765
|
-
e = null,
|
|
4969
|
+
e = null, ee((e) => e + 1);
|
|
4766
4970
|
});
|
|
4767
4971
|
}
|
|
4768
4972
|
window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
|
|
@@ -4771,248 +4975,211 @@ function Za({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4771
4975
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
4772
4976
|
};
|
|
4773
4977
|
}, []);
|
|
4774
|
-
let
|
|
4775
|
-
w(
|
|
4776
|
-
}, []),
|
|
4777
|
-
|
|
4778
|
-
}, []),
|
|
4779
|
-
let r = t + window.scrollX, a = n + window.scrollY, o = ++
|
|
4978
|
+
let le = V(() => {
|
|
4979
|
+
w(), D(), y({ kind: "placing" });
|
|
4980
|
+
}, [w, D]), ue = V(() => {
|
|
4981
|
+
y({ kind: "idle" }), w(), D();
|
|
4982
|
+
}, [w, D]), de = B(0), F = V((e, t, n) => {
|
|
4983
|
+
let r = t + window.scrollX, a = n + window.scrollY, o = ++de.current;
|
|
4780
4984
|
if (i?.enabled === !1) {
|
|
4781
|
-
|
|
4985
|
+
y({
|
|
4782
4986
|
kind: "composing-new",
|
|
4783
4987
|
coords: e,
|
|
4784
4988
|
pageX: r,
|
|
4785
4989
|
pageY: a,
|
|
4786
4990
|
screenshot: null,
|
|
4787
|
-
|
|
4991
|
+
isScreenshotCapturing: !1,
|
|
4788
4992
|
screenshotRedactedCount: 0,
|
|
4789
4993
|
screenshotRedactedSelectors: [],
|
|
4790
4994
|
captureToken: o
|
|
4791
4995
|
});
|
|
4792
4996
|
return;
|
|
4793
4997
|
}
|
|
4794
|
-
|
|
4998
|
+
y({
|
|
4795
4999
|
kind: "composing-new",
|
|
4796
5000
|
coords: e,
|
|
4797
5001
|
pageX: r,
|
|
4798
5002
|
pageY: a,
|
|
4799
5003
|
screenshot: null,
|
|
4800
|
-
|
|
5004
|
+
isScreenshotCapturing: !0,
|
|
4801
5005
|
screenshotRedactedCount: 0,
|
|
4802
5006
|
screenshotRedactedSelectors: [],
|
|
4803
5007
|
captureToken: o
|
|
4804
5008
|
});
|
|
4805
|
-
let s =
|
|
5009
|
+
let s = te.current != null && te.current.getRootNode() instanceof ShadowRoot ? te.current.getRootNode().host : null, c = {
|
|
4806
5010
|
strictScrub: i?.strictScrub,
|
|
4807
5011
|
redactSelector: i?.redactSelector
|
|
4808
5012
|
};
|
|
4809
|
-
|
|
5013
|
+
xa(s, {
|
|
4810
5014
|
x: t,
|
|
4811
5015
|
y: n
|
|
4812
5016
|
}, c).then((e) => {
|
|
4813
|
-
|
|
5017
|
+
y((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
|
|
4814
5018
|
...t,
|
|
4815
5019
|
screenshot: e?.blob ?? null,
|
|
4816
|
-
|
|
5020
|
+
isScreenshotCapturing: !1,
|
|
4817
5021
|
screenshotRedactedCount: e?.redactedCount ?? 0,
|
|
4818
5022
|
screenshotRedactedSelectors: e?.redactedSelectors ?? []
|
|
4819
5023
|
});
|
|
4820
5024
|
});
|
|
4821
|
-
}, [i]),
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
let n = Ya(await Wr(e, t));
|
|
4837
|
-
if (!n) throw Error("Sign-in did not return a verified token");
|
|
4838
|
-
let r = {
|
|
4839
|
-
kind: "verified",
|
|
4840
|
-
identity: n
|
|
4841
|
-
};
|
|
4842
|
-
Br(r), f(r);
|
|
4843
|
-
} catch (e) {
|
|
4844
|
-
w(e instanceof Error ? e.message : "Sign-in failed");
|
|
4845
|
-
} finally {
|
|
4846
|
-
I(!1);
|
|
4847
|
-
}
|
|
4848
|
-
}
|
|
5025
|
+
}, [i]), fe = V((e, t) => {
|
|
5026
|
+
p({
|
|
5027
|
+
type: "author-set",
|
|
5028
|
+
name: e,
|
|
5029
|
+
email: t
|
|
5030
|
+
});
|
|
5031
|
+
}, [p]), pe = x.isPending, me = V(async () => {
|
|
5032
|
+
await T(async () => {
|
|
5033
|
+
let n = oo(await Yr(e, t));
|
|
5034
|
+
if (!n) throw Error("Sign-in did not return a verified token");
|
|
5035
|
+
p({
|
|
5036
|
+
type: "signed-in",
|
|
5037
|
+
identity: n
|
|
5038
|
+
});
|
|
5039
|
+
});
|
|
4849
5040
|
}, [
|
|
4850
5041
|
e,
|
|
4851
5042
|
t,
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
body: y.screenshot
|
|
4865
|
-
});
|
|
4866
|
-
if (!t.ok) throw Error(`Screenshot upload failed (${t.status})`);
|
|
4867
|
-
let { storageId: n } = await t.json();
|
|
4868
|
-
r = n;
|
|
4869
|
-
}
|
|
4870
|
-
let i = await v.createThread({
|
|
4871
|
-
url: window.location.href,
|
|
4872
|
-
route: a,
|
|
4873
|
-
anchorSelector: y.coords.anchorSelector,
|
|
4874
|
-
anchorX: y.coords.anchorX,
|
|
4875
|
-
anchorY: y.coords.anchorY,
|
|
4876
|
-
anchorOffsetX: y.coords.anchorOffsetX,
|
|
4877
|
-
anchorOffsetY: y.coords.anchorOffsetY,
|
|
4878
|
-
viewportW: y.coords.viewportW,
|
|
4879
|
-
viewportY: y.coords.viewportY,
|
|
4880
|
-
userAgent: navigator.userAgent,
|
|
4881
|
-
authorName: n.name,
|
|
4882
|
-
authorEmail: n.email,
|
|
4883
|
-
body: e,
|
|
4884
|
-
screenshotStorageId: r
|
|
4885
|
-
});
|
|
4886
|
-
c((e) => [...e, i.thread]), b({
|
|
4887
|
-
kind: "thread",
|
|
4888
|
-
threadId: i.thread._id
|
|
5043
|
+
T,
|
|
5044
|
+
p
|
|
5045
|
+
]), he = V(async (e, t) => {
|
|
5046
|
+
if (v.kind !== "composing-new") return;
|
|
5047
|
+
let n = Jr(f);
|
|
5048
|
+
n && await C(async () => {
|
|
5049
|
+
let r;
|
|
5050
|
+
if (t && v.screenshot) {
|
|
5051
|
+
let { uploadUrl: e } = await _.getScreenshotUploadUrl(), t = await fetch(e, {
|
|
5052
|
+
method: "POST",
|
|
5053
|
+
headers: { "Content-Type": v.screenshot.type || "image/png" },
|
|
5054
|
+
body: v.screenshot
|
|
4889
5055
|
});
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
S(!1);
|
|
5056
|
+
if (!t.ok) throw Error(`Screenshot upload failed (${t.status})`);
|
|
5057
|
+
let { storageId: n } = await t.json();
|
|
5058
|
+
r = n;
|
|
4894
5059
|
}
|
|
4895
|
-
|
|
5060
|
+
let i = await _.createThread({
|
|
5061
|
+
url: window.location.href,
|
|
5062
|
+
route: a,
|
|
5063
|
+
anchorSelector: v.coords.anchorSelector,
|
|
5064
|
+
anchorX: v.coords.anchorX,
|
|
5065
|
+
anchorY: v.coords.anchorY,
|
|
5066
|
+
anchorOffsetX: v.coords.anchorOffsetX,
|
|
5067
|
+
anchorOffsetY: v.coords.anchorOffsetY,
|
|
5068
|
+
viewportW: v.coords.viewportW,
|
|
5069
|
+
viewportY: v.coords.viewportY,
|
|
5070
|
+
userAgent: navigator.userAgent,
|
|
5071
|
+
authorName: n.name,
|
|
5072
|
+
authorEmail: n.email,
|
|
5073
|
+
body: e,
|
|
5074
|
+
screenshotStorageId: r
|
|
5075
|
+
});
|
|
5076
|
+
c((e) => [...e, i.thread]), y({
|
|
5077
|
+
kind: "thread",
|
|
5078
|
+
threadId: i.thread._id
|
|
5079
|
+
});
|
|
5080
|
+
});
|
|
4896
5081
|
}, [
|
|
5082
|
+
_,
|
|
5083
|
+
f,
|
|
4897
5084
|
v,
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
await v.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), b({ kind: "idle" });
|
|
4907
|
-
} catch (e) {
|
|
4908
|
-
w(e instanceof Error ? e.message : "Failed to delete");
|
|
4909
|
-
} finally {
|
|
4910
|
-
S(!1);
|
|
4911
|
-
}
|
|
4912
|
-
}, [v, y]), me = V(async () => {
|
|
4913
|
-
if (y.kind !== "thread") return;
|
|
4914
|
-
let e = y.threadId;
|
|
4915
|
-
S(!0), w(null);
|
|
4916
|
-
try {
|
|
4917
|
-
await v.resolveThread(e, P), c((t) => t.filter((t) => t._id !== e)), b({ kind: "idle" });
|
|
4918
|
-
} catch (e) {
|
|
4919
|
-
w(e instanceof Error ? e.message : "Failed to resolve");
|
|
4920
|
-
} finally {
|
|
4921
|
-
S(!1);
|
|
4922
|
-
}
|
|
5085
|
+
a,
|
|
5086
|
+
C
|
|
5087
|
+
]), I = V(async () => {
|
|
5088
|
+
if (v.kind !== "thread") return;
|
|
5089
|
+
let e = v.threadId;
|
|
5090
|
+
await C(async () => {
|
|
5091
|
+
await _.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), y({ kind: "idle" });
|
|
5092
|
+
});
|
|
4923
5093
|
}, [
|
|
5094
|
+
_,
|
|
4924
5095
|
v,
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
5096
|
+
C
|
|
5097
|
+
]), ge = V(async () => {
|
|
5098
|
+
if (v.kind !== "thread") return;
|
|
5099
|
+
let e = v.threadId;
|
|
5100
|
+
await C(async () => {
|
|
5101
|
+
await _.resolveThread(e, P), c((t) => t.filter((t) => t._id !== e)), y({ kind: "idle" });
|
|
5102
|
+
});
|
|
5103
|
+
}, [
|
|
5104
|
+
_,
|
|
5105
|
+
v,
|
|
5106
|
+
P,
|
|
5107
|
+
C
|
|
5108
|
+
]), _e = V(async (e) => {
|
|
5109
|
+
if (v.kind !== "thread") return;
|
|
5110
|
+
let t = Jr(f);
|
|
4930
5111
|
if (!t) return;
|
|
4931
|
-
let n =
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
let r = await v.addComment(n, {
|
|
5112
|
+
let n = v.threadId;
|
|
5113
|
+
await C(async () => {
|
|
5114
|
+
let r = await _.addComment(n, {
|
|
4935
5115
|
body: e,
|
|
4936
5116
|
authorName: t.name,
|
|
4937
5117
|
authorEmail: t.email
|
|
4938
5118
|
});
|
|
4939
5119
|
c((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4940
|
-
}
|
|
4941
|
-
w(e instanceof Error ? e.message : "Failed to reply");
|
|
4942
|
-
} finally {
|
|
4943
|
-
S(!1);
|
|
4944
|
-
}
|
|
5120
|
+
});
|
|
4945
5121
|
}, [
|
|
5122
|
+
_,
|
|
5123
|
+
f,
|
|
4946
5124
|
v,
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
try {
|
|
4954
|
-
let r = await v.editComment(n, e, { body: t });
|
|
5125
|
+
C
|
|
5126
|
+
]), ve = V(async (e, t) => {
|
|
5127
|
+
if (v.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
5128
|
+
let n = v.threadId;
|
|
5129
|
+
await C(async () => {
|
|
5130
|
+
let r = await _.editComment(n, e, { body: t });
|
|
4955
5131
|
c((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4956
|
-
}
|
|
4957
|
-
throw w(e instanceof Error ? e.message : "Failed to edit"), e;
|
|
4958
|
-
} finally {
|
|
4959
|
-
S(!1);
|
|
4960
|
-
}
|
|
5132
|
+
}, { rethrow: !0 });
|
|
4961
5133
|
}, [
|
|
5134
|
+
_,
|
|
5135
|
+
f,
|
|
4962
5136
|
v,
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
try {
|
|
4970
|
-
let n = await v.deleteComment(t, e);
|
|
5137
|
+
C
|
|
5138
|
+
]), ye = V(async (e) => {
|
|
5139
|
+
if (v.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
|
|
5140
|
+
let t = v.threadId;
|
|
5141
|
+
await C(async () => {
|
|
5142
|
+
let n = await _.deleteComment(t, e);
|
|
4971
5143
|
c((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4972
|
-
}
|
|
4973
|
-
w(e instanceof Error ? e.message : "Failed to delete");
|
|
4974
|
-
} finally {
|
|
4975
|
-
S(!1);
|
|
4976
|
-
}
|
|
5144
|
+
});
|
|
4977
5145
|
}, [
|
|
5146
|
+
_,
|
|
5147
|
+
f,
|
|
4978
5148
|
v,
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
let n = Ur(d);
|
|
5149
|
+
C
|
|
5150
|
+
]), be = V(async (e, t) => {
|
|
5151
|
+
if (v.kind !== "thread") return;
|
|
5152
|
+
let n = Jr(f);
|
|
4984
5153
|
if (!n) return;
|
|
4985
|
-
let r =
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
let i = await v.toggleReaction(e, {
|
|
5154
|
+
let r = v.threadId;
|
|
5155
|
+
await E(async () => {
|
|
5156
|
+
let i = await _.toggleReaction(e, {
|
|
4989
5157
|
emoji: t,
|
|
4990
5158
|
authorName: n.name
|
|
4991
5159
|
});
|
|
4992
5160
|
c((e) => e.map((e) => e._id === r ? i.thread : e));
|
|
4993
|
-
}
|
|
4994
|
-
w(e instanceof Error ? e.message : "Failed to react");
|
|
4995
|
-
}
|
|
5161
|
+
});
|
|
4996
5162
|
}, [
|
|
5163
|
+
_,
|
|
5164
|
+
f,
|
|
4997
5165
|
v,
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
]), ve = y.kind === "thread" ? s.find((e) => e._id === y.threadId) ?? null : null, ye = N || P != null && P === ve?.authorClientId, be = Ce(() => s.map((e) => ({
|
|
5166
|
+
E
|
|
5167
|
+
]), L = v.kind === "thread" ? s.find((e) => e._id === v.threadId) ?? null : null, xe = re || P != null && P === L?.authorClientId, Se = Ce(() => s.map((e) => ({
|
|
5001
5168
|
thread: e,
|
|
5002
|
-
point:
|
|
5169
|
+
point: Ar({
|
|
5003
5170
|
anchorX: e.anchorX,
|
|
5004
5171
|
anchorY: e.anchorY,
|
|
5005
5172
|
anchorSelector: e.anchorSelector,
|
|
5006
5173
|
anchorOffsetX: e.anchorOffsetX,
|
|
5007
5174
|
anchorOffsetY: e.anchorOffsetY
|
|
5008
5175
|
})
|
|
5009
|
-
})), [s,
|
|
5176
|
+
})), [s, N]), we = Se.some((e) => !e.point.resolved);
|
|
5010
5177
|
return z(() => {
|
|
5011
|
-
if (!
|
|
5178
|
+
if (!we) return;
|
|
5012
5179
|
let e = null;
|
|
5013
5180
|
function t() {
|
|
5014
5181
|
e ??= requestAnimationFrame(() => {
|
|
5015
|
-
e = null,
|
|
5182
|
+
e = null, ee((e) => e + 1);
|
|
5016
5183
|
});
|
|
5017
5184
|
}
|
|
5018
5185
|
let n = new MutationObserver(t);
|
|
@@ -5022,106 +5189,104 @@ function Za({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
5022
5189
|
}), () => {
|
|
5023
5190
|
n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
5024
5191
|
};
|
|
5025
|
-
}, [
|
|
5026
|
-
|
|
5192
|
+
}, [we]), z(() => {
|
|
5193
|
+
v.kind === "thread" && L == null && ue();
|
|
5027
5194
|
}, [
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
]), /* @__PURE__ */
|
|
5195
|
+
v,
|
|
5196
|
+
L,
|
|
5197
|
+
ue
|
|
5198
|
+
]), /* @__PURE__ */ Q("div", {
|
|
5032
5199
|
class: "markup-root",
|
|
5033
|
-
ref:
|
|
5200
|
+
ref: te,
|
|
5034
5201
|
children: [
|
|
5035
|
-
|
|
5202
|
+
v.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
|
|
5036
5203
|
class: "markup-pins-layer",
|
|
5037
|
-
children: [
|
|
5038
|
-
let n =
|
|
5039
|
-
return /* @__PURE__ */
|
|
5204
|
+
children: [M ? null : Se.map(({ thread: e, point: t }) => {
|
|
5205
|
+
let n = v.kind === "thread" && v.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
5206
|
+
return /* @__PURE__ */ Q(Ja, {
|
|
5040
5207
|
pageX: t.pageX,
|
|
5041
5208
|
pageY: t.pageY,
|
|
5042
5209
|
count: r,
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
onClick: () =>
|
|
5210
|
+
isActive: n,
|
|
5211
|
+
isUnresolved: !t.resolved,
|
|
5212
|
+
onClick: () => y({
|
|
5046
5213
|
kind: "thread",
|
|
5047
5214
|
threadId: e._id
|
|
5048
5215
|
})
|
|
5049
5216
|
}, e._id);
|
|
5050
|
-
}),
|
|
5051
|
-
pageX:
|
|
5052
|
-
pageY:
|
|
5217
|
+
}), v.kind === "composing-new" ? /* @__PURE__ */ Q(Ya, {
|
|
5218
|
+
pageX: v.pageX,
|
|
5219
|
+
pageY: v.pageY
|
|
5053
5220
|
}) : null]
|
|
5054
5221
|
}),
|
|
5055
|
-
|
|
5056
|
-
onPlace:
|
|
5057
|
-
onCancel:
|
|
5222
|
+
v.kind === "placing" ? /* @__PURE__ */ Q(Xa, {
|
|
5223
|
+
onPlace: F,
|
|
5224
|
+
onCancel: ue
|
|
5058
5225
|
}) : null,
|
|
5059
|
-
|
|
5060
|
-
thread:
|
|
5061
|
-
authorName:
|
|
5226
|
+
v.kind === "thread" && L ? /* @__PURE__ */ Q($a, {
|
|
5227
|
+
thread: L,
|
|
5228
|
+
authorName: ne,
|
|
5062
5229
|
currentClientId: P ?? null,
|
|
5063
|
-
isVerified:
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
canDelete:
|
|
5067
|
-
|
|
5068
|
-
error:
|
|
5069
|
-
|
|
5070
|
-
onAuthor:
|
|
5071
|
-
onSignIn:
|
|
5072
|
-
onClose:
|
|
5073
|
-
onReply:
|
|
5074
|
-
onEditComment:
|
|
5075
|
-
onDeleteComment:
|
|
5076
|
-
onToggleReaction:
|
|
5077
|
-
onDelete:
|
|
5078
|
-
onResolve:
|
|
5079
|
-
},
|
|
5080
|
-
|
|
5081
|
-
pageX:
|
|
5082
|
-
pageY:
|
|
5083
|
-
authorName:
|
|
5084
|
-
isVerified:
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
error:
|
|
5089
|
-
screenshot:
|
|
5090
|
-
|
|
5091
|
-
screenshotRedactedCount:
|
|
5092
|
-
screenshotRedactedSelectors:
|
|
5093
|
-
onAuthor:
|
|
5094
|
-
onSignIn:
|
|
5095
|
-
onSubmit:
|
|
5096
|
-
onClose:
|
|
5230
|
+
isVerified: re,
|
|
5231
|
+
isIdentityResolving: ie,
|
|
5232
|
+
isSigningIn: pe,
|
|
5233
|
+
canDelete: xe,
|
|
5234
|
+
isPending: O,
|
|
5235
|
+
error: k,
|
|
5236
|
+
isHidden: M,
|
|
5237
|
+
onAuthor: fe,
|
|
5238
|
+
onSignIn: me,
|
|
5239
|
+
onClose: ue,
|
|
5240
|
+
onReply: _e,
|
|
5241
|
+
onEditComment: ve,
|
|
5242
|
+
onDeleteComment: ye,
|
|
5243
|
+
onToggleReaction: be,
|
|
5244
|
+
onDelete: I,
|
|
5245
|
+
onResolve: ge
|
|
5246
|
+
}, L._id) : null,
|
|
5247
|
+
v.kind === "composing-new" ? /* @__PURE__ */ Q(Ka, {
|
|
5248
|
+
pageX: v.pageX,
|
|
5249
|
+
pageY: v.pageY,
|
|
5250
|
+
authorName: ne,
|
|
5251
|
+
isVerified: re,
|
|
5252
|
+
isIdentityResolving: ie,
|
|
5253
|
+
isSigningIn: pe,
|
|
5254
|
+
isPending: O,
|
|
5255
|
+
error: k,
|
|
5256
|
+
screenshot: v.screenshot,
|
|
5257
|
+
isScreenshotCapturing: v.isScreenshotCapturing,
|
|
5258
|
+
screenshotRedactedCount: v.screenshotRedactedCount,
|
|
5259
|
+
screenshotRedactedSelectors: v.screenshotRedactedSelectors,
|
|
5260
|
+
onAuthor: fe,
|
|
5261
|
+
onSignIn: me,
|
|
5262
|
+
onSubmit: he,
|
|
5263
|
+
onClose: ue
|
|
5097
5264
|
}) : null,
|
|
5098
|
-
!
|
|
5099
|
-
|
|
5100
|
-
onToggle: () =>
|
|
5101
|
-
onHide: () => {
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
position: p,
|
|
5105
|
-
onPositionChange: m,
|
|
5265
|
+
!M || v.kind === "placing" || v.kind === "composing-new" ? /* @__PURE__ */ Q(za, {
|
|
5266
|
+
isActive: v.kind === "placing",
|
|
5267
|
+
onToggle: () => v.kind === "placing" ? ue() : le(),
|
|
5268
|
+
onHide: () => j({ type: "hide-with-toast" }),
|
|
5269
|
+
position: m,
|
|
5270
|
+
onPositionChange: h,
|
|
5106
5271
|
variant: r
|
|
5107
5272
|
}) : null,
|
|
5108
|
-
|
|
5273
|
+
A.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(fo, { position: m }) : null
|
|
5109
5274
|
]
|
|
5110
5275
|
});
|
|
5111
5276
|
}
|
|
5112
|
-
function
|
|
5277
|
+
function fo({ position: e }) {
|
|
5113
5278
|
let t = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘" : "Ctrl";
|
|
5114
|
-
return /* @__PURE__ */
|
|
5115
|
-
class:
|
|
5279
|
+
return /* @__PURE__ */ Q("div", {
|
|
5280
|
+
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
5116
5281
|
role: "status",
|
|
5117
5282
|
"aria-live": "polite",
|
|
5118
5283
|
children: [
|
|
5119
5284
|
"Markup hidden — press ",
|
|
5120
|
-
/* @__PURE__ */
|
|
5285
|
+
/* @__PURE__ */ Q("kbd", {
|
|
5121
5286
|
class: "markup-kbd",
|
|
5122
5287
|
children: t
|
|
5123
5288
|
}),
|
|
5124
|
-
/* @__PURE__ */
|
|
5289
|
+
/* @__PURE__ */ Q("kbd", {
|
|
5125
5290
|
class: "markup-kbd",
|
|
5126
5291
|
children: "."
|
|
5127
5292
|
}),
|
|
@@ -5131,7 +5296,7 @@ function Qa({ position: e }) {
|
|
|
5131
5296
|
}
|
|
5132
5297
|
//#endregion
|
|
5133
5298
|
//#region src/runtime/mount.tsx
|
|
5134
|
-
function
|
|
5299
|
+
function po(e, t) {
|
|
5135
5300
|
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
|
|
5136
5301
|
let n = t.theme ?? "auto";
|
|
5137
5302
|
n !== "auto" && (e.dataset.theme = n);
|
|
@@ -5140,24 +5305,24 @@ function $a(e, t) {
|
|
|
5140
5305
|
let a = document.createElement("div");
|
|
5141
5306
|
a.className = "markup-shadow-root", r.appendChild(a);
|
|
5142
5307
|
let { theme: o, ...s } = t;
|
|
5143
|
-
return le(/* @__PURE__ */
|
|
5308
|
+
return le(/* @__PURE__ */ Q(uo, { ...s }), a), () => le(null, a);
|
|
5144
5309
|
}
|
|
5145
5310
|
//#endregion
|
|
5146
5311
|
//#region src/widget.ts
|
|
5147
|
-
var
|
|
5148
|
-
function
|
|
5312
|
+
var mo = null, ho = null;
|
|
5313
|
+
function go(e) {
|
|
5149
5314
|
if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
|
|
5150
|
-
|
|
5315
|
+
_o();
|
|
5151
5316
|
let t = document.createElement("div");
|
|
5152
|
-
return t.id = "markup-widget", document.body.appendChild(t),
|
|
5317
|
+
return t.id = "markup-widget", document.body.appendChild(t), ho = t, mo = po(t, e), _o;
|
|
5153
5318
|
}
|
|
5154
|
-
function
|
|
5155
|
-
|
|
5319
|
+
function _o() {
|
|
5320
|
+
mo &&= (mo(), null), ho?.parentNode && ho.parentNode.removeChild(ho), ho = null;
|
|
5156
5321
|
}
|
|
5157
5322
|
if (typeof document < "u") {
|
|
5158
5323
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
5159
5324
|
if (t && n) {
|
|
5160
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () =>
|
|
5325
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => go({
|
|
5161
5326
|
apiUrl: t,
|
|
5162
5327
|
apiKey: n,
|
|
5163
5328
|
position: r,
|
|
@@ -5168,4 +5333,4 @@ if (typeof document < "u") {
|
|
|
5168
5333
|
}
|
|
5169
5334
|
}
|
|
5170
5335
|
//#endregion
|
|
5171
|
-
export {
|
|
5336
|
+
export { _o as destroy, go as init };
|