pleasenobugs 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -30
- package/dist/chunks/demo-CL3oK-zC.js +212 -0
- package/dist/chunks/index--SJW3aE-.js +2749 -0
- package/dist/client.js +139 -107
- package/dist/index.js +9 -10
- package/dist/pleasenobugs.iife.js +2 -2
- package/dist/types/client.d.ts +59 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/demo.d.ts +39 -3
- package/dist/types/demo.d.ts.map +1 -1
- package/dist/types/element.d.ts +17 -12
- package/dist/types/element.d.ts.map +1 -1
- package/dist/types/filter.d.ts +66 -0
- package/dist/types/filter.d.ts.map +1 -0
- package/dist/types/i18n.d.ts +212 -526
- package/dist/types/i18n.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/readonly.d.ts +1 -1
- package/dist/types/readonly.d.ts.map +1 -1
- package/dist/types/ui/App.d.ts +4 -3
- package/dist/types/ui/App.d.ts.map +1 -1
- package/dist/types/ui/Compose.d.ts +5 -4
- package/dist/types/ui/Compose.d.ts.map +1 -1
- package/dist/types/ui/Manage.d.ts +60 -0
- package/dist/types/ui/Manage.d.ts.map +1 -0
- package/dist/types/ui/PostCard.d.ts +50 -5
- package/dist/types/ui/PostCard.d.ts.map +1 -1
- package/dist/types/ui/Sheets.d.ts +32 -28
- package/dist/types/ui/Sheets.d.ts.map +1 -1
- package/dist/types/ui/Talk.d.ts +57 -0
- package/dist/types/ui/Talk.d.ts.map +1 -0
- package/dist/types/ui/Updates.d.ts +37 -0
- package/dist/types/ui/Updates.d.ts.map +1 -0
- package/dist/types/ui/icons.d.ts +16 -0
- package/dist/types/ui/icons.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/demo-nnvUgJyJ.js +0 -107
- package/dist/chunks/index-13DToKWI.js +0 -1751
|
@@ -1,1751 +0,0 @@
|
|
|
1
|
-
var kn = Object.defineProperty;
|
|
2
|
-
var Ct = (e) => {
|
|
3
|
-
throw TypeError(e);
|
|
4
|
-
};
|
|
5
|
-
var Cn = (e, t, n) => t in e ? kn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var St = (e, t, n) => Cn(e, typeof t != "symbol" ? t + "" : t, n), tt = (e, t, n) => t.has(e) || Ct("Cannot " + n);
|
|
7
|
-
var w = (e, t, n) => (tt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), $ = (e, t, n) => t.has(e) ? Ct("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), B = (e, t, n, r) => (tt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), q = (e, t, n) => (tt(e, t, "access private method"), n);
|
|
8
|
-
import { sortPosts as Sn, createMatcher as zn, insideNimiqPay as An, createClient as zt } from "../client.js";
|
|
9
|
-
const Ta = 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
|
-
}), Tn = 24, Mn = ["bug", "idea", "review"], Ln = 1e6;
|
|
20
|
-
function Nn(e) {
|
|
21
|
-
return e === "bug" || e === "idea";
|
|
22
|
-
}
|
|
23
|
-
var Ue, C, Ut, ie, At, Vt, Kt, nt, Re, Ae, Yt, ut, ot, it, $e = {}, He = [], jn = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ve = Array.isArray;
|
|
24
|
-
function ne(e, t) {
|
|
25
|
-
for (var n in t) e[n] = t[n];
|
|
26
|
-
return e;
|
|
27
|
-
}
|
|
28
|
-
function _t(e) {
|
|
29
|
-
e && e.parentNode && e.parentNode.removeChild(e);
|
|
30
|
-
}
|
|
31
|
-
function Bn(e, t, n) {
|
|
32
|
-
var r, i, o, l = {};
|
|
33
|
-
for (o in t) o == "key" ? r = t[o] : o == "ref" ? i = t[o] : l[o] = t[o];
|
|
34
|
-
if (arguments.length > 2 && (l.children = arguments.length > 3 ? Ue.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) l[o] === void 0 && (l[o] = e.defaultProps[o]);
|
|
35
|
-
return Ee(e, l, r, i, null);
|
|
36
|
-
}
|
|
37
|
-
function Ee(e, t, n, r, i) {
|
|
38
|
-
var o = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Ut, __i: -1, __u: 0 };
|
|
39
|
-
return i == null && C.vnode != null && C.vnode(o), o;
|
|
40
|
-
}
|
|
41
|
-
function pe(e) {
|
|
42
|
-
return e.children;
|
|
43
|
-
}
|
|
44
|
-
function Oe(e, t) {
|
|
45
|
-
this.props = e, this.context = t;
|
|
46
|
-
}
|
|
47
|
-
function ce(e, t) {
|
|
48
|
-
if (t == null) return e.__ ? ce(e.__, e.__i + 1) : null;
|
|
49
|
-
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
50
|
-
return typeof e.type == "function" ? ce(e) : null;
|
|
51
|
-
}
|
|
52
|
-
function Dn(e) {
|
|
53
|
-
if (e.__P && e.__d) {
|
|
54
|
-
var t = e.__v, n = t.__e, r = [], i = [], o = ne({}, t);
|
|
55
|
-
o.__v = t.__v + 1, C.vnode && C.vnode(o), ft(e.__P, o, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? ce(t), !!(32 & t.__u), i), o.__v = t.__v, o.__.__k[o.__i] = o, Qt(r, o, i), t.__e = t.__ = null, o.__e != n && Gt(o);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function Gt(e) {
|
|
59
|
-
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
|
|
60
|
-
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
|
|
61
|
-
}), Gt(e);
|
|
62
|
-
}
|
|
63
|
-
function Tt(e) {
|
|
64
|
-
(!e.__d && (e.__d = !0) && ie.push(e) && !We.__r++ || At != C.debounceRendering) && ((At = C.debounceRendering) || Vt)(We);
|
|
65
|
-
}
|
|
66
|
-
function We() {
|
|
67
|
-
try {
|
|
68
|
-
for (var e, t = 1; ie.length; ) ie.length > t && ie.sort(Kt), e = ie.shift(), t = ie.length, Dn(e);
|
|
69
|
-
} finally {
|
|
70
|
-
ie.length = We.__r = 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function Zt(e, t, n, r, i, o, l, c, h, p, _) {
|
|
74
|
-
var x, s, b, u, j, g, S = r && r.__k || He, f = t.length;
|
|
75
|
-
for (h = Pn(n, t, S, h, f), x = 0; x < f; x++) (b = n.__k[x]) != null && (s = b.__i != -1 && S[b.__i] || $e, b.__i = x, g = ft(e, b, s, i, o, l, c, h, p, _), u = b.__e, b.ref && s.ref != b.ref && (s.ref && gt(s.ref, null, b), _.push(b.ref, b.__c || u, b)), j == null && u != null && (j = u), 4 & b.__u ? (h = Jt(b, h, e), s.__e && (s.__e = null)) : typeof b.type == "function" && g !== void 0 ? h = g : u && (h = u.nextSibling), b.__u &= -7);
|
|
76
|
-
return n.__e = j, h;
|
|
77
|
-
}
|
|
78
|
-
function Pn(e, t, n, r, i) {
|
|
79
|
-
var o, l, c, h, p, _ = n.length, x = _, s = 0;
|
|
80
|
-
for (e.__k = new Array(i), o = 0; o < i; o++) (l = t[o]) != null && typeof l != "boolean" && typeof l != "function" ? (typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? l = e.__k[o] = Ee(null, l, null, null, null) : Ve(l) ? l = e.__k[o] = Ee(pe, { children: l }, null, null, null) : l.constructor === void 0 && l.__b > 0 ? l = e.__k[o] = Ee(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : e.__k[o] = l, h = o + s, l.__ = e, l.__b = e.__b + 1, c = null, (p = l.__i = Fn(l, n, h, x)) != -1 && (x--, (c = n[p]) && (c.__u |= 2)), c == null || c.__v == null ? (p == -1 && (i > _ ? s-- : i < _ && s++), typeof l.type != "function" && (l.__u |= 4)) : p != h && (p == h - 1 ? s-- : p == h + 1 ? s++ : (p > h ? s-- : s++, l.__u |= 4))) : e.__k[o] = null;
|
|
81
|
-
if (x) for (o = 0; o < _; o++) (c = n[o]) != null && !(2 & c.__u) && (c.__e == r && (r = ce(c)), tn(c, c));
|
|
82
|
-
return r;
|
|
83
|
-
}
|
|
84
|
-
function Jt(e, t, n) {
|
|
85
|
-
var r, i;
|
|
86
|
-
if (typeof e.type == "function") {
|
|
87
|
-
for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = Jt(r[i], t, n));
|
|
88
|
-
return t;
|
|
89
|
-
}
|
|
90
|
-
e.__e != t && (t && e.type && !t.parentNode && (t = ce(e)), t = n.insertBefore(e.__e, t || null));
|
|
91
|
-
do
|
|
92
|
-
t = t && t.nextSibling;
|
|
93
|
-
while (t != null && t.nodeType == 8);
|
|
94
|
-
return t;
|
|
95
|
-
}
|
|
96
|
-
function Fn(e, t, n, r) {
|
|
97
|
-
var i, o, l, c = e.key, h = e.type, p = t[n], _ = p != null && (2 & p.__u) == 0;
|
|
98
|
-
if (p === null && c == null || _ && c == p.key && h == p.type) return n;
|
|
99
|
-
if (r > (_ ? 1 : 0)) {
|
|
100
|
-
for (i = n - 1, o = n + 1; i >= 0 || o < t.length; ) if ((p = t[l = i >= 0 ? i-- : o++]) != null && !(2 & p.__u) && c == p.key && h == p.type) return l;
|
|
101
|
-
}
|
|
102
|
-
return -1;
|
|
103
|
-
}
|
|
104
|
-
function Mt(e, t, n) {
|
|
105
|
-
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || jn.test(t) ? n : n + "px";
|
|
106
|
-
}
|
|
107
|
-
function Fe(e, t, n, r, i) {
|
|
108
|
-
var o, l;
|
|
109
|
-
e: if (t == "style") if (typeof n == "string") e.style.cssText = n;
|
|
110
|
-
else {
|
|
111
|
-
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || Mt(e.style, t, "");
|
|
112
|
-
if (n) for (t in n) r && n[t] == r[t] || Mt(e.style, t, n[t]);
|
|
113
|
-
}
|
|
114
|
-
else if (t[0] == "o" && t[1] == "n") o = t != (t = t.replace(Yt, "$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 + o] = n, n ? r ? n[Ae] = r[Ae] : (n[Ae] = ut, e.addEventListener(t, o ? it : ot, o)) : e.removeEventListener(t, o ? it : ot, o);
|
|
115
|
-
else {
|
|
116
|
-
if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
117
|
-
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 {
|
|
118
|
-
e[t] = n ?? "";
|
|
119
|
-
break e;
|
|
120
|
-
} catch {
|
|
121
|
-
}
|
|
122
|
-
typeof n == "function" || (n == null || n === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function Lt(e) {
|
|
126
|
-
return function(t) {
|
|
127
|
-
if (this.l) {
|
|
128
|
-
var n = this.l[t.type + e];
|
|
129
|
-
if (t[Re] == null) t[Re] = ut++;
|
|
130
|
-
else if (t[Re] < n[Ae]) return;
|
|
131
|
-
return n(C.event ? C.event(t) : t);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function ft(e, t, n, r, i, o, l, c, h, p) {
|
|
136
|
-
var _, x, s, b, u, j, g, S, f, A, z, T, F, Y, G, O, D = t.type;
|
|
137
|
-
if (t.constructor !== void 0) return null;
|
|
138
|
-
128 & n.__u && (h = !!(32 & n.__u), o = [c = t.__e = n.__e]), (_ = C.__b) && _(t);
|
|
139
|
-
e: if (typeof D == "function") {
|
|
140
|
-
x = l.length;
|
|
141
|
-
try {
|
|
142
|
-
if (f = t.props, A = D.prototype && D.prototype.render, z = (_ = D.contextType) && r[_.__c], T = _ ? z ? z.props.value : _.__ : r, n.__c ? S = (s = t.__c = n.__c).__ = s.__E : (A ? t.__c = s = new D(f, T) : (t.__c = s = new Oe(f, T), s.constructor = D, s.render = En), z && z.sub(s), s.state || (s.state = {}), s.__n = r, b = s.__d = !0, s.__h = [], s._sb = []), A && s.__s == null && (s.__s = s.state), A && D.getDerivedStateFromProps != null && (s.__s == s.state && (s.__s = ne({}, s.__s)), ne(s.__s, D.getDerivedStateFromProps(f, s.__s))), u = s.props, j = s.state, s.__v = t, b) A && D.getDerivedStateFromProps == null && s.componentWillMount != null && s.componentWillMount(), A && s.componentDidMount != null && s.__h.push(s.componentDidMount);
|
|
143
|
-
else {
|
|
144
|
-
if (A && D.getDerivedStateFromProps == null && f !== u && s.componentWillReceiveProps != null && s.componentWillReceiveProps(f, T), t.__v == n.__v || !s.__e && s.shouldComponentUpdate != null && s.shouldComponentUpdate(f, s.__s, T) === !1) {
|
|
145
|
-
t.__v != n.__v && (s.props = f, s.state = s.__s, s.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(I) {
|
|
146
|
-
I && (I.__ = t);
|
|
147
|
-
}), He.push.apply(s.__h, s._sb), s._sb = [], s.__h.length && l.push(s), c = ce(n);
|
|
148
|
-
break e;
|
|
149
|
-
}
|
|
150
|
-
s.componentWillUpdate != null && s.componentWillUpdate(f, s.__s, T), A && s.componentDidUpdate != null && s.__h.push(function() {
|
|
151
|
-
s.componentDidUpdate(u, j, g);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
if (s.context = T, s.props = f, s.__P = e, s.__e = !1, F = C.__r, Y = 0, A) s.state = s.__s, s.__d = !1, F && F(t), _ = s.render(s.props, s.state, s.context), He.push.apply(s.__h, s._sb), s._sb = [];
|
|
155
|
-
else do
|
|
156
|
-
s.__d = !1, F && F(t), _ = s.render(s.props, s.state, s.context), s.state = s.__s;
|
|
157
|
-
while (s.__d && ++Y < 25);
|
|
158
|
-
s.state = s.__s, s.getChildContext != null && (r = ne(ne({}, r), s.getChildContext())), A && !b && s.getSnapshotBeforeUpdate != null && (g = s.getSnapshotBeforeUpdate(u, j)), G = _ != null && _.type === pe && _.key == null ? en(_.props.children) : _, c = Zt(e, Ve(G) ? G : [G], t, n, r, i, o, l, c, h, p), s.base = t.__e, t.__u &= -161, s.__h.length && l.push(s), S && (s.__E = s.__ = null);
|
|
159
|
-
} catch (I) {
|
|
160
|
-
if (l.length = x, t.__v = null, h || o != null) {
|
|
161
|
-
if (I.then) {
|
|
162
|
-
for (t.__u |= h ? 160 : 128; c && c.nodeType == 8 && c.nextSibling; ) c = c.nextSibling;
|
|
163
|
-
o != null && (o[o.indexOf(c)] = null), t.__e = c;
|
|
164
|
-
} else if (o != null) for (O = o.length; O--; ) _t(o[O]);
|
|
165
|
-
} else t.__e = n.__e;
|
|
166
|
-
t.__k == null && (t.__k = n.__k || []), I.then || Xt(t), C.__e(I, t, n);
|
|
167
|
-
}
|
|
168
|
-
} else o == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : c = t.__e = Rn(n.__e, t, n, r, i, o, l, h, p);
|
|
169
|
-
return (_ = C.diffed) && _(t), 128 & t.__u ? void 0 : c;
|
|
170
|
-
}
|
|
171
|
-
function Xt(e) {
|
|
172
|
-
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(Xt));
|
|
173
|
-
}
|
|
174
|
-
function Qt(e, t, n) {
|
|
175
|
-
for (var r = 0; r < n.length; r++) gt(n[r], n[++r], n[++r]);
|
|
176
|
-
C.__c && C.__c(t, e), e.some(function(i) {
|
|
177
|
-
try {
|
|
178
|
-
e = i.__h, i.__h = [], e.some(function(o) {
|
|
179
|
-
o.call(i);
|
|
180
|
-
});
|
|
181
|
-
} catch (o) {
|
|
182
|
-
C.__e(o, i.__v);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
function en(e) {
|
|
187
|
-
return typeof e != "object" || e == null || e.__b > 0 ? e : Ve(e) ? e.map(en) : e.constructor !== void 0 ? null : ne({}, e);
|
|
188
|
-
}
|
|
189
|
-
function Rn(e, t, n, r, i, o, l, c, h) {
|
|
190
|
-
var p, _, x, s, b, u, j, g = n.props || $e, S = t.props, f = t.type;
|
|
191
|
-
if (f == "svg" ? i = "http://www.w3.org/2000/svg" : f == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
192
|
-
for (p = 0; p < o.length; p++) if ((b = o[p]) && "setAttribute" in b == !!f && (f ? b.localName == f : b.nodeType == 3)) {
|
|
193
|
-
e = b, o[p] = null;
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (e == null) {
|
|
198
|
-
if (f == null) return document.createTextNode(S);
|
|
199
|
-
e = document.createElementNS(i, f, S.is && S), c && (C.__m && C.__m(t, o), c = !1), o = null;
|
|
200
|
-
}
|
|
201
|
-
if (f == null) g === S || c && e.data == S || (e.data = S);
|
|
202
|
-
else {
|
|
203
|
-
if (o = f == "textarea" && S.defaultValue != null ? null : o && Ue.call(e.childNodes), !c && o != null) for (g = {}, p = 0; p < e.attributes.length; p++) g[(b = e.attributes[p]).name] = b.value;
|
|
204
|
-
for (p in g) b = g[p], p == "dangerouslySetInnerHTML" ? x = b : p == "children" || p in S || p == "value" && "defaultValue" in S || p == "checked" && "defaultChecked" in S || Fe(e, p, null, b, i);
|
|
205
|
-
for (p in S) b = S[p], p == "children" ? s = b : p == "dangerouslySetInnerHTML" ? _ = b : p == "value" ? u = b : p == "checked" ? j = b : c && typeof b != "function" || g[p] === b || Fe(e, p, b, g[p], i);
|
|
206
|
-
if (_) c || x && (_.__html == x.__html || _.__html == e.innerHTML) || (e.innerHTML = _.__html), t.__k = [];
|
|
207
|
-
else if (x && (e.innerHTML = ""), Zt(t.type == "template" ? e.content : e, Ve(s) ? s : [s], t, n, r, f == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, l, o ? o[0] : n.__k && ce(n, 0), c, h), o != null) for (p = o.length; p--; ) _t(o[p]);
|
|
208
|
-
c && f != "textarea" || (p = "value", f == "progress" && u == null ? e.removeAttribute("value") : u != null && (u !== e[p] || f == "progress" && !u || f == "option" && u != g[p]) && Fe(e, p, u, g[p], i), p = "checked", j != null && j != e[p] && Fe(e, p, j, g[p], i));
|
|
209
|
-
}
|
|
210
|
-
return e;
|
|
211
|
-
}
|
|
212
|
-
function gt(e, t, n) {
|
|
213
|
-
try {
|
|
214
|
-
if (typeof e == "function") {
|
|
215
|
-
var r = typeof e.__u == "function";
|
|
216
|
-
r && e.__u(), r && t == null || (e.__u = e(t));
|
|
217
|
-
} else e.current = t;
|
|
218
|
-
} catch (i) {
|
|
219
|
-
C.__e(i, n);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function tn(e, t, n) {
|
|
223
|
-
var r, i;
|
|
224
|
-
if (C.unmount && C.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || gt(r, null, t)), (r = e.__c) != null) {
|
|
225
|
-
if (r.componentWillUnmount) try {
|
|
226
|
-
r.componentWillUnmount();
|
|
227
|
-
} catch (o) {
|
|
228
|
-
C.__e(o, t);
|
|
229
|
-
}
|
|
230
|
-
r.base = r.__P = r.__n = null;
|
|
231
|
-
}
|
|
232
|
-
if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && tn(r[i], t, n || typeof e.type != "function");
|
|
233
|
-
n || _t(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
234
|
-
}
|
|
235
|
-
function En(e, t, n) {
|
|
236
|
-
return this.constructor(e, n);
|
|
237
|
-
}
|
|
238
|
-
function ze(e, t, n) {
|
|
239
|
-
var r, i, o, l;
|
|
240
|
-
t == document && (t = document.documentElement), C.__ && C.__(e, t), i = (r = !1) ? null : t.__k, o = [], l = [], ft(t, e = t.__k = Bn(pe, null, [e]), i || $e, $e, t.namespaceURI, i ? null : t.firstChild ? Ue.call(t.childNodes) : null, o, i ? i.__e : t.firstChild, r, l), Qt(o, e, l), e.props.children = null;
|
|
241
|
-
}
|
|
242
|
-
Ue = He.slice, C = { __e: function(e, t, n, r) {
|
|
243
|
-
for (var i, o, l; t = t.__; ) if ((i = t.__c) && !i.__) try {
|
|
244
|
-
if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(e)), l = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), l = i.__d), l) return i.__E = i;
|
|
245
|
-
} catch (c) {
|
|
246
|
-
e = c;
|
|
247
|
-
}
|
|
248
|
-
throw e;
|
|
249
|
-
} }, Ut = 0, Oe.prototype.setState = function(e, t) {
|
|
250
|
-
var n;
|
|
251
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = ne({}, this.state), typeof e == "function" && (e = e(ne({}, n), this.props)), e && ne(n, e), e != null && this.__v && (t && this._sb.push(t), Tt(this));
|
|
252
|
-
}, Oe.prototype.forceUpdate = function(e) {
|
|
253
|
-
this.__v && (this.__e = !0, e && this.__h.push(e), Tt(this));
|
|
254
|
-
}, Oe.prototype.render = pe, ie = [], Vt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Kt = function(e, t) {
|
|
255
|
-
return e.__v.__b - t.__v.__b;
|
|
256
|
-
}, We.__r = 0, nt = Math.random().toString(8), Re = "__d" + nt, Ae = "__a" + nt, Yt = /(PointerCapture)$|Capture$/i, ut = 0, ot = Lt(!1), it = Lt(!0);
|
|
257
|
-
var On = 0;
|
|
258
|
-
function a(e, t, n, r, i, o) {
|
|
259
|
-
t || (t = {});
|
|
260
|
-
var l, c, h = t;
|
|
261
|
-
if ("ref" in h) for (c in h = {}, t) c == "ref" ? l = t[c] : h[c] = t[c];
|
|
262
|
-
var p = { type: e, props: h, key: n, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --On, __i: -1, __u: 0, __source: i, __self: o };
|
|
263
|
-
if (typeof e == "function" && (l = e.defaultProps)) for (c in l) h[c] === void 0 && (h[c] = l[c]);
|
|
264
|
-
return C.vnode && C.vnode(p), p;
|
|
265
|
-
}
|
|
266
|
-
var Te, M, at, Nt, Me = 0, nn = [], N = C, jt = N.__b, Bt = N.__r, Dt = N.diffed, Pt = N.__c, Ft = N.unmount, Rt = N.__;
|
|
267
|
-
function vt(e, t) {
|
|
268
|
-
N.__h && N.__h(M, e, Me || t), Me = 0;
|
|
269
|
-
var n = M.__H || (M.__H = { __: [], __h: [] });
|
|
270
|
-
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
271
|
-
}
|
|
272
|
-
function y(e) {
|
|
273
|
-
return Me = 1, In(rn, e);
|
|
274
|
-
}
|
|
275
|
-
function In(e, t, n) {
|
|
276
|
-
var r = vt(Te++, 2);
|
|
277
|
-
if (r.t = e, !r.__c && (r.__ = [rn(void 0, t), function(c) {
|
|
278
|
-
var h = r.__N ? r.__N[0] : r.__[0], p = r.t(h, c);
|
|
279
|
-
h !== p && (r.__N = [p, r.__[1]], r.__c.setState({}));
|
|
280
|
-
}], r.__c = M, !M.__f)) {
|
|
281
|
-
var i = function(c, h, p) {
|
|
282
|
-
if (!r.__c.__H) return !0;
|
|
283
|
-
var _ = !1, x = r.__c.props !== c;
|
|
284
|
-
if (r.__c.__H.__.some(function(b) {
|
|
285
|
-
if (b.__N) {
|
|
286
|
-
_ = !0;
|
|
287
|
-
var u = b.__[0];
|
|
288
|
-
b.__ = b.__N, b.__N = void 0, u !== b.__[0] && (x = !0);
|
|
289
|
-
}
|
|
290
|
-
}), o) {
|
|
291
|
-
var s = o.call(this, c, h, p);
|
|
292
|
-
return _ ? s || x : s;
|
|
293
|
-
}
|
|
294
|
-
return !_ || x;
|
|
295
|
-
};
|
|
296
|
-
M.__f = !0;
|
|
297
|
-
var o = M.shouldComponentUpdate, l = M.componentWillUpdate;
|
|
298
|
-
M.componentWillUpdate = function(c, h, p) {
|
|
299
|
-
if (this.__e) {
|
|
300
|
-
var _ = o;
|
|
301
|
-
o = void 0, i(c, h, p), o = _;
|
|
302
|
-
}
|
|
303
|
-
l && l.call(this, c, h, p);
|
|
304
|
-
}, M.shouldComponentUpdate = i;
|
|
305
|
-
}
|
|
306
|
-
return r.__N || r.__;
|
|
307
|
-
}
|
|
308
|
-
function K(e, t) {
|
|
309
|
-
var n = vt(Te++, 3);
|
|
310
|
-
!N.__s && an(n.__H, t) && (n.__ = e, n.u = t, M.__H.__h.push(n));
|
|
311
|
-
}
|
|
312
|
-
function qe(e) {
|
|
313
|
-
return Me = 5, de(function() {
|
|
314
|
-
return { current: e };
|
|
315
|
-
}, []);
|
|
316
|
-
}
|
|
317
|
-
function de(e, t) {
|
|
318
|
-
var n = vt(Te++, 7);
|
|
319
|
-
return an(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
320
|
-
}
|
|
321
|
-
function $n(e, t) {
|
|
322
|
-
return Me = 8, de(function() {
|
|
323
|
-
return e;
|
|
324
|
-
}, t);
|
|
325
|
-
}
|
|
326
|
-
function Hn() {
|
|
327
|
-
for (var e; e = nn.shift(); ) {
|
|
328
|
-
var t = e.__H;
|
|
329
|
-
if (e.__P && t) try {
|
|
330
|
-
t.__h.some(Ie), t.__h.some(st), t.__h = [];
|
|
331
|
-
} catch (n) {
|
|
332
|
-
t.__h = [], N.__e(n, e.__v);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
N.__b = function(e) {
|
|
337
|
-
M = null, jt && jt(e);
|
|
338
|
-
}, N.__ = function(e, t) {
|
|
339
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Rt && Rt(e, t);
|
|
340
|
-
}, N.__r = function(e) {
|
|
341
|
-
Bt && Bt(e), Te = 0;
|
|
342
|
-
var t = (M = e.__c).__H;
|
|
343
|
-
t && (at === M ? (t.__h = [], M.__h = [], t.__.some(function(n) {
|
|
344
|
-
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
345
|
-
})) : (t.__h.some(Ie), t.__h.some(st), t.__h = [], Te = 0)), at = M;
|
|
346
|
-
}, N.diffed = function(e) {
|
|
347
|
-
Dt && Dt(e);
|
|
348
|
-
var t = e.__c;
|
|
349
|
-
t && t.__H && (t.__H.__h.length && (nn.push(t) !== 1 && Nt === N.requestAnimationFrame || ((Nt = N.requestAnimationFrame) || Wn)(Hn)), t.__H.__.some(function(n) {
|
|
350
|
-
n.u && (n.__H = n.u, n.u = void 0);
|
|
351
|
-
})), at = M = null;
|
|
352
|
-
}, N.__c = function(e, t) {
|
|
353
|
-
t.some(function(n) {
|
|
354
|
-
try {
|
|
355
|
-
n.__h.some(Ie), n.__h = n.__h.filter(function(r) {
|
|
356
|
-
return !r.__ || st(r);
|
|
357
|
-
});
|
|
358
|
-
} catch (r) {
|
|
359
|
-
t.some(function(i) {
|
|
360
|
-
i.__h && (i.__h = []);
|
|
361
|
-
}), t = [], N.__e(r, n.__v);
|
|
362
|
-
}
|
|
363
|
-
}), Pt && Pt(e, t);
|
|
364
|
-
}, N.unmount = function(e) {
|
|
365
|
-
Ft && Ft(e);
|
|
366
|
-
var t, n = e.__c;
|
|
367
|
-
n && n.__H && (n.__H.__.some(function(r) {
|
|
368
|
-
try {
|
|
369
|
-
Ie(r);
|
|
370
|
-
} catch (i) {
|
|
371
|
-
t = i;
|
|
372
|
-
}
|
|
373
|
-
}), n.__H = void 0, t && N.__e(t, n.__v));
|
|
374
|
-
};
|
|
375
|
-
var Et = typeof requestAnimationFrame == "function";
|
|
376
|
-
function Wn(e) {
|
|
377
|
-
var t, n = function() {
|
|
378
|
-
clearTimeout(r), Et && cancelAnimationFrame(t), setTimeout(e);
|
|
379
|
-
}, r = setTimeout(n, 35);
|
|
380
|
-
Et && (t = requestAnimationFrame(n));
|
|
381
|
-
}
|
|
382
|
-
function Ie(e) {
|
|
383
|
-
var t = M, n = e.__c;
|
|
384
|
-
typeof n == "function" && (e.__c = void 0, n()), M = t;
|
|
385
|
-
}
|
|
386
|
-
function st(e) {
|
|
387
|
-
var t = M;
|
|
388
|
-
e.__c = e.__(), M = t;
|
|
389
|
-
}
|
|
390
|
-
function an(e, t) {
|
|
391
|
-
return !e || e.length !== t.length || t.some(function(n, r) {
|
|
392
|
-
return n !== e[r];
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
function rn(e, t) {
|
|
396
|
-
return typeof t == "function" ? t(e) : t;
|
|
397
|
-
}
|
|
398
|
-
const qn = ["en", "nl", "de"], Ot = {
|
|
399
|
-
"board.title": { en: "Feedback", nl: "Feedback", de: "Feedback" },
|
|
400
|
-
"board.open": { en: "Feedback", nl: "Feedback", de: "Feedback" },
|
|
401
|
-
"board.close": { en: "Close", nl: "Sluiten", de: "Schließen" },
|
|
402
|
-
"board.back": { en: "Back", nl: "Terug", de: "Zurück" },
|
|
403
|
-
"board.top": { en: "Top", nl: "Top", de: "Top" },
|
|
404
|
-
"board.new": { en: "New", nl: "Nieuw", de: "Neu" },
|
|
405
|
-
"board.order": { en: "Order", nl: "Volgorde", de: "Reihenfolge" },
|
|
406
|
-
"board.all": { en: "All", nl: "Alles", de: "Alles" },
|
|
407
|
-
"board.bugs": { en: "Bugs", nl: "Bugs", de: "Bugs" },
|
|
408
|
-
"board.ideas": { en: "Ideas", nl: "Ideeën", de: "Ideen" },
|
|
409
|
-
"board.reviews": { en: "Reviews", nl: "Reviews", de: "Bewertungen" },
|
|
410
|
-
"board.kindBug": { en: "Bug", nl: "Bug", de: "Bug" },
|
|
411
|
-
"board.kindIdea": { en: "Idea", nl: "Idee", de: "Idee" },
|
|
412
|
-
"board.kindReview": { en: "Review", nl: "Review", de: "Bewertung" },
|
|
413
|
-
"board.statusOpen": { en: "Open", nl: "Open", de: "Offen" },
|
|
414
|
-
"board.statusPlanned": { en: "Planned", nl: "Gepland", de: "Geplant" },
|
|
415
|
-
"board.statusDone": { en: "Done", nl: "Klaar", de: "Fertig" },
|
|
416
|
-
"board.statusDeclined": { en: "Not doing", nl: "Doen we niet", de: "Machen wir nicht" },
|
|
417
|
-
"board.anon": { en: "Anonymous", nl: "Anoniem", de: "Anonym" },
|
|
418
|
-
"board.byYou": { en: "You", nl: "Jij", de: "Du" },
|
|
419
|
-
// Named rather than "the owner": a board that answers in the third person
|
|
420
|
-
// reads like a support desk.
|
|
421
|
-
"board.reply": { en: "{app} says", nl: "{app} zegt", de: "{app} sagt" },
|
|
422
|
-
"board.upvote": { en: "I want this too", nl: "Dit wil ik ook", de: "Will ich auch" },
|
|
423
|
-
// On a review there is nothing to want: you agree with it, or it helped.
|
|
424
|
-
"board.helpful": { en: "Helpful", nl: "Nuttig", de: "Hilfreich" },
|
|
425
|
-
"board.stars": { en: "{n} of 5 stars", nl: "{n} van 5 sterren", de: "{n} von 5 Sternen" },
|
|
426
|
-
"board.ratingOne": { en: "1 review", nl: "1 review", de: "1 Bewertung" },
|
|
427
|
-
"board.ratingMany": { en: "{n} reviews", nl: "{n} reviews", de: "{n} Bewertungen" },
|
|
428
|
-
"board.emptyTitle": {
|
|
429
|
-
en: "Nothing here yet. Tell us what is broken or what you miss.",
|
|
430
|
-
nl: "Hier staat nog niets. Vertel wat er stuk is of wat je mist.",
|
|
431
|
-
de: "Hier steht noch nichts. Sag uns, was kaputt ist oder was dir fehlt."
|
|
432
|
-
},
|
|
433
|
-
// A read-only board has no way to write, so it does not ask.
|
|
434
|
-
"board.emptyRead": {
|
|
435
|
-
en: "Nothing here yet.",
|
|
436
|
-
nl: "Hier staat nog niets.",
|
|
437
|
-
de: "Hier steht noch nichts."
|
|
438
|
-
},
|
|
439
|
-
"board.votes": { en: "{n} votes", nl: "{n} stemmen", de: "{n} Stimmen" },
|
|
440
|
-
"board.emptyFiltered": {
|
|
441
|
-
en: "Nothing of that kind yet.",
|
|
442
|
-
nl: "Nog niets van deze soort.",
|
|
443
|
-
de: "Von dieser Sorte noch nichts."
|
|
444
|
-
},
|
|
445
|
-
"board.write": { en: "Write feedback", nl: "Feedback schrijven", de: "Feedback schreiben" },
|
|
446
|
-
"board.loadFailed": {
|
|
447
|
-
en: "Could not reach the board.",
|
|
448
|
-
nl: "Kon het bord niet bereiken.",
|
|
449
|
-
de: "Das Board war nicht erreichbar."
|
|
450
|
-
},
|
|
451
|
-
"board.retry": { en: "Try again", nl: "Opnieuw", de: "Nochmal" },
|
|
452
|
-
"board.page": { en: "Page {n}", nl: "Pagina {n}", de: "Seite {n}" },
|
|
453
|
-
"board.signIn": {
|
|
454
|
-
en: "Sign in with your wallet",
|
|
455
|
-
nl: "Inloggen met je wallet",
|
|
456
|
-
de: "Mit deiner Wallet anmelden"
|
|
457
|
-
},
|
|
458
|
-
// Reading works anywhere; writing needs a wallet. Said when somebody tries,
|
|
459
|
-
// not up front, so a reader is never told off for reading.
|
|
460
|
-
"board.needWallet": {
|
|
461
|
-
en: "Open {app} in Nimiq Pay to post and vote.",
|
|
462
|
-
nl: "Open {app} in Nimiq Pay om te posten en te stemmen.",
|
|
463
|
-
de: "Öffne {app} in Nimiq Pay, um zu posten und abzustimmen."
|
|
464
|
-
},
|
|
465
|
-
// ---- Choosing what to write ----
|
|
466
|
-
"board.chooseTitle": {
|
|
467
|
-
en: "What do you want to share?",
|
|
468
|
-
nl: "Wat wil je delen?",
|
|
469
|
-
de: "Was möchtest du teilen?"
|
|
470
|
-
},
|
|
471
|
-
"board.tileBug": { en: "Report a bug", nl: "Bug melden", de: "Fehler melden" },
|
|
472
|
-
"board.tileBugNote": { en: "Something does not work", nl: "Iets werkt niet", de: "Etwas funktioniert nicht" },
|
|
473
|
-
"board.tileIdea": { en: "Share an idea", nl: "Idee delen", de: "Idee teilen" },
|
|
474
|
-
"board.tileIdeaNote": { en: "Something you miss", nl: "Iets wat je mist", de: "Etwas, das dir fehlt" },
|
|
475
|
-
"board.tileReview": { en: "Write a review", nl: "Review schrijven", de: "Bewertung schreiben" },
|
|
476
|
-
"board.tileReviewNote": {
|
|
477
|
-
en: "What you think of {app}",
|
|
478
|
-
nl: "Wat je van {app} vindt",
|
|
479
|
-
de: "Was du von {app} hältst"
|
|
480
|
-
},
|
|
481
|
-
"board.seeBoard": { en: "See the board", nl: "Bekijk het bord", de: "Zum Board" },
|
|
482
|
-
"board.tileReviewDone": {
|
|
483
|
-
en: "You reviewed {app} already",
|
|
484
|
-
nl: "Je hebt {app} al beoordeeld",
|
|
485
|
-
de: "Du hast {app} schon bewertet"
|
|
486
|
-
},
|
|
487
|
-
// ---- Writing one ----
|
|
488
|
-
"board.composeTitle": { en: "Your feedback", nl: "Jouw feedback", de: "Dein Feedback" },
|
|
489
|
-
"board.whatKind": { en: "What is it?", nl: "Wat is het?", de: "Was ist es?" },
|
|
490
|
-
"board.placeholder": {
|
|
491
|
-
en: "What is broken, or what do you miss?",
|
|
492
|
-
nl: "Wat is er stuk, of wat mis je?",
|
|
493
|
-
de: "Was ist kaputt, oder was fehlt dir?"
|
|
494
|
-
},
|
|
495
|
-
"board.placeholderReview": {
|
|
496
|
-
en: "What do you like or dislike about {app}?",
|
|
497
|
-
nl: "Wat vind je goed of minder goed aan {app}?",
|
|
498
|
-
de: "Was gefällt dir an {app}, was nicht?"
|
|
499
|
-
},
|
|
500
|
-
"board.yourRating": { en: "Your rating", nl: "Jouw beoordeling", de: "Deine Bewertung" },
|
|
501
|
-
"board.public": {
|
|
502
|
-
en: "Everybody using {app} can read this.",
|
|
503
|
-
nl: "Iedereen die {app} gebruikt kan dit lezen.",
|
|
504
|
-
de: "Jeder, der {app} nutzt, kann das lesen."
|
|
505
|
-
},
|
|
506
|
-
"board.showName": { en: "Show my name", nl: "Mijn naam tonen", de: "Meinen Namen zeigen" },
|
|
507
|
-
"board.namePlaceholder": { en: "Your name", nl: "Je naam", de: "Dein Name" },
|
|
508
|
-
// The honest version. Anonymous means the name is not shown, never that the
|
|
509
|
-
// wallet is not known: the daily limit and one vote per wallet both have to
|
|
510
|
-
// ask who.
|
|
511
|
-
"board.anonNote": {
|
|
512
|
-
en: "Nobody on the board sees who wrote it, and your wallet address is never shown. The server does know your wallet: votes and the daily limit are counted per wallet.",
|
|
513
|
-
nl: "Niemand op het bord ziet wie het schreef, en je wallet-adres wordt nooit getoond. De server kent je wallet wel: stemmen en de daglimiet tellen per wallet.",
|
|
514
|
-
de: "Niemand auf dem Board sieht, wer es geschrieben hat, und deine Wallet-Adresse wird nie gezeigt. Der Server kennt deine Wallet schon: Stimmen und das Tageslimit zählen pro Wallet."
|
|
515
|
-
},
|
|
516
|
-
// ---- A screenshot ----
|
|
517
|
-
"board.shotAdd": { en: "Add a screenshot", nl: "Screenshot toevoegen", de: "Screenshot hinzufügen" },
|
|
518
|
-
"board.shotRemove": { en: "Remove screenshot", nl: "Screenshot weghalen", de: "Screenshot entfernen" },
|
|
519
|
-
// Said before somebody picks one, because a screenshot of a wallet app is
|
|
520
|
-
// the easiest way to give away a balance without noticing. On a board that
|
|
521
|
-
// shows screenshots, and the one for `screenshots="owners"`. The address
|
|
522
|
-
// line is there because posting anonymously is undone by a picture of it.
|
|
523
|
-
"board.shotNoteBoard": {
|
|
524
|
-
en: "Everyone who views the board sees it. Check it shows nothing private, like a balance, an address or a name. An address on it shows it was you, even if you post anonymously.",
|
|
525
|
-
nl: "Iedereen die het bord bekijkt ziet hem. Kijk of er niets privés op staat, zoals een saldo, een adres of een naam. Een adres erop laat zien dat jij het was, ook als je anoniem post.",
|
|
526
|
-
de: "Jeder, der das Board ansieht, sieht ihn. Prüf, dass nichts Privates drauf ist, etwa ein Kontostand, eine Adresse oder ein Name. Eine Adresse darauf zeigt, dass du es warst, auch wenn du anonym postest."
|
|
527
|
-
},
|
|
528
|
-
// Ticked under the picture itself, so the yes is about this one.
|
|
529
|
-
"board.shotAgree": {
|
|
530
|
-
en: "I checked it: everyone may see this screenshot.",
|
|
531
|
-
nl: "Ik heb gekeken: iedereen mag deze screenshot zien.",
|
|
532
|
-
de: "Ich hab nachgesehen: Jeder darf diesen Screenshot sehen."
|
|
533
|
-
},
|
|
534
|
-
"board.shotNote": {
|
|
535
|
-
en: "Only {app} sees it, not the board. Check it shows nothing private, like a balance or an address.",
|
|
536
|
-
nl: "Alleen {app} ziet hem, het bord niet. Kijk of er niets privés op staat, zoals een saldo of adres.",
|
|
537
|
-
de: "Nur {app} sieht ihn, nicht das Board. Prüf, dass nichts Privates drauf ist, etwa ein Kontostand oder eine Adresse."
|
|
538
|
-
},
|
|
539
|
-
"board.shotFailed": {
|
|
540
|
-
en: "That image could not be read. Try another one.",
|
|
541
|
-
nl: "Die afbeelding kon niet gelezen worden. Probeer een andere.",
|
|
542
|
-
de: "Das Bild ließ sich nicht lesen. Versuch ein anderes."
|
|
543
|
-
},
|
|
544
|
-
"board.shot": { en: "Screenshot", nl: "Screenshot", de: "Screenshot" },
|
|
545
|
-
"board.shotOpen": { en: "Open the screenshot", nl: "Screenshot openen", de: "Screenshot öffnen" },
|
|
546
|
-
// In the owner's sheet: who sees it now, before what happens to it.
|
|
547
|
-
"board.shotForBoard": {
|
|
548
|
-
en: "On the board for everyone.",
|
|
549
|
-
nl: "Voor iedereen op het bord.",
|
|
550
|
-
de: "Für alle auf dem Board."
|
|
551
|
-
},
|
|
552
|
-
"board.shotForOff": {
|
|
553
|
-
en: "Off the board: only you see it.",
|
|
554
|
-
nl: "Van het bord: alleen jij ziet hem.",
|
|
555
|
-
de: "Vom Board genommen: Nur du siehst ihn."
|
|
556
|
-
},
|
|
557
|
-
"board.shotForOwners": {
|
|
558
|
-
en: "Only you see it: it was sent for your eyes only.",
|
|
559
|
-
nl: "Alleen jij ziet hem: hij is alleen voor jou gestuurd.",
|
|
560
|
-
de: "Nur du siehst ihn: Er wurde nur für dich geschickt."
|
|
561
|
-
},
|
|
562
|
-
"board.shotOff": {
|
|
563
|
-
en: "Take the screenshot off the board",
|
|
564
|
-
nl: "Screenshot van het bord halen",
|
|
565
|
-
de: "Screenshot vom Board nehmen"
|
|
566
|
-
},
|
|
567
|
-
"board.shotOn": {
|
|
568
|
-
en: "Put the screenshot back",
|
|
569
|
-
nl: "Screenshot terugzetten",
|
|
570
|
-
de: "Screenshot zurückstellen"
|
|
571
|
-
},
|
|
572
|
-
"board.shotGoes": {
|
|
573
|
-
en: "Deleted by itself when you mark this Done or Not doing.",
|
|
574
|
-
nl: "Wordt vanzelf verwijderd als je dit op Klaar of Doen we niet zet.",
|
|
575
|
-
de: "Wird von selbst gelöscht, wenn du es auf Fertig oder Machen wir nicht setzt."
|
|
576
|
-
},
|
|
577
|
-
"board.shotGone": {
|
|
578
|
-
en: "The screenshot could not be loaded.",
|
|
579
|
-
nl: "De screenshot kon niet geladen worden.",
|
|
580
|
-
de: "Der Screenshot ließ sich nicht laden."
|
|
581
|
-
},
|
|
582
|
-
"board.send": { en: "Put it on the board", nl: "Op het bord zetten", de: "Aufs Board setzen" },
|
|
583
|
-
"board.left": {
|
|
584
|
-
en: "{n} of {max} left today",
|
|
585
|
-
nl: "Nog {n} van {max} vandaag",
|
|
586
|
-
de: "Noch {n} von {max} heute"
|
|
587
|
-
},
|
|
588
|
-
"board.noneLeft": {
|
|
589
|
-
en: "That is today’s {max}. Back tomorrow.",
|
|
590
|
-
nl: "Dat waren de {max} van vandaag. Morgen weer.",
|
|
591
|
-
de: "Das waren die {max} für heute. Morgen wieder."
|
|
592
|
-
},
|
|
593
|
-
"board.likeThis": {
|
|
594
|
-
en: "Said already, maybe?",
|
|
595
|
-
nl: "Misschien al gezegd?",
|
|
596
|
-
de: "Vielleicht schon gesagt?"
|
|
597
|
-
},
|
|
598
|
-
"board.likeThisNote": {
|
|
599
|
-
en: "Back one of these instead and it counts for more.",
|
|
600
|
-
nl: "Steun er liever een van deze, dan telt het zwaarder.",
|
|
601
|
-
de: "Unterstütz lieber eins davon, dann zählt es mehr."
|
|
602
|
-
},
|
|
603
|
-
// Two ways a post can be refused, because the answer to one is "go again"
|
|
604
|
-
// and the answer to the other is "come back tomorrow".
|
|
605
|
-
"board.failed": {
|
|
606
|
-
en: "That did not go through. Try again.",
|
|
607
|
-
nl: "Dat ging niet door. Probeer het opnieuw.",
|
|
608
|
-
de: "Das ist nicht durchgegangen. Versuch es noch mal."
|
|
609
|
-
},
|
|
610
|
-
"board.failedFull": {
|
|
611
|
-
en: "Not posted: that was today’s {max}. Back tomorrow.",
|
|
612
|
-
nl: "Niet geplaatst: dat waren de {max} van vandaag. Morgen weer.",
|
|
613
|
-
de: "Nicht gepostet: das waren die {max} für heute. Morgen wieder."
|
|
614
|
-
},
|
|
615
|
-
"board.reviewed": {
|
|
616
|
-
en: "You reviewed {app} already. Throw yours away to write a new one.",
|
|
617
|
-
nl: "Je hebt {app} al beoordeeld. Gooi de jouwe weg om een nieuwe te schrijven.",
|
|
618
|
-
de: "Du hast {app} schon bewertet. Wirf deine weg, um eine neue zu schreiben."
|
|
619
|
-
},
|
|
620
|
-
"board.sent": { en: "Feedback sent!", nl: "Feedback verstuurd!", de: "Feedback gesendet!" },
|
|
621
|
-
"board.sentNote": {
|
|
622
|
-
en: "Thank you. It is on the board now.",
|
|
623
|
-
nl: "Bedankt. Het staat nu op het bord.",
|
|
624
|
-
de: "Danke. Es steht jetzt auf dem Board."
|
|
625
|
-
},
|
|
626
|
-
// On a board that approves posts first: it did arrive, it is just not up yet.
|
|
627
|
-
"board.sentWaiting": {
|
|
628
|
-
en: "Thank you. It shows on the board once {app} approved it.",
|
|
629
|
-
nl: "Bedankt. Het komt op het bord zodra {app} het heeft goedgekeurd.",
|
|
630
|
-
de: "Danke. Es erscheint auf dem Board, sobald {app} es freigegeben hat."
|
|
631
|
-
},
|
|
632
|
-
"board.waiting": { en: "Waiting for approval", nl: "Wacht op goedkeuring", de: "Wartet auf Freigabe" },
|
|
633
|
-
"board.sentBack": { en: "Back to the board", nl: "Terug naar het bord", de: "Zurück zum Board" },
|
|
634
|
-
// ---- Throwing your own away ----
|
|
635
|
-
"board.delete": { en: "Throw away", nl: "Weggooien", de: "Wegwerfen" },
|
|
636
|
-
"board.deleteTitle": { en: "Throw this away?", nl: "Deze weggooien?", de: "Das hier wegwerfen?" },
|
|
637
|
-
"board.deleteNote": {
|
|
638
|
-
en: "It leaves the board for everybody, with its votes.",
|
|
639
|
-
nl: "Hij gaat voor iedereen van het bord, met stemmen en al.",
|
|
640
|
-
de: "Es verschwindet für alle vom Board, samt Stimmen."
|
|
641
|
-
},
|
|
642
|
-
"board.cancel": { en: "Cancel", nl: "Annuleren", de: "Abbrechen" },
|
|
643
|
-
// ---- Answering one (owners only) ----
|
|
644
|
-
"board.manage": { en: "Answer this", nl: "Hier antwoord op geven", de: "Darauf antworten" },
|
|
645
|
-
"board.setStatus": { en: "Where it stands", nl: "Waar het staat", de: "Wo es steht" },
|
|
646
|
-
"board.replyLabel": { en: "Your answer", nl: "Jouw antwoord", de: "Deine Antwort" },
|
|
647
|
-
"board.replyPlaceholder": { en: "Say something back", nl: "Zeg er iets over", de: "Sag was dazu" },
|
|
648
|
-
"board.hide": { en: "Take off the board", nl: "Van het bord halen", de: "Vom Board nehmen" },
|
|
649
|
-
"board.unhide": { en: "Put it back", nl: "Terugzetten", de: "Zurückstellen" },
|
|
650
|
-
"board.hidden": { en: "Off the board", nl: "Van het bord", de: "Vom Board" },
|
|
651
|
-
"board.approve": { en: "Approve: put it on the board", nl: "Goedkeuren: op het bord zetten", de: "Freigeben: aufs Board stellen" },
|
|
652
|
-
"board.unapprove": { en: "Keep it waiting", nl: "Laten wachten", de: "Warten lassen" },
|
|
653
|
-
"board.save": { en: "Save", nl: "Opslaan", de: "Speichern" },
|
|
654
|
-
"board.context": { en: "Sent with", nl: "Meegestuurd", de: "Mitgeschickt" },
|
|
655
|
-
// ---- When ----
|
|
656
|
-
"time.now": { en: "just now", nl: "zojuist", de: "gerade eben" },
|
|
657
|
-
"time.min": { en: "{n}m ago", nl: "{n}m geleden", de: "vor {n} Min." },
|
|
658
|
-
"time.hour": { en: "{n}h ago", nl: "{n}u geleden", de: "vor {n} Std." },
|
|
659
|
-
"time.day": { en: "{n}d ago", nl: "{n}d geleden", de: "vor {n} Tg." }
|
|
660
|
-
};
|
|
661
|
-
function Un(e) {
|
|
662
|
-
const t = [
|
|
663
|
-
e,
|
|
664
|
-
typeof window < "u" ? window.nimiqPay?.language : void 0,
|
|
665
|
-
typeof document < "u" ? document.documentElement.lang : void 0,
|
|
666
|
-
typeof navigator < "u" ? navigator.language : void 0
|
|
667
|
-
];
|
|
668
|
-
for (const n of t)
|
|
669
|
-
if (n) return n.slice(0, 2).toLowerCase();
|
|
670
|
-
return "en";
|
|
671
|
-
}
|
|
672
|
-
function Vn(e, t = {}) {
|
|
673
|
-
const n = qn.includes(e) ? e : "en";
|
|
674
|
-
return (r, i) => {
|
|
675
|
-
let o = t[r] ?? Ot[r][n] ?? Ot[r].en;
|
|
676
|
-
if (i) for (const [l, c] of Object.entries(i)) o = o.split(`{${l}}`).join(String(c));
|
|
677
|
-
return o;
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
function Kn(e) {
|
|
681
|
-
return {
|
|
682
|
-
project: e.project,
|
|
683
|
-
posts: e.posts.filter((t) => !t.hidden).map(({ who: t, shot: n, shotFor: r, context: i, hidden: o, ...l }) => ({
|
|
684
|
-
...l,
|
|
685
|
-
mine: !1,
|
|
686
|
-
voted: !1
|
|
687
|
-
}))
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
const lt = 6e4, dt = 60 * lt, ct = 24 * dt, Yn = 7 * ct, It = /* @__PURE__ */ new Map();
|
|
691
|
-
function Gn(e, t, n = Date.now()) {
|
|
692
|
-
const r = Math.max(0, n - e);
|
|
693
|
-
if (r >= Yn) {
|
|
694
|
-
let i = It.get(t);
|
|
695
|
-
return i || (i = new Intl.DateTimeFormat(t, { day: "numeric", month: "short" }), It.set(t, i)), { date: i.format(new Date(e)).replace(".", "") };
|
|
696
|
-
}
|
|
697
|
-
return r < lt ? { key: "time.now", vars: { n: "0" } } : r < dt ? { key: "time.min", vars: { n: String(Math.floor(r / lt)) } } : r < ct ? { key: "time.hour", vars: { n: String(Math.floor(r / dt)) } } : { key: "time.day", vars: { n: String(Math.floor(r / ct)) } };
|
|
698
|
-
}
|
|
699
|
-
const se = (e, t, n = !1) => /* @__PURE__ */ a(
|
|
700
|
-
"svg",
|
|
701
|
-
{
|
|
702
|
-
width: e,
|
|
703
|
-
height: e,
|
|
704
|
-
viewBox: "0 0 24 24",
|
|
705
|
-
fill: n ? "currentColor" : "none",
|
|
706
|
-
stroke: n ? "none" : "currentColor",
|
|
707
|
-
"stroke-width": "2.25",
|
|
708
|
-
"stroke-linecap": "round",
|
|
709
|
-
"stroke-linejoin": "round",
|
|
710
|
-
"aria-hidden": "true",
|
|
711
|
-
children: t
|
|
712
|
-
}
|
|
713
|
-
), $t = ({ size: e = 22 }) => se(e, /* @__PURE__ */ a("path", { d: "M15 5l-7 7 7 7" })), Ht = ({ size: e = 22 }) => se(e, /* @__PURE__ */ a("path", { d: "M6 6l12 12M18 6L6 18" })), Zn = ({ size: e = 20 }) => se(e, /* @__PURE__ */ a("path", { d: "M12 5v14M5 12h14" })), on = ({ size: e = 18 }) => se(e, /* @__PURE__ */ a("path", { d: "M4 7h16M9 7V4.5h6V7M6.5 7l1 12.5h9l1-12.5M10 11v5M14 11v5" })), sn = ({ size: e = 14 }) => se(e, /* @__PURE__ */ a("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), Jn = ({ size: e = 24 }) => se(
|
|
714
|
-
e,
|
|
715
|
-
/* @__PURE__ */ a("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" }),
|
|
716
|
-
!0
|
|
717
|
-
), Ke = (e, t, n) => /* @__PURE__ */ a("svg", { width: e, height: e, viewBox: t, fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: n }) }), Xn = ({ size: e = 10 }) => Ke(
|
|
718
|
-
e,
|
|
719
|
-
"32 24 28 28",
|
|
720
|
-
"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"
|
|
721
|
-
), Qn = ({ size: e = 10 }) => Ke(
|
|
722
|
-
e,
|
|
723
|
-
"32 24 27.18 27.18",
|
|
724
|
-
"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"
|
|
725
|
-
), ea = ({ size: e = 10 }) => Ke(
|
|
726
|
-
e,
|
|
727
|
-
"32 24 27.188 27.188",
|
|
728
|
-
"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"
|
|
729
|
-
), pt = ({ size: e = 16, filled: t = !1 }) => se(e, /* @__PURE__ */ a("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), ln = ({ size: e = 20 }) => se(e, /* @__PURE__ */ a("path", { d: "M4 5.5h16v13H4zM4 15.5l4.5-4.5 4 4 2.5-2.5 5 5M15.5 9.5h.01" })), dn = (e, t, n, r) => /* @__PURE__ */ a(
|
|
730
|
-
"svg",
|
|
731
|
-
{
|
|
732
|
-
width: e,
|
|
733
|
-
height: e,
|
|
734
|
-
viewBox: t,
|
|
735
|
-
fill: "none",
|
|
736
|
-
stroke: "currentColor",
|
|
737
|
-
"stroke-width": r,
|
|
738
|
-
"stroke-linecap": "round",
|
|
739
|
-
"stroke-linejoin": "round",
|
|
740
|
-
"aria-hidden": "true",
|
|
741
|
-
children: /* @__PURE__ */ a("path", { d: n })
|
|
742
|
-
}
|
|
743
|
-
), ta = ({ size: e = 10 }) => Ke(
|
|
744
|
-
e,
|
|
745
|
-
"0 0 10 10",
|
|
746
|
-
"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"
|
|
747
|
-
), cn = ({ size: e = 12 }) => dn(e, "-0.2 -1.8 12 12", "M0.803574 4.3749L4.01786 7.58918L10.8036 0.803467", 1.607), na = ({ size: e = 12 }) => dn(e, "-1.7125 -1.7125 12 12", "M0.787506 0.787598L7.78751 7.7876M7.78751 0.787598L0.787506 7.7876", 1.575), ae = {
|
|
748
|
-
bug: {
|
|
749
|
-
icon: (e) => /* @__PURE__ */ a(Xn, { size: e }),
|
|
750
|
-
label: "board.kindBug",
|
|
751
|
-
plural: "board.bugs",
|
|
752
|
-
tile: "board.tileBug",
|
|
753
|
-
note: "board.tileBugNote"
|
|
754
|
-
},
|
|
755
|
-
idea: {
|
|
756
|
-
icon: (e) => /* @__PURE__ */ a(Qn, { size: e }),
|
|
757
|
-
label: "board.kindIdea",
|
|
758
|
-
plural: "board.ideas",
|
|
759
|
-
tile: "board.tileIdea",
|
|
760
|
-
note: "board.tileIdeaNote"
|
|
761
|
-
},
|
|
762
|
-
review: {
|
|
763
|
-
icon: (e) => /* @__PURE__ */ a(ea, { size: e }),
|
|
764
|
-
label: "board.kindReview",
|
|
765
|
-
plural: "board.reviews",
|
|
766
|
-
tile: "board.tileReview",
|
|
767
|
-
note: "board.tileReviewNote"
|
|
768
|
-
}
|
|
769
|
-
};
|
|
770
|
-
function mt({ n: e, t, size: n = 16 }) {
|
|
771
|
-
const r = Math.round(e * 2) / 2;
|
|
772
|
-
return /* @__PURE__ */ a("span", { class: "stars", role: "img", "aria-label": t("board.stars", { n: r }), children: [1, 2, 3, 4, 5].map((i) => {
|
|
773
|
-
const o = Math.max(0, Math.min(1, r - (i - 1)));
|
|
774
|
-
return /* @__PURE__ */ a("span", { class: "stars__one", children: [
|
|
775
|
-
/* @__PURE__ */ a(pt, { size: n, filled: !0 }),
|
|
776
|
-
o > 0 && /* @__PURE__ */ a("span", { class: "stars__fill", style: { width: `${o * 100}%` }, children: /* @__PURE__ */ a(pt, { size: n, filled: !0 }) })
|
|
777
|
-
] }, i);
|
|
778
|
-
}) });
|
|
779
|
-
}
|
|
780
|
-
const aa = {
|
|
781
|
-
planned: { icon: () => /* @__PURE__ */ a(ta, {}), label: "board.statusPlanned" },
|
|
782
|
-
done: { icon: () => /* @__PURE__ */ a(cn, {}), label: "board.statusDone" },
|
|
783
|
-
declined: { icon: () => /* @__PURE__ */ a(na, {}), label: "board.statusDeclined" }
|
|
784
|
-
};
|
|
785
|
-
function Wt({ tone: e, icon: t, label: n }) {
|
|
786
|
-
return /* @__PURE__ */ a("span", { class: "badge", children: [
|
|
787
|
-
/* @__PURE__ */ a("span", { class: `badge__dot badge__dot--${e}`, children: t() }),
|
|
788
|
-
n
|
|
789
|
-
] });
|
|
790
|
-
}
|
|
791
|
-
function pn({
|
|
792
|
-
votes: e,
|
|
793
|
-
voted: t,
|
|
794
|
-
onVote: n,
|
|
795
|
-
t: r,
|
|
796
|
-
label: i = "board.upvote"
|
|
797
|
-
}) {
|
|
798
|
-
return /* @__PURE__ */ a(
|
|
799
|
-
"button",
|
|
800
|
-
{
|
|
801
|
-
type: "button",
|
|
802
|
-
class: "vote",
|
|
803
|
-
"aria-label": r(i),
|
|
804
|
-
"aria-pressed": t,
|
|
805
|
-
onClick: (o) => {
|
|
806
|
-
o.stopPropagation(), n(!t);
|
|
807
|
-
},
|
|
808
|
-
children: [
|
|
809
|
-
/* @__PURE__ */ a(sn, {}),
|
|
810
|
-
/* @__PURE__ */ a("span", { children: e })
|
|
811
|
-
]
|
|
812
|
-
}
|
|
813
|
-
);
|
|
814
|
-
}
|
|
815
|
-
function ra({
|
|
816
|
-
post: e,
|
|
817
|
-
appName: t,
|
|
818
|
-
t: n,
|
|
819
|
-
locale: r,
|
|
820
|
-
onVote: i,
|
|
821
|
-
onDelete: o,
|
|
822
|
-
onManage: l,
|
|
823
|
-
shotUrl: c,
|
|
824
|
-
onShot: h
|
|
825
|
-
}) {
|
|
826
|
-
const [p, _] = y(!1), x = ae[e.kind], s = aa[e.status], b = Gn(e.at, r);
|
|
827
|
-
return /* @__PURE__ */ a(
|
|
828
|
-
"li",
|
|
829
|
-
{
|
|
830
|
-
class: `card${l ? " card--owner" : ""}${e.hidden || e.pending ? " card--hidden" : ""}`,
|
|
831
|
-
onClick: l,
|
|
832
|
-
role: l ? "button" : void 0,
|
|
833
|
-
tabIndex: l ? 0 : void 0,
|
|
834
|
-
"aria-label": l ? n("board.manage") : void 0,
|
|
835
|
-
onKeyDown: l ? (u) => {
|
|
836
|
-
u.target === u.currentTarget && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), l());
|
|
837
|
-
} : void 0,
|
|
838
|
-
children: [
|
|
839
|
-
/* @__PURE__ */ a("div", { class: "card__head", children: [
|
|
840
|
-
/* @__PURE__ */ a(Wt, { tone: e.kind, icon: x.icon, label: n(x.label) }),
|
|
841
|
-
s && /* @__PURE__ */ a(Wt, { tone: e.status, icon: s.icon, label: n(s.label) }),
|
|
842
|
-
e.rating !== void 0 && /* @__PURE__ */ a(mt, { n: e.rating, t: n }),
|
|
843
|
-
e.shot && !c && /* @__PURE__ */ a("span", { class: "card__shot", title: n("board.shot"), "aria-label": n("board.shot"), children: /* @__PURE__ */ a(ln, { size: 16 }) }),
|
|
844
|
-
e.hidden && /* @__PURE__ */ a("span", { class: "card__off", children: n("board.hidden") }),
|
|
845
|
-
e.pending && /* @__PURE__ */ a("span", { class: "card__wait", children: n("board.waiting") }),
|
|
846
|
-
/* @__PURE__ */ a("span", { class: "card__when", children: "date" in b ? b.date : n(b.key, b.vars) })
|
|
847
|
-
] }),
|
|
848
|
-
/* @__PURE__ */ a("p", { class: "card__text", children: e.text }),
|
|
849
|
-
c && !p && /* @__PURE__ */ a(
|
|
850
|
-
"button",
|
|
851
|
-
{
|
|
852
|
-
type: "button",
|
|
853
|
-
class: "card__pic",
|
|
854
|
-
"aria-label": n("board.shotOpen"),
|
|
855
|
-
onClick: (u) => {
|
|
856
|
-
u.stopPropagation(), h?.();
|
|
857
|
-
},
|
|
858
|
-
children: /* @__PURE__ */ a("img", { src: c, alt: n("board.shot"), loading: "lazy", onError: () => _(!0) })
|
|
859
|
-
}
|
|
860
|
-
),
|
|
861
|
-
e.reply && /* @__PURE__ */ a("div", { class: "card__reply", children: [
|
|
862
|
-
/* @__PURE__ */ a("span", { class: "card__reply-who", children: n("board.reply", { app: t }) }),
|
|
863
|
-
/* @__PURE__ */ a("p", { class: "card__reply-text", children: e.reply.text })
|
|
864
|
-
] }),
|
|
865
|
-
/* @__PURE__ */ a("div", { class: "card__foot", children: [
|
|
866
|
-
/* @__PURE__ */ a("span", { class: "card__who", children: e.mine ? n("board.byYou") : e.who ?? n("board.anon") }),
|
|
867
|
-
o && /* @__PURE__ */ a(
|
|
868
|
-
"button",
|
|
869
|
-
{
|
|
870
|
-
type: "button",
|
|
871
|
-
class: "icon-btn card__bin",
|
|
872
|
-
"aria-label": n("board.delete"),
|
|
873
|
-
onClick: (u) => {
|
|
874
|
-
u.stopPropagation(), o();
|
|
875
|
-
},
|
|
876
|
-
children: /* @__PURE__ */ a(on, {})
|
|
877
|
-
}
|
|
878
|
-
),
|
|
879
|
-
i ? /* @__PURE__ */ a(
|
|
880
|
-
pn,
|
|
881
|
-
{
|
|
882
|
-
votes: e.votes,
|
|
883
|
-
voted: e.voted,
|
|
884
|
-
onVote: i,
|
|
885
|
-
t: n,
|
|
886
|
-
label: e.kind === "review" ? "board.helpful" : "board.upvote"
|
|
887
|
-
}
|
|
888
|
-
) : /* @__PURE__ */ a("span", { class: "vote vote--count", role: "img", "aria-label": n("board.votes", { n: e.votes }), children: [
|
|
889
|
-
/* @__PURE__ */ a(sn, {}),
|
|
890
|
-
/* @__PURE__ */ a("span", { children: e.votes })
|
|
891
|
-
] })
|
|
892
|
-
] })
|
|
893
|
-
]
|
|
894
|
-
}
|
|
895
|
-
);
|
|
896
|
-
}
|
|
897
|
-
function oa({
|
|
898
|
-
t: e,
|
|
899
|
-
kinds: t,
|
|
900
|
-
appName: n,
|
|
901
|
-
reviewed: r,
|
|
902
|
-
onPick: i,
|
|
903
|
-
onBoard: o
|
|
904
|
-
}) {
|
|
905
|
-
return /* @__PURE__ */ a("div", { class: "choose", children: [
|
|
906
|
-
/* @__PURE__ */ a("h3", { class: "choose__title", children: e("board.chooseTitle") }),
|
|
907
|
-
/* @__PURE__ */ a("div", { class: `tiles${t.length % 2 ? " tiles--odd" : ""}`, children: t.map((l) => {
|
|
908
|
-
const c = l === "review" && r;
|
|
909
|
-
return /* @__PURE__ */ a("button", { type: "button", class: `tile tile--${l}`, disabled: c, onClick: () => i(l), children: [
|
|
910
|
-
/* @__PURE__ */ a("span", { class: "tile__icon", children: ae[l].icon(28) }),
|
|
911
|
-
/* @__PURE__ */ a("span", { class: "tile__label", children: e(ae[l].tile) }),
|
|
912
|
-
/* @__PURE__ */ a("span", { class: "tile__note", children: c ? e("board.tileReviewDone", { app: n }) : e(ae[l].note, { app: n }) })
|
|
913
|
-
] }, l);
|
|
914
|
-
}) }),
|
|
915
|
-
o && /* @__PURE__ */ a("div", { class: "choose__board", children: /* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: o, children: e("board.seeBoard") }) })
|
|
916
|
-
] });
|
|
917
|
-
}
|
|
918
|
-
function ia({
|
|
919
|
-
t: e,
|
|
920
|
-
onBack: t,
|
|
921
|
-
waiting: n,
|
|
922
|
-
appName: r
|
|
923
|
-
}) {
|
|
924
|
-
return /* @__PURE__ */ a("div", { class: "sent", role: "status", children: [
|
|
925
|
-
/* @__PURE__ */ a("span", { class: "sent__check", children: /* @__PURE__ */ a(cn, { size: 44 }) }),
|
|
926
|
-
/* @__PURE__ */ a("h3", { class: "sent__title", children: e("board.sent") }),
|
|
927
|
-
/* @__PURE__ */ a("p", { class: "sent__note", children: n ? e("board.sentWaiting", { app: r ?? "" }) : e("board.sentNote") }),
|
|
928
|
-
/* @__PURE__ */ a("button", { type: "button", class: "text-btn sent__back", onClick: t, children: e("board.sentBack") })
|
|
929
|
-
] });
|
|
930
|
-
}
|
|
931
|
-
function sa({
|
|
932
|
-
t: e,
|
|
933
|
-
kind: t,
|
|
934
|
-
posts: n,
|
|
935
|
-
likeThis: r,
|
|
936
|
-
left: i,
|
|
937
|
-
perDay: o,
|
|
938
|
-
textMax: l,
|
|
939
|
-
name: c,
|
|
940
|
-
appName: h,
|
|
941
|
-
screenshots: p,
|
|
942
|
-
names: _ = !0,
|
|
943
|
-
onVote: x,
|
|
944
|
-
onSend: s
|
|
945
|
-
}) {
|
|
946
|
-
const b = t === "review", [u, j] = y(""), [g, S] = y(0), [f, A] = y(null), [z, T] = y(!1), F = p === "board", [Y, G] = y(!1), [O, D] = y(!1), [I, re] = y(c), [he, Ne] = y(!1), [X, R] = y(null), U = qe(null), Q = de(() => n.filter((m) => m.kind !== "review"), [n]), be = de(() => b ? [] : r(Q, u), [b, Q, u, r]), je = u.trim(), ue = i !== null && i <= 0, Ye = O && !I.trim(), Ge = !!f && F && !z;
|
|
947
|
-
K(() => () => void (f && URL.revokeObjectURL(f.preview)), [f]);
|
|
948
|
-
const _e = async (m) => {
|
|
949
|
-
if (!m) return;
|
|
950
|
-
G(!0), R(null);
|
|
951
|
-
const Z = await da(m);
|
|
952
|
-
G(!1), Z ? (A(Z), T(!1)) : R({ key: "board.shotFailed" });
|
|
953
|
-
}, ke = async () => {
|
|
954
|
-
Ne(!0), R(null);
|
|
955
|
-
const m = await s({
|
|
956
|
-
kind: t,
|
|
957
|
-
text: je,
|
|
958
|
-
anon: !O,
|
|
959
|
-
name: I.trim(),
|
|
960
|
-
...b ? { rating: g } : {},
|
|
961
|
-
...f ? { shot: { ...f, board: F && z } } : {}
|
|
962
|
-
});
|
|
963
|
-
m && (R(m.key ? { key: m.key, vars: m.vars } : null), Ne(!1));
|
|
964
|
-
};
|
|
965
|
-
return /* @__PURE__ */ a("div", { class: "compose", children: [
|
|
966
|
-
/* @__PURE__ */ a("span", { class: `compose__kind compose__kind--${t}`, children: [
|
|
967
|
-
/* @__PURE__ */ a("span", { class: `badge__dot badge__dot--${t}`, children: ae[t].icon() }),
|
|
968
|
-
e(ae[t].tile)
|
|
969
|
-
] }),
|
|
970
|
-
b && /* @__PURE__ */ a(pe, { children: [
|
|
971
|
-
/* @__PURE__ */ a("span", { class: "label", children: e("board.yourRating") }),
|
|
972
|
-
/* @__PURE__ */ a("div", { class: "rate", role: "radiogroup", "aria-label": e("board.yourRating"), children: [1, 2, 3, 4, 5].map((m) => /* @__PURE__ */ a(
|
|
973
|
-
"button",
|
|
974
|
-
{
|
|
975
|
-
type: "button",
|
|
976
|
-
role: "radio",
|
|
977
|
-
class: `rate__star${m <= g ? " rate__star--on" : ""}`,
|
|
978
|
-
"aria-checked": g === m,
|
|
979
|
-
"aria-label": e("board.stars", { n: m }),
|
|
980
|
-
onClick: () => S(m),
|
|
981
|
-
children: /* @__PURE__ */ a(pt, { size: 36, filled: m <= g })
|
|
982
|
-
},
|
|
983
|
-
m
|
|
984
|
-
)) })
|
|
985
|
-
] }),
|
|
986
|
-
/* @__PURE__ */ a("p", { class: "public", children: e("board.public", { app: h }) }),
|
|
987
|
-
/* @__PURE__ */ a(
|
|
988
|
-
"textarea",
|
|
989
|
-
{
|
|
990
|
-
class: "field",
|
|
991
|
-
value: u,
|
|
992
|
-
maxLength: l,
|
|
993
|
-
placeholder: b ? e("board.placeholderReview", { app: h }) : e("board.placeholder"),
|
|
994
|
-
"aria-label": b ? e("board.placeholderReview", { app: h }) : e("board.placeholder"),
|
|
995
|
-
onInput: (m) => {
|
|
996
|
-
j(m.target.value), R(null);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
),
|
|
1000
|
-
/* @__PURE__ */ a("span", { class: "count", children: l - u.length }),
|
|
1001
|
-
be.length > 0 && /* @__PURE__ */ a("div", { class: "alike", children: [
|
|
1002
|
-
/* @__PURE__ */ a("span", { class: "label", children: e("board.likeThis") }),
|
|
1003
|
-
/* @__PURE__ */ a("p", { class: "alike__note", children: e("board.likeThisNote") }),
|
|
1004
|
-
/* @__PURE__ */ a("ul", { class: "alike__list", children: be.map((m) => /* @__PURE__ */ a("li", { class: "alike__row", children: [
|
|
1005
|
-
/* @__PURE__ */ a("span", { class: `badge__dot badge__dot--${m.kind}`, "aria-label": e(ae[m.kind].label), children: ae[m.kind].icon() }),
|
|
1006
|
-
/* @__PURE__ */ a("span", { class: "alike__text", children: m.text }),
|
|
1007
|
-
/* @__PURE__ */ a(pn, { votes: m.votes, voted: m.voted, onVote: (Z) => x(m.id, Z), t: e })
|
|
1008
|
-
] }, m.id)) })
|
|
1009
|
-
] }),
|
|
1010
|
-
p !== "off" && Nn(t) && /* @__PURE__ */ a("div", { class: "shot", children: [
|
|
1011
|
-
f ? /* @__PURE__ */ a("div", { class: "shot__preview", children: [
|
|
1012
|
-
/* @__PURE__ */ a("img", { src: f.preview, alt: e("board.shot") }),
|
|
1013
|
-
/* @__PURE__ */ a(
|
|
1014
|
-
"button",
|
|
1015
|
-
{
|
|
1016
|
-
type: "button",
|
|
1017
|
-
class: "icon-btn shot__remove",
|
|
1018
|
-
"aria-label": e("board.shotRemove"),
|
|
1019
|
-
onClick: () => A(null),
|
|
1020
|
-
children: /* @__PURE__ */ a(on, {})
|
|
1021
|
-
}
|
|
1022
|
-
)
|
|
1023
|
-
] }) : /* @__PURE__ */ a(
|
|
1024
|
-
"button",
|
|
1025
|
-
{
|
|
1026
|
-
type: "button",
|
|
1027
|
-
class: "shot__add",
|
|
1028
|
-
"aria-busy": Y,
|
|
1029
|
-
disabled: Y,
|
|
1030
|
-
onClick: () => U.current?.click(),
|
|
1031
|
-
children: [
|
|
1032
|
-
Y ? /* @__PURE__ */ a("span", { class: "spinner" }) : /* @__PURE__ */ a(ln, {}),
|
|
1033
|
-
e("board.shotAdd")
|
|
1034
|
-
]
|
|
1035
|
-
}
|
|
1036
|
-
),
|
|
1037
|
-
/* @__PURE__ */ a("p", { class: "note", children: e(F ? "board.shotNoteBoard" : "board.shotNote", { app: h }) }),
|
|
1038
|
-
f && F && /* @__PURE__ */ a("label", { class: "check", children: [
|
|
1039
|
-
/* @__PURE__ */ a(
|
|
1040
|
-
"input",
|
|
1041
|
-
{
|
|
1042
|
-
type: "checkbox",
|
|
1043
|
-
checked: z,
|
|
1044
|
-
onChange: (m) => T(m.target.checked)
|
|
1045
|
-
}
|
|
1046
|
-
),
|
|
1047
|
-
/* @__PURE__ */ a("span", { children: e("board.shotAgree") })
|
|
1048
|
-
] }),
|
|
1049
|
-
/* @__PURE__ */ a(
|
|
1050
|
-
"input",
|
|
1051
|
-
{
|
|
1052
|
-
ref: U,
|
|
1053
|
-
type: "file",
|
|
1054
|
-
accept: "image/*",
|
|
1055
|
-
hidden: !0,
|
|
1056
|
-
onChange: (m) => {
|
|
1057
|
-
const Z = m.target;
|
|
1058
|
-
_e(Z.files?.[0]), Z.value = "";
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
)
|
|
1062
|
-
] }),
|
|
1063
|
-
_ && /* @__PURE__ */ a("div", { class: "switch-row", children: [
|
|
1064
|
-
/* @__PURE__ */ a("span", { class: "switch-row__label", id: "pnb-show-name", children: e("board.showName") }),
|
|
1065
|
-
/* @__PURE__ */ a(
|
|
1066
|
-
"button",
|
|
1067
|
-
{
|
|
1068
|
-
type: "button",
|
|
1069
|
-
role: "switch",
|
|
1070
|
-
class: "switch",
|
|
1071
|
-
"aria-checked": O,
|
|
1072
|
-
"aria-labelledby": "pnb-show-name",
|
|
1073
|
-
onClick: () => D(!O)
|
|
1074
|
-
}
|
|
1075
|
-
)
|
|
1076
|
-
] }),
|
|
1077
|
-
_ && O && /* @__PURE__ */ a(
|
|
1078
|
-
"input",
|
|
1079
|
-
{
|
|
1080
|
-
class: "input",
|
|
1081
|
-
value: I,
|
|
1082
|
-
maxLength: Tn,
|
|
1083
|
-
placeholder: e("board.namePlaceholder"),
|
|
1084
|
-
"aria-label": e("board.namePlaceholder"),
|
|
1085
|
-
onInput: (m) => re(m.target.value)
|
|
1086
|
-
}
|
|
1087
|
-
),
|
|
1088
|
-
/* @__PURE__ */ a("p", { class: "note", children: e("board.anonNote") }),
|
|
1089
|
-
/* @__PURE__ */ a("div", { class: "send", children: [
|
|
1090
|
-
/* @__PURE__ */ a(
|
|
1091
|
-
"button",
|
|
1092
|
-
{
|
|
1093
|
-
type: "button",
|
|
1094
|
-
class: "btn",
|
|
1095
|
-
disabled: !je || ue || he || Y || Ye || Ge || b && !g,
|
|
1096
|
-
"aria-busy": he,
|
|
1097
|
-
onClick: () => void ke(),
|
|
1098
|
-
children: he ? /* @__PURE__ */ a("span", { class: "spinner" }) : e("board.send")
|
|
1099
|
-
}
|
|
1100
|
-
),
|
|
1101
|
-
/* @__PURE__ */ a("span", { class: `left${X ? " left--bad" : ""}`, role: "status", children: X ? e(X.key, X.vars) : i === null ? "" : ue ? e("board.noneLeft", { max: o }) : e("board.left", { n: i, max: o }) })
|
|
1102
|
-
] })
|
|
1103
|
-
] });
|
|
1104
|
-
}
|
|
1105
|
-
const la = 1600;
|
|
1106
|
-
async function da(e) {
|
|
1107
|
-
const t = URL.createObjectURL(e);
|
|
1108
|
-
try {
|
|
1109
|
-
const n = new Image();
|
|
1110
|
-
n.src = t, await n.decode();
|
|
1111
|
-
for (const [r, i] of [
|
|
1112
|
-
[la, 0.82],
|
|
1113
|
-
[1200, 0.7],
|
|
1114
|
-
[900, 0.6]
|
|
1115
|
-
]) {
|
|
1116
|
-
const o = Math.min(1, r / Math.max(n.naturalWidth, n.naturalHeight)), l = document.createElement("canvas");
|
|
1117
|
-
l.width = Math.max(1, Math.round(n.naturalWidth * o)), l.height = Math.max(1, Math.round(n.naturalHeight * o));
|
|
1118
|
-
const c = l.getContext("2d");
|
|
1119
|
-
if (!c) return null;
|
|
1120
|
-
c.fillStyle = "#ffffff", c.fillRect(0, 0, l.width, l.height), c.drawImage(n, 0, 0, l.width, l.height);
|
|
1121
|
-
const h = await new Promise((p) => l.toBlob(p, "image/jpeg", i));
|
|
1122
|
-
if (!h) return null;
|
|
1123
|
-
if (h.size <= Ln)
|
|
1124
|
-
return { type: "image/jpeg", data: await ca(h), preview: URL.createObjectURL(h) };
|
|
1125
|
-
}
|
|
1126
|
-
return null;
|
|
1127
|
-
} catch {
|
|
1128
|
-
return null;
|
|
1129
|
-
} finally {
|
|
1130
|
-
URL.revokeObjectURL(t);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
function ca(e) {
|
|
1134
|
-
return new Promise((t, n) => {
|
|
1135
|
-
const r = new FileReader();
|
|
1136
|
-
r.onload = () => t(String(r.result).split(",")[1] ?? ""), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
1137
|
-
});
|
|
1138
|
-
}
|
|
1139
|
-
function pa(e) {
|
|
1140
|
-
const [t, n] = y(e ? "loading" : null);
|
|
1141
|
-
return K(() => {
|
|
1142
|
-
if (!e) return;
|
|
1143
|
-
let r = null, i = !1;
|
|
1144
|
-
return e().then((o) => {
|
|
1145
|
-
if (!i) {
|
|
1146
|
-
if (!o) return n("failed");
|
|
1147
|
-
r = URL.createObjectURL(o), n(r);
|
|
1148
|
-
}
|
|
1149
|
-
}), () => {
|
|
1150
|
-
i = !0, r && URL.revokeObjectURL(r);
|
|
1151
|
-
};
|
|
1152
|
-
}, []), t;
|
|
1153
|
-
}
|
|
1154
|
-
function xt({
|
|
1155
|
-
label: e,
|
|
1156
|
-
onClose: t,
|
|
1157
|
-
children: n
|
|
1158
|
-
}) {
|
|
1159
|
-
return K(() => {
|
|
1160
|
-
const r = (i) => {
|
|
1161
|
-
i.key === "Escape" && t();
|
|
1162
|
-
};
|
|
1163
|
-
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
1164
|
-
}, [t]), /* @__PURE__ */ a("div", { class: "scrim", onClick: t, children: /* @__PURE__ */ a("div", { class: "sheet", role: "dialog", "aria-modal": "true", "aria-label": e, onClick: (r) => r.stopPropagation(), children: n }) });
|
|
1165
|
-
}
|
|
1166
|
-
function ha({ t: e, src: t, onClose: n }) {
|
|
1167
|
-
const [r, i] = y(!1);
|
|
1168
|
-
return /* @__PURE__ */ a(xt, { label: e("board.shot"), onClose: n, children: [
|
|
1169
|
-
/* @__PURE__ */ a("figure", { class: "sheet__shot sheet__shot--whole", children: r ? /* @__PURE__ */ a("figcaption", { children: e("board.shotGone") }) : /* @__PURE__ */ a("img", { src: t, alt: e("board.shot"), onError: () => i(!0) }) }),
|
|
1170
|
-
/* @__PURE__ */ a("div", { class: "sheet__actions", children: /* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: n, children: e("board.close") }) })
|
|
1171
|
-
] });
|
|
1172
|
-
}
|
|
1173
|
-
function ba({ t: e, onConfirm: t, onClose: n }) {
|
|
1174
|
-
return /* @__PURE__ */ a(xt, { label: e("board.deleteTitle"), onClose: n, children: [
|
|
1175
|
-
/* @__PURE__ */ a("h2", { class: "sheet__title", children: e("board.deleteTitle") }),
|
|
1176
|
-
/* @__PURE__ */ a("p", { class: "sheet__quote", children: e("board.deleteNote") }),
|
|
1177
|
-
/* @__PURE__ */ a("div", { class: "sheet__actions", children: [
|
|
1178
|
-
/* @__PURE__ */ a("button", { type: "button", class: "btn btn--danger", onClick: t, children: e("board.delete") }),
|
|
1179
|
-
/* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: n, children: e("board.cancel") })
|
|
1180
|
-
] })
|
|
1181
|
-
] });
|
|
1182
|
-
}
|
|
1183
|
-
const ua = [
|
|
1184
|
-
{ status: "open", label: "board.statusOpen" },
|
|
1185
|
-
{ status: "planned", label: "board.statusPlanned" },
|
|
1186
|
-
{ status: "done", label: "board.statusDone" },
|
|
1187
|
-
{ status: "declined", label: "board.statusDeclined" }
|
|
1188
|
-
];
|
|
1189
|
-
function _a({
|
|
1190
|
-
t: e,
|
|
1191
|
-
post: t,
|
|
1192
|
-
replyMax: n,
|
|
1193
|
-
loadShot: r,
|
|
1194
|
-
onSave: i,
|
|
1195
|
-
onClose: o
|
|
1196
|
-
}) {
|
|
1197
|
-
const [l, c] = y(t.status), [h, p] = y(t.reply?.text ?? ""), [_, x] = y(!!t.hidden), [s, b] = y(t.shotFor === "off"), [u, j] = y(!1), g = t.shot && (t.shotFor === "board" || t.shotFor === "off"), S = t.shotFor === "owners" ? "board.shotForOwners" : s ? "board.shotForOff" : "board.shotForBoard", f = t.context ? Object.entries(t.context) : [], A = pa(t.shot ? r : null);
|
|
1198
|
-
return /* @__PURE__ */ a(xt, { label: e("board.manage"), onClose: o, children: [
|
|
1199
|
-
/* @__PURE__ */ a("h2", { class: "sheet__title", children: e("board.manage") }),
|
|
1200
|
-
t.rating !== void 0 && /* @__PURE__ */ a("div", { style: { marginTop: "8px" }, children: /* @__PURE__ */ a(mt, { n: t.rating, t: e }) }),
|
|
1201
|
-
/* @__PURE__ */ a("p", { class: "sheet__quote", children: t.text }),
|
|
1202
|
-
t.shot && /* @__PURE__ */ a("figure", { class: "sheet__shot", children: [
|
|
1203
|
-
A === "loading" ? /* @__PURE__ */ a("span", { class: "spinner" }) : A === "failed" ? /* @__PURE__ */ a("figcaption", { children: e("board.shotGone") }) : A && /* @__PURE__ */ a("a", { href: A, target: "_blank", rel: "noopener", children: /* @__PURE__ */ a("img", { src: A, alt: e("board.shot") }) }),
|
|
1204
|
-
A !== "failed" && /* @__PURE__ */ a("figcaption", { children: [
|
|
1205
|
-
e(S),
|
|
1206
|
-
" ",
|
|
1207
|
-
e("board.shotGoes")
|
|
1208
|
-
] }),
|
|
1209
|
-
g && /* @__PURE__ */ a("button", { type: "button", class: "hide-btn", "aria-pressed": s, onClick: () => b(!s), children: e(s ? "board.shotOn" : "board.shotOff") })
|
|
1210
|
-
] }),
|
|
1211
|
-
f.length > 0 && /* @__PURE__ */ a("dl", { class: "context", "aria-label": e("board.context"), children: f.map(([z, T]) => /* @__PURE__ */ a("div", { children: [
|
|
1212
|
-
/* @__PURE__ */ a("dt", { children: z }),
|
|
1213
|
-
/* @__PURE__ */ a("dd", { children: T })
|
|
1214
|
-
] }, z)) }),
|
|
1215
|
-
t.kind !== "review" && /* @__PURE__ */ a(pe, { children: [
|
|
1216
|
-
/* @__PURE__ */ a("span", { class: "label", style: { display: "block", marginTop: "20px", marginBottom: "8px" }, children: e("board.setStatus") }),
|
|
1217
|
-
/* @__PURE__ */ a("div", { class: "states", role: "radiogroup", "aria-label": e("board.setStatus"), children: ua.map((z) => /* @__PURE__ */ a(
|
|
1218
|
-
"button",
|
|
1219
|
-
{
|
|
1220
|
-
type: "button",
|
|
1221
|
-
role: "radio",
|
|
1222
|
-
"aria-checked": l === z.status,
|
|
1223
|
-
class: "chip-pick",
|
|
1224
|
-
onClick: () => c(z.status),
|
|
1225
|
-
children: e(z.label)
|
|
1226
|
-
},
|
|
1227
|
-
z.status
|
|
1228
|
-
)) })
|
|
1229
|
-
] }),
|
|
1230
|
-
/* @__PURE__ */ a("span", { class: "label", style: { display: "block", marginTop: "20px", marginBottom: "8px" }, children: e("board.replyLabel") }),
|
|
1231
|
-
/* @__PURE__ */ a(
|
|
1232
|
-
"textarea",
|
|
1233
|
-
{
|
|
1234
|
-
class: "field",
|
|
1235
|
-
style: { minHeight: "96px" },
|
|
1236
|
-
value: h,
|
|
1237
|
-
maxLength: n,
|
|
1238
|
-
placeholder: e("board.replyPlaceholder"),
|
|
1239
|
-
"aria-label": e("board.replyLabel"),
|
|
1240
|
-
onInput: (z) => p(z.target.value)
|
|
1241
|
-
}
|
|
1242
|
-
),
|
|
1243
|
-
t.pending && /* @__PURE__ */ a("button", { type: "button", class: "approve-btn", "aria-pressed": u, onClick: () => j(!u), children: e(u ? "board.unapprove" : "board.approve") }),
|
|
1244
|
-
/* @__PURE__ */ a("button", { type: "button", class: "hide-btn", "aria-pressed": _, onClick: () => x(!_), children: e(_ ? "board.unhide" : "board.hide") }),
|
|
1245
|
-
/* @__PURE__ */ a("div", { class: "sheet__actions", children: /* @__PURE__ */ a(
|
|
1246
|
-
"button",
|
|
1247
|
-
{
|
|
1248
|
-
type: "button",
|
|
1249
|
-
class: "btn",
|
|
1250
|
-
onClick: () => i({
|
|
1251
|
-
status: l,
|
|
1252
|
-
reply: h.trim(),
|
|
1253
|
-
hidden: _,
|
|
1254
|
-
...g ? { shotOff: s } : {},
|
|
1255
|
-
...t.pending && u ? { approved: !0 } : {}
|
|
1256
|
-
}),
|
|
1257
|
-
children: e("board.save")
|
|
1258
|
-
}
|
|
1259
|
-
) })
|
|
1260
|
-
] });
|
|
1261
|
-
}
|
|
1262
|
-
const rt = 15, fa = (e) => !!e.shot && (e.shotFor ?? "board") === "board" && !e.hidden, qt = 2600;
|
|
1263
|
-
function hn({
|
|
1264
|
-
client: e,
|
|
1265
|
-
t,
|
|
1266
|
-
locale: n,
|
|
1267
|
-
appName: r,
|
|
1268
|
-
suggestName: i,
|
|
1269
|
-
context: o,
|
|
1270
|
-
noise: l,
|
|
1271
|
-
kinds: c,
|
|
1272
|
-
screenshots: h = "board",
|
|
1273
|
-
readonly: p = !1,
|
|
1274
|
-
names: _ = !0,
|
|
1275
|
-
onClose: x,
|
|
1276
|
-
onPosted: s,
|
|
1277
|
-
start: b = "board",
|
|
1278
|
-
screen: u
|
|
1279
|
-
}) {
|
|
1280
|
-
const j = p ? "board" : b, [g, S] = y(null), [f, A] = y(!1), [z, T] = y(u ?? j), [F, Y] = y(j === "choose"), [G, O] = y("bug"), [D, I] = y("top"), [re, he] = y("all"), [Ne, X] = y(1), [R, U] = y(null), [Q, be] = y(null), [je, ue] = y(!1), [Ye, Ge] = y(!1), _e = qe(null), ke = (l ?? []).join("|"), m = de(() => zn(ke ? ke.split("|") : []), [ke]), Z = qe(!1), V = $n(async () => {
|
|
1281
|
-
const d = await e.board();
|
|
1282
|
-
d.ok ? (Z.current = !0, S(p ? Kn(d.data) : d.data), A(!1)) : Z.current || A(!0);
|
|
1283
|
-
}, [e, p]);
|
|
1284
|
-
K(() => {
|
|
1285
|
-
V();
|
|
1286
|
-
}, [V]), K(() => {
|
|
1287
|
-
if (!Q) return;
|
|
1288
|
-
const d = setTimeout(() => be(null), qt);
|
|
1289
|
-
return () => clearTimeout(d);
|
|
1290
|
-
}, [Q]), K(() => {
|
|
1291
|
-
u && T(u);
|
|
1292
|
-
}, [u]), K(() => {
|
|
1293
|
-
if (z !== "sent" || u === "sent") return;
|
|
1294
|
-
const d = setTimeout(() => {
|
|
1295
|
-
Y(!1), T("board");
|
|
1296
|
-
}, qt);
|
|
1297
|
-
return () => clearTimeout(d);
|
|
1298
|
-
}, [z, u]), K(() => {
|
|
1299
|
-
const d = _e.current;
|
|
1300
|
-
if (!d) return;
|
|
1301
|
-
let v = d.scrollTop, k = 0;
|
|
1302
|
-
const L = () => {
|
|
1303
|
-
const Se = d.scrollTop, et = Se - v;
|
|
1304
|
-
if (v = Se, Se < 48) {
|
|
1305
|
-
k = 0, ue(!1);
|
|
1306
|
-
return;
|
|
1307
|
-
}
|
|
1308
|
-
k = Math.sign(et) === Math.sign(k) ? k + et : et, k > 24 ? ue(!0) : k < -8 && ue(!1);
|
|
1309
|
-
};
|
|
1310
|
-
return d.addEventListener("scroll", L, { passive: !0 }), () => d.removeEventListener("scroll", L);
|
|
1311
|
-
}, [z, g]);
|
|
1312
|
-
const le = r ?? g?.project.name ?? "", H = g?.project.rules, fn = va(h, H?.screenshots ?? "board"), Be = !!g?.me?.owner, oe = g?.posts ?? [], W = (H?.kinds ?? ["bug", "idea"]).filter((d) => !c || c.includes(d)), Ze = W.join(",");
|
|
1313
|
-
K(() => {
|
|
1314
|
-
u && W.length && !W.includes(G) && O(W[0]);
|
|
1315
|
-
}, [u, Ze]);
|
|
1316
|
-
const wt = de(() => {
|
|
1317
|
-
const d = oe.filter((v) => (Be || !v.hidden) && Ze.split(",").includes(v.kind));
|
|
1318
|
-
return Sn(re === "all" ? d : d.filter((v) => v.kind === re), D);
|
|
1319
|
-
}, [oe, re, D, Be, Ze]), Ce = de(() => {
|
|
1320
|
-
const d = oe.filter((v) => v.kind === "review" && !v.hidden && v.rating).map((v) => v.rating);
|
|
1321
|
-
return d.length ? { avg: d.reduce((v, k) => v + k, 0) / d.length, n: d.length } : null;
|
|
1322
|
-
}, [oe]), Je = Math.max(1, Math.ceil(wt.length / rt)), Xe = Math.min(Ne, Je), yt = wt.slice((Xe - 1) * rt, Xe * rt), De = (d, v) => S((k) => k && { ...k, posts: k.posts.map((L) => L.id === d ? { ...L, ...v } : L) }), Pe = (d) => {
|
|
1323
|
-
d === "no_signer" ? be(t("board.needWallet", { app: le })) : d !== "declined" && be(t("board.failed"));
|
|
1324
|
-
}, kt = async (d, v) => {
|
|
1325
|
-
const k = oe.find((Se) => Se.id === d);
|
|
1326
|
-
if (!k) return;
|
|
1327
|
-
De(d, { votes: Math.max(0, k.votes + (v ? 1 : -1)), voted: v });
|
|
1328
|
-
const L = await e.vote(d, v);
|
|
1329
|
-
L.ok ? (De(d, { votes: L.data.votes, voted: L.data.voted }), g?.me || V()) : (De(d, { votes: k.votes, voted: k.voted }), Pe(L.error));
|
|
1330
|
-
}, gn = async (d) => {
|
|
1331
|
-
const v = ga(), k = d.kind === "bug" ? { ...o, host: An() ? "nimiq-pay" : "browser" } : void 0, L = await e.post({
|
|
1332
|
-
id: v,
|
|
1333
|
-
kind: d.kind,
|
|
1334
|
-
text: d.text,
|
|
1335
|
-
anon: d.anon,
|
|
1336
|
-
context: k,
|
|
1337
|
-
rating: d.rating,
|
|
1338
|
-
shot: d.shot ? { type: d.shot.type, data: d.shot.data, ...d.shot.board ? { board: !0 } : {} } : void 0
|
|
1339
|
-
});
|
|
1340
|
-
return L.ok ? (!d.anon && d.name && d.name !== g?.me?.name && await e.setName(d.name), Ge(!!L.data.pending), T("sent"), I("new"), he("all"), X(1), s?.({ id: v, kind: d.kind }), await V(), null) : L.error === "declined" ? { key: null } : L.error === "no_signer" ? { key: "board.needWallet", vars: { app: le } } : L.error === "reviewed" ? (V(), { key: "board.reviewed", vars: { app: le } }) : L.error === "too_many" ? (V(), { key: "board.failedFull", vars: { max: H?.perDay ?? 5 } }) : { key: "board.failed" };
|
|
1341
|
-
}, vn = async () => {
|
|
1342
|
-
const d = await e.signIn();
|
|
1343
|
-
d.ok ? await V() : Pe(d.error);
|
|
1344
|
-
}, mn = async (d) => {
|
|
1345
|
-
U(null), S((k) => k && { ...k, posts: k.posts.filter((L) => L.id !== d.id) });
|
|
1346
|
-
const v = await e.remove(d.id);
|
|
1347
|
-
v.ok || Pe(v.error), V();
|
|
1348
|
-
}, xn = async (d, v) => {
|
|
1349
|
-
U(null), De(d.id, {
|
|
1350
|
-
status: v.status,
|
|
1351
|
-
hidden: v.hidden || void 0,
|
|
1352
|
-
reply: v.reply ? { text: v.reply, at: Date.now() } : void 0,
|
|
1353
|
-
...v.shotOff !== void 0 ? { shotFor: v.shotOff ? "off" : "board" } : {},
|
|
1354
|
-
...v.approved ? { pending: void 0 } : {}
|
|
1355
|
-
});
|
|
1356
|
-
const k = await e.manage(d.id, v);
|
|
1357
|
-
k.ok || Pe(k.error), V();
|
|
1358
|
-
}, wn = oe.some((d) => d.mine && d.kind === "review"), yn = () => {
|
|
1359
|
-
W.length === 1 ? (O(W[0]), T("compose")) : T("choose");
|
|
1360
|
-
}, Qe = () => {
|
|
1361
|
-
Y(!1), T("board");
|
|
1362
|
-
};
|
|
1363
|
-
return z === "sent" ? /* @__PURE__ */ a("div", { class: "app", children: /* @__PURE__ */ a(ia, { t, onBack: Qe, waiting: Ye || u === "sent" && !!H?.approve, appName: le }) }) : z === "choose" && (H || F) ? /* @__PURE__ */ a("div", { class: "app", children: [
|
|
1364
|
-
F ? (
|
|
1365
|
-
// The first screen: nothing to go back to, only out.
|
|
1366
|
-
/* @__PURE__ */ a("header", { class: "bar", children: [
|
|
1367
|
-
/* @__PURE__ */ a("span", {}),
|
|
1368
|
-
/* @__PURE__ */ a("span", {}),
|
|
1369
|
-
x ? /* @__PURE__ */ a("button", { type: "button", class: "icon-btn", "aria-label": t("board.close"), onClick: x, children: /* @__PURE__ */ a(Ht, {}) }) : /* @__PURE__ */ a("span", {})
|
|
1370
|
-
] })
|
|
1371
|
-
) : /* @__PURE__ */ a("header", { class: "bar", children: [
|
|
1372
|
-
/* @__PURE__ */ a("button", { type: "button", class: "icon-btn", "aria-label": t("board.back"), onClick: Qe, children: /* @__PURE__ */ a($t, {}) }),
|
|
1373
|
-
/* @__PURE__ */ a("h2", { class: "bar__title", children: t("board.composeTitle") }),
|
|
1374
|
-
/* @__PURE__ */ a("span", {})
|
|
1375
|
-
] }),
|
|
1376
|
-
/* @__PURE__ */ a("div", { class: "scroll", style: { paddingBottom: "24px" }, children: H ? /* @__PURE__ */ a(
|
|
1377
|
-
oa,
|
|
1378
|
-
{
|
|
1379
|
-
t,
|
|
1380
|
-
kinds: W,
|
|
1381
|
-
appName: le,
|
|
1382
|
-
reviewed: wn,
|
|
1383
|
-
onPick: (d) => {
|
|
1384
|
-
O(d), T("compose");
|
|
1385
|
-
},
|
|
1386
|
-
onBoard: F ? Qe : void 0
|
|
1387
|
-
}
|
|
1388
|
-
) : f ? /* @__PURE__ */ a("div", { class: "empty", children: [
|
|
1389
|
-
/* @__PURE__ */ a("p", { children: t("board.loadFailed") }),
|
|
1390
|
-
/* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: () => void V(), children: t("board.retry") })
|
|
1391
|
-
] }) : /* @__PURE__ */ a("div", { class: "empty", "aria-busy": "true", children: /* @__PURE__ */ a("span", { class: "spinner", style: { display: "inline-block" } }) }) })
|
|
1392
|
-
] }) : z === "compose" && H ? /* @__PURE__ */ a("div", { class: "app", children: [
|
|
1393
|
-
/* @__PURE__ */ a("header", { class: "bar", children: [
|
|
1394
|
-
/* @__PURE__ */ a(
|
|
1395
|
-
"button",
|
|
1396
|
-
{
|
|
1397
|
-
type: "button",
|
|
1398
|
-
class: "icon-btn",
|
|
1399
|
-
"aria-label": t("board.back"),
|
|
1400
|
-
onClick: () => T(W.length > 1 ? "choose" : "board"),
|
|
1401
|
-
children: /* @__PURE__ */ a($t, {})
|
|
1402
|
-
}
|
|
1403
|
-
),
|
|
1404
|
-
/* @__PURE__ */ a("h2", { class: "bar__title", children: t("board.composeTitle") }),
|
|
1405
|
-
/* @__PURE__ */ a("span", {})
|
|
1406
|
-
] }),
|
|
1407
|
-
/* @__PURE__ */ a("div", { class: "scroll", ref: _e, style: { paddingBottom: "24px" }, children: /* @__PURE__ */ a(
|
|
1408
|
-
sa,
|
|
1409
|
-
{
|
|
1410
|
-
t,
|
|
1411
|
-
kind: G,
|
|
1412
|
-
posts: oe,
|
|
1413
|
-
likeThis: m,
|
|
1414
|
-
left: g?.me ? g.me.left : null,
|
|
1415
|
-
perDay: H.perDay,
|
|
1416
|
-
textMax: H.textMax,
|
|
1417
|
-
name: g?.me?.name ?? i ?? "",
|
|
1418
|
-
appName: le,
|
|
1419
|
-
screenshots: fn,
|
|
1420
|
-
names: _,
|
|
1421
|
-
onVote: kt,
|
|
1422
|
-
onSend: gn
|
|
1423
|
-
}
|
|
1424
|
-
) }),
|
|
1425
|
-
Q && /* @__PURE__ */ a("div", { class: "toast", role: "status", children: Q })
|
|
1426
|
-
] }) : /* @__PURE__ */ a("div", { class: "app", children: [
|
|
1427
|
-
/* @__PURE__ */ a("header", { class: "bar", children: [
|
|
1428
|
-
x ? /* @__PURE__ */ a("button", { type: "button", class: "icon-btn", "aria-label": t("board.close"), onClick: x, children: /* @__PURE__ */ a(Ht, {}) }) : /* @__PURE__ */ a("span", {}),
|
|
1429
|
-
/* @__PURE__ */ a("h2", { class: "bar__title", children: t("board.title") }),
|
|
1430
|
-
p ? /* @__PURE__ */ a("span", {}) : /* @__PURE__ */ a(
|
|
1431
|
-
"button",
|
|
1432
|
-
{
|
|
1433
|
-
type: "button",
|
|
1434
|
-
class: "icon-btn",
|
|
1435
|
-
"aria-label": t("board.write"),
|
|
1436
|
-
disabled: !H || !W.length,
|
|
1437
|
-
onClick: yn,
|
|
1438
|
-
children: /* @__PURE__ */ a(Zn, {})
|
|
1439
|
-
}
|
|
1440
|
-
)
|
|
1441
|
-
] }),
|
|
1442
|
-
W.length > 1 && /* @__PURE__ */ a("div", { class: "filters", children: ["all", ...W].map((d) => /* @__PURE__ */ a(
|
|
1443
|
-
"button",
|
|
1444
|
-
{
|
|
1445
|
-
type: "button",
|
|
1446
|
-
class: "chip-pick",
|
|
1447
|
-
"aria-pressed": re === d,
|
|
1448
|
-
onClick: () => {
|
|
1449
|
-
he(d), X(1);
|
|
1450
|
-
},
|
|
1451
|
-
children: t(d === "all" ? "board.all" : ae[d].plural)
|
|
1452
|
-
},
|
|
1453
|
-
d
|
|
1454
|
-
)) }),
|
|
1455
|
-
/* @__PURE__ */ a("div", { class: "scroll", ref: _e, children: [
|
|
1456
|
-
Ce && W.includes("review") && (re === "all" || re === "review") && /* @__PURE__ */ a("div", { class: "rating", children: [
|
|
1457
|
-
/* @__PURE__ */ a("span", { class: "rating__avg", children: Ce.avg.toFixed(1) }),
|
|
1458
|
-
/* @__PURE__ */ a(mt, { n: Ce.avg, t, size: 18 }),
|
|
1459
|
-
/* @__PURE__ */ a("span", { class: "rating__n", children: Ce.n === 1 ? t("board.ratingOne") : t("board.ratingMany", { n: Ce.n }) })
|
|
1460
|
-
] }),
|
|
1461
|
-
f ? /* @__PURE__ */ a("div", { class: "empty", children: [
|
|
1462
|
-
/* @__PURE__ */ a("p", { children: t("board.loadFailed") }),
|
|
1463
|
-
/* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: () => void V(), children: t("board.retry") })
|
|
1464
|
-
] }) : g ? yt.length === 0 ? /* @__PURE__ */ a("p", { class: "empty", children: t(oe.length > 0 ? "board.emptyFiltered" : p ? "board.emptyRead" : "board.emptyTitle") }) : /* @__PURE__ */ a("ul", { class: "list", children: yt.map((d) => /* @__PURE__ */ a(
|
|
1465
|
-
ra,
|
|
1466
|
-
{
|
|
1467
|
-
post: d,
|
|
1468
|
-
appName: le,
|
|
1469
|
-
t,
|
|
1470
|
-
locale: n,
|
|
1471
|
-
onVote: p ? void 0 : (v) => void kt(d.id, v),
|
|
1472
|
-
onDelete: d.mine || Be ? () => U({ kind: "delete", post: d }) : void 0,
|
|
1473
|
-
onManage: Be ? () => U({ kind: "manage", post: d }) : void 0,
|
|
1474
|
-
shotUrl: fa(d) ? e.shotUrl(d.id) : void 0,
|
|
1475
|
-
onShot: () => U({ kind: "shot", post: d })
|
|
1476
|
-
},
|
|
1477
|
-
d.id
|
|
1478
|
-
)) }) : /* @__PURE__ */ a("div", { class: "empty", "aria-busy": "true", children: /* @__PURE__ */ a("span", { class: "spinner", style: { display: "inline-block" } }) }),
|
|
1479
|
-
Je > 1 && /* @__PURE__ */ a("nav", { class: "pager", children: Array.from({ length: Je }, (d, v) => v + 1).map((d) => /* @__PURE__ */ a(
|
|
1480
|
-
"button",
|
|
1481
|
-
{
|
|
1482
|
-
type: "button",
|
|
1483
|
-
"aria-current": d === Xe ? "page" : void 0,
|
|
1484
|
-
"aria-label": t("board.page", { n: d }),
|
|
1485
|
-
onClick: () => {
|
|
1486
|
-
X(d), _e.current?.scrollTo({ top: 0 });
|
|
1487
|
-
},
|
|
1488
|
-
children: d
|
|
1489
|
-
},
|
|
1490
|
-
d
|
|
1491
|
-
)) }),
|
|
1492
|
-
g && !g.me && e.canSign && !p && /* @__PURE__ */ a("div", { class: "sign-in", children: /* @__PURE__ */ a("button", { type: "button", class: "text-btn", onClick: () => void vn(), children: t("board.signIn") }) })
|
|
1493
|
-
] }),
|
|
1494
|
-
/* @__PURE__ */ a("div", { class: `order${je ? " order--away" : ""}`, children: /* @__PURE__ */ a("div", { class: "order__pill", role: "tablist", "aria-label": t("board.order"), children: ["top", "new"].map((d) => /* @__PURE__ */ a(
|
|
1495
|
-
"button",
|
|
1496
|
-
{
|
|
1497
|
-
type: "button",
|
|
1498
|
-
role: "tab",
|
|
1499
|
-
class: "order__tab",
|
|
1500
|
-
"aria-selected": D === d,
|
|
1501
|
-
onClick: () => {
|
|
1502
|
-
I(d), X(1);
|
|
1503
|
-
},
|
|
1504
|
-
children: t(d === "top" ? "board.top" : "board.new")
|
|
1505
|
-
},
|
|
1506
|
-
d
|
|
1507
|
-
)) }) }),
|
|
1508
|
-
Q && /* @__PURE__ */ a("div", { class: "toast", role: "status", children: Q }),
|
|
1509
|
-
R?.kind === "delete" && /* @__PURE__ */ a(ba, { t, onConfirm: () => void mn(R.post), onClose: () => U(null) }),
|
|
1510
|
-
R?.kind === "shot" && /* @__PURE__ */ a(ha, { t, src: e.shotUrl(R.post.id), onClose: () => U(null) }),
|
|
1511
|
-
R?.kind === "manage" && H && /* @__PURE__ */ a(
|
|
1512
|
-
_a,
|
|
1513
|
-
{
|
|
1514
|
-
t,
|
|
1515
|
-
post: R.post,
|
|
1516
|
-
replyMax: H.replyMax,
|
|
1517
|
-
loadShot: async () => {
|
|
1518
|
-
const d = await e.shot(R.post.id);
|
|
1519
|
-
return d.ok ? d.data : null;
|
|
1520
|
-
},
|
|
1521
|
-
onSave: (d) => void xn(R.post, d),
|
|
1522
|
-
onClose: () => U(null)
|
|
1523
|
-
}
|
|
1524
|
-
)
|
|
1525
|
-
] });
|
|
1526
|
-
}
|
|
1527
|
-
function ga() {
|
|
1528
|
-
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `p-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
1529
|
-
}
|
|
1530
|
-
function va(e, t) {
|
|
1531
|
-
const n = ["off", "owners", "board"];
|
|
1532
|
-
return n[Math.min(n.indexOf(e), n.indexOf(t))];
|
|
1533
|
-
}
|
|
1534
|
-
const ma = ':host{--pnb-bg: #ffffff;--pnb-surface: #f4f4f7;--pnb-surface-2: #e8e8ef;--pnb-sunken: #e8e8ef;--pnb-line: #dcdce5;--pnb-text: #1b1b24;--pnb-text-quiet: #5a5a6b;--pnb-accent: #2563eb;--pnb-accent-fill: var(--pnb-accent);--pnb-on-accent: #ffffff;--pnb-danger: #d23b2f;--pnb-bug: #e5484d;--pnb-idea: #8b5cf6;--pnb-review: #e9a00b;--pnb-planned: #8a8fb8;--pnb-done: #21bca5;--pnb-declined: #8a8fb8;--pnb-star: #f5a524;--pnb-tile-bug: var(--pnb-bug);--pnb-tile-idea: var(--pnb-idea);--pnb-tile-review: var(--pnb-review);--pnb-tile-ink: #ffffff;--pnb-sent: var(--pnb-bg);--pnb-fab: var(--pnb-accent-fill);--pnb-on-fab: var(--pnb-on-accent);--pnb-radius: 8px;--pnb-radius-sheet: 16px;--pnb-radius-panel: 16px;--pnb-shadow: 0 6px 16px rgba(0, 0, 0, .18);--pnb-scrim: rgba(10, 10, 20, .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}@media (prefers-color-scheme: dark){:host(:not([theme])),:host([theme="auto"]){--pnb-bg: #15151c;--pnb-surface: #22222c;--pnb-surface-2: #2e2e3a;--pnb-sunken: #0d0d12;--pnb-line: #383846;--pnb-text: #f2f2f7;--pnb-text-quiet: #a9a9ba;--pnb-accent: #6b93ff;--pnb-on-accent: #0b0b12;--pnb-danger: #ff6b5e;--pnb-shadow: 0 6px 16px rgba(0, 0, 0, .45);--pnb-scrim: rgba(0, 0, 0, .6)}}:host([theme="dark"]){--pnb-bg: #15151c;--pnb-surface: #22222c;--pnb-surface-2: #2e2e3a;--pnb-sunken: #0d0d12;--pnb-line: #383846;--pnb-text: #f2f2f7;--pnb-text-quiet: #a9a9ba;--pnb-accent: #6b93ff;--pnb-on-accent: #0b0b12;--pnb-danger: #ff6b5e;--pnb-shadow: 0 6px 16px rgba(0, 0, 0, .45);--pnb-scrim: rgba(0, 0, 0, .6)}:host([theme="nimiq"]){--pnb-bg: #ffffff;--pnb-surface: #f5f5f8;--pnb-surface-2: #e9e9f0;--pnb-sunken: #e9e9f0;--pnb-line: #dedee7;--pnb-text: #1f2348;--pnb-text-quiet: #5c5f7a;--pnb-accent: #0582ca;--pnb-accent-fill: linear-gradient(274deg, #265dd7 0%, #0582ca 100%);--pnb-on-accent: #ffffff;--pnb-danger: #d94432;--pnb-bug: #d94432;--pnb-idea: #21bca5;--pnb-review: #e9a113;--pnb-planned: #0582ca;--pnb-done: #21bca5;--pnb-declined: #8b8d98;--pnb-star: #e9a113;--pnb-tile-bug: linear-gradient(274deg, #cc3047 0%, #e9564a 100%);--pnb-tile-idea: linear-gradient(274deg, #41a38e 0%, #21bca5 100%);--pnb-tile-review: linear-gradient(274deg, #ec991c 0%, #e9b213 100%);--pnb-sent: linear-gradient(274deg, #41a38e 0%, #21bca5 100%);--pnb-fab: #1f2348;--pnb-on-fab: #ffffff;--pnb-radius: 10px;--pnb-radius-sheet: 20px;--pnb-radius-panel: 10px;--pnb-shadow: 0 8px 24px rgba(31, 35, 72, .16);--pnb-scrim: rgba(31, 35, 72, .5)}:host([theme="pleasenobugs"]),:host([theme="shitti"]){--pnb-bg: #292a56;--pnb-surface: #5656ac;--pnb-surface-2: #454689;--pnb-sunken: #1a1a32;--pnb-line: #6d6dc5;--pnb-text: #ffffff;--pnb-text-quiet: rgba(255, 255, 255, .78);--pnb-accent: #1fc7d4;--pnb-on-accent: #12132b;--pnb-danger: #ff7a6b;--pnb-shadow: 0 6px 16px rgba(0, 0, 0, .28);--pnb-scrim: rgba(10, 10, 30, .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:48px 1fr 48px;align-items:center;min-height:56px;padding:0 4px;padding-top:var(--_top);flex-shrink:0}.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)}.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:999px;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-text);color:var(--pnb-bg)}.scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 16px calc(96px + var(--_bottom))}.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-surface);border:1px solid var(--pnb-line)}.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:999px;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%;color:#fff}.badge__dot--bug{background:var(--pnb-bug)}.badge__dot--idea{background:var(--pnb-idea)}.badge__dot--review{background:var(--pnb-review)}.badge__dot--planned{background:var(--pnb-planned)}.badge__dot--done{background:var(--pnb-done)}.badge__dot--declined{background:var(--pnb-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-surface);border:1px solid var(--pnb-line)}.rating__avg{font-size:22px;font-weight:700}.rating__n{margin-left:auto;font-size:14px;color:var(--pnb-text-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-text-quiet)}.card__text{margin:12px 0 0;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}.card__foot{display:flex;align-items:center;gap:8px;margin-top:12px}.card__who{flex:1;min-width:0;font-size:14px;color:var(--pnb-text-quiet);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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:999px;background:var(--pnb-surface-2);font-size:14px;font-weight:700;justify-content:center}.vote--count{background:transparent;color:var(--pnb-text-quiet)}.vote[aria-pressed=true]{background:var(--pnb-accent);color:var(--pnb-on-accent)}.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:999px;background:var(--pnb-sunken);box-shadow:var(--pnb-shadow)}.order__tab{border-radius:999px;font-weight:700;font-size:15px;color:var(--pnb-text-quiet)}.order__tab[aria-selected=true]{background:var(--pnb-surface);color:var(--pnb-text)}.pager{display:flex;justify-content:center;gap:6px;margin-top:20px}.pager button{min-width:36px;height:36px;border-radius:999px;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}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;height:48px;padding:0 24px;border-radius:999px;background:var(--pnb-accent-fill);color:var(--pnb-on-accent);font-size:16px;font-weight:700}.btn:disabled{opacity:.45;cursor:default}.btn--danger{background:var(--pnb-danger);color:#fff}.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;padding-bottom:24px}.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-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;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)}.tile--idea{background:var(--pnb-tile-idea)}.tile--review{background:var(--pnb-tile-review)}.tile__icon{display:grid;place-items:center;width:44px;height:44px;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{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-done);color:#fff;animation:pop .32s cubic-bezier(.2,.9,.3,1.3)}.sent__title{margin:12px 0 0;font-size:22px;font-weight:700}.sent__note{margin:0;color:var(--pnb-text-quiet)}:host([theme="nimiq"]) .sent{color:#fff}:host([theme="nimiq"]) .sent__check{background:transparent}:host([theme="nimiq"]) .sent__note,:host([theme="nimiq"]) .sent__back{color:#ffffffe6}@keyframes pop{0%{transform:scale(.4);opacity:0}}.public{margin:12px 0 0;font-size:14px;color:var(--pnb-text-quiet)}.field{width:100%;min-height:140px;padding:12px 14px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-line);background:var(--pnb-surface);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-text-quiet);opacity:1}.input{width:100%;height:44px;padding:0 14px;border-radius:var(--pnb-radius);border:1px solid var(--pnb-line);background:var(--pnb-surface);font-size:16px}.input:focus{outline:none;border-color:var(--pnb-accent)}.count{align-self:flex-end;font-size:12px;color:var(--pnb-text-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-surface-2);border:1px solid var(--pnb-line);transition:background .16s ease}.switch:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--pnb-text-quiet);transition:transform .16s ease,background .16s ease}.switch[aria-checked=true]{background:var(--pnb-accent);border-color:var(--pnb-accent)}.switch[aria-checked=true]:after{transform:translate(20px);background:var(--pnb-on-accent)}.note{margin:4px 0 0;font-size:12px;line-height:1.45;color:var(--pnb-text-quiet)}.send{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:20px}.left{font-size:13px;color:var(--pnb-text-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{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-shadow);transition:transform .12s ease}.fab:hover{transform:scale(1.06)}.fab:active{transform:scale(.94)}@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}}', ht = "please-no-bugs";
|
|
1535
|
-
var fe, E, te, J, ge, ve, me, xe, we, Le, ye, P, un, ee, bt;
|
|
1536
|
-
class bn extends HTMLElement {
|
|
1537
|
-
constructor() {
|
|
1538
|
-
super(...arguments);
|
|
1539
|
-
$(this, P);
|
|
1540
|
-
$(this, fe, null);
|
|
1541
|
-
$(this, E, null);
|
|
1542
|
-
$(this, te, null);
|
|
1543
|
-
$(this, J, "");
|
|
1544
|
-
$(this, ge);
|
|
1545
|
-
$(this, ve);
|
|
1546
|
-
$(this, me);
|
|
1547
|
-
$(this, xe);
|
|
1548
|
-
$(this, we);
|
|
1549
|
-
$(this, Le);
|
|
1550
|
-
/** The demo board's code, fetched the first time `demo` is set. */
|
|
1551
|
-
$(this, ye);
|
|
1552
|
-
}
|
|
1553
|
-
/** How to sign outside Nimiq Pay. Inside it the widget signs by itself. */
|
|
1554
|
-
get signer() {
|
|
1555
|
-
return w(this, ge);
|
|
1556
|
-
}
|
|
1557
|
-
set signer(n) {
|
|
1558
|
-
B(this, ge, n), B(this, J, ""), q(this, P, ee).call(this);
|
|
1559
|
-
}
|
|
1560
|
-
/**
|
|
1561
|
-
* Your app's own wallet login, so nobody signs twice: `{ address, publicKey,
|
|
1562
|
-
* signature, message }`. Needs the project to list that message. Set it to
|
|
1563
|
-
* null on logout.
|
|
1564
|
-
*/
|
|
1565
|
-
get appLogin() {
|
|
1566
|
-
return w(this, ve);
|
|
1567
|
-
}
|
|
1568
|
-
set appLogin(n) {
|
|
1569
|
-
B(this, ve, n), B(this, J, ""), q(this, P, ee).call(this);
|
|
1570
|
-
}
|
|
1571
|
-
/** Sent with every bug report, to owners only: `{ version: '1.4.0' }`. */
|
|
1572
|
-
get context() {
|
|
1573
|
-
return w(this, me);
|
|
1574
|
-
}
|
|
1575
|
-
set context(n) {
|
|
1576
|
-
B(this, me, n), q(this, P, ee).call(this);
|
|
1577
|
-
}
|
|
1578
|
-
/** Words common in your app, so "said already?" ignores them: `['nim', 'wallet']`. */
|
|
1579
|
-
get noise() {
|
|
1580
|
-
return w(this, xe);
|
|
1581
|
-
}
|
|
1582
|
-
set noise(n) {
|
|
1583
|
-
B(this, xe, n), q(this, P, ee).call(this);
|
|
1584
|
-
}
|
|
1585
|
-
/** Override any string, or supply a language: `{ 'board.title': 'Ideas box' }`. */
|
|
1586
|
-
get strings() {
|
|
1587
|
-
return w(this, we);
|
|
1588
|
-
}
|
|
1589
|
-
set strings(n) {
|
|
1590
|
-
B(this, we, n), q(this, P, ee).call(this);
|
|
1591
|
-
}
|
|
1592
|
-
connectedCallback() {
|
|
1593
|
-
if (!w(this, fe)) {
|
|
1594
|
-
B(this, fe, this.attachShadow({ mode: "open" }));
|
|
1595
|
-
const n = document.createElement("style");
|
|
1596
|
-
n.textContent = ma, B(this, E, document.createElement("div")), w(this, E).style.height = "100%", w(this, fe).append(n, w(this, E));
|
|
1597
|
-
}
|
|
1598
|
-
q(this, P, ee).call(this);
|
|
1599
|
-
}
|
|
1600
|
-
disconnectedCallback() {
|
|
1601
|
-
w(this, E) && ze(null, w(this, E));
|
|
1602
|
-
}
|
|
1603
|
-
attributeChangedCallback(n) {
|
|
1604
|
-
(n === "project" || n === "server" || n === "demo" || n === "readonly") && B(this, J, ""), n === "accent" && q(this, P, un).call(this), q(this, P, ee).call(this);
|
|
1605
|
-
}
|
|
1606
|
-
/** Close an overlay: slide it away, then tell the page. */
|
|
1607
|
-
close() {
|
|
1608
|
-
this.dispatchEvent(new CustomEvent("pleasenobugs:close", { bubbles: !0, composed: !0 }));
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
fe = new WeakMap(), E = new WeakMap(), te = new WeakMap(), J = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), me = new WeakMap(), xe = new WeakMap(), we = new WeakMap(), Le = new WeakMap(), ye = new WeakMap(), P = new WeakSet(), un = function() {
|
|
1612
|
-
const n = this.getAttribute("accent");
|
|
1613
|
-
n ? (this.style.setProperty("--pnb-accent", n), this.style.setProperty("--pnb-accent-fill", n), this.style.setProperty("--pnb-on-accent", Ca(n))) : (this.style.removeProperty("--pnb-accent"), this.style.removeProperty("--pnb-accent-fill"), this.style.removeProperty("--pnb-on-accent"));
|
|
1614
|
-
}, ee = function() {
|
|
1615
|
-
if (!w(this, E) || !this.isConnected) return;
|
|
1616
|
-
const n = Un(this.getAttribute("lang"));
|
|
1617
|
-
if (this.hasAttribute("demo")) {
|
|
1618
|
-
if (!w(this, ye)) {
|
|
1619
|
-
import("./demo-nnvUgJyJ.js").then((h) => {
|
|
1620
|
-
B(this, ye, h), q(this, P, ee).call(this);
|
|
1621
|
-
});
|
|
1622
|
-
return;
|
|
1623
|
-
}
|
|
1624
|
-
const c = `demo|${n}`;
|
|
1625
|
-
(!w(this, te) || w(this, J) !== c) && (B(this, te, w(this, ye).createDemoClient(n)), B(this, J, c)), q(this, P, bt).call(this, w(this, te), n);
|
|
1626
|
-
return;
|
|
1627
|
-
}
|
|
1628
|
-
const r = this.getAttribute("project"), i = this.getAttribute("server");
|
|
1629
|
-
if (!r || !i) {
|
|
1630
|
-
ze(null, w(this, E)), clearTimeout(w(this, Le)), B(this, Le, setTimeout(() => {
|
|
1631
|
-
(!this.getAttribute("project") || !this.getAttribute("server")) && console.warn("[pleasenobugs] <please-no-bugs> needs both a `project` and a `server` attribute.");
|
|
1632
|
-
}, 1e3));
|
|
1633
|
-
return;
|
|
1634
|
-
}
|
|
1635
|
-
const o = this.hasAttribute("readonly"), l = `${i}|${r}|${o}`;
|
|
1636
|
-
(!w(this, te) || w(this, J) !== l) && (B(this, te, o ? zt({ server: i, project: r, signer: null, appLogin: null, storage: null }) : zt({ server: i, project: r, signer: w(this, ge), appLogin: w(this, ve) })), B(this, J, l)), q(this, P, bt).call(this, w(this, te), n);
|
|
1637
|
-
}, bt = function(n, r) {
|
|
1638
|
-
if (!w(this, E)) return;
|
|
1639
|
-
const i = this.getAttribute("mode") ?? "inline", o = {
|
|
1640
|
-
client: n,
|
|
1641
|
-
t: Vn(r, w(this, we)),
|
|
1642
|
-
locale: r,
|
|
1643
|
-
appName: this.getAttribute("app-name") ?? void 0,
|
|
1644
|
-
suggestName: this.getAttribute("name") ?? void 0,
|
|
1645
|
-
context: w(this, me),
|
|
1646
|
-
noise: w(this, xe),
|
|
1647
|
-
kinds: ka(this.getAttribute("kinds")),
|
|
1648
|
-
screenshots: ya(this.getAttribute("screenshots")),
|
|
1649
|
-
readonly: this.hasAttribute("readonly"),
|
|
1650
|
-
names: this.getAttribute("names") !== "off",
|
|
1651
|
-
onPosted: (h) => this.dispatchEvent(new CustomEvent("pleasenobugs:posted", { detail: h, bubbles: !0, composed: !0 }))
|
|
1652
|
-
}, l = this.hasAttribute("demo") && !o.readonly ? xa(this.getAttribute("screen")) : void 0, c = l === "button" ? void 0 : l;
|
|
1653
|
-
i === "floating" ? ze(/* @__PURE__ */ a(wa, { app: o, label: o.t("board.open"), screen: l }), w(this, E)) : i === "overlay" ? ze(/* @__PURE__ */ a(_n, { app: o, screen: c, onGone: () => this.close() }), w(this, E)) : ze(/* @__PURE__ */ a(hn, { ...o, screen: c }), w(this, E));
|
|
1654
|
-
}, St(bn, "observedAttributes", [
|
|
1655
|
-
"project",
|
|
1656
|
-
"server",
|
|
1657
|
-
"mode",
|
|
1658
|
-
"lang",
|
|
1659
|
-
"theme",
|
|
1660
|
-
"accent",
|
|
1661
|
-
"app-name",
|
|
1662
|
-
"name",
|
|
1663
|
-
"kinds",
|
|
1664
|
-
"screenshots",
|
|
1665
|
-
"readonly",
|
|
1666
|
-
"names",
|
|
1667
|
-
"demo",
|
|
1668
|
-
"screen"
|
|
1669
|
-
]);
|
|
1670
|
-
function xa(e) {
|
|
1671
|
-
return e ? { button: "button", tiles: "choose", board: "board", write: "compose", sent: "sent" }[e.trim().toLowerCase()] : void 0;
|
|
1672
|
-
}
|
|
1673
|
-
function _n({
|
|
1674
|
-
app: e,
|
|
1675
|
-
onGone: t,
|
|
1676
|
-
start: n,
|
|
1677
|
-
screen: r
|
|
1678
|
-
}) {
|
|
1679
|
-
const [i, o] = y(!1), l = qe(null), c = () => {
|
|
1680
|
-
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return t();
|
|
1681
|
-
o(!0);
|
|
1682
|
-
};
|
|
1683
|
-
return K(() => {
|
|
1684
|
-
const h = (p) => {
|
|
1685
|
-
p.key === "Escape" && !l.current?.querySelector(".scrim") && c();
|
|
1686
|
-
};
|
|
1687
|
-
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
|
|
1688
|
-
}), /* @__PURE__ */ a(pe, { children: [
|
|
1689
|
-
/* @__PURE__ */ a("div", { class: `backdrop${i ? " backdrop--leaving" : ""}`, onClick: c }),
|
|
1690
|
-
/* @__PURE__ */ a(
|
|
1691
|
-
"div",
|
|
1692
|
-
{
|
|
1693
|
-
ref: l,
|
|
1694
|
-
class: `overlay${i ? " overlay--leaving" : ""}`,
|
|
1695
|
-
role: "dialog",
|
|
1696
|
-
"aria-modal": "true",
|
|
1697
|
-
"aria-label": e.t("board.title"),
|
|
1698
|
-
onAnimationEnd: (h) => {
|
|
1699
|
-
i && h.target === h.currentTarget && t();
|
|
1700
|
-
},
|
|
1701
|
-
children: /* @__PURE__ */ a(hn, { ...e, onClose: c, start: n, screen: r })
|
|
1702
|
-
}
|
|
1703
|
-
)
|
|
1704
|
-
] });
|
|
1705
|
-
}
|
|
1706
|
-
function wa({ app: e, label: t, screen: n }) {
|
|
1707
|
-
const [r, i] = y(!!n && n !== "button");
|
|
1708
|
-
return K(() => {
|
|
1709
|
-
n && i(n !== "button");
|
|
1710
|
-
}, [n]), r ? /* @__PURE__ */ a(
|
|
1711
|
-
_n,
|
|
1712
|
-
{
|
|
1713
|
-
app: e,
|
|
1714
|
-
start: "choose",
|
|
1715
|
-
screen: n === "button" ? void 0 : n,
|
|
1716
|
-
onGone: () => i(!1)
|
|
1717
|
-
}
|
|
1718
|
-
) : /* @__PURE__ */ a("button", { type: "button", class: "fab", "aria-label": t, title: t, onClick: () => i(!0), children: /* @__PURE__ */ a(Jn, {}) });
|
|
1719
|
-
}
|
|
1720
|
-
function ya(e) {
|
|
1721
|
-
return e === null || e === "" || e === "board" ? "board" : e === "off" ? "off" : "owners";
|
|
1722
|
-
}
|
|
1723
|
-
function ka(e) {
|
|
1724
|
-
if (!(e === null || !e.trim()))
|
|
1725
|
-
return e.split(",").map((t) => t.trim().toLowerCase()).filter((t) => Mn.includes(t));
|
|
1726
|
-
}
|
|
1727
|
-
function Ca(e) {
|
|
1728
|
-
const t = e.trim().replace("#", ""), n = t.length === 3 ? [...t].map((o) => o + o).join("") : t.slice(0, 6);
|
|
1729
|
-
if (!/^[0-9a-f]{6}$/i.test(n)) return "#ffffff";
|
|
1730
|
-
const r = (o) => {
|
|
1731
|
-
const l = parseInt(n.slice(o, o + 2), 16) / 255;
|
|
1732
|
-
return l <= 0.03928 ? l / 12.92 : ((l + 0.055) / 1.055) ** 2.4;
|
|
1733
|
-
}, i = 0.2126 * r(0) + 0.7152 * r(2) + 0.0722 * r(4);
|
|
1734
|
-
return 1.05 / (i + 0.05) >= (i + 0.05) / 0.05 ? "#ffffff" : "#111118";
|
|
1735
|
-
}
|
|
1736
|
-
function Sa() {
|
|
1737
|
-
typeof customElements < "u" && !customElements.get(ht) && customElements.define(ht, bn);
|
|
1738
|
-
}
|
|
1739
|
-
Sa();
|
|
1740
|
-
function Ma(e) {
|
|
1741
|
-
const t = document.createElement(ht);
|
|
1742
|
-
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.accent && t.setAttribute("accent", e.accent), 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;
|
|
1743
|
-
const n = () => t.remove();
|
|
1744
|
-
return t.addEventListener("pleasenobugs:close", n, { once: !0 }), document.body.append(t), () => t.close();
|
|
1745
|
-
}
|
|
1746
|
-
export {
|
|
1747
|
-
Ta as D,
|
|
1748
|
-
bn as P,
|
|
1749
|
-
Ma as o,
|
|
1750
|
-
Ca as r
|
|
1751
|
-
};
|