@lambforge/agent-chat 0.0.0-stage → 0.0.2
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 +81 -2
- package/dist/agent-chat.js +280 -0
- package/dist/agent-chat.js.map +7 -0
- package/dist/auto.d.ts +1 -0
- package/dist/element.d.ts +142 -0
- package/dist/index.cjs +4122 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +4136 -0
- package/dist/index.mjs.map +7 -0
- package/dist/markdown.d.ts +3 -0
- package/dist/store/chat-actions.d.ts +121 -0
- package/dist/store/chat-effects.d.ts +44 -0
- package/dist/store/chat-reducer.d.ts +2 -0
- package/dist/store/chat-state.d.ts +31 -0
- package/dist/store/chat-store.d.ts +18 -0
- package/dist/store/index.d.ts +5 -0
- package/dist/strings.d.ts +20 -0
- package/dist/styles.d.ts +2 -0
- package/dist/turnstile.d.ts +12 -0
- package/package.json +55 -4
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,4122 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res, err) => function __init() {
|
|
8
|
+
if (err) throw err[0];
|
|
9
|
+
try {
|
|
10
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
+
} catch (e16) {
|
|
12
|
+
throw err = [e16], e16;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
16
|
+
try {
|
|
17
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
|
+
} catch (e16) {
|
|
19
|
+
throw mod = 0, e16;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
27
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(from2))
|
|
29
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
30
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
42
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
43
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
44
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
45
|
+
for (var i12 = decorators.length - 1, decorator; i12 >= 0; i12--)
|
|
46
|
+
if (decorator = decorators[i12])
|
|
47
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
48
|
+
if (kind && result) __defProp(target, key, result);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// ../../node_modules/lit-html/lit-html.js
|
|
53
|
+
var lit_html_exports = {};
|
|
54
|
+
__export(lit_html_exports, {
|
|
55
|
+
_$LH: () => L,
|
|
56
|
+
html: () => y,
|
|
57
|
+
noChange: () => x,
|
|
58
|
+
nothing: () => b,
|
|
59
|
+
render: () => Z,
|
|
60
|
+
svg: () => w
|
|
61
|
+
});
|
|
62
|
+
function P(t9, i12, s9 = t9, e16) {
|
|
63
|
+
var o18, n11, l9, h9;
|
|
64
|
+
if (i12 === x) return i12;
|
|
65
|
+
let r7 = void 0 !== e16 ? null === (o18 = s9._$Co) || void 0 === o18 ? void 0 : o18[e16] : s9._$Cl;
|
|
66
|
+
const u5 = d(i12) ? void 0 : i12._$litDirective$;
|
|
67
|
+
return (null == r7 ? void 0 : r7.constructor) !== u5 && (null === (n11 = null == r7 ? void 0 : r7._$AO) || void 0 === n11 || n11.call(r7, false), void 0 === u5 ? r7 = void 0 : (r7 = new u5(t9), r7._$AT(t9, s9, e16)), void 0 !== e16 ? (null !== (l9 = (h9 = s9)._$Co) && void 0 !== l9 ? l9 : h9._$Co = [])[e16] = r7 : s9._$Cl = r7), void 0 !== r7 && (i12 = P(t9, r7._$AS(t9, i12.values), r7, e16)), i12;
|
|
68
|
+
}
|
|
69
|
+
var t, i, s, e, o, n, l, h, r, d, u, c, v, a, f, _, m, p, $, g, y, w, x, b, T, A, E, C, V, N, S, M, R, k, H, I, L, z, Z;
|
|
70
|
+
var init_lit_html = __esm({
|
|
71
|
+
"../../node_modules/lit-html/lit-html.js"() {
|
|
72
|
+
i = window;
|
|
73
|
+
s = i.trustedTypes;
|
|
74
|
+
e = s ? s.createPolicy("lit-html", { createHTML: (t9) => t9 }) : void 0;
|
|
75
|
+
o = `lit$${(Math.random() + "").slice(9)}$`;
|
|
76
|
+
n = "?" + o;
|
|
77
|
+
l = `<${n}>`;
|
|
78
|
+
h = document;
|
|
79
|
+
r = (t9 = "") => h.createComment(t9);
|
|
80
|
+
d = (t9) => null === t9 || "object" != typeof t9 && "function" != typeof t9;
|
|
81
|
+
u = Array.isArray;
|
|
82
|
+
c = (t9) => u(t9) || "function" == typeof (null == t9 ? void 0 : t9[Symbol.iterator]);
|
|
83
|
+
v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
|
84
|
+
a = /-->/g;
|
|
85
|
+
f = />/g;
|
|
86
|
+
_ = RegExp(`>|[
|
|
87
|
+
\f\r](?:([^\\s"'>=/]+)([
|
|
88
|
+
\f\r]*=[
|
|
89
|
+
\f\r]*(?:[^
|
|
90
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g");
|
|
91
|
+
m = /'/g;
|
|
92
|
+
p = /"/g;
|
|
93
|
+
$ = /^(?:script|style|textarea|title)$/i;
|
|
94
|
+
g = (t9) => (i12, ...s9) => ({ _$litType$: t9, strings: i12, values: s9 });
|
|
95
|
+
y = g(1);
|
|
96
|
+
w = g(2);
|
|
97
|
+
x = /* @__PURE__ */ Symbol.for("lit-noChange");
|
|
98
|
+
b = /* @__PURE__ */ Symbol.for("lit-nothing");
|
|
99
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
100
|
+
A = h.createTreeWalker(h, 129, null, false);
|
|
101
|
+
E = (t9, i12) => {
|
|
102
|
+
const s9 = t9.length - 1, n11 = [];
|
|
103
|
+
let h9, r7 = 2 === i12 ? "<svg>" : "", d6 = v;
|
|
104
|
+
for (let i13 = 0; i13 < s9; i13++) {
|
|
105
|
+
const s10 = t9[i13];
|
|
106
|
+
let e16, u6, c9 = -1, g2 = 0;
|
|
107
|
+
for (; g2 < s10.length && (d6.lastIndex = g2, u6 = d6.exec(s10), null !== u6); ) g2 = d6.lastIndex, d6 === v ? "!--" === u6[1] ? d6 = a : void 0 !== u6[1] ? d6 = f : void 0 !== u6[2] ? ($.test(u6[2]) && (h9 = RegExp("</" + u6[2], "g")), d6 = _) : void 0 !== u6[3] && (d6 = _) : d6 === _ ? ">" === u6[0] ? (d6 = null != h9 ? h9 : v, c9 = -1) : void 0 === u6[1] ? c9 = -2 : (c9 = d6.lastIndex - u6[2].length, e16 = u6[1], d6 = void 0 === u6[3] ? _ : '"' === u6[3] ? p : m) : d6 === p || d6 === m ? d6 = _ : d6 === a || d6 === f ? d6 = v : (d6 = _, h9 = void 0);
|
|
108
|
+
const y2 = d6 === _ && t9[i13 + 1].startsWith("/>") ? " " : "";
|
|
109
|
+
r7 += d6 === v ? s10 + l : c9 >= 0 ? (n11.push(e16), s10.slice(0, c9) + "$lit$" + s10.slice(c9) + o + y2) : s10 + o + (-2 === c9 ? (n11.push(void 0), i13) : y2);
|
|
110
|
+
}
|
|
111
|
+
const u5 = r7 + (t9[s9] || "<?>") + (2 === i12 ? "</svg>" : "");
|
|
112
|
+
if (!Array.isArray(t9) || !t9.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
113
|
+
return [void 0 !== e ? e.createHTML(u5) : u5, n11];
|
|
114
|
+
};
|
|
115
|
+
C = class _C {
|
|
116
|
+
constructor({ strings: t9, _$litType$: i12 }, e16) {
|
|
117
|
+
let l9;
|
|
118
|
+
this.parts = [];
|
|
119
|
+
let h9 = 0, d6 = 0;
|
|
120
|
+
const u5 = t9.length - 1, c9 = this.parts, [v3, a5] = E(t9, i12);
|
|
121
|
+
if (this.el = _C.createElement(v3, e16), A.currentNode = this.el.content, 2 === i12) {
|
|
122
|
+
const t10 = this.el.content, i13 = t10.firstChild;
|
|
123
|
+
i13.remove(), t10.append(...i13.childNodes);
|
|
124
|
+
}
|
|
125
|
+
for (; null !== (l9 = A.nextNode()) && c9.length < u5; ) {
|
|
126
|
+
if (1 === l9.nodeType) {
|
|
127
|
+
if (l9.hasAttributes()) {
|
|
128
|
+
const t10 = [];
|
|
129
|
+
for (const i13 of l9.getAttributeNames()) if (i13.endsWith("$lit$") || i13.startsWith(o)) {
|
|
130
|
+
const s9 = a5[d6++];
|
|
131
|
+
if (t10.push(i13), void 0 !== s9) {
|
|
132
|
+
const t11 = l9.getAttribute(s9.toLowerCase() + "$lit$").split(o), i14 = /([.?@])?(.*)/.exec(s9);
|
|
133
|
+
c9.push({ type: 1, index: h9, name: i14[2], strings: t11, ctor: "." === i14[1] ? M : "?" === i14[1] ? k : "@" === i14[1] ? H : S });
|
|
134
|
+
} else c9.push({ type: 6, index: h9 });
|
|
135
|
+
}
|
|
136
|
+
for (const i13 of t10) l9.removeAttribute(i13);
|
|
137
|
+
}
|
|
138
|
+
if ($.test(l9.tagName)) {
|
|
139
|
+
const t10 = l9.textContent.split(o), i13 = t10.length - 1;
|
|
140
|
+
if (i13 > 0) {
|
|
141
|
+
l9.textContent = s ? s.emptyScript : "";
|
|
142
|
+
for (let s9 = 0; s9 < i13; s9++) l9.append(t10[s9], r()), A.nextNode(), c9.push({ type: 2, index: ++h9 });
|
|
143
|
+
l9.append(t10[i13], r());
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
} else if (8 === l9.nodeType) if (l9.data === n) c9.push({ type: 2, index: h9 });
|
|
147
|
+
else {
|
|
148
|
+
let t10 = -1;
|
|
149
|
+
for (; -1 !== (t10 = l9.data.indexOf(o, t10 + 1)); ) c9.push({ type: 7, index: h9 }), t10 += o.length - 1;
|
|
150
|
+
}
|
|
151
|
+
h9++;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
static createElement(t9, i12) {
|
|
155
|
+
const s9 = h.createElement("template");
|
|
156
|
+
return s9.innerHTML = t9, s9;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
V = class {
|
|
160
|
+
constructor(t9, i12) {
|
|
161
|
+
this.u = [], this._$AN = void 0, this._$AD = t9, this._$AM = i12;
|
|
162
|
+
}
|
|
163
|
+
get parentNode() {
|
|
164
|
+
return this._$AM.parentNode;
|
|
165
|
+
}
|
|
166
|
+
get _$AU() {
|
|
167
|
+
return this._$AM._$AU;
|
|
168
|
+
}
|
|
169
|
+
v(t9) {
|
|
170
|
+
var i12;
|
|
171
|
+
const { el: { content: s9 }, parts: e16 } = this._$AD, o18 = (null !== (i12 = null == t9 ? void 0 : t9.creationScope) && void 0 !== i12 ? i12 : h).importNode(s9, true);
|
|
172
|
+
A.currentNode = o18;
|
|
173
|
+
let n11 = A.nextNode(), l9 = 0, r7 = 0, d6 = e16[0];
|
|
174
|
+
for (; void 0 !== d6; ) {
|
|
175
|
+
if (l9 === d6.index) {
|
|
176
|
+
let i13;
|
|
177
|
+
2 === d6.type ? i13 = new N(n11, n11.nextSibling, this, t9) : 1 === d6.type ? i13 = new d6.ctor(n11, d6.name, d6.strings, this, t9) : 6 === d6.type && (i13 = new I(n11, this, t9)), this.u.push(i13), d6 = e16[++r7];
|
|
178
|
+
}
|
|
179
|
+
l9 !== (null == d6 ? void 0 : d6.index) && (n11 = A.nextNode(), l9++);
|
|
180
|
+
}
|
|
181
|
+
return o18;
|
|
182
|
+
}
|
|
183
|
+
p(t9) {
|
|
184
|
+
let i12 = 0;
|
|
185
|
+
for (const s9 of this.u) void 0 !== s9 && (void 0 !== s9.strings ? (s9._$AI(t9, s9, i12), i12 += s9.strings.length - 2) : s9._$AI(t9[i12])), i12++;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
N = class _N {
|
|
189
|
+
constructor(t9, i12, s9, e16) {
|
|
190
|
+
var o18;
|
|
191
|
+
this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = t9, this._$AB = i12, this._$AM = s9, this.options = e16, this._$Cm = null === (o18 = null == e16 ? void 0 : e16.isConnected) || void 0 === o18 || o18;
|
|
192
|
+
}
|
|
193
|
+
get _$AU() {
|
|
194
|
+
var t9, i12;
|
|
195
|
+
return null !== (i12 = null === (t9 = this._$AM) || void 0 === t9 ? void 0 : t9._$AU) && void 0 !== i12 ? i12 : this._$Cm;
|
|
196
|
+
}
|
|
197
|
+
get parentNode() {
|
|
198
|
+
let t9 = this._$AA.parentNode;
|
|
199
|
+
const i12 = this._$AM;
|
|
200
|
+
return void 0 !== i12 && 11 === t9.nodeType && (t9 = i12.parentNode), t9;
|
|
201
|
+
}
|
|
202
|
+
get startNode() {
|
|
203
|
+
return this._$AA;
|
|
204
|
+
}
|
|
205
|
+
get endNode() {
|
|
206
|
+
return this._$AB;
|
|
207
|
+
}
|
|
208
|
+
_$AI(t9, i12 = this) {
|
|
209
|
+
t9 = P(this, t9, i12), d(t9) ? t9 === b || null == t9 || "" === t9 ? (this._$AH !== b && this._$AR(), this._$AH = b) : t9 !== this._$AH && t9 !== x && this.g(t9) : void 0 !== t9._$litType$ ? this.$(t9) : void 0 !== t9.nodeType ? this.T(t9) : c(t9) ? this.k(t9) : this.g(t9);
|
|
210
|
+
}
|
|
211
|
+
O(t9, i12 = this._$AB) {
|
|
212
|
+
return this._$AA.parentNode.insertBefore(t9, i12);
|
|
213
|
+
}
|
|
214
|
+
T(t9) {
|
|
215
|
+
this._$AH !== t9 && (this._$AR(), this._$AH = this.O(t9));
|
|
216
|
+
}
|
|
217
|
+
g(t9) {
|
|
218
|
+
this._$AH !== b && d(this._$AH) ? this._$AA.nextSibling.data = t9 : this.T(h.createTextNode(t9)), this._$AH = t9;
|
|
219
|
+
}
|
|
220
|
+
$(t9) {
|
|
221
|
+
var i12;
|
|
222
|
+
const { values: s9, _$litType$: e16 } = t9, o18 = "number" == typeof e16 ? this._$AC(t9) : (void 0 === e16.el && (e16.el = C.createElement(e16.h, this.options)), e16);
|
|
223
|
+
if ((null === (i12 = this._$AH) || void 0 === i12 ? void 0 : i12._$AD) === o18) this._$AH.p(s9);
|
|
224
|
+
else {
|
|
225
|
+
const t10 = new V(o18, this), i13 = t10.v(this.options);
|
|
226
|
+
t10.p(s9), this.T(i13), this._$AH = t10;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
_$AC(t9) {
|
|
230
|
+
let i12 = T.get(t9.strings);
|
|
231
|
+
return void 0 === i12 && T.set(t9.strings, i12 = new C(t9)), i12;
|
|
232
|
+
}
|
|
233
|
+
k(t9) {
|
|
234
|
+
u(this._$AH) || (this._$AH = [], this._$AR());
|
|
235
|
+
const i12 = this._$AH;
|
|
236
|
+
let s9, e16 = 0;
|
|
237
|
+
for (const o18 of t9) e16 === i12.length ? i12.push(s9 = new _N(this.O(r()), this.O(r()), this, this.options)) : s9 = i12[e16], s9._$AI(o18), e16++;
|
|
238
|
+
e16 < i12.length && (this._$AR(s9 && s9._$AB.nextSibling, e16), i12.length = e16);
|
|
239
|
+
}
|
|
240
|
+
_$AR(t9 = this._$AA.nextSibling, i12) {
|
|
241
|
+
var s9;
|
|
242
|
+
for (null === (s9 = this._$AP) || void 0 === s9 || s9.call(this, false, true, i12); t9 && t9 !== this._$AB; ) {
|
|
243
|
+
const i13 = t9.nextSibling;
|
|
244
|
+
t9.remove(), t9 = i13;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
setConnected(t9) {
|
|
248
|
+
var i12;
|
|
249
|
+
void 0 === this._$AM && (this._$Cm = t9, null === (i12 = this._$AP) || void 0 === i12 || i12.call(this, t9));
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
S = class {
|
|
253
|
+
constructor(t9, i12, s9, e16, o18) {
|
|
254
|
+
this.type = 1, this._$AH = b, this._$AN = void 0, this.element = t9, this.name = i12, this._$AM = e16, this.options = o18, s9.length > 2 || "" !== s9[0] || "" !== s9[1] ? (this._$AH = Array(s9.length - 1).fill(new String()), this.strings = s9) : this._$AH = b;
|
|
255
|
+
}
|
|
256
|
+
get tagName() {
|
|
257
|
+
return this.element.tagName;
|
|
258
|
+
}
|
|
259
|
+
get _$AU() {
|
|
260
|
+
return this._$AM._$AU;
|
|
261
|
+
}
|
|
262
|
+
_$AI(t9, i12 = this, s9, e16) {
|
|
263
|
+
const o18 = this.strings;
|
|
264
|
+
let n11 = false;
|
|
265
|
+
if (void 0 === o18) t9 = P(this, t9, i12, 0), n11 = !d(t9) || t9 !== this._$AH && t9 !== x, n11 && (this._$AH = t9);
|
|
266
|
+
else {
|
|
267
|
+
const e17 = t9;
|
|
268
|
+
let l9, h9;
|
|
269
|
+
for (t9 = o18[0], l9 = 0; l9 < o18.length - 1; l9++) h9 = P(this, e17[s9 + l9], i12, l9), h9 === x && (h9 = this._$AH[l9]), n11 || (n11 = !d(h9) || h9 !== this._$AH[l9]), h9 === b ? t9 = b : t9 !== b && (t9 += (null != h9 ? h9 : "") + o18[l9 + 1]), this._$AH[l9] = h9;
|
|
270
|
+
}
|
|
271
|
+
n11 && !e16 && this.j(t9);
|
|
272
|
+
}
|
|
273
|
+
j(t9) {
|
|
274
|
+
t9 === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t9 ? t9 : "");
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
M = class extends S {
|
|
278
|
+
constructor() {
|
|
279
|
+
super(...arguments), this.type = 3;
|
|
280
|
+
}
|
|
281
|
+
j(t9) {
|
|
282
|
+
this.element[this.name] = t9 === b ? void 0 : t9;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
R = s ? s.emptyScript : "";
|
|
286
|
+
k = class extends S {
|
|
287
|
+
constructor() {
|
|
288
|
+
super(...arguments), this.type = 4;
|
|
289
|
+
}
|
|
290
|
+
j(t9) {
|
|
291
|
+
t9 && t9 !== b ? this.element.setAttribute(this.name, R) : this.element.removeAttribute(this.name);
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
H = class extends S {
|
|
295
|
+
constructor(t9, i12, s9, e16, o18) {
|
|
296
|
+
super(t9, i12, s9, e16, o18), this.type = 5;
|
|
297
|
+
}
|
|
298
|
+
_$AI(t9, i12 = this) {
|
|
299
|
+
var s9;
|
|
300
|
+
if ((t9 = null !== (s9 = P(this, t9, i12, 0)) && void 0 !== s9 ? s9 : b) === x) return;
|
|
301
|
+
const e16 = this._$AH, o18 = t9 === b && e16 !== b || t9.capture !== e16.capture || t9.once !== e16.once || t9.passive !== e16.passive, n11 = t9 !== b && (e16 === b || o18);
|
|
302
|
+
o18 && this.element.removeEventListener(this.name, this, e16), n11 && this.element.addEventListener(this.name, this, t9), this._$AH = t9;
|
|
303
|
+
}
|
|
304
|
+
handleEvent(t9) {
|
|
305
|
+
var i12, s9;
|
|
306
|
+
"function" == typeof this._$AH ? this._$AH.call(null !== (s9 = null === (i12 = this.options) || void 0 === i12 ? void 0 : i12.host) && void 0 !== s9 ? s9 : this.element, t9) : this._$AH.handleEvent(t9);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
I = class {
|
|
310
|
+
constructor(t9, i12, s9) {
|
|
311
|
+
this.element = t9, this.type = 6, this._$AN = void 0, this._$AM = i12, this.options = s9;
|
|
312
|
+
}
|
|
313
|
+
get _$AU() {
|
|
314
|
+
return this._$AM._$AU;
|
|
315
|
+
}
|
|
316
|
+
_$AI(t9) {
|
|
317
|
+
P(this, t9);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
L = { P: "$lit$", A: o, M: n, C: 1, L: E, R: V, D: c, V: P, I: N, H: S, N: k, U: H, B: M, F: I };
|
|
321
|
+
z = i.litHtmlPolyfillSupport;
|
|
322
|
+
null == z || z(C, N), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.5.0");
|
|
323
|
+
Z = (t9, i12, s9) => {
|
|
324
|
+
var e16, o18;
|
|
325
|
+
const n11 = null !== (e16 = null == s9 ? void 0 : s9.renderBefore) && void 0 !== e16 ? e16 : i12;
|
|
326
|
+
let l9 = n11._$litPart$;
|
|
327
|
+
if (void 0 === l9) {
|
|
328
|
+
const t10 = null !== (o18 = null == s9 ? void 0 : s9.renderBefore) && void 0 !== o18 ? o18 : null;
|
|
329
|
+
n11._$litPart$ = l9 = new N(i12.insertBefore(r(), t10), t10, void 0, null != s9 ? s9 : {});
|
|
330
|
+
}
|
|
331
|
+
return l9._$AI(t9), l9;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// ../../node_modules/@rxdi/lit-html/dist/decorators/component.decorator.js
|
|
337
|
+
var require_component_decorator = __commonJS({
|
|
338
|
+
"../../node_modules/@rxdi/lit-html/dist/decorators/component.decorator.js"(exports) {
|
|
339
|
+
"use strict";
|
|
340
|
+
var __setFunctionName = exports && exports.__setFunctionName || function(f4, name, prefix) {
|
|
341
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
342
|
+
return Object.defineProperty(f4, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
343
|
+
};
|
|
344
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
345
|
+
exports.Component = void 0;
|
|
346
|
+
var lit_html_1 = (init_lit_html(), __toCommonJS(lit_html_exports));
|
|
347
|
+
var legacyCustomElement = (tagName, clazz, options) => {
|
|
348
|
+
window.customElements.define(tagName, clazz, options);
|
|
349
|
+
return clazz;
|
|
350
|
+
};
|
|
351
|
+
var standardCustomElement = (tagName, descriptor, options) => {
|
|
352
|
+
const { kind, elements } = descriptor;
|
|
353
|
+
return {
|
|
354
|
+
kind,
|
|
355
|
+
elements,
|
|
356
|
+
// This callback is called once the class is otherwise fully defined
|
|
357
|
+
finisher(clazz) {
|
|
358
|
+
window.customElements.define(tagName, clazz, options);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
var isFunction = (v3) => typeof v3 === "function";
|
|
363
|
+
var customElement = (tag, config = {}) => (Base) => {
|
|
364
|
+
var _a;
|
|
365
|
+
var _b;
|
|
366
|
+
if ((_a = window._excluded_components) === null || _a === void 0 ? void 0 : _a.includes(config.selector)) {
|
|
367
|
+
return Base;
|
|
368
|
+
}
|
|
369
|
+
if (!tag || tag && tag.indexOf("-") <= 0) {
|
|
370
|
+
throw new Error(`You need at least 1 dash in the custom element name! ${Base}`);
|
|
371
|
+
}
|
|
372
|
+
config.styles = config.styles || [];
|
|
373
|
+
config.components = config.components || [];
|
|
374
|
+
const OnInit = Base.prototype.OnInit || function() {
|
|
375
|
+
};
|
|
376
|
+
const OnDestroy = Base.prototype.OnDestroy || function() {
|
|
377
|
+
};
|
|
378
|
+
const OnUpdate = Base.prototype.OnUpdate || function() {
|
|
379
|
+
};
|
|
380
|
+
const OnUpdateFirst = Base.prototype.OnUpdateFirst || function() {
|
|
381
|
+
};
|
|
382
|
+
const connectedCallback = Base.prototype.connectedCallback || function() {
|
|
383
|
+
};
|
|
384
|
+
const disconnectedCallback = Base.prototype.disconnectedCallback || function() {
|
|
385
|
+
};
|
|
386
|
+
const update = Base.prototype.update || function() {
|
|
387
|
+
};
|
|
388
|
+
const firstUpdated = Base.prototype.firstUpdated || function() {
|
|
389
|
+
};
|
|
390
|
+
if (!config.template) {
|
|
391
|
+
config.template = Base.prototype.render || (() => (0, lit_html_1.html)``);
|
|
392
|
+
}
|
|
393
|
+
if (config.style) {
|
|
394
|
+
config.styles.push(config.style);
|
|
395
|
+
}
|
|
396
|
+
const ModifiedClass = (_b = class extends Base {
|
|
397
|
+
static is() {
|
|
398
|
+
return tag;
|
|
399
|
+
}
|
|
400
|
+
getTemplateResult() {
|
|
401
|
+
return this;
|
|
402
|
+
}
|
|
403
|
+
OnInit() {
|
|
404
|
+
if (config.container) {
|
|
405
|
+
(0, lit_html_1.render)(config.template.call(this), config.container);
|
|
406
|
+
if (config.style) {
|
|
407
|
+
const style = document.createElement("style");
|
|
408
|
+
style.type = "text/css";
|
|
409
|
+
if (style["styleSheet"]) {
|
|
410
|
+
style["styleSheet"].cssText = config.style.toString();
|
|
411
|
+
} else {
|
|
412
|
+
style.appendChild(document.createTextNode(config.style.toString()));
|
|
413
|
+
}
|
|
414
|
+
config.container.prepend(style);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return OnInit.call(this);
|
|
418
|
+
}
|
|
419
|
+
disconnectedCallback() {
|
|
420
|
+
var _a2;
|
|
421
|
+
OnDestroy.call(this);
|
|
422
|
+
disconnectedCallback.call(this);
|
|
423
|
+
(_a2 = this._registry) === null || _a2 === void 0 ? void 0 : _a2.unsubscribe();
|
|
424
|
+
this._registry = null;
|
|
425
|
+
}
|
|
426
|
+
connectedCallback() {
|
|
427
|
+
var _a2, _c;
|
|
428
|
+
connectedCallback.call(this);
|
|
429
|
+
OnInit.call(this);
|
|
430
|
+
if (isFunction(config.registry)) {
|
|
431
|
+
this._registry = config.registry.call(this);
|
|
432
|
+
}
|
|
433
|
+
if ((_a2 = config.modifiers) === null || _a2 === void 0 ? void 0 : _a2.length) {
|
|
434
|
+
for (const modifier of config.modifiers) {
|
|
435
|
+
if (!modifier) {
|
|
436
|
+
throw new Error(`Provided null value inside modifiers for component "${config.selector}"`);
|
|
437
|
+
}
|
|
438
|
+
if (!modifier.options) {
|
|
439
|
+
throw new Error(`Missing options for attribute inside ${config.selector}`);
|
|
440
|
+
}
|
|
441
|
+
if (!((_c = modifier.options) === null || _c === void 0 ? void 0 : _c.selector)) {
|
|
442
|
+
throw new Error(`Missing attribute selector inside component "${config.selector}"`);
|
|
443
|
+
}
|
|
444
|
+
if (!this._registry && typeof modifier.options.registry === "function") {
|
|
445
|
+
this._registry = modifier.options.registry.call(this);
|
|
446
|
+
}
|
|
447
|
+
if (!this._registry) {
|
|
448
|
+
throw new Error(`Missing attribute registry for attribute "${modifier.options.selector}" and no default registry specified inside component "${config.selector}"`);
|
|
449
|
+
}
|
|
450
|
+
this._registry.define(modifier.options.selector, modifier);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
render() {
|
|
455
|
+
return config.template.call(this);
|
|
456
|
+
}
|
|
457
|
+
update() {
|
|
458
|
+
update.call(this);
|
|
459
|
+
OnUpdate.call(this);
|
|
460
|
+
}
|
|
461
|
+
firstUpdated() {
|
|
462
|
+
firstUpdated.call(this);
|
|
463
|
+
OnUpdateFirst.call(this);
|
|
464
|
+
}
|
|
465
|
+
}, __setFunctionName(_b, "ModifiedClass"), _b.styles = config.styles, _b);
|
|
466
|
+
const registeredElement = window.customElements.get(tag);
|
|
467
|
+
if (registeredElement) {
|
|
468
|
+
console.error(`** IMPORTANT!!! **
|
|
469
|
+
------------------------------------------
|
|
470
|
+
< ${tag} > </${tag}> Component re-defined multiple times and it is already registered inside customElements registry
|
|
471
|
+
Possible Solutions:
|
|
472
|
+
* Bundle problem where multiple versions of the component are used
|
|
473
|
+
* @Component decorator is used twice for the same component
|
|
474
|
+
* Defined "selector" with the same name in multiple components
|
|
475
|
+
|
|
476
|
+
** If this is Server Side Rendering you can ignore this message **
|
|
477
|
+
------------------------------------------
|
|
478
|
+
`);
|
|
479
|
+
return registeredElement;
|
|
480
|
+
}
|
|
481
|
+
if (typeof ModifiedClass === "function") {
|
|
482
|
+
legacyCustomElement(tag, ModifiedClass, {
|
|
483
|
+
extends: config.extends
|
|
484
|
+
});
|
|
485
|
+
} else {
|
|
486
|
+
standardCustomElement(tag, ModifiedClass, { extends: config.extends });
|
|
487
|
+
}
|
|
488
|
+
return ModifiedClass;
|
|
489
|
+
};
|
|
490
|
+
var Component2 = (config) => customElement(config.selector, config);
|
|
491
|
+
exports.Component = Component2;
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// ../../node_modules/@rxdi/lit-html/dist/decorators/hooks/index.js
|
|
496
|
+
var require_hooks = __commonJS({
|
|
497
|
+
"../../node_modules/@rxdi/lit-html/dist/decorators/hooks/index.js"(exports) {
|
|
498
|
+
"use strict";
|
|
499
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
// ../../node_modules/@rxdi/lit-html/dist/decorators/index.js
|
|
504
|
+
var require_decorators = __commonJS({
|
|
505
|
+
"../../node_modules/@rxdi/lit-html/dist/decorators/index.js"(exports) {
|
|
506
|
+
"use strict";
|
|
507
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o18, m4, k2, k22) {
|
|
508
|
+
if (k22 === void 0) k22 = k2;
|
|
509
|
+
var desc = Object.getOwnPropertyDescriptor(m4, k2);
|
|
510
|
+
if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) {
|
|
511
|
+
desc = { enumerable: true, get: function() {
|
|
512
|
+
return m4[k2];
|
|
513
|
+
} };
|
|
514
|
+
}
|
|
515
|
+
Object.defineProperty(o18, k22, desc);
|
|
516
|
+
}) : (function(o18, m4, k2, k22) {
|
|
517
|
+
if (k22 === void 0) k22 = k2;
|
|
518
|
+
o18[k22] = m4[k2];
|
|
519
|
+
}));
|
|
520
|
+
var __exportStar = exports && exports.__exportStar || function(m4, exports2) {
|
|
521
|
+
for (var p4 in m4) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p4)) __createBinding(exports2, m4, p4);
|
|
522
|
+
};
|
|
523
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
524
|
+
__exportStar(require_component_decorator(), exports);
|
|
525
|
+
__exportStar(require_hooks(), exports);
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
// ../../node_modules/lit-html/directive.js
|
|
530
|
+
var directive_exports = {};
|
|
531
|
+
__export(directive_exports, {
|
|
532
|
+
Directive: () => i2,
|
|
533
|
+
PartType: () => t2,
|
|
534
|
+
directive: () => e2
|
|
535
|
+
});
|
|
536
|
+
var t2, e2, i2;
|
|
537
|
+
var init_directive = __esm({
|
|
538
|
+
"../../node_modules/lit-html/directive.js"() {
|
|
539
|
+
t2 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
|
|
540
|
+
e2 = (t9) => (...e16) => ({ _$litDirective$: t9, values: e16 });
|
|
541
|
+
i2 = class {
|
|
542
|
+
constructor(t9) {
|
|
543
|
+
}
|
|
544
|
+
get _$AU() {
|
|
545
|
+
return this._$AM._$AU;
|
|
546
|
+
}
|
|
547
|
+
_$AT(t9, e16, i12) {
|
|
548
|
+
this._$Ct = t9, this._$AM = e16, this._$Ci = i12;
|
|
549
|
+
}
|
|
550
|
+
_$AS(t9, e16) {
|
|
551
|
+
return this.update(t9, e16);
|
|
552
|
+
}
|
|
553
|
+
update(t9, e16) {
|
|
554
|
+
return this.render(...e16);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// ../../node_modules/lit-html/directive-helpers.js
|
|
561
|
+
var directive_helpers_exports = {};
|
|
562
|
+
__export(directive_helpers_exports, {
|
|
563
|
+
TemplateResultType: () => i3,
|
|
564
|
+
clearPart: () => a2,
|
|
565
|
+
getCommittedValue: () => m2,
|
|
566
|
+
getDirectiveClass: () => v2,
|
|
567
|
+
insertPart: () => r2,
|
|
568
|
+
isDirectiveResult: () => d2,
|
|
569
|
+
isPrimitive: () => t3,
|
|
570
|
+
isSingleExpression: () => e3,
|
|
571
|
+
isTemplateResult: () => n2,
|
|
572
|
+
removePart: () => p2,
|
|
573
|
+
setChildPartValue: () => u2,
|
|
574
|
+
setCommittedValue: () => s2
|
|
575
|
+
});
|
|
576
|
+
var l2, t3, i3, n2, d2, v2, e3, c2, r2, u2, f2, s2, m2, p2, a2;
|
|
577
|
+
var init_directive_helpers = __esm({
|
|
578
|
+
"../../node_modules/lit-html/directive-helpers.js"() {
|
|
579
|
+
init_lit_html();
|
|
580
|
+
({ I: l2 } = L);
|
|
581
|
+
t3 = (o18) => null === o18 || "object" != typeof o18 && "function" != typeof o18;
|
|
582
|
+
i3 = { HTML: 1, SVG: 2 };
|
|
583
|
+
n2 = (o18, l9) => void 0 === l9 ? void 0 !== (null == o18 ? void 0 : o18._$litType$) : (null == o18 ? void 0 : o18._$litType$) === l9;
|
|
584
|
+
d2 = (o18) => void 0 !== (null == o18 ? void 0 : o18._$litDirective$);
|
|
585
|
+
v2 = (o18) => null == o18 ? void 0 : o18._$litDirective$;
|
|
586
|
+
e3 = (o18) => void 0 === o18.strings;
|
|
587
|
+
c2 = () => document.createComment("");
|
|
588
|
+
r2 = (o18, t9, i12) => {
|
|
589
|
+
var n11;
|
|
590
|
+
const d6 = o18._$AA.parentNode, v3 = void 0 === t9 ? o18._$AB : t9._$AA;
|
|
591
|
+
if (void 0 === i12) {
|
|
592
|
+
const t10 = d6.insertBefore(c2(), v3), n12 = d6.insertBefore(c2(), v3);
|
|
593
|
+
i12 = new l2(t10, n12, o18, o18.options);
|
|
594
|
+
} else {
|
|
595
|
+
const l9 = i12._$AB.nextSibling, t10 = i12._$AM, e16 = t10 !== o18;
|
|
596
|
+
if (e16) {
|
|
597
|
+
let l10;
|
|
598
|
+
null === (n11 = i12._$AQ) || void 0 === n11 || n11.call(i12, o18), i12._$AM = o18, void 0 !== i12._$AP && (l10 = o18._$AU) !== t10._$AU && i12._$AP(l10);
|
|
599
|
+
}
|
|
600
|
+
if (l9 !== v3 || e16) {
|
|
601
|
+
let o19 = i12._$AA;
|
|
602
|
+
for (; o19 !== l9; ) {
|
|
603
|
+
const l10 = o19.nextSibling;
|
|
604
|
+
d6.insertBefore(o19, v3), o19 = l10;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return i12;
|
|
609
|
+
};
|
|
610
|
+
u2 = (o18, l9, t9 = o18) => (o18._$AI(l9, t9), o18);
|
|
611
|
+
f2 = {};
|
|
612
|
+
s2 = (o18, l9 = f2) => o18._$AH = l9;
|
|
613
|
+
m2 = (o18) => o18._$AH;
|
|
614
|
+
p2 = (o18) => {
|
|
615
|
+
var l9;
|
|
616
|
+
null === (l9 = o18._$AP) || void 0 === l9 || l9.call(o18, false, true);
|
|
617
|
+
let t9 = o18._$AA;
|
|
618
|
+
const i12 = o18._$AB.nextSibling;
|
|
619
|
+
for (; t9 !== i12; ) {
|
|
620
|
+
const o19 = t9.nextSibling;
|
|
621
|
+
t9.remove(), t9 = o19;
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
a2 = (o18) => {
|
|
625
|
+
o18._$AR();
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
// ../../node_modules/lit-html/async-directive.js
|
|
631
|
+
var async_directive_exports = {};
|
|
632
|
+
__export(async_directive_exports, {
|
|
633
|
+
AsyncDirective: () => c3,
|
|
634
|
+
Directive: () => i2,
|
|
635
|
+
PartType: () => t2,
|
|
636
|
+
directive: () => e2
|
|
637
|
+
});
|
|
638
|
+
function n3(i12) {
|
|
639
|
+
void 0 !== this._$AN ? (o2(this), this._$AM = i12, r3(this)) : this._$AM = i12;
|
|
640
|
+
}
|
|
641
|
+
function h2(i12, t9 = false, e16 = 0) {
|
|
642
|
+
const r7 = this._$AH, n11 = this._$AN;
|
|
643
|
+
if (void 0 !== n11 && 0 !== n11.size) if (t9) if (Array.isArray(r7)) for (let i13 = e16; i13 < r7.length; i13++) s3(r7[i13], false), o2(r7[i13]);
|
|
644
|
+
else null != r7 && (s3(r7, false), o2(r7));
|
|
645
|
+
else s3(this, i12);
|
|
646
|
+
}
|
|
647
|
+
var s3, o2, r3, l3, c3;
|
|
648
|
+
var init_async_directive = __esm({
|
|
649
|
+
"../../node_modules/lit-html/async-directive.js"() {
|
|
650
|
+
init_directive_helpers();
|
|
651
|
+
init_directive();
|
|
652
|
+
init_directive();
|
|
653
|
+
s3 = (i12, t9) => {
|
|
654
|
+
var e16, o18;
|
|
655
|
+
const r7 = i12._$AN;
|
|
656
|
+
if (void 0 === r7) return false;
|
|
657
|
+
for (const i13 of r7) null === (o18 = (e16 = i13)._$AO) || void 0 === o18 || o18.call(e16, t9, false), s3(i13, t9);
|
|
658
|
+
return true;
|
|
659
|
+
};
|
|
660
|
+
o2 = (i12) => {
|
|
661
|
+
let t9, e16;
|
|
662
|
+
do {
|
|
663
|
+
if (void 0 === (t9 = i12._$AM)) break;
|
|
664
|
+
e16 = t9._$AN, e16.delete(i12), i12 = t9;
|
|
665
|
+
} while (0 === (null == e16 ? void 0 : e16.size));
|
|
666
|
+
};
|
|
667
|
+
r3 = (i12) => {
|
|
668
|
+
for (let t9; t9 = i12._$AM; i12 = t9) {
|
|
669
|
+
let e16 = t9._$AN;
|
|
670
|
+
if (void 0 === e16) t9._$AN = e16 = /* @__PURE__ */ new Set();
|
|
671
|
+
else if (e16.has(i12)) break;
|
|
672
|
+
e16.add(i12), l3(t9);
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
l3 = (i12) => {
|
|
676
|
+
var t9, s9, o18, r7;
|
|
677
|
+
i12.type == t2.CHILD && (null !== (t9 = (o18 = i12)._$AP) && void 0 !== t9 || (o18._$AP = h2), null !== (s9 = (r7 = i12)._$AQ) && void 0 !== s9 || (r7._$AQ = n3));
|
|
678
|
+
};
|
|
679
|
+
c3 = class extends i2 {
|
|
680
|
+
constructor() {
|
|
681
|
+
super(...arguments), this._$AN = void 0;
|
|
682
|
+
}
|
|
683
|
+
_$AT(i12, t9, e16) {
|
|
684
|
+
super._$AT(i12, t9, e16), r3(this), this.isConnected = i12._$AU;
|
|
685
|
+
}
|
|
686
|
+
_$AO(i12, t9 = true) {
|
|
687
|
+
var e16, r7;
|
|
688
|
+
i12 !== this.isConnected && (this.isConnected = i12, i12 ? null === (e16 = this.reconnected) || void 0 === e16 || e16.call(this) : null === (r7 = this.disconnected) || void 0 === r7 || r7.call(this)), t9 && (s3(this, i12), o2(this));
|
|
689
|
+
}
|
|
690
|
+
setValue(t9) {
|
|
691
|
+
if (e3(this._$Ct)) this._$Ct._$AI(t9, this);
|
|
692
|
+
else {
|
|
693
|
+
const i12 = [...this._$Ct._$AH];
|
|
694
|
+
i12[this._$Ci] = t9, this._$Ct._$AI(i12, this, 0);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
disconnected() {
|
|
698
|
+
}
|
|
699
|
+
reconnected() {
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
// ../../node_modules/@rxdi/lit-html/dist/async.js
|
|
706
|
+
var require_async = __commonJS({
|
|
707
|
+
"../../node_modules/@rxdi/lit-html/dist/async.js"(exports) {
|
|
708
|
+
"use strict";
|
|
709
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
710
|
+
exports.async = void 0;
|
|
711
|
+
var directive_1 = (init_directive(), __toCommonJS(directive_exports));
|
|
712
|
+
var async_directive_1 = (init_async_directive(), __toCommonJS(async_directive_exports));
|
|
713
|
+
var lit_html_1 = (init_lit_html(), __toCommonJS(lit_html_exports));
|
|
714
|
+
var ObserveDirective = class extends async_directive_1.AsyncDirective {
|
|
715
|
+
// When the observable changes, unsubscribe to the old one and
|
|
716
|
+
// subscribe to the new one
|
|
717
|
+
render(asyncResult) {
|
|
718
|
+
if ("then" in asyncResult) {
|
|
719
|
+
Promise.resolve(asyncResult).then((v3) => this.setValue(v3));
|
|
720
|
+
return "";
|
|
721
|
+
}
|
|
722
|
+
if (this.observable !== asyncResult) {
|
|
723
|
+
this.unsubscribe();
|
|
724
|
+
this.observable = asyncResult;
|
|
725
|
+
if (this.isConnected) {
|
|
726
|
+
this.subscribe(asyncResult);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return lit_html_1.noChange;
|
|
730
|
+
}
|
|
731
|
+
// Subscribes to the observable, calling the directive's asynchronous
|
|
732
|
+
// setValue API each time the value changes
|
|
733
|
+
subscribe(observable) {
|
|
734
|
+
this.subscription = observable.subscribe((v3) => {
|
|
735
|
+
this.setValue(v3);
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
// When the directive is disconnected from the DOM, unsubscribe to ensure
|
|
739
|
+
// the directive instance can be garbage collected
|
|
740
|
+
disconnected() {
|
|
741
|
+
this.unsubscribe();
|
|
742
|
+
}
|
|
743
|
+
unsubscribe() {
|
|
744
|
+
if (this.subscription) {
|
|
745
|
+
this.subscription.unsubscribe();
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
// If the subtree the directive is in was disconneted and subsequently
|
|
749
|
+
// re-connected, re-subscribe to make the directive operable again
|
|
750
|
+
reconnected() {
|
|
751
|
+
this.subscribe(this.observable);
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
exports.async = (0, directive_1.directive)(ObserveDirective);
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
// ../../node_modules/lit-html/experimental-hydrate.js
|
|
759
|
+
var experimental_hydrate_exports = {};
|
|
760
|
+
__export(experimental_hydrate_exports, {
|
|
761
|
+
digestForTemplateResult: () => m3,
|
|
762
|
+
hydrate: () => f3
|
|
763
|
+
});
|
|
764
|
+
var i4, a3, s4, c4, d3, f3, p3, u3, h3, m3;
|
|
765
|
+
var init_experimental_hydrate = __esm({
|
|
766
|
+
"../../node_modules/lit-html/experimental-hydrate.js"() {
|
|
767
|
+
init_lit_html();
|
|
768
|
+
init_directive();
|
|
769
|
+
init_directive_helpers();
|
|
770
|
+
({ R: i4, D: a3, V: s4, I: c4, F: d3 } = L);
|
|
771
|
+
f3 = (e16, t9, r7 = {}) => {
|
|
772
|
+
if (void 0 !== t9._$litPart$) throw Error("container already contains a live render");
|
|
773
|
+
let n11, o18;
|
|
774
|
+
const l9 = [], i12 = document.createTreeWalker(t9, NodeFilter.SHOW_COMMENT, null, false);
|
|
775
|
+
let a5;
|
|
776
|
+
for (; null !== (a5 = i12.nextNode()); ) {
|
|
777
|
+
const t10 = a5.data;
|
|
778
|
+
if (t10.startsWith("lit-part")) {
|
|
779
|
+
if (0 === l9.length && void 0 !== n11) throw Error("there must be only one root part per container");
|
|
780
|
+
o18 = p3(e16, a5, l9, r7), null != n11 || (n11 = o18);
|
|
781
|
+
} else if (t10.startsWith("lit-node")) h3(a5, l9, r7);
|
|
782
|
+
else if (t10.startsWith("/lit-part")) {
|
|
783
|
+
if (1 === l9.length && o18 !== n11) throw Error("internal error");
|
|
784
|
+
o18 = u3(a5, o18, l9);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
console.assert(void 0 !== n11, "there should be exactly one root part in a render container"), t9._$litPart$ = n11;
|
|
788
|
+
};
|
|
789
|
+
p3 = (t9, r7, l9, d6) => {
|
|
790
|
+
let f4, p4;
|
|
791
|
+
if (0 === l9.length) p4 = new c4(r7, null, void 0, d6), f4 = t9;
|
|
792
|
+
else {
|
|
793
|
+
const e16 = l9[l9.length - 1];
|
|
794
|
+
if ("template-instance" === e16.type) p4 = new c4(r7, null, e16.instance, d6), e16.instance.u.push(p4), f4 = e16.result.values[e16.instancePartIndex++], e16.templatePartIndex++;
|
|
795
|
+
else if ("iterable" === e16.type) {
|
|
796
|
+
p4 = new c4(r7, null, e16.part, d6);
|
|
797
|
+
const t10 = e16.iterator.next();
|
|
798
|
+
if (t10.done) throw f4 = void 0, e16.done = true, Error("Unhandled shorter than expected iterable");
|
|
799
|
+
f4 = t10.value, e16.part._$AH.push(p4);
|
|
800
|
+
} else p4 = new c4(r7, null, e16.part, d6);
|
|
801
|
+
}
|
|
802
|
+
if (f4 = s4(p4, f4), f4 === x) l9.push({ part: p4, type: "leaf" });
|
|
803
|
+
else if (t3(f4)) l9.push({ part: p4, type: "leaf" }), p4._$AH = f4;
|
|
804
|
+
else if (n2(f4)) {
|
|
805
|
+
const e16 = "lit-part " + m3(f4);
|
|
806
|
+
if (r7.data !== e16) throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");
|
|
807
|
+
{
|
|
808
|
+
const e17 = c4.prototype._$AC(f4), t10 = new i4(e17, p4);
|
|
809
|
+
l9.push({ type: "template-instance", instance: t10, part: p4, templatePartIndex: 0, instancePartIndex: 0, result: f4 }), p4._$AH = t10;
|
|
810
|
+
}
|
|
811
|
+
} else a3(f4) ? (l9.push({ part: p4, type: "iterable", value: f4, iterator: f4[Symbol.iterator](), done: false }), p4._$AH = []) : (l9.push({ part: p4, type: "leaf" }), p4._$AH = null == f4 ? "" : f4);
|
|
812
|
+
return p4;
|
|
813
|
+
};
|
|
814
|
+
u3 = (e16, t9, r7) => {
|
|
815
|
+
if (void 0 === t9) throw Error("unbalanced part marker");
|
|
816
|
+
t9._$AB = e16;
|
|
817
|
+
const n11 = r7.pop();
|
|
818
|
+
if ("iterable" === n11.type && !n11.iterator.next().done) throw Error("unexpected longer than expected iterable");
|
|
819
|
+
if (r7.length > 0) return r7[r7.length - 1].part;
|
|
820
|
+
};
|
|
821
|
+
h3 = (e16, t9, n11) => {
|
|
822
|
+
var o18;
|
|
823
|
+
const i12 = /lit-node (\d+)/.exec(e16.data), a5 = parseInt(i12[1]), c9 = null !== (o18 = e16.previousElementSibling) && void 0 !== o18 ? o18 : e16.parentElement;
|
|
824
|
+
if (null === c9) throw Error("could not find node for attribute parts");
|
|
825
|
+
c9.removeAttribute("defer-hydration");
|
|
826
|
+
const f4 = t9[t9.length - 1];
|
|
827
|
+
if ("template-instance" !== f4.type) throw Error("internal error");
|
|
828
|
+
{
|
|
829
|
+
const e17 = f4.instance;
|
|
830
|
+
for (; ; ) {
|
|
831
|
+
const t10 = e17._$AD.parts[f4.templatePartIndex];
|
|
832
|
+
if (void 0 === t10 || t10.type !== t2.ATTRIBUTE && t10.type !== t2.ELEMENT || t10.index !== a5) break;
|
|
833
|
+
if (t10.type === t2.ATTRIBUTE) {
|
|
834
|
+
const o19 = new t10.ctor(c9, t10.name, t10.strings, f4.instance, n11), i13 = e3(o19) ? f4.result.values[f4.instancePartIndex] : f4.result.values, a6 = !(o19.type === t2.EVENT || o19.type === t2.PROPERTY);
|
|
835
|
+
o19._$AI(i13, o19, f4.instancePartIndex, a6), f4.instancePartIndex += t10.strings.length - 1, e17.u.push(o19);
|
|
836
|
+
} else {
|
|
837
|
+
const t11 = new d3(c9, f4.instance, n11);
|
|
838
|
+
s4(t11, f4.result.values[f4.instancePartIndex++]), e17.u.push(t11);
|
|
839
|
+
}
|
|
840
|
+
f4.templatePartIndex++;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
m3 = (e16) => {
|
|
845
|
+
const t9 = new Uint32Array(2).fill(5381);
|
|
846
|
+
for (const r7 of e16.strings) for (let e17 = 0; e17 < r7.length; e17++) t9[e17 % 2] = 33 * t9[e17 % 2] ^ r7.charCodeAt(e17);
|
|
847
|
+
return btoa(String.fromCharCode(...new Uint8Array(t9.buffer)));
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// ../../node_modules/lit-element/experimental-hydrate-support.js
|
|
853
|
+
var experimental_hydrate_support_exports = {};
|
|
854
|
+
var init_experimental_hydrate_support = __esm({
|
|
855
|
+
"../../node_modules/lit-element/experimental-hydrate-support.js"() {
|
|
856
|
+
init_lit_html();
|
|
857
|
+
init_experimental_hydrate();
|
|
858
|
+
globalThis.litElementHydrateSupport = ({ LitElement: s9 }) => {
|
|
859
|
+
const e16 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s9), "observedAttributes").get;
|
|
860
|
+
Object.defineProperty(s9, "observedAttributes", { get() {
|
|
861
|
+
return [...e16.call(this), "defer-hydration"];
|
|
862
|
+
} });
|
|
863
|
+
const h9 = s9.prototype.attributeChangedCallback;
|
|
864
|
+
s9.prototype.attributeChangedCallback = function(t9, i12, s10) {
|
|
865
|
+
"defer-hydration" === t9 && null === s10 && n11.call(this), h9.call(this, t9, i12, s10);
|
|
866
|
+
};
|
|
867
|
+
const n11 = s9.prototype.connectedCallback;
|
|
868
|
+
s9.prototype.connectedCallback = function() {
|
|
869
|
+
this.hasAttribute("defer-hydration") || n11.call(this);
|
|
870
|
+
};
|
|
871
|
+
const o18 = s9.prototype.createRenderRoot;
|
|
872
|
+
s9.prototype.createRenderRoot = function() {
|
|
873
|
+
return this.shadowRoot ? (this._$AG = true, this.shadowRoot) : o18.call(this);
|
|
874
|
+
};
|
|
875
|
+
const r7 = Object.getPrototypeOf(s9.prototype).update;
|
|
876
|
+
s9.prototype.update = function(s10) {
|
|
877
|
+
const e17 = this.render();
|
|
878
|
+
r7.call(this, s10), this._$AG ? (this._$AG = false, f3(e17, this.renderRoot, this.renderOptions)) : Z(e17, this.renderRoot, this.renderOptions);
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
// ../../node_modules/lit-html/polyfill-support.js
|
|
885
|
+
var require_polyfill_support = __commonJS({
|
|
886
|
+
"../../node_modules/lit-html/polyfill-support.js"() {
|
|
887
|
+
!(function(i12) {
|
|
888
|
+
"function" == typeof define && define.amd ? define(i12) : i12();
|
|
889
|
+
})((function() {
|
|
890
|
+
"use strict";
|
|
891
|
+
var i12, n11 = /* @__PURE__ */ new Set(), o18 = /* @__PURE__ */ new Map();
|
|
892
|
+
null !== (i12 = globalThis.litHtmlPolyfillSupport) && void 0 !== i12 || (globalThis.litHtmlPolyfillSupport = function(i13, t9) {
|
|
893
|
+
if (void 0 !== window.ShadyCSS && (!window.ShadyCSS.nativeShadow || window.ShadyCSS.ApplyShim)) {
|
|
894
|
+
var d6 = function(i14) {
|
|
895
|
+
return void 0 !== i14 && !n11.has(i14);
|
|
896
|
+
}, e16 = function(i14) {
|
|
897
|
+
var n12 = o18.get(i14);
|
|
898
|
+
return void 0 === n12 && o18.set(i14, n12 = []), n12;
|
|
899
|
+
}, v3 = /* @__PURE__ */ new Map(), u5 = i13.createElement;
|
|
900
|
+
i13.createElement = function(n12, o19) {
|
|
901
|
+
var t10 = u5.call(i13, n12, o19), v4 = null == o19 ? void 0 : o19.scope;
|
|
902
|
+
if (void 0 !== v4 && (window.ShadyCSS.nativeShadow || window.ShadyCSS.prepareTemplateDom(t10, v4), d6(v4))) {
|
|
903
|
+
var l10 = e16(v4), r8 = t10.content.querySelectorAll("style");
|
|
904
|
+
l10.push.apply(l10, Array.from(r8).map((function(i14) {
|
|
905
|
+
var n13;
|
|
906
|
+
return null === (n13 = i14.parentNode) || void 0 === n13 || n13.removeChild(i14), i14.textContent;
|
|
907
|
+
})));
|
|
908
|
+
}
|
|
909
|
+
return t10;
|
|
910
|
+
};
|
|
911
|
+
var l9 = document.createDocumentFragment(), r7 = document.createComment(""), a5 = t9.prototype, s9 = a5._$AI;
|
|
912
|
+
a5._$AI = function(i14, t10) {
|
|
913
|
+
var v4, u6;
|
|
914
|
+
void 0 === t10 && (t10 = this);
|
|
915
|
+
var a6 = this._$AA.parentNode, w2 = null === (v4 = this.options) || void 0 === v4 ? void 0 : v4.scope;
|
|
916
|
+
if (a6 instanceof ShadowRoot && d6(w2)) {
|
|
917
|
+
var f4 = this._$AA, c9 = this._$AB;
|
|
918
|
+
l9.appendChild(r7), this._$AA = r7, this._$AB = null, s9.call(this, i14, t10);
|
|
919
|
+
var h9 = (null == i14 ? void 0 : i14._$litType$) ? this._$AH._$AD.el : document.createElement("template");
|
|
920
|
+
if ((function(i15, t11) {
|
|
921
|
+
var d7, v5 = e16(i15), u7 = 0 !== v5.length;
|
|
922
|
+
u7 && ((d7 = document.createElement("style")).textContent = v5.join("\n"), t11.content.appendChild(d7)), n11.add(i15), o18.delete(i15), window.ShadyCSS.prepareTemplateStyles(t11, i15), u7 && window.ShadyCSS.nativeShadow && null !== (d7 = t11.content.querySelector("style")) && t11.content.appendChild(d7);
|
|
923
|
+
})(w2, h9), l9.removeChild(r7), null === (u6 = window.ShadyCSS) || void 0 === u6 ? void 0 : u6.nativeShadow) {
|
|
924
|
+
var y2 = h9.content.querySelector("style");
|
|
925
|
+
null !== y2 && l9.appendChild(y2.cloneNode(true));
|
|
926
|
+
}
|
|
927
|
+
a6.insertBefore(l9, c9), this._$AA = f4, this._$AB = c9;
|
|
928
|
+
} else s9.call(this, i14, t10);
|
|
929
|
+
}, a5._$AC = function(n12) {
|
|
930
|
+
var o19, t10 = null === (o19 = this.options) || void 0 === o19 ? void 0 : o19.scope, d7 = v3.get(t10);
|
|
931
|
+
void 0 === d7 && v3.set(t10, d7 = /* @__PURE__ */ new Map());
|
|
932
|
+
var e17 = d7.get(n12.strings);
|
|
933
|
+
return void 0 === e17 && d7.set(n12.strings, e17 = new i13(n12, this.options)), e17;
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
}));
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
|
|
941
|
+
// ../../node_modules/@lit/reactive-element/css-tag.js
|
|
942
|
+
var t4, e4, s5, n4, o3, r4, i5, S2, c5;
|
|
943
|
+
var init_css_tag = __esm({
|
|
944
|
+
"../../node_modules/@lit/reactive-element/css-tag.js"() {
|
|
945
|
+
t4 = window;
|
|
946
|
+
e4 = t4.ShadowRoot && (void 0 === t4.ShadyCSS || t4.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
947
|
+
s5 = /* @__PURE__ */ Symbol();
|
|
948
|
+
n4 = /* @__PURE__ */ new WeakMap();
|
|
949
|
+
o3 = class {
|
|
950
|
+
constructor(t9, e16, n11) {
|
|
951
|
+
if (this._$cssResult$ = true, n11 !== s5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
952
|
+
this.cssText = t9, this.t = e16;
|
|
953
|
+
}
|
|
954
|
+
get styleSheet() {
|
|
955
|
+
let t9 = this.o;
|
|
956
|
+
const s9 = this.t;
|
|
957
|
+
if (e4 && void 0 === t9) {
|
|
958
|
+
const e16 = void 0 !== s9 && 1 === s9.length;
|
|
959
|
+
e16 && (t9 = n4.get(s9)), void 0 === t9 && ((this.o = t9 = new CSSStyleSheet()).replaceSync(this.cssText), e16 && n4.set(s9, t9));
|
|
960
|
+
}
|
|
961
|
+
return t9;
|
|
962
|
+
}
|
|
963
|
+
toString() {
|
|
964
|
+
return this.cssText;
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
r4 = (t9) => new o3("string" == typeof t9 ? t9 : t9 + "", void 0, s5);
|
|
968
|
+
i5 = (t9, ...e16) => {
|
|
969
|
+
const n11 = 1 === t9.length ? t9[0] : e16.reduce(((e17, s9, n12) => e17 + ((t10) => {
|
|
970
|
+
if (true === t10._$cssResult$) return t10.cssText;
|
|
971
|
+
if ("number" == typeof t10) return t10;
|
|
972
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t10 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
973
|
+
})(s9) + t9[n12 + 1]), t9[0]);
|
|
974
|
+
return new o3(n11, t9, s5);
|
|
975
|
+
};
|
|
976
|
+
S2 = (s9, n11) => {
|
|
977
|
+
e4 ? s9.adoptedStyleSheets = n11.map(((t9) => t9 instanceof CSSStyleSheet ? t9 : t9.styleSheet)) : n11.forEach(((e16) => {
|
|
978
|
+
const n12 = document.createElement("style"), o18 = t4.litNonce;
|
|
979
|
+
void 0 !== o18 && n12.setAttribute("nonce", o18), n12.textContent = e16.cssText, s9.appendChild(n12);
|
|
980
|
+
}));
|
|
981
|
+
};
|
|
982
|
+
c5 = e4 ? (t9) => t9 : (t9) => t9 instanceof CSSStyleSheet ? ((t10) => {
|
|
983
|
+
let e16 = "";
|
|
984
|
+
for (const s9 of t10.cssRules) e16 += s9.cssText;
|
|
985
|
+
return r4(e16);
|
|
986
|
+
})(t9) : t9;
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
// ../../node_modules/@lit/reactive-element/reactive-element.js
|
|
991
|
+
var s6, e5, r5, h4, o4, n5, a4, l4, d4;
|
|
992
|
+
var init_reactive_element = __esm({
|
|
993
|
+
"../../node_modules/@lit/reactive-element/reactive-element.js"() {
|
|
994
|
+
init_css_tag();
|
|
995
|
+
init_css_tag();
|
|
996
|
+
e5 = window;
|
|
997
|
+
r5 = e5.trustedTypes;
|
|
998
|
+
h4 = r5 ? r5.emptyScript : "";
|
|
999
|
+
o4 = e5.reactiveElementPolyfillSupport;
|
|
1000
|
+
n5 = { toAttribute(t9, i12) {
|
|
1001
|
+
switch (i12) {
|
|
1002
|
+
case Boolean:
|
|
1003
|
+
t9 = t9 ? h4 : null;
|
|
1004
|
+
break;
|
|
1005
|
+
case Object:
|
|
1006
|
+
case Array:
|
|
1007
|
+
t9 = null == t9 ? t9 : JSON.stringify(t9);
|
|
1008
|
+
}
|
|
1009
|
+
return t9;
|
|
1010
|
+
}, fromAttribute(t9, i12) {
|
|
1011
|
+
let s9 = t9;
|
|
1012
|
+
switch (i12) {
|
|
1013
|
+
case Boolean:
|
|
1014
|
+
s9 = null !== t9;
|
|
1015
|
+
break;
|
|
1016
|
+
case Number:
|
|
1017
|
+
s9 = null === t9 ? null : Number(t9);
|
|
1018
|
+
break;
|
|
1019
|
+
case Object:
|
|
1020
|
+
case Array:
|
|
1021
|
+
try {
|
|
1022
|
+
s9 = JSON.parse(t9);
|
|
1023
|
+
} catch (t10) {
|
|
1024
|
+
s9 = null;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
return s9;
|
|
1028
|
+
} };
|
|
1029
|
+
a4 = (t9, i12) => i12 !== t9 && (i12 == i12 || t9 == t9);
|
|
1030
|
+
l4 = { attribute: true, type: String, converter: n5, reflect: false, hasChanged: a4 };
|
|
1031
|
+
d4 = class extends HTMLElement {
|
|
1032
|
+
constructor() {
|
|
1033
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this.u();
|
|
1034
|
+
}
|
|
1035
|
+
static addInitializer(t9) {
|
|
1036
|
+
var i12;
|
|
1037
|
+
this.finalize(), (null !== (i12 = this.h) && void 0 !== i12 ? i12 : this.h = []).push(t9);
|
|
1038
|
+
}
|
|
1039
|
+
static get observedAttributes() {
|
|
1040
|
+
this.finalize();
|
|
1041
|
+
const t9 = [];
|
|
1042
|
+
return this.elementProperties.forEach(((i12, s9) => {
|
|
1043
|
+
const e16 = this._$Ep(s9, i12);
|
|
1044
|
+
void 0 !== e16 && (this._$Ev.set(e16, s9), t9.push(e16));
|
|
1045
|
+
})), t9;
|
|
1046
|
+
}
|
|
1047
|
+
static createProperty(t9, i12 = l4) {
|
|
1048
|
+
if (i12.state && (i12.attribute = false), this.finalize(), this.elementProperties.set(t9, i12), !i12.noAccessor && !this.prototype.hasOwnProperty(t9)) {
|
|
1049
|
+
const s9 = "symbol" == typeof t9 ? /* @__PURE__ */ Symbol() : "__" + t9, e16 = this.getPropertyDescriptor(t9, s9, i12);
|
|
1050
|
+
void 0 !== e16 && Object.defineProperty(this.prototype, t9, e16);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
static getPropertyDescriptor(t9, i12, s9) {
|
|
1054
|
+
return { get() {
|
|
1055
|
+
return this[i12];
|
|
1056
|
+
}, set(e16) {
|
|
1057
|
+
const r7 = this[t9];
|
|
1058
|
+
this[i12] = e16, this.requestUpdate(t9, r7, s9);
|
|
1059
|
+
}, configurable: true, enumerable: true };
|
|
1060
|
+
}
|
|
1061
|
+
static getPropertyOptions(t9) {
|
|
1062
|
+
return this.elementProperties.get(t9) || l4;
|
|
1063
|
+
}
|
|
1064
|
+
static finalize() {
|
|
1065
|
+
if (this.hasOwnProperty("finalized")) return false;
|
|
1066
|
+
this.finalized = true;
|
|
1067
|
+
const t9 = Object.getPrototypeOf(this);
|
|
1068
|
+
if (t9.finalize(), void 0 !== t9.h && (this.h = [...t9.h]), this.elementProperties = new Map(t9.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
1069
|
+
const t10 = this.properties, i12 = [...Object.getOwnPropertyNames(t10), ...Object.getOwnPropertySymbols(t10)];
|
|
1070
|
+
for (const s9 of i12) this.createProperty(s9, t10[s9]);
|
|
1071
|
+
}
|
|
1072
|
+
return this.elementStyles = this.finalizeStyles(this.styles), true;
|
|
1073
|
+
}
|
|
1074
|
+
static finalizeStyles(i12) {
|
|
1075
|
+
const s9 = [];
|
|
1076
|
+
if (Array.isArray(i12)) {
|
|
1077
|
+
const e16 = new Set(i12.flat(1 / 0).reverse());
|
|
1078
|
+
for (const i13 of e16) s9.unshift(c5(i13));
|
|
1079
|
+
} else void 0 !== i12 && s9.push(c5(i12));
|
|
1080
|
+
return s9;
|
|
1081
|
+
}
|
|
1082
|
+
static _$Ep(t9, i12) {
|
|
1083
|
+
const s9 = i12.attribute;
|
|
1084
|
+
return false === s9 ? void 0 : "string" == typeof s9 ? s9 : "string" == typeof t9 ? t9.toLowerCase() : void 0;
|
|
1085
|
+
}
|
|
1086
|
+
u() {
|
|
1087
|
+
var t9;
|
|
1088
|
+
this._$E_ = new Promise(((t10) => this.enableUpdating = t10)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t9 = this.constructor.h) || void 0 === t9 || t9.forEach(((t10) => t10(this)));
|
|
1089
|
+
}
|
|
1090
|
+
addController(t9) {
|
|
1091
|
+
var i12, s9;
|
|
1092
|
+
(null !== (i12 = this._$ES) && void 0 !== i12 ? i12 : this._$ES = []).push(t9), void 0 !== this.renderRoot && this.isConnected && (null === (s9 = t9.hostConnected) || void 0 === s9 || s9.call(t9));
|
|
1093
|
+
}
|
|
1094
|
+
removeController(t9) {
|
|
1095
|
+
var i12;
|
|
1096
|
+
null === (i12 = this._$ES) || void 0 === i12 || i12.splice(this._$ES.indexOf(t9) >>> 0, 1);
|
|
1097
|
+
}
|
|
1098
|
+
_$Eg() {
|
|
1099
|
+
this.constructor.elementProperties.forEach(((t9, i12) => {
|
|
1100
|
+
this.hasOwnProperty(i12) && (this._$Ei.set(i12, this[i12]), delete this[i12]);
|
|
1101
|
+
}));
|
|
1102
|
+
}
|
|
1103
|
+
createRenderRoot() {
|
|
1104
|
+
var t9;
|
|
1105
|
+
const s9 = null !== (t9 = this.shadowRoot) && void 0 !== t9 ? t9 : this.attachShadow(this.constructor.shadowRootOptions);
|
|
1106
|
+
return S2(s9, this.constructor.elementStyles), s9;
|
|
1107
|
+
}
|
|
1108
|
+
connectedCallback() {
|
|
1109
|
+
var t9;
|
|
1110
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t9 = this._$ES) || void 0 === t9 || t9.forEach(((t10) => {
|
|
1111
|
+
var i12;
|
|
1112
|
+
return null === (i12 = t10.hostConnected) || void 0 === i12 ? void 0 : i12.call(t10);
|
|
1113
|
+
}));
|
|
1114
|
+
}
|
|
1115
|
+
enableUpdating(t9) {
|
|
1116
|
+
}
|
|
1117
|
+
disconnectedCallback() {
|
|
1118
|
+
var t9;
|
|
1119
|
+
null === (t9 = this._$ES) || void 0 === t9 || t9.forEach(((t10) => {
|
|
1120
|
+
var i12;
|
|
1121
|
+
return null === (i12 = t10.hostDisconnected) || void 0 === i12 ? void 0 : i12.call(t10);
|
|
1122
|
+
}));
|
|
1123
|
+
}
|
|
1124
|
+
attributeChangedCallback(t9, i12, s9) {
|
|
1125
|
+
this._$AK(t9, s9);
|
|
1126
|
+
}
|
|
1127
|
+
_$EO(t9, i12, s9 = l4) {
|
|
1128
|
+
var e16;
|
|
1129
|
+
const r7 = this.constructor._$Ep(t9, s9);
|
|
1130
|
+
if (void 0 !== r7 && true === s9.reflect) {
|
|
1131
|
+
const h9 = (void 0 !== (null === (e16 = s9.converter) || void 0 === e16 ? void 0 : e16.toAttribute) ? s9.converter : n5).toAttribute(i12, s9.type);
|
|
1132
|
+
this._$El = t9, null == h9 ? this.removeAttribute(r7) : this.setAttribute(r7, h9), this._$El = null;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
_$AK(t9, i12) {
|
|
1136
|
+
var s9;
|
|
1137
|
+
const e16 = this.constructor, r7 = e16._$Ev.get(t9);
|
|
1138
|
+
if (void 0 !== r7 && this._$El !== r7) {
|
|
1139
|
+
const t10 = e16.getPropertyOptions(r7), h9 = "function" == typeof t10.converter ? { fromAttribute: t10.converter } : void 0 !== (null === (s9 = t10.converter) || void 0 === s9 ? void 0 : s9.fromAttribute) ? t10.converter : n5;
|
|
1140
|
+
this._$El = r7, this[r7] = h9.fromAttribute(i12, t10.type), this._$El = null;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
requestUpdate(t9, i12, s9) {
|
|
1144
|
+
let e16 = true;
|
|
1145
|
+
void 0 !== t9 && (((s9 = s9 || this.constructor.getPropertyOptions(t9)).hasChanged || a4)(this[t9], i12) ? (this._$AL.has(t9) || this._$AL.set(t9, i12), true === s9.reflect && this._$El !== t9 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t9, s9))) : e16 = false), !this.isUpdatePending && e16 && (this._$E_ = this._$Ej());
|
|
1146
|
+
}
|
|
1147
|
+
async _$Ej() {
|
|
1148
|
+
this.isUpdatePending = true;
|
|
1149
|
+
try {
|
|
1150
|
+
await this._$E_;
|
|
1151
|
+
} catch (t10) {
|
|
1152
|
+
Promise.reject(t10);
|
|
1153
|
+
}
|
|
1154
|
+
const t9 = this.scheduleUpdate();
|
|
1155
|
+
return null != t9 && await t9, !this.isUpdatePending;
|
|
1156
|
+
}
|
|
1157
|
+
scheduleUpdate() {
|
|
1158
|
+
return this.performUpdate();
|
|
1159
|
+
}
|
|
1160
|
+
performUpdate() {
|
|
1161
|
+
var t9;
|
|
1162
|
+
if (!this.isUpdatePending) return;
|
|
1163
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach(((t10, i13) => this[i13] = t10)), this._$Ei = void 0);
|
|
1164
|
+
let i12 = false;
|
|
1165
|
+
const s9 = this._$AL;
|
|
1166
|
+
try {
|
|
1167
|
+
i12 = this.shouldUpdate(s9), i12 ? (this.willUpdate(s9), null === (t9 = this._$ES) || void 0 === t9 || t9.forEach(((t10) => {
|
|
1168
|
+
var i13;
|
|
1169
|
+
return null === (i13 = t10.hostUpdate) || void 0 === i13 ? void 0 : i13.call(t10);
|
|
1170
|
+
})), this.update(s9)) : this._$Ek();
|
|
1171
|
+
} catch (t10) {
|
|
1172
|
+
throw i12 = false, this._$Ek(), t10;
|
|
1173
|
+
}
|
|
1174
|
+
i12 && this._$AE(s9);
|
|
1175
|
+
}
|
|
1176
|
+
willUpdate(t9) {
|
|
1177
|
+
}
|
|
1178
|
+
_$AE(t9) {
|
|
1179
|
+
var i12;
|
|
1180
|
+
null === (i12 = this._$ES) || void 0 === i12 || i12.forEach(((t10) => {
|
|
1181
|
+
var i13;
|
|
1182
|
+
return null === (i13 = t10.hostUpdated) || void 0 === i13 ? void 0 : i13.call(t10);
|
|
1183
|
+
})), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t9)), this.updated(t9);
|
|
1184
|
+
}
|
|
1185
|
+
_$Ek() {
|
|
1186
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
|
|
1187
|
+
}
|
|
1188
|
+
get updateComplete() {
|
|
1189
|
+
return this.getUpdateComplete();
|
|
1190
|
+
}
|
|
1191
|
+
getUpdateComplete() {
|
|
1192
|
+
return this._$E_;
|
|
1193
|
+
}
|
|
1194
|
+
shouldUpdate(t9) {
|
|
1195
|
+
return true;
|
|
1196
|
+
}
|
|
1197
|
+
update(t9) {
|
|
1198
|
+
void 0 !== this._$EC && (this._$EC.forEach(((t10, i12) => this._$EO(i12, this[i12], t10))), this._$EC = void 0), this._$Ek();
|
|
1199
|
+
}
|
|
1200
|
+
updated(t9) {
|
|
1201
|
+
}
|
|
1202
|
+
firstUpdated(t9) {
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
d4.finalized = true, d4.elementProperties = /* @__PURE__ */ new Map(), d4.elementStyles = [], d4.shadowRootOptions = { mode: "open" }, null == o4 || o4({ ReactiveElement: d4 }), (null !== (s6 = e5.reactiveElementVersions) && void 0 !== s6 ? s6 : e5.reactiveElementVersions = []).push("1.5.0");
|
|
1206
|
+
}
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1209
|
+
// ../../node_modules/lit-element/lit-element.js
|
|
1210
|
+
var l5, o5, r6, s7, n6, h5;
|
|
1211
|
+
var init_lit_element = __esm({
|
|
1212
|
+
"../../node_modules/lit-element/lit-element.js"() {
|
|
1213
|
+
init_reactive_element();
|
|
1214
|
+
init_reactive_element();
|
|
1215
|
+
init_lit_html();
|
|
1216
|
+
init_lit_html();
|
|
1217
|
+
r6 = d4;
|
|
1218
|
+
s7 = class extends d4 {
|
|
1219
|
+
constructor() {
|
|
1220
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
1221
|
+
}
|
|
1222
|
+
createRenderRoot() {
|
|
1223
|
+
var t9, e16;
|
|
1224
|
+
const i12 = super.createRenderRoot();
|
|
1225
|
+
return null !== (t9 = (e16 = this.renderOptions).renderBefore) && void 0 !== t9 || (e16.renderBefore = i12.firstChild), i12;
|
|
1226
|
+
}
|
|
1227
|
+
update(t9) {
|
|
1228
|
+
const i12 = this.render();
|
|
1229
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t9), this._$Do = Z(i12, this.renderRoot, this.renderOptions);
|
|
1230
|
+
}
|
|
1231
|
+
connectedCallback() {
|
|
1232
|
+
var t9;
|
|
1233
|
+
super.connectedCallback(), null === (t9 = this._$Do) || void 0 === t9 || t9.setConnected(true);
|
|
1234
|
+
}
|
|
1235
|
+
disconnectedCallback() {
|
|
1236
|
+
var t9;
|
|
1237
|
+
super.disconnectedCallback(), null === (t9 = this._$Do) || void 0 === t9 || t9.setConnected(false);
|
|
1238
|
+
}
|
|
1239
|
+
render() {
|
|
1240
|
+
return x;
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
s7.finalized = true, s7._$litElement$ = true, null === (l5 = globalThis.litElementHydrateSupport) || void 0 === l5 || l5.call(globalThis, { LitElement: s7 });
|
|
1244
|
+
n6 = globalThis.litElementPolyfillSupport;
|
|
1245
|
+
null == n6 || n6({ LitElement: s7 });
|
|
1246
|
+
h5 = { _$AK: (t9, e16, i12) => {
|
|
1247
|
+
t9._$AK(e16, i12);
|
|
1248
|
+
}, _$AL: (t9) => t9._$AL };
|
|
1249
|
+
(null !== (o5 = globalThis.litElementVersions) && void 0 !== o5 ? o5 : globalThis.litElementVersions = []).push("3.2.2");
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
|
|
1253
|
+
// ../../node_modules/@lit/reactive-element/decorators/base.js
|
|
1254
|
+
var e6, t5, o6;
|
|
1255
|
+
var init_base = __esm({
|
|
1256
|
+
"../../node_modules/@lit/reactive-element/decorators/base.js"() {
|
|
1257
|
+
e6 = (e16, t9, o18) => {
|
|
1258
|
+
Object.defineProperty(t9, o18, e16);
|
|
1259
|
+
};
|
|
1260
|
+
t5 = (e16, t9) => ({ kind: "method", placement: "prototype", key: t9.key, descriptor: e16 });
|
|
1261
|
+
o6 = ({ finisher: e16, descriptor: t9 }) => (o18, n11) => {
|
|
1262
|
+
var r7;
|
|
1263
|
+
if (void 0 === n11) {
|
|
1264
|
+
const n12 = null !== (r7 = o18.originalKey) && void 0 !== r7 ? r7 : o18.key, i12 = null != t9 ? { kind: "method", placement: "prototype", key: n12, descriptor: t9(o18.key) } : { ...o18, key: n12 };
|
|
1265
|
+
return null != e16 && (i12.finisher = function(t10) {
|
|
1266
|
+
e16(t10, n12);
|
|
1267
|
+
}), i12;
|
|
1268
|
+
}
|
|
1269
|
+
{
|
|
1270
|
+
const r8 = o18.constructor;
|
|
1271
|
+
void 0 !== t9 && Object.defineProperty(o18, n11, t9(n11)), null == e16 || e16(r8, n11);
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
// ../../node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
1278
|
+
var e7;
|
|
1279
|
+
var init_custom_element = __esm({
|
|
1280
|
+
"../../node_modules/@lit/reactive-element/decorators/custom-element.js"() {
|
|
1281
|
+
e7 = (e16) => (n11) => "function" == typeof n11 ? ((e17, n12) => (customElements.define(e17, n12), n12))(e16, n11) : ((e17, n12) => {
|
|
1282
|
+
const { kind: t9, elements: s9 } = n12;
|
|
1283
|
+
return { kind: t9, elements: s9, finisher(n13) {
|
|
1284
|
+
customElements.define(e17, n13);
|
|
1285
|
+
} };
|
|
1286
|
+
})(e16, n11);
|
|
1287
|
+
}
|
|
1288
|
+
});
|
|
1289
|
+
|
|
1290
|
+
// ../../node_modules/@lit/reactive-element/decorators/property.js
|
|
1291
|
+
function e8(e16) {
|
|
1292
|
+
return (n11, t9) => void 0 !== t9 ? ((i12, e17, n12) => {
|
|
1293
|
+
e17.constructor.createProperty(n12, i12);
|
|
1294
|
+
})(e16, n11, t9) : i6(e16, n11);
|
|
1295
|
+
}
|
|
1296
|
+
var i6;
|
|
1297
|
+
var init_property = __esm({
|
|
1298
|
+
"../../node_modules/@lit/reactive-element/decorators/property.js"() {
|
|
1299
|
+
i6 = (i12, e16) => "method" === e16.kind && e16.descriptor && !("value" in e16.descriptor) ? { ...e16, finisher(n11) {
|
|
1300
|
+
n11.createProperty(e16.key, i12);
|
|
1301
|
+
} } : { kind: "field", key: /* @__PURE__ */ Symbol(), placement: "own", descriptor: {}, originalKey: e16.key, initializer() {
|
|
1302
|
+
"function" == typeof e16.initializer && (this[e16.key] = e16.initializer.call(this));
|
|
1303
|
+
}, finisher(n11) {
|
|
1304
|
+
n11.createProperty(e16.key, i12);
|
|
1305
|
+
} };
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
|
|
1309
|
+
// ../../node_modules/@lit/reactive-element/decorators/state.js
|
|
1310
|
+
function t6(t9) {
|
|
1311
|
+
return e8({ ...t9, state: true });
|
|
1312
|
+
}
|
|
1313
|
+
var init_state = __esm({
|
|
1314
|
+
"../../node_modules/@lit/reactive-element/decorators/state.js"() {
|
|
1315
|
+
init_property();
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
|
|
1319
|
+
// ../../node_modules/@lit/reactive-element/decorators/event-options.js
|
|
1320
|
+
function e9(e16) {
|
|
1321
|
+
return o6({ finisher: (r7, t9) => {
|
|
1322
|
+
Object.assign(r7.prototype[t9], e16);
|
|
1323
|
+
} });
|
|
1324
|
+
}
|
|
1325
|
+
var init_event_options = __esm({
|
|
1326
|
+
"../../node_modules/@lit/reactive-element/decorators/event-options.js"() {
|
|
1327
|
+
init_base();
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
|
|
1331
|
+
// ../../node_modules/@lit/reactive-element/decorators/query.js
|
|
1332
|
+
function i7(i12, n11) {
|
|
1333
|
+
return o6({ descriptor: (o18) => {
|
|
1334
|
+
const t9 = { get() {
|
|
1335
|
+
var o19, n12;
|
|
1336
|
+
return null !== (n12 = null === (o19 = this.renderRoot) || void 0 === o19 ? void 0 : o19.querySelector(i12)) && void 0 !== n12 ? n12 : null;
|
|
1337
|
+
}, enumerable: true, configurable: true };
|
|
1338
|
+
if (n11) {
|
|
1339
|
+
const n12 = "symbol" == typeof o18 ? /* @__PURE__ */ Symbol() : "__" + o18;
|
|
1340
|
+
t9.get = function() {
|
|
1341
|
+
var o19, t10;
|
|
1342
|
+
return void 0 === this[n12] && (this[n12] = null !== (t10 = null === (o19 = this.renderRoot) || void 0 === o19 ? void 0 : o19.querySelector(i12)) && void 0 !== t10 ? t10 : null), this[n12];
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
return t9;
|
|
1346
|
+
} });
|
|
1347
|
+
}
|
|
1348
|
+
var init_query = __esm({
|
|
1349
|
+
"../../node_modules/@lit/reactive-element/decorators/query.js"() {
|
|
1350
|
+
init_base();
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
|
|
1354
|
+
// ../../node_modules/@lit/reactive-element/decorators/query-all.js
|
|
1355
|
+
function e10(e16) {
|
|
1356
|
+
return o6({ descriptor: (r7) => ({ get() {
|
|
1357
|
+
var r8, o18;
|
|
1358
|
+
return null !== (o18 = null === (r8 = this.renderRoot) || void 0 === r8 ? void 0 : r8.querySelectorAll(e16)) && void 0 !== o18 ? o18 : [];
|
|
1359
|
+
}, enumerable: true, configurable: true }) });
|
|
1360
|
+
}
|
|
1361
|
+
var init_query_all = __esm({
|
|
1362
|
+
"../../node_modules/@lit/reactive-element/decorators/query-all.js"() {
|
|
1363
|
+
init_base();
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// ../../node_modules/@lit/reactive-element/decorators/query-async.js
|
|
1368
|
+
function e11(e16) {
|
|
1369
|
+
return o6({ descriptor: (r7) => ({ async get() {
|
|
1370
|
+
var r8;
|
|
1371
|
+
return await this.updateComplete, null === (r8 = this.renderRoot) || void 0 === r8 ? void 0 : r8.querySelector(e16);
|
|
1372
|
+
}, enumerable: true, configurable: true }) });
|
|
1373
|
+
}
|
|
1374
|
+
var init_query_async = __esm({
|
|
1375
|
+
"../../node_modules/@lit/reactive-element/decorators/query-async.js"() {
|
|
1376
|
+
init_base();
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
|
|
1380
|
+
// ../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
|
|
1381
|
+
function l6(n11) {
|
|
1382
|
+
const { slot: l9, selector: t9 } = null != n11 ? n11 : {};
|
|
1383
|
+
return o6({ descriptor: (o18) => ({ get() {
|
|
1384
|
+
var o19;
|
|
1385
|
+
const r7 = "slot" + (l9 ? `[name=${l9}]` : ":not([name])"), i12 = null === (o19 = this.renderRoot) || void 0 === o19 ? void 0 : o19.querySelector(r7), s9 = null != i12 ? e12(i12, n11) : [];
|
|
1386
|
+
return t9 ? s9.filter(((o20) => o20.matches(t9))) : s9;
|
|
1387
|
+
}, enumerable: true, configurable: true }) });
|
|
1388
|
+
}
|
|
1389
|
+
var n7, e12;
|
|
1390
|
+
var init_query_assigned_elements = __esm({
|
|
1391
|
+
"../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js"() {
|
|
1392
|
+
init_base();
|
|
1393
|
+
e12 = null != (null === (n7 = window.HTMLSlotElement) || void 0 === n7 ? void 0 : n7.prototype.assignedElements) ? (o18, n11) => o18.assignedElements(n11) : (o18, n11) => o18.assignedNodes(n11).filter(((o19) => o19.nodeType === Node.ELEMENT_NODE));
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
|
|
1397
|
+
// ../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
|
|
1398
|
+
function o7(o18, n11, r7) {
|
|
1399
|
+
let l9, s9 = o18;
|
|
1400
|
+
return "object" == typeof o18 ? (s9 = o18.slot, l9 = o18) : l9 = { flatten: n11 }, r7 ? l6({ slot: s9, flatten: n11, selector: r7 }) : o6({ descriptor: (e16) => ({ get() {
|
|
1401
|
+
var e17, t9;
|
|
1402
|
+
const o19 = "slot" + (s9 ? `[name=${s9}]` : ":not([name])"), n12 = null === (e17 = this.renderRoot) || void 0 === e17 ? void 0 : e17.querySelector(o19);
|
|
1403
|
+
return null !== (t9 = null == n12 ? void 0 : n12.assignedNodes(l9)) && void 0 !== t9 ? t9 : [];
|
|
1404
|
+
}, enumerable: true, configurable: true }) });
|
|
1405
|
+
}
|
|
1406
|
+
var init_query_assigned_nodes = __esm({
|
|
1407
|
+
"../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js"() {
|
|
1408
|
+
init_base();
|
|
1409
|
+
init_query_assigned_elements();
|
|
1410
|
+
}
|
|
1411
|
+
});
|
|
1412
|
+
|
|
1413
|
+
// ../../node_modules/lit-element/index.js
|
|
1414
|
+
var lit_element_exports = {};
|
|
1415
|
+
__export(lit_element_exports, {
|
|
1416
|
+
CSSResult: () => o3,
|
|
1417
|
+
LitElement: () => s7,
|
|
1418
|
+
ReactiveElement: () => d4,
|
|
1419
|
+
UpdatingElement: () => r6,
|
|
1420
|
+
_$LE: () => h5,
|
|
1421
|
+
_$LH: () => L,
|
|
1422
|
+
adoptStyles: () => S2,
|
|
1423
|
+
css: () => i5,
|
|
1424
|
+
customElement: () => e7,
|
|
1425
|
+
decorateProperty: () => o6,
|
|
1426
|
+
defaultConverter: () => n5,
|
|
1427
|
+
eventOptions: () => e9,
|
|
1428
|
+
getCompatibleStyle: () => c5,
|
|
1429
|
+
html: () => y,
|
|
1430
|
+
legacyPrototypeMethod: () => e6,
|
|
1431
|
+
noChange: () => x,
|
|
1432
|
+
notEqual: () => a4,
|
|
1433
|
+
nothing: () => b,
|
|
1434
|
+
property: () => e8,
|
|
1435
|
+
query: () => i7,
|
|
1436
|
+
queryAll: () => e10,
|
|
1437
|
+
queryAssignedElements: () => l6,
|
|
1438
|
+
queryAssignedNodes: () => o7,
|
|
1439
|
+
queryAsync: () => e11,
|
|
1440
|
+
render: () => Z,
|
|
1441
|
+
standardPrototypeMethod: () => t5,
|
|
1442
|
+
state: () => t6,
|
|
1443
|
+
supportsAdoptingStyleSheets: () => e4,
|
|
1444
|
+
svg: () => w,
|
|
1445
|
+
unsafeCSS: () => r4
|
|
1446
|
+
});
|
|
1447
|
+
var init_lit_element2 = __esm({
|
|
1448
|
+
"../../node_modules/lit-element/index.js"() {
|
|
1449
|
+
init_reactive_element();
|
|
1450
|
+
init_lit_html();
|
|
1451
|
+
init_lit_element();
|
|
1452
|
+
init_base();
|
|
1453
|
+
init_custom_element();
|
|
1454
|
+
init_property();
|
|
1455
|
+
init_state();
|
|
1456
|
+
init_event_options();
|
|
1457
|
+
init_query();
|
|
1458
|
+
init_query_all();
|
|
1459
|
+
init_query_async();
|
|
1460
|
+
init_query_assigned_elements();
|
|
1461
|
+
init_query_assigned_nodes();
|
|
1462
|
+
console.warn("The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.");
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
|
|
1466
|
+
// ../../node_modules/lit-html/directives/class-map.js
|
|
1467
|
+
var class_map_exports = {};
|
|
1468
|
+
__export(class_map_exports, {
|
|
1469
|
+
classMap: () => o8
|
|
1470
|
+
});
|
|
1471
|
+
var o8;
|
|
1472
|
+
var init_class_map = __esm({
|
|
1473
|
+
"../../node_modules/lit-html/directives/class-map.js"() {
|
|
1474
|
+
init_lit_html();
|
|
1475
|
+
init_directive();
|
|
1476
|
+
o8 = e2(class extends i2 {
|
|
1477
|
+
constructor(t9) {
|
|
1478
|
+
var i12;
|
|
1479
|
+
if (super(t9), t9.type !== t2.ATTRIBUTE || "class" !== t9.name || (null === (i12 = t9.strings) || void 0 === i12 ? void 0 : i12.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1480
|
+
}
|
|
1481
|
+
render(t9) {
|
|
1482
|
+
return " " + Object.keys(t9).filter(((i12) => t9[i12])).join(" ") + " ";
|
|
1483
|
+
}
|
|
1484
|
+
update(i12, [s9]) {
|
|
1485
|
+
var r7, o18;
|
|
1486
|
+
if (void 0 === this.nt) {
|
|
1487
|
+
this.nt = /* @__PURE__ */ new Set(), void 0 !== i12.strings && (this.st = new Set(i12.strings.join(" ").split(/\s/).filter(((t9) => "" !== t9))));
|
|
1488
|
+
for (const t9 in s9) s9[t9] && !(null === (r7 = this.st) || void 0 === r7 ? void 0 : r7.has(t9)) && this.nt.add(t9);
|
|
1489
|
+
return this.render(s9);
|
|
1490
|
+
}
|
|
1491
|
+
const e16 = i12.element.classList;
|
|
1492
|
+
this.nt.forEach(((t9) => {
|
|
1493
|
+
t9 in s9 || (e16.remove(t9), this.nt.delete(t9));
|
|
1494
|
+
}));
|
|
1495
|
+
for (const t9 in s9) {
|
|
1496
|
+
const i13 = !!s9[t9];
|
|
1497
|
+
i13 === this.nt.has(t9) || (null === (o18 = this.st) || void 0 === o18 ? void 0 : o18.has(t9)) || (i13 ? (e16.add(t9), this.nt.add(t9)) : (e16.remove(t9), this.nt.delete(t9)));
|
|
1498
|
+
}
|
|
1499
|
+
return x;
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
|
|
1505
|
+
// ../../node_modules/lit-html/directives/private-async-helpers.js
|
|
1506
|
+
var t7, s8, i8;
|
|
1507
|
+
var init_private_async_helpers = __esm({
|
|
1508
|
+
"../../node_modules/lit-html/directives/private-async-helpers.js"() {
|
|
1509
|
+
t7 = async (t9, s9) => {
|
|
1510
|
+
for await (const i12 of t9) if (false === await s9(i12)) return;
|
|
1511
|
+
};
|
|
1512
|
+
s8 = class {
|
|
1513
|
+
constructor(t9) {
|
|
1514
|
+
this.Y = t9;
|
|
1515
|
+
}
|
|
1516
|
+
disconnect() {
|
|
1517
|
+
this.Y = void 0;
|
|
1518
|
+
}
|
|
1519
|
+
reconnect(t9) {
|
|
1520
|
+
this.Y = t9;
|
|
1521
|
+
}
|
|
1522
|
+
deref() {
|
|
1523
|
+
return this.Y;
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
i8 = class {
|
|
1527
|
+
constructor() {
|
|
1528
|
+
this.Z = void 0, this.q = void 0;
|
|
1529
|
+
}
|
|
1530
|
+
get() {
|
|
1531
|
+
return this.Z;
|
|
1532
|
+
}
|
|
1533
|
+
pause() {
|
|
1534
|
+
var t9;
|
|
1535
|
+
null !== (t9 = this.Z) && void 0 !== t9 || (this.Z = new Promise(((t10) => this.q = t10)));
|
|
1536
|
+
}
|
|
1537
|
+
resume() {
|
|
1538
|
+
var t9;
|
|
1539
|
+
null === (t9 = this.q) || void 0 === t9 || t9.call(this), this.Z = this.q = void 0;
|
|
1540
|
+
}
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
// ../../node_modules/lit-html/directives/async-replace.js
|
|
1546
|
+
var async_replace_exports = {};
|
|
1547
|
+
__export(async_replace_exports, {
|
|
1548
|
+
AsyncReplaceDirective: () => o9,
|
|
1549
|
+
asyncReplace: () => h6
|
|
1550
|
+
});
|
|
1551
|
+
var o9, h6;
|
|
1552
|
+
var init_async_replace = __esm({
|
|
1553
|
+
"../../node_modules/lit-html/directives/async-replace.js"() {
|
|
1554
|
+
init_lit_html();
|
|
1555
|
+
init_async_directive();
|
|
1556
|
+
init_private_async_helpers();
|
|
1557
|
+
init_directive();
|
|
1558
|
+
o9 = class extends c3 {
|
|
1559
|
+
constructor() {
|
|
1560
|
+
super(...arguments), this._$CK = new s8(this), this._$CX = new i8();
|
|
1561
|
+
}
|
|
1562
|
+
render(i12, s9) {
|
|
1563
|
+
return x;
|
|
1564
|
+
}
|
|
1565
|
+
update(i12, [s9, r7]) {
|
|
1566
|
+
if (this.isConnected || this.disconnected(), s9 === this._$CJ) return;
|
|
1567
|
+
this._$CJ = s9;
|
|
1568
|
+
let n11 = 0;
|
|
1569
|
+
const { _$CK: o18, _$CX: h9 } = this;
|
|
1570
|
+
return t7(s9, (async (t9) => {
|
|
1571
|
+
for (; h9.get(); ) await h9.get();
|
|
1572
|
+
const i13 = o18.deref();
|
|
1573
|
+
if (void 0 !== i13) {
|
|
1574
|
+
if (i13._$CJ !== s9) return false;
|
|
1575
|
+
void 0 !== r7 && (t9 = r7(t9, n11)), i13.commitValue(t9, n11), n11++;
|
|
1576
|
+
}
|
|
1577
|
+
return true;
|
|
1578
|
+
})), x;
|
|
1579
|
+
}
|
|
1580
|
+
commitValue(t9, i12) {
|
|
1581
|
+
this.setValue(t9);
|
|
1582
|
+
}
|
|
1583
|
+
disconnected() {
|
|
1584
|
+
this._$CK.disconnect(), this._$CX.pause();
|
|
1585
|
+
}
|
|
1586
|
+
reconnected() {
|
|
1587
|
+
this._$CK.reconnect(this), this._$CX.resume();
|
|
1588
|
+
}
|
|
1589
|
+
};
|
|
1590
|
+
h6 = e2(o9);
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
|
|
1594
|
+
// ../../node_modules/lit-html/directives/async-append.js
|
|
1595
|
+
var async_append_exports = {};
|
|
1596
|
+
__export(async_append_exports, {
|
|
1597
|
+
asyncAppend: () => c6
|
|
1598
|
+
});
|
|
1599
|
+
var c6;
|
|
1600
|
+
var init_async_append = __esm({
|
|
1601
|
+
"../../node_modules/lit-html/directives/async-append.js"() {
|
|
1602
|
+
init_directive();
|
|
1603
|
+
init_async_replace();
|
|
1604
|
+
init_directive_helpers();
|
|
1605
|
+
c6 = e2(class extends o9 {
|
|
1606
|
+
constructor(r7) {
|
|
1607
|
+
if (super(r7), r7.type !== t2.CHILD) throw Error("asyncAppend can only be used in child expressions");
|
|
1608
|
+
}
|
|
1609
|
+
update(r7, e16) {
|
|
1610
|
+
return this._$Ctt = r7, super.update(r7, e16);
|
|
1611
|
+
}
|
|
1612
|
+
commitValue(r7, e16) {
|
|
1613
|
+
0 === e16 && a2(this._$Ctt);
|
|
1614
|
+
const s9 = r2(this._$Ctt);
|
|
1615
|
+
u2(s9, r7);
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
|
|
1621
|
+
// ../../node_modules/lit-html/directives/cache.js
|
|
1622
|
+
var cache_exports = {};
|
|
1623
|
+
__export(cache_exports, {
|
|
1624
|
+
cache: () => d5
|
|
1625
|
+
});
|
|
1626
|
+
var d5;
|
|
1627
|
+
var init_cache = __esm({
|
|
1628
|
+
"../../node_modules/lit-html/directives/cache.js"() {
|
|
1629
|
+
init_lit_html();
|
|
1630
|
+
init_directive();
|
|
1631
|
+
init_directive_helpers();
|
|
1632
|
+
d5 = e2(class extends i2 {
|
|
1633
|
+
constructor(t9) {
|
|
1634
|
+
super(t9), this.et = /* @__PURE__ */ new WeakMap();
|
|
1635
|
+
}
|
|
1636
|
+
render(t9) {
|
|
1637
|
+
return [t9];
|
|
1638
|
+
}
|
|
1639
|
+
update(s9, [e16]) {
|
|
1640
|
+
if (n2(this.it) && (!n2(e16) || this.it.strings !== e16.strings)) {
|
|
1641
|
+
const e17 = m2(s9).pop();
|
|
1642
|
+
let o18 = this.et.get(this.it.strings);
|
|
1643
|
+
if (void 0 === o18) {
|
|
1644
|
+
const s10 = document.createDocumentFragment();
|
|
1645
|
+
o18 = Z(b, s10), o18.setConnected(false), this.et.set(this.it.strings, o18);
|
|
1646
|
+
}
|
|
1647
|
+
s2(o18, [e17]), r2(o18, void 0, e17);
|
|
1648
|
+
}
|
|
1649
|
+
if (n2(e16)) {
|
|
1650
|
+
if (!n2(this.it) || this.it.strings !== e16.strings) {
|
|
1651
|
+
const t9 = this.et.get(e16.strings);
|
|
1652
|
+
if (void 0 !== t9) {
|
|
1653
|
+
const i12 = m2(t9).pop();
|
|
1654
|
+
a2(s9), r2(s9, void 0, i12), s2(s9, [i12]);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
this.it = e16;
|
|
1658
|
+
} else this.it = void 0;
|
|
1659
|
+
return this.render(e16);
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
|
|
1665
|
+
// ../../node_modules/lit-html/directives/guard.js
|
|
1666
|
+
var guard_exports = {};
|
|
1667
|
+
__export(guard_exports, {
|
|
1668
|
+
guard: () => i9
|
|
1669
|
+
});
|
|
1670
|
+
var e13, i9;
|
|
1671
|
+
var init_guard = __esm({
|
|
1672
|
+
"../../node_modules/lit-html/directives/guard.js"() {
|
|
1673
|
+
init_lit_html();
|
|
1674
|
+
init_directive();
|
|
1675
|
+
e13 = {};
|
|
1676
|
+
i9 = e2(class extends i2 {
|
|
1677
|
+
constructor() {
|
|
1678
|
+
super(...arguments), this.ot = e13;
|
|
1679
|
+
}
|
|
1680
|
+
render(r7, t9) {
|
|
1681
|
+
return t9();
|
|
1682
|
+
}
|
|
1683
|
+
update(t9, [s9, e16]) {
|
|
1684
|
+
if (Array.isArray(s9)) {
|
|
1685
|
+
if (Array.isArray(this.ot) && this.ot.length === s9.length && s9.every(((r7, t10) => r7 === this.ot[t10]))) return x;
|
|
1686
|
+
} else if (this.ot === s9) return x;
|
|
1687
|
+
return this.ot = Array.isArray(s9) ? Array.from(s9) : s9, this.render(s9, e16);
|
|
1688
|
+
}
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
// ../../node_modules/lit-html/directives/if-defined.js
|
|
1694
|
+
var if_defined_exports = {};
|
|
1695
|
+
__export(if_defined_exports, {
|
|
1696
|
+
ifDefined: () => l7
|
|
1697
|
+
});
|
|
1698
|
+
var l7;
|
|
1699
|
+
var init_if_defined = __esm({
|
|
1700
|
+
"../../node_modules/lit-html/directives/if-defined.js"() {
|
|
1701
|
+
init_lit_html();
|
|
1702
|
+
l7 = (l9) => null != l9 ? l9 : b;
|
|
1703
|
+
}
|
|
1704
|
+
});
|
|
1705
|
+
|
|
1706
|
+
// ../../node_modules/lit-html/directives/live.js
|
|
1707
|
+
var live_exports = {};
|
|
1708
|
+
__export(live_exports, {
|
|
1709
|
+
live: () => l8
|
|
1710
|
+
});
|
|
1711
|
+
var l8;
|
|
1712
|
+
var init_live = __esm({
|
|
1713
|
+
"../../node_modules/lit-html/directives/live.js"() {
|
|
1714
|
+
init_lit_html();
|
|
1715
|
+
init_directive();
|
|
1716
|
+
init_directive_helpers();
|
|
1717
|
+
l8 = e2(class extends i2 {
|
|
1718
|
+
constructor(r7) {
|
|
1719
|
+
if (super(r7), r7.type !== t2.PROPERTY && r7.type !== t2.ATTRIBUTE && r7.type !== t2.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
1720
|
+
if (!e3(r7)) throw Error("`live` bindings can only contain a single expression");
|
|
1721
|
+
}
|
|
1722
|
+
render(r7) {
|
|
1723
|
+
return r7;
|
|
1724
|
+
}
|
|
1725
|
+
update(i12, [t9]) {
|
|
1726
|
+
if (t9 === x || t9 === b) return t9;
|
|
1727
|
+
const o18 = i12.element, l9 = i12.name;
|
|
1728
|
+
if (i12.type === t2.PROPERTY) {
|
|
1729
|
+
if (t9 === o18[l9]) return x;
|
|
1730
|
+
} else if (i12.type === t2.BOOLEAN_ATTRIBUTE) {
|
|
1731
|
+
if (!!t9 === o18.hasAttribute(l9)) return x;
|
|
1732
|
+
} else if (i12.type === t2.ATTRIBUTE && o18.getAttribute(l9) === t9 + "") return x;
|
|
1733
|
+
return s2(i12), t9;
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
|
|
1739
|
+
// ../../node_modules/lit-html/directives/ref.js
|
|
1740
|
+
var ref_exports = {};
|
|
1741
|
+
__export(ref_exports, {
|
|
1742
|
+
createRef: () => e14,
|
|
1743
|
+
ref: () => n8
|
|
1744
|
+
});
|
|
1745
|
+
var e14, o10, h7, n8;
|
|
1746
|
+
var init_ref = __esm({
|
|
1747
|
+
"../../node_modules/lit-html/directives/ref.js"() {
|
|
1748
|
+
init_lit_html();
|
|
1749
|
+
init_async_directive();
|
|
1750
|
+
init_directive();
|
|
1751
|
+
e14 = () => new o10();
|
|
1752
|
+
o10 = class {
|
|
1753
|
+
};
|
|
1754
|
+
h7 = /* @__PURE__ */ new WeakMap();
|
|
1755
|
+
n8 = e2(class extends c3 {
|
|
1756
|
+
render(t9) {
|
|
1757
|
+
return b;
|
|
1758
|
+
}
|
|
1759
|
+
update(t9, [s9]) {
|
|
1760
|
+
var e16;
|
|
1761
|
+
const o18 = s9 !== this.Y;
|
|
1762
|
+
return o18 && void 0 !== this.Y && this.rt(void 0), (o18 || this.lt !== this.ct) && (this.Y = s9, this.dt = null === (e16 = t9.options) || void 0 === e16 ? void 0 : e16.host, this.rt(this.ct = t9.element)), b;
|
|
1763
|
+
}
|
|
1764
|
+
rt(i12) {
|
|
1765
|
+
var t9;
|
|
1766
|
+
if ("function" == typeof this.Y) {
|
|
1767
|
+
const s9 = null !== (t9 = this.dt) && void 0 !== t9 ? t9 : globalThis;
|
|
1768
|
+
let e16 = h7.get(s9);
|
|
1769
|
+
void 0 === e16 && (e16 = /* @__PURE__ */ new WeakMap(), h7.set(s9, e16)), void 0 !== e16.get(this.Y) && this.Y.call(this.dt, void 0), e16.set(this.Y, i12), void 0 !== i12 && this.Y.call(this.dt, i12);
|
|
1770
|
+
} else this.Y.value = i12;
|
|
1771
|
+
}
|
|
1772
|
+
get lt() {
|
|
1773
|
+
var i12, t9, s9;
|
|
1774
|
+
return "function" == typeof this.Y ? null === (t9 = h7.get(null !== (i12 = this.dt) && void 0 !== i12 ? i12 : globalThis)) || void 0 === t9 ? void 0 : t9.get(this.Y) : null === (s9 = this.Y) || void 0 === s9 ? void 0 : s9.value;
|
|
1775
|
+
}
|
|
1776
|
+
disconnected() {
|
|
1777
|
+
this.lt === this.ct && this.rt(void 0);
|
|
1778
|
+
}
|
|
1779
|
+
reconnected() {
|
|
1780
|
+
this.rt(this.ct);
|
|
1781
|
+
}
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
// ../../node_modules/lit-html/directives/repeat.js
|
|
1787
|
+
var repeat_exports = {};
|
|
1788
|
+
__export(repeat_exports, {
|
|
1789
|
+
repeat: () => c7
|
|
1790
|
+
});
|
|
1791
|
+
var u4, c7;
|
|
1792
|
+
var init_repeat = __esm({
|
|
1793
|
+
"../../node_modules/lit-html/directives/repeat.js"() {
|
|
1794
|
+
init_lit_html();
|
|
1795
|
+
init_directive();
|
|
1796
|
+
init_directive_helpers();
|
|
1797
|
+
u4 = (e16, s9, t9) => {
|
|
1798
|
+
const r7 = /* @__PURE__ */ new Map();
|
|
1799
|
+
for (let l9 = s9; l9 <= t9; l9++) r7.set(e16[l9], l9);
|
|
1800
|
+
return r7;
|
|
1801
|
+
};
|
|
1802
|
+
c7 = e2(class extends i2 {
|
|
1803
|
+
constructor(e16) {
|
|
1804
|
+
if (super(e16), e16.type !== t2.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
1805
|
+
}
|
|
1806
|
+
ht(e16, s9, t9) {
|
|
1807
|
+
let r7;
|
|
1808
|
+
void 0 === t9 ? t9 = s9 : void 0 !== s9 && (r7 = s9);
|
|
1809
|
+
const l9 = [], o18 = [];
|
|
1810
|
+
let i12 = 0;
|
|
1811
|
+
for (const s10 of e16) l9[i12] = r7 ? r7(s10, i12) : i12, o18[i12] = t9(s10, i12), i12++;
|
|
1812
|
+
return { values: o18, keys: l9 };
|
|
1813
|
+
}
|
|
1814
|
+
render(e16, s9, t9) {
|
|
1815
|
+
return this.ht(e16, s9, t9).values;
|
|
1816
|
+
}
|
|
1817
|
+
update(s9, [t9, r7, c9]) {
|
|
1818
|
+
var d6;
|
|
1819
|
+
const a5 = m2(s9), { values: p4, keys: v3 } = this.ht(t9, r7, c9);
|
|
1820
|
+
if (!Array.isArray(a5)) return this.ut = v3, p4;
|
|
1821
|
+
const h9 = null !== (d6 = this.ut) && void 0 !== d6 ? d6 : this.ut = [], m4 = [];
|
|
1822
|
+
let y2, x2, j = 0, k2 = a5.length - 1, w2 = 0, A2 = p4.length - 1;
|
|
1823
|
+
for (; j <= k2 && w2 <= A2; ) if (null === a5[j]) j++;
|
|
1824
|
+
else if (null === a5[k2]) k2--;
|
|
1825
|
+
else if (h9[j] === v3[w2]) m4[w2] = u2(a5[j], p4[w2]), j++, w2++;
|
|
1826
|
+
else if (h9[k2] === v3[A2]) m4[A2] = u2(a5[k2], p4[A2]), k2--, A2--;
|
|
1827
|
+
else if (h9[j] === v3[A2]) m4[A2] = u2(a5[j], p4[A2]), r2(s9, m4[A2 + 1], a5[j]), j++, A2--;
|
|
1828
|
+
else if (h9[k2] === v3[w2]) m4[w2] = u2(a5[k2], p4[w2]), r2(s9, a5[j], a5[k2]), k2--, w2++;
|
|
1829
|
+
else if (void 0 === y2 && (y2 = u4(v3, w2, A2), x2 = u4(h9, j, k2)), y2.has(h9[j])) if (y2.has(h9[k2])) {
|
|
1830
|
+
const e16 = x2.get(v3[w2]), t10 = void 0 !== e16 ? a5[e16] : null;
|
|
1831
|
+
if (null === t10) {
|
|
1832
|
+
const e17 = r2(s9, a5[j]);
|
|
1833
|
+
u2(e17, p4[w2]), m4[w2] = e17;
|
|
1834
|
+
} else m4[w2] = u2(t10, p4[w2]), r2(s9, a5[j], t10), a5[e16] = null;
|
|
1835
|
+
w2++;
|
|
1836
|
+
} else p2(a5[k2]), k2--;
|
|
1837
|
+
else p2(a5[j]), j++;
|
|
1838
|
+
for (; w2 <= A2; ) {
|
|
1839
|
+
const e16 = r2(s9, m4[A2 + 1]);
|
|
1840
|
+
u2(e16, p4[w2]), m4[w2++] = e16;
|
|
1841
|
+
}
|
|
1842
|
+
for (; j <= k2; ) {
|
|
1843
|
+
const e16 = a5[j++];
|
|
1844
|
+
null !== e16 && p2(e16);
|
|
1845
|
+
}
|
|
1846
|
+
return this.ut = v3, s2(s9, m4), x;
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
|
|
1852
|
+
// ../../node_modules/lit-html/directives/style-map.js
|
|
1853
|
+
var style_map_exports = {};
|
|
1854
|
+
__export(style_map_exports, {
|
|
1855
|
+
styleMap: () => i10
|
|
1856
|
+
});
|
|
1857
|
+
var i10;
|
|
1858
|
+
var init_style_map = __esm({
|
|
1859
|
+
"../../node_modules/lit-html/directives/style-map.js"() {
|
|
1860
|
+
init_lit_html();
|
|
1861
|
+
init_directive();
|
|
1862
|
+
i10 = e2(class extends i2 {
|
|
1863
|
+
constructor(t9) {
|
|
1864
|
+
var e16;
|
|
1865
|
+
if (super(t9), t9.type !== t2.ATTRIBUTE || "style" !== t9.name || (null === (e16 = t9.strings) || void 0 === e16 ? void 0 : e16.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
1866
|
+
}
|
|
1867
|
+
render(t9) {
|
|
1868
|
+
return Object.keys(t9).reduce(((e16, r7) => {
|
|
1869
|
+
const s9 = t9[r7];
|
|
1870
|
+
return null == s9 ? e16 : e16 + `${r7 = r7.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s9};`;
|
|
1871
|
+
}), "");
|
|
1872
|
+
}
|
|
1873
|
+
update(e16, [r7]) {
|
|
1874
|
+
const { style: s9 } = e16.element;
|
|
1875
|
+
if (void 0 === this.vt) {
|
|
1876
|
+
this.vt = /* @__PURE__ */ new Set();
|
|
1877
|
+
for (const t9 in r7) this.vt.add(t9);
|
|
1878
|
+
return this.render(r7);
|
|
1879
|
+
}
|
|
1880
|
+
this.vt.forEach(((t9) => {
|
|
1881
|
+
null == r7[t9] && (this.vt.delete(t9), t9.includes("-") ? s9.removeProperty(t9) : s9[t9] = "");
|
|
1882
|
+
}));
|
|
1883
|
+
for (const t9 in r7) {
|
|
1884
|
+
const e17 = r7[t9];
|
|
1885
|
+
null != e17 && (this.vt.add(t9), t9.includes("-") ? s9.setProperty(t9, e17) : s9[t9] = e17);
|
|
1886
|
+
}
|
|
1887
|
+
return x;
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
|
|
1893
|
+
// ../../node_modules/lit-html/directives/template-content.js
|
|
1894
|
+
var template_content_exports = {};
|
|
1895
|
+
__export(template_content_exports, {
|
|
1896
|
+
templateContent: () => o11
|
|
1897
|
+
});
|
|
1898
|
+
var o11;
|
|
1899
|
+
var init_template_content = __esm({
|
|
1900
|
+
"../../node_modules/lit-html/directives/template-content.js"() {
|
|
1901
|
+
init_lit_html();
|
|
1902
|
+
init_directive();
|
|
1903
|
+
o11 = e2(class extends i2 {
|
|
1904
|
+
constructor(t9) {
|
|
1905
|
+
if (super(t9), t9.type !== t2.CHILD) throw Error("templateContent can only be used in child bindings");
|
|
1906
|
+
}
|
|
1907
|
+
render(r7) {
|
|
1908
|
+
return this.ft === r7 ? x : (this.ft = r7, document.importNode(r7.content, true));
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
});
|
|
1913
|
+
|
|
1914
|
+
// ../../node_modules/lit-html/directives/unsafe-html.js
|
|
1915
|
+
var unsafe_html_exports = {};
|
|
1916
|
+
__export(unsafe_html_exports, {
|
|
1917
|
+
UnsafeHTMLDirective: () => e15,
|
|
1918
|
+
unsafeHTML: () => o12
|
|
1919
|
+
});
|
|
1920
|
+
var e15, o12;
|
|
1921
|
+
var init_unsafe_html = __esm({
|
|
1922
|
+
"../../node_modules/lit-html/directives/unsafe-html.js"() {
|
|
1923
|
+
init_lit_html();
|
|
1924
|
+
init_directive();
|
|
1925
|
+
e15 = class extends i2 {
|
|
1926
|
+
constructor(i12) {
|
|
1927
|
+
if (super(i12), this.it = b, i12.type !== t2.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
1928
|
+
}
|
|
1929
|
+
render(r7) {
|
|
1930
|
+
if (r7 === b || null == r7) return this._t = void 0, this.it = r7;
|
|
1931
|
+
if (r7 === x) return r7;
|
|
1932
|
+
if ("string" != typeof r7) throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
1933
|
+
if (r7 === this.it) return this._t;
|
|
1934
|
+
this.it = r7;
|
|
1935
|
+
const s9 = [r7];
|
|
1936
|
+
return s9.raw = s9, this._t = { _$litType$: this.constructor.resultType, strings: s9, values: [] };
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
e15.directiveName = "unsafeHTML", e15.resultType = 1;
|
|
1940
|
+
o12 = e2(e15);
|
|
1941
|
+
}
|
|
1942
|
+
});
|
|
1943
|
+
|
|
1944
|
+
// ../../node_modules/lit-html/directives/unsafe-svg.js
|
|
1945
|
+
var unsafe_svg_exports = {};
|
|
1946
|
+
__export(unsafe_svg_exports, {
|
|
1947
|
+
unsafeSVG: () => o13
|
|
1948
|
+
});
|
|
1949
|
+
var t8, o13;
|
|
1950
|
+
var init_unsafe_svg = __esm({
|
|
1951
|
+
"../../node_modules/lit-html/directives/unsafe-svg.js"() {
|
|
1952
|
+
init_directive();
|
|
1953
|
+
init_unsafe_html();
|
|
1954
|
+
t8 = class extends e15 {
|
|
1955
|
+
};
|
|
1956
|
+
t8.directiveName = "unsafeSVG", t8.resultType = 2;
|
|
1957
|
+
o13 = e2(t8);
|
|
1958
|
+
}
|
|
1959
|
+
});
|
|
1960
|
+
|
|
1961
|
+
// ../../node_modules/lit-html/directives/until.js
|
|
1962
|
+
var until_exports = {};
|
|
1963
|
+
__export(until_exports, {
|
|
1964
|
+
UntilDirective: () => h8,
|
|
1965
|
+
until: () => c8
|
|
1966
|
+
});
|
|
1967
|
+
var n9, h8, c8;
|
|
1968
|
+
var init_until = __esm({
|
|
1969
|
+
"../../node_modules/lit-html/directives/until.js"() {
|
|
1970
|
+
init_lit_html();
|
|
1971
|
+
init_directive_helpers();
|
|
1972
|
+
init_async_directive();
|
|
1973
|
+
init_private_async_helpers();
|
|
1974
|
+
init_directive();
|
|
1975
|
+
n9 = (t9) => !t3(t9) && "function" == typeof t9.then;
|
|
1976
|
+
h8 = class extends c3 {
|
|
1977
|
+
constructor() {
|
|
1978
|
+
super(...arguments), this._$Cwt = 1073741823, this._$Cyt = [], this._$CK = new s8(this), this._$CX = new i8();
|
|
1979
|
+
}
|
|
1980
|
+
render(...s9) {
|
|
1981
|
+
var i12;
|
|
1982
|
+
return null !== (i12 = s9.find(((t9) => !n9(t9)))) && void 0 !== i12 ? i12 : x;
|
|
1983
|
+
}
|
|
1984
|
+
update(s9, i12) {
|
|
1985
|
+
const r7 = this._$Cyt;
|
|
1986
|
+
let e16 = r7.length;
|
|
1987
|
+
this._$Cyt = i12;
|
|
1988
|
+
const o18 = this._$CK, h9 = this._$CX;
|
|
1989
|
+
this.isConnected || this.disconnected();
|
|
1990
|
+
for (let t9 = 0; t9 < i12.length && !(t9 > this._$Cwt); t9++) {
|
|
1991
|
+
const s10 = i12[t9];
|
|
1992
|
+
if (!n9(s10)) return this._$Cwt = t9, s10;
|
|
1993
|
+
t9 < e16 && s10 === r7[t9] || (this._$Cwt = 1073741823, e16 = 0, Promise.resolve(s10).then((async (t10) => {
|
|
1994
|
+
for (; h9.get(); ) await h9.get();
|
|
1995
|
+
const i13 = o18.deref();
|
|
1996
|
+
if (void 0 !== i13) {
|
|
1997
|
+
const r8 = i13._$Cyt.indexOf(s10);
|
|
1998
|
+
r8 > -1 && r8 < i13._$Cwt && (i13._$Cwt = r8, i13.setValue(t10));
|
|
1999
|
+
}
|
|
2000
|
+
})));
|
|
2001
|
+
}
|
|
2002
|
+
return x;
|
|
2003
|
+
}
|
|
2004
|
+
disconnected() {
|
|
2005
|
+
this._$CK.disconnect(), this._$CX.pause();
|
|
2006
|
+
}
|
|
2007
|
+
reconnected() {
|
|
2008
|
+
this._$CK.reconnect(this), this._$CX.resume();
|
|
2009
|
+
}
|
|
2010
|
+
};
|
|
2011
|
+
c8 = e2(h8);
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
|
|
2015
|
+
// ../../node_modules/lit-html/directives/choose.js
|
|
2016
|
+
var choose_exports = {};
|
|
2017
|
+
__export(choose_exports, {
|
|
2018
|
+
choose: () => o14
|
|
2019
|
+
});
|
|
2020
|
+
var o14;
|
|
2021
|
+
var init_choose = __esm({
|
|
2022
|
+
"../../node_modules/lit-html/directives/choose.js"() {
|
|
2023
|
+
o14 = (o18, r7, n11) => {
|
|
2024
|
+
for (const n12 of r7) if (n12[0] === o18) return (0, n12[1])();
|
|
2025
|
+
return null == n11 ? void 0 : n11();
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
});
|
|
2029
|
+
|
|
2030
|
+
// ../../node_modules/lit-html/directives/join.js
|
|
2031
|
+
var join_exports = {};
|
|
2032
|
+
__export(join_exports, {
|
|
2033
|
+
join: () => o15
|
|
2034
|
+
});
|
|
2035
|
+
function* o15(o18, t9) {
|
|
2036
|
+
const f4 = "function" == typeof t9;
|
|
2037
|
+
if (void 0 !== o18) {
|
|
2038
|
+
let i12 = -1;
|
|
2039
|
+
for (const n11 of o18) i12 > -1 && (yield f4 ? t9(i12) : t9), i12++, yield n11;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
var init_join = __esm({
|
|
2043
|
+
"../../node_modules/lit-html/directives/join.js"() {
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2046
|
+
|
|
2047
|
+
// ../../node_modules/lit-html/directives/keyed.js
|
|
2048
|
+
var keyed_exports = {};
|
|
2049
|
+
__export(keyed_exports, {
|
|
2050
|
+
keyed: () => i11
|
|
2051
|
+
});
|
|
2052
|
+
var i11;
|
|
2053
|
+
var init_keyed = __esm({
|
|
2054
|
+
"../../node_modules/lit-html/directives/keyed.js"() {
|
|
2055
|
+
init_lit_html();
|
|
2056
|
+
init_directive();
|
|
2057
|
+
init_directive_helpers();
|
|
2058
|
+
i11 = e2(class extends i2 {
|
|
2059
|
+
constructor() {
|
|
2060
|
+
super(...arguments), this.key = b;
|
|
2061
|
+
}
|
|
2062
|
+
render(r7, t9) {
|
|
2063
|
+
return this.key = r7, t9;
|
|
2064
|
+
}
|
|
2065
|
+
update(r7, [t9, e16]) {
|
|
2066
|
+
return t9 !== this.key && (s2(r7), this.key = t9), e16;
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
|
|
2072
|
+
// ../../node_modules/lit-html/directives/map.js
|
|
2073
|
+
var map_exports = {};
|
|
2074
|
+
__export(map_exports, {
|
|
2075
|
+
map: () => o16
|
|
2076
|
+
});
|
|
2077
|
+
function* o16(o18, f4) {
|
|
2078
|
+
if (void 0 !== o18) {
|
|
2079
|
+
let i12 = 0;
|
|
2080
|
+
for (const t9 of o18) yield f4(t9, i12++);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
var init_map = __esm({
|
|
2084
|
+
"../../node_modules/lit-html/directives/map.js"() {
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
|
|
2088
|
+
// ../../node_modules/lit-html/directives/range.js
|
|
2089
|
+
var range_exports = {};
|
|
2090
|
+
__export(range_exports, {
|
|
2091
|
+
range: () => o17
|
|
2092
|
+
});
|
|
2093
|
+
function* o17(o18, l9, n11 = 1) {
|
|
2094
|
+
const t9 = void 0 === l9 ? 0 : o18;
|
|
2095
|
+
null != l9 || (l9 = o18);
|
|
2096
|
+
for (let o19 = t9; n11 > 0 ? o19 < l9 : l9 < o19; o19 += n11) yield o19;
|
|
2097
|
+
}
|
|
2098
|
+
var init_range = __esm({
|
|
2099
|
+
"../../node_modules/lit-html/directives/range.js"() {
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
|
|
2103
|
+
// ../../node_modules/lit-html/directives/when.js
|
|
2104
|
+
var when_exports = {};
|
|
2105
|
+
__export(when_exports, {
|
|
2106
|
+
when: () => n10
|
|
2107
|
+
});
|
|
2108
|
+
function n10(n11, o18, r7) {
|
|
2109
|
+
return n11 ? o18() : null == r7 ? void 0 : r7();
|
|
2110
|
+
}
|
|
2111
|
+
var init_when = __esm({
|
|
2112
|
+
"../../node_modules/lit-html/directives/when.js"() {
|
|
2113
|
+
}
|
|
2114
|
+
});
|
|
2115
|
+
|
|
2116
|
+
// ../../node_modules/@rxdi/lit-html/dist/index.js
|
|
2117
|
+
var require_dist = __commonJS({
|
|
2118
|
+
"../../node_modules/@rxdi/lit-html/dist/index.js"(exports) {
|
|
2119
|
+
"use strict";
|
|
2120
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o18, m4, k2, k22) {
|
|
2121
|
+
if (k22 === void 0) k22 = k2;
|
|
2122
|
+
var desc = Object.getOwnPropertyDescriptor(m4, k2);
|
|
2123
|
+
if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) {
|
|
2124
|
+
desc = { enumerable: true, get: function() {
|
|
2125
|
+
return m4[k2];
|
|
2126
|
+
} };
|
|
2127
|
+
}
|
|
2128
|
+
Object.defineProperty(o18, k22, desc);
|
|
2129
|
+
}) : (function(o18, m4, k2, k22) {
|
|
2130
|
+
if (k22 === void 0) k22 = k2;
|
|
2131
|
+
o18[k22] = m4[k2];
|
|
2132
|
+
}));
|
|
2133
|
+
var __exportStar = exports && exports.__exportStar || function(m4, exports2) {
|
|
2134
|
+
for (var p4 in m4) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p4)) __createBinding(exports2, m4, p4);
|
|
2135
|
+
};
|
|
2136
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2137
|
+
__exportStar(require_decorators(), exports);
|
|
2138
|
+
__exportStar(require_async(), exports);
|
|
2139
|
+
__exportStar((init_lit_html(), __toCommonJS(lit_html_exports)), exports);
|
|
2140
|
+
__exportStar((init_directive(), __toCommonJS(directive_exports)), exports);
|
|
2141
|
+
__exportStar((init_experimental_hydrate(), __toCommonJS(experimental_hydrate_exports)), exports);
|
|
2142
|
+
__exportStar((init_experimental_hydrate_support(), __toCommonJS(experimental_hydrate_support_exports)), exports);
|
|
2143
|
+
__exportStar(require_polyfill_support(), exports);
|
|
2144
|
+
__exportStar((init_directive_helpers(), __toCommonJS(directive_helpers_exports)), exports);
|
|
2145
|
+
__exportStar((init_async_directive(), __toCommonJS(async_directive_exports)), exports);
|
|
2146
|
+
__exportStar((init_lit_element2(), __toCommonJS(lit_element_exports)), exports);
|
|
2147
|
+
__exportStar((init_class_map(), __toCommonJS(class_map_exports)), exports);
|
|
2148
|
+
__exportStar((init_async_append(), __toCommonJS(async_append_exports)), exports);
|
|
2149
|
+
__exportStar((init_async_replace(), __toCommonJS(async_replace_exports)), exports);
|
|
2150
|
+
__exportStar((init_cache(), __toCommonJS(cache_exports)), exports);
|
|
2151
|
+
__exportStar((init_guard(), __toCommonJS(guard_exports)), exports);
|
|
2152
|
+
__exportStar((init_if_defined(), __toCommonJS(if_defined_exports)), exports);
|
|
2153
|
+
__exportStar((init_live(), __toCommonJS(live_exports)), exports);
|
|
2154
|
+
__exportStar((init_ref(), __toCommonJS(ref_exports)), exports);
|
|
2155
|
+
__exportStar((init_repeat(), __toCommonJS(repeat_exports)), exports);
|
|
2156
|
+
__exportStar((init_style_map(), __toCommonJS(style_map_exports)), exports);
|
|
2157
|
+
__exportStar((init_template_content(), __toCommonJS(template_content_exports)), exports);
|
|
2158
|
+
__exportStar((init_unsafe_html(), __toCommonJS(unsafe_html_exports)), exports);
|
|
2159
|
+
__exportStar((init_unsafe_svg(), __toCommonJS(unsafe_svg_exports)), exports);
|
|
2160
|
+
__exportStar((init_until(), __toCommonJS(until_exports)), exports);
|
|
2161
|
+
__exportStar((init_choose(), __toCommonJS(choose_exports)), exports);
|
|
2162
|
+
__exportStar((init_join(), __toCommonJS(join_exports)), exports);
|
|
2163
|
+
__exportStar((init_keyed(), __toCommonJS(keyed_exports)), exports);
|
|
2164
|
+
__exportStar((init_map(), __toCommonJS(map_exports)), exports);
|
|
2165
|
+
__exportStar((init_range(), __toCommonJS(range_exports)), exports);
|
|
2166
|
+
__exportStar((init_when(), __toCommonJS(when_exports)), exports);
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
|
|
2170
|
+
// ../../node_modules/@rhtml/renderer/dist/renderer.js
|
|
2171
|
+
var require_renderer = __commonJS({
|
|
2172
|
+
"../../node_modules/@rhtml/renderer/dist/renderer.js"(exports) {
|
|
2173
|
+
"use strict";
|
|
2174
|
+
var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
|
|
2175
|
+
var c9 = arguments.length, r7 = c9 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d6;
|
|
2176
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r7 = Reflect.decorate(decorators, target, key, desc);
|
|
2177
|
+
else for (var i12 = decorators.length - 1; i12 >= 0; i12--) if (d6 = decorators[i12]) r7 = (c9 < 3 ? d6(r7) : c9 > 3 ? d6(target, key, r7) : d6(target, key)) || r7;
|
|
2178
|
+
return c9 > 3 && r7 && Object.defineProperty(target, key, r7), r7;
|
|
2179
|
+
};
|
|
2180
|
+
var __metadata = exports && exports.__metadata || function(k2, v3) {
|
|
2181
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k2, v3);
|
|
2182
|
+
};
|
|
2183
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
2184
|
+
function adopt(value) {
|
|
2185
|
+
return value instanceof P2 ? value : new P2(function(resolve) {
|
|
2186
|
+
resolve(value);
|
|
2187
|
+
});
|
|
2188
|
+
}
|
|
2189
|
+
return new (P2 || (P2 = Promise))(function(resolve, reject) {
|
|
2190
|
+
function fulfilled(value) {
|
|
2191
|
+
try {
|
|
2192
|
+
step(generator.next(value));
|
|
2193
|
+
} catch (e16) {
|
|
2194
|
+
reject(e16);
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
function rejected(value) {
|
|
2198
|
+
try {
|
|
2199
|
+
step(generator["throw"](value));
|
|
2200
|
+
} catch (e16) {
|
|
2201
|
+
reject(e16);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
function step(result) {
|
|
2205
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2206
|
+
}
|
|
2207
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2208
|
+
});
|
|
2209
|
+
};
|
|
2210
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2211
|
+
exports.Renderer = void 0;
|
|
2212
|
+
var lit_html_1 = require_dist();
|
|
2213
|
+
function Render(config) {
|
|
2214
|
+
return function(cls) {
|
|
2215
|
+
if (!window.customElements.get(config.selector)) {
|
|
2216
|
+
return (0, lit_html_1.Component)(config)(cls);
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
var Renderer = class Renderer extends lit_html_1.LitElement {
|
|
2221
|
+
constructor() {
|
|
2222
|
+
super(...arguments);
|
|
2223
|
+
this.options = {
|
|
2224
|
+
state: {},
|
|
2225
|
+
render: (res, setState, shadowRoot) => (0, lit_html_1.html)` ${res} `,
|
|
2226
|
+
style: (0, lit_html_1.css)``,
|
|
2227
|
+
styles: [],
|
|
2228
|
+
deepCloneState: false,
|
|
2229
|
+
loading: () => (0, lit_html_1.html)``,
|
|
2230
|
+
error: (e16) => (0, lit_html_1.html)`${e16 === null || e16 === void 0 ? void 0 : e16.message}`
|
|
2231
|
+
};
|
|
2232
|
+
this.loading = true;
|
|
2233
|
+
this.state = {};
|
|
2234
|
+
}
|
|
2235
|
+
OnUpdateFirst() {
|
|
2236
|
+
var _a, _b, _c;
|
|
2237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2238
|
+
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.style) {
|
|
2239
|
+
(0, lit_html_1.adoptStyles)(this.shadowRoot, [this.options.style]);
|
|
2240
|
+
}
|
|
2241
|
+
if ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.styles) === null || _c === void 0 ? void 0 : _c.length) {
|
|
2242
|
+
(0, lit_html_1.adoptStyles)(this.shadowRoot, this.options.styles);
|
|
2243
|
+
}
|
|
2244
|
+
this.options.state = yield this.options.state;
|
|
2245
|
+
if (this.options.state) {
|
|
2246
|
+
if (this.isObservable(this.options.state)) {
|
|
2247
|
+
this.subscription = this.options.state["subscribe"]((detail) => {
|
|
2248
|
+
this.state = detail;
|
|
2249
|
+
this.loading = false;
|
|
2250
|
+
this.dispatchEvent(new CustomEvent("onData", { detail }));
|
|
2251
|
+
}, (error) => {
|
|
2252
|
+
this.state = null;
|
|
2253
|
+
this.error = error;
|
|
2254
|
+
this.loading = false;
|
|
2255
|
+
this.dispatchEvent(new CustomEvent("onError", { detail: error }));
|
|
2256
|
+
});
|
|
2257
|
+
} else {
|
|
2258
|
+
this.loading = false;
|
|
2259
|
+
this.state = this.options.state;
|
|
2260
|
+
}
|
|
2261
|
+
yield this.updateComplete;
|
|
2262
|
+
yield new Promise(requestAnimationFrame);
|
|
2263
|
+
this.dispatchEvent(new CustomEvent("loaded"));
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
isObservable(value) {
|
|
2268
|
+
return this.isFunction(value.lift) && this.isFunction(value.subscribe);
|
|
2269
|
+
}
|
|
2270
|
+
isFunction(value) {
|
|
2271
|
+
return typeof value === "function";
|
|
2272
|
+
}
|
|
2273
|
+
OnDestroy() {
|
|
2274
|
+
if (this.subscription) {
|
|
2275
|
+
this.subscription.unsubscribe();
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
renderContent() {
|
|
2279
|
+
if (!this.error && this.options.render) {
|
|
2280
|
+
const template = this.options.render(this.options.deepCloneState ? JSON.parse(JSON.stringify(this.state)) : this.state, (state) => this.state = Object.assign({}, state), this.shadowRoot);
|
|
2281
|
+
if (template === null || template === void 0 ? void 0 : template.strings) {
|
|
2282
|
+
return template;
|
|
2283
|
+
}
|
|
2284
|
+
return (0, lit_html_1.html)``;
|
|
2285
|
+
}
|
|
2286
|
+
return this.state;
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
exports.Renderer = Renderer;
|
|
2290
|
+
__decorate([
|
|
2291
|
+
(0, lit_html_1.property)({ type: Object }),
|
|
2292
|
+
__metadata("design:type", Object)
|
|
2293
|
+
], Renderer.prototype, "options", void 0);
|
|
2294
|
+
__decorate([
|
|
2295
|
+
(0, lit_html_1.property)({ type: Boolean }),
|
|
2296
|
+
__metadata("design:type", Object)
|
|
2297
|
+
], Renderer.prototype, "loading", void 0);
|
|
2298
|
+
__decorate([
|
|
2299
|
+
(0, lit_html_1.property)({ type: Object }),
|
|
2300
|
+
__metadata("design:type", Error)
|
|
2301
|
+
], Renderer.prototype, "error", void 0);
|
|
2302
|
+
__decorate([
|
|
2303
|
+
(0, lit_html_1.property)(),
|
|
2304
|
+
__metadata("design:type", Object)
|
|
2305
|
+
], Renderer.prototype, "state", void 0);
|
|
2306
|
+
exports.Renderer = Renderer = __decorate([
|
|
2307
|
+
Render({
|
|
2308
|
+
selector: "r-renderer",
|
|
2309
|
+
template() {
|
|
2310
|
+
return (0, lit_html_1.html)`
|
|
2311
|
+
${!this.loading ? this.renderContent() : ""}
|
|
2312
|
+
${this.loading ? (0, lit_html_1.html)`
|
|
2313
|
+
${this.isFunction(this.options.loading) ? this.options.loading() : (0, lit_html_1.html)``}
|
|
2314
|
+
` : ""}
|
|
2315
|
+
${this.error ? (0, lit_html_1.html)`
|
|
2316
|
+
${this.isFunction(this.options.error) ? this.options.error(this.error) : (0, lit_html_1.html)` ${this.error} `}
|
|
2317
|
+
` : ""}
|
|
2318
|
+
`;
|
|
2319
|
+
}
|
|
2320
|
+
})
|
|
2321
|
+
], Renderer);
|
|
2322
|
+
}
|
|
2323
|
+
});
|
|
2324
|
+
|
|
2325
|
+
// ../../node_modules/@rhtml/renderer/dist/index.js
|
|
2326
|
+
var require_dist2 = __commonJS({
|
|
2327
|
+
"../../node_modules/@rhtml/renderer/dist/index.js"(exports) {
|
|
2328
|
+
"use strict";
|
|
2329
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o18, m4, k2, k22) {
|
|
2330
|
+
if (k22 === void 0) k22 = k2;
|
|
2331
|
+
var desc = Object.getOwnPropertyDescriptor(m4, k2);
|
|
2332
|
+
if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) {
|
|
2333
|
+
desc = { enumerable: true, get: function() {
|
|
2334
|
+
return m4[k2];
|
|
2335
|
+
} };
|
|
2336
|
+
}
|
|
2337
|
+
Object.defineProperty(o18, k22, desc);
|
|
2338
|
+
}) : (function(o18, m4, k2, k22) {
|
|
2339
|
+
if (k22 === void 0) k22 = k2;
|
|
2340
|
+
o18[k22] = m4[k2];
|
|
2341
|
+
}));
|
|
2342
|
+
var __exportStar = exports && exports.__exportStar || function(m4, exports2) {
|
|
2343
|
+
for (var p4 in m4) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p4)) __createBinding(exports2, m4, p4);
|
|
2344
|
+
};
|
|
2345
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2346
|
+
__exportStar(require_renderer(), exports);
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
|
|
2350
|
+
// ../../node_modules/@rhtml/component/dist/index.js
|
|
2351
|
+
var require_dist3 = __commonJS({
|
|
2352
|
+
"../../node_modules/@rhtml/component/dist/index.js"(exports) {
|
|
2353
|
+
"use strict";
|
|
2354
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
2355
|
+
function adopt(value) {
|
|
2356
|
+
return value instanceof P2 ? value : new P2(function(resolve) {
|
|
2357
|
+
resolve(value);
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
return new (P2 || (P2 = Promise))(function(resolve, reject) {
|
|
2361
|
+
function fulfilled(value) {
|
|
2362
|
+
try {
|
|
2363
|
+
step(generator.next(value));
|
|
2364
|
+
} catch (e16) {
|
|
2365
|
+
reject(e16);
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
function rejected(value) {
|
|
2369
|
+
try {
|
|
2370
|
+
step(generator["throw"](value));
|
|
2371
|
+
} catch (e16) {
|
|
2372
|
+
reject(e16);
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
function step(result) {
|
|
2376
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2377
|
+
}
|
|
2378
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2379
|
+
});
|
|
2380
|
+
};
|
|
2381
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2382
|
+
exports.Component = exports.Partial = exports.DefineDependencies = void 0;
|
|
2383
|
+
require_dist2();
|
|
2384
|
+
var lit_html_1 = require_dist();
|
|
2385
|
+
var DefineDependencies = (...deps) => (injection) => {
|
|
2386
|
+
for (const [index, dep] of deps.entries()) {
|
|
2387
|
+
Object.defineProperty(deps, index, {
|
|
2388
|
+
get: () => (injection === null || injection === void 0 ? void 0 : injection.has(dep)) ? injection.get(dep) : dep
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
return deps;
|
|
2392
|
+
};
|
|
2393
|
+
exports.DefineDependencies = DefineDependencies;
|
|
2394
|
+
function waitBeforeTrigger() {
|
|
2395
|
+
var _a;
|
|
2396
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2397
|
+
yield this.updateComplete;
|
|
2398
|
+
yield new Promise(requestAnimationFrame);
|
|
2399
|
+
(_a = this.OnRendererLoaded) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
2400
|
+
});
|
|
2401
|
+
}
|
|
2402
|
+
var Partial = (options) => (deps = []) => (state = () => ({})) => (loading2 = () => null) => (error = () => null) => (render = () => state) => (0, lit_html_1.Component)(Object.assign(Object.assign({}, options), { template() {
|
|
2403
|
+
return (0, lit_html_1.html)`
|
|
2404
|
+
<r-renderer
|
|
2405
|
+
style="display: contents;"
|
|
2406
|
+
@loaded=${waitBeforeTrigger.bind(this)}
|
|
2407
|
+
.options=${{
|
|
2408
|
+
state: state.bind(this).call(this, deps),
|
|
2409
|
+
loading: loading2.bind(this),
|
|
2410
|
+
style: options.style,
|
|
2411
|
+
styles: options.styles,
|
|
2412
|
+
error: error.bind(this),
|
|
2413
|
+
deepCloneState: options.deepCloneState,
|
|
2414
|
+
render: (state2, setState, shadowRoot) => {
|
|
2415
|
+
this.shadowRoot.append(shadowRoot);
|
|
2416
|
+
return render(deps).bind(this).call(this, state2, setState, shadowRoot);
|
|
2417
|
+
}
|
|
2418
|
+
}}
|
|
2419
|
+
></r-renderer>
|
|
2420
|
+
`;
|
|
2421
|
+
} }));
|
|
2422
|
+
exports.Partial = Partial;
|
|
2423
|
+
function Component2({ Settings, Providers, State, Render, Loading, Error: Error2 }) {
|
|
2424
|
+
return (0, exports.Partial)(Settings)(Providers)(State)(Loading)(Error2)(Render);
|
|
2425
|
+
}
|
|
2426
|
+
exports.Component = Component2;
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
|
|
2430
|
+
// ../../node_modules/@rxdi/redux-store/dist/interfaces.js
|
|
2431
|
+
var require_interfaces = __commonJS({
|
|
2432
|
+
"../../node_modules/@rxdi/redux-store/dist/interfaces.js"(exports) {
|
|
2433
|
+
"use strict";
|
|
2434
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2435
|
+
exports.FlattenOperator = void 0;
|
|
2436
|
+
var FlattenOperator;
|
|
2437
|
+
(function(FlattenOperator2) {
|
|
2438
|
+
FlattenOperator2["switchMap"] = "switchMap";
|
|
2439
|
+
FlattenOperator2["mergeMap"] = "mergeMap";
|
|
2440
|
+
FlattenOperator2["concatMap"] = "concatMap";
|
|
2441
|
+
FlattenOperator2["exhaustMap"] = "exhaustMap";
|
|
2442
|
+
})(FlattenOperator || (exports.FlattenOperator = FlattenOperator = {}));
|
|
2443
|
+
}
|
|
2444
|
+
});
|
|
2445
|
+
|
|
2446
|
+
// ../../node_modules/@rxdi/redux-store/dist/utils.js
|
|
2447
|
+
var require_utils = __commonJS({
|
|
2448
|
+
"../../node_modules/@rxdi/redux-store/dist/utils.js"(exports) {
|
|
2449
|
+
"use strict";
|
|
2450
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2451
|
+
exports.mapToObservable = exports.flatCatch = exports.catchErr = exports.compose = exports.hasType = exports.isObject = void 0;
|
|
2452
|
+
exports.combineReducers = combineReducers;
|
|
2453
|
+
var rxjs_1 = require("rxjs");
|
|
2454
|
+
var operators_1 = require("rxjs/operators");
|
|
2455
|
+
var isObject = (value) => value !== null && typeof value === "object";
|
|
2456
|
+
exports.isObject = isObject;
|
|
2457
|
+
var hasType = (action2) => typeof action2.type === "string";
|
|
2458
|
+
exports.hasType = hasType;
|
|
2459
|
+
var compose = (fns) => fns.reduce((f4, g2) => (...args) => f4(g2(...args)));
|
|
2460
|
+
exports.compose = compose;
|
|
2461
|
+
exports.catchErr = (0, rxjs_1.pipe)((0, operators_1.catchError)((e16) => (0, rxjs_1.of)(e16)));
|
|
2462
|
+
var flatCatch = (o18) => o18.pipe(exports.catchErr);
|
|
2463
|
+
exports.flatCatch = flatCatch;
|
|
2464
|
+
var mapToObservable = (value) => {
|
|
2465
|
+
if ((0, rxjs_1.isObservable)(value))
|
|
2466
|
+
return value;
|
|
2467
|
+
if (value instanceof Promise)
|
|
2468
|
+
return (0, rxjs_1.from)(value);
|
|
2469
|
+
return (0, rxjs_1.of)(value);
|
|
2470
|
+
};
|
|
2471
|
+
exports.mapToObservable = mapToObservable;
|
|
2472
|
+
function combineReducers(reducers) {
|
|
2473
|
+
return (state = {}, action2) => {
|
|
2474
|
+
const { hasChanged, nextState } = Object.entries(reducers).reduce(({ hasChanged: hasChanged2, nextState: nextState2 }, [key, reducer2]) => {
|
|
2475
|
+
const prev = state[key];
|
|
2476
|
+
const next = reducer2(prev, action2);
|
|
2477
|
+
return {
|
|
2478
|
+
hasChanged: hasChanged2 || next !== prev,
|
|
2479
|
+
nextState: Object.assign(Object.assign({}, nextState2), { [key]: next })
|
|
2480
|
+
};
|
|
2481
|
+
}, { hasChanged: false, nextState: {} });
|
|
2482
|
+
return hasChanged ? nextState : state;
|
|
2483
|
+
};
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
});
|
|
2487
|
+
|
|
2488
|
+
// ../../node_modules/@rxdi/redux-store/dist/reducer.factory.js
|
|
2489
|
+
var require_reducer_factory = __commonJS({
|
|
2490
|
+
"../../node_modules/@rxdi/redux-store/dist/reducer.factory.js"(exports) {
|
|
2491
|
+
"use strict";
|
|
2492
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2493
|
+
exports.reducerFactory$ = reducerFactory$;
|
|
2494
|
+
var operators_1 = require("rxjs/operators");
|
|
2495
|
+
var utils_1 = require_utils();
|
|
2496
|
+
function reducerFactory$([initialState, reducer2, middleware]) {
|
|
2497
|
+
function _reducer(state, action2) {
|
|
2498
|
+
return middleware.length > 0 ? (0, utils_1.compose)(middleware)(reducer2)(state, action2) : reducer2(state, action2);
|
|
2499
|
+
}
|
|
2500
|
+
return (0, operators_1.scan)(_reducer, initialState);
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
});
|
|
2504
|
+
|
|
2505
|
+
// ../../node_modules/@rxdi/redux-store/dist/defaults.js
|
|
2506
|
+
var require_defaults = __commonJS({
|
|
2507
|
+
"../../node_modules/@rxdi/redux-store/dist/defaults.js"(exports) {
|
|
2508
|
+
"use strict";
|
|
2509
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2510
|
+
exports.getDefaults = getDefaults;
|
|
2511
|
+
var rxjs_1 = require("rxjs");
|
|
2512
|
+
var interfaces_1 = require_interfaces();
|
|
2513
|
+
var utils_1 = require_utils();
|
|
2514
|
+
var operators_1 = require("rxjs/operators");
|
|
2515
|
+
var fop = {
|
|
2516
|
+
switchMap: operators_1.switchMap,
|
|
2517
|
+
mergeMap: operators_1.mergeMap,
|
|
2518
|
+
concatMap: operators_1.concatMap,
|
|
2519
|
+
exhaustMap: operators_1.exhaustMap
|
|
2520
|
+
};
|
|
2521
|
+
function getDefaults(config = {}, options = {}, dispatchSubject) {
|
|
2522
|
+
var _a;
|
|
2523
|
+
const reducer$ = config && config.reducer$ && config.reducer$.pipe(utils_1.catchErr) || (0, rxjs_1.of)((state, action2) => state);
|
|
2524
|
+
const actions$ = new rxjs_1.Subject();
|
|
2525
|
+
const actionStream$ = (reducer$2) => (0, rxjs_1.merge)(config && config.actionStream$ && config.actionStream$.pipe(utils_1.catchErr) || rxjs_1.EMPTY, dispatchSubject).pipe((0, operators_1.filter)(utils_1.isObject), (0, operators_1.map)(utils_1.mapToObservable), actionFlatten(utils_1.flatCatch), (0, operators_1.tap)(actions$), reducer$2, (0, operators_1.map)(utils_1.mapToObservable));
|
|
2526
|
+
const initialState$ = (config && config.initialState$ && config.initialState$.pipe(utils_1.catchErr) || (0, rxjs_1.of)({})).pipe((0, operators_1.share)());
|
|
2527
|
+
const middleware$ = config && config.middleware$ && config.middleware$.pipe(utils_1.catchErr) || (0, rxjs_1.of)([]);
|
|
2528
|
+
const destroy$ = ((_a = config === null || config === void 0 ? void 0 : config.destroy$) === null || _a === void 0 ? void 0 : _a.pipe(utils_1.catchErr)) || rxjs_1.NEVER;
|
|
2529
|
+
const actionFlatten = fop[options && options.actionFlatOp || interfaces_1.FlattenOperator.concatMap];
|
|
2530
|
+
const stateFlatten = fop[options && options.stateFlatOp || interfaces_1.FlattenOperator.switchMap];
|
|
2531
|
+
const flattenState$ = (source) => source.pipe(stateFlatten(utils_1.flatCatch), (0, operators_1.map)(utils_1.mapToObservable), stateFlatten(utils_1.flatCatch));
|
|
2532
|
+
const bufferSize = options && options.bufferSize || 1;
|
|
2533
|
+
const windowTime = options && options.windowTime;
|
|
2534
|
+
const shareReplayConfig = {
|
|
2535
|
+
refCount: false,
|
|
2536
|
+
bufferSize,
|
|
2537
|
+
windowTime
|
|
2538
|
+
};
|
|
2539
|
+
return {
|
|
2540
|
+
reducer$,
|
|
2541
|
+
actions$,
|
|
2542
|
+
actionStream$,
|
|
2543
|
+
initialState$,
|
|
2544
|
+
middleware$,
|
|
2545
|
+
destroy$,
|
|
2546
|
+
flattenState$,
|
|
2547
|
+
shareReplayConfig
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
});
|
|
2552
|
+
|
|
2553
|
+
// ../../node_modules/@rxdi/redux-store/dist/devtools.js
|
|
2554
|
+
var require_devtools = __commonJS({
|
|
2555
|
+
"../../node_modules/@rxdi/redux-store/dist/devtools.js"(exports) {
|
|
2556
|
+
"use strict";
|
|
2557
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2558
|
+
exports.DEVTOOLS_JUMP_TO_STATE = void 0;
|
|
2559
|
+
exports.normalizeDevToolsConfig = normalizeDevToolsConfig;
|
|
2560
|
+
exports.withDevToolsTimeTravel = withDevToolsTimeTravel;
|
|
2561
|
+
exports.connectReduxDevTools = connectReduxDevTools;
|
|
2562
|
+
var rxjs_1 = require("rxjs");
|
|
2563
|
+
var operators_1 = require("rxjs/operators");
|
|
2564
|
+
exports.DEVTOOLS_JUMP_TO_STATE = "@@redux-devtools/JUMP_TO_STATE";
|
|
2565
|
+
function normalizeDevToolsConfig(config) {
|
|
2566
|
+
if (!config) {
|
|
2567
|
+
return void 0;
|
|
2568
|
+
}
|
|
2569
|
+
const options = config === true ? {} : config;
|
|
2570
|
+
return options.enabled === false ? void 0 : options;
|
|
2571
|
+
}
|
|
2572
|
+
function withDevToolsTimeTravel(reducerFn) {
|
|
2573
|
+
return (state, action2) => (action2 === null || action2 === void 0 ? void 0 : action2.type) === exports.DEVTOOLS_JUMP_TO_STATE ? action2.state : reducerFn(state, action2);
|
|
2574
|
+
}
|
|
2575
|
+
function connectReduxDevTools(store, options = {}) {
|
|
2576
|
+
var _a, _b;
|
|
2577
|
+
const extension = globalThis.__REDUX_DEVTOOLS_EXTENSION__;
|
|
2578
|
+
if (options.enabled === false || !extension) {
|
|
2579
|
+
return () => void 0;
|
|
2580
|
+
}
|
|
2581
|
+
const devTools = extension.connect(Object.assign({ name: (_a = options.name) !== null && _a !== void 0 ? _a : "RxDI Store", maxAge: (_b = options.maxAge) !== null && _b !== void 0 ? _b : 50 }, options.extensionOptions));
|
|
2582
|
+
const subscription = new rxjs_1.Subscription();
|
|
2583
|
+
let currentState;
|
|
2584
|
+
subscription.add(store.state$.subscribe((state) => {
|
|
2585
|
+
currentState = state;
|
|
2586
|
+
}));
|
|
2587
|
+
devTools.init(currentState);
|
|
2588
|
+
subscription.add(store.state$.pipe(
|
|
2589
|
+
(0, operators_1.withLatestFrom)(store.actions$),
|
|
2590
|
+
// Jumps come from the DevTools UI — echoing them back would
|
|
2591
|
+
// pollute the action log.
|
|
2592
|
+
(0, operators_1.filter)(([, action2]) => action2.type !== exports.DEVTOOLS_JUMP_TO_STATE)
|
|
2593
|
+
).subscribe(([state, action2]) => devTools.send(action2, state)));
|
|
2594
|
+
const unsubscribeMessages = devTools.subscribe((message) => {
|
|
2595
|
+
var _a2;
|
|
2596
|
+
if (message.type !== "DISPATCH") {
|
|
2597
|
+
return;
|
|
2598
|
+
}
|
|
2599
|
+
const kind = (_a2 = message.payload) === null || _a2 === void 0 ? void 0 : _a2.type;
|
|
2600
|
+
if ((kind === "JUMP_TO_ACTION" || kind === "JUMP_TO_STATE") && message.state) {
|
|
2601
|
+
store.dispatch({
|
|
2602
|
+
type: exports.DEVTOOLS_JUMP_TO_STATE,
|
|
2603
|
+
state: JSON.parse(message.state)
|
|
2604
|
+
});
|
|
2605
|
+
} else if (kind === "COMMIT") {
|
|
2606
|
+
devTools.init(currentState);
|
|
2607
|
+
}
|
|
2608
|
+
});
|
|
2609
|
+
return () => {
|
|
2610
|
+
var _a2;
|
|
2611
|
+
subscription.unsubscribe();
|
|
2612
|
+
if (typeof unsubscribeMessages === "function") {
|
|
2613
|
+
unsubscribeMessages();
|
|
2614
|
+
}
|
|
2615
|
+
(_a2 = devTools.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(devTools);
|
|
2616
|
+
};
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
|
|
2621
|
+
// ../../node_modules/@rxdi/redux-store/dist/store.js
|
|
2622
|
+
var require_store = __commonJS({
|
|
2623
|
+
"../../node_modules/@rxdi/redux-store/dist/store.js"(exports) {
|
|
2624
|
+
"use strict";
|
|
2625
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2626
|
+
exports.Store = void 0;
|
|
2627
|
+
exports.createStore = createStore2;
|
|
2628
|
+
var rxjs_1 = require("rxjs");
|
|
2629
|
+
var operators_1 = require("rxjs/operators");
|
|
2630
|
+
var reducer_factory_1 = require_reducer_factory();
|
|
2631
|
+
var defaults_1 = require_defaults();
|
|
2632
|
+
var devtools_1 = require_devtools();
|
|
2633
|
+
var Store2 = class {
|
|
2634
|
+
/**
|
|
2635
|
+
* Default configuration
|
|
2636
|
+
*
|
|
2637
|
+
* @param {Object} config
|
|
2638
|
+
* {
|
|
2639
|
+
* reducer$: of(reducer({})),
|
|
2640
|
+
* actionStream$: EMPTY, // if not defined, no actions will be dispatched in the store
|
|
2641
|
+
* initialState$: of({}),
|
|
2642
|
+
* middleware$: of([]),
|
|
2643
|
+
* destroy$: NEVER // if not defined, the state subscription will live forever
|
|
2644
|
+
* }
|
|
2645
|
+
*
|
|
2646
|
+
* @param {Object} options
|
|
2647
|
+
* {
|
|
2648
|
+
* actionFop: FlattenOps.concatMap, // Flatten operator for actions's stream.
|
|
2649
|
+
* stateFop: FlattenOps.switchMap // Flatten operator for state's stream.
|
|
2650
|
+
* windowTime: undefined //Maximum time length of the replay buffer in milliseconds.
|
|
2651
|
+
* bufferSize: 1 //Maximum element count of the replay buffer.
|
|
2652
|
+
* }
|
|
2653
|
+
*/
|
|
2654
|
+
constructor(config, options) {
|
|
2655
|
+
var _a, _b, _c, _d;
|
|
2656
|
+
this.config = config;
|
|
2657
|
+
this.options = options;
|
|
2658
|
+
this._dispatch$ = new rxjs_1.Subject();
|
|
2659
|
+
this.dispatch = (action2) => {
|
|
2660
|
+
this._dispatch$.next(action2);
|
|
2661
|
+
};
|
|
2662
|
+
const devToolsOptions = (0, devtools_1.normalizeDevToolsConfig)((_a = this.config) === null || _a === void 0 ? void 0 : _a.devTools);
|
|
2663
|
+
if (devToolsOptions) {
|
|
2664
|
+
this.config = Object.assign(Object.assign({}, this.config), { reducer$: ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.reducer$) !== null && _c !== void 0 ? _c : (0, rxjs_1.of)((state) => state)).pipe((0, operators_1.map)((reducerFn) => (0, devtools_1.withDevToolsTimeTravel)(reducerFn))) });
|
|
2665
|
+
}
|
|
2666
|
+
const { reducer$, actions$, actionStream$, middleware$, initialState$, destroy$, flattenState$, shareReplayConfig } = (0, defaults_1.getDefaults)(this.config, this.options, this._dispatch$);
|
|
2667
|
+
this.state$ = (0, rxjs_1.combineLatest)([initialState$, reducer$, middleware$]).pipe((0, operators_1.map)(reducer_factory_1.reducerFactory$), (0, operators_1.concatMap)(actionStream$), (0, operators_1.startWith)(initialState$), flattenState$, (0, operators_1.takeUntil)(destroy$), (0, operators_1.shareReplay)(shareReplayConfig));
|
|
2668
|
+
this.state$.subscribe();
|
|
2669
|
+
this.actions$ = actions$.pipe((0, operators_1.shareReplay)(shareReplayConfig));
|
|
2670
|
+
if ((_d = this.config) === null || _d === void 0 ? void 0 : _d.epic$) {
|
|
2671
|
+
this.config.epic$(this.actions$, this.state$).pipe((0, operators_1.takeUntil)(destroy$)).subscribe({
|
|
2672
|
+
next: (action2) => this.dispatch(action2),
|
|
2673
|
+
error: (err) => console.error("[Epic] Error:", err)
|
|
2674
|
+
});
|
|
2675
|
+
}
|
|
2676
|
+
if (devToolsOptions) {
|
|
2677
|
+
const disconnect = (0, devtools_1.connectReduxDevTools)(this, devToolsOptions);
|
|
2678
|
+
destroy$.subscribe(() => disconnect());
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
exports.Store = Store2;
|
|
2683
|
+
function createStore2(config = {}, opts = {}) {
|
|
2684
|
+
return new Store2(config, opts);
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
});
|
|
2688
|
+
|
|
2689
|
+
// ../../node_modules/@rxdi/redux-store/dist/middleware.js
|
|
2690
|
+
var require_middleware = __commonJS({
|
|
2691
|
+
"../../node_modules/@rxdi/redux-store/dist/middleware.js"(exports) {
|
|
2692
|
+
"use strict";
|
|
2693
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2694
|
+
exports.reduceA = exports.reduceNS = exports.reducePS = exports.filterA = exports.filterNS = exports.filterPS = exports.mapA = exports.mapNS = exports.mapPS = void 0;
|
|
2695
|
+
var mapPS = (mapFn) => (reducer2) => (state, Action) => reducer2(mapFn(state), Action);
|
|
2696
|
+
exports.mapPS = mapPS;
|
|
2697
|
+
var mapNS = (mapFn) => (reducer2) => (state, Action) => mapFn(reducer2(state, Action));
|
|
2698
|
+
exports.mapNS = mapNS;
|
|
2699
|
+
var mapA = (mapFn) => (reducer2) => (state, Action) => reducer2(state, mapFn(Action));
|
|
2700
|
+
exports.mapA = mapA;
|
|
2701
|
+
var filterPS = (filterFn) => (reducer2) => (state, Action) => {
|
|
2702
|
+
return filterFn(state) ? reducer2(state, Action) : state;
|
|
2703
|
+
};
|
|
2704
|
+
exports.filterPS = filterPS;
|
|
2705
|
+
var filterNS = (filterFn) => (reducer2) => (state, Action) => {
|
|
2706
|
+
const nextState = reducer2(state, Action);
|
|
2707
|
+
return filterFn(nextState) ? nextState : state;
|
|
2708
|
+
};
|
|
2709
|
+
exports.filterNS = filterNS;
|
|
2710
|
+
var filterA = (filterFn) => (reducer2) => (state, Action) => {
|
|
2711
|
+
return filterFn(Action) ? reducer2(state, Action) : state;
|
|
2712
|
+
};
|
|
2713
|
+
exports.filterA = filterA;
|
|
2714
|
+
var reducePS = (reducerFn) => (reducer2) => (state, Action) => {
|
|
2715
|
+
return reducer2(reducerFn(state, Action), Action);
|
|
2716
|
+
};
|
|
2717
|
+
exports.reducePS = reducePS;
|
|
2718
|
+
var reduceNS = (reducerFn) => (reducer2) => (state, Action) => {
|
|
2719
|
+
return reducerFn(reducer2(state, Action), Action);
|
|
2720
|
+
};
|
|
2721
|
+
exports.reduceNS = reduceNS;
|
|
2722
|
+
var reduceA = (reducerFn) => (reducer2) => (state, Action) => {
|
|
2723
|
+
return reducer2(state, reducerFn(state, Action));
|
|
2724
|
+
};
|
|
2725
|
+
exports.reduceA = reduceA;
|
|
2726
|
+
}
|
|
2727
|
+
});
|
|
2728
|
+
|
|
2729
|
+
// ../../node_modules/@rxdi/redux-store/dist/effects.js
|
|
2730
|
+
var require_effects = __commonJS({
|
|
2731
|
+
"../../node_modules/@rxdi/redux-store/dist/effects.js"(exports) {
|
|
2732
|
+
"use strict";
|
|
2733
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2734
|
+
exports.ofType = ofType2;
|
|
2735
|
+
exports.createEffect = createEffect2;
|
|
2736
|
+
exports.createSubscriptionEffect = createSubscriptionEffect;
|
|
2737
|
+
exports.createEpicRegistry = createEpicRegistry2;
|
|
2738
|
+
exports.createEffectRegistry = createEpicRegistry2;
|
|
2739
|
+
var rxjs_1 = require("rxjs");
|
|
2740
|
+
var operators_1 = require("rxjs/operators");
|
|
2741
|
+
function ofType2(...actionCreators) {
|
|
2742
|
+
return (action$) => {
|
|
2743
|
+
return action$.pipe((0, operators_1.filter)((action2) => actionCreators.some((creator) => creator.type === action2.type)));
|
|
2744
|
+
};
|
|
2745
|
+
}
|
|
2746
|
+
function createEffect2(options = { dispatch: true }) {
|
|
2747
|
+
return (effectFactory) => {
|
|
2748
|
+
return (action$, state$) => {
|
|
2749
|
+
const mappedEffect$ = effectFactory(action$, state$);
|
|
2750
|
+
if (!options.dispatch) {
|
|
2751
|
+
return mappedEffect$.pipe((0, operators_1.ignoreElements)(), (0, operators_1.catchError)((error) => {
|
|
2752
|
+
console.error("[Effect] Error:", error);
|
|
2753
|
+
return (0, rxjs_1.of)();
|
|
2754
|
+
}));
|
|
2755
|
+
}
|
|
2756
|
+
return mappedEffect$.pipe((0, operators_1.catchError)((error) => {
|
|
2757
|
+
console.error("[Effect] Error:", error);
|
|
2758
|
+
return (0, rxjs_1.of)();
|
|
2759
|
+
}));
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
}
|
|
2763
|
+
function createSubscriptionEffect(destroy$) {
|
|
2764
|
+
return (effectFactory) => {
|
|
2765
|
+
return (action$, state$) => {
|
|
2766
|
+
return effectFactory(action$, state$).pipe((0, operators_1.takeUntil)(destroy$), (0, operators_1.catchError)((error) => {
|
|
2767
|
+
console.error("[Effect] Error:", error);
|
|
2768
|
+
return (0, rxjs_1.of)();
|
|
2769
|
+
}));
|
|
2770
|
+
};
|
|
2771
|
+
};
|
|
2772
|
+
}
|
|
2773
|
+
function createEpicRegistry2(...effects) {
|
|
2774
|
+
return (action$, state$) => {
|
|
2775
|
+
return (0, rxjs_1.merge)(...effects.map((effect) => effect(action$, state$)));
|
|
2776
|
+
};
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
});
|
|
2780
|
+
|
|
2781
|
+
// ../../node_modules/@rxdi/redux-store/dist/index.js
|
|
2782
|
+
var require_dist4 = __commonJS({
|
|
2783
|
+
"../../node_modules/@rxdi/redux-store/dist/index.js"(exports) {
|
|
2784
|
+
"use strict";
|
|
2785
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o18, m4, k2, k22) {
|
|
2786
|
+
if (k22 === void 0) k22 = k2;
|
|
2787
|
+
var desc = Object.getOwnPropertyDescriptor(m4, k2);
|
|
2788
|
+
if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) {
|
|
2789
|
+
desc = { enumerable: true, get: function() {
|
|
2790
|
+
return m4[k2];
|
|
2791
|
+
} };
|
|
2792
|
+
}
|
|
2793
|
+
Object.defineProperty(o18, k22, desc);
|
|
2794
|
+
}) : (function(o18, m4, k2, k22) {
|
|
2795
|
+
if (k22 === void 0) k22 = k2;
|
|
2796
|
+
o18[k22] = m4[k2];
|
|
2797
|
+
}));
|
|
2798
|
+
var __exportStar = exports && exports.__exportStar || function(m4, exports2) {
|
|
2799
|
+
for (var p4 in m4) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p4)) __createBinding(exports2, m4, p4);
|
|
2800
|
+
};
|
|
2801
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2802
|
+
exports.combineReducers = exports.flatCatch = exports.catchErr = exports.mapToObservable = exports.DEVTOOLS_JUMP_TO_STATE = exports.normalizeDevToolsConfig = exports.withDevToolsTimeTravel = exports.connectReduxDevTools = exports.createStore = exports.Store = exports.FlattenOperator = void 0;
|
|
2803
|
+
var interfaces_1 = require_interfaces();
|
|
2804
|
+
Object.defineProperty(exports, "FlattenOperator", { enumerable: true, get: function() {
|
|
2805
|
+
return interfaces_1.FlattenOperator;
|
|
2806
|
+
} });
|
|
2807
|
+
var store_1 = require_store();
|
|
2808
|
+
Object.defineProperty(exports, "Store", { enumerable: true, get: function() {
|
|
2809
|
+
return store_1.Store;
|
|
2810
|
+
} });
|
|
2811
|
+
Object.defineProperty(exports, "createStore", { enumerable: true, get: function() {
|
|
2812
|
+
return store_1.createStore;
|
|
2813
|
+
} });
|
|
2814
|
+
var devtools_1 = require_devtools();
|
|
2815
|
+
Object.defineProperty(exports, "connectReduxDevTools", { enumerable: true, get: function() {
|
|
2816
|
+
return devtools_1.connectReduxDevTools;
|
|
2817
|
+
} });
|
|
2818
|
+
Object.defineProperty(exports, "withDevToolsTimeTravel", { enumerable: true, get: function() {
|
|
2819
|
+
return devtools_1.withDevToolsTimeTravel;
|
|
2820
|
+
} });
|
|
2821
|
+
Object.defineProperty(exports, "normalizeDevToolsConfig", { enumerable: true, get: function() {
|
|
2822
|
+
return devtools_1.normalizeDevToolsConfig;
|
|
2823
|
+
} });
|
|
2824
|
+
Object.defineProperty(exports, "DEVTOOLS_JUMP_TO_STATE", { enumerable: true, get: function() {
|
|
2825
|
+
return devtools_1.DEVTOOLS_JUMP_TO_STATE;
|
|
2826
|
+
} });
|
|
2827
|
+
var utils_1 = require_utils();
|
|
2828
|
+
Object.defineProperty(exports, "mapToObservable", { enumerable: true, get: function() {
|
|
2829
|
+
return utils_1.mapToObservable;
|
|
2830
|
+
} });
|
|
2831
|
+
Object.defineProperty(exports, "catchErr", { enumerable: true, get: function() {
|
|
2832
|
+
return utils_1.catchErr;
|
|
2833
|
+
} });
|
|
2834
|
+
Object.defineProperty(exports, "flatCatch", { enumerable: true, get: function() {
|
|
2835
|
+
return utils_1.flatCatch;
|
|
2836
|
+
} });
|
|
2837
|
+
Object.defineProperty(exports, "combineReducers", { enumerable: true, get: function() {
|
|
2838
|
+
return utils_1.combineReducers;
|
|
2839
|
+
} });
|
|
2840
|
+
__exportStar(require_middleware(), exports);
|
|
2841
|
+
__exportStar(require_effects(), exports);
|
|
2842
|
+
}
|
|
2843
|
+
});
|
|
2844
|
+
|
|
2845
|
+
// src/index.ts
|
|
2846
|
+
var index_exports = {};
|
|
2847
|
+
__export(index_exports, {
|
|
2848
|
+
ChatEffects: () => ChatEffects,
|
|
2849
|
+
ChatStore: () => ChatStore,
|
|
2850
|
+
HOSTED_TURNSTILE_URL: () => HOSTED_TURNSTILE_URL,
|
|
2851
|
+
LOCALES: () => LOCALES,
|
|
2852
|
+
LambforgeAgentChat: () => LambforgeAgentChat,
|
|
2853
|
+
TAG: () => TAG,
|
|
2854
|
+
agentEvent: () => agentEvent,
|
|
2855
|
+
agentsLoaded: () => agentsLoaded,
|
|
2856
|
+
chatReducer: () => chatReducer,
|
|
2857
|
+
connecting: () => connecting,
|
|
2858
|
+
errorCode: () => errorCode,
|
|
2859
|
+
failed: () => failed,
|
|
2860
|
+
historyLoaded: () => historyLoaded,
|
|
2861
|
+
initialChatState: () => initialChatState,
|
|
2862
|
+
inline: () => inline,
|
|
2863
|
+
newConversation: () => newConversation,
|
|
2864
|
+
pickAgent: () => pickAgent,
|
|
2865
|
+
pickAgents: () => pickAgents,
|
|
2866
|
+
renderMarkdown: () => renderMarkdown,
|
|
2867
|
+
resume: () => resume,
|
|
2868
|
+
runEnded: () => runEnded,
|
|
2869
|
+
sendMessage: () => sendMessage,
|
|
2870
|
+
shown: () => shown,
|
|
2871
|
+
stop: () => stop,
|
|
2872
|
+
stringsFor: () => stringsFor,
|
|
2873
|
+
toMessage: () => toMessage,
|
|
2874
|
+
turnstileToken: () => turnstileToken,
|
|
2875
|
+
verifying: () => verifying
|
|
2876
|
+
});
|
|
2877
|
+
module.exports = __toCommonJS(index_exports);
|
|
2878
|
+
|
|
2879
|
+
// src/element.ts
|
|
2880
|
+
var import_agents = require("@lambforge/agents");
|
|
2881
|
+
var import_component = __toESM(require_dist3());
|
|
2882
|
+
var import_lit_html19 = __toESM(require_dist());
|
|
2883
|
+
var import_rxjs3 = require("rxjs");
|
|
2884
|
+
var import_operators3 = require("rxjs/operators");
|
|
2885
|
+
|
|
2886
|
+
// src/markdown.ts
|
|
2887
|
+
var import_lit_html18 = __toESM(require_dist());
|
|
2888
|
+
var SAFE_LINK = /^(https?:|mailto:)/i;
|
|
2889
|
+
var BULLET = /^\s*[-*+]\s+/;
|
|
2890
|
+
var NUMBERED = /^\s*\d+[.)]\s+/;
|
|
2891
|
+
var FENCE = /^```\s*([\w+-]*)\s*$/;
|
|
2892
|
+
var HEADING = /^(#{1,6})\s+(.*)$/;
|
|
2893
|
+
function renderMarkdown(text) {
|
|
2894
|
+
const out = [];
|
|
2895
|
+
const lines = String(text ?? "").replace(/\r\n?/g, "\n").split("\n");
|
|
2896
|
+
let i12 = 0;
|
|
2897
|
+
while (i12 < lines.length) {
|
|
2898
|
+
const line = lines[i12];
|
|
2899
|
+
const fence = line.match(FENCE);
|
|
2900
|
+
if (fence) {
|
|
2901
|
+
const code = [];
|
|
2902
|
+
i12++;
|
|
2903
|
+
while (i12 < lines.length && !/^```\s*$/.test(lines[i12])) code.push(lines[i12++]);
|
|
2904
|
+
i12++;
|
|
2905
|
+
out.push(import_lit_html18.html`<pre><code data-lang=${fence[1] || ""}>${code.join("\n")}</code></pre>`);
|
|
2906
|
+
continue;
|
|
2907
|
+
}
|
|
2908
|
+
const heading = line.match(HEADING);
|
|
2909
|
+
if (heading) {
|
|
2910
|
+
out.push(import_lit_html18.html`<p><strong class="h">${inline(heading[2])}</strong></p>`);
|
|
2911
|
+
i12++;
|
|
2912
|
+
continue;
|
|
2913
|
+
}
|
|
2914
|
+
if (BULLET.test(line) || NUMBERED.test(line)) {
|
|
2915
|
+
const ordered = NUMBERED.test(line);
|
|
2916
|
+
const marker = ordered ? NUMBERED : BULLET;
|
|
2917
|
+
const items = [];
|
|
2918
|
+
while (i12 < lines.length && marker.test(lines[i12])) {
|
|
2919
|
+
items.push(import_lit_html18.html`<li>${inline(lines[i12++].replace(marker, ""))}</li>`);
|
|
2920
|
+
}
|
|
2921
|
+
out.push(ordered ? import_lit_html18.html`<ol>${items}</ol>` : import_lit_html18.html`<ul>${items}</ul>`);
|
|
2922
|
+
continue;
|
|
2923
|
+
}
|
|
2924
|
+
if (!line.trim()) {
|
|
2925
|
+
i12++;
|
|
2926
|
+
continue;
|
|
2927
|
+
}
|
|
2928
|
+
const para = [];
|
|
2929
|
+
while (i12 < lines.length && lines[i12].trim() && !/^```/.test(lines[i12]) && !HEADING.test(lines[i12]) && !BULLET.test(lines[i12]) && !NUMBERED.test(lines[i12])) {
|
|
2930
|
+
para.push(lines[i12++]);
|
|
2931
|
+
}
|
|
2932
|
+
out.push(import_lit_html18.html`<p>${para.map((l9, k2) => k2 ? import_lit_html18.html`<br />${inline(l9)}` : inline(l9))}</p>`);
|
|
2933
|
+
}
|
|
2934
|
+
return out;
|
|
2935
|
+
}
|
|
2936
|
+
var TOKEN = /(`[^`]+`)|(\*\*[^*]+\*\*)|(__[^_]+__)|(\*[^*\s][^*]*\*)|(\[[^\]]+\]\([^)\s]+\))|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/;
|
|
2937
|
+
function inline(text) {
|
|
2938
|
+
const out = [];
|
|
2939
|
+
let rest = text;
|
|
2940
|
+
while (rest) {
|
|
2941
|
+
const m4 = rest.match(TOKEN);
|
|
2942
|
+
if (!m4 || m4.index === void 0) {
|
|
2943
|
+
out.push(rest);
|
|
2944
|
+
break;
|
|
2945
|
+
}
|
|
2946
|
+
if (m4.index) out.push(rest.slice(0, m4.index));
|
|
2947
|
+
const t9 = m4[0];
|
|
2948
|
+
if (m4[1]) out.push(import_lit_html18.html`<code>${t9.slice(1, -1)}</code>`);
|
|
2949
|
+
else if (m4[2] || m4[3]) out.push(import_lit_html18.html`<strong>${inline(t9.slice(2, -2))}</strong>`);
|
|
2950
|
+
else if (m4[4]) out.push(import_lit_html18.html`<em>${inline(t9.slice(1, -1))}</em>`);
|
|
2951
|
+
else if (m4[5]) {
|
|
2952
|
+
const [, label, href] = t9.match(/^\[([^\]]+)\]\(([^)\s]+)\)$/) ?? [];
|
|
2953
|
+
out.push(link(label, href));
|
|
2954
|
+
} else out.push(link(t9, t9));
|
|
2955
|
+
rest = rest.slice(m4.index + t9.length);
|
|
2956
|
+
}
|
|
2957
|
+
return out;
|
|
2958
|
+
}
|
|
2959
|
+
function link(label, href) {
|
|
2960
|
+
if (!SAFE_LINK.test(href)) return label;
|
|
2961
|
+
return import_lit_html18.html`<a href=${href} target="_blank" rel="noopener noreferrer nofollow">${label}</a>`;
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
// ../../node_modules/ts-action/esm5/action.js
|
|
2965
|
+
var __assign = function() {
|
|
2966
|
+
__assign = Object.assign || function(t9) {
|
|
2967
|
+
for (var s9, i12 = 1, n11 = arguments.length; i12 < n11; i12++) {
|
|
2968
|
+
s9 = arguments[i12];
|
|
2969
|
+
for (var p4 in s9) if (Object.prototype.hasOwnProperty.call(s9, p4))
|
|
2970
|
+
t9[p4] = s9[p4];
|
|
2971
|
+
}
|
|
2972
|
+
return t9;
|
|
2973
|
+
};
|
|
2974
|
+
return __assign.apply(this, arguments);
|
|
2975
|
+
};
|
|
2976
|
+
function action(type, config) {
|
|
2977
|
+
if (typeof config === "function") {
|
|
2978
|
+
return defineType(type, function() {
|
|
2979
|
+
var args = [];
|
|
2980
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2981
|
+
args[_i] = arguments[_i];
|
|
2982
|
+
}
|
|
2983
|
+
return __assign(__assign({}, config.apply(void 0, args)), { type });
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
var as = config ? config._as : "empty";
|
|
2987
|
+
switch (as) {
|
|
2988
|
+
case "empty":
|
|
2989
|
+
return defineType(type, function() {
|
|
2990
|
+
return { type };
|
|
2991
|
+
});
|
|
2992
|
+
case "fsa":
|
|
2993
|
+
return defineType(type, function(payload2, meta) {
|
|
2994
|
+
return payload2 instanceof Error ? { error: true, meta, payload: payload2, type } : { error: false, meta, payload: payload2, type };
|
|
2995
|
+
});
|
|
2996
|
+
case "payload":
|
|
2997
|
+
return defineType(type, function(payload2) {
|
|
2998
|
+
return { payload: payload2, type };
|
|
2999
|
+
});
|
|
3000
|
+
case "props":
|
|
3001
|
+
return defineType(type, function(props) {
|
|
3002
|
+
return __assign(__assign({}, props), { type });
|
|
3003
|
+
});
|
|
3004
|
+
default:
|
|
3005
|
+
throw new Error("Unexpected config.");
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
function payload() {
|
|
3009
|
+
return { _as: "payload", _p: void 0 };
|
|
3010
|
+
}
|
|
3011
|
+
function defineType(type, creator) {
|
|
3012
|
+
return Object.defineProperty(creator, "type", {
|
|
3013
|
+
value: type,
|
|
3014
|
+
writable: false
|
|
3015
|
+
});
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
// ../../node_modules/ts-action/esm5/reducer.js
|
|
3019
|
+
var __spreadArrays = function() {
|
|
3020
|
+
for (var s9 = 0, i12 = 0, il = arguments.length; i12 < il; i12++) s9 += arguments[i12].length;
|
|
3021
|
+
for (var r7 = Array(s9), k2 = 0, i12 = 0; i12 < il; i12++)
|
|
3022
|
+
for (var a5 = arguments[i12], j = 0, jl = a5.length; j < jl; j++, k2++)
|
|
3023
|
+
r7[k2] = a5[j];
|
|
3024
|
+
return r7;
|
|
3025
|
+
};
|
|
3026
|
+
function on() {
|
|
3027
|
+
var args = [];
|
|
3028
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3029
|
+
args[_i] = arguments[_i];
|
|
3030
|
+
}
|
|
3031
|
+
var reducer2 = args.pop();
|
|
3032
|
+
var types = args.reduce(function(result, creator) {
|
|
3033
|
+
return __spreadArrays(result, [creator.type]);
|
|
3034
|
+
}, []);
|
|
3035
|
+
return { reducer: reducer2, types };
|
|
3036
|
+
}
|
|
3037
|
+
function reducer(initialState) {
|
|
3038
|
+
var ons = [];
|
|
3039
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3040
|
+
ons[_i - 1] = arguments[_i];
|
|
3041
|
+
}
|
|
3042
|
+
var map2 = /* @__PURE__ */ new Map();
|
|
3043
|
+
for (var _a = 0, ons_1 = ons; _a < ons_1.length; _a++) {
|
|
3044
|
+
var on_1 = ons_1[_a];
|
|
3045
|
+
for (var _b = 0, _c = on_1.types; _b < _c.length; _b++) {
|
|
3046
|
+
var type = _c[_b];
|
|
3047
|
+
if (!map2.has(type)) {
|
|
3048
|
+
map2.set(type, on_1.reducer);
|
|
3049
|
+
} else {
|
|
3050
|
+
console.warn(type + " already specified in an 'on' call.");
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
return function(state, action2) {
|
|
3055
|
+
if (state === void 0) {
|
|
3056
|
+
state = initialState;
|
|
3057
|
+
}
|
|
3058
|
+
var reducer2 = map2.get(action2.type);
|
|
3059
|
+
return reducer2 ? reducer2(state, action2) : state;
|
|
3060
|
+
};
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
// src/store/chat-actions.ts
|
|
3064
|
+
var shown = action("[chat] shown", payload());
|
|
3065
|
+
var connecting = action("[chat] connecting");
|
|
3066
|
+
var failed = action("[chat] failed", payload());
|
|
3067
|
+
var verifying = action("[chat] verifying", payload());
|
|
3068
|
+
var agentsLoaded = action(
|
|
3069
|
+
"[chat] agents loaded",
|
|
3070
|
+
payload()
|
|
3071
|
+
);
|
|
3072
|
+
var pickAgent = action("[chat] pick agent", payload());
|
|
3073
|
+
var historyLoaded = action(
|
|
3074
|
+
"[chat] history loaded",
|
|
3075
|
+
payload()
|
|
3076
|
+
);
|
|
3077
|
+
var newConversation = action("[chat] new conversation");
|
|
3078
|
+
var sendMessage = action("[chat] send", payload());
|
|
3079
|
+
var resume = action(
|
|
3080
|
+
"[chat] resume",
|
|
3081
|
+
payload()
|
|
3082
|
+
);
|
|
3083
|
+
var agentEvent = action("[chat] event", payload());
|
|
3084
|
+
var runEnded = action("[chat] run ended");
|
|
3085
|
+
var stop = action("[chat] stop", payload());
|
|
3086
|
+
|
|
3087
|
+
// src/store/chat-effects.ts
|
|
3088
|
+
var import_redux_store = __toESM(require_dist4());
|
|
3089
|
+
var import_rxjs = require("rxjs");
|
|
3090
|
+
var import_operators = require("rxjs/operators");
|
|
3091
|
+
var errorCode = (e16) => e16?.code || "internal";
|
|
3092
|
+
var fail = (e16) => (0, import_rxjs.of)(failed(errorCode(e16)));
|
|
3093
|
+
function pickAgents(all, ctx) {
|
|
3094
|
+
const agents = ctx.agents.length ? all.filter((a5) => ctx.agents.includes(a5.id) || ctx.agents.includes(a5.name)) : all;
|
|
3095
|
+
const preferred = agents.find((a5) => a5.id === ctx.agent || a5.name === ctx.agent) ?? agents[0];
|
|
3096
|
+
return { agents, agentId: preferred?.id ?? null };
|
|
3097
|
+
}
|
|
3098
|
+
var ChatEffects = class {
|
|
3099
|
+
constructor(ctx) {
|
|
3100
|
+
this.ctx = ctx;
|
|
3101
|
+
/** The first time the panel is on screen: the agents this session may use. */
|
|
3102
|
+
this.connect$ = (0, import_redux_store.createEffect)()(
|
|
3103
|
+
(_action$, state$) => state$.pipe(
|
|
3104
|
+
(0, import_operators.filter)((s9) => s9.shown),
|
|
3105
|
+
(0, import_operators.take)(1),
|
|
3106
|
+
(0, import_operators.switchMap)(() => {
|
|
3107
|
+
const client = this.ctx.client;
|
|
3108
|
+
if (!client) return (0, import_rxjs.of)(failed("unauthorized"));
|
|
3109
|
+
return (0, import_rxjs.concat)(
|
|
3110
|
+
(0, import_rxjs.of)(connecting()),
|
|
3111
|
+
client.agents().pipe(
|
|
3112
|
+
(0, import_operators.take)(1),
|
|
3113
|
+
(0, import_operators.map)((all) => agentsLoaded(pickAgents(all, this.ctx))),
|
|
3114
|
+
(0, import_operators.catchError)(fail)
|
|
3115
|
+
)
|
|
3116
|
+
);
|
|
3117
|
+
})
|
|
3118
|
+
)
|
|
3119
|
+
);
|
|
3120
|
+
/** The selected agent's latest conversation (resuming a running answer). */
|
|
3121
|
+
this.select$ = (0, import_redux_store.createEffect)()(
|
|
3122
|
+
(action$) => (0, import_rxjs.merge)(
|
|
3123
|
+
action$.pipe(
|
|
3124
|
+
(0, import_redux_store.ofType)(agentsLoaded),
|
|
3125
|
+
(0, import_operators.map)(({ payload: payload2 }) => payload2.agentId)
|
|
3126
|
+
),
|
|
3127
|
+
action$.pipe(
|
|
3128
|
+
(0, import_redux_store.ofType)(pickAgent),
|
|
3129
|
+
(0, import_operators.map)(({ payload: payload2 }) => payload2)
|
|
3130
|
+
)
|
|
3131
|
+
).pipe(
|
|
3132
|
+
(0, import_operators.filter)((id) => !!id),
|
|
3133
|
+
(0, import_operators.switchMap)((agentId) => {
|
|
3134
|
+
const client = this.ctx.client;
|
|
3135
|
+
return client.conversations(agentId).pipe(
|
|
3136
|
+
(0, import_operators.take)(1),
|
|
3137
|
+
(0, import_operators.switchMap)((list) => {
|
|
3138
|
+
const latest = list?.[0];
|
|
3139
|
+
if (!latest) return import_rxjs.EMPTY;
|
|
3140
|
+
return client.agent(agentId).conversation(latest.id).history().pipe(
|
|
3141
|
+
(0, import_operators.mergeMap)(
|
|
3142
|
+
(detail) => (0, import_rxjs.from)([
|
|
3143
|
+
historyLoaded({ agentId, detail }),
|
|
3144
|
+
...detail.answering ? [resume({ agentId, conversationId: detail.id, afterSeq: detail.lastSeq ?? 0 })] : []
|
|
3145
|
+
])
|
|
3146
|
+
)
|
|
3147
|
+
);
|
|
3148
|
+
}),
|
|
3149
|
+
(0, import_operators.catchError)(fail)
|
|
3150
|
+
);
|
|
3151
|
+
})
|
|
3152
|
+
)
|
|
3153
|
+
);
|
|
3154
|
+
/**
|
|
3155
|
+
* One run at a time: a sent message or a resumed answer, its events as
|
|
3156
|
+
* actions until done / error, cancelled by stop, another agent or a new
|
|
3157
|
+
* conversation.
|
|
3158
|
+
*/
|
|
3159
|
+
this.run$ = (0, import_redux_store.createEffect)()(
|
|
3160
|
+
(action$) => (0, import_rxjs.merge)(
|
|
3161
|
+
action$.pipe(
|
|
3162
|
+
(0, import_redux_store.ofType)(sendMessage),
|
|
3163
|
+
(0, import_operators.map)(({ payload: payload2 }) => {
|
|
3164
|
+
const { agentId, conversationId, text } = payload2;
|
|
3165
|
+
const c9 = this.conversation(agentId, conversationId);
|
|
3166
|
+
return { c: c9, events: c9.send(text) };
|
|
3167
|
+
})
|
|
3168
|
+
),
|
|
3169
|
+
action$.pipe(
|
|
3170
|
+
(0, import_redux_store.ofType)(resume),
|
|
3171
|
+
(0, import_operators.map)(({ payload: payload2 }) => {
|
|
3172
|
+
const { agentId, conversationId, afterSeq } = payload2;
|
|
3173
|
+
const c9 = this.conversation(agentId, conversationId);
|
|
3174
|
+
return { c: c9, events: c9.events(afterSeq) };
|
|
3175
|
+
})
|
|
3176
|
+
)
|
|
3177
|
+
).pipe(
|
|
3178
|
+
(0, import_operators.switchMap)(
|
|
3179
|
+
({ c: c9, events }) => this.follow$(c9, events).pipe(
|
|
3180
|
+
(0, import_operators.takeUntil)(
|
|
3181
|
+
(0, import_rxjs.merge)(
|
|
3182
|
+
action$.pipe((0, import_redux_store.ofType)(stop)),
|
|
3183
|
+
action$.pipe((0, import_redux_store.ofType)(pickAgent)),
|
|
3184
|
+
action$.pipe((0, import_redux_store.ofType)(newConversation))
|
|
3185
|
+
)
|
|
3186
|
+
),
|
|
3187
|
+
(0, import_operators.endWith)(runEnded())
|
|
3188
|
+
)
|
|
3189
|
+
)
|
|
3190
|
+
)
|
|
3191
|
+
);
|
|
3192
|
+
/** Tell the server to stop the answer. */
|
|
3193
|
+
this.abort$ = (0, import_redux_store.createEffect)()(
|
|
3194
|
+
(action$) => action$.pipe(
|
|
3195
|
+
(0, import_redux_store.ofType)(stop),
|
|
3196
|
+
(0, import_operators.mergeMap)(({ payload: payload2 }) => {
|
|
3197
|
+
const { agentId, conversationId } = payload2;
|
|
3198
|
+
if (!conversationId || !this.ctx.client) return import_rxjs.EMPTY;
|
|
3199
|
+
return this.conversation(agentId, conversationId).abort().pipe(
|
|
3200
|
+
(0, import_operators.ignoreElements)(),
|
|
3201
|
+
(0, import_operators.catchError)(() => import_rxjs.EMPTY)
|
|
3202
|
+
);
|
|
3203
|
+
})
|
|
3204
|
+
)
|
|
3205
|
+
);
|
|
3206
|
+
/** Failures also reach the page as an `error` event. */
|
|
3207
|
+
this.failures$ = (0, import_redux_store.createEffect)()(
|
|
3208
|
+
(action$) => action$.pipe(
|
|
3209
|
+
(0, import_redux_store.ofType)(failed),
|
|
3210
|
+
(0, import_operators.tap)(({ payload: payload2 }) => this.ctx.emit("error", { code: payload2 })),
|
|
3211
|
+
(0, import_operators.ignoreElements)()
|
|
3212
|
+
)
|
|
3213
|
+
);
|
|
3214
|
+
}
|
|
3215
|
+
conversation(agentId, conversationId) {
|
|
3216
|
+
return this.ctx.client.agent(agentId).conversation(conversationId ?? void 0);
|
|
3217
|
+
}
|
|
3218
|
+
follow$(c9, events) {
|
|
3219
|
+
const announced = /* @__PURE__ */ new Set();
|
|
3220
|
+
return events.pipe(
|
|
3221
|
+
(0, import_operators.takeWhile)((e16) => e16.type !== "done" && e16.type !== "error", true),
|
|
3222
|
+
(0, import_operators.tap)((e16) => {
|
|
3223
|
+
if (e16.type === "message" && e16.data?.role === "assistant" && !announced.has(e16.data.id)) {
|
|
3224
|
+
announced.add(e16.data.id);
|
|
3225
|
+
this.ctx.emit("answer", { text: e16.data.text, agent: c9.agent, conversationId: e16.conversationId });
|
|
3226
|
+
}
|
|
3227
|
+
if (e16.type === "error") this.ctx.emit("error", { code: e16.data?.code ?? "internal" });
|
|
3228
|
+
}),
|
|
3229
|
+
(0, import_operators.map)((e16) => agentEvent(e16)),
|
|
3230
|
+
(0, import_operators.catchError)(fail)
|
|
3231
|
+
);
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
|
|
3235
|
+
// src/store/chat-state.ts
|
|
3236
|
+
var initialChatState = {
|
|
3237
|
+
shown: false,
|
|
3238
|
+
agents: [],
|
|
3239
|
+
agentId: null,
|
|
3240
|
+
conversationId: null,
|
|
3241
|
+
messages: [],
|
|
3242
|
+
answering: false,
|
|
3243
|
+
notice: null
|
|
3244
|
+
};
|
|
3245
|
+
function toMessage(m4) {
|
|
3246
|
+
const tools = (m4.toolCalls ?? []).map((c9) => c9?.name).filter((n11) => !!n11);
|
|
3247
|
+
return { id: m4.id, role: m4.role, text: m4.text ?? "", tools: Array.from(new Set(tools)) };
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
// src/store/chat-reducer.ts
|
|
3251
|
+
var LOCAL_ID = /^local:/;
|
|
3252
|
+
var empty = { conversationId: null, messages: [], answering: false, notice: null };
|
|
3253
|
+
var chatReducer = reducer(
|
|
3254
|
+
initialChatState,
|
|
3255
|
+
on(shown, (s9, { payload: payload2 }) => s9.shown || !payload2 ? s9 : { ...s9, shown: true }),
|
|
3256
|
+
on(connecting, (s9) => ({ ...s9, notice: { kind: "busy", what: "connecting" } })),
|
|
3257
|
+
on(failed, (s9, { payload: payload2 }) => ({
|
|
3258
|
+
...s9,
|
|
3259
|
+
answering: false,
|
|
3260
|
+
notice: { kind: "error", code: payload2 }
|
|
3261
|
+
})),
|
|
3262
|
+
on(verifying, (s9, { payload: payload2 }) => ({
|
|
3263
|
+
...s9,
|
|
3264
|
+
notice: payload2 ? { kind: "busy", what: "verifying" } : s9.notice?.kind === "busy" && s9.notice.what === "verifying" ? null : s9.notice
|
|
3265
|
+
})),
|
|
3266
|
+
on(agentsLoaded, (s9, { payload: payload2 }) => ({
|
|
3267
|
+
...s9,
|
|
3268
|
+
agents: payload2.agents,
|
|
3269
|
+
agentId: payload2.agentId,
|
|
3270
|
+
notice: payload2.agentId ? null : { kind: "error", code: "agent-unavailable" }
|
|
3271
|
+
})),
|
|
3272
|
+
on(pickAgent, (s9, { payload: payload2 }) => ({ ...s9, ...empty, agentId: payload2 })),
|
|
3273
|
+
on(
|
|
3274
|
+
historyLoaded,
|
|
3275
|
+
(s9, { payload: payload2 }) => payload2.agentId !== s9.agentId ? s9 : {
|
|
3276
|
+
...s9,
|
|
3277
|
+
conversationId: payload2.detail.id,
|
|
3278
|
+
messages: (payload2.detail.messages ?? []).map(toMessage),
|
|
3279
|
+
answering: !!payload2.detail.answering,
|
|
3280
|
+
notice: payload2.detail.answering ? { kind: "busy", what: "thinking" } : null
|
|
3281
|
+
}
|
|
3282
|
+
),
|
|
3283
|
+
on(newConversation, (s9) => ({ ...s9, ...empty })),
|
|
3284
|
+
on(sendMessage, (s9, { payload: payload2 }) => ({
|
|
3285
|
+
...s9,
|
|
3286
|
+
// shown at once; replaced by the stored copy when it arrives
|
|
3287
|
+
messages: [
|
|
3288
|
+
...s9.messages,
|
|
3289
|
+
{ id: `local:${s9.messages.length}`, role: "user", text: payload2.text, tools: [] }
|
|
3290
|
+
],
|
|
3291
|
+
answering: true,
|
|
3292
|
+
notice: { kind: "busy", what: "thinking" }
|
|
3293
|
+
})),
|
|
3294
|
+
on(agentEvent, (s9, { payload: payload2 }) => withEvent(s9, payload2)),
|
|
3295
|
+
on(runEnded, (s9) => ({
|
|
3296
|
+
...s9,
|
|
3297
|
+
answering: false,
|
|
3298
|
+
notice: s9.notice?.kind === "busy" ? null : s9.notice
|
|
3299
|
+
})),
|
|
3300
|
+
on(stop, (s9) => ({ ...s9, answering: false, notice: { kind: "info", what: "stopped" } }))
|
|
3301
|
+
);
|
|
3302
|
+
function withEvent(s9, event) {
|
|
3303
|
+
const conversationId = s9.conversationId ?? event.conversationId;
|
|
3304
|
+
if (event.conversationId !== conversationId) return s9;
|
|
3305
|
+
if (event.type === "error") {
|
|
3306
|
+
return { ...s9, conversationId, notice: { kind: "error", code: event.data?.code ?? "internal" } };
|
|
3307
|
+
}
|
|
3308
|
+
if (event.type !== "message" || !event.data?.id) return { ...s9, conversationId };
|
|
3309
|
+
const message = toMessage(event.data);
|
|
3310
|
+
if (s9.messages.some((m4) => m4.id === message.id)) return { ...s9, conversationId };
|
|
3311
|
+
const messages = [...s9.messages];
|
|
3312
|
+
const local = message.role === "user" ? messages.findIndex((m4) => LOCAL_ID.test(m4.id) && m4.text === message.text) : -1;
|
|
3313
|
+
if (local >= 0) messages[local] = message;
|
|
3314
|
+
else messages.push(message);
|
|
3315
|
+
return { ...s9, conversationId, messages };
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
// src/store/chat-store.ts
|
|
3319
|
+
var import_redux_store2 = __toESM(require_dist4());
|
|
3320
|
+
var import_rxjs2 = require("rxjs");
|
|
3321
|
+
var import_operators2 = require("rxjs/operators");
|
|
3322
|
+
var ChatStore = class {
|
|
3323
|
+
constructor(ctx, initial = {}) {
|
|
3324
|
+
this.destroy$ = new import_rxjs2.Subject();
|
|
3325
|
+
const effects = new ChatEffects(ctx);
|
|
3326
|
+
this.store = (0, import_redux_store2.createStore)({
|
|
3327
|
+
reducer$: (0, import_rxjs2.of)(chatReducer),
|
|
3328
|
+
initialState$: (0, import_rxjs2.of)({ ...initialChatState, ...initial }),
|
|
3329
|
+
// RULE: every effect must be listed here or it never runs.
|
|
3330
|
+
// connect$ LAST: it can start at once (an inline chat is shown from
|
|
3331
|
+
// the first state) and the others must already listen to its actions.
|
|
3332
|
+
epic$: (0, import_redux_store2.createEpicRegistry)(
|
|
3333
|
+
effects.select$,
|
|
3334
|
+
effects.run$,
|
|
3335
|
+
effects.abort$,
|
|
3336
|
+
effects.failures$,
|
|
3337
|
+
effects.connect$
|
|
3338
|
+
),
|
|
3339
|
+
destroy$: this.destroy$
|
|
3340
|
+
});
|
|
3341
|
+
this.state$ = this.store.state$.pipe((0, import_operators2.distinctUntilChanged)());
|
|
3342
|
+
}
|
|
3343
|
+
dispatch(action2) {
|
|
3344
|
+
this.store.dispatch(action2);
|
|
3345
|
+
}
|
|
3346
|
+
destroy() {
|
|
3347
|
+
this.destroy$.next();
|
|
3348
|
+
this.destroy$.complete();
|
|
3349
|
+
}
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
// src/strings.ts
|
|
3353
|
+
var en = {
|
|
3354
|
+
title: "Chat",
|
|
3355
|
+
open: "Open chat",
|
|
3356
|
+
close: "Close chat",
|
|
3357
|
+
newChat: "New conversation",
|
|
3358
|
+
placeholder: "Type a message",
|
|
3359
|
+
send: "Send",
|
|
3360
|
+
stop: "Stop",
|
|
3361
|
+
thinking: "Thinking",
|
|
3362
|
+
connecting: "Connecting",
|
|
3363
|
+
pickAgent: "Assistant",
|
|
3364
|
+
usedTools: "Used",
|
|
3365
|
+
verifying: "Checking that you are human",
|
|
3366
|
+
errors: {
|
|
3367
|
+
"limit-reached": "This conversation is full - start a new one.",
|
|
3368
|
+
"cap-reached": "The assistant is not available right now - try again later.",
|
|
3369
|
+
"agent-unavailable": "This assistant is not available.",
|
|
3370
|
+
"session-expired": "Your session ended - reload the page.",
|
|
3371
|
+
"credential-expired": "Please sign in again.",
|
|
3372
|
+
aborted: "Stopped.",
|
|
3373
|
+
internal: "Something went wrong - try again.",
|
|
3374
|
+
unauthorized: "This chat is not allowed here.",
|
|
3375
|
+
"bad-request": "That did not work - try again.",
|
|
3376
|
+
network: "No connection - try again.",
|
|
3377
|
+
default: "Something went wrong - try again."
|
|
3378
|
+
}
|
|
3379
|
+
};
|
|
3380
|
+
var bg = {
|
|
3381
|
+
title: "\u0427\u0430\u0442",
|
|
3382
|
+
open: "\u041E\u0442\u0432\u043E\u0440\u0438 \u0447\u0430\u0442\u0430",
|
|
3383
|
+
close: "\u0417\u0430\u0442\u0432\u043E\u0440\u0438 \u0447\u0430\u0442\u0430",
|
|
3384
|
+
newChat: "\u041D\u043E\u0432 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440",
|
|
3385
|
+
placeholder: "\u041D\u0430\u043F\u0438\u0448\u0435\u0442\u0435 \u0441\u044A\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
3386
|
+
send: "\u0418\u0437\u043F\u0440\u0430\u0442\u0438",
|
|
3387
|
+
stop: "\u0421\u043F\u0440\u0438",
|
|
3388
|
+
thinking: "\u041C\u0438\u0441\u043B\u044F",
|
|
3389
|
+
connecting: "\u0421\u0432\u044A\u0440\u0437\u0432\u0430\u043D\u0435",
|
|
3390
|
+
pickAgent: "\u0410\u0441\u0438\u0441\u0442\u0435\u043D\u0442",
|
|
3391
|
+
usedTools: "\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u043D\u043E",
|
|
3392
|
+
verifying: "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430, \u0447\u0435 \u0441\u0442\u0435 \u0447\u043E\u0432\u0435\u043A",
|
|
3393
|
+
errors: {
|
|
3394
|
+
"limit-reached": "\u0420\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u044A\u0442 \u0435 \u043F\u044A\u043B\u0435\u043D - \u0437\u0430\u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u043D\u043E\u0432.",
|
|
3395
|
+
"cap-reached": "\u0410\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u044A\u0442 \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u044A\u043F\u0435\u043D \u0432 \u043C\u043E\u043C\u0435\u043D\u0442\u0430 - \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043F\u043E-\u043A\u044A\u0441\u043D\u043E.",
|
|
3396
|
+
"agent-unavailable": "\u0422\u043E\u0437\u0438 \u0430\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u044A\u043F\u0435\u043D.",
|
|
3397
|
+
"session-expired": "\u0421\u0435\u0441\u0438\u044F\u0442\u0430 \u0438\u0437\u0442\u0435\u0447\u0435 - \u043F\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u0442\u0430.",
|
|
3398
|
+
"credential-expired": "\u041C\u043E\u043B\u044F, \u0432\u043B\u0435\u0437\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E.",
|
|
3399
|
+
aborted: "\u0421\u043F\u0440\u044F\u043D\u043E.",
|
|
3400
|
+
internal: "\u041D\u0435\u0449\u043E \u0441\u0435 \u043E\u0431\u044A\u0440\u043A\u0430 - \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E.",
|
|
3401
|
+
unauthorized: "\u0422\u043E\u0437\u0438 \u0447\u0430\u0442 \u043D\u0435 \u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D \u0442\u0443\u043A.",
|
|
3402
|
+
"bad-request": "\u041D\u0435 \u0441\u0435 \u043F\u043E\u043B\u0443\u0447\u0438 - \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E.",
|
|
3403
|
+
network: "\u041D\u044F\u043C\u0430 \u0432\u0440\u044A\u0437\u043A\u0430 - \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E.",
|
|
3404
|
+
default: "\u041D\u0435\u0449\u043E \u0441\u0435 \u043E\u0431\u044A\u0440\u043A\u0430 - \u043E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E."
|
|
3405
|
+
}
|
|
3406
|
+
};
|
|
3407
|
+
var LOCALES = { en, bg };
|
|
3408
|
+
function stringsFor(locale, overrides = {}) {
|
|
3409
|
+
const lang = String(locale || "en").toLowerCase().split("-")[0];
|
|
3410
|
+
const base = LOCALES[lang] ?? en;
|
|
3411
|
+
return {
|
|
3412
|
+
...base,
|
|
3413
|
+
...overrides,
|
|
3414
|
+
errors: { ...base.errors, ...overrides.errors ?? {} }
|
|
3415
|
+
};
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
// src/styles.ts
|
|
3419
|
+
var STYLES = `
|
|
3420
|
+
:host {
|
|
3421
|
+
--_accent: var(--lf-chat-accent, #4f46e5);
|
|
3422
|
+
--_accent-fg: var(--lf-chat-accent-fg, #ffffff);
|
|
3423
|
+
--_bg: var(--lf-chat-bg, #ffffff);
|
|
3424
|
+
--_fg: var(--lf-chat-fg, #111827);
|
|
3425
|
+
--_muted: var(--lf-chat-muted, #6b7280);
|
|
3426
|
+
--_border: var(--lf-chat-border, #e5e7eb);
|
|
3427
|
+
--_bot-bg: var(--lf-chat-bot-bg, #f3f4f6);
|
|
3428
|
+
--_bot-fg: var(--lf-chat-bot-fg, var(--_fg));
|
|
3429
|
+
--_user-bg: var(--lf-chat-user-bg, var(--_accent));
|
|
3430
|
+
--_user-fg: var(--lf-chat-user-fg, var(--_accent-fg));
|
|
3431
|
+
--_error: var(--lf-chat-error, #b91c1c);
|
|
3432
|
+
--_radius: var(--lf-chat-radius, 12px);
|
|
3433
|
+
--_font: var(--lf-chat-font, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
|
|
3434
|
+
--_width: var(--lf-chat-width, 380px);
|
|
3435
|
+
--_height: var(--lf-chat-height, min(640px, calc(100vh - 120px)));
|
|
3436
|
+
--_offset: var(--lf-chat-offset, 20px);
|
|
3437
|
+
--_z: var(--lf-chat-z-index, 2147483000);
|
|
3438
|
+
--_launcher: var(--lf-chat-launcher-size, 56px);
|
|
3439
|
+
--_shadow: var(--lf-chat-shadow, 0 12px 40px rgba(0, 0, 0, 0.18));
|
|
3440
|
+
font-family: var(--_font);
|
|
3441
|
+
color: var(--_fg);
|
|
3442
|
+
font-size: 15px;
|
|
3443
|
+
line-height: 1.45;
|
|
3444
|
+
}
|
|
3445
|
+
:host([theme='dark']) {
|
|
3446
|
+
--_bg: var(--lf-chat-bg, #111827);
|
|
3447
|
+
--_fg: var(--lf-chat-fg, #f9fafb);
|
|
3448
|
+
--_muted: var(--lf-chat-muted, #9ca3af);
|
|
3449
|
+
--_border: var(--lf-chat-border, #374151);
|
|
3450
|
+
--_bot-bg: var(--lf-chat-bot-bg, #1f2937);
|
|
3451
|
+
--_error: var(--lf-chat-error, #f87171);
|
|
3452
|
+
}
|
|
3453
|
+
* { box-sizing: border-box; }
|
|
3454
|
+
[hidden] { display: none !important; }
|
|
3455
|
+
button { font: inherit; cursor: pointer; }
|
|
3456
|
+
|
|
3457
|
+
.launcher {
|
|
3458
|
+
position: fixed;
|
|
3459
|
+
bottom: var(--_offset);
|
|
3460
|
+
right: var(--_offset);
|
|
3461
|
+
width: var(--_launcher);
|
|
3462
|
+
height: var(--_launcher);
|
|
3463
|
+
border-radius: 50%;
|
|
3464
|
+
border: 0;
|
|
3465
|
+
background: var(--_accent);
|
|
3466
|
+
color: var(--_accent-fg);
|
|
3467
|
+
box-shadow: var(--_shadow);
|
|
3468
|
+
z-index: var(--_z);
|
|
3469
|
+
display: grid;
|
|
3470
|
+
place-items: center;
|
|
3471
|
+
}
|
|
3472
|
+
:host([position='bottom-left']) .launcher { right: auto; left: var(--_offset); }
|
|
3473
|
+
.launcher svg { width: 26px; height: 26px; }
|
|
3474
|
+
|
|
3475
|
+
.panel {
|
|
3476
|
+
display: flex;
|
|
3477
|
+
flex-direction: column;
|
|
3478
|
+
background: var(--_bg);
|
|
3479
|
+
color: var(--_fg);
|
|
3480
|
+
border: 1px solid var(--_border);
|
|
3481
|
+
border-radius: var(--_radius);
|
|
3482
|
+
overflow: hidden;
|
|
3483
|
+
}
|
|
3484
|
+
:host(:not([mode])) .panel,
|
|
3485
|
+
:host([mode='drawer']) .panel {
|
|
3486
|
+
position: fixed;
|
|
3487
|
+
bottom: calc(var(--_offset) + var(--_launcher) + 12px);
|
|
3488
|
+
right: var(--_offset);
|
|
3489
|
+
width: var(--_width);
|
|
3490
|
+
height: var(--_height);
|
|
3491
|
+
box-shadow: var(--_shadow);
|
|
3492
|
+
z-index: var(--_z);
|
|
3493
|
+
}
|
|
3494
|
+
:host([position='bottom-left']) .panel { right: auto; left: var(--_offset); }
|
|
3495
|
+
:host([mode='inline']) .panel { width: 100%; height: var(--lf-chat-height, 560px); }
|
|
3496
|
+
:host([mode='fullscreen']) .panel {
|
|
3497
|
+
position: fixed; inset: 0; border-radius: 0; border: 0; z-index: var(--_z);
|
|
3498
|
+
}
|
|
3499
|
+
@media (max-width: 640px) {
|
|
3500
|
+
:host(:not([mode])) .panel,
|
|
3501
|
+
:host([mode='drawer']) .panel {
|
|
3502
|
+
inset: 0; width: auto; height: auto; border-radius: 0; border: 0;
|
|
3503
|
+
height: 100dvh;
|
|
3504
|
+
}
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
header {
|
|
3508
|
+
display: flex;
|
|
3509
|
+
align-items: center;
|
|
3510
|
+
gap: 8px;
|
|
3511
|
+
padding: 10px 12px;
|
|
3512
|
+
border-bottom: 1px solid var(--_border);
|
|
3513
|
+
}
|
|
3514
|
+
header .title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3515
|
+
header select {
|
|
3516
|
+
font: inherit; color: inherit; background: transparent;
|
|
3517
|
+
border: 1px solid var(--_border); border-radius: 8px; padding: 4px 6px; max-width: 45%;
|
|
3518
|
+
}
|
|
3519
|
+
.icon {
|
|
3520
|
+
border: 0; background: transparent; color: var(--_muted);
|
|
3521
|
+
width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
|
|
3522
|
+
}
|
|
3523
|
+
.icon:hover, .icon:focus-visible { background: var(--_bot-bg); color: var(--_fg); }
|
|
3524
|
+
.icon svg { width: 18px; height: 18px; }
|
|
3525
|
+
:host([mode='inline']) .close { display: none; }
|
|
3526
|
+
|
|
3527
|
+
.messages {
|
|
3528
|
+
flex: 1;
|
|
3529
|
+
overflow-y: auto;
|
|
3530
|
+
padding: 14px 12px;
|
|
3531
|
+
display: flex;
|
|
3532
|
+
flex-direction: column;
|
|
3533
|
+
gap: 10px;
|
|
3534
|
+
scrollbar-width: thin;
|
|
3535
|
+
}
|
|
3536
|
+
.msg { max-width: 85%; padding: 8px 12px; border-radius: var(--_radius); overflow-wrap: anywhere; }
|
|
3537
|
+
.msg.user { align-self: flex-end; background: var(--_user-bg); color: var(--_user-fg); white-space: pre-wrap; }
|
|
3538
|
+
.msg.assistant { align-self: flex-start; background: var(--_bot-bg); color: var(--_bot-fg); }
|
|
3539
|
+
.msg p { margin: 0 0 6px; }
|
|
3540
|
+
.msg p:last-child { margin-bottom: 0; }
|
|
3541
|
+
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 20px; }
|
|
3542
|
+
.msg pre { margin: 6px 0; padding: 8px; overflow-x: auto; border-radius: 8px; background: rgba(0,0,0,0.06); font-size: 13px; }
|
|
3543
|
+
.msg code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
|
|
3544
|
+
.msg a { color: inherit; }
|
|
3545
|
+
.tools { font-size: 12px; color: var(--_muted); margin-top: 4px; }
|
|
3546
|
+
|
|
3547
|
+
.welcome { color: var(--_muted); }
|
|
3548
|
+
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
3549
|
+
.suggestions button {
|
|
3550
|
+
border: 1px solid var(--_border); background: transparent; color: var(--_fg);
|
|
3551
|
+
border-radius: 999px; padding: 6px 10px; font-size: 13px; text-align: left;
|
|
3552
|
+
}
|
|
3553
|
+
.suggestions button:hover, .suggestions button:focus-visible { border-color: var(--_accent); }
|
|
3554
|
+
|
|
3555
|
+
.status { font-size: 13px; color: var(--_muted); padding: 0 12px 6px; min-height: 0; }
|
|
3556
|
+
.status.error { color: var(--_error); }
|
|
3557
|
+
.dots::after { content: '...'; animation: dots 1.2s steps(4, end) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
|
|
3558
|
+
@keyframes dots { from { width: 0; } to { width: 1.2em; } }
|
|
3559
|
+
@media (prefers-reduced-motion: reduce) { .dots::after { animation: none; } }
|
|
3560
|
+
|
|
3561
|
+
.turnstile { padding: 0 12px 6px; }
|
|
3562
|
+
.turnstile iframe { border: 0; width: 100%; height: 70px; }
|
|
3563
|
+
|
|
3564
|
+
form {
|
|
3565
|
+
display: flex;
|
|
3566
|
+
gap: 8px;
|
|
3567
|
+
padding: 10px 12px;
|
|
3568
|
+
border-top: 1px solid var(--_border);
|
|
3569
|
+
align-items: flex-end;
|
|
3570
|
+
}
|
|
3571
|
+
textarea {
|
|
3572
|
+
flex: 1;
|
|
3573
|
+
resize: none;
|
|
3574
|
+
font: inherit;
|
|
3575
|
+
color: inherit;
|
|
3576
|
+
background: transparent;
|
|
3577
|
+
border: 1px solid var(--_border);
|
|
3578
|
+
border-radius: 10px;
|
|
3579
|
+
padding: 8px 10px;
|
|
3580
|
+
max-height: 140px;
|
|
3581
|
+
min-height: 40px;
|
|
3582
|
+
}
|
|
3583
|
+
textarea:focus-visible { outline: 2px solid var(--_accent); outline-offset: 0; border-color: transparent; }
|
|
3584
|
+
.send {
|
|
3585
|
+
border: 0; border-radius: 10px; background: var(--_accent); color: var(--_accent-fg);
|
|
3586
|
+
padding: 0 14px; height: 40px; font-weight: 600;
|
|
3587
|
+
}
|
|
3588
|
+
.send:disabled { opacity: 0.5; cursor: default; }
|
|
3589
|
+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
3590
|
+
`;
|
|
3591
|
+
|
|
3592
|
+
// src/turnstile.ts
|
|
3593
|
+
var HOSTED_TURNSTILE_URL = "https://lambforge.com/agent-turnstile.html";
|
|
3594
|
+
var SCRIPT = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";
|
|
3595
|
+
var TIMEOUT_MS = 12e4;
|
|
3596
|
+
var loading = null;
|
|
3597
|
+
function loadTurnstile(doc) {
|
|
3598
|
+
const win = doc.defaultView;
|
|
3599
|
+
if (win?.turnstile) return Promise.resolve(win.turnstile);
|
|
3600
|
+
if (!loading) {
|
|
3601
|
+
loading = new Promise((resolve, reject) => {
|
|
3602
|
+
const s9 = doc.createElement("script");
|
|
3603
|
+
s9.src = SCRIPT;
|
|
3604
|
+
s9.async = true;
|
|
3605
|
+
s9.onload = () => win.turnstile ? resolve(win.turnstile) : reject(new Error("turnstile did not load"));
|
|
3606
|
+
s9.onerror = () => {
|
|
3607
|
+
loading = null;
|
|
3608
|
+
reject(new Error("turnstile did not load"));
|
|
3609
|
+
};
|
|
3610
|
+
doc.head.append(s9);
|
|
3611
|
+
});
|
|
3612
|
+
}
|
|
3613
|
+
return loading;
|
|
3614
|
+
}
|
|
3615
|
+
function turnstileToken(opts) {
|
|
3616
|
+
const doc = opts.host.ownerDocument;
|
|
3617
|
+
if (opts.sitekey) {
|
|
3618
|
+
return loadTurnstile(doc).then(
|
|
3619
|
+
(api) => new Promise((resolve, reject) => {
|
|
3620
|
+
const box = doc.createElement("div");
|
|
3621
|
+
opts.host.append(box);
|
|
3622
|
+
let id;
|
|
3623
|
+
const end = () => {
|
|
3624
|
+
try {
|
|
3625
|
+
if (id) api.remove(id);
|
|
3626
|
+
} catch {
|
|
3627
|
+
}
|
|
3628
|
+
box.remove();
|
|
3629
|
+
};
|
|
3630
|
+
id = api.render(box, {
|
|
3631
|
+
sitekey: opts.sitekey,
|
|
3632
|
+
appearance: "interaction-only",
|
|
3633
|
+
callback: (token) => {
|
|
3634
|
+
end();
|
|
3635
|
+
resolve(token);
|
|
3636
|
+
},
|
|
3637
|
+
"error-callback": () => {
|
|
3638
|
+
end();
|
|
3639
|
+
reject(new Error("turnstile failed"));
|
|
3640
|
+
}
|
|
3641
|
+
});
|
|
3642
|
+
})
|
|
3643
|
+
);
|
|
3644
|
+
}
|
|
3645
|
+
const url = new URL(opts.hostedUrl || HOSTED_TURNSTILE_URL);
|
|
3646
|
+
const win = doc.defaultView;
|
|
3647
|
+
url.searchParams.set("origin", win.location.origin);
|
|
3648
|
+
return new Promise((resolve, reject) => {
|
|
3649
|
+
const frame = doc.createElement("iframe");
|
|
3650
|
+
frame.title = "Bot check";
|
|
3651
|
+
frame.src = url.href;
|
|
3652
|
+
const timer = setTimeout(() => done(new Error("turnstile timed out")), TIMEOUT_MS);
|
|
3653
|
+
const onMessage = (ev) => {
|
|
3654
|
+
if (ev.origin !== url.origin || ev.source !== frame.contentWindow) return;
|
|
3655
|
+
const data = ev.data;
|
|
3656
|
+
if (data?.type !== "lambforge-turnstile") return;
|
|
3657
|
+
if (data.token) done(null, data.token);
|
|
3658
|
+
else done(new Error(data.error || "turnstile failed"));
|
|
3659
|
+
};
|
|
3660
|
+
const done = (err, token) => {
|
|
3661
|
+
clearTimeout(timer);
|
|
3662
|
+
win.removeEventListener("message", onMessage);
|
|
3663
|
+
frame.remove();
|
|
3664
|
+
if (err) reject(err);
|
|
3665
|
+
else resolve(token);
|
|
3666
|
+
};
|
|
3667
|
+
win.addEventListener("message", onMessage);
|
|
3668
|
+
opts.host.append(frame);
|
|
3669
|
+
});
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
// src/element.ts
|
|
3673
|
+
var TAG = "lambforge-agent-chat";
|
|
3674
|
+
var ICON_CHAT = import_lit_html19.svg`<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>`;
|
|
3675
|
+
var ICON_CLOSE = import_lit_html19.svg`<path d="M18 6 6 18M6 6l12 12"/>`;
|
|
3676
|
+
var ICON_NEW = import_lit_html19.svg`<path d="M12 5v14M5 12h14"/>`;
|
|
3677
|
+
var icon = (paths) => import_lit_html19.html`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${paths}</svg>`;
|
|
3678
|
+
var LambforgeAgentChat = class extends import_lit_html19.LitElement {
|
|
3679
|
+
constructor() {
|
|
3680
|
+
super(...arguments);
|
|
3681
|
+
this.open = false;
|
|
3682
|
+
this.mode = "drawer";
|
|
3683
|
+
this.position = "bottom-right";
|
|
3684
|
+
this.theme = "light";
|
|
3685
|
+
this.agent = "";
|
|
3686
|
+
this.agents = "";
|
|
3687
|
+
this.locale = "";
|
|
3688
|
+
this.heading = "";
|
|
3689
|
+
this.url = "";
|
|
3690
|
+
this.publishableKey = "";
|
|
3691
|
+
this.tokenUrl = "";
|
|
3692
|
+
this.turnstileSitekey = "";
|
|
3693
|
+
this.turnstileUrl = "";
|
|
3694
|
+
this.strings = {};
|
|
3695
|
+
this.lastCount = 0;
|
|
3696
|
+
}
|
|
3697
|
+
get shown() {
|
|
3698
|
+
return this.mode !== "drawer" || this.open;
|
|
3699
|
+
}
|
|
3700
|
+
get t() {
|
|
3701
|
+
return stringsFor(
|
|
3702
|
+
this.locale || this.ownerDocument.documentElement.lang || "en",
|
|
3703
|
+
this.strings
|
|
3704
|
+
);
|
|
3705
|
+
}
|
|
3706
|
+
/** Cold: <r-renderer> subscribes once; the store lives as long as that. */
|
|
3707
|
+
connect() {
|
|
3708
|
+
return (0, import_rxjs3.defer)(() => {
|
|
3709
|
+
const store = new ChatStore(
|
|
3710
|
+
{
|
|
3711
|
+
client: this.resolveClient(),
|
|
3712
|
+
agent: this.agent,
|
|
3713
|
+
agents: this.agents.split(",").map((s9) => s9.trim()).filter(Boolean),
|
|
3714
|
+
emit: (type, detail) => this.emit(type, detail)
|
|
3715
|
+
},
|
|
3716
|
+
{ shown: this.shown }
|
|
3717
|
+
);
|
|
3718
|
+
this.store = store;
|
|
3719
|
+
return store.state$.pipe(
|
|
3720
|
+
(0, import_operators3.finalize)(() => {
|
|
3721
|
+
store.destroy();
|
|
3722
|
+
if (this.store === store) this.store = void 0;
|
|
3723
|
+
})
|
|
3724
|
+
);
|
|
3725
|
+
});
|
|
3726
|
+
}
|
|
3727
|
+
dispatch(action2) {
|
|
3728
|
+
this.store?.dispatch(action2);
|
|
3729
|
+
}
|
|
3730
|
+
OnUpdate() {
|
|
3731
|
+
if (this.shown) this.dispatch(shown(true));
|
|
3732
|
+
}
|
|
3733
|
+
resolveClient() {
|
|
3734
|
+
if (this.client) return this.client;
|
|
3735
|
+
const url = this.url || void 0;
|
|
3736
|
+
if (this.getToken) {
|
|
3737
|
+
const source = this.getToken;
|
|
3738
|
+
this.client = new import_agents.AgentClient({ url, getToken: () => source() });
|
|
3739
|
+
} else if (this.tokenUrl) {
|
|
3740
|
+
const tokenUrl = this.tokenUrl;
|
|
3741
|
+
this.client = new import_agents.AgentClient({
|
|
3742
|
+
url,
|
|
3743
|
+
getToken: () => fetch(tokenUrl, {
|
|
3744
|
+
credentials: "include",
|
|
3745
|
+
headers: { accept: "application/json" }
|
|
3746
|
+
}).then((r7) => {
|
|
3747
|
+
if (!r7.ok) throw new Error(`token-url answered ${r7.status}`);
|
|
3748
|
+
return r7.json();
|
|
3749
|
+
})
|
|
3750
|
+
});
|
|
3751
|
+
} else if (this.publishableKey) {
|
|
3752
|
+
this.client = new import_agents.AgentClient({
|
|
3753
|
+
url,
|
|
3754
|
+
anonymous: {
|
|
3755
|
+
publishableKey: this.publishableKey,
|
|
3756
|
+
turnstileToken: () => this.verifyHuman()
|
|
3757
|
+
}
|
|
3758
|
+
});
|
|
3759
|
+
} else {
|
|
3760
|
+
console.error(`[${TAG}] give it a session: token-url, publishable-key, .getToken or .client`);
|
|
3761
|
+
return null;
|
|
3762
|
+
}
|
|
3763
|
+
return this.client;
|
|
3764
|
+
}
|
|
3765
|
+
verifyHuman() {
|
|
3766
|
+
this.dispatch(verifying(true));
|
|
3767
|
+
return this.turnstileBox().then(
|
|
3768
|
+
(host) => turnstileToken({
|
|
3769
|
+
host,
|
|
3770
|
+
sitekey: this.turnstileSitekey || null,
|
|
3771
|
+
hostedUrl: this.turnstileUrl || null
|
|
3772
|
+
})
|
|
3773
|
+
).finally(() => this.dispatch(verifying(false)));
|
|
3774
|
+
}
|
|
3775
|
+
/** The (rendered) box the challenge goes into. */
|
|
3776
|
+
async turnstileBox() {
|
|
3777
|
+
for (let i12 = 0; i12 < 100; i12++) {
|
|
3778
|
+
const box = this.shadowRoot?.querySelector(".turnstile");
|
|
3779
|
+
if (box) return box;
|
|
3780
|
+
await new Promise((r7) => setTimeout(r7, 20));
|
|
3781
|
+
}
|
|
3782
|
+
throw new Error("turnstile: the chat is not rendered");
|
|
3783
|
+
}
|
|
3784
|
+
// ------------------------------------------------------------ actions
|
|
3785
|
+
/** Send a message to the selected agent. */
|
|
3786
|
+
send(text) {
|
|
3787
|
+
return ([state]) => {
|
|
3788
|
+
const clean = String(text ?? "").trim();
|
|
3789
|
+
if (!clean || state.answering || !state.agentId) return;
|
|
3790
|
+
this.dispatch(
|
|
3791
|
+
sendMessage({ agentId: state.agentId, conversationId: state.conversationId, text: clean })
|
|
3792
|
+
);
|
|
3793
|
+
};
|
|
3794
|
+
}
|
|
3795
|
+
/** Stop the answer in progress. */
|
|
3796
|
+
stopAnswer() {
|
|
3797
|
+
return ([state]) => {
|
|
3798
|
+
if (!state.agentId) return;
|
|
3799
|
+
this.dispatch(stop({ agentId: state.agentId, conversationId: state.conversationId }));
|
|
3800
|
+
};
|
|
3801
|
+
}
|
|
3802
|
+
pick(agentId) {
|
|
3803
|
+
this.dispatch(pickAgent(agentId));
|
|
3804
|
+
}
|
|
3805
|
+
startOver() {
|
|
3806
|
+
this.dispatch(newConversation());
|
|
3807
|
+
this.focusInput();
|
|
3808
|
+
}
|
|
3809
|
+
setOpen(open) {
|
|
3810
|
+
if (open === this.open) return;
|
|
3811
|
+
this.open = open;
|
|
3812
|
+
this.emit("open-change", { open });
|
|
3813
|
+
if (open) this.focusInput();
|
|
3814
|
+
else this.shadowRoot?.querySelector(".launcher")?.focus();
|
|
3815
|
+
}
|
|
3816
|
+
focusInput() {
|
|
3817
|
+
this.updateComplete.then(
|
|
3818
|
+
() => requestAnimationFrame(
|
|
3819
|
+
() => this.shadowRoot?.querySelector("textarea")?.focus()
|
|
3820
|
+
)
|
|
3821
|
+
);
|
|
3822
|
+
}
|
|
3823
|
+
submit(ev, state) {
|
|
3824
|
+
ev.preventDefault();
|
|
3825
|
+
if (state.answering) return this.stopAnswer()([state]);
|
|
3826
|
+
const input = this.shadowRoot?.querySelector("textarea");
|
|
3827
|
+
if (!input) return;
|
|
3828
|
+
this.send(input.value)([state]);
|
|
3829
|
+
input.value = "";
|
|
3830
|
+
this.autosize(input);
|
|
3831
|
+
}
|
|
3832
|
+
onInputKey(ev, state) {
|
|
3833
|
+
if (ev.key === "Enter" && !ev.shiftKey && !ev.isComposing) {
|
|
3834
|
+
ev.preventDefault();
|
|
3835
|
+
if (!state.answering) this.submit(ev, state);
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
autosize(input) {
|
|
3839
|
+
input.style.height = "auto";
|
|
3840
|
+
input.style.height = `${Math.min(input.scrollHeight, 140)}px`;
|
|
3841
|
+
}
|
|
3842
|
+
/** Escape closes the drawer; Tab stays inside the open dialog. */
|
|
3843
|
+
onPanelKey(ev) {
|
|
3844
|
+
if (ev.key === "Escape" && this.mode === "drawer") {
|
|
3845
|
+
ev.stopPropagation();
|
|
3846
|
+
this.setOpen(false);
|
|
3847
|
+
return;
|
|
3848
|
+
}
|
|
3849
|
+
if (ev.key !== "Tab" || this.mode === "inline") return;
|
|
3850
|
+
const panel = this.shadowRoot?.querySelector(".panel");
|
|
3851
|
+
const focusable = Array.from(
|
|
3852
|
+
panel?.querySelectorAll("button:not([disabled]), select, textarea, a[href]") ?? []
|
|
3853
|
+
).filter((el) => !el.closest("[hidden]"));
|
|
3854
|
+
if (!focusable.length) return;
|
|
3855
|
+
const first = focusable[0];
|
|
3856
|
+
const last = focusable[focusable.length - 1];
|
|
3857
|
+
const active = this.shadowRoot?.activeElement;
|
|
3858
|
+
if (ev.shiftKey && active === first) {
|
|
3859
|
+
ev.preventDefault();
|
|
3860
|
+
last.focus();
|
|
3861
|
+
} else if (!ev.shiftKey && active === last) {
|
|
3862
|
+
ev.preventDefault();
|
|
3863
|
+
first.focus();
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
emit(type, detail) {
|
|
3867
|
+
this.dispatchEvent(new CustomEvent(type, { detail, bubbles: true, composed: true }));
|
|
3868
|
+
}
|
|
3869
|
+
// --------------------------------------------------------------- view
|
|
3870
|
+
noticeText(notice) {
|
|
3871
|
+
if (!notice) return "";
|
|
3872
|
+
const t9 = this.t;
|
|
3873
|
+
if (notice.kind === "busy") return t9[notice.what];
|
|
3874
|
+
if (notice.kind === "info") return t9.errors.aborted;
|
|
3875
|
+
return t9.errors[notice.code] ?? t9.errors.default;
|
|
3876
|
+
}
|
|
3877
|
+
view(state) {
|
|
3878
|
+
const t9 = this.t;
|
|
3879
|
+
const drawer = this.mode === "drawer";
|
|
3880
|
+
const agent = state.agents.find((a5) => a5.id === state.agentId) ?? null;
|
|
3881
|
+
const title = this.heading || agent?.name || t9.title;
|
|
3882
|
+
const notice = state.notice;
|
|
3883
|
+
if (state.messages.length !== this.lastCount) {
|
|
3884
|
+
this.lastCount = state.messages.length;
|
|
3885
|
+
this.updateComplete.then(() => requestAnimationFrame(() => this.scrollDown()));
|
|
3886
|
+
}
|
|
3887
|
+
return import_lit_html19.html`
|
|
3888
|
+
<button
|
|
3889
|
+
class="launcher"
|
|
3890
|
+
part="launcher"
|
|
3891
|
+
type="button"
|
|
3892
|
+
aria-haspopup="dialog"
|
|
3893
|
+
aria-expanded=${String(this.open)}
|
|
3894
|
+
aria-label=${t9.open}
|
|
3895
|
+
?hidden=${!drawer}
|
|
3896
|
+
@click=${() => this.setOpen(!this.open)}
|
|
3897
|
+
>
|
|
3898
|
+
<slot name="launcher">${icon(ICON_CHAT)}</slot>
|
|
3899
|
+
</button>
|
|
3900
|
+
<section
|
|
3901
|
+
class="panel"
|
|
3902
|
+
part="panel"
|
|
3903
|
+
role="dialog"
|
|
3904
|
+
aria-label=${title}
|
|
3905
|
+
aria-modal=${String(drawer)}
|
|
3906
|
+
?hidden=${!this.shown}
|
|
3907
|
+
@keydown=${(ev) => this.onPanelKey(ev)}
|
|
3908
|
+
>
|
|
3909
|
+
<header part="header">
|
|
3910
|
+
<span class="title">${title}</span>
|
|
3911
|
+
<select
|
|
3912
|
+
class="picker"
|
|
3913
|
+
part="picker"
|
|
3914
|
+
aria-label=${t9.pickAgent}
|
|
3915
|
+
?hidden=${state.agents.length < 2}
|
|
3916
|
+
@change=${(ev) => this.pick(ev.target.value)}
|
|
3917
|
+
>
|
|
3918
|
+
${state.agents.map(
|
|
3919
|
+
(a5) => import_lit_html19.html`<option value=${a5.id} ?selected=${a5.id === state.agentId}>${a5.name}</option>`
|
|
3920
|
+
)}
|
|
3921
|
+
</select>
|
|
3922
|
+
<button class="icon new" part="new" type="button" title=${t9.newChat} aria-label=${t9.newChat} @click=${() => this.startOver()}>
|
|
3923
|
+
${icon(ICON_NEW)}
|
|
3924
|
+
</button>
|
|
3925
|
+
<button class="icon close" part="close" type="button" title=${t9.close} aria-label=${t9.close} @click=${() => this.setOpen(false)}>
|
|
3926
|
+
${icon(ICON_CLOSE)}
|
|
3927
|
+
</button>
|
|
3928
|
+
</header>
|
|
3929
|
+
<div class="messages" part="messages" role="log" aria-live="polite" aria-relevant="additions">
|
|
3930
|
+
${state.messages.length ? state.messages.map((m4) => this.bubble(m4)) : this.intro(state)}
|
|
3931
|
+
</div>
|
|
3932
|
+
<div class="turnstile" ?hidden=${notice?.kind !== "busy" || notice.what !== "verifying"}></div>
|
|
3933
|
+
<div
|
|
3934
|
+
class="status ${notice?.kind === "error" ? "error" : ""} ${notice?.kind === "busy" ? "dots" : ""}"
|
|
3935
|
+
part="status"
|
|
3936
|
+
role="status"
|
|
3937
|
+
>${this.noticeText(notice)}</div>
|
|
3938
|
+
<form part="composer" @submit=${(ev) => this.submit(ev, state)}>
|
|
3939
|
+
<label class="sr-only" for="lf-input">${t9.placeholder}</label>
|
|
3940
|
+
<textarea
|
|
3941
|
+
id="lf-input"
|
|
3942
|
+
part="input"
|
|
3943
|
+
rows="1"
|
|
3944
|
+
placeholder=${t9.placeholder}
|
|
3945
|
+
@keydown=${(ev) => this.onInputKey(ev, state)}
|
|
3946
|
+
@input=${(ev) => this.autosize(ev.target)}
|
|
3947
|
+
></textarea>
|
|
3948
|
+
<button class="send" part="send" type="submit" aria-label=${state.answering ? t9.stop : t9.send}>
|
|
3949
|
+
${state.answering ? t9.stop : t9.send}
|
|
3950
|
+
</button>
|
|
3951
|
+
</form>
|
|
3952
|
+
</section>
|
|
3953
|
+
`;
|
|
3954
|
+
}
|
|
3955
|
+
bubble(m4) {
|
|
3956
|
+
if (m4.role === "user") {
|
|
3957
|
+
return import_lit_html19.html`<div class="msg user" part="message user">${m4.text}</div>`;
|
|
3958
|
+
}
|
|
3959
|
+
return import_lit_html19.html`<div class="msg assistant" part="message assistant">
|
|
3960
|
+
${renderMarkdown(m4.text)}
|
|
3961
|
+
${m4.tools.length ? import_lit_html19.html`<div class="tools">${this.t.usedTools}: ${m4.tools.join(", ")}</div>` : ""}
|
|
3962
|
+
</div>`;
|
|
3963
|
+
}
|
|
3964
|
+
intro(state) {
|
|
3965
|
+
const agent = state.agents.find((a5) => a5.id === state.agentId);
|
|
3966
|
+
if (!agent?.welcome && !agent?.suggestions?.length) return "";
|
|
3967
|
+
return import_lit_html19.html`
|
|
3968
|
+
${agent.welcome ? import_lit_html19.html`<div class="msg assistant welcome">${renderMarkdown(agent.welcome)}</div>` : ""}
|
|
3969
|
+
${agent.suggestions?.length ? import_lit_html19.html`<div class="suggestions">
|
|
3970
|
+
${agent.suggestions.map(
|
|
3971
|
+
(s9) => import_lit_html19.html`<button type="button" part="suggestion" @click=${() => this.send(s9)([state])}>${s9}</button>`
|
|
3972
|
+
)}
|
|
3973
|
+
</div>` : ""}
|
|
3974
|
+
`;
|
|
3975
|
+
}
|
|
3976
|
+
scrollDown() {
|
|
3977
|
+
const m4 = this.shadowRoot?.querySelector(".messages");
|
|
3978
|
+
if (m4) m4.scrollTop = m4.scrollHeight;
|
|
3979
|
+
}
|
|
3980
|
+
};
|
|
3981
|
+
__decorateClass([
|
|
3982
|
+
(0, import_lit_html19.property)({ type: Boolean, reflect: true })
|
|
3983
|
+
], LambforgeAgentChat.prototype, "open", 2);
|
|
3984
|
+
__decorateClass([
|
|
3985
|
+
(0, import_lit_html19.property)({ reflect: true })
|
|
3986
|
+
], LambforgeAgentChat.prototype, "mode", 2);
|
|
3987
|
+
__decorateClass([
|
|
3988
|
+
(0, import_lit_html19.property)({ reflect: true })
|
|
3989
|
+
], LambforgeAgentChat.prototype, "position", 2);
|
|
3990
|
+
__decorateClass([
|
|
3991
|
+
(0, import_lit_html19.property)({ reflect: true })
|
|
3992
|
+
], LambforgeAgentChat.prototype, "theme", 2);
|
|
3993
|
+
__decorateClass([
|
|
3994
|
+
(0, import_lit_html19.property)()
|
|
3995
|
+
], LambforgeAgentChat.prototype, "agent", 2);
|
|
3996
|
+
__decorateClass([
|
|
3997
|
+
(0, import_lit_html19.property)()
|
|
3998
|
+
], LambforgeAgentChat.prototype, "agents", 2);
|
|
3999
|
+
__decorateClass([
|
|
4000
|
+
(0, import_lit_html19.property)()
|
|
4001
|
+
], LambforgeAgentChat.prototype, "locale", 2);
|
|
4002
|
+
__decorateClass([
|
|
4003
|
+
(0, import_lit_html19.property)({ attribute: "title" })
|
|
4004
|
+
], LambforgeAgentChat.prototype, "heading", 2);
|
|
4005
|
+
__decorateClass([
|
|
4006
|
+
(0, import_lit_html19.property)()
|
|
4007
|
+
], LambforgeAgentChat.prototype, "url", 2);
|
|
4008
|
+
__decorateClass([
|
|
4009
|
+
(0, import_lit_html19.property)({ attribute: "publishable-key" })
|
|
4010
|
+
], LambforgeAgentChat.prototype, "publishableKey", 2);
|
|
4011
|
+
__decorateClass([
|
|
4012
|
+
(0, import_lit_html19.property)({ attribute: "token-url" })
|
|
4013
|
+
], LambforgeAgentChat.prototype, "tokenUrl", 2);
|
|
4014
|
+
__decorateClass([
|
|
4015
|
+
(0, import_lit_html19.property)({ attribute: "turnstile-sitekey" })
|
|
4016
|
+
], LambforgeAgentChat.prototype, "turnstileSitekey", 2);
|
|
4017
|
+
__decorateClass([
|
|
4018
|
+
(0, import_lit_html19.property)({ attribute: "turnstile-url" })
|
|
4019
|
+
], LambforgeAgentChat.prototype, "turnstileUrl", 2);
|
|
4020
|
+
__decorateClass([
|
|
4021
|
+
(0, import_lit_html19.property)({ attribute: false })
|
|
4022
|
+
], LambforgeAgentChat.prototype, "client", 2);
|
|
4023
|
+
__decorateClass([
|
|
4024
|
+
(0, import_lit_html19.property)({ attribute: false })
|
|
4025
|
+
], LambforgeAgentChat.prototype, "getToken", 2);
|
|
4026
|
+
__decorateClass([
|
|
4027
|
+
(0, import_lit_html19.property)({ attribute: false })
|
|
4028
|
+
], LambforgeAgentChat.prototype, "strings", 2);
|
|
4029
|
+
LambforgeAgentChat = __decorateClass([
|
|
4030
|
+
(0, import_component.Component)({
|
|
4031
|
+
Settings: { selector: TAG, styles: [(0, import_lit_html19.unsafeCSS)(STYLES)] },
|
|
4032
|
+
Loading: () => import_lit_html19.html``,
|
|
4033
|
+
Error: () => import_lit_html19.html``,
|
|
4034
|
+
State() {
|
|
4035
|
+
return this.connect();
|
|
4036
|
+
},
|
|
4037
|
+
Render: () => function(state) {
|
|
4038
|
+
return this.view(state);
|
|
4039
|
+
}
|
|
4040
|
+
})
|
|
4041
|
+
], LambforgeAgentChat);
|
|
4042
|
+
/*! Bundled license information:
|
|
4043
|
+
|
|
4044
|
+
lit-html/lit-html.js:
|
|
4045
|
+
lit-html/directive.js:
|
|
4046
|
+
lit-html/async-directive.js:
|
|
4047
|
+
lit-element/experimental-hydrate-support.js:
|
|
4048
|
+
@lit/reactive-element/reactive-element.js:
|
|
4049
|
+
lit-element/lit-element.js:
|
|
4050
|
+
@lit/reactive-element/decorators/base.js:
|
|
4051
|
+
@lit/reactive-element/decorators/custom-element.js:
|
|
4052
|
+
@lit/reactive-element/decorators/property.js:
|
|
4053
|
+
@lit/reactive-element/decorators/state.js:
|
|
4054
|
+
@lit/reactive-element/decorators/event-options.js:
|
|
4055
|
+
@lit/reactive-element/decorators/query.js:
|
|
4056
|
+
@lit/reactive-element/decorators/query-all.js:
|
|
4057
|
+
@lit/reactive-element/decorators/query-async.js:
|
|
4058
|
+
@lit/reactive-element/decorators/query-assigned-nodes.js:
|
|
4059
|
+
lit-element/index.js:
|
|
4060
|
+
lit-html/directives/async-replace.js:
|
|
4061
|
+
lit-html/directives/async-append.js:
|
|
4062
|
+
lit-html/directives/cache.js:
|
|
4063
|
+
lit-html/directives/repeat.js:
|
|
4064
|
+
lit-html/directives/unsafe-html.js:
|
|
4065
|
+
lit-html/directives/unsafe-svg.js:
|
|
4066
|
+
lit-html/directives/until.js:
|
|
4067
|
+
(**
|
|
4068
|
+
* @license
|
|
4069
|
+
* Copyright 2017 Google LLC
|
|
4070
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4071
|
+
*)
|
|
4072
|
+
|
|
4073
|
+
lit-html/directive-helpers.js:
|
|
4074
|
+
lit-html/directives/live.js:
|
|
4075
|
+
lit-html/directives/ref.js:
|
|
4076
|
+
lit-html/directives/template-content.js:
|
|
4077
|
+
(**
|
|
4078
|
+
* @license
|
|
4079
|
+
* Copyright 2020 Google LLC
|
|
4080
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4081
|
+
*)
|
|
4082
|
+
|
|
4083
|
+
lit-html/experimental-hydrate.js:
|
|
4084
|
+
@lit/reactive-element/css-tag.js:
|
|
4085
|
+
(**
|
|
4086
|
+
* @license
|
|
4087
|
+
* Copyright 2019 Google LLC
|
|
4088
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4089
|
+
*)
|
|
4090
|
+
|
|
4091
|
+
lit-html/polyfill-support.js:
|
|
4092
|
+
(**
|
|
4093
|
+
* @license
|
|
4094
|
+
* Copyright 2017 Google LLC
|
|
4095
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4096
|
+
*)
|
|
4097
|
+
|
|
4098
|
+
@lit/reactive-element/decorators/query-assigned-elements.js:
|
|
4099
|
+
lit-html/directives/private-async-helpers.js:
|
|
4100
|
+
lit-html/directives/choose.js:
|
|
4101
|
+
lit-html/directives/join.js:
|
|
4102
|
+
lit-html/directives/keyed.js:
|
|
4103
|
+
lit-html/directives/map.js:
|
|
4104
|
+
lit-html/directives/range.js:
|
|
4105
|
+
lit-html/directives/when.js:
|
|
4106
|
+
(**
|
|
4107
|
+
* @license
|
|
4108
|
+
* Copyright 2021 Google LLC
|
|
4109
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4110
|
+
*)
|
|
4111
|
+
|
|
4112
|
+
lit-html/directives/class-map.js:
|
|
4113
|
+
lit-html/directives/guard.js:
|
|
4114
|
+
lit-html/directives/if-defined.js:
|
|
4115
|
+
lit-html/directives/style-map.js:
|
|
4116
|
+
(**
|
|
4117
|
+
* @license
|
|
4118
|
+
* Copyright 2018 Google LLC
|
|
4119
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4120
|
+
*)
|
|
4121
|
+
*/
|
|
4122
|
+
//# sourceMappingURL=index.cjs.map
|