@pixelmatters/markup 1.16.0 → 1.17.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
@@ -45,7 +45,7 @@ function w(e, t) {
45
45
  function T(e) {
46
46
  if (e.__P && e.__d) {
47
47
  var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
48
- o.__v = n.__v + 1, t.vnode && t.vnode(o), ae(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, se(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
48
+ o.__v = n.__v + 1, t.vnode && t.vnode(o), ie(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, oe(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
49
49
  }
50
50
  }
51
51
  function E(e) {
@@ -65,13 +65,13 @@ function O() {
65
65
  }
66
66
  function ee(e, t, n, r, i, a, o, s, c, l, u) {
67
67
  var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
68
- for (c = te(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = ae(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && ue(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = k(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
68
+ for (c = te(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = ie(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && le(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = k(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
69
69
  return n.__e = _, c;
70
70
  }
71
71
  function te(e, t, n, r, i) {
72
72
  var a, o, s, c, l, u = n.length, d = u, f = 0;
73
- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = ne(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
74
- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), de(s, s));
73
+ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = A(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
74
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), ue(s, s));
75
75
  return r;
76
76
  }
77
77
  function k(e, t, n, r) {
@@ -86,7 +86,7 @@ function k(e, t, n, r) {
86
86
  while (t != null && t.nodeType == 8);
87
87
  return t;
88
88
  }
89
- function ne(e, t, n, r) {
89
+ function A(e, t, n, r) {
90
90
  var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && (2 & l.__u) == 0;
91
91
  if (l === null && s == null || u && s == l.key && c == l.type) return n;
92
92
  if (r > +!!u) {
@@ -94,15 +94,15 @@ function ne(e, t, n, r) {
94
94
  }
95
95
  return -1;
96
96
  }
97
- function A(e, t, n) {
97
+ function j(e, t, n) {
98
98
  t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || g.test(t) ? n : n + "px";
99
99
  }
100
- function re(e, t, n, r, i) {
100
+ function ne(e, t, n, r, i) {
101
101
  var a, o;
102
102
  n: if (t == "style") if (typeof n == "string") e.style.cssText = n;
103
103
  else {
104
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || A(e.style, t, "");
105
- if (n) for (t in n) r && n[t] == r[t] || A(e.style, t, n[t]);
104
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || j(e.style, t, "");
105
+ if (n) for (t in n) r && n[t] == r[t] || j(e.style, t, n[t]);
106
106
  }
107
107
  else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(u, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[l] = r[l] : (n[l] = d, e.addEventListener(t, a ? p : f, a)) : e.removeEventListener(t, a ? p : f, a);
108
108
  else {
@@ -114,7 +114,7 @@ function re(e, t, n, r, i) {
114
114
  typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
115
115
  }
116
116
  }
117
- function ie(e) {
117
+ function re(e) {
118
118
  return function(n) {
119
119
  if (this.l) {
120
120
  var r = this.l[n.type + e];
@@ -124,14 +124,14 @@ function ie(e) {
124
124
  }
125
125
  };
126
126
  }
127
- function ae(e, n, r, i, a, o, s, c, l, u) {
128
- var d, f, p, m, g, b, x, w, T, E, D, O, te, k, ne, A = n.type;
127
+ function ie(e, n, r, i, a, o, s, c, l, u) {
128
+ var d, f, p, m, g, b, x, w, T, E, D, O, te, k, A, j = n.type;
129
129
  if (n.constructor !== void 0) return null;
130
130
  128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
131
- n: if (typeof A == "function") try {
132
- if (w = n.props, T = A.prototype && A.prototype.render, E = (d = A.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = n.__c = r.__c).__ = f.__E : (T ? n.__c = f = new A(w, D) : (n.__c = f = new C(w, D), f.constructor = A, f.render = fe), E && E.sub(f), f.state ||= {}, f.__n = i, p = f.__d = !0, f.__h = [], f._sb = []), T && f.__s == null && (f.__s = f.state), T && A.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = v({}, f.__s)), v(f.__s, A.getDerivedStateFromProps(w, f.__s))), m = f.props, g = f.state, f.__v = n, p) T && A.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), T && f.componentDidMount != null && f.__h.push(f.componentDidMount);
131
+ n: if (typeof j == "function") try {
132
+ if (w = n.props, T = j.prototype && j.prototype.render, E = (d = j.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = n.__c = r.__c).__ = f.__E : (T ? n.__c = f = new j(w, D) : (n.__c = f = new C(w, D), f.constructor = j, f.render = de), E && E.sub(f), f.state ||= {}, f.__n = i, p = f.__d = !0, f.__h = [], f._sb = []), T && f.__s == null && (f.__s = f.state), T && j.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = v({}, f.__s)), v(f.__s, j.getDerivedStateFromProps(w, f.__s))), m = f.props, g = f.state, f.__v = n, p) T && j.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), T && f.componentDidMount != null && f.__h.push(f.componentDidMount);
133
133
  else {
134
- if (T && A.getDerivedStateFromProps == null && w !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(w, D), n.__v == r.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(w, f.__s, D)) {
134
+ if (T && j.getDerivedStateFromProps == null && w !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(w, D), n.__v == r.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(w, f.__s, D)) {
135
135
  n.__v != r.__v && (f.props = w, f.state = f.__s, f.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
136
136
  e && (e.__ = n);
137
137
  }), h.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && s.push(f);
@@ -145,26 +145,26 @@ function ae(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 && ++te < 25);
148
- f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), k = d != null && d.type === S && d.key == null ? ce(d.props.children) : d, c = ee(e, _(k) ? k : [k], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
148
+ f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), k = d != null && d.type === S && d.key == null ? se(d.props.children) : d, c = ee(e, _(k) ? k : [k], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
149
149
  } catch (e) {
150
150
  if (n.__v = null, l || o != null) if (e.then) {
151
151
  for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
152
152
  o[o.indexOf(c)] = null, n.__e = c;
153
153
  } else {
154
- for (ne = o.length; ne--;) y(o[ne]);
155
- oe(n);
154
+ for (A = o.length; A--;) y(o[A]);
155
+ ae(n);
156
156
  }
157
- else n.__e = r.__e, n.__k = r.__k, e.then || oe(n);
157
+ else n.__e = r.__e, n.__k = r.__k, e.then || ae(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 = le(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 = ce(r.__e, n, r, i, a, o, s, l, u);
161
161
  return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
162
162
  }
163
- function oe(e) {
164
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(oe));
163
+ function ae(e) {
164
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ae));
165
165
  }
166
- function se(e, n, r) {
167
- for (var i = 0; i < r.length; i++) ue(r[i], r[++i], r[++i]);
166
+ function oe(e, n, r) {
167
+ for (var i = 0; i < r.length; i++) le(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 se(e, n, r) {
175
175
  }
176
176
  });
177
177
  }
178
- function ce(e) {
179
- return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ce) : v({}, e);
178
+ function se(e) {
179
+ return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(se) : v({}, e);
180
180
  }
181
- function le(n, r, i, a, o, s, c, l, u) {
181
+ function ce(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)) {
@@ -193,15 +193,15 @@ function le(n, r, i, a, o, s, c, l, u) {
193
193
  if (C == null) x === S || l && n.data == S || (n.data = S);
194
194
  else {
195
195
  if (s &&= e.call(n.childNodes), !l && s != null) for (x = {}, d = 0; d < n.attributes.length; d++) x[(g = n.attributes[d]).name] = g.value;
196
- for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S || re(n, d, null, g, o);
197
- for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g || re(n, d, g, x[d], o);
196
+ for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S || ne(n, d, null, g, o);
197
+ for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g || ne(n, d, g, x[d], o);
198
198
  if (f) l || p && (f.__html == p.__html || f.__html == n.innerHTML) || (n.innerHTML = f.__html), r.__k = [];
199
199
  else if (p && (n.innerHTML = ""), ee(r.type == "template" ? n.content : n, _(h) ? h : [h], r, i, a, C == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : i.__k && w(i, 0), l, u), s != null) for (d = s.length; d--;) y(s[d]);
200
- l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && re(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && re(n, d, b, x[d], o));
200
+ l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && ne(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && ne(n, d, b, x[d], o));
201
201
  }
202
202
  return n;
203
203
  }
204
- function ue(e, n, r) {
204
+ function le(e, n, r) {
205
205
  try {
206
206
  if (typeof e == "function") {
207
207
  var i = typeof e.__u == "function";
@@ -211,9 +211,9 @@ function ue(e, n, r) {
211
211
  t.__e(e, r);
212
212
  }
213
213
  }
214
- function de(e, n, r) {
214
+ function ue(e, n, r) {
215
215
  var i, a;
216
- if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || ue(i, null, n)), (i = e.__c) != null) {
216
+ if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || le(i, null, n)), (i = e.__c) != null) {
217
217
  if (i.componentWillUnmount) try {
218
218
  i.componentWillUnmount();
219
219
  } catch (e) {
@@ -221,15 +221,15 @@ function de(e, n, r) {
221
221
  }
222
222
  i.base = i.__P = null;
223
223
  }
224
- if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && de(i[a], n, r || typeof e.type != "function");
224
+ if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && ue(i[a], n, r || typeof e.type != "function");
225
225
  r || y(e.__e), e.__c = e.__ = e.__e = void 0;
226
226
  }
227
- function fe(e, t, n) {
227
+ function de(e, t, n) {
228
228
  return this.constructor(e, n);
229
229
  }
230
- function pe(n, r, i) {
230
+ function fe(n, r, i) {
231
231
  var a, o, s, c;
232
- r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], ae(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), se(s, n, c);
232
+ r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], ie(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), oe(s, n, c);
233
233
  }
234
234
  e = h.slice, t = { __e: function(e, t, n, r) {
235
235
  for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
@@ -245,10 +245,10 @@ e = h.slice, t = { __e: function(e, t, n, r) {
245
245
  this.__v && (this.__e = !0, e && this.__h.push(e), D(this));
246
246
  }, C.prototype.render = S, r = [], a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, o = function(e, t) {
247
247
  return e.__v.__b - t.__v.__b;
248
- }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = ie(!1), p = ie(!0);
248
+ }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = re(!1), p = re(!0);
249
249
  //#endregion
250
250
  //#region src/styles.css?inline
251
- var me = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s;display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;display:inline-flex;position:absolute;top:0;right:0}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}.markup-kbd.is-inline{background:color-mix(in srgb, var(--markup-ink) 8%, transparent);min-width:14px;height:14px;color:var(--markup-muted);border-radius:3px;padding:0 3px;font-size:9.5px}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:360px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-popover-title{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:11px;line-height:1;overflow:hidden}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-header+.markup-popover-body{border-top:none}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;margin-top:-3px;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-avatar-initials{text-box-trim:trim-both;text-box-edge:cap alphabetic;line-height:1}.markup-avatar-img{object-fit:cover;width:100%;height:100%;display:block}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-badge.is-agent{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:normal;justify-content:center;width:14px;padding:0}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);align-items:center;gap:3px;font-size:10.5px;display:inline-flex}.markup-composer-hint-label{margin-left:2px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;align-items:center;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10px}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-toolbar,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-inbox-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-inbox-pop-right{right:22px}.markup-inbox-pop-left{left:22px}.markup-inbox-pop-center{left:50%;transform:translate(-50%)}.markup-inbox-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-inbox-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-inbox-pop .markup-notifications-panel-header{padding:12px 14px}.markup-inbox-pop .markup-notifications-panel-header .markup-icon-btn{display:none}", j = class extends C {
251
+ var pe = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:oklch(98.5% .002 250);--markup-surface-3:oklch(95% .003 250);--markup-hover:oklch(95% .003 250);--markup-ink:#1a1614;--markup-ink-soft:oklch(32% .005 250);--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-accent-soft:oklch(95% .04 60);--markup-accent-ink:oklch(45% .14 38);--markup-accent-glow:color-mix(in srgb, var(--markup-brand) 28%, transparent);--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-shadow-toolbar:0 1px 1px #0000000a, 0 4px 10px -2px #0f14281a, 0 18px 36px -12px #0f14282e;--markup-shadow-pop:0 1px 1px #0000000a, 0 8px 24px -6px #0f14281f, 0 28px 60px -18px #0f142838;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-success:oklch(62% .16 150);--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme])){--markup-paper:#1a1614;--markup-surface:oklch(16% .005 250);--markup-surface-2:oklch(20% .005 250);--markup-surface-3:oklch(24% .005 250);--markup-hover:oklch(24% .005 250);--markup-ink:#fdfcfa;--markup-ink-soft:oklch(80% .005 250);--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-accent-soft:color-mix(in srgb, var(--markup-brand) 22%, transparent);--markup-accent-ink:oklch(86% .13 55);--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-shadow-toolbar:0 1px 0 #ffffff0a inset, 0 1px 2px #0006, 0 12px 30px -10px #0000008c, 0 28px 60px -20px #00000080;--markup-shadow-pop:0 1px 0 #ffffff0a inset, 0 8px 24px -6px #00000073, 0 28px 60px -18px #0000008c;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-sr-only{clip:rect(0, 0, 0, 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-toolbar{z-index:10;background:var(--markup-surface);border:1px solid var(--markup-border);pointer-events:none;height:44px;box-shadow:var(--markup-shadow-toolbar);border-radius:9999px;align-items:center;gap:2px;padding:4px;transition:box-shadow .15s,left .22s cubic-bezier(.2,.7,.2,1),transform .22s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:fixed;bottom:22px;left:100%;transform:translate(calc(-100% - 22px))}.markup-toolbar>*{pointer-events:auto}.markup-tb-btn{width:36px;height:36px;color:var(--markup-ink-soft);cursor:pointer;touch-action:none;font-family:var(--markup-font);background:0 0;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;gap:6px;padding:0;font-size:13px;font-weight:500;transition:background .12s,color .12s;display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:focus-visible{box-shadow:0 0 0 2px var(--markup-surface), 0 0 0 4px var(--markup-accent-glow);outline:none}.markup-tb-btn[data-on=true]{background:var(--markup-ink);color:var(--markup-paper)}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}}:host([data-theme=dark]) .markup-tb-btn[data-on=true]{background:var(--markup-surface-3);color:var(--markup-ink)}.markup-tb-btn[data-armed=true]{background:var(--markup-brand);color:#fff}.markup-tb-btn[data-armed=true]:hover{background:var(--markup-brand-hover);color:#fff}.markup-tb-btn[disabled]{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);cursor:default}.markup-tb-btn[disabled]:hover{color:color-mix(in srgb, var(--markup-muted) 60%, transparent);background:0 0}.markup-tb-btn[data-kind=identity]{gap:6px;width:auto;padding:0 4px}.markup-tb-avatar{background:var(--markup-surface-3);width:28px;height:28px;font-family:var(--markup-font-mono);color:var(--markup-ink);border:1px solid var(--markup-border);border-radius:9999px;flex-shrink:0;justify-content:center;align-items:center;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-tb-avatar.is-anon{color:var(--markup-muted);background:var(--markup-surface-2)}.markup-tb-sep{background:var(--markup-border);flex-shrink:0;width:1px;height:20px;margin:0 4px}.markup-tb-badge{background:var(--markup-brand);color:#fff;min-width:16px;height:16px;font-family:var(--markup-font-mono);box-shadow:0 0 0 2px var(--markup-surface);pointer-events:none;border-radius:9999px;justify-content:center;align-items:center;padding:0 4px;font-size:9.5px;font-weight:600;line-height:1;display:inline-flex;position:absolute;top:0;right:0}.markup-toolbar-left{left:0;transform:translate(22px)}.markup-toolbar-center{left:50%;transform:translate(-50%)}.markup-toolbar-right{left:100%;transform:translate(calc(-100% - 22px))}.markup-pop{background:var(--markup-surface);border:1px solid var(--markup-border);box-shadow:var(--markup-shadow-pop);color:var(--markup-ink);z-index:11;border-radius:12px;font-size:13px;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:absolute;bottom:calc(100% + 8px);overflow:hidden}.markup-pop[data-pop=overflow]{width:260px;padding:6px}.markup-pop[data-pop=identity]{width:240px;padding:6px}.markup-pop[data-pop=inbox]{width:380px;padding:0}.markup-pop.is-anchor-right{right:0}.markup-pop.is-anchor-left{left:0}.markup-pop.is-anchor-center{left:50%;transform:translate(-50%)}@keyframes markup-pop-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.markup-pop.is-anchor-center{animation-name:markup-pop-in-center}@keyframes markup-pop-in-center{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}.markup-pop-group-label{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);text-transform:lowercase;padding:8px 10px 4px;font-size:10px}.markup-segmented-row{border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.markup-segmented-row .lbl{min-width:0;color:var(--markup-ink);flex:1;font-size:13px}.markup-segmented{background:var(--markup-surface-3);border-radius:7px;gap:2px;padding:2px;display:inline-flex}.markup-segmented button{font:inherit;width:28px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:inline-flex}.markup-segmented button:hover{color:var(--markup-ink)}.markup-segmented button.is-on{background:var(--markup-surface);color:var(--markup-ink);box-shadow:0 1px 2px #0000000d}.markup-menu-row{cursor:pointer;width:100%;color:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;font-family:inherit;font-size:13px;display:flex}.markup-menu-row:hover{background:var(--markup-hover)}.markup-menu-row:disabled{opacity:.5;cursor:default}.markup-menu-row:disabled:hover{background:0 0}.markup-menu-row .ic{width:16px;height:16px;color:var(--markup-muted);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.markup-menu-row .lbl{flex-direction:column;flex:1;min-width:0;display:flex}.markup-menu-row .lbl .sub{color:var(--markup-muted);margin-top:1px;font-size:11px}.markup-menu-row .right{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10.5px}.markup-menu-row.is-danger,.markup-menu-row.is-danger .ic{color:var(--markup-danger)}.markup-menu-row.is-danger:hover{background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-menu-row .switch{background:var(--markup-border-strong);border-radius:9999px;flex-shrink:0;width:26px;height:16px;transition:background .12s;position:relative}.markup-menu-row .switch:after{content:\"\";background:var(--markup-surface);border-radius:9999px;width:12px;height:12px;transition:left .12s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000026}.markup-menu-row[data-on=true] .switch{background:var(--markup-brand)}.markup-menu-row[data-on=true] .switch:after{left:12px}.markup-menu-divider{background:var(--markup-border);height:1px;margin:4px 0}.markup-brand-line{font-family:var(--markup-font-mono);color:var(--markup-muted);border-top:1px solid var(--markup-border);align-items:center;gap:8px;margin-top:6px;padding:8px 10px;font-size:10.5px;text-decoration:none;display:flex}.markup-brand-line:hover{color:var(--markup-ink)}.markup-brand-line svg{color:var(--markup-brand)}.markup-brand-line .ver{margin-left:auto}.markup-id-who{border-bottom:1px solid var(--markup-border);flex-direction:column;gap:2px;margin-bottom:4px;padding:10px 8px 12px;display:flex}.markup-id-who .nm{color:var(--markup-ink);font-size:13.5px;font-weight:600}.markup-id-who .em{font-family:var(--markup-font-mono);color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.markup-id-anon{text-align:left;flex-direction:column;gap:10px;padding:14px 10px;display:flex}.markup-id-anon .h{letter-spacing:-.005em;color:var(--markup-ink);font-size:14px;font-weight:600}.markup-id-anon .sub{color:var(--markup-muted);font-size:12.5px;line-height:18px}.markup-id-anon button:not(.markup-menu-row){background:var(--markup-ink);width:100%;color:var(--markup-paper);height:32px;font:inherit;cursor:pointer;border:none;border-radius:7px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.markup-id-anon button:disabled{opacity:.7;cursor:default}.markup-id-anon button:not(.markup-menu-row):hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-surface))}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}.markup-kbd.is-inline{background:color-mix(in srgb, var(--markup-ink) 8%, transparent);min-width:14px;height:14px;color:var(--markup-muted);border-radius:3px;padding:0 3px;font-size:9.5px}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{border:2px solid var(--markup-paper);background:var(--markup-brand);color:#fff;width:28px;height:28px;font-family:var(--markup-font-mono);cursor:pointer;pointer-events:auto;box-shadow:0 4px 14px -4px #00000059, 0 0 0 1px color-mix(in srgb, var(--markup-brand) 50%, transparent);border-radius:999px 999px 999px 4px;justify-content:center;align-items:center;margin:0;padding:0;font-size:11.5px;font-weight:600;line-height:1;transition:background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute;transform:translate(-50%,-100%)}.markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 92%, black)}:host([data-theme=dark]) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}@media (prefers-color-scheme:dark){:host(:not([data-theme])) .markup-pin:hover{background:color-mix(in oklab, var(--markup-brand) 88%, var(--markup-paper))}}.markup-pin.is-active{background:var(--markup-brand);color:#fff;border-color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.6}.markup-pin-ghost{background:var(--markup-brand);color:#fff;cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-num{pointer-events:none;justify-content:center;align-items:center;display:inline-flex}.markup-pin-count{background:var(--markup-ink);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;border:2px solid var(--markup-paper);pointer-events:none;border-radius:999px;padding:0 4px;font-size:9.5px;font-weight:600;line-height:12px;position:absolute;top:-6px;right:-8px}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 4px 14px -4px #00000059,0 0 #e35d2a66}50%{box-shadow:0 4px 14px -4px #00000059,0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:360px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-popover-title{min-width:0;font-family:var(--markup-font-mono);letter-spacing:.02em;color:var(--markup-muted);white-space:nowrap;text-overflow:ellipsis;flex:auto;font-size:11px;line-height:1;overflow:hidden}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{border-top:1px solid var(--markup-border);background:var(--markup-paper);flex-direction:column;gap:6px;padding:10px 12px 8px;display:flex}.markup-popover-header+.markup-popover-body{border-top:none}.markup-popover-byline{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{flex-direction:column;max-height:420px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.markup-comment{border-bottom:1px solid var(--markup-border);grid-template-columns:26px 1fr;align-items:start;gap:0 10px;padding:12px;display:grid}.markup-comment:last-child{border-bottom:none}.markup-comment>:not(.markup-comment-avatar){grid-column:2}.markup-comment-avatar{background:var(--markup-border);width:26px;height:26px;color:var(--markup-ink);font-family:var(--markup-font-mono);letter-spacing:.02em;text-transform:uppercase;-webkit-user-select:none;user-select:none;border-radius:999px;grid-area:1/1/span 4;justify-content:center;align-items:center;margin-top:-3px;font-size:10.5px;font-weight:600;display:inline-flex;overflow:hidden}.markup-avatar-initials{text-box-trim:trim-both;text-box-edge:cap alphabetic;line-height:1}.markup-avatar-img{object-fit:cover;width:100%;height:100%;display:block}.markup-comment-avatar[data-tone=\"1\"]{color:oklch(25% .07 230);background:oklch(85% .07 200)}.markup-comment-avatar[data-tone=\"2\"]{color:oklch(30% .1 150);background:oklch(88% .07 130)}.markup-comment-avatar[data-tone=\"3\"]{color:oklch(35% .1 40);background:oklch(90% .05 50)}.markup-comment-avatar[data-tone=\"4\"]{color:oklch(30% .1 320);background:oklch(87% .07 320)}.markup-comment-avatar[data-tone=\"5\"]{color:oklch(32% .09 70);background:oklch(88% .06 80)}.markup-comment-meta{align-items:center;gap:8px;min-width:0;margin-bottom:4px;font-size:13px;display:flex}.markup-comment-author{color:var(--markup-ink);white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-badge.is-agent{background:color-mix(in srgb, var(--markup-brand) 14%, transparent);color:var(--markup-brand);letter-spacing:normal;justify-content:center;width:14px;padding:0}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;white-space:nowrap;flex-shrink:0;font-size:10.5px}.markup-comment-body{color:var(--markup-ink);white-space:pre-wrap;word-break:break-word;margin:0;font-size:13.5px;line-height:19px}.markup-comment-edited{color:var(--markup-muted);font-family:var(--markup-font-mono);margin-left:2px;font-size:10.5px}.markup-comment-edited:before{content:\" · \"}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:6px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);background:var(--markup-surface-3);color:var(--markup-ink);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:4px;padding:2px 7px;font-size:11.5px;line-height:1.2;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:var(--markup-hover)}.markup-reaction-chip.is-mine{background:var(--markup-accent-soft);border-color:color-mix(in srgb, var(--markup-brand) 50%, transparent);color:var(--markup-accent-ink)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 18%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10.5px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-accent-ink)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:var(--markup-hover);color:var(--markup-ink)}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{width:100%;min-height:38px;max-height:120px;color:var(--markup-ink);font-family:var(--markup-font);background:0 0;border:none;border-radius:0;padding:2px 0;font-size:13.5px;line-height:19px;transition:none;overflow-y:auto}.markup-composer-input:focus-visible{box-shadow:none;outline:none}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{opacity:0;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:0;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);align-items:center;gap:3px;font-size:10.5px;display:inline-flex}.markup-composer-hint-label{margin-left:2px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer .markup-btn-primary{background:var(--markup-ink);height:26px;color:var(--markup-paper);border-radius:6px;padding:0 10px}.markup-composer .markup-btn-primary:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 88%, var(--markup-paper))}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;bottom:0;right:0}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;align-items:center;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;display:flex}.markup-screenshot-row.is-failed{opacity:.85;border-style:dotted}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;align-items:center;gap:5px;font-size:11px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-left:auto;font-size:10px}.markup-screenshot-redacted-chip{background:color-mix(in srgb, var(--markup-success,oklch(62% .16 150)) 16%, transparent);color:var(--markup-success,oklch(62% .16 150));font-family:var(--markup-font-mono);cursor:pointer;border:none;border-radius:999px;align-items:center;gap:3px;padding:1px 7px;font-size:10px;display:inline-flex}.markup-screenshot-redacted-chip:hover{filter:brightness(1.05)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-toolbar,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}.markup-mention-chip{background:var(--markup-accent-soft);color:var(--markup-accent-ink);border-radius:3px;padding:0 2px;font-weight:500;display:inline-block}.markup-mention-input{white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;position:relative}.markup-mention-input[aria-disabled=true]{opacity:.6;cursor:default}.markup-mention-input[data-empty]:before{content:attr(data-placeholder);color:var(--markup-muted);pointer-events:none;position:absolute;inset:0 auto auto 0}.markup-mention-input .markup-mention-chip{white-space:nowrap;padding:0 3px}.markup-comment-edit-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:58px;max-height:200px;color:var(--markup-ink);font:inherit;padding:8px 10px;font-size:13px;line-height:1.5;overflow-y:auto}.markup-comment-edit-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-input[data-empty]:before{inset:8px auto auto 10px}.markup-mention-picker{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);max-height:180px;box-shadow:var(--markup-shadow);margin:0 0 4px;padding:4px;list-style:none;position:absolute;bottom:100%;left:0;right:0;overflow-y:auto}.markup-mention-picker-item{border-radius:var(--markup-radius-sm);cursor:pointer;color:var(--markup-ink);justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px;display:flex}.markup-mention-picker-item.is-active{background:color-mix(in srgb, var(--markup-brand) 12%, transparent)}.markup-mention-picker-name{font-weight:500}.markup-mention-picker-trigger{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel{max-height:min(60vh,420px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-notifications-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:8px 10px;display:flex}.markup-notifications-panel-header .markup-eyebrow{flex:1}.markup-notifications-panel-actions{align-items:center;gap:8px;display:flex}.markup-notifications-panel-mark-all{color:var(--markup-muted);cursor:pointer;background:0 0;border:none;padding:0;font-size:11px}.markup-notifications-panel-mark-all:hover{color:var(--markup-ink)}.markup-notifications-panel-body{flex:1;overflow-y:auto}.markup-notifications-panel-empty,.markup-notifications-panel-error{text-align:center;color:var(--markup-muted);padding:24px 12px;font-size:12px}.markup-notifications-panel-empty-title{color:var(--markup-ink);margin:0 0 4px;font-weight:500}.markup-notifications-panel-empty-sub{color:var(--markup-muted);margin:0;line-height:1.4}.markup-notifications-panel-error{color:var(--markup-danger,#b91c1c)}.markup-notifications-panel-list{margin:0;padding:4px;list-style:none}.markup-notifications-panel-row{border-radius:var(--markup-radius-sm);text-align:start;cursor:pointer;width:100%;font:inherit;color:inherit;background:0 0;border:none;flex-direction:column;gap:4px;padding:8px 10px;display:flex}.markup-notifications-panel-row:hover{background:color-mix(in srgb, var(--markup-brand) 8%, transparent)}.markup-notifications-panel-row.is-unread{background:color-mix(in srgb, var(--markup-brand) 5%, transparent)}.markup-notifications-panel-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-notifications-panel-dot{background:var(--markup-brand);border-radius:999px;flex-shrink:0;width:6px;height:6px}.markup-notifications-panel-actor{font-weight:600}.markup-notifications-panel-sep{color:var(--markup-muted)}.markup-notifications-panel-time{color:var(--markup-muted);font-family:var(--markup-font-mono);font-size:10px}.markup-notifications-panel-thread{color:var(--markup-muted);margin:0;font-size:12px}.markup-notifications-panel-thread-title{color:var(--markup-ink)}.markup-notifications-panel-excerpt{color:color-mix(in srgb, var(--markup-ink) 80%, transparent);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;font-style:italic;display:-webkit-box;overflow:hidden}.markup-panel-pop{z-index:11;pointer-events:auto;width:380px;max-width:calc(100vw - 24px);position:fixed;bottom:76px}.markup-panel-pop[data-panel=privacy]{width:340px}.markup-panel-pop[data-panel=shortcuts]{width:320px}.markup-panel-pop-right{right:22px}.markup-panel-pop-left{left:22px}.markup-panel-pop-center{left:50%;transform:translate(-50%)}.markup-panel-pop .markup-pop{width:100%;animation:.14s cubic-bezier(.2,.7,.2,1) markup-pop-in;position:static}.markup-panel-pop .markup-notifications-panel{max-height:min(60vh,480px)}.markup-panel-pop .markup-notifications-panel-header{padding:12px 14px}.markup-panel-pop .markup-notifications-panel-header .markup-icon-btn{display:none}.markup-pop[data-pop=privacy],.markup-pop[data-pop=shortcuts]{padding:0}.markup-panel{max-height:min(70vh,520px);color:var(--markup-ink);flex-direction:column;display:flex}.markup-panel-header{border-bottom:1px solid var(--markup-border);align-items:center;gap:8px;padding:12px 14px;display:flex}.markup-panel-header .markup-eyebrow{flex:1}.markup-panel-body{flex:1;padding:4px 14px 14px;overflow-y:auto}.markup-panel-section{border-bottom:1px solid var(--markup-border);padding:10px 0}.markup-panel-section:last-child{border-bottom:none;padding-bottom:2px}.markup-panel-section-title{font-family:var(--markup-font-mono);letter-spacing:.06em;text-transform:lowercase;color:var(--markup-muted);margin:0 0 6px;font-size:10px;font-weight:400}.markup-panel-text{color:var(--markup-ink-soft);margin:0;font-size:12.5px;line-height:1.5}.markup-panel-text strong{color:var(--markup-ink);font-weight:600}.markup-panel-mono{font-family:var(--markup-font-mono);color:var(--markup-ink);word-break:break-all;font-size:11.5px}.markup-panel-list{color:var(--markup-ink-soft);margin:0;padding-left:16px;font-size:12.5px;line-height:1.5}.markup-panel-list li{margin-bottom:3px}.markup-panel-list li::marker{color:var(--markup-muted)}.markup-panel-note{color:var(--markup-muted);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-error{color:var(--markup-danger);margin:8px 0 0;font-size:11.5px;line-height:1.45}.markup-panel-action{border:1px solid var(--markup-border-strong);width:100%;height:30px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:7px;margin-top:10px;padding:0 10px;font-size:12.5px;transition:background .12s,border-color .12s,color .12s}.markup-panel-action:hover:not(:disabled){background:var(--markup-hover)}.markup-panel-action:disabled{opacity:.6;cursor:default}.markup-panel-action.is-danger{border-color:color-mix(in srgb, var(--markup-danger) 45%, transparent);color:var(--markup-danger)}.markup-panel-action.is-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-shortcut-list{margin:0;padding:0;list-style:none}.markup-shortcut-row{align-items:center;gap:10px;min-height:24px;padding:2px 0;display:flex}.markup-shortcut-label{min-width:0;color:var(--markup-ink-soft);flex:1;font-size:12.5px;line-height:1.4}.markup-shortcut-keys{flex-shrink:0;align-items:center;gap:4px;display:inline-flex}.markup-shortcut-chord{align-items:center;gap:3px;display:inline-flex}.markup-shortcut-or{color:var(--markup-muted);margin-right:1px;font-size:10px}", me = class extends C {
252
252
  state = { hasError: !1 };
253
253
  static getDerivedStateFromError() {
254
254
  return { hasError: !0 };
@@ -261,12 +261,12 @@ var me = ":host{--markup-paper:#fdfcfa;--markup-surface:#fff;--markup-surface-2:
261
261
  render() {
262
262
  return this.state.hasError ? null : this.props.children;
263
263
  }
264
- }, he = 1e3;
265
- function ge(e) {
264
+ }, M = 1e3;
265
+ function he(e) {
266
266
  let t = !1, n = 0;
267
267
  return (r) => {
268
268
  let i = Date.now();
269
- t || i - n < he || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
269
+ t || i - n < M || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
270
270
  method: "POST",
271
271
  headers: {
272
272
  "content-type": "application/json",
@@ -282,48 +282,48 @@ function ge(e) {
282
282
  }));
283
283
  };
284
284
  }
285
- function _e() {
285
+ function ge() {
286
286
  return typeof window < "u" ? window.location.href : void 0;
287
287
  }
288
- function ve() {
288
+ function _e() {
289
289
  return typeof navigator < "u" ? navigator.userAgent : void 0;
290
290
  }
291
- var ye = /* @__PURE__ */ new WeakMap();
292
- function be(e, t, n) {
293
- let r = ye.get(e);
294
- r || (r = ge(e), ye.set(e, r));
291
+ var ve = /* @__PURE__ */ new WeakMap();
292
+ function ye(e, t, n) {
293
+ let r = ve.get(e);
294
+ r || (r = he(e), ve.set(e, r));
295
295
  let i = t instanceof Error ? t : Error(String(t));
296
296
  r({
297
297
  message: i.message,
298
298
  name: i.name,
299
299
  stack: i.stack,
300
- url: _e(),
301
- userAgent: ve(),
300
+ url: ge(),
301
+ userAgent: _e(),
302
302
  context: n?.context
303
303
  });
304
304
  }
305
- var xe = null;
306
- function Se(e) {
307
- xe = e;
305
+ var be = null;
306
+ function xe(e) {
307
+ be = e;
308
308
  }
309
- function M(e, t) {
310
- xe && be(xe, e, t);
309
+ function N(e, t) {
310
+ be && ye(be, e, t);
311
311
  }
312
312
  //#endregion
313
313
  //#region src/runtime/theme-store.ts
314
- var Ce = "markup:widget:theme", N = null, P = Ee() ?? "auto", we = Ee() != null, Te = /* @__PURE__ */ new Set();
314
+ var Se = "markup:widget:theme", Ce = null, P = Ee() ?? "auto", we = Ee() != null, Te = /* @__PURE__ */ new Set();
315
315
  function Ee() {
316
316
  try {
317
- let e = localStorage.getItem(Ce);
317
+ let e = localStorage.getItem(Se);
318
318
  if (e === "light" || e === "dark" || e === "auto") return e;
319
319
  } catch {}
320
320
  return null;
321
321
  }
322
322
  function De() {
323
- N && (P === "auto" ? delete N.dataset.theme : N.dataset.theme = P);
323
+ Ce && (P === "auto" ? delete Ce.dataset.theme : Ce.dataset.theme = P);
324
324
  }
325
325
  function Oe(e, t) {
326
- N = e, !we && t && (P = t), De();
326
+ Ce = e, !we && t && (P = t), De();
327
327
  }
328
328
  function ke() {
329
329
  return P;
@@ -335,7 +335,7 @@ function je(e) {
335
335
  if (e !== P) {
336
336
  P = e, we = !0;
337
337
  try {
338
- localStorage.setItem(Ce, e);
338
+ localStorage.setItem(Se, e);
339
339
  } catch {}
340
340
  De();
341
341
  for (let e of Te) e(P);
@@ -2930,7 +2930,7 @@ function* ii(e, t, n, r, i) {
2930
2930
  //#endregion
2931
2931
  //#region src/runtime/anchor.ts
2932
2932
  function ai(e, t) {
2933
- let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? si(s) : void 0, l, u;
2933
+ let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? ci(s) : void 0, l, u;
2934
2934
  if (s) {
2935
2935
  let t = s.getBoundingClientRect();
2936
2936
  t.width > 0 && t.height > 0 && (l = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), u = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)));
@@ -2947,24 +2947,26 @@ function ai(e, t) {
2947
2947
  }
2948
2948
  function oi(e) {
2949
2949
  if (e.anchorSelector) try {
2950
- let t = document.querySelector(e.anchorSelector);
2951
- if (t) {
2952
- let n = t.getBoundingClientRect();
2953
- return {
2954
- pageX: n.left + window.scrollX + (e.anchorOffsetX ?? .5) * n.width,
2955
- pageY: n.top + window.scrollY + (e.anchorOffsetY ?? .5) * n.height,
2956
- resolved: !0
2957
- };
2958
- }
2950
+ let t = document.querySelector(e.anchorSelector), n = t?.getBoundingClientRect();
2951
+ if (t && n && si(n)) return {
2952
+ pageX: n.left + window.scrollX + (e.anchorOffsetX ?? .5) * n.width,
2953
+ pageY: n.top + window.scrollY + (e.anchorOffsetY ?? .5) * n.height,
2954
+ resolved: !0,
2955
+ element: t
2956
+ };
2959
2957
  } catch {}
2960
2958
  let t = document.documentElement, n = Math.max(t.scrollWidth, t.clientWidth), r = Math.max(t.scrollHeight, t.clientHeight);
2961
2959
  return {
2962
2960
  pageX: e.anchorX * n,
2963
2961
  pageY: e.anchorY * r,
2964
- resolved: !1
2962
+ resolved: !1,
2963
+ element: null
2965
2964
  };
2966
2965
  }
2967
2966
  function si(e) {
2967
+ return e.width !== 0 || e.height !== 0 || e.top !== 0 || e.left !== 0;
2968
+ }
2969
+ function ci(e) {
2968
2970
  try {
2969
2971
  return Wr(e, { timeoutMs: 1e3 });
2970
2972
  } catch {
@@ -2973,22 +2975,22 @@ function si(e) {
2973
2975
  }
2974
2976
  //#endregion
2975
2977
  //#region src/runtime/api.ts
2976
- var ci = class extends Error {
2978
+ var li = class extends Error {
2977
2979
  status;
2978
2980
  constructor(e, t) {
2979
2981
  super(e), this.name = "WidgetApiError", this.status = t;
2980
2982
  }
2981
- }, li = class extends ci {
2983
+ }, ui = class extends li {
2982
2984
  category;
2983
2985
  constructor(e, t) {
2984
2986
  super(`${e} took too long — check your connection`, 0), this.name = "WidgetTimeoutError", this.category = t;
2985
2987
  }
2986
- }, ui = 15e3, J = 3e4;
2987
- function di(e, t) {
2988
+ }, di = 15e3, J = 3e4;
2989
+ function fi(e, t) {
2988
2990
  let n = AbortSignal.timeout(e);
2989
2991
  return t ? AbortSignal.any([t, n]) : n;
2990
2992
  }
2991
- function fi(e) {
2993
+ function pi(e) {
2992
2994
  let t = e.apiUrl.replace(/\/+$/, "");
2993
2995
  async function n(n, r, i) {
2994
2996
  let a = {
@@ -3002,23 +3004,23 @@ function fi(e) {
3002
3004
  let l = e.getStorageMode?.() === "cookies", u = {
3003
3005
  ...r,
3004
3006
  headers: a,
3005
- signal: di(i.timeoutMs, i.signal)
3007
+ signal: fi(i.timeoutMs, i.signal)
3006
3008
  };
3007
3009
  l && (u.credentials = "include");
3008
3010
  let d;
3009
3011
  try {
3010
3012
  d = await fetch(`${t}${n}`, u);
3011
3013
  } catch (e) {
3012
- throw e instanceof DOMException && e.name === "TimeoutError" ? new li(i.operation, i.category) : e;
3014
+ throw e instanceof DOMException && e.name === "TimeoutError" ? new ui(i.operation, i.category) : e;
3013
3015
  }
3014
- let f = await d.text(), p = f ? pi(f) : null;
3015
- if (!d.ok) throw d.status === 401 && (s || l) && e.onUnauthorized?.(), new ci((p && typeof p == "object" && "error" in p && typeof p.error == "string" ? p.error : null) ?? `Request failed with ${d.status}`, d.status);
3016
+ let f = await d.text(), p = f ? mi(f) : null;
3017
+ if (!d.ok) throw d.status === 401 && (s || l) && e.onUnauthorized?.(), new li((p && typeof p == "object" && "error" in p && typeof p.error == "string" ? p.error : null) ?? `Request failed with ${d.status}`, d.status);
3016
3018
  return p;
3017
3019
  }
3018
3020
  return {
3019
3021
  mintAnonIdentity(e) {
3020
3022
  return n("/widget/anon-identity", { method: "POST" }, {
3021
- timeoutMs: ui,
3023
+ timeoutMs: di,
3022
3024
  category: "read",
3023
3025
  operation: "mint-anon-identity",
3024
3026
  signal: e?.signal
@@ -3026,7 +3028,7 @@ function fi(e) {
3026
3028
  },
3027
3029
  getSubscriptionToken(e) {
3028
3030
  return n("/widget/subscription-token", { method: "POST" }, {
3029
- timeoutMs: ui,
3031
+ timeoutMs: di,
3030
3032
  category: "read",
3031
3033
  operation: "mint-subscription-token",
3032
3034
  signal: e?.signal
@@ -3034,7 +3036,7 @@ function fi(e) {
3034
3036
  },
3035
3037
  getScreenshotUploadUrl(e) {
3036
3038
  return n("/widget/screenshots/upload-url", { method: "POST" }, {
3037
- timeoutMs: ui,
3039
+ timeoutMs: di,
3038
3040
  category: "read",
3039
3041
  operation: "mint-screenshot-upload-url",
3040
3042
  signal: e?.signal
@@ -3042,7 +3044,7 @@ function fi(e) {
3042
3044
  },
3043
3045
  listThreads(e, t) {
3044
3046
  return n(`/widget/threads?route=${encodeURIComponent(e)}`, { method: "GET" }, {
3045
- timeoutMs: ui,
3047
+ timeoutMs: di,
3046
3048
  category: "read",
3047
3049
  operation: "list-threads",
3048
3050
  signal: t?.signal
@@ -3050,7 +3052,7 @@ function fi(e) {
3050
3052
  },
3051
3053
  listMembers(e) {
3052
3054
  return n("/widget/members", { method: "GET" }, {
3053
- timeoutMs: ui,
3055
+ timeoutMs: di,
3054
3056
  category: "read",
3055
3057
  operation: "list-members",
3056
3058
  signal: e?.signal
@@ -3058,7 +3060,7 @@ function fi(e) {
3058
3060
  },
3059
3061
  listNotifications(e) {
3060
3062
  return n("/widget/notifications", { method: "GET" }, {
3061
- timeoutMs: ui,
3063
+ timeoutMs: di,
3062
3064
  category: "read",
3063
3065
  operation: "list-notifications",
3064
3066
  signal: e?.signal
@@ -3169,7 +3171,7 @@ function fi(e) {
3169
3171
  }
3170
3172
  };
3171
3173
  }
3172
- function pi(e) {
3174
+ function mi(e) {
3173
3175
  try {
3174
3176
  return JSON.parse(e);
3175
3177
  } catch {
@@ -3178,10 +3180,10 @@ function pi(e) {
3178
3180
  }
3179
3181
  //#endregion
3180
3182
  //#region src/runtime/cookie-probe.ts
3181
- var mi = "markup.cookieProbe";
3182
- async function hi(e, t) {
3183
+ var hi = "markup.cookieProbe";
3184
+ async function gi(e, t) {
3183
3185
  try {
3184
- let e = sessionStorage.getItem(mi);
3186
+ let e = sessionStorage.getItem(hi);
3185
3187
  if (e === "supported") return !0;
3186
3188
  if (e === "unsupported") return !1;
3187
3189
  } catch {}
@@ -3200,94 +3202,94 @@ async function hi(e, t) {
3200
3202
  if (!e.ok) return !1;
3201
3203
  let { supported: t } = await e.json(), i = t === !0;
3202
3204
  try {
3203
- sessionStorage.setItem(mi, i ? "supported" : "unsupported");
3205
+ sessionStorage.setItem(hi, i ? "supported" : "unsupported");
3204
3206
  } catch {}
3205
3207
  return i;
3206
3208
  } catch (e) {
3207
- return e?.name !== "TypeError" && M(e, { context: "cookie-probe" }), !1;
3209
+ return e?.name !== "TypeError" && N(e, { context: "cookie-probe" }), !1;
3208
3210
  }
3209
3211
  }
3210
3212
  //#endregion
3211
3213
  //#region src/runtime/history-observer.ts
3212
- var gi = "__markup_history_observer__", _i = "__markup_history_listeners__";
3213
- function vi(e) {
3214
+ var _i = "__markup_history_observer__", vi = "__markup_history_listeners__";
3215
+ function yi(e) {
3214
3216
  e.forEach((e) => {
3215
3217
  try {
3216
3218
  e();
3217
3219
  } catch (e) {
3218
- M(e, { context: "history-observer-listener" });
3220
+ N(e, { context: "history-observer-listener" });
3219
3221
  }
3220
3222
  });
3221
3223
  }
3222
- var yi = "__markup_history_restore__";
3223
- function bi() {
3224
+ var bi = "__markup_history_restore__";
3225
+ function xi() {
3224
3226
  let e = history.pushState;
3225
- if (e[gi]) return {
3226
- listeners: e[_i],
3227
- restore: e[yi]
3227
+ if (e[_i]) return {
3228
+ listeners: e[vi],
3229
+ restore: e[bi]
3228
3230
  };
3229
3231
  let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
3230
3232
  function i(...e) {
3231
- n.apply(this, e), vi(t);
3233
+ n.apply(this, e), yi(t);
3232
3234
  }
3233
3235
  function a(...e) {
3234
- r.apply(this, e), vi(t);
3236
+ r.apply(this, e), yi(t);
3235
3237
  }
3236
- let o = () => vi(t), s = () => {
3238
+ let o = () => yi(t), s = () => {
3237
3239
  history.pushState === i && (history.pushState = n), history.replaceState === a && (history.replaceState = r), window.removeEventListener("popstate", o), t.clear();
3238
3240
  };
3239
- return Object.defineProperty(i, gi, { value: 1 }), Object.defineProperty(i, _i, { value: t }), Object.defineProperty(i, yi, { value: s }), Object.defineProperty(a, gi, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", o), {
3241
+ return Object.defineProperty(i, _i, { value: 1 }), Object.defineProperty(i, vi, { value: t }), Object.defineProperty(i, bi, { value: s }), Object.defineProperty(a, _i, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", o), {
3240
3242
  listeners: t,
3241
3243
  restore: s
3242
3244
  };
3243
3245
  }
3244
- var xi = null;
3245
- function Si(e) {
3246
- xi ||= bi();
3247
- let t = xi;
3246
+ var Si = null;
3247
+ function Ci(e) {
3248
+ Si ||= xi();
3249
+ let t = Si;
3248
3250
  t.listeners.add(e);
3249
3251
  let n = !1;
3250
3252
  return () => {
3251
- n || (n = !0, t.listeners.delete(e), t.listeners.size === 0 && (t.restore(), xi === t && (xi = null)));
3253
+ n || (n = !0, t.listeners.delete(e), t.listeners.size === 0 && (t.restore(), Si === t && (Si = null)));
3252
3254
  };
3253
3255
  }
3254
3256
  //#endregion
3255
3257
  //#region src/runtime/safe-url.ts
3256
- var Ci = new Set(["http:", "https:"]);
3257
- function wi(e, t) {
3258
+ var wi = new Set(["http:", "https:"]);
3259
+ function Ti(e, t) {
3258
3260
  let n;
3259
3261
  try {
3260
3262
  n = new URL(e, t);
3261
3263
  } catch {
3262
3264
  return null;
3263
3265
  }
3264
- return Ci.has(n.protocol) ? n : null;
3266
+ return wi.has(n.protocol) ? n : null;
3265
3267
  }
3266
3268
  //#endregion
3267
3269
  //#region src/runtime/identity-store.ts
3268
- var Ti = "markup.identity";
3269
- function Ei() {
3270
+ var Ei = "markup.identity";
3271
+ function Di() {
3270
3272
  try {
3271
- let e = localStorage.getItem(Ti);
3273
+ let e = localStorage.getItem(Ei);
3272
3274
  return e ? JSON.parse(e) : null;
3273
3275
  } catch {
3274
3276
  return null;
3275
3277
  }
3276
3278
  }
3277
- function Di(e) {
3278
- if (typeof e.image == "string") return wi(e.image, location.href)?.href ?? void 0;
3279
- }
3280
3279
  function Oi(e) {
3280
+ if (typeof e.image == "string") return Ti(e.image, location.href)?.href ?? void 0;
3281
+ }
3282
+ function ki(e) {
3281
3283
  try {
3282
3284
  if (e == null) {
3283
- localStorage.removeItem(Ti);
3285
+ localStorage.removeItem(Ei);
3284
3286
  return;
3285
3287
  }
3286
- localStorage.setItem(Ti, JSON.stringify(e));
3288
+ localStorage.setItem(Ei, JSON.stringify(e));
3287
3289
  } catch {}
3288
3290
  }
3289
- function ki() {
3290
- let e = Ei(), t = {
3291
+ function Ai() {
3292
+ let e = Di(), t = {
3291
3293
  name: e?.name,
3292
3294
  email: e?.email
3293
3295
  };
@@ -3306,7 +3308,7 @@ function ki() {
3306
3308
  refreshTokenExpiresAt: e.refreshTokenExpiresAt,
3307
3309
  name: e.name,
3308
3310
  email: e.email,
3309
- image: Di(e)
3311
+ image: Oi(e)
3310
3312
  }
3311
3313
  },
3312
3314
  preserved: t
@@ -3327,7 +3329,7 @@ function ki() {
3327
3329
  } : {},
3328
3330
  name: e.name,
3329
3331
  email: e.email,
3330
- image: Di(e)
3332
+ image: Oi(e)
3331
3333
  }
3332
3334
  },
3333
3335
  preserved: t
@@ -3349,10 +3351,10 @@ function ki() {
3349
3351
  preserved: t
3350
3352
  };
3351
3353
  }
3352
- function Ai(e) {
3354
+ function ji(e) {
3353
3355
  switch (e.kind) {
3354
3356
  case "verified":
3355
- Oi({
3357
+ ki({
3356
3358
  clientId: e.identity.clientId,
3357
3359
  storage: e.identity.storage,
3358
3360
  token: e.identity.storage === "cookies" ? void 0 : e.identity.token,
@@ -3366,7 +3368,7 @@ function Ai(e) {
3366
3368
  });
3367
3369
  return;
3368
3370
  case "anon":
3369
- Oi({
3371
+ ki({
3370
3372
  clientId: e.identity.clientId,
3371
3373
  anonToken: e.identity.anonToken,
3372
3374
  name: e.identity.name,
@@ -3374,23 +3376,23 @@ function Ai(e) {
3374
3376
  });
3375
3377
  return;
3376
3378
  case "recovering":
3377
- Oi({
3379
+ ki({
3378
3380
  name: e.preserved.name,
3379
3381
  email: e.preserved.email
3380
3382
  });
3381
3383
  return;
3382
3384
  case "unresolved":
3383
- Oi(null);
3385
+ ki(null);
3384
3386
  return;
3385
3387
  }
3386
3388
  }
3387
- function ji(e) {
3389
+ function Mi(e) {
3388
3390
  if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
3389
3391
  }
3390
- function Mi(e) {
3392
+ function Ni(e) {
3391
3393
  return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
3392
3394
  }
3393
- function Ni(e) {
3395
+ function Pi(e) {
3394
3396
  if (e.kind === "anon") {
3395
3397
  let t = e.identity.name;
3396
3398
  return t ? {
@@ -3405,8 +3407,8 @@ function Ni(e) {
3405
3407
  }
3406
3408
  //#endregion
3407
3409
  //#region src/runtime/popup-auth.ts
3408
- var Pi = "MARKUP_AUTH_RESULT", Fi = "MARKUP_AUTH_RETRY", Ii = "MARKUP_AUTH_EXPIRED", Li = 5;
3409
- async function Ri(e) {
3410
+ var Fi = "MARKUP_AUTH_RESULT", Ii = "MARKUP_AUTH_RETRY", Li = "MARKUP_AUTH_EXPIRED", Ri = 5;
3411
+ async function zi(e) {
3410
3412
  let { apiUrl: t, apiKey: n, useCookies: r } = e, i = new URL(t).origin, a = r ? "refresh,cookies" : "refresh";
3411
3413
  async function o() {
3412
3414
  let e = await fetch(`${t.replace(/\/+$/, "")}/widget/popup-exchange`, {
@@ -3425,7 +3427,7 @@ async function Ri(e) {
3425
3427
  try {
3426
3428
  s = await o();
3427
3429
  } catch (e) {
3428
- return e?.name !== "TypeError" && M(e, { context: "popup-exchange" }), Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
3430
+ return e?.name !== "TypeError" && N(e, { context: "popup-exchange" }), Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
3429
3431
  }
3430
3432
  let c = Math.max(0, window.screenX + (window.outerWidth - 420) / 2), l = Math.max(0, window.screenY + (window.outerHeight - 560) / 2), u = window.open(s, "markup-auth", `width=420,height=560,left=${c},top=${l}`);
3431
3433
  if (!u) return Promise.reject(/* @__PURE__ */ Error("Popup blocked — allow popups for this site to sign in"));
@@ -3437,7 +3439,7 @@ async function Ri(e) {
3437
3439
  let s = (e) => {
3438
3440
  if (!r) {
3439
3441
  if (e) {
3440
- if (n >= Li) {
3442
+ if (n >= Ri) {
3441
3443
  a(), t(/* @__PURE__ */ Error("Sign-in could not be restarted — close the window and try again"));
3442
3444
  return;
3443
3445
  }
@@ -3446,7 +3448,7 @@ async function Ri(e) {
3446
3448
  r = !0, o().then((e) => {
3447
3449
  u.closed || (u.location.href = e);
3448
3450
  }).catch((e) => {
3449
- a(), M(e, { context: "popup-exchange-remint" }), t(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to restart sign-in"));
3451
+ a(), N(e, { context: "popup-exchange-remint" }), t(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to restart sign-in"));
3450
3452
  }).finally(() => {
3451
3453
  r = !1;
3452
3454
  });
@@ -3455,15 +3457,15 @@ async function Ri(e) {
3455
3457
  function c(n) {
3456
3458
  if (n.origin !== i || n.source !== u) return;
3457
3459
  let r = n.data;
3458
- if (r?.type === Fi) {
3460
+ if (r?.type === Ii) {
3459
3461
  s(!1);
3460
3462
  return;
3461
3463
  }
3462
- if (r?.type === Ii) {
3464
+ if (r?.type === Li) {
3463
3465
  s(!0);
3464
3466
  return;
3465
3467
  }
3466
- r?.type === Pi && (a(), r.identity?.id && r.identity?.name ? e({
3468
+ r?.type === Fi && (a(), r.identity?.id && r.identity?.name ? e({
3467
3469
  mode: r.mode === "cookies" ? "cookies" : "localStorage",
3468
3470
  identity: r.identity,
3469
3471
  token: typeof r.token == "string" ? r.token : null,
@@ -3494,7 +3496,7 @@ async function Ri(e) {
3494
3496
  });
3495
3497
  if (!e.ok) {
3496
3498
  let t = /* @__PURE__ */ Error(`Failed to install widget cookies (${e.status})`);
3497
- throw M(t, { context: "install-cookies" }), t;
3499
+ throw N(t, { context: "install-cookies" }), t;
3498
3500
  }
3499
3501
  return {
3500
3502
  ...d,
@@ -3506,45 +3508,45 @@ async function Ri(e) {
3506
3508
  }
3507
3509
  //#endregion
3508
3510
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
3509
- function zi(e, t) {
3511
+ function Bi(e, t) {
3510
3512
  if (e.match(/^[a-z]+:\/\//i)) return e;
3511
3513
  if (e.match(/^\/\//)) return window.location.protocol + e;
3512
3514
  if (e.match(/^[a-z]+:/i)) return e;
3513
3515
  let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
3514
3516
  return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
3515
3517
  }
3516
- var Bi = (() => {
3518
+ var Vi = (() => {
3517
3519
  let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
3518
3520
  return () => (e += 1, `u${t()}${e}`);
3519
3521
  })();
3520
- function Vi(e) {
3522
+ function Hi(e) {
3521
3523
  let t = [];
3522
3524
  for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
3523
3525
  return t;
3524
3526
  }
3525
- var Hi = null;
3526
- function Ui(e = {}) {
3527
- return Hi || (e.includeStyleProperties ? (Hi = e.includeStyleProperties, Hi) : (Hi = Vi(window.getComputedStyle(document.documentElement)), Hi));
3527
+ var Ui = null;
3528
+ function Wi(e = {}) {
3529
+ return Ui || (e.includeStyleProperties ? (Ui = e.includeStyleProperties, Ui) : (Ui = Hi(window.getComputedStyle(document.documentElement)), Ui));
3528
3530
  }
3529
- function Wi(e, t) {
3531
+ function Gi(e, t) {
3530
3532
  let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
3531
3533
  return n ? parseFloat(n.replace("px", "")) : 0;
3532
3534
  }
3533
- function Gi(e) {
3534
- let t = Wi(e, "border-left-width"), n = Wi(e, "border-right-width");
3535
+ function Ki(e) {
3536
+ let t = Gi(e, "border-left-width"), n = Gi(e, "border-right-width");
3535
3537
  return e.clientWidth + t + n;
3536
3538
  }
3537
- function Ki(e) {
3538
- let t = Wi(e, "border-top-width"), n = Wi(e, "border-bottom-width");
3539
+ function qi(e) {
3540
+ let t = Gi(e, "border-top-width"), n = Gi(e, "border-bottom-width");
3539
3541
  return e.clientHeight + t + n;
3540
3542
  }
3541
- function qi(e, t = {}) {
3543
+ function Ji(e, t = {}) {
3542
3544
  return {
3543
- width: t.width || Gi(e),
3544
- height: t.height || Ki(e)
3545
+ width: t.width || Ki(e),
3546
+ height: t.height || qi(e)
3545
3547
  };
3546
3548
  }
3547
- function Ji() {
3549
+ function Yi() {
3548
3550
  let e, t;
3549
3551
  try {
3550
3552
  t = process;
@@ -3553,10 +3555,10 @@ function Ji() {
3553
3555
  return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
3554
3556
  }
3555
3557
  var Y = 16384;
3556
- function Yi(e) {
3558
+ function Xi(e) {
3557
3559
  (e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
3558
3560
  }
3559
- function Xi(e) {
3561
+ function Zi(e) {
3560
3562
  return new Promise((t, n) => {
3561
3563
  let r = new Image();
3562
3564
  r.onload = () => {
@@ -3566,12 +3568,12 @@ function Xi(e) {
3566
3568
  }, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
3567
3569
  });
3568
3570
  }
3569
- async function Zi(e) {
3571
+ async function Qi(e) {
3570
3572
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
3571
3573
  }
3572
- async function Qi(e, t, n) {
3574
+ async function $i(e, t, n) {
3573
3575
  let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
3574
- 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), Zi(i);
3576
+ return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Qi(i);
3575
3577
  }
3576
3578
  var X = (e, t) => {
3577
3579
  if (e instanceof t) return !0;
@@ -3580,66 +3582,66 @@ var X = (e, t) => {
3580
3582
  };
3581
3583
  //#endregion
3582
3584
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
3583
- function $i(e) {
3585
+ function ea(e) {
3584
3586
  let t = e.getPropertyValue("content");
3585
3587
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
3586
3588
  }
3587
- function ea(e, t) {
3588
- return Ui(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3589
+ function ta(e, t) {
3590
+ return Wi(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3589
3591
  }
3590
- function ta(e, t, n, r) {
3591
- let i = `.${e}:${t}`, a = n.cssText ? $i(n) : ea(n, r);
3592
+ function na(e, t, n, r) {
3593
+ let i = `.${e}:${t}`, a = n.cssText ? ea(n) : ta(n, r);
3592
3594
  return document.createTextNode(`${i}{${a}}`);
3593
3595
  }
3594
- function na(e, t, n, r) {
3596
+ function ra(e, t, n, r) {
3595
3597
  let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
3596
3598
  if (a === "" || a === "none") return;
3597
- let o = Bi();
3599
+ let o = Vi();
3598
3600
  try {
3599
3601
  t.className = `${t.className} ${o}`;
3600
3602
  } catch {
3601
3603
  return;
3602
3604
  }
3603
3605
  let s = document.createElement("style");
3604
- s.appendChild(ta(o, n, i, r)), t.appendChild(s);
3606
+ s.appendChild(na(o, n, i, r)), t.appendChild(s);
3605
3607
  }
3606
- function ra(e, t, n) {
3607
- na(e, t, ":before", n), na(e, t, ":after", n);
3608
+ function ia(e, t, n) {
3609
+ ra(e, t, ":before", n), ra(e, t, ":after", n);
3608
3610
  }
3609
3611
  //#endregion
3610
3612
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
3611
- var ia = "application/font-woff", aa = "image/jpeg", oa = {
3612
- woff: ia,
3613
- woff2: ia,
3613
+ var aa = "application/font-woff", oa = "image/jpeg", sa = {
3614
+ woff: aa,
3615
+ woff2: aa,
3614
3616
  ttf: "application/font-truetype",
3615
3617
  eot: "application/vnd.ms-fontobject",
3616
3618
  png: "image/png",
3617
- jpg: aa,
3618
- jpeg: aa,
3619
+ jpg: oa,
3620
+ jpeg: oa,
3619
3621
  gif: "image/gif",
3620
3622
  tiff: "image/tiff",
3621
3623
  svg: "image/svg+xml",
3622
3624
  webp: "image/webp"
3623
3625
  };
3624
- function sa(e) {
3626
+ function ca(e) {
3625
3627
  let t = /\.([^./]*?)$/g.exec(e);
3626
3628
  return t ? t[1] : "";
3627
3629
  }
3628
- function ca(e) {
3629
- return oa[sa(e).toLowerCase()] || "";
3630
+ function la(e) {
3631
+ return sa[ca(e).toLowerCase()] || "";
3630
3632
  }
3631
3633
  //#endregion
3632
3634
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
3633
- function la(e) {
3635
+ function ua(e) {
3634
3636
  return e.split(/,/)[1];
3635
3637
  }
3636
- function ua(e) {
3638
+ function da(e) {
3637
3639
  return e.search(/^(data:)/) !== -1;
3638
3640
  }
3639
- function da(e, t) {
3641
+ function fa(e, t) {
3640
3642
  return `data:${t};base64,${e}`;
3641
3643
  }
3642
- async function fa(e, t, n) {
3644
+ async function pa(e, t, n) {
3643
3645
  let r = await fetch(e, t);
3644
3646
  if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
3645
3647
  let i = await r.blob();
@@ -3657,78 +3659,78 @@ async function fa(e, t, n) {
3657
3659
  }, a.readAsDataURL(i);
3658
3660
  });
3659
3661
  }
3660
- var pa = {};
3661
- function ma(e, t, n) {
3662
+ var ma = {};
3663
+ function ha(e, t, n) {
3662
3664
  let r = e.replace(/\?.*/, "");
3663
3665
  return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
3664
3666
  }
3665
- async function ha(e, t, n) {
3666
- let r = ma(e, t, n.includeQueryParams);
3667
- if (pa[r] != null) return pa[r];
3667
+ async function ga(e, t, n) {
3668
+ let r = ha(e, t, n.includeQueryParams);
3669
+ if (ma[r] != null) return ma[r];
3668
3670
  n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
3669
3671
  let i;
3670
3672
  try {
3671
- i = da(await fa(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", la(n))), t);
3673
+ i = fa(await pa(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", ua(n))), t);
3672
3674
  } catch (t) {
3673
3675
  i = n.imagePlaceholder || "";
3674
3676
  let r = `Failed to fetch resource: ${e}`;
3675
3677
  t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
3676
3678
  }
3677
- return pa[r] = i, i;
3679
+ return ma[r] = i, i;
3678
3680
  }
3679
3681
  //#endregion
3680
3682
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
3681
- async function ga(e) {
3683
+ async function _a(e) {
3682
3684
  let t = e.toDataURL();
3683
- return t === "data:," ? e.cloneNode(!1) : Xi(t);
3685
+ return t === "data:," ? e.cloneNode(!1) : Zi(t);
3684
3686
  }
3685
- async function _a(e, t) {
3687
+ async function va(e, t) {
3686
3688
  if (e.currentSrc) {
3687
3689
  let t = document.createElement("canvas"), n = t.getContext("2d");
3688
- return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Xi(t.toDataURL());
3690
+ return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Zi(t.toDataURL());
3689
3691
  }
3690
3692
  let n = e.poster;
3691
- return Xi(await ha(n, ca(n), t));
3693
+ return Zi(await ga(n, la(n), t));
3692
3694
  }
3693
- async function va(e, t) {
3695
+ async function ya(e, t) {
3694
3696
  try {
3695
- if (e?.contentDocument?.body) return await Oa(e.contentDocument.body, t, !0);
3697
+ if (e?.contentDocument?.body) return await ka(e.contentDocument.body, t, !0);
3696
3698
  } catch {}
3697
3699
  return e.cloneNode(!1);
3698
3700
  }
3699
- async function ya(e, t) {
3700
- return X(e, HTMLCanvasElement) ? ga(e) : X(e, HTMLVideoElement) ? _a(e, t) : X(e, HTMLIFrameElement) ? va(e, t) : e.cloneNode(xa(e));
3701
+ async function ba(e, t) {
3702
+ return X(e, HTMLCanvasElement) ? _a(e) : X(e, HTMLVideoElement) ? va(e, t) : X(e, HTMLIFrameElement) ? ya(e, t) : e.cloneNode(Sa(e));
3701
3703
  }
3702
- var ba = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", xa = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
3703
- async function Sa(e, t, n) {
3704
- if (xa(t)) return t;
3704
+ var xa = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Sa = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
3705
+ async function Ca(e, t, n) {
3706
+ if (Sa(t)) return t;
3705
3707
  let r = [];
3706
- return r = ba(e) && e.assignedNodes ? Vi(e.assignedNodes()) : X(e, HTMLIFrameElement) && e.contentDocument?.body ? Vi(e.contentDocument.body.childNodes) : Vi((e.shadowRoot ?? e).childNodes), r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Oa(r, n)).then((e) => {
3708
+ return r = xa(e) && e.assignedNodes ? Hi(e.assignedNodes()) : X(e, HTMLIFrameElement) && e.contentDocument?.body ? Hi(e.contentDocument.body.childNodes) : Hi((e.shadowRoot ?? e).childNodes), r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => ka(r, n)).then((e) => {
3707
3709
  e && t.appendChild(e);
3708
3710
  }), Promise.resolve()), t;
3709
3711
  }
3710
- function Ca(e, t, n) {
3712
+ function wa(e, t, n) {
3711
3713
  let r = t.style;
3712
3714
  if (!r) return;
3713
3715
  let i = window.getComputedStyle(e);
3714
- i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : Ui(n).forEach((n) => {
3716
+ i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : Wi(n).forEach((n) => {
3715
3717
  let a = i.getPropertyValue(n);
3716
3718
  n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), X(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
3717
3719
  });
3718
3720
  }
3719
- function wa(e, t) {
3721
+ function Ta(e, t) {
3720
3722
  X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
3721
3723
  }
3722
- function Ta(e, t) {
3724
+ function Ea(e, t) {
3723
3725
  if (X(e, HTMLSelectElement)) {
3724
3726
  let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
3725
3727
  r && r.setAttribute("selected", "");
3726
3728
  }
3727
3729
  }
3728
- function Ea(e, t, n) {
3729
- return X(t, Element) && (Ca(e, t, n), ra(e, t, n), wa(e, t), Ta(e, t)), t;
3730
+ function Da(e, t, n) {
3731
+ return X(t, Element) && (wa(e, t, n), ia(e, t, n), Ta(e, t), Ea(e, t)), t;
3730
3732
  }
3731
- async function Da(e, t) {
3733
+ async function Oa(e, t) {
3732
3734
  let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
3733
3735
  if (n.length === 0) return e;
3734
3736
  let r = {};
@@ -3736,7 +3738,7 @@ async function Da(e, t) {
3736
3738
  let a = n[i].getAttribute("xlink:href");
3737
3739
  if (a) {
3738
3740
  let n = e.querySelector(a), i = document.querySelector(a);
3739
- !n && i && !r[a] && (r[a] = await Oa(i, t, !0));
3741
+ !n && i && !r[a] && (r[a] = await ka(i, t, !0));
3740
3742
  }
3741
3743
  }
3742
3744
  let i = Object.values(r);
@@ -3750,61 +3752,61 @@ async function Da(e, t) {
3750
3752
  }
3751
3753
  return e;
3752
3754
  }
3753
- async function Oa(e, t, n) {
3754
- return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => ya(e, t)).then((n) => Sa(e, n, t)).then((n) => Ea(e, n, t)).then((e) => Da(e, t));
3755
+ async function ka(e, t, n) {
3756
+ return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => ba(e, t)).then((n) => Ca(e, n, t)).then((n) => Da(e, n, t)).then((e) => Oa(e, t));
3755
3757
  }
3756
3758
  //#endregion
3757
3759
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
3758
- var ka = /url\((['"]?)([^'"]+?)\1\)/g, Aa = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, ja = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3759
- function Ma(e) {
3760
+ var Aa = /url\((['"]?)([^'"]+?)\1\)/g, ja = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Ma = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3761
+ function Na(e) {
3760
3762
  let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
3761
3763
  return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
3762
3764
  }
3763
- function Na(e) {
3765
+ function Pa(e) {
3764
3766
  let t = [];
3765
- return e.replace(ka, (e, n, r) => (t.push(r), e)), t.filter((e) => !ua(e));
3767
+ return e.replace(Aa, (e, n, r) => (t.push(r), e)), t.filter((e) => !da(e));
3766
3768
  }
3767
- async function Pa(e, t, n, r, i) {
3769
+ async function Fa(e, t, n, r, i) {
3768
3770
  try {
3769
- let a = n ? zi(t, n) : t, o = ca(t), s;
3770
- return s = i ? da(await i(a), o) : await ha(a, o, r), e.replace(Ma(t), `$1${s}$3`);
3771
+ let a = n ? Bi(t, n) : t, o = la(t), s;
3772
+ return s = i ? fa(await i(a), o) : await ga(a, o, r), e.replace(Na(t), `$1${s}$3`);
3771
3773
  } catch {}
3772
3774
  return e;
3773
3775
  }
3774
- function Fa(e, { preferredFontFormat: t }) {
3775
- return t ? e.replace(ja, (e) => {
3776
+ function Ia(e, { preferredFontFormat: t }) {
3777
+ return t ? e.replace(Ma, (e) => {
3776
3778
  for (;;) {
3777
- let [n, , r] = Aa.exec(e) || [];
3779
+ let [n, , r] = ja.exec(e) || [];
3778
3780
  if (!r) return "";
3779
3781
  if (r === t) return `src: ${n};`;
3780
3782
  }
3781
3783
  }) : e;
3782
3784
  }
3783
- function Ia(e) {
3784
- return e.search(ka) !== -1;
3785
+ function La(e) {
3786
+ return e.search(Aa) !== -1;
3785
3787
  }
3786
- async function La(e, t, n) {
3787
- if (!Ia(e)) return e;
3788
- let r = Fa(e, n);
3789
- return Na(r).reduce((e, r) => e.then((e) => Pa(e, r, t, n)), Promise.resolve(r));
3788
+ async function Ra(e, t, n) {
3789
+ if (!La(e)) return e;
3790
+ let r = Ia(e, n);
3791
+ return Pa(r).reduce((e, r) => e.then((e) => Fa(e, r, t, n)), Promise.resolve(r));
3790
3792
  }
3791
3793
  //#endregion
3792
3794
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
3793
- async function Ra(e, t, n) {
3795
+ async function za(e, t, n) {
3794
3796
  let r = t.style?.getPropertyValue(e);
3795
3797
  if (r) {
3796
- let i = await La(r, null, n);
3798
+ let i = await Ra(r, null, n);
3797
3799
  return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
3798
3800
  }
3799
3801
  return !1;
3800
3802
  }
3801
- async function za(e, t) {
3802
- await Ra("background", e, t) || await Ra("background-image", e, t), await Ra("mask", e, t) || await Ra("-webkit-mask", e, t) || await Ra("mask-image", e, t) || await Ra("-webkit-mask-image", e, t);
3803
- }
3804
3803
  async function Ba(e, t) {
3804
+ await za("background", e, t) || await za("background-image", e, t), await za("mask", e, t) || await za("-webkit-mask", e, t) || await za("mask-image", e, t) || await za("-webkit-mask-image", e, t);
3805
+ }
3806
+ async function Va(e, t) {
3805
3807
  let n = X(e, HTMLImageElement);
3806
- if (!(n && !ua(e.src)) && !(X(e, SVGImageElement) && !ua(e.href.baseVal))) return;
3807
- let r = n ? e.src : e.href.baseVal, i = await ha(r, ca(r), t);
3808
+ if (!(n && !da(e.src)) && !(X(e, SVGImageElement) && !da(e.href.baseVal))) return;
3809
+ let r = n ? e.src : e.href.baseVal, i = await ga(r, la(r), t);
3808
3810
  await new Promise((r, a) => {
3809
3811
  e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
3810
3812
  try {
@@ -3817,16 +3819,16 @@ async function Ba(e, t) {
3817
3819
  o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
3818
3820
  });
3819
3821
  }
3820
- async function Va(e, t) {
3821
- let n = Vi(e.childNodes).map((e) => Ha(e, t));
3822
+ async function Ha(e, t) {
3823
+ let n = Hi(e.childNodes).map((e) => Ua(e, t));
3822
3824
  await Promise.all(n).then(() => e);
3823
3825
  }
3824
- async function Ha(e, t) {
3825
- X(e, Element) && (await za(e, t), await Ba(e, t), await Va(e, t));
3826
+ async function Ua(e, t) {
3827
+ X(e, Element) && (await Ba(e, t), await Va(e, t), await Ha(e, t));
3826
3828
  }
3827
3829
  //#endregion
3828
3830
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
3829
- function Ua(e, t) {
3831
+ function Wa(e, t) {
3830
3832
  let { style: n } = e;
3831
3833
  t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
3832
3834
  let r = t.style;
@@ -3836,22 +3838,22 @@ function Ua(e, t) {
3836
3838
  }
3837
3839
  //#endregion
3838
3840
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
3839
- var Wa = {};
3840
- async function Ga(e) {
3841
- let t = Wa[e];
3841
+ var Ga = {};
3842
+ async function Ka(e) {
3843
+ let t = Ga[e];
3842
3844
  return t ?? (t = {
3843
3845
  url: e,
3844
3846
  cssText: await (await fetch(e)).text()
3845
- }, Wa[e] = t, t);
3847
+ }, Ga[e] = t, t);
3846
3848
  }
3847
- async function Ka(e, t) {
3849
+ async function qa(e, t) {
3848
3850
  let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
3849
3851
  let a = i.replace(r, "$1");
3850
- return a.startsWith("https://") || (a = new URL(a, e.url).href), fa(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3852
+ return a.startsWith("https://") || (a = new URL(a, e.url).href), pa(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3851
3853
  });
3852
3854
  return Promise.all(i).then(() => n);
3853
3855
  }
3854
- function qa(e) {
3856
+ function Ja(e) {
3855
3857
  if (e == null) return [];
3856
3858
  let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
3857
3859
  for (;;) {
@@ -3871,13 +3873,13 @@ function qa(e) {
3871
3873
  }
3872
3874
  return t;
3873
3875
  }
3874
- async function Ja(e, t) {
3876
+ async function Ya(e, t) {
3875
3877
  let n = [], r = [];
3876
3878
  return e.forEach((n) => {
3877
3879
  if ("cssRules" in n) try {
3878
- Vi(n.cssRules || []).forEach((e, i) => {
3880
+ Hi(n.cssRules || []).forEach((e, i) => {
3879
3881
  if (e.type === CSSRule.IMPORT_RULE) {
3880
- let a = i + 1, o = e.href, s = Ga(o).then((e) => Ka(e, t)).then((e) => qa(e).forEach((e) => {
3882
+ let a = i + 1, o = e.href, s = Ka(o).then((e) => qa(e, t)).then((e) => Ja(e).forEach((e) => {
3881
3883
  try {
3882
3884
  n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
3883
3885
  } catch (t) {
@@ -3894,7 +3896,7 @@ async function Ja(e, t) {
3894
3896
  });
3895
3897
  } catch (i) {
3896
3898
  let a = e.find((e) => e.href == null) || document.styleSheets[0];
3897
- n.href != null && r.push(Ga(n.href).then((e) => Ka(e, t)).then((e) => qa(e).forEach((e) => {
3899
+ n.href != null && r.push(Ka(n.href).then((e) => qa(e, t)).then((e) => Ja(e).forEach((e) => {
3898
3900
  a.insertRule(e, a.cssRules.length);
3899
3901
  })).catch((e) => {
3900
3902
  console.error("Error loading remote stylesheet", e);
@@ -3902,7 +3904,7 @@ async function Ja(e, t) {
3902
3904
  }
3903
3905
  }), Promise.all(r).then(() => (e.forEach((e) => {
3904
3906
  if ("cssRules" in e) try {
3905
- Vi(e.cssRules || []).forEach((e) => {
3907
+ Hi(e.cssRules || []).forEach((e) => {
3906
3908
  n.push(e);
3907
3909
  });
3908
3910
  } catch (t) {
@@ -3910,36 +3912,36 @@ async function Ja(e, t) {
3910
3912
  }
3911
3913
  }), n));
3912
3914
  }
3913
- function Ya(e) {
3914
- return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Ia(e.style.getPropertyValue("src")));
3915
+ function Xa(e) {
3916
+ return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => La(e.style.getPropertyValue("src")));
3915
3917
  }
3916
- async function Xa(e, t) {
3918
+ async function Za(e, t) {
3917
3919
  if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
3918
- return Ya(await Ja(Vi(e.ownerDocument.styleSheets), t));
3920
+ return Xa(await Ya(Hi(e.ownerDocument.styleSheets), t));
3919
3921
  }
3920
- function Za(e) {
3922
+ function Qa(e) {
3921
3923
  return e.trim().replace(/["']/g, "");
3922
3924
  }
3923
- function Qa(e) {
3925
+ function $a(e) {
3924
3926
  let t = /* @__PURE__ */ new Set();
3925
3927
  function n(e) {
3926
3928
  (e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
3927
- t.add(Za(e));
3929
+ t.add(Qa(e));
3928
3930
  }), Array.from(e.children).forEach((e) => {
3929
3931
  e instanceof HTMLElement && n(e);
3930
3932
  });
3931
3933
  }
3932
3934
  return n(e), t;
3933
3935
  }
3934
- async function $a(e, t) {
3935
- let n = await Xa(e, t), r = Qa(e);
3936
- return (await Promise.all(n.filter((e) => r.has(Za(e.style.fontFamily))).map((e) => {
3936
+ async function eo(e, t) {
3937
+ let n = await Za(e, t), r = $a(e);
3938
+ return (await Promise.all(n.filter((e) => r.has(Qa(e.style.fontFamily))).map((e) => {
3937
3939
  let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
3938
- return La(e.cssText, n, t);
3940
+ return Ra(e.cssText, n, t);
3939
3941
  }))).join("\n");
3940
3942
  }
3941
- async function eo(e, t) {
3942
- let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await $a(e, t) : t.fontEmbedCSS;
3943
+ async function to(e, t) {
3944
+ let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await eo(e, t) : t.fontEmbedCSS;
3943
3945
  if (n) {
3944
3946
  let t = document.createElement("style"), r = document.createTextNode(n);
3945
3947
  t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
@@ -3947,18 +3949,35 @@ async function eo(e, t) {
3947
3949
  }
3948
3950
  //#endregion
3949
3951
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
3950
- async function to(e, t = {}) {
3951
- let { width: n, height: r } = qi(e, t), i = await Oa(e, t, !0);
3952
- return await eo(i, t), await Ha(i, t), Ua(i, t), await Qi(i, n, r);
3953
- }
3954
3952
  async function no(e, t = {}) {
3955
- let { width: n, height: r } = qi(e, t), i = await Xi(await to(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Ji(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3956
- return a.width = c * s, a.height = l * s, t.skipAutoScale || Yi(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;
3953
+ let { width: n, height: r } = Ji(e, t), i = await ka(e, t, !0);
3954
+ return await to(i, t), await Ua(i, t), Wa(i, t), await $i(i, n, r);
3955
+ }
3956
+ async function ro(e, t = {}) {
3957
+ let { width: n, height: r } = Ji(e, t), i = await Zi(await no(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Yi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3958
+ return a.width = c * s, a.height = l * s, t.skipAutoScale || Xi(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
3957
3959
  }
3958
3960
  //#endregion
3959
3961
  //#region src/runtime/screenshot.ts
3960
- var ro = 2 * 1024 * 1024, io = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", ao = "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\"]";
3961
- function oo(e) {
3962
+ var io = 2 * 1024 * 1024, ao = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", oo = [
3963
+ {
3964
+ quality: .85,
3965
+ scale: 1
3966
+ },
3967
+ {
3968
+ quality: .6,
3969
+ scale: 1
3970
+ },
3971
+ {
3972
+ quality: .6,
3973
+ scale: .75
3974
+ },
3975
+ {
3976
+ quality: .6,
3977
+ scale: .5
3978
+ }
3979
+ ], so = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", co = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
3980
+ function lo(e) {
3962
3981
  let t = e.parentElement;
3963
3982
  for (; t;) {
3964
3983
  if (t.hasAttribute("data-markup-safe")) return !0;
@@ -3966,37 +3985,37 @@ function oo(e) {
3966
3985
  }
3967
3986
  return !1;
3968
3987
  }
3969
- function so(e) {
3988
+ function uo(e) {
3970
3989
  let t = /* @__PURE__ */ new Set(), n = [];
3971
3990
  function r(e) {
3972
3991
  t.has(e) || (t.add(e), n.push(e));
3973
3992
  }
3974
3993
  for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
3975
- for (let e of document.querySelectorAll(ao)) oo(e) || r(e);
3994
+ for (let e of document.querySelectorAll(co)) lo(e) || r(e);
3976
3995
  if (e.redactSelector) try {
3977
- for (let t of document.querySelectorAll(e.redactSelector)) oo(t) || r(t);
3996
+ for (let t of document.querySelectorAll(e.redactSelector)) lo(t) || r(t);
3978
3997
  } catch (e) {
3979
- M(e, { context: "screenshot-redact-selector" });
3998
+ N(e, { context: "screenshot-redact-selector" });
3980
3999
  }
3981
- if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) oo(e) || r(e);
4000
+ if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) lo(e) || r(e);
3982
4001
  return n;
3983
4002
  }
3984
- function co(e) {
4003
+ function fo(e) {
3985
4004
  let t = e.getAttribute("style");
3986
- return e.setAttribute("style", t ? `${t};${io}` : io), () => {
4005
+ return e.setAttribute("style", t ? `${t};${so}` : so), () => {
3987
4006
  t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
3988
4007
  };
3989
4008
  }
3990
- function lo(e) {
4009
+ function po(e) {
3991
4010
  if (e.id) return `#${CSS.escape(e.id)}`;
3992
4011
  let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
3993
4012
  return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
3994
4013
  }
3995
- async function uo(e, t, n) {
4014
+ async function mo(e, t, n) {
3996
4015
  try {
3997
- let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? so(n) : [], s = o.map(lo), c = o.map(co), l;
4016
+ let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? uo(n) : [], s = o.map(po), c = o.map(fo), l;
3998
4017
  try {
3999
- l = await no(document.documentElement, {
4018
+ l = await ro(document.documentElement, {
4000
4019
  width: r,
4001
4020
  height: i,
4002
4021
  cacheBust: !0,
@@ -4005,6 +4024,8 @@ async function uo(e, t, n) {
4005
4024
  filter(t) {
4006
4025
  return !(e && (t === e || e.contains(t)) || t instanceof Element && t.hasAttribute("data-markup-skip"));
4007
4026
  },
4027
+ imagePlaceholder: ao,
4028
+ onImageErrorHandler: () => {},
4008
4029
  style: {
4009
4030
  transform: `translateY(-${window.scrollY}px)`,
4010
4031
  transformOrigin: "top left"
@@ -4015,29 +4036,41 @@ async function uo(e, t, n) {
4015
4036
  }
4016
4037
  if (t) {
4017
4038
  let e = l.getContext("2d");
4018
- e && po(e, t.x, t.y, a);
4039
+ e && vo(e, t.x, t.y, a);
4019
4040
  }
4020
- let u = await fo(l, .85);
4021
- if (!u) return null;
4022
- if (u.size <= ro) return {
4041
+ let u = await _o(l);
4042
+ return u ? {
4023
4043
  blob: u,
4024
4044
  redactedCount: s.length,
4025
4045
  redactedSelectors: s
4026
- };
4027
- let d = await fo(l, .5);
4028
- return !d || d.size > ro ? null : {
4029
- blob: d,
4030
- redactedCount: s.length,
4031
- redactedSelectors: s
4032
- };
4046
+ } : null;
4033
4047
  } catch (e) {
4034
- return M(e, { context: "screenshot-capture" }), null;
4048
+ return N(e, { context: "screenshot-capture" }), null;
4035
4049
  }
4036
4050
  }
4037
- function fo(e, t) {
4051
+ function ho(e, t) {
4038
4052
  return new Promise((n) => e.toBlob(n, "image/jpeg", t));
4039
4053
  }
4040
- function po(e, t, n, r) {
4054
+ function go(e, t) {
4055
+ let n = document.createElement("canvas");
4056
+ n.width = Math.max(1, Math.round(e.width * t)), n.height = Math.max(1, Math.round(e.height * t));
4057
+ let r = n.getContext("2d");
4058
+ return r ? (r.imageSmoothingQuality = "high", r.drawImage(e, 0, 0, n.width, n.height), n) : null;
4059
+ }
4060
+ async function _o(e) {
4061
+ let t = null;
4062
+ for (let { quality: n, scale: r } of oo) {
4063
+ let i = r === 1 ? e : go(e, r);
4064
+ if (!i) continue;
4065
+ let a = await ho(i, n);
4066
+ if (a) {
4067
+ if (a.size <= io) return a;
4068
+ t = t == null ? a.size : Math.min(t, a.size);
4069
+ }
4070
+ }
4071
+ return N(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${io})`), { context: "screenshot-encode" }), null;
4072
+ }
4073
+ function vo(e, t, n, r) {
4041
4074
  let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
4042
4075
  e.save();
4043
4076
  let l = 2 * i;
@@ -4055,7 +4088,7 @@ function po(e, t, n, r) {
4055
4088
  }
4056
4089
  //#endregion
4057
4090
  //#region src/runtime/use-subscription-token.ts
4058
- var mo = Ar({
4091
+ var yo = Ar({
4059
4092
  idle: { issued: (e, t) => ({
4060
4093
  kind: "active",
4061
4094
  token: t.token,
@@ -4066,9 +4099,9 @@ var mo = Ar({
4066
4099
  token: t.token,
4067
4100
  expiresAt: t.expiresAt
4068
4101
  }) }
4069
- }), ho = 30 * 6e4, go = 6e4, _o = 6e4;
4070
- function vo(e) {
4071
- let [t, n] = jr(mo, { kind: "idle" });
4102
+ }), bo = 30 * 6e4, xo = 6e4, So = 6e4;
4103
+ function Co(e) {
4104
+ let [t, n] = jr(yo, { kind: "idle" });
4072
4105
  return R(() => {
4073
4106
  let t = !1, r = null;
4074
4107
  async function i() {
@@ -4080,11 +4113,11 @@ function vo(e) {
4080
4113
  token: a.token,
4081
4114
  expiresAt: a.expiresAt
4082
4115
  });
4083
- let o = Math.max(go, a.expiresAt - Date.now() - ho);
4116
+ let o = Math.max(xo, a.expiresAt - Date.now() - bo);
4084
4117
  r = setTimeout(i, o);
4085
4118
  } catch (e) {
4086
4119
  if (t) return;
4087
- e?.name !== "TypeError" && M(e, { context: "subscription-token-refresh" }), r = setTimeout(i, _o);
4120
+ e?.name !== "TypeError" && N(e, { context: "subscription-token-refresh" }), r = setTimeout(i, So);
4088
4121
  }
4089
4122
  }
4090
4123
  return i(), () => {
@@ -4094,7 +4127,7 @@ function vo(e) {
4094
4127
  }
4095
4128
  //#endregion
4096
4129
  //#region src/runtime/refresh-token.ts
4097
- async function yo(e) {
4130
+ async function wo(e) {
4098
4131
  try {
4099
4132
  let t = {
4100
4133
  method: "POST",
@@ -4125,13 +4158,13 @@ async function yo(e) {
4125
4158
  };
4126
4159
  } catch (e) {
4127
4160
  let t = e?.name;
4128
- return t !== "AbortError" && t !== "TypeError" && M(e, { context: "refresh-token" }), null;
4161
+ return t !== "AbortError" && t !== "TypeError" && N(e, { context: "refresh-token" }), null;
4129
4162
  }
4130
4163
  }
4131
4164
  //#endregion
4132
4165
  //#region src/runtime/use-token-refresh.ts
4133
- var bo = 6e4, xo = 500;
4134
- function So(e, t, n, r, i) {
4166
+ var To = 6e4, Eo = 500;
4167
+ function Do(e, t, n, r, i) {
4135
4168
  let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
4136
4169
  R(() => {
4137
4170
  if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
@@ -4140,8 +4173,8 @@ function So(e, t, n, r, i) {
4140
4173
  i();
4141
4174
  return;
4142
4175
  }
4143
- let d = Math.max(xo, l - bo - u), f = new AbortController(), p = window.setTimeout(async () => {
4144
- let a = await yo({
4176
+ let d = Math.max(Eo, l - To - u), f = new AbortController(), p = window.setTimeout(async () => {
4177
+ let a = await wo({
4145
4178
  apiUrl: t,
4146
4179
  apiKey: n,
4147
4180
  mode: o,
@@ -4184,7 +4217,7 @@ function So(e, t, n, r, i) {
4184
4217
  function Z(...e) {
4185
4218
  return e.filter(Boolean).join(" ");
4186
4219
  }
4187
- function Co() {
4220
+ function Oo() {
4188
4221
  return typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? {
4189
4222
  mod: "⌘",
4190
4223
  enter: "↵"
@@ -4195,7 +4228,7 @@ function Co() {
4195
4228
  }
4196
4229
  //#endregion
4197
4230
  //#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
4198
- var wo = 0;
4231
+ var ko = 0;
4199
4232
  Array.isArray;
4200
4233
  function Q(e, n, r, i, a, o) {
4201
4234
  n ||= {};
@@ -4212,7 +4245,7 @@ function Q(e, n, r, i, a, o) {
4212
4245
  __e: null,
4213
4246
  __c: null,
4214
4247
  constructor: void 0,
4215
- __v: --wo,
4248
+ __v: --ko,
4216
4249
  __i: -1,
4217
4250
  __u: 0,
4218
4251
  __source: a,
@@ -4223,7 +4256,7 @@ function Q(e, n, r, i, a, o) {
4223
4256
  }
4224
4257
  //#endregion
4225
4258
  //#region src/runtime/ui/icons.tsx
4226
- function To({ size: e = 16 }) {
4259
+ function Ao({ size: e = 16 }) {
4227
4260
  return /* @__PURE__ */ Q("svg", {
4228
4261
  width: e,
4229
4262
  height: e,
@@ -4233,7 +4266,7 @@ function To({ size: e = 16 }) {
4233
4266
  children: /* @__PURE__ */ Q("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
4234
4267
  });
4235
4268
  }
4236
- function Eo({ size: e = 16 }) {
4269
+ function jo({ size: e = 16 }) {
4237
4270
  return /* @__PURE__ */ Q("svg", {
4238
4271
  width: e,
4239
4272
  height: e,
@@ -4242,7 +4275,7 @@ function Eo({ size: e = 16 }) {
4242
4275
  children: /* @__PURE__ */ Q("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
4243
4276
  });
4244
4277
  }
4245
- function Do({ size: e = 16 }) {
4278
+ function Mo({ size: e = 16 }) {
4246
4279
  return /* @__PURE__ */ Q("svg", {
4247
4280
  width: e,
4248
4281
  height: e,
@@ -4252,7 +4285,7 @@ function Do({ size: e = 16 }) {
4252
4285
  children: /* @__PURE__ */ Q("path", { d: "M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z" })
4253
4286
  });
4254
4287
  }
4255
- function Oo({ size: e = 16 }) {
4288
+ function No({ size: e = 16 }) {
4256
4289
  return /* @__PURE__ */ Q("svg", {
4257
4290
  width: e,
4258
4291
  height: e,
@@ -4261,7 +4294,7 @@ function Oo({ size: e = 16 }) {
4261
4294
  children: /* @__PURE__ */ Q("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
4262
4295
  });
4263
4296
  }
4264
- function ko({ size: e = 16 }) {
4297
+ function Po({ size: e = 16 }) {
4265
4298
  return /* @__PURE__ */ Q("svg", {
4266
4299
  xmlns: "http://www.w3.org/2000/svg",
4267
4300
  width: e,
@@ -4271,7 +4304,7 @@ function ko({ size: e = 16 }) {
4271
4304
  children: /* @__PURE__ */ Q("path", { d: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" })
4272
4305
  });
4273
4306
  }
4274
- function Ao({ size: e = 16 }) {
4307
+ function Fo({ size: e = 16 }) {
4275
4308
  return /* @__PURE__ */ Q("svg", {
4276
4309
  width: e,
4277
4310
  height: e,
@@ -4285,7 +4318,7 @@ function Ao({ size: e = 16 }) {
4285
4318
  })
4286
4319
  });
4287
4320
  }
4288
- function jo({ size: e = 16 }) {
4321
+ function Io({ size: e = 16 }) {
4289
4322
  return /* @__PURE__ */ Q("svg", {
4290
4323
  width: e,
4291
4324
  height: e,
@@ -4294,7 +4327,7 @@ function jo({ size: e = 16 }) {
4294
4327
  children: /* @__PURE__ */ Q("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
4295
4328
  });
4296
4329
  }
4297
- function Mo({ size: e = 16 }) {
4330
+ function Lo({ size: e = 16 }) {
4298
4331
  return /* @__PURE__ */ Q("svg", {
4299
4332
  width: e,
4300
4333
  height: e,
@@ -4318,19 +4351,19 @@ function $({ size: e = 16, children: t }) {
4318
4351
  children: t
4319
4352
  });
4320
4353
  }
4321
- function No({ size: e = 16 }) {
4354
+ function Ro({ size: e = 16 }) {
4322
4355
  return /* @__PURE__ */ Q($, {
4323
4356
  size: e,
4324
4357
  children: /* @__PURE__ */ Q("path", { d: "M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8v.5z" })
4325
4358
  });
4326
4359
  }
4327
- function Po({ size: e = 16 }) {
4360
+ function zo({ size: e = 16 }) {
4328
4361
  return /* @__PURE__ */ Q($, {
4329
4362
  size: e,
4330
4363
  children: [/* @__PURE__ */ Q("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" }), /* @__PURE__ */ Q("path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })]
4331
4364
  });
4332
4365
  }
4333
- function Fo({ size: e = 16 }) {
4366
+ function Bo({ size: e = 16 }) {
4334
4367
  return /* @__PURE__ */ Q($, {
4335
4368
  size: e,
4336
4369
  children: [/* @__PURE__ */ Q("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ Q("circle", {
@@ -4340,7 +4373,7 @@ function Fo({ size: e = 16 }) {
4340
4373
  })]
4341
4374
  });
4342
4375
  }
4343
- function Io({ size: e = 16 }) {
4376
+ function Vo({ size: e = 16 }) {
4344
4377
  return /* @__PURE__ */ Q($, {
4345
4378
  size: e,
4346
4379
  children: [
@@ -4351,13 +4384,13 @@ function Io({ size: e = 16 }) {
4351
4384
  ]
4352
4385
  });
4353
4386
  }
4354
- function Lo({ size: e = 16 }) {
4387
+ function Ho({ size: e = 16 }) {
4355
4388
  return /* @__PURE__ */ Q($, {
4356
4389
  size: e,
4357
4390
  children: /* @__PURE__ */ Q("path", { d: "M3 6h18M3 12h18M3 18h18" })
4358
4391
  });
4359
4392
  }
4360
- function Ro({ size: e = 16 }) {
4393
+ function Uo({ size: e = 16 }) {
4361
4394
  return /* @__PURE__ */ Q($, {
4362
4395
  size: e,
4363
4396
  children: [/* @__PURE__ */ Q("circle", {
@@ -4367,13 +4400,13 @@ function Ro({ size: e = 16 }) {
4367
4400
  }), /* @__PURE__ */ Q("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })]
4368
4401
  });
4369
4402
  }
4370
- function zo({ size: e = 16 }) {
4403
+ function Wo({ size: e = 16 }) {
4371
4404
  return /* @__PURE__ */ Q($, {
4372
4405
  size: e,
4373
4406
  children: /* @__PURE__ */ Q("path", { d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z" })
4374
4407
  });
4375
4408
  }
4376
- function Bo({ size: e = 16 }) {
4409
+ function Go({ size: e = 16 }) {
4377
4410
  return /* @__PURE__ */ Q($, {
4378
4411
  size: e,
4379
4412
  children: [/* @__PURE__ */ Q("rect", {
@@ -4385,13 +4418,13 @@ function Bo({ size: e = 16 }) {
4385
4418
  }), /* @__PURE__ */ Q("path", { d: "M8 21h8M12 17v4" })]
4386
4419
  });
4387
4420
  }
4388
- function Vo({ size: e = 16 }) {
4421
+ function Ko({ size: e = 16 }) {
4389
4422
  return /* @__PURE__ */ Q($, {
4390
4423
  size: e,
4391
4424
  children: /* @__PURE__ */ Q("path", { d: "M12 22s8-3.5 8-10V5l-8-3-8 3v7c0 6.5 8 10 8 10z" })
4392
4425
  });
4393
4426
  }
4394
- function Ho({ size: e = 16 }) {
4427
+ function qo({ size: e = 16 }) {
4395
4428
  return /* @__PURE__ */ Q($, {
4396
4429
  size: e,
4397
4430
  children: [/* @__PURE__ */ Q("rect", {
@@ -4403,19 +4436,19 @@ function Ho({ size: e = 16 }) {
4403
4436
  }), /* @__PURE__ */ Q("path", { d: "M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M10 14h4" })]
4404
4437
  });
4405
4438
  }
4406
- function Uo({ size: e = 16 }) {
4439
+ function Jo({ size: e = 16 }) {
4407
4440
  return /* @__PURE__ */ Q($, {
4408
4441
  size: e,
4409
4442
  children: [/* @__PURE__ */ Q("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }), /* @__PURE__ */ Q("path", { d: "M10 17l5-5-5-5M15 12H3" })]
4410
4443
  });
4411
4444
  }
4412
- function Wo({ size: e = 16 }) {
4445
+ function Yo({ size: e = 16 }) {
4413
4446
  return /* @__PURE__ */ Q($, {
4414
4447
  size: e,
4415
4448
  children: [/* @__PURE__ */ Q("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ Q("path", { d: "M16 17l5-5-5-5M21 12H9" })]
4416
4449
  });
4417
4450
  }
4418
- function Go({ size: e = 16 }) {
4451
+ function Xo({ size: e = 16 }) {
4419
4452
  return /* @__PURE__ */ Q($, {
4420
4453
  size: e,
4421
4454
  children: [/* @__PURE__ */ Q("circle", {
@@ -4425,7 +4458,7 @@ function Go({ size: e = 16 }) {
4425
4458
  }), /* @__PURE__ */ Q("path", { d: "M4 21a8 8 0 0 1 16 0" })]
4426
4459
  });
4427
4460
  }
4428
- function Ko({ size: e = 16 }) {
4461
+ function Zo({ size: e = 16 }) {
4429
4462
  return /* @__PURE__ */ Q($, {
4430
4463
  size: e,
4431
4464
  children: [
@@ -4444,7 +4477,7 @@ function Ko({ size: e = 16 }) {
4444
4477
  ]
4445
4478
  });
4446
4479
  }
4447
- function qo({ size: e = 16 }) {
4480
+ function Qo({ size: e = 16 }) {
4448
4481
  return /* @__PURE__ */ Q($, {
4449
4482
  size: e,
4450
4483
  children: [
@@ -4456,7 +4489,7 @@ function qo({ size: e = 16 }) {
4456
4489
  }
4457
4490
  //#endregion
4458
4491
  //#region src/runtime/ui/identity-menu.tsx
4459
- function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, onSignIn: a, onSignOut: o, onForgetMe: s }) {
4492
+ function $o({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, onSignIn: a, onSignOut: o, onForgetMe: s }) {
4460
4493
  let [c, l] = L(!1), [u, d] = L(!1), [f, p] = L(!1), m = z(null);
4461
4494
  R(() => {
4462
4495
  if (!c) return;
@@ -4473,7 +4506,7 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4473
4506
  }, [c]), R(() => {
4474
4507
  c || (d(!1), p(!1));
4475
4508
  }, [c]);
4476
- let h = Mi(e), g = Yo(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = L(null), x = _ && v != null && y !== v, C = _ ? e.identity.email : null, w = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
4509
+ let h = Ni(e), g = es(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = L(null), x = _ && v != null && y !== v, C = _ ? e.identity.email : null, w = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
4477
4510
  return /* @__PURE__ */ Q("div", {
4478
4511
  ref: m,
4479
4512
  style: {
@@ -4506,7 +4539,7 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4506
4539
  }) : _ && g ? /* @__PURE__ */ Q("span", {
4507
4540
  class: "markup-avatar-initials",
4508
4541
  children: g
4509
- }) : /* @__PURE__ */ Q(Go, { size: 14 })
4542
+ }) : /* @__PURE__ */ Q(Xo, { size: 14 })
4510
4543
  }), _ && h ? /* @__PURE__ */ Q("span", {
4511
4544
  class: "markup-sr-only",
4512
4545
  children: h
@@ -4535,7 +4568,7 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4535
4568
  onClick: () => l(!1),
4536
4569
  children: [/* @__PURE__ */ Q("span", {
4537
4570
  class: "ic",
4538
- children: /* @__PURE__ */ Q(qo, { size: 16 })
4571
+ children: /* @__PURE__ */ Q(Qo, { size: 16 })
4539
4572
  }), /* @__PURE__ */ Q("span", {
4540
4573
  class: "lbl",
4541
4574
  children: "Account"
@@ -4551,7 +4584,7 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4551
4584
  },
4552
4585
  children: [/* @__PURE__ */ Q("span", {
4553
4586
  class: "ic",
4554
- children: /* @__PURE__ */ Q(Wo, { size: 16 })
4587
+ children: /* @__PURE__ */ Q(Yo, { size: 16 })
4555
4588
  }), /* @__PURE__ */ Q("span", {
4556
4589
  class: "lbl",
4557
4590
  children: r ? "Signing out…" : f ? "Confirm — sign out of this site" : "Sign out"
@@ -4574,7 +4607,7 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4574
4607
  onClick: () => {
4575
4608
  l(!1), a();
4576
4609
  },
4577
- children: [/* @__PURE__ */ Q(Uo, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
4610
+ children: [/* @__PURE__ */ Q(Jo, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
4578
4611
  }),
4579
4612
  /* @__PURE__ */ Q("button", {
4580
4613
  type: "button",
@@ -4593,171 +4626,12 @@ function Jo({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4593
4626
  }) : null]
4594
4627
  });
4595
4628
  }
4596
- function Yo(e) {
4629
+ function es(e) {
4597
4630
  return e && e.trim().split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || null;
4598
4631
  }
4599
4632
  //#endregion
4600
- //#region src/runtime/ui/notifications-panel.tsx
4601
- function Xo({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMarkAllRead: a, isMarkingAll: o }) {
4602
- let s = e.some((e) => e.readAt == null);
4603
- return /* @__PURE__ */ Q("div", {
4604
- class: "markup-notifications-panel",
4605
- role: "dialog",
4606
- "aria-label": "Notifications",
4607
- children: [/* @__PURE__ */ Q("header", {
4608
- class: "markup-notifications-panel-header",
4609
- children: [
4610
- /* @__PURE__ */ Q("button", {
4611
- type: "button",
4612
- class: "markup-icon-btn",
4613
- title: "Back to menu",
4614
- "aria-label": "Back to menu",
4615
- onClick: r,
4616
- children: /* @__PURE__ */ Q(Do, { size: 16 })
4617
- }),
4618
- /* @__PURE__ */ Q("span", {
4619
- class: "markup-eyebrow",
4620
- children: "notifications"
4621
- }),
4622
- /* @__PURE__ */ Q("div", {
4623
- class: "markup-notifications-panel-actions",
4624
- children: s ? /* @__PURE__ */ Q("button", {
4625
- type: "button",
4626
- class: "markup-notifications-panel-mark-all",
4627
- disabled: o,
4628
- onClick: a,
4629
- children: o ? "Marking…" : "Mark all read"
4630
- }) : null
4631
- })
4632
- ]
4633
- }), /* @__PURE__ */ Q("div", {
4634
- class: "markup-notifications-panel-body",
4635
- children: n ? /* @__PURE__ */ Q("p", {
4636
- class: "markup-notifications-panel-error",
4637
- children: n
4638
- }) : t ? /* @__PURE__ */ Q("p", {
4639
- class: "markup-notifications-panel-empty",
4640
- children: "Loading…"
4641
- }) : e.length === 0 ? /* @__PURE__ */ Q("div", {
4642
- class: "markup-notifications-panel-empty",
4643
- children: [/* @__PURE__ */ Q("p", {
4644
- class: "markup-notifications-panel-empty-title",
4645
- children: "You're all caught up."
4646
- }), /* @__PURE__ */ Q("p", {
4647
- class: "markup-notifications-panel-empty-sub",
4648
- children: "New @mentions on this site land here."
4649
- })]
4650
- }) : /* @__PURE__ */ Q("ul", {
4651
- class: "markup-notifications-panel-list",
4652
- children: e.map((e) => /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q("button", {
4653
- type: "button",
4654
- class: Z("markup-notifications-panel-row", e.readAt == null && "is-unread"),
4655
- onClick: () => i(e),
4656
- children: [
4657
- /* @__PURE__ */ Q("div", {
4658
- class: "markup-notifications-panel-meta",
4659
- children: [
4660
- e.readAt == null ? /* @__PURE__ */ Q("span", {
4661
- "aria-hidden": "true",
4662
- class: "markup-notifications-panel-dot"
4663
- }) : null,
4664
- /* @__PURE__ */ Q("span", {
4665
- class: "markup-notifications-panel-actor",
4666
- children: e.actorName
4667
- }),
4668
- e.actorVia === "mcp" ? /* @__PURE__ */ Q("span", {
4669
- class: "markup-comment-badge is-agent",
4670
- role: "img",
4671
- "aria-label": "Written by an AI agent",
4672
- title: "Written by an AI agent on this person's behalf",
4673
- children: /* @__PURE__ */ Q(Ko, { size: 11 })
4674
- }) : null,
4675
- /* @__PURE__ */ Q("span", {
4676
- class: "markup-notifications-panel-sep",
4677
- children: "·"
4678
- }),
4679
- /* @__PURE__ */ Q("span", {
4680
- class: "markup-notifications-panel-time",
4681
- children: Zo(e.createdAt)
4682
- })
4683
- ]
4684
- }),
4685
- /* @__PURE__ */ Q("p", {
4686
- class: "markup-notifications-panel-thread",
4687
- children: [
4688
- "mentioned you in",
4689
- " ",
4690
- /* @__PURE__ */ Q("span", {
4691
- class: "markup-notifications-panel-thread-title",
4692
- children: e.threadTitle
4693
- })
4694
- ]
4695
- }),
4696
- e.commentExcerpt ? /* @__PURE__ */ Q("p", {
4697
- class: "markup-notifications-panel-excerpt",
4698
- children: [
4699
- "“",
4700
- e.commentExcerpt,
4701
- "”"
4702
- ]
4703
- }) : null
4704
- ]
4705
- }) }, e._id))
4706
- })
4707
- })]
4708
- });
4709
- }
4710
- function Zo(e) {
4711
- let t = Date.now() - e, n = Math.floor(t / 1e3);
4712
- if (n < 60) return "just now";
4713
- let r = Math.floor(n / 60);
4714
- if (r < 60) return `${r}m ago`;
4715
- let i = Math.floor(r / 60);
4716
- if (i < 24) return `${i}h ago`;
4717
- let a = Math.floor(i / 24);
4718
- return a < 30 ? `${a}d ago` : new Date(e).toLocaleDateString();
4719
- }
4720
- //#endregion
4721
- //#region src/runtime/ui/inbox-popover.tsx
4722
- function Qo({ position: e, items: t, isLoading: n, error: r, isMarkingAll: i, onClose: a, onItemClick: o, onMarkAllRead: s }) {
4723
- let c = z(null);
4724
- return R(() => {
4725
- function e(e) {
4726
- let t = c.current;
4727
- if (t && !e.composedPath().includes(t)) {
4728
- if (e.composedPath().some((e) => e?.dataset?.kind === "inbox")) return;
4729
- a();
4730
- }
4731
- }
4732
- function t(e) {
4733
- e.key === "Escape" && a();
4734
- }
4735
- return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
4736
- document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
4737
- };
4738
- }, [a]), /* @__PURE__ */ Q("div", {
4739
- ref: c,
4740
- class: Z("markup-inbox-pop", e === "bottom-left" ? "markup-inbox-pop-left" : e === "bottom-center" ? "markup-inbox-pop-center" : "markup-inbox-pop-right"),
4741
- role: "dialog",
4742
- "aria-label": "Inbox",
4743
- children: /* @__PURE__ */ Q("div", {
4744
- class: "markup-pop",
4745
- "data-pop": "inbox",
4746
- children: /* @__PURE__ */ Q(Xo, {
4747
- items: t,
4748
- isLoading: n,
4749
- error: r,
4750
- isMarkingAll: i,
4751
- onBack: a,
4752
- onItemClick: o,
4753
- onMarkAllRead: s
4754
- })
4755
- })
4756
- });
4757
- }
4758
- //#endregion
4759
4633
  //#region src/runtime/use-drag.ts
4760
- function $o(e) {
4634
+ function ts(e) {
4761
4635
  let t = z(e);
4762
4636
  t.current = e;
4763
4637
  let [n, r] = L(!1);
@@ -4785,8 +4659,8 @@ function $o(e) {
4785
4659
  h = !0, r(!0), t.current.onStart?.();
4786
4660
  }
4787
4661
  let a = Math.max(p, window.innerWidth - u - p), _ = Math.max(p, window.innerHeight - d - p), v = {
4788
- left: es(c + n, p, a),
4789
- top: es(l + i, p, _)
4662
+ left: ns(c + n, p, a),
4663
+ top: ns(l + i, p, _)
4790
4664
  };
4791
4665
  g = v, t.current.onMove(v);
4792
4666
  }
@@ -4801,12 +4675,12 @@ function $o(e) {
4801
4675
  isDragging: n
4802
4676
  };
4803
4677
  }
4804
- function es(e, t, n) {
4678
+ function ns(e, t, n) {
4805
4679
  return Math.max(t, Math.min(n, e));
4806
4680
  }
4807
4681
  //#endregion
4808
4682
  //#region src/runtime/use-focus-trap.ts
4809
- var ts = [
4683
+ var rs = [
4810
4684
  "a[href]",
4811
4685
  "button:not([disabled])",
4812
4686
  "input:not([disabled])",
@@ -4814,14 +4688,14 @@ var ts = [
4814
4688
  "textarea:not([disabled])",
4815
4689
  "[tabindex]:not([tabindex=\"-1\"])"
4816
4690
  ].join(",");
4817
- function ns(e, t) {
4691
+ function is(e, t) {
4818
4692
  R(() => {
4819
4693
  if (!t) return;
4820
4694
  let n = e.current;
4821
4695
  if (!n) return;
4822
4696
  function r(e) {
4823
4697
  if (e.key !== "Tab") return;
4824
- let t = Array.from(n.querySelectorAll(ts)), r = t[0], i = t[t.length - 1];
4698
+ let t = Array.from(n.querySelectorAll(rs)), r = t[0], i = t[t.length - 1];
4825
4699
  if (!r || !i) return;
4826
4700
  let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
4827
4701
  (e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
@@ -4831,7 +4705,7 @@ function ns(e, t) {
4831
4705
  }
4832
4706
  //#endregion
4833
4707
  //#region src/runtime/use-object-url.ts
4834
- function rs(e) {
4708
+ function as(e) {
4835
4709
  let [t, n] = L(null);
4836
4710
  return R(() => {
4837
4711
  if (!e) {
@@ -4844,7 +4718,7 @@ function rs(e) {
4844
4718
  }
4845
4719
  //#endregion
4846
4720
  //#region src/runtime/ui/author-prompt.tsx
4847
- function is({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4721
+ function os({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4848
4722
  let [o, s] = L(""), [c, l] = L(""), u = z(null);
4849
4723
  R(() => {
4850
4724
  u.current?.focus();
@@ -4923,27 +4797,27 @@ function is({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
4923
4797
  }
4924
4798
  //#endregion
4925
4799
  //#region src/runtime/mention-input.ts
4926
- var as = "data-markup-mention", os = "data-markup-mention-name", ss = new Set([
4800
+ var ss = "data-markup-mention", cs = "data-markup-mention-name", ls = new Set([
4927
4801
  "DIV",
4928
4802
  "P",
4929
4803
  "LI",
4930
4804
  "BLOCKQUOTE",
4931
4805
  "PRE"
4932
- ]), cs = 3, ls = 1;
4933
- function us(e) {
4806
+ ]), us = 3, ds = 1;
4807
+ function fs(e) {
4934
4808
  let t = "", n = (r) => {
4935
4809
  let i = r.childNodes;
4936
4810
  for (let a = 0; a < i.length; a++) {
4937
4811
  let o = i[a];
4938
4812
  if (!o) continue;
4939
- if (o.nodeType === cs) {
4813
+ if (o.nodeType === us) {
4940
4814
  t += o.data;
4941
4815
  continue;
4942
4816
  }
4943
- if (o.nodeType !== ls) continue;
4944
- let s = o, c = s.getAttribute(as);
4817
+ if (o.nodeType !== ds) continue;
4818
+ let s = o, c = s.getAttribute(ss);
4945
4819
  if (c) {
4946
- let e = ds(s);
4820
+ let e = ps(s);
4947
4821
  t += Ir({
4948
4822
  userId: c,
4949
4823
  name: e
@@ -4954,77 +4828,77 @@ function us(e) {
4954
4828
  r === e && a === i.length - 1 || (t += "\n");
4955
4829
  continue;
4956
4830
  }
4957
- ss.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
4831
+ ls.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
4958
4832
  }
4959
4833
  };
4960
4834
  return n(e), t;
4961
4835
  }
4962
- function ds(e) {
4963
- return e.getAttribute(os) || (e.textContent ?? "").replace(/^@/, "");
4836
+ function ps(e) {
4837
+ return e.getAttribute(cs) || (e.textContent ?? "").replace(/^@/, "");
4964
4838
  }
4965
- function fs(e, t, n) {
4839
+ function ms(e, t, n) {
4966
4840
  let r = e.createElement("span");
4967
- return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(as, t.userId), r.setAttribute(os, t.name), r.textContent = `@${t.name}`, r;
4841
+ return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(ss, t.userId), r.setAttribute(cs, t.name), r.textContent = `@${t.name}`, r;
4968
4842
  }
4969
- function ps(e, t, n) {
4843
+ function hs(e, t, n) {
4970
4844
  let r = e.createDocumentFragment();
4971
4845
  for (let i of Nr(t)) {
4972
4846
  if (i.type === "text") {
4973
4847
  i.value && r.appendChild(e.createTextNode(i.value));
4974
4848
  continue;
4975
4849
  }
4976
- r.appendChild(fs(e, {
4850
+ r.appendChild(ms(e, {
4977
4851
  userId: i.userId,
4978
4852
  name: i.name
4979
4853
  }, n));
4980
4854
  }
4981
4855
  return r;
4982
4856
  }
4983
- function ms(e) {
4857
+ function gs(e) {
4984
4858
  let t = e.getRootNode();
4985
4859
  return typeof t.getSelection == "function" ? t.getSelection() : e.ownerDocument.getSelection();
4986
4860
  }
4987
- function hs(e) {
4988
- let t = ms(e);
4861
+ function _s(e) {
4862
+ let t = gs(e);
4989
4863
  if (!t || t.rangeCount === 0 || !t.isCollapsed) return null;
4990
4864
  let n = t.focusNode;
4991
- return !n || n.nodeType !== cs || !e.contains(n) || gs(n, e) ? null : {
4865
+ return !n || n.nodeType !== us || !e.contains(n) || vs(n, e) ? null : {
4992
4866
  node: n,
4993
4867
  offset: t.focusOffset
4994
4868
  };
4995
4869
  }
4996
- function gs(e, t) {
4870
+ function vs(e, t) {
4997
4871
  let n = e;
4998
4872
  for (; n && n !== t;) {
4999
- if (n.nodeType === ls && n.hasAttribute("data-markup-mention")) return n;
4873
+ if (n.nodeType === ds && n.hasAttribute("data-markup-mention")) return n;
5000
4874
  n = n.parentNode;
5001
4875
  }
5002
4876
  return null;
5003
4877
  }
5004
- function _s(e) {
5005
- let t = ms(e);
4878
+ function ys(e) {
4879
+ let t = gs(e);
5006
4880
  if (!t || t.rangeCount === 0 || !t.isCollapsed) return;
5007
4881
  let n = t.focusNode;
5008
4882
  if (!n || !e.contains(n)) return;
5009
- let r = gs(n, e);
4883
+ let r = vs(n, e);
5010
4884
  if (!r) return;
5011
4885
  let i = r.nextSibling;
5012
- (!i || i.nodeType !== cs) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), vs(e, i, 0);
4886
+ (!i || i.nodeType !== us) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), bs(e, i, 0);
5013
4887
  }
5014
- function vs(e, t, n) {
5015
- let r = ms(e);
4888
+ function bs(e, t, n) {
4889
+ let r = gs(e);
5016
4890
  if (!r) return;
5017
4891
  let i = e.ownerDocument.createRange();
5018
4892
  i.setStart(t, n), i.collapse(!0), r.removeAllRanges(), r.addRange(i);
5019
4893
  }
5020
- function ys(e) {
4894
+ function xs(e) {
5021
4895
  let t = Fr(e.node.data, e.offset);
5022
4896
  return t ? {
5023
4897
  ...t,
5024
4898
  textNode: e.node
5025
4899
  } : null;
5026
4900
  }
5027
- function bs(e, t, n, r) {
4901
+ function Ss(e, t, n, r) {
5028
4902
  if (Ir(n) == null) return !1;
5029
4903
  let i = t.textNode;
5030
4904
  if (!e.contains(i)) return !1;
@@ -5032,31 +4906,31 @@ function bs(e, t, n, r) {
5032
4906
  if (!a || t.caret > i.data.length) return !1;
5033
4907
  i.deleteData(t.at, t.caret - t.at);
5034
4908
  let o = i.splitText(t.at);
5035
- return a.insertBefore(fs(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), vs(e, o, 1), !0;
4909
+ return a.insertBefore(ms(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), bs(e, o, 1), !0;
5036
4910
  }
5037
- function xs(e, t) {
5038
- let n = ms(e);
4911
+ function Cs(e, t) {
4912
+ let n = gs(e);
5039
4913
  if (!n || n.rangeCount === 0) return;
5040
4914
  let r = n.getRangeAt(0);
5041
4915
  if (!e.contains(r.commonAncestorContainer)) return;
5042
4916
  r.deleteContents();
5043
4917
  let { startContainer: i, startOffset: a } = r;
5044
- if (i.nodeType === cs) {
4918
+ if (i.nodeType === us) {
5045
4919
  let n = i;
5046
- n.insertData(a, t), vs(e, n, a + t.length);
4920
+ n.insertData(a, t), bs(e, n, a + t.length);
5047
4921
  return;
5048
4922
  }
5049
4923
  let o = e.ownerDocument.createTextNode(t);
5050
- r.insertNode(o), vs(e, o, o.data.length);
4924
+ r.insertNode(o), bs(e, o, o.data.length);
5051
4925
  }
5052
- function Ss(e, t) {
4926
+ function ws(e, t) {
5053
4927
  let n = e.ownerDocument, r = null, i = null, a = !0;
5054
4928
  function o(t) {
5055
4929
  let n = t.length === 0;
5056
4930
  n === a && e.hasAttribute("data-empty") === n || (a = n, e.toggleAttribute("data-empty", n));
5057
4931
  }
5058
4932
  function s() {
5059
- let n = us(e);
4933
+ let n = fs(e);
5060
4934
  o(n), t.onChange(n);
5061
4935
  }
5062
4936
  function c(e) {
@@ -5072,7 +4946,7 @@ function Ss(e, t) {
5072
4946
  c(null);
5073
4947
  return;
5074
4948
  }
5075
- let n = hs(e), r = n ? ys(n) : null;
4949
+ let n = _s(e), r = n ? xs(n) : null;
5076
4950
  if (r && i && r.textNode === i.node && r.at === i.at) {
5077
4951
  c(null);
5078
4952
  return;
@@ -5080,29 +4954,29 @@ function Ss(e, t) {
5080
4954
  i = null, c(r);
5081
4955
  }
5082
4956
  function u(r) {
5083
- e.replaceChildren(ps(n, r, t.chipClass)), o(us(e)), i = null, c(null);
4957
+ e.replaceChildren(hs(n, r, t.chipClass)), o(fs(e)), i = null, c(null);
5084
4958
  }
5085
4959
  let d = () => {
5086
4960
  s(), l();
5087
4961
  }, f = () => l(), p = () => {
5088
- _s(e), l();
4962
+ ys(e), l();
5089
4963
  }, m = (t) => {
5090
4964
  let n = t.clipboardData?.getData("text/plain");
5091
- t.preventDefault(), n && (xs(e, n.replace(/\r\n?/g, "\n")), s(), l());
4965
+ t.preventDefault(), n && (Cs(e, n.replace(/\r\n?/g, "\n")), s(), l());
5092
4966
  }, h = (e) => {
5093
4967
  e.preventDefault();
5094
4968
  };
5095
4969
  return e.addEventListener("input", d), e.addEventListener("keyup", f), e.addEventListener("mouseup", p), e.addEventListener("focus", p), e.addEventListener("paste", m), e.addEventListener("drop", h), u(t.initialValue ?? ""), {
5096
- getValue: () => us(e),
4970
+ getValue: () => fs(e),
5097
4971
  setValue: u,
5098
4972
  focus() {
5099
4973
  e.focus();
5100
4974
  let t = e.lastChild;
5101
- t && (t.nodeType === cs ? vs(e, t, t.data.length) : vs(e, e, e.childNodes.length));
4975
+ t && (t.nodeType === us ? bs(e, t, t.data.length) : bs(e, e, e.childNodes.length));
5102
4976
  },
5103
4977
  insertMention(n) {
5104
- let a = hs(e), o = (a ? ys(a) : null) ?? r;
5105
- o && bs(e, o, n, t.chipClass) && (s(), i = null, c(null));
4978
+ let a = _s(e), o = (a ? xs(a) : null) ?? r;
4979
+ o && Ss(e, o, n, t.chipClass) && (s(), i = null, c(null));
5106
4980
  },
5107
4981
  syncTrigger: l,
5108
4982
  clearTrigger: () => c(null),
@@ -5117,21 +4991,21 @@ function Ss(e, t) {
5117
4991
  }
5118
4992
  };
5119
4993
  }
5120
- var Cs = null;
5121
- function ws() {
5122
- if (Cs) return Cs;
4994
+ var Ts = null;
4995
+ function Es() {
4996
+ if (Ts) return Ts;
5123
4997
  if (typeof document > "u") return "true";
5124
4998
  let e = document.createElement("div");
5125
4999
  try {
5126
- e.contentEditable = "plaintext-only", Cs = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
5000
+ e.contentEditable = "plaintext-only", Ts = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
5127
5001
  } catch {
5128
- Cs = "true";
5002
+ Ts = "true";
5129
5003
  }
5130
- return Cs;
5004
+ return Ts;
5131
5005
  }
5132
5006
  //#endregion
5133
5007
  //#region src/runtime/ui/mentions.tsx
5134
- function Ts({ body: e, mentions: t, trailing: n }) {
5008
+ function Ds({ body: e, mentions: t, trailing: n }) {
5135
5009
  let r = B(() => new Set(t), [t]);
5136
5010
  return /* @__PURE__ */ Q("p", {
5137
5011
  class: "markup-comment-body",
@@ -5141,7 +5015,7 @@ function Ts({ body: e, mentions: t, trailing: n }) {
5141
5015
  }, t) : /* @__PURE__ */ Q("span", { children: e.type === "mention" ? `@${e.name}` : e.value }, t)), n]
5142
5016
  });
5143
5017
  }
5144
- function Es(e) {
5018
+ function Os(e) {
5145
5019
  let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = L(0), s = B(() => {
5146
5020
  if (!n) return [];
5147
5021
  let e = n.query.toLowerCase();
@@ -5169,7 +5043,7 @@ function Es(e) {
5169
5043
  handleKeyDown: c
5170
5044
  };
5171
5045
  }
5172
- function Ds({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
5046
+ function ks({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
5173
5047
  return e.length === 0 ? null : /* @__PURE__ */ Q("ul", {
5174
5048
  class: "markup-mention-picker",
5175
5049
  role: "listbox",
@@ -5195,7 +5069,7 @@ function Ds({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
5195
5069
  }
5196
5070
  //#endregion
5197
5071
  //#region src/runtime/ui/mention-input.tsx
5198
- function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
5072
+ function As({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
5199
5073
  let u = z(null), d = z(null), [f, p] = L(null), m = z(t);
5200
5074
  m.current = t;
5201
5075
  let h = z(r);
@@ -5204,7 +5078,7 @@ function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5204
5078
  qe(() => {
5205
5079
  let e = u.current;
5206
5080
  if (!e) return;
5207
- let t = Ss(e, {
5081
+ let t = ws(e, {
5208
5082
  chipClass: "markup-mention-chip",
5209
5083
  initialValue: g.current,
5210
5084
  onChange: (e) => m.current(e),
@@ -5224,7 +5098,7 @@ function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5224
5098
  let t = d.current;
5225
5099
  t && t.getValue() !== e && t.setValue(e);
5226
5100
  }, [e]);
5227
- let _ = Es({
5101
+ let _ = Os({
5228
5102
  members: r ?? [],
5229
5103
  trigger: f,
5230
5104
  onSelect: (e) => d.current?.insertMention(e),
@@ -5237,7 +5111,7 @@ function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5237
5111
  "aria-label": i,
5238
5112
  "aria-disabled": o || void 0,
5239
5113
  class: Z("markup-mention-input", c),
5240
- contentEditable: o ? "false" : ws(),
5114
+ contentEditable: o ? "false" : Es(),
5241
5115
  "data-placeholder": a,
5242
5116
  tabIndex: o ? -1 : 0,
5243
5117
  onKeyDown: (e) => {
@@ -5246,7 +5120,7 @@ function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5246
5120
  onBlur: () => {
5247
5121
  setTimeout(() => d.current?.clearTrigger(), 120);
5248
5122
  }
5249
- }), _.isOpen ? /* @__PURE__ */ Q(Ds, {
5123
+ }), _.isOpen ? /* @__PURE__ */ Q(ks, {
5250
5124
  items: _.items,
5251
5125
  highlight: _.highlight,
5252
5126
  setHighlight: _.setHighlight,
@@ -5255,13 +5129,13 @@ function Os({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5255
5129
  }
5256
5130
  //#endregion
5257
5131
  //#region src/runtime/ui/composer.tsx
5258
- var ks = 4e3;
5259
- function As({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, members: s }) {
5132
+ var js = 4e3;
5133
+ function Ms({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, members: s }) {
5260
5134
  let [c, l] = L(""), u = z(null), d = z(!1);
5261
5135
  R(() => {
5262
5136
  d.current && !i && !a && (l(""), u.current?.focus()), d.current = i;
5263
5137
  }, [i, a]);
5264
- let f = ks - c.length, p = f < 0;
5138
+ let f = js - c.length, p = f < 0;
5265
5139
  function m(e) {
5266
5140
  e?.preventDefault();
5267
5141
  let t = c.trim();
@@ -5270,7 +5144,7 @@ function As({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5270
5144
  function h(e) {
5271
5145
  (e.metaKey || e.ctrlKey) && e.key === "Enter" && m(e);
5272
5146
  }
5273
- let g = c.length > 0, _ = Co();
5147
+ let g = c.length > 0, _ = Oo();
5274
5148
  function v(e) {
5275
5149
  return /* @__PURE__ */ Q("button", {
5276
5150
  type: "submit",
@@ -5279,14 +5153,14 @@ function As({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5279
5153
  "aria-label": i ? "Sending…" : n,
5280
5154
  title: i ? "Sending…" : n,
5281
5155
  tabIndex: e,
5282
- children: /* @__PURE__ */ Q(jo, { size: 14 })
5156
+ children: /* @__PURE__ */ Q(Io, { size: 14 })
5283
5157
  });
5284
5158
  }
5285
5159
  return /* @__PURE__ */ Q("form", {
5286
5160
  class: Z("markup-composer", g && "is-filled"),
5287
5161
  onSubmit: m,
5288
5162
  children: [
5289
- /* @__PURE__ */ Q(Os, {
5163
+ /* @__PURE__ */ Q(As, {
5290
5164
  class: "markup-composer-input",
5291
5165
  label: e,
5292
5166
  placeholder: t,
@@ -5340,57 +5214,57 @@ function As({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5340
5214
  }
5341
5215
  //#endregion
5342
5216
  //#region src/runtime/ui/new-thread-popover.tsx
5343
- function js({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotRedactedCount: u, screenshotRedactedSelectors: d, members: f = [], onAuthor: p, onSignIn: m, onSubmit: h, onClose: g }) {
5344
- let _ = z(null);
5345
- ns(_, !0);
5346
- let [v, y] = L(!1), [b, x] = L(!1), C = rs(c), [w, T] = L(null), { onPointerDown: E, isDragging: D } = $o({
5347
- targetRef: _,
5217
+ function Ns({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotFailed: u, screenshotRedactedCount: d, screenshotRedactedSelectors: f, members: p = [], onAuthor: m, onSignIn: h, onSubmit: g, onClose: _ }) {
5218
+ let v = z(null);
5219
+ is(v, !0);
5220
+ let [y, b] = L(!1), [x, C] = L(!1), w = as(c), [T, E] = L(null), { onPointerDown: D, isDragging: O } = ts({
5221
+ targetRef: v,
5348
5222
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
5349
- onMove: T
5223
+ onMove: E
5350
5224
  });
5351
5225
  R(() => {
5352
- let e = _.current;
5226
+ let e = v.current;
5353
5227
  if (!e) return;
5354
5228
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
5355
5229
  e.showPopover();
5356
5230
  } catch {}
5357
5231
  function t(e) {
5358
- e.newState === "closed" && g();
5232
+ e.newState === "closed" && _();
5359
5233
  }
5360
5234
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
5361
- }, [g]);
5362
- let O = Ms(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), ee = Ms(t - window.scrollY - 16, 12, window.innerHeight - 220), te = typeof window < "u" ? window.location.href : "", k = c != null, ne = l || k;
5235
+ }, [_]);
5236
+ let ee = Ps(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), te = Ps(t - window.scrollY - 16, 12, window.innerHeight - 220), k = typeof window < "u" ? window.location.href : "", A = c != null, j = l || A || u;
5363
5237
  return /* @__PURE__ */ Q("div", {
5364
- ref: _,
5365
- class: Z("markup-popover", w && "is-floating", D && "is-dragging"),
5238
+ ref: v,
5239
+ class: Z("markup-popover", T && "is-floating", O && "is-dragging"),
5366
5240
  popover: "auto",
5367
5241
  style: {
5368
- "--markup-pop-x": `${w?.left ?? O}px`,
5369
- "--markup-pop-y": `${w?.top ?? ee}px`
5242
+ "--markup-pop-x": `${T?.left ?? ee}px`,
5243
+ "--markup-pop-y": `${T?.top ?? te}px`
5370
5244
  },
5371
5245
  role: "dialog",
5372
5246
  "aria-label": "New markup",
5373
5247
  children: [/* @__PURE__ */ Q("header", {
5374
5248
  class: "markup-popover-header",
5375
- onPointerDown: E,
5249
+ onPointerDown: D,
5376
5250
  children: [/* @__PURE__ */ Q("span", {
5377
5251
  class: "markup-popover-title",
5378
- title: te,
5252
+ title: k,
5379
5253
  children: "New comment"
5380
5254
  }), /* @__PURE__ */ Q("button", {
5381
5255
  type: "button",
5382
5256
  class: "markup-icon-btn",
5383
5257
  "aria-label": "Discard pin",
5384
- onClick: g,
5385
- children: /* @__PURE__ */ Q(Eo, { size: 16 })
5258
+ onClick: _,
5259
+ children: /* @__PURE__ */ Q(jo, { size: 16 })
5386
5260
  })]
5387
- }), n == null ? /* @__PURE__ */ Q(is, {
5261
+ }), n == null ? /* @__PURE__ */ Q(os, {
5388
5262
  isPending: o,
5389
5263
  isConnecting: i,
5390
5264
  isSigningIn: a,
5391
- onSubmit: p,
5392
- onCancel: g,
5393
- onSignIn: m
5265
+ onSubmit: m,
5266
+ onCancel: _,
5267
+ onSignIn: h
5394
5268
  }) : /* @__PURE__ */ Q("div", {
5395
5269
  class: "markup-popover-body",
5396
5270
  children: [
@@ -5408,17 +5282,17 @@ function js({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5408
5282
  }) : null
5409
5283
  ]
5410
5284
  }),
5411
- /* @__PURE__ */ Q(As, {
5285
+ /* @__PURE__ */ Q(Ms, {
5412
5286
  label: "Feedback",
5413
5287
  placeholder: "What's wrong, missing, or worth noting?",
5414
5288
  submitLabel: "Post markup",
5415
5289
  isPending: o,
5416
5290
  error: s,
5417
- onSubmit: (e) => h(e, v && k),
5418
- members: f
5291
+ onSubmit: (e) => g(e, y && A),
5292
+ members: p
5419
5293
  }),
5420
- ne ? /* @__PURE__ */ Q("div", {
5421
- class: "markup-screenshot-row",
5294
+ j ? /* @__PURE__ */ Q("div", {
5295
+ class: Z("markup-screenshot-row", u && "is-failed"),
5422
5296
  children: [l ? /* @__PURE__ */ Q("span", {
5423
5297
  class: "markup-screenshot-status",
5424
5298
  children: [
@@ -5427,45 +5301,49 @@ function js({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5427
5301
  class: "markup-screenshot-checkbox",
5428
5302
  disabled: !0
5429
5303
  }),
5430
- /* @__PURE__ */ Q(Ao, { size: 12 }),
5304
+ /* @__PURE__ */ Q(Fo, { size: 12 }),
5431
5305
  /* @__PURE__ */ Q("span", { children: "Capturing…" })
5432
5306
  ]
5307
+ }) : u ? /* @__PURE__ */ Q("span", {
5308
+ class: "markup-screenshot-status",
5309
+ title: "This page has something the capture can't read — often a third-party image. Your comment will post without a screenshot.",
5310
+ children: [/* @__PURE__ */ Q(Fo, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
5433
5311
  }) : /* @__PURE__ */ Q("label", {
5434
5312
  class: "markup-screenshot-toggle",
5435
5313
  children: [
5436
5314
  /* @__PURE__ */ Q("input", {
5437
5315
  type: "checkbox",
5438
5316
  class: "markup-screenshot-checkbox",
5439
- checked: v,
5440
- onChange: (e) => y(e.currentTarget.checked)
5317
+ checked: y,
5318
+ onChange: (e) => b(e.currentTarget.checked)
5441
5319
  }),
5442
- /* @__PURE__ */ Q(Ao, { size: 12 }),
5320
+ /* @__PURE__ */ Q(Fo, { size: 12 }),
5443
5321
  /* @__PURE__ */ Q("span", { children: "Attach screenshot" }),
5444
- C && v ? /* @__PURE__ */ Q("img", {
5322
+ w && y ? /* @__PURE__ */ Q("img", {
5445
5323
  class: "markup-screenshot-thumb",
5446
- src: C,
5324
+ src: w,
5447
5325
  alt: "Screenshot preview"
5448
5326
  }) : null
5449
5327
  ]
5450
- }), v && k ? /* @__PURE__ */ Q(S, { children: [u > 0 ? /* @__PURE__ */ Q("div", {
5328
+ }), y && A ? /* @__PURE__ */ Q(S, { children: [d > 0 ? /* @__PURE__ */ Q("div", {
5451
5329
  class: "markup-screenshot-redacted",
5452
5330
  children: [/* @__PURE__ */ Q("button", {
5453
5331
  type: "button",
5454
5332
  class: "markup-screenshot-redacted-chip",
5455
- onClick: () => x((e) => !e),
5333
+ onClick: () => C((e) => !e),
5456
5334
  children: [
5457
5335
  /* @__PURE__ */ Q("em", {
5458
5336
  class: "markup-screenshot-redacted-arrow",
5459
- children: b ? "▾" : "▸"
5337
+ children: x ? "▾" : "▸"
5460
5338
  }),
5461
- u,
5339
+ d,
5462
5340
  " ",
5463
- u === 1 ? "field" : "fields",
5341
+ d === 1 ? "field" : "fields",
5464
5342
  " redacted"
5465
5343
  ]
5466
- }), b ? /* @__PURE__ */ Q("div", {
5344
+ }), x ? /* @__PURE__ */ Q("div", {
5467
5345
  class: "markup-screenshot-redacted-list",
5468
- children: d.map((e) => /* @__PURE__ */ Q("code", {
5346
+ children: f.map((e) => /* @__PURE__ */ Q("code", {
5469
5347
  class: "markup-screenshot-redacted-selector",
5470
5348
  children: e
5471
5349
  }, e))
@@ -5487,24 +5365,145 @@ function js({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5487
5365
  })]
5488
5366
  });
5489
5367
  }
5490
- function Ms(e, t, n) {
5368
+ function Ps(e, t, n) {
5491
5369
  return Math.max(t, Math.min(n, e));
5492
5370
  }
5493
5371
  //#endregion
5494
- //#region src/runtime/use-theme.ts
5495
- function Ns() {
5496
- let [, e] = L(0);
5497
- return R(() => Me(() => e((e) => e + 1)), []), {
5498
- mode: ke(),
5499
- resolved: Ae(),
5500
- set: je
5501
- };
5502
- }
5503
- //#endregion
5504
- //#region src/runtime/ui/overflow-menu.tsx
5505
- function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, onOpenPrivacy: a, onOpenShortcuts: o, onHideForSession: s, version: c, dashboardUrl: l }) {
5506
- let [u, d] = L(!1), f = z(null), p = Ns();
5507
- R(() => {
5372
+ //#region src/runtime/ui/notifications-panel.tsx
5373
+ function Fs({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMarkAllRead: a, isMarkingAll: o }) {
5374
+ let s = e.some((e) => e.readAt == null);
5375
+ return /* @__PURE__ */ Q("div", {
5376
+ class: "markup-notifications-panel",
5377
+ role: "dialog",
5378
+ "aria-label": "Notifications",
5379
+ children: [/* @__PURE__ */ Q("header", {
5380
+ class: "markup-notifications-panel-header",
5381
+ children: [
5382
+ /* @__PURE__ */ Q("button", {
5383
+ type: "button",
5384
+ class: "markup-icon-btn",
5385
+ title: "Back to menu",
5386
+ "aria-label": "Back to menu",
5387
+ onClick: r,
5388
+ children: /* @__PURE__ */ Q(Mo, { size: 16 })
5389
+ }),
5390
+ /* @__PURE__ */ Q("span", {
5391
+ class: "markup-eyebrow",
5392
+ children: "notifications"
5393
+ }),
5394
+ /* @__PURE__ */ Q("div", {
5395
+ class: "markup-notifications-panel-actions",
5396
+ children: s ? /* @__PURE__ */ Q("button", {
5397
+ type: "button",
5398
+ class: "markup-notifications-panel-mark-all",
5399
+ disabled: o,
5400
+ onClick: a,
5401
+ children: o ? "Marking…" : "Mark all read"
5402
+ }) : null
5403
+ })
5404
+ ]
5405
+ }), /* @__PURE__ */ Q("div", {
5406
+ class: "markup-notifications-panel-body",
5407
+ children: n ? /* @__PURE__ */ Q("p", {
5408
+ class: "markup-notifications-panel-error",
5409
+ children: n
5410
+ }) : t ? /* @__PURE__ */ Q("p", {
5411
+ class: "markup-notifications-panel-empty",
5412
+ children: "Loading…"
5413
+ }) : e.length === 0 ? /* @__PURE__ */ Q("div", {
5414
+ class: "markup-notifications-panel-empty",
5415
+ children: [/* @__PURE__ */ Q("p", {
5416
+ class: "markup-notifications-panel-empty-title",
5417
+ children: "You're all caught up."
5418
+ }), /* @__PURE__ */ Q("p", {
5419
+ class: "markup-notifications-panel-empty-sub",
5420
+ children: "New @mentions on this site land here."
5421
+ })]
5422
+ }) : /* @__PURE__ */ Q("ul", {
5423
+ class: "markup-notifications-panel-list",
5424
+ children: e.map((e) => /* @__PURE__ */ Q("li", { children: /* @__PURE__ */ Q("button", {
5425
+ type: "button",
5426
+ class: Z("markup-notifications-panel-row", e.readAt == null && "is-unread"),
5427
+ onClick: () => i(e),
5428
+ children: [
5429
+ /* @__PURE__ */ Q("div", {
5430
+ class: "markup-notifications-panel-meta",
5431
+ children: [
5432
+ e.readAt == null ? /* @__PURE__ */ Q("span", {
5433
+ "aria-hidden": "true",
5434
+ class: "markup-notifications-panel-dot"
5435
+ }) : null,
5436
+ /* @__PURE__ */ Q("span", {
5437
+ class: "markup-notifications-panel-actor",
5438
+ children: e.actorName
5439
+ }),
5440
+ e.actorVia === "mcp" ? /* @__PURE__ */ Q("span", {
5441
+ class: "markup-comment-badge is-agent",
5442
+ role: "img",
5443
+ "aria-label": "Written by an AI agent",
5444
+ title: "Written by an AI agent on this person's behalf",
5445
+ children: /* @__PURE__ */ Q(Zo, { size: 11 })
5446
+ }) : null,
5447
+ /* @__PURE__ */ Q("span", {
5448
+ class: "markup-notifications-panel-sep",
5449
+ children: "·"
5450
+ }),
5451
+ /* @__PURE__ */ Q("span", {
5452
+ class: "markup-notifications-panel-time",
5453
+ children: Is(e.createdAt)
5454
+ })
5455
+ ]
5456
+ }),
5457
+ /* @__PURE__ */ Q("p", {
5458
+ class: "markup-notifications-panel-thread",
5459
+ children: [
5460
+ "mentioned you in",
5461
+ " ",
5462
+ /* @__PURE__ */ Q("span", {
5463
+ class: "markup-notifications-panel-thread-title",
5464
+ children: e.threadTitle
5465
+ })
5466
+ ]
5467
+ }),
5468
+ e.commentExcerpt ? /* @__PURE__ */ Q("p", {
5469
+ class: "markup-notifications-panel-excerpt",
5470
+ children: [
5471
+ "“",
5472
+ e.commentExcerpt,
5473
+ "”"
5474
+ ]
5475
+ }) : null
5476
+ ]
5477
+ }) }, e._id))
5478
+ })
5479
+ })]
5480
+ });
5481
+ }
5482
+ function Is(e) {
5483
+ let t = Date.now() - e, n = Math.floor(t / 1e3);
5484
+ if (n < 60) return "just now";
5485
+ let r = Math.floor(n / 60);
5486
+ if (r < 60) return `${r}m ago`;
5487
+ let i = Math.floor(r / 60);
5488
+ if (i < 24) return `${i}h ago`;
5489
+ let a = Math.floor(i / 24);
5490
+ return a < 30 ? `${a}d ago` : new Date(e).toLocaleDateString();
5491
+ }
5492
+ //#endregion
5493
+ //#region src/runtime/use-theme.ts
5494
+ function Ls() {
5495
+ let [, e] = L(0);
5496
+ return R(() => Me(() => e((e) => e + 1)), []), {
5497
+ mode: ke(),
5498
+ resolved: Ae(),
5499
+ set: je
5500
+ };
5501
+ }
5502
+ //#endregion
5503
+ //#region src/runtime/ui/overflow-menu.tsx
5504
+ function Rs({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, onOpenPrivacy: a, onOpenShortcuts: o, onHideForSession: s, version: c, dashboardUrl: l }) {
5505
+ let [u, d] = L(!1), f = z(null), p = Ls();
5506
+ R(() => {
5508
5507
  if (!u) return;
5509
5508
  function e(e) {
5510
5509
  let t = f.current;
@@ -5517,7 +5516,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5517
5516
  document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
5518
5517
  };
5519
5518
  }, [u]);
5520
- let m = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: h } = Co();
5519
+ let m = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: h } = Oo();
5521
5520
  return /* @__PURE__ */ Q("div", {
5522
5521
  ref: f,
5523
5522
  style: {
@@ -5536,7 +5535,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5536
5535
  onClick: (e) => {
5537
5536
  e.preventDefault(), e.stopPropagation(), d((e) => !e);
5538
5537
  },
5539
- children: /* @__PURE__ */ Q(Lo, { size: 16 })
5538
+ children: /* @__PURE__ */ Q(Ho, { size: 16 })
5540
5539
  }), u ? /* @__PURE__ */ Q("div", {
5541
5540
  class: Z("markup-pop", m),
5542
5541
  "data-pop": "overflow",
@@ -5560,7 +5559,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5560
5559
  title: "Light",
5561
5560
  class: Z(p.mode === "light" && "is-on"),
5562
5561
  onClick: () => p.set("light"),
5563
- children: /* @__PURE__ */ Q(Ro, { size: 14 })
5562
+ children: /* @__PURE__ */ Q(Uo, { size: 14 })
5564
5563
  }),
5565
5564
  /* @__PURE__ */ Q("button", {
5566
5565
  type: "button",
@@ -5570,7 +5569,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5570
5569
  title: "Dark",
5571
5570
  class: Z(p.mode === "dark" && "is-on"),
5572
5571
  onClick: () => p.set("dark"),
5573
- children: /* @__PURE__ */ Q(zo, { size: 14 })
5572
+ children: /* @__PURE__ */ Q(Wo, { size: 14 })
5574
5573
  }),
5575
5574
  /* @__PURE__ */ Q("button", {
5576
5575
  type: "button",
@@ -5580,7 +5579,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5580
5579
  title: `Auto — currently ${p.resolved}`,
5581
5580
  class: Z(p.mode === "auto" && "is-on"),
5582
5581
  onClick: () => p.set("auto"),
5583
- children: /* @__PURE__ */ Q(Bo, { size: 14 })
5582
+ children: /* @__PURE__ */ Q(Go, { size: 14 })
5584
5583
  })
5585
5584
  ]
5586
5585
  })]
@@ -5603,7 +5602,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5603
5602
  title: "Bottom left",
5604
5603
  class: Z(e === "bottom-left" && "is-on"),
5605
5604
  onClick: () => t("bottom-left"),
5606
- children: /* @__PURE__ */ Q(Fs, { side: "left" })
5605
+ children: /* @__PURE__ */ Q(zs, { side: "left" })
5607
5606
  }),
5608
5607
  /* @__PURE__ */ Q("button", {
5609
5608
  type: "button",
@@ -5613,7 +5612,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5613
5612
  title: "Bottom center",
5614
5613
  class: Z(e === "bottom-center" && "is-on"),
5615
5614
  onClick: () => t("bottom-center"),
5616
- children: /* @__PURE__ */ Q(Fs, { side: "center" })
5615
+ children: /* @__PURE__ */ Q(zs, { side: "center" })
5617
5616
  }),
5618
5617
  /* @__PURE__ */ Q("button", {
5619
5618
  type: "button",
@@ -5623,7 +5622,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5623
5622
  title: "Bottom right",
5624
5623
  class: Z(e === "bottom-right" && "is-on"),
5625
5624
  onClick: () => t("bottom-right"),
5626
- children: /* @__PURE__ */ Q(Fs, { side: "right" })
5625
+ children: /* @__PURE__ */ Q(zs, { side: "right" })
5627
5626
  })
5628
5627
  ]
5629
5628
  })]
@@ -5645,7 +5644,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5645
5644
  children: [
5646
5645
  /* @__PURE__ */ Q("span", {
5647
5646
  class: "ic",
5648
- children: /* @__PURE__ */ Q(Is, {})
5647
+ children: /* @__PURE__ */ Q(Bs, {})
5649
5648
  }),
5650
5649
  /* @__PURE__ */ Q("span", {
5651
5650
  class: "lbl",
@@ -5664,13 +5663,12 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5664
5663
  type: "button",
5665
5664
  role: "menuitem",
5666
5665
  class: "markup-menu-row",
5667
- disabled: !a,
5668
5666
  onClick: () => {
5669
- d(!1), a?.();
5667
+ d(!1), a();
5670
5668
  },
5671
5669
  children: [/* @__PURE__ */ Q("span", {
5672
5670
  class: "ic",
5673
- children: /* @__PURE__ */ Q(Vo, { size: 16 })
5671
+ children: /* @__PURE__ */ Q(Ko, { size: 16 })
5674
5672
  }), /* @__PURE__ */ Q("span", {
5675
5673
  class: "lbl",
5676
5674
  children: "Privacy & data"
@@ -5680,24 +5678,16 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5680
5678
  type: "button",
5681
5679
  role: "menuitem",
5682
5680
  class: "markup-menu-row",
5683
- disabled: !o,
5684
5681
  onClick: () => {
5685
- d(!1), o?.();
5682
+ d(!1), o();
5686
5683
  },
5687
- children: [
5688
- /* @__PURE__ */ Q("span", {
5689
- class: "ic",
5690
- children: /* @__PURE__ */ Q(Ho, { size: 16 })
5691
- }),
5692
- /* @__PURE__ */ Q("span", {
5693
- class: "lbl",
5694
- children: "Keyboard shortcuts"
5695
- }),
5696
- /* @__PURE__ */ Q("span", {
5697
- class: "right",
5698
- children: "?"
5699
- })
5700
- ]
5684
+ children: [/* @__PURE__ */ Q("span", {
5685
+ class: "ic",
5686
+ children: /* @__PURE__ */ Q(qo, { size: 16 })
5687
+ }), /* @__PURE__ */ Q("span", {
5688
+ class: "lbl",
5689
+ children: "Keyboard shortcuts"
5690
+ })]
5701
5691
  }),
5702
5692
  /* @__PURE__ */ Q("div", { class: "markup-menu-divider" }),
5703
5693
  /* @__PURE__ */ Q("button", {
@@ -5710,7 +5700,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5710
5700
  children: [
5711
5701
  /* @__PURE__ */ Q("span", {
5712
5702
  class: "ic",
5713
- children: /* @__PURE__ */ Q(Ls, {})
5703
+ children: /* @__PURE__ */ Q(Vs, {})
5714
5704
  }),
5715
5705
  /* @__PURE__ */ Q("span", {
5716
5706
  class: "lbl",
@@ -5728,7 +5718,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5728
5718
  target: "_blank",
5729
5719
  rel: "noopener noreferrer",
5730
5720
  children: [
5731
- /* @__PURE__ */ Q(To, { size: 12 }),
5721
+ /* @__PURE__ */ Q(Ao, { size: 12 }),
5732
5722
  /* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
5733
5723
  /* @__PURE__ */ Q("span", {
5734
5724
  class: "ver",
@@ -5740,7 +5730,7 @@ function Ps({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5740
5730
  }) : null]
5741
5731
  });
5742
5732
  }
5743
- function Fs({ side: e }) {
5733
+ function zs({ side: e }) {
5744
5734
  return /* @__PURE__ */ Q("svg", {
5745
5735
  width: 14,
5746
5736
  height: 14,
@@ -5766,7 +5756,7 @@ function Fs({ side: e }) {
5766
5756
  })]
5767
5757
  });
5768
5758
  }
5769
- function Is() {
5759
+ function Bs() {
5770
5760
  return /* @__PURE__ */ Q("svg", {
5771
5761
  width: 16,
5772
5762
  height: 16,
@@ -5784,7 +5774,7 @@ function Is() {
5784
5774
  })]
5785
5775
  });
5786
5776
  }
5787
- function Ls() {
5777
+ function Vs() {
5788
5778
  return /* @__PURE__ */ Q("svg", {
5789
5779
  width: 16,
5790
5780
  height: 16,
@@ -5804,8 +5794,38 @@ function Ls() {
5804
5794
  });
5805
5795
  }
5806
5796
  //#endregion
5797
+ //#region src/runtime/ui/panel-popover.tsx
5798
+ function Hs({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i, children: a }) {
5799
+ let o = z(null);
5800
+ return R(() => {
5801
+ function e(e) {
5802
+ let t = o.current;
5803
+ if (!t) return;
5804
+ let n = e.composedPath();
5805
+ n.includes(t) || r != null && n.some((e) => e?.dataset?.kind === r) || i();
5806
+ }
5807
+ function t(e) {
5808
+ e.key === "Escape" && i();
5809
+ }
5810
+ return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
5811
+ document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
5812
+ };
5813
+ }, [i, r]), /* @__PURE__ */ Q("div", {
5814
+ ref: o,
5815
+ class: Z("markup-panel-pop", n === "bottom-left" ? "markup-panel-pop-left" : n === "bottom-center" ? "markup-panel-pop-center" : "markup-panel-pop-right"),
5816
+ "data-panel": e,
5817
+ role: "dialog",
5818
+ "aria-label": t,
5819
+ children: /* @__PURE__ */ Q("div", {
5820
+ class: "markup-pop",
5821
+ "data-pop": e,
5822
+ children: a
5823
+ })
5824
+ });
5825
+ }
5826
+ //#endregion
5807
5827
  //#region src/runtime/ui/pin.tsx
5808
- function Rs({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
5828
+ function Us({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
5809
5829
  let o = t - window.scrollY, s = e - window.scrollX;
5810
5830
  return /* @__PURE__ */ Q("button", {
5811
5831
  type: "button",
@@ -5825,7 +5845,7 @@ function Rs({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClic
5825
5845
  })
5826
5846
  });
5827
5847
  }
5828
- function zs({ pageX: e, pageY: t }) {
5848
+ function Ws({ pageX: e, pageY: t }) {
5829
5849
  let n = t - window.scrollY, r = e - window.scrollX;
5830
5850
  return /* @__PURE__ */ Q("div", {
5831
5851
  class: "markup-pin markup-pin-ghost is-anchor",
@@ -5842,8 +5862,8 @@ function zs({ pageX: e, pageY: t }) {
5842
5862
  }
5843
5863
  //#endregion
5844
5864
  //#region src/runtime/ui/placement-overlay.tsx
5845
- function Bs({ onPlace: e, onCancel: t }) {
5846
- R(() => {
5865
+ function Gs({ onPlace: e, onCancel: t }) {
5866
+ qe(() => {
5847
5867
  function e(e) {
5848
5868
  e.key === "Escape" && t();
5849
5869
  }
@@ -5867,15 +5887,255 @@ function Bs({ onPlace: e, onCancel: t }) {
5867
5887
  });
5868
5888
  }
5869
5889
  //#endregion
5890
+ //#region src/runtime/ui/privacy-panel.tsx
5891
+ function Ks({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isForgettingMe: i, forgetMeError: a, onForgetMe: o, onClose: s }) {
5892
+ let [c, l] = L(!1), u = Ni(e), d = e.kind === "verified", f = d ? e.identity.email : void 0, p = e.kind === "anon";
5893
+ return /* @__PURE__ */ Q("div", {
5894
+ class: "markup-panel",
5895
+ children: [/* @__PURE__ */ Q("header", {
5896
+ class: "markup-panel-header",
5897
+ children: [/* @__PURE__ */ Q("span", {
5898
+ class: "markup-eyebrow",
5899
+ children: "privacy & data"
5900
+ }), /* @__PURE__ */ Q("button", {
5901
+ type: "button",
5902
+ class: "markup-icon-btn",
5903
+ title: "Close",
5904
+ "aria-label": "Close privacy and data",
5905
+ onClick: s,
5906
+ children: /* @__PURE__ */ Q(jo, { size: 14 })
5907
+ })]
5908
+ }), /* @__PURE__ */ Q("div", {
5909
+ class: "markup-panel-body",
5910
+ children: [
5911
+ /* @__PURE__ */ Q("section", {
5912
+ class: "markup-panel-section",
5913
+ children: [/* @__PURE__ */ Q("h4", {
5914
+ class: "markup-panel-section-title",
5915
+ children: "who you are here"
5916
+ }), d ? /* @__PURE__ */ Q("p", {
5917
+ class: "markup-panel-text",
5918
+ children: [
5919
+ "Signed in as ",
5920
+ /* @__PURE__ */ Q("strong", { children: u ?? "you" }),
5921
+ f ? /* @__PURE__ */ Q("span", {
5922
+ class: "markup-panel-mono",
5923
+ children: [" ", f]
5924
+ }) : null,
5925
+ ". Comments you post carry that name, and your email is visible to this project's team."
5926
+ ]
5927
+ }) : u ? /* @__PURE__ */ Q("p", {
5928
+ class: "markup-panel-text",
5929
+ children: [
5930
+ "You post as ",
5931
+ /* @__PURE__ */ Q("strong", { children: u }),
5932
+ " — an anonymous commenter with a random id that only means anything on this site."
5933
+ ]
5934
+ }) : /* @__PURE__ */ Q("p", {
5935
+ class: "markup-panel-text",
5936
+ children: "You're anonymous. Markup holds a random id scoped to this site and asks for a name the first time you post."
5937
+ })]
5938
+ }),
5939
+ /* @__PURE__ */ Q("section", {
5940
+ class: "markup-panel-section",
5941
+ children: [/* @__PURE__ */ Q("h4", {
5942
+ class: "markup-panel-section-title",
5943
+ children: "what posting sends"
5944
+ }), /* @__PURE__ */ Q("ul", {
5945
+ class: "markup-panel-list",
5946
+ children: [
5947
+ /* @__PURE__ */ Q("li", { children: "What you wrote, under the name (and email, if you gave one) you post with" }),
5948
+ /* @__PURE__ */ Q("li", { children: "This page's URL, your window size, and your browser's user-agent" }),
5949
+ /* @__PURE__ */ Q("li", { children: "A screenshot — only the ones you attach yourself" })
5950
+ ]
5951
+ })]
5952
+ }),
5953
+ /* @__PURE__ */ Q("section", {
5954
+ class: "markup-panel-section",
5955
+ children: [
5956
+ /* @__PURE__ */ Q("h4", {
5957
+ class: "markup-panel-section-title",
5958
+ children: "kept in this browser"
5959
+ }),
5960
+ /* @__PURE__ */ Q("ul", {
5961
+ class: "markup-panel-list",
5962
+ children: [/* @__PURE__ */ Q("li", { children: d ? "Your sign-in token — in this site's storage, or a cookie only this site can send" : "Your commenter id and the token that proves it, in this site's storage" }), /* @__PURE__ */ Q("li", { children: "Your appearance and toolbar-position picks" })]
5963
+ }),
5964
+ /* @__PURE__ */ Q("p", {
5965
+ class: "markup-panel-note",
5966
+ children: "All of it is scoped to this site, so the same browser on another site is a different commenter to us. Nothing here follows you between sites."
5967
+ })
5968
+ ]
5969
+ }),
5970
+ /* @__PURE__ */ Q("section", {
5971
+ class: "markup-panel-section",
5972
+ children: [/* @__PURE__ */ Q("h4", {
5973
+ class: "markup-panel-section-title",
5974
+ children: "screenshots"
5975
+ }), /* @__PURE__ */ Q("p", {
5976
+ class: "markup-panel-text",
5977
+ children: r ? "This site turned captures off, so none are taken." : n ? "Captured when you drop a pin. Passwords, card numbers and one-time codes are blacked out before the image exists, and the composer lists what it covered. Nothing uploads unless you post with it attached." : "Auto-capture is off, so no screenshots are taken. You can turn it back on from the menu."
5978
+ })]
5979
+ }),
5980
+ /* @__PURE__ */ Q("section", {
5981
+ class: "markup-panel-section",
5982
+ children: [/* @__PURE__ */ Q("h4", {
5983
+ class: "markup-panel-section-title",
5984
+ children: "where it goes"
5985
+ }), /* @__PURE__ */ Q("p", {
5986
+ class: "markup-panel-text",
5987
+ children: [
5988
+ "Only ",
5989
+ /* @__PURE__ */ Q("span", {
5990
+ class: "markup-panel-mono",
5991
+ children: qs(t)
5992
+ }),
5993
+ ". No analytics, no ad tech, no third-party requests from the widget. If the widget itself crashes it posts the error, this page's URL and your user-agent to that same host — never your identity or what you were writing."
5994
+ ]
5995
+ })]
5996
+ }),
5997
+ p ? /* @__PURE__ */ Q("section", {
5998
+ class: "markup-panel-section",
5999
+ children: [
6000
+ /* @__PURE__ */ Q("h4", {
6001
+ class: "markup-panel-section-title",
6002
+ children: "erase what you left"
6003
+ }),
6004
+ /* @__PURE__ */ Q("p", {
6005
+ class: "markup-panel-text",
6006
+ children: "Removes every comment and reaction this browser posted on this site, and clears the name and email held for you. Replies from other people stay."
6007
+ }),
6008
+ /* @__PURE__ */ Q("button", {
6009
+ type: "button",
6010
+ class: Z("markup-panel-action", c && "is-danger"),
6011
+ disabled: i,
6012
+ onClick: () => {
6013
+ c ? (o(), l(!1)) : l(!0);
6014
+ },
6015
+ children: i ? "Erasing…" : c ? "Confirm — erase and forget me" : "Forget me on this site…"
6016
+ }),
6017
+ a ? /* @__PURE__ */ Q("p", {
6018
+ class: "markup-panel-error",
6019
+ children: a
6020
+ }) : null
6021
+ ]
6022
+ }) : null
6023
+ ]
6024
+ })]
6025
+ });
6026
+ }
6027
+ function qs(e) {
6028
+ try {
6029
+ return new URL(e).host;
6030
+ } catch {
6031
+ return e;
6032
+ }
6033
+ }
6034
+ //#endregion
6035
+ //#region src/runtime/ui/shortcuts-panel.tsx
6036
+ function Js({ onClose: e }) {
6037
+ let { mod: t, enter: n } = Oo();
6038
+ return /* @__PURE__ */ Q("div", {
6039
+ class: "markup-panel",
6040
+ children: [/* @__PURE__ */ Q("header", {
6041
+ class: "markup-panel-header",
6042
+ children: [/* @__PURE__ */ Q("span", {
6043
+ class: "markup-eyebrow",
6044
+ children: "keyboard shortcuts"
6045
+ }), /* @__PURE__ */ Q("button", {
6046
+ type: "button",
6047
+ class: "markup-icon-btn",
6048
+ title: "Close",
6049
+ "aria-label": "Close keyboard shortcuts",
6050
+ onClick: e,
6051
+ children: /* @__PURE__ */ Q(jo, { size: 14 })
6052
+ })]
6053
+ }), /* @__PURE__ */ Q("div", {
6054
+ class: "markup-panel-body",
6055
+ children: [[{
6056
+ title: "on the page",
6057
+ items: [
6058
+ {
6059
+ chords: [["c"]],
6060
+ label: "Start a markup"
6061
+ },
6062
+ {
6063
+ chords: [[t, "."]],
6064
+ label: "Show or hide Markup"
6065
+ },
6066
+ {
6067
+ chords: [["Esc"]],
6068
+ label: "Cancel placement, or close a menu"
6069
+ }
6070
+ ]
6071
+ }, {
6072
+ title: "while writing",
6073
+ items: [
6074
+ {
6075
+ chords: [["@"]],
6076
+ label: "Mention a teammate"
6077
+ },
6078
+ {
6079
+ chords: [["↑"], ["↓"]],
6080
+ label: "Move through the member list"
6081
+ },
6082
+ {
6083
+ chords: [[n], ["Tab"]],
6084
+ label: "Pick the highlighted member"
6085
+ },
6086
+ {
6087
+ chords: [[t, n]],
6088
+ label: "Post the comment"
6089
+ },
6090
+ {
6091
+ chords: [["Esc"]],
6092
+ label: "Dismiss the member list"
6093
+ }
6094
+ ]
6095
+ }].map((e) => /* @__PURE__ */ Q("section", {
6096
+ class: "markup-panel-section",
6097
+ children: [/* @__PURE__ */ Q("h4", {
6098
+ class: "markup-panel-section-title",
6099
+ children: e.title
6100
+ }), /* @__PURE__ */ Q("ul", {
6101
+ class: "markup-shortcut-list",
6102
+ children: e.items.map((e) => /* @__PURE__ */ Q("li", {
6103
+ class: "markup-shortcut-row",
6104
+ children: [/* @__PURE__ */ Q("span", {
6105
+ class: "markup-shortcut-label",
6106
+ children: e.label
6107
+ }), /* @__PURE__ */ Q("span", {
6108
+ class: "markup-shortcut-keys",
6109
+ children: e.chords.map((e, t) => /* @__PURE__ */ Q("span", {
6110
+ class: "markup-shortcut-chord",
6111
+ children: [t > 0 ? /* @__PURE__ */ Q("span", {
6112
+ class: "markup-shortcut-or",
6113
+ children: "or"
6114
+ }) : null, e.map((e) => /* @__PURE__ */ Q("kbd", {
6115
+ class: "markup-kbd is-inline",
6116
+ children: e
6117
+ }, e))]
6118
+ }, e.join("+")))
6119
+ })]
6120
+ }, e.label))
6121
+ })]
6122
+ }, e.title)), /* @__PURE__ */ Q("p", {
6123
+ class: "markup-panel-note",
6124
+ children: [t, "-click the comment button to hide Markup without opening the menu. Drag a popover's header to move it off whatever it covers."]
6125
+ })]
6126
+ })]
6127
+ });
6128
+ }
6129
+ //#endregion
5870
6130
  //#region src/runtime/ui/thread-popover.tsx
5871
- var Vs = [
6131
+ var Ys = [
5872
6132
  "👍",
5873
6133
  "❤️",
5874
6134
  "🎉",
5875
6135
  "😮",
5876
6136
  "😄",
5877
6137
  "❓"
5878
- ], Hs = Ar({
6138
+ ], Xs = Ar({
5879
6139
  none: {
5880
6140
  "toggle-thread-menu": () => ({
5881
6141
  kind: "thread-menu",
@@ -5931,13 +6191,13 @@ var Vs = [
5931
6191
  dismiss: () => ({ kind: "none" })
5932
6192
  }
5933
6193
  });
5934
- function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, members: u = [], onAuthor: d, onSignIn: f, onClose: p, onReply: m, onEditComment: h, onDeleteComment: g, onToggleReaction: _, onResolve: v, onDelete: y }) {
5935
- let b = z(null), x = z(null), S = z(null), C = z(null), [w, T] = jr(Hs, { kind: "none" }), [E, D] = L(null), { onPointerDown: O, isDragging: ee } = $o({
6194
+ function Zs({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, members: u = [], onAuthor: d, onSignIn: f, onClose: p, onReply: m, onEditComment: h, onDeleteComment: g, onToggleReaction: _, onResolve: v, onDelete: y }) {
6195
+ let b = z(null), x = z(null), S = z(null), C = z(null), [w, T] = jr(Xs, { kind: "none" }), [E, D] = L(null), { onPointerDown: O, isDragging: ee } = ts({
5936
6196
  targetRef: b,
5937
6197
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
5938
6198
  onMove: D
5939
6199
  });
5940
- ns(b, !0);
6200
+ is(b, !0);
5941
6201
  let te = e.resolvedAt != null, k = B(() => e.comments.filter((e) => !e.deleted), [e.comments]);
5942
6202
  R(() => {
5943
6203
  if (w.kind === "none" || w.kind === "editing") return;
@@ -5955,12 +6215,12 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
5955
6215
  w,
5956
6216
  T
5957
6217
  ]);
5958
- let ne = z(!0);
6218
+ let A = z(!0);
5959
6219
  R(() => {
5960
6220
  let e = x.current;
5961
6221
  if (e) {
5962
- if (ne.current) {
5963
- ne.current = !1, e.scrollTop = e.scrollHeight;
6222
+ if (A.current) {
6223
+ A.current = !1, e.scrollTop = e.scrollHeight;
5964
6224
  return;
5965
6225
  }
5966
6226
  e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
@@ -5976,15 +6236,15 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
5976
6236
  }
5977
6237
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
5978
6238
  }, [p]);
5979
- let A = B(() => {
6239
+ let j = B(() => {
5980
6240
  let t = oi({
5981
6241
  anchorX: e.anchorX,
5982
6242
  anchorY: e.anchorY,
5983
6243
  anchorSelector: e.anchorSelector
5984
6244
  });
5985
6245
  return {
5986
- left: qs(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
5987
- top: qs(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
6246
+ left: tc(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
6247
+ top: tc(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
5988
6248
  };
5989
6249
  }, [
5990
6250
  e.anchorX,
@@ -5997,8 +6257,8 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
5997
6257
  class: Z("markup-popover", E && "is-floating", ee && "is-dragging", l && "is-hud-hidden"),
5998
6258
  popover: "auto",
5999
6259
  style: {
6000
- "--markup-pop-x": `${E?.left ?? A.left}px`,
6001
- "--markup-pop-y": `${E?.top ?? A.top}px`
6260
+ "--markup-pop-x": `${E?.left ?? j.left}px`,
6261
+ "--markup-pop-y": `${E?.top ?? j.top}px`
6002
6262
  },
6003
6263
  role: "dialog",
6004
6264
  "aria-label": "Markup thread",
@@ -6024,7 +6284,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6024
6284
  class: Z("markup-icon-btn", w.kind === "thread-menu" && "is-open"),
6025
6285
  title: "More options",
6026
6286
  onClick: () => T({ type: "toggle-thread-menu" }),
6027
- children: /* @__PURE__ */ Q(Oo, { size: 16 })
6287
+ children: /* @__PURE__ */ Q(No, { size: 16 })
6028
6288
  }), w.kind === "thread-menu" ? /* @__PURE__ */ Q("div", {
6029
6289
  class: "markup-thread-menu-list",
6030
6290
  children: [/* @__PURE__ */ Q("button", {
@@ -6052,14 +6312,14 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6052
6312
  title: "Mark as resolved",
6053
6313
  disabled: s,
6054
6314
  onClick: v,
6055
- children: /* @__PURE__ */ Q(ko, { size: 16 })
6315
+ children: /* @__PURE__ */ Q(Po, { size: 16 })
6056
6316
  }) : null,
6057
6317
  /* @__PURE__ */ Q("button", {
6058
6318
  type: "button",
6059
6319
  class: "markup-icon-btn",
6060
6320
  title: "Close thread",
6061
6321
  onClick: p,
6062
- children: /* @__PURE__ */ Q(Eo, { size: 16 })
6322
+ children: /* @__PURE__ */ Q(jo, { size: 16 })
6063
6323
  })
6064
6324
  ]
6065
6325
  })]
@@ -6072,10 +6332,10 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6072
6332
  return /* @__PURE__ */ Q("li", {
6073
6333
  class: "markup-comment",
6074
6334
  children: [
6075
- /* @__PURE__ */ Q(Js, {
6335
+ /* @__PURE__ */ Q(nc, {
6076
6336
  name: t.authorName,
6077
6337
  image: t.authorImage,
6078
- tone: Xs(t.authorClientId ?? t.authorName)
6338
+ tone: ic(t.authorClientId ?? t.authorName)
6079
6339
  }),
6080
6340
  /* @__PURE__ */ Q("div", {
6081
6341
  class: "markup-comment-meta",
@@ -6089,23 +6349,23 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6089
6349
  role: "img",
6090
6350
  "aria-label": "Written by an AI agent",
6091
6351
  title: "Written by an AI agent",
6092
- children: /* @__PURE__ */ Q(Ko, { size: 11 })
6352
+ children: /* @__PURE__ */ Q(Zo, { size: 11 })
6093
6353
  }) : null,
6094
6354
  /* @__PURE__ */ Q("time", {
6095
6355
  class: "markup-comment-time",
6096
6356
  datetime: new Date(t.createdAt).toISOString(),
6097
- title: Qs(t.createdAt),
6098
- children: Zs(t.createdAt)
6357
+ title: oc(t.createdAt),
6358
+ children: ac(t.createdAt)
6099
6359
  }),
6100
6360
  t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
6101
6361
  class: "markup-comment-edited",
6102
6362
  datetime: new Date(t.editedAt).toISOString(),
6103
- title: Qs(t.editedAt),
6363
+ title: oc(t.editedAt),
6104
6364
  children: "edited"
6105
6365
  }),
6106
6366
  /* @__PURE__ */ Q("div", {
6107
6367
  class: "markup-thread-actions",
6108
- children: [!te && !l ? /* @__PURE__ */ Q(Ws, {
6368
+ children: [!te && !l ? /* @__PURE__ */ Q(Qs, {
6109
6369
  comment: t,
6110
6370
  pickerOpen: m,
6111
6371
  pickerDirection: v,
@@ -6173,7 +6433,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6173
6433
  direction: a < i ? "up" : "down"
6174
6434
  });
6175
6435
  },
6176
- children: /* @__PURE__ */ Q(Oo, { size: 16 })
6436
+ children: /* @__PURE__ */ Q(No, { size: 16 })
6177
6437
  }), f ? /* @__PURE__ */ Q("div", {
6178
6438
  class: "markup-thread-menu-list",
6179
6439
  children: [o ? /* @__PURE__ */ Q("button", {
@@ -6213,7 +6473,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6213
6473
  await h(t._id, n), T({ type: "dismiss" });
6214
6474
  } catch {}
6215
6475
  },
6216
- children: [/* @__PURE__ */ Q(Os, {
6476
+ children: [/* @__PURE__ */ Q(As, {
6217
6477
  class: "markup-comment-edit-input",
6218
6478
  label: "Edit comment",
6219
6479
  value: w.draft,
@@ -6239,7 +6499,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6239
6499
  children: "Save"
6240
6500
  })]
6241
6501
  })]
6242
- }) : /* @__PURE__ */ Q(Ts, {
6502
+ }) : /* @__PURE__ */ Q(Ds, {
6243
6503
  body: t.body,
6244
6504
  mentions: t.mentions
6245
6505
  }),
@@ -6252,7 +6512,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6252
6512
  alt: "Screenshot"
6253
6513
  })
6254
6514
  }) : null,
6255
- !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(Gs, {
6515
+ !l && t.reactions.length > 0 ? /* @__PURE__ */ Q($s, {
6256
6516
  comment: t,
6257
6517
  isResolved: te,
6258
6518
  onToggle: (e) => _(t._id, e)
@@ -6272,7 +6532,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6272
6532
  onClick: (e) => {
6273
6533
  e.stopPropagation(), S.current?.close();
6274
6534
  },
6275
- children: /* @__PURE__ */ Q(Eo, { size: 16 })
6535
+ children: /* @__PURE__ */ Q(jo, { size: 16 })
6276
6536
  }), /* @__PURE__ */ Q("img", {
6277
6537
  class: "markup-lightbox-img",
6278
6538
  src: e.screenshotUrl,
@@ -6280,7 +6540,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6280
6540
  onClick: (e) => e.stopPropagation()
6281
6541
  })]
6282
6542
  }) : null,
6283
- t == null ? /* @__PURE__ */ Q(is, {
6543
+ t == null ? /* @__PURE__ */ Q(os, {
6284
6544
  isPending: s,
6285
6545
  isConnecting: i,
6286
6546
  isSigningIn: a,
@@ -6302,7 +6562,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6302
6562
  children: "team"
6303
6563
  }) : null
6304
6564
  ]
6305
- }), /* @__PURE__ */ Q(As, {
6565
+ }), /* @__PURE__ */ Q(Ms, {
6306
6566
  label: "Reply",
6307
6567
  placeholder: "Write a reply…",
6308
6568
  submitLabel: "Reply",
@@ -6316,7 +6576,7 @@ function Us({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6316
6576
  ]
6317
6577
  });
6318
6578
  }
6319
- function Ws({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
6579
+ function Qs({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
6320
6580
  return /* @__PURE__ */ Q("div", {
6321
6581
  class: Z("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
6322
6582
  ref: i,
@@ -6326,11 +6586,11 @@ function Ws({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
6326
6586
  title: "Add reaction",
6327
6587
  "aria-label": "Add reaction",
6328
6588
  onClick: a,
6329
- children: /* @__PURE__ */ Q(Mo, { size: 16 })
6589
+ children: /* @__PURE__ */ Q(Lo, { size: 16 })
6330
6590
  }), t ? /* @__PURE__ */ Q("div", {
6331
6591
  class: "markup-reaction-picker",
6332
6592
  role: "menu",
6333
- children: Vs.map((t) => /* @__PURE__ */ Q("button", {
6593
+ children: Ys.map((t) => /* @__PURE__ */ Q("button", {
6334
6594
  type: "button",
6335
6595
  role: "menuitem",
6336
6596
  class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
@@ -6340,11 +6600,11 @@ function Ws({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
6340
6600
  }) : null]
6341
6601
  });
6342
6602
  }
6343
- function Gs({ comment: e, isResolved: t, onToggle: n }) {
6603
+ function $s({ comment: e, isResolved: t, onToggle: n }) {
6344
6604
  return /* @__PURE__ */ Q("div", {
6345
6605
  class: "markup-reactions",
6346
6606
  children: e.reactions.map((e) => {
6347
- let r = Ks(e.reactors, e.mine, e.count, e.emoji);
6607
+ let r = ec(e.reactors, e.mine, e.count, e.emoji);
6348
6608
  return /* @__PURE__ */ Q("button", {
6349
6609
  type: "button",
6350
6610
  class: Z("markup-reaction-chip", e.mine && "is-mine"),
@@ -6365,14 +6625,14 @@ function Gs({ comment: e, isResolved: t, onToggle: n }) {
6365
6625
  })
6366
6626
  });
6367
6627
  }
6368
- function Ks(e, t, n, r) {
6628
+ function ec(e, t, n, r) {
6369
6629
  let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
6370
6630
  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}`;
6371
6631
  }
6372
- function qs(e, t, n) {
6632
+ function tc(e, t, n) {
6373
6633
  return Math.max(t, Math.min(n, e));
6374
6634
  }
6375
- function Js({ name: e, image: t, tone: n }) {
6635
+ function nc({ name: e, image: t, tone: n }) {
6376
6636
  let [r, i] = L(null);
6377
6637
  return /* @__PURE__ */ Q("span", {
6378
6638
  class: "markup-comment-avatar",
@@ -6388,11 +6648,11 @@ function Js({ name: e, image: t, tone: n }) {
6388
6648
  onError: () => i(t)
6389
6649
  }) : /* @__PURE__ */ Q("span", {
6390
6650
  class: "markup-avatar-initials",
6391
- children: Ys(e)
6651
+ children: rc(e)
6392
6652
  })
6393
6653
  });
6394
6654
  }
6395
- function Ys(e) {
6655
+ function rc(e) {
6396
6656
  let t = e.trim();
6397
6657
  if (!t) return "??";
6398
6658
  let n = t.split(/\s+/).filter(Boolean), r = n[0] ?? "";
@@ -6400,12 +6660,12 @@ function Ys(e) {
6400
6660
  let i = n[n.length - 1] ?? "";
6401
6661
  return ((r[0] ?? "") + (i[0] ?? "")).toUpperCase();
6402
6662
  }
6403
- function Xs(e) {
6663
+ function ic(e) {
6404
6664
  let t = 0;
6405
6665
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
6406
6666
  return Math.abs(t) % 5 + 1;
6407
6667
  }
6408
- function Zs(e) {
6668
+ function ac(e) {
6409
6669
  let t = Date.now() - e, n = Math.floor(t / 1e3);
6410
6670
  if (n < 60) return "just now";
6411
6671
  let r = Math.floor(n / 60);
@@ -6422,7 +6682,7 @@ function Zs(e) {
6422
6682
  year: "numeric"
6423
6683
  });
6424
6684
  }
6425
- function Qs(e) {
6685
+ function oc(e) {
6426
6686
  return new Date(e).toLocaleDateString([], {
6427
6687
  month: "long",
6428
6688
  day: "numeric",
@@ -6433,7 +6693,7 @@ function Qs(e) {
6433
6693
  }
6434
6694
  //#endregion
6435
6695
  //#region src/runtime/ui/toolbar.tsx
6436
- function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d }) {
6696
+ function sc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d }) {
6437
6697
  let f = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
6438
6698
  function p(e) {
6439
6699
  if (e.preventDefault(), e.stopPropagation(), (e.metaKey || e.ctrlKey) && n) {
@@ -6455,7 +6715,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
6455
6715
  title: e ? "Cancel placing markup" : "Leave a markup",
6456
6716
  "aria-pressed": e,
6457
6717
  onClick: p,
6458
- children: Q(e ? Eo : No, { size: 16 })
6718
+ children: Q(e ? jo : Ro, { size: 16 })
6459
6719
  }),
6460
6720
  a ? /* @__PURE__ */ Q("button", {
6461
6721
  type: "button",
@@ -6467,7 +6727,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
6467
6727
  onClick: (e) => {
6468
6728
  e.preventDefault(), e.stopPropagation(), o?.();
6469
6729
  },
6470
- children: [/* @__PURE__ */ Q(Po, { size: 16 }), i > 0 ? /* @__PURE__ */ Q("span", {
6730
+ children: [/* @__PURE__ */ Q(zo, { size: 16 }), i > 0 ? /* @__PURE__ */ Q("span", {
6471
6731
  class: "markup-tb-badge",
6472
6732
  "aria-hidden": "true",
6473
6733
  children: i > 9 ? "9+" : i
@@ -6486,7 +6746,7 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
6486
6746
  onClick: (e) => {
6487
6747
  e.preventDefault(), e.stopPropagation(), l();
6488
6748
  },
6489
- children: Q(c ? Fo : Io, { size: 16 })
6749
+ children: Q(c ? Bo : Vo, { size: 16 })
6490
6750
  })] }) : null,
6491
6751
  u || d ? /* @__PURE__ */ Q("div", {
6492
6752
  class: "markup-tb-sep",
@@ -6500,19 +6760,19 @@ function $s({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
6500
6760
  "data-kind": "overflow",
6501
6761
  "aria-label": "More options",
6502
6762
  disabled: !0,
6503
- children: /* @__PURE__ */ Q(Lo, { size: 16 })
6763
+ children: /* @__PURE__ */ Q(Ho, { size: 16 })
6504
6764
  })
6505
6765
  ]
6506
6766
  });
6507
6767
  }
6508
6768
  //#endregion
6509
6769
  //#region src/runtime/ui/app.tsx
6510
- function ec(e) {
6770
+ function cc(e) {
6511
6771
  let t = {
6512
6772
  clientId: `markup_user_${e.identity.id}`,
6513
6773
  name: e.identity.name,
6514
6774
  email: e.identity.email,
6515
- image: e.identity.image == null ? void 0 : wi(e.identity.image, location.href)?.href ?? void 0
6775
+ image: e.identity.image == null ? void 0 : Ti(e.identity.image, location.href)?.href ?? void 0
6516
6776
  };
6517
6777
  if (e.mode === "cookies") return e.tokenExpiresAt == null || e.refreshTokenExpiresAt == null ? null : {
6518
6778
  storage: "cookies",
@@ -6533,17 +6793,17 @@ function ec(e) {
6533
6793
  } : {}
6534
6794
  };
6535
6795
  }
6536
- function tc() {
6796
+ function lc() {
6537
6797
  let e = document.activeElement;
6538
6798
  for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
6539
6799
  if (!e) return !1;
6540
6800
  let t = e.tagName;
6541
6801
  return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" ? !0 : e.isContentEditable;
6542
6802
  }
6543
- function nc() {
6803
+ function uc() {
6544
6804
  return window.location.host + window.location.pathname;
6545
6805
  }
6546
- var rc = Ar({
6806
+ var dc = Ar({
6547
6807
  visible: {
6548
6808
  "hide-with-toast": () => ({ kind: "hidden-with-toast" }),
6549
6809
  toggle: () => ({ kind: "hidden" })
@@ -6554,26 +6814,26 @@ var rc = Ar({
6554
6814
  },
6555
6815
  hidden: { toggle: () => ({ kind: "visible" }) }
6556
6816
  });
6557
- function ic(e) {
6558
- return Ai(e), e;
6817
+ function fc(e) {
6818
+ return ji(e), e;
6559
6819
  }
6560
- var ac = Ar({
6820
+ var pc = Ar({
6561
6821
  unresolved: {
6562
- "mint-success": (e, t) => ic({
6822
+ "mint-success": (e, t) => fc({
6563
6823
  kind: "anon",
6564
6824
  identity: t.identity
6565
6825
  }),
6566
- "signed-in": (e, t) => ic({
6826
+ "signed-in": (e, t) => fc({
6567
6827
  kind: "verified",
6568
6828
  identity: t.identity
6569
6829
  })
6570
6830
  },
6571
6831
  anon: {
6572
- "signed-in": (e, t) => ic({
6832
+ "signed-in": (e, t) => fc({
6573
6833
  kind: "verified",
6574
6834
  identity: t.identity
6575
6835
  }),
6576
- "author-set": (e, t) => ic({
6836
+ "author-set": (e, t) => fc({
6577
6837
  kind: "anon",
6578
6838
  identity: {
6579
6839
  ...e.identity,
@@ -6581,64 +6841,64 @@ var ac = Ar({
6581
6841
  email: t.email
6582
6842
  }
6583
6843
  }),
6584
- "forget-me": () => ic({ kind: "unresolved" })
6844
+ "forget-me": () => fc({ kind: "unresolved" })
6585
6845
  },
6586
6846
  verified: {
6587
- "signed-in": (e, t) => ic({
6847
+ "signed-in": (e, t) => fc({
6588
6848
  kind: "verified",
6589
6849
  identity: t.identity
6590
6850
  }),
6591
- unauthorized: (e) => ic({
6851
+ unauthorized: (e) => fc({
6592
6852
  kind: "recovering",
6593
6853
  preserved: {
6594
6854
  name: e.identity.name,
6595
6855
  email: e.identity.email
6596
6856
  }
6597
6857
  }),
6598
- "signed-out": () => ic({ kind: "unresolved" })
6858
+ "signed-out": () => fc({ kind: "unresolved" })
6599
6859
  },
6600
6860
  recovering: {
6601
- "mint-success": (e, t) => ic({
6861
+ "mint-success": (e, t) => fc({
6602
6862
  kind: "anon",
6603
6863
  identity: t.identity
6604
6864
  }),
6605
- "signed-in": (e, t) => ic({
6865
+ "signed-in": (e, t) => fc({
6606
6866
  kind: "verified",
6607
6867
  identity: t.identity
6608
6868
  })
6609
6869
  }
6610
6870
  });
6611
- function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
6612
- let [a, o] = L(nc), [s, c] = L([]), [l, u] = L(!1), d = B(() => ki(), []), [f, p] = jr(ac, d.state), [m, h] = L(null);
6871
+ function mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
6872
+ let [a, o] = L(uc), [s, c] = L([]), [l, u] = L(!1), d = B(() => Ai(), []), [f, p] = jr(pc, d.state), [m, h] = L(null);
6613
6873
  R(() => {
6614
6874
  let n = !1;
6615
- return hi(e, t).then((e) => {
6875
+ return gi(e, t).then((e) => {
6616
6876
  n || h(e);
6617
6877
  }), () => {
6618
6878
  n = !0;
6619
6879
  };
6620
6880
  }, [e, t]);
6621
- let [g, _] = L(n), [v, y] = L(!0), [b, x] = L(!0), [S, C] = L(!1), w = z(f);
6622
- w.current = f, So(f, e, t, (e) => p({
6881
+ let [g, _] = L(n), [v, y] = L(!0), [b, x] = L(!0), [S, C] = L(null), w = V(() => C(null), []), T = z(f);
6882
+ T.current = f, Do(f, e, t, (e) => p({
6623
6883
  type: "signed-in",
6624
6884
  identity: e
6625
6885
  }), () => p({ type: "unauthorized" }));
6626
- let T = B(() => fi({
6886
+ let E = B(() => pi({
6627
6887
  apiUrl: e,
6628
6888
  apiKey: t,
6629
6889
  getToken: () => {
6630
- let e = w.current;
6890
+ let e = T.current;
6631
6891
  return e.kind !== "verified" || e.identity.token == null ? null : {
6632
6892
  token: e.identity.token,
6633
6893
  expiresAt: e.identity.tokenExpiresAt
6634
6894
  };
6635
6895
  },
6636
6896
  getStorageMode: () => {
6637
- let e = w.current;
6897
+ let e = T.current;
6638
6898
  return e.kind === "verified" ? e.identity.storage : null;
6639
6899
  },
6640
6900
  getAnonToken: () => {
6641
- let e = w.current;
6901
+ let e = T.current;
6642
6902
  return e.kind === "anon" ? e.identity.anonToken : null;
6643
6903
  },
6644
6904
  onUnauthorized: () => {
@@ -6648,29 +6908,29 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6648
6908
  e,
6649
6909
  t,
6650
6910
  p
6651
- ]), [E, D] = L({ kind: "idle" }), [O, ee] = L([]);
6911
+ ]), [D, O] = L({ kind: "idle" }), [ee, te] = L([]);
6652
6912
  R(() => {
6653
6913
  let e = !1;
6654
- return T.listMembers().then((t) => {
6655
- e || ee(t.members);
6914
+ return E.listMembers().then((t) => {
6915
+ e || te(t.members);
6656
6916
  }).catch(() => {}), () => {
6657
6917
  e = !0;
6658
6918
  };
6659
- }, [T]);
6660
- let [te, k] = L(0), [ne, A] = L([]), [re, ie] = L(!1), [ae, oe] = L(void 0), [se, ce] = L(!1), le = V(() => {
6661
- ie(!0), oe(void 0), T.listNotifications().then((e) => {
6662
- A(e.notifications);
6919
+ }, [E]);
6920
+ let [k, A] = L(0), [j, ne] = L([]), [re, ie] = L(!1), [ae, oe] = L(void 0), [se, ce] = L(!1), le = V(() => {
6921
+ ie(!0), oe(void 0), E.listNotifications().then((e) => {
6922
+ ne(e.notifications);
6663
6923
  }).catch((e) => {
6664
6924
  oe(e instanceof Error ? e.message : "Failed to load.");
6665
6925
  }).finally(() => {
6666
6926
  ie(!1);
6667
6927
  });
6668
- }, [T]), ue = Rr(), de = Rr(), fe = Rr(), pe = Rr(), me = Rr(), { run: j, reset: he } = ue, { run: ge } = de, { run: _e, reset: ve } = fe, { run: ye } = pe, { run: be } = me, xe = me.isPending, Se = ue.isPending, M = ue.error ?? de.error ?? fe.error, [Ce, N] = jr(rc, { kind: "visible" }), P = Ce.kind !== "visible", [we, Te] = L(0), Ee = z(null), De = Mi(f), Oe = f.kind === "verified", ke = f.kind === "unresolved" || f.kind === "recovering", Ae = ji(f);
6928
+ }, [E]), ue = Rr(), de = Rr(), fe = Rr(), pe = Rr(), me = Rr(), { run: M, reset: he } = ue, { run: ge } = de, { run: _e, reset: ve } = fe, { run: ye } = pe, { run: be } = me, xe = me.isPending, N = ue.isPending, Se = ue.error ?? de.error ?? fe.error, [Ce, P] = jr(dc, { kind: "visible" }), we = Ce.kind !== "visible", [Te, Ee] = L(0), De = z(null), Oe = Ni(f), ke = f.kind === "verified", Ae = f.kind === "unresolved" || f.kind === "recovering", je = Mi(f);
6669
6929
  R(() => {
6670
6930
  if (f.kind !== "unresolved" && f.kind !== "recovering") return;
6671
6931
  let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
6672
6932
  function i() {
6673
- T.mintAnonIdentity().then(({ clientId: n, token: r }) => {
6933
+ E.mintAnonIdentity().then(({ clientId: n, token: r }) => {
6674
6934
  t || p({
6675
6935
  type: "mint-success",
6676
6936
  identity: {
@@ -6688,71 +6948,73 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6688
6948
  t = !0, n && clearTimeout(n);
6689
6949
  };
6690
6950
  }, [
6691
- T,
6951
+ E,
6692
6952
  f,
6693
6953
  p,
6694
6954
  d
6695
6955
  ]);
6696
- let je = vo(T), [Me, Ne] = L(null);
6956
+ let Me = Co(E), [Ne, Pe] = L(null);
6697
6957
  R(() => {
6698
6958
  let t = new kr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
6699
- return Ne(t), () => {
6700
- t.close(), Ne((e) => e === t ? null : e);
6959
+ return Pe(t), () => {
6960
+ t.close(), Pe((e) => e === t ? null : e);
6701
6961
  };
6702
6962
  }, [e]);
6703
- let Pe = z(!1);
6963
+ let F = z(!1);
6704
6964
  R(() => {
6705
- if (!(!Me || !je)) return he(), ve(), Me.onUpdate(bn("widget/queries:subscribeThreadsForRoute"), {
6706
- subscriptionToken: je,
6965
+ if (!(!Ne || !Me)) return he(), ve(), Ne.onUpdate(bn("widget/queries:subscribeThreadsForRoute"), {
6966
+ subscriptionToken: Me,
6707
6967
  route: a,
6708
- viewerClientId: Ae
6968
+ viewerClientId: je
6709
6969
  }, (e) => {
6710
6970
  e !== void 0 && (c(e), u(!0));
6711
6971
  });
6712
6972
  }, [
6973
+ Ne,
6713
6974
  Me,
6714
- je,
6715
6975
  a,
6716
- Ae,
6976
+ je,
6717
6977
  he,
6718
6978
  ve
6719
6979
  ]), R(() => {
6720
6980
  if (f.kind !== "verified") {
6721
- k(0);
6981
+ A(0);
6722
6982
  return;
6723
6983
  }
6724
- if (!(!Me || !je)) return Me.onUpdate(bn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: je }, (e) => {
6725
- e !== void 0 && k(e.count);
6984
+ if (!(!Ne || !Me)) return Ne.onUpdate(bn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: Me }, (e) => {
6985
+ e !== void 0 && A(e.count);
6726
6986
  });
6727
6987
  }, [
6988
+ Ne,
6728
6989
  Me,
6729
- je,
6730
6990
  f.kind
6731
6991
  ]), R(() => {
6732
- if (Pe.current || !l) return;
6992
+ if (F.current || !l) return;
6733
6993
  let e = window.location.hash.match(/^#markup-thread=(.+)$/);
6734
6994
  if (e) {
6735
6995
  let t = decodeURIComponent(e[1] ?? "");
6736
- s.find((e) => e._id === t) && D({
6996
+ s.find((e) => e._id === t) && O({
6737
6997
  kind: "thread",
6738
6998
  threadId: t
6739
6999
  }), history.replaceState(null, "", window.location.pathname + window.location.search);
6740
7000
  }
6741
- Pe.current = !0;
6742
- }, [s, l]), R(() => Si(() => o(nc())), []), R(() => {
7001
+ F.current = !0;
7002
+ }, [s, l]), R(() => Ci(() => o(uc())), []), R(() => {
6743
7003
  function e(e) {
6744
- e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), N({ type: "toggle" })));
7004
+ e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), P({ type: "toggle" })));
6745
7005
  }
6746
7006
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
6747
- }, [N]), R(() => {
7007
+ }, [P]), R(() => {
7008
+ we && C(null);
7009
+ }, [we]), R(() => {
6748
7010
  if (Ce.kind !== "hidden-with-toast") return;
6749
- let e = window.setTimeout(() => N({ type: "dismiss-toast" }), 5e3);
7011
+ let e = window.setTimeout(() => P({ type: "dismiss-toast" }), 5e3);
6750
7012
  return () => window.clearTimeout(e);
6751
- }, [Ce.kind, N]), R(() => {
7013
+ }, [Ce.kind, P]), R(() => {
6752
7014
  let e = null;
6753
7015
  function t() {
6754
7016
  e ??= requestAnimationFrame(() => {
6755
- e = null, Te((e) => e + 1);
7017
+ e = null, Ee((e) => e + 1);
6756
7018
  });
6757
7019
  }
6758
7020
  window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
@@ -6761,73 +7023,76 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6761
7023
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
6762
7024
  };
6763
7025
  }, []);
6764
- let F = V(() => {
6765
- he(), ve(), D({ kind: "placing" });
7026
+ let Fe = V(() => {
7027
+ he(), ve(), O({ kind: "placing" });
6766
7028
  }, [he, ve]);
6767
7029
  R(() => {
6768
7030
  function e(e) {
6769
- e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || E.kind === "idle" && (P || tc() || (e.preventDefault(), F())));
7031
+ e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || D.kind === "idle" && (we || lc() || (e.preventDefault(), Fe())));
6770
7032
  }
6771
7033
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
6772
7034
  }, [
6773
- E.kind,
6774
- P,
6775
- F
7035
+ D.kind,
7036
+ we,
7037
+ Fe
6776
7038
  ]);
6777
- let Fe = V(() => {
6778
- D({ kind: "idle" }), he(), ve();
6779
- }, [he, ve]), Ie = z(0), Le = V((e, t, n) => {
6780
- let i = t + window.scrollX, a = n + window.scrollY, o = ++Ie.current;
7039
+ let Ie = V(() => {
7040
+ O({ kind: "idle" }), he(), ve();
7041
+ }, [he, ve]), Le = z(0), Re = V((e, t, n) => {
7042
+ let i = t + window.scrollX, a = n + window.scrollY, o = ++Le.current;
6781
7043
  if (r?.enabled === !1 || !b) {
6782
- D({
7044
+ O({
6783
7045
  kind: "composing-new",
6784
7046
  coords: e,
6785
7047
  pageX: i,
6786
7048
  pageY: a,
6787
7049
  screenshot: null,
6788
7050
  isScreenshotCapturing: !1,
7051
+ screenshotFailed: !1,
6789
7052
  screenshotRedactedCount: 0,
6790
7053
  screenshotRedactedSelectors: [],
6791
7054
  captureToken: o
6792
7055
  });
6793
7056
  return;
6794
7057
  }
6795
- D({
7058
+ O({
6796
7059
  kind: "composing-new",
6797
7060
  coords: e,
6798
7061
  pageX: i,
6799
7062
  pageY: a,
6800
7063
  screenshot: null,
6801
7064
  isScreenshotCapturing: !0,
7065
+ screenshotFailed: !1,
6802
7066
  screenshotRedactedCount: 0,
6803
7067
  screenshotRedactedSelectors: [],
6804
7068
  captureToken: o
6805
7069
  });
6806
- let s = Ee.current != null && Ee.current.getRootNode() instanceof ShadowRoot ? Ee.current.getRootNode().host : null, c = {
7070
+ let s = De.current != null && De.current.getRootNode() instanceof ShadowRoot ? De.current.getRootNode().host : null, c = {
6807
7071
  strictScrub: r?.strictScrub,
6808
7072
  redactSelector: r?.redactSelector
6809
7073
  };
6810
- uo(s, {
7074
+ mo(s, {
6811
7075
  x: t,
6812
7076
  y: n
6813
7077
  }, c).then((e) => {
6814
- D((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
7078
+ O((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
6815
7079
  ...t,
6816
7080
  screenshot: e?.blob ?? null,
6817
7081
  isScreenshotCapturing: !1,
7082
+ screenshotFailed: e == null,
6818
7083
  screenshotRedactedCount: e?.redactedCount ?? 0,
6819
7084
  screenshotRedactedSelectors: e?.redactedSelectors ?? []
6820
7085
  });
6821
7086
  });
6822
- }, [r, b]), Re = V((e, t) => {
7087
+ }, [r, b]), I = V((e, t) => {
6823
7088
  p({
6824
7089
  type: "author-set",
6825
7090
  name: e,
6826
7091
  email: t
6827
7092
  });
6828
- }, [p]), I = de.isPending, ze = V(async () => {
7093
+ }, [p]), ze = de.isPending, Be = V(async () => {
6829
7094
  await ge(async () => {
6830
- let n = ec(await Ri({
7095
+ let n = cc(await zi({
6831
7096
  apiUrl: e,
6832
7097
  apiKey: t,
6833
7098
  useCookies: m === !0
@@ -6844,18 +7109,18 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6844
7109
  m,
6845
7110
  ge,
6846
7111
  p
6847
- ]), Be = V(async (e, t) => {
6848
- if (E.kind !== "composing-new") return;
6849
- let n = Ni(f);
6850
- n && await j(async () => {
7112
+ ]), Ve = V(async (e, t) => {
7113
+ if (D.kind !== "composing-new") return;
7114
+ let n = Pi(f);
7115
+ n && await M(async () => {
6851
7116
  let r;
6852
- if (t && E.screenshot) {
6853
- let { uploadUrl: e } = await T.getScreenshotUploadUrl(), t;
7117
+ if (t && D.screenshot) {
7118
+ let { uploadUrl: e } = await E.getScreenshotUploadUrl(), t;
6854
7119
  try {
6855
7120
  t = await fetch(e, {
6856
7121
  method: "POST",
6857
- headers: { "Content-Type": E.screenshot.type || "image/png" },
6858
- body: E.screenshot,
7122
+ headers: { "Content-Type": D.screenshot.type || "image/png" },
7123
+ body: D.screenshot,
6859
7124
  signal: AbortSignal.timeout(6e4)
6860
7125
  });
6861
7126
  } catch (e) {
@@ -6865,16 +7130,16 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6865
7130
  let { storageId: n } = await t.json();
6866
7131
  r = n;
6867
7132
  }
6868
- let i = Pr(e), o = await T.createThread({
7133
+ let i = Pr(e), o = await E.createThread({
6869
7134
  url: window.location.href,
6870
7135
  route: a,
6871
- anchorSelector: E.coords.anchorSelector,
6872
- anchorX: E.coords.anchorX,
6873
- anchorY: E.coords.anchorY,
6874
- anchorOffsetX: E.coords.anchorOffsetX,
6875
- anchorOffsetY: E.coords.anchorOffsetY,
6876
- viewportW: E.coords.viewportW,
6877
- viewportY: E.coords.viewportY,
7136
+ anchorSelector: D.coords.anchorSelector,
7137
+ anchorX: D.coords.anchorX,
7138
+ anchorY: D.coords.anchorY,
7139
+ anchorOffsetX: D.coords.anchorOffsetX,
7140
+ anchorOffsetY: D.coords.anchorOffsetY,
7141
+ viewportW: D.coords.viewportW,
7142
+ viewportY: D.coords.viewportY,
6878
7143
  userAgent: navigator.userAgent,
6879
7144
  authorName: n.name,
6880
7145
  authorEmail: n.email,
@@ -6882,62 +7147,62 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6882
7147
  mentions: i.length > 0 ? i : void 0,
6883
7148
  screenshotStorageId: r
6884
7149
  });
6885
- c((e) => [...e, o.thread]), D({
7150
+ c((e) => [...e, o.thread]), O({
6886
7151
  kind: "thread",
6887
7152
  threadId: o.thread._id
6888
7153
  });
6889
7154
  });
6890
7155
  }, [
6891
- T,
6892
- f,
6893
7156
  E,
7157
+ f,
7158
+ D,
6894
7159
  a,
6895
- j
6896
- ]), Ve = V(async () => {
6897
- if (E.kind !== "thread") return;
6898
- let e = E.threadId;
6899
- await j(async () => {
6900
- await T.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), D({ kind: "idle" });
7160
+ M
7161
+ ]), He = V(async () => {
7162
+ if (D.kind !== "thread") return;
7163
+ let e = D.threadId;
7164
+ await M(async () => {
7165
+ await E.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), O({ kind: "idle" });
6901
7166
  });
6902
7167
  }, [
6903
- T,
6904
7168
  E,
6905
- j
6906
- ]), He = V(async () => {
6907
- if (E.kind !== "thread") return;
6908
- let e = E.threadId;
6909
- await j(async () => {
6910
- await T.resolveThread(e, Ae), c((t) => t.filter((t) => t._id !== e)), D({ kind: "idle" });
7169
+ D,
7170
+ M
7171
+ ]), Ue = V(async () => {
7172
+ if (D.kind !== "thread") return;
7173
+ let e = D.threadId;
7174
+ await M(async () => {
7175
+ await E.resolveThread(e, je), c((t) => t.filter((t) => t._id !== e)), O({ kind: "idle" });
6911
7176
  });
6912
7177
  }, [
6913
- T,
6914
7178
  E,
6915
- Ae,
6916
- j
6917
- ]), Ue = V((e) => {
6918
- if (e.readAt ?? (k((e) => Math.max(0, e - 1)), A((t) => t.map((t) => t._id === e._id ? {
7179
+ D,
7180
+ je,
7181
+ M
7182
+ ]), We = V((e) => {
7183
+ if (e.readAt ?? (A((e) => Math.max(0, e - 1)), ne((t) => t.map((t) => t._id === e._id ? {
6919
7184
  ...t,
6920
7185
  readAt: Date.now()
6921
- } : t)), T.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) D({
7186
+ } : t)), E.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) O({
6922
7187
  kind: "thread",
6923
7188
  threadId: e.threadId
6924
7189
  });
6925
7190
  else {
6926
- let t = wi(e.threadUrl, window.location.href);
7191
+ let t = Ti(e.threadUrl, window.location.href);
6927
7192
  t && (t.hash = `markup-thread=${e.threadId}`, window.location.href = t.toString());
6928
7193
  }
6929
- }, [T, s]), We = V(() => {
6930
- ce(!0), k(0), A((e) => e.map((e) => e.readAt == null ? {
7194
+ }, [E, s]), Ge = V(() => {
7195
+ ce(!0), A(0), ne((e) => e.map((e) => e.readAt == null ? {
6931
7196
  ...e,
6932
7197
  readAt: Date.now()
6933
- } : e)), T.markAllNotificationsRead().catch(() => {}).finally(() => ce(!1));
6934
- }, [T]), Ge = V(async (e) => {
6935
- if (E.kind !== "thread") return;
6936
- let t = Ni(f);
7198
+ } : e)), E.markAllNotificationsRead().catch(() => {}).finally(() => ce(!1));
7199
+ }, [E]), Ke = V(async (e) => {
7200
+ if (D.kind !== "thread") return;
7201
+ let t = Pi(f);
6937
7202
  if (!t) return;
6938
- let n = E.threadId;
6939
- await j(async () => {
6940
- let r = Pr(e), i = await T.addComment(n, {
7203
+ let n = D.threadId;
7204
+ await M(async () => {
7205
+ let r = Pr(e), i = await E.addComment(n, {
6941
7206
  body: e,
6942
7207
  authorName: t.name,
6943
7208
  authorEmail: t.email,
@@ -6946,83 +7211,84 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
6946
7211
  c((e) => e.map((e) => e._id === n ? i.thread : e));
6947
7212
  });
6948
7213
  }, [
6949
- T,
6950
- f,
6951
7214
  E,
6952
- j
6953
- ]), Ke = V(async (e, t) => {
6954
- if (E.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
6955
- let n = E.threadId;
6956
- await j(async () => {
6957
- let r = Pr(t), i = await T.editComment(n, e, {
7215
+ f,
7216
+ D,
7217
+ M
7218
+ ]), qe = V(async (e, t) => {
7219
+ if (D.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7220
+ let n = D.threadId;
7221
+ await M(async () => {
7222
+ let r = Pr(t), i = await E.editComment(n, e, {
6958
7223
  body: t,
6959
7224
  mentions: r.length > 0 ? r : void 0
6960
7225
  });
6961
7226
  c((e) => e.map((e) => e._id === n ? i.thread : e));
6962
7227
  }, { rethrow: !0 });
6963
7228
  }, [
6964
- T,
6965
- f,
6966
7229
  E,
6967
- j
6968
- ]), qe = V(async (e) => {
6969
- if (E.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
6970
- let t = E.threadId;
6971
- await j(async () => {
6972
- let n = await T.deleteComment(t, e);
7230
+ f,
7231
+ D,
7232
+ M
7233
+ ]), Je = V(async (e) => {
7234
+ if (D.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7235
+ let t = D.threadId;
7236
+ await M(async () => {
7237
+ let n = await E.deleteComment(t, e);
6973
7238
  c((e) => e.map((e) => e._id === t ? n.thread : e));
6974
7239
  });
6975
7240
  }, [
6976
- T,
6977
- f,
6978
7241
  E,
6979
- j
6980
- ]), Je = V(async (e, t) => {
6981
- if (E.kind !== "thread") return;
6982
- let n = Ni(f);
7242
+ f,
7243
+ D,
7244
+ M
7245
+ ]), Ye = V(async (e, t) => {
7246
+ if (D.kind !== "thread") return;
7247
+ let n = Pi(f);
6983
7248
  if (!n) return;
6984
- let r = E.threadId;
7249
+ let r = D.threadId;
6985
7250
  await _e(async () => {
6986
- let i = await T.toggleReaction(e, {
7251
+ let i = await E.toggleReaction(e, {
6987
7252
  emoji: t,
6988
7253
  authorName: n.name
6989
7254
  });
6990
7255
  c((e) => e.map((e) => e._id === r ? i.thread : e));
6991
7256
  });
6992
7257
  }, [
6993
- T,
6994
- f,
6995
7258
  E,
7259
+ f,
7260
+ D,
6996
7261
  _e
6997
- ]), [Ye, Xe] = L(!1), Ze = V(async () => {
7262
+ ]), [Xe, Ze] = L(!1), Qe = V(async () => {
6998
7263
  await ye(async () => {
6999
- await T.forgetMe(), D({ kind: "idle" }), p({ type: "forget-me" }), Xe(!0);
7264
+ await E.forgetMe(), O({ kind: "idle" }), w(), p({ type: "forget-me" }), Ze(!0);
7000
7265
  });
7001
7266
  }, [
7002
- T,
7267
+ E,
7268
+ w,
7003
7269
  ye,
7004
7270
  p
7005
7271
  ]);
7006
7272
  R(() => {
7007
- if (!Ye) return;
7008
- let e = window.setTimeout(() => Xe(!1), 5e3);
7273
+ if (!Xe) return;
7274
+ let e = window.setTimeout(() => Ze(!1), 5e3);
7009
7275
  return () => window.clearTimeout(e);
7010
- }, [Ye]);
7011
- let [Qe, $e] = L(!1), et = V(async () => {
7276
+ }, [Xe]);
7277
+ let [$e, et] = L(!1), tt = V(async () => {
7012
7278
  await be(async () => {
7013
- await T.signOut(), D({ kind: "idle" }), p({ type: "signed-out" }), $e(!0);
7279
+ await E.signOut(), O({ kind: "idle" }), p({ type: "signed-out" }), et(!0);
7014
7280
  });
7015
7281
  }, [
7016
- T,
7282
+ E,
7017
7283
  be,
7018
7284
  p
7019
7285
  ]);
7020
7286
  R(() => {
7021
- if (!Qe) return;
7022
- let e = window.setTimeout(() => $e(!1), 5e3);
7287
+ if (!$e) return;
7288
+ let e = window.setTimeout(() => et(!1), 5e3);
7023
7289
  return () => window.clearTimeout(e);
7024
- }, [Qe]);
7025
- let tt = E.kind === "thread" ? s.find((e) => e._id === E.threadId) ?? null : null, H = Oe || Ae != null && Ae === tt?.authorClientId, U = B(() => s.map((e) => ({
7290
+ }, [$e]);
7291
+ let H = D.kind === "thread" ? s.find((e) => e._id === D.threadId) ?? null : null, U = ke || je != null && je === H?.authorClientId, nt = B(() => s.map((e) => ({
7026
7292
  thread: e,
7027
7293
  point: oi({
7028
7294
  anchorX: e.anchorX,
@@ -7031,152 +7297,197 @@ function oc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7031
7297
  anchorOffsetX: e.anchorOffsetX,
7032
7298
  anchorOffsetY: e.anchorOffsetY
7033
7299
  })
7034
- })), [s, we]), nt = U.some((e) => !e.point.resolved);
7300
+ })), [s, Te]), rt = z({
7301
+ retryable: !1,
7302
+ elements: []
7303
+ });
7304
+ R(() => {
7305
+ rt.current = {
7306
+ retryable: nt.some((e) => !e.point.resolved && e.thread.anchorSelector != null),
7307
+ elements: nt.flatMap((e) => e.point.element ? [e.point.element] : [])
7308
+ };
7309
+ }, [nt]);
7310
+ let it = s.some((e) => e.anchorSelector != null);
7035
7311
  return R(() => {
7036
- if (!nt) return;
7312
+ if (!it) return;
7037
7313
  let e = null;
7038
7314
  function t() {
7039
7315
  e ??= requestAnimationFrame(() => {
7040
- e = null, Te((e) => e + 1);
7316
+ e = null, Ee((e) => e + 1);
7041
7317
  });
7042
7318
  }
7043
- let n = new MutationObserver(t);
7319
+ let n = new MutationObserver(() => {
7320
+ let { retryable: e, elements: n } = rt.current;
7321
+ !e && n.every((e) => e.isConnected) || t();
7322
+ });
7044
7323
  return n.observe(document.body, {
7045
7324
  childList: !0,
7046
7325
  subtree: !0
7047
7326
  }), () => {
7048
7327
  n.disconnect(), e != null && cancelAnimationFrame(e);
7049
7328
  };
7050
- }, [nt]), R(() => {
7051
- E.kind === "thread" && tt == null && Fe();
7329
+ }, [it]), R(() => {
7330
+ D.kind === "thread" && H == null && Ie();
7052
7331
  }, [
7053
- E,
7054
- tt,
7055
- Fe
7332
+ D,
7333
+ H,
7334
+ Ie
7056
7335
  ]), /* @__PURE__ */ Q("div", {
7057
7336
  class: "markup-root",
7058
- ref: Ee,
7337
+ ref: De,
7059
7338
  children: [
7060
- E.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
7339
+ D.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
7061
7340
  class: "markup-pins-layer",
7062
- children: [!P && v ? U.map(({ thread: e, point: t }) => {
7063
- let n = E.kind === "thread" && E.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
7064
- return /* @__PURE__ */ Q(Rs, {
7341
+ children: [!we && v ? nt.map(({ thread: e, point: t }) => {
7342
+ let n = D.kind === "thread" && D.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
7343
+ return /* @__PURE__ */ Q(Us, {
7065
7344
  pageX: t.pageX,
7066
7345
  pageY: t.pageY,
7067
7346
  count: r,
7068
7347
  isActive: n,
7069
7348
  isUnresolved: !t.resolved,
7070
- onClick: () => D({
7349
+ onClick: () => O({
7071
7350
  kind: "thread",
7072
7351
  threadId: e._id
7073
7352
  })
7074
7353
  }, e._id);
7075
- }) : null, E.kind === "composing-new" ? /* @__PURE__ */ Q(zs, {
7076
- pageX: E.pageX,
7077
- pageY: E.pageY
7354
+ }) : null, D.kind === "composing-new" ? /* @__PURE__ */ Q(Ws, {
7355
+ pageX: D.pageX,
7356
+ pageY: D.pageY
7078
7357
  }) : null]
7079
7358
  }),
7080
- E.kind === "placing" ? /* @__PURE__ */ Q(Bs, {
7081
- onPlace: Le,
7082
- onCancel: Fe
7359
+ D.kind === "placing" ? /* @__PURE__ */ Q(Gs, {
7360
+ onPlace: Re,
7361
+ onCancel: Ie
7083
7362
  }) : null,
7084
- E.kind === "thread" && tt ? /* @__PURE__ */ Q(Us, {
7085
- thread: tt,
7086
- authorName: De,
7087
- currentClientId: Ae ?? null,
7088
- isVerified: Oe,
7089
- isIdentityResolving: ke,
7090
- isSigningIn: I,
7091
- canDelete: H,
7092
- isPending: Se,
7093
- error: M,
7094
- isHidden: P,
7095
- members: O,
7096
- onAuthor: Re,
7097
- onSignIn: ze,
7098
- onClose: Fe,
7099
- onReply: Ge,
7100
- onEditComment: Ke,
7101
- onDeleteComment: qe,
7102
- onToggleReaction: Je,
7103
- onDelete: Ve,
7104
- onResolve: He
7105
- }, tt._id) : null,
7106
- E.kind === "composing-new" ? /* @__PURE__ */ Q(js, {
7107
- pageX: E.pageX,
7108
- pageY: E.pageY,
7109
- authorName: De,
7110
- isVerified: Oe,
7111
- isIdentityResolving: ke,
7112
- isSigningIn: I,
7113
- isPending: Se,
7114
- error: M,
7115
- screenshot: E.screenshot,
7116
- isScreenshotCapturing: E.isScreenshotCapturing,
7117
- screenshotRedactedCount: E.screenshotRedactedCount,
7118
- screenshotRedactedSelectors: E.screenshotRedactedSelectors,
7119
- members: O,
7120
- onAuthor: Re,
7121
- onSignIn: ze,
7122
- onSubmit: Be,
7123
- onClose: Fe
7363
+ D.kind === "thread" && H ? /* @__PURE__ */ Q(Zs, {
7364
+ thread: H,
7365
+ authorName: Oe,
7366
+ currentClientId: je ?? null,
7367
+ isVerified: ke,
7368
+ isIdentityResolving: Ae,
7369
+ isSigningIn: ze,
7370
+ canDelete: U,
7371
+ isPending: N,
7372
+ error: Se,
7373
+ isHidden: we,
7374
+ members: ee,
7375
+ onAuthor: I,
7376
+ onSignIn: Be,
7377
+ onClose: Ie,
7378
+ onReply: Ke,
7379
+ onEditComment: qe,
7380
+ onDeleteComment: Je,
7381
+ onToggleReaction: Ye,
7382
+ onDelete: He,
7383
+ onResolve: Ue
7384
+ }, H._id) : null,
7385
+ D.kind === "composing-new" ? /* @__PURE__ */ Q(Ns, {
7386
+ pageX: D.pageX,
7387
+ pageY: D.pageY,
7388
+ authorName: Oe,
7389
+ isVerified: ke,
7390
+ isIdentityResolving: Ae,
7391
+ isSigningIn: ze,
7392
+ isPending: N,
7393
+ error: Se,
7394
+ screenshot: D.screenshot,
7395
+ isScreenshotCapturing: D.isScreenshotCapturing,
7396
+ screenshotFailed: D.screenshotFailed,
7397
+ screenshotRedactedCount: D.screenshotRedactedCount,
7398
+ screenshotRedactedSelectors: D.screenshotRedactedSelectors,
7399
+ members: ee,
7400
+ onAuthor: I,
7401
+ onSignIn: Be,
7402
+ onSubmit: Ve,
7403
+ onClose: Ie
7124
7404
  }) : null,
7125
- !P || E.kind === "placing" || E.kind === "composing-new" ? /* @__PURE__ */ Q($s, {
7126
- isActive: E.kind === "placing",
7127
- onToggle: () => E.kind === "placing" ? Fe() : F(),
7128
- onHide: () => N({ type: "hide-with-toast" }),
7405
+ !we || D.kind === "placing" || D.kind === "composing-new" ? /* @__PURE__ */ Q(sc, {
7406
+ isActive: D.kind === "placing",
7407
+ onToggle: () => D.kind === "placing" ? Ie() : Fe(),
7408
+ onHide: () => P({ type: "hide-with-toast" }),
7129
7409
  position: g,
7130
- showInbox: Oe,
7131
- unreadCount: Oe ? te : 0,
7132
- inboxOpen: S,
7410
+ showInbox: ke,
7411
+ unreadCount: ke ? k : 0,
7412
+ inboxOpen: S === "inbox",
7133
7413
  onOpenInbox: () => {
7134
- let e = !S;
7414
+ let e = S === "inbox" ? null : "inbox";
7135
7415
  C(e), e && le();
7136
7416
  },
7137
7417
  pinsVisible: v,
7138
7418
  onTogglePins: () => y((e) => !e),
7139
- identityButton: /* @__PURE__ */ Q(Jo, {
7419
+ identityButton: /* @__PURE__ */ Q($o, {
7140
7420
  identity: f,
7141
7421
  position: g,
7142
- isSigningIn: I,
7422
+ isSigningIn: ze,
7143
7423
  isSigningOut: xe,
7144
7424
  dashboardUrl: i,
7145
- onSignIn: ze,
7146
- onSignOut: et,
7147
- onForgetMe: Ze
7425
+ onSignIn: Be,
7426
+ onSignOut: tt,
7427
+ onForgetMe: Qe
7148
7428
  }),
7149
- overflowButton: /* @__PURE__ */ Q(Ps, {
7429
+ overflowButton: /* @__PURE__ */ Q(Rs, {
7150
7430
  position: g,
7151
7431
  onSetPosition: _,
7152
7432
  autoCapture: b && r?.enabled !== !1,
7153
7433
  autoCaptureLocked: r?.enabled === !1,
7154
7434
  onToggleAutoCapture: () => x((e) => !e),
7155
- onHideForSession: () => N({ type: "hide-with-toast" }),
7156
- version: "1.16.0",
7435
+ onOpenPrivacy: () => C("privacy"),
7436
+ onOpenShortcuts: () => C("shortcuts"),
7437
+ onHideForSession: () => P({ type: "hide-with-toast" }),
7438
+ version: "1.17.0",
7157
7439
  dashboardUrl: i
7158
7440
  })
7159
7441
  }) : null,
7160
- S && Oe ? /* @__PURE__ */ Q(Qo, {
7442
+ S === "inbox" && ke ? /* @__PURE__ */ Q(Hs, {
7443
+ kind: "inbox",
7444
+ label: "Inbox",
7161
7445
  position: g,
7162
- items: ne,
7163
- isLoading: re,
7164
- error: ae,
7165
- isMarkingAll: se,
7166
- onClose: () => C(!1),
7167
- onItemClick: (e) => {
7168
- C(!1), Ue(e);
7169
- },
7170
- onMarkAllRead: We
7446
+ ignoreToolbarKind: "inbox",
7447
+ onClose: w,
7448
+ children: /* @__PURE__ */ Q(Fs, {
7449
+ items: j,
7450
+ isLoading: re,
7451
+ error: ae,
7452
+ isMarkingAll: se,
7453
+ onBack: w,
7454
+ onItemClick: (e) => {
7455
+ w(), We(e);
7456
+ },
7457
+ onMarkAllRead: Ge
7458
+ })
7459
+ }) : null,
7460
+ S === "privacy" ? /* @__PURE__ */ Q(Hs, {
7461
+ kind: "privacy",
7462
+ label: "Privacy and data",
7463
+ position: g,
7464
+ onClose: w,
7465
+ children: /* @__PURE__ */ Q(Ks, {
7466
+ identity: f,
7467
+ apiUrl: e,
7468
+ autoCapture: b && r?.enabled !== !1,
7469
+ autoCaptureLocked: r?.enabled === !1,
7470
+ isForgettingMe: pe.isPending,
7471
+ forgetMeError: pe.error,
7472
+ onForgetMe: Qe,
7473
+ onClose: w
7474
+ })
7475
+ }) : null,
7476
+ S === "shortcuts" ? /* @__PURE__ */ Q(Hs, {
7477
+ kind: "shortcuts",
7478
+ label: "Keyboard shortcuts",
7479
+ position: g,
7480
+ onClose: w,
7481
+ children: /* @__PURE__ */ Q(Js, { onClose: w })
7171
7482
  }) : null,
7172
- Ce.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(sc, { position: g }) : null,
7173
- Ye ? /* @__PURE__ */ Q(cc, { position: g }) : null,
7174
- Qe ? /* @__PURE__ */ Q(lc, { position: g }) : null
7483
+ Ce.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(hc, { position: g }) : null,
7484
+ Xe ? /* @__PURE__ */ Q(gc, { position: g }) : null,
7485
+ $e ? /* @__PURE__ */ Q(_c, { position: g }) : null
7175
7486
  ]
7176
7487
  });
7177
7488
  }
7178
- function sc({ position: e }) {
7179
- let { mod: t } = Co();
7489
+ function hc({ position: e }) {
7490
+ let { mod: t } = Oo();
7180
7491
  return /* @__PURE__ */ Q("div", {
7181
7492
  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"),
7182
7493
  role: "status",
@@ -7195,7 +7506,7 @@ function sc({ position: e }) {
7195
7506
  ]
7196
7507
  });
7197
7508
  }
7198
- function cc({ position: e }) {
7509
+ function gc({ position: e }) {
7199
7510
  return /* @__PURE__ */ Q("div", {
7200
7511
  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"),
7201
7512
  role: "status",
@@ -7203,7 +7514,7 @@ function cc({ position: e }) {
7203
7514
  children: "Forgotten on this site — your name and email were cleared."
7204
7515
  });
7205
7516
  }
7206
- function lc({ position: e }) {
7517
+ function _c({ position: e }) {
7207
7518
  return /* @__PURE__ */ Q("div", {
7208
7519
  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"),
7209
7520
  role: "status",
@@ -7213,48 +7524,48 @@ function lc({ position: e }) {
7213
7524
  }
7214
7525
  //#endregion
7215
7526
  //#region src/runtime/mount.tsx
7216
- function uc(e, t) {
7527
+ function vc(e, t) {
7217
7528
  e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Oe(e, t.theme ?? "auto");
7218
7529
  let n = Ne(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
7219
- i.textContent = me, r.appendChild(i);
7530
+ i.textContent = pe, r.appendChild(i);
7220
7531
  let a = document.createElement("div");
7221
- a.className = "markup-shadow-root", r.appendChild(a), Se({
7532
+ a.className = "markup-shadow-root", r.appendChild(a), xe({
7222
7533
  apiUrl: t.apiUrl,
7223
7534
  apiKey: t.apiKey,
7224
- widgetVersion: "1.16.0"
7535
+ widgetVersion: "1.17.0"
7225
7536
  });
7226
7537
  let { theme: o, ...s } = t;
7227
- return pe(/* @__PURE__ */ Q(j, {
7228
- onError: (e) => M(e, { context: "render" }),
7229
- children: /* @__PURE__ */ Q(oc, { ...s })
7538
+ return fe(/* @__PURE__ */ Q(me, {
7539
+ onError: (e) => N(e, { context: "render" }),
7540
+ children: /* @__PURE__ */ Q(mc, { ...s })
7230
7541
  }), a), () => {
7231
- n(), Se(null), pe(null, a);
7542
+ n(), xe(null), fe(null, a);
7232
7543
  };
7233
7544
  }
7234
7545
  //#endregion
7235
7546
  //#region src/widget.ts
7236
- var dc = null, fc = null, pc = null, mc = !1;
7237
- function hc(e) {
7547
+ var yc = null, bc = null, xc = null, Sc = !1;
7548
+ function Cc(e) {
7238
7549
  if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
7239
- e.fab != null && !mc && (mc = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major — the toolbar replaced the floating action button. Remove it from your config.")), gc();
7550
+ e.fab != null && !Sc && (Sc = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major — the toolbar replaced the floating action button. Remove it from your config.")), wc();
7240
7551
  let t = () => {
7241
- if (pc = null, !document.body) return;
7552
+ if (xc = null, !document.body) return;
7242
7553
  let t = document.createElement("div");
7243
- t.id = "markup-widget", document.body.appendChild(t), fc = t, dc = uc(t, e);
7554
+ t.id = "markup-widget", document.body.appendChild(t), bc = t, yc = vc(t, e);
7244
7555
  };
7245
7556
  if (document.readyState === "loading" || !document.body) {
7246
7557
  let e = () => t();
7247
- pc = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
7558
+ xc = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
7248
7559
  } else t();
7249
- return gc;
7560
+ return wc;
7250
7561
  }
7251
- function gc() {
7252
- pc &&= (pc(), null), dc &&= (dc(), null), fc?.parentNode && fc.parentNode.removeChild(fc), fc = null;
7562
+ function wc() {
7563
+ xc &&= (xc(), null), yc &&= (yc(), null), bc?.parentNode && bc.parentNode.removeChild(bc), bc = null;
7253
7564
  }
7254
7565
  if (typeof document < "u") {
7255
7566
  let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
7256
7567
  if (t && n) {
7257
- let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = () => hc({
7568
+ let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = () => Cc({
7258
7569
  apiUrl: t,
7259
7570
  apiKey: n,
7260
7571
  position: r,
@@ -7266,6 +7577,6 @@ if (typeof document < "u") {
7266
7577
  }
7267
7578
  }
7268
7579
  //#endregion
7269
- export { gc as destroy, hc as init };
7580
+ export { wc as destroy, Cc as init };
7270
7581
 
7271
7582
  //# sourceMappingURL=widget.js.map