@pixelmatters/markup 1.6.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.js CHANGED
@@ -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 = 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);
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 && P(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) {
@@ -145,7 +145,7 @@ function ne(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 ? 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);
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 ? ae(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;
@@ -157,14 +157,14 @@ function ne(e, n, r, i, a, o, s, c, l, u) {
157
157
  else n.__e = r.__e, n.__k = r.__k, e.then || re(n);
158
158
  t.__e(e, n, r);
159
159
  }
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);
160
+ else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = oe(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
163
  function re(e) {
164
164
  e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(re));
165
165
  }
166
166
  function ie(e, n, r) {
167
- for (var i = 0; i < r.length; i++) oe(r[i], r[++i], r[++i]);
167
+ for (var i = 0; i < r.length; i++) P(r[i], r[++i], r[++i]);
168
168
  t.__c && t.__c(n, e), e.some(function(n) {
169
169
  try {
170
170
  e = n.__h, n.__h = [], e.some(function(e) {
@@ -175,10 +175,10 @@ function ie(e, n, r) {
175
175
  }
176
176
  });
177
177
  }
178
- function P(e) {
179
- return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(P) : v({}, e);
178
+ function ae(e) {
179
+ return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ae) : v({}, e);
180
180
  }
181
- function ae(n, r, i, a, o, s, c, l, u) {
181
+ function oe(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;
183
183
  if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o ||= "http://www.w3.org/1999/xhtml", s != null) {
184
184
  for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
@@ -201,7 +201,7 @@ function ae(n, r, i, a, o, s, c, l, u) {
201
201
  }
202
202
  return n;
203
203
  }
204
- function oe(e, n, r) {
204
+ function P(e, n, r) {
205
205
  try {
206
206
  if (typeof e == "function") {
207
207
  var i = typeof e.__u == "function";
@@ -213,7 +213,7 @@ function oe(e, n, r) {
213
213
  }
214
214
  function se(e, n, r) {
215
215
  var i, a;
216
- if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || oe(i, null, n)), (i = e.__c) != null) {
216
+ if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || P(i, null, n)), (i = e.__c) != null) {
217
217
  if (i.componentWillUnmount) try {
218
218
  i.componentWillUnmount();
219
219
  } catch (e) {
@@ -248,8 +248,8 @@ e = h.slice, t = { __e: function(e, t, n, r) {
248
248
  }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = 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}}", 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
- function xe(e, t) {
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, xe = I.__;
252
+ function Se(e, t) {
253
253
  I.__h && I.__h(F, e, me || t), me = 0;
254
254
  var n = F.__H ||= {
255
255
  __: [],
@@ -257,12 +257,12 @@ function xe(e, t) {
257
257
  };
258
258
  return e >= n.__.length && n.__.push({}), n.__[e];
259
259
  }
260
- function R(e) {
261
- return me = 1, Se(Ae, e);
260
+ function L(e) {
261
+ return me = 1, Ce(je, e);
262
262
  }
263
- function Se(e, t, n) {
264
- var r = xe(de++, 2);
265
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ae(void 0, t), function(e) {
263
+ function Ce(e, t, n) {
264
+ var r = Se(de++, 2);
265
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : je(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
268
  }], r.__c = F, !F.__f)) {
@@ -294,29 +294,29 @@ function Se(e, t, n) {
294
294
  }
295
295
  return r.__N || r.__;
296
296
  }
297
- function z(e, t) {
298
- var n = xe(de++, 3);
299
- !I.__s && ke(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
297
+ function R(e, t) {
298
+ var n = Se(de++, 3);
299
+ !I.__s && Ae(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
300
300
  }
301
- function B(e) {
302
- return me = 5, Ce(function() {
301
+ function z(e) {
302
+ return me = 5, we(function() {
303
303
  return { current: e };
304
304
  }, []);
305
305
  }
306
- function Ce(e, t) {
307
- var n = xe(de++, 7);
308
- return ke(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
306
+ function we(e, t) {
307
+ var n = Se(de++, 7);
308
+ return Ae(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
309
309
  }
310
- function V(e, t) {
311
- return me = 8, Ce(function() {
310
+ function B(e, t) {
311
+ return me = 8, we(function() {
312
312
  return e;
313
313
  }, t);
314
314
  }
315
- function we() {
315
+ function Te() {
316
316
  for (var e; e = he.shift();) {
317
317
  var t = e.__H;
318
318
  if (e.__P && t) try {
319
- t.__h.some(De), t.__h.some(Oe), t.__h = [];
319
+ t.__h.some(Oe), t.__h.some(ke), t.__h = [];
320
320
  } catch (n) {
321
321
  t.__h = [], I.__e(n, e.__v);
322
322
  }
@@ -325,24 +325,24 @@ function we() {
325
325
  I.__b = function(e) {
326
326
  F = null, ge && ge(e);
327
327
  }, I.__ = function(e, t) {
328
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), L && L(e, t);
328
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), xe && xe(e, t);
329
329
  }, I.__r = function(e) {
330
330
  _e && _e(e), de = 0;
331
331
  var t = (F = e.__c).__H;
332
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 = [], de = 0)), fe = F;
334
+ })) : (t.__h.some(Oe), t.__h.some(ke), t.__h = [], de = 0)), fe = F;
335
335
  }, I.diffed = function(e) {
336
336
  ve && ve(e);
337
337
  var t = e.__c;
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) {
338
+ t && t.__H && (t.__H.__h.length && (he.push(t) !== 1 && pe === I.requestAnimationFrame || ((pe = I.requestAnimationFrame) || De)(Te)), t.__H.__.some(function(e) {
339
339
  e.u && (e.__H = e.u), e.u = void 0;
340
340
  })), fe = F = null;
341
341
  }, I.__c = function(e, t) {
342
342
  t.some(function(e) {
343
343
  try {
344
- e.__h.some(De), e.__h = e.__h.filter(function(e) {
345
- return !e.__ || Oe(e);
344
+ e.__h.some(Oe), e.__h = e.__h.filter(function(e) {
345
+ return !e.__ || ke(e);
346
346
  });
347
347
  } catch (n) {
348
348
  t.some(function(e) {
@@ -355,38 +355,38 @@ I.__b = function(e) {
355
355
  var t, n = e.__c;
356
356
  n && n.__H && (n.__H.__.some(function(e) {
357
357
  try {
358
- De(e);
358
+ Oe(e);
359
359
  } catch (e) {
360
360
  t = e;
361
361
  }
362
362
  }), n.__H = void 0, t && I.__e(t, n.__v));
363
363
  };
364
- var Te = typeof requestAnimationFrame == "function";
365
- function Ee(e) {
364
+ var Ee = typeof requestAnimationFrame == "function";
365
+ function De(e) {
366
366
  var t, n = function() {
367
- clearTimeout(r), Te && cancelAnimationFrame(t), setTimeout(e);
367
+ clearTimeout(r), Ee && cancelAnimationFrame(t), setTimeout(e);
368
368
  }, r = setTimeout(n, 35);
369
- Te && (t = requestAnimationFrame(n));
369
+ Ee && (t = requestAnimationFrame(n));
370
370
  }
371
- function De(e) {
371
+ function Oe(e) {
372
372
  var t = F, n = e.__c;
373
373
  typeof n == "function" && (e.__c = void 0, n()), F = t;
374
374
  }
375
- function Oe(e) {
375
+ function ke(e) {
376
376
  var t = F;
377
377
  e.__c = e.__(), F = t;
378
378
  }
379
- function ke(e, t) {
379
+ function Ae(e, t) {
380
380
  return !e || e.length !== t.length || t.some(function(t, n) {
381
381
  return t !== e[n];
382
382
  });
383
383
  }
384
- function Ae(e, t) {
384
+ function je(e, t) {
385
385
  return typeof t == "function" ? t(e) : t;
386
386
  }
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
- U[45] = 62, U[95] = 63;
389
- function Ie(e) {
387
+ for (var Me = "1.38.0", V = [], H = [], Ne = Uint8Array, Pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Fe = 0, Ie = Pe.length; Fe < Ie; ++Fe) V[Fe] = Pe[Fe], H[Pe.charCodeAt(Fe)] = Fe;
388
+ H[45] = 62, H[95] = 63;
389
+ function Le(e) {
390
390
  var t = e.length;
391
391
  if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
392
392
  var n = e.indexOf("=");
@@ -394,28 +394,28 @@ function Ie(e) {
394
394
  var r = n === t ? 0 : 4 - n % 4;
395
395
  return [n, r];
396
396
  }
397
- function Le(e, t, n) {
397
+ function Re(e, t, n) {
398
398
  return (t + n) * 3 / 4 - n;
399
399
  }
400
- function Re(e) {
401
- var t, n = Ie(e), r = n[0], i = n[1], a = new Me(Le(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
402
- for (c = 0; c < s; c += 4) t = U[e.charCodeAt(c)] << 18 | U[e.charCodeAt(c + 1)] << 12 | U[e.charCodeAt(c + 2)] << 6 | U[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
403
- return i === 2 && (t = U[e.charCodeAt(c)] << 2 | U[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = U[e.charCodeAt(c)] << 10 | U[e.charCodeAt(c + 1)] << 4 | U[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
404
- }
405
400
  function ze(e) {
406
- return H[e >> 18 & 63] + H[e >> 12 & 63] + H[e >> 6 & 63] + H[e & 63];
401
+ var t, n = Le(e), r = n[0], i = n[1], a = new Ne(Re(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
402
+ for (c = 0; c < s; c += 4) t = H[e.charCodeAt(c)] << 18 | H[e.charCodeAt(c + 1)] << 12 | H[e.charCodeAt(c + 2)] << 6 | H[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
403
+ return i === 2 && (t = H[e.charCodeAt(c)] << 2 | H[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = H[e.charCodeAt(c)] << 10 | H[e.charCodeAt(c + 1)] << 4 | H[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
404
+ }
405
+ function Be(e) {
406
+ return V[e >> 18 & 63] + V[e >> 12 & 63] + V[e >> 6 & 63] + V[e & 63];
407
407
  }
408
- function Be(e, t, n) {
409
- for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(ze(r));
408
+ function Ve(e, t, n) {
409
+ for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(Be(r));
410
410
  return i.join("");
411
411
  }
412
- function Ve(e) {
413
- for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(Be(e, o, o + a > s ? s : o + a));
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("");
412
+ function He(e) {
413
+ for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(Ve(e, o, o + a > s ? s : o + a));
414
+ return r === 1 ? (t = e[n - 1], i.push(V[t >> 2] + V[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(V[t >> 10] + V[t >> 4 & 63] + V[t << 2 & 63] + "=")), i.join("");
415
415
  }
416
416
  //#endregion
417
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) {
418
+ function U(e) {
419
419
  if (e === void 0) return {};
420
420
  if (!We(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
421
421
  return e;
@@ -447,10 +447,10 @@ function Qe(e) {
447
447
  t.length % 2 == 1 && (t = "0" + t);
448
448
  let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
449
449
  for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= Ye;
450
- return Ve(n);
450
+ return He(n);
451
451
  }
452
452
  function $e(e) {
453
- let t = Re(e);
453
+ let t = ze(e);
454
454
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
455
455
  let n = Je, r = Je;
456
456
  for (let e of t) n += BigInt(e) * Xe ** r, r++;
@@ -459,10 +459,10 @@ function $e(e) {
459
459
  function et(e) {
460
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
- return new DataView(t).setBigInt64(0, e, !0), Ve(new Uint8Array(t));
462
+ return new DataView(t).setBigInt64(0, e, !0), He(new Uint8Array(t));
463
463
  }
464
464
  function tt(e) {
465
- let t = Re(e);
465
+ let t = ze(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
  }
@@ -484,7 +484,7 @@ function ot(e) {
484
484
  let n = t[0][0];
485
485
  if (n === "$bytes") {
486
486
  if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
487
- return Re(e.$bytes).buffer;
487
+ return ze(e.$bytes).buffer;
488
488
  }
489
489
  if (n === "$integer") {
490
490
  if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
@@ -492,7 +492,7 @@ function ot(e) {
492
492
  }
493
493
  if (n === "$float") {
494
494
  if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
495
- let t = Re(e.$float);
495
+ let t = ze(e.$float);
496
496
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
497
497
  let n = new DataView(t.buffer).getFloat64(0, Ge);
498
498
  if (!Ze(n)) throw Error(`Float ${n} should be encoded as a number`);
@@ -526,10 +526,10 @@ function lt(e, t, n, r) {
526
526
  }
527
527
  if (typeof e == "number") if (Ze(e)) {
528
528
  let t = /* @__PURE__ */ new ArrayBuffer(8);
529
- return new DataView(t).setFloat64(0, e, Ge), { $float: Ve(new Uint8Array(t)) };
529
+ return new DataView(t).setFloat64(0, e, Ge), { $float: He(new Uint8Array(t)) };
530
530
  } else return e;
531
531
  if (typeof e == "boolean" || typeof e == "string") return e;
532
- if (e instanceof ArrayBuffer) return { $bytes: Ve(new Uint8Array(e)) };
532
+ if (e instanceof ArrayBuffer) return { $bytes: He(new Uint8Array(e)) };
533
533
  if (Array.isArray(e)) return e.map((e, r) => lt(e, t, n + `[${r}]`, !1));
534
534
  if (e instanceof Set) throw Error(ut(n, "Set", [...e], t));
535
535
  if (e instanceof Map) throw Error(ut(n, "Map", [...e], t));
@@ -1047,7 +1047,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1047
1047
  Qt(this, "queryResults"), Qt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1048
1048
  }
1049
1049
  getQuery(t, ...n) {
1050
- let r = He(n[0]), i = G(t), a = this.queryResults.get(Nt(i, r));
1050
+ let r = U(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) {
@@ -1059,7 +1059,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1059
1059
  return n;
1060
1060
  }
1061
1061
  setQuery(e, t, n) {
1062
- let r = He(t), i = G(e), a = Nt(i, r), o;
1062
+ let r = U(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,
@@ -1225,11 +1225,11 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1225
1225
  //#endregion
1226
1226
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/protocol.js
1227
1227
  function hn(e) {
1228
- let t = Re(e);
1228
+ let t = ze(e);
1229
1229
  return an.fromBytesLE(Array.from(t));
1230
1230
  }
1231
1231
  function gn(e) {
1232
- return Ve(new Uint8Array(e.toBytesLE()));
1232
+ return He(new Uint8Array(e.toBytesLE()));
1233
1233
  }
1234
1234
  function _n(e) {
1235
1235
  switch (e.type) {
@@ -1868,7 +1868,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1868
1868
  if (s === "http") c = "ws";
1869
1869
  else if (s === "https") c = "wss";
1870
1870
  else throw Error(`Unknown parent protocol ${s}`);
1871
- let l = `${c}://${o}/api/${je}/sync`;
1871
+ let l = `${c}://${o}/api/${Me}/sync`;
1872
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();
@@ -2022,7 +2022,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2022
2022
  this.webSocketManager.sendMessage(e);
2023
2023
  }
2024
2024
  subscribe(e, t, n) {
2025
- let r = He(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
2025
+ let r = U(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 Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2032
2032
  };
2033
2033
  }
2034
2034
  localQueryResult(e, t) {
2035
- let n = Nt(e, He(t));
2035
+ let n = Nt(e, U(t));
2036
2036
  return this.optimisticQueryResults.queryResult(n);
2037
2037
  }
2038
2038
  localQueryResultByToken(e) {
@@ -2042,11 +2042,11 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2042
2042
  return this.optimisticQueryResults.hasQueryResult(e);
2043
2043
  }
2044
2044
  localQueryLogs(e, t) {
2045
- let n = Nt(e, He(t));
2045
+ let n = Nt(e, U(t));
2046
2046
  return this.optimisticQueryResults.queryLogs(n);
2047
2047
  }
2048
2048
  queryJournal(e, t) {
2049
- let n = Nt(e, He(t));
2049
+ let n = Nt(e, U(t));
2050
2050
  return this.state.queryJournal(n);
2051
2051
  }
2052
2052
  connectionState() {
@@ -2078,7 +2078,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2078
2078
  return i;
2079
2079
  }
2080
2080
  enqueueMutation(e, t, n, r) {
2081
- let i = He(t);
2081
+ let i = U(t);
2082
2082
  this.tryReportLongDisconnect();
2083
2083
  let a = this.nextRequestId;
2084
2084
  if (this._nextRequestId++, n !== void 0) {
@@ -2125,7 +2125,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2125
2125
  return n.value;
2126
2126
  }
2127
2127
  async actionInternal(e, t, n) {
2128
- let r = He(t), i = this.nextRequestId;
2128
+ let r = U(t), i = this.nextRequestId;
2129
2129
  this._nextRequestId++, this.tryReportLongDisconnect();
2130
2130
  let a = {
2131
2131
  type: "Action",
@@ -2167,7 +2167,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2167
2167
  method: "POST",
2168
2168
  headers: {
2169
2169
  "Content-Type": "application/json",
2170
- "Convex-Client": `npm-${je}`
2170
+ "Convex-Client": `npm-${Me}`
2171
2171
  },
2172
2172
  body: JSON.stringify({ event: "LongWebsocketDisconnect" })
2173
2173
  }).then((e) => {
@@ -2521,10 +2521,10 @@ function ar(e) {
2521
2521
  return e;
2522
2522
  }
2523
2523
  function or(e, t) {
2524
- let n = B(e);
2524
+ let n = z(e);
2525
2525
  n.current = e;
2526
- let [r, i] = R(() => typeof t == "function" ? t() : t);
2527
- return [r, V((e) => {
2526
+ let [r, i] = L(() => typeof t == "function" ? t() : t);
2527
+ return [r, B((e) => {
2528
2528
  i((t) => {
2529
2529
  let r = n.current[t.kind]?.[e.type];
2530
2530
  return r ? r(t, e) : t;
@@ -2555,9 +2555,9 @@ var sr = ar({
2555
2555
  }
2556
2556
  });
2557
2557
  function cr() {
2558
- let [e, t] = or(sr, { kind: "idle" }), n = e, r = B(n);
2558
+ let [e, t] = or(sr, { kind: "idle" }), n = e, r = z(n);
2559
2559
  r.current = n;
2560
- let i = V(async (e, n) => {
2560
+ let i = B(async (e, n) => {
2561
2561
  if (r.current.kind !== "pending") {
2562
2562
  t({ type: "start" });
2563
2563
  try {
@@ -2575,7 +2575,7 @@ function cr() {
2575
2575
  return;
2576
2576
  }
2577
2577
  }
2578
- }, [t]), a = V(() => t({ type: "reset" }), [t]);
2578
+ }, [t]), a = B(() => t({ type: "reset" }), [t]);
2579
2579
  return {
2580
2580
  state: n,
2581
2581
  isIdle: n.kind === "idle",
@@ -2831,12 +2831,14 @@ function Nr(e) {
2831
2831
  o && a && (i.authorization = `Bearer ${a.token}`);
2832
2832
  let s = e.getAnonToken?.() ?? null;
2833
2833
  s && (i["x-markup-anon-token"] = s);
2834
- let c = await fetch(`${t}${n}`, {
2834
+ let c = e.getStorageMode?.() === "cookies", l = {
2835
2835
  ...r,
2836
2836
  headers: i
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);
2839
- return u;
2837
+ };
2838
+ c && (l.credentials = "include");
2839
+ let u = await fetch(`${t}${n}`, l), d = await u.text(), f = d ? Pr(d) : null;
2840
+ if (!u.ok) throw u.status === 401 && (o || c) && e.onUnauthorized?.(), new Mr((f && typeof f == "object" && "error" in f && typeof f.error == "string" ? f.error : null) ?? `Request failed with ${u.status}`, u.status);
2841
+ return f;
2840
2842
  }
2841
2843
  return {
2842
2844
  mintAnonIdentity() {
@@ -2897,65 +2899,124 @@ function Pr(e) {
2897
2899
  }
2898
2900
  }
2899
2901
  //#endregion
2902
+ //#region src/runtime/cookie-probe.ts
2903
+ var Fr = "markup.cookieProbe";
2904
+ async function Ir(e, t) {
2905
+ try {
2906
+ let e = sessionStorage.getItem(Fr);
2907
+ if (e === "supported") return !0;
2908
+ if (e === "unsupported") return !1;
2909
+ } catch {}
2910
+ let n = e.replace(/\/+$/, ""), r = { "x-markup-api-key": t };
2911
+ try {
2912
+ if (!(await fetch(`${n}/widget/auth/probe-set`, {
2913
+ method: "POST",
2914
+ credentials: "include",
2915
+ headers: r
2916
+ })).ok) return !1;
2917
+ let e = await fetch(`${n}/widget/auth/probe-check`, {
2918
+ method: "POST",
2919
+ credentials: "include",
2920
+ headers: r
2921
+ });
2922
+ if (!e.ok) return !1;
2923
+ let { supported: t } = await e.json(), i = t === !0;
2924
+ try {
2925
+ sessionStorage.setItem(Fr, i ? "supported" : "unsupported");
2926
+ } catch {}
2927
+ return i;
2928
+ } catch {
2929
+ return !1;
2930
+ }
2931
+ }
2932
+ //#endregion
2900
2933
  //#region src/runtime/history-observer.ts
2901
- var Fr = "__markup_history_observer__", Ir = "__markup_history_listeners__";
2902
- function Lr(e) {
2934
+ var Lr = "__markup_history_observer__", Rr = "__markup_history_listeners__";
2935
+ function zr(e) {
2903
2936
  e.forEach((e) => e());
2904
2937
  }
2905
- function Rr() {
2938
+ function Br() {
2906
2939
  let e = history.pushState;
2907
- if (e[Fr]) return e[Ir];
2940
+ if (e[Lr]) return e[Rr];
2908
2941
  let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
2909
2942
  function i(...e) {
2910
- n.apply(this, e), Lr(t);
2943
+ n.apply(this, e), zr(t);
2911
2944
  }
2912
2945
  function a(...e) {
2913
- r.apply(this, e), Lr(t);
2946
+ r.apply(this, e), zr(t);
2914
2947
  }
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;
2948
+ return Object.defineProperty(i, Lr, { value: 1 }), Object.defineProperty(i, Rr, { value: t }), Object.defineProperty(a, Lr, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", () => zr(t)), t;
2916
2949
  }
2917
- var zr = null;
2918
- function Br(e) {
2919
- return zr ||= Rr(), zr.add(e), () => zr.delete(e);
2950
+ var Vr = null;
2951
+ function Hr(e) {
2952
+ return Vr ||= Br(), Vr.add(e), () => Vr.delete(e);
2920
2953
  }
2921
2954
  //#endregion
2922
2955
  //#region src/runtime/identity-store.ts
2923
- var Vr = "markup.identity";
2924
- function Hr() {
2956
+ var Ur = "markup.identity";
2957
+ function Wr() {
2925
2958
  try {
2926
- let e = localStorage.getItem(Vr);
2959
+ let e = localStorage.getItem(Ur);
2927
2960
  return e ? JSON.parse(e) : null;
2928
2961
  } catch {
2929
2962
  return null;
2930
2963
  }
2931
2964
  }
2932
- function Ur(e) {
2965
+ function Gr(e) {
2933
2966
  try {
2934
2967
  if (e == null) {
2935
- localStorage.removeItem(Vr);
2968
+ localStorage.removeItem(Ur);
2936
2969
  return;
2937
2970
  }
2938
- localStorage.setItem(Vr, JSON.stringify(e));
2971
+ localStorage.setItem(Ur, JSON.stringify(e));
2939
2972
  } catch {}
2940
2973
  }
2941
- function Wr() {
2942
- let e = Hr(), t = {
2974
+ function Kr() {
2975
+ let e = Wr(), t = {
2943
2976
  name: e?.name,
2944
2977
  email: e?.email
2945
2978
  };
2946
- return e ? e.isVerified && typeof e.clientId == "string" && typeof e.token == "string" && typeof e.tokenExpiresAt == "number" && typeof e.name == "string" && e.tokenExpiresAt > Date.now() ? {
2979
+ if (!e) return {
2980
+ state: { kind: "unresolved" },
2981
+ preserved: t
2982
+ };
2983
+ let n = e.storage ?? "localStorage";
2984
+ if (n === "cookies" && e.isVerified && typeof e.clientId == "string" && typeof e.tokenExpiresAt == "number" && typeof e.refreshTokenExpiresAt == "number" && typeof e.name == "string" && e.refreshTokenExpiresAt > Date.now()) return {
2947
2985
  state: {
2948
2986
  kind: "verified",
2949
2987
  identity: {
2988
+ storage: "cookies",
2950
2989
  clientId: e.clientId,
2951
- token: e.token,
2952
2990
  tokenExpiresAt: e.tokenExpiresAt,
2991
+ refreshTokenExpiresAt: e.refreshTokenExpiresAt,
2953
2992
  name: e.name,
2954
2993
  email: e.email
2955
2994
  }
2956
2995
  },
2957
2996
  preserved: t
2958
- } : typeof e.clientId == "string" && typeof e.anonToken == "string" ? {
2997
+ };
2998
+ if (n === "localStorage" && e.isVerified && typeof e.clientId == "string" && typeof e.token == "string" && typeof e.tokenExpiresAt == "number" && typeof e.name == "string") {
2999
+ let n = e.tokenExpiresAt > Date.now(), r = typeof e.refreshToken == "string" && typeof e.refreshTokenExpiresAt == "number" && e.refreshTokenExpiresAt > Date.now();
3000
+ if (n || r) return {
3001
+ state: {
3002
+ kind: "verified",
3003
+ identity: {
3004
+ storage: "localStorage",
3005
+ clientId: e.clientId,
3006
+ token: e.token,
3007
+ tokenExpiresAt: e.tokenExpiresAt,
3008
+ ...r ? {
3009
+ refreshToken: e.refreshToken,
3010
+ refreshTokenExpiresAt: e.refreshTokenExpiresAt
3011
+ } : {},
3012
+ name: e.name,
3013
+ email: e.email
3014
+ }
3015
+ },
3016
+ preserved: t
3017
+ };
3018
+ }
3019
+ return typeof e.clientId == "string" && typeof e.anonToken == "string" ? {
2959
3020
  state: {
2960
3021
  kind: "anon",
2961
3022
  identity: {
@@ -2969,25 +3030,25 @@ function Wr() {
2969
3030
  } : {
2970
3031
  state: { kind: "unresolved" },
2971
3032
  preserved: t
2972
- } : {
2973
- state: { kind: "unresolved" },
2974
- preserved: t
2975
3033
  };
2976
3034
  }
2977
- function Gr(e) {
3035
+ function qr(e) {
2978
3036
  switch (e.kind) {
2979
3037
  case "verified":
2980
- Ur({
3038
+ Gr({
2981
3039
  clientId: e.identity.clientId,
2982
- token: e.identity.token,
3040
+ storage: e.identity.storage,
3041
+ token: e.identity.storage === "cookies" ? void 0 : e.identity.token,
2983
3042
  tokenExpiresAt: e.identity.tokenExpiresAt,
3043
+ refreshToken: e.identity.storage === "cookies" ? void 0 : e.identity.refreshToken,
3044
+ refreshTokenExpiresAt: e.identity.refreshTokenExpiresAt,
2984
3045
  isVerified: !0,
2985
3046
  name: e.identity.name,
2986
3047
  email: e.identity.email
2987
3048
  });
2988
3049
  return;
2989
3050
  case "anon":
2990
- Ur({
3051
+ Gr({
2991
3052
  clientId: e.identity.clientId,
2992
3053
  anonToken: e.identity.anonToken,
2993
3054
  name: e.identity.name,
@@ -2995,23 +3056,23 @@ function Gr(e) {
2995
3056
  });
2996
3057
  return;
2997
3058
  case "recovering":
2998
- Ur({
3059
+ Gr({
2999
3060
  name: e.preserved.name,
3000
3061
  email: e.preserved.email
3001
3062
  });
3002
3063
  return;
3003
3064
  case "unresolved":
3004
- Ur(null);
3065
+ Gr(null);
3005
3066
  return;
3006
3067
  }
3007
3068
  }
3008
- function Kr(e) {
3069
+ function Jr(e) {
3009
3070
  if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
3010
3071
  }
3011
- function qr(e) {
3072
+ function Yr(e) {
3012
3073
  return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
3013
3074
  }
3014
- function Jr(e) {
3075
+ function Xr(e) {
3015
3076
  if (e.kind === "anon") {
3016
3077
  let t = e.identity.name;
3017
3078
  return t ? {
@@ -3026,86 +3087,113 @@ function Jr(e) {
3026
3087
  }
3027
3088
  //#endregion
3028
3089
  //#region src/runtime/popup-auth.ts
3029
- async function Yr(e, t) {
3030
- let n = new URL(e).origin, r;
3090
+ async function Zr(e) {
3091
+ let { apiUrl: t, apiKey: n, useCookies: r } = e, i = new URL(t).origin, a;
3031
3092
  try {
3032
- let n = await fetch(`${e.replace(/\/+$/, "")}/widget/popup-exchange`, {
3093
+ let e = await fetch(`${t.replace(/\/+$/, "")}/widget/popup-exchange`, {
3033
3094
  method: "POST",
3034
3095
  headers: {
3035
3096
  "content-type": "application/json",
3036
- "x-markup-api-key": t
3097
+ "x-markup-api-key": n
3037
3098
  },
3038
3099
  body: "{}"
3039
3100
  });
3040
- if (!n.ok) throw Error(`popup-exchange responded with ${n.status}`);
3041
- let { code: i } = await n.json(), a = new URL("/widget/auth", e);
3042
- a.searchParams.set("code", i), r = a.toString();
3101
+ if (!e.ok) throw Error(`popup-exchange responded with ${e.status}`);
3102
+ let { code: i } = await e.json(), o = new URL("/widget/auth", t);
3103
+ o.searchParams.set("code", i);
3104
+ let s = r ? "refresh,cookies" : "refresh";
3105
+ o.searchParams.set("capabilities", s), a = o.toString();
3043
3106
  } catch (e) {
3044
3107
  return Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
3045
3108
  }
3046
- let i = Math.max(0, window.screenX + (window.outerWidth - 420) / 2), a = Math.max(0, window.screenY + (window.outerHeight - 560) / 2), o = window.open(r, "markup-auth", `width=420,height=560,left=${i},top=${a}`);
3047
- return o ? new Promise((e, t) => {
3048
- function r() {
3049
- window.removeEventListener("message", i), clearInterval(a), clearTimeout(s);
3109
+ let o = Math.max(0, window.screenX + (window.outerWidth - 420) / 2), s = Math.max(0, window.screenY + (window.outerHeight - 560) / 2), c = window.open(a, "markup-auth", `width=420,height=560,left=${o},top=${s}`);
3110
+ if (!c) return Promise.reject(/* @__PURE__ */ Error("Popup blocked allow popups for this site to sign in"));
3111
+ let l = await new Promise((e, t) => {
3112
+ function n() {
3113
+ window.removeEventListener("message", r), clearInterval(a), clearTimeout(o);
3050
3114
  }
3051
- function i(i) {
3052
- if (i.origin !== n || i.source !== o) return;
3053
- let a = i.data;
3054
- a?.type === "MARKUP_AUTH_RESULT" && (r(), a.identity?.id && a.identity?.name ? e({
3115
+ function r(r) {
3116
+ if (r.origin !== i || r.source !== c) return;
3117
+ let a = r.data;
3118
+ a?.type === "MARKUP_AUTH_RESULT" && (n(), a.identity?.id && a.identity?.name ? e({
3119
+ mode: a.mode === "cookies" ? "cookies" : "localStorage",
3055
3120
  identity: a.identity,
3056
3121
  token: typeof a.token == "string" ? a.token : null,
3057
- tokenExpiresAt: typeof a.tokenExpiresAt == "number" ? a.tokenExpiresAt : null
3122
+ tokenExpiresAt: typeof a.tokenExpiresAt == "number" ? a.tokenExpiresAt : null,
3123
+ refreshToken: typeof a.refreshToken == "string" ? a.refreshToken : null,
3124
+ refreshTokenExpiresAt: typeof a.refreshTokenExpiresAt == "number" ? a.refreshTokenExpiresAt : null
3058
3125
  }) : t(/* @__PURE__ */ Error("Sign-in cancelled")));
3059
3126
  }
3060
3127
  let a = window.setInterval(() => {
3061
- o.closed && (r(), t(/* @__PURE__ */ Error("Sign-in cancelled")));
3062
- }, 500), s = window.setTimeout(() => {
3063
- r(), t(/* @__PURE__ */ Error("Sign-in timed out"));
3128
+ c.closed && (n(), t(/* @__PURE__ */ Error("Sign-in cancelled")));
3129
+ }, 500), o = window.setTimeout(() => {
3130
+ n(), t(/* @__PURE__ */ Error("Sign-in timed out"));
3064
3131
  }, 3e5);
3065
- window.addEventListener("message", i);
3066
- }) : Promise.reject(/* @__PURE__ */ Error("Popup blocked — allow popups for this site to sign in"));
3132
+ window.addEventListener("message", r);
3133
+ });
3134
+ if (l.mode === "cookies" && l.token && l.refreshToken) {
3135
+ let e = await fetch(`${t.replace(/\/+$/, "")}/widget/auth/install-cookies`, {
3136
+ method: "POST",
3137
+ credentials: "include",
3138
+ headers: {
3139
+ "content-type": "application/json",
3140
+ "x-markup-api-key": n
3141
+ },
3142
+ body: JSON.stringify({
3143
+ accessToken: l.token,
3144
+ refreshToken: l.refreshToken
3145
+ })
3146
+ });
3147
+ if (!e.ok) throw Error(`Failed to install widget cookies (${e.status})`);
3148
+ return {
3149
+ ...l,
3150
+ token: null,
3151
+ refreshToken: null
3152
+ };
3153
+ }
3154
+ return l;
3067
3155
  }
3068
3156
  //#endregion
3069
3157
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
3070
- function Xr(e, t) {
3158
+ function Qr(e, t) {
3071
3159
  if (e.match(/^[a-z]+:\/\//i)) return e;
3072
3160
  if (e.match(/^\/\//)) return window.location.protocol + e;
3073
3161
  if (e.match(/^[a-z]+:/i)) return e;
3074
3162
  let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
3075
3163
  return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
3076
3164
  }
3077
- var Zr = (() => {
3165
+ var $r = (() => {
3078
3166
  let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
3079
3167
  return () => (e += 1, `u${t()}${e}`);
3080
3168
  })();
3081
- function Qr(e) {
3169
+ function Y(e) {
3082
3170
  let t = [];
3083
3171
  for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
3084
3172
  return t;
3085
3173
  }
3086
- var $r = null;
3087
- function ei(e = {}) {
3088
- return $r || (e.includeStyleProperties ? ($r = e.includeStyleProperties, $r) : ($r = Qr(window.getComputedStyle(document.documentElement)), $r));
3174
+ var ei = null;
3175
+ function ti(e = {}) {
3176
+ return ei || (e.includeStyleProperties ? (ei = e.includeStyleProperties, ei) : (ei = Y(window.getComputedStyle(document.documentElement)), ei));
3089
3177
  }
3090
- function ti(e, t) {
3178
+ function ni(e, t) {
3091
3179
  let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
3092
3180
  return n ? parseFloat(n.replace("px", "")) : 0;
3093
3181
  }
3094
- function ni(e) {
3095
- let t = ti(e, "border-left-width"), n = ti(e, "border-right-width");
3182
+ function ri(e) {
3183
+ let t = ni(e, "border-left-width"), n = ni(e, "border-right-width");
3096
3184
  return e.clientWidth + t + n;
3097
3185
  }
3098
- function ri(e) {
3099
- let t = ti(e, "border-top-width"), n = ti(e, "border-bottom-width");
3186
+ function ii(e) {
3187
+ let t = ni(e, "border-top-width"), n = ni(e, "border-bottom-width");
3100
3188
  return e.clientHeight + t + n;
3101
3189
  }
3102
- function ii(e, t = {}) {
3190
+ function ai(e, t = {}) {
3103
3191
  return {
3104
- width: t.width || ni(e),
3105
- height: t.height || ri(e)
3192
+ width: t.width || ri(e),
3193
+ height: t.height || ii(e)
3106
3194
  };
3107
3195
  }
3108
- function ai() {
3196
+ function oi() {
3109
3197
  let e, t;
3110
3198
  try {
3111
3199
  t = process;
@@ -3113,11 +3201,11 @@ function ai() {
3113
3201
  let n = t && t.env ? t.env.devicePixelRatio : null;
3114
3202
  return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
3115
3203
  }
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));
3119
- }
3204
+ var X = 16384;
3120
3205
  function si(e) {
3206
+ (e.width > X || e.height > X) && (e.width > X && e.height > X ? e.width > e.height ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X) : e.width > X ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X));
3207
+ }
3208
+ function ci(e) {
3121
3209
  return new Promise((t, n) => {
3122
3210
  let r = new Image();
3123
3211
  r.onload = () => {
@@ -3127,80 +3215,80 @@ function si(e) {
3127
3215
  }, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
3128
3216
  });
3129
3217
  }
3130
- async function ci(e) {
3218
+ async function li(e) {
3131
3219
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
3132
3220
  }
3133
- async function li(e, t, n) {
3221
+ async function ui(e, t, n) {
3134
3222
  let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
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);
3223
+ 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), li(i);
3136
3224
  }
3137
- var X = (e, t) => {
3225
+ var Z = (e, t) => {
3138
3226
  if (e instanceof t) return !0;
3139
3227
  let n = Object.getPrototypeOf(e);
3140
- return n === null ? !1 : n.constructor.name === t.name || X(n, t);
3228
+ return n === null ? !1 : n.constructor.name === t.name || Z(n, t);
3141
3229
  };
3142
3230
  //#endregion
3143
3231
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
3144
- function ui(e) {
3232
+ function di(e) {
3145
3233
  let t = e.getPropertyValue("content");
3146
3234
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
3147
3235
  }
3148
- function di(e, t) {
3149
- return ei(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3236
+ function fi(e, t) {
3237
+ return ti(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3150
3238
  }
3151
- function fi(e, t, n, r) {
3152
- let i = `.${e}:${t}`, a = n.cssText ? ui(n) : di(n, r);
3239
+ function pi(e, t, n, r) {
3240
+ let i = `.${e}:${t}`, a = n.cssText ? di(n) : fi(n, r);
3153
3241
  return document.createTextNode(`${i}{${a}}`);
3154
3242
  }
3155
- function pi(e, t, n, r) {
3243
+ function mi(e, t, n, r) {
3156
3244
  let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
3157
3245
  if (a === "" || a === "none") return;
3158
- let o = Zr();
3246
+ let o = $r();
3159
3247
  try {
3160
3248
  t.className = `${t.className} ${o}`;
3161
3249
  } catch {
3162
3250
  return;
3163
3251
  }
3164
3252
  let s = document.createElement("style");
3165
- s.appendChild(fi(o, n, i, r)), t.appendChild(s);
3253
+ s.appendChild(pi(o, n, i, r)), t.appendChild(s);
3166
3254
  }
3167
- function mi(e, t, n) {
3168
- pi(e, t, ":before", n), pi(e, t, ":after", n);
3255
+ function hi(e, t, n) {
3256
+ mi(e, t, ":before", n), mi(e, t, ":after", n);
3169
3257
  }
3170
3258
  //#endregion
3171
3259
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
3172
- var hi = "application/font-woff", gi = "image/jpeg", _i = {
3173
- woff: hi,
3174
- woff2: hi,
3260
+ var gi = "application/font-woff", _i = "image/jpeg", vi = {
3261
+ woff: gi,
3262
+ woff2: gi,
3175
3263
  ttf: "application/font-truetype",
3176
3264
  eot: "application/vnd.ms-fontobject",
3177
3265
  png: "image/png",
3178
- jpg: gi,
3179
- jpeg: gi,
3266
+ jpg: _i,
3267
+ jpeg: _i,
3180
3268
  gif: "image/gif",
3181
3269
  tiff: "image/tiff",
3182
3270
  svg: "image/svg+xml",
3183
3271
  webp: "image/webp"
3184
3272
  };
3185
- function vi(e) {
3273
+ function yi(e) {
3186
3274
  let t = /\.([^./]*?)$/g.exec(e);
3187
3275
  return t ? t[1] : "";
3188
3276
  }
3189
- function yi(e) {
3190
- return _i[vi(e).toLowerCase()] || "";
3277
+ function bi(e) {
3278
+ return vi[yi(e).toLowerCase()] || "";
3191
3279
  }
3192
3280
  //#endregion
3193
3281
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
3194
- function bi(e) {
3282
+ function xi(e) {
3195
3283
  return e.split(/,/)[1];
3196
3284
  }
3197
- function xi(e) {
3285
+ function Si(e) {
3198
3286
  return e.search(/^(data:)/) !== -1;
3199
3287
  }
3200
- function Si(e, t) {
3288
+ function Ci(e, t) {
3201
3289
  return `data:${t};base64,${e}`;
3202
3290
  }
3203
- async function Ci(e, t, n) {
3291
+ async function wi(e, t, n) {
3204
3292
  let r = await fetch(e, t);
3205
3293
  if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
3206
3294
  let i = await r.blob();
@@ -3218,78 +3306,78 @@ async function Ci(e, t, n) {
3218
3306
  }, a.readAsDataURL(i);
3219
3307
  });
3220
3308
  }
3221
- var wi = {};
3222
- function Ti(e, t, n) {
3309
+ var Ti = {};
3310
+ function Ei(e, t, n) {
3223
3311
  let r = e.replace(/\?.*/, "");
3224
3312
  return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
3225
3313
  }
3226
- async function Ei(e, t, n) {
3227
- let r = Ti(e, t, n.includeQueryParams);
3228
- if (wi[r] != null) return wi[r];
3314
+ async function Di(e, t, n) {
3315
+ let r = Ei(e, t, n.includeQueryParams);
3316
+ if (Ti[r] != null) return Ti[r];
3229
3317
  n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
3230
3318
  let i;
3231
3319
  try {
3232
- i = Si(await Ci(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", bi(n))), t);
3320
+ i = Ci(await wi(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", xi(n))), t);
3233
3321
  } catch (t) {
3234
3322
  i = n.imagePlaceholder || "";
3235
3323
  let r = `Failed to fetch resource: ${e}`;
3236
3324
  t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
3237
3325
  }
3238
- return wi[r] = i, i;
3326
+ return Ti[r] = i, i;
3239
3327
  }
3240
3328
  //#endregion
3241
3329
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
3242
- async function Di(e) {
3330
+ async function Oi(e) {
3243
3331
  let t = e.toDataURL();
3244
- return t === "data:," ? e.cloneNode(!1) : si(t);
3332
+ return t === "data:," ? e.cloneNode(!1) : ci(t);
3245
3333
  }
3246
- async function Oi(e, t) {
3334
+ async function ki(e, t) {
3247
3335
  if (e.currentSrc) {
3248
3336
  let t = document.createElement("canvas"), n = t.getContext("2d");
3249
- return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), si(t.toDataURL());
3337
+ return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), ci(t.toDataURL());
3250
3338
  }
3251
3339
  let n = e.poster;
3252
- return si(await Ei(n, yi(n), t));
3340
+ return ci(await Di(n, bi(n), t));
3253
3341
  }
3254
- async function ki(e, t) {
3342
+ async function Ai(e, t) {
3255
3343
  try {
3256
- if (e?.contentDocument?.body) return await zi(e.contentDocument.body, t, !0);
3344
+ if (e?.contentDocument?.body) return await Bi(e.contentDocument.body, t, !0);
3257
3345
  } catch {}
3258
3346
  return e.cloneNode(!1);
3259
3347
  }
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));
3348
+ async function ji(e, t) {
3349
+ return Z(e, HTMLCanvasElement) ? Oi(e) : Z(e, HTMLVideoElement) ? ki(e, t) : Z(e, HTMLIFrameElement) ? Ai(e, t) : e.cloneNode(Ni(e));
3262
3350
  }
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;
3351
+ var Mi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Ni = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
3352
+ async function Pi(e, t, n) {
3353
+ if (Ni(t)) return t;
3266
3354
  let 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) => {
3355
+ return r = Mi(e) && e.assignedNodes ? Y(e.assignedNodes()) : Z(e, HTMLIFrameElement) && e.contentDocument?.body ? Y(e.contentDocument.body.childNodes) : Y((e.shadowRoot ?? e).childNodes), r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Bi(r, n)).then((e) => {
3268
3356
  e && t.appendChild(e);
3269
3357
  }), Promise.resolve()), t;
3270
3358
  }
3271
- function Pi(e, t, n) {
3359
+ function Fi(e, t, n) {
3272
3360
  let r = t.style;
3273
3361
  if (!r) return;
3274
3362
  let i = window.getComputedStyle(e);
3275
- i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : ei(n).forEach((n) => {
3363
+ i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : ti(n).forEach((n) => {
3276
3364
  let a = i.getPropertyValue(n);
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));
3365
+ n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), Z(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
3278
3366
  });
3279
3367
  }
3280
- function Fi(e, t) {
3281
- X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
3282
- }
3283
3368
  function Ii(e, t) {
3284
- if (X(e, HTMLSelectElement)) {
3369
+ Z(e, HTMLTextAreaElement) && (t.innerHTML = e.value), Z(e, HTMLInputElement) && t.setAttribute("value", e.value);
3370
+ }
3371
+ function Li(e, t) {
3372
+ if (Z(e, HTMLSelectElement)) {
3285
3373
  let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
3286
3374
  r && r.setAttribute("selected", "");
3287
3375
  }
3288
3376
  }
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;
3377
+ function Ri(e, t, n) {
3378
+ return Z(t, Element) && (Fi(e, t, n), hi(e, t, n), Ii(e, t), Li(e, t)), t;
3291
3379
  }
3292
- async function Ri(e, t) {
3380
+ async function zi(e, t) {
3293
3381
  let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
3294
3382
  if (n.length === 0) return e;
3295
3383
  let r = {};
@@ -3297,7 +3385,7 @@ async function Ri(e, t) {
3297
3385
  let a = n[i].getAttribute("xlink:href");
3298
3386
  if (a) {
3299
3387
  let n = e.querySelector(a), i = document.querySelector(a);
3300
- !n && i && !r[a] && (r[a] = await zi(i, t, !0));
3388
+ !n && i && !r[a] && (r[a] = await Bi(i, t, !0));
3301
3389
  }
3302
3390
  }
3303
3391
  let i = Object.values(r);
@@ -3311,61 +3399,61 @@ async function Ri(e, t) {
3311
3399
  }
3312
3400
  return e;
3313
3401
  }
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));
3402
+ async function Bi(e, t, n) {
3403
+ return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => ji(e, t)).then((n) => Pi(e, n, t)).then((n) => Ri(e, n, t)).then((e) => zi(e, t));
3316
3404
  }
3317
3405
  //#endregion
3318
3406
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
3319
- var Bi = /url\((['"]?)([^'"]+?)\1\)/g, Vi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Hi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3320
- function Ui(e) {
3407
+ var Vi = /url\((['"]?)([^'"]+?)\1\)/g, Hi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Ui = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3408
+ function Wi(e) {
3321
3409
  let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
3322
3410
  return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
3323
3411
  }
3324
- function Wi(e) {
3412
+ function Gi(e) {
3325
3413
  let t = [];
3326
- return e.replace(Bi, (e, n, r) => (t.push(r), e)), t.filter((e) => !xi(e));
3414
+ return e.replace(Vi, (e, n, r) => (t.push(r), e)), t.filter((e) => !Si(e));
3327
3415
  }
3328
- async function Gi(e, t, n, r, i) {
3416
+ async function Ki(e, t, n, r, i) {
3329
3417
  try {
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`);
3418
+ let a = n ? Qr(t, n) : t, o = bi(t), s;
3419
+ return s = i ? Ci(await i(a), o) : await Di(a, o, r), e.replace(Wi(t), `$1${s}$3`);
3332
3420
  } catch {}
3333
3421
  return e;
3334
3422
  }
3335
- function Ki(e, { preferredFontFormat: t }) {
3336
- return t ? e.replace(Hi, (e) => {
3423
+ function qi(e, { preferredFontFormat: t }) {
3424
+ return t ? e.replace(Ui, (e) => {
3337
3425
  for (;;) {
3338
- let [n, , r] = Vi.exec(e) || [];
3426
+ let [n, , r] = Hi.exec(e) || [];
3339
3427
  if (!r) return "";
3340
3428
  if (r === t) return `src: ${n};`;
3341
3429
  }
3342
3430
  }) : e;
3343
3431
  }
3344
- function qi(e) {
3345
- return e.search(Bi) !== -1;
3432
+ function Ji(e) {
3433
+ return e.search(Vi) !== -1;
3346
3434
  }
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));
3435
+ async function Yi(e, t, n) {
3436
+ if (!Ji(e)) return e;
3437
+ let r = qi(e, n);
3438
+ return Gi(r).reduce((e, r) => e.then((e) => Ki(e, r, t, n)), Promise.resolve(r));
3351
3439
  }
3352
3440
  //#endregion
3353
3441
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
3354
- async function Yi(e, t, n) {
3442
+ async function Xi(e, t, n) {
3355
3443
  let r = t.style?.getPropertyValue(e);
3356
3444
  if (r) {
3357
- let i = await Ji(r, null, n);
3445
+ let i = await Yi(r, null, n);
3358
3446
  return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
3359
3447
  }
3360
3448
  return !1;
3361
3449
  }
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);
3364
- }
3365
3450
  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);
3451
+ await Xi("background", e, t) || await Xi("background-image", e, t), await Xi("mask", e, t) || await Xi("-webkit-mask", e, t) || await Xi("mask-image", e, t) || await Xi("-webkit-mask-image", e, t);
3452
+ }
3453
+ async function Qi(e, t) {
3454
+ let n = Z(e, HTMLImageElement);
3455
+ if (!(n && !Si(e.src)) && !(Z(e, SVGImageElement) && !Si(e.href.baseVal))) return;
3456
+ let r = n ? e.src : e.href.baseVal, i = await Di(r, bi(r), t);
3369
3457
  await new Promise((r, a) => {
3370
3458
  e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
3371
3459
  try {
@@ -3378,16 +3466,16 @@ async function Zi(e, t) {
3378
3466
  o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
3379
3467
  });
3380
3468
  }
3381
- async function Qi(e, t) {
3382
- let n = Qr(e.childNodes).map((e) => $i(e, t));
3469
+ async function $i(e, t) {
3470
+ let n = Y(e.childNodes).map((e) => ea(e, t));
3383
3471
  await Promise.all(n).then(() => e);
3384
3472
  }
3385
- async function $i(e, t) {
3386
- X(e, Element) && (await Xi(e, t), await Zi(e, t), await Qi(e, t));
3473
+ async function ea(e, t) {
3474
+ Z(e, Element) && (await Zi(e, t), await Qi(e, t), await $i(e, t));
3387
3475
  }
3388
3476
  //#endregion
3389
3477
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
3390
- function ea(e, t) {
3478
+ function ta(e, t) {
3391
3479
  let { style: n } = e;
3392
3480
  t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
3393
3481
  let r = t.style;
@@ -3397,22 +3485,22 @@ function ea(e, t) {
3397
3485
  }
3398
3486
  //#endregion
3399
3487
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
3400
- var ta = {};
3401
- async function na(e) {
3402
- let t = ta[e];
3488
+ var na = {};
3489
+ async function ra(e) {
3490
+ let t = na[e];
3403
3491
  return t ?? (t = {
3404
3492
  url: e,
3405
3493
  cssText: await (await fetch(e)).text()
3406
- }, ta[e] = t, t);
3494
+ }, na[e] = t, t);
3407
3495
  }
3408
- async function ra(e, t) {
3496
+ async function ia(e, t) {
3409
3497
  let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
3410
3498
  let a = i.replace(r, "$1");
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]));
3499
+ return a.startsWith("https://") || (a = new URL(a, e.url).href), wi(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3412
3500
  });
3413
3501
  return Promise.all(i).then(() => n);
3414
3502
  }
3415
- function ia(e) {
3503
+ function aa(e) {
3416
3504
  if (e == null) return [];
3417
3505
  let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
3418
3506
  for (;;) {
@@ -3432,13 +3520,13 @@ function ia(e) {
3432
3520
  }
3433
3521
  return t;
3434
3522
  }
3435
- async function aa(e, t) {
3523
+ async function oa(e, t) {
3436
3524
  let n = [], r = [];
3437
3525
  return e.forEach((n) => {
3438
3526
  if ("cssRules" in n) try {
3439
- Qr(n.cssRules || []).forEach((e, i) => {
3527
+ Y(n.cssRules || []).forEach((e, i) => {
3440
3528
  if (e.type === CSSRule.IMPORT_RULE) {
3441
- let a = i + 1, o = e.href, s = na(o).then((e) => ra(e, t)).then((e) => ia(e).forEach((e) => {
3529
+ let a = i + 1, o = e.href, s = ra(o).then((e) => ia(e, t)).then((e) => aa(e).forEach((e) => {
3442
3530
  try {
3443
3531
  n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
3444
3532
  } catch (t) {
@@ -3455,7 +3543,7 @@ async function aa(e, t) {
3455
3543
  });
3456
3544
  } catch (i) {
3457
3545
  let a = e.find((e) => e.href == null) || document.styleSheets[0];
3458
- n.href != null && r.push(na(n.href).then((e) => ra(e, t)).then((e) => ia(e).forEach((e) => {
3546
+ n.href != null && r.push(ra(n.href).then((e) => ia(e, t)).then((e) => aa(e).forEach((e) => {
3459
3547
  a.insertRule(e, a.cssRules.length);
3460
3548
  })).catch((e) => {
3461
3549
  console.error("Error loading remote stylesheet", e);
@@ -3463,7 +3551,7 @@ async function aa(e, t) {
3463
3551
  }
3464
3552
  }), Promise.all(r).then(() => (e.forEach((e) => {
3465
3553
  if ("cssRules" in e) try {
3466
- Qr(e.cssRules || []).forEach((e) => {
3554
+ Y(e.cssRules || []).forEach((e) => {
3467
3555
  n.push(e);
3468
3556
  });
3469
3557
  } catch (t) {
@@ -3471,36 +3559,36 @@ async function aa(e, t) {
3471
3559
  }
3472
3560
  }), n));
3473
3561
  }
3474
- function oa(e) {
3475
- return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => qi(e.style.getPropertyValue("src")));
3562
+ function sa(e) {
3563
+ return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Ji(e.style.getPropertyValue("src")));
3476
3564
  }
3477
- async function sa(e, t) {
3565
+ async function ca(e, t) {
3478
3566
  if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
3479
- return oa(await aa(Qr(e.ownerDocument.styleSheets), t));
3567
+ return sa(await oa(Y(e.ownerDocument.styleSheets), t));
3480
3568
  }
3481
- function ca(e) {
3569
+ function la(e) {
3482
3570
  return e.trim().replace(/["']/g, "");
3483
3571
  }
3484
- function la(e) {
3572
+ function ua(e) {
3485
3573
  let t = /* @__PURE__ */ new Set();
3486
3574
  function n(e) {
3487
3575
  (e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
3488
- t.add(ca(e));
3576
+ t.add(la(e));
3489
3577
  }), Array.from(e.children).forEach((e) => {
3490
3578
  e instanceof HTMLElement && n(e);
3491
3579
  });
3492
3580
  }
3493
3581
  return n(e), t;
3494
3582
  }
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) => {
3583
+ async function da(e, t) {
3584
+ let n = await ca(e, t), r = ua(e);
3585
+ return (await Promise.all(n.filter((e) => r.has(la(e.style.fontFamily))).map((e) => {
3498
3586
  let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
3499
- return Ji(e.cssText, n, t);
3587
+ return Yi(e.cssText, n, t);
3500
3588
  }))).join("\n");
3501
3589
  }
3502
- async function da(e, t) {
3503
- let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await ua(e, t) : t.fontEmbedCSS;
3590
+ async function fa(e, t) {
3591
+ let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await da(e, t) : t.fontEmbedCSS;
3504
3592
  if (n) {
3505
3593
  let t = document.createElement("style"), r = document.createTextNode(n);
3506
3594
  t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
@@ -3508,18 +3596,18 @@ async function da(e, t) {
3508
3596
  }
3509
3597
  //#endregion
3510
3598
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
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);
3514
- }
3515
3599
  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;
3600
+ let { width: n, height: r } = ai(e, t), i = await Bi(e, t, !0);
3601
+ return await fa(i, t), await ea(i, t), ta(i, t), await ui(i, n, r);
3602
+ }
3603
+ async function ma(e, t = {}) {
3604
+ let { width: n, height: r } = ai(e, t), i = await ci(await pa(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || oi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3605
+ return a.width = c * s, a.height = l * s, t.skipAutoScale || si(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;
3518
3606
  }
3519
3607
  //#endregion
3520
3608
  //#region src/runtime/screenshot.ts
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) {
3609
+ var ha = 2 * 1024 * 1024, ga = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", _a = "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\"]";
3610
+ function va(e) {
3523
3611
  let t = e.parentElement;
3524
3612
  for (; t;) {
3525
3613
  if (t.hasAttribute("data-markup-safe")) return !0;
@@ -3527,35 +3615,35 @@ function _a(e) {
3527
3615
  }
3528
3616
  return !1;
3529
3617
  }
3530
- function va(e) {
3618
+ function ya(e) {
3531
3619
  let t = /* @__PURE__ */ new Set(), n = [];
3532
3620
  function r(e) {
3533
3621
  t.has(e) || (t.add(e), n.push(e));
3534
3622
  }
3535
3623
  for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
3536
- for (let e of document.querySelectorAll(ga)) _a(e) || r(e);
3624
+ for (let e of document.querySelectorAll(_a)) va(e) || r(e);
3537
3625
  if (e.redactSelector) try {
3538
- for (let t of document.querySelectorAll(e.redactSelector)) _a(t) || r(t);
3626
+ for (let t of document.querySelectorAll(e.redactSelector)) va(t) || r(t);
3539
3627
  } catch {}
3540
- if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) _a(e) || r(e);
3628
+ if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) va(e) || r(e);
3541
3629
  return n;
3542
3630
  }
3543
- function ya(e) {
3631
+ function ba(e) {
3544
3632
  let t = e.getAttribute("style");
3545
- return e.setAttribute("style", t ? `${t};${ha}` : ha), () => {
3633
+ return e.setAttribute("style", t ? `${t};${ga}` : ga), () => {
3546
3634
  t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
3547
3635
  };
3548
3636
  }
3549
- function ba(e) {
3637
+ function xa(e) {
3550
3638
  if (e.id) return `#${CSS.escape(e.id)}`;
3551
3639
  let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
3552
3640
  return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
3553
3641
  }
3554
- async function xa(e, t, n) {
3642
+ async function Sa(e, t, n) {
3555
3643
  try {
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;
3644
+ let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? ya(n) : [], s = o.map(xa), c = o.map(ba), l;
3557
3645
  try {
3558
- l = await pa(document.documentElement, {
3646
+ l = await ma(document.documentElement, {
3559
3647
  width: r,
3560
3648
  height: i,
3561
3649
  cacheBust: !0,
@@ -3574,17 +3662,17 @@ async function xa(e, t, n) {
3574
3662
  }
3575
3663
  if (t) {
3576
3664
  let e = l.getContext("2d");
3577
- e && Ca(e, t.x, t.y, a);
3665
+ e && wa(e, t.x, t.y, a);
3578
3666
  }
3579
- let u = await Sa(l, .85);
3667
+ let u = await Ca(l, .85);
3580
3668
  if (!u) return null;
3581
- if (u.size <= ma) return {
3669
+ if (u.size <= ha) return {
3582
3670
  blob: u,
3583
3671
  redactedCount: s.length,
3584
3672
  redactedSelectors: s
3585
3673
  };
3586
- let d = await Sa(l, .5);
3587
- return !d || d.size > ma ? null : {
3674
+ let d = await Ca(l, .5);
3675
+ return !d || d.size > ha ? null : {
3588
3676
  blob: d,
3589
3677
  redactedCount: s.length,
3590
3678
  redactedSelectors: s
@@ -3593,10 +3681,10 @@ async function xa(e, t, n) {
3593
3681
  return null;
3594
3682
  }
3595
3683
  }
3596
- function Sa(e, t) {
3684
+ function Ca(e, t) {
3597
3685
  return new Promise((n) => e.toBlob(n, "image/jpeg", t));
3598
3686
  }
3599
- function Ca(e, t, n, r) {
3687
+ function wa(e, t, n, r) {
3600
3688
  let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
3601
3689
  e.save();
3602
3690
  let l = 2 * i;
@@ -3614,7 +3702,7 @@ function Ca(e, t, n, r) {
3614
3702
  }
3615
3703
  //#endregion
3616
3704
  //#region src/runtime/use-subscription-token.ts
3617
- var wa = ar({
3705
+ var Ta = ar({
3618
3706
  idle: { issued: (e, t) => ({
3619
3707
  kind: "active",
3620
3708
  token: t.token,
@@ -3625,10 +3713,10 @@ var wa = ar({
3625
3713
  token: t.token,
3626
3714
  expiresAt: t.expiresAt
3627
3715
  }) }
3628
- }), Ta = 30 * 6e4, Ea = 6e4, Da = 6e4;
3629
- function Oa(e) {
3630
- let [t, n] = or(wa, { kind: "idle" });
3631
- return z(() => {
3716
+ }), Ea = 30 * 6e4, Da = 6e4, Oa = 6e4;
3717
+ function ka(e) {
3718
+ let [t, n] = or(Ta, { kind: "idle" });
3719
+ return R(() => {
3632
3720
  let t = !1, r = null;
3633
3721
  async function i() {
3634
3722
  try {
@@ -3639,11 +3727,11 @@ function Oa(e) {
3639
3727
  token: a.token,
3640
3728
  expiresAt: a.expiresAt
3641
3729
  });
3642
- let o = Math.max(Ea, a.expiresAt - Date.now() - Ta);
3730
+ let o = Math.max(Da, a.expiresAt - Date.now() - Ea);
3643
3731
  r = setTimeout(i, o);
3644
3732
  } catch {
3645
3733
  if (t) return;
3646
- r = setTimeout(i, Da);
3734
+ r = setTimeout(i, Oa);
3647
3735
  }
3648
3736
  }
3649
3737
  return i(), () => {
@@ -3652,18 +3740,104 @@ function Oa(e) {
3652
3740
  }, [e, n]), t.kind === "active" ? t.token : null;
3653
3741
  }
3654
3742
  //#endregion
3743
+ //#region src/runtime/refresh-token.ts
3744
+ async function Aa(e) {
3745
+ try {
3746
+ let t = {
3747
+ method: "POST",
3748
+ headers: {
3749
+ "content-type": "application/json",
3750
+ "x-markup-api-key": e.apiKey
3751
+ },
3752
+ signal: e.signal
3753
+ };
3754
+ if (e.mode === "cookies") t.credentials = "include", t.body = "{}";
3755
+ else {
3756
+ if (!e.refreshToken) return null;
3757
+ t.body = JSON.stringify({ refreshToken: e.refreshToken });
3758
+ }
3759
+ let n = await fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/refresh`, t);
3760
+ if (!n.ok) return null;
3761
+ let r = await n.json();
3762
+ return r.mode === "cookies" ? typeof r.accessTokenExpiresAt != "number" || typeof r.refreshTokenExpiresAt != "number" ? null : {
3763
+ mode: "cookies",
3764
+ accessTokenExpiresAt: r.accessTokenExpiresAt,
3765
+ refreshTokenExpiresAt: r.refreshTokenExpiresAt
3766
+ } : typeof r.accessToken != "string" || typeof r.accessTokenExpiresAt != "number" || typeof r.refreshToken != "string" || typeof r.refreshTokenExpiresAt != "number" ? null : {
3767
+ mode: "localStorage",
3768
+ accessToken: r.accessToken,
3769
+ accessTokenExpiresAt: r.accessTokenExpiresAt,
3770
+ refreshToken: r.refreshToken,
3771
+ refreshTokenExpiresAt: r.refreshTokenExpiresAt
3772
+ };
3773
+ } catch {
3774
+ return null;
3775
+ }
3776
+ }
3777
+ //#endregion
3778
+ //#region src/runtime/use-token-refresh.ts
3779
+ var ja = 6e4, Ma = 500;
3780
+ function Na(e, t, n, r, i) {
3781
+ let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
3782
+ R(() => {
3783
+ if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
3784
+ let u = Date.now();
3785
+ if (c <= u) {
3786
+ i();
3787
+ return;
3788
+ }
3789
+ let d = Math.max(Ma, l - ja - u), f = new AbortController(), p = window.setTimeout(async () => {
3790
+ let a = await Aa({
3791
+ apiUrl: t,
3792
+ apiKey: n,
3793
+ mode: o,
3794
+ refreshToken: s,
3795
+ signal: f.signal
3796
+ });
3797
+ if (!f.signal.aborted) {
3798
+ if (!a) {
3799
+ i();
3800
+ return;
3801
+ }
3802
+ e.kind === "verified" && (a.mode === "cookies" ? r({
3803
+ ...e.identity,
3804
+ tokenExpiresAt: a.accessTokenExpiresAt,
3805
+ refreshTokenExpiresAt: a.refreshTokenExpiresAt
3806
+ }) : r({
3807
+ ...e.identity,
3808
+ token: a.accessToken,
3809
+ tokenExpiresAt: a.accessTokenExpiresAt,
3810
+ refreshToken: a.refreshToken,
3811
+ refreshTokenExpiresAt: a.refreshTokenExpiresAt
3812
+ }));
3813
+ }
3814
+ }, d);
3815
+ return () => {
3816
+ window.clearTimeout(p), f.abort();
3817
+ };
3818
+ }, [
3819
+ a,
3820
+ o,
3821
+ s,
3822
+ c,
3823
+ l,
3824
+ t,
3825
+ n
3826
+ ]);
3827
+ }
3828
+ //#endregion
3655
3829
  //#region src/runtime/utils.ts
3656
- function Z(...e) {
3830
+ function Q(...e) {
3657
3831
  return e.filter(Boolean).join(" ");
3658
3832
  }
3659
3833
  //#endregion
3660
3834
  //#region src/runtime/use-drag.ts
3661
- function ka(e) {
3662
- let t = B(e);
3835
+ function Pa(e) {
3836
+ let t = z(e);
3663
3837
  t.current = e;
3664
- let [n, r] = R(!1), i = B(!1);
3838
+ let [n, r] = L(!1), i = z(!1);
3665
3839
  return {
3666
- onPointerDown: V((e) => {
3840
+ onPointerDown: B((e) => {
3667
3841
  let n = t.current;
3668
3842
  if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
3669
3843
  let a = e.currentTarget;
@@ -3687,8 +3861,8 @@ function ka(e) {
3687
3861
  g = !0, i.current = !0, r(!0), t.current.onStart?.();
3688
3862
  }
3689
3863
  let o = Math.max(m, window.innerWidth - d - m), v = Math.max(m, window.innerHeight - f - m), y = {
3690
- left: Aa(l + n, m, o),
3691
- top: Aa(u + a, m, v)
3864
+ left: Fa(l + n, m, o),
3865
+ top: Fa(u + a, m, v)
3692
3866
  };
3693
3867
  _ = y, t.current.onMove(y);
3694
3868
  }
@@ -3701,17 +3875,17 @@ function ka(e) {
3701
3875
  a.addEventListener("pointermove", y), a.addEventListener("pointerup", b), a.addEventListener("pointercancel", x);
3702
3876
  }, []),
3703
3877
  isDragging: n,
3704
- consumeClickIfDragged: V(() => i.current ? (i.current = !1, !0) : !1, [])
3878
+ consumeClickIfDragged: B(() => i.current ? (i.current = !1, !0) : !1, [])
3705
3879
  };
3706
3880
  }
3707
- function Aa(e, t, n) {
3881
+ function Fa(e, t, n) {
3708
3882
  return Math.max(t, Math.min(n, e));
3709
3883
  }
3710
3884
  //#endregion
3711
3885
  //#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
3712
- var ja = 0;
3886
+ var Ia = 0;
3713
3887
  Array.isArray;
3714
- function Q(e, n, r, i, a, o) {
3888
+ function $(e, n, r, i, a, o) {
3715
3889
  n ||= {};
3716
3890
  var s, c, l = n;
3717
3891
  if ("ref" in l) for (c in l = {}, n) c == "ref" ? s = n[c] : l[c] = n[c];
@@ -3726,7 +3900,7 @@ function Q(e, n, r, i, a, o) {
3726
3900
  __e: null,
3727
3901
  __c: null,
3728
3902
  constructor: void 0,
3729
- __v: --ja,
3903
+ __v: --Ia,
3730
3904
  __i: -1,
3731
3905
  __u: 0,
3732
3906
  __source: a,
@@ -3737,84 +3911,84 @@ function Q(e, n, r, i, a, o) {
3737
3911
  }
3738
3912
  //#endregion
3739
3913
  //#region src/runtime/ui/icons.tsx
3740
- function Ma({ size: e = 16 }) {
3741
- return /* @__PURE__ */ Q("svg", {
3914
+ function La({ size: e = 16 }) {
3915
+ return /* @__PURE__ */ $("svg", {
3742
3916
  width: e,
3743
3917
  height: e,
3744
3918
  viewBox: "0 0 126 126",
3745
3919
  fill: "currentColor",
3746
3920
  "aria-hidden": !0,
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" })
3921
+ children: /* @__PURE__ */ $("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
3748
3922
  });
3749
3923
  }
3750
- function Na({ size: e = 16 }) {
3751
- return /* @__PURE__ */ Q("svg", {
3924
+ function Ra({ size: e = 16 }) {
3925
+ return /* @__PURE__ */ $("svg", {
3752
3926
  width: e,
3753
3927
  height: e,
3754
3928
  viewBox: "0 0 20 20",
3755
3929
  fill: "currentColor",
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" })
3930
+ children: /* @__PURE__ */ $("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
3757
3931
  });
3758
3932
  }
3759
- function Pa({ size: e = 16 }) {
3760
- return /* @__PURE__ */ Q("svg", {
3933
+ function za({ size: e = 16 }) {
3934
+ return /* @__PURE__ */ $("svg", {
3761
3935
  width: e,
3762
3936
  height: e,
3763
3937
  viewBox: "0 0 20 20",
3764
3938
  fill: "currentColor",
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" })
3939
+ children: /* @__PURE__ */ $("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
3766
3940
  });
3767
3941
  }
3768
- function Fa({ size: e = 16 }) {
3769
- return /* @__PURE__ */ Q("svg", {
3942
+ function Ba({ size: e = 16 }) {
3943
+ return /* @__PURE__ */ $("svg", {
3770
3944
  width: e,
3771
3945
  height: e,
3772
3946
  viewBox: "0 0 16 16",
3773
3947
  fill: "currentColor",
3774
- children: /* @__PURE__ */ Q("path", {
3948
+ children: /* @__PURE__ */ $("path", {
3775
3949
  fillRule: "evenodd",
3776
3950
  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",
3777
3951
  clipRule: "evenodd"
3778
3952
  })
3779
3953
  });
3780
3954
  }
3781
- function Ia({ size: e = 16 }) {
3782
- return /* @__PURE__ */ Q("svg", {
3955
+ function Va({ size: e = 16 }) {
3956
+ return /* @__PURE__ */ $("svg", {
3783
3957
  width: e,
3784
3958
  height: e,
3785
3959
  viewBox: "0 0 20 20",
3786
3960
  fill: "currentColor",
3787
3961
  "aria-hidden": !0,
3788
- children: /* @__PURE__ */ Q("path", {
3962
+ children: /* @__PURE__ */ $("path", {
3789
3963
  "fill-rule": "evenodd",
3790
3964
  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",
3791
3965
  "clip-rule": "evenodd"
3792
3966
  })
3793
3967
  });
3794
3968
  }
3795
- function La({ size: e = 16 }) {
3796
- return /* @__PURE__ */ Q("svg", {
3969
+ function Ha({ size: e = 16 }) {
3970
+ return /* @__PURE__ */ $("svg", {
3797
3971
  width: e,
3798
3972
  height: e,
3799
3973
  viewBox: "0 0 16 16",
3800
3974
  fill: "currentColor",
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" })
3975
+ children: /* @__PURE__ */ $("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
3802
3976
  });
3803
3977
  }
3804
- function Ra({ size: e = 16 }) {
3805
- return /* @__PURE__ */ Q("svg", {
3978
+ function Ua({ size: e = 16 }) {
3979
+ return /* @__PURE__ */ $("svg", {
3806
3980
  width: e,
3807
3981
  height: e,
3808
3982
  viewBox: "0 0 256 256",
3809
3983
  fill: "currentColor",
3810
3984
  "aria-hidden": !0,
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" })
3985
+ children: /* @__PURE__ */ $("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" })
3812
3986
  });
3813
3987
  }
3814
3988
  //#endregion
3815
3989
  //#region src/runtime/ui/fab.tsx
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({
3990
+ function Wa({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i, variant: a = "default" }) {
3991
+ let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : r === "bottom-center" ? "markup-fab-center" : "markup-fab-right", [c, l] = L(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } = Pa({
3818
3992
  preventDefault: !0,
3819
3993
  stopPropagation: !0,
3820
3994
  onMove: l,
@@ -3833,9 +4007,9 @@ function za({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
3833
4007
  t();
3834
4008
  }
3835
4009
  }
3836
- return /* @__PURE__ */ Q("button", {
4010
+ return /* @__PURE__ */ $("button", {
3837
4011
  type: "button",
3838
- class: Z("markup-fab", !c && s, c && "is-floating", d && "is-dragging", e && "is-active", o && "is-icon-only"),
4012
+ class: Q("markup-fab", !c && s, c && "is-floating", d && "is-dragging", e && "is-active", o && "is-icon-only"),
3839
4013
  style: c ? {
3840
4014
  left: `${c.left}px`,
3841
4015
  top: `${c.top}px`
@@ -3844,10 +4018,10 @@ function za({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
3844
4018
  onPointerDown: u,
3845
4019
  "aria-label": e ? "Cancel placing markup" : "Leave a markup",
3846
4020
  "aria-pressed": e,
3847
- children: [/* @__PURE__ */ Q("span", {
4021
+ children: [/* @__PURE__ */ $("span", {
3848
4022
  class: "markup-fab-icon",
3849
- children: Q(e ? Na : Ma, { size: 16 })
3850
- }), o ? null : /* @__PURE__ */ Q("span", {
4023
+ children: $(e ? Ra : La, { size: 16 })
4024
+ }), o ? null : /* @__PURE__ */ $("span", {
3851
4025
  class: "markup-fab-label",
3852
4026
  children: e ? "Cancel" : "Markup"
3853
4027
  })]
@@ -3855,7 +4029,7 @@ function za({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
3855
4029
  }
3856
4030
  //#endregion
3857
4031
  //#region src/runtime/use-focus-trap.ts
3858
- var Ba = [
4032
+ var Ga = [
3859
4033
  "a[href]",
3860
4034
  "button:not([disabled])",
3861
4035
  "input:not([disabled])",
@@ -3863,14 +4037,14 @@ var Ba = [
3863
4037
  "textarea:not([disabled])",
3864
4038
  "[tabindex]:not([tabindex=\"-1\"])"
3865
4039
  ].join(",");
3866
- function Va(e, t) {
3867
- z(() => {
4040
+ function Ka(e, t) {
4041
+ R(() => {
3868
4042
  if (!t) return;
3869
4043
  let n = e.current;
3870
4044
  if (!n) return;
3871
4045
  function r(e) {
3872
4046
  if (e.key !== "Tab") return;
3873
- let t = Array.from(n.querySelectorAll(Ba)), r = t[0], i = t[t.length - 1];
4047
+ let t = Array.from(n.querySelectorAll(Ga)), r = t[0], i = t[t.length - 1];
3874
4048
  if (!r || !i) return;
3875
4049
  let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
3876
4050
  (e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
@@ -3880,9 +4054,9 @@ function Va(e, t) {
3880
4054
  }
3881
4055
  //#endregion
3882
4056
  //#region src/runtime/use-object-url.ts
3883
- function Ha(e) {
3884
- let [t, n] = R(null);
3885
- return z(() => {
4057
+ function qa(e) {
4058
+ let [t, n] = L(null);
4059
+ return R(() => {
3886
4060
  if (!e) {
3887
4061
  n(null);
3888
4062
  return;
@@ -3893,9 +4067,9 @@ function Ha(e) {
3893
4067
  }
3894
4068
  //#endregion
3895
4069
  //#region src/runtime/ui/author-prompt.tsx
3896
- function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
3897
- let [o, s] = R(""), [c, l] = R(""), u = B(null);
3898
- z(() => {
4070
+ function Ja({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4071
+ let [o, s] = L(""), [c, l] = L(""), u = z(null);
4072
+ R(() => {
3899
4073
  u.current?.focus();
3900
4074
  }, []);
3901
4075
  function d(n) {
@@ -3904,24 +4078,24 @@ function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
3904
4078
  !i || e || t || r(i, c.trim() || void 0);
3905
4079
  }
3906
4080
  let f = e || t;
3907
- return /* @__PURE__ */ Q("form", {
4081
+ return /* @__PURE__ */ $("form", {
3908
4082
  class: "markup-author-prompt",
3909
4083
  onSubmit: d,
3910
4084
  children: [
3911
- a ? /* @__PURE__ */ Q(S, { children: [/* @__PURE__ */ Q("button", {
4085
+ a ? /* @__PURE__ */ $(S, { children: [/* @__PURE__ */ $("button", {
3912
4086
  type: "button",
3913
4087
  class: "markup-btn markup-btn-primary",
3914
4088
  onClick: a,
3915
4089
  disabled: e || n,
3916
4090
  children: n ? "Signing in…" : "Sign in with Markup"
3917
- }), /* @__PURE__ */ Q("p", {
4091
+ }), /* @__PURE__ */ $("p", {
3918
4092
  class: "markup-author-divider",
3919
4093
  children: "or continue as a guest"
3920
- })] }) : /* @__PURE__ */ Q("p", {
4094
+ })] }) : /* @__PURE__ */ $("p", {
3921
4095
  class: "markup-eyebrow",
3922
4096
  children: "who's leaving feedback?"
3923
4097
  }),
3924
- /* @__PURE__ */ Q("input", {
4098
+ /* @__PURE__ */ $("input", {
3925
4099
  ref: u,
3926
4100
  class: "markup-input",
3927
4101
  type: "text",
@@ -3934,7 +4108,7 @@ function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
3934
4108
  disabled: f,
3935
4109
  "data-1p-ignore": !0
3936
4110
  }),
3937
- /* @__PURE__ */ Q("input", {
4111
+ /* @__PURE__ */ $("input", {
3938
4112
  class: "markup-input",
3939
4113
  type: "email",
3940
4114
  name: "email",
@@ -3946,21 +4120,21 @@ function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
3946
4120
  disabled: f,
3947
4121
  "data-1p-ignore": !0
3948
4122
  }),
3949
- t ? /* @__PURE__ */ Q("p", {
4123
+ t ? /* @__PURE__ */ $("p", {
3950
4124
  class: "markup-author-status",
3951
4125
  role: "status",
3952
4126
  "aria-live": "polite",
3953
4127
  children: "Connecting…"
3954
4128
  }) : null,
3955
- /* @__PURE__ */ Q("div", {
4129
+ /* @__PURE__ */ $("div", {
3956
4130
  class: "markup-composer-actions",
3957
- children: [/* @__PURE__ */ Q("button", {
4131
+ children: [/* @__PURE__ */ $("button", {
3958
4132
  type: "button",
3959
4133
  class: "markup-btn markup-btn-ghost",
3960
4134
  onClick: i,
3961
4135
  disabled: e,
3962
4136
  children: "Cancel"
3963
- }), /* @__PURE__ */ Q("button", {
4137
+ }), /* @__PURE__ */ $("button", {
3964
4138
  type: "submit",
3965
4139
  class: "markup-btn markup-btn-primary",
3966
4140
  disabled: !o.trim() || f,
@@ -3972,18 +4146,18 @@ function Ua({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
3972
4146
  }
3973
4147
  //#endregion
3974
4148
  //#region src/runtime/ui/composer.tsx
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 }) {
3977
- let [s, c] = R(""), l = B(null), u = B(!1);
3978
- z(() => {
4149
+ var Ya = 4e3;
4150
+ function Xa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o }) {
4151
+ let [s, c] = L(""), l = z(null), u = z(!1);
4152
+ R(() => {
3979
4153
  r && l.current?.focus();
3980
- }, [r]), z(() => {
4154
+ }, [r]), R(() => {
3981
4155
  let e = l.current;
3982
4156
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
3983
- }, [s]), z(() => {
4157
+ }, [s]), R(() => {
3984
4158
  u.current && !i && !a && (c(""), l.current?.focus()), u.current = i;
3985
4159
  }, [i, a]);
3986
- let d = Wa - s.length, f = d < 0;
4160
+ let d = Ya - s.length, f = d < 0;
3987
4161
  function p(e) {
3988
4162
  e?.preventDefault();
3989
4163
  let t = s.trim();
@@ -3994,53 +4168,53 @@ function Ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
3994
4168
  }
3995
4169
  let h = s.length > 0;
3996
4170
  function g(e) {
3997
- return /* @__PURE__ */ Q("button", {
4171
+ return /* @__PURE__ */ $("button", {
3998
4172
  type: "submit",
3999
4173
  class: "markup-btn markup-btn-primary",
4000
4174
  disabled: i || !s.trim() || f,
4001
4175
  "aria-label": i ? "Sending…" : n,
4002
4176
  title: i ? "Sending…" : n,
4003
4177
  tabIndex: e,
4004
- children: /* @__PURE__ */ Q(La, { size: 14 })
4178
+ children: /* @__PURE__ */ $(Ha, { size: 14 })
4005
4179
  });
4006
4180
  }
4007
- return /* @__PURE__ */ Q("form", {
4008
- class: Z("markup-composer", h && "is-filled"),
4181
+ return /* @__PURE__ */ $("form", {
4182
+ class: Q("markup-composer", h && "is-filled"),
4009
4183
  onSubmit: p,
4010
4184
  children: [
4011
- /* @__PURE__ */ Q("textarea", {
4185
+ /* @__PURE__ */ $("textarea", {
4012
4186
  ref: l,
4013
4187
  name: "reply",
4014
4188
  class: "markup-composer-input",
4015
4189
  placeholder: t,
4016
4190
  rows: h ? 2 : 1,
4017
- maxLength: Wa + 100,
4191
+ maxLength: Ya + 100,
4018
4192
  value: s,
4019
4193
  onInput: (e) => c(e.currentTarget.value),
4020
4194
  onKeyDown: m,
4021
4195
  disabled: i,
4022
4196
  "aria-label": e
4023
4197
  }),
4024
- /* @__PURE__ */ Q("div", {
4198
+ /* @__PURE__ */ $("div", {
4025
4199
  class: "markup-composer-footer-wrap",
4026
- children: /* @__PURE__ */ Q("div", {
4200
+ children: /* @__PURE__ */ $("div", {
4027
4201
  class: "markup-composer-footer",
4028
- children: [/* @__PURE__ */ Q("span", {
4202
+ children: [/* @__PURE__ */ $("span", {
4029
4203
  class: "markup-composer-hint",
4030
- children: a ? /* @__PURE__ */ Q("span", {
4204
+ children: a ? /* @__PURE__ */ $("span", {
4031
4205
  class: "markup-composer-error",
4032
4206
  children: a
4033
- }) : f ? /* @__PURE__ */ Q("span", {
4207
+ }) : f ? /* @__PURE__ */ $("span", {
4034
4208
  class: "markup-composer-error",
4035
4209
  children: [Math.abs(d), " too long"]
4036
- }) : /* @__PURE__ */ Q("span", { children: "⌘↵ to send" })
4037
- }), /* @__PURE__ */ Q("div", {
4210
+ }) : /* @__PURE__ */ $("span", { children: "⌘↵ to send" })
4211
+ }), /* @__PURE__ */ $("div", {
4038
4212
  class: "markup-composer-actions",
4039
4213
  children: g(h ? void 0 : -1)
4040
4214
  })]
4041
4215
  })
4042
4216
  }),
4043
- /* @__PURE__ */ Q("span", {
4217
+ /* @__PURE__ */ $("span", {
4044
4218
  class: "markup-composer-actions-empty",
4045
4219
  "aria-hidden": h || void 0,
4046
4220
  children: g(h ? -1 : void 0)
@@ -4050,15 +4224,15 @@ function Ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
4050
4224
  }
4051
4225
  //#endregion
4052
4226
  //#region src/runtime/ui/new-thread-popover.tsx
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 }) {
4054
- let g = B(null);
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({
4227
+ function Za({ 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 }) {
4228
+ let g = z(null);
4229
+ Ka(g, !0);
4230
+ let [_, v] = L(!1), [y, b] = L(!1), x = qa(c), [C, w] = L(null), { onPointerDown: T, isDragging: E } = Pa({
4057
4231
  targetRef: g,
4058
4232
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
4059
4233
  onMove: w
4060
4234
  });
4061
- z(() => {
4235
+ R(() => {
4062
4236
  let e = g.current;
4063
4237
  if (!e) return;
4064
4238
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
@@ -4069,10 +4243,10 @@ function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4069
4243
  }
4070
4244
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
4071
4245
  }, [h]);
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", {
4246
+ 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;
4247
+ return /* @__PURE__ */ $("div", {
4074
4248
  ref: g,
4075
- class: Z("markup-popover", C && "is-floating", E && "is-dragging"),
4249
+ class: Q("markup-popover", C && "is-floating", E && "is-dragging"),
4076
4250
  popover: "auto",
4077
4251
  style: {
4078
4252
  "--markup-pop-x": `${C?.left ?? D}px`,
@@ -4080,44 +4254,44 @@ function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4080
4254
  },
4081
4255
  role: "dialog",
4082
4256
  "aria-label": "New markup",
4083
- children: [/* @__PURE__ */ Q("header", {
4257
+ children: [/* @__PURE__ */ $("header", {
4084
4258
  class: "markup-popover-header",
4085
4259
  onPointerDown: T,
4086
- children: [/* @__PURE__ */ Q("span", {
4260
+ children: [/* @__PURE__ */ $("span", {
4087
4261
  class: "markup-eyebrow",
4088
4262
  children: "new · markup"
4089
- }), /* @__PURE__ */ Q("button", {
4263
+ }), /* @__PURE__ */ $("button", {
4090
4264
  type: "button",
4091
4265
  class: "markup-icon-btn",
4092
4266
  "aria-label": "Discard pin",
4093
4267
  onClick: h,
4094
- children: /* @__PURE__ */ Q(Na, { size: 16 })
4268
+ children: /* @__PURE__ */ $(Ra, { size: 16 })
4095
4269
  })]
4096
- }), n == null ? /* @__PURE__ */ Q(Ua, {
4270
+ }), n == null ? /* @__PURE__ */ $(Ja, {
4097
4271
  isPending: o,
4098
4272
  isConnecting: i,
4099
4273
  isSigningIn: a,
4100
4274
  onSubmit: f,
4101
4275
  onCancel: h,
4102
4276
  onSignIn: p
4103
- }) : /* @__PURE__ */ Q("div", {
4277
+ }) : /* @__PURE__ */ $("div", {
4104
4278
  class: "markup-popover-body",
4105
4279
  children: [
4106
- /* @__PURE__ */ Q("p", {
4280
+ /* @__PURE__ */ $("p", {
4107
4281
  class: "markup-popover-byline",
4108
4282
  children: [
4109
4283
  "posting as ",
4110
- /* @__PURE__ */ Q("span", {
4284
+ /* @__PURE__ */ $("span", {
4111
4285
  class: "markup-popover-name",
4112
4286
  children: n
4113
4287
  }),
4114
- r ? /* @__PURE__ */ Q("span", {
4288
+ r ? /* @__PURE__ */ $("span", {
4115
4289
  class: "markup-comment-badge",
4116
4290
  children: "team"
4117
4291
  }) : null
4118
4292
  ]
4119
4293
  }),
4120
- /* @__PURE__ */ Q(Ga, {
4294
+ /* @__PURE__ */ $(Xa, {
4121
4295
  label: "Feedback",
4122
4296
  placeholder: "What's wrong, missing, or worth noting?",
4123
4297
  submitLabel: "Post markup",
@@ -4125,44 +4299,44 @@ function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4125
4299
  error: s,
4126
4300
  onSubmit: (e) => m(e, _ && k)
4127
4301
  }),
4128
- A ? /* @__PURE__ */ Q("div", {
4302
+ A ? /* @__PURE__ */ $("div", {
4129
4303
  class: "markup-screenshot-row",
4130
- children: [l ? /* @__PURE__ */ Q("span", {
4304
+ children: [l ? /* @__PURE__ */ $("span", {
4131
4305
  class: "markup-screenshot-status",
4132
4306
  children: [
4133
- /* @__PURE__ */ Q("input", {
4307
+ /* @__PURE__ */ $("input", {
4134
4308
  type: "checkbox",
4135
4309
  class: "markup-screenshot-checkbox",
4136
4310
  disabled: !0
4137
4311
  }),
4138
- /* @__PURE__ */ Q(Ia, { size: 12 }),
4139
- /* @__PURE__ */ Q("span", { children: "Capturing…" })
4312
+ /* @__PURE__ */ $(Va, { size: 12 }),
4313
+ /* @__PURE__ */ $("span", { children: "Capturing…" })
4140
4314
  ]
4141
- }) : /* @__PURE__ */ Q("label", {
4315
+ }) : /* @__PURE__ */ $("label", {
4142
4316
  class: "markup-screenshot-toggle",
4143
4317
  children: [
4144
- /* @__PURE__ */ Q("input", {
4318
+ /* @__PURE__ */ $("input", {
4145
4319
  type: "checkbox",
4146
4320
  class: "markup-screenshot-checkbox",
4147
4321
  checked: _,
4148
4322
  onChange: (e) => v(e.currentTarget.checked)
4149
4323
  }),
4150
- /* @__PURE__ */ Q(Ia, { size: 12 }),
4151
- /* @__PURE__ */ Q("span", { children: "Attach screenshot" }),
4152
- x && _ ? /* @__PURE__ */ Q("img", {
4324
+ /* @__PURE__ */ $(Va, { size: 12 }),
4325
+ /* @__PURE__ */ $("span", { children: "Attach screenshot" }),
4326
+ x && _ ? /* @__PURE__ */ $("img", {
4153
4327
  class: "markup-screenshot-thumb",
4154
4328
  src: x,
4155
4329
  alt: "Screenshot preview"
4156
4330
  }) : null
4157
4331
  ]
4158
- }), _ && k ? /* @__PURE__ */ Q(S, { children: [u > 0 ? /* @__PURE__ */ Q("div", {
4332
+ }), _ && k ? /* @__PURE__ */ $(S, { children: [u > 0 ? /* @__PURE__ */ $("div", {
4159
4333
  class: "markup-screenshot-redacted",
4160
- children: [/* @__PURE__ */ Q("button", {
4334
+ children: [/* @__PURE__ */ $("button", {
4161
4335
  type: "button",
4162
4336
  class: "markup-screenshot-redacted-chip",
4163
4337
  onClick: () => b((e) => !e),
4164
4338
  children: [
4165
- /* @__PURE__ */ Q("em", {
4339
+ /* @__PURE__ */ $("em", {
4166
4340
  class: "markup-screenshot-redacted-arrow",
4167
4341
  children: y ? "▾" : "▸"
4168
4342
  }),
@@ -4171,19 +4345,19 @@ function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4171
4345
  u === 1 ? "field" : "fields",
4172
4346
  " redacted"
4173
4347
  ]
4174
- }), y ? /* @__PURE__ */ Q("div", {
4348
+ }), y ? /* @__PURE__ */ $("div", {
4175
4349
  class: "markup-screenshot-redacted-list",
4176
- children: d.map((e) => /* @__PURE__ */ Q("code", {
4350
+ children: d.map((e) => /* @__PURE__ */ $("code", {
4177
4351
  class: "markup-screenshot-redacted-selector",
4178
4352
  children: e
4179
4353
  }, e))
4180
4354
  }) : null]
4181
- }) : null, /* @__PURE__ */ Q("p", {
4355
+ }) : null, /* @__PURE__ */ $("p", {
4182
4356
  class: "markup-screenshot-help",
4183
4357
  children: [
4184
4358
  "Password and credit-card fields are blacked out automatically. Add",
4185
4359
  " ",
4186
- /* @__PURE__ */ Q("code", {
4360
+ /* @__PURE__ */ $("code", {
4187
4361
  class: "markup-screenshot-help-code",
4188
4362
  children: "data-markup-private"
4189
4363
  }),
@@ -4195,16 +4369,16 @@ function Ka({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4195
4369
  })]
4196
4370
  });
4197
4371
  }
4198
- function qa(e, t, n) {
4372
+ function Qa(e, t, n) {
4199
4373
  return Math.max(t, Math.min(n, e));
4200
4374
  }
4201
4375
  //#endregion
4202
4376
  //#region src/runtime/ui/pin.tsx
4203
- function Ja({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
4377
+ function $a({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
4204
4378
  let o = t - window.scrollY, s = e - window.scrollX;
4205
- return /* @__PURE__ */ Q("button", {
4379
+ return /* @__PURE__ */ $("button", {
4206
4380
  type: "button",
4207
- class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved"),
4381
+ class: Q("markup-pin", r && "is-active is-anchor", i && "is-unresolved"),
4208
4382
  style: {
4209
4383
  top: `${o}px`,
4210
4384
  left: `${s}px`
@@ -4214,24 +4388,24 @@ function Ja({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClic
4214
4388
  onClick: a,
4215
4389
  "aria-label": `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
4216
4390
  title: `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
4217
- children: [/* @__PURE__ */ Q("span", {
4391
+ children: [/* @__PURE__ */ $("span", {
4218
4392
  class: "markup-pin-dot",
4219
4393
  "aria-hidden": !0
4220
- }), n > 1 ? /* @__PURE__ */ Q("span", {
4394
+ }), n > 1 ? /* @__PURE__ */ $("span", {
4221
4395
  class: "markup-pin-count",
4222
4396
  children: n
4223
4397
  }) : null]
4224
4398
  });
4225
4399
  }
4226
- function Ya({ pageX: e, pageY: t }) {
4400
+ function eo({ pageX: e, pageY: t }) {
4227
4401
  let n = t - window.scrollY, r = e - window.scrollX;
4228
- return /* @__PURE__ */ Q("div", {
4402
+ return /* @__PURE__ */ $("div", {
4229
4403
  class: "markup-pin markup-pin-ghost is-anchor",
4230
4404
  style: {
4231
4405
  top: `${n}px`,
4232
4406
  left: `${r}px`
4233
4407
  },
4234
- children: /* @__PURE__ */ Q("span", {
4408
+ children: /* @__PURE__ */ $("span", {
4235
4409
  class: "markup-pin-dot",
4236
4410
  "aria-hidden": !0
4237
4411
  })
@@ -4239,8 +4413,8 @@ function Ya({ pageX: e, pageY: t }) {
4239
4413
  }
4240
4414
  //#endregion
4241
4415
  //#region src/runtime/ui/placement-overlay.tsx
4242
- function Xa({ onPlace: e, onCancel: t }) {
4243
- z(() => {
4416
+ function to({ onPlace: e, onCancel: t }) {
4417
+ R(() => {
4244
4418
  function e(e) {
4245
4419
  e.key === "Escape" && t();
4246
4420
  }
@@ -4252,27 +4426,27 @@ function Xa({ onPlace: e, onCancel: t }) {
4252
4426
  function r(e) {
4253
4427
  e.preventDefault(), e.stopPropagation();
4254
4428
  }
4255
- return /* @__PURE__ */ Q("div", {
4429
+ return /* @__PURE__ */ $("div", {
4256
4430
  class: "markup-placement-overlay",
4257
4431
  onPointerDown: r,
4258
4432
  onClick: n,
4259
4433
  role: "presentation",
4260
- children: /* @__PURE__ */ Q("div", {
4434
+ children: /* @__PURE__ */ $("div", {
4261
4435
  class: "markup-placement-cursor-help",
4262
- children: /* @__PURE__ */ Q("span", { children: "Click anywhere to drop a pin · ESC to cancel" })
4436
+ children: /* @__PURE__ */ $("span", { children: "Click anywhere to drop a pin · ESC to cancel" })
4263
4437
  })
4264
4438
  });
4265
4439
  }
4266
4440
  //#endregion
4267
4441
  //#region src/runtime/ui/thread-popover.tsx
4268
- var Za = [
4442
+ var no = [
4269
4443
  "👍",
4270
4444
  "❤️",
4271
4445
  "🎉",
4272
4446
  "😮",
4273
4447
  "😄",
4274
4448
  "❓"
4275
- ], Qa = ar({
4449
+ ], ro = ar({
4276
4450
  none: {
4277
4451
  "toggle-thread-menu": () => ({
4278
4452
  kind: "thread-menu",
@@ -4328,22 +4502,22 @@ var Za = [
4328
4502
  dismiss: () => ({ kind: "none" })
4329
4503
  }
4330
4504
  });
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({
4505
+ function io({ 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 }) {
4506
+ let y = z(null), b = z(null), x = z(null), S = z(null), [C, w] = or(ro, { kind: "none" }), [T, E] = L(null), { onPointerDown: D, isDragging: O } = Pa({
4333
4507
  targetRef: y,
4334
4508
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
4335
4509
  onMove: E
4336
4510
  });
4337
- Va(y, !0);
4338
- let k = e.resolvedAt != null, A = Ce(() => e.comments.filter((e) => !e.deleted), [e.comments]);
4339
- z(() => {
4511
+ Ka(y, !0);
4512
+ let k = e.resolvedAt != null, A = we(() => e.comments.filter((e) => !e.deleted), [e.comments]);
4513
+ R(() => {
4340
4514
  if (C.kind === "none" || C.kind === "editing") return;
4341
4515
  function e(e) {
4342
4516
  let t = S.current;
4343
4517
  t && !e.composedPath().includes(t) && w({ type: "dismiss" });
4344
4518
  }
4345
4519
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
4346
- }, [C.kind, w]), z(() => {
4520
+ }, [C.kind, w]), R(() => {
4347
4521
  if (C.kind !== "editing") return;
4348
4522
  let t = e.comments.find((e) => e._id === C.commentId);
4349
4523
  (!t || t.deleted) && w({ type: "dismiss" });
@@ -4352,8 +4526,8 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4352
4526
  C,
4353
4527
  w
4354
4528
  ]);
4355
- let j = B(!0);
4356
- z(() => {
4529
+ let j = z(!0);
4530
+ R(() => {
4357
4531
  let e = b.current;
4358
4532
  if (e) {
4359
4533
  if (j.current) {
@@ -4362,7 +4536,7 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4362
4536
  }
4363
4537
  e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
4364
4538
  }
4365
- }, [A.length]), z(() => {
4539
+ }, [A.length]), R(() => {
4366
4540
  let e = y.current;
4367
4541
  if (!e) return;
4368
4542
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
@@ -4373,25 +4547,25 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4373
4547
  }
4374
4548
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
4375
4549
  }, [f]);
4376
- let M = Ce(() => {
4550
+ let M = we(() => {
4377
4551
  let t = Ar({
4378
4552
  anchorX: e.anchorX,
4379
4553
  anchorY: e.anchorY,
4380
4554
  anchorSelector: e.anchorSelector
4381
4555
  });
4382
4556
  return {
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)
4557
+ left: co(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
4558
+ top: co(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
4385
4559
  };
4386
4560
  }, [
4387
4561
  e.anchorX,
4388
4562
  e.anchorY,
4389
4563
  e.anchorSelector
4390
4564
  ]);
4391
- return /* @__PURE__ */ Q("div", {
4565
+ return /* @__PURE__ */ $("div", {
4392
4566
  ref: y,
4393
4567
  id: "markup-thread-popover",
4394
- class: Z("markup-popover", T && "is-floating", O && "is-dragging", l && "is-hud-hidden"),
4568
+ class: Q("markup-popover", T && "is-floating", O && "is-dragging", l && "is-hud-hidden"),
4395
4569
  popover: "auto",
4396
4570
  style: {
4397
4571
  "--markup-pop-x": `${T?.left ?? M.left}px`,
@@ -4401,10 +4575,10 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4401
4575
  "aria-label": "Markup thread",
4402
4576
  "aria-hidden": l || void 0,
4403
4577
  children: [
4404
- /* @__PURE__ */ Q("header", {
4578
+ /* @__PURE__ */ $("header", {
4405
4579
  class: "markup-popover-header",
4406
4580
  onPointerDown: D,
4407
- children: [/* @__PURE__ */ Q("span", {
4581
+ children: [/* @__PURE__ */ $("span", {
4408
4582
  class: "markup-eyebrow",
4409
4583
  children: [
4410
4584
  "thread · ",
@@ -4412,23 +4586,23 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4412
4586
  " ",
4413
4587
  A.length === 1 ? "comment" : "comments"
4414
4588
  ]
4415
- }), /* @__PURE__ */ Q("div", {
4589
+ }), /* @__PURE__ */ $("div", {
4416
4590
  class: "markup-popover-header-actions",
4417
4591
  children: [
4418
- /* @__PURE__ */ Q("div", {
4592
+ /* @__PURE__ */ $("div", {
4419
4593
  class: "markup-thread-menu",
4420
4594
  ref: (e) => {
4421
4595
  C.kind === "thread-menu" && (S.current = e);
4422
4596
  },
4423
- children: [/* @__PURE__ */ Q("button", {
4597
+ children: [/* @__PURE__ */ $("button", {
4424
4598
  type: "button",
4425
- class: Z("markup-icon-btn", C.kind === "thread-menu" && "is-open"),
4599
+ class: Q("markup-icon-btn", C.kind === "thread-menu" && "is-open"),
4426
4600
  title: "More options",
4427
4601
  onClick: () => w({ type: "toggle-thread-menu" }),
4428
- children: /* @__PURE__ */ Q(Pa, { size: 16 })
4429
- }), C.kind === "thread-menu" ? /* @__PURE__ */ Q("div", {
4602
+ children: /* @__PURE__ */ $(za, { size: 16 })
4603
+ }), C.kind === "thread-menu" ? /* @__PURE__ */ $("div", {
4430
4604
  class: "markup-thread-menu-list",
4431
- children: [/* @__PURE__ */ Q("button", {
4605
+ children: [/* @__PURE__ */ $("button", {
4432
4606
  type: "button",
4433
4607
  class: "markup-thread-menu-item",
4434
4608
  onClick: () => {
@@ -4436,9 +4610,9 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4436
4610
  t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}), w({ type: "dismiss" });
4437
4611
  },
4438
4612
  children: "Copy link"
4439
- }), o ? /* @__PURE__ */ Q("button", {
4613
+ }), o ? /* @__PURE__ */ $("button", {
4440
4614
  type: "button",
4441
- class: Z("markup-thread-menu-item", C.confirmDelete && "is-danger"),
4615
+ class: Q("markup-thread-menu-item", C.confirmDelete && "is-danger"),
4442
4616
  disabled: s,
4443
4617
  onClick: () => {
4444
4618
  C.kind === "thread-menu" && (C.confirmDelete ? (w({ type: "dismiss" }), v()) : w({ type: "arm-thread-delete" }));
@@ -4447,52 +4621,52 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4447
4621
  }) : null]
4448
4622
  }) : null]
4449
4623
  }),
4450
- r ? /* @__PURE__ */ Q("button", {
4624
+ r ? /* @__PURE__ */ $("button", {
4451
4625
  type: "button",
4452
4626
  class: "markup-icon-btn",
4453
4627
  title: "Mark as resolved",
4454
4628
  disabled: s,
4455
4629
  onClick: _,
4456
- children: /* @__PURE__ */ Q(Fa, { size: 16 })
4630
+ children: /* @__PURE__ */ $(Ba, { size: 16 })
4457
4631
  }) : null,
4458
- /* @__PURE__ */ Q("button", {
4632
+ /* @__PURE__ */ $("button", {
4459
4633
  type: "button",
4460
4634
  class: "markup-icon-btn",
4461
4635
  title: "Close thread",
4462
4636
  onClick: f,
4463
- children: /* @__PURE__ */ Q(Na, { size: 16 })
4637
+ children: /* @__PURE__ */ $(Ra, { size: 16 })
4464
4638
  })
4465
4639
  ]
4466
4640
  })]
4467
4641
  }),
4468
- /* @__PURE__ */ Q("ol", {
4642
+ /* @__PURE__ */ $("ol", {
4469
4643
  ref: b,
4470
4644
  class: "markup-comments",
4471
4645
  children: A.map((t, r) => {
4472
4646
  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";
4473
- return /* @__PURE__ */ Q("li", {
4474
- class: Z("markup-comment", t.fromDashboard && "is-team"),
4647
+ return /* @__PURE__ */ $("li", {
4648
+ class: Q("markup-comment", t.fromDashboard && "is-team"),
4475
4649
  children: [
4476
- /* @__PURE__ */ Q("div", {
4650
+ /* @__PURE__ */ $("div", {
4477
4651
  class: "markup-comment-meta",
4478
4652
  children: [
4479
- /* @__PURE__ */ Q("span", {
4653
+ /* @__PURE__ */ $("span", {
4480
4654
  class: "markup-comment-author",
4481
4655
  children: t.authorName
4482
4656
  }),
4483
- t.fromDashboard ? /* @__PURE__ */ Q("span", {
4657
+ t.fromDashboard ? /* @__PURE__ */ $("span", {
4484
4658
  class: "markup-comment-badge",
4485
4659
  children: "team"
4486
4660
  }) : null,
4487
- /* @__PURE__ */ Q("time", {
4661
+ /* @__PURE__ */ $("time", {
4488
4662
  class: "markup-comment-time",
4489
4663
  datetime: new Date(t.createdAt).toISOString(),
4490
- title: ao(t.createdAt),
4491
- children: io(t.createdAt)
4664
+ title: uo(t.createdAt),
4665
+ children: lo(t.createdAt)
4492
4666
  }),
4493
- /* @__PURE__ */ Q("div", {
4667
+ /* @__PURE__ */ $("div", {
4494
4668
  class: "markup-thread-actions",
4495
- children: [!k && !l ? /* @__PURE__ */ Q(eo, {
4669
+ children: [!k && !l ? /* @__PURE__ */ $(ao, {
4496
4670
  comment: t,
4497
4671
  pickerOpen: p,
4498
4672
  pickerDirection: _,
@@ -4527,14 +4701,14 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4527
4701
  onPickerSelect: (e) => {
4528
4702
  w({ type: "dismiss" }), g(t._id, e);
4529
4703
  }
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"),
4704
+ }) : null, u ? /* @__PURE__ */ $("div", {
4705
+ class: Q("markup-thread-menu markup-comment-menu", d && "is-open", d && v === "up" && "is-up", A.length === 1 && "is-side"),
4532
4706
  ref: (e) => {
4533
4707
  d && (S.current = e);
4534
4708
  },
4535
- children: [/* @__PURE__ */ Q("button", {
4709
+ children: [/* @__PURE__ */ $("button", {
4536
4710
  type: "button",
4537
- class: Z("markup-icon-btn", d && "is-open"),
4711
+ class: Q("markup-icon-btn", d && "is-open"),
4538
4712
  title: "More options",
4539
4713
  onClick: (e) => {
4540
4714
  if (d) {
@@ -4560,10 +4734,10 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4560
4734
  direction: a < i ? "up" : "down"
4561
4735
  });
4562
4736
  },
4563
- children: /* @__PURE__ */ Q(Pa, { size: 16 })
4564
- }), d ? /* @__PURE__ */ Q("div", {
4737
+ children: /* @__PURE__ */ $(za, { size: 16 })
4738
+ }), d ? /* @__PURE__ */ $("div", {
4565
4739
  class: "markup-thread-menu-list",
4566
- children: [o ? /* @__PURE__ */ Q("button", {
4740
+ children: [o ? /* @__PURE__ */ $("button", {
4567
4741
  type: "button",
4568
4742
  class: "markup-thread-menu-item",
4569
4743
  onClick: () => {
@@ -4574,9 +4748,9 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4574
4748
  });
4575
4749
  },
4576
4750
  children: "Edit"
4577
- }) : null, c ? /* @__PURE__ */ Q("button", {
4751
+ }) : null, c ? /* @__PURE__ */ $("button", {
4578
4752
  type: "button",
4579
- class: Z("markup-thread-menu-item", f && "is-danger"),
4753
+ class: Q("markup-thread-menu-item", f && "is-danger"),
4580
4754
  onClick: () => {
4581
4755
  C.kind === "comment-menu" && (C.confirmDelete ? (w({ type: "dismiss" }), h(t._id)) : w({ type: "arm-comment-delete" }));
4582
4756
  },
@@ -4587,7 +4761,7 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4587
4761
  })
4588
4762
  ]
4589
4763
  }),
4590
- l && C.kind === "editing" ? /* @__PURE__ */ Q("form", {
4764
+ l && C.kind === "editing" ? /* @__PURE__ */ $("form", {
4591
4765
  class: "markup-comment-edit-form",
4592
4766
  onSubmit: async (e) => {
4593
4767
  if (e.preventDefault(), C.kind !== "editing") return;
@@ -4600,7 +4774,7 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4600
4774
  await m(t._id, n), w({ type: "dismiss" });
4601
4775
  } catch {}
4602
4776
  },
4603
- children: [/* @__PURE__ */ Q("textarea", {
4777
+ children: [/* @__PURE__ */ $("textarea", {
4604
4778
  class: "markup-textarea",
4605
4779
  value: C.draft,
4606
4780
  onInput: (e) => {
@@ -4612,40 +4786,40 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4612
4786
  rows: 3,
4613
4787
  autoFocus: !0,
4614
4788
  disabled: s
4615
- }), /* @__PURE__ */ Q("div", {
4789
+ }), /* @__PURE__ */ $("div", {
4616
4790
  class: "markup-comment-edit-actions",
4617
- children: [/* @__PURE__ */ Q("button", {
4791
+ children: [/* @__PURE__ */ $("button", {
4618
4792
  type: "button",
4619
4793
  class: "markup-btn markup-btn-ghost",
4620
4794
  onClick: () => w({ type: "dismiss" }),
4621
4795
  disabled: s,
4622
4796
  children: "Cancel"
4623
- }), /* @__PURE__ */ Q("button", {
4797
+ }), /* @__PURE__ */ $("button", {
4624
4798
  type: "submit",
4625
4799
  class: "markup-btn markup-btn-primary",
4626
4800
  disabled: s || C.draft.trim().length === 0,
4627
4801
  children: "Save"
4628
4802
  })]
4629
4803
  })]
4630
- }) : /* @__PURE__ */ Q("p", {
4804
+ }) : /* @__PURE__ */ $("p", {
4631
4805
  class: "markup-comment-body",
4632
- children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
4806
+ children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ $("time", {
4633
4807
  class: "markup-comment-edited",
4634
4808
  datetime: new Date(t.editedAt).toISOString(),
4635
- title: ao(t.editedAt),
4809
+ title: uo(t.editedAt),
4636
4810
  children: [" ", "(edited)"]
4637
4811
  })]
4638
4812
  }),
4639
- r === 0 && e.screenshotUrl ? /* @__PURE__ */ Q("button", {
4813
+ r === 0 && e.screenshotUrl ? /* @__PURE__ */ $("button", {
4640
4814
  type: "button",
4641
4815
  class: "markup-comment-screenshot",
4642
4816
  onClick: () => x.current?.showModal(),
4643
- children: /* @__PURE__ */ Q("img", {
4817
+ children: /* @__PURE__ */ $("img", {
4644
4818
  src: e.screenshotUrl,
4645
4819
  alt: "Screenshot"
4646
4820
  })
4647
4821
  }) : null,
4648
- !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(to, {
4822
+ !l && t.reactions.length > 0 ? /* @__PURE__ */ $(oo, {
4649
4823
  comment: t,
4650
4824
  isResolved: k,
4651
4825
  onToggle: (e) => g(t._id, e)
@@ -4654,48 +4828,48 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4654
4828
  }, t._id);
4655
4829
  })
4656
4830
  }),
4657
- e.screenshotUrl ? /* @__PURE__ */ Q("dialog", {
4831
+ e.screenshotUrl ? /* @__PURE__ */ $("dialog", {
4658
4832
  ref: x,
4659
4833
  class: "markup-lightbox",
4660
4834
  onClick: () => x.current?.close(),
4661
- children: [/* @__PURE__ */ Q("button", {
4835
+ children: [/* @__PURE__ */ $("button", {
4662
4836
  type: "button",
4663
4837
  class: "markup-lightbox-close markup-icon-btn",
4664
4838
  "aria-label": "Close screenshot",
4665
4839
  onClick: (e) => {
4666
4840
  e.stopPropagation(), x.current?.close();
4667
4841
  },
4668
- children: /* @__PURE__ */ Q(Na, { size: 16 })
4669
- }), /* @__PURE__ */ Q("img", {
4842
+ children: /* @__PURE__ */ $(Ra, { size: 16 })
4843
+ }), /* @__PURE__ */ $("img", {
4670
4844
  class: "markup-lightbox-img",
4671
4845
  src: e.screenshotUrl,
4672
4846
  alt: "Screenshot",
4673
4847
  onClick: (e) => e.stopPropagation()
4674
4848
  })]
4675
4849
  }) : null,
4676
- t == null ? /* @__PURE__ */ Q(Ua, {
4850
+ t == null ? /* @__PURE__ */ $(Ja, {
4677
4851
  isPending: s,
4678
4852
  isConnecting: i,
4679
4853
  isSigningIn: a,
4680
4854
  onSubmit: u,
4681
4855
  onCancel: f,
4682
4856
  onSignIn: d
4683
- }) : /* @__PURE__ */ Q("div", {
4857
+ }) : /* @__PURE__ */ $("div", {
4684
4858
  class: "markup-popover-body",
4685
- children: [/* @__PURE__ */ Q("p", {
4859
+ children: [/* @__PURE__ */ $("p", {
4686
4860
  class: "markup-popover-byline",
4687
4861
  children: [
4688
4862
  "replying as ",
4689
- /* @__PURE__ */ Q("span", {
4863
+ /* @__PURE__ */ $("span", {
4690
4864
  class: "markup-popover-name",
4691
4865
  children: t
4692
4866
  }),
4693
- r ? /* @__PURE__ */ Q("span", {
4867
+ r ? /* @__PURE__ */ $("span", {
4694
4868
  class: "markup-comment-badge",
4695
4869
  children: "team"
4696
4870
  }) : null
4697
4871
  ]
4698
- }), /* @__PURE__ */ Q(Ga, {
4872
+ }), /* @__PURE__ */ $(Xa, {
4699
4873
  label: "Reply",
4700
4874
  placeholder: "Write a reply…",
4701
4875
  submitLabel: "Reply",
@@ -4708,48 +4882,48 @@ function $a({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4708
4882
  ]
4709
4883
  });
4710
4884
  }
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"),
4885
+ function ao({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
4886
+ return /* @__PURE__ */ $("div", {
4887
+ class: Q("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
4714
4888
  ref: i,
4715
- children: [/* @__PURE__ */ Q("button", {
4889
+ children: [/* @__PURE__ */ $("button", {
4716
4890
  type: "button",
4717
- class: Z("markup-icon-btn", t && "is-open"),
4891
+ class: Q("markup-icon-btn", t && "is-open"),
4718
4892
  title: "Add reaction",
4719
4893
  "aria-label": "Add reaction",
4720
4894
  onClick: a,
4721
- children: /* @__PURE__ */ Q(Ra, { size: 16 })
4722
- }), t ? /* @__PURE__ */ Q("div", {
4895
+ children: /* @__PURE__ */ $(Ua, { size: 16 })
4896
+ }), t ? /* @__PURE__ */ $("div", {
4723
4897
  class: "markup-reaction-picker",
4724
4898
  role: "menu",
4725
- children: Za.map((t) => /* @__PURE__ */ Q("button", {
4899
+ children: no.map((t) => /* @__PURE__ */ $("button", {
4726
4900
  type: "button",
4727
4901
  role: "menuitem",
4728
- class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
4902
+ class: Q("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
4729
4903
  onClick: () => o(t),
4730
4904
  children: t
4731
4905
  }, t))
4732
4906
  }) : null]
4733
4907
  });
4734
4908
  }
4735
- function to({ comment: e, isResolved: t, onToggle: n }) {
4736
- return /* @__PURE__ */ Q("div", {
4909
+ function oo({ comment: e, isResolved: t, onToggle: n }) {
4910
+ return /* @__PURE__ */ $("div", {
4737
4911
  class: "markup-reactions",
4738
4912
  children: e.reactions.map((e) => {
4739
- let r = no(e.reactors, e.mine, e.count, e.emoji);
4740
- return /* @__PURE__ */ Q("button", {
4913
+ let r = so(e.reactors, e.mine, e.count, e.emoji);
4914
+ return /* @__PURE__ */ $("button", {
4741
4915
  type: "button",
4742
- class: Z("markup-reaction-chip", e.mine && "is-mine"),
4916
+ class: Q("markup-reaction-chip", e.mine && "is-mine"),
4743
4917
  disabled: t,
4744
4918
  onClick: () => n(e.emoji),
4745
4919
  "aria-pressed": e.mine,
4746
4920
  "aria-label": r,
4747
4921
  title: r,
4748
- children: [/* @__PURE__ */ Q("span", {
4922
+ children: [/* @__PURE__ */ $("span", {
4749
4923
  class: "markup-reaction-emoji",
4750
4924
  "aria-hidden": !0,
4751
4925
  children: e.emoji
4752
- }), /* @__PURE__ */ Q("span", {
4926
+ }), /* @__PURE__ */ $("span", {
4753
4927
  class: "markup-reaction-count",
4754
4928
  children: e.count
4755
4929
  })]
@@ -4757,14 +4931,14 @@ function to({ comment: e, isResolved: t, onToggle: n }) {
4757
4931
  })
4758
4932
  });
4759
4933
  }
4760
- function no(e, t, n, r) {
4934
+ function so(e, t, n, r) {
4761
4935
  let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
4762
4936
  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}`;
4763
4937
  }
4764
- function ro(e, t, n) {
4938
+ function co(e, t, n) {
4765
4939
  return Math.max(t, Math.min(n, e));
4766
4940
  }
4767
- function io(e) {
4941
+ function lo(e) {
4768
4942
  let t = Date.now() - e, n = Math.floor(t / 1e3);
4769
4943
  if (n < 60) return "just now";
4770
4944
  let r = Math.floor(n / 60);
@@ -4781,7 +4955,7 @@ function io(e) {
4781
4955
  year: "numeric"
4782
4956
  });
4783
4957
  }
4784
- function ao(e) {
4958
+ function uo(e) {
4785
4959
  return new Date(e).toLocaleDateString([], {
4786
4960
  month: "long",
4787
4961
  day: "numeric",
@@ -4792,19 +4966,35 @@ function ao(e) {
4792
4966
  }
4793
4967
  //#endregion
4794
4968
  //#region src/runtime/ui/app.tsx
4795
- function oo(e) {
4796
- return !e.token || e.tokenExpiresAt == null ? null : {
4969
+ function fo(e) {
4970
+ let t = {
4797
4971
  clientId: `markup_user_${e.identity.id}`,
4798
- token: e.token,
4799
- tokenExpiresAt: e.tokenExpiresAt,
4800
4972
  name: e.identity.name,
4801
4973
  email: e.identity.email
4802
4974
  };
4975
+ if (e.mode === "cookies") return e.tokenExpiresAt == null || e.refreshTokenExpiresAt == null ? null : {
4976
+ storage: "cookies",
4977
+ ...t,
4978
+ tokenExpiresAt: e.tokenExpiresAt,
4979
+ refreshTokenExpiresAt: e.refreshTokenExpiresAt
4980
+ };
4981
+ if (!e.token || e.tokenExpiresAt == null) return null;
4982
+ let n = typeof e.refreshToken == "string" && typeof e.refreshTokenExpiresAt == "number";
4983
+ return {
4984
+ storage: "localStorage",
4985
+ ...t,
4986
+ token: e.token,
4987
+ tokenExpiresAt: e.tokenExpiresAt,
4988
+ ...n ? {
4989
+ refreshToken: e.refreshToken,
4990
+ refreshTokenExpiresAt: e.refreshTokenExpiresAt
4991
+ } : {}
4992
+ };
4803
4993
  }
4804
- function so() {
4994
+ function po() {
4805
4995
  return window.location.host + window.location.pathname;
4806
4996
  }
4807
- var co = ar({
4997
+ var mo = ar({
4808
4998
  visible: {
4809
4999
  "hide-with-toast": () => ({ kind: "hidden-with-toast" }),
4810
5000
  toggle: () => ({ kind: "hidden" })
@@ -4815,26 +5005,26 @@ var co = ar({
4815
5005
  },
4816
5006
  hidden: { toggle: () => ({ kind: "visible" }) }
4817
5007
  });
4818
- function $(e) {
4819
- return Gr(e), e;
5008
+ function ho(e) {
5009
+ return qr(e), e;
4820
5010
  }
4821
- var lo = ar({
5011
+ var go = ar({
4822
5012
  unresolved: {
4823
- "mint-success": (e, t) => $({
5013
+ "mint-success": (e, t) => ho({
4824
5014
  kind: "anon",
4825
5015
  identity: t.identity
4826
5016
  }),
4827
- "signed-in": (e, t) => $({
5017
+ "signed-in": (e, t) => ho({
4828
5018
  kind: "verified",
4829
5019
  identity: t.identity
4830
5020
  })
4831
5021
  },
4832
5022
  anon: {
4833
- "signed-in": (e, t) => $({
5023
+ "signed-in": (e, t) => ho({
4834
5024
  kind: "verified",
4835
5025
  identity: t.identity
4836
5026
  }),
4837
- "author-set": (e, t) => $({
5027
+ "author-set": (e, t) => ho({
4838
5028
  kind: "anon",
4839
5029
  identity: {
4840
5030
  ...e.identity,
@@ -4844,11 +5034,11 @@ var lo = ar({
4844
5034
  })
4845
5035
  },
4846
5036
  verified: {
4847
- "signed-in": (e, t) => $({
5037
+ "signed-in": (e, t) => ho({
4848
5038
  kind: "verified",
4849
5039
  identity: t.identity
4850
5040
  }),
4851
- unauthorized: (e) => $({
5041
+ unauthorized: (e) => ho({
4852
5042
  kind: "recovering",
4853
5043
  preserved: {
4854
5044
  name: e.identity.name,
@@ -4857,31 +5047,47 @@ var lo = ar({
4857
5047
  })
4858
5048
  },
4859
5049
  recovering: {
4860
- "mint-success": (e, t) => $({
5050
+ "mint-success": (e, t) => ho({
4861
5051
  kind: "anon",
4862
5052
  identity: t.identity
4863
5053
  }),
4864
- "signed-in": (e, t) => $({
5054
+ "signed-in": (e, t) => ho({
4865
5055
  kind: "verified",
4866
5056
  identity: t.identity
4867
5057
  })
4868
5058
  }
4869
5059
  });
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({
5060
+ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "default", screenshots: i }) {
5061
+ let [a, o] = L(po), [s, c] = L([]), [l, u] = L(!1), d = we(() => Kr(), []), [f, p] = or(go, d.state), [m, h] = L(null);
5062
+ R(() => {
5063
+ let n = !1;
5064
+ return Ir(e, t).then((e) => {
5065
+ n || h(e);
5066
+ }), () => {
5067
+ n = !0;
5068
+ };
5069
+ }, [e, t]);
5070
+ let [g, _] = L(n), v = z(f);
5071
+ v.current = f, Na(f, e, t, (e) => p({
5072
+ type: "signed-in",
5073
+ identity: e
5074
+ }), () => p({ type: "unauthorized" }));
5075
+ let y = we(() => Nr({
4874
5076
  apiUrl: e,
4875
5077
  apiKey: t,
4876
5078
  getToken: () => {
4877
- let e = g.current;
4878
- return e.kind === "verified" ? {
5079
+ let e = v.current;
5080
+ return e.kind !== "verified" || e.identity.token == null ? null : {
4879
5081
  token: e.identity.token,
4880
5082
  expiresAt: e.identity.tokenExpiresAt
4881
- } : null;
5083
+ };
5084
+ },
5085
+ getStorageMode: () => {
5086
+ let e = v.current;
5087
+ return e.kind === "verified" ? e.identity.storage : null;
4882
5088
  },
4883
5089
  getAnonToken: () => {
4884
- let e = g.current;
5090
+ let e = v.current;
4885
5091
  return e.kind === "anon" ? e.identity.anonToken : null;
4886
5092
  },
4887
5093
  onUnauthorized: () => {
@@ -4891,12 +5097,12 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
4891
5097
  e,
4892
5098
  t,
4893
5099
  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);
4895
- z(() => {
5100
+ ]), [b, x] = L({ kind: "idle" }), S = cr(), C = cr(), w = cr(), { run: T, reset: E } = S, { run: D } = C, { run: O, reset: k } = w, A = S.isPending, j = S.error ?? C.error ?? w.error, [M, N] = or(mo, { kind: "visible" }), ee = M.kind !== "visible", [te, ne] = L(0), re = z(null), ie = Yr(f), ae = f.kind === "verified", oe = f.kind === "unresolved" || f.kind === "recovering", P = Jr(f);
5101
+ R(() => {
4896
5102
  if (f.kind !== "unresolved" && f.kind !== "recovering") return;
4897
5103
  let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
4898
5104
  function i() {
4899
- _.mintAnonIdentity().then(({ clientId: n, token: r }) => {
5105
+ y.mintAnonIdentity().then(({ clientId: n, token: r }) => {
4900
5106
  t || p({
4901
5107
  type: "mint-success",
4902
5108
  identity: {
@@ -4914,59 +5120,59 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
4914
5120
  t = !0, n && clearTimeout(n);
4915
5121
  };
4916
5122
  }, [
4917
- _,
5123
+ y,
4918
5124
  f,
4919
5125
  p,
4920
5126
  d
4921
5127
  ]);
4922
- let ae = Oa(_), [oe, se] = R(null);
4923
- z(() => {
5128
+ let se = ka(y), [ce, le] = L(null);
5129
+ R(() => {
4924
5130
  let t = new ir(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
4925
- return se(t), () => {
4926
- t.close(), se((e) => e === t ? null : e);
5131
+ return le(t), () => {
5132
+ t.close(), le((e) => e === t ? null : e);
4927
5133
  };
4928
5134
  }, [e]);
4929
- let ce = B(!1);
4930
- z(() => {
4931
- if (!(!oe || !ae)) return w(), D(), oe.onUpdate(Jt("widget/queries:subscribeThreadsForRoute"), {
4932
- subscriptionToken: ae,
5135
+ let ue = z(!1);
5136
+ R(() => {
5137
+ if (!(!ce || !se)) return E(), k(), ce.onUpdate(Jt("widget/queries:subscribeThreadsForRoute"), {
5138
+ subscriptionToken: se,
4933
5139
  route: a,
4934
5140
  viewerClientId: P
4935
5141
  }, (e) => {
4936
5142
  e !== void 0 && (c(e), u(!0));
4937
5143
  });
4938
5144
  }, [
4939
- oe,
4940
- ae,
5145
+ ce,
5146
+ se,
4941
5147
  a,
4942
5148
  P,
4943
- w,
4944
- D
4945
- ]), z(() => {
4946
- if (ce.current || !l) return;
5149
+ E,
5150
+ k
5151
+ ]), R(() => {
5152
+ if (ue.current || !l) return;
4947
5153
  let e = window.location.hash.match(/^#markup-thread=(.+)$/);
4948
5154
  if (e) {
4949
5155
  let t = decodeURIComponent(e[1] ?? "");
4950
- s.find((e) => e._id === t) && y({
5156
+ s.find((e) => e._id === t) && x({
4951
5157
  kind: "thread",
4952
5158
  threadId: t
4953
5159
  }), history.replaceState(null, "", window.location.pathname + window.location.search);
4954
5160
  }
4955
- ce.current = !0;
4956
- }, [s, l]), z(() => Br(() => o(so())), []), z(() => {
5161
+ ue.current = !0;
5162
+ }, [s, l]), R(() => Hr(() => o(po())), []), R(() => {
4957
5163
  function e(e) {
4958
- e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), j({ type: "toggle" })));
5164
+ e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), N({ type: "toggle" })));
4959
5165
  }
4960
5166
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
4961
- }, [j]), z(() => {
4962
- if (A.kind !== "hidden-with-toast") return;
4963
- let e = window.setTimeout(() => j({ type: "dismiss-toast" }), 5e3);
5167
+ }, [N]), R(() => {
5168
+ if (M.kind !== "hidden-with-toast") return;
5169
+ let e = window.setTimeout(() => N({ type: "dismiss-toast" }), 5e3);
4964
5170
  return () => window.clearTimeout(e);
4965
- }, [A.kind, j]), z(() => {
5171
+ }, [M.kind, N]), R(() => {
4966
5172
  let e = null;
4967
5173
  function t() {
4968
5174
  e ??= requestAnimationFrame(() => {
4969
- e = null, ee((e) => e + 1);
5175
+ e = null, ne((e) => e + 1);
4970
5176
  });
4971
5177
  }
4972
5178
  window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
@@ -4975,14 +5181,14 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
4975
5181
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
4976
5182
  };
4977
5183
  }, []);
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;
5184
+ let de = B(() => {
5185
+ E(), k(), x({ kind: "placing" });
5186
+ }, [E, k]), F = B(() => {
5187
+ x({ kind: "idle" }), E(), k();
5188
+ }, [E, k]), fe = z(0), pe = B((e, t, n) => {
5189
+ let r = t + window.scrollX, a = n + window.scrollY, o = ++fe.current;
4984
5190
  if (i?.enabled === !1) {
4985
- y({
5191
+ x({
4986
5192
  kind: "composing-new",
4987
5193
  coords: e,
4988
5194
  pageX: r,
@@ -4995,7 +5201,7 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
4995
5201
  });
4996
5202
  return;
4997
5203
  }
4998
- y({
5204
+ x({
4999
5205
  kind: "composing-new",
5000
5206
  coords: e,
5001
5207
  pageX: r,
@@ -5006,15 +5212,15 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5006
5212
  screenshotRedactedSelectors: [],
5007
5213
  captureToken: o
5008
5214
  });
5009
- let s = te.current != null && te.current.getRootNode() instanceof ShadowRoot ? te.current.getRootNode().host : null, c = {
5215
+ let s = re.current != null && re.current.getRootNode() instanceof ShadowRoot ? re.current.getRootNode().host : null, c = {
5010
5216
  strictScrub: i?.strictScrub,
5011
5217
  redactSelector: i?.redactSelector
5012
5218
  };
5013
- xa(s, {
5219
+ Sa(s, {
5014
5220
  x: t,
5015
5221
  y: n
5016
5222
  }, c).then((e) => {
5017
- y((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
5223
+ x((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
5018
5224
  ...t,
5019
5225
  screenshot: e?.blob ?? null,
5020
5226
  isScreenshotCapturing: !1,
@@ -5022,15 +5228,19 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5022
5228
  screenshotRedactedSelectors: e?.redactedSelectors ?? []
5023
5229
  });
5024
5230
  });
5025
- }, [i]), fe = V((e, t) => {
5231
+ }, [i]), me = B((e, t) => {
5026
5232
  p({
5027
5233
  type: "author-set",
5028
5234
  name: e,
5029
5235
  email: t
5030
5236
  });
5031
- }, [p]), pe = x.isPending, me = V(async () => {
5032
- await T(async () => {
5033
- let n = oo(await Yr(e, t));
5237
+ }, [p]), he = C.isPending, I = B(async () => {
5238
+ await D(async () => {
5239
+ let n = fo(await Zr({
5240
+ apiUrl: e,
5241
+ apiKey: t,
5242
+ useCookies: m === !0
5243
+ }));
5034
5244
  if (!n) throw Error("Sign-in did not return a verified token");
5035
5245
  p({
5036
5246
  type: "signed-in",
@@ -5040,78 +5250,79 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5040
5250
  }, [
5041
5251
  e,
5042
5252
  t,
5043
- T,
5253
+ m,
5254
+ D,
5044
5255
  p
5045
- ]), he = V(async (e, t) => {
5046
- if (v.kind !== "composing-new") return;
5047
- let n = Jr(f);
5048
- n && await C(async () => {
5256
+ ]), ge = B(async (e, t) => {
5257
+ if (b.kind !== "composing-new") return;
5258
+ let n = Xr(f);
5259
+ n && await T(async () => {
5049
5260
  let r;
5050
- if (t && v.screenshot) {
5051
- let { uploadUrl: e } = await _.getScreenshotUploadUrl(), t = await fetch(e, {
5261
+ if (t && b.screenshot) {
5262
+ let { uploadUrl: e } = await y.getScreenshotUploadUrl(), t = await fetch(e, {
5052
5263
  method: "POST",
5053
- headers: { "Content-Type": v.screenshot.type || "image/png" },
5054
- body: v.screenshot
5264
+ headers: { "Content-Type": b.screenshot.type || "image/png" },
5265
+ body: b.screenshot
5055
5266
  });
5056
5267
  if (!t.ok) throw Error(`Screenshot upload failed (${t.status})`);
5057
5268
  let { storageId: n } = await t.json();
5058
5269
  r = n;
5059
5270
  }
5060
- let i = await _.createThread({
5271
+ let i = await y.createThread({
5061
5272
  url: window.location.href,
5062
5273
  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,
5274
+ anchorSelector: b.coords.anchorSelector,
5275
+ anchorX: b.coords.anchorX,
5276
+ anchorY: b.coords.anchorY,
5277
+ anchorOffsetX: b.coords.anchorOffsetX,
5278
+ anchorOffsetY: b.coords.anchorOffsetY,
5279
+ viewportW: b.coords.viewportW,
5280
+ viewportY: b.coords.viewportY,
5070
5281
  userAgent: navigator.userAgent,
5071
5282
  authorName: n.name,
5072
5283
  authorEmail: n.email,
5073
5284
  body: e,
5074
5285
  screenshotStorageId: r
5075
5286
  });
5076
- c((e) => [...e, i.thread]), y({
5287
+ c((e) => [...e, i.thread]), x({
5077
5288
  kind: "thread",
5078
5289
  threadId: i.thread._id
5079
5290
  });
5080
5291
  });
5081
5292
  }, [
5082
- _,
5293
+ y,
5083
5294
  f,
5084
- v,
5295
+ b,
5085
5296
  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" });
5297
+ T
5298
+ ]), _e = B(async () => {
5299
+ if (b.kind !== "thread") return;
5300
+ let e = b.threadId;
5301
+ await T(async () => {
5302
+ await y.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), x({ kind: "idle" });
5092
5303
  });
5093
5304
  }, [
5094
- _,
5095
- v,
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" });
5305
+ y,
5306
+ b,
5307
+ T
5308
+ ]), ve = B(async () => {
5309
+ if (b.kind !== "thread") return;
5310
+ let e = b.threadId;
5311
+ await T(async () => {
5312
+ await y.resolveThread(e, P), c((t) => t.filter((t) => t._id !== e)), x({ kind: "idle" });
5102
5313
  });
5103
5314
  }, [
5104
- _,
5105
- v,
5315
+ y,
5316
+ b,
5106
5317
  P,
5107
- C
5108
- ]), _e = V(async (e) => {
5109
- if (v.kind !== "thread") return;
5110
- let t = Jr(f);
5318
+ T
5319
+ ]), ye = B(async (e) => {
5320
+ if (b.kind !== "thread") return;
5321
+ let t = Xr(f);
5111
5322
  if (!t) return;
5112
- let n = v.threadId;
5113
- await C(async () => {
5114
- let r = await _.addComment(n, {
5323
+ let n = b.threadId;
5324
+ await T(async () => {
5325
+ let r = await y.addComment(n, {
5115
5326
  body: e,
5116
5327
  authorName: t.name,
5117
5328
  authorEmail: t.email
@@ -5119,52 +5330,52 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5119
5330
  c((e) => e.map((e) => e._id === n ? r.thread : e));
5120
5331
  });
5121
5332
  }, [
5122
- _,
5333
+ y,
5123
5334
  f,
5124
- v,
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 });
5335
+ b,
5336
+ T
5337
+ ]), be = B(async (e, t) => {
5338
+ if (b.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
5339
+ let n = b.threadId;
5340
+ await T(async () => {
5341
+ let r = await y.editComment(n, e, { body: t });
5131
5342
  c((e) => e.map((e) => e._id === n ? r.thread : e));
5132
5343
  }, { rethrow: !0 });
5133
5344
  }, [
5134
- _,
5345
+ y,
5135
5346
  f,
5136
- v,
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);
5347
+ b,
5348
+ T
5349
+ ]), xe = B(async (e) => {
5350
+ if (b.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
5351
+ let t = b.threadId;
5352
+ await T(async () => {
5353
+ let n = await y.deleteComment(t, e);
5143
5354
  c((e) => e.map((e) => e._id === t ? n.thread : e));
5144
5355
  });
5145
5356
  }, [
5146
- _,
5357
+ y,
5147
5358
  f,
5148
- v,
5149
- C
5150
- ]), be = V(async (e, t) => {
5151
- if (v.kind !== "thread") return;
5152
- let n = Jr(f);
5359
+ b,
5360
+ T
5361
+ ]), Se = B(async (e, t) => {
5362
+ if (b.kind !== "thread") return;
5363
+ let n = Xr(f);
5153
5364
  if (!n) return;
5154
- let r = v.threadId;
5155
- await E(async () => {
5156
- let i = await _.toggleReaction(e, {
5365
+ let r = b.threadId;
5366
+ await O(async () => {
5367
+ let i = await y.toggleReaction(e, {
5157
5368
  emoji: t,
5158
5369
  authorName: n.name
5159
5370
  });
5160
5371
  c((e) => e.map((e) => e._id === r ? i.thread : e));
5161
5372
  });
5162
5373
  }, [
5163
- _,
5374
+ y,
5164
5375
  f,
5165
- v,
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) => ({
5376
+ b,
5377
+ O
5378
+ ]), Ce = b.kind === "thread" ? s.find((e) => e._id === b.threadId) ?? null : null, Te = ae || P != null && P === Ce?.authorClientId, Ee = we(() => s.map((e) => ({
5168
5379
  thread: e,
5169
5380
  point: Ar({
5170
5381
  anchorX: e.anchorX,
@@ -5173,13 +5384,13 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5173
5384
  anchorOffsetX: e.anchorOffsetX,
5174
5385
  anchorOffsetY: e.anchorOffsetY
5175
5386
  })
5176
- })), [s, N]), we = Se.some((e) => !e.point.resolved);
5177
- return z(() => {
5178
- if (!we) return;
5387
+ })), [s, te]), De = Ee.some((e) => !e.point.resolved);
5388
+ return R(() => {
5389
+ if (!De) return;
5179
5390
  let e = null;
5180
5391
  function t() {
5181
5392
  e ??= requestAnimationFrame(() => {
5182
- e = null, ee((e) => e + 1);
5393
+ e = null, ne((e) => e + 1);
5183
5394
  });
5184
5395
  }
5185
5396
  let n = new MutationObserver(t);
@@ -5189,104 +5400,104 @@ function uo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5189
5400
  }), () => {
5190
5401
  n.disconnect(), e != null && cancelAnimationFrame(e);
5191
5402
  };
5192
- }, [we]), z(() => {
5193
- v.kind === "thread" && L == null && ue();
5403
+ }, [De]), R(() => {
5404
+ b.kind === "thread" && Ce == null && F();
5194
5405
  }, [
5195
- v,
5196
- L,
5197
- ue
5198
- ]), /* @__PURE__ */ Q("div", {
5406
+ b,
5407
+ Ce,
5408
+ F
5409
+ ]), /* @__PURE__ */ $("div", {
5199
5410
  class: "markup-root",
5200
- ref: te,
5411
+ ref: re,
5201
5412
  children: [
5202
- v.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
5413
+ b.kind === "placing" ? null : /* @__PURE__ */ $("div", {
5203
5414
  class: "markup-pins-layer",
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, {
5415
+ children: [ee ? null : Ee.map(({ thread: e, point: t }) => {
5416
+ let n = b.kind === "thread" && b.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
5417
+ return /* @__PURE__ */ $($a, {
5207
5418
  pageX: t.pageX,
5208
5419
  pageY: t.pageY,
5209
5420
  count: r,
5210
5421
  isActive: n,
5211
5422
  isUnresolved: !t.resolved,
5212
- onClick: () => y({
5423
+ onClick: () => x({
5213
5424
  kind: "thread",
5214
5425
  threadId: e._id
5215
5426
  })
5216
5427
  }, e._id);
5217
- }), v.kind === "composing-new" ? /* @__PURE__ */ Q(Ya, {
5218
- pageX: v.pageX,
5219
- pageY: v.pageY
5428
+ }), b.kind === "composing-new" ? /* @__PURE__ */ $(eo, {
5429
+ pageX: b.pageX,
5430
+ pageY: b.pageY
5220
5431
  }) : null]
5221
5432
  }),
5222
- v.kind === "placing" ? /* @__PURE__ */ Q(Xa, {
5223
- onPlace: F,
5224
- onCancel: ue
5433
+ b.kind === "placing" ? /* @__PURE__ */ $(to, {
5434
+ onPlace: pe,
5435
+ onCancel: F
5225
5436
  }) : null,
5226
- v.kind === "thread" && L ? /* @__PURE__ */ Q($a, {
5227
- thread: L,
5228
- authorName: ne,
5437
+ b.kind === "thread" && Ce ? /* @__PURE__ */ $(io, {
5438
+ thread: Ce,
5439
+ authorName: ie,
5229
5440
  currentClientId: P ?? null,
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
5441
+ isVerified: ae,
5442
+ isIdentityResolving: oe,
5443
+ isSigningIn: he,
5444
+ canDelete: Te,
5445
+ isPending: A,
5446
+ error: j,
5447
+ isHidden: ee,
5448
+ onAuthor: me,
5449
+ onSignIn: I,
5450
+ onClose: F,
5451
+ onReply: ye,
5452
+ onEditComment: be,
5453
+ onDeleteComment: xe,
5454
+ onToggleReaction: Se,
5455
+ onDelete: _e,
5456
+ onResolve: ve
5457
+ }, Ce._id) : null,
5458
+ b.kind === "composing-new" ? /* @__PURE__ */ $(Za, {
5459
+ pageX: b.pageX,
5460
+ pageY: b.pageY,
5461
+ authorName: ie,
5462
+ isVerified: ae,
5463
+ isIdentityResolving: oe,
5464
+ isSigningIn: he,
5465
+ isPending: A,
5466
+ error: j,
5467
+ screenshot: b.screenshot,
5468
+ isScreenshotCapturing: b.isScreenshotCapturing,
5469
+ screenshotRedactedCount: b.screenshotRedactedCount,
5470
+ screenshotRedactedSelectors: b.screenshotRedactedSelectors,
5471
+ onAuthor: me,
5472
+ onSignIn: I,
5473
+ onSubmit: ge,
5474
+ onClose: F
5264
5475
  }) : null,
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,
5476
+ !ee || b.kind === "placing" || b.kind === "composing-new" ? /* @__PURE__ */ $(Wa, {
5477
+ isActive: b.kind === "placing",
5478
+ onToggle: () => b.kind === "placing" ? F() : de(),
5479
+ onHide: () => N({ type: "hide-with-toast" }),
5480
+ position: g,
5481
+ onPositionChange: _,
5271
5482
  variant: r
5272
5483
  }) : null,
5273
- A.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(fo, { position: m }) : null
5484
+ M.kind === "hidden-with-toast" ? /* @__PURE__ */ $(vo, { position: g }) : null
5274
5485
  ]
5275
5486
  });
5276
5487
  }
5277
- function fo({ position: e }) {
5488
+ function vo({ position: e }) {
5278
5489
  let t = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘" : "Ctrl";
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"),
5490
+ return /* @__PURE__ */ $("div", {
5491
+ class: Q("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"),
5281
5492
  role: "status",
5282
5493
  "aria-live": "polite",
5283
5494
  children: [
5284
5495
  "Markup hidden — press ",
5285
- /* @__PURE__ */ Q("kbd", {
5496
+ /* @__PURE__ */ $("kbd", {
5286
5497
  class: "markup-kbd",
5287
5498
  children: t
5288
5499
  }),
5289
- /* @__PURE__ */ Q("kbd", {
5500
+ /* @__PURE__ */ $("kbd", {
5290
5501
  class: "markup-kbd",
5291
5502
  children: "."
5292
5503
  }),
@@ -5296,7 +5507,7 @@ function fo({ position: e }) {
5296
5507
  }
5297
5508
  //#endregion
5298
5509
  //#region src/runtime/mount.tsx
5299
- function po(e, t) {
5510
+ function yo(e, t) {
5300
5511
  e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
5301
5512
  let n = t.theme ?? "auto";
5302
5513
  n !== "auto" && (e.dataset.theme = n);
@@ -5305,32 +5516,32 @@ function po(e, t) {
5305
5516
  let a = document.createElement("div");
5306
5517
  a.className = "markup-shadow-root", r.appendChild(a);
5307
5518
  let { theme: o, ...s } = t;
5308
- return le(/* @__PURE__ */ Q(uo, { ...s }), a), () => le(null, a);
5519
+ return le(/* @__PURE__ */ $(_o, { ...s }), a), () => le(null, a);
5309
5520
  }
5310
5521
  //#endregion
5311
5522
  //#region src/widget.ts
5312
- var mo = null, ho = null, go = null;
5313
- function _o(e) {
5523
+ var bo = null, xo = null, So = null;
5524
+ function Co(e) {
5314
5525
  if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
5315
- vo();
5526
+ wo();
5316
5527
  let t = () => {
5317
- if (go = null, !document.body) return;
5528
+ if (So = null, !document.body) return;
5318
5529
  let t = document.createElement("div");
5319
- t.id = "markup-widget", document.body.appendChild(t), ho = t, mo = po(t, e);
5530
+ t.id = "markup-widget", document.body.appendChild(t), xo = t, bo = yo(t, e);
5320
5531
  };
5321
5532
  if (document.readyState === "loading" || !document.body) {
5322
5533
  let e = () => t();
5323
- go = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
5534
+ So = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
5324
5535
  } else t();
5325
- return vo;
5536
+ return wo;
5326
5537
  }
5327
- function vo() {
5328
- go &&= (go(), null), mo &&= (mo(), null), ho?.parentNode && ho.parentNode.removeChild(ho), ho = null;
5538
+ function wo() {
5539
+ So &&= (So(), null), bo &&= (bo(), null), xo?.parentNode && xo.parentNode.removeChild(xo), xo = null;
5329
5540
  }
5330
5541
  if (typeof document < "u") {
5331
5542
  let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
5332
5543
  if (t && n) {
5333
- let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => _o({
5544
+ let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => Co({
5334
5545
  apiUrl: t,
5335
5546
  apiKey: n,
5336
5547
  position: r,
@@ -5341,6 +5552,6 @@ if (typeof document < "u") {
5341
5552
  }
5342
5553
  }
5343
5554
  //#endregion
5344
- export { vo as destroy, _o as init };
5555
+ export { wo as destroy, Co as init };
5345
5556
 
5346
5557
  //# sourceMappingURL=widget.js.map