@pixelmatters/markup 1.19.0 → 1.21.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), re(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, ae(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
48
+ o.__v = n.__v + 1, t.vnode && t.vnode(o), te(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, re(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
49
49
  }
50
50
  }
51
51
  function E(e) {
@@ -63,21 +63,21 @@ function O() {
63
63
  r.length = O.__r = 0;
64
64
  }
65
65
  }
66
- function ee(e, t, n, r, i, a, o, s, c, l, u) {
66
+ function k(e, t, n, r, i, a, o, s, c, l, u) {
67
67
  var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
68
- for (c = k(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 = re(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && ce(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 = A(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
68
+ for (c = A(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = te(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && oe(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = j(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
69
69
  return n.__e = _, c;
70
70
  }
71
- function k(e, t, n, r, i) {
71
+ function A(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 = j(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)), le(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 = M(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
74
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), se(s, s));
75
75
  return r;
76
76
  }
77
- function A(e, t, n, r) {
77
+ function j(e, t, n, r) {
78
78
  var i, a;
79
79
  if (typeof e.type == "function") {
80
- for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t = A(i[a], t, n, r));
80
+ for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t = j(i[a], t, n, r));
81
81
  return t;
82
82
  }
83
83
  e.__e != t && (r && (t && e.type && !t.parentNode && (t = w(e)), n.insertBefore(e.__e, t || null)), t = e.__e);
@@ -86,7 +86,7 @@ function A(e, t, n, r) {
86
86
  while (t != null && t.nodeType == 8);
87
87
  return t;
88
88
  }
89
- function j(e, t, n, r) {
89
+ function M(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);
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 j(e, t, n, r) {
94
94
  }
95
95
  return -1;
96
96
  }
97
- function te(e, t, n) {
97
+ function N(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 M(e, t, n, r, i) {
100
+ function P(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 || te(e.style, t, "");
105
- if (n) for (t in n) r && n[t] == r[t] || te(e.style, t, n[t]);
104
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || N(e.style, t, "");
105
+ if (n) for (t in n) r && n[t] == r[t] || N(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 M(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 ne(e) {
117
+ function ee(e) {
118
118
  return function(n) {
119
119
  if (this.l) {
120
120
  var r = this.l[n.type + e];
@@ -124,16 +124,16 @@ function ne(e) {
124
124
  }
125
125
  };
126
126
  }
127
- function re(e, n, r, i, a, o, s, c, l, u) {
128
- var d, f, p, m, g, b, x, w, T, E, D, O, k, A, j, te, M = n.type;
127
+ function te(e, n, r, i, a, o, s, c, l, u) {
128
+ var d, f, p, m, g, b, x, w, T, E, D, O, A, j, M, N, P = 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 M == "function") {
131
+ n: if (typeof P == "function") {
132
132
  f = s.length;
133
133
  try {
134
- if (T = n.props, E = M.prototype && M.prototype.render, D = (d = M.contextType) && i[d.__c], O = d ? D ? D.props.value : d.__ : i, r.__c ? w = (p = n.__c = r.__c).__ = p.__E : (E ? n.__c = p = new M(T, O) : (n.__c = p = new C(T, O), p.constructor = M, p.render = ue), D && D.sub(p), p.state || (p.state = {}), p.__n = i, m = p.__d = !0, p.__h = [], p._sb = []), E && p.__s == null && (p.__s = p.state), E && M.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = v({}, p.__s)), v(p.__s, M.getDerivedStateFromProps(T, p.__s))), g = p.props, b = p.state, p.__v = n, m) E && M.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), E && p.componentDidMount != null && p.__h.push(p.componentDidMount);
134
+ if (T = n.props, E = P.prototype && P.prototype.render, D = (d = P.contextType) && i[d.__c], O = d ? D ? D.props.value : d.__ : i, r.__c ? w = (p = n.__c = r.__c).__ = p.__E : (E ? n.__c = p = new P(T, O) : (n.__c = p = new C(T, O), p.constructor = P, p.render = ce), D && D.sub(p), p.state || (p.state = {}), p.__n = i, m = p.__d = !0, p.__h = [], p._sb = []), E && p.__s == null && (p.__s = p.state), E && P.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = v({}, p.__s)), v(p.__s, P.getDerivedStateFromProps(T, p.__s))), g = p.props, b = p.state, p.__v = n, m) E && P.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), E && p.componentDidMount != null && p.__h.push(p.componentDidMount);
135
135
  else {
136
- if (E && M.getDerivedStateFromProps == null && T !== g && p.componentWillReceiveProps != null && p.componentWillReceiveProps(T, O), n.__v == r.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(T, p.__s, O)) {
136
+ if (E && P.getDerivedStateFromProps == null && T !== g && p.componentWillReceiveProps != null && p.componentWillReceiveProps(T, O), n.__v == r.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(T, p.__s, O)) {
137
137
  n.__v != r.__v && (p.props = T, p.state = p.__s, p.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
138
138
  e && (e.__ = n);
139
139
  }), h.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && s.push(p);
@@ -143,28 +143,28 @@ function re(e, n, r, i, a, o, s, c, l, u) {
143
143
  p.componentDidUpdate(g, b, x);
144
144
  });
145
145
  }
146
- if (p.context = O, p.props = T, p.__P = e, p.__e = !1, k = t.__r, A = 0, E) p.state = p.__s, p.__d = !1, k && k(n), d = p.render(p.props, p.state, p.context), h.push.apply(p.__h, p._sb), p._sb = [];
146
+ if (p.context = O, p.props = T, p.__P = e, p.__e = !1, A = t.__r, j = 0, E) p.state = p.__s, p.__d = !1, A && A(n), d = p.render(p.props, p.state, p.context), h.push.apply(p.__h, p._sb), p._sb = [];
147
147
  else do
148
- p.__d = !1, k && k(n), d = p.render(p.props, p.state, p.context), p.state = p.__s;
149
- while (p.__d && ++A < 25);
150
- p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), E && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), j = d != null && d.type === S && d.key == null ? oe(d.props.children) : d, c = ee(e, _(j) ? j : [j], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), w && (p.__E = p.__ = null);
148
+ p.__d = !1, A && A(n), d = p.render(p.props, p.state, p.context), p.state = p.__s;
149
+ while (p.__d && ++j < 25);
150
+ p.state = p.__s, p.getChildContext != null && (i = v(v({}, i), p.getChildContext())), E && !m && p.getSnapshotBeforeUpdate != null && (x = p.getSnapshotBeforeUpdate(g, b)), M = d != null && d.type === S && d.key == null ? ie(d.props.children) : d, c = k(e, _(M) ? M : [M], n, r, i, a, o, s, c, l, u), p.base = n.__e, n.__u &= -161, p.__h.length && s.push(p), w && (p.__E = p.__ = null);
151
151
  } catch (e) {
152
152
  if (s.length = f, n.__v = null, l || o != null) {
153
153
  if (e.then) {
154
154
  for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
155
155
  o != null && (o[o.indexOf(c)] = null), n.__e = c;
156
- } else if (o != null) for (te = o.length; te--;) y(o[te]);
156
+ } else if (o != null) for (N = o.length; N--;) y(o[N]);
157
157
  } else n.__e = r.__e;
158
- n.__k ??= r.__k || [], e.then || ie(n), t.__e(e, n, r);
158
+ n.__k ??= r.__k || [], e.then || ne(n), 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 = se(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 = ae(r.__e, n, r, i, a, o, s, l, u);
161
161
  return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
162
162
  }
163
- function ie(e) {
164
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ie));
163
+ function ne(e) {
164
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ne));
165
165
  }
166
- function ae(e, n, r) {
167
- for (var i = 0; i < r.length; i++) ce(r[i], r[++i], r[++i]);
166
+ function re(e, n, r) {
167
+ for (var i = 0; i < r.length; i++) oe(r[i], r[++i], r[++i]);
168
168
  t.__c && t.__c(n, e), e.some(function(n) {
169
169
  try {
170
170
  e = n.__h, n.__h = [], e.some(function(e) {
@@ -175,10 +175,10 @@ function ae(e, n, r) {
175
175
  }
176
176
  });
177
177
  }
178
- function oe(e) {
179
- return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(oe) : e.constructor === void 0 ? v({}, e) : null;
178
+ function ie(e) {
179
+ return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ie) : e.constructor === void 0 ? v({}, e) : null;
180
180
  }
181
- function se(n, r, i, a, o, s, c, l, u) {
181
+ function ae(n, r, i, a, o, s, c, l, u) {
182
182
  var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
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 se(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 = C == "textarea" && S.defaultValue != null ? null : 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 || M(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 || M(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 || P(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 || P(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
- 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 && C != "textarea" || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && M(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && M(n, d, b, x[d], o));
199
+ else if (p && (n.innerHTML = ""), k(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 && C != "textarea" || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && P(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && P(n, d, b, x[d], o));
201
201
  }
202
202
  return n;
203
203
  }
204
- function ce(e, n, r) {
204
+ function oe(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 ce(e, n, r) {
211
211
  t.__e(e, r);
212
212
  }
213
213
  }
214
- function le(e, n, r) {
214
+ function se(e, n, r) {
215
215
  var i, a;
216
- if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || ce(i, null, n)), (i = e.__c) != null) {
216
+ if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || oe(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 le(e, n, r) {
221
221
  }
222
222
  i.base = i.__P = i.__n = null;
223
223
  }
224
- if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && le(i[a], n, r || typeof e.type != "function");
224
+ if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && se(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 ue(e, t, n) {
227
+ function ce(e, t, n) {
228
228
  return this.constructor(e, n);
229
229
  }
230
- function de(n, r, i) {
230
+ function le(n, r, i) {
231
231
  var a, o, s, c;
232
- r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], re(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), ae(s, n, c), n.props.children = null;
232
+ r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], te(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), re(s, n, c), n.props.children = null;
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,49 +245,49 @@ 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 = ne(!1), p = ne(!0);
248
+ }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = ee(!1), p = ee(!0);
249
249
  //#endregion
250
250
  //#region src/styles.css?inline
251
- var fe = ":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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:active{transform:scale(.97)}.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;transition:transform .15s cubic-bezier(.2,.7,.2,1),opacity .15s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:absolute;top:0;right:0}.markup-tb-badge[data-unread=false]{opacity:0;transform:scale(.5)}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-icon-btn:active{transform:scale(.97)}.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.is-new{animation:.2s cubic-bezier(.2,.7,.2,1) markup-comment-in}@keyframes markup-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn:active:not(:disabled){transform:scale(.97)}.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-btn-danger{color:var(--markup-danger)}.markup-btn-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-discard-confirm{background:color-mix(in srgb, var(--markup-paper) 92%, transparent);-webkit-backdrop-filter:blur(6px);flex-direction:column;justify-content:center;gap:4px;padding:16px;animation:.12s ease-out markup-menu-in;display:flex;position:absolute;inset:0}.markup-discard-confirm-title{color:var(--markup-ink);margin:0;font-size:13px;font-weight:600}.markup-discard-confirm-desc{color:var(--markup-muted);margin:0;font-size:12px}.markup-discard-confirm-actions{gap:6px;margin-top:10px;display:flex}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;flex-direction:column;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-row.is-attached{border-style:solid;border-color:var(--markup-border);padding:8px}.markup-screenshot-row-head{justify-content:space-between;align-items:center;gap:8px;min-height:16px;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;object-position:top;border-radius:3px;width:auto;height:22px;margin:-4px 0 -4px 4px;display:block}.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);white-space:nowrap;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{flex-direction:column;gap:2px;display:flex}.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:0;font-size:10px;line-height:1.5}.markup-screenshot-help-link{color:var(--markup-ink);text-underline-offset:2px;text-decoration:underline}.markup-screenshot-help-link:hover{color:var(--markup-brand)}.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-tb-btn,.markup-tb-badge,.markup-comment,.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}", pe = 1e4, N = 20, me = 60, he = null, ge = [], P = null, _e = !1, ve = ye();
252
- function ye() {
251
+ var ue = ":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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:relative}.markup-tb-btn:hover{background:var(--markup-hover);color:var(--markup-ink)}.markup-tb-btn:active{transform:scale(.97)}.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;transition:transform .15s cubic-bezier(.2,.7,.2,1),opacity .15s cubic-bezier(.2,.7,.2,1);display:inline-flex;position:absolute;top:0;right:0}.markup-tb-badge[data-unread=false]{opacity:0;transform:scale(.5)}.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.is-closed,.markup-pin.is-closed.is-active{background:var(--markup-paper);color:var(--markup-muted);border-color:var(--markup-muted);box-shadow:0 4px 14px -4px #00000040}.markup-pin.is-closed:hover{background:var(--markup-paper);color:var(--markup-ink)}.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);pointer-events:none;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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-icon-btn:active{transform:scale(.97)}.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.is-new{animation:.2s cubic-bezier(.2,.7,.2,1) markup-comment-in}@keyframes markup-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.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,transform .12s cubic-bezier(.2,.7,.2,1);display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn:active:not(:disabled){transform:scale(.97)}.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-btn-danger{color:var(--markup-danger)}.markup-btn-danger:hover:not(:disabled){background:color-mix(in srgb, var(--markup-danger) 10%, transparent)}.markup-discard-confirm{background:color-mix(in srgb, var(--markup-paper) 92%, transparent);-webkit-backdrop-filter:blur(6px);flex-direction:column;justify-content:center;gap:4px;padding:16px;animation:.12s ease-out markup-menu-in;display:flex;position:absolute;inset:0}.markup-discard-confirm-title{color:var(--markup-ink);margin:0;font-size:13px;font-weight:600}.markup-discard-confirm-desc{color:var(--markup-muted);margin:0;font-size:12px}.markup-discard-confirm-actions{gap:6px;margin-top:10px;display:flex}.markup-screenshot-row{border:1px dashed var(--markup-border-strong);color:var(--markup-muted);border-radius:6px;flex-direction:column;gap:8px;margin-top:0;padding:6px 8px;font-size:11.5px;display:flex}.markup-screenshot-row.is-attached{border-style:solid;border-color:var(--markup-border);padding:8px}.markup-screenshot-row-head{justify-content:space-between;align-items:center;gap:8px;min-height:16px;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-link{border:1px solid var(--markup-border-strong);cursor:zoom-in;background:0 0;border-radius:3px;margin:-4px auto -4px -4px;padding:0;transition:border-color .12s;display:block;overflow:hidden}.markup-screenshot-thumb-link:hover,.markup-screenshot-thumb-link:focus-visible{border-color:var(--markup-brand)}.markup-screenshot-thumb{object-fit:cover;object-position:top;width:auto;height:22px;display:block}.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);white-space:nowrap;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{flex-direction:column;gap:2px;display:flex}.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:0;font-size:10px;line-height:1.5}.markup-screenshot-help-link{color:var(--markup-ink);text-underline-offset:2px;text-decoration:underline}.markup-screenshot-help-link:hover{color:var(--markup-brand)}.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-tb-btn,.markup-tb-badge,.markup-comment,.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}", de = 1e4, fe = 20, pe = 60, F = null, I = [], me = null, he = !1, ge = _e();
252
+ function _e() {
253
253
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `s-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
254
254
  }
255
- function be(e) {
256
- if (he = e, !e) {
257
- ge = [], P &&= (clearTimeout(P), null);
255
+ function ve(e) {
256
+ if (F = e, !e) {
257
+ I = [], me &&= (clearTimeout(me), null);
258
258
  return;
259
259
  }
260
- Se();
260
+ xe();
261
261
  }
262
- function F(e, t) {
263
- if (he && !(ge.length >= me)) {
264
- if (ge.push({
262
+ function ye(e, t) {
263
+ if (F && !(I.length >= pe)) {
264
+ if (I.push({
265
265
  name: e,
266
266
  properties: t,
267
267
  timestamp: Date.now()
268
- }), ge.length >= N) {
269
- xe();
268
+ }), I.length >= fe) {
269
+ be();
270
270
  return;
271
271
  }
272
- P ||= setTimeout(() => {
273
- P = null, xe();
274
- }, pe);
272
+ me ||= setTimeout(() => {
273
+ me = null, be();
274
+ }, de);
275
275
  }
276
276
  }
277
- async function xe() {
278
- if (!he || ge.length === 0) return;
279
- let e = ge.splice(0, N);
280
- P &&= (clearTimeout(P), null);
277
+ async function be() {
278
+ if (!F || I.length === 0) return;
279
+ let e = I.splice(0, fe);
280
+ me &&= (clearTimeout(me), null);
281
281
  try {
282
- await fetch(`${he.apiUrl.replace(/\/+$/, "")}/widget/events`, {
282
+ await fetch(`${F.apiUrl.replace(/\/+$/, "")}/widget/events`, {
283
283
  method: "POST",
284
284
  headers: {
285
285
  "content-type": "application/json",
286
- "x-markup-api-key": he.apiKey
286
+ "x-markup-api-key": F.apiKey
287
287
  },
288
288
  body: JSON.stringify({
289
- sessionId: ve,
290
- widgetVersion: he.widgetVersion,
289
+ sessionId: ge,
290
+ widgetVersion: F.widgetVersion,
291
291
  events: e.map((e) => ({
292
292
  name: e.name,
293
293
  properties: e.properties,
@@ -297,21 +297,21 @@ async function xe() {
297
297
  keepalive: !0
298
298
  });
299
299
  } catch {}
300
- he && ge.length > 0 && !P && (P = setTimeout(() => {
301
- P = null, xe();
302
- }, pe));
303
- }
304
- function Se() {
305
- if (_e || typeof window > "u") return;
306
- _e = !0;
307
- let e = () => void xe();
300
+ F && I.length > 0 && !me && (me = setTimeout(() => {
301
+ me = null, be();
302
+ }, de));
303
+ }
304
+ function xe() {
305
+ if (he || typeof window > "u") return;
306
+ he = !0;
307
+ let e = () => void be();
308
308
  window.addEventListener("pagehide", e), document.addEventListener("visibilitychange", () => {
309
309
  document.visibilityState === "hidden" && e();
310
310
  });
311
311
  }
312
312
  //#endregion
313
313
  //#region src/runtime/error-boundary.tsx
314
- var Ce = class extends C {
314
+ var Se = class extends C {
315
315
  state = { hasError: !1 };
316
316
  static getDerivedStateFromError() {
317
317
  return { hasError: !0 };
@@ -324,12 +324,12 @@ var Ce = class extends C {
324
324
  render() {
325
325
  return this.state.hasError ? null : this.props.children;
326
326
  }
327
- }, we = 1e3;
328
- function Te(e) {
327
+ }, Ce = 1e3;
328
+ function we(e) {
329
329
  let t = !1, n = 0;
330
330
  return (r) => {
331
331
  let i = Date.now();
332
- t || i - n < we || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
332
+ t || i - n < Ce || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
333
333
  method: "POST",
334
334
  headers: {
335
335
  "content-type": "application/json",
@@ -345,97 +345,97 @@ function Te(e) {
345
345
  }));
346
346
  };
347
347
  }
348
- function Ee() {
348
+ function Te() {
349
349
  return typeof window < "u" ? window.location.href : void 0;
350
350
  }
351
- function De() {
351
+ function Ee() {
352
352
  return typeof navigator < "u" ? navigator.userAgent : void 0;
353
353
  }
354
- var Oe = /* @__PURE__ */ new WeakMap();
355
- function ke(e, t, n) {
356
- let r = Oe.get(e);
357
- r || (r = Te(e), Oe.set(e, r));
354
+ var De = /* @__PURE__ */ new WeakMap();
355
+ function Oe(e, t, n) {
356
+ let r = De.get(e);
357
+ r || (r = we(e), De.set(e, r));
358
358
  let i = t instanceof Error ? t : Error(String(t));
359
359
  r({
360
360
  message: i.message,
361
361
  name: i.name,
362
362
  stack: i.stack,
363
- url: Ee(),
364
- userAgent: De(),
363
+ url: Te(),
364
+ userAgent: Ee(),
365
365
  context: n?.context
366
366
  });
367
367
  }
368
- var Ae = null;
369
- function je(e) {
370
- Ae = e;
368
+ var ke = null;
369
+ function Ae(e) {
370
+ ke = e;
371
371
  }
372
- function I(e, t) {
373
- Ae && ke(Ae, e, t);
372
+ function L(e, t) {
373
+ ke && Oe(ke, e, t);
374
374
  }
375
375
  //#endregion
376
376
  //#region src/runtime/theme-store.ts
377
- var Me = "markup:widget:theme", Ne = null, L = Ie() ?? "auto", Pe = Ie() != null, Fe = /* @__PURE__ */ new Set();
378
- function Ie() {
377
+ var je = "markup:widget:theme", Me = null, R = Fe() ?? "auto", Ne = Fe() != null, Pe = /* @__PURE__ */ new Set();
378
+ function Fe() {
379
379
  try {
380
- let e = localStorage.getItem(Me);
380
+ let e = localStorage.getItem(je);
381
381
  if (e === "light" || e === "dark" || e === "auto") return e;
382
382
  } catch {}
383
383
  return null;
384
384
  }
385
- function Le() {
386
- Ne && (L === "auto" ? delete Ne.dataset.theme : Ne.dataset.theme = L);
385
+ function Ie() {
386
+ Me && (R === "auto" ? delete Me.dataset.theme : Me.dataset.theme = R);
387
387
  }
388
- function Re(e, t) {
389
- Ne = e, !Pe && t && (L = t), Le();
388
+ function Le(e, t) {
389
+ Me = e, !Ne && t && (R = t), Ie();
390
390
  }
391
- function ze() {
392
- return L;
391
+ function Re() {
392
+ return R;
393
393
  }
394
- function Be() {
395
- return L === "dark" ? "dark" : L === "light" ? "light" : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
394
+ function ze() {
395
+ return R === "dark" ? "dark" : R === "light" ? "light" : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
396
396
  }
397
- function Ve(e) {
398
- if (e !== L) {
399
- L = e, Pe = !0;
397
+ function Be(e) {
398
+ if (e !== R) {
399
+ R = e, Ne = !0;
400
400
  try {
401
- localStorage.setItem(Me, e);
401
+ localStorage.setItem(je, e);
402
402
  } catch {}
403
- Le();
404
- for (let e of Fe) e(L);
403
+ Ie();
404
+ for (let e of Pe) e(R);
405
405
  }
406
406
  }
407
- function He(e) {
408
- return Fe.add(e), () => {
409
- Fe.delete(e);
407
+ function Ve(e) {
408
+ return Pe.add(e), () => {
409
+ Pe.delete(e);
410
410
  };
411
411
  }
412
- function Ue() {
412
+ function He() {
413
413
  if (typeof window > "u" || !window.matchMedia) return () => {};
414
414
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => {
415
- if (L === "auto") for (let e of Fe) e(L);
415
+ if (R === "auto") for (let e of Pe) e(R);
416
416
  };
417
417
  return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
418
418
  }
419
419
  //#endregion
420
420
  //#region ../../node_modules/.pnpm/preact@10.29.7/node_modules/preact/hooks/dist/hooks.module.js
421
- var We, R, Ge, Ke, qe = 0, Je = [], z = t, Ye = z.__b, Xe = z.__r, Ze = z.diffed, Qe = z.__c, $e = z.unmount, et = z.__;
422
- function tt(e, t) {
423
- z.__h && z.__h(R, e, qe || t), qe = 0;
424
- var n = R.__H || (R.__H = {
421
+ var Ue, z, We, Ge, Ke = 0, qe = [], B = t, Je = B.__b, Ye = B.__r, Xe = B.diffed, Ze = B.__c, Qe = B.unmount, $e = B.__;
422
+ function et(e, t) {
423
+ B.__h && B.__h(z, e, Ke || t), Ke = 0;
424
+ var n = z.__H || (z.__H = {
425
425
  __: [],
426
426
  __h: []
427
427
  });
428
428
  return e >= n.__.length && n.__.push({}), n.__[e];
429
429
  }
430
- function B(e) {
431
- return qe = 1, nt(dt, e);
430
+ function V(e) {
431
+ return Ke = 1, tt(ut, e);
432
432
  }
433
- function nt(e, t, n) {
434
- var r = tt(We++, 2);
435
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : dt(void 0, t), function(e) {
433
+ function tt(e, t, n) {
434
+ var r = et(Ue++, 2);
435
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ut(void 0, t), function(e) {
436
436
  var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
437
437
  t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
438
- }], r.__c = R, !R.__f)) {
438
+ }], r.__c = z, !z.__f)) {
439
439
  var i = function(e, t, n) {
440
440
  if (!r.__c.__H) return !0;
441
441
  var i = !1, o = r.__c.props !== e;
@@ -451,115 +451,115 @@ function nt(e, t, n) {
451
451
  }
452
452
  return !i || o;
453
453
  };
454
- R.__f = !0;
455
- var a = R.shouldComponentUpdate, o = R.componentWillUpdate;
456
- R.componentWillUpdate = function(e, t, n) {
454
+ z.__f = !0;
455
+ var a = z.shouldComponentUpdate, o = z.componentWillUpdate;
456
+ z.componentWillUpdate = function(e, t, n) {
457
457
  if (this.__e) {
458
458
  var r = a;
459
459
  a = void 0, i(e, t, n), a = r;
460
460
  }
461
461
  o && o.call(this, e, t, n);
462
- }, R.shouldComponentUpdate = i;
462
+ }, z.shouldComponentUpdate = i;
463
463
  }
464
464
  return r.__N || r.__;
465
465
  }
466
- function V(e, t) {
467
- var n = tt(We++, 3);
468
- !z.__s && ut(n.__H, t) && (n.__ = e, n.u = t, R.__H.__h.push(n));
466
+ function H(e, t) {
467
+ var n = et(Ue++, 3);
468
+ !B.__s && lt(n.__H, t) && (n.__ = e, n.u = t, z.__H.__h.push(n));
469
469
  }
470
- function rt(e, t) {
471
- var n = tt(We++, 4);
472
- !z.__s && ut(n.__H, t) && (n.__ = e, n.u = t, R.__h.push(n));
470
+ function nt(e, t) {
471
+ var n = et(Ue++, 4);
472
+ !B.__s && lt(n.__H, t) && (n.__ = e, n.u = t, z.__h.push(n));
473
473
  }
474
- function H(e) {
475
- return qe = 5, it(function() {
474
+ function U(e) {
475
+ return Ke = 5, rt(function() {
476
476
  return { current: e };
477
477
  }, []);
478
478
  }
479
- function it(e, t) {
480
- var n = tt(We++, 7);
481
- return ut(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
479
+ function rt(e, t) {
480
+ var n = et(Ue++, 7);
481
+ return lt(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
482
482
  }
483
- function U(e, t) {
484
- return qe = 8, it(function() {
483
+ function W(e, t) {
484
+ return Ke = 8, rt(function() {
485
485
  return e;
486
486
  }, t);
487
487
  }
488
- function at() {
489
- for (var e; e = Je.shift();) {
488
+ function it() {
489
+ for (var e; e = qe.shift();) {
490
490
  var t = e.__H;
491
491
  if (e.__P && t) try {
492
- t.__h.some(ct), t.__h.some(lt), t.__h = [];
492
+ t.__h.some(st), t.__h.some(ct), t.__h = [];
493
493
  } catch (n) {
494
- t.__h = [], z.__e(n, e.__v);
494
+ t.__h = [], B.__e(n, e.__v);
495
495
  }
496
496
  }
497
497
  }
498
- z.__b = function(e) {
499
- R = null, Ye && Ye(e);
500
- }, z.__ = function(e, t) {
501
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), et && et(e, t);
502
- }, z.__r = function(e) {
503
- Xe && Xe(e), We = 0;
504
- var t = (R = e.__c).__H;
505
- t && (Ge === R ? (t.__h = [], R.__h = [], t.__.some(function(e) {
498
+ B.__b = function(e) {
499
+ z = null, Je && Je(e);
500
+ }, B.__ = function(e, t) {
501
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), $e && $e(e, t);
502
+ }, B.__r = function(e) {
503
+ Ye && Ye(e), Ue = 0;
504
+ var t = (z = e.__c).__H;
505
+ t && (We === z ? (t.__h = [], z.__h = [], t.__.some(function(e) {
506
506
  e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
507
- })) : (t.__h.some(ct), t.__h.some(lt), t.__h = [], We = 0)), Ge = R;
508
- }, z.diffed = function(e) {
509
- Ze && Ze(e);
507
+ })) : (t.__h.some(st), t.__h.some(ct), t.__h = [], Ue = 0)), We = z;
508
+ }, B.diffed = function(e) {
509
+ Xe && Xe(e);
510
510
  var t = e.__c;
511
- t && t.__H && (t.__H.__h.length && (Je.push(t) !== 1 && Ke === z.requestAnimationFrame || ((Ke = z.requestAnimationFrame) || st)(at)), t.__H.__.some(function(e) {
511
+ t && t.__H && (t.__H.__h.length && (qe.push(t) !== 1 && Ge === B.requestAnimationFrame || ((Ge = B.requestAnimationFrame) || ot)(it)), t.__H.__.some(function(e) {
512
512
  e.u &&= (e.__H = e.u, void 0);
513
- })), Ge = R = null;
514
- }, z.__c = function(e, t) {
513
+ })), We = z = null;
514
+ }, B.__c = function(e, t) {
515
515
  t.some(function(e) {
516
516
  try {
517
- e.__h.some(ct), e.__h = e.__h.filter(function(e) {
518
- return !e.__ || lt(e);
517
+ e.__h.some(st), e.__h = e.__h.filter(function(e) {
518
+ return !e.__ || ct(e);
519
519
  });
520
520
  } catch (n) {
521
521
  t.some(function(e) {
522
522
  e.__h &&= [];
523
- }), t = [], z.__e(n, e.__v);
523
+ }), t = [], B.__e(n, e.__v);
524
524
  }
525
- }), Qe && Qe(e, t);
526
- }, z.unmount = function(e) {
527
- $e && $e(e);
525
+ }), Ze && Ze(e, t);
526
+ }, B.unmount = function(e) {
527
+ Qe && Qe(e);
528
528
  var t, n = e.__c;
529
529
  n && n.__H && (n.__H.__.some(function(e) {
530
530
  try {
531
- ct(e);
531
+ st(e);
532
532
  } catch (e) {
533
533
  t = e;
534
534
  }
535
- }), n.__H = void 0, t && z.__e(t, n.__v));
535
+ }), n.__H = void 0, t && B.__e(t, n.__v));
536
536
  };
537
- var ot = typeof requestAnimationFrame == "function";
538
- function st(e) {
537
+ var at = typeof requestAnimationFrame == "function";
538
+ function ot(e) {
539
539
  var t, n = function() {
540
- clearTimeout(r), ot && cancelAnimationFrame(t), setTimeout(e);
540
+ clearTimeout(r), at && cancelAnimationFrame(t), setTimeout(e);
541
541
  }, r = setTimeout(n, 35);
542
- ot && (t = requestAnimationFrame(n));
542
+ at && (t = requestAnimationFrame(n));
543
543
  }
544
- function ct(e) {
545
- var t = R, n = e.__c;
546
- typeof n == "function" && (e.__c = void 0, n()), R = t;
544
+ function st(e) {
545
+ var t = z, n = e.__c;
546
+ typeof n == "function" && (e.__c = void 0, n()), z = t;
547
547
  }
548
- function lt(e) {
549
- var t = R;
550
- e.__c = e.__(), R = t;
548
+ function ct(e) {
549
+ var t = z;
550
+ e.__c = e.__(), z = t;
551
551
  }
552
- function ut(e, t) {
552
+ function lt(e, t) {
553
553
  return !e || e.length !== t.length || t.some(function(t, n) {
554
554
  return t !== e[n];
555
555
  });
556
556
  }
557
- function dt(e, t) {
557
+ function ut(e, t) {
558
558
  return typeof t == "function" ? t(e) : t;
559
559
  }
560
- for (var ft = "1.38.0", pt = [], W = [], mt = Uint8Array, ht = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", gt = 0, _t = ht.length; gt < _t; ++gt) pt[gt] = ht[gt], W[ht.charCodeAt(gt)] = gt;
561
- W[45] = 62, W[95] = 63;
562
- function vt(e) {
560
+ for (var dt = "1.38.0", ft = [], G = [], pt = Uint8Array, mt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ht = 0, gt = mt.length; ht < gt; ++ht) ft[ht] = mt[ht], G[mt.charCodeAt(ht)] = ht;
561
+ G[45] = 62, G[95] = 63;
562
+ function _t(e) {
563
563
  var t = e.length;
564
564
  if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
565
565
  var n = e.indexOf("=");
@@ -567,33 +567,33 @@ function vt(e) {
567
567
  var r = n === t ? 0 : 4 - n % 4;
568
568
  return [n, r];
569
569
  }
570
- function yt(e, t, n) {
570
+ function vt(e, t, n) {
571
571
  return (t + n) * 3 / 4 - n;
572
572
  }
573
- function bt(e) {
574
- var t, n = vt(e), r = n[0], i = n[1], a = new mt(yt(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
575
- for (c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
576
- return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
573
+ function yt(e) {
574
+ var t, n = _t(e), r = n[0], i = n[1], a = new pt(vt(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
575
+ for (c = 0; c < s; c += 4) t = G[e.charCodeAt(c)] << 18 | G[e.charCodeAt(c + 1)] << 12 | G[e.charCodeAt(c + 2)] << 6 | G[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
576
+ return i === 2 && (t = G[e.charCodeAt(c)] << 2 | G[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = G[e.charCodeAt(c)] << 10 | G[e.charCodeAt(c + 1)] << 4 | G[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
577
577
  }
578
- function xt(e) {
579
- return pt[e >> 18 & 63] + pt[e >> 12 & 63] + pt[e >> 6 & 63] + pt[e & 63];
578
+ function bt(e) {
579
+ return ft[e >> 18 & 63] + ft[e >> 12 & 63] + ft[e >> 6 & 63] + ft[e & 63];
580
580
  }
581
- function St(e, t, n) {
582
- for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(xt(r));
581
+ function xt(e, t, n) {
582
+ for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(bt(r));
583
583
  return i.join("");
584
584
  }
585
- function Ct(e) {
586
- for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(St(e, o, o + a > s ? s : o + a));
587
- return r === 1 ? (t = e[n - 1], i.push(pt[t >> 2] + pt[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(pt[t >> 10] + pt[t >> 4 & 63] + pt[t << 2 & 63] + "=")), i.join("");
585
+ function St(e) {
586
+ for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(xt(e, o, o + a > s ? s : o + a));
587
+ return r === 1 ? (t = e[n - 1], i.push(ft[t >> 2] + ft[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(ft[t >> 10] + ft[t >> 4 & 63] + ft[t << 2 & 63] + "=")), i.join("");
588
588
  }
589
589
  //#endregion
590
590
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/common/index.js
591
- function wt(e) {
591
+ function Ct(e) {
592
592
  if (e === void 0) return {};
593
- if (!Et(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
593
+ if (!Tt(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
594
594
  return e;
595
595
  }
596
- function Tt(e) {
596
+ function wt(e) {
597
597
  if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
598
598
  if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
599
599
  if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
@@ -604,146 +604,146 @@ function Tt(e) {
604
604
  }
605
605
  if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
606
606
  }
607
- function Et(e) {
607
+ function Tt(e) {
608
608
  let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
609
609
  return t && r;
610
610
  }
611
611
  //#endregion
612
612
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/values/value.js
613
- var Dt = !0, Ot = BigInt("-9223372036854775808"), kt = BigInt("9223372036854775807"), At = BigInt("0"), jt = BigInt("8"), Mt = BigInt("256");
614
- function Nt(e) {
613
+ var Et = !0, Dt = BigInt("-9223372036854775808"), Ot = BigInt("9223372036854775807"), kt = BigInt("0"), At = BigInt("8"), jt = BigInt("256");
614
+ function Mt(e) {
615
615
  return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
616
616
  }
617
- function Pt(e) {
618
- e < At && (e -= Ot + Ot);
617
+ function Nt(e) {
618
+ e < kt && (e -= Dt + Dt);
619
619
  let t = e.toString(16);
620
620
  t.length % 2 == 1 && (t = "0" + t);
621
621
  let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
622
- for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= jt;
623
- return Ct(n);
622
+ for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= At;
623
+ return St(n);
624
624
  }
625
- function Ft(e) {
626
- let t = bt(e);
625
+ function Pt(e) {
626
+ let t = yt(e);
627
627
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
628
- let n = At, r = At;
629
- for (let e of t) n += BigInt(e) * Mt ** r, r++;
630
- return n > kt && (n += Ot + Ot), n;
628
+ let n = kt, r = kt;
629
+ for (let e of t) n += BigInt(e) * jt ** r, r++;
630
+ return n > Ot && (n += Dt + Dt), n;
631
631
  }
632
- function It(e) {
633
- if (e < Ot || kt < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
632
+ function Ft(e) {
633
+ if (e < Dt || Ot < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
634
634
  let t = /* @__PURE__ */ new ArrayBuffer(8);
635
- return new DataView(t).setBigInt64(0, e, !0), Ct(new Uint8Array(t));
635
+ return new DataView(t).setBigInt64(0, e, !0), St(new Uint8Array(t));
636
636
  }
637
- function Lt(e) {
638
- let t = bt(e);
637
+ function It(e) {
638
+ let t = yt(e);
639
639
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
640
640
  return new DataView(t.buffer).getBigInt64(0, !0);
641
641
  }
642
- var Rt = DataView.prototype.setBigInt64 ? It : Pt, zt = DataView.prototype.getBigInt64 ? Lt : Ft, Bt = 1024;
643
- function Vt(e) {
644
- if (e.length > Bt) throw Error(`Field name ${e} exceeds maximum field name length ${Bt}.`);
642
+ var Lt = DataView.prototype.setBigInt64 ? Ft : Nt, Rt = DataView.prototype.getBigInt64 ? It : Pt, zt = 1024;
643
+ function Bt(e) {
644
+ if (e.length > zt) throw Error(`Field name ${e} exceeds maximum field name length ${zt}.`);
645
645
  if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
646
646
  for (let t = 0; t < e.length; t += 1) {
647
647
  let n = e.charCodeAt(t);
648
648
  if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
649
649
  }
650
650
  }
651
- function Ht(e) {
651
+ function Vt(e) {
652
652
  if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
653
- if (Array.isArray(e)) return e.map((e) => Ht(e));
653
+ if (Array.isArray(e)) return e.map((e) => Vt(e));
654
654
  if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
655
655
  let t = Object.entries(e);
656
656
  if (t.length === 1) {
657
657
  let n = t[0][0];
658
658
  if (n === "$bytes") {
659
659
  if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
660
- return bt(e.$bytes).buffer;
660
+ return yt(e.$bytes).buffer;
661
661
  }
662
662
  if (n === "$integer") {
663
663
  if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
664
- return zt(e.$integer);
664
+ return Rt(e.$integer);
665
665
  }
666
666
  if (n === "$float") {
667
667
  if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
668
- let t = bt(e.$float);
668
+ let t = yt(e.$float);
669
669
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
670
- let n = new DataView(t.buffer).getFloat64(0, Dt);
671
- if (!Nt(n)) throw Error(`Float ${n} should be encoded as a number`);
670
+ let n = new DataView(t.buffer).getFloat64(0, Et);
671
+ if (!Mt(n)) throw Error(`Float ${n} should be encoded as a number`);
672
672
  return n;
673
673
  }
674
674
  if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
675
675
  if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
676
676
  }
677
677
  let n = {};
678
- for (let [t, r] of Object.entries(e)) Vt(t), n[t] = Ht(r);
678
+ for (let [t, r] of Object.entries(e)) Bt(t), n[t] = Vt(r);
679
679
  return n;
680
680
  }
681
- var Ut = 16384;
682
- function Wt(e) {
681
+ var Ht = 16384;
682
+ function Ut(e) {
683
683
  let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
684
- if (t.length > Ut) {
684
+ if (t.length > Ht) {
685
685
  let e = 16370, n = t.codePointAt(e - 1);
686
686
  return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
687
687
  }
688
688
  return t;
689
689
  }
690
- function Gt(e, t, n, r) {
690
+ function Wt(e, t, n, r) {
691
691
  if (e === void 0) {
692
- let e = n && ` (present at path ${n} in original object ${Wt(t)})`;
692
+ let e = n && ` (present at path ${n} in original object ${Ut(t)})`;
693
693
  throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
694
694
  }
695
695
  if (e === null) return e;
696
696
  if (typeof e == "bigint") {
697
- if (e < Ot || kt < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
698
- return { $integer: Rt(e) };
697
+ if (e < Dt || Ot < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
698
+ return { $integer: Lt(e) };
699
699
  }
700
- if (typeof e == "number") if (Nt(e)) {
700
+ if (typeof e == "number") if (Mt(e)) {
701
701
  let t = /* @__PURE__ */ new ArrayBuffer(8);
702
- return new DataView(t).setFloat64(0, e, Dt), { $float: Ct(new Uint8Array(t)) };
702
+ return new DataView(t).setFloat64(0, e, Et), { $float: St(new Uint8Array(t)) };
703
703
  } else return e;
704
704
  if (typeof e == "boolean" || typeof e == "string") return e;
705
- if (e instanceof ArrayBuffer) return { $bytes: Ct(new Uint8Array(e)) };
706
- if (Array.isArray(e)) return e.map((e, r) => Gt(e, t, n + `[${r}]`, !1));
707
- if (e instanceof Set) throw Error(Kt(n, "Set", [...e], t));
708
- if (e instanceof Map) throw Error(Kt(n, "Map", [...e], t));
709
- if (!Et(e)) {
705
+ if (e instanceof ArrayBuffer) return { $bytes: St(new Uint8Array(e)) };
706
+ if (Array.isArray(e)) return e.map((e, r) => Wt(e, t, n + `[${r}]`, !1));
707
+ if (e instanceof Set) throw Error(Gt(n, "Set", [...e], t));
708
+ if (e instanceof Map) throw Error(Gt(n, "Map", [...e], t));
709
+ if (!Tt(e)) {
710
710
  let r = e?.constructor?.name, i = r ? `${r} ` : "";
711
- throw Error(Kt(n, i, e, t));
711
+ throw Error(Gt(n, i, e, t));
712
712
  }
713
713
  let i = {}, a = Object.entries(e);
714
714
  a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
715
- for (let [e, o] of a) o === void 0 ? r && (Vt(e), i[e] = qt(o, t, n + `.${e}`)) : (Vt(e), i[e] = Gt(o, t, n + `.${e}`, !1));
715
+ for (let [e, o] of a) o === void 0 ? r && (Bt(e), i[e] = Kt(o, t, n + `.${e}`)) : (Bt(e), i[e] = Wt(o, t, n + `.${e}`, !1));
716
716
  return i;
717
717
  }
718
- function Kt(e, t, n, r) {
719
- return e ? `${t}${Wt(n)} is not a supported Convex type (present at path ${e} in original object ${Wt(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${Wt(n)} is not a supported Convex type.`;
718
+ function Gt(e, t, n, r) {
719
+ return e ? `${t}${Ut(n)} is not a supported Convex type (present at path ${e} in original object ${Ut(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${Ut(n)} is not a supported Convex type.`;
720
720
  }
721
- function qt(e, t, n) {
721
+ function Kt(e, t, n) {
722
722
  if (e === void 0) return { $undefined: null };
723
- if (t === void 0) throw Error(`Programming error. Current value is ${Wt(e)} but original value is undefined`);
724
- return Gt(e, t, n, !1);
723
+ if (t === void 0) throw Error(`Programming error. Current value is ${Ut(e)} but original value is undefined`);
724
+ return Wt(e, t, n, !1);
725
725
  }
726
- function Jt(e) {
727
- return Gt(e, e, "", !1);
726
+ function qt(e) {
727
+ return Wt(e, e, "", !1);
728
728
  }
729
729
  //#endregion
730
730
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/values/errors.js
731
- var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
731
+ var Jt = Object.defineProperty, Yt = (e, t, n) => t in e ? Jt(e, t, {
732
732
  enumerable: !0,
733
733
  configurable: !0,
734
734
  writable: !0,
735
735
  value: n
736
- }) : e[t] = n, Zt = (e, t, n) => Xt(e, typeof t == "symbol" ? t : t + "", n), Qt, $t, en = Symbol.for("ConvexError"), tn = class extends ($t = Error, Qt = en, $t) {
736
+ }) : e[t] = n, Xt = (e, t, n) => Yt(e, typeof t == "symbol" ? t : t + "", n), Zt, Qt, $t = Symbol.for("ConvexError"), en = class extends (Qt = Error, Zt = $t, Qt) {
737
737
  constructor(e) {
738
- super(typeof e == "string" ? e : Wt(e)), Zt(this, "name", "ConvexError"), Zt(this, "data"), Zt(this, Qt, !0), this.data = e;
738
+ super(typeof e == "string" ? e : Ut(e)), Xt(this, "name", "ConvexError"), Xt(this, "data"), Xt(this, Zt, !0), this.data = e;
739
739
  }
740
- }, nn = Object.defineProperty, rn = (e, t, n) => t in e ? nn(e, t, {
740
+ }, tn = Object.defineProperty, nn = (e, t, n) => t in e ? tn(e, t, {
741
741
  enumerable: !0,
742
742
  configurable: !0,
743
743
  writable: !0,
744
744
  value: n
745
- }) : e[t] = n, an = (e, t, n) => rn(e, typeof t == "symbol" ? t : t + "", n), on = "color:rgb(0, 145, 255)";
746
- function sn(e) {
745
+ }) : e[t] = n, rn = (e, t, n) => nn(e, typeof t == "symbol" ? t : t + "", n), an = "color:rgb(0, 145, 255)";
746
+ function on(e) {
747
747
  switch (e) {
748
748
  case "query": return "Q";
749
749
  case "mutation": return "M";
@@ -751,9 +751,9 @@ function sn(e) {
751
751
  case "any": return "?";
752
752
  }
753
753
  }
754
- var cn = class {
754
+ var sn = class {
755
755
  constructor(e) {
756
- an(this, "_onLogLineFuncs"), an(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
756
+ rn(this, "_onLogLineFuncs"), rn(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
757
757
  }
758
758
  addLogLineListener(e) {
759
759
  let t = Math.random().toString(36).substring(2, 15);
@@ -775,8 +775,8 @@ var cn = class {
775
775
  for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
776
776
  }
777
777
  };
778
- function ln(e) {
779
- let t = new cn(e);
778
+ function cn(e) {
779
+ let t = new sn(e);
780
780
  return t.addLogLineListener((e, ...t) => {
781
781
  switch (e) {
782
782
  case "debug":
@@ -795,11 +795,11 @@ function ln(e) {
795
795
  }
796
796
  }), t;
797
797
  }
798
- function un(e) {
799
- return new cn(e);
798
+ function ln(e) {
799
+ return new sn(e);
800
800
  }
801
- function dn(e, t, n, r, i) {
802
- let a = sn(n);
801
+ function un(e, t, n, r, i) {
802
+ let a = on(n);
803
803
  if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
804
804
  let t = i.match(/^\[.*?\] /);
805
805
  if (t === null) {
@@ -807,57 +807,57 @@ function dn(e, t, n, r, i) {
807
807
  return;
808
808
  }
809
809
  let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
810
- e.log(`%c[CONVEX ${a}(${r})] [${n}]`, on, o);
810
+ e.log(`%c[CONVEX ${a}(${r})] [${n}]`, an, o);
811
811
  } else e.error(`[CONVEX ${a}(${r})] ${i}`);
812
812
  }
813
- function fn(e, t) {
813
+ function dn(e, t) {
814
814
  let n = `[CONVEX FATAL ERROR] ${t}`;
815
815
  return e.error(n), Error(n);
816
816
  }
817
- function pn(e, t, n) {
818
- return `[CONVEX ${sn(e)}(${t})] ${n.errorMessage}
817
+ function fn(e, t, n) {
818
+ return `[CONVEX ${on(e)}(${t})] ${n.errorMessage}
819
819
  Called by client`;
820
820
  }
821
- function mn(e, t) {
821
+ function pn(e, t) {
822
822
  return t.data = e.errorData, t;
823
823
  }
824
824
  //#endregion
825
825
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
826
- function hn(e) {
826
+ function mn(e) {
827
827
  let t = e.split(":"), n, r;
828
828
  return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
829
829
  }
830
- function gn(e, t) {
830
+ function hn(e, t) {
831
831
  return JSON.stringify({
832
- udfPath: hn(e),
833
- args: Jt(t)
832
+ udfPath: mn(e),
833
+ args: qt(t)
834
834
  });
835
835
  }
836
- function _n(e, t, n) {
836
+ function gn(e, t, n) {
837
837
  let { initialNumItems: r, id: i } = n;
838
838
  return JSON.stringify({
839
839
  type: "paginated",
840
- udfPath: hn(e),
841
- args: Jt(t),
842
- options: Jt({
840
+ udfPath: mn(e),
841
+ args: qt(t),
842
+ options: qt({
843
843
  initialNumItems: r,
844
844
  id: i
845
845
  })
846
846
  });
847
847
  }
848
- function vn(e) {
848
+ function _n(e) {
849
849
  return JSON.parse(e).type === "paginated";
850
850
  }
851
851
  //#endregion
852
852
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/local_state.js
853
- var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
853
+ var vn = Object.defineProperty, yn = (e, t, n) => t in e ? vn(e, t, {
854
854
  enumerable: !0,
855
855
  configurable: !0,
856
856
  writable: !0,
857
857
  value: n
858
- }) : e[t] = n, xn = (e, t, n) => bn(e, typeof t == "symbol" ? t : t + "", n), Sn = class {
858
+ }) : e[t] = n, bn = (e, t, n) => yn(e, typeof t == "symbol" ? t : t + "", n), xn = class {
859
859
  constructor() {
860
- xn(this, "nextQueryId"), xn(this, "querySetVersion"), xn(this, "querySet"), xn(this, "queryIdToToken"), xn(this, "identityVersion"), xn(this, "auth"), xn(this, "outstandingQueriesOlderThanRestart"), xn(this, "outstandingAuthOlderThanRestart"), xn(this, "paused"), xn(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
860
+ bn(this, "nextQueryId"), bn(this, "querySetVersion"), bn(this, "querySet"), bn(this, "queryIdToToken"), bn(this, "identityVersion"), bn(this, "auth"), bn(this, "outstandingQueriesOlderThanRestart"), bn(this, "outstandingAuthOlderThanRestart"), bn(this, "paused"), bn(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
861
861
  }
862
862
  hasSyncedPastLastReconnect() {
863
863
  return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
@@ -866,7 +866,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
866
866
  this.outstandingAuthOlderThanRestart = !1;
867
867
  }
868
868
  subscribe(e, t, n, r) {
869
- let i = hn(e), a = gn(i, t), o = this.querySet.get(a);
869
+ let i = mn(e), a = hn(i, t), o = this.querySet.get(a);
870
870
  if (o !== void 0) return o.numSubscribers += 1, {
871
871
  queryToken: a,
872
872
  modification: null,
@@ -886,7 +886,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
886
886
  type: "Add",
887
887
  queryId: e,
888
888
  udfPath: i,
889
- args: [Jt(t)],
889
+ args: [qt(t)],
890
890
  journal: n,
891
891
  componentPath: r
892
892
  };
@@ -921,7 +921,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
921
921
  }
922
922
  }
923
923
  queryId(e, t) {
924
- let n = gn(hn(e), t), r = this.querySet.get(n);
924
+ let n = hn(mn(e), t), r = this.querySet.get(n);
925
925
  return r === void 0 ? null : r.id;
926
926
  }
927
927
  isCurrentOrNewerAuthVersion(e) {
@@ -993,7 +993,7 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
993
993
  type: "Add",
994
994
  queryId: t.id,
995
995
  udfPath: t.canonicalizedUdfPath,
996
- args: [Jt(t.args)],
996
+ args: [qt(t.args)],
997
997
  journal: t.journal,
998
998
  componentPath: t.componentPath
999
999
  };
@@ -1051,14 +1051,14 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
1051
1051
  };
1052
1052
  }
1053
1053
  }
1054
- }, Cn = Object.defineProperty, wn = (e, t, n) => t in e ? Cn(e, t, {
1054
+ }, Sn = Object.defineProperty, Cn = (e, t, n) => t in e ? Sn(e, t, {
1055
1055
  enumerable: !0,
1056
1056
  configurable: !0,
1057
1057
  writable: !0,
1058
1058
  value: n
1059
- }) : e[t] = n, Tn = (e, t, n) => wn(e, typeof t == "symbol" ? t : t + "", n), En = class {
1059
+ }) : e[t] = n, wn = (e, t, n) => Cn(e, typeof t == "symbol" ? t : t + "", n), Tn = class {
1060
1060
  constructor(e, t) {
1061
- this.logger = e, this.markConnectionStateDirty = t, Tn(this, "inflightRequests"), Tn(this, "requestsOlderThanRestart"), Tn(this, "inflightMutationsCount", 0), Tn(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
1061
+ this.logger = e, this.markConnectionStateDirty = t, wn(this, "inflightRequests"), wn(this, "requestsOlderThanRestart"), wn(this, "inflightMutationsCount", 0), wn(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
1062
1062
  }
1063
1063
  request(e, t) {
1064
1064
  let n = new Promise((n) => {
@@ -1078,19 +1078,19 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
1078
1078
  let t = this.inflightRequests.get(e.requestId);
1079
1079
  if (t === void 0 || t.status.status === "Completed") return null;
1080
1080
  let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
1081
- for (let t of e.logLines) dn(this.logger, "info", n, r, t);
1081
+ for (let t of e.logLines) un(this.logger, "info", n, r, t);
1082
1082
  let i = t.status, a, o;
1083
1083
  if (e.success) a = {
1084
1084
  success: !0,
1085
1085
  logLines: e.logLines,
1086
- value: Ht(e.result)
1086
+ value: Vt(e.result)
1087
1087
  }, o = () => i.onResult(a);
1088
1088
  else {
1089
1089
  let t = e.result, { errorData: s } = e;
1090
- dn(this.logger, "error", n, r, t), a = {
1090
+ un(this.logger, "error", n, r, t), a = {
1091
1091
  success: !1,
1092
1092
  errorMessage: t,
1093
- errorData: s === void 0 ? void 0 : Ht(s),
1093
+ errorData: s === void 0 ? void 0 : Vt(s),
1094
1094
  logLines: e.logLines
1095
1095
  }, o = () => i.onResult(a);
1096
1096
  }
@@ -1162,19 +1162,19 @@ var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
1162
1162
  inflightActions() {
1163
1163
  return this.inflightActionsCount;
1164
1164
  }
1165
- }, Dn = Symbol.for("functionName"), On = Symbol.for("toReferencePath");
1166
- function kn(e) {
1167
- return e[On] ?? null;
1165
+ }, En = Symbol.for("functionName"), Dn = Symbol.for("toReferencePath");
1166
+ function On(e) {
1167
+ return e[Dn] ?? null;
1168
1168
  }
1169
- function An(e) {
1169
+ function kn(e) {
1170
1170
  return e.startsWith("function://");
1171
1171
  }
1172
- function jn(e) {
1172
+ function An(e) {
1173
1173
  let t;
1174
- if (typeof e == "string") t = An(e) ? { functionHandle: e } : { name: e };
1175
- else if (e[Dn]) t = { name: e[Dn] };
1174
+ if (typeof e == "string") t = kn(e) ? { functionHandle: e } : { name: e };
1175
+ else if (e[En]) t = { name: e[En] };
1176
1176
  else {
1177
- let n = kn(e);
1177
+ let n = On(e);
1178
1178
  if (!n) throw Error(`${e} is not a functionReference`);
1179
1179
  t = { reference: n };
1180
1180
  }
@@ -1182,21 +1182,21 @@ function jn(e) {
1182
1182
  }
1183
1183
  //#endregion
1184
1184
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/server/api.js
1185
- function Mn(e) {
1186
- let t = jn(e);
1185
+ function jn(e) {
1186
+ let t = An(e);
1187
1187
  if (t.name === void 0) throw t.functionHandle === void 0 ? t.reference === void 0 ? Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`) : Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`) : Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);
1188
1188
  if (typeof e == "string") return e;
1189
- let n = e[Dn];
1189
+ let n = e[En];
1190
1190
  if (!n) throw Error(`${e} is not a functionReference`);
1191
1191
  return n;
1192
1192
  }
1193
- function Nn(e) {
1194
- return { [Dn]: e };
1193
+ function Mn(e) {
1194
+ return { [En]: e };
1195
1195
  }
1196
- function Pn(e = []) {
1196
+ function Nn(e = []) {
1197
1197
  return new Proxy({}, { get(t, n) {
1198
- if (typeof n == "string") return Pn([...e, n]);
1199
- if (n === Dn) {
1198
+ if (typeof n == "string") return Nn([...e, n]);
1199
+ if (n === En) {
1200
1200
  if (e.length < 2) {
1201
1201
  let t = ["api", ...e].join(".");
1202
1202
  throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``);
@@ -1207,32 +1207,32 @@ function Pn(e = []) {
1207
1207
  if (n === Symbol.toStringTag) return "FunctionReference";
1208
1208
  } });
1209
1209
  }
1210
- Pn();
1210
+ Nn();
1211
1211
  //#endregion
1212
1212
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/optimistic_updates_impl.js
1213
- var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1213
+ var Pn = Object.defineProperty, Fn = (e, t, n) => t in e ? Pn(e, t, {
1214
1214
  enumerable: !0,
1215
1215
  configurable: !0,
1216
1216
  writable: !0,
1217
1217
  value: n
1218
- }) : e[t] = n, Ln = (e, t, n) => In(e, typeof t == "symbol" ? t : t + "", n), Rn = class e {
1218
+ }) : e[t] = n, In = (e, t, n) => Fn(e, typeof t == "symbol" ? t : t + "", n), Ln = class e {
1219
1219
  constructor(e) {
1220
- Ln(this, "queryResults"), Ln(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1220
+ In(this, "queryResults"), In(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1221
1221
  }
1222
1222
  getQuery(t, ...n) {
1223
- let r = wt(n[0]), i = Mn(t), a = this.queryResults.get(gn(i, r));
1223
+ let r = Ct(n[0]), i = jn(t), a = this.queryResults.get(hn(i, r));
1224
1224
  if (a !== void 0) return e.queryValue(a.result);
1225
1225
  }
1226
1226
  getAllQueries(t) {
1227
- let n = [], r = Mn(t);
1228
- for (let t of this.queryResults.values()) t.udfPath === hn(r) && n.push({
1227
+ let n = [], r = jn(t);
1228
+ for (let t of this.queryResults.values()) t.udfPath === mn(r) && n.push({
1229
1229
  args: t.args,
1230
1230
  value: e.queryValue(t.result)
1231
1231
  });
1232
1232
  return n;
1233
1233
  }
1234
1234
  setQuery(e, t, n) {
1235
- let r = wt(t), i = Mn(e), a = gn(i, r), o;
1235
+ let r = Ct(t), i = jn(e), a = hn(i, r), o;
1236
1236
  o = n === void 0 ? void 0 : {
1237
1237
  success: !0,
1238
1238
  value: n,
@@ -1248,15 +1248,15 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1248
1248
  static queryValue(e) {
1249
1249
  if (e !== void 0 && e.success) return e.value;
1250
1250
  }
1251
- }, zn = class {
1251
+ }, Rn = class {
1252
1252
  constructor() {
1253
- Ln(this, "queryResults"), Ln(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
1253
+ In(this, "queryResults"), In(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
1254
1254
  }
1255
1255
  ingestQueryResultsFromServer(e, t) {
1256
1256
  this.optimisticUpdates = this.optimisticUpdates.filter((e) => !t.has(e.mutationId));
1257
1257
  let n = this.queryResults;
1258
1258
  this.queryResults = new Map(e);
1259
- let r = new Rn(this.queryResults);
1259
+ let r = new Ln(this.queryResults);
1260
1260
  for (let e of this.optimisticUpdates) e.update(r);
1261
1261
  let i = [];
1262
1262
  for (let [e, t] of this.queryResults) {
@@ -1270,7 +1270,7 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1270
1270
  update: e,
1271
1271
  mutationId: t
1272
1272
  });
1273
- let n = new Rn(this.queryResults);
1273
+ let n = new Ln(this.queryResults);
1274
1274
  return e(n), n.modifiedQueries;
1275
1275
  }
1276
1276
  rawQueryResult(e) {
@@ -1283,7 +1283,7 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1283
1283
  let n = t.result;
1284
1284
  if (n !== void 0) {
1285
1285
  if (n.success) return n.value;
1286
- throw n.errorData === void 0 ? Error(pn("query", t.udfPath, n)) : mn(n, new tn(pn("query", t.udfPath, n)));
1286
+ throw n.errorData === void 0 ? Error(fn("query", t.udfPath, n)) : pn(n, new en(fn("query", t.udfPath, n)));
1287
1287
  }
1288
1288
  }
1289
1289
  hasQueryResult(e) {
@@ -1292,14 +1292,14 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1292
1292
  queryLogs(e) {
1293
1293
  return this.queryResults.get(e)?.result?.logLines;
1294
1294
  }
1295
- }, Bn = Object.defineProperty, Vn = (e, t, n) => t in e ? Bn(e, t, {
1295
+ }, zn = Object.defineProperty, Bn = (e, t, n) => t in e ? zn(e, t, {
1296
1296
  enumerable: !0,
1297
1297
  configurable: !0,
1298
1298
  writable: !0,
1299
1299
  value: n
1300
- }) : e[t] = n, Hn = (e, t, n) => Vn(e, typeof t == "symbol" ? t : t + "", n), Un = class e {
1300
+ }) : e[t] = n, Vn = (e, t, n) => Bn(e, typeof t == "symbol" ? t : t + "", n), Hn = class e {
1301
1301
  constructor(e, t) {
1302
- Hn(this, "low"), Hn(this, "high"), Hn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
1302
+ Vn(this, "low"), Vn(this, "high"), Vn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
1303
1303
  }
1304
1304
  static isLong(e) {
1305
1305
  return (e && e.__isUnsignedLong__) === !0;
@@ -1321,10 +1321,10 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1321
1321
  ];
1322
1322
  }
1323
1323
  static fromNumber(t) {
1324
- return isNaN(t) || t < 0 ? Wn : t >= qn ? Jn : new e(t % Kn | 0, t / Kn | 0);
1324
+ return isNaN(t) || t < 0 ? Un : t >= Kn ? qn : new e(t % Gn | 0, t / Gn | 0);
1325
1325
  }
1326
1326
  toString() {
1327
- return (BigInt(this.high) * BigInt(Kn) + BigInt(this.low)).toString();
1327
+ return (BigInt(this.high) * BigInt(Gn) + BigInt(this.low)).toString();
1328
1328
  }
1329
1329
  equals(t) {
1330
1330
  return e.isLong(t) || (t = e.fromValue(t)), this.high >>> 31 == 1 && t.high >>> 31 == 1 ? !1 : this.high === t.high && this.low === t.low;
@@ -1341,16 +1341,16 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1341
1341
  static fromValue(t) {
1342
1342
  return typeof t == "number" ? e.fromNumber(t) : new e(t.low, t.high);
1343
1343
  }
1344
- }, Wn = new Un(0, 0), Gn = 65536, Kn = Gn * Gn, qn = Kn * Kn, Jn = new Un(-1, -1), Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
1344
+ }, Un = new Hn(0, 0), Wn = 65536, Gn = Wn * Wn, Kn = Gn * Gn, qn = new Hn(-1, -1), Jn = Object.defineProperty, Yn = (e, t, n) => t in e ? Jn(e, t, {
1345
1345
  enumerable: !0,
1346
1346
  configurable: !0,
1347
1347
  writable: !0,
1348
1348
  value: n
1349
- }) : e[t] = n, Zn = (e, t, n) => Xn(e, typeof t == "symbol" ? t : t + "", n), Qn = class {
1349
+ }) : e[t] = n, Xn = (e, t, n) => Yn(e, typeof t == "symbol" ? t : t + "", n), Zn = class {
1350
1350
  constructor(e, t) {
1351
- Zn(this, "version"), Zn(this, "remoteQuerySet"), Zn(this, "queryPath"), Zn(this, "logger"), this.version = {
1351
+ Xn(this, "version"), Xn(this, "remoteQuerySet"), Xn(this, "queryPath"), Xn(this, "logger"), this.version = {
1352
1352
  querySet: 0,
1353
- ts: Un.fromNumber(0),
1353
+ ts: Hn.fromNumber(0),
1354
1354
  identity: 0
1355
1355
  }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = t;
1356
1356
  }
@@ -1360,8 +1360,8 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1360
1360
  for (let t of e.modifications) switch (t.type) {
1361
1361
  case "QueryUpdated": {
1362
1362
  let e = this.queryPath(t.queryId);
1363
- if (e) for (let n of t.logLines) dn(this.logger, "info", "query", e, n);
1364
- let n = Ht(t.value ?? null);
1363
+ if (e) for (let n of t.logLines) un(this.logger, "info", "query", e, n);
1364
+ let n = Vt(t.value ?? null);
1365
1365
  this.remoteQuerySet.set(t.queryId, {
1366
1366
  success: !0,
1367
1367
  value: n,
@@ -1371,12 +1371,12 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1371
1371
  }
1372
1372
  case "QueryFailed": {
1373
1373
  let e = this.queryPath(t.queryId);
1374
- if (e) for (let n of t.logLines) dn(this.logger, "info", "query", e, n);
1374
+ if (e) for (let n of t.logLines) un(this.logger, "info", "query", e, n);
1375
1375
  let { errorData: n } = t;
1376
1376
  this.remoteQuerySet.set(t.queryId, {
1377
1377
  success: !1,
1378
1378
  errorMessage: t.errorMessage,
1379
- errorData: n === void 0 ? void 0 : Ht(n),
1379
+ errorData: n === void 0 ? void 0 : Vt(n),
1380
1380
  logLines: t.logLines
1381
1381
  });
1382
1382
  break;
@@ -1397,14 +1397,14 @@ var Fn = Object.defineProperty, In = (e, t, n) => t in e ? Fn(e, t, {
1397
1397
  };
1398
1398
  //#endregion
1399
1399
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/protocol.js
1400
+ function Qn(e) {
1401
+ let t = yt(e);
1402
+ return Hn.fromBytesLE(Array.from(t));
1403
+ }
1400
1404
  function $n(e) {
1401
- let t = bt(e);
1402
- return Un.fromBytesLE(Array.from(t));
1405
+ return St(new Uint8Array(e.toBytesLE()));
1403
1406
  }
1404
1407
  function er(e) {
1405
- return Ct(new Uint8Array(e.toBytesLE()));
1406
- }
1407
- function tr(e) {
1408
1408
  switch (e.type) {
1409
1409
  case "FatalError":
1410
1410
  case "AuthError":
@@ -1413,22 +1413,22 @@ function tr(e) {
1413
1413
  case "Ping": return { ...e };
1414
1414
  case "MutationResponse": return e.success ? {
1415
1415
  ...e,
1416
- ts: $n(e.ts)
1416
+ ts: Qn(e.ts)
1417
1417
  } : { ...e };
1418
1418
  case "Transition": return {
1419
1419
  ...e,
1420
1420
  startVersion: {
1421
1421
  ...e.startVersion,
1422
- ts: $n(e.startVersion.ts)
1422
+ ts: Qn(e.startVersion.ts)
1423
1423
  },
1424
1424
  endVersion: {
1425
1425
  ...e.endVersion,
1426
- ts: $n(e.endVersion.ts)
1426
+ ts: Qn(e.endVersion.ts)
1427
1427
  }
1428
1428
  };
1429
1429
  }
1430
1430
  }
1431
- function nr(e) {
1431
+ function tr(e) {
1432
1432
  switch (e.type) {
1433
1433
  case "Authenticate":
1434
1434
  case "ModifyQuerySet":
@@ -1440,25 +1440,25 @@ function nr(e) {
1440
1440
  maxObservedTimestamp: void 0
1441
1441
  } : {
1442
1442
  ...e,
1443
- maxObservedTimestamp: er(e.maxObservedTimestamp)
1443
+ maxObservedTimestamp: $n(e.maxObservedTimestamp)
1444
1444
  };
1445
1445
  }
1446
1446
  }
1447
1447
  //#endregion
1448
1448
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/web_socket_manager.js
1449
- var rr = Object.defineProperty, ir = (e, t, n) => t in e ? rr(e, t, {
1449
+ var nr = Object.defineProperty, rr = (e, t, n) => t in e ? nr(e, t, {
1450
1450
  enumerable: !0,
1451
1451
  configurable: !0,
1452
1452
  writable: !0,
1453
1453
  value: n
1454
- }) : e[t] = n, G = (e, t, n) => ir(e, typeof t == "symbol" ? t : t + "", n), ar = 1e3, or = 1001, sr = 1005, cr = 4040, lr;
1455
- function ur() {
1456
- return lr === void 0 && (lr = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(lr + performance.now());
1454
+ }) : e[t] = n, K = (e, t, n) => rr(e, typeof t == "symbol" ? t : t + "", n), ir = 1e3, ar = 1001, or = 1005, sr = 4040, cr;
1455
+ function lr() {
1456
+ return cr === void 0 && (cr = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(cr + performance.now());
1457
1457
  }
1458
- function dr() {
1459
- return `t=${Math.round((ur() - lr) / 100) / 10}s`;
1458
+ function ur() {
1459
+ return `t=${Math.round((lr() - cr) / 100) / 10}s`;
1460
1460
  }
1461
- var fr = {
1461
+ var dr = {
1462
1462
  InternalServerError: { timeout: 1e3 },
1463
1463
  SubscriptionsWorkerFullError: { timeout: 3e3 },
1464
1464
  TooManyConcurrentRequests: { timeout: 3e3 },
@@ -1474,14 +1474,14 @@ var fr = {
1474
1474
  SearchIndexTooLarge: { timeout: 3e3 },
1475
1475
  TooManyWritesInTimePeriod: { timeout: 3e3 }
1476
1476
  };
1477
- function pr(e) {
1477
+ function fr(e) {
1478
1478
  if (e === void 0) return "Unknown";
1479
- for (let t of Object.keys(fr)) if (e.startsWith(t)) return t;
1479
+ for (let t of Object.keys(dr)) if (e.startsWith(t)) return t;
1480
1480
  return "Unknown";
1481
1481
  }
1482
- var mr = class {
1482
+ var pr = class {
1483
1483
  constructor(e, t, n, r, i, a) {
1484
- this.markConnectionStateDirty = i, this.debug = a, G(this, "socket"), G(this, "connectionCount"), G(this, "_hasEverConnected", !1), G(this, "lastCloseReason"), G(this, "transitionChunkBuffer", null), G(this, "defaultInitialBackoff"), G(this, "maxBackoff"), G(this, "retries"), G(this, "serverInactivityThreshold"), G(this, "reconnectDueToServerInactivityTimeout"), G(this, "scheduledReconnect", null), G(this, "networkOnlineHandler", null), G(this, "pendingNetworkRecoveryInfo", null), G(this, "uri"), G(this, "onOpen"), G(this, "onResume"), G(this, "onMessage"), G(this, "webSocketConstructor"), G(this, "logger"), G(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
1484
+ this.markConnectionStateDirty = i, this.debug = a, K(this, "socket"), K(this, "connectionCount"), K(this, "_hasEverConnected", !1), K(this, "lastCloseReason"), K(this, "transitionChunkBuffer", null), K(this, "defaultInitialBackoff"), K(this, "maxBackoff"), K(this, "retries"), K(this, "serverInactivityThreshold"), K(this, "reconnectDueToServerInactivityTimeout"), K(this, "scheduledReconnect", null), K(this, "networkOnlineHandler", null), K(this, "pendingNetworkRecoveryInfo", null), K(this, "uri"), K(this, "onOpen"), K(this, "onResume"), K(this, "onMessage"), K(this, "webSocketConstructor"), K(this, "logger"), K(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
1485
1485
  }
1486
1486
  setSocketState(e) {
1487
1487
  this.socket = e, this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused" in this.socket ? this.socket.paused : void 0}`), this.markConnectionStateDirty();
@@ -1507,7 +1507,7 @@ var mr = class {
1507
1507
  if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
1508
1508
  let e = this.transitionChunkBuffer.chunks.join("");
1509
1509
  this.transitionChunkBuffer = null;
1510
- let t = tr(JSON.parse(e));
1510
+ let t = er(JSON.parse(e));
1511
1511
  if (t.type !== "Transition") throw Error(`Expected Transition, got ${t.type} after assembling chunks`);
1512
1512
  return t;
1513
1513
  }
@@ -1530,8 +1530,8 @@ var mr = class {
1530
1530
  }), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
1531
1531
  connectionCount: this.connectionCount,
1532
1532
  lastCloseReason: this.lastCloseReason,
1533
- clientTs: ur()
1534
- })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", dr(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", dr())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1533
+ clientTs: lr()
1534
+ })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", ur(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", ur())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1535
1535
  let { timeSavedMs: e } = this.pendingNetworkRecoveryInfo;
1536
1536
  this.pendingNetworkRecoveryInfo = null, this.sendMessage({
1537
1537
  type: "Event",
@@ -1545,7 +1545,7 @@ var mr = class {
1545
1545
  t && this.logger.log(`WebSocket error message: ${t}`);
1546
1546
  }, e.onmessage = (e) => {
1547
1547
  this.resetServerInactivityTimeout();
1548
- let t = e.data.length, n = tr(JSON.parse(e.data));
1548
+ let t = e.data.length, n = er(JSON.parse(e.data));
1549
1549
  if (this._logVerbose(`received ws message with type ${n.type}`), n.type !== "Ping") {
1550
1550
  if (n.type === "TransitionChunk") {
1551
1551
  let e = this.assembleTransition(n);
@@ -1558,11 +1558,11 @@ var mr = class {
1558
1558
  }), this.onMessage(n).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
1559
1559
  }
1560
1560
  }, e.onclose = (e) => {
1561
- if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== ar && e.code !== or && e.code !== sr && e.code !== cr) {
1561
+ if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== ir && e.code !== ar && e.code !== or && e.code !== sr) {
1562
1562
  let t = `WebSocket closed with code ${e.code}`;
1563
1563
  e.reason && (t += `: ${e.reason}`), this.logger.log(t), this.onServerDisconnectError && e.reason && this.onServerDisconnectError(t);
1564
1564
  }
1565
- let t = pr(e.reason);
1565
+ let t = fr(e.reason);
1566
1566
  this.scheduleReconnect(t);
1567
1567
  };
1568
1568
  }
@@ -1575,7 +1575,7 @@ var mr = class {
1575
1575
  ...e.type === "Authenticate" && e.tokenType === "User" ? { value: `...${e.value.slice(-7)}` } : {}
1576
1576
  };
1577
1577
  if (this.socket.state === "ready" && this.socket.paused === "no") {
1578
- let n = nr(e), r = JSON.stringify(n), i = !1;
1578
+ let n = tr(e), r = JSON.stringify(n), i = !1;
1579
1579
  try {
1580
1580
  this.socket.ws.send(r), i = !0;
1581
1581
  } catch (e) {
@@ -1594,7 +1594,7 @@ var mr = class {
1594
1594
  this.scheduledReconnect &&= (clearTimeout(this.scheduledReconnect.timeout), null), this.socket = { state: "disconnected" };
1595
1595
  let t = this.nextBackoff(e);
1596
1596
  this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);
1597
- let n = ur(), r = setTimeout(() => {
1597
+ let n = lr(), r = setTimeout(() => {
1598
1598
  this.scheduledReconnect?.timeout === r && (this.scheduledReconnect = null, this.connect());
1599
1599
  }, t);
1600
1600
  this.scheduledReconnect = {
@@ -1712,7 +1712,7 @@ var mr = class {
1712
1712
  }
1713
1713
  let e = null;
1714
1714
  if (this.scheduledReconnect) {
1715
- let t = ur() - this.scheduledReconnect.scheduledAt;
1715
+ let t = lr() - this.scheduledReconnect.scheduledAt;
1716
1716
  e = Math.max(0, this.scheduledReconnect.backoffMs - t), this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
1717
1717
  }
1718
1718
  this.logger.log("Network recovery detected, reconnecting immediately"), this.pendingNetworkRecoveryInfo = e === null ? null : { timeSavedMs: e }, this.connect();
@@ -1732,7 +1732,7 @@ var mr = class {
1732
1732
  }, this._hasEverConnected = !0, this.onOpen({
1733
1733
  connectionCount: this.connectionCount,
1734
1734
  lastCloseReason: this.lastCloseReason,
1735
- clientTs: ur()
1735
+ clientTs: lr()
1736
1736
  })) : this.socket.paused === "yes" && (this.socket = {
1737
1737
  ...this.socket,
1738
1738
  paused: "no"
@@ -1757,14 +1757,14 @@ var mr = class {
1757
1757
  this.logger.logVerbose(e);
1758
1758
  }
1759
1759
  nextBackoff(e) {
1760
- let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : fr[e].timeout) * 2 ** this.retries;
1760
+ let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : dr[e].timeout) * 2 ** this.retries;
1761
1761
  this.retries += 1;
1762
1762
  let n = Math.min(t, this.maxBackoff);
1763
1763
  return n + n * (Math.random() - .5);
1764
1764
  }
1765
1765
  reportLargeTransition({ transition: e, messageLength: t }) {
1766
1766
  if (e.clientClockSkew === void 0 || e.serverTs === void 0) return;
1767
- let n = ur() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
1767
+ let n = lr() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
1768
1768
  this._logVerbose(`received ${i} transition in ${r} at ${o}`), t > 2e7 ? this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`) : n > 2e4 && this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`), this.debug && this.sendMessage({
1769
1769
  type: "Event",
1770
1770
  eventType: "ClientReceivedTransition",
@@ -1777,10 +1777,10 @@ var mr = class {
1777
1777
  };
1778
1778
  //#endregion
1779
1779
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/session.js
1780
- function hr() {
1781
- return gr();
1780
+ function mr() {
1781
+ return hr();
1782
1782
  }
1783
- function gr() {
1783
+ function hr() {
1784
1784
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
1785
1785
  let t = Math.random() * 16 | 0;
1786
1786
  return (e === "x" ? t : t & 3 | 8).toString(16);
@@ -1788,15 +1788,15 @@ function gr() {
1788
1788
  }
1789
1789
  //#endregion
1790
1790
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/vendor/jwt-decode/index.js
1791
- var _r = class extends Error {};
1792
- _r.prototype.name = "InvalidTokenError";
1793
- function vr(e) {
1791
+ var gr = class extends Error {};
1792
+ gr.prototype.name = "InvalidTokenError";
1793
+ function _r(e) {
1794
1794
  return decodeURIComponent(atob(e).replace(/(.)/g, (e, t) => {
1795
1795
  let n = t.charCodeAt(0).toString(16).toUpperCase();
1796
1796
  return n.length < 2 && (n = "0" + n), "%" + n;
1797
1797
  }));
1798
1798
  }
1799
- function yr(e) {
1799
+ function vr(e) {
1800
1800
  let t = e.replace(/-/g, "+").replace(/_/g, "/");
1801
1801
  switch (t.length % 4) {
1802
1802
  case 0: break;
@@ -1809,38 +1809,38 @@ function yr(e) {
1809
1809
  default: throw Error("base64 string is not of the correct length");
1810
1810
  }
1811
1811
  try {
1812
- return vr(t);
1812
+ return _r(t);
1813
1813
  } catch {
1814
1814
  return atob(t);
1815
1815
  }
1816
1816
  }
1817
- function br(e, t) {
1818
- if (typeof e != "string") throw new _r("Invalid token specified: must be a string");
1817
+ function yr(e, t) {
1818
+ if (typeof e != "string") throw new gr("Invalid token specified: must be a string");
1819
1819
  t ||= {};
1820
1820
  let n = t.header === !0 ? 0 : 1, r = e.split(".")[n];
1821
- if (typeof r != "string") throw new _r(`Invalid token specified: missing part #${n + 1}`);
1821
+ if (typeof r != "string") throw new gr(`Invalid token specified: missing part #${n + 1}`);
1822
1822
  let i;
1823
1823
  try {
1824
- i = yr(r);
1824
+ i = vr(r);
1825
1825
  } catch (e) {
1826
- throw new _r(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
1826
+ throw new gr(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
1827
1827
  }
1828
1828
  try {
1829
1829
  return JSON.parse(i);
1830
1830
  } catch (e) {
1831
- throw new _r(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
1831
+ throw new gr(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
1832
1832
  }
1833
1833
  }
1834
1834
  //#endregion
1835
1835
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.8/node_modules/convex/dist/esm/browser/sync/authentication_manager.js
1836
- var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
1836
+ var br = Object.defineProperty, xr = (e, t, n) => t in e ? br(e, t, {
1837
1837
  enumerable: !0,
1838
1838
  configurable: !0,
1839
1839
  writable: !0,
1840
1840
  value: n
1841
- }) : e[t] = n, K = (e, t, n) => Sr(e, typeof t == "symbol" ? t : t + "", n), Cr = 1728e6, wr = 2, Tr = class {
1841
+ }) : e[t] = n, Sr = (e, t, n) => xr(e, typeof t == "symbol" ? t : t + "", n), Cr = 1728e6, wr = 2, Tr = class {
1842
1842
  constructor(e, t, n) {
1843
- K(this, "authState", { state: "noAuth" }), K(this, "configVersion", 0), K(this, "syncState"), K(this, "authenticate"), K(this, "stopSocket"), K(this, "tryRestartSocket"), K(this, "pauseSocket"), K(this, "resumeSocket"), K(this, "clearAuth"), K(this, "logger"), K(this, "refreshTokenLeewaySeconds"), K(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
1843
+ Sr(this, "authState", { state: "noAuth" }), Sr(this, "configVersion", 0), Sr(this, "syncState"), Sr(this, "authenticate"), Sr(this, "stopSocket"), Sr(this, "tryRestartSocket"), Sr(this, "pauseSocket"), Sr(this, "resumeSocket"), Sr(this, "clearAuth"), Sr(this, "logger"), Sr(this, "refreshTokenLeewaySeconds"), Sr(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
1844
1844
  }
1845
1845
  async setConfig(e, t) {
1846
1846
  this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
@@ -1970,7 +1970,7 @@ var xr = Object.defineProperty, Sr = (e, t, n) => t in e ? xr(e, t, {
1970
1970
  }
1971
1971
  decodeToken(e) {
1972
1972
  try {
1973
- return br(e);
1973
+ return yr(e);
1974
1974
  } catch (e) {
1975
1975
  return this._logVerbose(`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`), null;
1976
1976
  }
@@ -2023,18 +2023,18 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2023
2023
  }), q(this, "mark", (e) => {
2024
2024
  this.debug && Dr(e, this.sessionId);
2025
2025
  }), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
2026
- n?.skipConvexDeploymentUrlCheck !== !0 && Tt(e), n = { ...n };
2026
+ n?.skipConvexDeploymentUrlCheck !== !0 && wt(e), n = { ...n };
2027
2027
  let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
2028
2028
  if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
2029
- i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? un({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : ln({ verbose: n.verbose ?? !1 });
2029
+ i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? ln({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : cn({ verbose: n.verbose ?? !1 });
2030
2030
  let a = e.search("://");
2031
2031
  if (a === -1) throw Error("Provided address was not an absolute URL.");
2032
2032
  let o = e.substring(a + 3), s = e.substring(0, a), c;
2033
2033
  if (s === "http") c = "ws";
2034
2034
  else if (s === "https") c = "wss";
2035
2035
  else throw Error(`Unknown parent protocol ${s}`);
2036
- let l = `${c}://${o}/api/${ft}/sync`;
2037
- this.state = new Sn(), this.remoteQuerySet = new Qn((e) => this.state.queryPath(e), this.logger), this.requestManager = new En(this.logger, this.markConnectionStateDirty);
2036
+ let l = `${c}://${o}/api/${dt}/sync`;
2037
+ this.state = new xn(), this.remoteQuerySet = new Zn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Tn(this.logger, this.markConnectionStateDirty);
2038
2038
  let u = () => {
2039
2039
  this.webSocketManager.pause(), this.state.pause();
2040
2040
  };
@@ -2053,9 +2053,9 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2053
2053
  }, {
2054
2054
  logger: this.logger,
2055
2055
  refreshTokenLeewaySeconds: r
2056
- }), this.optimisticQueryResults = new zn(), this.addOnTransitionHandler((e) => {
2056
+ }), this.optimisticQueryResults = new Rn(), this.addOnTransitionHandler((e) => {
2057
2057
  t(e.queries.map((e) => e.token));
2058
- }), this._nextRequestId = 0, this._sessionId = hr();
2058
+ }), this._nextRequestId = 0, this._sessionId = mr();
2059
2059
  let { unsavedChangesWarning: d } = n;
2060
2060
  if (typeof window > "u" || window.addEventListener === void 0) {
2061
2061
  if (d === !0) throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.");
@@ -2066,14 +2066,14 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2066
2066
  return (e || window.event).returnValue = t, t;
2067
2067
  }
2068
2068
  });
2069
- this.webSocketManager = new mr(l, {
2069
+ this.webSocketManager = new pr(l, {
2070
2070
  onOpen: (e) => {
2071
2071
  this.mark("convexWebSocketOpen"), this.webSocketManager.sendMessage({
2072
2072
  ...e,
2073
2073
  type: "Connect",
2074
2074
  sessionId: this._sessionId,
2075
2075
  maxObservedTimestamp: this.maxObservedTimestamp
2076
- }), this.remoteQuerySet = new Qn((e) => this.state.queryPath(e), this.logger);
2076
+ }), this.remoteQuerySet = new Zn((e) => this.state.queryPath(e), this.logger);
2077
2077
  let [t, n] = this.state.restart();
2078
2078
  n && this.webSocketManager.sendMessage(n), this.webSocketManager.sendMessage(t);
2079
2079
  for (let e of this.requestManager.restart()) this.webSocketManager.sendMessage(e);
@@ -2104,7 +2104,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2104
2104
  this.authenticationManager.onAuthError(e);
2105
2105
  break;
2106
2106
  case "FatalError": {
2107
- let t = fn(this.logger, e.error);
2107
+ let t = dn(this.logger, e.error);
2108
2108
  throw this.webSocketManager.terminate(), t;
2109
2109
  }
2110
2110
  }
@@ -2161,7 +2161,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2161
2161
  getCurrentAuthClaims() {
2162
2162
  let e = this.state.getAuth(), t = {};
2163
2163
  if (e && e.tokenType === "User") try {
2164
- t = e ? br(e.value) : {};
2164
+ t = e ? yr(e.value) : {};
2165
2165
  } catch {
2166
2166
  t = {};
2167
2167
  }
@@ -2186,7 +2186,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2186
2186
  this.webSocketManager.sendMessage(e);
2187
2187
  }
2188
2188
  subscribe(e, t, n) {
2189
- let r = wt(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
2189
+ let r = Ct(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
2190
2190
  return i !== null && this.webSocketManager.sendMessage(i), {
2191
2191
  queryToken: a,
2192
2192
  unsubscribe: () => {
@@ -2196,7 +2196,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2196
2196
  };
2197
2197
  }
2198
2198
  localQueryResult(e, t) {
2199
- let n = gn(e, wt(t));
2199
+ let n = hn(e, Ct(t));
2200
2200
  return this.optimisticQueryResults.queryResult(n);
2201
2201
  }
2202
2202
  localQueryResultByToken(e) {
@@ -2206,11 +2206,11 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2206
2206
  return this.optimisticQueryResults.hasQueryResult(e);
2207
2207
  }
2208
2208
  localQueryLogs(e, t) {
2209
- let n = gn(e, wt(t));
2209
+ let n = hn(e, Ct(t));
2210
2210
  return this.optimisticQueryResults.queryLogs(n);
2211
2211
  }
2212
2212
  queryJournal(e, t) {
2213
- let n = gn(e, wt(t));
2213
+ let n = hn(e, Ct(t));
2214
2214
  return this.state.queryJournal(n);
2215
2215
  }
2216
2216
  connectionState() {
@@ -2234,7 +2234,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2234
2234
  }
2235
2235
  async mutation(e, t, n) {
2236
2236
  let r = await this.mutationInternal(e, t, n);
2237
- if (!r.success) throw r.errorData === void 0 ? Error(pn("mutation", e, r)) : mn(r, new tn(pn("mutation", e, r)));
2237
+ if (!r.success) throw r.errorData === void 0 ? Error(fn("mutation", e, r)) : pn(r, new en(fn("mutation", e, r)));
2238
2238
  return r.value;
2239
2239
  }
2240
2240
  async mutationInternal(e, t, n, r) {
@@ -2242,7 +2242,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2242
2242
  return i;
2243
2243
  }
2244
2244
  enqueueMutation(e, t, n, r) {
2245
- let i = wt(t);
2245
+ let i = Ct(t);
2246
2246
  this.tryReportLongDisconnect();
2247
2247
  let a = this.nextRequestId;
2248
2248
  if (this._nextRequestId++, n !== void 0) {
@@ -2276,7 +2276,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2276
2276
  requestId: a,
2277
2277
  udfPath: e,
2278
2278
  componentPath: r,
2279
- args: [Jt(i)]
2279
+ args: [qt(i)]
2280
2280
  }, s = this.webSocketManager.sendMessage(o);
2281
2281
  return {
2282
2282
  requestId: a,
@@ -2285,18 +2285,18 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2285
2285
  }
2286
2286
  async action(e, t) {
2287
2287
  let n = await this.actionInternal(e, t);
2288
- if (!n.success) throw n.errorData === void 0 ? Error(pn("action", e, n)) : mn(n, new tn(pn("action", e, n)));
2288
+ if (!n.success) throw n.errorData === void 0 ? Error(fn("action", e, n)) : pn(n, new en(fn("action", e, n)));
2289
2289
  return n.value;
2290
2290
  }
2291
2291
  async actionInternal(e, t, n) {
2292
- let r = wt(t), i = this.nextRequestId;
2292
+ let r = Ct(t), i = this.nextRequestId;
2293
2293
  this._nextRequestId++, this.tryReportLongDisconnect();
2294
2294
  let a = {
2295
2295
  type: "Action",
2296
2296
  requestId: i,
2297
2297
  udfPath: e,
2298
2298
  componentPath: n,
2299
- args: [Jt(r)]
2299
+ args: [qt(r)]
2300
2300
  }, o = this.webSocketManager.sendMessage(a);
2301
2301
  return this.requestManager.request(a, o);
2302
2302
  }
@@ -2331,7 +2331,7 @@ var Ar = Object.defineProperty, jr = (e, t, n) => t in e ? Ar(e, t, {
2331
2331
  method: "POST",
2332
2332
  headers: {
2333
2333
  "Content-Type": "application/json",
2334
- "Convex-Client": `npm-${ft}`
2334
+ "Convex-Client": `npm-${dt}`
2335
2335
  },
2336
2336
  body: JSON.stringify({ event: "LongWebsocketDisconnect" })
2337
2337
  }).then((e) => {
@@ -2356,10 +2356,10 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2356
2356
  value: n
2357
2357
  }) : e[t] = n, Ir = (e, t, n) => Fr(e, typeof t == "symbol" ? t : t + "", n), Lr = class {
2358
2358
  constructor(e, t) {
2359
- this.client = e, this.onTransition = t, Ir(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Ir(this, "lastTransitionTs"), this.lastTransitionTs = Un.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
2359
+ this.client = e, this.onTransition = t, Ir(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Ir(this, "lastTransitionTs"), this.lastTransitionTs = Hn.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
2360
2360
  }
2361
2361
  subscribe(e, t, n) {
2362
- let r = hn(e), i = _n(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
2362
+ let r = mn(e), i = gn(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
2363
2363
  return o ? (o.numSubscribers += 1, {
2364
2364
  paginatedQueryToken: i,
2365
2365
  unsubscribe: a
@@ -2381,7 +2381,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2381
2381
  });
2382
2382
  }
2383
2383
  localQueryResult(e, t, n) {
2384
- let r = _n(hn(e), t, n);
2384
+ let r = gn(mn(e), t, n);
2385
2385
  return this.localQueryResultByToken(r);
2386
2386
  }
2387
2387
  localQueryResultByToken(e) {
@@ -2539,7 +2539,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2539
2539
  value: n
2540
2540
  }) : e[t] = n, Br = (e, t, n) => zr(e, typeof t == "symbol" ? t : t + "", n), Vr, Hr = class {
2541
2541
  constructor(e, t = {}) {
2542
- Br(this, "listeners"), Br(this, "_client"), Br(this, "_paginatedClient"), Br(this, "callNewListenersWithCurrentValuesTimer"), Br(this, "_closed"), Br(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && Tt(e);
2542
+ Br(this, "listeners"), Br(this, "_client"), Br(this, "_paginatedClient"), Br(this, "callNewListenersWithCurrentValuesTimer"), Br(this, "_closed"), Br(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && wt(e);
2543
2543
  let { disabled: n, ...r } = t;
2544
2544
  this._closed = !1, this._disabled = !!n, Vr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = Vr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new Mr(e, () => {}, r), this._paginatedClient = new Lr(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
2545
2545
  }
@@ -2559,7 +2559,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2559
2559
  }
2560
2560
  onUpdate(e, t, n, r) {
2561
2561
  if (this.disabled) return this.createDisabledUnsubscribe();
2562
- let { queryToken: i, unsubscribe: a } = this.client.subscribe(Mn(e), t), o = {
2562
+ let { queryToken: i, unsubscribe: a } = this.client.subscribe(jn(e), t), o = {
2563
2563
  queryToken: i,
2564
2564
  callback: n,
2565
2565
  onError: r,
@@ -2584,7 +2584,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2584
2584
  let a = {
2585
2585
  initialNumItems: n.initialNumItems,
2586
2586
  id: -1
2587
- }, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(Mn(e), t, a), c = {
2587
+ }, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(jn(e), t, a), c = {
2588
2588
  queryToken: o,
2589
2589
  callback: r,
2590
2590
  onError: i,
@@ -2599,7 +2599,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2599
2599
  unsubscribe: () => {
2600
2600
  this.closed || (this.listeners.delete(c), s());
2601
2601
  },
2602
- getCurrentValue: () => this.paginatedClient.localQueryResult(Mn(e), t, a),
2602
+ getCurrentValue: () => this.paginatedClient.localQueryResult(jn(e), t, a),
2603
2603
  getQueryLogs: () => []
2604
2604
  }, u = l.unsubscribe;
2605
2605
  return Object.assign(u, l), u;
@@ -2637,7 +2637,7 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2637
2637
  _transition({ queries: e, paginatedQueries: t }, n = !1) {
2638
2638
  let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
2639
2639
  for (let e of this.listeners) {
2640
- let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = vn(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
2640
+ let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = _n(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
2641
2641
  if (r.includes(i) || n && !o && c) {
2642
2642
  e.hasEverRun = !0;
2643
2643
  let n;
@@ -2654,15 +2654,15 @@ var Pr = Object.defineProperty, Fr = (e, t, n) => t in e ? Pr(e, t, {
2654
2654
  }
2655
2655
  async mutation(e, t, n) {
2656
2656
  if (this.disabled) throw Error("ConvexClient is disabled");
2657
- return await this.client.mutation(Mn(e), t, n);
2657
+ return await this.client.mutation(jn(e), t, n);
2658
2658
  }
2659
2659
  async action(e, t) {
2660
2660
  if (this.disabled) throw Error("ConvexClient is disabled");
2661
- return await this.client.action(Mn(e), t);
2661
+ return await this.client.action(jn(e), t);
2662
2662
  }
2663
2663
  async query(e, t) {
2664
2664
  if (this.disabled) throw Error("ConvexClient is disabled");
2665
- let n = this.client.localQueryResult(Mn(e), t);
2665
+ let n = this.client.localQueryResult(jn(e), t);
2666
2666
  return n === void 0 ? new Promise((n, r) => {
2667
2667
  let { unsubscribe: i } = this.onUpdate(e, t, (e) => {
2668
2668
  i(), n(e);
@@ -2685,10 +2685,10 @@ function Ur(e) {
2685
2685
  return e;
2686
2686
  }
2687
2687
  function Wr(e, t) {
2688
- let n = H(e);
2688
+ let n = U(e);
2689
2689
  n.current = e;
2690
- let [r, i] = B(() => typeof t == "function" ? t() : t);
2691
- return [r, U((e) => {
2690
+ let [r, i] = V(() => typeof t == "function" ? t() : t);
2691
+ return [r, W((e) => {
2692
2692
  i((t) => {
2693
2693
  let r = n.current[t.kind]?.[e.type];
2694
2694
  return r ? r(t, e) : t;
@@ -2767,9 +2767,9 @@ var Xr = Ur({
2767
2767
  }
2768
2768
  });
2769
2769
  function Zr() {
2770
- let [e, t] = Wr(Xr, { kind: "idle" }), n = e, r = H(n);
2770
+ let [e, t] = Wr(Xr, { kind: "idle" }), n = e, r = U(n);
2771
2771
  r.current = n;
2772
- let i = U(async (e, n) => {
2772
+ let i = W(async (e, n) => {
2773
2773
  if (r.current.kind !== "pending") {
2774
2774
  t({ type: "start" });
2775
2775
  try {
@@ -2787,7 +2787,7 @@ function Zr() {
2787
2787
  return;
2788
2788
  }
2789
2789
  }
2790
- }, [t]), a = U(() => t({ type: "reset" }), [t]);
2790
+ }, [t]), a = W(() => t({ type: "reset" }), [t]);
2791
2791
  return {
2792
2792
  state: n,
2793
2793
  isIdle: n.kind === "idle",
@@ -3144,7 +3144,7 @@ function ki(e) {
3144
3144
  });
3145
3145
  },
3146
3146
  listThreads(e, t) {
3147
- return n(`/widget/threads?route=${encodeURIComponent(e)}`, { method: "GET" }, {
3147
+ return n(`/widget/threads?${`route=${encodeURIComponent(e)}${t?.includeResolved ? "&includeResolved=1" : ""}`}`, { method: "GET" }, {
3148
3148
  timeoutMs: Di,
3149
3149
  category: "read",
3150
3150
  operation: "list-threads",
@@ -3310,7 +3310,7 @@ async function Mi(e, t) {
3310
3310
  return i;
3311
3311
  } catch (e) {
3312
3312
  let t = e?.name;
3313
- return t !== "TypeError" && t !== "TimeoutError" && I(e, { context: "cookie-probe" }), !1;
3313
+ return t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "cookie-probe" }), !1;
3314
3314
  }
3315
3315
  }
3316
3316
  //#endregion
@@ -3321,7 +3321,7 @@ function Fi(e) {
3321
3321
  try {
3322
3322
  e();
3323
3323
  } catch (e) {
3324
- I(e, { context: "history-observer-listener" });
3324
+ L(e, { context: "history-observer-listener" });
3325
3325
  }
3326
3326
  });
3327
3327
  }
@@ -3533,7 +3533,7 @@ async function ta(e) {
3533
3533
  s = await o();
3534
3534
  } catch (e) {
3535
3535
  let t = e?.name;
3536
- return t !== "TypeError" && t !== "TimeoutError" && I(e, { context: "popup-exchange" }), Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
3536
+ return t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "popup-exchange" }), Promise.reject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to start popup exchange"));
3537
3537
  }
3538
3538
  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}`);
3539
3539
  if (!u) return Promise.reject(/* @__PURE__ */ Error("Popup blocked. Allow popups for this site to sign in"));
@@ -3554,7 +3554,7 @@ async function ta(e) {
3554
3554
  r = !0, o().then((e) => {
3555
3555
  u.closed || (u.location.href = e);
3556
3556
  }).catch((e) => {
3557
- a(), I(e, { context: "popup-exchange-remint" }), t(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to restart sign-in"));
3557
+ a(), L(e, { context: "popup-exchange-remint" }), t(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to restart sign-in"));
3558
3558
  }).finally(() => {
3559
3559
  r = !1;
3560
3560
  });
@@ -3603,7 +3603,7 @@ async function ta(e) {
3603
3603
  });
3604
3604
  if (!e.ok) {
3605
3605
  let t = /* @__PURE__ */ Error(`Failed to install widget cookies (${e.status})`);
3606
- throw I(t, { context: "install-cookies" }), t;
3606
+ throw L(t, { context: "install-cookies" }), t;
3607
3607
  }
3608
3608
  return {
3609
3609
  ...d,
@@ -4102,7 +4102,7 @@ function Do(e) {
4102
4102
  if (e.redactSelector) try {
4103
4103
  for (let t of document.querySelectorAll(e.redactSelector)) Eo(t) || r(t);
4104
4104
  } catch (e) {
4105
- I(e, { context: "screenshot-redact-selector" });
4105
+ L(e, { context: "screenshot-redact-selector" });
4106
4106
  }
4107
4107
  if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) Eo(e) || r(e);
4108
4108
  return n;
@@ -4152,7 +4152,7 @@ async function Ao(e, t, n) {
4152
4152
  redactedSelectors: s
4153
4153
  } : null;
4154
4154
  } catch (e) {
4155
- return I(e, { context: "screenshot-capture" }), null;
4155
+ return L(e, { context: "screenshot-capture" }), null;
4156
4156
  }
4157
4157
  }
4158
4158
  function jo(e, t) {
@@ -4175,7 +4175,7 @@ async function No(e) {
4175
4175
  t = t == null ? a.size : Math.min(t, a.size);
4176
4176
  }
4177
4177
  }
4178
- return I(/* @__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 ${xo})`), { context: "screenshot-encode" }), null;
4178
+ return L(/* @__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 ${xo})`), { context: "screenshot-encode" }), null;
4179
4179
  }
4180
4180
  function Po(e, t, n, r) {
4181
4181
  let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
@@ -4209,7 +4209,7 @@ var Fo = Ur({
4209
4209
  }), Io = 18e5, Lo = 6e4, Ro = 6e4;
4210
4210
  function zo(e) {
4211
4211
  let [t, n] = Wr(Fo, { kind: "idle" });
4212
- return V(() => {
4212
+ return H(() => {
4213
4213
  let t = !1, r = null;
4214
4214
  async function i() {
4215
4215
  try {
@@ -4224,7 +4224,7 @@ function zo(e) {
4224
4224
  r = setTimeout(i, o);
4225
4225
  } catch (e) {
4226
4226
  if (t) return;
4227
- e?.name !== "TypeError" && I(e, { context: "subscription-token-refresh" }), r = setTimeout(i, Ro);
4227
+ e?.name !== "TypeError" && L(e, { context: "subscription-token-refresh" }), r = setTimeout(i, Ro);
4228
4228
  }
4229
4229
  }
4230
4230
  return i(), () => {
@@ -4265,7 +4265,7 @@ async function Bo(e) {
4265
4265
  };
4266
4266
  } catch (e) {
4267
4267
  let t = e?.name;
4268
- return t !== "AbortError" && t !== "TypeError" && t !== "TimeoutError" && I(e, { context: "refresh-token" }), null;
4268
+ return t !== "AbortError" && t !== "TypeError" && t !== "TimeoutError" && L(e, { context: "refresh-token" }), null;
4269
4269
  }
4270
4270
  }
4271
4271
  //#endregion
@@ -4273,7 +4273,7 @@ async function Bo(e) {
4273
4273
  var Vo = 6e4, Ho = 500;
4274
4274
  function Uo(e, t, n, r, i) {
4275
4275
  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;
4276
- V(() => {
4276
+ H(() => {
4277
4277
  if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
4278
4278
  let u = Date.now();
4279
4279
  if (c <= u) {
@@ -4597,8 +4597,8 @@ function ms({ size: e = 16 }) {
4597
4597
  //#endregion
4598
4598
  //#region src/runtime/ui/identity-menu.tsx
4599
4599
  function hs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, onSignIn: a, onSignOut: o, onForgetMe: s }) {
4600
- let [c, l] = B(!1), [u, d] = B(!1), [f, p] = B(!1), m = H(null);
4601
- V(() => {
4600
+ let [c, l] = V(!1), [u, d] = V(!1), [f, p] = V(!1), m = U(null);
4601
+ H(() => {
4602
4602
  if (!c) return;
4603
4603
  function e(e) {
4604
4604
  let t = m.current;
@@ -4610,10 +4610,10 @@ function hs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
4610
4610
  return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
4611
4611
  document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
4612
4612
  };
4613
- }, [c]), V(() => {
4613
+ }, [c]), H(() => {
4614
4614
  c || (d(!1), p(!1));
4615
4615
  }, [c]);
4616
- let h = Yi(e), g = gs(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = B(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";
4616
+ let h = Yi(e), g = gs(h), _ = e.kind === "verified", v = e.kind === "verified" ? e.identity.image : void 0, [y, b] = V(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";
4617
4617
  return /* @__PURE__ */ Q("div", {
4618
4618
  ref: m,
4619
4619
  style: {
@@ -4739,11 +4739,11 @@ function gs(e) {
4739
4739
  //#endregion
4740
4740
  //#region src/runtime/use-drag.ts
4741
4741
  function _s(e) {
4742
- let t = H(e);
4742
+ let t = U(e);
4743
4743
  t.current = e;
4744
- let [n, r] = B(!1);
4744
+ let [n, r] = V(!1);
4745
4745
  return {
4746
- onPointerDown: U((e) => {
4746
+ onPointerDown: W((e) => {
4747
4747
  let n = t.current;
4748
4748
  if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
4749
4749
  let i = e.currentTarget;
@@ -4796,7 +4796,7 @@ var ys = [
4796
4796
  "[tabindex]:not([tabindex=\"-1\"])"
4797
4797
  ].join(",");
4798
4798
  function bs(e, t) {
4799
- V(() => {
4799
+ H(() => {
4800
4800
  if (!t) return;
4801
4801
  let n = e.current;
4802
4802
  if (!n) return;
@@ -4813,8 +4813,8 @@ function bs(e, t) {
4813
4813
  //#endregion
4814
4814
  //#region src/runtime/use-object-url.ts
4815
4815
  function xs(e) {
4816
- let [t, n] = B(null);
4817
- return V(() => {
4816
+ let [t, n] = V(null);
4817
+ return H(() => {
4818
4818
  if (!e) {
4819
4819
  n(null);
4820
4820
  return;
@@ -4826,8 +4826,8 @@ function xs(e) {
4826
4826
  //#endregion
4827
4827
  //#region src/runtime/ui/author-prompt.tsx
4828
4828
  function Ss({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4829
- let [o, s] = B(""), [c, l] = B(""), u = H(null);
4830
- V(() => {
4829
+ let [o, s] = V(""), [c, l] = V(""), u = U(null);
4830
+ H(() => {
4831
4831
  u.current?.focus();
4832
4832
  }, []);
4833
4833
  function d(n) {
@@ -5113,22 +5113,22 @@ function Hs() {
5113
5113
  //#endregion
5114
5114
  //#region src/runtime/ui/mentions.tsx
5115
5115
  function Us({ body: e, mentions: t, trailing: n }) {
5116
- let r = it(() => new Set(t), [t]);
5116
+ let r = rt(() => new Set(t), [t]);
5117
5117
  return /* @__PURE__ */ Q("p", {
5118
5118
  class: "markup-comment-body",
5119
- children: [it(() => Kr(e), [e]).map((e, t) => e.type === "mention" && r.has(e.userId) ? /* @__PURE__ */ Q("span", {
5119
+ children: [rt(() => Kr(e), [e]).map((e, t) => e.type === "mention" && r.has(e.userId) ? /* @__PURE__ */ Q("span", {
5120
5120
  class: "markup-mention-chip",
5121
5121
  children: ["@", e.name]
5122
5122
  }, t) : /* @__PURE__ */ Q("span", { children: e.type === "mention" ? `@${e.name}` : e.value }, t)), n]
5123
5123
  });
5124
5124
  }
5125
5125
  function Ws(e) {
5126
- let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = B(0), s = it(() => {
5126
+ let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = V(0), s = rt(() => {
5127
5127
  if (!n) return [];
5128
5128
  let e = n.query.toLowerCase();
5129
5129
  return t.filter((t) => t.name.toLowerCase().includes(e)).slice(0, 6);
5130
5130
  }, [n, t]);
5131
- V(() => {
5131
+ H(() => {
5132
5132
  o((e) => e >= s.length ? 0 : e);
5133
5133
  }, [s]);
5134
5134
  function c(e) {
@@ -5177,12 +5177,12 @@ function Gs({ items: e, highlight: t, setHighlight: n, onSelect: r }) {
5177
5177
  //#endregion
5178
5178
  //#region src/runtime/ui/mention-input.tsx
5179
5179
  function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
5180
- let u = H(null), d = H(null), [f, p] = B(null), m = H(t);
5180
+ let u = U(null), d = U(null), [f, p] = V(null), m = U(t);
5181
5181
  m.current = t;
5182
- let h = H(r);
5182
+ let h = U(r);
5183
5183
  h.current = r;
5184
- let g = H(e);
5185
- rt(() => {
5184
+ let g = U(e);
5185
+ nt(() => {
5186
5186
  let e = u.current;
5187
5187
  if (!e) return;
5188
5188
  let t = Bs(e, {
@@ -5195,13 +5195,13 @@ function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5195
5195
  return d.current = t, () => {
5196
5196
  t.destroy(), d.current = null;
5197
5197
  };
5198
- }, []), rt(() => {
5198
+ }, []), nt(() => {
5199
5199
  if (l) return l.current = { focus: () => d.current?.focus() }, () => {
5200
5200
  l.current = null;
5201
5201
  };
5202
- }, [l]), rt(() => {
5202
+ }, [l]), nt(() => {
5203
5203
  s && d.current?.focus();
5204
- }, [s]), rt(() => {
5204
+ }, [s]), nt(() => {
5205
5205
  let t = d.current;
5206
5206
  t && t.getValue() !== e && t.setValue(e);
5207
5207
  }, [e]);
@@ -5238,8 +5238,8 @@ function Ks({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
5238
5238
  //#region src/runtime/ui/composer.tsx
5239
5239
  var qs = 4e3;
5240
5240
  function Js({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, onDirtyChange: s, members: c }) {
5241
- let [l, u] = B(""), d = H(null), f = H(!1);
5242
- V(() => {
5241
+ let [l, u] = V(""), d = U(null), f = U(!1);
5242
+ H(() => {
5243
5243
  f.current && !i && !a && (u(""), s?.(!1), d.current?.focus()), f.current = i;
5244
5244
  }, [
5245
5245
  i,
@@ -5329,71 +5329,69 @@ function Js({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
5329
5329
  //#region src/runtime/ui/new-thread-popover.tsx
5330
5330
  var Ys = "https://markup.pixelmatters.dev/docs/install#9-screenshots-privacy";
5331
5331
  function Xs({ 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: _ }) {
5332
- let v = H(null);
5332
+ let v = U(null);
5333
5333
  bs(v, !0);
5334
- let y = H(!1), [b, x] = B(!1), C = U(() => {
5335
- y.current ? x(!0) : _();
5336
- }, [_]), w = U(() => {
5337
- x(!1), v.current?.querySelector(".markup-mention-input")?.focus();
5338
- }, []), [T, E] = B(!1), [D, O] = B(!1), ee = xs(c), [k, A] = B(null), { onPointerDown: j, isDragging: te } = _s({
5334
+ let y = U(!1), b = U(!1), [x, C] = V(!1), w = W((e) => {
5335
+ b.current = e, C(e);
5336
+ }, []), T = W(() => {
5337
+ b.current || (y.current ? w(!0) : _());
5338
+ }, [_, w]), E = W(() => {
5339
+ w(!1), v.current?.querySelector(".markup-mention-input")?.focus();
5340
+ }, [w]), [D, O] = V(!1), [k, A] = V(!1), j = xs(c), M = U(null), [N, P] = V(null), { onPointerDown: ee, isDragging: te } = _s({
5339
5341
  targetRef: v,
5340
5342
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
5341
- onMove: A
5343
+ onMove: P
5342
5344
  });
5343
- V(() => {
5345
+ H(() => {
5344
5346
  let e = v.current;
5345
5347
  if (e && typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
5346
5348
  e.showPopover();
5347
5349
  } catch {}
5348
- }, []), V(() => {
5350
+ }, []), H(() => {
5349
5351
  let e = v.current;
5350
5352
  if (!e) return;
5351
5353
  function t(t) {
5352
5354
  if (!t.composedPath().includes(e)) {
5353
- if (b) {
5355
+ if (b.current) {
5354
5356
  t.preventDefault(), t.stopPropagation();
5355
5357
  return;
5356
5358
  }
5357
- y.current && (t.preventDefault(), t.stopPropagation()), C();
5359
+ y.current && (t.preventDefault(), t.stopPropagation()), T();
5358
5360
  }
5359
5361
  }
5360
5362
  function n(e) {
5361
- e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), b ? w() : C());
5363
+ e.key !== "Escape" || e.defaultPrevented || M.current?.open || (e.preventDefault(), b.current ? E() : T());
5362
5364
  }
5363
5365
  return document.addEventListener("click", t, !0), document.addEventListener("keydown", n), () => {
5364
5366
  document.removeEventListener("click", t, !0), document.removeEventListener("keydown", n);
5365
5367
  };
5366
- }, [
5367
- b,
5368
- C,
5369
- w
5370
- ]), V(() => {
5371
- b && v.current?.querySelector(".markup-discard-confirm-keep")?.focus();
5372
- }, [b]);
5373
- let M = Zs(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), ne = Zs(t - window.scrollY - 16, 12, window.innerHeight - 220), re = typeof window < "u" ? window.location.href : "", ie = c != null, ae = l || ie || u, oe = T && ie;
5368
+ }, [T, E]), H(() => {
5369
+ x && v.current?.querySelector(".markup-discard-confirm-keep")?.focus();
5370
+ }, [x]);
5371
+ let ne = Zs(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), re = Zs(t - window.scrollY - 16, 12, window.innerHeight - 220), ie = typeof window < "u" ? window.location.href : "", ae = c != null, oe = l || ae || u, se = D && ae;
5374
5372
  return /* @__PURE__ */ Q("div", {
5375
5373
  ref: v,
5376
- class: Z("markup-popover", k && "is-floating", te && "is-dragging"),
5374
+ class: Z("markup-popover", N && "is-floating", te && "is-dragging"),
5377
5375
  popover: "manual",
5378
5376
  style: {
5379
- "--markup-pop-x": `${k?.left ?? M}px`,
5380
- "--markup-pop-y": `${k?.top ?? ne}px`
5377
+ "--markup-pop-x": `${N?.left ?? ne}px`,
5378
+ "--markup-pop-y": `${N?.top ?? re}px`
5381
5379
  },
5382
5380
  role: "dialog",
5383
5381
  "aria-label": "New markup",
5384
5382
  children: [
5385
5383
  /* @__PURE__ */ Q("header", {
5386
5384
  class: "markup-popover-header",
5387
- onPointerDown: j,
5385
+ onPointerDown: ee,
5388
5386
  children: [/* @__PURE__ */ Q("span", {
5389
5387
  class: "markup-popover-title",
5390
- title: re,
5388
+ title: ie,
5391
5389
  children: "New comment"
5392
5390
  }), /* @__PURE__ */ Q("button", {
5393
5391
  type: "button",
5394
5392
  class: "markup-icon-btn",
5395
5393
  "aria-label": "Discard pin",
5396
- onClick: C,
5394
+ onClick: T,
5397
5395
  children: /* @__PURE__ */ Q(qo, { size: 16 })
5398
5396
  })]
5399
5397
  }),
@@ -5427,66 +5425,80 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5427
5425
  submitLabel: "Post markup",
5428
5426
  isPending: o,
5429
5427
  error: s,
5430
- onSubmit: (e) => g(e, T && ie),
5428
+ onSubmit: (e) => g(e, D && ae),
5431
5429
  onDirtyChange: (e) => {
5432
5430
  y.current = e;
5433
5431
  },
5434
5432
  members: p
5435
5433
  }),
5436
- ae ? /* @__PURE__ */ Q("div", {
5437
- class: Z("markup-screenshot-row", u && "is-failed", oe && "is-attached"),
5434
+ oe ? /* @__PURE__ */ Q("div", {
5435
+ class: Z("markup-screenshot-row", u && "is-failed", se && "is-attached"),
5438
5436
  children: [/* @__PURE__ */ Q("div", {
5439
5437
  class: "markup-screenshot-row-head",
5440
- children: [l ? /* @__PURE__ */ Q("span", {
5441
- class: "markup-screenshot-status",
5442
- children: [
5443
- /* @__PURE__ */ Q("input", {
5444
- type: "checkbox",
5445
- class: "markup-screenshot-checkbox",
5446
- disabled: !0
5447
- }),
5448
- /* @__PURE__ */ Q(Zo, { size: 12 }),
5449
- /* @__PURE__ */ Q("span", { children: "Capturing…" })
5450
- ]
5451
- }) : u ? /* @__PURE__ */ Q("span", {
5452
- class: "markup-screenshot-status",
5453
- title: "This page has something the capture can't read, often a third-party image. Your comment will post without a screenshot.",
5454
- children: [/* @__PURE__ */ Q(Zo, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
5455
- }) : /* @__PURE__ */ Q("label", {
5456
- class: "markup-screenshot-toggle",
5457
- children: [
5458
- /* @__PURE__ */ Q("input", {
5459
- type: "checkbox",
5460
- class: "markup-screenshot-checkbox",
5461
- checked: T,
5462
- onChange: (e) => E(e.currentTarget.checked)
5463
- }),
5464
- /* @__PURE__ */ Q(Zo, { size: 12 }),
5465
- /* @__PURE__ */ Q("span", { children: "Attach screenshot" }),
5466
- oe && ee ? /* @__PURE__ */ Q("img", {
5438
+ children: [
5439
+ l ? /* @__PURE__ */ Q("span", {
5440
+ class: "markup-screenshot-status",
5441
+ children: [
5442
+ /* @__PURE__ */ Q("input", {
5443
+ type: "checkbox",
5444
+ class: "markup-screenshot-checkbox",
5445
+ disabled: !0
5446
+ }),
5447
+ /* @__PURE__ */ Q(Zo, { size: 12 }),
5448
+ /* @__PURE__ */ Q("span", { children: "Capturing…" })
5449
+ ]
5450
+ }) : u ? /* @__PURE__ */ Q("span", {
5451
+ class: "markup-screenshot-status",
5452
+ title: "This page has something the capture can't read, often a third-party image. Your comment will post without a screenshot.",
5453
+ children: [/* @__PURE__ */ Q(Zo, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
5454
+ }) : /* @__PURE__ */ Q("label", {
5455
+ class: "markup-screenshot-toggle",
5456
+ children: [
5457
+ /* @__PURE__ */ Q("input", {
5458
+ type: "checkbox",
5459
+ class: "markup-screenshot-checkbox",
5460
+ checked: D,
5461
+ onChange: (e) => O(e.currentTarget.checked)
5462
+ }),
5463
+ /* @__PURE__ */ Q(Zo, { size: 12 }),
5464
+ /* @__PURE__ */ Q("span", { children: "Attach screenshot" })
5465
+ ]
5466
+ }),
5467
+ se && j ? /* @__PURE__ */ Q("a", {
5468
+ class: "markup-screenshot-thumb-link",
5469
+ href: j,
5470
+ target: "_blank",
5471
+ rel: "noopener",
5472
+ title: "Preview screenshot",
5473
+ "aria-label": "Preview screenshot",
5474
+ onClick: (e) => {
5475
+ e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), M.current?.showModal());
5476
+ },
5477
+ children: /* @__PURE__ */ Q("img", {
5467
5478
  class: "markup-screenshot-thumb",
5468
- src: ee,
5469
- alt: "Screenshot preview"
5470
- }) : null
5471
- ]
5472
- }), oe && d > 0 ? /* @__PURE__ */ Q("button", {
5473
- type: "button",
5474
- class: "markup-screenshot-redacted-chip",
5475
- "aria-expanded": D,
5476
- onClick: () => O((e) => !e),
5477
- children: [
5478
- /* @__PURE__ */ Q("em", {
5479
- class: "markup-screenshot-redacted-arrow",
5480
- children: D ? "▾" : "▸"
5481
- }),
5482
- d,
5483
- " ",
5484
- d === 1 ? "field" : "fields",
5485
- " ",
5486
- "redacted"
5487
- ]
5488
- }) : null]
5489
- }), oe ? /* @__PURE__ */ Q(S, { children: [D && d > 0 ? /* @__PURE__ */ Q("div", {
5479
+ src: j,
5480
+ alt: ""
5481
+ })
5482
+ }) : null,
5483
+ se && d > 0 ? /* @__PURE__ */ Q("button", {
5484
+ type: "button",
5485
+ class: "markup-screenshot-redacted-chip",
5486
+ "aria-expanded": k,
5487
+ onClick: () => A((e) => !e),
5488
+ children: [
5489
+ /* @__PURE__ */ Q("em", {
5490
+ class: "markup-screenshot-redacted-arrow",
5491
+ children: k ? "▾" : "▸"
5492
+ }),
5493
+ d,
5494
+ " ",
5495
+ d === 1 ? "field" : "fields",
5496
+ " ",
5497
+ "redacted"
5498
+ ]
5499
+ }) : null
5500
+ ]
5501
+ }), se ? /* @__PURE__ */ Q(S, { children: [k && d > 0 ? /* @__PURE__ */ Q("div", {
5490
5502
  class: "markup-screenshot-redacted-list",
5491
5503
  children: f.map((e) => /* @__PURE__ */ Q("code", {
5492
5504
  class: "markup-screenshot-redacted-selector",
@@ -5509,7 +5521,26 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5509
5521
  }) : null
5510
5522
  ]
5511
5523
  }),
5512
- b ? /* @__PURE__ */ Q("div", {
5524
+ se && j ? /* @__PURE__ */ Q("dialog", {
5525
+ ref: M,
5526
+ class: "markup-lightbox",
5527
+ onClick: () => M.current?.close(),
5528
+ children: [/* @__PURE__ */ Q("button", {
5529
+ type: "button",
5530
+ class: "markup-lightbox-close markup-icon-btn",
5531
+ "aria-label": "Close screenshot",
5532
+ onClick: (e) => {
5533
+ e.stopPropagation(), M.current?.close();
5534
+ },
5535
+ children: /* @__PURE__ */ Q(qo, { size: 16 })
5536
+ }), /* @__PURE__ */ Q("img", {
5537
+ class: "markup-lightbox-img",
5538
+ src: j,
5539
+ alt: "Screenshot preview",
5540
+ onClick: (e) => e.stopPropagation()
5541
+ })]
5542
+ }) : null,
5543
+ x ? /* @__PURE__ */ Q("div", {
5513
5544
  class: "markup-discard-confirm",
5514
5545
  role: "alertdialog",
5515
5546
  "aria-labelledby": "markup-discard-confirm-title",
@@ -5530,7 +5561,7 @@ function Xs({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
5530
5561
  children: [/* @__PURE__ */ Q("button", {
5531
5562
  type: "button",
5532
5563
  class: "markup-btn markup-btn-primary markup-discard-confirm-keep",
5533
- onClick: w,
5564
+ onClick: E,
5534
5565
  children: "Keep editing"
5535
5566
  }), /* @__PURE__ */ Q("button", {
5536
5567
  type: "button",
@@ -5671,33 +5702,33 @@ function $s(e) {
5671
5702
  //#endregion
5672
5703
  //#region src/runtime/use-theme.ts
5673
5704
  function ec() {
5674
- let [, e] = B(0);
5675
- return V(() => He(() => e((e) => e + 1)), []), {
5676
- mode: ze(),
5677
- resolved: Be(),
5678
- set: Ve
5705
+ let [, e] = V(0);
5706
+ return H(() => Ve(() => e((e) => e + 1)), []), {
5707
+ mode: Re(),
5708
+ resolved: ze(),
5709
+ set: Be
5679
5710
  };
5680
5711
  }
5681
5712
  //#endregion
5682
5713
  //#region src/runtime/ui/overflow-menu.tsx
5683
- function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, onOpenPrivacy: a, onOpenShortcuts: o, onHideForSession: s, version: c, dashboardUrl: l }) {
5684
- let [u, d] = B(!1), f = H(null), p = ec();
5685
- V(() => {
5686
- if (!u) return;
5714
+ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, showResolved: a, onToggleShowResolved: o, onOpenPrivacy: s, onOpenShortcuts: c, onHideForSession: l, version: u, dashboardUrl: d }) {
5715
+ let [f, p] = V(!1), m = U(null), h = ec();
5716
+ H(() => {
5717
+ if (!f) return;
5687
5718
  function e(e) {
5688
- let t = f.current;
5689
- t && (e.composedPath().includes(t) || d(!1));
5719
+ let t = m.current;
5720
+ t && (e.composedPath().includes(t) || p(!1));
5690
5721
  }
5691
5722
  function t(e) {
5692
- e.key === "Escape" && d(!1);
5723
+ e.key === "Escape" && p(!1);
5693
5724
  }
5694
5725
  return document.addEventListener("click", e, !0), document.addEventListener("keydown", t), () => {
5695
5726
  document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
5696
5727
  };
5697
- }, [u]);
5698
- let m = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: h } = Wo();
5728
+ }, [f]);
5729
+ let g = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: _ } = Wo();
5699
5730
  return /* @__PURE__ */ Q("div", {
5700
- ref: f,
5731
+ ref: m,
5701
5732
  style: {
5702
5733
  position: "relative",
5703
5734
  display: "inline-flex"
@@ -5706,17 +5737,17 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5706
5737
  type: "button",
5707
5738
  class: "markup-tb-btn",
5708
5739
  "data-kind": "overflow",
5709
- "data-on": u ? "true" : void 0,
5740
+ "data-on": f ? "true" : void 0,
5710
5741
  "aria-haspopup": "menu",
5711
- "aria-expanded": u,
5742
+ "aria-expanded": f,
5712
5743
  "aria-label": "More options",
5713
5744
  title: "More",
5714
5745
  onClick: (e) => {
5715
- e.preventDefault(), e.stopPropagation(), d((e) => !e);
5746
+ e.preventDefault(), e.stopPropagation(), p((e) => !e);
5716
5747
  },
5717
5748
  children: /* @__PURE__ */ Q(is, { size: 16 })
5718
- }), u ? /* @__PURE__ */ Q("div", {
5719
- class: Z("markup-pop", m),
5749
+ }), f ? /* @__PURE__ */ Q("div", {
5750
+ class: Z("markup-pop", g),
5720
5751
  "data-pop": "overflow",
5721
5752
  role: "menu",
5722
5753
  children: [
@@ -5733,31 +5764,31 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5733
5764
  /* @__PURE__ */ Q("button", {
5734
5765
  type: "button",
5735
5766
  role: "radio",
5736
- "aria-checked": p.mode === "light",
5767
+ "aria-checked": h.mode === "light",
5737
5768
  "aria-label": "Light",
5738
5769
  title: "Light",
5739
- class: Z(p.mode === "light" && "is-on"),
5740
- onClick: () => p.set("light"),
5770
+ class: Z(h.mode === "light" && "is-on"),
5771
+ onClick: () => h.set("light"),
5741
5772
  children: /* @__PURE__ */ Q(as, { size: 14 })
5742
5773
  }),
5743
5774
  /* @__PURE__ */ Q("button", {
5744
5775
  type: "button",
5745
5776
  role: "radio",
5746
- "aria-checked": p.mode === "dark",
5777
+ "aria-checked": h.mode === "dark",
5747
5778
  "aria-label": "Dark",
5748
5779
  title: "Dark",
5749
- class: Z(p.mode === "dark" && "is-on"),
5750
- onClick: () => p.set("dark"),
5780
+ class: Z(h.mode === "dark" && "is-on"),
5781
+ onClick: () => h.set("dark"),
5751
5782
  children: /* @__PURE__ */ Q(os, { size: 14 })
5752
5783
  }),
5753
5784
  /* @__PURE__ */ Q("button", {
5754
5785
  type: "button",
5755
5786
  role: "radio",
5756
- "aria-checked": p.mode === "auto",
5757
- "aria-label": `Auto (currently ${p.resolved})`,
5758
- title: `Auto, currently ${p.resolved}`,
5759
- class: Z(p.mode === "auto" && "is-on"),
5760
- onClick: () => p.set("auto"),
5787
+ "aria-checked": h.mode === "auto",
5788
+ "aria-label": `Auto (currently ${h.resolved})`,
5789
+ title: `Auto, currently ${h.resolved}`,
5790
+ class: Z(h.mode === "auto" && "is-on"),
5791
+ onClick: () => h.set("auto"),
5761
5792
  children: /* @__PURE__ */ Q(ss, { size: 14 })
5762
5793
  })
5763
5794
  ]
@@ -5838,12 +5869,39 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5838
5869
  })
5839
5870
  ]
5840
5871
  }),
5872
+ /* @__PURE__ */ Q("button", {
5873
+ type: "button",
5874
+ role: "menuitemcheckbox",
5875
+ "aria-checked": a,
5876
+ class: "markup-menu-row",
5877
+ "data-on": a ? "true" : void 0,
5878
+ onClick: (e) => {
5879
+ e.preventDefault(), e.stopPropagation(), o();
5880
+ },
5881
+ children: [
5882
+ /* @__PURE__ */ Q("span", {
5883
+ class: "ic",
5884
+ children: /* @__PURE__ */ Q(Xo, { size: 16 })
5885
+ }),
5886
+ /* @__PURE__ */ Q("span", {
5887
+ class: "lbl",
5888
+ children: [/* @__PURE__ */ Q("span", { children: "Show resolved threads" }), /* @__PURE__ */ Q("span", {
5889
+ class: "sub",
5890
+ children: "Read-only, most recent first"
5891
+ })]
5892
+ }),
5893
+ /* @__PURE__ */ Q("span", {
5894
+ class: "switch",
5895
+ "aria-hidden": "true"
5896
+ })
5897
+ ]
5898
+ }),
5841
5899
  /* @__PURE__ */ Q("button", {
5842
5900
  type: "button",
5843
5901
  role: "menuitem",
5844
5902
  class: "markup-menu-row",
5845
5903
  onClick: () => {
5846
- d(!1), a();
5904
+ p(!1), s();
5847
5905
  },
5848
5906
  children: [/* @__PURE__ */ Q("span", {
5849
5907
  class: "ic",
@@ -5858,7 +5916,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5858
5916
  role: "menuitem",
5859
5917
  class: "markup-menu-row",
5860
5918
  onClick: () => {
5861
- d(!1), o();
5919
+ p(!1), c();
5862
5920
  },
5863
5921
  children: [/* @__PURE__ */ Q("span", {
5864
5922
  class: "ic",
@@ -5874,7 +5932,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5874
5932
  role: "menuitem",
5875
5933
  class: "markup-menu-row",
5876
5934
  onClick: () => {
5877
- d(!1), s();
5935
+ p(!1), l();
5878
5936
  },
5879
5937
  children: [
5880
5938
  /* @__PURE__ */ Q("span", {
@@ -5887,13 +5945,13 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5887
5945
  }),
5888
5946
  /* @__PURE__ */ Q("span", {
5889
5947
  class: "right",
5890
- children: [h, " ."]
5948
+ children: [_, " ."]
5891
5949
  })
5892
5950
  ]
5893
5951
  }),
5894
5952
  /* @__PURE__ */ Q("a", {
5895
5953
  class: "markup-brand-line",
5896
- href: l ?? "https://markup.dev",
5954
+ href: d ?? "https://markup.dev",
5897
5955
  target: "_blank",
5898
5956
  rel: "noopener noreferrer",
5899
5957
  children: [
@@ -5901,7 +5959,7 @@ function tc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
5901
5959
  /* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
5902
5960
  /* @__PURE__ */ Q("span", {
5903
5961
  class: "ver",
5904
- children: ["v", c]
5962
+ children: ["v", u]
5905
5963
  })
5906
5964
  ]
5907
5965
  })
@@ -5975,8 +6033,8 @@ function ic() {
5975
6033
  //#endregion
5976
6034
  //#region src/runtime/ui/panel-popover.tsx
5977
6035
  function ac({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i, children: a }) {
5978
- let o = H(null);
5979
- return V(() => {
6036
+ let o = U(null);
6037
+ return H(() => {
5980
6038
  function e(e) {
5981
6039
  let t = o.current;
5982
6040
  if (!t) return;
@@ -6004,23 +6062,23 @@ function ac({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i,
6004
6062
  }
6005
6063
  //#endregion
6006
6064
  //#region src/runtime/ui/pin.tsx
6007
- function oc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
6008
- let o = t - window.scrollY, s = e - window.scrollX;
6065
+ function oc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClosed: a = !1, onClick: o }) {
6066
+ let s = t - window.scrollY, c = e - window.scrollX;
6009
6067
  return /* @__PURE__ */ Q("button", {
6010
6068
  type: "button",
6011
- class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved"),
6069
+ class: Z("markup-pin", r && "is-active is-anchor", i && "is-unresolved", a && "is-closed"),
6012
6070
  style: {
6013
- top: `${o}px`,
6014
- left: `${s}px`
6071
+ top: `${s}px`,
6072
+ left: `${c}px`
6015
6073
  },
6016
6074
  popovertarget: "markup-thread-popover",
6017
6075
  popovertargetaction: "show",
6018
- onClick: a,
6019
- "aria-label": `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
6020
- title: `Open feedback thread (${n} comment${n === 1 ? "" : "s"})`,
6076
+ onClick: o,
6077
+ "aria-label": `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
6078
+ title: `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
6021
6079
  children: /* @__PURE__ */ Q("span", {
6022
6080
  class: "markup-pin-num",
6023
- children: n
6081
+ children: a ? /* @__PURE__ */ Q(Xo, { size: 14 }) : n
6024
6082
  })
6025
6083
  });
6026
6084
  }
@@ -6042,22 +6100,39 @@ function sc({ pageX: e, pageY: t }) {
6042
6100
  //#endregion
6043
6101
  //#region src/runtime/ui/placement-overlay.tsx
6044
6102
  function cc({ onPlace: e, onCancel: t }) {
6045
- rt(() => {
6046
- function e(e) {
6103
+ let n = U(null);
6104
+ return nt(() => {
6105
+ let r = n.current?.getRootNode() ?? null, i = (e) => r !== null && e.composedPath().includes(r);
6106
+ function a(e) {
6047
6107
  e.key === "Escape" && t();
6048
6108
  }
6049
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
6050
- }, [t]);
6051
- function n(t) {
6052
- t.stopPropagation(), t.preventDefault(), e(vi(t, document.elementsFromPoint(t.clientX, t.clientY).find((e) => !e.shadowRoot) ?? null), t.clientX, t.clientY);
6053
- }
6054
- function r(e) {
6055
- e.preventDefault(), e.stopPropagation();
6056
- }
6057
- return /* @__PURE__ */ Q("div", {
6109
+ function o(e) {
6110
+ i(e) || (e.preventDefault(), e.stopPropagation());
6111
+ }
6112
+ function s(t) {
6113
+ i(t) || (t.preventDefault(), t.stopPropagation(), e(vi(t), t.clientX, t.clientY));
6114
+ }
6115
+ let c = { capture: !0 }, l = [
6116
+ "pointerdown",
6117
+ "pointerup",
6118
+ "mousedown",
6119
+ "mouseup",
6120
+ "dblclick",
6121
+ "auxclick",
6122
+ "contextmenu"
6123
+ ];
6124
+ window.addEventListener("keydown", a);
6125
+ for (let e of l) window.addEventListener(e, o, c);
6126
+ window.addEventListener("click", s, c);
6127
+ let u = lc();
6128
+ return () => {
6129
+ window.removeEventListener("keydown", a);
6130
+ for (let e of l) window.removeEventListener(e, o, c);
6131
+ window.removeEventListener("click", s, c), u();
6132
+ };
6133
+ }, [e, t]), /* @__PURE__ */ Q("div", {
6058
6134
  class: "markup-placement-overlay",
6059
- onPointerDown: r,
6060
- onClick: n,
6135
+ ref: n,
6061
6136
  role: "presentation",
6062
6137
  children: /* @__PURE__ */ Q("div", {
6063
6138
  class: "markup-placement-cursor-help",
@@ -6065,10 +6140,21 @@ function cc({ onPlace: e, onCancel: t }) {
6065
6140
  })
6066
6141
  });
6067
6142
  }
6143
+ function lc() {
6144
+ let e = "html, html * { cursor: crosshair !important; }";
6145
+ if ("adoptedStyleSheets" in document && "replaceSync" in CSSStyleSheet.prototype) {
6146
+ let t = new CSSStyleSheet();
6147
+ return t.replaceSync(e), document.adoptedStyleSheets = [...document.adoptedStyleSheets, t], () => {
6148
+ document.adoptedStyleSheets = document.adoptedStyleSheets.filter((e) => e !== t);
6149
+ };
6150
+ }
6151
+ let t = document.createElement("style");
6152
+ return t.textContent = e, document.head.appendChild(t), () => t.remove();
6153
+ }
6068
6154
  //#endregion
6069
6155
  //#region src/runtime/ui/privacy-panel.tsx
6070
- function lc({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isForgettingMe: i, forgetMeError: a, onForgetMe: o, onClose: s }) {
6071
- let [c, l] = B(!1), u = Yi(e), d = e.kind === "verified", f = d ? e.identity.email : void 0, p = e.kind === "anon";
6156
+ function uc({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isForgettingMe: i, forgetMeError: a, onForgetMe: o, onClose: s }) {
6157
+ let [c, l] = V(!1), u = Yi(e), d = e.kind === "verified", f = d ? e.identity.email : void 0, p = e.kind === "anon";
6072
6158
  return /* @__PURE__ */ Q("div", {
6073
6159
  class: "markup-panel",
6074
6160
  children: [/* @__PURE__ */ Q("header", {
@@ -6167,7 +6253,7 @@ function lc({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isFo
6167
6253
  "Only ",
6168
6254
  /* @__PURE__ */ Q("span", {
6169
6255
  class: "markup-panel-mono",
6170
- children: uc(t)
6256
+ children: dc(t)
6171
6257
  }),
6172
6258
  ". 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."
6173
6259
  ]
@@ -6203,7 +6289,7 @@ function lc({ identity: e, apiUrl: t, autoCapture: n, autoCaptureLocked: r, isFo
6203
6289
  })]
6204
6290
  });
6205
6291
  }
6206
- function uc(e) {
6292
+ function dc(e) {
6207
6293
  try {
6208
6294
  return new URL(e).host;
6209
6295
  } catch {
@@ -6212,7 +6298,7 @@ function uc(e) {
6212
6298
  }
6213
6299
  //#endregion
6214
6300
  //#region src/runtime/ui/shortcuts-panel.tsx
6215
- function dc({ onClose: e }) {
6301
+ function fc({ onClose: e }) {
6216
6302
  let { mod: t, enter: n } = Wo();
6217
6303
  return /* @__PURE__ */ Q("div", {
6218
6304
  class: "markup-panel",
@@ -6307,14 +6393,14 @@ function dc({ onClose: e }) {
6307
6393
  }
6308
6394
  //#endregion
6309
6395
  //#region src/runtime/ui/thread-popover.tsx
6310
- var fc = [
6396
+ var pc = [
6311
6397
  "👍",
6312
6398
  "❤️",
6313
6399
  "🎉",
6314
6400
  "😮",
6315
6401
  "😄",
6316
6402
  "❓"
6317
- ], pc = Ur({
6403
+ ], mc = Ur({
6318
6404
  none: {
6319
6405
  "toggle-thread-menu": () => ({
6320
6406
  kind: "thread-menu",
@@ -6370,22 +6456,22 @@ var fc = [
6370
6456
  dismiss: () => ({ kind: "none" })
6371
6457
  }
6372
6458
  });
6373
- function mc({ 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 }) {
6374
- let b = H(null), x = H(null), S = H(null), C = H(null), [w, T] = Wr(pc, { kind: "none" }), [E, D] = B(null), { onPointerDown: O, isDragging: ee } = _s({
6459
+ function hc({ 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 }) {
6460
+ let b = U(null), x = U(null), S = U(null), C = U(null), [w, T] = Wr(mc, { kind: "none" }), [E, D] = V(null), { onPointerDown: O, isDragging: k } = _s({
6375
6461
  targetRef: b,
6376
6462
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
6377
6463
  onMove: D
6378
6464
  });
6379
6465
  bs(b, !0);
6380
- let k = e.resolvedAt != null, A = it(() => e.comments.filter((e) => !e.deleted), [e.comments]);
6381
- V(() => {
6466
+ let A = e.resolvedAt != null, j = rt(() => e.comments.filter((e) => !e.deleted), [e.comments]);
6467
+ H(() => {
6382
6468
  if (w.kind === "none" || w.kind === "editing") return;
6383
6469
  function e(e) {
6384
6470
  let t = C.current;
6385
6471
  t && !e.composedPath().includes(t) && T({ type: "dismiss" });
6386
6472
  }
6387
6473
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
6388
- }, [w.kind, T]), V(() => {
6474
+ }, [w.kind, T]), H(() => {
6389
6475
  if (w.kind !== "editing") return;
6390
6476
  let t = e.comments.find((e) => e._id === w.commentId);
6391
6477
  (!t || t.deleted) && T({ type: "dismiss" });
@@ -6394,21 +6480,21 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6394
6480
  w,
6395
6481
  T
6396
6482
  ]);
6397
- let j = H(null);
6398
- V(() => {
6399
- j.current ??= A.at(-1)?.createdAt ?? 0;
6400
- }, [A]);
6401
- let te = H(!0);
6402
- V(() => {
6483
+ let M = U(null);
6484
+ H(() => {
6485
+ M.current ??= j.at(-1)?.createdAt ?? 0;
6486
+ }, [j]);
6487
+ let N = U(!0);
6488
+ H(() => {
6403
6489
  let e = x.current;
6404
6490
  if (e) {
6405
- if (te.current) {
6406
- te.current = !1, e.scrollTop = e.scrollHeight;
6491
+ if (N.current) {
6492
+ N.current = !1, e.scrollTop = e.scrollHeight;
6407
6493
  return;
6408
6494
  }
6409
6495
  e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
6410
6496
  }
6411
- }, [A.length]), V(() => {
6497
+ }, [j.length]), H(() => {
6412
6498
  let e = b.current;
6413
6499
  if (!e) return;
6414
6500
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
@@ -6419,15 +6505,15 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6419
6505
  }
6420
6506
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
6421
6507
  }, [p]);
6422
- let M = it(() => {
6508
+ let P = rt(() => {
6423
6509
  let t = yi({
6424
6510
  anchorX: e.anchorX,
6425
6511
  anchorY: e.anchorY,
6426
6512
  anchorSelector: e.anchorSelector
6427
6513
  });
6428
6514
  return {
6429
- left: vc(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
6430
- top: vc(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
6515
+ left: yc(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
6516
+ top: yc(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
6431
6517
  };
6432
6518
  }, [
6433
6519
  e.anchorX,
@@ -6437,11 +6523,11 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6437
6523
  return /* @__PURE__ */ Q("div", {
6438
6524
  ref: b,
6439
6525
  id: "markup-thread-popover",
6440
- class: Z("markup-popover", E && "is-floating", ee && "is-dragging", l && "is-hud-hidden"),
6526
+ class: Z("markup-popover", E && "is-floating", k && "is-dragging", l && "is-hud-hidden"),
6441
6527
  popover: "auto",
6442
6528
  style: {
6443
- "--markup-pop-x": `${E?.left ?? M.left}px`,
6444
- "--markup-pop-y": `${E?.top ?? M.top}px`
6529
+ "--markup-pop-x": `${E?.left ?? P.left}px`,
6530
+ "--markup-pop-y": `${E?.top ?? P.top}px`
6445
6531
  },
6446
6532
  role: "dialog",
6447
6533
  "aria-label": "Markup thread",
@@ -6453,7 +6539,7 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6453
6539
  children: [/* @__PURE__ */ Q("span", {
6454
6540
  class: "markup-popover-title",
6455
6541
  title: e.url,
6456
- children: A.length === 1 ? "1 comment" : `${A.length} comments`
6542
+ children: j.length === 1 ? "1 comment" : `${j.length} comments`
6457
6543
  }), /* @__PURE__ */ Q("div", {
6458
6544
  class: "markup-popover-header-actions",
6459
6545
  children: [
@@ -6510,15 +6596,15 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6510
6596
  /* @__PURE__ */ Q("ol", {
6511
6597
  ref: x,
6512
6598
  class: "markup-comments",
6513
- children: A.map((t, r) => {
6514
- let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !k && !t.deleted, c = i && !k && !t.deleted && !a, l = w.kind === "editing" && w.commentId === t._id, d = (o || c) && !l && !t.deleted, f = w.kind === "comment-menu" && w.commentId === t._id, p = f && w.confirmDelete, m = w.kind === "reaction-picker" && w.commentId === t._id, v = m ? w.direction : "down", y = f ? w.direction : "down";
6599
+ children: j.map((t, r) => {
6600
+ let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !A && !t.deleted, c = i && !A && !t.deleted && !a, l = w.kind === "editing" && w.commentId === t._id, d = (o || c) && !l && !t.deleted, f = w.kind === "comment-menu" && w.commentId === t._id, p = f && w.confirmDelete, m = w.kind === "reaction-picker" && w.commentId === t._id, v = m ? w.direction : "down", y = f ? w.direction : "down";
6515
6601
  return /* @__PURE__ */ Q("li", {
6516
- class: Z("markup-comment", j.current != null && t.createdAt > j.current && "is-new"),
6602
+ class: Z("markup-comment", M.current != null && t.createdAt > M.current && "is-new"),
6517
6603
  children: [
6518
- /* @__PURE__ */ Q(yc, {
6604
+ /* @__PURE__ */ Q(bc, {
6519
6605
  name: t.authorName,
6520
6606
  image: t.authorImage,
6521
- tone: xc(t.authorClientId ?? t.authorName)
6607
+ tone: Sc(t.authorClientId ?? t.authorName)
6522
6608
  }),
6523
6609
  /* @__PURE__ */ Q("div", {
6524
6610
  class: "markup-comment-meta",
@@ -6537,22 +6623,22 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6537
6623
  /* @__PURE__ */ Q("time", {
6538
6624
  class: "markup-comment-time",
6539
6625
  datetime: new Date(t.createdAt).toISOString(),
6540
- title: Cc(t.createdAt),
6541
- children: Sc(t.createdAt)
6626
+ title: wc(t.createdAt),
6627
+ children: Cc(t.createdAt)
6542
6628
  }),
6543
6629
  t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
6544
6630
  class: "markup-comment-edited",
6545
6631
  datetime: new Date(t.editedAt).toISOString(),
6546
- title: Cc(t.editedAt),
6632
+ title: wc(t.editedAt),
6547
6633
  children: "edited"
6548
6634
  }),
6549
6635
  /* @__PURE__ */ Q("div", {
6550
6636
  class: "markup-thread-actions",
6551
- children: [!k && !l ? /* @__PURE__ */ Q(hc, {
6637
+ children: [!A && !l ? /* @__PURE__ */ Q(gc, {
6552
6638
  comment: t,
6553
6639
  pickerOpen: m,
6554
6640
  pickerDirection: v,
6555
- pickerSide: A.length === 1,
6641
+ pickerSide: j.length === 1,
6556
6642
  pickerRef: (e) => {
6557
6643
  m && (C.current = e);
6558
6644
  },
@@ -6565,7 +6651,7 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6565
6651
  });
6566
6652
  return;
6567
6653
  }
6568
- if (A.length === 1) {
6654
+ if (j.length === 1) {
6569
6655
  T({
6570
6656
  type: "toggle-reaction-picker",
6571
6657
  commentId: t._id,
@@ -6584,7 +6670,7 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6584
6670
  T({ type: "dismiss" }), _(t._id, e);
6585
6671
  }
6586
6672
  }) : null, d ? /* @__PURE__ */ Q("div", {
6587
- class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up", A.length === 1 && "is-side"),
6673
+ class: Z("markup-thread-menu markup-comment-menu", f && "is-open", f && y === "up" && "is-up", j.length === 1 && "is-side"),
6588
6674
  ref: (e) => {
6589
6675
  f && (C.current = e);
6590
6676
  },
@@ -6601,7 +6687,7 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6601
6687
  });
6602
6688
  return;
6603
6689
  }
6604
- if (A.length === 1) {
6690
+ if (j.length === 1) {
6605
6691
  T({
6606
6692
  type: "toggle-comment-menu",
6607
6693
  commentId: t._id,
@@ -6695,9 +6781,9 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6695
6781
  alt: "Screenshot"
6696
6782
  })
6697
6783
  }) : null,
6698
- !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(gc, {
6784
+ !l && t.reactions.length > 0 ? /* @__PURE__ */ Q(_c, {
6699
6785
  comment: t,
6700
- isResolved: k,
6786
+ isResolved: A,
6701
6787
  onToggle: (e) => _(t._id, e)
6702
6788
  }) : null
6703
6789
  ]
@@ -6759,7 +6845,7 @@ function mc({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
6759
6845
  ]
6760
6846
  });
6761
6847
  }
6762
- function hc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
6848
+ function gc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
6763
6849
  return /* @__PURE__ */ Q("div", {
6764
6850
  class: Z("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
6765
6851
  ref: i,
@@ -6773,7 +6859,7 @@ function hc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
6773
6859
  }), t ? /* @__PURE__ */ Q("div", {
6774
6860
  class: "markup-reaction-picker",
6775
6861
  role: "menu",
6776
- children: fc.map((t) => /* @__PURE__ */ Q("button", {
6862
+ children: pc.map((t) => /* @__PURE__ */ Q("button", {
6777
6863
  type: "button",
6778
6864
  role: "menuitem",
6779
6865
  class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
@@ -6783,11 +6869,11 @@ function hc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
6783
6869
  }) : null]
6784
6870
  });
6785
6871
  }
6786
- function gc({ comment: e, isResolved: t, onToggle: n }) {
6872
+ function _c({ comment: e, isResolved: t, onToggle: n }) {
6787
6873
  return /* @__PURE__ */ Q("div", {
6788
6874
  class: "markup-reactions",
6789
6875
  children: e.reactions.map((e) => {
6790
- let r = _c(e.reactors, e.mine, e.count, e.emoji);
6876
+ let r = vc(e.reactors, e.mine, e.count, e.emoji);
6791
6877
  return /* @__PURE__ */ Q("button", {
6792
6878
  type: "button",
6793
6879
  class: Z("markup-reaction-chip", e.mine && "is-mine"),
@@ -6808,15 +6894,15 @@ function gc({ comment: e, isResolved: t, onToggle: n }) {
6808
6894
  })
6809
6895
  });
6810
6896
  }
6811
- function _c(e, t, n, r) {
6897
+ function vc(e, t, n, r) {
6812
6898
  let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
6813
6899
  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}`;
6814
6900
  }
6815
- function vc(e, t, n) {
6901
+ function yc(e, t, n) {
6816
6902
  return Math.max(t, Math.min(n, e));
6817
6903
  }
6818
- function yc({ name: e, image: t, tone: n }) {
6819
- let [r, i] = B(null);
6904
+ function bc({ name: e, image: t, tone: n }) {
6905
+ let [r, i] = V(null);
6820
6906
  return /* @__PURE__ */ Q("span", {
6821
6907
  class: "markup-comment-avatar",
6822
6908
  "data-tone": n,
@@ -6831,11 +6917,11 @@ function yc({ name: e, image: t, tone: n }) {
6831
6917
  onError: () => i(t)
6832
6918
  }) : /* @__PURE__ */ Q("span", {
6833
6919
  class: "markup-avatar-initials",
6834
- children: bc(e)
6920
+ children: xc(e)
6835
6921
  })
6836
6922
  });
6837
6923
  }
6838
- function bc(e) {
6924
+ function xc(e) {
6839
6925
  let t = e.trim();
6840
6926
  if (!t) return "??";
6841
6927
  let n = t.split(/\s+/).filter(Boolean), r = n[0] ?? "";
@@ -6843,12 +6929,12 @@ function bc(e) {
6843
6929
  let i = n[n.length - 1] ?? "";
6844
6930
  return ((r[0] ?? "") + (i[0] ?? "")).toUpperCase();
6845
6931
  }
6846
- function xc(e) {
6932
+ function Sc(e) {
6847
6933
  let t = 0;
6848
6934
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
6849
6935
  return Math.abs(t) % 5 + 1;
6850
6936
  }
6851
- function Sc(e) {
6937
+ function Cc(e) {
6852
6938
  let t = Date.now() - e, n = Math.floor(t / 1e3);
6853
6939
  if (n < 60) return "just now";
6854
6940
  let r = Math.floor(n / 60);
@@ -6865,7 +6951,7 @@ function Sc(e) {
6865
6951
  year: "numeric"
6866
6952
  });
6867
6953
  }
6868
- function Cc(e) {
6954
+ function wc(e) {
6869
6955
  return new Date(e).toLocaleDateString([], {
6870
6956
  month: "long",
6871
6957
  day: "numeric",
@@ -6876,8 +6962,8 @@ function Cc(e) {
6876
6962
  }
6877
6963
  //#endregion
6878
6964
  //#region src/runtime/ui/toolbar.tsx
6879
- function wc({ 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 }) {
6880
- let f = H(0);
6965
+ function Tc({ 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 }) {
6966
+ let f = U(0);
6881
6967
  i > 0 && (f.current = i);
6882
6968
  let p = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
6883
6969
  function m(e) {
@@ -6953,7 +7039,7 @@ function wc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
6953
7039
  }
6954
7040
  //#endregion
6955
7041
  //#region src/runtime/ui/app.tsx
6956
- function Tc(e) {
7042
+ function Ec(e) {
6957
7043
  let t = {
6958
7044
  clientId: `markup_user_${e.identity.id}`,
6959
7045
  name: e.identity.name,
@@ -6979,17 +7065,17 @@ function Tc(e) {
6979
7065
  } : {}
6980
7066
  };
6981
7067
  }
6982
- function Ec() {
7068
+ function Dc() {
6983
7069
  let e = document.activeElement;
6984
7070
  for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
6985
7071
  if (!e) return !1;
6986
7072
  let t = e.tagName;
6987
7073
  return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable;
6988
7074
  }
6989
- function Dc() {
7075
+ function Oc() {
6990
7076
  return window.location.host + window.location.pathname;
6991
7077
  }
6992
- var Oc = Ur({
7078
+ var kc = Ur({
6993
7079
  visible: {
6994
7080
  "hide-with-toast": () => ({ kind: "hidden-with-toast" }),
6995
7081
  toggle: () => ({ kind: "hidden" })
@@ -7000,26 +7086,26 @@ var Oc = Ur({
7000
7086
  },
7001
7087
  hidden: { toggle: () => ({ kind: "visible" }) }
7002
7088
  });
7003
- function kc(e) {
7089
+ function Ac(e) {
7004
7090
  return qi(e), e;
7005
7091
  }
7006
- var Ac = Ur({
7092
+ var jc = Ur({
7007
7093
  unresolved: {
7008
- "mint-success": (e, t) => kc({
7094
+ "mint-success": (e, t) => Ac({
7009
7095
  kind: "anon",
7010
7096
  identity: t.identity
7011
7097
  }),
7012
- "signed-in": (e, t) => kc({
7098
+ "signed-in": (e, t) => Ac({
7013
7099
  kind: "verified",
7014
7100
  identity: t.identity
7015
7101
  })
7016
7102
  },
7017
7103
  anon: {
7018
- "signed-in": (e, t) => kc({
7104
+ "signed-in": (e, t) => Ac({
7019
7105
  kind: "verified",
7020
7106
  identity: t.identity
7021
7107
  }),
7022
- "author-set": (e, t) => kc({
7108
+ "author-set": (e, t) => Ac({
7023
7109
  kind: "anon",
7024
7110
  identity: {
7025
7111
  ...e.identity,
@@ -7027,36 +7113,36 @@ var Ac = Ur({
7027
7113
  email: t.email
7028
7114
  }
7029
7115
  }),
7030
- "forget-me": () => kc({ kind: "unresolved" })
7116
+ "forget-me": () => Ac({ kind: "unresolved" })
7031
7117
  },
7032
7118
  verified: {
7033
- "signed-in": (e, t) => kc({
7119
+ "signed-in": (e, t) => Ac({
7034
7120
  kind: "verified",
7035
7121
  identity: t.identity
7036
7122
  }),
7037
- unauthorized: (e) => kc({
7123
+ unauthorized: (e) => Ac({
7038
7124
  kind: "recovering",
7039
7125
  preserved: {
7040
7126
  name: e.identity.name,
7041
7127
  email: e.identity.email
7042
7128
  }
7043
7129
  }),
7044
- "signed-out": () => kc({ kind: "unresolved" })
7130
+ "signed-out": () => Ac({ kind: "unresolved" })
7045
7131
  },
7046
7132
  recovering: {
7047
- "mint-success": (e, t) => kc({
7133
+ "mint-success": (e, t) => Ac({
7048
7134
  kind: "anon",
7049
7135
  identity: t.identity
7050
7136
  }),
7051
- "signed-in": (e, t) => kc({
7137
+ "signed-in": (e, t) => Ac({
7052
7138
  kind: "verified",
7053
7139
  identity: t.identity
7054
7140
  })
7055
7141
  }
7056
7142
  });
7057
- function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
7058
- let [a, o] = B(Dc), [s, c] = B([]), [l, u] = B(!1), d = it(() => Ki(), []), [f, p] = Wr(Ac, d.state), [m, h] = B(null);
7059
- V(() => {
7143
+ function Mc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
7144
+ let [a, o] = V(Oc), [s, c] = V([]), [l, u] = V(!1), d = rt(() => Ki(), []), [f, p] = Wr(jc, d.state), [m, h] = V(null);
7145
+ H(() => {
7060
7146
  let n = !1;
7061
7147
  return Mi(e, t).then((e) => {
7062
7148
  n || h(e);
@@ -7064,27 +7150,27 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7064
7150
  n = !0;
7065
7151
  };
7066
7152
  }, [e, t]);
7067
- let [g, _] = B(n), [v, y] = B(!0), [b, x] = B(!0), [S, C] = B(null), w = U(() => C(null), []), T = H(f);
7068
- T.current = f, Uo(f, e, t, (e) => p({
7153
+ let [g, _] = V(n), [v, y] = V(!0), [b, x] = V(!0), [S, C] = V(!1), [w, T] = V(null), E = W(() => T(null), []), D = U(f);
7154
+ D.current = f, Uo(f, e, t, (e) => p({
7069
7155
  type: "signed-in",
7070
7156
  identity: e
7071
7157
  }), () => p({ type: "unauthorized" }));
7072
- let E = it(() => ki({
7158
+ let O = rt(() => ki({
7073
7159
  apiUrl: e,
7074
7160
  apiKey: t,
7075
7161
  getToken: () => {
7076
- let e = T.current;
7162
+ let e = D.current;
7077
7163
  return e.kind !== "verified" || e.identity.token == null ? null : {
7078
7164
  token: e.identity.token,
7079
7165
  expiresAt: e.identity.tokenExpiresAt
7080
7166
  };
7081
7167
  },
7082
7168
  getStorageMode: () => {
7083
- let e = T.current;
7169
+ let e = D.current;
7084
7170
  return e.kind === "verified" ? e.identity.storage : null;
7085
7171
  },
7086
7172
  getAnonToken: () => {
7087
- let e = T.current;
7173
+ let e = D.current;
7088
7174
  return e.kind === "anon" ? e.identity.anonToken : null;
7089
7175
  },
7090
7176
  onUnauthorized: () => {
@@ -7094,29 +7180,29 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7094
7180
  e,
7095
7181
  t,
7096
7182
  p
7097
- ]), [D, O] = B({ kind: "idle" }), [ee, k] = B([]);
7098
- V(() => {
7183
+ ]), [k, A] = V({ kind: "idle" }), [j, M] = V([]);
7184
+ H(() => {
7099
7185
  let e = !1;
7100
- return E.listMembers().then((t) => {
7101
- e || k(t.members);
7186
+ return O.listMembers().then((t) => {
7187
+ e || M(t.members);
7102
7188
  }).catch(() => {}), () => {
7103
7189
  e = !0;
7104
7190
  };
7105
- }, [E]);
7106
- let [A, j] = B(0), [te, M] = B([]), [ne, re] = B(!1), [ie, ae] = B(void 0), [oe, se] = B(!1), ce = U(() => {
7107
- re(!0), ae(void 0), E.listNotifications().then((e) => {
7108
- M(e.notifications);
7191
+ }, [O]);
7192
+ let [N, P] = V(0), [ee, te] = V([]), [ne, re] = V(!1), [ie, ae] = V(void 0), [oe, se] = V(!1), ce = W(() => {
7193
+ re(!0), ae(void 0), O.listNotifications().then((e) => {
7194
+ te(e.notifications);
7109
7195
  }).catch((e) => {
7110
7196
  ae(e instanceof Error ? e.message : "Failed to load.");
7111
7197
  }).finally(() => {
7112
7198
  re(!1);
7113
7199
  });
7114
- }, [E]), le = Zr(), ue = Zr(), de = Zr(), fe = Zr(), pe = Zr(), { run: N, reset: me } = le, { run: he } = ue, { run: ge, reset: P } = de, { run: _e } = fe, { run: ve } = pe, ye = pe.isPending, be = le.isPending, xe = le.error ?? ue.error ?? de.error, [Se, Ce] = Wr(Oc, { kind: "visible" }), we = Se.kind !== "visible", [Te, Ee] = B(0), De = H(null), Oe = Yi(f), ke = f.kind === "verified", Ae = f.kind === "unresolved" || f.kind === "recovering", je = Ji(f);
7115
- V(() => {
7200
+ }, [O]), le = Zr(), ue = Zr(), de = Zr(), fe = Zr(), pe = Zr(), { run: F, reset: I } = le, { run: me } = ue, { run: he, reset: ge } = de, { run: _e } = fe, { run: ve } = pe, be = pe.isPending, xe = le.isPending, Se = le.error ?? ue.error ?? de.error, [Ce, we] = Wr(kc, { kind: "visible" }), Te = Ce.kind !== "visible", [Ee, De] = V(0), Oe = U(null), ke = Yi(f), Ae = f.kind === "verified", L = f.kind === "unresolved" || f.kind === "recovering", je = Ji(f);
7201
+ H(() => {
7116
7202
  if (f.kind !== "unresolved" && f.kind !== "recovering") return;
7117
7203
  let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
7118
7204
  function i() {
7119
- E.mintAnonIdentity().then(({ clientId: n, token: r }) => {
7205
+ O.mintAnonIdentity().then(({ clientId: n, token: r }) => {
7120
7206
  if (t) return;
7121
7207
  let i = {
7122
7208
  clientId: n,
@@ -7136,73 +7222,75 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7136
7222
  t = !0, n && clearTimeout(n);
7137
7223
  };
7138
7224
  }, [
7139
- E,
7225
+ O,
7140
7226
  f,
7141
7227
  p,
7142
7228
  d
7143
7229
  ]);
7144
- let I = zo(E), [Me, Ne] = B(null);
7145
- V(() => {
7230
+ let Me = zo(O), [R, Ne] = V(null);
7231
+ H(() => {
7146
7232
  let t = new Hr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
7147
7233
  return Ne(t), () => {
7148
7234
  t.close(), Ne((e) => e === t ? null : e);
7149
7235
  };
7150
7236
  }, [e]);
7151
- let L = H(!1);
7152
- V(() => {
7153
- if (!(!Me || !I)) return me(), P(), Me.onUpdate(Nn("widget/queries:subscribeThreadsForRoute"), {
7154
- subscriptionToken: I,
7237
+ let Pe = U(!1);
7238
+ H(() => {
7239
+ if (!(!R || !Me)) return I(), ge(), R.onUpdate(Mn("widget/queries:subscribeThreadsForRoute"), {
7240
+ subscriptionToken: Me,
7155
7241
  route: a,
7156
- viewerClientId: je
7242
+ viewerClientId: je,
7243
+ includeResolved: S
7157
7244
  }, (e) => {
7158
7245
  e !== void 0 && (c(e), u(!0));
7159
7246
  });
7160
7247
  }, [
7248
+ R,
7161
7249
  Me,
7162
- I,
7163
7250
  a,
7164
7251
  je,
7165
- me,
7166
- P
7167
- ]), V(() => {
7252
+ S,
7253
+ I,
7254
+ ge
7255
+ ]), H(() => {
7168
7256
  if (f.kind !== "verified") {
7169
- j(0);
7257
+ P(0);
7170
7258
  return;
7171
7259
  }
7172
- if (!(!Me || !I)) return Me.onUpdate(Nn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: I }, (e) => {
7173
- e !== void 0 && j(e.count);
7260
+ if (!(!R || !Me)) return R.onUpdate(Mn("widget/queries:subscribeUnreadCountForProject"), { subscriptionToken: Me }, (e) => {
7261
+ e !== void 0 && P(e.count);
7174
7262
  });
7175
7263
  }, [
7264
+ R,
7176
7265
  Me,
7177
- I,
7178
7266
  f.kind
7179
- ]), V(() => {
7180
- if (L.current || !l) return;
7267
+ ]), H(() => {
7268
+ if (Pe.current || !l) return;
7181
7269
  let e = window.location.hash.match(/^#markup-thread=(.+)$/);
7182
7270
  if (e) {
7183
7271
  let t = decodeURIComponent(e[1] ?? "");
7184
- s.find((e) => e._id === t) && O({
7272
+ s.find((e) => e._id === t) && A({
7185
7273
  kind: "thread",
7186
7274
  threadId: t
7187
7275
  }), history.replaceState(null, "", window.location.pathname + window.location.search);
7188
7276
  }
7189
- L.current = !0;
7190
- }, [s, l]), V(() => zi(() => o(Dc())), []), V(() => {
7277
+ Pe.current = !0;
7278
+ }, [s, l]), H(() => zi(() => o(Oc())), []), H(() => {
7191
7279
  function e(e) {
7192
- e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), Ce({ type: "toggle" })));
7280
+ e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), we({ type: "toggle" })));
7193
7281
  }
7194
7282
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
7195
- }, [Ce]), V(() => {
7196
- we && C(null);
7197
- }, [we]), V(() => {
7198
- if (Se.kind !== "hidden-with-toast") return;
7199
- let e = window.setTimeout(() => Ce({ type: "dismiss-toast" }), 5e3);
7283
+ }, [we]), H(() => {
7284
+ Te && T(null);
7285
+ }, [Te]), H(() => {
7286
+ if (Ce.kind !== "hidden-with-toast") return;
7287
+ let e = window.setTimeout(() => we({ type: "dismiss-toast" }), 5e3);
7200
7288
  return () => window.clearTimeout(e);
7201
- }, [Se.kind, Ce]), V(() => {
7289
+ }, [Ce.kind, we]), H(() => {
7202
7290
  let e = null;
7203
7291
  function t() {
7204
7292
  e ??= requestAnimationFrame(() => {
7205
- e = null, Ee((e) => e + 1);
7293
+ e = null, De((e) => e + 1);
7206
7294
  });
7207
7295
  }
7208
7296
  window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
@@ -7211,25 +7299,25 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7211
7299
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
7212
7300
  };
7213
7301
  }, []);
7214
- let Pe = U(() => {
7215
- me(), P(), F("comment_started"), O({ kind: "placing" });
7216
- }, [me, P]);
7217
- V(() => {
7302
+ let Fe = W(() => {
7303
+ I(), ge(), ye("comment_started"), A({ kind: "placing" });
7304
+ }, [I, ge]);
7305
+ H(() => {
7218
7306
  function e(e) {
7219
- e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || D.kind === "idle" && (we || Ec() || (e.preventDefault(), Pe())));
7307
+ e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || k.kind === "idle" && (Te || Dc() || (e.preventDefault(), Fe())));
7220
7308
  }
7221
7309
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
7222
7310
  }, [
7223
- D.kind,
7224
- we,
7225
- Pe
7311
+ k.kind,
7312
+ Te,
7313
+ Fe
7226
7314
  ]);
7227
- let Fe = U(() => {
7228
- O({ kind: "idle" }), me(), P();
7229
- }, [me, P]), Ie = H(0), Le = U((e, t, n) => {
7230
- let i = t + window.scrollX, a = n + window.scrollY, o = ++Ie.current;
7315
+ let Ie = W(() => {
7316
+ A({ kind: "idle" }), I(), ge();
7317
+ }, [I, ge]), Le = U(0), Re = W((e, t, n) => {
7318
+ let i = t + window.scrollX, a = n + window.scrollY, o = ++Le.current;
7231
7319
  if (r?.enabled === !1 || !b) {
7232
- O({
7320
+ A({
7233
7321
  kind: "composing-new",
7234
7322
  coords: e,
7235
7323
  pageX: i,
@@ -7243,7 +7331,7 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7243
7331
  });
7244
7332
  return;
7245
7333
  }
7246
- O({
7334
+ A({
7247
7335
  kind: "composing-new",
7248
7336
  coords: e,
7249
7337
  pageX: i,
@@ -7255,7 +7343,7 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7255
7343
  screenshotRedactedSelectors: [],
7256
7344
  captureToken: o
7257
7345
  });
7258
- let s = De.current != null && De.current.getRootNode() instanceof ShadowRoot ? De.current.getRootNode().host : null, c = {
7346
+ let s = Oe.current != null && Oe.current.getRootNode() instanceof ShadowRoot ? Oe.current.getRootNode().host : null, c = {
7259
7347
  strictScrub: r?.strictScrub,
7260
7348
  redactSelector: r?.redactSelector
7261
7349
  };
@@ -7263,24 +7351,24 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7263
7351
  x: t,
7264
7352
  y: n
7265
7353
  }, c).then((e) => {
7266
- O((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
7354
+ A((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
7267
7355
  ...t,
7268
7356
  screenshot: e?.blob ?? null,
7269
7357
  isScreenshotCapturing: !1,
7270
7358
  screenshotFailed: e == null,
7271
7359
  screenshotRedactedCount: e?.redactedCount ?? 0,
7272
7360
  screenshotRedactedSelectors: e?.redactedSelectors ?? []
7273
- }), F("screenshot_captured", { ok: e != null });
7361
+ }), ye("screenshot_captured", { ok: e != null });
7274
7362
  });
7275
- }, [r, b]), Re = U((e, t) => {
7363
+ }, [r, b]), ze = W((e, t) => {
7276
7364
  p({
7277
7365
  type: "author-set",
7278
7366
  name: e,
7279
7367
  email: t
7280
7368
  });
7281
- }, [p]), ze = ue.isPending, Be = U(async () => {
7282
- F("sign_in_started"), await he(async () => {
7283
- let n = Tc(await ta({
7369
+ }, [p]), Be = ue.isPending, Ve = W(async () => {
7370
+ ye("sign_in_started"), await me(async () => {
7371
+ let n = Ec(await ta({
7284
7372
  apiUrl: e,
7285
7373
  apiKey: t,
7286
7374
  useCookies: m === !0
@@ -7289,26 +7377,26 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7289
7377
  p({
7290
7378
  type: "signed-in",
7291
7379
  identity: n
7292
- }), F("sign_in_completed");
7380
+ }), ye("sign_in_completed");
7293
7381
  });
7294
7382
  }, [
7295
7383
  e,
7296
7384
  t,
7297
7385
  m,
7298
- he,
7386
+ me,
7299
7387
  p
7300
- ]), Ve = U(async (e, t) => {
7301
- if (D.kind !== "composing-new") return;
7388
+ ]), He = W(async (e, t) => {
7389
+ if (k.kind !== "composing-new") return;
7302
7390
  let n = Xi(f);
7303
- n && await N(async () => {
7391
+ n && await F(async () => {
7304
7392
  let r;
7305
- if (t && D.screenshot) {
7306
- let { uploadUrl: e } = await E.getScreenshotUploadUrl(), t;
7393
+ if (t && k.screenshot) {
7394
+ let { uploadUrl: e } = await O.getScreenshotUploadUrl(), t;
7307
7395
  try {
7308
7396
  t = await fetch(e, {
7309
7397
  method: "POST",
7310
- headers: { "Content-Type": D.screenshot.type || "image/png" },
7311
- body: D.screenshot,
7398
+ headers: { "Content-Type": k.screenshot.type || "image/png" },
7399
+ body: k.screenshot,
7312
7400
  signal: AbortSignal.timeout(6e4)
7313
7401
  });
7314
7402
  } catch (e) {
@@ -7318,16 +7406,16 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7318
7406
  let { storageId: n } = await t.json();
7319
7407
  r = n;
7320
7408
  }
7321
- let i = qr(e), o = await E.createThread({
7409
+ let i = qr(e), o = await O.createThread({
7322
7410
  url: window.location.href,
7323
7411
  route: a,
7324
- anchorSelector: D.coords.anchorSelector,
7325
- anchorX: D.coords.anchorX,
7326
- anchorY: D.coords.anchorY,
7327
- anchorOffsetX: D.coords.anchorOffsetX,
7328
- anchorOffsetY: D.coords.anchorOffsetY,
7329
- viewportW: D.coords.viewportW,
7330
- viewportY: D.coords.viewportY,
7412
+ anchorSelector: k.coords.anchorSelector,
7413
+ anchorX: k.coords.anchorX,
7414
+ anchorY: k.coords.anchorY,
7415
+ anchorOffsetX: k.coords.anchorOffsetX,
7416
+ anchorOffsetY: k.coords.anchorOffsetY,
7417
+ viewportW: k.coords.viewportW,
7418
+ viewportY: k.coords.viewportY,
7331
7419
  userAgent: navigator.userAgent,
7332
7420
  authorName: n.name,
7333
7421
  authorEmail: n.email,
@@ -7335,46 +7423,46 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7335
7423
  mentions: i.length > 0 ? i : void 0,
7336
7424
  screenshotStorageId: r
7337
7425
  });
7338
- c((e) => [...e, o.thread]), F("comment_submitted", {
7426
+ c((e) => [...e, o.thread]), ye("comment_submitted", {
7339
7427
  hasScreenshot: r != null,
7340
7428
  hasMentions: i.length > 0
7341
- }), O({
7429
+ }), A({
7342
7430
  kind: "thread",
7343
7431
  threadId: o.thread._id
7344
7432
  });
7345
7433
  });
7346
7434
  }, [
7347
- E,
7435
+ O,
7348
7436
  f,
7349
- D,
7437
+ k,
7350
7438
  a,
7351
- N
7352
- ]), He = U(async () => {
7353
- if (D.kind !== "thread") return;
7354
- let e = D.threadId;
7355
- await N(async () => {
7356
- await E.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), O({ kind: "idle" });
7439
+ F
7440
+ ]), Ue = W(async () => {
7441
+ if (k.kind !== "thread") return;
7442
+ let e = k.threadId;
7443
+ await F(async () => {
7444
+ await O.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), A({ kind: "idle" });
7357
7445
  });
7358
7446
  }, [
7359
- E,
7360
- D,
7361
- N
7362
- ]), Ue = U(async () => {
7363
- if (D.kind !== "thread") return;
7364
- let e = D.threadId;
7365
- await N(async () => {
7366
- await E.resolveThread(e, je), c((t) => t.filter((t) => t._id !== e)), F("thread_resolved"), O({ kind: "idle" });
7447
+ O,
7448
+ k,
7449
+ F
7450
+ ]), z = W(async () => {
7451
+ if (k.kind !== "thread") return;
7452
+ let e = k.threadId;
7453
+ await F(async () => {
7454
+ await O.resolveThread(e, je), c((t) => t.filter((t) => t._id !== e)), ye("thread_resolved"), A({ kind: "idle" });
7367
7455
  });
7368
7456
  }, [
7369
- E,
7370
- D,
7457
+ O,
7458
+ k,
7371
7459
  je,
7372
- N
7373
- ]), We = U((e) => {
7374
- if (e.readAt ?? (j((e) => Math.max(0, e - 1)), M((t) => t.map((t) => t._id === e._id ? {
7460
+ F
7461
+ ]), We = W((e) => {
7462
+ if (e.readAt ?? (P((e) => Math.max(0, e - 1)), te((t) => t.map((t) => t._id === e._id ? {
7375
7463
  ...t,
7376
7464
  readAt: Date.now()
7377
- } : t)), E.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) O({
7465
+ } : t)), O.markNotificationRead(e._id).catch(() => {})), s.some((t) => t._id === e.threadId)) A({
7378
7466
  kind: "thread",
7379
7467
  threadId: e.threadId
7380
7468
  });
@@ -7382,105 +7470,105 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7382
7470
  let t = Vi(e.threadUrl, window.location.href);
7383
7471
  t && (t.hash = `markup-thread=${e.threadId}`, window.location.href = t.toString());
7384
7472
  }
7385
- }, [E, s]), R = U(() => {
7386
- se(!0), j(0), M((e) => e.map((e) => e.readAt == null ? {
7473
+ }, [O, s]), Ge = W(() => {
7474
+ se(!0), P(0), te((e) => e.map((e) => e.readAt == null ? {
7387
7475
  ...e,
7388
7476
  readAt: Date.now()
7389
- } : e)), E.markAllNotificationsRead().catch(() => {}).finally(() => se(!1));
7390
- }, [E]), Ge = U(async (e) => {
7391
- if (D.kind !== "thread") return;
7477
+ } : e)), O.markAllNotificationsRead().catch(() => {}).finally(() => se(!1));
7478
+ }, [O]), Ke = W(async (e) => {
7479
+ if (k.kind !== "thread") return;
7392
7480
  let t = Xi(f);
7393
7481
  if (!t) return;
7394
- let n = D.threadId;
7395
- await N(async () => {
7396
- let r = qr(e), i = await E.addComment(n, {
7482
+ let n = k.threadId;
7483
+ await F(async () => {
7484
+ let r = qr(e), i = await O.addComment(n, {
7397
7485
  body: e,
7398
7486
  authorName: t.name,
7399
7487
  authorEmail: t.email,
7400
7488
  mentions: r.length > 0 ? r : void 0
7401
7489
  });
7402
- c((e) => e.map((e) => e._id === n ? i.thread : e)), F("reply_submitted", { hasMentions: r.length > 0 });
7490
+ c((e) => e.map((e) => e._id === n ? i.thread : e)), ye("reply_submitted", { hasMentions: r.length > 0 });
7403
7491
  });
7404
7492
  }, [
7405
- E,
7493
+ O,
7406
7494
  f,
7407
- D,
7408
- N
7409
- ]), Ke = U(async (e, t) => {
7410
- if (D.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7411
- let n = D.threadId;
7412
- await N(async () => {
7413
- let r = qr(t), i = await E.editComment(n, e, {
7495
+ k,
7496
+ F
7497
+ ]), qe = W(async (e, t) => {
7498
+ if (k.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7499
+ let n = k.threadId;
7500
+ await F(async () => {
7501
+ let r = qr(t), i = await O.editComment(n, e, {
7414
7502
  body: t,
7415
7503
  mentions: r.length > 0 ? r : void 0
7416
7504
  });
7417
7505
  c((e) => e.map((e) => e._id === n ? i.thread : e));
7418
7506
  }, { rethrow: !0 });
7419
7507
  }, [
7420
- E,
7508
+ O,
7421
7509
  f,
7422
- D,
7423
- N
7424
- ]), qe = U(async (e) => {
7425
- if (D.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7426
- let t = D.threadId;
7427
- await N(async () => {
7428
- let n = await E.deleteComment(t, e);
7510
+ k,
7511
+ F
7512
+ ]), B = W(async (e) => {
7513
+ if (k.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
7514
+ let t = k.threadId;
7515
+ await F(async () => {
7516
+ let n = await O.deleteComment(t, e);
7429
7517
  c((e) => e.map((e) => e._id === t ? n.thread : e));
7430
7518
  });
7431
7519
  }, [
7432
- E,
7520
+ O,
7433
7521
  f,
7434
- D,
7435
- N
7436
- ]), Je = U(async (e, t) => {
7437
- if (D.kind !== "thread") return;
7522
+ k,
7523
+ F
7524
+ ]), Je = W(async (e, t) => {
7525
+ if (k.kind !== "thread") return;
7438
7526
  let n = Xi(f);
7439
7527
  if (!n) return;
7440
- let r = D.threadId;
7441
- await ge(async () => {
7442
- let i = await E.toggleReaction(e, {
7528
+ let r = k.threadId;
7529
+ await he(async () => {
7530
+ let i = await O.toggleReaction(e, {
7443
7531
  emoji: t,
7444
7532
  authorName: n.name
7445
7533
  });
7446
- c((e) => e.map((e) => e._id === r ? i.thread : e)), F("reaction_added");
7534
+ c((e) => e.map((e) => e._id === r ? i.thread : e)), ye("reaction_added");
7447
7535
  });
7448
7536
  }, [
7449
- E,
7537
+ O,
7450
7538
  f,
7451
- D,
7452
- ge
7453
- ]), [z, Ye] = B(!1), Xe = U(async () => {
7539
+ k,
7540
+ he
7541
+ ]), [Ye, Xe] = V(!1), Ze = W(async () => {
7454
7542
  await _e(async () => {
7455
- await E.forgetMe(), O({ kind: "idle" }), w(), p({ type: "forget-me" }), Ye(!0);
7543
+ await O.forgetMe(), A({ kind: "idle" }), E(), p({ type: "forget-me" }), Xe(!0);
7456
7544
  });
7457
7545
  }, [
7546
+ O,
7458
7547
  E,
7459
- w,
7460
7548
  _e,
7461
7549
  p
7462
7550
  ]);
7463
- V(() => {
7464
- if (!z) return;
7465
- let e = window.setTimeout(() => Ye(!1), 5e3);
7551
+ H(() => {
7552
+ if (!Ye) return;
7553
+ let e = window.setTimeout(() => Xe(!1), 5e3);
7466
7554
  return () => window.clearTimeout(e);
7467
- }, [z]);
7468
- let [Ze, Qe] = B(!1), $e = U(async () => {
7555
+ }, [Ye]);
7556
+ let [Qe, $e] = V(!1), et = W(async () => {
7469
7557
  await ve(async () => {
7470
- await E.signOut(), O({ kind: "idle" }), p({ type: "signed-out" }), Qe(!0);
7558
+ await O.signOut(), A({ kind: "idle" }), p({ type: "signed-out" }), $e(!0);
7471
7559
  });
7472
7560
  }, [
7473
- E,
7561
+ O,
7474
7562
  ve,
7475
7563
  p
7476
7564
  ]);
7477
- V(() => {
7478
- if (!Ze) return;
7479
- let e = window.setTimeout(() => Qe(!1), 5e3);
7565
+ H(() => {
7566
+ if (!Qe) return;
7567
+ let e = window.setTimeout(() => $e(!1), 5e3);
7480
7568
  return () => window.clearTimeout(e);
7481
- }, [Ze]);
7482
- let et = D.kind === "thread" ? s.find((e) => e._id === D.threadId) ?? null : null, tt = ke || je != null && je === et?.authorClientId, nt = H(/* @__PURE__ */ new Map()), rt = it(() => {
7483
- let e = nt.current, t = s.map((t) => {
7569
+ }, [Qe]);
7570
+ let tt = k.kind === "thread" ? s.find((e) => e._id === k.threadId) ?? null : null, nt = Ae || je != null && je === tt?.authorClientId, it = U(/* @__PURE__ */ new Map()), at = rt(() => {
7571
+ let e = it.current, t = s.map((t) => {
7484
7572
  let { point: n, memory: r } = bi({
7485
7573
  anchorX: t.anchorX,
7486
7574
  anchorY: t.anchorY,
@@ -7495,27 +7583,27 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7495
7583
  });
7496
7584
  for (let t of e.keys()) s.some((e) => e._id === t) || e.delete(t);
7497
7585
  return t;
7498
- }, [s, Te]), at = H({
7586
+ }, [s, Ee]), ot = U({
7499
7587
  retryable: !1,
7500
7588
  elements: []
7501
7589
  });
7502
- V(() => {
7503
- at.current = {
7504
- retryable: rt.some((e) => !e.point.resolved && e.thread.anchorSelector != null),
7505
- elements: rt.flatMap((e) => e.point.element ? [e.point.element] : [])
7590
+ H(() => {
7591
+ ot.current = {
7592
+ retryable: at.some((e) => !e.point.resolved && e.thread.anchorSelector != null),
7593
+ elements: at.flatMap((e) => e.point.element ? [e.point.element] : [])
7506
7594
  };
7507
- }, [rt]);
7508
- let ot = s.some((e) => e.anchorSelector != null);
7509
- return V(() => {
7510
- if (!ot) return;
7595
+ }, [at]);
7596
+ let st = s.some((e) => e.anchorSelector != null);
7597
+ return H(() => {
7598
+ if (!st) return;
7511
7599
  let e = null;
7512
7600
  function t() {
7513
7601
  e ??= requestAnimationFrame(() => {
7514
- e = null, Ee((e) => e + 1);
7602
+ e = null, De((e) => e + 1);
7515
7603
  });
7516
7604
  }
7517
7605
  let n = new MutationObserver(() => {
7518
- let { retryable: e, elements: n } = at.current;
7606
+ let { retryable: e, elements: n } = ot.current;
7519
7607
  !e && n.every((e) => e.isConnected) || t();
7520
7608
  });
7521
7609
  return n.observe(document.body, {
@@ -7524,107 +7612,108 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7524
7612
  }), () => {
7525
7613
  n.disconnect(), e != null && cancelAnimationFrame(e);
7526
7614
  };
7527
- }, [ot]), V(() => {
7528
- D.kind === "thread" && et == null && Fe();
7615
+ }, [st]), H(() => {
7616
+ k.kind === "thread" && tt == null && Ie();
7529
7617
  }, [
7530
- D,
7531
- et,
7532
- Fe
7618
+ k,
7619
+ tt,
7620
+ Ie
7533
7621
  ]), /* @__PURE__ */ Q("div", {
7534
7622
  class: "markup-root",
7535
- ref: De,
7623
+ ref: Oe,
7536
7624
  children: [
7537
- D.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
7625
+ k.kind === "placing" ? null : /* @__PURE__ */ Q("div", {
7538
7626
  class: "markup-pins-layer",
7539
- children: [!we && v ? rt.map(({ thread: e, point: t }) => {
7540
- let n = D.kind === "thread" && D.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
7627
+ children: [!Te && v ? at.map(({ thread: e, point: t }) => {
7628
+ let n = k.kind === "thread" && k.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
7541
7629
  return /* @__PURE__ */ Q(oc, {
7542
7630
  pageX: t.pageX,
7543
7631
  pageY: t.pageY,
7544
7632
  count: r,
7545
7633
  isActive: n,
7546
7634
  isUnresolved: !t.resolved,
7635
+ isClosed: e.resolvedAt != null,
7547
7636
  onClick: () => {
7548
- F("thread_opened", { commentCount: r }), O({
7637
+ ye("thread_opened", { commentCount: r }), A({
7549
7638
  kind: "thread",
7550
7639
  threadId: e._id
7551
7640
  });
7552
7641
  }
7553
7642
  }, e._id);
7554
- }) : null, D.kind === "composing-new" ? /* @__PURE__ */ Q(sc, {
7555
- pageX: D.pageX,
7556
- pageY: D.pageY
7643
+ }) : null, k.kind === "composing-new" ? /* @__PURE__ */ Q(sc, {
7644
+ pageX: k.pageX,
7645
+ pageY: k.pageY
7557
7646
  }) : null]
7558
7647
  }),
7559
- D.kind === "placing" ? /* @__PURE__ */ Q(cc, {
7560
- onPlace: Le,
7561
- onCancel: Fe
7648
+ k.kind === "placing" ? /* @__PURE__ */ Q(cc, {
7649
+ onPlace: Re,
7650
+ onCancel: Ie
7562
7651
  }) : null,
7563
- D.kind === "thread" && et ? /* @__PURE__ */ Q(mc, {
7564
- thread: et,
7565
- authorName: Oe,
7652
+ k.kind === "thread" && tt ? /* @__PURE__ */ Q(hc, {
7653
+ thread: tt,
7654
+ authorName: ke,
7566
7655
  currentClientId: je ?? null,
7567
- isVerified: ke,
7568
- isIdentityResolving: Ae,
7569
- isSigningIn: ze,
7570
- canDelete: tt,
7571
- isPending: be,
7572
- error: xe,
7573
- isHidden: we,
7574
- members: ee,
7575
- onAuthor: Re,
7576
- onSignIn: Be,
7577
- onClose: Fe,
7578
- onReply: Ge,
7579
- onEditComment: Ke,
7580
- onDeleteComment: qe,
7656
+ isVerified: Ae,
7657
+ isIdentityResolving: L,
7658
+ isSigningIn: Be,
7659
+ canDelete: nt,
7660
+ isPending: xe,
7661
+ error: Se,
7662
+ isHidden: Te,
7663
+ members: j,
7664
+ onAuthor: ze,
7665
+ onSignIn: Ve,
7666
+ onClose: Ie,
7667
+ onReply: Ke,
7668
+ onEditComment: qe,
7669
+ onDeleteComment: B,
7581
7670
  onToggleReaction: Je,
7582
- onDelete: He,
7583
- onResolve: Ue
7584
- }, et._id) : null,
7585
- D.kind === "composing-new" ? /* @__PURE__ */ Q(Xs, {
7586
- pageX: D.pageX,
7587
- pageY: D.pageY,
7588
- authorName: Oe,
7589
- isVerified: ke,
7590
- isIdentityResolving: Ae,
7591
- isSigningIn: ze,
7592
- isPending: be,
7593
- error: xe,
7594
- screenshot: D.screenshot,
7595
- isScreenshotCapturing: D.isScreenshotCapturing,
7596
- screenshotFailed: D.screenshotFailed,
7597
- screenshotRedactedCount: D.screenshotRedactedCount,
7598
- screenshotRedactedSelectors: D.screenshotRedactedSelectors,
7599
- members: ee,
7600
- onAuthor: Re,
7601
- onSignIn: Be,
7602
- onSubmit: Ve,
7603
- onClose: Fe
7671
+ onDelete: Ue,
7672
+ onResolve: z
7673
+ }, tt._id) : null,
7674
+ k.kind === "composing-new" ? /* @__PURE__ */ Q(Xs, {
7675
+ pageX: k.pageX,
7676
+ pageY: k.pageY,
7677
+ authorName: ke,
7678
+ isVerified: Ae,
7679
+ isIdentityResolving: L,
7680
+ isSigningIn: Be,
7681
+ isPending: xe,
7682
+ error: Se,
7683
+ screenshot: k.screenshot,
7684
+ isScreenshotCapturing: k.isScreenshotCapturing,
7685
+ screenshotFailed: k.screenshotFailed,
7686
+ screenshotRedactedCount: k.screenshotRedactedCount,
7687
+ screenshotRedactedSelectors: k.screenshotRedactedSelectors,
7688
+ members: j,
7689
+ onAuthor: ze,
7690
+ onSignIn: Ve,
7691
+ onSubmit: He,
7692
+ onClose: Ie
7604
7693
  }) : null,
7605
- !we || D.kind === "placing" || D.kind === "composing-new" ? /* @__PURE__ */ Q(wc, {
7606
- isActive: D.kind === "placing",
7607
- onToggle: () => D.kind === "placing" ? Fe() : Pe(),
7608
- onHide: () => Ce({ type: "hide-with-toast" }),
7694
+ !Te || k.kind === "placing" || k.kind === "composing-new" ? /* @__PURE__ */ Q(Tc, {
7695
+ isActive: k.kind === "placing",
7696
+ onToggle: () => k.kind === "placing" ? Ie() : Fe(),
7697
+ onHide: () => we({ type: "hide-with-toast" }),
7609
7698
  position: g,
7610
- showInbox: ke,
7611
- unreadCount: ke ? A : 0,
7612
- inboxOpen: S === "inbox",
7699
+ showInbox: Ae,
7700
+ unreadCount: Ae ? N : 0,
7701
+ inboxOpen: w === "inbox",
7613
7702
  onOpenInbox: () => {
7614
- let e = S === "inbox" ? null : "inbox";
7615
- C(e), e && (F("notifications_opened", { unreadCount: A }), ce());
7703
+ let e = w === "inbox" ? null : "inbox";
7704
+ T(e), e && (ye("notifications_opened", { unreadCount: N }), ce());
7616
7705
  },
7617
7706
  pinsVisible: v,
7618
7707
  onTogglePins: () => y((e) => !e),
7619
7708
  identityButton: /* @__PURE__ */ Q(hs, {
7620
7709
  identity: f,
7621
7710
  position: g,
7622
- isSigningIn: ze,
7623
- isSigningOut: ye,
7711
+ isSigningIn: Be,
7712
+ isSigningOut: be,
7624
7713
  dashboardUrl: i,
7625
- onSignIn: Be,
7626
- onSignOut: $e,
7627
- onForgetMe: Xe
7714
+ onSignIn: Ve,
7715
+ onSignOut: et,
7716
+ onForgetMe: Ze
7628
7717
  }),
7629
7718
  overflowButton: /* @__PURE__ */ Q(tc, {
7630
7719
  position: g,
@@ -7632,61 +7721,63 @@ function jc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
7632
7721
  autoCapture: b && r?.enabled !== !1,
7633
7722
  autoCaptureLocked: r?.enabled === !1,
7634
7723
  onToggleAutoCapture: () => x((e) => !e),
7635
- onOpenPrivacy: () => C("privacy"),
7636
- onOpenShortcuts: () => C("shortcuts"),
7637
- onHideForSession: () => Ce({ type: "hide-with-toast" }),
7638
- version: "1.19.0",
7724
+ showResolved: S,
7725
+ onToggleShowResolved: () => C((e) => !e),
7726
+ onOpenPrivacy: () => T("privacy"),
7727
+ onOpenShortcuts: () => T("shortcuts"),
7728
+ onHideForSession: () => we({ type: "hide-with-toast" }),
7729
+ version: "1.21.0",
7639
7730
  dashboardUrl: i
7640
7731
  })
7641
7732
  }) : null,
7642
- S === "inbox" && ke ? /* @__PURE__ */ Q(ac, {
7733
+ w === "inbox" && Ae ? /* @__PURE__ */ Q(ac, {
7643
7734
  kind: "inbox",
7644
7735
  label: "Inbox",
7645
7736
  position: g,
7646
7737
  ignoreToolbarKind: "inbox",
7647
- onClose: w,
7738
+ onClose: E,
7648
7739
  children: /* @__PURE__ */ Q(Qs, {
7649
- items: te,
7740
+ items: ee,
7650
7741
  isLoading: ne,
7651
7742
  error: ie,
7652
7743
  isMarkingAll: oe,
7653
- onBack: w,
7744
+ onBack: E,
7654
7745
  onItemClick: (e) => {
7655
- w(), We(e);
7746
+ E(), We(e);
7656
7747
  },
7657
- onMarkAllRead: R
7748
+ onMarkAllRead: Ge
7658
7749
  })
7659
7750
  }) : null,
7660
- S === "privacy" ? /* @__PURE__ */ Q(ac, {
7751
+ w === "privacy" ? /* @__PURE__ */ Q(ac, {
7661
7752
  kind: "privacy",
7662
7753
  label: "Privacy and data",
7663
7754
  position: g,
7664
- onClose: w,
7665
- children: /* @__PURE__ */ Q(lc, {
7755
+ onClose: E,
7756
+ children: /* @__PURE__ */ Q(uc, {
7666
7757
  identity: f,
7667
7758
  apiUrl: e,
7668
7759
  autoCapture: b && r?.enabled !== !1,
7669
7760
  autoCaptureLocked: r?.enabled === !1,
7670
7761
  isForgettingMe: fe.isPending,
7671
7762
  forgetMeError: fe.error,
7672
- onForgetMe: Xe,
7673
- onClose: w
7763
+ onForgetMe: Ze,
7764
+ onClose: E
7674
7765
  })
7675
7766
  }) : null,
7676
- S === "shortcuts" ? /* @__PURE__ */ Q(ac, {
7767
+ w === "shortcuts" ? /* @__PURE__ */ Q(ac, {
7677
7768
  kind: "shortcuts",
7678
7769
  label: "Keyboard shortcuts",
7679
7770
  position: g,
7680
- onClose: w,
7681
- children: /* @__PURE__ */ Q(dc, { onClose: w })
7771
+ onClose: E,
7772
+ children: /* @__PURE__ */ Q(fc, { onClose: E })
7682
7773
  }) : null,
7683
- Se.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(Mc, { position: g }) : null,
7684
- z ? /* @__PURE__ */ Q(Nc, { position: g }) : null,
7685
- Ze ? /* @__PURE__ */ Q(Pc, { position: g }) : null
7774
+ Ce.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(Nc, { position: g }) : null,
7775
+ Ye ? /* @__PURE__ */ Q(Pc, { position: g }) : null,
7776
+ Qe ? /* @__PURE__ */ Q(Fc, { position: g }) : null
7686
7777
  ]
7687
7778
  });
7688
7779
  }
7689
- function Mc({ position: e }) {
7780
+ function Nc({ position: e }) {
7690
7781
  let { mod: t } = Wo();
7691
7782
  return /* @__PURE__ */ Q("div", {
7692
7783
  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"),
@@ -7706,7 +7797,7 @@ function Mc({ position: e }) {
7706
7797
  ]
7707
7798
  });
7708
7799
  }
7709
- function Nc({ position: e }) {
7800
+ function Pc({ position: e }) {
7710
7801
  return /* @__PURE__ */ Q("div", {
7711
7802
  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"),
7712
7803
  role: "status",
@@ -7714,7 +7805,7 @@ function Nc({ position: e }) {
7714
7805
  children: "Forgotten on this site — your name and email were cleared."
7715
7806
  });
7716
7807
  }
7717
- function Pc({ position: e }) {
7808
+ function Fc({ position: e }) {
7718
7809
  return /* @__PURE__ */ Q("div", {
7719
7810
  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"),
7720
7811
  role: "status",
@@ -7724,52 +7815,52 @@ function Pc({ position: e }) {
7724
7815
  }
7725
7816
  //#endregion
7726
7817
  //#region src/runtime/mount.tsx
7727
- function Fc(e, t) {
7728
- e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Re(e, t.theme ?? "auto");
7729
- let n = Ue(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
7730
- i.textContent = fe, r.appendChild(i);
7818
+ function Ic(e, t) {
7819
+ e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", Le(e, t.theme ?? "auto");
7820
+ let n = He(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
7821
+ i.textContent = ue, r.appendChild(i);
7731
7822
  let a = document.createElement("div");
7732
- a.className = "markup-shadow-root", r.appendChild(a), je({
7823
+ a.className = "markup-shadow-root", r.appendChild(a), Ae({
7733
7824
  apiUrl: t.apiUrl,
7734
7825
  apiKey: t.apiKey,
7735
- widgetVersion: "1.19.0"
7736
- }), be(t.analytics === !1 ? null : {
7826
+ widgetVersion: "1.21.0"
7827
+ }), ve(t.analytics === !1 ? null : {
7737
7828
  apiUrl: t.apiUrl,
7738
7829
  apiKey: t.apiKey,
7739
- widgetVersion: "1.19.0"
7740
- }), F("widget_loaded");
7830
+ widgetVersion: "1.21.0"
7831
+ }), ye("widget_loaded");
7741
7832
  let { theme: o, analytics: s, ...c } = t;
7742
- return de(/* @__PURE__ */ Q(Ce, {
7743
- onError: (e) => I(e, { context: "render" }),
7744
- children: /* @__PURE__ */ Q(jc, { ...c })
7833
+ return le(/* @__PURE__ */ Q(Se, {
7834
+ onError: (e) => L(e, { context: "render" }),
7835
+ children: /* @__PURE__ */ Q(Mc, { ...c })
7745
7836
  }), a), () => {
7746
- n(), je(null), be(null), de(null, a);
7837
+ n(), Ae(null), ve(null), le(null, a);
7747
7838
  };
7748
7839
  }
7749
7840
  //#endregion
7750
7841
  //#region src/widget.ts
7751
- var Ic = null, Lc = null, Rc = null, zc = !1;
7752
- function Bc(e) {
7842
+ var Lc = null, Rc = null, zc = null, Bc = !1;
7843
+ function Vc(e) {
7753
7844
  if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey, so the widget was not mounted"), () => {};
7754
- e.fab != null && !zc && (zc = !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.")), Vc();
7845
+ e.fab != null && !Bc && (Bc = !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.")), Hc();
7755
7846
  let t = () => {
7756
- if (Rc = null, !document.body) return;
7847
+ if (zc = null, !document.body) return;
7757
7848
  let t = document.createElement("div");
7758
- t.id = "markup-widget", document.body.appendChild(t), Lc = t, Ic = Fc(t, e);
7849
+ t.id = "markup-widget", document.body.appendChild(t), Rc = t, Lc = Ic(t, e);
7759
7850
  };
7760
7851
  if (document.readyState === "loading" || !document.body) {
7761
7852
  let e = () => t();
7762
- Rc = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
7853
+ zc = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
7763
7854
  } else t();
7764
- return Vc;
7855
+ return Hc;
7765
7856
  }
7766
- function Vc() {
7767
- Rc &&= (Rc(), null), Ic &&= (Ic(), null), Lc?.parentNode && Lc.parentNode.removeChild(Lc), Lc = null;
7857
+ function Hc() {
7858
+ zc &&= (zc(), null), Lc &&= (Lc(), null), Rc?.parentNode && Rc.parentNode.removeChild(Rc), Rc = null;
7768
7859
  }
7769
7860
  if (typeof document < "u") {
7770
7861
  let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
7771
7862
  if (t && n) {
7772
- let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () => Bc({
7863
+ let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () => Vc({
7773
7864
  apiUrl: t,
7774
7865
  apiKey: n,
7775
7866
  position: r,
@@ -7782,6 +7873,6 @@ if (typeof document < "u") {
7782
7873
  }
7783
7874
  }
7784
7875
  //#endregion
7785
- export { Vc as destroy, Bc as init };
7876
+ export { Hc as destroy, Vc as init };
7786
7877
 
7787
7878
  //# sourceMappingURL=widget.js.map