@wsxjs/wsx-marked-components 0.0.18
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/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +1680 -0
- package/package.json +62 -0
- package/src/Blockquote.css +12 -0
- package/src/Blockquote.wsx +26 -0
- package/src/Code.css +34 -0
- package/src/Code.wsx +46 -0
- package/src/Error.wsx +34 -0
- package/src/Heading.css +37 -0
- package/src/Heading.wsx +44 -0
- package/src/List.wsx +67 -0
- package/src/Markdown.css +66 -0
- package/src/Markdown.wsx +269 -0
- package/src/Paragraph.wsx +36 -0
- package/src/index.ts +16 -0
- package/src/marked-utils.ts +111 -0
- package/src/types/wsx.d.ts +5 -0
- package/src/types.ts +57 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1680 @@
|
|
|
1
|
+
import { autoRegister as Y, LightComponent as X, jsx as V } from "@wsxjs/wsx-core";
|
|
2
|
+
import { marked as be } from "marked";
|
|
3
|
+
const ye = "wsx-marked-heading{display:block}wsx-marked-heading h1{font-size:2.5rem;font-weight:700;margin:1.5rem 0 1rem;color:var(--text-primary, #2c3e50);border-bottom:2px solid var(--primary-red, #dc2626);padding-bottom:.5rem}wsx-marked-heading h2{font-size:2rem;font-weight:600;margin:1.25rem 0 .75rem;color:var(--text-primary, #2c3e50)}wsx-marked-heading h3{font-size:1.5rem;font-weight:600;margin:1rem 0 .5rem;color:var(--text-primary, #2c3e50)}wsx-marked-heading h4,wsx-marked-heading h5,wsx-marked-heading h6{font-size:1.25rem;font-weight:600;margin:.75rem 0 .5rem;color:var(--text-primary, #2c3e50)}";
|
|
4
|
+
var De;
|
|
5
|
+
let Re, Me;
|
|
6
|
+
function se(e, t, r) {
|
|
7
|
+
return (t = Ne(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
8
|
+
}
|
|
9
|
+
function ft(e, t, r, c, v, R) {
|
|
10
|
+
function j(n, o, l) {
|
|
11
|
+
return function(a, s) {
|
|
12
|
+
return l && l(a), n[o].call(a, s);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function S(n, o) {
|
|
16
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
17
|
+
return o;
|
|
18
|
+
}
|
|
19
|
+
function y(n, o, l, a) {
|
|
20
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
24
|
+
function _(u) {
|
|
25
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
26
|
+
}
|
|
27
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
28
|
+
if (!C) {
|
|
29
|
+
l || Array.isArray(w) || (w = [w]);
|
|
30
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
31
|
+
k ? (b || h ? i = { get: ve(function() {
|
|
32
|
+
return x(this);
|
|
33
|
+
}, a, "get"), set: function(u) {
|
|
34
|
+
o[4](this, u);
|
|
35
|
+
} } : i[p] = x, b || ve(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
36
|
+
}
|
|
37
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
38
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
39
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
40
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
41
|
+
}).bind(null, J) };
|
|
42
|
+
try {
|
|
43
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
44
|
+
else {
|
|
45
|
+
var I, P;
|
|
46
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
47
|
+
return _(u), i.value;
|
|
48
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
49
|
+
return u[a];
|
|
50
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
51
|
+
u[a] = O;
|
|
52
|
+
}));
|
|
53
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
54
|
+
return a in u;
|
|
55
|
+
} };
|
|
56
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
57
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
58
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
59
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
60
|
+
}
|
|
61
|
+
} finally {
|
|
62
|
+
J.v = !0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return (b || h) && $.push(function(u, O) {
|
|
66
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
67
|
+
return O;
|
|
68
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
69
|
+
}
|
|
70
|
+
function E(n, o) {
|
|
71
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
72
|
+
}
|
|
73
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
74
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
75
|
+
var s, A, D = [], $ = function(p) {
|
|
76
|
+
return mt(p) === n;
|
|
77
|
+
}, H = /* @__PURE__ */ new Map();
|
|
78
|
+
function k(p) {
|
|
79
|
+
p && D.push(S.bind(null, p));
|
|
80
|
+
}
|
|
81
|
+
for (var b = 0; b < o.length; b++) {
|
|
82
|
+
var h = o[b];
|
|
83
|
+
if (Array.isArray(h)) {
|
|
84
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
85
|
+
if (!C && !f) {
|
|
86
|
+
var T = H.get(i);
|
|
87
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
88
|
+
H.set(i, !(g > 2) || g);
|
|
89
|
+
}
|
|
90
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : Ne(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return k(s), k(A), D;
|
|
94
|
+
}(e, t, v, M);
|
|
95
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
96
|
+
var n = [];
|
|
97
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
98
|
+
} };
|
|
99
|
+
}
|
|
100
|
+
function Ne(e) {
|
|
101
|
+
var t = dt(e, "string");
|
|
102
|
+
return typeof t == "symbol" ? t : t + "";
|
|
103
|
+
}
|
|
104
|
+
function dt(e, t) {
|
|
105
|
+
if (typeof e != "object" || !e) return e;
|
|
106
|
+
var r = e[Symbol.toPrimitive];
|
|
107
|
+
if (r !== void 0) {
|
|
108
|
+
var c = r.call(e, t);
|
|
109
|
+
if (typeof c != "object") return c;
|
|
110
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
111
|
+
}
|
|
112
|
+
return String(e);
|
|
113
|
+
}
|
|
114
|
+
function ve(e, t, r) {
|
|
115
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
116
|
+
try {
|
|
117
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
118
|
+
} catch {
|
|
119
|
+
}
|
|
120
|
+
return e;
|
|
121
|
+
}
|
|
122
|
+
function mt(e) {
|
|
123
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
Me = [Y({
|
|
127
|
+
tagName: "wsx-marked-heading"
|
|
128
|
+
})];
|
|
129
|
+
let ht;
|
|
130
|
+
class gt extends X {
|
|
131
|
+
constructor() {
|
|
132
|
+
super({
|
|
133
|
+
styles: ye,
|
|
134
|
+
styleName: "wsx-marked-heading"
|
|
135
|
+
}), se(this, "_autoStyles", ye), se(this, "level", 1), se(this, "text", "");
|
|
136
|
+
}
|
|
137
|
+
static get observedAttributes() {
|
|
138
|
+
return ["level", "text"];
|
|
139
|
+
}
|
|
140
|
+
attributeChangedCallback(t, r, c) {
|
|
141
|
+
t === "level" ? this.level = parseInt(c, 10) || 1 : t === "text" && (this.text = c), this.rerender();
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return this.level === 1 ? /* @__PURE__ */ V("h1", null, this.text) : this.level === 2 ? /* @__PURE__ */ V("h2", null, this.text) : this.level === 3 ? /* @__PURE__ */ V("h3", null, this.text) : this.level === 4 ? /* @__PURE__ */ V("h4", null, this.text) : this.level === 5 ? /* @__PURE__ */ V("h5", null, this.text) : /* @__PURE__ */ V("h6", null, this.text);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
De = gt;
|
|
148
|
+
[ht, Re] = ft(De, [], Me, 0, void 0, X).c;
|
|
149
|
+
Re();
|
|
150
|
+
const ke = "wsx-marked-code{display:block;margin:1rem 0}wsx-marked-code pre{background:var(--bg-secondary, #f5f5f5);border:1px solid var(--border-color, #e0e0e0);border-radius:8px;padding:1rem;overflow-x:auto;font-family:Courier New,monospace;font-size:.9rem;line-height:1.5}wsx-marked-code code{background:transparent;padding:0;border:none;font-family:inherit}wsx-marked-code .language-label{display:inline-block;background:var(--primary-red, #dc2626);color:#fff;padding:.25rem .5rem;font-size:.75rem;border-radius:4px 4px 0 0;margin-bottom:-1px}";
|
|
151
|
+
var Ie;
|
|
152
|
+
let He, qe;
|
|
153
|
+
function ce(e, t, r) {
|
|
154
|
+
return (t = Pe(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
155
|
+
}
|
|
156
|
+
function pt(e, t, r, c, v, R) {
|
|
157
|
+
function j(n, o, l) {
|
|
158
|
+
return function(a, s) {
|
|
159
|
+
return l && l(a), n[o].call(a, s);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function S(n, o) {
|
|
163
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
164
|
+
return o;
|
|
165
|
+
}
|
|
166
|
+
function y(n, o, l, a) {
|
|
167
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
168
|
+
return n;
|
|
169
|
+
}
|
|
170
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
171
|
+
function _(u) {
|
|
172
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
173
|
+
}
|
|
174
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
175
|
+
if (!C) {
|
|
176
|
+
l || Array.isArray(w) || (w = [w]);
|
|
177
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
178
|
+
k ? (b || h ? i = { get: je(function() {
|
|
179
|
+
return x(this);
|
|
180
|
+
}, a, "get"), set: function(u) {
|
|
181
|
+
o[4](this, u);
|
|
182
|
+
} } : i[p] = x, b || je(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
183
|
+
}
|
|
184
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
185
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
186
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
187
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
188
|
+
}).bind(null, J) };
|
|
189
|
+
try {
|
|
190
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
191
|
+
else {
|
|
192
|
+
var I, P;
|
|
193
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
194
|
+
return _(u), i.value;
|
|
195
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
196
|
+
return u[a];
|
|
197
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
198
|
+
u[a] = O;
|
|
199
|
+
}));
|
|
200
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
201
|
+
return a in u;
|
|
202
|
+
} };
|
|
203
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
204
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
205
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
206
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
207
|
+
}
|
|
208
|
+
} finally {
|
|
209
|
+
J.v = !0;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return (b || h) && $.push(function(u, O) {
|
|
213
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
214
|
+
return O;
|
|
215
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
216
|
+
}
|
|
217
|
+
function E(n, o) {
|
|
218
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
219
|
+
}
|
|
220
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
221
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
222
|
+
var s, A, D = [], $ = function(p) {
|
|
223
|
+
return yt(p) === n;
|
|
224
|
+
}, H = /* @__PURE__ */ new Map();
|
|
225
|
+
function k(p) {
|
|
226
|
+
p && D.push(S.bind(null, p));
|
|
227
|
+
}
|
|
228
|
+
for (var b = 0; b < o.length; b++) {
|
|
229
|
+
var h = o[b];
|
|
230
|
+
if (Array.isArray(h)) {
|
|
231
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
232
|
+
if (!C && !f) {
|
|
233
|
+
var T = H.get(i);
|
|
234
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
235
|
+
H.set(i, !(g > 2) || g);
|
|
236
|
+
}
|
|
237
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : Pe(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return k(s), k(A), D;
|
|
241
|
+
}(e, t, v, M);
|
|
242
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
243
|
+
var n = [];
|
|
244
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
245
|
+
} };
|
|
246
|
+
}
|
|
247
|
+
function Pe(e) {
|
|
248
|
+
var t = bt(e, "string");
|
|
249
|
+
return typeof t == "symbol" ? t : t + "";
|
|
250
|
+
}
|
|
251
|
+
function bt(e, t) {
|
|
252
|
+
if (typeof e != "object" || !e) return e;
|
|
253
|
+
var r = e[Symbol.toPrimitive];
|
|
254
|
+
if (r !== void 0) {
|
|
255
|
+
var c = r.call(e, t);
|
|
256
|
+
if (typeof c != "object") return c;
|
|
257
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
258
|
+
}
|
|
259
|
+
return String(e);
|
|
260
|
+
}
|
|
261
|
+
function je(e, t, r) {
|
|
262
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
263
|
+
try {
|
|
264
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
265
|
+
} catch {
|
|
266
|
+
}
|
|
267
|
+
return e;
|
|
268
|
+
}
|
|
269
|
+
function yt(e) {
|
|
270
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
271
|
+
return e;
|
|
272
|
+
}
|
|
273
|
+
qe = [Y({
|
|
274
|
+
tagName: "wsx-marked-code"
|
|
275
|
+
})];
|
|
276
|
+
let vt;
|
|
277
|
+
class kt extends X {
|
|
278
|
+
constructor() {
|
|
279
|
+
super({
|
|
280
|
+
styles: ke,
|
|
281
|
+
styleName: "wsx-marked-code"
|
|
282
|
+
}), ce(this, "_autoStyles", ke), ce(this, "code", ""), ce(this, "language", "");
|
|
283
|
+
}
|
|
284
|
+
static get observedAttributes() {
|
|
285
|
+
return ["code", "language"];
|
|
286
|
+
}
|
|
287
|
+
attributeChangedCallback(t, r, c) {
|
|
288
|
+
t === "code" ? this.code = c || "" : t === "language" && (this.language = c || ""), this.rerender();
|
|
289
|
+
}
|
|
290
|
+
render() {
|
|
291
|
+
return /* @__PURE__ */ V("div", null, this.language && /* @__PURE__ */ V("span", { class: "language-label" }, this.language), /* @__PURE__ */ V("pre", null, /* @__PURE__ */ V("code", null, this.code)));
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
Ie = kt;
|
|
295
|
+
[vt, He] = pt(Ie, [], qe, 0, void 0, X).c;
|
|
296
|
+
He();
|
|
297
|
+
const _e = "wsx-marked-blockquote{display:block;margin:1rem 0;padding:1rem 1.5rem;border-left:4px solid var(--primary-red, #dc2626);background:var(--bg-secondary, #f9f9f9);border-radius:4px;font-style:italic;color:var(--text-secondary, #666)}";
|
|
298
|
+
var Ve;
|
|
299
|
+
let Be, Ke;
|
|
300
|
+
function jt(e, t, r) {
|
|
301
|
+
return (t = We(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
302
|
+
}
|
|
303
|
+
function _t(e, t, r, c, v, R) {
|
|
304
|
+
function j(n, o, l) {
|
|
305
|
+
return function(a, s) {
|
|
306
|
+
return l && l(a), n[o].call(a, s);
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function S(n, o) {
|
|
310
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
311
|
+
return o;
|
|
312
|
+
}
|
|
313
|
+
function y(n, o, l, a) {
|
|
314
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
315
|
+
return n;
|
|
316
|
+
}
|
|
317
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
318
|
+
function _(u) {
|
|
319
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
320
|
+
}
|
|
321
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
322
|
+
if (!C) {
|
|
323
|
+
l || Array.isArray(w) || (w = [w]);
|
|
324
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
325
|
+
k ? (b || h ? i = { get: we(function() {
|
|
326
|
+
return x(this);
|
|
327
|
+
}, a, "get"), set: function(u) {
|
|
328
|
+
o[4](this, u);
|
|
329
|
+
} } : i[p] = x, b || we(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
330
|
+
}
|
|
331
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
332
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
333
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
334
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
335
|
+
}).bind(null, J) };
|
|
336
|
+
try {
|
|
337
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
338
|
+
else {
|
|
339
|
+
var I, P;
|
|
340
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
341
|
+
return _(u), i.value;
|
|
342
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
343
|
+
return u[a];
|
|
344
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
345
|
+
u[a] = O;
|
|
346
|
+
}));
|
|
347
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
348
|
+
return a in u;
|
|
349
|
+
} };
|
|
350
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
351
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
352
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
353
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
354
|
+
}
|
|
355
|
+
} finally {
|
|
356
|
+
J.v = !0;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return (b || h) && $.push(function(u, O) {
|
|
360
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
361
|
+
return O;
|
|
362
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
363
|
+
}
|
|
364
|
+
function E(n, o) {
|
|
365
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
366
|
+
}
|
|
367
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
368
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
369
|
+
var s, A, D = [], $ = function(p) {
|
|
370
|
+
return xt(p) === n;
|
|
371
|
+
}, H = /* @__PURE__ */ new Map();
|
|
372
|
+
function k(p) {
|
|
373
|
+
p && D.push(S.bind(null, p));
|
|
374
|
+
}
|
|
375
|
+
for (var b = 0; b < o.length; b++) {
|
|
376
|
+
var h = o[b];
|
|
377
|
+
if (Array.isArray(h)) {
|
|
378
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
379
|
+
if (!C && !f) {
|
|
380
|
+
var T = H.get(i);
|
|
381
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
382
|
+
H.set(i, !(g > 2) || g);
|
|
383
|
+
}
|
|
384
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : We(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return k(s), k(A), D;
|
|
388
|
+
}(e, t, v, M);
|
|
389
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
390
|
+
var n = [];
|
|
391
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
392
|
+
} };
|
|
393
|
+
}
|
|
394
|
+
function We(e) {
|
|
395
|
+
var t = wt(e, "string");
|
|
396
|
+
return typeof t == "symbol" ? t : t + "";
|
|
397
|
+
}
|
|
398
|
+
function wt(e, t) {
|
|
399
|
+
if (typeof e != "object" || !e) return e;
|
|
400
|
+
var r = e[Symbol.toPrimitive];
|
|
401
|
+
if (r !== void 0) {
|
|
402
|
+
var c = r.call(e, t);
|
|
403
|
+
if (typeof c != "object") return c;
|
|
404
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
405
|
+
}
|
|
406
|
+
return String(e);
|
|
407
|
+
}
|
|
408
|
+
function we(e, t, r) {
|
|
409
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
410
|
+
try {
|
|
411
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
412
|
+
} catch {
|
|
413
|
+
}
|
|
414
|
+
return e;
|
|
415
|
+
}
|
|
416
|
+
function xt(e) {
|
|
417
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
418
|
+
return e;
|
|
419
|
+
}
|
|
420
|
+
Ke = [Y({
|
|
421
|
+
tagName: "wsx-marked-blockquote"
|
|
422
|
+
})];
|
|
423
|
+
let Tt;
|
|
424
|
+
class Ot extends X {
|
|
425
|
+
constructor() {
|
|
426
|
+
super({
|
|
427
|
+
styles: _e,
|
|
428
|
+
styleName: "wsx-marked-blockquote"
|
|
429
|
+
}), jt(this, "_autoStyles", _e);
|
|
430
|
+
}
|
|
431
|
+
render() {
|
|
432
|
+
return /* @__PURE__ */ V("blockquote", null, /* @__PURE__ */ V("slot", null));
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
Ve = Ot;
|
|
436
|
+
[Tt, Be] = _t(Ve, [], Ke, 0, void 0, X).c;
|
|
437
|
+
Be();
|
|
438
|
+
var Je;
|
|
439
|
+
let Ge, Xe;
|
|
440
|
+
function Et(e, t, r) {
|
|
441
|
+
return (t = Fe(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
442
|
+
}
|
|
443
|
+
function St(e, t, r, c, v, R) {
|
|
444
|
+
function j(n, o, l) {
|
|
445
|
+
return function(a, s) {
|
|
446
|
+
return l && l(a), n[o].call(a, s);
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function S(n, o) {
|
|
450
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
451
|
+
return o;
|
|
452
|
+
}
|
|
453
|
+
function y(n, o, l, a) {
|
|
454
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
455
|
+
return n;
|
|
456
|
+
}
|
|
457
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
458
|
+
function _(u) {
|
|
459
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
460
|
+
}
|
|
461
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
462
|
+
if (!C) {
|
|
463
|
+
l || Array.isArray(w) || (w = [w]);
|
|
464
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
465
|
+
k ? (b || h ? i = { get: xe(function() {
|
|
466
|
+
return x(this);
|
|
467
|
+
}, a, "get"), set: function(u) {
|
|
468
|
+
o[4](this, u);
|
|
469
|
+
} } : i[p] = x, b || xe(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
470
|
+
}
|
|
471
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
472
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
473
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
474
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
475
|
+
}).bind(null, J) };
|
|
476
|
+
try {
|
|
477
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
478
|
+
else {
|
|
479
|
+
var I, P;
|
|
480
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
481
|
+
return _(u), i.value;
|
|
482
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
483
|
+
return u[a];
|
|
484
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
485
|
+
u[a] = O;
|
|
486
|
+
}));
|
|
487
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
488
|
+
return a in u;
|
|
489
|
+
} };
|
|
490
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
491
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
492
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
493
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
494
|
+
}
|
|
495
|
+
} finally {
|
|
496
|
+
J.v = !0;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
return (b || h) && $.push(function(u, O) {
|
|
500
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
501
|
+
return O;
|
|
502
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
503
|
+
}
|
|
504
|
+
function E(n, o) {
|
|
505
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
506
|
+
}
|
|
507
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
508
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
509
|
+
var s, A, D = [], $ = function(p) {
|
|
510
|
+
return $t(p) === n;
|
|
511
|
+
}, H = /* @__PURE__ */ new Map();
|
|
512
|
+
function k(p) {
|
|
513
|
+
p && D.push(S.bind(null, p));
|
|
514
|
+
}
|
|
515
|
+
for (var b = 0; b < o.length; b++) {
|
|
516
|
+
var h = o[b];
|
|
517
|
+
if (Array.isArray(h)) {
|
|
518
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
519
|
+
if (!C && !f) {
|
|
520
|
+
var T = H.get(i);
|
|
521
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
522
|
+
H.set(i, !(g > 2) || g);
|
|
523
|
+
}
|
|
524
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : Fe(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
return k(s), k(A), D;
|
|
528
|
+
}(e, t, v, M);
|
|
529
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
530
|
+
var n = [];
|
|
531
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
532
|
+
} };
|
|
533
|
+
}
|
|
534
|
+
function Fe(e) {
|
|
535
|
+
var t = zt(e, "string");
|
|
536
|
+
return typeof t == "symbol" ? t : t + "";
|
|
537
|
+
}
|
|
538
|
+
function zt(e, t) {
|
|
539
|
+
if (typeof e != "object" || !e) return e;
|
|
540
|
+
var r = e[Symbol.toPrimitive];
|
|
541
|
+
if (r !== void 0) {
|
|
542
|
+
var c = r.call(e, t);
|
|
543
|
+
if (typeof c != "object") return c;
|
|
544
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
545
|
+
}
|
|
546
|
+
return String(e);
|
|
547
|
+
}
|
|
548
|
+
function xe(e, t, r) {
|
|
549
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
550
|
+
try {
|
|
551
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
552
|
+
} catch {
|
|
553
|
+
}
|
|
554
|
+
return e;
|
|
555
|
+
}
|
|
556
|
+
function $t(e) {
|
|
557
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
558
|
+
return e;
|
|
559
|
+
}
|
|
560
|
+
Xe = [Y({
|
|
561
|
+
tagName: "wsx-marked-paragraph"
|
|
562
|
+
})];
|
|
563
|
+
let Lt;
|
|
564
|
+
class Ct extends X {
|
|
565
|
+
constructor() {
|
|
566
|
+
super({
|
|
567
|
+
styleName: "wsx-marked-paragraph"
|
|
568
|
+
}), Et(this, "content", void 0);
|
|
569
|
+
const [t, r] = this.useState("content", "");
|
|
570
|
+
Object.defineProperty(this, "content", {
|
|
571
|
+
get: t,
|
|
572
|
+
set: r,
|
|
573
|
+
enumerable: !0,
|
|
574
|
+
configurable: !0
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
static get observedAttributes() {
|
|
578
|
+
return ["content"];
|
|
579
|
+
}
|
|
580
|
+
attributeChangedCallback(t, r, c) {
|
|
581
|
+
t === "content" && (this.content = c || "");
|
|
582
|
+
}
|
|
583
|
+
render() {
|
|
584
|
+
return /* @__PURE__ */ V("p", { class: "marked-paragraph" }, this.content);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
Je = Ct;
|
|
588
|
+
[Lt, Ge] = St(Je, [], Xe, 0, void 0, X).c;
|
|
589
|
+
Ge();
|
|
590
|
+
var Ue;
|
|
591
|
+
let Qe, Ye;
|
|
592
|
+
function Te(e, t, r) {
|
|
593
|
+
return (t = Ze(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
594
|
+
}
|
|
595
|
+
function At(e, t, r, c, v, R) {
|
|
596
|
+
function j(n, o, l) {
|
|
597
|
+
return function(a, s) {
|
|
598
|
+
return l && l(a), n[o].call(a, s);
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
function S(n, o) {
|
|
602
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
603
|
+
return o;
|
|
604
|
+
}
|
|
605
|
+
function y(n, o, l, a) {
|
|
606
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
607
|
+
return n;
|
|
608
|
+
}
|
|
609
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
610
|
+
function _(u) {
|
|
611
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
612
|
+
}
|
|
613
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
614
|
+
if (!C) {
|
|
615
|
+
l || Array.isArray(w) || (w = [w]);
|
|
616
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
617
|
+
k ? (b || h ? i = { get: Oe(function() {
|
|
618
|
+
return x(this);
|
|
619
|
+
}, a, "get"), set: function(u) {
|
|
620
|
+
o[4](this, u);
|
|
621
|
+
} } : i[p] = x, b || Oe(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
622
|
+
}
|
|
623
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
624
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
625
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
626
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
627
|
+
}).bind(null, J) };
|
|
628
|
+
try {
|
|
629
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
630
|
+
else {
|
|
631
|
+
var I, P;
|
|
632
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
633
|
+
return _(u), i.value;
|
|
634
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
635
|
+
return u[a];
|
|
636
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
637
|
+
u[a] = O;
|
|
638
|
+
}));
|
|
639
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
640
|
+
return a in u;
|
|
641
|
+
} };
|
|
642
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
643
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
644
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
645
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
646
|
+
}
|
|
647
|
+
} finally {
|
|
648
|
+
J.v = !0;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return (b || h) && $.push(function(u, O) {
|
|
652
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
653
|
+
return O;
|
|
654
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
655
|
+
}
|
|
656
|
+
function E(n, o) {
|
|
657
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
658
|
+
}
|
|
659
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
660
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
661
|
+
var s, A, D = [], $ = function(p) {
|
|
662
|
+
return Rt(p) === n;
|
|
663
|
+
}, H = /* @__PURE__ */ new Map();
|
|
664
|
+
function k(p) {
|
|
665
|
+
p && D.push(S.bind(null, p));
|
|
666
|
+
}
|
|
667
|
+
for (var b = 0; b < o.length; b++) {
|
|
668
|
+
var h = o[b];
|
|
669
|
+
if (Array.isArray(h)) {
|
|
670
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
671
|
+
if (!C && !f) {
|
|
672
|
+
var T = H.get(i);
|
|
673
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
674
|
+
H.set(i, !(g > 2) || g);
|
|
675
|
+
}
|
|
676
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : Ze(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
return k(s), k(A), D;
|
|
680
|
+
}(e, t, v, M);
|
|
681
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
682
|
+
var n = [];
|
|
683
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
684
|
+
} };
|
|
685
|
+
}
|
|
686
|
+
function Ze(e) {
|
|
687
|
+
var t = Dt(e, "string");
|
|
688
|
+
return typeof t == "symbol" ? t : t + "";
|
|
689
|
+
}
|
|
690
|
+
function Dt(e, t) {
|
|
691
|
+
if (typeof e != "object" || !e) return e;
|
|
692
|
+
var r = e[Symbol.toPrimitive];
|
|
693
|
+
if (r !== void 0) {
|
|
694
|
+
var c = r.call(e, t);
|
|
695
|
+
if (typeof c != "object") return c;
|
|
696
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
697
|
+
}
|
|
698
|
+
return String(e);
|
|
699
|
+
}
|
|
700
|
+
function Oe(e, t, r) {
|
|
701
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
702
|
+
try {
|
|
703
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
704
|
+
} catch {
|
|
705
|
+
}
|
|
706
|
+
return e;
|
|
707
|
+
}
|
|
708
|
+
function Rt(e) {
|
|
709
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
710
|
+
return e;
|
|
711
|
+
}
|
|
712
|
+
Ye = [Y({
|
|
713
|
+
tagName: "wsx-marked-list"
|
|
714
|
+
})];
|
|
715
|
+
let Mt;
|
|
716
|
+
class Nt extends X {
|
|
717
|
+
constructor() {
|
|
718
|
+
super({
|
|
719
|
+
styleName: "wsx-marked-list"
|
|
720
|
+
}), Te(this, "ordered", void 0), Te(this, "items", void 0);
|
|
721
|
+
const [t, r] = this.useState("ordered", !1);
|
|
722
|
+
Object.defineProperty(this, "ordered", {
|
|
723
|
+
get: t,
|
|
724
|
+
set: r,
|
|
725
|
+
enumerable: !0,
|
|
726
|
+
configurable: !0
|
|
727
|
+
});
|
|
728
|
+
let c = this.reactive([]);
|
|
729
|
+
Object.defineProperty(this, "items", {
|
|
730
|
+
get: () => c,
|
|
731
|
+
set: (v) => {
|
|
732
|
+
c = v !== null && typeof v < "u" && (Array.isArray(v) || typeof v == "object") ? this.reactive(v) : v, this.scheduleRerender();
|
|
733
|
+
},
|
|
734
|
+
enumerable: !0,
|
|
735
|
+
configurable: !0
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
static get observedAttributes() {
|
|
739
|
+
return ["ordered", "items"];
|
|
740
|
+
}
|
|
741
|
+
attributeChangedCallback(t, r, c) {
|
|
742
|
+
if (t === "ordered")
|
|
743
|
+
this.ordered = c === "true";
|
|
744
|
+
else if (t === "items")
|
|
745
|
+
try {
|
|
746
|
+
this.items = JSON.parse(c || "[]");
|
|
747
|
+
} catch {
|
|
748
|
+
this.items = [];
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
render() {
|
|
752
|
+
return this.ordered ? /* @__PURE__ */ V("ol", { class: "marked-list" }, this.items.map((t, r) => /* @__PURE__ */ V("li", { key: r, class: "marked-list-item" }, t))) : /* @__PURE__ */ V("ul", { class: "marked-list" }, this.items.map((t, r) => /* @__PURE__ */ V("li", { key: r, class: "marked-list-item" }, t)));
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
Ue = Nt;
|
|
756
|
+
[Mt, Qe] = At(Ue, [], Ye, 0, void 0, X).c;
|
|
757
|
+
Qe();
|
|
758
|
+
var et;
|
|
759
|
+
let tt, rt;
|
|
760
|
+
function It(e, t, r) {
|
|
761
|
+
return (t = nt(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
762
|
+
}
|
|
763
|
+
function Ht(e, t, r, c, v, R) {
|
|
764
|
+
function j(n, o, l) {
|
|
765
|
+
return function(a, s) {
|
|
766
|
+
return l && l(a), n[o].call(a, s);
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
function S(n, o) {
|
|
770
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
771
|
+
return o;
|
|
772
|
+
}
|
|
773
|
+
function y(n, o, l, a) {
|
|
774
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
775
|
+
return n;
|
|
776
|
+
}
|
|
777
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
778
|
+
function _(u) {
|
|
779
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
780
|
+
}
|
|
781
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
782
|
+
if (!C) {
|
|
783
|
+
l || Array.isArray(w) || (w = [w]);
|
|
784
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
785
|
+
k ? (b || h ? i = { get: Ee(function() {
|
|
786
|
+
return x(this);
|
|
787
|
+
}, a, "get"), set: function(u) {
|
|
788
|
+
o[4](this, u);
|
|
789
|
+
} } : i[p] = x, b || Ee(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
790
|
+
}
|
|
791
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
792
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
793
|
+
if (u.v) throw de("attempted to call addInitializer after decoration was finished");
|
|
794
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
795
|
+
}).bind(null, J) };
|
|
796
|
+
try {
|
|
797
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
798
|
+
else {
|
|
799
|
+
var I, P;
|
|
800
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
801
|
+
return _(u), i.value;
|
|
802
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
803
|
+
return u[a];
|
|
804
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
805
|
+
u[a] = O;
|
|
806
|
+
}));
|
|
807
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
808
|
+
return a in u;
|
|
809
|
+
} };
|
|
810
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
811
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
812
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
813
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
814
|
+
}
|
|
815
|
+
} finally {
|
|
816
|
+
J.v = !0;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return (b || h) && $.push(function(u, O) {
|
|
820
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
821
|
+
return O;
|
|
822
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
823
|
+
}
|
|
824
|
+
function E(n, o) {
|
|
825
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
826
|
+
}
|
|
827
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
828
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
829
|
+
var s, A, D = [], $ = function(p) {
|
|
830
|
+
return Pt(p) === n;
|
|
831
|
+
}, H = /* @__PURE__ */ new Map();
|
|
832
|
+
function k(p) {
|
|
833
|
+
p && D.push(S.bind(null, p));
|
|
834
|
+
}
|
|
835
|
+
for (var b = 0; b < o.length; b++) {
|
|
836
|
+
var h = o[b];
|
|
837
|
+
if (Array.isArray(h)) {
|
|
838
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
839
|
+
if (!C && !f) {
|
|
840
|
+
var T = H.get(i);
|
|
841
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw de("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
842
|
+
H.set(i, !(g > 2) || g);
|
|
843
|
+
}
|
|
844
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : nt(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return k(s), k(A), D;
|
|
848
|
+
}(e, t, v, M);
|
|
849
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
850
|
+
var n = [];
|
|
851
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
852
|
+
} };
|
|
853
|
+
}
|
|
854
|
+
function nt(e) {
|
|
855
|
+
var t = qt(e, "string");
|
|
856
|
+
return typeof t == "symbol" ? t : t + "";
|
|
857
|
+
}
|
|
858
|
+
function qt(e, t) {
|
|
859
|
+
if (typeof e != "object" || !e) return e;
|
|
860
|
+
var r = e[Symbol.toPrimitive];
|
|
861
|
+
if (r !== void 0) {
|
|
862
|
+
var c = r.call(e, t);
|
|
863
|
+
if (typeof c != "object") return c;
|
|
864
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
865
|
+
}
|
|
866
|
+
return String(e);
|
|
867
|
+
}
|
|
868
|
+
function Ee(e, t, r) {
|
|
869
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
870
|
+
try {
|
|
871
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
872
|
+
} catch {
|
|
873
|
+
}
|
|
874
|
+
return e;
|
|
875
|
+
}
|
|
876
|
+
function Pt(e) {
|
|
877
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
878
|
+
return e;
|
|
879
|
+
}
|
|
880
|
+
rt = [Y({
|
|
881
|
+
tagName: "wsx-marked-error"
|
|
882
|
+
})];
|
|
883
|
+
let Vt, de = class extends X {
|
|
884
|
+
constructor() {
|
|
885
|
+
super({
|
|
886
|
+
styleName: "wsx-marked-error"
|
|
887
|
+
}), It(this, "message", "");
|
|
888
|
+
}
|
|
889
|
+
static get observedAttributes() {
|
|
890
|
+
return ["message"];
|
|
891
|
+
}
|
|
892
|
+
attributeChangedCallback(t, r, c) {
|
|
893
|
+
t === "message" && (this.message = c || "", this.rerender());
|
|
894
|
+
}
|
|
895
|
+
render() {
|
|
896
|
+
return /* @__PURE__ */ V("div", { class: "error" }, this.message);
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
et = de;
|
|
900
|
+
[Vt, tt] = Ht(et, [], rt, 0, void 0, X).c;
|
|
901
|
+
tt();
|
|
902
|
+
function Bt(e) {
|
|
903
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
904
|
+
}
|
|
905
|
+
var ae = { exports: {} };
|
|
906
|
+
function Kt(e) {
|
|
907
|
+
try {
|
|
908
|
+
return JSON.stringify(e);
|
|
909
|
+
} catch {
|
|
910
|
+
return '"[Circular]"';
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
var Wt = Jt;
|
|
914
|
+
function Jt(e, t, r) {
|
|
915
|
+
var c = r && r.stringify || Kt, v = 1;
|
|
916
|
+
if (typeof e == "object" && e !== null) {
|
|
917
|
+
var R = t.length + v;
|
|
918
|
+
if (R === 1) return e;
|
|
919
|
+
var j = new Array(R);
|
|
920
|
+
j[0] = c(e);
|
|
921
|
+
for (var S = 1; S < R; S++)
|
|
922
|
+
j[S] = c(t[S]);
|
|
923
|
+
return j.join(" ");
|
|
924
|
+
}
|
|
925
|
+
if (typeof e != "string")
|
|
926
|
+
return e;
|
|
927
|
+
var y = t.length;
|
|
928
|
+
if (y === 0) return e;
|
|
929
|
+
for (var m = "", E = 1 - v, z = -1, M = e && e.length || 0, L = 0; L < M; ) {
|
|
930
|
+
if (e.charCodeAt(L) === 37 && L + 1 < M) {
|
|
931
|
+
switch (z = z > -1 ? z : 0, e.charCodeAt(L + 1)) {
|
|
932
|
+
case 100:
|
|
933
|
+
// 'd'
|
|
934
|
+
case 102:
|
|
935
|
+
if (E >= y || t[E] == null) break;
|
|
936
|
+
z < L && (m += e.slice(z, L)), m += Number(t[E]), z = L + 2, L++;
|
|
937
|
+
break;
|
|
938
|
+
case 105:
|
|
939
|
+
if (E >= y || t[E] == null) break;
|
|
940
|
+
z < L && (m += e.slice(z, L)), m += Math.floor(Number(t[E])), z = L + 2, L++;
|
|
941
|
+
break;
|
|
942
|
+
case 79:
|
|
943
|
+
// 'O'
|
|
944
|
+
case 111:
|
|
945
|
+
// 'o'
|
|
946
|
+
case 106:
|
|
947
|
+
if (E >= y || t[E] === void 0) break;
|
|
948
|
+
z < L && (m += e.slice(z, L));
|
|
949
|
+
var n = typeof t[E];
|
|
950
|
+
if (n === "string") {
|
|
951
|
+
m += "'" + t[E] + "'", z = L + 2, L++;
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
if (n === "function") {
|
|
955
|
+
m += t[E].name || "<anonymous>", z = L + 2, L++;
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
m += c(t[E]), z = L + 2, L++;
|
|
959
|
+
break;
|
|
960
|
+
case 115:
|
|
961
|
+
if (E >= y)
|
|
962
|
+
break;
|
|
963
|
+
z < L && (m += e.slice(z, L)), m += String(t[E]), z = L + 2, L++;
|
|
964
|
+
break;
|
|
965
|
+
case 37:
|
|
966
|
+
z < L && (m += e.slice(z, L)), m += "%", z = L + 2, L++, E--;
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
++E;
|
|
970
|
+
}
|
|
971
|
+
++L;
|
|
972
|
+
}
|
|
973
|
+
return z === -1 ? e : (z < M && (m += e.slice(z)), m);
|
|
974
|
+
}
|
|
975
|
+
const Se = Wt;
|
|
976
|
+
ae.exports = F;
|
|
977
|
+
const te = sr().console || {}, Gt = {
|
|
978
|
+
mapHttpRequest: re,
|
|
979
|
+
mapHttpResponse: re,
|
|
980
|
+
wrapRequestSerializer: le,
|
|
981
|
+
wrapResponseSerializer: le,
|
|
982
|
+
wrapErrorSerializer: le,
|
|
983
|
+
req: re,
|
|
984
|
+
res: re,
|
|
985
|
+
err: $e,
|
|
986
|
+
errWithCause: $e
|
|
987
|
+
};
|
|
988
|
+
function U(e, t) {
|
|
989
|
+
return e === "silent" ? 1 / 0 : t.levels.values[e];
|
|
990
|
+
}
|
|
991
|
+
const ge = Symbol("pino.logFuncs"), me = Symbol("pino.hierarchy"), Xt = {
|
|
992
|
+
error: "log",
|
|
993
|
+
fatal: "error",
|
|
994
|
+
warn: "error",
|
|
995
|
+
info: "log",
|
|
996
|
+
debug: "log",
|
|
997
|
+
trace: "log"
|
|
998
|
+
};
|
|
999
|
+
function ze(e, t) {
|
|
1000
|
+
const r = {
|
|
1001
|
+
logger: t,
|
|
1002
|
+
parent: e[me]
|
|
1003
|
+
};
|
|
1004
|
+
t[me] = r;
|
|
1005
|
+
}
|
|
1006
|
+
function Ft(e, t, r) {
|
|
1007
|
+
const c = {};
|
|
1008
|
+
t.forEach((v) => {
|
|
1009
|
+
c[v] = r[v] ? r[v] : te[v] || te[Xt[v] || "log"] || Z;
|
|
1010
|
+
}), e[ge] = c;
|
|
1011
|
+
}
|
|
1012
|
+
function Ut(e, t) {
|
|
1013
|
+
return Array.isArray(e) ? e.filter(function(c) {
|
|
1014
|
+
return c !== "!stdSerializers.err";
|
|
1015
|
+
}) : e === !0 ? Object.keys(t) : !1;
|
|
1016
|
+
}
|
|
1017
|
+
function F(e) {
|
|
1018
|
+
e = e || {}, e.browser = e.browser || {};
|
|
1019
|
+
const t = e.browser.transmit;
|
|
1020
|
+
if (t && typeof t.send != "function")
|
|
1021
|
+
throw Error("pino: transmit option must have a send function");
|
|
1022
|
+
const r = e.browser.write || te;
|
|
1023
|
+
e.browser.write && (e.browser.asObject = !0);
|
|
1024
|
+
const c = e.serializers || {}, v = Ut(e.browser.serialize, c);
|
|
1025
|
+
let R = e.browser.serialize;
|
|
1026
|
+
Array.isArray(e.browser.serialize) && e.browser.serialize.indexOf("!stdSerializers.err") > -1 && (R = !1);
|
|
1027
|
+
const j = Object.keys(e.customLevels || {}), S = ["error", "fatal", "warn", "info", "debug", "trace"].concat(j);
|
|
1028
|
+
typeof r == "function" && S.forEach(function(o) {
|
|
1029
|
+
r[o] = r;
|
|
1030
|
+
}), (e.enabled === !1 || e.browser.disabled) && (e.level = "silent");
|
|
1031
|
+
const y = e.level || "info", m = Object.create(r);
|
|
1032
|
+
m.log || (m.log = Z), Ft(m, S, r), ze({}, m), Object.defineProperty(m, "levelVal", {
|
|
1033
|
+
get: z
|
|
1034
|
+
}), Object.defineProperty(m, "level", {
|
|
1035
|
+
get: M,
|
|
1036
|
+
set: L
|
|
1037
|
+
});
|
|
1038
|
+
const E = {
|
|
1039
|
+
transmit: t,
|
|
1040
|
+
serialize: v,
|
|
1041
|
+
asObject: e.browser.asObject,
|
|
1042
|
+
asObjectBindingsOnly: e.browser.asObjectBindingsOnly,
|
|
1043
|
+
formatters: e.browser.formatters,
|
|
1044
|
+
levels: S,
|
|
1045
|
+
timestamp: ir(e),
|
|
1046
|
+
messageKey: e.messageKey || "msg",
|
|
1047
|
+
onChild: e.onChild || Z
|
|
1048
|
+
};
|
|
1049
|
+
m.levels = Qt(e), m.level = y, m.isLevelEnabled = function(o) {
|
|
1050
|
+
return this.levels.values[o] ? this.levels.values[o] >= this.levels.values[this.level] : !1;
|
|
1051
|
+
}, m.setMaxListeners = m.getMaxListeners = m.emit = m.addListener = m.on = m.prependListener = m.once = m.prependOnceListener = m.removeListener = m.removeAllListeners = m.listeners = m.listenerCount = m.eventNames = m.write = m.flush = Z, m.serializers = c, m._serialize = v, m._stdErrSerialize = R, m.child = function(...o) {
|
|
1052
|
+
return n.call(this, E, ...o);
|
|
1053
|
+
}, t && (m._logEvent = he());
|
|
1054
|
+
function z() {
|
|
1055
|
+
return U(this.level, this);
|
|
1056
|
+
}
|
|
1057
|
+
function M() {
|
|
1058
|
+
return this._level;
|
|
1059
|
+
}
|
|
1060
|
+
function L(o) {
|
|
1061
|
+
if (o !== "silent" && !this.levels.values[o])
|
|
1062
|
+
throw Error("unknown level " + o);
|
|
1063
|
+
this._level = o, Q(this, E, m, "error"), Q(this, E, m, "fatal"), Q(this, E, m, "warn"), Q(this, E, m, "info"), Q(this, E, m, "debug"), Q(this, E, m, "trace"), j.forEach((l) => {
|
|
1064
|
+
Q(this, E, m, l);
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
function n(o, l, a) {
|
|
1068
|
+
if (!l)
|
|
1069
|
+
throw new Error("missing bindings for child Pino");
|
|
1070
|
+
a = a || {}, v && l.serializers && (a.serializers = l.serializers);
|
|
1071
|
+
const s = a.serializers;
|
|
1072
|
+
if (v && s) {
|
|
1073
|
+
var A = Object.assign({}, c, s), D = e.browser.serialize === !0 ? Object.keys(A) : v;
|
|
1074
|
+
delete l.serializers, pe([l], D, A, this._stdErrSerialize);
|
|
1075
|
+
}
|
|
1076
|
+
function $(k) {
|
|
1077
|
+
this._childLevel = (k._childLevel | 0) + 1, this.bindings = l, A && (this.serializers = A, this._serialize = D), t && (this._logEvent = he(
|
|
1078
|
+
[].concat(k._logEvent.bindings, l)
|
|
1079
|
+
));
|
|
1080
|
+
}
|
|
1081
|
+
$.prototype = this;
|
|
1082
|
+
const H = new $(this);
|
|
1083
|
+
return ze(this, H), H.child = function(...k) {
|
|
1084
|
+
return n.call(this, o, ...k);
|
|
1085
|
+
}, H.level = a.level || this.level, o.onChild(H), H;
|
|
1086
|
+
}
|
|
1087
|
+
return m;
|
|
1088
|
+
}
|
|
1089
|
+
function Qt(e) {
|
|
1090
|
+
const t = e.customLevels || {}, r = Object.assign({}, F.levels.values, t), c = Object.assign({}, F.levels.labels, Yt(t));
|
|
1091
|
+
return {
|
|
1092
|
+
values: r,
|
|
1093
|
+
labels: c
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
function Yt(e) {
|
|
1097
|
+
const t = {};
|
|
1098
|
+
return Object.keys(e).forEach(function(r) {
|
|
1099
|
+
t[e[r]] = r;
|
|
1100
|
+
}), t;
|
|
1101
|
+
}
|
|
1102
|
+
F.levels = {
|
|
1103
|
+
values: {
|
|
1104
|
+
fatal: 60,
|
|
1105
|
+
error: 50,
|
|
1106
|
+
warn: 40,
|
|
1107
|
+
info: 30,
|
|
1108
|
+
debug: 20,
|
|
1109
|
+
trace: 10
|
|
1110
|
+
},
|
|
1111
|
+
labels: {
|
|
1112
|
+
10: "trace",
|
|
1113
|
+
20: "debug",
|
|
1114
|
+
30: "info",
|
|
1115
|
+
40: "warn",
|
|
1116
|
+
50: "error",
|
|
1117
|
+
60: "fatal"
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
F.stdSerializers = Gt;
|
|
1121
|
+
F.stdTimeFunctions = Object.assign({}, { nullTime: it, epochTime: ot, unixTime: or, isoTime: ar });
|
|
1122
|
+
function Zt(e) {
|
|
1123
|
+
const t = [];
|
|
1124
|
+
e.bindings && t.push(e.bindings);
|
|
1125
|
+
let r = e[me];
|
|
1126
|
+
for (; r.parent; )
|
|
1127
|
+
r = r.parent, r.logger.bindings && t.push(r.logger.bindings);
|
|
1128
|
+
return t.reverse();
|
|
1129
|
+
}
|
|
1130
|
+
function Q(e, t, r, c) {
|
|
1131
|
+
if (Object.defineProperty(e, c, {
|
|
1132
|
+
value: U(e.level, r) > U(c, r) ? Z : r[ge][c],
|
|
1133
|
+
writable: !0,
|
|
1134
|
+
enumerable: !0,
|
|
1135
|
+
configurable: !0
|
|
1136
|
+
}), e[c] === Z) {
|
|
1137
|
+
if (!t.transmit) return;
|
|
1138
|
+
const R = t.transmit.level || e.level, j = U(R, r);
|
|
1139
|
+
if (U(c, r) < j) return;
|
|
1140
|
+
}
|
|
1141
|
+
e[c] = tr(e, t, r, c);
|
|
1142
|
+
const v = Zt(e);
|
|
1143
|
+
v.length !== 0 && (e[c] = er(v, e[c]));
|
|
1144
|
+
}
|
|
1145
|
+
function er(e, t) {
|
|
1146
|
+
return function() {
|
|
1147
|
+
return t.apply(this, [...e, ...arguments]);
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
function tr(e, t, r, c) {
|
|
1151
|
+
return /* @__PURE__ */ function(v) {
|
|
1152
|
+
return function() {
|
|
1153
|
+
const j = t.timestamp(), S = new Array(arguments.length), y = Object.getPrototypeOf && Object.getPrototypeOf(this) === te ? te : this;
|
|
1154
|
+
for (var m = 0; m < S.length; m++) S[m] = arguments[m];
|
|
1155
|
+
var E = !1;
|
|
1156
|
+
if (t.serialize && (pe(S, this._serialize, this.serializers, this._stdErrSerialize), E = !0), t.asObject || t.formatters ? v.call(y, ...rr(this, c, S, j, t)) : v.apply(y, S), t.transmit) {
|
|
1157
|
+
const z = t.transmit.level || e._level, M = U(z, r), L = U(c, r);
|
|
1158
|
+
if (L < M) return;
|
|
1159
|
+
nr(this, {
|
|
1160
|
+
ts: j,
|
|
1161
|
+
methodLevel: c,
|
|
1162
|
+
methodValue: L,
|
|
1163
|
+
transmitValue: r.levels.values[t.transmit.level || e._level],
|
|
1164
|
+
send: t.transmit.send,
|
|
1165
|
+
val: U(e._level, r)
|
|
1166
|
+
}, S, E);
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
}(e[ge][c]);
|
|
1170
|
+
}
|
|
1171
|
+
function rr(e, t, r, c, v) {
|
|
1172
|
+
const {
|
|
1173
|
+
level: R,
|
|
1174
|
+
log: j = (z) => z
|
|
1175
|
+
} = v.formatters || {}, S = r.slice();
|
|
1176
|
+
let y = S[0];
|
|
1177
|
+
const m = {};
|
|
1178
|
+
let E = (e._childLevel | 0) + 1;
|
|
1179
|
+
if (E < 1 && (E = 1), c && (m.time = c), R) {
|
|
1180
|
+
const z = R(t, e.levels.values[t]);
|
|
1181
|
+
Object.assign(m, z);
|
|
1182
|
+
} else
|
|
1183
|
+
m.level = e.levels.values[t];
|
|
1184
|
+
if (v.asObjectBindingsOnly) {
|
|
1185
|
+
if (y !== null && typeof y == "object")
|
|
1186
|
+
for (; E-- && typeof S[0] == "object"; )
|
|
1187
|
+
Object.assign(m, S.shift());
|
|
1188
|
+
return [j(m), ...S];
|
|
1189
|
+
} else {
|
|
1190
|
+
if (y !== null && typeof y == "object") {
|
|
1191
|
+
for (; E-- && typeof S[0] == "object"; )
|
|
1192
|
+
Object.assign(m, S.shift());
|
|
1193
|
+
y = S.length ? Se(S.shift(), S) : void 0;
|
|
1194
|
+
} else typeof y == "string" && (y = Se(S.shift(), S));
|
|
1195
|
+
return y !== void 0 && (m[v.messageKey] = y), [j(m)];
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
function pe(e, t, r, c) {
|
|
1199
|
+
for (const v in e)
|
|
1200
|
+
if (c && e[v] instanceof Error)
|
|
1201
|
+
e[v] = F.stdSerializers.err(e[v]);
|
|
1202
|
+
else if (typeof e[v] == "object" && !Array.isArray(e[v]) && t)
|
|
1203
|
+
for (const R in e[v])
|
|
1204
|
+
t.indexOf(R) > -1 && R in r && (e[v][R] = r[R](e[v][R]));
|
|
1205
|
+
}
|
|
1206
|
+
function nr(e, t, r, c = !1) {
|
|
1207
|
+
const v = t.send, R = t.ts, j = t.methodLevel, S = t.methodValue, y = t.val, m = e._logEvent.bindings;
|
|
1208
|
+
c || pe(
|
|
1209
|
+
r,
|
|
1210
|
+
e._serialize || Object.keys(e.serializers),
|
|
1211
|
+
e.serializers,
|
|
1212
|
+
e._stdErrSerialize === void 0 ? !0 : e._stdErrSerialize
|
|
1213
|
+
), e._logEvent.ts = R, e._logEvent.messages = r.filter(function(E) {
|
|
1214
|
+
return m.indexOf(E) === -1;
|
|
1215
|
+
}), e._logEvent.level.label = j, e._logEvent.level.value = S, v(j, e._logEvent, y), e._logEvent = he(m);
|
|
1216
|
+
}
|
|
1217
|
+
function he(e) {
|
|
1218
|
+
return {
|
|
1219
|
+
ts: 0,
|
|
1220
|
+
messages: [],
|
|
1221
|
+
bindings: e || [],
|
|
1222
|
+
level: { label: "", value: 0 }
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
function $e(e) {
|
|
1226
|
+
const t = {
|
|
1227
|
+
type: e.constructor.name,
|
|
1228
|
+
msg: e.message,
|
|
1229
|
+
stack: e.stack
|
|
1230
|
+
};
|
|
1231
|
+
for (const r in e)
|
|
1232
|
+
t[r] === void 0 && (t[r] = e[r]);
|
|
1233
|
+
return t;
|
|
1234
|
+
}
|
|
1235
|
+
function ir(e) {
|
|
1236
|
+
return typeof e.timestamp == "function" ? e.timestamp : e.timestamp === !1 ? it : ot;
|
|
1237
|
+
}
|
|
1238
|
+
function re() {
|
|
1239
|
+
return {};
|
|
1240
|
+
}
|
|
1241
|
+
function le(e) {
|
|
1242
|
+
return e;
|
|
1243
|
+
}
|
|
1244
|
+
function Z() {
|
|
1245
|
+
}
|
|
1246
|
+
function it() {
|
|
1247
|
+
return !1;
|
|
1248
|
+
}
|
|
1249
|
+
function ot() {
|
|
1250
|
+
return Date.now();
|
|
1251
|
+
}
|
|
1252
|
+
function or() {
|
|
1253
|
+
return Math.round(Date.now() / 1e3);
|
|
1254
|
+
}
|
|
1255
|
+
function ar() {
|
|
1256
|
+
return new Date(Date.now()).toISOString();
|
|
1257
|
+
}
|
|
1258
|
+
function sr() {
|
|
1259
|
+
function e(t) {
|
|
1260
|
+
return typeof t < "u" && t;
|
|
1261
|
+
}
|
|
1262
|
+
try {
|
|
1263
|
+
return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", {
|
|
1264
|
+
get: function() {
|
|
1265
|
+
return delete Object.prototype.globalThis, this.globalThis = this;
|
|
1266
|
+
},
|
|
1267
|
+
configurable: !0
|
|
1268
|
+
}), globalThis;
|
|
1269
|
+
} catch {
|
|
1270
|
+
return e(self) || e(window) || e(this) || {};
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
ae.exports.default = F;
|
|
1274
|
+
ae.exports.pino = F;
|
|
1275
|
+
var cr = ae.exports;
|
|
1276
|
+
const ne = /* @__PURE__ */ Bt(cr);
|
|
1277
|
+
function oe() {
|
|
1278
|
+
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
1279
|
+
}
|
|
1280
|
+
function lr() {
|
|
1281
|
+
var e;
|
|
1282
|
+
return typeof process < "u" && ((e = process.versions) == null ? void 0 : e.node) !== void 0;
|
|
1283
|
+
}
|
|
1284
|
+
function ur() {
|
|
1285
|
+
return typeof window < "u" && typeof document < "u";
|
|
1286
|
+
}
|
|
1287
|
+
const ue = {
|
|
1288
|
+
name: "WSX",
|
|
1289
|
+
level: oe() ? "info" : "debug",
|
|
1290
|
+
pretty: !oe()
|
|
1291
|
+
};
|
|
1292
|
+
function fr(e = {}) {
|
|
1293
|
+
const { name: t, level: r, pretty: c, pinoOptions: v } = { ...ue, ...e }, R = {
|
|
1294
|
+
name: t || ue.name,
|
|
1295
|
+
level: r || ue.level,
|
|
1296
|
+
...v
|
|
1297
|
+
};
|
|
1298
|
+
if (ur() && (R.browser = {
|
|
1299
|
+
asObject: !1,
|
|
1300
|
+
// Use console methods directly (default behavior)
|
|
1301
|
+
write: void 0,
|
|
1302
|
+
// Use default console write
|
|
1303
|
+
...(v == null ? void 0 : v.browser) || {}
|
|
1304
|
+
// Allow override via pinoOptions
|
|
1305
|
+
}), c && lr() && !oe())
|
|
1306
|
+
try {
|
|
1307
|
+
return ne(
|
|
1308
|
+
R,
|
|
1309
|
+
ne.transport({
|
|
1310
|
+
target: "pino-pretty",
|
|
1311
|
+
options: {
|
|
1312
|
+
colorize: !0,
|
|
1313
|
+
translateTime: "HH:MM:ss.l",
|
|
1314
|
+
ignore: "pid,hostname",
|
|
1315
|
+
singleLine: !1
|
|
1316
|
+
}
|
|
1317
|
+
})
|
|
1318
|
+
);
|
|
1319
|
+
} catch {
|
|
1320
|
+
return console.warn("[wsx-logger] pino-pretty not available, using default formatter"), ne(R);
|
|
1321
|
+
}
|
|
1322
|
+
return ne(R);
|
|
1323
|
+
}
|
|
1324
|
+
class at {
|
|
1325
|
+
constructor(t = {}) {
|
|
1326
|
+
this.isProd = oe(), this.pinoLogger = fr(t);
|
|
1327
|
+
}
|
|
1328
|
+
debug(t, ...r) {
|
|
1329
|
+
this.isProd || (r.length > 0 ? this.pinoLogger.debug({ args: r }, t) : this.pinoLogger.debug(t));
|
|
1330
|
+
}
|
|
1331
|
+
info(t, ...r) {
|
|
1332
|
+
this.isProd ? r.length > 0 ? this.pinoLogger.info({ args: r }, t) : this.pinoLogger.info(t) : r.length > 0 ? this.pinoLogger.info({ args: r }, t) : this.pinoLogger.info(t);
|
|
1333
|
+
}
|
|
1334
|
+
warn(t, ...r) {
|
|
1335
|
+
r.length > 0 ? this.pinoLogger.warn({ args: r }, t) : this.pinoLogger.warn(t);
|
|
1336
|
+
}
|
|
1337
|
+
error(t, ...r) {
|
|
1338
|
+
r.length > 0 ? this.pinoLogger.error({ args: r }, t) : this.pinoLogger.error(t);
|
|
1339
|
+
}
|
|
1340
|
+
fatal(t, ...r) {
|
|
1341
|
+
r.length > 0 ? this.pinoLogger.fatal({ args: r }, t) : this.pinoLogger.fatal(t);
|
|
1342
|
+
}
|
|
1343
|
+
trace(t, ...r) {
|
|
1344
|
+
this.isProd || (r.length > 0 ? this.pinoLogger.trace({ args: r }, t) : this.pinoLogger.trace(t));
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Get the underlying pino logger instance
|
|
1348
|
+
*/
|
|
1349
|
+
getPinoLogger() {
|
|
1350
|
+
return this.pinoLogger;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
new at();
|
|
1354
|
+
function dr(e, t = {}) {
|
|
1355
|
+
return new at({
|
|
1356
|
+
...t,
|
|
1357
|
+
name: t.name || `WSX:${e}`
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
const Le = "wsx-markdown{display:block}.marked-content{line-height:1.7;color:var(--text-primary, #2c3e50)}.marked-content .marked-paragraph{margin:1rem 0;line-height:1.7}.marked-content .marked-list{margin:1rem 0;padding-left:2rem}.marked-content .marked-list-item{margin:.5rem 0;line-height:1.6}.marked-content a{color:var(--primary-red, #dc2626);text-decoration:none;border-bottom:1px solid transparent;transition:border-color .2s ease}.marked-content a:hover{border-bottom-color:var(--primary-red, #dc2626)}.marked-content strong{font-weight:600;color:var(--text-primary, #2c3e50)}.marked-content em{font-style:italic}.marked-content hr{border:none;border-top:2px solid var(--border-color, #e0e0e0);margin:2rem 0}.marked-content img{max-width:100%;height:auto;border-radius:8px;margin:1rem 0}.error{color:#dc2626;padding:1rem;background:#fee2e2;border-radius:6px;border:1px solid #fecaca}";
|
|
1361
|
+
function Ce(e) {
|
|
1362
|
+
const t = document.createElement("div");
|
|
1363
|
+
return t.textContent = e, t.innerHTML;
|
|
1364
|
+
}
|
|
1365
|
+
function jr(e) {
|
|
1366
|
+
if (!e || !Array.isArray(e))
|
|
1367
|
+
return [];
|
|
1368
|
+
const t = [];
|
|
1369
|
+
return e.forEach((r) => {
|
|
1370
|
+
if (r.type === "paragraph") {
|
|
1371
|
+
const c = r;
|
|
1372
|
+
c.tokens && Array.isArray(c.tokens) && t.push(...c.tokens);
|
|
1373
|
+
} else (r.type === "text" || r.type === "strong" || r.type === "em" || r.type === "link" || r.type === "code" || r.type === "br") && t.push(r);
|
|
1374
|
+
}), t;
|
|
1375
|
+
}
|
|
1376
|
+
function ee(e) {
|
|
1377
|
+
return !e || !Array.isArray(e) ? "" : e.map((t) => {
|
|
1378
|
+
switch (t.type) {
|
|
1379
|
+
case "text":
|
|
1380
|
+
return t.text || "";
|
|
1381
|
+
case "strong": {
|
|
1382
|
+
const r = t, c = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
1383
|
+
return `<strong>${ee(c)}</strong>`;
|
|
1384
|
+
}
|
|
1385
|
+
case "em": {
|
|
1386
|
+
const r = t, c = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
1387
|
+
return `<em>${ee(c)}</em>`;
|
|
1388
|
+
}
|
|
1389
|
+
case "link": {
|
|
1390
|
+
const r = t, c = r.title ? ` title="${Ce(r.title)}"` : "", v = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
1391
|
+
return `<a href="${r.href || "#"}"${c}>${ee(v)}</a>`;
|
|
1392
|
+
}
|
|
1393
|
+
case "code":
|
|
1394
|
+
return `<code>${Ce(t.text || "")}</code>`;
|
|
1395
|
+
case "br":
|
|
1396
|
+
return "<br>";
|
|
1397
|
+
default:
|
|
1398
|
+
return "";
|
|
1399
|
+
}
|
|
1400
|
+
}).join("");
|
|
1401
|
+
}
|
|
1402
|
+
var st;
|
|
1403
|
+
let ct, lt;
|
|
1404
|
+
function fe(e, t, r) {
|
|
1405
|
+
return (t = ut(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1406
|
+
}
|
|
1407
|
+
function mr(e, t, r, c, v, R) {
|
|
1408
|
+
function j(n, o, l) {
|
|
1409
|
+
return function(a, s) {
|
|
1410
|
+
return l && l(a), n[o].call(a, s);
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
function S(n, o) {
|
|
1414
|
+
for (var l = 0; l < n.length; l++) n[l].call(o);
|
|
1415
|
+
return o;
|
|
1416
|
+
}
|
|
1417
|
+
function y(n, o, l, a) {
|
|
1418
|
+
if (typeof n != "function" && (a || n !== void 0)) throw new TypeError(o + " must " + (l || "be") + " a function" + (a ? "" : " or undefined"));
|
|
1419
|
+
return n;
|
|
1420
|
+
}
|
|
1421
|
+
function m(n, o, l, a, s, A, D, $, H, k, b, h, g) {
|
|
1422
|
+
function _(u) {
|
|
1423
|
+
if (!g(u)) throw new TypeError("Attempted to access private element on non-instance");
|
|
1424
|
+
}
|
|
1425
|
+
var f, w = o[0], x = o[3], C = !$;
|
|
1426
|
+
if (!C) {
|
|
1427
|
+
l || Array.isArray(w) || (w = [w]);
|
|
1428
|
+
var i = {}, T = [], p = s === 3 ? "get" : s === 4 || h ? "set" : "value";
|
|
1429
|
+
k ? (b || h ? i = { get: Ae(function() {
|
|
1430
|
+
return x(this);
|
|
1431
|
+
}, a, "get"), set: function(u) {
|
|
1432
|
+
o[4](this, u);
|
|
1433
|
+
} } : i[p] = x, b || Ae(i[p], a, s === 2 ? "" : p)) : b || (i = Object.getOwnPropertyDescriptor(n, a));
|
|
1434
|
+
}
|
|
1435
|
+
for (var d = n, q = w.length - 1; q >= 0; q -= l ? 2 : 1) {
|
|
1436
|
+
var K = w[q], W = l ? w[q - 1] : void 0, J = {}, N = { kind: ["field", "accessor", "method", "getter", "setter", "class"][s], name: a, metadata: A, addInitializer: (function(u, O) {
|
|
1437
|
+
if (u.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
1438
|
+
y(O, "An initializer", "be", !0), D.push(O);
|
|
1439
|
+
}).bind(null, J) };
|
|
1440
|
+
try {
|
|
1441
|
+
if (C) (f = y(K.call(W, d, N), "class decorators", "return")) && (d = f);
|
|
1442
|
+
else {
|
|
1443
|
+
var I, P;
|
|
1444
|
+
N.static = H, N.private = k, k ? s === 2 ? I = function(u) {
|
|
1445
|
+
return _(u), i.value;
|
|
1446
|
+
} : (s < 4 && (I = j(i, "get", _)), s !== 3 && (P = j(i, "set", _))) : (I = function(u) {
|
|
1447
|
+
return u[a];
|
|
1448
|
+
}, (s < 2 || s === 4) && (P = function(u, O) {
|
|
1449
|
+
u[a] = O;
|
|
1450
|
+
}));
|
|
1451
|
+
var G = N.access = { has: k ? g.bind() : function(u) {
|
|
1452
|
+
return a in u;
|
|
1453
|
+
} };
|
|
1454
|
+
if (I && (G.get = I), P && (G.set = P), d = K.call(W, h ? { get: i.get, set: i.set } : i[p], N), h) {
|
|
1455
|
+
if (typeof d == "object" && d) (f = y(d.get, "accessor.get")) && (i.get = f), (f = y(d.set, "accessor.set")) && (i.set = f), (f = y(d.init, "accessor.init")) && T.push(f);
|
|
1456
|
+
else if (d !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
1457
|
+
} else y(d, (b ? "field" : "method") + " decorators", "return") && (b ? T.push(d) : i[p] = d);
|
|
1458
|
+
}
|
|
1459
|
+
} finally {
|
|
1460
|
+
J.v = !0;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return (b || h) && $.push(function(u, O) {
|
|
1464
|
+
for (var B = T.length - 1; B >= 0; B--) O = T[B].call(u, O);
|
|
1465
|
+
return O;
|
|
1466
|
+
}), b || C || (k ? h ? $.push(j(i, "get"), j(i, "set")) : $.push(s === 2 ? i[p] : j.call.bind(i[p])) : Object.defineProperty(n, a, i)), d;
|
|
1467
|
+
}
|
|
1468
|
+
function E(n, o) {
|
|
1469
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: o });
|
|
1470
|
+
}
|
|
1471
|
+
if (arguments.length >= 6) var z = R[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
1472
|
+
var M = Object.create(z ?? null), L = function(n, o, l, a) {
|
|
1473
|
+
var s, A, D = [], $ = function(p) {
|
|
1474
|
+
return gr(p) === n;
|
|
1475
|
+
}, H = /* @__PURE__ */ new Map();
|
|
1476
|
+
function k(p) {
|
|
1477
|
+
p && D.push(S.bind(null, p));
|
|
1478
|
+
}
|
|
1479
|
+
for (var b = 0; b < o.length; b++) {
|
|
1480
|
+
var h = o[b];
|
|
1481
|
+
if (Array.isArray(h)) {
|
|
1482
|
+
var g = h[1], _ = h[2], f = h.length > 3, w = 16 & g, x = !!(8 & g), C = (g &= 7) == 0, i = _ + "/" + x;
|
|
1483
|
+
if (!C && !f) {
|
|
1484
|
+
var T = H.get(i);
|
|
1485
|
+
if (T === !0 || T === 3 && g !== 4 || T === 4 && g !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + _);
|
|
1486
|
+
H.set(i, !(g > 2) || g);
|
|
1487
|
+
}
|
|
1488
|
+
m(x ? n : n.prototype, h, w, f ? "#" + _ : ut(_), g, a, x ? A = A || [] : s = s || [], D, x, f, C, g === 1, x && f ? $ : l);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
return k(s), k(A), D;
|
|
1492
|
+
}(e, t, v, M);
|
|
1493
|
+
return r.length || E(e, M), { e: L, get c() {
|
|
1494
|
+
var n = [];
|
|
1495
|
+
return r.length && [E(m(e, [r], c, e.name, 5, M, n), M), S.bind(null, n, e)];
|
|
1496
|
+
} };
|
|
1497
|
+
}
|
|
1498
|
+
function ut(e) {
|
|
1499
|
+
var t = hr(e, "string");
|
|
1500
|
+
return typeof t == "symbol" ? t : t + "";
|
|
1501
|
+
}
|
|
1502
|
+
function hr(e, t) {
|
|
1503
|
+
if (typeof e != "object" || !e) return e;
|
|
1504
|
+
var r = e[Symbol.toPrimitive];
|
|
1505
|
+
if (r !== void 0) {
|
|
1506
|
+
var c = r.call(e, t);
|
|
1507
|
+
if (typeof c != "object") return c;
|
|
1508
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1509
|
+
}
|
|
1510
|
+
return String(e);
|
|
1511
|
+
}
|
|
1512
|
+
function Ae(e, t, r) {
|
|
1513
|
+
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
1514
|
+
try {
|
|
1515
|
+
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
1516
|
+
} catch {
|
|
1517
|
+
}
|
|
1518
|
+
return e;
|
|
1519
|
+
}
|
|
1520
|
+
function gr(e) {
|
|
1521
|
+
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
1522
|
+
return e;
|
|
1523
|
+
}
|
|
1524
|
+
const ie = dr("Markdown");
|
|
1525
|
+
lt = [Y({
|
|
1526
|
+
tagName: "wsx-markdown"
|
|
1527
|
+
})];
|
|
1528
|
+
let pr;
|
|
1529
|
+
class br extends X {
|
|
1530
|
+
constructor() {
|
|
1531
|
+
super({
|
|
1532
|
+
styles: Le,
|
|
1533
|
+
styleName: "wsx-markdown",
|
|
1534
|
+
lightDOM: !0
|
|
1535
|
+
}), fe(this, "_autoStyles", Le), fe(this, "markdown", void 0), fe(this, "customRenderers", {}), ie.info("Markdown initialized");
|
|
1536
|
+
const [t, r] = this.useState("markdown", "");
|
|
1537
|
+
Object.defineProperty(this, "markdown", {
|
|
1538
|
+
get: t,
|
|
1539
|
+
set: r,
|
|
1540
|
+
enumerable: !0,
|
|
1541
|
+
configurable: !0
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
static get observedAttributes() {
|
|
1545
|
+
return ["markdown"];
|
|
1546
|
+
}
|
|
1547
|
+
attributeChangedCallback(t, r, c) {
|
|
1548
|
+
t === "markdown" && (this.markdown = c || "", this.rerender());
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Set custom renderers for specific token types
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* ```typescript
|
|
1555
|
+
* markdown.setCustomRenderers({
|
|
1556
|
+
* heading: (token, defaultRender) => {
|
|
1557
|
+
* // Custom heading rendering
|
|
1558
|
+
* return defaultRender();
|
|
1559
|
+
* }
|
|
1560
|
+
* });
|
|
1561
|
+
* ```
|
|
1562
|
+
*/
|
|
1563
|
+
setCustomRenderers(t) {
|
|
1564
|
+
this.customRenderers = {
|
|
1565
|
+
...this.customRenderers,
|
|
1566
|
+
...t
|
|
1567
|
+
}, this.rerender();
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Get current custom renderers
|
|
1571
|
+
*/
|
|
1572
|
+
getCustomRenderers() {
|
|
1573
|
+
return {
|
|
1574
|
+
...this.customRenderers
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
render() {
|
|
1578
|
+
if (!this.markdown)
|
|
1579
|
+
return /* @__PURE__ */ V("div", { class: "marked-content" });
|
|
1580
|
+
try {
|
|
1581
|
+
const t = be.lexer(this.markdown);
|
|
1582
|
+
return /* @__PURE__ */ V("div", { class: "marked-content" }, this.renderTokens(t));
|
|
1583
|
+
} catch (t) {
|
|
1584
|
+
return ie.error("Failed to render markdown", t), /* @__PURE__ */ V("div", { class: "marked-content" }, /* @__PURE__ */ V("wsx-marked-error", { message: `Error: ${t}` }));
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
onConnected() {
|
|
1588
|
+
const t = this.getAttribute("markdown");
|
|
1589
|
+
t && (this.markdown = t);
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Convert marked tokens to WSX JSX elements
|
|
1593
|
+
*/
|
|
1594
|
+
renderTokens(t) {
|
|
1595
|
+
return t.map((r) => this.renderToken(r)).filter((r) => r !== null);
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Render a single token to WSX JSX element
|
|
1599
|
+
* Supports custom renderers for extensibility
|
|
1600
|
+
*/
|
|
1601
|
+
renderToken(t) {
|
|
1602
|
+
const r = this.customRenderers[t.type];
|
|
1603
|
+
if (r) {
|
|
1604
|
+
const c = r(t, () => this.defaultRenderToken(t));
|
|
1605
|
+
if (c !== null)
|
|
1606
|
+
return c;
|
|
1607
|
+
}
|
|
1608
|
+
return this.defaultRenderToken(t);
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Default token rendering logic
|
|
1612
|
+
* This is the core rendering implementation
|
|
1613
|
+
*/
|
|
1614
|
+
defaultRenderToken(t) {
|
|
1615
|
+
switch (t.type) {
|
|
1616
|
+
case "heading": {
|
|
1617
|
+
const r = t;
|
|
1618
|
+
return /* @__PURE__ */ V("wsx-marked-heading", { level: r.depth.toString(), text: ee(r.tokens) });
|
|
1619
|
+
}
|
|
1620
|
+
case "code": {
|
|
1621
|
+
const r = t;
|
|
1622
|
+
return /* @__PURE__ */ V("wsx-marked-code", { code: r.text, language: r.lang || "" });
|
|
1623
|
+
}
|
|
1624
|
+
case "blockquote": {
|
|
1625
|
+
const r = t;
|
|
1626
|
+
return /* @__PURE__ */ V("wsx-marked-blockquote", null, this.renderTokens(r.tokens));
|
|
1627
|
+
}
|
|
1628
|
+
case "paragraph":
|
|
1629
|
+
return /* @__PURE__ */ V("wsx-marked-paragraph", { content: ee(t.tokens) });
|
|
1630
|
+
case "list": {
|
|
1631
|
+
const r = t, c = r.items.map((v) => {
|
|
1632
|
+
if (!v.tokens || !Array.isArray(v.tokens))
|
|
1633
|
+
return ie.warn("List item has no tokens or tokens is not an array", {
|
|
1634
|
+
item: v
|
|
1635
|
+
}), "";
|
|
1636
|
+
const R = this.renderTokens(v.tokens);
|
|
1637
|
+
if (R.length === 0)
|
|
1638
|
+
return "";
|
|
1639
|
+
const j = document.createElement("div");
|
|
1640
|
+
R.forEach((y) => {
|
|
1641
|
+
y && j.appendChild(y);
|
|
1642
|
+
});
|
|
1643
|
+
const S = j.innerHTML;
|
|
1644
|
+
return S || ie.warn("tempContainer.innerHTML is empty after appending elements", {
|
|
1645
|
+
renderedElementsCount: R.length,
|
|
1646
|
+
itemTokens: v.tokens
|
|
1647
|
+
}), S;
|
|
1648
|
+
});
|
|
1649
|
+
return /* @__PURE__ */ V("wsx-marked-list", { ordered: r.ordered ? "true" : "false", items: JSON.stringify(c) });
|
|
1650
|
+
}
|
|
1651
|
+
case "html":
|
|
1652
|
+
return /* @__PURE__ */ V("div", null, t.text);
|
|
1653
|
+
case "hr":
|
|
1654
|
+
return /* @__PURE__ */ V("hr", null);
|
|
1655
|
+
case "space":
|
|
1656
|
+
return null;
|
|
1657
|
+
case "text":
|
|
1658
|
+
return /* @__PURE__ */ V("span", null, t.text || "");
|
|
1659
|
+
default: {
|
|
1660
|
+
const c = new be.Renderer()[t.type], v = (c == null ? void 0 : c(t)) || "";
|
|
1661
|
+
return v ? /* @__PURE__ */ V("div", null, v) : null;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
st = br;
|
|
1667
|
+
[pr, ct] = mr(st, [], lt, 0, void 0, X).c;
|
|
1668
|
+
ct();
|
|
1669
|
+
export {
|
|
1670
|
+
Tt as Blockquote,
|
|
1671
|
+
vt as Code,
|
|
1672
|
+
Vt as Error,
|
|
1673
|
+
ht as Heading,
|
|
1674
|
+
Mt as List,
|
|
1675
|
+
pr as Markdown,
|
|
1676
|
+
Lt as Paragraph,
|
|
1677
|
+
Ce as escapeHtml,
|
|
1678
|
+
jr as extractInlineTokens,
|
|
1679
|
+
ee as renderInlineTokens
|
|
1680
|
+
};
|