pleasenobugs 0.2.0 → 0.4.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.
Files changed (44) hide show
  1. package/README.md +137 -38
  2. package/dist/chunks/client-CkFi6gmV.js +358 -0
  3. package/dist/chunks/demo-DLTn5oUs.js +232 -0
  4. package/dist/chunks/index-B1dIQO6N.js +2795 -0
  5. package/dist/client.js +7 -294
  6. package/dist/index.js +9 -10
  7. package/dist/pleasenobugs.iife.js +2 -2
  8. package/dist/types/client.d.ts +72 -4
  9. package/dist/types/client.d.ts.map +1 -1
  10. package/dist/types/demo.d.ts +39 -3
  11. package/dist/types/demo.d.ts.map +1 -1
  12. package/dist/types/element.d.ts +19 -13
  13. package/dist/types/element.d.ts.map +1 -1
  14. package/dist/types/filter.d.ts +66 -0
  15. package/dist/types/filter.d.ts.map +1 -0
  16. package/dist/types/i18n.d.ts +222 -531
  17. package/dist/types/i18n.d.ts.map +1 -1
  18. package/dist/types/index.d.ts +5 -4
  19. package/dist/types/index.d.ts.map +1 -1
  20. package/dist/types/readonly.d.ts +4 -3
  21. package/dist/types/readonly.d.ts.map +1 -1
  22. package/dist/types/signer.d.ts +7 -0
  23. package/dist/types/signer.d.ts.map +1 -1
  24. package/dist/types/ui/App.d.ts +4 -3
  25. package/dist/types/ui/App.d.ts.map +1 -1
  26. package/dist/types/ui/Compose.d.ts +12 -7
  27. package/dist/types/ui/Compose.d.ts.map +1 -1
  28. package/dist/types/ui/Face.d.ts +17 -0
  29. package/dist/types/ui/Face.d.ts.map +1 -0
  30. package/dist/types/ui/Manage.d.ts +60 -0
  31. package/dist/types/ui/Manage.d.ts.map +1 -0
  32. package/dist/types/ui/PostCard.d.ts +53 -6
  33. package/dist/types/ui/PostCard.d.ts.map +1 -1
  34. package/dist/types/ui/Sheets.d.ts +32 -28
  35. package/dist/types/ui/Sheets.d.ts.map +1 -1
  36. package/dist/types/ui/Talk.d.ts +57 -0
  37. package/dist/types/ui/Talk.d.ts.map +1 -0
  38. package/dist/types/ui/Updates.d.ts +37 -0
  39. package/dist/types/ui/Updates.d.ts.map +1 -0
  40. package/dist/types/ui/icons.d.ts +16 -0
  41. package/dist/types/ui/icons.d.ts.map +1 -1
  42. package/package.json +3 -3
  43. package/dist/chunks/demo-nnvUgJyJ.js +0 -107
  44. package/dist/chunks/index-13DToKWI.js +0 -1751
@@ -0,0 +1,2795 @@
1
+ var Pa = Object.defineProperty;
2
+ var gn = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var Ia = (e, t, a) => t in e ? Pa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
6
+ var vn = (e, t, a) => Ia(e, typeof t != "symbol" ? t + "" : t, a), Ft = (e, t, a) => t.has(e) || gn("Cannot " + a);
7
+ var $ = (e, t, a) => (Ft(e, t, "read from private field"), a ? a.call(e) : t.get(e)), K = (e, t, a) => t.has(e) ? gn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), E = (e, t, a, i) => (Ft(e, t, "write to private field"), i ? i.call(e, a) : t.set(e, a), a), te = (e, t, a) => (Ft(e, t, "access private method"), a);
8
+ import { c as qa, s as Da, i as Pt, a as xn } from "./client-CkFi6gmV.js";
9
+ const br = Object.freeze({
10
+ perDay: 5,
11
+ /** One field, and a short one: a wish needs more room than a title and
12
+ * still less than an essay. */
13
+ textMax: 200,
14
+ /** Longer than a post, because the reply is the one that has to explain. */
15
+ replyMax: 300,
16
+ kinds: ["bug", "idea", "review"],
17
+ screenshots: "board",
18
+ approve: !1
19
+ }), Ea = 24, Ra = ["bug", "idea", "review"], Ua = 1e6;
20
+ function Ha(e) {
21
+ return e === "bug" || e === "idea";
22
+ }
23
+ const ja = 80, Wa = 300, Zt = 24, Xt = 300;
24
+ function Jt(e) {
25
+ if (typeof e != "string")
26
+ return null;
27
+ const t = e.trim();
28
+ return t ? t.length <= Zt && /^[0-9A-Za-z][0-9A-Za-z.+_-]*$/.test(t) ? t : null : "";
29
+ }
30
+ const Va = {
31
+ "github.com": "github.com",
32
+ "www.github.com": "github.com",
33
+ "gitlab.com": "gitlab.com",
34
+ "www.gitlab.com": "gitlab.com"
35
+ };
36
+ function je(e) {
37
+ if (typeof e != "string")
38
+ return null;
39
+ const t = e.trim();
40
+ if (!t)
41
+ return "";
42
+ if (t.length > Xt)
43
+ return null;
44
+ let a;
45
+ try {
46
+ a = new URL(/^https?:\/\//i.test(t) ? t : `https://${t}`);
47
+ } catch {
48
+ return null;
49
+ }
50
+ if (a.protocol !== "https:" && a.protocol !== "http:")
51
+ return null;
52
+ const i = Va[a.hostname];
53
+ return !i || a.username || a.password || a.port || a.pathname.length < 2 ? null : `https://${i}${a.pathname}${a.search}${a.hash}`;
54
+ }
55
+ function Hn(e) {
56
+ const t = je(e);
57
+ return t ? t.startsWith("https://gitlab.com/") ? "GitLab" : "GitHub" : null;
58
+ }
59
+ function hr(e) {
60
+ if (!e || typeof e != "object" || Array.isArray(e))
61
+ return null;
62
+ const { version: t, link: a } = e, i = t === void 0 ? "" : Jt(t), o = a === void 0 ? "" : je(a);
63
+ return i === null || o === null ? null : { ...i ? { version: i } : {}, ...o ? { link: o } : {} };
64
+ }
65
+ function Ya(e) {
66
+ return e === "bug" || e === "idea";
67
+ }
68
+ function bt(e) {
69
+ return e === "done" || e === "declined";
70
+ }
71
+ function at(e) {
72
+ return (e ?? []).filter((t) => !t.hidden);
73
+ }
74
+ function Re(e) {
75
+ const t = at(e);
76
+ return t[t.length - 1];
77
+ }
78
+ function Ga(e) {
79
+ return Ya(e.kind) && !bt(e.status) && Re(e.thread)?.from === "app";
80
+ }
81
+ function Et(e) {
82
+ return Re(e.thread)?.from === "author";
83
+ }
84
+ function fr(e) {
85
+ const t = at(e).filter((i) => i.from === "app"), a = t[t.length - 1];
86
+ return a ? { text: a.text, at: a.at } : void 0;
87
+ }
88
+ var gt, N, jn, ve, mn, Wn, Vn, It, dt, Je, Yn, Qt, Rt, Ut, ht = {}, ft = [], Ka = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, vt = Array.isArray;
89
+ function _e(e, t) {
90
+ for (var a in t) e[a] = t[a];
91
+ return e;
92
+ }
93
+ function en(e) {
94
+ e && e.parentNode && e.parentNode.removeChild(e);
95
+ }
96
+ function Za(e, t, a) {
97
+ var i, o, r, l = {};
98
+ for (r in t) r == "key" ? i = t[r] : r == "ref" ? o = t[r] : l[r] = t[r];
99
+ if (arguments.length > 2 && (l.children = arguments.length > 3 ? gt.call(arguments, 2) : a), typeof e == "function" && e.defaultProps != null) for (r in e.defaultProps) l[r] === void 0 && (l[r] = e.defaultProps[r]);
100
+ return ct(e, l, i, o, null);
101
+ }
102
+ function ct(e, t, a, i, o) {
103
+ var r = { type: e, props: t, key: a, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++jn, __i: -1, __u: 0 };
104
+ return o == null && N.vnode != null && N.vnode(r), r;
105
+ }
106
+ function R(e) {
107
+ return e.children;
108
+ }
109
+ function pt(e, t) {
110
+ this.props = e, this.context = t;
111
+ }
112
+ function Se(e, t) {
113
+ if (t == null) return e.__ ? Se(e.__, e.__i + 1) : null;
114
+ for (var a; t < e.__k.length; t++) if ((a = e.__k[t]) != null && a.__e != null) return a.__e;
115
+ return typeof e.type == "function" ? Se(e) : null;
116
+ }
117
+ function Xa(e) {
118
+ if (e.__P && e.__d) {
119
+ var t = e.__v, a = t.__e, i = [], o = [], r = _e({}, t);
120
+ r.__v = t.__v + 1, N.vnode && N.vnode(r), tn(e.__P, r, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [a] : null, i, a ?? Se(t), !!(32 & t.__u), o), r.__v = t.__v, r.__.__k[r.__i] = r, Jn(i, r, o), t.__e = t.__ = null, r.__e != a && Gn(r);
121
+ }
122
+ }
123
+ function Gn(e) {
124
+ if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
125
+ if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
126
+ }), Gn(e);
127
+ }
128
+ function wn(e) {
129
+ (!e.__d && (e.__d = !0) && ve.push(e) && !_t.__r++ || mn != N.debounceRendering) && ((mn = N.debounceRendering) || Wn)(_t);
130
+ }
131
+ function _t() {
132
+ try {
133
+ for (var e, t = 1; ve.length; ) ve.length > t && ve.sort(Vn), e = ve.shift(), t = ve.length, Xa(e);
134
+ } finally {
135
+ ve.length = _t.__r = 0;
136
+ }
137
+ }
138
+ function Kn(e, t, a, i, o, r, l, d, u, p, b) {
139
+ var x, c, h, v, L, _, k = i && i.__k || ft, g = t.length;
140
+ for (u = Ja(a, t, k, u, g), x = 0; x < g; x++) (h = a.__k[x]) != null && (c = h.__i != -1 && k[h.__i] || ht, h.__i = x, _ = tn(e, h, c, o, r, l, d, u, p, b), v = h.__e, h.ref && c.ref != h.ref && (c.ref && nn(c.ref, null, h), b.push(h.ref, h.__c || v, h)), L == null && v != null && (L = v), 4 & h.__u ? (u = Zn(h, u, e), c.__e && (c.__e = null)) : typeof h.type == "function" && _ !== void 0 ? u = _ : v && (u = v.nextSibling), h.__u &= -7);
141
+ return a.__e = L, u;
142
+ }
143
+ function Ja(e, t, a, i, o) {
144
+ var r, l, d, u, p, b = a.length, x = b, c = 0;
145
+ for (e.__k = new Array(o), r = 0; r < o; r++) (l = t[r]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[r] = ct(null, l, null, null, null) : vt(l) ? l = e.__k[r] = ct(R, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[r] = ct(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[r] = l, u = r + c, l.__ = e, l.__b = e.__b + 1, d = null, (p = l.__i = Qa(l, a, u, x)) != -1 && (x--, (d = a[p]) && (d.__u |= 2)), d == null || d.__v == null ? (p == -1 && (o > b ? c-- : o < b && c++), typeof l.type != "function" && (l.__u |= 4)) : p != u && (p == u - 1 ? c-- : p == u + 1 ? c++ : (p > u ? c-- : c++, l.__u |= 4))) : e.__k[r] = null;
146
+ if (x) for (r = 0; r < b; r++) (d = a[r]) != null && !(2 & d.__u) && (d.__e == i && (i = Se(d)), ea(d, d));
147
+ return i;
148
+ }
149
+ function Zn(e, t, a) {
150
+ var i, o;
151
+ if (typeof e.type == "function") {
152
+ for (i = e.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = e, t = Zn(i[o], t, a));
153
+ return t;
154
+ }
155
+ e.__e != t && (t && e.type && !t.parentNode && (t = Se(e)), t = a.insertBefore(e.__e, t || null));
156
+ do
157
+ t = t && t.nextSibling;
158
+ while (t != null && t.nodeType == 8);
159
+ return t;
160
+ }
161
+ function Qa(e, t, a, i) {
162
+ var o, r, l, d = e.key, u = e.type, p = t[a], b = p != null && (2 & p.__u) == 0;
163
+ if (p === null && d == null || b && d == p.key && u == p.type) return a;
164
+ if (i > (b ? 1 : 0)) {
165
+ for (o = a - 1, r = a + 1; o >= 0 || r < t.length; ) if ((p = t[l = o >= 0 ? o-- : r++]) != null && !(2 & p.__u) && d == p.key && u == p.type) return l;
166
+ }
167
+ return -1;
168
+ }
169
+ function kn(e, t, a) {
170
+ t[0] == "-" ? e.setProperty(t, a ?? "") : e[t] = a == null ? "" : typeof a != "number" || Ka.test(t) ? a : a + "px";
171
+ }
172
+ function st(e, t, a, i, o) {
173
+ var r, l;
174
+ e: if (t == "style") if (typeof a == "string") e.style.cssText = a;
175
+ else {
176
+ if (typeof i == "string" && (e.style.cssText = i = ""), i) for (t in i) a && t in a || kn(e.style, t, "");
177
+ if (a) for (t in a) i && a[t] == i[t] || kn(e.style, t, a[t]);
178
+ }
179
+ else if (t[0] == "o" && t[1] == "n") r = t != (t = t.replace(Yn, "$1")), l = t.toLowerCase(), t = l in e || t == "onFocusOut" || t == "onFocusIn" ? l.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + r] = a, a ? i ? a[Je] = i[Je] : (a[Je] = Qt, e.addEventListener(t, r ? Ut : Rt, r)) : e.removeEventListener(t, r ? Ut : Rt, r);
180
+ else {
181
+ if (o == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
182
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
183
+ e[t] = a ?? "";
184
+ break e;
185
+ } catch {
186
+ }
187
+ typeof a == "function" || (a == null || a === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && a == 1 ? "" : a));
188
+ }
189
+ }
190
+ function yn(e) {
191
+ return function(t) {
192
+ if (this.l) {
193
+ var a = this.l[t.type + e];
194
+ if (t[dt] == null) t[dt] = Qt++;
195
+ else if (t[dt] < a[Je]) return;
196
+ return a(N.event ? N.event(t) : t);
197
+ }
198
+ };
199
+ }
200
+ function tn(e, t, a, i, o, r, l, d, u, p) {
201
+ var b, x, c, h, v, L, _, k, g, S, y, z, I, C, P, H, q = t.type;
202
+ if (t.constructor !== void 0) return null;
203
+ 128 & a.__u && (u = !!(32 & a.__u), r = [d = t.__e = a.__e]), (b = N.__b) && b(t);
204
+ e: if (typeof q == "function") {
205
+ x = l.length;
206
+ try {
207
+ if (g = t.props, S = q.prototype && q.prototype.render, y = (b = q.contextType) && i[b.__c], z = b ? y ? y.props.value : b.__ : i, a.__c ? k = (c = t.__c = a.__c).__ = c.__E : (S ? t.__c = c = new q(g, z) : (t.__c = c = new pt(g, z), c.constructor = q, c.render = ti), y && y.sub(c), c.state || (c.state = {}), c.__n = i, h = c.__d = !0, c.__h = [], c._sb = []), S && c.__s == null && (c.__s = c.state), S && q.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = _e({}, c.__s)), _e(c.__s, q.getDerivedStateFromProps(g, c.__s))), v = c.props, L = c.state, c.__v = t, h) S && q.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), S && c.componentDidMount != null && c.__h.push(c.componentDidMount);
208
+ else {
209
+ if (S && q.getDerivedStateFromProps == null && g !== v && c.componentWillReceiveProps != null && c.componentWillReceiveProps(g, z), t.__v == a.__v || !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(g, c.__s, z) === !1) {
210
+ t.__v != a.__v && (c.props = g, c.state = c.__s, c.__d = !1), t.__e = a.__e, t.__k = a.__k, t.__k.some(function(D) {
211
+ D && (D.__ = t);
212
+ }), ft.push.apply(c.__h, c._sb), c._sb = [], c.__h.length && l.push(c), d = Se(a);
213
+ break e;
214
+ }
215
+ c.componentWillUpdate != null && c.componentWillUpdate(g, c.__s, z), S && c.componentDidUpdate != null && c.__h.push(function() {
216
+ c.componentDidUpdate(v, L, _);
217
+ });
218
+ }
219
+ if (c.context = z, c.props = g, c.__P = e, c.__e = !1, I = N.__r, C = 0, S) c.state = c.__s, c.__d = !1, I && I(t), b = c.render(c.props, c.state, c.context), ft.push.apply(c.__h, c._sb), c._sb = [];
220
+ else do
221
+ c.__d = !1, I && I(t), b = c.render(c.props, c.state, c.context), c.state = c.__s;
222
+ while (c.__d && ++C < 25);
223
+ c.state = c.__s, c.getChildContext != null && (i = _e(_e({}, i), c.getChildContext())), S && !h && c.getSnapshotBeforeUpdate != null && (_ = c.getSnapshotBeforeUpdate(v, L)), P = b != null && b.type === R && b.key == null ? Qn(b.props.children) : b, d = Kn(e, vt(P) ? P : [P], t, a, i, o, r, l, d, u, p), c.base = t.__e, t.__u &= -161, c.__h.length && l.push(c), k && (c.__E = c.__ = null);
224
+ } catch (D) {
225
+ if (l.length = x, t.__v = null, u || r != null) {
226
+ if (D.then) {
227
+ for (t.__u |= u ? 160 : 128; d && d.nodeType == 8 && d.nextSibling; ) d = d.nextSibling;
228
+ r != null && (r[r.indexOf(d)] = null), t.__e = d;
229
+ } else if (r != null) for (H = r.length; H--; ) en(r[H]);
230
+ } else t.__e = a.__e;
231
+ t.__k == null && (t.__k = a.__k || []), D.then || Xn(t), N.__e(D, t, a);
232
+ }
233
+ } else r == null && t.__v == a.__v ? (t.__k = a.__k, t.__e = a.__e) : d = t.__e = ei(a.__e, t, a, i, o, r, l, u, p);
234
+ return (b = N.diffed) && b(t), 128 & t.__u ? void 0 : d;
235
+ }
236
+ function Xn(e) {
237
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(Xn));
238
+ }
239
+ function Jn(e, t, a) {
240
+ for (var i = 0; i < a.length; i++) nn(a[i], a[++i], a[++i]);
241
+ N.__c && N.__c(t, e), e.some(function(o) {
242
+ try {
243
+ e = o.__h, o.__h = [], e.some(function(r) {
244
+ r.call(o);
245
+ });
246
+ } catch (r) {
247
+ N.__e(r, o.__v);
248
+ }
249
+ });
250
+ }
251
+ function Qn(e) {
252
+ return typeof e != "object" || e == null || e.__b > 0 ? e : vt(e) ? e.map(Qn) : e.constructor !== void 0 ? null : _e({}, e);
253
+ }
254
+ function ei(e, t, a, i, o, r, l, d, u) {
255
+ var p, b, x, c, h, v, L, _ = a.props || ht, k = t.props, g = t.type;
256
+ if (g == "svg" ? o = "http://www.w3.org/2000/svg" : g == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), r != null) {
257
+ for (p = 0; p < r.length; p++) if ((h = r[p]) && "setAttribute" in h == !!g && (g ? h.localName == g : h.nodeType == 3)) {
258
+ e = h, r[p] = null;
259
+ break;
260
+ }
261
+ }
262
+ if (e == null) {
263
+ if (g == null) return document.createTextNode(k);
264
+ e = document.createElementNS(o, g, k.is && k), d && (N.__m && N.__m(t, r), d = !1), r = null;
265
+ }
266
+ if (g == null) _ === k || d && e.data == k || (e.data = k);
267
+ else {
268
+ if (r = g == "textarea" && k.defaultValue != null ? null : r && gt.call(e.childNodes), !d && r != null) for (_ = {}, p = 0; p < e.attributes.length; p++) _[(h = e.attributes[p]).name] = h.value;
269
+ for (p in _) h = _[p], p == "dangerouslySetInnerHTML" ? x = h : p == "children" || p in k || p == "value" && "defaultValue" in k || p == "checked" && "defaultChecked" in k || st(e, p, null, h, o);
270
+ for (p in k) h = k[p], p == "children" ? c = h : p == "dangerouslySetInnerHTML" ? b = h : p == "value" ? v = h : p == "checked" ? L = h : d && typeof h != "function" || _[p] === h || st(e, p, h, _[p], o);
271
+ if (b) d || x && (b.__html == x.__html || b.__html == e.innerHTML) || (e.innerHTML = b.__html), t.__k = [];
272
+ else if (x && (e.innerHTML = ""), Kn(t.type == "template" ? e.content : e, vt(c) ? c : [c], t, a, i, g == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, r, l, r ? r[0] : a.__k && Se(a, 0), d, u), r != null) for (p = r.length; p--; ) en(r[p]);
273
+ d && g != "textarea" || (p = "value", g == "progress" && v == null ? e.removeAttribute("value") : v != null && (v !== e[p] || g == "progress" && !v || g == "option" && v != _[p]) && st(e, p, v, _[p], o), p = "checked", L != null && L != e[p] && st(e, p, L, _[p], o));
274
+ }
275
+ return e;
276
+ }
277
+ function nn(e, t, a) {
278
+ try {
279
+ if (typeof e == "function") {
280
+ var i = typeof e.__u == "function";
281
+ i && e.__u(), i && t == null || (e.__u = e(t));
282
+ } else e.current = t;
283
+ } catch (o) {
284
+ N.__e(o, a);
285
+ }
286
+ }
287
+ function ea(e, t, a) {
288
+ var i, o;
289
+ if (N.unmount && N.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || nn(i, null, t)), (i = e.__c) != null) {
290
+ if (i.componentWillUnmount) try {
291
+ i.componentWillUnmount();
292
+ } catch (r) {
293
+ N.__e(r, t);
294
+ }
295
+ i.base = i.__P = i.__n = null;
296
+ }
297
+ if (i = e.__k) for (o = 0; o < i.length; o++) i[o] && ea(i[o], t, a || typeof e.type != "function");
298
+ a || en(e.__e), e.__c = e.__ = e.__e = void 0;
299
+ }
300
+ function ti(e, t, a) {
301
+ return this.constructor(e, a);
302
+ }
303
+ function Xe(e, t, a) {
304
+ var i, o, r, l;
305
+ t == document && (t = document.documentElement), N.__ && N.__(e, t), o = (i = !1) ? null : t.__k, r = [], l = [], tn(t, e = t.__k = Za(R, null, [e]), o || ht, ht, t.namespaceURI, o ? null : t.firstChild ? gt.call(t.childNodes) : null, r, o ? o.__e : t.firstChild, i, l), Jn(r, e, l), e.props.children = null;
306
+ }
307
+ gt = ft.slice, N = { __e: function(e, t, a, i) {
308
+ for (var o, r, l; t = t.__; ) if ((o = t.__c) && !o.__) try {
309
+ if ((r = o.constructor) && r.getDerivedStateFromError != null && (o.setState(r.getDerivedStateFromError(e)), l = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, i || {}), l = o.__d), l) return o.__E = o;
310
+ } catch (d) {
311
+ e = d;
312
+ }
313
+ throw e;
314
+ } }, jn = 0, pt.prototype.setState = function(e, t) {
315
+ var a;
316
+ a = this.__s != null && this.__s != this.state ? this.__s : this.__s = _e({}, this.state), typeof e == "function" && (e = e(_e({}, a), this.props)), e && _e(a, e), e != null && this.__v && (t && this._sb.push(t), wn(this));
317
+ }, pt.prototype.forceUpdate = function(e) {
318
+ this.__v && (this.__e = !0, e && this.__h.push(e), wn(this));
319
+ }, pt.prototype.render = R, ve = [], Wn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Vn = function(e, t) {
320
+ return e.__v.__b - t.__v.__b;
321
+ }, _t.__r = 0, It = Math.random().toString(8), dt = "__d" + It, Je = "__a" + It, Yn = /(PointerCapture)$|Capture$/i, Qt = 0, Rt = yn(!1), Ut = yn(!0);
322
+ var ni = 0;
323
+ function n(e, t, a, i, o, r) {
324
+ t || (t = {});
325
+ var l, d, u = t;
326
+ if ("ref" in u) for (d in u = {}, t) d == "ref" ? l = t[d] : u[d] = t[d];
327
+ var p = { type: e, props: u, key: a, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --ni, __i: -1, __u: 0, __source: o, __self: r };
328
+ if (typeof e == "function" && (l = e.defaultProps)) for (d in l) u[d] === void 0 && (u[d] = l[d]);
329
+ return N.vnode && N.vnode(p), p;
330
+ }
331
+ var Ue, B, qt, Cn, Qe = 0, ta = [], F = N, Ln = F.__b, Sn = F.__r, Tn = F.diffed, Mn = F.__c, An = F.unmount, zn = F.__;
332
+ function xt(e, t) {
333
+ F.__h && F.__h(B, e, Qe || t), Qe = 0;
334
+ var a = B.__H || (B.__H = { __: [], __h: [] });
335
+ return e >= a.__.length && a.__.push({}), a.__[e];
336
+ }
337
+ function m(e) {
338
+ return Qe = 1, ai(na, e);
339
+ }
340
+ function ai(e, t, a) {
341
+ var i = xt(Ue++, 2);
342
+ if (i.t = e, !i.__c && (i.__ = [na(void 0, t), function(d) {
343
+ var u = i.__N ? i.__N[0] : i.__[0], p = i.t(u, d);
344
+ u !== p && (i.__N = [p, i.__[1]], i.__c.setState({}));
345
+ }], i.__c = B, !B.__f)) {
346
+ var o = function(d, u, p) {
347
+ if (!i.__c.__H) return !0;
348
+ var b = !1, x = i.__c.props !== d;
349
+ if (i.__c.__H.__.some(function(h) {
350
+ if (h.__N) {
351
+ b = !0;
352
+ var v = h.__[0];
353
+ h.__ = h.__N, h.__N = void 0, v !== h.__[0] && (x = !0);
354
+ }
355
+ }), r) {
356
+ var c = r.call(this, d, u, p);
357
+ return b ? c || x : c;
358
+ }
359
+ return !b || x;
360
+ };
361
+ B.__f = !0;
362
+ var r = B.shouldComponentUpdate, l = B.componentWillUpdate;
363
+ B.componentWillUpdate = function(d, u, p) {
364
+ if (this.__e) {
365
+ var b = r;
366
+ r = void 0, o(d, u, p), r = b;
367
+ }
368
+ l && l.call(this, d, u, p);
369
+ }, B.shouldComponentUpdate = o;
370
+ }
371
+ return i.__N || i.__;
372
+ }
373
+ function ne(e, t) {
374
+ var a = xt(Ue++, 3);
375
+ !F.__s && an(a.__H, t) && (a.__ = e, a.u = t, B.__H.__h.push(a));
376
+ }
377
+ function ii(e, t) {
378
+ var a = xt(Ue++, 4);
379
+ !F.__s && an(a.__H, t) && (a.__ = e, a.u = t, B.__h.push(a));
380
+ }
381
+ function et(e) {
382
+ return Qe = 5, le(function() {
383
+ return { current: e };
384
+ }, []);
385
+ }
386
+ function le(e, t) {
387
+ var a = xt(Ue++, 7);
388
+ return an(a.__H, t) && (a.__ = e(), a.__H = t, a.__h = e), a.__;
389
+ }
390
+ function ri(e, t) {
391
+ return Qe = 8, le(function() {
392
+ return e;
393
+ }, t);
394
+ }
395
+ function oi() {
396
+ for (var e; e = ta.shift(); ) {
397
+ var t = e.__H;
398
+ if (e.__P && t) try {
399
+ t.__h.some(ut), t.__h.some(Ht), t.__h = [];
400
+ } catch (a) {
401
+ t.__h = [], F.__e(a, e.__v);
402
+ }
403
+ }
404
+ }
405
+ F.__b = function(e) {
406
+ B = null, Ln && Ln(e);
407
+ }, F.__ = function(e, t) {
408
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), zn && zn(e, t);
409
+ }, F.__r = function(e) {
410
+ Sn && Sn(e), Ue = 0;
411
+ var t = (B = e.__c).__H;
412
+ t && (qt === B ? (t.__h = [], B.__h = [], t.__.some(function(a) {
413
+ a.__N && (a.__ = a.__N), a.u = a.__N = void 0;
414
+ })) : (t.__h.some(ut), t.__h.some(Ht), t.__h = [], Ue = 0)), qt = B;
415
+ }, F.diffed = function(e) {
416
+ Tn && Tn(e);
417
+ var t = e.__c;
418
+ t && t.__H && (t.__H.__h.length && (ta.push(t) !== 1 && Cn === F.requestAnimationFrame || ((Cn = F.requestAnimationFrame) || si)(oi)), t.__H.__.some(function(a) {
419
+ a.u && (a.__H = a.u, a.u = void 0);
420
+ })), qt = B = null;
421
+ }, F.__c = function(e, t) {
422
+ t.some(function(a) {
423
+ try {
424
+ a.__h.some(ut), a.__h = a.__h.filter(function(i) {
425
+ return !i.__ || Ht(i);
426
+ });
427
+ } catch (i) {
428
+ t.some(function(o) {
429
+ o.__h && (o.__h = []);
430
+ }), t = [], F.__e(i, a.__v);
431
+ }
432
+ }), Mn && Mn(e, t);
433
+ }, F.unmount = function(e) {
434
+ An && An(e);
435
+ var t, a = e.__c;
436
+ a && a.__H && (a.__H.__.some(function(i) {
437
+ try {
438
+ ut(i);
439
+ } catch (o) {
440
+ t = o;
441
+ }
442
+ }), a.__H = void 0, t && F.__e(t, a.__v));
443
+ };
444
+ var $n = typeof requestAnimationFrame == "function";
445
+ function si(e) {
446
+ var t, a = function() {
447
+ clearTimeout(i), $n && cancelAnimationFrame(t), setTimeout(e);
448
+ }, i = setTimeout(a, 35);
449
+ $n && (t = requestAnimationFrame(a));
450
+ }
451
+ function ut(e) {
452
+ var t = B, a = e.__c;
453
+ typeof a == "function" && (e.__c = void 0, a()), B = t;
454
+ }
455
+ function Ht(e) {
456
+ var t = B;
457
+ e.__c = e.__(), B = t;
458
+ }
459
+ function an(e, t) {
460
+ return !e || e.length !== t.length || t.some(function(a, i) {
461
+ return a !== e[i];
462
+ });
463
+ }
464
+ function na(e, t) {
465
+ return typeof t == "function" ? t(e) : t;
466
+ }
467
+ const li = {
468
+ "board.title": "Feedback",
469
+ "board.open": "Feedback",
470
+ "board.close": "Close",
471
+ "board.back": "Back",
472
+ "board.top": "Top",
473
+ "board.new": "New",
474
+ "board.order": "Order",
475
+ "board.all": "All",
476
+ "board.bugs": "Bugs",
477
+ "board.ideas": "Ideas",
478
+ "board.reviews": "Reviews",
479
+ "board.kindBug": "Bug",
480
+ "board.kindIdea": "Idea",
481
+ "board.kindReview": "Review",
482
+ "board.statusOpen": "Open",
483
+ "board.statusPlanned": "Planned",
484
+ "board.statusDone": "Done",
485
+ // A bug is fixed, an idea done: 'done' says which by the kind (doneLabel in PostCard).
486
+ "board.statusFixed": "Fixed",
487
+ "board.statusFixedOrDone": "Fixed or done",
488
+ "board.statusFixedAndDone": "Fixed & done",
489
+ "board.statusDeclined": "Not doing",
490
+ "board.anon": "Anonymous",
491
+ "board.byYou": "You",
492
+ // Named rather than "the owner": a board that answers in the third person
493
+ // reads like a support desk.
494
+ "board.reply": "{app} says",
495
+ "board.upvote": "I want this too",
496
+ // On a review there is nothing to want: you agree with it, or it helped.
497
+ "board.helpful": "Helpful",
498
+ "board.stars": "{n} of 5 stars",
499
+ "board.ratingOne": "1 review",
500
+ "board.ratingMany": "{n} reviews",
501
+ "board.emptyTitle": "Nothing here yet. Tell us what is broken or what you miss.",
502
+ // A read-only board has no way to write, so it does not ask.
503
+ "board.emptyRead": "Nothing here yet.",
504
+ "board.votes": "{n} votes",
505
+ "board.voteOne": "1 vote",
506
+ "board.emptyFiltered": "Nothing of that kind yet.",
507
+ "board.write": "Write feedback",
508
+ "board.loadFailed": "Could not reach the board.",
509
+ "board.retry": "Try again",
510
+ "board.page": "Page {n}",
511
+ "board.signIn": "Sign in with your wallet",
512
+ // On top of the board where signing in is a step of its own (outside Nimiq
513
+ // Pay: a wallet window opens). Says what signing is not, before it is asked.
514
+ "board.signInTitle": "Sign in to post and vote",
515
+ "board.signInNote": "Use your Nimiq wallet. Signing only shows which wallet you are; it can’t move funds.",
516
+ "board.signInButton": "Sign in with Nimiq",
517
+ // Reading works anywhere; writing needs a wallet. Said when somebody tries,
518
+ // not up front, so a reader is never told off for reading. General on
519
+ // purpose: on a website it means its own login, in a mini app opened in a
520
+ // plain browser it means Nimiq Pay, and the widget cannot tell which.
521
+ "board.needWallet": "Sign in with your Nimiq wallet to post and vote.",
522
+ // ---- Choosing what to write ----
523
+ "board.chooseTitle": "What do you want to share?",
524
+ "board.tileBug": "Report a bug",
525
+ "board.tileBugNote": "Something does not work",
526
+ "board.tileIdea": "Share an idea",
527
+ "board.tileIdeaNote": "Something you miss",
528
+ "board.tileReview": "Write a review",
529
+ "board.tileReviewNote": "What you think of {app}",
530
+ "board.seeBoard": "See the board",
531
+ "board.tileReviewDone": "You reviewed {app} already",
532
+ // ---- Writing one ----
533
+ "board.composeTitle": "Your feedback",
534
+ "board.whatKind": "What is it?",
535
+ // On a bug; an idea and a review each ask their own question.
536
+ "board.placeholder": "What’s broken?",
537
+ "board.placeholderIdea": "What’s missing?",
538
+ "board.placeholderReview": "What do you think of {app}?",
539
+ "board.yourRating": "Your rating",
540
+ "board.public": "Everyone using {app} can see this.",
541
+ "board.postAnon": "Post anonymously",
542
+ "board.namePlaceholder": "Your name",
543
+ // Under the name field: what others see, and that a new name reaches back.
544
+ "board.namedNote": "Others see your identicon and this name, never your address. Changing the name changes it on your earlier posts too.",
545
+ // The honest version. Anonymous means the name is not shown, never that the
546
+ // wallet is not known: the daily limit and one vote per wallet both have to
547
+ // ask who.
548
+ "board.anonNote": "Anonymous: no name, no identicon. Your address is never shown; the server uses it only to count votes and daily posts.",
549
+ // ---- A screenshot ----
550
+ "board.shotAdd": "Add screenshot",
551
+ "board.shotRemove": "Remove screenshot",
552
+ // Said before somebody picks one, because a screenshot of a wallet app is
553
+ // the easiest way to give away a balance without noticing. On a board that
554
+ // shows screenshots, and the one for `screenshots="owners"`. The address
555
+ // line is there because posting anonymously is undone by a picture of it.
556
+ "board.shotNoteBoard": "Screenshots are public. Hide personal info and wallet addresses.",
557
+ // Ticked under the picture itself, so the yes is about this one.
558
+ "board.shotAgree": "Checked: everyone may see this.",
559
+ "board.shotNote": "Only {app} sees it. Hide personal info and wallet addresses.",
560
+ "board.shotFailed": "That image could not be read. Try another one.",
561
+ "board.shot": "Screenshot",
562
+ "board.shotOpen": "Open the screenshot",
563
+ // In the owner's sheet: who sees it now, before what happens to it.
564
+ "board.shotForBoard": "On the board for everyone.",
565
+ "board.shotForOff": "Off the board: only you see it.",
566
+ "board.shotForOwners": "Only you see it: it was sent for your eyes only.",
567
+ "board.shotOff": "Take the screenshot off the board",
568
+ "board.shotOn": "Put the screenshot back",
569
+ "board.shotGoes": "Deleted by itself when you mark this Done or Not doing.",
570
+ "board.shotGone": "The screenshot could not be loaded.",
571
+ "board.send": "Put it on the board",
572
+ "board.left": "{n} of {max} left today",
573
+ "board.noneLeft": "That is today’s {max}. Back tomorrow.",
574
+ "board.likeThis": "Already on the board?",
575
+ "board.likeThisNote": "Vote instead of sending it again.",
576
+ // Seconding a lookalike instead of writing it again, which closes the form.
577
+ "board.meToo": "Me too",
578
+ "board.meTooDone": "Your vote is on it. Thank you.",
579
+ "board.voted": "Voted",
580
+ // Two ways a post can be refused, because the answer to one is "go again"
581
+ // and the answer to the other is "come back tomorrow".
582
+ "board.failed": "That did not go through. Try again.",
583
+ "board.failedFull": "Not posted: that was today’s {max}. Back tomorrow.",
584
+ "board.reviewed": "You reviewed {app} already. Throw yours away to write a new one.",
585
+ "board.sent": "Feedback sent!",
586
+ "board.sentNote": "Thank you. It is on the board now.",
587
+ // On a board that approves posts first: it did arrive, it is just not up yet.
588
+ "board.sentWaiting": "Thank you. It shows on the board once {app} approved it.",
589
+ "board.waiting": "Waiting for approval",
590
+ "board.sentBack": "Back to the board",
591
+ // ---- Throwing your own away ----
592
+ "board.delete": "Throw away",
593
+ "board.deleteTitle": "Throw this away?",
594
+ "board.deleteNote": "It leaves the board for everybody, with its votes.",
595
+ "board.cancel": "Cancel",
596
+ // ---- Answering one (owners only) ----
597
+ "board.manage": "Answer this",
598
+ "board.setStatus": "Where it stands",
599
+ "board.replyLabel": "Your answer",
600
+ "board.replyPlaceholder": "Say something back",
601
+ "board.hide": "Take off the board",
602
+ "board.unhide": "Put it back",
603
+ "board.hidden": "Off the board",
604
+ "board.approve": "Approve: put it on the board",
605
+ "board.unapprove": "Keep it waiting",
606
+ "board.save": "Save",
607
+ "board.context": "Sent with",
608
+ // ---- Where a fix is ----
609
+ // In the owner's sheet, once Done is picked. An idea is built, not fixed.
610
+ "fix.title": "Fixed in",
611
+ "fix.titleIdea": "Built in",
612
+ "fix.version": "Version",
613
+ "fix.versionBad": "Letters, numbers and dots only, like 1.4.2.",
614
+ "fix.link": "Link to the fix",
615
+ "fix.linkNote": "A commit, pull request or release on github.com or gitlab.com.",
616
+ "fix.linkBad": "That is not a link to a page on github.com or gitlab.com.",
617
+ "fix.who": "Whoever reported this sees it on their board.",
618
+ // On the card, for everybody.
619
+ "fix.in": "Fixed in {version}",
620
+ "fix.inIdea": "Built in {version}",
621
+ // {site} is GitHub or GitLab, whichever the link goes to.
622
+ "fix.view": "View on {site}",
623
+ // ---- The note for whoever reported it ----
624
+ "news.bug": "Your bug is fixed",
625
+ "news.bugIn": "Your bug is fixed in {version}",
626
+ "news.idea": "Your idea is built",
627
+ "news.ideaIn": "Your idea is in {version}",
628
+ "news.see": "See the fix",
629
+ // ---- The conversation under a post ----
630
+ "talk.title": "Conversation",
631
+ "talk.open": "Open the conversation",
632
+ "talk.count": "{n} messages",
633
+ "talk.you": "You say",
634
+ "talk.who": "{who} says",
635
+ "talk.edited": "edited",
636
+ "talk.answerLabel": "Your answer to {app}",
637
+ "talk.placeholder": "Write your answer…",
638
+ "talk.send": "Send",
639
+ "talk.edit": "Edit",
640
+ "talk.remove": "Remove",
641
+ "talk.save": "Save",
642
+ "talk.next": "{app} answers next.",
643
+ "talk.closedDone": "Closed: {app} marked this done.",
644
+ "talk.closedDeclined": "Closed: {app} is not doing this.",
645
+ // Said when what was on screen is no longer what is on the board.
646
+ "talk.moved": "Something changed in the meantime. Have a look first.",
647
+ "talk.hide": "Hide",
648
+ "talk.unhide": "Put back",
649
+ "talk.label": "Conversation",
650
+ "talk.writeTo": "Write to {who}…",
651
+ "talk.changeLast": "Change your last message",
652
+ "talk.gets": "{who} gets a note on the board.",
653
+ // How an owner's sheet names the author of an anonymous post.
654
+ "talk.author": "the author",
655
+ // ---- The note for whoever wrote it, once the app answered ----
656
+ "answered.bug": "{app} answered your bug",
657
+ "answered.idea": "{app} answered your idea",
658
+ "answered.review": "{app} answered your review",
659
+ "answered.see": "See the conversation",
660
+ // ---- For owners: answers waiting ----
661
+ "owner.newAnswer": "New answer",
662
+ "owner.waitingOne": "1 answer waits for you",
663
+ "owner.waitingMany": "{n} answers wait for you",
664
+ "owner.showThese": "Show only these",
665
+ // ---- Search and filter ----
666
+ "search.placeholder": "Search bugs and ideas",
667
+ "search.clear": "Clear the search",
668
+ "search.countOne": '1 post matches "{q}"',
669
+ "search.count": '{n} posts match "{q}"',
670
+ "search.inThread": "In the conversation:",
671
+ "filter.button": "Filter",
672
+ "filter.title": "Filter",
673
+ "filter.kind": "Kind",
674
+ "filter.status": "Status",
675
+ "filter.statusNote": "Reviews have no status, so choosing one hides them.",
676
+ "filter.own": "Only for you",
677
+ "filter.waiting": "Waiting on you",
678
+ "filter.mine": "Only my posts",
679
+ "filter.reset": "Reset",
680
+ "filter.showOne": "Show 1 post",
681
+ "filter.show": "Show {n} posts",
682
+ "filter.on": "{n} filters on",
683
+ "filter.remove": "Turn off {label}",
684
+ "filter.clearAll": "Clear all",
685
+ "filter.none": "Nothing found",
686
+ "filter.noneNote": "Nothing matches your search and filters. Clear them to look everywhere.",
687
+ "filter.clear": "Clear search and filters",
688
+ // ---- Updates ----
689
+ "updates.title": "Updates",
690
+ "updates.intro": "What changed in {app}. Tap one to see the change itself.",
691
+ "updates.empty": "No updates yet.",
692
+ "updates.emptyOwner": "No updates yet. Write the first one with +.",
693
+ "updates.bugOne": "1 bug",
694
+ "updates.bugMany": "{n} bugs",
695
+ "updates.ideaOne": "1 idea",
696
+ "updates.ideaMany": "{n} ideas",
697
+ "updates.fromBoard": "{list} from this board",
698
+ "updates.write": "New update",
699
+ "updates.titleLabel": "Title",
700
+ "updates.titlePlaceholder": "What changed, in a few words",
701
+ "updates.link": "Link on GitHub or GitLab",
702
+ "updates.linkNote": "Only github.com and gitlab.com links: a release, pull request or commit.",
703
+ "updates.textLabel": "What changed",
704
+ "updates.textPlaceholder": "A few lines for the people using {app}",
705
+ "updates.fixes": "What it fixes",
706
+ "updates.fixesNote": "Open and planned bugs and ideas. Ticked ones go to Done, with this version and link.",
707
+ "updates.fixesNone": "No open bugs or ideas on the board.",
708
+ "updates.publish": "Publish update",
709
+ "updates.delete": "Delete update",
710
+ "updates.deleteTitle": "Delete this update?",
711
+ "updates.deleteNote": "It leaves the Updates page. The posts it fixed stay Done.",
712
+ "updates.deleteBtn": "Delete",
713
+ // ---- When ----
714
+ "time.now": "just now",
715
+ "time.min": "{n}m ago",
716
+ "time.hour": "{n}h ago",
717
+ "time.day": "{n}d ago"
718
+ };
719
+ function di(e = {}) {
720
+ return (t, a) => {
721
+ let i = e[t] ?? li[t];
722
+ if (a) for (const [o, r] of Object.entries(a)) i = i.split(`{${o}}`).join(String(r));
723
+ return i;
724
+ };
725
+ }
726
+ const Oe = Object.freeze({ kinds: [], statuses: [], mine: !1, own: [] });
727
+ function ci(e) {
728
+ return e.kinds.length + e.statuses.length + (e.mine ? 1 : 0) + e.own.length;
729
+ }
730
+ function On(e, t) {
731
+ return !(t.kinds.length && !t.kinds.includes(e.kind) || t.statuses.length && (e.kind === "review" || !t.statuses.includes(e.status)) || t.mine && !e.mine || t.own.length && !t.own.some((a) => a === "waiting" ? Et(e) : a === "hidden" ? !!e.hidden : !!e.pending));
732
+ }
733
+ function rn(e) {
734
+ return e.toLowerCase().split(/\s+/).filter(Boolean);
735
+ }
736
+ function Nn(e, t) {
737
+ const a = rn(t);
738
+ if (!a.length) return { in: "text" };
739
+ const i = (d, u) => d.toLowerCase().includes(u);
740
+ if (a.every((d) => i(e.text, d))) return { in: "text" };
741
+ const o = at(e.thread);
742
+ if (!a.every((d) => i(e.text, d) || o.some((u) => i(u.text, d)))) return null;
743
+ const r = (d) => a.filter((u) => i(d.text, u)).length;
744
+ return { in: "thread", message: o.reduce((d, u) => r(u) > r(d) ? u : d, o[0]) };
745
+ }
746
+ function pi(e, t, a = 60) {
747
+ if (e.length <= a) return e;
748
+ const i = e.toLowerCase(), o = Math.min(...rn(t).map((d) => i.indexOf(d)).filter((d) => d >= 0), e.length);
749
+ let r = o === e.length ? 0 : Math.max(0, Math.min(o - 8, e.length - a));
750
+ if (r > 0 && e[r - 1] !== " ") {
751
+ const d = e.indexOf(" ", r);
752
+ d >= 0 && d < o && (r = d + 1);
753
+ }
754
+ const l = e.slice(r, r + a).trim();
755
+ return `${r > 0 ? "…" : ""}${l}${r + a < e.length ? "…" : ""}`;
756
+ }
757
+ function ui(e, t) {
758
+ const a = rn(t);
759
+ if (!a.length) return [{ text: e, hit: !1 }];
760
+ const i = e.toLowerCase(), o = new Array(e.length).fill(!1);
761
+ for (const l of a)
762
+ for (let d = i.indexOf(l); d >= 0; d = i.indexOf(l, d + 1)) o.fill(!0, d, d + l.length);
763
+ const r = [];
764
+ for (let l = 0; l < e.length; l++) {
765
+ const d = r[r.length - 1];
766
+ d && d.hit === o[l] ? d.text += e[l] : r.push({ text: e[l], hit: o[l] });
767
+ }
768
+ return r;
769
+ }
770
+ function bi(e) {
771
+ return {
772
+ project: e.project,
773
+ posts: e.posts.filter((t) => !t.hidden).map(({ who: t, face: a, shot: i, shotFor: o, context: r, hidden: l, thread: d, ...u }) => {
774
+ const p = at(d);
775
+ return { ...u, ...p.length ? { thread: p } : {}, mine: !1, voted: !1 };
776
+ }),
777
+ // The Updates page is public to begin with, so it comes along.
778
+ ...e.updates ? { updates: e.updates } : {}
779
+ };
780
+ }
781
+ const jt = 6e4, Wt = 60 * jt, Vt = 24 * Wt, hi = 7 * Vt, Bn = /* @__PURE__ */ new Map();
782
+ function aa(e, t, a = Date.now()) {
783
+ const i = Math.max(0, a - e);
784
+ if (i >= hi) {
785
+ let o = Bn.get(t);
786
+ return o || (o = new Intl.DateTimeFormat(t, { day: "numeric", month: "short" }), Bn.set(t, o)), { date: o.format(new Date(e)).replace(".", "") };
787
+ }
788
+ return i < jt ? { key: "time.now", vars: { n: "0" } } : i < Wt ? { key: "time.min", vars: { n: String(Math.floor(i / jt)) } } : i < Vt ? { key: "time.hour", vars: { n: String(Math.floor(i / Wt)) } } : { key: "time.day", vars: { n: String(Math.floor(i / Vt)) } };
789
+ }
790
+ const X = (e, t, a = !1) => /* @__PURE__ */ n(
791
+ "svg",
792
+ {
793
+ width: e,
794
+ height: e,
795
+ viewBox: "0 0 24 24",
796
+ fill: a ? "currentColor" : "none",
797
+ stroke: a ? "none" : "currentColor",
798
+ "stroke-width": "2.25",
799
+ "stroke-linecap": "round",
800
+ "stroke-linejoin": "round",
801
+ "aria-hidden": "true",
802
+ children: t
803
+ }
804
+ ), He = ({ size: e = 22 }) => X(e, /* @__PURE__ */ n("path", { d: "M15 5l-7 7 7 7" })), Ce = ({ size: e = 22 }) => X(e, /* @__PURE__ */ n("path", { d: "M6 6l12 12M18 6L6 18" })), ia = ({ size: e = 20 }) => X(e, /* @__PURE__ */ n("path", { d: "M12 5v14M5 12h14" })), on = ({ size: e = 18 }) => X(e, /* @__PURE__ */ n("path", { d: "M4 7h16M9 7V4.5h6V7M6.5 7l1 12.5h9l1-12.5M10 11v5M14 11v5" })), sn = ({ size: e = 14 }) => X(e, /* @__PURE__ */ n("path", { d: "M12 6.5l7.2 9a1 1 0 0 1-.78 1.6H5.58a1 1 0 0 1-.78-1.6L12 6.5z" }), !0), fi = ({ size: e = 24 }) => X(
805
+ e,
806
+ /* @__PURE__ */ n("path", { d: "M12 6C12 5.45 11.55 5 11 5H5.815L6.48 1.825c.015-.075.025-.155.025-.235 0-.31-.125-.59-.33-.795L5.38 0 .44 4.94C.17 5.21 0 5.585 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.155-.375 1.38-.915l2.265-5.29c.065-.17.105-.35.105-.545V6zm10.5 4h-6.75c-.62 0-1.155.375-1.38.915l-2.265 5.29c-.065.17-.105.35-.105.545V18c0 .55.45 1 1 1h5.185l-.665 3.175c-.015.075-.025.155-.025.235 0 .31.125.59.33.795L18.62 24l4.94-4.94c.27-.27.44-.645.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z" }),
807
+ !0
808
+ ), mt = (e, t, a) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: t, fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: a }) }), _i = ({ size: e = 10 }) => mt(
809
+ e,
810
+ "32 24 28 28",
811
+ "M46.5 24C47.9547 24 49.125 25.1703 49.125 26.625V38.875C49.125 40.3297 47.9547 41.5 46.5 41.5C45.0453 41.5 43.875 40.3297 43.875 38.875V26.625C43.875 25.1703 45.0453 24 46.5 24ZM43 48.5C43 47.5717 43.3687 46.6815 44.0251 46.0251C44.6815 45.3687 45.5717 45 46.5 45C47.4283 45 48.3185 45.3687 48.9749 46.0251C49.6313 46.6815 50 47.5717 50 48.5C50 49.4283 49.6313 50.3185 48.9749 50.9749C48.3185 51.6313 47.4283 52 46.5 52C45.5717 52 44.6815 51.6313 44.0251 50.9749C43.3687 50.3185 43 49.4283 43 48.5Z"
812
+ ), gi = ({ size: e = 10 }) => mt(
813
+ e,
814
+ "32 24 27.18 27.18",
815
+ "M59.182 31.1652V34.6498C59.182 35.8396 58.9535 37.0177 58.5095 38.117C58.0656 39.2162 57.4149 40.2149 56.5947 41.0562C55.7744 41.8975 54.8006 42.5649 53.7289 43.0202C52.6572 43.4755 51.5085 43.7098 50.3485 43.7098H46.951V50.6791H44.233V40.9222L44.2588 39.5283C44.4299 37.2528 45.4321 35.1274 47.065 33.5769C48.6979 32.0264 50.8412 31.1651 53.0665 31.1652H59.182ZM37.438 25.5898C39.4348 25.59 41.3811 26.2343 43.0012 27.4315C44.6214 28.6287 45.8334 30.3181 46.4658 32.2608C45.4259 33.1646 44.5739 34.2738 43.9605 35.5224C43.3472 36.7709 42.9851 38.1333 42.8957 39.5283H41.515C38.9919 39.5283 36.5723 38.5003 34.7882 36.6706C33.0042 34.8408 32.002 32.3591 32.002 29.7714V25.5898H37.438Z"
816
+ ), vi = ({ size: e = 10 }) => mt(
817
+ e,
818
+ "32 24 27.188 27.188",
819
+ "M53.8936 40.0933C53.547 40.4266 53.387 40.9186 53.4683 41.3866L54.6536 47.9466C54.7483 48.5066 54.5216 49.0653 54.0536 49.3866C53.6003 49.7199 53.0003 49.7599 52.4936 49.4933L46.5883 46.4133C46.3736 46.3066 46.147 46.2386 45.9216 46.2386H45.5603C45.427 46.2519 45.3083 46.3066 45.2003 46.3586L39.2936 49.4533C39.0003 49.5999 38.667 49.6533 38.347 49.5999C37.547 49.4399 37.0283 48.6919 37.1603 47.9053L38.347 41.3453C38.427 40.8666 38.267 40.3866 37.9216 40.0399L33.107 35.3733C32.707 34.9733 32.5603 34.3986 32.7483 33.8666C32.9216 33.3453 33.3736 32.9586 33.9336 32.8666L40.5603 31.9053C41.067 31.8519 41.507 31.5466 41.7336 31.0933L44.6536 25.1066C44.7203 24.9733 44.8136 24.8519 44.9216 24.7466L45.0403 24.6533C45.0936 24.5853 45.1736 24.5333 45.255 24.4799L45.4003 24.4266L45.627 24.3333H46.1883C46.695 24.3866 47.135 24.6919 47.3616 25.1319L50.3203 31.0933C50.5336 31.5333 50.947 31.8266 51.427 31.9053L58.0536 32.8666C58.6136 32.9466 59.0816 33.3333 59.267 33.8666C59.4403 34.3986 59.2936 34.9866 58.8803 35.3733L53.8936 40.0933Z"
820
+ ), Yt = ({ size: e = 16, filled: t = !1 }) => X(e, /* @__PURE__ */ n("path", { d: "M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.3-4.1 5.9-.9L12 3.5z" }), t), xi = ({ size: e = 22 }) => X(e, /* @__PURE__ */ n("path", { d: "M3 11l18-5v12L3 14v-3zM11.6 16.8a3 3 0 1 1-5.8-1.6" })), ra = ({ size: e = 12 }) => X(e, /* @__PURE__ */ n("path", { d: "M7 17L17 7M7 7h10v10" })), mi = ({ size: e = 16 }) => X(e, /* @__PURE__ */ n("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })), wi = ({ size: e = 14 }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44L16.47 7.818H7.537L5.333 1.07a.857.857 0 0 0-.29-.441.875.875 0 0 0-1-.054.859.859 0 0 0-.336.405L.433 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.01-7.002z" }) }), ki = ({ size: e = 14 }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z" }) }), yi = ({ size: e = 16 }) => X(e, /* @__PURE__ */ n("path", { d: "M17.5 11a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0zM16 16l4 4" })), Ci = ({ size: e = 16 }) => X(e, /* @__PURE__ */ n("path", { d: "M4 7h9M19 7h1M4 17h3M13 17h7M18.5 7a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0zM12.5 17a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z" })), Fn = ({ size: e = 16 }) => X(e, /* @__PURE__ */ n("path", { d: "M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v7a2.5 2.5 0 0 1-2.5 2.5H11l-4.5 4v-4A2.5 2.5 0 0 1 4 13.5z" })), oa = ({ size: e = 20 }) => X(e, /* @__PURE__ */ n("path", { d: "M4 5.5h16v13H4zM4 15.5l4.5-4.5 4 4 2.5-2.5 5 5M15.5 9.5h.01" })), sa = (e, t, a, i) => /* @__PURE__ */ n(
821
+ "svg",
822
+ {
823
+ width: e,
824
+ height: e,
825
+ viewBox: t,
826
+ fill: "none",
827
+ stroke: "currentColor",
828
+ "stroke-width": i,
829
+ "stroke-linecap": "round",
830
+ "stroke-linejoin": "round",
831
+ "aria-hidden": "true",
832
+ children: /* @__PURE__ */ n("path", { d: a })
833
+ }
834
+ ), Li = ({ size: e = 10 }) => mt(
835
+ e,
836
+ "0 0 10 10",
837
+ "M5 0C4.01109 0 3.0444 0.293245 2.22215 0.842652C1.3999 1.39206 0.759043 2.17295 0.380605 3.08658C0.00216642 4.00021 -0.0968502 5.00555 0.0960758 5.97545C0.289002 6.94536 0.765206 7.83627 1.46447 8.53553C2.16373 9.23479 3.05465 9.711 4.02455 9.90392C4.99445 10.0969 5.99979 9.99783 6.91342 9.6194C7.82705 9.24096 8.60794 8.60009 9.15735 7.77785C9.70676 6.9556 10 5.98891 10 5C9.9986 3.67435 9.47137 2.40339 8.53399 1.46601C7.59661 0.528633 6.32565 0.00139991 5 0ZM7.69231 5.38461H5C4.89799 5.38461 4.80017 5.34409 4.72804 5.27196C4.65591 5.19983 4.61539 5.10201 4.61539 5V2.30769C4.61539 2.20569 4.65591 2.10786 4.72804 2.03573C4.80017 1.9636 4.89799 1.92308 5 1.92308C5.10201 1.92308 5.19984 1.9636 5.27197 2.03573C5.34409 2.10786 5.38462 2.20569 5.38462 2.30769V4.61538H7.69231C7.79431 4.61538 7.89214 4.65591 7.96427 4.72803C8.0364 4.80016 8.07692 4.89799 8.07692 5C8.07692 5.10201 8.0364 5.19983 7.96427 5.27196C7.89214 5.34409 7.79431 5.38461 7.69231 5.38461Z"
838
+ ), wt = ({ size: e = 12 }) => sa(e, "-0.2 -1.8 12 12", "M0.803574 4.3749L4.01786 7.58918L10.8036 0.803467", 1.607), Si = ({ size: e = 12 }) => sa(e, "-1.7125 -1.7125 12 12", "M0.787506 0.787598L7.78751 7.7876M7.78751 0.787598L0.787506 7.7876", 1.575);
839
+ function la({ code: e, src: t, size: a = 20 }) {
840
+ const [i, o] = m(!1), [r, l] = m(!1), d = e ? Mi[Number(e[2]) % 10] : "var(--pnb-line)";
841
+ return /* @__PURE__ */ n("span", { class: "face", style: { width: `${a}px`, height: `${a}px` }, "aria-hidden": "true", children: [
842
+ !i && /* @__PURE__ */ n("svg", { class: "face__stand-in", viewBox: "0 0 160 160", width: a, height: a, children: /* @__PURE__ */ n("path", { fill: d, d: Ti }) }),
843
+ t && !r && /* @__PURE__ */ n(
844
+ "img",
845
+ {
846
+ class: `face__img${i ? "" : " face__img--loading"}`,
847
+ src: t,
848
+ alt: "",
849
+ width: a,
850
+ height: a,
851
+ loading: "lazy",
852
+ onLoad: () => o(!0),
853
+ onError: () => l(!0)
854
+ }
855
+ )
856
+ ] });
857
+ }
858
+ const Ti = "M125.8 16.67l31.77 55.01c2.86 4.95 2.86 11.05 0 16L125.8 142.7c-2.85 4.95-8.14 8-13.85 8H48.42c-5.72 0-11-3.05-13.85-8L2.8 87.69c-2.85-4.95-2.85-11.05 0-16L34.57 16.67c2.86-4.95 8.14-8 13.85-8h63.53c5.72 0 11 3.05 13.85 8z", Mi = ["#FC8702", "#D94432", "#E9B213", "#1F2348", "#0582CA", "#5F4B8B", "#21BCA5", "#FA7268", "#88B04B", "#795548"], ue = {
859
+ bug: {
860
+ icon: (e) => /* @__PURE__ */ n(_i, { size: e }),
861
+ label: "board.kindBug",
862
+ plural: "board.bugs",
863
+ tile: "board.tileBug",
864
+ note: "board.tileBugNote"
865
+ },
866
+ idea: {
867
+ icon: (e) => /* @__PURE__ */ n(gi, { size: e }),
868
+ label: "board.kindIdea",
869
+ plural: "board.ideas",
870
+ tile: "board.tileIdea",
871
+ note: "board.tileIdeaNote"
872
+ },
873
+ review: {
874
+ icon: (e) => /* @__PURE__ */ n(vi, { size: e }),
875
+ label: "board.kindReview",
876
+ plural: "board.reviews",
877
+ tile: "board.tileReview",
878
+ note: "board.tileReviewNote"
879
+ }
880
+ };
881
+ function da({ n: e, t, size: a = 16 }) {
882
+ const i = Math.round(e * 2) / 2;
883
+ return /* @__PURE__ */ n("span", { class: "stars", role: "img", "aria-label": t("board.stars", { n: i }), children: [1, 2, 3, 4, 5].map((o) => {
884
+ const r = Math.max(0, Math.min(1, i - (o - 1)));
885
+ return /* @__PURE__ */ n("span", { class: "stars__one", children: [
886
+ /* @__PURE__ */ n(Yt, { size: a, filled: !0 }),
887
+ r > 0 && /* @__PURE__ */ n("span", { class: "stars__fill", style: { width: `${r * 100}%` }, children: /* @__PURE__ */ n(Yt, { size: a, filled: !0 }) })
888
+ ] }, o);
889
+ }) });
890
+ }
891
+ const Ai = {
892
+ planned: { icon: () => /* @__PURE__ */ n(Li, {}), label: "board.statusPlanned" },
893
+ done: { icon: () => /* @__PURE__ */ n(wt, {}), label: "board.statusDone" },
894
+ declined: { icon: () => /* @__PURE__ */ n(Si, {}), label: "board.statusDeclined" }
895
+ };
896
+ function kt(e) {
897
+ const t = new Set(e.filter((a) => a !== "review"));
898
+ return t.size === 1 && t.has("bug") ? "board.statusFixed" : t.size === 1 && t.has("idea") ? "board.statusDone" : "board.statusFixedOrDone";
899
+ }
900
+ function ln(e, t) {
901
+ return e.status === "done" ? kt([e.kind]) : t;
902
+ }
903
+ function tt({ tone: e, icon: t, label: a }) {
904
+ return /* @__PURE__ */ n("span", { class: "badge", children: [
905
+ /* @__PURE__ */ n("span", { class: `badge__dot badge__dot--${e}`, children: t() }),
906
+ a
907
+ ] });
908
+ }
909
+ function ca({ site: e, size: t = 14 }) {
910
+ return e === "GitLab" ? /* @__PURE__ */ n(wi, { size: t }) : /* @__PURE__ */ n(ki, { size: t });
911
+ }
912
+ function pa({ href: e, t, label: a = "fix.view" }) {
913
+ const i = je(e), o = Hn(e);
914
+ return !i || !o ? null : /* @__PURE__ */ n(
915
+ "a",
916
+ {
917
+ class: "code-link",
918
+ href: i,
919
+ target: "_blank",
920
+ rel: "noopener noreferrer",
921
+ onClick: (r) => r.stopPropagation(),
922
+ children: [
923
+ /* @__PURE__ */ n(ca, { site: o }),
924
+ /* @__PURE__ */ n("span", { children: t(a, { site: o }) }),
925
+ /* @__PURE__ */ n(ra, { size: 12 })
926
+ ]
927
+ }
928
+ );
929
+ }
930
+ function zi({ post: e, t }) {
931
+ const a = e.status === "done" ? e.fix : void 0;
932
+ return !a || !a.version && !a.link ? null : /* @__PURE__ */ n("div", { class: "fix", children: [
933
+ a.version && /* @__PURE__ */ n("span", { class: "fix__version", children: t(e.kind === "idea" ? "fix.inIdea" : "fix.in", { version: a.version }) }),
934
+ a.version && a.link && /* @__PURE__ */ n("span", { class: "fix__dot", "aria-hidden": "true", children: "·" }),
935
+ a.link && /* @__PURE__ */ n(pa, { href: a.link, t })
936
+ ] });
937
+ }
938
+ function $i({
939
+ votes: e,
940
+ voted: t,
941
+ onVote: a,
942
+ t: i,
943
+ label: o = "board.upvote"
944
+ }) {
945
+ return /* @__PURE__ */ n(
946
+ "button",
947
+ {
948
+ type: "button",
949
+ class: "vote",
950
+ "aria-label": i(o),
951
+ "aria-pressed": t,
952
+ onClick: (r) => {
953
+ r.stopPropagation(), a(!t);
954
+ },
955
+ children: [
956
+ /* @__PURE__ */ n(sn, {}),
957
+ /* @__PURE__ */ n("span", { children: e })
958
+ ]
959
+ }
960
+ );
961
+ }
962
+ function dn({
963
+ post: e,
964
+ t,
965
+ locale: a,
966
+ onVote: i,
967
+ onDelete: o,
968
+ onManage: r,
969
+ onTalk: l,
970
+ shotUrl: d,
971
+ onShot: u,
972
+ faceUrl: p,
973
+ fresh: b,
974
+ query: x = "",
975
+ found: c,
976
+ bare: h
977
+ }) {
978
+ const [v, L] = m(!1), _ = ue[e.kind], k = Ai[e.status], g = aa(e.at, a), S = at(e.thread).length;
979
+ return /* @__PURE__ */ n(
980
+ "li",
981
+ {
982
+ class: `card${r ? " card--owner" : ""}${e.hidden || e.pending ? " card--hidden" : ""}`,
983
+ onClick: r,
984
+ role: r ? "button" : void 0,
985
+ tabIndex: r ? 0 : void 0,
986
+ "aria-label": r ? t("board.manage") : void 0,
987
+ onKeyDown: r ? (y) => {
988
+ y.target === y.currentTarget && (y.key === "Enter" || y.key === " ") && (y.preventDefault(), r());
989
+ } : void 0,
990
+ children: [
991
+ /* @__PURE__ */ n("div", { class: "card__head", children: [
992
+ /* @__PURE__ */ n(tt, { tone: e.kind, icon: _.icon, label: t(_.label) }),
993
+ k && /* @__PURE__ */ n(tt, { tone: e.status, icon: k.icon, label: t(ln(e, k.label)) }),
994
+ e.rating !== void 0 && /* @__PURE__ */ n(da, { n: e.rating, t }),
995
+ e.shot && !d && /* @__PURE__ */ n("span", { class: "card__shot", title: t("board.shot"), "aria-label": t("board.shot"), children: /* @__PURE__ */ n(oa, { size: 16 }) }),
996
+ e.hidden && /* @__PURE__ */ n("span", { class: "card__off", children: t("board.hidden") }),
997
+ e.pending && /* @__PURE__ */ n("span", { class: "card__wait", children: t("board.waiting") }),
998
+ b && /* @__PURE__ */ n("span", { class: "card__new", children: t("owner.newAnswer") }),
999
+ /* @__PURE__ */ n("span", { class: "card__when", children: "date" in g ? g.date : t(g.key, g.vars) })
1000
+ ] }),
1001
+ /* @__PURE__ */ n("p", { class: "card__text", children: /* @__PURE__ */ n(Pn, { text: e.text, query: x }) }),
1002
+ c && /* @__PURE__ */ n("p", { class: "card__found", children: [
1003
+ t("search.inThread"),
1004
+ " “",
1005
+ /* @__PURE__ */ n(Pn, { text: pi(c.text, x), query: x }),
1006
+ "”"
1007
+ ] }),
1008
+ d && !v && !h && /* @__PURE__ */ n(
1009
+ "button",
1010
+ {
1011
+ type: "button",
1012
+ class: "card__pic",
1013
+ "aria-label": t("board.shotOpen"),
1014
+ onClick: (y) => {
1015
+ y.stopPropagation(), u?.();
1016
+ },
1017
+ children: /* @__PURE__ */ n("img", { src: d, alt: t("board.shot"), loading: "lazy", onError: () => L(!0) })
1018
+ }
1019
+ ),
1020
+ /* @__PURE__ */ n(zi, { post: e, t }),
1021
+ !h && /* @__PURE__ */ n("div", { class: "card__foot", children: [
1022
+ /* @__PURE__ */ n("span", { class: "card__who", children: [
1023
+ e.face && /* @__PURE__ */ n(la, { code: e.face, src: p }),
1024
+ /* @__PURE__ */ n("span", { class: "card__name", children: e.mine ? t("board.byYou") : e.who ?? (e.face ? "" : t("board.anon")) })
1025
+ ] }),
1026
+ o && /* @__PURE__ */ n(
1027
+ "button",
1028
+ {
1029
+ type: "button",
1030
+ class: "icon-btn card__bin",
1031
+ "aria-label": t("board.delete"),
1032
+ onClick: (y) => {
1033
+ y.stopPropagation(), o();
1034
+ },
1035
+ children: /* @__PURE__ */ n(on, {})
1036
+ }
1037
+ ),
1038
+ S > 0 && (l ? /* @__PURE__ */ n(
1039
+ "button",
1040
+ {
1041
+ type: "button",
1042
+ class: "card__talk",
1043
+ "aria-label": `${t("talk.open")}: ${t("talk.count", { n: S })}`,
1044
+ onClick: (y) => {
1045
+ y.stopPropagation(), l();
1046
+ },
1047
+ children: [
1048
+ /* @__PURE__ */ n(Fn, {}),
1049
+ /* @__PURE__ */ n("span", { children: S })
1050
+ ]
1051
+ }
1052
+ ) : /* @__PURE__ */ n("span", { class: "card__talk", role: "img", "aria-label": t("talk.count", { n: S }), children: [
1053
+ /* @__PURE__ */ n(Fn, {}),
1054
+ /* @__PURE__ */ n("span", { children: S })
1055
+ ] })),
1056
+ i ? /* @__PURE__ */ n(
1057
+ $i,
1058
+ {
1059
+ votes: e.votes,
1060
+ voted: e.voted,
1061
+ onVote: i,
1062
+ t,
1063
+ label: e.kind === "review" ? "board.helpful" : "board.upvote"
1064
+ }
1065
+ ) : /* @__PURE__ */ n("span", { class: "vote vote--count", role: "img", "aria-label": t("board.votes", { n: e.votes }), children: [
1066
+ /* @__PURE__ */ n(sn, {}),
1067
+ /* @__PURE__ */ n("span", { children: e.votes })
1068
+ ] })
1069
+ ] })
1070
+ ]
1071
+ }
1072
+ );
1073
+ }
1074
+ function Pn({ text: e, query: t }) {
1075
+ return t.trim() ? /* @__PURE__ */ n(R, { children: ui(e, t).map((a, i) => a.hit ? /* @__PURE__ */ n("mark", { children: a.text }, i) : a.text) }) : /* @__PURE__ */ n(R, { children: e });
1076
+ }
1077
+ function Oi({
1078
+ t: e,
1079
+ kinds: t,
1080
+ appName: a,
1081
+ reviewed: i,
1082
+ onPick: o,
1083
+ onBoard: r
1084
+ }) {
1085
+ return /* @__PURE__ */ n("div", { class: "choose", children: [
1086
+ /* @__PURE__ */ n("h3", { class: "choose__title", children: e("board.chooseTitle") }),
1087
+ /* @__PURE__ */ n("div", { class: `tiles${t.length % 2 ? " tiles--odd" : ""}`, children: t.map((l) => {
1088
+ const d = l === "review" && i;
1089
+ return /* @__PURE__ */ n("button", { type: "button", class: `tile tile--${l}`, disabled: d, onClick: () => o(l), children: [
1090
+ /* @__PURE__ */ n("span", { class: "tile__icon", children: ue[l].icon(28) }),
1091
+ /* @__PURE__ */ n("span", { class: "tile__label", children: e(ue[l].tile) }),
1092
+ /* @__PURE__ */ n("span", { class: "tile__note", children: d ? e("board.tileReviewDone", { app: a }) : e(ue[l].note, { app: a }) })
1093
+ ] }, l);
1094
+ }) }),
1095
+ r && /* @__PURE__ */ n("div", { class: "choose__board", children: /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: r, children: e("board.seeBoard") }) })
1096
+ ] });
1097
+ }
1098
+ function Ni({
1099
+ t: e,
1100
+ onBack: t,
1101
+ waiting: a,
1102
+ appName: i
1103
+ }) {
1104
+ return /* @__PURE__ */ n("div", { class: "sent", role: "status", children: [
1105
+ /* @__PURE__ */ n("span", { class: "sent__check", children: /* @__PURE__ */ n(wt, { size: 44 }) }),
1106
+ /* @__PURE__ */ n("h3", { class: "sent__title", children: e("board.sent") }),
1107
+ /* @__PURE__ */ n("p", { class: "sent__note", children: a ? e("board.sentWaiting", { app: i ?? "" }) : e("board.sentNote") }),
1108
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn sent__back", onClick: t, children: e("board.sentBack") })
1109
+ ] });
1110
+ }
1111
+ function Bi({
1112
+ t: e,
1113
+ kind: t,
1114
+ posts: a,
1115
+ likeThis: i,
1116
+ left: o,
1117
+ perDay: r,
1118
+ textMax: l,
1119
+ name: d,
1120
+ face: u,
1121
+ faceUrl: p,
1122
+ appName: b,
1123
+ screenshots: x,
1124
+ names: c = !0,
1125
+ onMeToo: h,
1126
+ onSend: v
1127
+ }) {
1128
+ const L = t === "review", [_, k] = m(""), [g, S] = m(0), [y, z] = m(null), [I, C] = m(!1), P = x === "board", [H, q] = m(!1), [D, O] = m(!c), [de, j] = m(d), [J, Te] = m(!1), [be, he] = m(null), xe = et(null), ae = le(() => a.filter((T) => T.kind !== "review"), [a]), A = le(() => L ? [] : i(ae, _), [L, ae, _, i]), Q = _.trim(), ie = o !== null && o <= 0, G = !D && !de.trim(), me = !!y && P && !I;
1129
+ ne(() => () => void (y && URL.revokeObjectURL(y.preview)), [y]);
1130
+ const yt = async (T) => {
1131
+ if (!T) return;
1132
+ q(!0), he(null);
1133
+ const we = await Ii(T);
1134
+ q(!1), we ? (z(we), C(!1)) : he({ key: "board.shotFailed" });
1135
+ }, We = async () => {
1136
+ Te(!0), he(null);
1137
+ const T = await v({
1138
+ kind: t,
1139
+ text: Q,
1140
+ anon: D,
1141
+ name: de.trim(),
1142
+ ...L ? { rating: g } : {},
1143
+ ...y ? { shot: { ...y, board: P && I } } : {}
1144
+ });
1145
+ T && (he(T.key ? { key: T.key, vars: T.vars } : null), Te(!1));
1146
+ };
1147
+ return /* @__PURE__ */ n("div", { class: "compose", children: [
1148
+ /* @__PURE__ */ n("span", { class: `compose__kind compose__kind--${t}`, children: [
1149
+ /* @__PURE__ */ n("span", { class: `badge__dot badge__dot--${t}`, children: ue[t].icon() }),
1150
+ e(ue[t].tile)
1151
+ ] }),
1152
+ L && /* @__PURE__ */ n(R, { children: [
1153
+ /* @__PURE__ */ n("span", { class: "label", children: e("board.yourRating") }),
1154
+ /* @__PURE__ */ n("div", { class: "rate", role: "radiogroup", "aria-label": e("board.yourRating"), children: [1, 2, 3, 4, 5].map((T) => /* @__PURE__ */ n(
1155
+ "button",
1156
+ {
1157
+ type: "button",
1158
+ role: "radio",
1159
+ class: `rate__star${T <= g ? " rate__star--on" : ""}`,
1160
+ "aria-checked": g === T,
1161
+ "aria-label": e("board.stars", { n: T }),
1162
+ onClick: () => S(T),
1163
+ children: /* @__PURE__ */ n(Yt, { size: 36, filled: T <= g })
1164
+ },
1165
+ T
1166
+ )) })
1167
+ ] }),
1168
+ /* @__PURE__ */ n("p", { class: "public", children: e("board.public", { app: b }) }),
1169
+ /* @__PURE__ */ n(
1170
+ "textarea",
1171
+ {
1172
+ class: "field",
1173
+ value: _,
1174
+ maxLength: l,
1175
+ placeholder: e(In[t], { app: b }),
1176
+ "aria-label": e(In[t], { app: b }),
1177
+ onInput: (T) => {
1178
+ k(T.target.value), he(null);
1179
+ }
1180
+ }
1181
+ ),
1182
+ /* @__PURE__ */ n("span", { class: "count", children: l - _.length }),
1183
+ A.length > 0 && /* @__PURE__ */ n("div", { class: "alike", children: [
1184
+ /* @__PURE__ */ n("span", { class: "label", children: [
1185
+ e("board.likeThis"),
1186
+ " ",
1187
+ e("board.likeThisNote")
1188
+ ] }),
1189
+ /* @__PURE__ */ n("ul", { class: "alike__list", children: A.map((T) => /* @__PURE__ */ n("li", { class: "alike__row", children: [
1190
+ /* @__PURE__ */ n("span", { class: "alike__body", children: [
1191
+ /* @__PURE__ */ n("span", { class: "alike__text", children: T.text }),
1192
+ /* @__PURE__ */ n("span", { class: "alike__meta", children: [
1193
+ e(ue[T.kind].label),
1194
+ ...T.status !== "open" ? [e(ln(T, Fi[T.status]))] : [],
1195
+ T.votes === 1 ? e("board.voteOne") : e("board.votes", { n: T.votes })
1196
+ ].join(" · ") })
1197
+ ] }),
1198
+ /* @__PURE__ */ n(
1199
+ "button",
1200
+ {
1201
+ type: "button",
1202
+ class: "me-too",
1203
+ "aria-pressed": T.voted,
1204
+ disabled: T.voted,
1205
+ onClick: () => h(T.id),
1206
+ children: [
1207
+ /* @__PURE__ */ n(sn, {}),
1208
+ e(T.voted ? "board.voted" : "board.meToo")
1209
+ ]
1210
+ }
1211
+ )
1212
+ ] }, T.id)) })
1213
+ ] }),
1214
+ x !== "off" && Ha(t) && /* @__PURE__ */ n("div", { class: "shot", children: [
1215
+ y ? /* @__PURE__ */ n("div", { class: "shot__preview", children: [
1216
+ /* @__PURE__ */ n("img", { src: y.preview, alt: e("board.shot") }),
1217
+ /* @__PURE__ */ n(
1218
+ "button",
1219
+ {
1220
+ type: "button",
1221
+ class: "icon-btn shot__remove",
1222
+ "aria-label": e("board.shotRemove"),
1223
+ onClick: () => z(null),
1224
+ children: /* @__PURE__ */ n(on, {})
1225
+ }
1226
+ )
1227
+ ] }) : /* @__PURE__ */ n(
1228
+ "button",
1229
+ {
1230
+ type: "button",
1231
+ class: "shot__add",
1232
+ "aria-busy": H,
1233
+ disabled: H,
1234
+ onClick: () => xe.current?.click(),
1235
+ children: [
1236
+ H ? /* @__PURE__ */ n("span", { class: "spinner" }) : /* @__PURE__ */ n(oa, {}),
1237
+ e("board.shotAdd")
1238
+ ]
1239
+ }
1240
+ ),
1241
+ /* @__PURE__ */ n("p", { class: "note", children: e(P ? "board.shotNoteBoard" : "board.shotNote", { app: b }) }),
1242
+ y && P && /* @__PURE__ */ n("label", { class: "check", children: [
1243
+ /* @__PURE__ */ n(
1244
+ "input",
1245
+ {
1246
+ type: "checkbox",
1247
+ checked: I,
1248
+ onChange: (T) => C(T.target.checked)
1249
+ }
1250
+ ),
1251
+ /* @__PURE__ */ n("span", { children: e("board.shotAgree") })
1252
+ ] }),
1253
+ /* @__PURE__ */ n(
1254
+ "input",
1255
+ {
1256
+ ref: xe,
1257
+ type: "file",
1258
+ accept: "image/*",
1259
+ hidden: !0,
1260
+ onChange: (T) => {
1261
+ const we = T.target;
1262
+ yt(we.files?.[0]), we.value = "";
1263
+ }
1264
+ }
1265
+ )
1266
+ ] }),
1267
+ c && /* @__PURE__ */ n("div", { class: "switch-row", children: [
1268
+ /* @__PURE__ */ n("span", { class: "switch-row__label", id: "pnb-anon", children: e("board.postAnon") }),
1269
+ /* @__PURE__ */ n(
1270
+ "button",
1271
+ {
1272
+ type: "button",
1273
+ role: "switch",
1274
+ class: "switch",
1275
+ "aria-checked": D,
1276
+ "aria-labelledby": "pnb-anon",
1277
+ onClick: () => O(!D)
1278
+ }
1279
+ )
1280
+ ] }),
1281
+ !D && /* @__PURE__ */ n("label", { class: "name-field", children: [
1282
+ /* @__PURE__ */ n(la, { code: u, src: u && p ? p(u) : void 0, size: 24 }),
1283
+ /* @__PURE__ */ n(
1284
+ "input",
1285
+ {
1286
+ class: "input",
1287
+ value: de,
1288
+ maxLength: Ea,
1289
+ placeholder: e("board.namePlaceholder"),
1290
+ "aria-label": e("board.namePlaceholder"),
1291
+ onInput: (T) => j(T.target.value)
1292
+ }
1293
+ )
1294
+ ] }),
1295
+ /* @__PURE__ */ n("p", { class: "note", children: e(D ? "board.anonNote" : "board.namedNote") }),
1296
+ /* @__PURE__ */ n("div", { class: "send", children: [
1297
+ /* @__PURE__ */ n(
1298
+ "button",
1299
+ {
1300
+ type: "button",
1301
+ class: "btn",
1302
+ disabled: !Q || ie || J || H || G || me || L && !g,
1303
+ "aria-busy": J,
1304
+ onClick: () => void We(),
1305
+ children: J ? /* @__PURE__ */ n("span", { class: "spinner" }) : e("board.send")
1306
+ }
1307
+ ),
1308
+ /* @__PURE__ */ n("span", { class: `left${be ? " left--bad" : ""}`, role: "status", children: be ? e(be.key, be.vars) : o === null ? "" : ie ? e("board.noneLeft", { max: r }) : e("board.left", { n: o, max: r }) })
1309
+ ] })
1310
+ ] });
1311
+ }
1312
+ const Fi = {
1313
+ open: "board.statusOpen",
1314
+ planned: "board.statusPlanned",
1315
+ done: "board.statusDone",
1316
+ declined: "board.statusDeclined"
1317
+ }, In = {
1318
+ bug: "board.placeholder",
1319
+ idea: "board.placeholderIdea",
1320
+ review: "board.placeholderReview"
1321
+ }, Pi = 1600;
1322
+ async function Ii(e) {
1323
+ const t = URL.createObjectURL(e);
1324
+ try {
1325
+ const a = new Image();
1326
+ a.src = t, await a.decode();
1327
+ for (const [i, o] of [
1328
+ [Pi, 0.82],
1329
+ [1200, 0.7],
1330
+ [900, 0.6]
1331
+ ]) {
1332
+ const r = Math.min(1, i / Math.max(a.naturalWidth, a.naturalHeight)), l = document.createElement("canvas");
1333
+ l.width = Math.max(1, Math.round(a.naturalWidth * r)), l.height = Math.max(1, Math.round(a.naturalHeight * r));
1334
+ const d = l.getContext("2d");
1335
+ if (!d) return null;
1336
+ d.fillStyle = "#ffffff", d.fillRect(0, 0, l.width, l.height), d.drawImage(a, 0, 0, l.width, l.height);
1337
+ const u = await new Promise((p) => l.toBlob(p, "image/jpeg", o));
1338
+ if (!u) return null;
1339
+ if (u.size <= Ua)
1340
+ return { type: "image/jpeg", data: await qi(u), preview: URL.createObjectURL(u) };
1341
+ }
1342
+ return null;
1343
+ } catch {
1344
+ return null;
1345
+ } finally {
1346
+ URL.revokeObjectURL(t);
1347
+ }
1348
+ }
1349
+ function qi(e) {
1350
+ return new Promise((t, a) => {
1351
+ const i = new FileReader();
1352
+ i.onload = () => t(String(i.result).split(",")[1] ?? ""), i.onerror = () => a(i.error), i.readAsDataURL(e);
1353
+ });
1354
+ }
1355
+ function Di(e, t, a, i) {
1356
+ return e.from === "app" ? i("board.reply", { app: a }) : t.mine ? i("talk.you") : i("talk.who", { who: t.who ?? i("board.anon") });
1357
+ }
1358
+ function ua({
1359
+ post: e,
1360
+ thread: t,
1361
+ appName: a,
1362
+ t: i,
1363
+ actions: o
1364
+ }) {
1365
+ return /* @__PURE__ */ n("ol", { class: "thread", "aria-label": i("talk.label"), children: t.map((r) => {
1366
+ const l = o?.(r);
1367
+ return /* @__PURE__ */ n("li", { class: `msg msg--${r.from}${r.hidden ? " msg--hidden" : ""}`, children: [
1368
+ /* @__PURE__ */ n("span", { class: "msg__who", children: [
1369
+ Di(r, e, a, i),
1370
+ r.edited ? ` · ${i("talk.edited")}` : "",
1371
+ r.hidden ? /* @__PURE__ */ n("span", { class: "card__off", children: [
1372
+ " · ",
1373
+ i("board.hidden")
1374
+ ] }) : null
1375
+ ] }),
1376
+ /* @__PURE__ */ n("p", { class: "msg__text", children: r.text }),
1377
+ l && /* @__PURE__ */ n("div", { class: "msg__actions", children: l })
1378
+ ] }, r.id);
1379
+ }) });
1380
+ }
1381
+ function qn({
1382
+ t: e,
1383
+ label: t,
1384
+ placeholder: a,
1385
+ max: i,
1386
+ initial: o = "",
1387
+ action: r,
1388
+ onSend: l,
1389
+ onCancel: d
1390
+ }) {
1391
+ const [u, p] = m(o), [b, x] = m(!1), c = u.trim();
1392
+ return /* @__PURE__ */ n("div", { class: "answer", children: [
1393
+ /* @__PURE__ */ n("span", { class: "label", children: t }),
1394
+ /* @__PURE__ */ n(
1395
+ "textarea",
1396
+ {
1397
+ class: "field answer__field",
1398
+ value: u,
1399
+ maxLength: i,
1400
+ placeholder: a,
1401
+ "aria-label": t,
1402
+ onInput: (h) => p(h.target.value)
1403
+ }
1404
+ ),
1405
+ /* @__PURE__ */ n("div", { class: "answer__row", children: [
1406
+ /* @__PURE__ */ n("span", { class: "count", children: [
1407
+ u.length,
1408
+ " / ",
1409
+ i
1410
+ ] }),
1411
+ d && /* @__PURE__ */ n("button", { type: "button", class: "text-btn answer__cancel", onClick: d, children: e("board.cancel") }),
1412
+ /* @__PURE__ */ n(
1413
+ "button",
1414
+ {
1415
+ type: "button",
1416
+ class: "btn answer__send",
1417
+ disabled: !c || b || c === o.trim(),
1418
+ "aria-busy": b,
1419
+ onClick: async () => {
1420
+ x(!0);
1421
+ const h = await l(c);
1422
+ x(!1), h && p("");
1423
+ },
1424
+ children: b ? /* @__PURE__ */ n("span", { class: "spinner" }) : r
1425
+ }
1426
+ )
1427
+ ] })
1428
+ ] });
1429
+ }
1430
+ function Ei({
1431
+ post: e,
1432
+ appName: t,
1433
+ t: a,
1434
+ locale: i,
1435
+ replyMax: o,
1436
+ onBack: r,
1437
+ onSay: l,
1438
+ onEdit: d,
1439
+ onUnsay: u
1440
+ }) {
1441
+ const [p, b] = m(null), x = e.thread ?? [], c = Re(x), h = e.mine && c?.from === "author" && !bt(e.status) ? c : void 0, v = bt(e.status) && e.kind !== "review";
1442
+ return /* @__PURE__ */ n(R, { children: [
1443
+ /* @__PURE__ */ n("header", { class: "bar", children: [
1444
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": a("board.back"), onClick: r, children: /* @__PURE__ */ n(He, {}) }),
1445
+ /* @__PURE__ */ n("h2", { class: "bar__title", children: a("talk.title") }),
1446
+ /* @__PURE__ */ n("span", {})
1447
+ ] }),
1448
+ /* @__PURE__ */ n("div", { class: "scroll talk", style: { paddingBottom: "24px" }, children: [
1449
+ /* @__PURE__ */ n("ul", { class: "list", children: /* @__PURE__ */ n(dn, { post: e, appName: t, t: a, locale: i, bare: !0 }) }),
1450
+ x.length > 0 && /* @__PURE__ */ n(
1451
+ ua,
1452
+ {
1453
+ post: e,
1454
+ thread: x,
1455
+ appName: t,
1456
+ t: a,
1457
+ actions: (L) => L === h && !p ? /* @__PURE__ */ n(R, { children: [
1458
+ /* @__PURE__ */ n("button", { type: "button", class: "link-btn", onClick: () => b(L), children: a("talk.edit") }),
1459
+ /* @__PURE__ */ n("span", { "aria-hidden": "true", children: "·" }),
1460
+ /* @__PURE__ */ n("button", { type: "button", class: "link-btn", onClick: () => void u(L), children: a("talk.remove") })
1461
+ ] }) : null
1462
+ }
1463
+ ),
1464
+ p ? /* @__PURE__ */ n(
1465
+ qn,
1466
+ {
1467
+ t: a,
1468
+ label: a("talk.changeLast"),
1469
+ placeholder: a("talk.placeholder"),
1470
+ max: o,
1471
+ initial: p.text,
1472
+ action: a("talk.save"),
1473
+ onSend: async (L) => {
1474
+ const _ = await d(p, L);
1475
+ return _ && b(null), _;
1476
+ },
1477
+ onCancel: () => b(null)
1478
+ },
1479
+ p.id
1480
+ ) : e.mine && Ga(e) ? /* @__PURE__ */ n(
1481
+ qn,
1482
+ {
1483
+ t: a,
1484
+ label: a("talk.answerLabel", { app: t }),
1485
+ placeholder: a("talk.placeholder"),
1486
+ max: o,
1487
+ action: a("talk.send"),
1488
+ onSend: l
1489
+ }
1490
+ ) : h ? /* @__PURE__ */ n("p", { class: "note talk__next", children: a("talk.next", { app: t }) }) : v && x.length > 0 ? /* @__PURE__ */ n("p", { class: "note talk__next", children: a(e.status === "done" ? "talk.closedDone" : "talk.closedDeclined", { app: t }) }) : null
1491
+ ] })
1492
+ ] });
1493
+ }
1494
+ function Ri(e) {
1495
+ const [t, a] = m(e ? "loading" : null);
1496
+ return ne(() => {
1497
+ if (!e) return;
1498
+ let i = null, o = !1;
1499
+ return e().then((r) => {
1500
+ if (!o) {
1501
+ if (!r) return a("failed");
1502
+ i = URL.createObjectURL(r), a(i);
1503
+ }
1504
+ }), () => {
1505
+ o = !0, i && URL.revokeObjectURL(i);
1506
+ };
1507
+ }, []), t;
1508
+ }
1509
+ const Ui = [
1510
+ { status: "open", label: "board.statusOpen" },
1511
+ { status: "planned", label: "board.statusPlanned" },
1512
+ { status: "done", label: "board.statusDone" },
1513
+ { status: "declined", label: "board.statusDeclined" }
1514
+ ];
1515
+ function Hi({
1516
+ t: e,
1517
+ post: t,
1518
+ appName: a,
1519
+ locale: i,
1520
+ replyMax: o,
1521
+ loadShot: r,
1522
+ onSave: l,
1523
+ onHideMessage: d,
1524
+ onBack: u
1525
+ }) {
1526
+ const [p, b] = m(t.status), x = t.thread ?? [], c = Re(x), h = t.kind === "review" ? x.find((A) => A.from === "app" && !A.hidden) : c?.from === "app" ? c : void 0, [v, L] = m(t.kind === "review" ? h ?? null : null), [_, k] = m(v?.text ?? ""), g = t.who ?? e("talk.author"), [S, y] = m(!!t.hidden), [z, I] = m(t.shotFor === "off"), [C, P] = m(!1), [H, q] = m(t.fix?.version ?? ""), [D, O] = m(t.fix?.link ?? ""), de = p === "done" && t.kind !== "review", j = Jt(H), J = je(D), Te = de && (j === null || J === null), be = t.shot && (t.shotFor === "board" || t.shotFor === "off"), he = t.shotFor === "owners" ? "board.shotForOwners" : z ? "board.shotForOff" : "board.shotForBoard", xe = t.context ? Object.entries(t.context) : [], ae = Ri(t.shot ? r : null);
1527
+ return /* @__PURE__ */ n(R, { children: [
1528
+ /* @__PURE__ */ n("header", { class: "bar", children: [
1529
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": e("board.back"), onClick: u, children: /* @__PURE__ */ n(He, {}) }),
1530
+ /* @__PURE__ */ n("h2", { class: "bar__title", children: e("board.manage") }),
1531
+ /* @__PURE__ */ n("span", {})
1532
+ ] }),
1533
+ /* @__PURE__ */ n("div", { class: "scroll talk manage", style: { paddingBottom: "24px" }, children: [
1534
+ /* @__PURE__ */ n("ul", { class: "list", children: /* @__PURE__ */ n(dn, { post: t, appName: a, t: e, locale: i, bare: !0 }) }),
1535
+ t.shot && /* @__PURE__ */ n("figure", { class: "sheet__shot", children: [
1536
+ ae === "loading" ? /* @__PURE__ */ n("span", { class: "spinner" }) : ae === "failed" ? /* @__PURE__ */ n("figcaption", { children: e("board.shotGone") }) : ae && /* @__PURE__ */ n("a", { href: ae, target: "_blank", rel: "noopener", children: /* @__PURE__ */ n("img", { src: ae, alt: e("board.shot") }) }),
1537
+ ae !== "failed" && /* @__PURE__ */ n("figcaption", { children: [
1538
+ e(he),
1539
+ " ",
1540
+ e("board.shotGoes")
1541
+ ] }),
1542
+ be && /* @__PURE__ */ n("button", { type: "button", class: "hide-btn", "aria-pressed": z, onClick: () => I(!z), children: e(z ? "board.shotOn" : "board.shotOff") })
1543
+ ] }),
1544
+ xe.length > 0 && /* @__PURE__ */ n("dl", { class: "context", "aria-label": e("board.context"), children: xe.map(([A, Q]) => /* @__PURE__ */ n("div", { children: [
1545
+ /* @__PURE__ */ n("dt", { children: A }),
1546
+ /* @__PURE__ */ n("dd", { children: Q })
1547
+ ] }, A)) }),
1548
+ t.kind !== "review" && /* @__PURE__ */ n(R, { children: [
1549
+ /* @__PURE__ */ n("span", { class: "label", style: { display: "block", marginTop: "20px", marginBottom: "8px" }, children: e("board.setStatus") }),
1550
+ /* @__PURE__ */ n("div", { class: "states", role: "radiogroup", "aria-label": e("board.setStatus"), children: Ui.map((A) => /* @__PURE__ */ n(
1551
+ "button",
1552
+ {
1553
+ type: "button",
1554
+ role: "radio",
1555
+ "aria-checked": p === A.status,
1556
+ class: "chip-pick",
1557
+ onClick: () => b(A.status),
1558
+ children: e(ln({ kind: t.kind, status: A.status }, A.label))
1559
+ },
1560
+ A.status
1561
+ )) })
1562
+ ] }),
1563
+ de && /* @__PURE__ */ n("div", { class: "fix-box", children: [
1564
+ /* @__PURE__ */ n("span", { class: "fix-box__head", children: [
1565
+ /* @__PURE__ */ n(mi, { size: 16 }),
1566
+ e(t.kind === "idea" ? "fix.titleIdea" : "fix.title")
1567
+ ] }),
1568
+ /* @__PURE__ */ n("label", { class: "fix-box__label", children: [
1569
+ e("fix.version"),
1570
+ /* @__PURE__ */ n(
1571
+ "input",
1572
+ {
1573
+ class: "input",
1574
+ value: H,
1575
+ maxLength: Zt,
1576
+ placeholder: "1.4.2",
1577
+ autocomplete: "off",
1578
+ "aria-invalid": j === null,
1579
+ onInput: (A) => q(A.target.value)
1580
+ }
1581
+ )
1582
+ ] }),
1583
+ j === null && /* @__PURE__ */ n("p", { class: "note note--bad", children: e("fix.versionBad") }),
1584
+ /* @__PURE__ */ n("label", { class: "fix-box__label", children: [
1585
+ e("fix.link"),
1586
+ /* @__PURE__ */ n(
1587
+ "input",
1588
+ {
1589
+ class: "input",
1590
+ type: "url",
1591
+ maxLength: Xt,
1592
+ inputMode: "url",
1593
+ value: D,
1594
+ placeholder: "github.com/…/pull/42",
1595
+ autocomplete: "off",
1596
+ "aria-invalid": J === null,
1597
+ onInput: (A) => O(A.target.value)
1598
+ }
1599
+ )
1600
+ ] }),
1601
+ /* @__PURE__ */ n("p", { class: `note${J === null ? " note--bad" : ""}`, children: e(J === null ? "fix.linkBad" : "fix.linkNote") }),
1602
+ /* @__PURE__ */ n("p", { class: "note", children: e("fix.who") })
1603
+ ] }),
1604
+ x.length > 0 && /* @__PURE__ */ n(R, { children: [
1605
+ /* @__PURE__ */ n("span", { class: "label", style: { display: "block", marginTop: "20px", marginBottom: "8px" }, children: e("talk.label") }),
1606
+ /* @__PURE__ */ n(
1607
+ ua,
1608
+ {
1609
+ post: t,
1610
+ thread: x,
1611
+ appName: a,
1612
+ t: e,
1613
+ actions: (A) => A.from === "author" ? /* @__PURE__ */ n("button", { type: "button", class: "link-btn", onClick: () => d(A, !A.hidden), children: e(A.hidden ? "talk.unhide" : "talk.hide") }) : A === h && t.kind !== "review" ? /* @__PURE__ */ n(
1614
+ "button",
1615
+ {
1616
+ type: "button",
1617
+ class: "link-btn",
1618
+ "aria-pressed": v === A,
1619
+ onClick: () => {
1620
+ const Q = v !== A;
1621
+ L(Q ? A : null), k(Q ? A.text : "");
1622
+ },
1623
+ children: e(v === A ? "board.cancel" : "talk.edit")
1624
+ }
1625
+ ) : null
1626
+ }
1627
+ )
1628
+ ] }),
1629
+ /* @__PURE__ */ n("span", { class: "label", style: { display: "block", marginTop: "20px", marginBottom: "8px" }, children: e(v && t.kind !== "review" ? "talk.changeLast" : "board.replyLabel") }),
1630
+ /* @__PURE__ */ n(
1631
+ "textarea",
1632
+ {
1633
+ class: "field",
1634
+ style: { minHeight: "96px" },
1635
+ value: _,
1636
+ maxLength: o,
1637
+ placeholder: t.mine ? e("board.replyPlaceholder") : e("talk.writeTo", { who: g }),
1638
+ "aria-label": e("board.replyLabel"),
1639
+ onInput: (A) => k(A.target.value)
1640
+ }
1641
+ ),
1642
+ t.kind !== "review" && !t.mine && /* @__PURE__ */ n("p", { class: "note", children: e("talk.gets", { who: t.who ?? e("board.anon") }) }),
1643
+ t.pending && /* @__PURE__ */ n("button", { type: "button", class: "approve-btn", "aria-pressed": C, onClick: () => P(!C), children: e(C ? "board.unapprove" : "board.approve") }),
1644
+ /* @__PURE__ */ n("button", { type: "button", class: "hide-btn", "aria-pressed": S, onClick: () => y(!S), children: e(S ? "board.unhide" : "board.hide") }),
1645
+ /* @__PURE__ */ n("div", { class: "manage__actions", children: /* @__PURE__ */ n(
1646
+ "button",
1647
+ {
1648
+ type: "button",
1649
+ class: "btn",
1650
+ disabled: Te,
1651
+ onClick: () => l({
1652
+ status: p,
1653
+ // Only what changes something: an empty box says nothing, and
1654
+ // the same words again are not a new message.
1655
+ ..._.trim() && _.trim() !== v?.text ? { message: { text: _.trim(), ...v ? { edit: v.id } : {} } } : {},
1656
+ hidden: S,
1657
+ ...be ? { shotOff: z } : {},
1658
+ ...t.pending && C ? { approved: !0 } : {},
1659
+ ...de ? { fix: { ...j ? { version: j } : {}, ...J ? { link: J } : {} } } : {}
1660
+ }),
1661
+ children: e("board.save")
1662
+ }
1663
+ ) })
1664
+ ] })
1665
+ ] });
1666
+ }
1667
+ function cn({
1668
+ label: e,
1669
+ onClose: t,
1670
+ children: a
1671
+ }) {
1672
+ return ne(() => {
1673
+ const i = (o) => {
1674
+ o.key === "Escape" && t();
1675
+ };
1676
+ return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
1677
+ }, [t]), /* @__PURE__ */ n("div", { class: "scrim", onClick: t, children: /* @__PURE__ */ n("div", { class: "sheet", role: "dialog", "aria-modal": "true", "aria-label": e, onClick: (i) => i.stopPropagation(), children: a }) });
1678
+ }
1679
+ function ji({ t: e, src: t, onClose: a }) {
1680
+ const [i, o] = m(!1);
1681
+ return /* @__PURE__ */ n(cn, { label: e("board.shot"), onClose: a, children: [
1682
+ /* @__PURE__ */ n("figure", { class: "sheet__shot sheet__shot--whole", children: i ? /* @__PURE__ */ n("figcaption", { children: e("board.shotGone") }) : /* @__PURE__ */ n("img", { src: t, alt: e("board.shot"), onError: () => o(!0) }) }),
1683
+ /* @__PURE__ */ n("div", { class: "sheet__actions", children: /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: a, children: e("board.close") }) })
1684
+ ] });
1685
+ }
1686
+ function ba({
1687
+ t: e,
1688
+ onConfirm: t,
1689
+ onClose: a,
1690
+ title: i = "board.deleteTitle",
1691
+ note: o = "board.deleteNote",
1692
+ confirm: r = "board.delete"
1693
+ }) {
1694
+ return /* @__PURE__ */ n(cn, { label: e(i), onClose: a, children: [
1695
+ /* @__PURE__ */ n("h2", { class: "sheet__title", children: e(i) }),
1696
+ /* @__PURE__ */ n("p", { class: "sheet__quote", children: e(o) }),
1697
+ /* @__PURE__ */ n("div", { class: "sheet__actions", children: [
1698
+ /* @__PURE__ */ n("button", { type: "button", class: "btn btn--danger", onClick: t, children: e(r) }),
1699
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: a, children: e("board.cancel") })
1700
+ ] })
1701
+ ] });
1702
+ }
1703
+ const Wi = ["open", "planned", "done", "declined"], Vi = {
1704
+ open: "board.statusOpen",
1705
+ planned: "board.statusPlanned",
1706
+ done: "board.statusDone",
1707
+ declined: "board.statusDeclined"
1708
+ }, Yi = {
1709
+ waiting: "filter.waiting",
1710
+ hidden: "board.hidden",
1711
+ pending: "board.waiting"
1712
+ };
1713
+ function Le(e, t) {
1714
+ return t.kind ? e(ue[t.kind].plural) : t.status ? e(t.status === "done" && t.kinds ? kt(t.kinds) : Vi[t.status]) : t.own ? e(Yi[t.own]) : e("filter.mine");
1715
+ }
1716
+ function Gi({
1717
+ t: e,
1718
+ kinds: t,
1719
+ owners: a,
1720
+ signedIn: i,
1721
+ value: o,
1722
+ count: r,
1723
+ onApply: l,
1724
+ onClose: d
1725
+ }) {
1726
+ const [u, p] = m(o), b = r(u), x = (h, v) => p((L) => {
1727
+ const _ = L[h];
1728
+ return { ...L, [h]: _.includes(v) ? _.filter((k) => k !== v) : [..._, v] };
1729
+ }), c = (h, v, L, _, k = !0) => /* @__PURE__ */ n("div", { class: "pick-group", role: "group", "aria-label": e(v), children: [
1730
+ /* @__PURE__ */ n("span", { class: "label", children: e(v) }),
1731
+ /* @__PURE__ */ n("div", { class: "states", children: [
1732
+ k && /* @__PURE__ */ n(
1733
+ "button",
1734
+ {
1735
+ type: "button",
1736
+ class: "chip-pick",
1737
+ "aria-pressed": !u[h].length,
1738
+ onClick: () => p((g) => ({ ...g, [h]: [] })),
1739
+ children: e("board.all")
1740
+ }
1741
+ ),
1742
+ L.map((g) => /* @__PURE__ */ n(
1743
+ "button",
1744
+ {
1745
+ type: "button",
1746
+ class: "chip-pick",
1747
+ "aria-pressed": u[h].includes(g),
1748
+ onClick: () => x(h, g),
1749
+ children: _(g)
1750
+ },
1751
+ g
1752
+ ))
1753
+ ] })
1754
+ ] });
1755
+ return /* @__PURE__ */ n(cn, { label: e("filter.title"), onClose: d, children: [
1756
+ /* @__PURE__ */ n("div", { class: "sheet__head", children: [
1757
+ /* @__PURE__ */ n("h2", { class: "sheet__title", children: e("filter.title") }),
1758
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": e("board.close"), onClick: d, children: /* @__PURE__ */ n(Ce, {}) })
1759
+ ] }),
1760
+ t.length > 1 && c("kinds", "filter.kind", t, (h) => Le(e, { kind: h })),
1761
+ c("statuses", "filter.status", Wi, (h) => Le(e, { status: h, kinds: u.kinds.length ? u.kinds : t })),
1762
+ t.includes("review") && /* @__PURE__ */ n("p", { class: "note", children: e("filter.statusNote") }),
1763
+ a.length > 0 && /* @__PURE__ */ n("div", { class: "pick-own", children: c("own", "filter.own", a, (h) => Le(e, { own: h }), !1) }),
1764
+ i && /* @__PURE__ */ n("div", { class: "switch-row switch-row--box", children: [
1765
+ /* @__PURE__ */ n("span", { class: "switch-row__label", id: "pnb-only-mine", children: e("filter.mine") }),
1766
+ /* @__PURE__ */ n(
1767
+ "button",
1768
+ {
1769
+ type: "button",
1770
+ role: "switch",
1771
+ class: "switch",
1772
+ "aria-checked": u.mine,
1773
+ "aria-labelledby": "pnb-only-mine",
1774
+ onClick: () => p((h) => ({ ...h, mine: !h.mine }))
1775
+ }
1776
+ )
1777
+ ] }),
1778
+ /* @__PURE__ */ n("div", { class: "sheet__foot", children: [
1779
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn filter-reset", onClick: () => p(Oe), children: e("filter.reset") }),
1780
+ /* @__PURE__ */ n("button", { type: "button", class: "btn", onClick: () => l(u), children: b === 1 ? e("filter.showOne") : e("filter.show", { n: b }) })
1781
+ ] })
1782
+ ] });
1783
+ }
1784
+ function Ki({
1785
+ client: e,
1786
+ t,
1787
+ locale: a,
1788
+ appName: i,
1789
+ owner: o,
1790
+ posts: r,
1791
+ onBack: l,
1792
+ onPublish: d,
1793
+ onFail: u
1794
+ }) {
1795
+ const [p, b] = m(null), [x, c] = m(!1), [h, v] = m(!1), [L, _] = m(null), k = async () => {
1796
+ const S = await e.updates();
1797
+ S.ok ? (b(S.data.updates), c(!1)) : c(!0);
1798
+ };
1799
+ ne(() => {
1800
+ k();
1801
+ }, [e]);
1802
+ const g = async (S) => {
1803
+ _(null), b((z) => z && z.filter((I) => I.id !== S.id));
1804
+ const y = await e.removeUpdate(S.id);
1805
+ y.ok || u(y.error), k();
1806
+ };
1807
+ return h ? /* @__PURE__ */ n(
1808
+ Qi,
1809
+ {
1810
+ t,
1811
+ appName: i,
1812
+ posts: r,
1813
+ onBack: () => v(!1),
1814
+ onPublish: async (S) => {
1815
+ await d(S) && (v(!1), await k());
1816
+ }
1817
+ }
1818
+ ) : /* @__PURE__ */ n(R, { children: [
1819
+ /* @__PURE__ */ n("header", { class: "bar", children: [
1820
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("board.back"), onClick: l, children: /* @__PURE__ */ n(He, {}) }),
1821
+ /* @__PURE__ */ n("h2", { class: "bar__title", children: t("updates.title") }),
1822
+ o ? /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("updates.write"), onClick: () => v(!0), children: /* @__PURE__ */ n(ia, {}) }) : /* @__PURE__ */ n("span", {})
1823
+ ] }),
1824
+ /* @__PURE__ */ n("div", { class: "scroll", style: { paddingBottom: "24px" }, children: x && !p ? /* @__PURE__ */ n("div", { class: "empty", children: [
1825
+ /* @__PURE__ */ n("p", { children: t("board.loadFailed") }),
1826
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: () => void k(), children: t("board.retry") })
1827
+ ] }) : p ? p.length === 0 ? /* @__PURE__ */ n("p", { class: "empty", children: t(o ? "updates.emptyOwner" : "updates.empty") }) : /* @__PURE__ */ n(R, { children: [
1828
+ /* @__PURE__ */ n("p", { class: "updates__intro", children: t("updates.intro", { app: i }) }),
1829
+ /* @__PURE__ */ n("ul", { class: "list", children: p.map((S) => /* @__PURE__ */ n(
1830
+ Ji,
1831
+ {
1832
+ update: S,
1833
+ posts: r,
1834
+ t,
1835
+ locale: a,
1836
+ onDelete: o ? () => _(S) : void 0
1837
+ },
1838
+ S.id
1839
+ )) })
1840
+ ] }) : /* @__PURE__ */ n("div", { class: "empty", "aria-busy": "true", children: /* @__PURE__ */ n("span", { class: "spinner", style: { display: "inline-block" } }) }) }),
1841
+ L && /* @__PURE__ */ n(
1842
+ ba,
1843
+ {
1844
+ t,
1845
+ title: "updates.deleteTitle",
1846
+ note: "updates.deleteNote",
1847
+ confirm: "updates.deleteBtn",
1848
+ onConfirm: () => void g(L),
1849
+ onClose: () => _(null)
1850
+ }
1851
+ )
1852
+ ] });
1853
+ }
1854
+ function Zi(e, t, a) {
1855
+ const i = new Set(e.posts), o = (d) => t.filter((u) => u.kind === d && i.has(u.id)).length, r = [], l = (d, u, p) => {
1856
+ d && r.push(d === 1 ? a(u) : a(p, { n: d }));
1857
+ };
1858
+ return l(o("bug"), "updates.bugOne", "updates.bugMany"), l(o("idea"), "updates.ideaOne", "updates.ideaMany"), r.length ? a("updates.fromBoard", { list: r.join(", ") }) : null;
1859
+ }
1860
+ function Xi(e, t) {
1861
+ const a = new Set(e.posts), i = new Set(t.filter((o) => a.has(o.id)).map((o) => o.kind));
1862
+ return i.has("bug") && i.has("idea") ? "board.statusFixedAndDone" : kt([...i]);
1863
+ }
1864
+ function Ji({
1865
+ update: e,
1866
+ posts: t,
1867
+ t: a,
1868
+ locale: i,
1869
+ onDelete: o
1870
+ }) {
1871
+ const r = aa(e.at, i), l = Zi(e, t, a), d = Xi(e, t), u = je(e.link), p = Hn(e.link), b = /* @__PURE__ */ n(R, { children: [
1872
+ /* @__PURE__ */ n("div", { class: "update__head", children: [
1873
+ e.version && /* @__PURE__ */ n("span", { class: "update__version", children: e.version }),
1874
+ /* @__PURE__ */ n("span", { class: "card__when", children: "date" in r ? r.date : a(r.key, r.vars) })
1875
+ ] }),
1876
+ /* @__PURE__ */ n("h3", { class: "update__title", children: e.title }),
1877
+ e.text && /* @__PURE__ */ n("p", { class: "update__text", children: e.text }),
1878
+ l && /* @__PURE__ */ n("div", { class: "update__fixed", children: [
1879
+ /* @__PURE__ */ n(tt, { tone: "done", icon: () => /* @__PURE__ */ n(wt, {}), label: a(d) }),
1880
+ /* @__PURE__ */ n("span", { children: l })
1881
+ ] })
1882
+ ] });
1883
+ return /* @__PURE__ */ n("li", { class: "update", children: [
1884
+ u && p ? /* @__PURE__ */ n("a", { class: "update__link", href: u, target: "_blank", rel: "noopener noreferrer", children: [
1885
+ b,
1886
+ /* @__PURE__ */ n("span", { class: "code-link", children: [
1887
+ /* @__PURE__ */ n(ca, { site: p }),
1888
+ /* @__PURE__ */ n("span", { children: a("fix.view", { site: p }) }),
1889
+ /* @__PURE__ */ n(ra, { size: 12 })
1890
+ ] })
1891
+ ] }) : /* @__PURE__ */ n("div", { class: "update__link", children: b }),
1892
+ o && /* @__PURE__ */ n("button", { type: "button", class: "icon-btn update__bin", "aria-label": a("updates.delete"), onClick: o, children: /* @__PURE__ */ n(on, {}) })
1893
+ ] });
1894
+ }
1895
+ function Qi({
1896
+ t: e,
1897
+ appName: t,
1898
+ posts: a,
1899
+ onBack: i,
1900
+ onPublish: o
1901
+ }) {
1902
+ const [r, l] = m(""), [d, u] = m(""), [p, b] = m(""), [x, c] = m(""), [h, v] = m([]), [L, _] = m(!1), k = Jt(d), g = je(p), S = a.filter((C) => (C.kind === "bug" || C.kind === "idea") && (C.status === "open" || C.status === "planned")).filter((C) => !C.hidden && !C.pending).sort((C, P) => P.votes - C.votes), y = !!r.trim() && k !== null && !!g && !L, z = async () => {
1903
+ !y || !g || (_(!0), await o({
1904
+ title: r.trim(),
1905
+ ...x.trim() ? { text: x.trim() } : {},
1906
+ ...k ? { version: k } : {},
1907
+ link: g,
1908
+ posts: h
1909
+ }), _(!1));
1910
+ }, I = (C) => v((P) => P.includes(C) ? P.filter((H) => H !== C) : [...P, C]);
1911
+ return /* @__PURE__ */ n(R, { children: [
1912
+ /* @__PURE__ */ n("header", { class: "bar", children: [
1913
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": e("board.back"), onClick: i, children: /* @__PURE__ */ n(He, {}) }),
1914
+ /* @__PURE__ */ n("h2", { class: "bar__title", children: e("updates.write") }),
1915
+ /* @__PURE__ */ n("span", {})
1916
+ ] }),
1917
+ /* @__PURE__ */ n("div", { class: "scroll", style: { paddingBottom: "24px" }, children: /* @__PURE__ */ n("div", { class: "compose", children: [
1918
+ /* @__PURE__ */ n("p", { class: "public", style: { marginTop: 0 }, children: e("board.public", { app: t }) }),
1919
+ /* @__PURE__ */ n("label", { class: "label", for: "pnb-update-title", children: e("updates.titleLabel") }),
1920
+ /* @__PURE__ */ n(
1921
+ "input",
1922
+ {
1923
+ id: "pnb-update-title",
1924
+ class: "input",
1925
+ value: r,
1926
+ maxLength: ja,
1927
+ placeholder: e("updates.titlePlaceholder"),
1928
+ onInput: (C) => l(C.target.value)
1929
+ }
1930
+ ),
1931
+ /* @__PURE__ */ n("label", { class: "label", for: "pnb-update-version", children: e("fix.version") }),
1932
+ /* @__PURE__ */ n(
1933
+ "input",
1934
+ {
1935
+ id: "pnb-update-version",
1936
+ class: "input",
1937
+ value: d,
1938
+ maxLength: Zt,
1939
+ placeholder: "1.4.2",
1940
+ autocomplete: "off",
1941
+ "aria-invalid": k === null,
1942
+ onInput: (C) => u(C.target.value)
1943
+ }
1944
+ ),
1945
+ k === null && /* @__PURE__ */ n("p", { class: "note note--bad", children: e("fix.versionBad") }),
1946
+ /* @__PURE__ */ n("label", { class: "label", for: "pnb-update-link", children: e("updates.link") }),
1947
+ /* @__PURE__ */ n(
1948
+ "input",
1949
+ {
1950
+ id: "pnb-update-link",
1951
+ class: "input",
1952
+ type: "url",
1953
+ inputMode: "url",
1954
+ value: p,
1955
+ maxLength: Xt,
1956
+ placeholder: "github.com/…/releases/tag/v1.4.2",
1957
+ autocomplete: "off",
1958
+ "aria-invalid": g === null,
1959
+ onInput: (C) => b(C.target.value)
1960
+ }
1961
+ ),
1962
+ /* @__PURE__ */ n("p", { class: `note${g === null ? " note--bad" : ""}`, children: e(g === null ? "fix.linkBad" : "updates.linkNote") }),
1963
+ /* @__PURE__ */ n("label", { class: "label", for: "pnb-update-text", children: e("updates.textLabel") }),
1964
+ /* @__PURE__ */ n(
1965
+ "textarea",
1966
+ {
1967
+ id: "pnb-update-text",
1968
+ class: "field",
1969
+ style: { minHeight: "96px" },
1970
+ value: x,
1971
+ maxLength: Wa,
1972
+ placeholder: e("updates.textPlaceholder", { app: t }),
1973
+ onInput: (C) => c(C.target.value)
1974
+ }
1975
+ ),
1976
+ /* @__PURE__ */ n("span", { class: "label", children: e("updates.fixes") }),
1977
+ S.length === 0 ? /* @__PURE__ */ n("p", { class: "note", children: e("updates.fixesNone") }) : /* @__PURE__ */ n(R, { children: [
1978
+ /* @__PURE__ */ n("ul", { class: "picks", children: S.map((C) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("label", { class: "pick", children: [
1979
+ /* @__PURE__ */ n("input", { type: "checkbox", checked: h.includes(C.id), onChange: () => I(C.id) }),
1980
+ /* @__PURE__ */ n(tt, { tone: C.kind, icon: ue[C.kind].icon, label: e(ue[C.kind].label) }),
1981
+ /* @__PURE__ */ n("span", { class: "pick__text", children: C.text })
1982
+ ] }) }, C.id)) }),
1983
+ /* @__PURE__ */ n("p", { class: "note", children: e("updates.fixesNote") })
1984
+ ] }),
1985
+ /* @__PURE__ */ n("div", { class: "send", children: /* @__PURE__ */ n("button", { type: "button", class: "btn", disabled: !y, onClick: () => void z(), children: L ? /* @__PURE__ */ n("span", { class: "spinner" }) : e("updates.publish") }) })
1986
+ ] }) })
1987
+ ] });
1988
+ }
1989
+ const Dt = 15, er = (e) => !!e.shot && (e.shotFor ?? "board") === "board" && !e.hidden, Dn = 2600;
1990
+ function ha({
1991
+ client: e,
1992
+ t,
1993
+ locale: a,
1994
+ appName: i,
1995
+ suggestName: o,
1996
+ context: r,
1997
+ noise: l,
1998
+ kinds: d,
1999
+ screenshots: u = "board",
2000
+ readonly: p = !1,
2001
+ names: b = !0,
2002
+ onClose: x,
2003
+ onPosted: c,
2004
+ start: h = "board",
2005
+ screen: v
2006
+ }) {
2007
+ const L = p ? "board" : h, [_, k] = m(null), [g, S] = m(!1), [y, z] = m(v ?? L), [I, C] = m(L === "choose"), [P, H] = m("bug"), [q, D] = m("top"), [O, de] = m(Oe), [j, J] = m(""), [Te, be] = m(null), [he, xe] = m(null), [ae, A] = m(1), [Q, ie] = m(null), [G, me] = m(null), [yt, We] = m(!1), [T, we] = m(!1), [Ct, ga] = m(() => En(e.project, "fixed")), [Lt, va] = m(() => En(e.project, "answered")), it = et(null), St = (l ?? []).join("|"), xa = le(() => qa(St ? St.split("|") : []), [St]), pn = et(!1), W = ri(async () => {
2008
+ const s = await e.board();
2009
+ if (s.ok) {
2010
+ pn.current = !0;
2011
+ const f = p ? bi(s.data) : s.data;
2012
+ return k(f), S(!1), f;
2013
+ }
2014
+ return pn.current || S(!0), null;
2015
+ }, [e, p]);
2016
+ ne(() => {
2017
+ W();
2018
+ }, [W]), ne(() => {
2019
+ if (!G) return;
2020
+ const s = setTimeout(() => me(null), Dn);
2021
+ return () => clearTimeout(s);
2022
+ }, [G]), ne(() => {
2023
+ v && z(v);
2024
+ }, [v]), ne(() => {
2025
+ if (y !== "sent" || v === "sent") return;
2026
+ const s = setTimeout(() => {
2027
+ C(!1), z("board");
2028
+ }, Dn);
2029
+ return () => clearTimeout(s);
2030
+ }, [y, v]), ne(() => {
2031
+ const s = it.current;
2032
+ if (!s) return;
2033
+ let f = s.scrollTop, w = 0;
2034
+ const M = () => {
2035
+ const ge = s.scrollTop, $e = ge - f;
2036
+ if (f = ge, ge < 48) {
2037
+ w = 0, We(!1);
2038
+ return;
2039
+ }
2040
+ w = Math.sign($e) === Math.sign(w) ? w + $e : $e, w > 24 ? We(!0) : w < -8 && We(!1);
2041
+ };
2042
+ return s.addEventListener("scroll", M, { passive: !0 }), () => s.removeEventListener("scroll", M);
2043
+ }, [y, _]);
2044
+ const re = i ?? _?.project.name ?? "", U = _?.project.rules, ma = tr(u, U?.screenshots ?? "board"), oe = !!_?.me?.owner, V = _?.posts ?? [], ee = (U?.kinds ?? ["bug", "idea"]).filter((s) => !d || d.includes(s)), Tt = ee.join(",");
2045
+ ne(() => {
2046
+ v && ee.length && !ee.includes(P) && H(ee[0]);
2047
+ }, [v, Tt]);
2048
+ const Ve = (s) => {
2049
+ de(s), A(1);
2050
+ }, Mt = (s) => {
2051
+ J(s), A(1);
2052
+ }, ke = ci(O), At = !!j.trim(), Me = le(
2053
+ () => V.filter((s) => (oe || !s.hidden) && Tt.split(",").includes(s.kind)),
2054
+ [V, oe, Tt]
2055
+ ), zt = le(() => {
2056
+ const s = /* @__PURE__ */ new Map();
2057
+ for (const f of Me) {
2058
+ if (!On(f, O)) continue;
2059
+ const w = Nn(f, j);
2060
+ w && s.set(f.id, w);
2061
+ }
2062
+ return s;
2063
+ }, [Me, O, j]), rt = le(() => Da(Me.filter((s) => zt.has(s.id)), q), [Me, zt, q]), wa = (s) => Me.filter((f) => On(f, s) && Nn(f, j)).length, ka = oe ? ["waiting", "hidden", ...U?.approve || V.some((s) => s.pending) ? ["pending"] : []] : [], $t = oe ? Me.filter((s) => !s.hidden && Et(s)).length : 0, Ye = le(() => {
2064
+ const s = V.filter((f) => f.kind === "review" && !f.hidden && f.rating).map((f) => f.rating);
2065
+ return s.length ? { avg: s.reduce((f, w) => f + w, 0) / s.length, n: s.length } : null;
2066
+ }, [V]), ce = le(
2067
+ () => V.filter((s) => s.mine && s.status === "done" && (s.kind === "bug" || s.kind === "idea") && !Ct.includes(s.id)).sort((s, f) => f.at - s.at)[0],
2068
+ [V, Ct]
2069
+ ), ya = (s) => {
2070
+ const f = [...Ct, s].slice(-200);
2071
+ ga(f), Rn(e.project, "fixed", f);
2072
+ }, Ge = le(() => V.map((f) => ({ p: f, last: Re(f.thread) })).filter(
2073
+ ({ p: f, last: w }) => f.mine && w?.from === "app" && (f.kind === "review" || !bt(f.status)) && !Lt.includes(`${f.id}@${w.at}`)
2074
+ ).sort((f, w) => (w.last?.at ?? 0) - (f.last?.at ?? 0))[0]?.p, [V, Lt]), un = (s) => {
2075
+ const f = Re(s.thread);
2076
+ if (!f || f.from !== "app") return;
2077
+ const w = [...Lt.filter((M) => !M.startsWith(`${s.id}@`)), `${s.id}@${f.at}`].slice(-200);
2078
+ va(w), Rn(e.project, "answered", w);
2079
+ }, bn = (s) => {
2080
+ un(s), be(s.id), z("talk");
2081
+ }, hn = (s) => {
2082
+ xe(s.id), z("manage");
2083
+ }, Ca = !!U && (oe || (_?.updates ?? 0) > 0), Ot = Math.max(1, Math.ceil(rt.length / Dt)), Nt = Math.min(ae, Ot), Bt = rt.slice((Nt - 1) * Dt, Nt * Dt), ot = (s, f) => k((w) => w && { ...w, posts: w.posts.map((M) => M.id === s ? { ...M, ...f } : M) }), ye = (s) => {
2084
+ s === "no_signer" ? me(t("board.needWallet", { app: re })) : s !== "declined" && me(t("board.failed"));
2085
+ }, fn = async (s, f) => {
2086
+ const w = V.find((ge) => ge.id === s);
2087
+ if (!w) return;
2088
+ ot(s, { votes: Math.max(0, w.votes + (f ? 1 : -1)), voted: f });
2089
+ const M = await e.vote(s, f);
2090
+ M.ok ? (ot(s, { votes: M.data.votes, voted: M.data.voted }), _?.me || W()) : (ot(s, { votes: w.votes, voted: w.voted }), ye(M.error));
2091
+ }, La = async (s) => {
2092
+ const f = lt(), w = s.kind === "bug" ? { ...r, host: Pt() ? "nimiq-pay" : "browser" } : void 0, M = await e.post({
2093
+ id: f,
2094
+ kind: s.kind,
2095
+ text: s.text,
2096
+ anon: s.anon,
2097
+ context: w,
2098
+ rating: s.rating,
2099
+ shot: s.shot ? { type: s.shot.type, data: s.shot.data, ...s.shot.board ? { board: !0 } : {} } : void 0
2100
+ });
2101
+ return M.ok ? (!s.anon && s.name && s.name !== _?.me?.name && await e.setName(s.name), we(!!M.data.pending), z("sent"), D("new"), de(Oe), J(""), A(1), c?.({ id: f, kind: s.kind }), await W(), null) : M.error === "declined" ? { key: null } : M.error === "no_signer" ? { key: "board.needWallet", vars: { app: re } } : M.error === "reviewed" ? (W(), { key: "board.reviewed", vars: { app: re } }) : M.error === "too_many" ? (W(), { key: "board.failedFull", vars: { max: U?.perDay ?? 5 } }) : { key: "board.failed" };
2102
+ }, _n = async () => {
2103
+ const s = await e.signIn();
2104
+ s.ok ? await W() : ye(s.error);
2105
+ }, Sa = async (s) => {
2106
+ ie(null), k((w) => w && { ...w, posts: w.posts.filter((M) => M.id !== s.id) });
2107
+ const f = await e.remove(s.id);
2108
+ f.ok || ye(f.error), W();
2109
+ }, Ta = async (s, f) => {
2110
+ z("board");
2111
+ const { message: w, ...M } = f;
2112
+ ot(s.id, {
2113
+ status: M.status,
2114
+ hidden: M.hidden || void 0,
2115
+ fix: M.status === "done" && (M.fix?.version || M.fix?.link) ? M.fix : void 0,
2116
+ ...M.shotOff !== void 0 ? { shotFor: M.shotOff ? "off" : "board" } : {},
2117
+ ...M.approved ? { pending: void 0 } : {}
2118
+ });
2119
+ const ge = await e.manage(s.id, M);
2120
+ if (!ge.ok) ye(ge.error);
2121
+ else if (w) {
2122
+ const $e = w.edit ? await e.editMessage(s.id, w.edit, { text: w.text }) : await e.say(s.id, { id: lt(), text: w.text });
2123
+ $e.ok || Ke($e.error);
2124
+ }
2125
+ W();
2126
+ }, Ke = (s) => {
2127
+ s === "not_your_turn" || s === "closed" || s === "not_found" || s === "no_post" ? (me(t("talk.moved")), W()) : ye(s);
2128
+ }, Ma = async (s, f) => {
2129
+ const w = await e.say(s.id, { id: lt(), text: f });
2130
+ return w.ok ? (await W(), !0) : (Ke(w.error), !1);
2131
+ }, Aa = async (s, f, w) => {
2132
+ const M = await e.editMessage(s.id, f.id, { text: w });
2133
+ return M.ok ? (await W(), !0) : (Ke(M.error), !1);
2134
+ }, za = async (s, f) => {
2135
+ const w = await e.unsay(s.id, f.id);
2136
+ return w.ok ? (await W(), !0) : (Ke(w.error), !1);
2137
+ }, $a = async (s, f, w) => {
2138
+ const M = await e.editMessage(s.id, f.id, { hidden: w });
2139
+ if (!M.ok) return Ke(M.error);
2140
+ await W();
2141
+ }, Oa = (s) => {
2142
+ const f = V.find((w) => w.id === s);
2143
+ f && !f.voted && fn(s, !0), C(!1), z("board"), me(t("board.meTooDone"));
2144
+ }, Na = async (s) => {
2145
+ const f = await e.postUpdate({ id: lt(), ...s });
2146
+ return f.ok ? (await W(), !0) : (ye(f.error), !1);
2147
+ }, Ba = V.some((s) => s.mine && s.kind === "review"), Fa = () => {
2148
+ ee.length === 1 ? (H(ee[0]), z("compose")) : z("choose");
2149
+ }, Ae = () => {
2150
+ C(!1), z("board");
2151
+ };
2152
+ if (y === "sent")
2153
+ return /* @__PURE__ */ n("div", { class: "app", children: /* @__PURE__ */ n(Ni, { t, onBack: Ae, waiting: T || v === "sent" && !!U?.approve, appName: re }) });
2154
+ if (y === "updates" && U)
2155
+ return /* @__PURE__ */ n("div", { class: "app", children: [
2156
+ /* @__PURE__ */ n(
2157
+ Ki,
2158
+ {
2159
+ client: e,
2160
+ t,
2161
+ locale: a,
2162
+ appName: re,
2163
+ owner: oe,
2164
+ posts: V,
2165
+ onBack: Ae,
2166
+ onPublish: Na,
2167
+ onFail: ye
2168
+ }
2169
+ ),
2170
+ G && /* @__PURE__ */ n("div", { class: "toast", role: "status", children: G })
2171
+ ] });
2172
+ const ze = y === "manage" && oe ? V.find((s) => s.id === he) : void 0;
2173
+ if (ze && U)
2174
+ return /* @__PURE__ */ n("div", { class: "app", children: [
2175
+ /* @__PURE__ */ n(
2176
+ Hi,
2177
+ {
2178
+ t,
2179
+ post: ze,
2180
+ appName: re,
2181
+ locale: a,
2182
+ replyMax: U.replyMax,
2183
+ loadShot: async () => {
2184
+ const s = await e.shot(ze.id);
2185
+ return s.ok ? s.data : null;
2186
+ },
2187
+ onSave: (s) => void Ta(ze, s),
2188
+ onHideMessage: (s, f) => void $a(ze, s, f),
2189
+ onBack: Ae
2190
+ },
2191
+ ze.id
2192
+ ),
2193
+ G && /* @__PURE__ */ n("div", { class: "toast", role: "status", children: G })
2194
+ ] });
2195
+ const Ze = y === "talk" ? V.find((s) => s.id === Te) : void 0;
2196
+ return Ze && U ? /* @__PURE__ */ n("div", { class: "app", children: [
2197
+ /* @__PURE__ */ n(
2198
+ Ei,
2199
+ {
2200
+ post: Ze,
2201
+ appName: re,
2202
+ t,
2203
+ locale: a,
2204
+ replyMax: U.replyMax,
2205
+ onBack: Ae,
2206
+ onSay: (s) => Ma(Ze, s),
2207
+ onEdit: (s, f) => Aa(Ze, s, f),
2208
+ onUnsay: (s) => za(Ze, s)
2209
+ }
2210
+ ),
2211
+ G && /* @__PURE__ */ n("div", { class: "toast", role: "status", children: G })
2212
+ ] }) : y === "choose" && (U || I) ? /* @__PURE__ */ n("div", { class: "app", children: [
2213
+ I ? (
2214
+ // The first screen: nothing to go back to, only out.
2215
+ /* @__PURE__ */ n("header", { class: "bar", children: [
2216
+ /* @__PURE__ */ n("span", {}),
2217
+ /* @__PURE__ */ n("span", {}),
2218
+ x ? /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("board.close"), onClick: x, children: /* @__PURE__ */ n(Ce, {}) }) : /* @__PURE__ */ n("span", {})
2219
+ ] })
2220
+ ) : /* @__PURE__ */ n("header", { class: "bar", children: [
2221
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("board.back"), onClick: Ae, children: /* @__PURE__ */ n(He, {}) }),
2222
+ /* @__PURE__ */ n("h2", { class: "bar__title bar__title--write", children: t("board.composeTitle") }),
2223
+ /* @__PURE__ */ n("span", {})
2224
+ ] }),
2225
+ /* @__PURE__ */ n("div", { class: "scroll", style: { paddingBottom: "24px" }, children: U ? /* @__PURE__ */ n(
2226
+ Oi,
2227
+ {
2228
+ t,
2229
+ kinds: ee,
2230
+ appName: re,
2231
+ reviewed: Ba,
2232
+ onPick: (s) => {
2233
+ H(s), z("compose");
2234
+ },
2235
+ onBoard: I ? Ae : void 0
2236
+ }
2237
+ ) : g ? /* @__PURE__ */ n("div", { class: "empty", children: [
2238
+ /* @__PURE__ */ n("p", { children: t("board.loadFailed") }),
2239
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: () => void W(), children: t("board.retry") })
2240
+ ] }) : /* @__PURE__ */ n("div", { class: "empty", "aria-busy": "true", children: /* @__PURE__ */ n("span", { class: "spinner", style: { display: "inline-block" } }) }) })
2241
+ ] }) : y === "compose" && U ? /* @__PURE__ */ n("div", { class: "app", children: [
2242
+ /* @__PURE__ */ n("header", { class: "bar", children: [
2243
+ /* @__PURE__ */ n(
2244
+ "button",
2245
+ {
2246
+ type: "button",
2247
+ class: "icon-btn",
2248
+ "aria-label": t("board.back"),
2249
+ onClick: () => z(ee.length > 1 ? "choose" : "board"),
2250
+ children: /* @__PURE__ */ n(He, {})
2251
+ }
2252
+ ),
2253
+ /* @__PURE__ */ n("h2", { class: "bar__title bar__title--write", children: t("board.composeTitle") }),
2254
+ /* @__PURE__ */ n("span", {})
2255
+ ] }),
2256
+ /* @__PURE__ */ n("div", { class: "scroll", ref: it, style: { paddingBottom: "calc(12px + var(--_bottom))" }, children: /* @__PURE__ */ n(
2257
+ Bi,
2258
+ {
2259
+ t,
2260
+ kind: P,
2261
+ posts: V,
2262
+ likeThis: xa,
2263
+ left: _?.me ? _.me.left : null,
2264
+ perDay: U.perDay,
2265
+ textMax: U.textMax,
2266
+ name: _?.me?.name ?? o ?? "",
2267
+ face: _?.me?.face,
2268
+ faceUrl: e.faceUrl,
2269
+ appName: re,
2270
+ screenshots: ma,
2271
+ names: b,
2272
+ onMeToo: Oa,
2273
+ onSend: La
2274
+ }
2275
+ ) }),
2276
+ G && /* @__PURE__ */ n("div", { class: "toast", role: "status", children: G })
2277
+ ] }) : /* @__PURE__ */ n("div", { class: "app", children: [
2278
+ /* @__PURE__ */ n("header", { class: "bar", children: [
2279
+ /* @__PURE__ */ n("div", { class: "bar__side", children: [
2280
+ x && /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("board.close"), onClick: x, children: /* @__PURE__ */ n(Ce, {}) }),
2281
+ Ca && /* @__PURE__ */ n("button", { type: "button", class: "icon-btn", "aria-label": t("updates.title"), onClick: () => z("updates"), children: /* @__PURE__ */ n(xi, {}) })
2282
+ ] }),
2283
+ /* @__PURE__ */ n("h2", { class: "bar__title bar__title--board", children: t("board.title") }),
2284
+ p ? /* @__PURE__ */ n("span", {}) : /* @__PURE__ */ n(
2285
+ "button",
2286
+ {
2287
+ type: "button",
2288
+ class: "icon-btn",
2289
+ "aria-label": t("board.write"),
2290
+ disabled: !U || !ee.length,
2291
+ onClick: Fa,
2292
+ children: /* @__PURE__ */ n(ia, {})
2293
+ }
2294
+ )
2295
+ ] }),
2296
+ /* @__PURE__ */ n("div", { class: "filters finder", children: [
2297
+ /* @__PURE__ */ n("label", { class: "search", children: [
2298
+ /* @__PURE__ */ n(yi, {}),
2299
+ /* @__PURE__ */ n(
2300
+ "input",
2301
+ {
2302
+ class: "search__input",
2303
+ type: "search",
2304
+ value: j,
2305
+ placeholder: t("search.placeholder"),
2306
+ "aria-label": t("search.placeholder"),
2307
+ onInput: (s) => Mt(s.target.value)
2308
+ }
2309
+ ),
2310
+ j && /* @__PURE__ */ n("button", { type: "button", class: "search__clear", "aria-label": t("search.clear"), onClick: () => Mt(""), children: /* @__PURE__ */ n(Ce, { size: 16 }) })
2311
+ ] }),
2312
+ /* @__PURE__ */ n(
2313
+ "button",
2314
+ {
2315
+ type: "button",
2316
+ class: "filter-btn",
2317
+ "aria-pressed": ke > 0,
2318
+ "aria-label": ke > 0 ? `${t("filter.button")}: ${t("filter.on", { n: ke })}` : t("filter.button"),
2319
+ onClick: () => ie({ kind: "filter" }),
2320
+ children: [
2321
+ /* @__PURE__ */ n(Ci, {}),
2322
+ /* @__PURE__ */ n("span", { children: t("filter.button") }),
2323
+ ke > 0 && /* @__PURE__ */ n("span", { class: "filter-btn__n", children: ke })
2324
+ ]
2325
+ }
2326
+ )
2327
+ ] }),
2328
+ ke > 0 && /* @__PURE__ */ n("div", { class: "applied", children: [
2329
+ [
2330
+ ...O.kinds.map((s) => ({ label: Le(t, { kind: s }), off: { ...O, kinds: O.kinds.filter((f) => f !== s) } })),
2331
+ ...O.statuses.map((s) => ({
2332
+ label: Le(t, { status: s, kinds: O.kinds.length ? O.kinds : ee }),
2333
+ off: { ...O, statuses: O.statuses.filter((f) => f !== s) }
2334
+ })),
2335
+ ...O.own.map((s) => ({ label: Le(t, { own: s }), off: { ...O, own: O.own.filter((f) => f !== s) } })),
2336
+ ...O.mine ? [{ label: Le(t, {}), off: { ...O, mine: !1 } }] : []
2337
+ ].map((s) => /* @__PURE__ */ n(
2338
+ "button",
2339
+ {
2340
+ type: "button",
2341
+ class: "applied__chip",
2342
+ "aria-label": t("filter.remove", { label: s.label }),
2343
+ onClick: () => Ve(s.off),
2344
+ children: [
2345
+ /* @__PURE__ */ n("span", { children: s.label }),
2346
+ /* @__PURE__ */ n(Ce, { size: 14 })
2347
+ ]
2348
+ },
2349
+ s.label
2350
+ )),
2351
+ /* @__PURE__ */ n("button", { type: "button", class: "link-btn", onClick: () => Ve(Oe), children: t("filter.clearAll") })
2352
+ ] }),
2353
+ /* @__PURE__ */ n("div", { class: "scroll", ref: it, children: [
2354
+ ce && /* @__PURE__ */ n("div", { class: "news", role: "status", children: [
2355
+ /* @__PURE__ */ n(tt, { tone: "done", icon: () => /* @__PURE__ */ n(wt, {}), label: t(kt([ce.kind])) }),
2356
+ /* @__PURE__ */ n("div", { class: "news__text", children: [
2357
+ /* @__PURE__ */ n("strong", { class: "news__title", children: ce.fix?.version ? t(ce.kind === "idea" ? "news.ideaIn" : "news.bugIn", { version: ce.fix.version }) : t(ce.kind === "idea" ? "news.idea" : "news.bug") }),
2358
+ /* @__PURE__ */ n("span", { class: "news__post", children: ce.text }),
2359
+ ce.fix?.link && /* @__PURE__ */ n(pa, { href: ce.fix.link, t, label: "news.see" })
2360
+ ] }),
2361
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn news__close", "aria-label": t("board.close"), onClick: () => ya(ce.id), children: /* @__PURE__ */ n(Ce, { size: 18 }) })
2362
+ ] }),
2363
+ Ge && /* @__PURE__ */ n("div", { class: "news", role: "status", children: [
2364
+ /* @__PURE__ */ n("div", { class: "news__text", children: [
2365
+ /* @__PURE__ */ n("strong", { class: "news__title", children: t(Ge.kind === "idea" ? "answered.idea" : Ge.kind === "review" ? "answered.review" : "answered.bug", {
2366
+ app: re
2367
+ }) }),
2368
+ /* @__PURE__ */ n("button", { type: "button", class: "link-btn news__link", onClick: () => bn(Ge), children: t("answered.see") })
2369
+ ] }),
2370
+ /* @__PURE__ */ n("button", { type: "button", class: "icon-btn news__close", "aria-label": t("board.close"), onClick: () => un(Ge), children: /* @__PURE__ */ n(Ce, { size: 18 }) })
2371
+ ] }),
2372
+ $t > 0 && !O.own.includes("waiting") && /* @__PURE__ */ n("div", { class: "news news--owner", role: "status", children: [
2373
+ /* @__PURE__ */ n("strong", { class: "news__title news__grow", children: $t === 1 ? t("owner.waitingOne") : t("owner.waitingMany", { n: $t }) }),
2374
+ /* @__PURE__ */ n("button", { type: "button", class: "chip-btn", onClick: () => Ve({ ...Oe, own: ["waiting"] }), children: t("owner.showThese") })
2375
+ ] }),
2376
+ _ && !_.me && e.canSign && !p && !Pt() && /* @__PURE__ */ n("div", { class: "signin-note", children: [
2377
+ /* @__PURE__ */ n("strong", { class: "signin-note__title", children: t("board.signInTitle") }),
2378
+ /* @__PURE__ */ n("p", { class: "signin-note__text", children: t("board.signInNote") }),
2379
+ /* @__PURE__ */ n("button", { type: "button", class: "btn", onClick: () => void _n(), children: t("board.signInButton") })
2380
+ ] }),
2381
+ At && _ && /* @__PURE__ */ n("p", { class: "found-count", children: rt.length === 1 ? t("search.countOne", { q: j.trim() }) : t("search.count", { n: rt.length, q: j.trim() }) }),
2382
+ Ye && ee.includes("review") && (!O.kinds.length || O.kinds.includes("review")) && !O.statuses.length && !O.mine && !O.own.length && !At && /* @__PURE__ */ n("div", { class: "rating", children: [
2383
+ /* @__PURE__ */ n("span", { class: "rating__avg", children: Ye.avg.toFixed(1) }),
2384
+ /* @__PURE__ */ n(da, { n: Ye.avg, t, size: 18 }),
2385
+ /* @__PURE__ */ n("span", { class: "rating__n", children: Ye.n === 1 ? t("board.ratingOne") : t("board.ratingMany", { n: Ye.n }) })
2386
+ ] }),
2387
+ g ? /* @__PURE__ */ n("div", { class: "empty", children: [
2388
+ /* @__PURE__ */ n("p", { children: t("board.loadFailed") }),
2389
+ /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: () => void W(), children: t("board.retry") })
2390
+ ] }) : _ ? Bt.length === 0 && (At || ke > 0) ? /* @__PURE__ */ n("div", { class: "empty nothing", children: [
2391
+ /* @__PURE__ */ n("strong", { class: "nothing__title", children: t("filter.none") }),
2392
+ /* @__PURE__ */ n("p", { children: t("filter.noneNote") }),
2393
+ /* @__PURE__ */ n(
2394
+ "button",
2395
+ {
2396
+ type: "button",
2397
+ class: "outline-btn",
2398
+ onClick: () => {
2399
+ Mt(""), Ve(Oe);
2400
+ },
2401
+ children: t("filter.clear")
2402
+ }
2403
+ )
2404
+ ] }) : Bt.length === 0 ? /* @__PURE__ */ n("p", { class: "empty", children: t(V.length > 0 ? "board.emptyFiltered" : p ? "board.emptyRead" : "board.emptyTitle") }) : /* @__PURE__ */ n("ul", { class: "list", children: Bt.map((s) => /* @__PURE__ */ n(
2405
+ dn,
2406
+ {
2407
+ post: s,
2408
+ appName: re,
2409
+ t,
2410
+ locale: a,
2411
+ onVote: p ? void 0 : (f) => void fn(s.id, f),
2412
+ onDelete: s.mine || oe ? () => ie({ kind: "delete", post: s }) : void 0,
2413
+ onManage: oe ? () => hn(s) : void 0,
2414
+ onTalk: oe ? () => hn(s) : () => bn(s),
2415
+ shotUrl: er(s) ? e.shotUrl(s.id) : void 0,
2416
+ faceUrl: s.face ? e.faceUrl(s.face) : void 0,
2417
+ onShot: () => ie({ kind: "shot", post: s }),
2418
+ fresh: oe && !s.hidden && Et(s),
2419
+ query: j,
2420
+ found: (() => {
2421
+ const f = zt.get(s.id);
2422
+ return f?.in === "thread" ? f.message : void 0;
2423
+ })()
2424
+ },
2425
+ s.id
2426
+ )) }) : /* @__PURE__ */ n("div", { class: "empty", "aria-busy": "true", children: /* @__PURE__ */ n("span", { class: "spinner", style: { display: "inline-block" } }) }),
2427
+ Ot > 1 && /* @__PURE__ */ n("nav", { class: "pager", children: Array.from({ length: Ot }, (s, f) => f + 1).map((s) => /* @__PURE__ */ n(
2428
+ "button",
2429
+ {
2430
+ type: "button",
2431
+ "aria-current": s === Nt ? "page" : void 0,
2432
+ "aria-label": t("board.page", { n: s }),
2433
+ onClick: () => {
2434
+ A(s), it.current?.scrollTo({ top: 0 });
2435
+ },
2436
+ children: s
2437
+ },
2438
+ s
2439
+ )) }),
2440
+ _ && !_.me && e.canSign && !p && Pt() && /* @__PURE__ */ n("div", { class: "sign-in", children: /* @__PURE__ */ n("button", { type: "button", class: "text-btn", onClick: () => void _n(), children: t("board.signIn") }) })
2441
+ ] }),
2442
+ /* @__PURE__ */ n("div", { class: `order${yt ? " order--away" : ""}`, children: /* @__PURE__ */ n("div", { class: "order__pill", role: "tablist", "aria-label": t("board.order"), children: ["top", "new"].map((s) => /* @__PURE__ */ n(
2443
+ "button",
2444
+ {
2445
+ type: "button",
2446
+ role: "tab",
2447
+ class: "order__tab",
2448
+ "aria-selected": q === s,
2449
+ onClick: () => {
2450
+ D(s), A(1);
2451
+ },
2452
+ children: t(s === "top" ? "board.top" : "board.new")
2453
+ },
2454
+ s
2455
+ )) }) }),
2456
+ G && /* @__PURE__ */ n("div", { class: "toast", role: "status", children: G }),
2457
+ Q?.kind === "delete" && /* @__PURE__ */ n(ba, { t, onConfirm: () => void Sa(Q.post), onClose: () => ie(null) }),
2458
+ Q?.kind === "filter" && U && /* @__PURE__ */ n(
2459
+ Gi,
2460
+ {
2461
+ t,
2462
+ kinds: ee,
2463
+ owners: ka,
2464
+ signedIn: !!_?.me,
2465
+ value: O,
2466
+ count: wa,
2467
+ onApply: (s) => {
2468
+ ie(null), Ve(s);
2469
+ },
2470
+ onClose: () => ie(null)
2471
+ }
2472
+ ),
2473
+ Q?.kind === "shot" && /* @__PURE__ */ n(ji, { t, src: e.shotUrl(Q.post.id), onClose: () => ie(null) })
2474
+ ] });
2475
+ }
2476
+ function lt() {
2477
+ return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `p-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
2478
+ }
2479
+ function En(e, t) {
2480
+ try {
2481
+ const a = globalThis.localStorage?.getItem(`pleasenobugs.${t}.${e}`), i = a ? JSON.parse(a) : [];
2482
+ return Array.isArray(i) ? i.filter((o) => typeof o == "string") : [];
2483
+ } catch {
2484
+ return [];
2485
+ }
2486
+ }
2487
+ function Rn(e, t, a) {
2488
+ try {
2489
+ globalThis.localStorage?.setItem(`pleasenobugs.${t}.${e}`, JSON.stringify(a));
2490
+ } catch {
2491
+ }
2492
+ }
2493
+ function tr(e, t) {
2494
+ const a = ["off", "owners", "board"];
2495
+ return a[Math.min(a.indexOf(e), a.indexOf(t))];
2496
+ }
2497
+ const nr = ':host{--pnb-bg: #ffffff;--pnb-surface: #fafaf8;--pnb-surface-2: #f2f3f4;--pnb-sunken: #f2f3f4;--pnb-line: #e6e6e9;--pnb-text: #040724;--pnb-text-quiet: #686a7c;--pnb-accent: #040724;--pnb-on-accent: #ffffff;--pnb-danger: #cb0015;--pnb-bug: #cb0015;--pnb-idea: #ffb700;--pnb-review: #4f5166;--pnb-planned: #ffc758;--pnb-done: #040724;--pnb-declined: #9b9ca7;--pnb-on-dot: #ffffff;--pnb-on-bug: var(--pnb-on-dot);--pnb-on-idea: #040724;--pnb-on-review: var(--pnb-on-dot);--pnb-on-planned: #040724;--pnb-on-done: var(--pnb-on-dot);--pnb-on-declined: var(--pnb-on-dot);--pnb-star: #ffb700;--pnb-filter: var(--pnb-text);--pnb-on-filter: var(--pnb-bg);--pnb-choose-title: var(--pnb-text);--pnb-title-board: var(--pnb-text);--pnb-title-write: var(--pnb-text);--pnb-card: #ffffff;--pnb-card-text: var(--pnb-text);--pnb-card-quiet: var(--pnb-text-quiet);--pnb-field: #f2f3f4;--pnb-shot-line: var(--pnb-line);--pnb-field-text: var(--pnb-text);--pnb-field-quiet: var(--pnb-text-quiet);--pnb-field-line: var(--pnb-line);--pnb-news: var(--pnb-surface-2);--pnb-news-line: var(--pnb-accent);--pnb-news-text: var(--pnb-text);--pnb-news-link: var(--pnb-accent);--pnb-news-quiet: var(--pnb-text-quiet);--pnb-filter-btn: #ffffff;--pnb-filter-btn-text: var(--pnb-text);--pnb-filter-btn-line: #cdcdd3;--pnb-bar-icon: var(--pnb-text);--pnb-order: var(--pnb-sunken);--pnb-order-text: var(--pnb-text-quiet);--pnb-vote: #f2f3f4;--pnb-vote-text: var(--pnb-card-text);--pnb-vote-on: var(--pnb-accent);--pnb-on-vote-on: var(--pnb-on-accent);--pnb-choose-link: var(--pnb-text-quiet);--pnb-form-quiet: var(--pnb-text-quiet);--pnb-switch: var(--pnb-surface-2);--pnb-switch-line: var(--pnb-line);--pnb-switch-knob: var(--pnb-text-quiet);--pnb-switch-on: var(--pnb-accent);--pnb-on-switch-on: var(--pnb-on-accent);--pnb-tile-bug: var(--pnb-bug);--pnb-tile-idea: var(--pnb-idea);--pnb-tile-review: var(--pnb-review);--pnb-tile-ink: #ffffff;--pnb-tile-ink-bug: var(--pnb-tile-ink);--pnb-tile-ink-idea: #040724;--pnb-tile-ink-review: var(--pnb-tile-ink);--pnb-tile-dot-bug: transparent;--pnb-tile-dot-idea: transparent;--pnb-tile-dot-review: transparent;--pnb-tile-glyph-bug: var(--pnb-tile-ink-bug);--pnb-tile-glyph-idea: var(--pnb-tile-ink-idea);--pnb-tile-glyph-review: var(--pnb-tile-ink-review);--pnb-tile-icon: 44px;--pnb-order-on: var(--pnb-surface);--pnb-on-order: var(--pnb-text);--pnb-sent: var(--pnb-bg);--pnb-sent-title: var(--pnb-text);--pnb-sent-note: var(--pnb-text-quiet);--pnb-sent-check: #040724;--pnb-on-sent-check: #ffffff;--pnb-fab: #ffb700;--pnb-on-fab: #040724;--pnb-fab-shadow: var(--pnb-shadow);--pnb-fab-shadow-pressed: var(--pnb-fab-shadow);--pnb-fab-squeeze: .94;--pnb-radius: 10px;--pnb-radius-sheet: 16px;--pnb-radius-panel: 16px;--pnb-radius-pill: 999px;--pnb-shadow: 0 8px 24px rgba(4, 7, 36, .14);--pnb-scrim: rgba(4, 7, 36, .5);--pnb-font: inherit;--pnb-z: 2147483000;--pnb-inset-top: env(safe-area-inset-top, 0px);--pnb-inset-bottom: env(safe-area-inset-bottom, 0px);display:block;font-family:var(--pnb-font);color:var(--pnb-text);-webkit-tap-highlight-color:transparent}:host([theme="nimiq-dark"]){--pnb-bg: #040724;--pnb-surface: #1d203a;--pnb-surface-2: #363950;--pnb-sunken: #02030f;--pnb-line: #363950;--pnb-text: #ffffff;--pnb-text-quiet: #9b9ca7;--pnb-accent: #ffffff;--pnb-on-accent: #040724;--pnb-danger: #e93700;--pnb-bug: #e93700;--pnb-review: #b4b5bd;--pnb-on-review: #040724;--pnb-done: #ffffff;--pnb-on-done: #040724;--pnb-declined: #686a7c;--pnb-card: #1d203a;--pnb-field: #363950;--pnb-filter-btn: #1d203a;--pnb-filter-btn-line: #4f5166;--pnb-vote: #363950;--pnb-sent-check: #ffffff;--pnb-on-sent-check: #040724;--pnb-shadow: 0 8px 24px rgba(0, 0, 0, .45);--pnb-scrim: rgba(0, 0, 0, .6)}*,*:before,*:after{box-sizing:border-box}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;padding:0}:focus-visible{outline:2px solid var(--pnb-accent);outline-offset:2px}.app{--_top: 0px;--_bottom: 0px;position:relative;display:flex;flex-direction:column;height:100%;min-height:320px;background:var(--pnb-bg);overflow:hidden}.bar{display:grid;grid-template-columns:minmax(48px,1fr) auto minmax(48px,1fr);align-items:center;min-height:56px;padding:0 4px;padding-top:var(--_top);flex-shrink:0}.bar>:last-child{justify-self:end}.bar__side{display:flex;align-items:center}.bar__title--board{color:var(--pnb-title-board)}.bar__title--write{color:var(--pnb-title-write)}.bar__title{margin:0;text-align:center;font-size:18px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-btn{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--pnb-text)}.icon-btn:active{background:var(--pnb-surface)}.bar .icon-btn{color:var(--pnb-bar-icon)}.filters{display:flex;gap:8px;padding:4px 16px 12px;flex-shrink:0;flex-wrap:wrap}.chip-pick{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:var(--pnb-radius-pill);background:var(--pnb-surface);color:var(--pnb-text-quiet);font-size:14px;font-weight:700}.chip-pick[aria-pressed=true],.chip-pick[aria-checked=true]{background:var(--pnb-filter);color:var(--pnb-on-filter)}.scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 16px calc(96px + var(--_bottom))}.scroll,.sheet{scrollbar-width:none}.scroll::-webkit-scrollbar,.sheet::-webkit-scrollbar{display:none}.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}.empty{margin:48px auto 0;max-width:280px;text-align:center;color:var(--pnb-text-quiet);line-height:1.45}.empty .text-btn{margin-top:12px}.card{position:relative;padding:16px;border-radius:var(--pnb-radius);background:var(--pnb-card);border:1px solid var(--pnb-line);color:var(--pnb-card-text)}.card--owner{cursor:pointer}.card--hidden{opacity:.6}.card__head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px 4px 4px;border-radius:var(--pnb-radius-pill);background:var(--pnb-surface-2);font-size:12px;font-weight:800}.badge__dot{display:grid;place-items:center;width:20px;height:20px;border-radius:50%}.badge__dot--bug{background:var(--pnb-bug);color:var(--pnb-on-bug)}.badge__dot--idea{background:var(--pnb-idea);color:var(--pnb-on-idea)}.badge__dot--review{background:var(--pnb-review);color:var(--pnb-on-review)}.badge__dot--planned{background:var(--pnb-planned);color:var(--pnb-on-planned)}.badge__dot--done{background:var(--pnb-done);color:var(--pnb-on-done)}.badge__dot--declined{background:var(--pnb-declined);color:var(--pnb-on-declined)}.card__shot{display:grid;place-items:center;color:var(--pnb-text-quiet)}.stars{display:inline-flex;gap:1px;line-height:0}.stars__one{position:relative;color:var(--pnb-line)}.stars__fill{position:absolute;inset:0 auto 0 0;overflow:hidden;color:var(--pnb-star)}.rating{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding:12px 16px;border-radius:var(--pnb-radius);background:var(--pnb-card);border:1px solid var(--pnb-line)}.rating__avg{font-size:22px;font-weight:700;color:var(--pnb-card-text)}.rating__n{margin-left:auto;font-size:14px;color:var(--pnb-card-quiet)}.card__off{font-size:12px;font-weight:700;color:var(--pnb-danger)}.card__wait{font-size:12px;font-weight:700;color:var(--pnb-text-quiet)}.card__when{margin-left:auto;font-size:12px;color:var(--pnb-card-quiet)}.card__text{margin:12px 0 0;color:var(--pnb-card-text);font-size:16px;line-height:1.4;overflow-wrap:anywhere;white-space:pre-wrap}.card__pic{display:block;margin-top:10px;padding:0;border-radius:var(--pnb-radius);line-height:0}.card__pic img{display:block;max-width:100%;max-height:160px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-line)}.card__reply{margin-top:12px;padding:10px 12px;border-radius:var(--pnb-radius);background:var(--pnb-bg);border-left:3px solid var(--pnb-accent)}.card__reply-who{font-size:12px;font-weight:700;color:var(--pnb-text-quiet)}.card__reply-text{margin:4px 0 0;font-size:14px;line-height:1.4;overflow-wrap:anywhere;white-space:pre-wrap}.fix{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;font-size:13px;font-weight:800}.card__reply .fix{margin-top:8px}.fix__dot{color:var(--pnb-text-quiet)}.code-link{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:800;color:var(--pnb-accent);text-decoration:none}.code-link:hover span{text-decoration:underline;text-underline-offset:3px}.news{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding:10px 6px 10px 12px;border-radius:var(--pnb-radius);background:var(--pnb-news);border:1.5px solid var(--pnb-news-line);color:var(--pnb-news-text)}.news__text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;width:0}.news__title{font-size:14px}.news__post{font-size:12px;color:var(--pnb-news-quiet);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.news__close{flex:none;width:36px;height:36px;color:var(--pnb-news-quiet)}.card__foot{display:flex;align-items:center;gap:8px;margin-top:12px}.card__who{display:flex;align-items:center;gap:6px;flex:1;min-width:0;font-size:14px;color:var(--pnb-card-quiet)}.card__name{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.face{position:relative;display:inline-block;flex:none}.face__stand-in,.face__img{position:absolute;inset:0;width:100%;height:100%}.face__img--loading{opacity:0}.card__bin{width:36px;height:36px;color:var(--pnb-text-quiet)}.vote{display:inline-flex;align-items:center;gap:6px;min-width:56px;height:36px;padding:0 12px;border-radius:var(--pnb-radius-pill);background:var(--pnb-vote);color:var(--pnb-vote-text);font-size:14px;font-weight:700;justify-content:center}.vote--count{background:transparent;color:var(--pnb-card-quiet)}.vote[aria-pressed=true]{background:var(--pnb-vote-on);color:var(--pnb-on-vote-on)}.order{position:absolute;left:0;right:0;bottom:calc(20px + var(--_bottom));display:flex;justify-content:center;pointer-events:none;transition:transform .22s ease,opacity .16s ease}.order--away{transform:translateY(80px);opacity:0}.order__pill{pointer-events:auto;display:grid;grid-template-columns:1fr 1fr;width:min(240px,calc(100% - 32px));height:48px;padding:4px;border-radius:var(--pnb-radius-pill);background:var(--pnb-order);box-shadow:var(--pnb-shadow)}.order__tab{border-radius:max(0px,calc(var(--pnb-radius-pill) - 4px));font-weight:700;font-size:15px;color:var(--pnb-order-text)}.order__tab[aria-selected=true]{background:var(--pnb-order-on);color:var(--pnb-on-order)}.pager{display:flex;justify-content:center;gap:6px;margin-top:20px}.pager button{min-width:36px;height:36px;border-radius:var(--pnb-radius-pill);color:var(--pnb-text-quiet);font-weight:700}.pager button[aria-current=page]{background:var(--pnb-surface);color:var(--pnb-text)}.sign-in{display:flex;justify-content:center;margin-top:16px}.sign-in .text-btn{font-size:14px;text-decoration:underline;text-underline-offset:3px}.signin-note{display:flex;flex-direction:column;gap:6px;margin-bottom:12px;padding:14px;border-radius:var(--pnb-radius);background:var(--pnb-news);border:1.5px solid var(--pnb-news-line);color:var(--pnb-news-text)}.signin-note__title{font-size:15px;font-weight:800}.signin-note__text{margin:0 0 6px;font-size:14px;line-height:1.45;opacity:.8}.signin-note .btn{height:44px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;padding:0 24px;border-radius:var(--pnb-radius-pill);background:var(--pnb-accent);color:var(--pnb-on-accent);font-size:16px;font-weight:700}.btn:disabled{opacity:.45;cursor:default}.btn--danger,.btn--danger:active:not(:disabled){background:var(--pnb-danger);color:#fff;box-shadow:none;translate:none}.text-btn{display:inline-block;padding:12px 16px;font-weight:700;color:var(--pnb-text-quiet)}.spinner{width:20px;height:20px;border-radius:50%;border:2.5px solid currentColor;border-right-color:transparent;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.compose{display:flex;flex-direction:column;gap:8px;min-height:100%;padding-bottom:4px}.label{margin-top:12px;font-size:14px;font-weight:700}.compose__kind{display:inline-flex;align-items:center;gap:8px;margin-top:4px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.rate{display:flex;gap:4px}.rate__star{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;color:var(--pnb-line);transition:transform .12s ease}.rate__star--on{color:var(--pnb-star)}.rate__star:active{transform:scale(.9)}.shot{display:flex;flex-direction:column;gap:4px;margin-top:8px}.shot__add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:88px;border-radius:var(--pnb-radius);border:1.5px dashed var(--pnb-shot-line);color:var(--pnb-text-quiet);font-size:14px;font-weight:700}.shot__preview{position:relative;align-self:flex-start}.shot__preview img{display:block;max-width:100%;max-height:200px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-line)}.check{display:flex;align-items:flex-start;gap:10px;margin-top:8px;font-size:14px;line-height:1.4;color:var(--pnb-text);cursor:pointer}.check input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--pnb-accent)}.shot__remove{position:absolute;top:6px;right:6px;width:36px;height:36px;background:var(--pnb-bg);box-shadow:var(--pnb-shadow)}.choose__title{margin:8px 0 16px;color:var(--pnb-choose-title);font-size:20px;font-weight:700;text-align:center}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tiles--odd .tile:first-child{grid-column:1 / -1;min-height:132px}.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:132px;padding:16px 12px;border-radius:var(--pnb-radius);color:var(--pnb-tile-ink);text-align:center;transition:transform .12s ease}.tile:active:not(:disabled){transform:scale(.97)}.tile:disabled{opacity:.55;cursor:default}.tile--bug{background:var(--pnb-tile-bug);color:var(--pnb-tile-ink-bug);--_dot: var(--pnb-tile-dot-bug);--_glyph: var(--pnb-tile-glyph-bug)}.tile--idea{background:var(--pnb-tile-idea);color:var(--pnb-tile-ink-idea);--_dot: var(--pnb-tile-dot-idea);--_glyph: var(--pnb-tile-glyph-idea)}.tile--review{background:var(--pnb-tile-review);color:var(--pnb-tile-ink-review);--_dot: var(--pnb-tile-dot-review);--_glyph: var(--pnb-tile-glyph-review)}.tile__icon{display:grid;place-items:center;width:var(--pnb-tile-icon);height:var(--pnb-tile-icon);border-radius:50%;background:var(--_dot);color:var(--_glyph);filter:drop-shadow(0 3px 3px rgba(0,0,0,.05)) drop-shadow(0 8px 16px rgba(0,0,0,.07))}.tile:not(:disabled) .tile__note{display:none}.tile__label{font-size:16px;font-weight:700}.tile__note{font-size:13px;line-height:1.35;opacity:.85}.choose__board{display:flex;justify-content:center;margin-top:16px}.choose__board .text-btn{color:var(--pnb-choose-link);font-size:14px;text-decoration:underline;text-underline-offset:3px}.sent{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:32px 24px calc(32px + var(--_bottom));background:var(--pnb-sent);text-align:center;animation:fade-in .2s ease}.sent__check{display:grid;place-items:center;width:88px;height:88px;border-radius:50%;background:var(--pnb-sent-check);color:var(--pnb-on-sent-check);animation:pop .32s cubic-bezier(.2,.9,.3,1.3)}.sent__title{margin:12px 0 0;font-size:22px;font-weight:700;color:var(--pnb-sent-title)}.sent__note,.sent__back{color:var(--pnb-sent-note)}.sent__note{margin:0}@keyframes pop{0%{transform:scale(.4);opacity:0}}.public{margin:12px 0 0;font-size:14px;color:var(--pnb-form-quiet)}.field{width:100%;min-height:140px;padding:12px 14px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-field-line);background:var(--pnb-field);color:var(--pnb-field-text);font-size:16px;line-height:1.4;resize:vertical}.field:focus{outline:none;border-color:var(--pnb-accent)}.field::placeholder,.input::placeholder{color:var(--pnb-field-quiet);opacity:1}.input{width:100%;height:44px;padding:0 14px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-field-line);background:var(--pnb-field);color:var(--pnb-field-text);font-size:16px}.input:focus{outline:none;border-color:var(--pnb-accent)}.name-field{position:relative;display:block;margin-top:12px}.name-field .face{position:absolute;left:12px;top:10px}.name-field .input{padding-left:46px}.count{align-self:flex-end;font-size:12px;color:var(--pnb-form-quiet)}.alike{margin-top:8px;padding:12px;border-radius:var(--pnb-radius);background:var(--pnb-surface)}.alike__note{margin:4px 0 8px;font-size:13px;color:var(--pnb-text-quiet)}.alike__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.alike__row{display:flex;align-items:center;gap:12px}.alike__text{flex:1;min-width:0;font-size:14px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px}.switch-row__label{font-weight:700}.switch{position:relative;flex-shrink:0;width:48px;height:28px;border-radius:999px;background:var(--pnb-switch);border:1px solid var(--pnb-switch-line);transition:background .16s ease}.switch:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--pnb-switch-knob);transition:transform .16s ease,background .16s ease}.switch[aria-checked=true]{background:var(--pnb-switch-on);border-color:var(--pnb-switch-on)}.switch[aria-checked=true]:after{transform:translate(20px);background:var(--pnb-on-switch-on)}.note{margin:4px 0 0;font-size:12px;line-height:1.45;color:var(--pnb-form-quiet)}.note--bad{color:var(--pnb-danger)}.updates__intro{margin:0 0 12px;font-size:13px;color:var(--pnb-text-quiet)}.update{position:relative}.update__link{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:var(--pnb-radius);background:var(--pnb-surface);border:1px solid var(--pnb-line);color:inherit;text-decoration:none}.update__head{display:flex;align-items:center;gap:8px}.update__version{padding:4px 10px;border-radius:var(--pnb-radius-pill);background:var(--pnb-surface-2);font-size:12px;font-weight:800}.update__title{margin:0;font-size:16px;font-weight:800;line-height:1.35;overflow-wrap:anywhere}.update__text{margin:0;font-size:14px;line-height:1.45;color:var(--pnb-text-quiet);overflow-wrap:anywhere;white-space:pre-wrap}.update__fixed{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:var(--pnb-text-quiet)}.update__link .code-link{margin-top:4px}.update__bin{position:absolute;right:6px;bottom:6px;width:36px;height:36px;color:var(--pnb-text-quiet)}.picks{list-style:none;margin:0;padding:6px;border-radius:var(--pnb-radius);background:var(--pnb-surface)}.pick{display:flex;align-items:center;gap:10px;padding:8px;cursor:pointer}.pick input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--pnb-accent)}.pick .badge{flex:none}.pick__text{flex:1;min-width:0;font-size:13px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.fix-box{display:flex;flex-direction:column;gap:8px;margin-top:16px;padding:14px;border-radius:var(--pnb-radius);background:var(--pnb-surface)}.fix-box__head{display:flex;align-items:center;gap:8px;font-weight:800}.fix-box__label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:var(--pnb-text-quiet)}.fix-box__label .input{font-weight:400}.input[aria-invalid=true]{border-color:var(--pnb-danger)}.send{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:20px}.compose .send{margin-top:auto;padding-top:20px}.left{font-size:13px;color:var(--pnb-form-quiet);text-align:center}.left--bad{color:var(--pnb-danger)}.scrim{position:absolute;inset:0;z-index:10;display:flex;align-items:flex-end;background:var(--pnb-scrim);animation:fade-in .18s ease}.sheet{width:100%;max-height:90%;overflow-y:auto;padding:24px 24px calc(24px + var(--_bottom));border-radius:var(--pnb-radius-sheet) var(--pnb-radius-sheet) 0 0;background:var(--pnb-bg);animation:rise .22s cubic-bezier(.2,.8,.2,1)}.sheet__title{margin:0;font-size:20px;font-weight:700}.sheet__quote{margin:8px 0 0;color:var(--pnb-text-quiet);overflow-wrap:anywhere}.sheet__actions,.manage__actions{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:24px}.states{display:flex;flex-wrap:wrap;gap:8px}.context{margin:12px 0 0;padding:10px 12px;border-radius:var(--pnb-radius);background:var(--pnb-surface);font-size:13px;line-height:1.5}.context dt{font-weight:700;display:inline}.context dd{display:inline;margin:0 0 0 4px;color:var(--pnb-text-quiet)}.sheet__shot{display:flex;flex-direction:column;gap:6px;margin:12px 0 0}.sheet__shot img{display:block;max-width:100%;max-height:200px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-line)}.sheet__shot--whole img{max-height:70vh;align-self:center}.sheet__shot .hide-btn{align-self:flex-start;margin-top:4px}.sheet__shot figcaption{font-size:12px;color:var(--pnb-text-quiet)}.approve-btn{display:block;margin-top:16px;font-weight:700;color:var(--pnb-accent)}.approve-btn[aria-pressed=true]{color:var(--pnb-text-quiet)}.hide-btn{margin-top:16px;font-weight:700;color:var(--pnb-danger)}.toast{position:absolute;left:16px;right:16px;bottom:calc(84px + var(--_bottom));z-index:20;padding:14px 16px;border-radius:var(--pnb-radius);background:var(--pnb-text);color:var(--pnb-bg);font-weight:700;text-align:center;box-shadow:var(--pnb-shadow);animation:rise .22s cubic-bezier(.2,.8,.2,1)}.overlay{position:fixed;inset:0;z-index:var(--pnb-z);animation:slide-up .28s cubic-bezier(.2,.8,.2,1)}.overlay .app{--_top: var(--pnb-inset-top);--_bottom: var(--pnb-inset-bottom)}.overlay--leaving{animation:slide-down .22s cubic-bezier(.4,0,1,1) forwards}.backdrop{display:none}@media (min-width: 640px){.backdrop{display:block;position:fixed;inset:0;z-index:calc(var(--pnb-z) - 1);background:var(--pnb-scrim);animation:fade-in .2s ease}.backdrop--leaving{animation:fade-out .2s ease forwards}.overlay{inset:auto 24px 24px auto;width:375px;max-height:min(640px,calc(100vh - 48px));border-radius:var(--pnb-radius-panel);overflow:hidden;box-shadow:0 16px 48px #0000003d;animation:panel-in .24s cubic-bezier(.2,.8,.2,1)}.overlay--leaving{animation:panel-out .18s cubic-bezier(.4,0,1,1) forwards}.overlay .app{--_top: 0px;--_bottom: 0px;height:auto;max-height:inherit}.overlay .scroll{min-height:0}.overlay .sent{min-height:420px}}.fab{position:fixed;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + var(--pnb-inset-bottom));z-index:calc(var(--pnb-z) - 1);display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--pnb-fab);color:var(--pnb-on-fab);box-shadow:var(--pnb-fab-shadow);transition:transform .12s ease,translate .12s ease,box-shadow .12s ease}.fab:hover{transform:scale(1.06)}.fab:active{transform:scale(var(--pnb-fab-squeeze));box-shadow:var(--pnb-fab-shadow-pressed)}.fab--away{visibility:hidden}.overlay.overlay--morph,.overlay.overlay--morph.overlay--leaving{animation:none}.overlay--morph{background:var(--pnb-bg)}@media (min-width: 640px){.fab{right:24px;bottom:24px}}@keyframes fade-in{0%{opacity:0}}@keyframes fade-out{to{opacity:0}}@keyframes panel-in{0%{transform:translateY(16px);opacity:0}}@keyframes panel-out{to{transform:translateY(16px);opacity:0}}@keyframes rise{0%{transform:translateY(24px);opacity:0}}@keyframes slide-up{0%{transform:translateY(100%)}}@keyframes slide-down{to{transform:translateY(100%)}}@media (prefers-reduced-motion: reduce){.overlay,.overlay--leaving,.scrim,.sheet,.toast,.sent,.sent__check,.backdrop{animation:none}.tile,.rate__star,.fab{transition:none}.order{transition:opacity .16s ease}.order--away{transform:none}.spinner{animation-duration:1.6s}}.finder{flex-wrap:nowrap;align-items:center;padding:4px 16px 10px}.search{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:40px;padding:0 6px 0 12px;border-radius:var(--pnb-radius);background:var(--pnb-field);border:1px solid var(--pnb-field-line);color:var(--pnb-field-quiet)}.search:focus-within{border-color:var(--pnb-accent)}.search__input{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;color:var(--pnb-field-text);font-size:15px;outline:none}.search__input::placeholder{color:var(--pnb-field-quiet);opacity:1}.search__input::-webkit-search-cancel-button{display:none}.search__clear{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;color:var(--pnb-text-quiet)}.filter-btn{flex:none;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 12px;border-radius:var(--pnb-radius);background:var(--pnb-filter-btn);border:1px solid var(--pnb-filter-btn-line);color:var(--pnb-filter-btn-text);font-size:14px;font-weight:700}.filter-btn[aria-pressed=true]{padding-right:8px;border-color:var(--pnb-accent)}.filter-btn__n{min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--pnb-accent);color:var(--pnb-on-accent);font-size:11px;line-height:18px;text-align:center}.applied{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 16px 10px;flex-shrink:0}.applied__chip{display:inline-flex;align-items:center;gap:4px;padding:5px 8px 5px 12px;border-radius:var(--pnb-radius-pill);background:var(--pnb-surface);border:1px solid var(--pnb-accent);font-size:13px;font-weight:700}.link-btn{padding:4px 2px;font-size:12px;font-weight:700;color:var(--pnb-accent)}.found-count{margin:0 0 10px;font-size:12px;color:var(--pnb-text-quiet)}mark{background:transparent;color:var(--pnb-accent);font-weight:800}.nothing{display:flex;flex-direction:column;align-items:center;gap:8px}.nothing p{margin:0}.nothing__title{font-size:16px;color:var(--pnb-text)}.outline-btn{margin-top:4px;padding:10px 16px;border-radius:var(--pnb-radius);border:1.5px solid var(--pnb-accent);color:var(--pnb-accent);font-weight:700}.news--owner{padding-right:8px}.news__grow{flex:1;min-width:0}.news__link{align-self:flex-start;padding:0;color:var(--pnb-news-link)}.chip-btn{flex:none;padding:6px 12px;border-radius:var(--pnb-radius-pill);background:var(--pnb-accent);color:var(--pnb-on-accent);font-size:13px;font-weight:700}.card__new{font-size:12px;font-weight:700;color:var(--pnb-accent)}.card__found{margin:8px 0 0;font-size:12px;color:var(--pnb-text-quiet);overflow-wrap:anywhere}.card__talk{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 10px;border-radius:var(--pnb-radius-pill);color:var(--pnb-text-quiet);font-size:14px;font-weight:700}button.card__talk:active{background:var(--pnb-surface-2)}.talk .list{margin-bottom:12px}.thread{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.msg{padding:10px 12px;border-radius:var(--pnb-radius);background:var(--pnb-bg);box-shadow:inset 0 0 0 1px var(--pnb-line);border-left:3px solid var(--pnb-accent)}.msg--author{background:var(--pnb-surface-2);box-shadow:none;border-left-color:var(--pnb-line)}.msg--hidden{opacity:.55}.msg__who{font-size:12px;font-weight:700;color:var(--pnb-text-quiet)}.msg__text{margin:4px 0 0;font-size:14px;line-height:1.4;overflow-wrap:anywhere;white-space:pre-wrap}.msg__actions{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--pnb-text-quiet)}.answer{display:flex;flex-direction:column;gap:8px;margin-top:16px}.answer__field{min-height:96px}.answer__row{display:flex;align-items:center;gap:8px}.answer__row .count{flex:1;align-self:center}.answer__send{width:auto;height:36px;padding:0 18px;font-size:14px}.answer__cancel{padding:8px}.talk__next{margin-top:12px}.sheet__head{display:flex;align-items:center;justify-content:space-between;margin:-10px -12px 0 0}.pick-group{display:flex;flex-direction:column;gap:8px;margin-top:16px}.pick-own{margin-top:16px;padding:0 12px 12px;border:1px solid var(--pnb-line);border-radius:var(--pnb-radius)}.pick-own .pick-group{margin-top:12px}.switch-row--box{padding:12px 12px 12px 14px;border-radius:var(--pnb-radius);background:var(--pnb-surface)}.sheet__foot{display:flex;align-items:center;gap:12px;margin-top:20px}.sheet__foot .btn{flex:1}.filter-reset{padding:12px 4px;color:var(--pnb-accent)}.alike__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.alike__meta{font-size:12px;color:var(--pnb-text-quiet)}.me-too{flex:none;display:inline-flex;align-items:center;gap:6px;padding:7px 12px 7px 10px;border-radius:var(--pnb-radius-pill);border:1px solid var(--pnb-accent);background:var(--pnb-surface-2);font-size:13px;font-weight:700}.me-too:disabled{border-color:var(--pnb-line);color:var(--pnb-text-quiet)}', Gt = "please-no-bugs";
2498
+ var Ne, Z, fe, se, Be, Fe, Pe, Ie, qe, nt, De, Ee, Y, pe, Kt;
2499
+ class fa extends HTMLElement {
2500
+ constructor() {
2501
+ super(...arguments);
2502
+ K(this, Y);
2503
+ K(this, Ne, null);
2504
+ K(this, Z, null);
2505
+ K(this, fe, null);
2506
+ K(this, se, "");
2507
+ K(this, Be);
2508
+ K(this, Fe);
2509
+ K(this, Pe);
2510
+ K(this, Ie);
2511
+ K(this, qe);
2512
+ K(this, nt);
2513
+ K(this, De);
2514
+ /** The demo board's code, fetched the first time `demo` is set. */
2515
+ K(this, Ee);
2516
+ }
2517
+ /** How to sign outside Nimiq Pay. Inside it the widget signs by itself. */
2518
+ get signer() {
2519
+ return $(this, Be);
2520
+ }
2521
+ set signer(a) {
2522
+ E(this, Be, a), E(this, se, ""), te(this, Y, pe).call(this);
2523
+ }
2524
+ /**
2525
+ * Your app's own wallet login, so nobody signs twice: `{ address, publicKey,
2526
+ * signature, message }`. Needs the project to list that message. Set it to
2527
+ * null on logout.
2528
+ */
2529
+ get appLogin() {
2530
+ return $(this, Fe);
2531
+ }
2532
+ set appLogin(a) {
2533
+ E(this, Fe, a), E(this, se, ""), te(this, Y, pe).call(this);
2534
+ }
2535
+ /** Sent with every bug report, to owners only: `{ version: '1.4.0' }`. */
2536
+ get context() {
2537
+ return $(this, Pe);
2538
+ }
2539
+ set context(a) {
2540
+ E(this, Pe, a), te(this, Y, pe).call(this);
2541
+ }
2542
+ /** Words common in your app, so "said already?" ignores them: `['nim', 'wallet']`. */
2543
+ get noise() {
2544
+ return $(this, Ie);
2545
+ }
2546
+ set noise(a) {
2547
+ E(this, Ie, a), te(this, Y, pe).call(this);
2548
+ }
2549
+ /** Override any string, or put the whole board in your app's language: `{ 'board.title': 'Ideas box' }`. */
2550
+ get strings() {
2551
+ return $(this, qe);
2552
+ }
2553
+ set strings(a) {
2554
+ E(this, qe, a), te(this, Y, pe).call(this);
2555
+ }
2556
+ /**
2557
+ * With `demo` only: the posts the demo board starts with, instead of its
2558
+ * own, and no updates: `[{ kind: 'idea', text: 'Pin my contacts', votes: 12 }]`.
2559
+ */
2560
+ get samples() {
2561
+ return $(this, De);
2562
+ }
2563
+ set samples(a) {
2564
+ E(this, De, a), E(this, se, ""), te(this, Y, pe).call(this);
2565
+ }
2566
+ connectedCallback() {
2567
+ if (!$(this, Ne)) {
2568
+ E(this, Ne, this.attachShadow({ mode: "open" }));
2569
+ const a = document.createElement("style");
2570
+ a.textContent = nr, E(this, Z, document.createElement("div")), $(this, Z).style.height = "100%", $(this, Ne).append(a, $(this, Z));
2571
+ }
2572
+ te(this, Y, pe).call(this);
2573
+ }
2574
+ disconnectedCallback() {
2575
+ $(this, Z) && Xe(null, $(this, Z));
2576
+ }
2577
+ attributeChangedCallback(a) {
2578
+ (a === "project" || a === "server" || a === "demo" || a === "readonly") && E(this, se, ""), te(this, Y, pe).call(this);
2579
+ }
2580
+ /** Close an overlay: slide it away, then tell the page. */
2581
+ close() {
2582
+ this.dispatchEvent(new CustomEvent("pleasenobugs:close", { bubbles: !0, composed: !0 }));
2583
+ }
2584
+ }
2585
+ Ne = new WeakMap(), Z = new WeakMap(), fe = new WeakMap(), se = new WeakMap(), Be = new WeakMap(), Fe = new WeakMap(), Pe = new WeakMap(), Ie = new WeakMap(), qe = new WeakMap(), nt = new WeakMap(), De = new WeakMap(), Ee = new WeakMap(), Y = new WeakSet(), pe = function() {
2586
+ if (!$(this, Z) || !this.isConnected) return;
2587
+ const a = this.getAttribute("lang") || "en";
2588
+ if (this.hasAttribute("demo")) {
2589
+ if (!$(this, Ee)) {
2590
+ import("./demo-DLTn5oUs.js").then((p) => {
2591
+ E(this, Ee, p), te(this, Y, pe).call(this);
2592
+ });
2593
+ return;
2594
+ }
2595
+ const d = this.getAttribute("demo") === "owner", u = `demo|${d}`;
2596
+ (!$(this, fe) || $(this, se) !== u) && (E(this, fe, $(this, Ee).createDemoClient({ owner: d, samples: $(this, De) })), E(this, se, u)), te(this, Y, Kt).call(this, $(this, fe), a);
2597
+ return;
2598
+ }
2599
+ const i = this.getAttribute("project"), o = this.getAttribute("server");
2600
+ if (!i || !o) {
2601
+ Xe(null, $(this, Z)), clearTimeout($(this, nt)), E(this, nt, setTimeout(() => {
2602
+ (!this.getAttribute("project") || !this.getAttribute("server")) && console.warn("[pleasenobugs] <please-no-bugs> needs both a `project` and a `server` attribute.");
2603
+ }, 1e3));
2604
+ return;
2605
+ }
2606
+ const r = this.hasAttribute("readonly"), l = `${o}|${i}|${r}`;
2607
+ (!$(this, fe) || $(this, se) !== l) && (E(this, fe, r ? xn({ server: o, project: i, signer: null, appLogin: null, storage: null }) : xn({ server: o, project: i, signer: $(this, Be), appLogin: $(this, Fe) })), E(this, se, l)), te(this, Y, Kt).call(this, $(this, fe), a);
2608
+ }, Kt = function(a, i) {
2609
+ if (!$(this, Z)) return;
2610
+ const o = this.getAttribute("mode") ?? "inline", r = {
2611
+ client: a,
2612
+ t: di($(this, qe)),
2613
+ locale: i,
2614
+ appName: this.getAttribute("app-name") ?? void 0,
2615
+ suggestName: this.getAttribute("name") ?? void 0,
2616
+ context: $(this, Pe),
2617
+ noise: $(this, Ie),
2618
+ kinds: dr(this.getAttribute("kinds")),
2619
+ screenshots: lr(this.getAttribute("screenshots")),
2620
+ readonly: this.hasAttribute("readonly"),
2621
+ names: this.getAttribute("names") !== "off",
2622
+ onPosted: (p) => this.dispatchEvent(new CustomEvent("pleasenobugs:posted", { detail: p, bubbles: !0, composed: !0 }))
2623
+ }, l = this.hasAttribute("demo") && !r.readonly ? ar(this.getAttribute("screen")) : void 0, d = l === "button" ? void 0 : l, u = this.getAttribute("start") === "board" ? "board" : "choose";
2624
+ o === "floating" ? Xe(/* @__PURE__ */ n(ir, { app: r, label: r.t("board.open"), screen: l, start: u }), $(this, Z)) : o === "overlay" ? Xe(/* @__PURE__ */ n(_a, { app: r, start: u, screen: d, onGone: () => this.close() }), $(this, Z)) : Xe(/* @__PURE__ */ n(ha, { ...r, start: u, screen: d }), $(this, Z));
2625
+ }, vn(fa, "observedAttributes", [
2626
+ "project",
2627
+ "server",
2628
+ "mode",
2629
+ "start",
2630
+ "lang",
2631
+ "theme",
2632
+ "app-name",
2633
+ "name",
2634
+ "kinds",
2635
+ "screenshots",
2636
+ "readonly",
2637
+ "names",
2638
+ "demo",
2639
+ "screen"
2640
+ ]);
2641
+ function ar(e) {
2642
+ return e ? {
2643
+ button: "button",
2644
+ tiles: "choose",
2645
+ board: "board",
2646
+ write: "compose",
2647
+ sent: "sent",
2648
+ updates: "updates"
2649
+ }[e.trim().toLowerCase()] : void 0;
2650
+ }
2651
+ function _a({
2652
+ app: e,
2653
+ onGone: t,
2654
+ start: a,
2655
+ screen: i,
2656
+ button: o,
2657
+ grow: r
2658
+ }) {
2659
+ const [l, d] = m(!1), u = et(null), p = () => {
2660
+ if (l) return;
2661
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return t();
2662
+ d(!0);
2663
+ const b = o?.();
2664
+ b && u.current && Un(u.current, b, "close").then(t);
2665
+ };
2666
+ return ii(() => {
2667
+ const b = o?.();
2668
+ r && b && u.current && !window.matchMedia("(prefers-reduced-motion: reduce)").matches && Un(u.current, b, "open");
2669
+ }, []), ne(() => {
2670
+ const b = (x) => {
2671
+ x.key === "Escape" && !u.current?.querySelector(".scrim") && p();
2672
+ };
2673
+ return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
2674
+ }), /* @__PURE__ */ n(R, { children: [
2675
+ /* @__PURE__ */ n("div", { class: `backdrop${l ? " backdrop--leaving" : ""}`, onClick: p }),
2676
+ /* @__PURE__ */ n(
2677
+ "div",
2678
+ {
2679
+ ref: u,
2680
+ class: `overlay${o ? " overlay--morph" : ""}${l ? " overlay--leaving" : ""}`,
2681
+ role: "dialog",
2682
+ "aria-modal": "true",
2683
+ "aria-label": e.t("board.title"),
2684
+ onAnimationEnd: (b) => {
2685
+ l && b.target === b.currentTarget && t();
2686
+ },
2687
+ children: /* @__PURE__ */ n(ha, { ...e, onClose: p, start: a, screen: i })
2688
+ }
2689
+ )
2690
+ ] });
2691
+ }
2692
+ function ir({
2693
+ app: e,
2694
+ label: t,
2695
+ screen: a,
2696
+ start: i
2697
+ }) {
2698
+ const [o, r] = m(!!a && a !== "button"), [l, d] = m(!1), u = et(null);
2699
+ return ne(() => {
2700
+ a && r(a !== "button");
2701
+ }, [a]), /* @__PURE__ */ n(R, { children: [
2702
+ /* @__PURE__ */ n(
2703
+ "button",
2704
+ {
2705
+ ref: u,
2706
+ type: "button",
2707
+ class: `fab${o ? " fab--away" : ""}`,
2708
+ "aria-label": t,
2709
+ title: t,
2710
+ "aria-hidden": o,
2711
+ tabIndex: o ? -1 : 0,
2712
+ onClick: () => {
2713
+ d(!0), r(!0);
2714
+ },
2715
+ children: /* @__PURE__ */ n(fi, {})
2716
+ }
2717
+ ),
2718
+ o && /* @__PURE__ */ n(
2719
+ _a,
2720
+ {
2721
+ app: e,
2722
+ start: i,
2723
+ screen: a === "button" ? void 0 : a,
2724
+ button: () => u.current,
2725
+ grow: l,
2726
+ onGone: () => {
2727
+ r(!1), d(!1);
2728
+ }
2729
+ }
2730
+ )
2731
+ ] });
2732
+ }
2733
+ const rr = 340, or = 260, sr = 160;
2734
+ function Un(e, t, a) {
2735
+ if (typeof e.animate != "function") return Promise.resolve();
2736
+ const i = e.getBoundingClientRect(), o = t.getBoundingClientRect(), r = o.width / 2, l = `inset(${o.top - i.top}px ${i.right - o.right}px ${i.bottom - o.bottom}px ${o.left - i.left}px round ${r}px)`, d = `inset(0px 0px 0px 0px round ${getComputedStyle(e).borderTopLeftRadius})`, u = a === "open", p = {
2737
+ duration: u ? rr : or,
2738
+ easing: u ? "cubic-bezier(0.3, 0.9, 0.3, 1)" : "cubic-bezier(0.5, 0, 0.75, 0)",
2739
+ fill: u ? "none" : "forwards"
2740
+ }, b = e.firstElementChild;
2741
+ b && (b.style.transformOrigin = `${o.left + r - i.left}px ${o.top + r - i.top}px`);
2742
+ const x = u ? [{ clipPath: l }, { clipPath: d }] : [{ clipPath: d }, { clipPath: l }], c = [e.animate(x, p)];
2743
+ return b && c.push(
2744
+ b.animate(
2745
+ u ? [
2746
+ { opacity: 0, transform: "scale(0.96)", offset: 0 },
2747
+ { opacity: 0, transform: "scale(0.96)", offset: 0.15 },
2748
+ { opacity: 1, transform: "scale(1)", offset: 0.8 },
2749
+ { opacity: 1, transform: "scale(1)", offset: 1 }
2750
+ ] : [
2751
+ { opacity: 1, transform: "scale(1)", offset: 0 },
2752
+ { opacity: 0, transform: "scale(0.96)", offset: 0.55 },
2753
+ { opacity: 0, transform: "scale(0.96)", offset: 1 }
2754
+ ],
2755
+ { ...p, easing: u ? "ease-out" : "ease-in" }
2756
+ )
2757
+ ), Promise.all(c.map((h) => h.finished)).catch(() => {
2758
+ }).then(() => {
2759
+ if (u) {
2760
+ b && (b.style.transformOrigin = "");
2761
+ return;
2762
+ }
2763
+ t.classList.remove("fab--away"), e.style.visibility = "hidden", typeof t.animate == "function" && t.animate([{ opacity: 0, transform: "scale(0.8)" }, { opacity: 1, transform: "scale(1)" }], {
2764
+ duration: sr,
2765
+ easing: "ease-out"
2766
+ });
2767
+ });
2768
+ }
2769
+ function lr(e) {
2770
+ return e === null || e === "" || e === "board" ? "board" : e === "off" ? "off" : "owners";
2771
+ }
2772
+ function dr(e) {
2773
+ if (!(e === null || !e.trim()))
2774
+ return e.split(",").map((t) => t.trim().toLowerCase()).filter((t) => Ra.includes(t));
2775
+ }
2776
+ function cr() {
2777
+ typeof customElements < "u" && !customElements.get(Gt) && customElements.define(Gt, fa);
2778
+ }
2779
+ cr();
2780
+ function _r(e) {
2781
+ const t = document.createElement(Gt);
2782
+ t.setAttribute("mode", "overlay"), t.setAttribute("project", e.project), t.setAttribute("server", e.server), e.lang && t.setAttribute("lang", e.lang), e.theme && t.setAttribute("theme", e.theme), e.appName && t.setAttribute("app-name", e.appName), e.name && t.setAttribute("name", e.name), e.kinds && t.setAttribute("kinds", e.kinds.join(",")), e.screenshots === !1 && t.setAttribute("screenshots", "off"), e.screenshots === "owners" && t.setAttribute("screenshots", "owners"), e.readonly && t.setAttribute("readonly", ""), e.names === !1 && t.setAttribute("names", "off"), t.signer = e.signer, t.appLogin = e.appLogin, t.context = e.context, t.noise = e.noise, t.strings = e.strings;
2783
+ const a = () => t.remove();
2784
+ return t.addEventListener("pleasenobugs:close", a, { once: !0 }), document.body.append(t), () => t.close();
2785
+ }
2786
+ export {
2787
+ br as D,
2788
+ fa as P,
2789
+ Ga as a,
2790
+ fr as b,
2791
+ hr as c,
2792
+ bt as i,
2793
+ Re as l,
2794
+ _r as o
2795
+ };