@appcues/web-sdk 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +56 -0
- package/build/.gitkeep +0 -0
- package/build/checklist.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/container.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/debugger.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/index.BlOpB57-.js +14442 -0
- package/build/index.DqdOZEH7.js +2609 -0
- package/build/index.npm.DOLrucyP.js +332 -0
- package/build/index.npm.d.ts +5 -0
- package/build/index.npm.d.ts.map +1 -0
- package/build/index.npm.js +5 -0
- package/build/modal-step-legacy-render.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/modal.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/open-builder.CsZ0R4-M.js +9167 -0
- package/build/satisfaction-survey.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/test-mode.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/tooltip.dffb871bc48a1e5009ee3967ba8b1407e63ac68b.css +1 -0
- package/build/types.d.ts +295 -0
- package/build/types.d.ts.map +1 -0
- package/build/utils/constants.d.ts +150 -0
- package/build/utils/constants.d.ts.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,2609 @@
|
|
|
1
|
+
import { c as vt, g as gi, o as mi, a as $i, n as fe, b as bi } from "./index.BlOpB57-.js";
|
|
2
|
+
const gt = window, ie = gt.ShadowRoot && (gt.ShadyCSS === void 0 || gt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, We = Symbol(), ve = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
let yi = class {
|
|
4
|
+
constructor(t, e, s) {
|
|
5
|
+
if (this._$cssResult$ = !0, s !== We) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
6
|
+
this.cssText = t, this.t = e;
|
|
7
|
+
}
|
|
8
|
+
get styleSheet() {
|
|
9
|
+
let t = this.o;
|
|
10
|
+
const e = this.t;
|
|
11
|
+
if (ie && t === void 0) {
|
|
12
|
+
const s = e !== void 0 && e.length === 1;
|
|
13
|
+
s && (t = ve.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && ve.set(e, t));
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return this.cssText;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const _i = (i) => new yi(typeof i == "string" ? i : i + "", void 0, We), wi = (i, t) => {
|
|
22
|
+
ie ? i.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet)) : t.forEach(((e) => {
|
|
23
|
+
const s = document.createElement("style"), r = gt.litNonce;
|
|
24
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
25
|
+
}));
|
|
26
|
+
}, ge = ie ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
27
|
+
let e = "";
|
|
28
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
29
|
+
return _i(e);
|
|
30
|
+
})(i) : i;
|
|
31
|
+
var Ht;
|
|
32
|
+
const bt = window, me = bt.trustedTypes, Ai = me ? me.emptyScript : "", $e = bt.reactiveElementPolyfillSupport, Jt = { toAttribute(i, t) {
|
|
33
|
+
switch (t) {
|
|
34
|
+
case Boolean:
|
|
35
|
+
i = i ? Ai : null;
|
|
36
|
+
break;
|
|
37
|
+
case Object:
|
|
38
|
+
case Array:
|
|
39
|
+
i = i == null ? i : JSON.stringify(i);
|
|
40
|
+
}
|
|
41
|
+
return i;
|
|
42
|
+
}, fromAttribute(i, t) {
|
|
43
|
+
let e = i;
|
|
44
|
+
switch (t) {
|
|
45
|
+
case Boolean:
|
|
46
|
+
e = i !== null;
|
|
47
|
+
break;
|
|
48
|
+
case Number:
|
|
49
|
+
e = i === null ? null : Number(i);
|
|
50
|
+
break;
|
|
51
|
+
case Object:
|
|
52
|
+
case Array:
|
|
53
|
+
try {
|
|
54
|
+
e = JSON.parse(i);
|
|
55
|
+
} catch {
|
|
56
|
+
e = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return e;
|
|
60
|
+
} }, Ze = (i, t) => t !== i && (t == t || i == i), Mt = { attribute: !0, type: String, converter: Jt, reflect: !1, hasChanged: Ze }, Ft = "finalized";
|
|
61
|
+
let it = class extends HTMLElement {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
64
|
+
}
|
|
65
|
+
static addInitializer(t) {
|
|
66
|
+
var e;
|
|
67
|
+
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
|
68
|
+
}
|
|
69
|
+
static get observedAttributes() {
|
|
70
|
+
this.finalize();
|
|
71
|
+
const t = [];
|
|
72
|
+
return this.elementProperties.forEach(((e, s) => {
|
|
73
|
+
const r = this._$Ep(s, e);
|
|
74
|
+
r !== void 0 && (this._$Ev.set(r, s), t.push(r));
|
|
75
|
+
})), t;
|
|
76
|
+
}
|
|
77
|
+
static createProperty(t, e = Mt) {
|
|
78
|
+
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
79
|
+
const s = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, s, e);
|
|
80
|
+
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
static getPropertyDescriptor(t, e, s) {
|
|
84
|
+
return { get() {
|
|
85
|
+
return this[e];
|
|
86
|
+
}, set(r) {
|
|
87
|
+
const o = this[t];
|
|
88
|
+
this[e] = r, this.requestUpdate(t, o, s);
|
|
89
|
+
}, configurable: !0, enumerable: !0 };
|
|
90
|
+
}
|
|
91
|
+
static getPropertyOptions(t) {
|
|
92
|
+
return this.elementProperties.get(t) || Mt;
|
|
93
|
+
}
|
|
94
|
+
static finalize() {
|
|
95
|
+
if (this.hasOwnProperty(Ft)) return !1;
|
|
96
|
+
this[Ft] = !0;
|
|
97
|
+
const t = Object.getPrototypeOf(this);
|
|
98
|
+
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
99
|
+
const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
100
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
101
|
+
}
|
|
102
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
103
|
+
}
|
|
104
|
+
static finalizeStyles(t) {
|
|
105
|
+
const e = [];
|
|
106
|
+
if (Array.isArray(t)) {
|
|
107
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
108
|
+
for (const r of s) e.unshift(ge(r));
|
|
109
|
+
} else t !== void 0 && e.push(ge(t));
|
|
110
|
+
return e;
|
|
111
|
+
}
|
|
112
|
+
static _$Ep(t, e) {
|
|
113
|
+
const s = e.attribute;
|
|
114
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
115
|
+
}
|
|
116
|
+
_$Eu() {
|
|
117
|
+
var t;
|
|
118
|
+
this._$E_ = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach(((e) => e(this)));
|
|
119
|
+
}
|
|
120
|
+
addController(t) {
|
|
121
|
+
var e, s;
|
|
122
|
+
((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
|
|
123
|
+
}
|
|
124
|
+
removeController(t) {
|
|
125
|
+
var e;
|
|
126
|
+
(e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
127
|
+
}
|
|
128
|
+
_$Eg() {
|
|
129
|
+
this.constructor.elementProperties.forEach(((t, e) => {
|
|
130
|
+
this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
createRenderRoot() {
|
|
134
|
+
var t;
|
|
135
|
+
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
136
|
+
return wi(e, this.constructor.elementStyles), e;
|
|
137
|
+
}
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
var t;
|
|
140
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach(((e) => {
|
|
141
|
+
var s;
|
|
142
|
+
return (s = e.hostConnected) === null || s === void 0 ? void 0 : s.call(e);
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
enableUpdating(t) {
|
|
146
|
+
}
|
|
147
|
+
disconnectedCallback() {
|
|
148
|
+
var t;
|
|
149
|
+
(t = this._$ES) === null || t === void 0 || t.forEach(((e) => {
|
|
150
|
+
var s;
|
|
151
|
+
return (s = e.hostDisconnected) === null || s === void 0 ? void 0 : s.call(e);
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
attributeChangedCallback(t, e, s) {
|
|
155
|
+
this._$AK(t, s);
|
|
156
|
+
}
|
|
157
|
+
_$EO(t, e, s = Mt) {
|
|
158
|
+
var r;
|
|
159
|
+
const o = this.constructor._$Ep(t, s);
|
|
160
|
+
if (o !== void 0 && s.reflect === !0) {
|
|
161
|
+
const n = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : Jt).toAttribute(e, s.type);
|
|
162
|
+
this._$El = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$El = null;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
_$AK(t, e) {
|
|
166
|
+
var s;
|
|
167
|
+
const r = this.constructor, o = r._$Ev.get(t);
|
|
168
|
+
if (o !== void 0 && this._$El !== o) {
|
|
169
|
+
const n = r.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? n.converter : Jt;
|
|
170
|
+
this._$El = o, this[o] = l.fromAttribute(e, n.type), this._$El = null;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
requestUpdate(t, e, s) {
|
|
174
|
+
let r = !0;
|
|
175
|
+
t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || Ze)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
176
|
+
}
|
|
177
|
+
async _$Ej() {
|
|
178
|
+
this.isUpdatePending = !0;
|
|
179
|
+
try {
|
|
180
|
+
await this._$E_;
|
|
181
|
+
} catch (e) {
|
|
182
|
+
Promise.reject(e);
|
|
183
|
+
}
|
|
184
|
+
const t = this.scheduleUpdate();
|
|
185
|
+
return t != null && await t, !this.isUpdatePending;
|
|
186
|
+
}
|
|
187
|
+
scheduleUpdate() {
|
|
188
|
+
return this.performUpdate();
|
|
189
|
+
}
|
|
190
|
+
performUpdate() {
|
|
191
|
+
var t;
|
|
192
|
+
if (!this.isUpdatePending) return;
|
|
193
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach(((r, o) => this[o] = r)), this._$Ei = void 0);
|
|
194
|
+
let e = !1;
|
|
195
|
+
const s = this._$AL;
|
|
196
|
+
try {
|
|
197
|
+
e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach(((r) => {
|
|
198
|
+
var o;
|
|
199
|
+
return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
|
|
200
|
+
})), this.update(s)) : this._$Ek();
|
|
201
|
+
} catch (r) {
|
|
202
|
+
throw e = !1, this._$Ek(), r;
|
|
203
|
+
}
|
|
204
|
+
e && this._$AE(s);
|
|
205
|
+
}
|
|
206
|
+
willUpdate(t) {
|
|
207
|
+
}
|
|
208
|
+
_$AE(t) {
|
|
209
|
+
var e;
|
|
210
|
+
(e = this._$ES) === null || e === void 0 || e.forEach(((s) => {
|
|
211
|
+
var r;
|
|
212
|
+
return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
|
|
213
|
+
})), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
214
|
+
}
|
|
215
|
+
_$Ek() {
|
|
216
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
217
|
+
}
|
|
218
|
+
get updateComplete() {
|
|
219
|
+
return this.getUpdateComplete();
|
|
220
|
+
}
|
|
221
|
+
getUpdateComplete() {
|
|
222
|
+
return this._$E_;
|
|
223
|
+
}
|
|
224
|
+
shouldUpdate(t) {
|
|
225
|
+
return !0;
|
|
226
|
+
}
|
|
227
|
+
update(t) {
|
|
228
|
+
this._$EC !== void 0 && (this._$EC.forEach(((e, s) => this._$EO(s, this[s], e))), this._$EC = void 0), this._$Ek();
|
|
229
|
+
}
|
|
230
|
+
updated(t) {
|
|
231
|
+
}
|
|
232
|
+
firstUpdated(t) {
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
it[Ft] = !0, it.elementProperties = /* @__PURE__ */ new Map(), it.elementStyles = [], it.shadowRootOptions = { mode: "open" }, $e?.({ ReactiveElement: it }), ((Ht = bt.reactiveElementVersions) !== null && Ht !== void 0 ? Ht : bt.reactiveElementVersions = []).push("1.6.3");
|
|
236
|
+
var Rt;
|
|
237
|
+
const yt = window, F = yt.trustedTypes, be = F ? F.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Kt = "$lit$", U = `lit$${(Math.random() + "").slice(9)}$`, Je = "?" + U, xi = `<${Je}>`, z = document, lt = () => z.createComment(""), ht = (i) => i === null || typeof i != "object" && typeof i != "function", Fe = Array.isArray, Si = (i) => Fe(i) || typeof i?.[Symbol.iterator] == "function", zt = `[
|
|
238
|
+
\f\r]`, st = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ye = /-->/g, _e = />/g, O = RegExp(`>|${zt}(?:([^\\s"'>=/]+)(${zt}*=${zt}*(?:[^
|
|
239
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), we = /'/g, Ae = /"/g, Ke = /^(?:script|style|textarea|title)$/i, Xe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), _ = Xe(1), Ye = Xe(2), L = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), xe = /* @__PURE__ */ new WeakMap(), M = z.createTreeWalker(z, 129, null, !1);
|
|
240
|
+
function Ge(i, t) {
|
|
241
|
+
if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
242
|
+
return be !== void 0 ? be.createHTML(t) : t;
|
|
243
|
+
}
|
|
244
|
+
const Ei = (i, t) => {
|
|
245
|
+
const e = i.length - 1, s = [];
|
|
246
|
+
let r, o = t === 2 ? "<svg>" : "", n = st;
|
|
247
|
+
for (let l = 0; l < e; l++) {
|
|
248
|
+
const a = i[l];
|
|
249
|
+
let c, h, d = -1, u = 0;
|
|
250
|
+
for (; u < a.length && (n.lastIndex = u, h = n.exec(a), h !== null); ) u = n.lastIndex, n === st ? h[1] === "!--" ? n = ye : h[1] !== void 0 ? n = _e : h[2] !== void 0 ? (Ke.test(h[2]) && (r = RegExp("</" + h[2], "g")), n = O) : h[3] !== void 0 && (n = O) : n === O ? h[0] === ">" ? (n = r ?? st, d = -1) : h[1] === void 0 ? d = -2 : (d = n.lastIndex - h[2].length, c = h[1], n = h[3] === void 0 ? O : h[3] === '"' ? Ae : we) : n === Ae || n === we ? n = O : n === ye || n === _e ? n = st : (n = O, r = void 0);
|
|
251
|
+
const y = n === O && i[l + 1].startsWith("/>") ? " " : "";
|
|
252
|
+
o += n === st ? a + xi : d >= 0 ? (s.push(c), a.slice(0, d) + Kt + a.slice(d) + U + y) : a + U + (d === -2 ? (s.push(void 0), l) : y);
|
|
253
|
+
}
|
|
254
|
+
return [Ge(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
255
|
+
};
|
|
256
|
+
let Xt = class Qe {
|
|
257
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
258
|
+
let r;
|
|
259
|
+
this.parts = [];
|
|
260
|
+
let o = 0, n = 0;
|
|
261
|
+
const l = t.length - 1, a = this.parts, [c, h] = Ei(t, e);
|
|
262
|
+
if (this.el = Qe.createElement(c, s), M.currentNode = this.el.content, e === 2) {
|
|
263
|
+
const d = this.el.content, u = d.firstChild;
|
|
264
|
+
u.remove(), d.append(...u.childNodes);
|
|
265
|
+
}
|
|
266
|
+
for (; (r = M.nextNode()) !== null && a.length < l; ) {
|
|
267
|
+
if (r.nodeType === 1) {
|
|
268
|
+
if (r.hasAttributes()) {
|
|
269
|
+
const d = [];
|
|
270
|
+
for (const u of r.getAttributeNames()) if (u.endsWith(Kt) || u.startsWith(U)) {
|
|
271
|
+
const y = h[n++];
|
|
272
|
+
if (d.push(u), y !== void 0) {
|
|
273
|
+
const C = r.getAttribute(y.toLowerCase() + Kt).split(U), k = /([.?@])?(.*)/.exec(y);
|
|
274
|
+
a.push({ type: 1, index: o, name: k[2], strings: C, ctor: k[1] === "." ? ki : k[1] === "?" ? Ui : k[1] === "@" ? Ti : St });
|
|
275
|
+
} else a.push({ type: 6, index: o });
|
|
276
|
+
}
|
|
277
|
+
for (const u of d) r.removeAttribute(u);
|
|
278
|
+
}
|
|
279
|
+
if (Ke.test(r.tagName)) {
|
|
280
|
+
const d = r.textContent.split(U), u = d.length - 1;
|
|
281
|
+
if (u > 0) {
|
|
282
|
+
r.textContent = F ? F.emptyScript : "";
|
|
283
|
+
for (let y = 0; y < u; y++) r.append(d[y], lt()), M.nextNode(), a.push({ type: 2, index: ++o });
|
|
284
|
+
r.append(d[u], lt());
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
} else if (r.nodeType === 8) if (r.data === Je) a.push({ type: 2, index: o });
|
|
288
|
+
else {
|
|
289
|
+
let d = -1;
|
|
290
|
+
for (; (d = r.data.indexOf(U, d + 1)) !== -1; ) a.push({ type: 7, index: o }), d += U.length - 1;
|
|
291
|
+
}
|
|
292
|
+
o++;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
static createElement(t, e) {
|
|
296
|
+
const s = z.createElement("template");
|
|
297
|
+
return s.innerHTML = t, s;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function K(i, t, e = i, s) {
|
|
301
|
+
var r, o, n, l;
|
|
302
|
+
if (t === L) return t;
|
|
303
|
+
let a = s !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[s] : e._$Cl;
|
|
304
|
+
const c = ht(t) ? void 0 : t._$litDirective$;
|
|
305
|
+
return a?.constructor !== c && ((o = a?._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(i), a._$AT(i, e, s)), s !== void 0 ? ((n = (l = e)._$Co) !== null && n !== void 0 ? n : l._$Co = [])[s] = a : e._$Cl = a), a !== void 0 && (t = K(i, a._$AS(i, t.values), a, s)), t;
|
|
306
|
+
}
|
|
307
|
+
class Ci {
|
|
308
|
+
constructor(t, e) {
|
|
309
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
310
|
+
}
|
|
311
|
+
get parentNode() {
|
|
312
|
+
return this._$AM.parentNode;
|
|
313
|
+
}
|
|
314
|
+
get _$AU() {
|
|
315
|
+
return this._$AM._$AU;
|
|
316
|
+
}
|
|
317
|
+
u(t) {
|
|
318
|
+
var e;
|
|
319
|
+
const { el: { content: s }, parts: r } = this._$AD, o = ((e = t?.creationScope) !== null && e !== void 0 ? e : z).importNode(s, !0);
|
|
320
|
+
M.currentNode = o;
|
|
321
|
+
let n = M.nextNode(), l = 0, a = 0, c = r[0];
|
|
322
|
+
for (; c !== void 0; ) {
|
|
323
|
+
if (l === c.index) {
|
|
324
|
+
let h;
|
|
325
|
+
c.type === 2 ? h = new se(n, n.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (h = new Ni(n, this, t)), this._$AV.push(h), c = r[++a];
|
|
326
|
+
}
|
|
327
|
+
l !== c?.index && (n = M.nextNode(), l++);
|
|
328
|
+
}
|
|
329
|
+
return M.currentNode = z, o;
|
|
330
|
+
}
|
|
331
|
+
v(t) {
|
|
332
|
+
let e = 0;
|
|
333
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
let se = class ti {
|
|
337
|
+
constructor(t, e, s, r) {
|
|
338
|
+
var o;
|
|
339
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cp = (o = r?.isConnected) === null || o === void 0 || o;
|
|
340
|
+
}
|
|
341
|
+
get _$AU() {
|
|
342
|
+
var t, e;
|
|
343
|
+
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
|
|
344
|
+
}
|
|
345
|
+
get parentNode() {
|
|
346
|
+
let t = this._$AA.parentNode;
|
|
347
|
+
const e = this._$AM;
|
|
348
|
+
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
|
|
349
|
+
}
|
|
350
|
+
get startNode() {
|
|
351
|
+
return this._$AA;
|
|
352
|
+
}
|
|
353
|
+
get endNode() {
|
|
354
|
+
return this._$AB;
|
|
355
|
+
}
|
|
356
|
+
_$AI(t, e = this) {
|
|
357
|
+
t = K(this, t, e), ht(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== L && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Si(t) ? this.T(t) : this._(t);
|
|
358
|
+
}
|
|
359
|
+
k(t) {
|
|
360
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
361
|
+
}
|
|
362
|
+
$(t) {
|
|
363
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
364
|
+
}
|
|
365
|
+
_(t) {
|
|
366
|
+
this._$AH !== g && ht(this._$AH) ? this._$AA.nextSibling.data = t : this.$(z.createTextNode(t)), this._$AH = t;
|
|
367
|
+
}
|
|
368
|
+
g(t) {
|
|
369
|
+
var e;
|
|
370
|
+
const { values: s, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Xt.createElement(Ge(r.h, r.h[0]), this.options)), r);
|
|
371
|
+
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o) this._$AH.v(s);
|
|
372
|
+
else {
|
|
373
|
+
const n = new Ci(o, this), l = n.u(this.options);
|
|
374
|
+
n.v(s), this.$(l), this._$AH = n;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
_$AC(t) {
|
|
378
|
+
let e = xe.get(t.strings);
|
|
379
|
+
return e === void 0 && xe.set(t.strings, e = new Xt(t)), e;
|
|
380
|
+
}
|
|
381
|
+
T(t) {
|
|
382
|
+
Fe(this._$AH) || (this._$AH = [], this._$AR());
|
|
383
|
+
const e = this._$AH;
|
|
384
|
+
let s, r = 0;
|
|
385
|
+
for (const o of t) r === e.length ? e.push(s = new ti(this.k(lt()), this.k(lt()), this, this.options)) : s = e[r], s._$AI(o), r++;
|
|
386
|
+
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
387
|
+
}
|
|
388
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
389
|
+
var s;
|
|
390
|
+
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
391
|
+
const r = t.nextSibling;
|
|
392
|
+
t.remove(), t = r;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
setConnected(t) {
|
|
396
|
+
var e;
|
|
397
|
+
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
398
|
+
}
|
|
399
|
+
}, St = class {
|
|
400
|
+
constructor(t, e, s, r, o) {
|
|
401
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = g;
|
|
402
|
+
}
|
|
403
|
+
get tagName() {
|
|
404
|
+
return this.element.tagName;
|
|
405
|
+
}
|
|
406
|
+
get _$AU() {
|
|
407
|
+
return this._$AM._$AU;
|
|
408
|
+
}
|
|
409
|
+
_$AI(t, e = this, s, r) {
|
|
410
|
+
const o = this.strings;
|
|
411
|
+
let n = !1;
|
|
412
|
+
if (o === void 0) t = K(this, t, e, 0), n = !ht(t) || t !== this._$AH && t !== L, n && (this._$AH = t);
|
|
413
|
+
else {
|
|
414
|
+
const l = t;
|
|
415
|
+
let a, c;
|
|
416
|
+
for (t = o[0], a = 0; a < o.length - 1; a++) c = K(this, l[s + a], e, a), c === L && (c = this._$AH[a]), n || (n = !ht(c) || c !== this._$AH[a]), c === g ? t = g : t !== g && (t += (c ?? "") + o[a + 1]), this._$AH[a] = c;
|
|
417
|
+
}
|
|
418
|
+
n && !r && this.j(t);
|
|
419
|
+
}
|
|
420
|
+
j(t) {
|
|
421
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
422
|
+
}
|
|
423
|
+
}, ki = class extends St {
|
|
424
|
+
constructor() {
|
|
425
|
+
super(...arguments), this.type = 3;
|
|
426
|
+
}
|
|
427
|
+
j(t) {
|
|
428
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
const Pi = F ? F.emptyScript : "";
|
|
432
|
+
let Ui = class extends St {
|
|
433
|
+
constructor() {
|
|
434
|
+
super(...arguments), this.type = 4;
|
|
435
|
+
}
|
|
436
|
+
j(t) {
|
|
437
|
+
t && t !== g ? this.element.setAttribute(this.name, Pi) : this.element.removeAttribute(this.name);
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
class Ti extends St {
|
|
441
|
+
constructor(t, e, s, r, o) {
|
|
442
|
+
super(t, e, s, r, o), this.type = 5;
|
|
443
|
+
}
|
|
444
|
+
_$AI(t, e = this) {
|
|
445
|
+
var s;
|
|
446
|
+
if ((t = (s = K(this, t, e, 0)) !== null && s !== void 0 ? s : g) === L) return;
|
|
447
|
+
const r = this._$AH, o = t === g && r !== g || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== g && (r === g || o);
|
|
448
|
+
o && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
449
|
+
}
|
|
450
|
+
handleEvent(t) {
|
|
451
|
+
var e, s;
|
|
452
|
+
typeof this._$AH == "function" ? this._$AH.call((s = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && s !== void 0 ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
let Ni = class {
|
|
456
|
+
constructor(t, e, s) {
|
|
457
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
458
|
+
}
|
|
459
|
+
get _$AU() {
|
|
460
|
+
return this._$AM._$AU;
|
|
461
|
+
}
|
|
462
|
+
_$AI(t) {
|
|
463
|
+
K(this, t);
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
const Se = yt.litHtmlPolyfillSupport;
|
|
467
|
+
Se?.(Xt, se), ((Rt = yt.litHtmlVersions) !== null && Rt !== void 0 ? Rt : yt.litHtmlVersions = []).push("2.8.0");
|
|
468
|
+
const Ii = (i, t, e) => {
|
|
469
|
+
var s, r;
|
|
470
|
+
const o = (s = e?.renderBefore) !== null && s !== void 0 ? s : t;
|
|
471
|
+
let n = o._$litPart$;
|
|
472
|
+
if (n === void 0) {
|
|
473
|
+
const l = (r = e?.renderBefore) !== null && r !== void 0 ? r : null;
|
|
474
|
+
o._$litPart$ = n = new se(t.insertBefore(lt(), l), l, void 0, e ?? {});
|
|
475
|
+
}
|
|
476
|
+
return n._$AI(i), n;
|
|
477
|
+
};
|
|
478
|
+
const mt = window, re = mt.ShadowRoot && (mt.ShadyCSS === void 0 || mt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, oe = Symbol(), Ee = /* @__PURE__ */ new WeakMap();
|
|
479
|
+
let ei = class {
|
|
480
|
+
constructor(t, e, s) {
|
|
481
|
+
if (this._$cssResult$ = !0, s !== oe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
482
|
+
this.cssText = t, this.t = e;
|
|
483
|
+
}
|
|
484
|
+
get styleSheet() {
|
|
485
|
+
let t = this.o;
|
|
486
|
+
const e = this.t;
|
|
487
|
+
if (re && t === void 0) {
|
|
488
|
+
const s = e !== void 0 && e.length === 1;
|
|
489
|
+
s && (t = Ee.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Ee.set(e, t));
|
|
490
|
+
}
|
|
491
|
+
return t;
|
|
492
|
+
}
|
|
493
|
+
toString() {
|
|
494
|
+
return this.cssText;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
const Oi = (i) => new ei(typeof i == "string" ? i : i + "", void 0, oe), $ = (i, ...t) => {
|
|
498
|
+
const e = i.length === 1 ? i[0] : t.reduce(((s, r, o) => s + ((n) => {
|
|
499
|
+
if (n._$cssResult$ === !0) return n.cssText;
|
|
500
|
+
if (typeof n == "number") return n;
|
|
501
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
502
|
+
})(r) + i[o + 1]), i[0]);
|
|
503
|
+
return new ei(e, i, oe);
|
|
504
|
+
}, Hi = (i, t) => {
|
|
505
|
+
re ? i.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet)) : t.forEach(((e) => {
|
|
506
|
+
const s = document.createElement("style"), r = mt.litNonce;
|
|
507
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
508
|
+
}));
|
|
509
|
+
}, Ce = re ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
510
|
+
let e = "";
|
|
511
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
512
|
+
return Oi(e);
|
|
513
|
+
})(i) : i;
|
|
514
|
+
var Lt;
|
|
515
|
+
const _t = window, ke = _t.trustedTypes, Mi = ke ? ke.emptyScript : "", Pe = _t.reactiveElementPolyfillSupport, Yt = { toAttribute(i, t) {
|
|
516
|
+
switch (t) {
|
|
517
|
+
case Boolean:
|
|
518
|
+
i = i ? Mi : null;
|
|
519
|
+
break;
|
|
520
|
+
case Object:
|
|
521
|
+
case Array:
|
|
522
|
+
i = i == null ? i : JSON.stringify(i);
|
|
523
|
+
}
|
|
524
|
+
return i;
|
|
525
|
+
}, fromAttribute(i, t) {
|
|
526
|
+
let e = i;
|
|
527
|
+
switch (t) {
|
|
528
|
+
case Boolean:
|
|
529
|
+
e = i !== null;
|
|
530
|
+
break;
|
|
531
|
+
case Number:
|
|
532
|
+
e = i === null ? null : Number(i);
|
|
533
|
+
break;
|
|
534
|
+
case Object:
|
|
535
|
+
case Array:
|
|
536
|
+
try {
|
|
537
|
+
e = JSON.parse(i);
|
|
538
|
+
} catch {
|
|
539
|
+
e = null;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
return e;
|
|
543
|
+
} }, ii = (i, t) => t !== i && (t == t || i == i), jt = { attribute: !0, type: String, converter: Yt, reflect: !1, hasChanged: ii }, Gt = "finalized";
|
|
544
|
+
let J = class extends HTMLElement {
|
|
545
|
+
constructor() {
|
|
546
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
547
|
+
}
|
|
548
|
+
static addInitializer(t) {
|
|
549
|
+
var e;
|
|
550
|
+
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
|
551
|
+
}
|
|
552
|
+
static get observedAttributes() {
|
|
553
|
+
this.finalize();
|
|
554
|
+
const t = [];
|
|
555
|
+
return this.elementProperties.forEach(((e, s) => {
|
|
556
|
+
const r = this._$Ep(s, e);
|
|
557
|
+
r !== void 0 && (this._$Ev.set(r, s), t.push(r));
|
|
558
|
+
})), t;
|
|
559
|
+
}
|
|
560
|
+
static createProperty(t, e = jt) {
|
|
561
|
+
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
562
|
+
const s = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, s, e);
|
|
563
|
+
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
static getPropertyDescriptor(t, e, s) {
|
|
567
|
+
return { get() {
|
|
568
|
+
return this[e];
|
|
569
|
+
}, set(r) {
|
|
570
|
+
const o = this[t];
|
|
571
|
+
this[e] = r, this.requestUpdate(t, o, s);
|
|
572
|
+
}, configurable: !0, enumerable: !0 };
|
|
573
|
+
}
|
|
574
|
+
static getPropertyOptions(t) {
|
|
575
|
+
return this.elementProperties.get(t) || jt;
|
|
576
|
+
}
|
|
577
|
+
static finalize() {
|
|
578
|
+
if (this.hasOwnProperty(Gt)) return !1;
|
|
579
|
+
this[Gt] = !0;
|
|
580
|
+
const t = Object.getPrototypeOf(this);
|
|
581
|
+
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
582
|
+
const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
583
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
584
|
+
}
|
|
585
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
586
|
+
}
|
|
587
|
+
static finalizeStyles(t) {
|
|
588
|
+
const e = [];
|
|
589
|
+
if (Array.isArray(t)) {
|
|
590
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
591
|
+
for (const r of s) e.unshift(Ce(r));
|
|
592
|
+
} else t !== void 0 && e.push(Ce(t));
|
|
593
|
+
return e;
|
|
594
|
+
}
|
|
595
|
+
static _$Ep(t, e) {
|
|
596
|
+
const s = e.attribute;
|
|
597
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
598
|
+
}
|
|
599
|
+
_$Eu() {
|
|
600
|
+
var t;
|
|
601
|
+
this._$E_ = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach(((e) => e(this)));
|
|
602
|
+
}
|
|
603
|
+
addController(t) {
|
|
604
|
+
var e, s;
|
|
605
|
+
((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
|
|
606
|
+
}
|
|
607
|
+
removeController(t) {
|
|
608
|
+
var e;
|
|
609
|
+
(e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
610
|
+
}
|
|
611
|
+
_$Eg() {
|
|
612
|
+
this.constructor.elementProperties.forEach(((t, e) => {
|
|
613
|
+
this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
|
|
614
|
+
}));
|
|
615
|
+
}
|
|
616
|
+
createRenderRoot() {
|
|
617
|
+
var t;
|
|
618
|
+
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
619
|
+
return Hi(e, this.constructor.elementStyles), e;
|
|
620
|
+
}
|
|
621
|
+
connectedCallback() {
|
|
622
|
+
var t;
|
|
623
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach(((e) => {
|
|
624
|
+
var s;
|
|
625
|
+
return (s = e.hostConnected) === null || s === void 0 ? void 0 : s.call(e);
|
|
626
|
+
}));
|
|
627
|
+
}
|
|
628
|
+
enableUpdating(t) {
|
|
629
|
+
}
|
|
630
|
+
disconnectedCallback() {
|
|
631
|
+
var t;
|
|
632
|
+
(t = this._$ES) === null || t === void 0 || t.forEach(((e) => {
|
|
633
|
+
var s;
|
|
634
|
+
return (s = e.hostDisconnected) === null || s === void 0 ? void 0 : s.call(e);
|
|
635
|
+
}));
|
|
636
|
+
}
|
|
637
|
+
attributeChangedCallback(t, e, s) {
|
|
638
|
+
this._$AK(t, s);
|
|
639
|
+
}
|
|
640
|
+
_$EO(t, e, s = jt) {
|
|
641
|
+
var r;
|
|
642
|
+
const o = this.constructor._$Ep(t, s);
|
|
643
|
+
if (o !== void 0 && s.reflect === !0) {
|
|
644
|
+
const n = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : Yt).toAttribute(e, s.type);
|
|
645
|
+
this._$El = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$El = null;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
_$AK(t, e) {
|
|
649
|
+
var s;
|
|
650
|
+
const r = this.constructor, o = r._$Ev.get(t);
|
|
651
|
+
if (o !== void 0 && this._$El !== o) {
|
|
652
|
+
const n = r.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((s = n.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? n.converter : Yt;
|
|
653
|
+
this._$El = o, this[o] = l.fromAttribute(e, n.type), this._$El = null;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
requestUpdate(t, e, s) {
|
|
657
|
+
let r = !0;
|
|
658
|
+
t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || ii)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
659
|
+
}
|
|
660
|
+
async _$Ej() {
|
|
661
|
+
this.isUpdatePending = !0;
|
|
662
|
+
try {
|
|
663
|
+
await this._$E_;
|
|
664
|
+
} catch (e) {
|
|
665
|
+
Promise.reject(e);
|
|
666
|
+
}
|
|
667
|
+
const t = this.scheduleUpdate();
|
|
668
|
+
return t != null && await t, !this.isUpdatePending;
|
|
669
|
+
}
|
|
670
|
+
scheduleUpdate() {
|
|
671
|
+
return this.performUpdate();
|
|
672
|
+
}
|
|
673
|
+
performUpdate() {
|
|
674
|
+
var t;
|
|
675
|
+
if (!this.isUpdatePending) return;
|
|
676
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach(((r, o) => this[o] = r)), this._$Ei = void 0);
|
|
677
|
+
let e = !1;
|
|
678
|
+
const s = this._$AL;
|
|
679
|
+
try {
|
|
680
|
+
e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach(((r) => {
|
|
681
|
+
var o;
|
|
682
|
+
return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
|
|
683
|
+
})), this.update(s)) : this._$Ek();
|
|
684
|
+
} catch (r) {
|
|
685
|
+
throw e = !1, this._$Ek(), r;
|
|
686
|
+
}
|
|
687
|
+
e && this._$AE(s);
|
|
688
|
+
}
|
|
689
|
+
willUpdate(t) {
|
|
690
|
+
}
|
|
691
|
+
_$AE(t) {
|
|
692
|
+
var e;
|
|
693
|
+
(e = this._$ES) === null || e === void 0 || e.forEach(((s) => {
|
|
694
|
+
var r;
|
|
695
|
+
return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
|
|
696
|
+
})), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
697
|
+
}
|
|
698
|
+
_$Ek() {
|
|
699
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
700
|
+
}
|
|
701
|
+
get updateComplete() {
|
|
702
|
+
return this.getUpdateComplete();
|
|
703
|
+
}
|
|
704
|
+
getUpdateComplete() {
|
|
705
|
+
return this._$E_;
|
|
706
|
+
}
|
|
707
|
+
shouldUpdate(t) {
|
|
708
|
+
return !0;
|
|
709
|
+
}
|
|
710
|
+
update(t) {
|
|
711
|
+
this._$EC !== void 0 && (this._$EC.forEach(((e, s) => this._$EO(s, this[s], e))), this._$EC = void 0), this._$Ek();
|
|
712
|
+
}
|
|
713
|
+
updated(t) {
|
|
714
|
+
}
|
|
715
|
+
firstUpdated(t) {
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
J[Gt] = !0, J.elementProperties = /* @__PURE__ */ new Map(), J.elementStyles = [], J.shadowRootOptions = { mode: "open" }, Pe?.({ ReactiveElement: J }), ((Lt = _t.reactiveElementVersions) !== null && Lt !== void 0 ? Lt : _t.reactiveElementVersions = []).push("1.6.3");
|
|
719
|
+
var Bt, Dt;
|
|
720
|
+
let x = class extends J {
|
|
721
|
+
constructor() {
|
|
722
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
723
|
+
}
|
|
724
|
+
createRenderRoot() {
|
|
725
|
+
var t, e;
|
|
726
|
+
const s = super.createRenderRoot();
|
|
727
|
+
return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = s.firstChild), s;
|
|
728
|
+
}
|
|
729
|
+
update(t) {
|
|
730
|
+
const e = this.render();
|
|
731
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ii(e, this.renderRoot, this.renderOptions);
|
|
732
|
+
}
|
|
733
|
+
connectedCallback() {
|
|
734
|
+
var t;
|
|
735
|
+
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
736
|
+
}
|
|
737
|
+
disconnectedCallback() {
|
|
738
|
+
var t;
|
|
739
|
+
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
740
|
+
}
|
|
741
|
+
render() {
|
|
742
|
+
return L;
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
x.finalized = !0, x._$litElement$ = !0, (Bt = globalThis.litElementHydrateSupport) === null || Bt === void 0 || Bt.call(globalThis, { LitElement: x });
|
|
746
|
+
const Ue = globalThis.litElementPolyfillSupport;
|
|
747
|
+
Ue?.({ LitElement: x });
|
|
748
|
+
((Dt = globalThis.litElementVersions) !== null && Dt !== void 0 ? Dt : globalThis.litElementVersions = []).push("3.3.3");
|
|
749
|
+
const Ri = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
750
|
+
e.createProperty(t.key, i);
|
|
751
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
752
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
753
|
+
}, finisher(e) {
|
|
754
|
+
e.createProperty(t.key, i);
|
|
755
|
+
} }, zi = (i, t, e) => {
|
|
756
|
+
t.constructor.createProperty(e, i);
|
|
757
|
+
};
|
|
758
|
+
function v(i) {
|
|
759
|
+
return (t, e) => e !== void 0 ? zi(i, t, e) : Ri(i, t);
|
|
760
|
+
}
|
|
761
|
+
function N(i) {
|
|
762
|
+
return v({ ...i, state: !0 });
|
|
763
|
+
}
|
|
764
|
+
var qt;
|
|
765
|
+
((qt = window.HTMLSlotElement) === null || qt === void 0 ? void 0 : qt.prototype.assignedElements) != null;
|
|
766
|
+
const Li = { CHILD: 2 }, ji = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
767
|
+
let Bi = class {
|
|
768
|
+
constructor(t) {
|
|
769
|
+
}
|
|
770
|
+
get _$AU() {
|
|
771
|
+
return this._$AM._$AU;
|
|
772
|
+
}
|
|
773
|
+
_$AT(t, e, s) {
|
|
774
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
775
|
+
}
|
|
776
|
+
_$AS(t, e) {
|
|
777
|
+
return this.update(t, e);
|
|
778
|
+
}
|
|
779
|
+
update(t, e) {
|
|
780
|
+
return this.render(...e);
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
let Qt = class extends Bi {
|
|
784
|
+
constructor(t) {
|
|
785
|
+
if (super(t), this.et = g, t.type !== Li.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
786
|
+
}
|
|
787
|
+
render(t) {
|
|
788
|
+
if (t === g || t == null) return this.ft = void 0, this.et = t;
|
|
789
|
+
if (t === L) return t;
|
|
790
|
+
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
791
|
+
if (t === this.et) return this.ft;
|
|
792
|
+
this.et = t;
|
|
793
|
+
const e = [t];
|
|
794
|
+
return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
Qt.directiveName = "unsafeHTML", Qt.resultType = 1;
|
|
798
|
+
const Di = ji(Qt);
|
|
799
|
+
const $t = globalThis, ne = $t.ShadowRoot && ($t.ShadyCSS === void 0 || $t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, si = Symbol(), Te = /* @__PURE__ */ new WeakMap();
|
|
800
|
+
let qi = class {
|
|
801
|
+
constructor(t, e, s) {
|
|
802
|
+
if (this._$cssResult$ = !0, s !== si) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
803
|
+
this.cssText = t, this.t = e;
|
|
804
|
+
}
|
|
805
|
+
get styleSheet() {
|
|
806
|
+
let t = this.o;
|
|
807
|
+
const e = this.t;
|
|
808
|
+
if (ne && t === void 0) {
|
|
809
|
+
const s = e !== void 0 && e.length === 1;
|
|
810
|
+
s && (t = Te.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Te.set(e, t));
|
|
811
|
+
}
|
|
812
|
+
return t;
|
|
813
|
+
}
|
|
814
|
+
toString() {
|
|
815
|
+
return this.cssText;
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
const Vi = (i) => new qi(typeof i == "string" ? i : i + "", void 0, si), Wi = (i, t) => {
|
|
819
|
+
if (ne) i.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
820
|
+
else for (const e of t) {
|
|
821
|
+
const s = document.createElement("style"), r = $t.litNonce;
|
|
822
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
823
|
+
}
|
|
824
|
+
}, Ne = ne ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
825
|
+
let e = "";
|
|
826
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
827
|
+
return Vi(e);
|
|
828
|
+
})(i) : i;
|
|
829
|
+
const { is: Zi, defineProperty: Ji, getOwnPropertyDescriptor: Fi, getOwnPropertyNames: Ki, getOwnPropertySymbols: Xi, getPrototypeOf: Yi } = Object, Et = globalThis, Ie = Et.trustedTypes, Gi = Ie ? Ie.emptyScript : "", Qi = Et.reactiveElementPolyfillSupport, at = (i, t) => i, te = { toAttribute(i, t) {
|
|
830
|
+
switch (t) {
|
|
831
|
+
case Boolean:
|
|
832
|
+
i = i ? Gi : null;
|
|
833
|
+
break;
|
|
834
|
+
case Object:
|
|
835
|
+
case Array:
|
|
836
|
+
i = i == null ? i : JSON.stringify(i);
|
|
837
|
+
}
|
|
838
|
+
return i;
|
|
839
|
+
}, fromAttribute(i, t) {
|
|
840
|
+
let e = i;
|
|
841
|
+
switch (t) {
|
|
842
|
+
case Boolean:
|
|
843
|
+
e = i !== null;
|
|
844
|
+
break;
|
|
845
|
+
case Number:
|
|
846
|
+
e = i === null ? null : Number(i);
|
|
847
|
+
break;
|
|
848
|
+
case Object:
|
|
849
|
+
case Array:
|
|
850
|
+
try {
|
|
851
|
+
e = JSON.parse(i);
|
|
852
|
+
} catch {
|
|
853
|
+
e = null;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
return e;
|
|
857
|
+
} }, ae = (i, t) => !Zi(i, t), Oe = { attribute: !0, type: String, converter: te, reflect: !1, hasChanged: ae };
|
|
858
|
+
Symbol.metadata ??= Symbol("metadata"), Et.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
859
|
+
class rt extends HTMLElement {
|
|
860
|
+
static addInitializer(t) {
|
|
861
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
862
|
+
}
|
|
863
|
+
static get observedAttributes() {
|
|
864
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
865
|
+
}
|
|
866
|
+
static createProperty(t, e = Oe) {
|
|
867
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
868
|
+
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
869
|
+
r !== void 0 && Ji(this.prototype, t, r);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
static getPropertyDescriptor(t, e, s) {
|
|
873
|
+
const { get: r, set: o } = Fi(this.prototype, t) ?? { get() {
|
|
874
|
+
return this[e];
|
|
875
|
+
}, set(n) {
|
|
876
|
+
this[e] = n;
|
|
877
|
+
} };
|
|
878
|
+
return { get() {
|
|
879
|
+
return r?.call(this);
|
|
880
|
+
}, set(n) {
|
|
881
|
+
const l = r?.call(this);
|
|
882
|
+
o.call(this, n), this.requestUpdate(t, l, s);
|
|
883
|
+
}, configurable: !0, enumerable: !0 };
|
|
884
|
+
}
|
|
885
|
+
static getPropertyOptions(t) {
|
|
886
|
+
return this.elementProperties.get(t) ?? Oe;
|
|
887
|
+
}
|
|
888
|
+
static _$Ei() {
|
|
889
|
+
if (this.hasOwnProperty(at("elementProperties"))) return;
|
|
890
|
+
const t = Yi(this);
|
|
891
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
892
|
+
}
|
|
893
|
+
static finalize() {
|
|
894
|
+
if (this.hasOwnProperty(at("finalized"))) return;
|
|
895
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(at("properties"))) {
|
|
896
|
+
const e = this.properties, s = [...Ki(e), ...Xi(e)];
|
|
897
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
898
|
+
}
|
|
899
|
+
const t = this[Symbol.metadata];
|
|
900
|
+
if (t !== null) {
|
|
901
|
+
const e = litPropertyMetadata.get(t);
|
|
902
|
+
if (e !== void 0) for (const [s, r] of e) this.elementProperties.set(s, r);
|
|
903
|
+
}
|
|
904
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
905
|
+
for (const [e, s] of this.elementProperties) {
|
|
906
|
+
const r = this._$Eu(e, s);
|
|
907
|
+
r !== void 0 && this._$Eh.set(r, e);
|
|
908
|
+
}
|
|
909
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
910
|
+
}
|
|
911
|
+
static finalizeStyles(t) {
|
|
912
|
+
const e = [];
|
|
913
|
+
if (Array.isArray(t)) {
|
|
914
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
915
|
+
for (const r of s) e.unshift(Ne(r));
|
|
916
|
+
} else t !== void 0 && e.push(Ne(t));
|
|
917
|
+
return e;
|
|
918
|
+
}
|
|
919
|
+
static _$Eu(t, e) {
|
|
920
|
+
const s = e.attribute;
|
|
921
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
922
|
+
}
|
|
923
|
+
constructor() {
|
|
924
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
925
|
+
}
|
|
926
|
+
_$Ev() {
|
|
927
|
+
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
|
|
928
|
+
}
|
|
929
|
+
addController(t) {
|
|
930
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
931
|
+
}
|
|
932
|
+
removeController(t) {
|
|
933
|
+
this._$EO?.delete(t);
|
|
934
|
+
}
|
|
935
|
+
_$E_() {
|
|
936
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
937
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
938
|
+
t.size > 0 && (this._$Ep = t);
|
|
939
|
+
}
|
|
940
|
+
createRenderRoot() {
|
|
941
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
942
|
+
return Wi(t, this.constructor.elementStyles), t;
|
|
943
|
+
}
|
|
944
|
+
connectedCallback() {
|
|
945
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
946
|
+
}
|
|
947
|
+
enableUpdating(t) {
|
|
948
|
+
}
|
|
949
|
+
disconnectedCallback() {
|
|
950
|
+
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
951
|
+
}
|
|
952
|
+
attributeChangedCallback(t, e, s) {
|
|
953
|
+
this._$AK(t, s);
|
|
954
|
+
}
|
|
955
|
+
_$EC(t, e) {
|
|
956
|
+
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
957
|
+
if (r !== void 0 && s.reflect === !0) {
|
|
958
|
+
const o = (s.converter?.toAttribute !== void 0 ? s.converter : te).toAttribute(e, s.type);
|
|
959
|
+
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
_$AK(t, e) {
|
|
963
|
+
const s = this.constructor, r = s._$Eh.get(t);
|
|
964
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
965
|
+
const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : te;
|
|
966
|
+
this._$Em = r, this[r] = n.fromAttribute(e, o.type), this._$Em = null;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
requestUpdate(t, e, s) {
|
|
970
|
+
if (t !== void 0) {
|
|
971
|
+
if (s ??= this.constructor.getPropertyOptions(t), !(s.hasChanged ?? ae)(this[t], e)) return;
|
|
972
|
+
this.P(t, e, s);
|
|
973
|
+
}
|
|
974
|
+
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
975
|
+
}
|
|
976
|
+
P(t, e, s) {
|
|
977
|
+
this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t);
|
|
978
|
+
}
|
|
979
|
+
async _$ET() {
|
|
980
|
+
this.isUpdatePending = !0;
|
|
981
|
+
try {
|
|
982
|
+
await this._$ES;
|
|
983
|
+
} catch (e) {
|
|
984
|
+
Promise.reject(e);
|
|
985
|
+
}
|
|
986
|
+
const t = this.scheduleUpdate();
|
|
987
|
+
return t != null && await t, !this.isUpdatePending;
|
|
988
|
+
}
|
|
989
|
+
scheduleUpdate() {
|
|
990
|
+
return this.performUpdate();
|
|
991
|
+
}
|
|
992
|
+
performUpdate() {
|
|
993
|
+
if (!this.isUpdatePending) return;
|
|
994
|
+
if (!this.hasUpdated) {
|
|
995
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
996
|
+
for (const [r, o] of this._$Ep) this[r] = o;
|
|
997
|
+
this._$Ep = void 0;
|
|
998
|
+
}
|
|
999
|
+
const s = this.constructor.elementProperties;
|
|
1000
|
+
if (s.size > 0) for (const [r, o] of s) o.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], o);
|
|
1001
|
+
}
|
|
1002
|
+
let t = !1;
|
|
1003
|
+
const e = this._$AL;
|
|
1004
|
+
try {
|
|
1005
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EU();
|
|
1006
|
+
} catch (s) {
|
|
1007
|
+
throw t = !1, this._$EU(), s;
|
|
1008
|
+
}
|
|
1009
|
+
t && this._$AE(e);
|
|
1010
|
+
}
|
|
1011
|
+
willUpdate(t) {
|
|
1012
|
+
}
|
|
1013
|
+
_$AE(t) {
|
|
1014
|
+
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
1015
|
+
}
|
|
1016
|
+
_$EU() {
|
|
1017
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
1018
|
+
}
|
|
1019
|
+
get updateComplete() {
|
|
1020
|
+
return this.getUpdateComplete();
|
|
1021
|
+
}
|
|
1022
|
+
getUpdateComplete() {
|
|
1023
|
+
return this._$ES;
|
|
1024
|
+
}
|
|
1025
|
+
shouldUpdate(t) {
|
|
1026
|
+
return !0;
|
|
1027
|
+
}
|
|
1028
|
+
update(t) {
|
|
1029
|
+
this._$Ej &&= this._$Ej.forEach(((e) => this._$EC(e, this[e]))), this._$EU();
|
|
1030
|
+
}
|
|
1031
|
+
updated(t) {
|
|
1032
|
+
}
|
|
1033
|
+
firstUpdated(t) {
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
rt.elementStyles = [], rt.shadowRootOptions = { mode: "open" }, rt[at("elementProperties")] = /* @__PURE__ */ new Map(), rt[at("finalized")] = /* @__PURE__ */ new Map(), Qi?.({ ReactiveElement: rt }), (Et.reactiveElementVersions ??= []).push("2.0.4");
|
|
1037
|
+
const ts = Symbol();
|
|
1038
|
+
class es {
|
|
1039
|
+
get taskComplete() {
|
|
1040
|
+
return this.t || (this.i === 1 ? this.t = new Promise(((t, e) => {
|
|
1041
|
+
this.o = t, this.h = e;
|
|
1042
|
+
})) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
|
|
1043
|
+
}
|
|
1044
|
+
constructor(t, e, s) {
|
|
1045
|
+
this.p = 0, this.i = 0, (this._ = t).addController(this);
|
|
1046
|
+
const r = typeof e == "object" ? e : { task: e, args: s };
|
|
1047
|
+
this.v = r.task, this.j = r.args, this.m = r.argsEqual ?? is, this.k = r.onComplete, this.A = r.onError, this.autoRun = r.autoRun ?? !0, "initialValue" in r && (this.u = r.initialValue, this.i = 2, this.O = this.T?.());
|
|
1048
|
+
}
|
|
1049
|
+
hostUpdate() {
|
|
1050
|
+
this.autoRun === !0 && this.S();
|
|
1051
|
+
}
|
|
1052
|
+
hostUpdated() {
|
|
1053
|
+
this.autoRun === "afterUpdate" && this.S();
|
|
1054
|
+
}
|
|
1055
|
+
T() {
|
|
1056
|
+
if (this.j === void 0) return;
|
|
1057
|
+
const t = this.j();
|
|
1058
|
+
if (!Array.isArray(t)) throw Error("The args function must return an array");
|
|
1059
|
+
return t;
|
|
1060
|
+
}
|
|
1061
|
+
async S() {
|
|
1062
|
+
const t = this.T(), e = this.O;
|
|
1063
|
+
this.O = t, t === e || t === void 0 || e !== void 0 && this.m(e, t) || await this.run(t);
|
|
1064
|
+
}
|
|
1065
|
+
async run(t) {
|
|
1066
|
+
let e, s;
|
|
1067
|
+
t ??= this.T(), this.O = t, this.i === 1 ? this.q?.abort() : (this.t = void 0, this.o = void 0, this.h = void 0), this.i = 1, this.autoRun === "afterUpdate" ? queueMicrotask((() => this._.requestUpdate())) : this._.requestUpdate();
|
|
1068
|
+
const r = ++this.p;
|
|
1069
|
+
this.q = new AbortController();
|
|
1070
|
+
let o = !1;
|
|
1071
|
+
try {
|
|
1072
|
+
e = await this.v(t, { signal: this.q.signal });
|
|
1073
|
+
} catch (n) {
|
|
1074
|
+
o = !0, s = n;
|
|
1075
|
+
}
|
|
1076
|
+
if (this.p === r) {
|
|
1077
|
+
if (e === ts) this.i = 0;
|
|
1078
|
+
else {
|
|
1079
|
+
if (o === !1) {
|
|
1080
|
+
try {
|
|
1081
|
+
this.k?.(e);
|
|
1082
|
+
} catch {
|
|
1083
|
+
}
|
|
1084
|
+
this.i = 2, this.o?.(e);
|
|
1085
|
+
} else {
|
|
1086
|
+
try {
|
|
1087
|
+
this.A?.(s);
|
|
1088
|
+
} catch {
|
|
1089
|
+
}
|
|
1090
|
+
this.i = 3, this.h?.(s);
|
|
1091
|
+
}
|
|
1092
|
+
this.u = e, this.l = s;
|
|
1093
|
+
}
|
|
1094
|
+
this._.requestUpdate();
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
abort(t) {
|
|
1098
|
+
this.i === 1 && this.q?.abort(t);
|
|
1099
|
+
}
|
|
1100
|
+
get value() {
|
|
1101
|
+
return this.u;
|
|
1102
|
+
}
|
|
1103
|
+
get error() {
|
|
1104
|
+
return this.l;
|
|
1105
|
+
}
|
|
1106
|
+
get status() {
|
|
1107
|
+
return this.i;
|
|
1108
|
+
}
|
|
1109
|
+
render(t) {
|
|
1110
|
+
switch (this.i) {
|
|
1111
|
+
case 0:
|
|
1112
|
+
return t.initial?.();
|
|
1113
|
+
case 1:
|
|
1114
|
+
return t.pending?.();
|
|
1115
|
+
case 2:
|
|
1116
|
+
return t.complete?.(this.value);
|
|
1117
|
+
case 3:
|
|
1118
|
+
return t.error?.(this.error);
|
|
1119
|
+
default:
|
|
1120
|
+
throw Error("Unexpected status: " + this.i);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
const is = (i, t) => i === t || i.length === t.length && i.every(((e, s) => !ae(e, t[s])));
|
|
1125
|
+
var Vt, He;
|
|
1126
|
+
function ss() {
|
|
1127
|
+
if (He) return Vt;
|
|
1128
|
+
He = 1;
|
|
1129
|
+
var i = "Expected a function", t = NaN, e = "[object Symbol]", s = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, n = /^0o[0-7]+$/i, l = parseInt, a = typeof vt == "object" && vt && vt.Object === Object && vt, c = typeof self == "object" && self && self.Object === Object && self, h = a || c || Function("return this")(), d = Object.prototype, u = d.toString, y = Math.max, C = Math.min, k = function() {
|
|
1130
|
+
return h.Date.now();
|
|
1131
|
+
};
|
|
1132
|
+
function hi(p, w, S) {
|
|
1133
|
+
var W, G, ut, Z, A, I, Q = 0, ce = !1, tt = !1, Nt = !0;
|
|
1134
|
+
if (typeof p != "function")
|
|
1135
|
+
throw new TypeError(i);
|
|
1136
|
+
w = he(w) || 0, Tt(S) && (ce = !!S.leading, tt = "maxWait" in S, ut = tt ? y(he(S.maxWait) || 0, w) : ut, Nt = "trailing" in S ? !!S.trailing : Nt);
|
|
1137
|
+
function It(m) {
|
|
1138
|
+
var P = W, et = G;
|
|
1139
|
+
return W = G = void 0, Q = m, Z = p.apply(et, P), Z;
|
|
1140
|
+
}
|
|
1141
|
+
function pi(m) {
|
|
1142
|
+
return Q = m, A = setTimeout(ft, w), ce ? It(m) : Z;
|
|
1143
|
+
}
|
|
1144
|
+
function ui(m) {
|
|
1145
|
+
var P = m - I, et = m - Q, ue = w - P;
|
|
1146
|
+
return tt ? C(ue, ut - et) : ue;
|
|
1147
|
+
}
|
|
1148
|
+
function de(m) {
|
|
1149
|
+
var P = m - I, et = m - Q;
|
|
1150
|
+
return I === void 0 || P >= w || P < 0 || tt && et >= ut;
|
|
1151
|
+
}
|
|
1152
|
+
function ft() {
|
|
1153
|
+
var m = k();
|
|
1154
|
+
if (de(m))
|
|
1155
|
+
return pe(m);
|
|
1156
|
+
A = setTimeout(ft, ui(m));
|
|
1157
|
+
}
|
|
1158
|
+
function pe(m) {
|
|
1159
|
+
return A = void 0, Nt && W ? It(m) : (W = G = void 0, Z);
|
|
1160
|
+
}
|
|
1161
|
+
function fi() {
|
|
1162
|
+
A !== void 0 && clearTimeout(A), Q = 0, W = I = G = A = void 0;
|
|
1163
|
+
}
|
|
1164
|
+
function vi() {
|
|
1165
|
+
return A === void 0 ? Z : pe(k());
|
|
1166
|
+
}
|
|
1167
|
+
function Ot() {
|
|
1168
|
+
var m = k(), P = de(m);
|
|
1169
|
+
if (W = arguments, G = this, I = m, P) {
|
|
1170
|
+
if (A === void 0)
|
|
1171
|
+
return pi(I);
|
|
1172
|
+
if (tt)
|
|
1173
|
+
return A = setTimeout(ft, w), It(I);
|
|
1174
|
+
}
|
|
1175
|
+
return A === void 0 && (A = setTimeout(ft, w)), Z;
|
|
1176
|
+
}
|
|
1177
|
+
return Ot.cancel = fi, Ot.flush = vi, Ot;
|
|
1178
|
+
}
|
|
1179
|
+
function Tt(p) {
|
|
1180
|
+
var w = typeof p;
|
|
1181
|
+
return !!p && (w == "object" || w == "function");
|
|
1182
|
+
}
|
|
1183
|
+
function ci(p) {
|
|
1184
|
+
return !!p && typeof p == "object";
|
|
1185
|
+
}
|
|
1186
|
+
function di(p) {
|
|
1187
|
+
return typeof p == "symbol" || ci(p) && u.call(p) == e;
|
|
1188
|
+
}
|
|
1189
|
+
function he(p) {
|
|
1190
|
+
if (typeof p == "number")
|
|
1191
|
+
return p;
|
|
1192
|
+
if (di(p))
|
|
1193
|
+
return t;
|
|
1194
|
+
if (Tt(p)) {
|
|
1195
|
+
var w = typeof p.valueOf == "function" ? p.valueOf() : p;
|
|
1196
|
+
p = Tt(w) ? w + "" : w;
|
|
1197
|
+
}
|
|
1198
|
+
if (typeof p != "string")
|
|
1199
|
+
return p === 0 ? p : +p;
|
|
1200
|
+
p = p.replace(s, "");
|
|
1201
|
+
var S = o.test(p);
|
|
1202
|
+
return S || n.test(p) ? l(p.slice(2), S ? 2 : 8) : r.test(p) ? t : +p;
|
|
1203
|
+
}
|
|
1204
|
+
return Vt = hi, Vt;
|
|
1205
|
+
}
|
|
1206
|
+
var rs = ss();
|
|
1207
|
+
const os = /* @__PURE__ */ gi(rs);
|
|
1208
|
+
var ns = Object.defineProperty, f = (i, t, e, s) => {
|
|
1209
|
+
for (var r = void 0, o = i.length - 1, n; o >= 0; o--) (n = i[o]) && (r = n(t, e, r) || r);
|
|
1210
|
+
return r && ns(t, e, r), r;
|
|
1211
|
+
}, B = (i = "", t) => {
|
|
1212
|
+
customElements.get(i) || customElements.define(i, t);
|
|
1213
|
+
}, Me = (i, t) => [...i].reduce((e, s) => t?.skip?.includes(s.name) ? e : `${e}${s.name}="${s.value}" `, ""), pt = class extends x {
|
|
1214
|
+
constructor() {
|
|
1215
|
+
super(...arguments), this.name = "", this.fallbackTag = null, this.defaultStyle = null, this.refElement = null;
|
|
1216
|
+
}
|
|
1217
|
+
connectedCallback() {
|
|
1218
|
+
super.connectedCallback();
|
|
1219
|
+
let i = this;
|
|
1220
|
+
for (; i.parentNode; )
|
|
1221
|
+
i = i.parentNode;
|
|
1222
|
+
if (this.refElement = i.host.querySelector(`[refElement="${this.name}"]`), this.refElement && this.fallbackTag !== null && this.refElement.tagName.toLowerCase() !== this.fallbackTag)
|
|
1223
|
+
throw new Error(`Your html tag to customize ${this.name} should be <${this.fallbackTag}></<${this.fallbackTag}>`);
|
|
1224
|
+
}
|
|
1225
|
+
render() {
|
|
1226
|
+
const i = Me(this.attributes, { skip: ["name", "fallbacktag"] }), t = Me(this.refElement?.attributes ?? []);
|
|
1227
|
+
return _`${Di(`
|
|
1228
|
+
<style>${this.defaultStyle}</style>
|
|
1229
|
+
<${this.fallbackTag} ${i} ${t}>
|
|
1230
|
+
<slot></slot>
|
|
1231
|
+
</${this.fallbackTag}>`)}`;
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
f([v()], pt.prototype, "name");
|
|
1235
|
+
f([v({ type: String || null })], pt.prototype, "fallbackTag");
|
|
1236
|
+
f([v({ type: String || null })], pt.prototype, "defaultStyle");
|
|
1237
|
+
f([v({ type: String || null })], pt.prototype, "refElement");
|
|
1238
|
+
B("appcues-use-ref", pt);
|
|
1239
|
+
var as = () => {
|
|
1240
|
+
let i = {};
|
|
1241
|
+
const t = window.AppcuesSettings?.userIdSignature;
|
|
1242
|
+
return t && (i = { Authorization: `Bearer ${t}` }), i;
|
|
1243
|
+
}, ls = async (i, t) => {
|
|
1244
|
+
const e = as();
|
|
1245
|
+
return await fetch(i, { headers: e, ...t });
|
|
1246
|
+
}, hs = "https://api.appcues.net/v1/", cs = $`
|
|
1247
|
+
.container {
|
|
1248
|
+
background: #fff;
|
|
1249
|
+
box-shadow: var(--flows-list-block-shadow);
|
|
1250
|
+
border-radius: var(--flows-list-block-radius);
|
|
1251
|
+
padding: 8px 0;
|
|
1252
|
+
width: 100%;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.container .loading,
|
|
1256
|
+
.container .error-message {
|
|
1257
|
+
align-items: center;
|
|
1258
|
+
color: var(--flows-list-block-color);
|
|
1259
|
+
display: flex;
|
|
1260
|
+
font-size: 14px;
|
|
1261
|
+
font-style: normal;
|
|
1262
|
+
font-weight: 400;
|
|
1263
|
+
justify-content: center;
|
|
1264
|
+
line-height: 160%;
|
|
1265
|
+
padding: 16px;
|
|
1266
|
+
text-align: center;
|
|
1267
|
+
}
|
|
1268
|
+
`, ds = $`
|
|
1269
|
+
slot[name='empty-message'],
|
|
1270
|
+
::slotted(p[slot='empty-message']) {
|
|
1271
|
+
align-items: center;
|
|
1272
|
+
color: var(--flows-list-block-color);
|
|
1273
|
+
display: flex;
|
|
1274
|
+
font-style: normal;
|
|
1275
|
+
font-weight: 400;
|
|
1276
|
+
justify-content: center;
|
|
1277
|
+
line-height: 160%;
|
|
1278
|
+
padding: 16px;
|
|
1279
|
+
text-align: center;
|
|
1280
|
+
font-size: 14px;
|
|
1281
|
+
}
|
|
1282
|
+
`, ps = $`
|
|
1283
|
+
ul {
|
|
1284
|
+
list-style-type: square;
|
|
1285
|
+
list-style-position: inside;
|
|
1286
|
+
margin: 0;
|
|
1287
|
+
padding: 0 4px;
|
|
1288
|
+
}
|
|
1289
|
+
`, us = $`
|
|
1290
|
+
li {
|
|
1291
|
+
cursor: pointer;
|
|
1292
|
+
font-size: 14px;
|
|
1293
|
+
font-style: normal;
|
|
1294
|
+
font-weight: 400;
|
|
1295
|
+
line-height: 160%;
|
|
1296
|
+
padding: 8px 16px;
|
|
1297
|
+
border-radius: var(--flows-list-block-item-radius);
|
|
1298
|
+
transition: background-color 0.3s ease 0s;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
li:hover {
|
|
1302
|
+
background-color: var(--flows-list-block-background-hover);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
li::marker {
|
|
1306
|
+
color: var(--flows-list-block-marker-color);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
li:hover > span {
|
|
1310
|
+
background-color: var(--flows-list-block-background-hover);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
li > span {
|
|
1314
|
+
color: var(--flows-list-block-color);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
li appcues-use-ref {
|
|
1318
|
+
display: inline-flex;
|
|
1319
|
+
max-width: calc(100% - 20px);
|
|
1320
|
+
}
|
|
1321
|
+
`, fs = $`
|
|
1322
|
+
::slotted(h1[slot='title']),
|
|
1323
|
+
::slotted(h2[slot='title']),
|
|
1324
|
+
::slotted(h3[slot='title']) {
|
|
1325
|
+
color: var(--flows-list-block-color);
|
|
1326
|
+
font-size: 15px;
|
|
1327
|
+
font-weight: 700;
|
|
1328
|
+
line-height: 24px;
|
|
1329
|
+
margin: 0 0 8px;
|
|
1330
|
+
padding: 0 16px 0;
|
|
1331
|
+
|
|
1332
|
+
display: -webkit-box;
|
|
1333
|
+
-webkit-box-orient: vertical;
|
|
1334
|
+
-webkit-line-clamp: 2;
|
|
1335
|
+
max-height: 48px;
|
|
1336
|
+
max-width: calc(100% - 32px);
|
|
1337
|
+
overflow: hidden;
|
|
1338
|
+
text-overflow: ellipsis;
|
|
1339
|
+
white-space: normal;
|
|
1340
|
+
}
|
|
1341
|
+
`, Wt, wt = window, X = wt.trustedTypes, Re = X ? X.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ee = "$lit$", T = `lit$${(Math.random() + "").slice(9)}$`, ri = "?" + T, vs = `<${ri}>`, j = document, At = () => j.createComment(""), ct = (i) => i === null || typeof i != "object" && typeof i != "function", oi = Array.isArray, gs = (i) => oi(i) || typeof i?.[Symbol.iterator] == "function", Zt = `[
|
|
1342
|
+
\f\r]`, ot = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ze = /-->/g, Le = />/g, H = RegExp(`>|${Zt}(?:([^\\s"'>=/]+)(${Zt}*=${Zt}*(?:[^
|
|
1343
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), je = /'/g, Be = /"/g, ni = /^(?:script|style|textarea|title)$/i, ai = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), nt = ai(1), Ct = ai(2), dt = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), De = /* @__PURE__ */ new WeakMap(), R = j.createTreeWalker(j, 129, null, !1);
|
|
1344
|
+
function li(i, t) {
|
|
1345
|
+
if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1346
|
+
return Re !== void 0 ? Re.createHTML(t) : t;
|
|
1347
|
+
}
|
|
1348
|
+
var ms = (i, t) => {
|
|
1349
|
+
const e = i.length - 1, s = [];
|
|
1350
|
+
let r, o = t === 2 ? "<svg>" : "", n = ot;
|
|
1351
|
+
for (let l = 0; l < e; l++) {
|
|
1352
|
+
const a = i[l];
|
|
1353
|
+
let c, h, d = -1, u = 0;
|
|
1354
|
+
for (; u < a.length && (n.lastIndex = u, h = n.exec(a), h !== null); ) u = n.lastIndex, n === ot ? h[1] === "!--" ? n = ze : h[1] !== void 0 ? n = Le : h[2] !== void 0 ? (ni.test(h[2]) && (r = RegExp("</" + h[2], "g")), n = H) : h[3] !== void 0 && (n = H) : n === H ? h[0] === ">" ? (n = r ?? ot, d = -1) : h[1] === void 0 ? d = -2 : (d = n.lastIndex - h[2].length, c = h[1], n = h[3] === void 0 ? H : h[3] === '"' ? Be : je) : n === Be || n === je ? n = H : n === ze || n === Le ? n = ot : (n = H, r = void 0);
|
|
1355
|
+
const y = n === H && i[l + 1].startsWith("/>") ? " " : "";
|
|
1356
|
+
o += n === ot ? a + vs : d >= 0 ? (s.push(c), a.slice(0, d) + ee + a.slice(d) + T + y) : a + T + (d === -2 ? (s.push(void 0), l) : y);
|
|
1357
|
+
}
|
|
1358
|
+
return [li(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
1359
|
+
}, xt = class {
|
|
1360
|
+
constructor({ strings: i, _$litType$: t }, e) {
|
|
1361
|
+
let s;
|
|
1362
|
+
this.parts = [];
|
|
1363
|
+
let r = 0, o = 0;
|
|
1364
|
+
const n = i.length - 1, l = this.parts, [a, c] = ms(i, t);
|
|
1365
|
+
if (this.el = xt.createElement(a, e), R.currentNode = this.el.content, t === 2) {
|
|
1366
|
+
const h = this.el.content, d = h.firstChild;
|
|
1367
|
+
d.remove(), h.append(...d.childNodes);
|
|
1368
|
+
}
|
|
1369
|
+
for (; (s = R.nextNode()) !== null && l.length < n; ) {
|
|
1370
|
+
if (s.nodeType === 1) {
|
|
1371
|
+
if (s.hasAttributes()) {
|
|
1372
|
+
const h = [];
|
|
1373
|
+
for (const d of s.getAttributeNames()) if (d.endsWith(ee) || d.startsWith(T)) {
|
|
1374
|
+
const u = c[o++];
|
|
1375
|
+
if (h.push(d), u !== void 0) {
|
|
1376
|
+
const y = s.getAttribute(u.toLowerCase() + ee).split(T), C = /([.?@])?(.*)/.exec(u);
|
|
1377
|
+
l.push({ type: 1, index: r, name: C[2], strings: y, ctor: C[1] === "." ? bs : C[1] === "?" ? _s : C[1] === "@" ? ws : kt });
|
|
1378
|
+
} else l.push({ type: 6, index: r });
|
|
1379
|
+
}
|
|
1380
|
+
for (const d of h) s.removeAttribute(d);
|
|
1381
|
+
}
|
|
1382
|
+
if (ni.test(s.tagName)) {
|
|
1383
|
+
const h = s.textContent.split(T), d = h.length - 1;
|
|
1384
|
+
if (d > 0) {
|
|
1385
|
+
s.textContent = X ? X.emptyScript : "";
|
|
1386
|
+
for (let u = 0; u < d; u++) s.append(h[u], At()), R.nextNode(), l.push({ type: 2, index: ++r });
|
|
1387
|
+
s.append(h[d], At());
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
} else if (s.nodeType === 8) if (s.data === ri) l.push({ type: 2, index: r });
|
|
1391
|
+
else {
|
|
1392
|
+
let h = -1;
|
|
1393
|
+
for (; (h = s.data.indexOf(T, h + 1)) !== -1; ) l.push({ type: 7, index: r }), h += T.length - 1;
|
|
1394
|
+
}
|
|
1395
|
+
r++;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
static createElement(i, t) {
|
|
1399
|
+
const e = j.createElement("template");
|
|
1400
|
+
return e.innerHTML = i, e;
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
function Y(i, t, e = i, s) {
|
|
1404
|
+
var r, o, n, l;
|
|
1405
|
+
if (t === dt) return t;
|
|
1406
|
+
let a = s !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[s] : e._$Cl;
|
|
1407
|
+
const c = ct(t) ? void 0 : t._$litDirective$;
|
|
1408
|
+
return a?.constructor !== c && ((o = a?._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(i), a._$AT(i, e, s)), s !== void 0 ? ((n = (l = e)._$Co) !== null && n !== void 0 ? n : l._$Co = [])[s] = a : e._$Cl = a), a !== void 0 && (t = Y(i, a._$AS(i, t.values), a, s)), t;
|
|
1409
|
+
}
|
|
1410
|
+
var $s = class {
|
|
1411
|
+
constructor(i, t) {
|
|
1412
|
+
this._$AV = [], this._$AN = void 0, this._$AD = i, this._$AM = t;
|
|
1413
|
+
}
|
|
1414
|
+
get parentNode() {
|
|
1415
|
+
return this._$AM.parentNode;
|
|
1416
|
+
}
|
|
1417
|
+
get _$AU() {
|
|
1418
|
+
return this._$AM._$AU;
|
|
1419
|
+
}
|
|
1420
|
+
u(i) {
|
|
1421
|
+
var t;
|
|
1422
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t = i?.creationScope) !== null && t !== void 0 ? t : j).importNode(e, !0);
|
|
1423
|
+
R.currentNode = r;
|
|
1424
|
+
let o = R.nextNode(), n = 0, l = 0, a = s[0];
|
|
1425
|
+
for (; a !== void 0; ) {
|
|
1426
|
+
if (n === a.index) {
|
|
1427
|
+
let c;
|
|
1428
|
+
a.type === 2 ? c = new le(o, o.nextSibling, this, i) : a.type === 1 ? c = new a.ctor(o, a.name, a.strings, this, i) : a.type === 6 && (c = new As(o, this, i)), this._$AV.push(c), a = s[++l];
|
|
1429
|
+
}
|
|
1430
|
+
n !== a?.index && (o = R.nextNode(), n++);
|
|
1431
|
+
}
|
|
1432
|
+
return R.currentNode = j, r;
|
|
1433
|
+
}
|
|
1434
|
+
v(i) {
|
|
1435
|
+
let t = 0;
|
|
1436
|
+
for (const e of this._$AV) e !== void 0 && (e.strings !== void 0 ? (e._$AI(i, e, t), t += e.strings.length - 2) : e._$AI(i[t])), t++;
|
|
1437
|
+
}
|
|
1438
|
+
}, le = class {
|
|
1439
|
+
constructor(i, t, e, s) {
|
|
1440
|
+
var r;
|
|
1441
|
+
this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = i, this._$AB = t, this._$AM = e, this.options = s, this._$Cp = (r = s?.isConnected) === null || r === void 0 || r;
|
|
1442
|
+
}
|
|
1443
|
+
get _$AU() {
|
|
1444
|
+
var i, t;
|
|
1445
|
+
return (t = (i = this._$AM) === null || i === void 0 ? void 0 : i._$AU) !== null && t !== void 0 ? t : this._$Cp;
|
|
1446
|
+
}
|
|
1447
|
+
get parentNode() {
|
|
1448
|
+
let i = this._$AA.parentNode;
|
|
1449
|
+
const t = this._$AM;
|
|
1450
|
+
return t !== void 0 && i?.nodeType === 11 && (i = t.parentNode), i;
|
|
1451
|
+
}
|
|
1452
|
+
get startNode() {
|
|
1453
|
+
return this._$AA;
|
|
1454
|
+
}
|
|
1455
|
+
get endNode() {
|
|
1456
|
+
return this._$AB;
|
|
1457
|
+
}
|
|
1458
|
+
_$AI(i, t = this) {
|
|
1459
|
+
i = Y(this, i, t), ct(i) ? i === b || i == null || i === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : i !== this._$AH && i !== dt && this._(i) : i._$litType$ !== void 0 ? this.g(i) : i.nodeType !== void 0 ? this.$(i) : gs(i) ? this.T(i) : this._(i);
|
|
1460
|
+
}
|
|
1461
|
+
k(i) {
|
|
1462
|
+
return this._$AA.parentNode.insertBefore(i, this._$AB);
|
|
1463
|
+
}
|
|
1464
|
+
$(i) {
|
|
1465
|
+
this._$AH !== i && (this._$AR(), this._$AH = this.k(i));
|
|
1466
|
+
}
|
|
1467
|
+
_(i) {
|
|
1468
|
+
this._$AH !== b && ct(this._$AH) ? this._$AA.nextSibling.data = i : this.$(j.createTextNode(i)), this._$AH = i;
|
|
1469
|
+
}
|
|
1470
|
+
g(i) {
|
|
1471
|
+
var t;
|
|
1472
|
+
const { values: e, _$litType$: s } = i, r = typeof s == "number" ? this._$AC(i) : (s.el === void 0 && (s.el = xt.createElement(li(s.h, s.h[0]), this.options)), s);
|
|
1473
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r) this._$AH.v(e);
|
|
1474
|
+
else {
|
|
1475
|
+
const o = new $s(r, this), n = o.u(this.options);
|
|
1476
|
+
o.v(e), this.$(n), this._$AH = o;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
_$AC(i) {
|
|
1480
|
+
let t = De.get(i.strings);
|
|
1481
|
+
return t === void 0 && De.set(i.strings, t = new xt(i)), t;
|
|
1482
|
+
}
|
|
1483
|
+
T(i) {
|
|
1484
|
+
oi(this._$AH) || (this._$AH = [], this._$AR());
|
|
1485
|
+
const t = this._$AH;
|
|
1486
|
+
let e, s = 0;
|
|
1487
|
+
for (const r of i) s === t.length ? t.push(e = new le(this.k(At()), this.k(At()), this, this.options)) : e = t[s], e._$AI(r), s++;
|
|
1488
|
+
s < t.length && (this._$AR(e && e._$AB.nextSibling, s), t.length = s);
|
|
1489
|
+
}
|
|
1490
|
+
_$AR(i = this._$AA.nextSibling, t) {
|
|
1491
|
+
var e;
|
|
1492
|
+
for ((e = this._$AP) === null || e === void 0 || e.call(this, !1, !0, t); i && i !== this._$AB; ) {
|
|
1493
|
+
const s = i.nextSibling;
|
|
1494
|
+
i.remove(), i = s;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
setConnected(i) {
|
|
1498
|
+
var t;
|
|
1499
|
+
this._$AM === void 0 && (this._$Cp = i, (t = this._$AP) === null || t === void 0 || t.call(this, i));
|
|
1500
|
+
}
|
|
1501
|
+
}, kt = class {
|
|
1502
|
+
constructor(i, t, e, s, r) {
|
|
1503
|
+
this.type = 1, this._$AH = b, this._$AN = void 0, this.element = i, this.name = t, this._$AM = s, this.options = r, e.length > 2 || e[0] !== "" || e[1] !== "" ? (this._$AH = Array(e.length - 1).fill(new String()), this.strings = e) : this._$AH = b;
|
|
1504
|
+
}
|
|
1505
|
+
get tagName() {
|
|
1506
|
+
return this.element.tagName;
|
|
1507
|
+
}
|
|
1508
|
+
get _$AU() {
|
|
1509
|
+
return this._$AM._$AU;
|
|
1510
|
+
}
|
|
1511
|
+
_$AI(i, t = this, e, s) {
|
|
1512
|
+
const r = this.strings;
|
|
1513
|
+
let o = !1;
|
|
1514
|
+
if (r === void 0) i = Y(this, i, t, 0), o = !ct(i) || i !== this._$AH && i !== dt, o && (this._$AH = i);
|
|
1515
|
+
else {
|
|
1516
|
+
const n = i;
|
|
1517
|
+
let l, a;
|
|
1518
|
+
for (i = r[0], l = 0; l < r.length - 1; l++) a = Y(this, n[e + l], t, l), a === dt && (a = this._$AH[l]), o || (o = !ct(a) || a !== this._$AH[l]), a === b ? i = b : i !== b && (i += (a ?? "") + r[l + 1]), this._$AH[l] = a;
|
|
1519
|
+
}
|
|
1520
|
+
o && !s && this.j(i);
|
|
1521
|
+
}
|
|
1522
|
+
j(i) {
|
|
1523
|
+
i === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, i ?? "");
|
|
1524
|
+
}
|
|
1525
|
+
}, bs = class extends kt {
|
|
1526
|
+
constructor() {
|
|
1527
|
+
super(...arguments), this.type = 3;
|
|
1528
|
+
}
|
|
1529
|
+
j(i) {
|
|
1530
|
+
this.element[this.name] = i === b ? void 0 : i;
|
|
1531
|
+
}
|
|
1532
|
+
}, ys = X ? X.emptyScript : "", _s = class extends kt {
|
|
1533
|
+
constructor() {
|
|
1534
|
+
super(...arguments), this.type = 4;
|
|
1535
|
+
}
|
|
1536
|
+
j(i) {
|
|
1537
|
+
i && i !== b ? this.element.setAttribute(this.name, ys) : this.element.removeAttribute(this.name);
|
|
1538
|
+
}
|
|
1539
|
+
}, ws = class extends kt {
|
|
1540
|
+
constructor(i, t, e, s, r) {
|
|
1541
|
+
super(i, t, e, s, r), this.type = 5;
|
|
1542
|
+
}
|
|
1543
|
+
_$AI(i, t = this) {
|
|
1544
|
+
var e;
|
|
1545
|
+
if ((i = (e = Y(this, i, t, 0)) !== null && e !== void 0 ? e : b) === dt) return;
|
|
1546
|
+
const s = this._$AH, r = i === b && s !== b || i.capture !== s.capture || i.once !== s.once || i.passive !== s.passive, o = i !== b && (s === b || r);
|
|
1547
|
+
r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, i), this._$AH = i;
|
|
1548
|
+
}
|
|
1549
|
+
handleEvent(i) {
|
|
1550
|
+
var t, e;
|
|
1551
|
+
typeof this._$AH == "function" ? this._$AH.call((e = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && e !== void 0 ? e : this.element, i) : this._$AH.handleEvent(i);
|
|
1552
|
+
}
|
|
1553
|
+
}, As = class {
|
|
1554
|
+
constructor(i, t, e) {
|
|
1555
|
+
this.element = i, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = e;
|
|
1556
|
+
}
|
|
1557
|
+
get _$AU() {
|
|
1558
|
+
return this._$AM._$AU;
|
|
1559
|
+
}
|
|
1560
|
+
_$AI(i) {
|
|
1561
|
+
Y(this, i);
|
|
1562
|
+
}
|
|
1563
|
+
}, qe = wt.litHtmlPolyfillSupport;
|
|
1564
|
+
qe?.(xt, le), ((Wt = wt.litHtmlVersions) !== null && Wt !== void 0 ? Wt : wt.litHtmlVersions = []).push("2.8.0");
|
|
1565
|
+
var xs = Ct`
|
|
1566
|
+
<svg
|
|
1567
|
+
version="1.1"
|
|
1568
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1569
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1570
|
+
x="0px"
|
|
1571
|
+
y="0px"
|
|
1572
|
+
width="40px"
|
|
1573
|
+
height="40px"
|
|
1574
|
+
fill="#0072D6"
|
|
1575
|
+
viewBox="0 0 40 40"
|
|
1576
|
+
enable-background="new 0 0 40 40"
|
|
1577
|
+
xml:space="preserve"
|
|
1578
|
+
>
|
|
1579
|
+
<path
|
|
1580
|
+
opacity="0.2"
|
|
1581
|
+
fill="#0072D6"
|
|
1582
|
+
d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
|
|
1583
|
+
s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
|
|
1584
|
+
c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"
|
|
1585
|
+
/>
|
|
1586
|
+
<path
|
|
1587
|
+
fill="#0072D6"
|
|
1588
|
+
d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
|
|
1589
|
+
C22.32,8.481,24.301,9.057,26.013,10.047z"
|
|
1590
|
+
>
|
|
1591
|
+
<animateTransform
|
|
1592
|
+
attributeType="xml"
|
|
1593
|
+
attributeName="transform"
|
|
1594
|
+
type="rotate"
|
|
1595
|
+
from="0 20 20"
|
|
1596
|
+
to="360 20 20"
|
|
1597
|
+
keySplines="0.17 0.27 0.8 0.65"
|
|
1598
|
+
calcMode="spline"
|
|
1599
|
+
dur="0.6s"
|
|
1600
|
+
repeatCount="indefinite"
|
|
1601
|
+
keyTimes="0;1"
|
|
1602
|
+
/>
|
|
1603
|
+
</path>
|
|
1604
|
+
</svg>
|
|
1605
|
+
`, Ss = JSON.stringify([{ id: "1", name: "Item 1", publicName: "Item 1 public lorem ipsum dolor lorem impsum" }, { id: "2", name: "Item 2" }, { id: "3", name: "Item 3" }, { id: "4", name: "Item 4" }, { id: "5", name: "Item 5" }]), Es = async ({ accountId: i, userId: t }, e) => {
|
|
1606
|
+
if (!i || !t)
|
|
1607
|
+
return [];
|
|
1608
|
+
const s = window.location.href, r = new URL(`${hs}/accounts/${i}/users/${t}/widget`);
|
|
1609
|
+
return r.searchParams.set("url", s), r.searchParams.set("order_by", e), (await ls(r.toString())).json();
|
|
1610
|
+
}, D = class extends x {
|
|
1611
|
+
constructor() {
|
|
1612
|
+
super(...arguments), this.listItems = [], this.orderBy = "sort_order", this.limit = 5, this.listMock = Ss, this.mode = "live", this.fetchListItems = async () => {
|
|
1613
|
+
if (this.mode === "preview")
|
|
1614
|
+
return this.listItems = JSON.parse(this.listMock), JSON.parse(this.listMock);
|
|
1615
|
+
const i = await Appcues?.user() ?? {}, { contents: t } = await Es({ accountId: AppcuesBundleSettings?.accountId, userId: i?.userId }, this.orderBy), e = t.map(({ id: s, name: r, public_name: o }) => ({ id: s, name: r, publicName: o }));
|
|
1616
|
+
return this.listItems = e, e;
|
|
1617
|
+
}, this.getListItems = new es(this, { task: this.fetchListItems, args: () => [] }), this.handleItemClick = (i) => () => {
|
|
1618
|
+
const t = new CustomEvent("flow-item-clicked", { detail: this.listItems.find((e) => e.id === i), bubbles: !0, composed: !0 });
|
|
1619
|
+
this.dispatchEvent(t);
|
|
1620
|
+
}, this.handleItemHover = (i) => () => {
|
|
1621
|
+
const t = new CustomEvent("flow-item-hovered", { detail: this.listItems.find((e) => e.id === i), bubbles: !0, composed: !0 });
|
|
1622
|
+
this.dispatchEvent(t);
|
|
1623
|
+
}, this.containerTemplate = (i) => _`
|
|
1624
|
+
<appcues-use-ref
|
|
1625
|
+
name="list-container"
|
|
1626
|
+
fallbackTag="ul"
|
|
1627
|
+
defaultStyle=${ps}
|
|
1628
|
+
>
|
|
1629
|
+
${i.slice(0, this.limit).map(this.itemTemplate)}
|
|
1630
|
+
</appcues-use-ref>
|
|
1631
|
+
`, this.itemTemplate = (i) => _`
|
|
1632
|
+
<li
|
|
1633
|
+
@click="${this.handleItemClick(i.id)}"
|
|
1634
|
+
@mouseover="${this.handleItemHover(i.id)}"
|
|
1635
|
+
>
|
|
1636
|
+
<appcues-use-ref fallbackTag="span" name="list-item">
|
|
1637
|
+
${i.publicName ?? i.name}
|
|
1638
|
+
</appcues-use-ref>
|
|
1639
|
+
</li>
|
|
1640
|
+
`, this.emptyMessageTemplate = _`
|
|
1641
|
+
<slot name="empty-message">
|
|
1642
|
+
<p>Nothing to see here at the moment</p>
|
|
1643
|
+
</slot>
|
|
1644
|
+
`;
|
|
1645
|
+
}
|
|
1646
|
+
connectedCallback() {
|
|
1647
|
+
super.connectedCallback(), this.mode !== "live" && new MutationObserver((t) => {
|
|
1648
|
+
t.forEach((e) => {
|
|
1649
|
+
const [s] = e.addedNodes;
|
|
1650
|
+
(e.type === "attributes" || s && ["UL", "LI", "SPAN"].includes(s.nodeName)) && this.getListItems.run();
|
|
1651
|
+
});
|
|
1652
|
+
}).observe(this, { childList: !0, subtree: !0, attributes: !0 });
|
|
1653
|
+
}
|
|
1654
|
+
render() {
|
|
1655
|
+
return _`
|
|
1656
|
+
<div class="container">
|
|
1657
|
+
<slot name="title"></slot>
|
|
1658
|
+
${this.getListItems.render({ pending: () => _`<div class="loading">${xs}</div>`, complete: (i) => i.slice(0, this.limit).length === 0 ? this.emptyMessageTemplate : this.containerTemplate(i), error: () => _`
|
|
1659
|
+
<div class="error-message">Nothing to see here at the moment</div>
|
|
1660
|
+
` })}
|
|
1661
|
+
</div>
|
|
1662
|
+
`;
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
D.styles = [cs, ds, fs, us];
|
|
1666
|
+
f([N()], D.prototype, "listItems");
|
|
1667
|
+
f([v()], D.prototype, "orderBy");
|
|
1668
|
+
f([v({ type: Number })], D.prototype, "limit");
|
|
1669
|
+
f([v()], D.prototype, "listMock");
|
|
1670
|
+
f([v({ type: String })], D.prototype, "mode");
|
|
1671
|
+
B("appcues-flows-list", D);
|
|
1672
|
+
var Cs = $`
|
|
1673
|
+
.btn-wrapper {
|
|
1674
|
+
display: flex;
|
|
1675
|
+
flex-direction: row;
|
|
1676
|
+
flex-wrap: nowrap;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.btn-wrapper button {
|
|
1680
|
+
background-color: var(--launcher-main-color, #0072d6);
|
|
1681
|
+
color: white;
|
|
1682
|
+
cursor: pointer;
|
|
1683
|
+
outline-color: #0072d6;
|
|
1684
|
+
outline-width: 2px;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
.btn-wrapper button {
|
|
1688
|
+
border: none;
|
|
1689
|
+
border-start-start-radius: 80px;
|
|
1690
|
+
border-end-start-radius: 80px;
|
|
1691
|
+
border-start-end-radius: 0;
|
|
1692
|
+
border-end-end-radius: 0;
|
|
1693
|
+
padding-inline: 16px 8px;
|
|
1694
|
+
padding-block: 4px;
|
|
1695
|
+
height: 52px;
|
|
1696
|
+
outline-offset: 3px;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
.btn-wrapper ::slotted(button) {
|
|
1700
|
+
padding: 10px 16px;
|
|
1701
|
+
border-radius: 80px;
|
|
1702
|
+
border: 2px solid transparent;
|
|
1703
|
+
height: 52px;
|
|
1704
|
+
display: flex;
|
|
1705
|
+
align-items: center;
|
|
1706
|
+
justify-content: center;
|
|
1707
|
+
gap: 8px;
|
|
1708
|
+
outline-offset: 4px;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.btn-wrapper button:hover:not(:active):not([disabled]) {
|
|
1712
|
+
background-color: var(--launcher-hover-color, #4848eb) !important;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.btn-wrapper button:active {
|
|
1716
|
+
background-color: var(--launcher-active-color, #8c8cff) !important;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.btn-wrapper > .slot-wrapper {
|
|
1720
|
+
border: 2px solid white;
|
|
1721
|
+
margin-top: -2px;
|
|
1722
|
+
border-radius: 80px;
|
|
1723
|
+
width: max-content;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.btn-wrapper > .slot-wrapper.active {
|
|
1727
|
+
margin-inline-start: -18px;
|
|
1728
|
+
}
|
|
1729
|
+
`, ks = $`
|
|
1730
|
+
.checklist-content {
|
|
1731
|
+
display: flex;
|
|
1732
|
+
flex-direction: column;
|
|
1733
|
+
text-align: left;
|
|
1734
|
+
margin-inline-end: 18px;
|
|
1735
|
+
justify-content: center;
|
|
1736
|
+
gap: 6px;
|
|
1737
|
+
line-height: 1.2;
|
|
1738
|
+
}
|
|
1739
|
+
`, Ps = $`
|
|
1740
|
+
.progress-wrapper {
|
|
1741
|
+
display: flex;
|
|
1742
|
+
align-items: center;
|
|
1743
|
+
gap: 2px;
|
|
1744
|
+
border-radius: 6px;
|
|
1745
|
+
min-width: 100px;
|
|
1746
|
+
overflow: hidden;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.progress-bar,
|
|
1750
|
+
progress {
|
|
1751
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
1752
|
+
height: 4px;
|
|
1753
|
+
flex-grow: 1;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.progress-bar.completed {
|
|
1757
|
+
background-color: white;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
progress[value] {
|
|
1761
|
+
--color: white;
|
|
1762
|
+
--background: rgba(255, 255, 255, 0.4);
|
|
1763
|
+
appearance: none;
|
|
1764
|
+
background: var(--background);
|
|
1765
|
+
border: none;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
progress[value]::-webkit-progress-bar {
|
|
1769
|
+
background: var(--background);
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
progress[value]::-webkit-progress-value {
|
|
1773
|
+
background: var(--color);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
progress[value]::-moz-progress-bar {
|
|
1777
|
+
background: var(--color);
|
|
1778
|
+
}
|
|
1779
|
+
`, E = class extends x {
|
|
1780
|
+
constructor() {
|
|
1781
|
+
super(...arguments), this.title = "Checklist", this.totalItems = 0, this.completedItems = 0, this.activeColor = "#4848eb", this.hoverColor = "#4848eb", this.mainColor = "#0072d6", this.checklistId = "", this.handleSlotchange = (i) => {
|
|
1782
|
+
const r = (i.target?.assignedNodes({ flatten: !0 })).find((l) => l.querySelector ? l.querySelector("button") : !1)?.querySelector("button");
|
|
1783
|
+
if (!r) return;
|
|
1784
|
+
const { backgroundColor: o, background: n } = getComputedStyle(r);
|
|
1785
|
+
this.mainColor = o || n, this.style.setProperty("--launcher-main-color", this.mainColor);
|
|
1786
|
+
}, this.progressbar = () => {
|
|
1787
|
+
if (this.totalItems > 8)
|
|
1788
|
+
return nt`<progress
|
|
1789
|
+
id="items"
|
|
1790
|
+
value="${this.completedItems}"
|
|
1791
|
+
max="${this.totalItems}"
|
|
1792
|
+
></progress>`;
|
|
1793
|
+
const i = [];
|
|
1794
|
+
for (let t = 0; t < this.totalItems; t++)
|
|
1795
|
+
i.push(nt`<div
|
|
1796
|
+
class="progress-bar ${t < this.completedItems && "completed"}"
|
|
1797
|
+
></div>`);
|
|
1798
|
+
return i;
|
|
1799
|
+
}, this.slotElement = () => nt`
|
|
1800
|
+
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
1801
|
+
`;
|
|
1802
|
+
}
|
|
1803
|
+
connectedCallback() {
|
|
1804
|
+
super.connectedCallback(), this.totalItems = Number.parseInt(this.getAttribute("totalitems") || "0", 10), this.completedItems = Number.parseInt(this.getAttribute("completeditems") || "0", 10), this.title = this.getAttribute("title") || "Checklist", mi((i) => {
|
|
1805
|
+
const t = i, { id: e, name: s, totalItems: r, completedItems: o } = t.detail;
|
|
1806
|
+
this.totalItems = r, this.completedItems = o, this.title = s, this.checklistId = e, bi();
|
|
1807
|
+
}), $i(() => {
|
|
1808
|
+
this.totalItems = 0, this.completedItems = 0, this.title = "Checklist", this.checklistId = "";
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
attributeChangedCallback(i, t, e) {
|
|
1812
|
+
if (i === "totalitems") {
|
|
1813
|
+
const s = Number.parseInt(e || "0", 10);
|
|
1814
|
+
this.totalItems = s > 0 ? s : 0;
|
|
1815
|
+
}
|
|
1816
|
+
if (i === "completeditems") {
|
|
1817
|
+
const s = Number.parseInt(e || "0", 10);
|
|
1818
|
+
s > this.totalItems ? this.completedItems = this.totalItems : s < 0 ? this.completedItems = 0 : this.completedItems = s;
|
|
1819
|
+
}
|
|
1820
|
+
i === "title" && (this.title = e || "Checklist"), i === "hovercolor" && (this.hoverColor = e || "#4848eb", this.style.setProperty("--launcher-hover-color", this.hoverColor)), i === "activecolor" && (this.activeColor = e || "#8c8cff", this.style.setProperty("--launcher-active-color", this.activeColor));
|
|
1821
|
+
}
|
|
1822
|
+
render() {
|
|
1823
|
+
return nt`
|
|
1824
|
+
<div class="btn-wrapper">
|
|
1825
|
+
${this.totalItems === 0 ? this.slotElement() : nt`
|
|
1826
|
+
<button @click="${() => fe(this.checklistId)}">
|
|
1827
|
+
<div class="checklist-content">
|
|
1828
|
+
${this.title}
|
|
1829
|
+
<div class="progress-wrapper" aria-role="progressbar">
|
|
1830
|
+
${this.progressbar()}
|
|
1831
|
+
</div>
|
|
1832
|
+
</div>
|
|
1833
|
+
</button>
|
|
1834
|
+
<div
|
|
1835
|
+
class="slot-wrapper ${this.totalItems > 0 && "active"}"
|
|
1836
|
+
@click="${{ handleEvent: () => fe(this.checklistId, !0), capture: !0 }}"
|
|
1837
|
+
>
|
|
1838
|
+
${this.slotElement()}
|
|
1839
|
+
</div>
|
|
1840
|
+
`}
|
|
1841
|
+
</div>
|
|
1842
|
+
`;
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
E.styles = [Cs, ks, Ps];
|
|
1846
|
+
f([v()], E.prototype, "title");
|
|
1847
|
+
f([v()], E.prototype, "totalItems");
|
|
1848
|
+
f([v()], E.prototype, "completedItems");
|
|
1849
|
+
f([v()], E.prototype, "activeColor");
|
|
1850
|
+
f([v()], E.prototype, "hoverColor");
|
|
1851
|
+
f([N()], E.prototype, "mainColor");
|
|
1852
|
+
f([N()], E.prototype, "checklistId");
|
|
1853
|
+
B("appcues-checklist-wrapper", E);
|
|
1854
|
+
var Us = $`
|
|
1855
|
+
.page {
|
|
1856
|
+
display: block;
|
|
1857
|
+
width: 100%;
|
|
1858
|
+
height: 100%;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
.idle {
|
|
1862
|
+
display: none;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
.hidden {
|
|
1866
|
+
pointer-events: none;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.animated {
|
|
1870
|
+
position: absolute;
|
|
1871
|
+
top: 0;
|
|
1872
|
+
left: 0;
|
|
1873
|
+
}
|
|
1874
|
+
`, Ts = $`
|
|
1875
|
+
.slide-in-bottom {
|
|
1876
|
+
animation: slide-in-bottom 0.4s cubic-bezier(0.15, 1.03, 0.8, 1.03) forwards;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
@keyframes slide-in-bottom {
|
|
1880
|
+
0% {
|
|
1881
|
+
opacity: 0;
|
|
1882
|
+
transform: translateY(80%);
|
|
1883
|
+
}
|
|
1884
|
+
20% {
|
|
1885
|
+
opacity: 0;
|
|
1886
|
+
}
|
|
1887
|
+
100% {
|
|
1888
|
+
opacity: 1;
|
|
1889
|
+
transform: translateY(0);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
`, Ns = $`
|
|
1893
|
+
.slide-out-bottom {
|
|
1894
|
+
animation: slide-out-bottom 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
@keyframes slide-out-bottom {
|
|
1898
|
+
0% {
|
|
1899
|
+
opacity: 1;
|
|
1900
|
+
transform: translateY(0);
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
80% {
|
|
1904
|
+
opacity: 1;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
99% {
|
|
1908
|
+
transform: translateY(80%);
|
|
1909
|
+
opacity: 0;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
100% {
|
|
1913
|
+
display: none;
|
|
1914
|
+
max-height: 0;
|
|
1915
|
+
overflow: hidden;
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
`, Pt = class extends x {
|
|
1919
|
+
constructor() {
|
|
1920
|
+
super(...arguments), this.status = "idle", this.animation = "", this.minHeight = "auto";
|
|
1921
|
+
}
|
|
1922
|
+
show({ animation: i = "" } = {}) {
|
|
1923
|
+
i !== "" && (this.animation = i), this.status = "showing";
|
|
1924
|
+
}
|
|
1925
|
+
hide({ animation: i = "" } = {}) {
|
|
1926
|
+
i !== "" && (this.animation = i), this.status = "hidden";
|
|
1927
|
+
}
|
|
1928
|
+
render() {
|
|
1929
|
+
return _`
|
|
1930
|
+
<div
|
|
1931
|
+
class="page ${this.status} ${this.animation && "animated"} ${this.animation}"
|
|
1932
|
+
aria-hidden="${["hidden", "idle"].includes(this.status)}"
|
|
1933
|
+
>
|
|
1934
|
+
<slot></slot>
|
|
1935
|
+
</div>
|
|
1936
|
+
`;
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
Pt.styles = [Us, Ts, Ns];
|
|
1940
|
+
f([N()], Pt.prototype, "status");
|
|
1941
|
+
f([v()], Pt.prototype, "minHeight");
|
|
1942
|
+
B("appcues-page", Pt);
|
|
1943
|
+
var Is = $`
|
|
1944
|
+
.grow {
|
|
1945
|
+
animation: grow-min-height 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
|
|
1946
|
+
min-height: auto;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.shrink {
|
|
1950
|
+
animation: shrink-min-height 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
|
|
1951
|
+
}
|
|
1952
|
+
`, q = class extends x {
|
|
1953
|
+
constructor() {
|
|
1954
|
+
super(...arguments), this.currentPage = 0, this.pages = [], this.currentHeight = "auto", this.entry = "slide-in-bottom", this.exit = "slide-out-bottom";
|
|
1955
|
+
}
|
|
1956
|
+
getChildren() {
|
|
1957
|
+
return this.shadowRoot ? this.shadowRoot.querySelector("slot")?.assignedElements({ flatten: !0 }) ?? [] : [];
|
|
1958
|
+
}
|
|
1959
|
+
updateHeight(i = this.currentPage) {
|
|
1960
|
+
const t = this.pages[i].minHeight || "auto";
|
|
1961
|
+
this.currentHeight = t !== "auto" ? t : "auto";
|
|
1962
|
+
}
|
|
1963
|
+
showFirstPage() {
|
|
1964
|
+
this.updateHeight(), this.pages[this.currentPage].show();
|
|
1965
|
+
}
|
|
1966
|
+
prev() {
|
|
1967
|
+
this.currentPage <= 0 || (this.updateHeight(this.currentPage - 1), this.pages[this.currentPage].hide({ animation: this.exit }), this.pages[this.currentPage - 1].show(), this.currentPage -= 1);
|
|
1968
|
+
}
|
|
1969
|
+
next() {
|
|
1970
|
+
this.currentPage >= this.pages.length - 1 || (this.currentPage += 1, this.updateHeight(), this.pages[this.currentPage].show({ animation: this.entry }), this.pages[this.currentPage - 1].hide());
|
|
1971
|
+
}
|
|
1972
|
+
goTo(i = 0) {
|
|
1973
|
+
i !== this.currentPage && (this.pages[i].show({ animation: i !== 0 ? this.entry : "" }), this.pages[this.currentPage].hide({ animation: this.currentPage !== 0 ? this.exit : "" }), this.currentPage = i, this.updateHeight());
|
|
1974
|
+
}
|
|
1975
|
+
firstUpdated() {
|
|
1976
|
+
this.pages = this.getChildren(), this.showFirstPage();
|
|
1977
|
+
}
|
|
1978
|
+
connectedCallback() {
|
|
1979
|
+
super.connectedCallback();
|
|
1980
|
+
}
|
|
1981
|
+
render() {
|
|
1982
|
+
return _`
|
|
1983
|
+
<style>
|
|
1984
|
+
@keyframes grow-min-height {
|
|
1985
|
+
0% {
|
|
1986
|
+
min-height: 0;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
100% {
|
|
1990
|
+
min-height: ${this.currentHeight};
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
@keyframes shrink-min-height {
|
|
1995
|
+
0% {
|
|
1996
|
+
min-height: ${this.currentHeight};
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
100% {
|
|
2000
|
+
min-height: auto;
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
</style>
|
|
2004
|
+
<div
|
|
2005
|
+
class="${this.currentPage !== 0 ? "grow" : "shrink"}"
|
|
2006
|
+
style="position: relative;"
|
|
2007
|
+
>
|
|
2008
|
+
<slot></slot>
|
|
2009
|
+
</div>
|
|
2010
|
+
`;
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
q.styles = [Is];
|
|
2014
|
+
f([N()], q.prototype, "currentPage");
|
|
2015
|
+
f([N()], q.prototype, "pages");
|
|
2016
|
+
f([N()], q.prototype, "currentHeight");
|
|
2017
|
+
f([v()], q.prototype, "entry");
|
|
2018
|
+
f([v()], q.prototype, "exit");
|
|
2019
|
+
B("appcues-navigation-stack", q);
|
|
2020
|
+
var Os = Ct`
|
|
2021
|
+
<svg
|
|
2022
|
+
version="1.1"
|
|
2023
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2024
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2025
|
+
x="0px"
|
|
2026
|
+
y="0px"
|
|
2027
|
+
width="40px"
|
|
2028
|
+
height="40px"
|
|
2029
|
+
fill="#0072D6"
|
|
2030
|
+
viewBox="0 0 40 40"
|
|
2031
|
+
enable-background="new 0 0 40 40"
|
|
2032
|
+
xml:space="preserve"
|
|
2033
|
+
>
|
|
2034
|
+
<path
|
|
2035
|
+
opacity="0.2"
|
|
2036
|
+
fill="#0072D6"
|
|
2037
|
+
d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
|
|
2038
|
+
s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
|
|
2039
|
+
c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"
|
|
2040
|
+
/>
|
|
2041
|
+
<path
|
|
2042
|
+
fill="#0072D6"
|
|
2043
|
+
d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
|
|
2044
|
+
C22.32,8.481,24.301,9.057,26.013,10.047z"
|
|
2045
|
+
>
|
|
2046
|
+
<animateTransform
|
|
2047
|
+
attributeType="xml"
|
|
2048
|
+
attributeName="transform"
|
|
2049
|
+
type="rotate"
|
|
2050
|
+
from="0 20 20"
|
|
2051
|
+
to="360 20 20"
|
|
2052
|
+
keySplines="0.17 0.27 0.8 0.65"
|
|
2053
|
+
calcMode="spline"
|
|
2054
|
+
dur="0.6s"
|
|
2055
|
+
repeatCount="indefinite"
|
|
2056
|
+
keyTimes="0;1"
|
|
2057
|
+
/>
|
|
2058
|
+
</path>
|
|
2059
|
+
</svg>
|
|
2060
|
+
`, Hs = Ct`
|
|
2061
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
2062
|
+
<g id="material-icon" clip-path="url(#clip0_19386_6120)">
|
|
2063
|
+
<path
|
|
2064
|
+
id="Vector"
|
|
2065
|
+
d="M6.12522 8.00305L11.9239 13.8017C12.1702 14.048 12.2953 14.3528 12.2993 14.7161C12.3033 15.0794 12.1822 15.3842 11.9359 15.6305C11.6896 15.8769 11.3828 16 11.0155 16C10.6481 16 10.3413 15.8769 10.095 15.6305L3.93523 9.47075C3.7234 9.25892 3.57007 9.02893 3.47524 8.78077C3.38042 8.53262 3.33301 8.27338 3.33301 8.00305C3.33301 7.73273 3.38042 7.47349 3.47524 7.22534C3.57007 6.97718 3.7234 6.74719 3.93523 6.53536L10.095 0.375561C10.3413 0.129259 10.6461 0.00410428 11.0094 9.62603e-05C11.3727 -0.00391176 11.6776 0.117242 11.9239 0.363558C12.1702 0.60986 12.2933 0.916664 12.2933 1.28397C12.2933 1.65128 12.1702 1.95809 11.9239 2.20441L6.12522 8.00305Z"
|
|
2066
|
+
fill="currentColor"
|
|
2067
|
+
/>
|
|
2068
|
+
</g>
|
|
2069
|
+
</svg>
|
|
2070
|
+
`, Ve = Ct`
|
|
2071
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2072
|
+
<path
|
|
2073
|
+
fill="currentColor"
|
|
2074
|
+
d="M8.9 17.81a8.6 8.6 0 0 1-6.31-2.59A8.6 8.6 0 0 1 0 8.91c0-2.49.86-4.6 2.59-6.32A8.6 8.6 0 0 1 8.9 0a8.6 8.6 0 0 1 6.32 2.59A8.6 8.6 0 0 1 17.8 8.9a8.39 8.39 0 0 1-1.68 5.07l7.45 7.46c.28.29.42.65.42 1.07 0 .43-.14.78-.43 1.06-.29.29-.64.43-1.07.43-.43 0-.78-.14-1.07-.43L14 16.13a8.42 8.42 0 0 1-5.09 1.68Zm0-3.05c1.63 0 3.01-.57 4.15-1.7a5.65 5.65 0 0 0 1.7-4.15c0-1.63-.56-3.02-1.7-4.15a5.64 5.64 0 0 0-4.15-1.7c-1.63 0-3 .56-4.14 1.7a5.65 5.65 0 0 0-1.7 4.15c0 1.63.56 3 1.7 4.15a5.64 5.64 0 0 0 4.14 1.7Z"
|
|
2075
|
+
/>
|
|
2076
|
+
</svg>
|
|
2077
|
+
`, Ms = $`
|
|
2078
|
+
@keyframes fade-in {
|
|
2079
|
+
0% {
|
|
2080
|
+
opacity: 0;
|
|
2081
|
+
display: none;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
100% {
|
|
2085
|
+
opacity: 1;
|
|
2086
|
+
display: flex;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
@keyframes fade-out {
|
|
2091
|
+
0% {
|
|
2092
|
+
opacity: 1;
|
|
2093
|
+
display: flex;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
100% {
|
|
2097
|
+
opacity: 0;
|
|
2098
|
+
display: none;
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
@keyframes expand {
|
|
2103
|
+
0% {
|
|
2104
|
+
width: 0%;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
100% {
|
|
2108
|
+
width: 100%;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
@keyframes collapse {
|
|
2113
|
+
0% {
|
|
2114
|
+
width: 100%;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
100% {
|
|
2118
|
+
width: 0%;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
@keyframes slide-in {
|
|
2123
|
+
0% {
|
|
2124
|
+
transform: translateX(120px);
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
100% {
|
|
2128
|
+
transform: translateX(0);
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
@keyframes slide-out {
|
|
2133
|
+
0% {
|
|
2134
|
+
transform: translateX(0);
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
100% {
|
|
2138
|
+
transform: translateX(120px);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
`, Rs = $`
|
|
2142
|
+
:host {
|
|
2143
|
+
display: flex;
|
|
2144
|
+
width: 100%;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
.container {
|
|
2148
|
+
align-items: center;
|
|
2149
|
+
display: flex;
|
|
2150
|
+
height: 40px;
|
|
2151
|
+
justify-content: space-between;
|
|
2152
|
+
position: relative;
|
|
2153
|
+
width: 100%;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
svg {
|
|
2157
|
+
height: 16px;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
button {
|
|
2161
|
+
align-items: center;
|
|
2162
|
+
color: inherit;
|
|
2163
|
+
cursor: pointer;
|
|
2164
|
+
background: transparent;
|
|
2165
|
+
border: none;
|
|
2166
|
+
display: flex;
|
|
2167
|
+
justify-content: center;
|
|
2168
|
+
padding: 12px;
|
|
2169
|
+
}
|
|
2170
|
+
`, zs = $`
|
|
2171
|
+
.search-container {
|
|
2172
|
+
align-items: center;
|
|
2173
|
+
display: none;
|
|
2174
|
+
opacity: 0;
|
|
2175
|
+
position: absolute;
|
|
2176
|
+
width: calc(100% + 12px);
|
|
2177
|
+
left: -12px;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
.search-container input {
|
|
2181
|
+
border: none;
|
|
2182
|
+
border-start-start-radius: 8px;
|
|
2183
|
+
border-end-start-radius: 8px;
|
|
2184
|
+
border-start-end-radius: 0;
|
|
2185
|
+
border-end-end-radius: 0;
|
|
2186
|
+
box-sizing: border-box;
|
|
2187
|
+
height: 40px;
|
|
2188
|
+
padding: 8px 12px 8px 16px;
|
|
2189
|
+
width: 0;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
.search-container input:focus {
|
|
2193
|
+
outline: none;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
.search-container .search-form {
|
|
2197
|
+
display: flex;
|
|
2198
|
+
flex: 1;
|
|
2199
|
+
justify-content: flex-end;
|
|
2200
|
+
margin-bottom: 0;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
.search-container .search-button {
|
|
2204
|
+
background: white;
|
|
2205
|
+
border-start-end-radius: 8px;
|
|
2206
|
+
border-end-end-radius: 8px;
|
|
2207
|
+
border-start-start-radius: 0;
|
|
2208
|
+
border-end-start-radius: 0;
|
|
2209
|
+
padding: 0 12px;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
.search-container .search-button svg {
|
|
2213
|
+
width: 16px;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.search-container .search-button svg path {
|
|
2217
|
+
fill: black;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
.search-container.show {
|
|
2221
|
+
animation: fade-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2222
|
+
display: flex;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
.search-container.show input {
|
|
2226
|
+
animation: expand 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2227
|
+
width: 100%;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.search-container.hide {
|
|
2231
|
+
animation: fade-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
.search-container.hide input {
|
|
2235
|
+
animation: collapse 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2236
|
+
width: 0;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
.content-container {
|
|
2240
|
+
align-items: center;
|
|
2241
|
+
display: flex;
|
|
2242
|
+
height: 40px;
|
|
2243
|
+
justify-content: space-between;
|
|
2244
|
+
width: 100%;
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
.content-container .content {
|
|
2248
|
+
text-wrap: nowrap;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
.content-container.show {
|
|
2252
|
+
display: flex;
|
|
2253
|
+
animation: fade-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
.content-container.show .content {
|
|
2257
|
+
animation: slide-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
.content-container.hide {
|
|
2261
|
+
animation: fade-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
.content-container.hide .content {
|
|
2265
|
+
animation: slide-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
.search-bar {
|
|
2269
|
+
align-items: center;
|
|
2270
|
+
background: white;
|
|
2271
|
+
border: none;
|
|
2272
|
+
display: none;
|
|
2273
|
+
justify-content: flex-end;
|
|
2274
|
+
gap: 16px;
|
|
2275
|
+
width: 100%;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
.search-bar.show {
|
|
2279
|
+
display: flex;
|
|
2280
|
+
}
|
|
2281
|
+
`, Ut = class extends x {
|
|
2282
|
+
constructor() {
|
|
2283
|
+
super(...arguments), this.showSearchBar = null, this.loading = !1, this.handleSubmit = () => {
|
|
2284
|
+
const t = this.shadowRoot?.querySelector("input")?.value || "";
|
|
2285
|
+
this.dispatchEvent(new CustomEvent("onSearch", { detail: { inputValue: t }, bubbles: !0, composed: !0 })), this.requestUpdate();
|
|
2286
|
+
}, this.handleSearch = os(this.handleSubmit, 700);
|
|
2287
|
+
}
|
|
2288
|
+
setSearchMode(i) {
|
|
2289
|
+
this.showSearchBar = i;
|
|
2290
|
+
const t = this.shadowRoot?.querySelector("input");
|
|
2291
|
+
this.requestUpdate(), i ? setTimeout(() => {
|
|
2292
|
+
t?.focus();
|
|
2293
|
+
}, 100) : (this.dispatchEvent(new CustomEvent("onCancel", { bubbles: !0, composed: !0 })), t && (t.value = ""));
|
|
2294
|
+
}
|
|
2295
|
+
render() {
|
|
2296
|
+
return _`
|
|
2297
|
+
<div class="container">
|
|
2298
|
+
<div
|
|
2299
|
+
class="content-container ${this.showSearchBar === null ? "" : this.showSearchBar ? "hide" : "show"}"
|
|
2300
|
+
>
|
|
2301
|
+
<div class="content" style="${this.style}">
|
|
2302
|
+
<slot></slot>
|
|
2303
|
+
</div>
|
|
2304
|
+
<button @click="${() => this.setSearchMode(!0)}">
|
|
2305
|
+
${Ve}
|
|
2306
|
+
</button>
|
|
2307
|
+
</div>
|
|
2308
|
+
<div class="search-container ${this.showSearchBar ? "show" : "hide"}">
|
|
2309
|
+
<button
|
|
2310
|
+
class="return-button"
|
|
2311
|
+
@click="${() => this.setSearchMode(!1)}"
|
|
2312
|
+
>
|
|
2313
|
+
${Hs}
|
|
2314
|
+
</button>
|
|
2315
|
+
<form
|
|
2316
|
+
class="search-form"
|
|
2317
|
+
@submit="${(i) => {
|
|
2318
|
+
i.preventDefault(), this.handleSubmit();
|
|
2319
|
+
}}"
|
|
2320
|
+
>
|
|
2321
|
+
<input
|
|
2322
|
+
type="text"
|
|
2323
|
+
placeholder="Type to search"
|
|
2324
|
+
@keyup=${this.handleSearch}
|
|
2325
|
+
/>
|
|
2326
|
+
<button class="search-button" type="submit">
|
|
2327
|
+
${this.loading ? Os : Ve}
|
|
2328
|
+
</button>
|
|
2329
|
+
</form>
|
|
2330
|
+
</div>
|
|
2331
|
+
</div>
|
|
2332
|
+
`;
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
Ut.styles = [Ms, Rs, zs];
|
|
2336
|
+
f([N()], Ut.prototype, "showSearchBar");
|
|
2337
|
+
f([v({ converter: (i) => i === "true" })], Ut.prototype, "loading");
|
|
2338
|
+
B("appcues-search-header", Ut);
|
|
2339
|
+
var Ls = (i) => i && new DOMParser().parseFromString(i, "text/html").body.textContent || "", js = $`
|
|
2340
|
+
:host {
|
|
2341
|
+
height: 100%;
|
|
2342
|
+
display: block;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
* {
|
|
2346
|
+
margin: 0;
|
|
2347
|
+
padding: 0;
|
|
2348
|
+
box-sizing: border-box;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
.root-wrapper {
|
|
2352
|
+
height: 100%;
|
|
2353
|
+
box-shadow: var(--search-results-block-shadow);
|
|
2354
|
+
color: var(--search-results-block-color);
|
|
2355
|
+
background-color: var(--search-results-block-background-color);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
.content-wrapper {
|
|
2359
|
+
padding: 16px 16px 16px 16px;
|
|
2360
|
+
background: var(--search-results-block-content-wrapper-background-color);
|
|
2361
|
+
min-height: 100%;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
.content-wrapper .root-wrapper {
|
|
2365
|
+
height: auto;
|
|
2366
|
+
border-radius: var(--search-results-block-radius);
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
.root-wrapper[loading='true'] {
|
|
2370
|
+
overflow: hidden;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.alert-wrapper {
|
|
2374
|
+
display: flex;
|
|
2375
|
+
flex-direction: column;
|
|
2376
|
+
gap: 16px;
|
|
2377
|
+
align-items: center;
|
|
2378
|
+
justify-content: center;
|
|
2379
|
+
text-align: center;
|
|
2380
|
+
padding: 16px;
|
|
2381
|
+
}
|
|
2382
|
+
`, Bs = $`
|
|
2383
|
+
.pagination-btn {
|
|
2384
|
+
align-items: center;
|
|
2385
|
+
background: transparent;
|
|
2386
|
+
border-bottom-left-radius: var(--search-results-block-radius);
|
|
2387
|
+
border-bottom-right-radius: var(--search-results-block-radius);
|
|
2388
|
+
border-top: 1px solid rgba(66, 86, 120, 0.1);
|
|
2389
|
+
border-left: none;
|
|
2390
|
+
border-right: none;
|
|
2391
|
+
border-bottom: none;
|
|
2392
|
+
cursor: pointer;
|
|
2393
|
+
display: flex;
|
|
2394
|
+
font-size: 14px;
|
|
2395
|
+
font-weight: 500;
|
|
2396
|
+
justify-content: center;
|
|
2397
|
+
line-height: 24px;
|
|
2398
|
+
padding: 8px 16px;
|
|
2399
|
+
width: 100%;
|
|
2400
|
+
position: relative;
|
|
2401
|
+
top: 1px;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
.pagination-btn:hover {
|
|
2405
|
+
background: var(--search-results-block-background-color-hover);
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
.pagination-btn:focus {
|
|
2409
|
+
outline: 2px solid var(--search-results-block-outline-color);
|
|
2410
|
+
background: var(--search-results-block-background-color-active);
|
|
2411
|
+
}
|
|
2412
|
+
`, Ds = $`
|
|
2413
|
+
.article-main-title-wrapper {
|
|
2414
|
+
padding: 8px 16px;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
.article-main-title {
|
|
2418
|
+
font-size: 15px;
|
|
2419
|
+
font-style: normal;
|
|
2420
|
+
font-weight: 700;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.article-list {
|
|
2424
|
+
font-style: normal;
|
|
2425
|
+
display: flex;
|
|
2426
|
+
flex-direction: column;
|
|
2427
|
+
gap: 4px;
|
|
2428
|
+
list-style: none;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
.article-list a {
|
|
2432
|
+
text-decoration: none;
|
|
2433
|
+
display: flex;
|
|
2434
|
+
flex-direction: column;
|
|
2435
|
+
gap: 8px;
|
|
2436
|
+
padding: 8px 16px;
|
|
2437
|
+
color: currentColor;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
.article-list a[loading='false']:hover {
|
|
2441
|
+
background-color: var(--search-results-block-background-color-hover);
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
.article-list a[loading='false']:focus {
|
|
2445
|
+
outline: 2px solid var(--search-results-block-outline-color);
|
|
2446
|
+
background: var(--search-results-block-background-color-active);
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
.article-title-wrapper {
|
|
2450
|
+
font-size: 14px;
|
|
2451
|
+
font-weight: bold;
|
|
2452
|
+
line-height: 160%;
|
|
2453
|
+
display: flex;
|
|
2454
|
+
gap: 8px;
|
|
2455
|
+
align-items: center;
|
|
2456
|
+
justify-content: space-between;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
.article-title-wrapper p {
|
|
2460
|
+
text-overflow: ellipsis;
|
|
2461
|
+
display: -webkit-box;
|
|
2462
|
+
-webkit-line-clamp: 2;
|
|
2463
|
+
-webkit-box-orient: vertical;
|
|
2464
|
+
overflow: hidden;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
.article-title-wrapper svg {
|
|
2468
|
+
min-width: 12px;
|
|
2469
|
+
min-height: 12px;
|
|
2470
|
+
width: 12px;
|
|
2471
|
+
height: 12px;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.article-title-wrapper.loading {
|
|
2475
|
+
width: 70%;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
.article-description {
|
|
2479
|
+
font-size: 13px;
|
|
2480
|
+
font-weight: normal;
|
|
2481
|
+
line-height: 160%;
|
|
2482
|
+
text-overflow: ellipsis;
|
|
2483
|
+
display: -webkit-box;
|
|
2484
|
+
-webkit-line-clamp: 3;
|
|
2485
|
+
-webkit-box-orient: vertical;
|
|
2486
|
+
overflow: hidden;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
.article-description.loading {
|
|
2490
|
+
height: 50px;
|
|
2491
|
+
}
|
|
2492
|
+
`, qs = $`
|
|
2493
|
+
@keyframes animatedBackgroundPosition {
|
|
2494
|
+
0% {
|
|
2495
|
+
background-position: 0% 92%;
|
|
2496
|
+
}
|
|
2497
|
+
100% {
|
|
2498
|
+
background-position: 100% 9%;
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
.loading {
|
|
2503
|
+
opacity: 0.5;
|
|
2504
|
+
background: linear-gradient(
|
|
2505
|
+
135deg,
|
|
2506
|
+
rgba(211, 223, 232, 0.5) 30%,
|
|
2507
|
+
rgba(169, 184, 197, 0.5) 38%,
|
|
2508
|
+
rgba(168, 182, 193, 0.6) 41%,
|
|
2509
|
+
rgba(168, 182, 193, 0.6) 50%,
|
|
2510
|
+
rgba(168, 182, 193, 0.6) 50%,
|
|
2511
|
+
rgba(169, 184, 197, 0.6) 51%,
|
|
2512
|
+
rgba(211, 223, 232, 0.6) 57%,
|
|
2513
|
+
rgba(211, 223, 232, 0.6) 80%,
|
|
2514
|
+
rgba(211, 223, 232, 0.6) 80%
|
|
2515
|
+
);
|
|
2516
|
+
background-size: 1200% 1200%;
|
|
2517
|
+
animation: animatedBackgroundPosition 3s ease infinite reverse;
|
|
2518
|
+
color: transparent;
|
|
2519
|
+
}
|
|
2520
|
+
`, Vs = Ye`
|
|
2521
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2522
|
+
<g id="Icon">
|
|
2523
|
+
<path id="Vector" d="M11.4752 14.475L7.8502 10.85C7.8002 10.8 7.7627 10.7458 7.7377 10.6875C7.7127 10.6292 7.7002 10.5667 7.7002 10.5C7.7002 10.3667 7.74603 10.25 7.8377 10.15C7.92936 10.05 8.0502 10 8.2002 10H15.8002C15.9502 10 16.071 10.05 16.1627 10.15C16.2544 10.25 16.3002 10.3667 16.3002 10.5C16.3002 10.5333 16.2502 10.65 16.1502 10.85L12.5252 14.475C12.4419 14.5583 12.3585 14.6167 12.2752 14.65C12.1919 14.6833 12.1002 14.7 12.0002 14.7C11.9002 14.7 11.8085 14.6833 11.7252 14.65C11.6419 14.6167 11.5585 14.5583 11.4752 14.475Z" fill="currentColor"/>
|
|
2524
|
+
</g>
|
|
2525
|
+
</svg>
|
|
2526
|
+
`, Ws = Ye`
|
|
2527
|
+
<svg
|
|
2528
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2529
|
+
width="12px"
|
|
2530
|
+
height="12px"
|
|
2531
|
+
viewBox="0 0 24 24"
|
|
2532
|
+
fill="none"
|
|
2533
|
+
aria-hidden
|
|
2534
|
+
>
|
|
2535
|
+
<path
|
|
2536
|
+
d="M3.44444 23C2.77222 23 2.19676 22.7606 1.71806 22.2819C1.23935 21.8032 1 21.2278 1 20.5556V3.44444C1 2.77222 1.23935 2.19676 1.71806 1.71806C2.19676 1.23935 2.77222 1 3.44444 1H10.7778C11.1241 1 11.4144 1.11713 11.6486 1.35139C11.8829 1.58565 12 1.87593 12 2.22222C12 2.56852 11.8829 2.8588 11.6486 3.09306C11.4144 3.32731 11.1241 3.44444 10.7778 3.44444H3.44444V20.5556H20.5556V13.2222C20.5556 12.8759 20.6727 12.5856 20.9069 12.3514C21.1412 12.1171 21.4315 12 21.7778 12C22.1241 12 22.4144 12.1171 22.6486 12.3514C22.8829 12.5856 23 12.8759 23 13.2222V20.5556C23 21.2278 22.7606 21.8032 22.2819 22.2819C21.8032 22.7606 21.2278 23 20.5556 23H3.44444ZM20.5556 5.15556L10.0444 15.6667C9.82037 15.8907 9.53518 16.0028 9.18889 16.0028C8.84259 16.0028 8.55741 15.8907 8.33333 15.6667C8.10926 15.4426 7.99722 15.1574 7.99722 14.8111C7.99722 14.4648 8.10926 14.1796 8.33333 13.9556L18.8444 3.44444H15.6667C15.3204 3.44444 15.0301 3.32731 14.7958 3.09306C14.5616 2.8588 14.4444 2.56852 14.4444 2.22222C14.4444 1.87593 14.5616 1.58565 14.7958 1.35139C15.0301 1.11713 15.3204 1 15.6667 1H21.7778C22.1241 1 22.4144 1.11713 22.6486 1.35139C22.8829 1.58565 23 1.87593 23 2.22222V8.33333C23 8.67963 22.8829 8.96991 22.6486 9.20417C22.4144 9.43843 22.1241 9.55556 21.7778 9.55556C21.4315 9.55556 21.1412 9.43843 20.9069 9.20417C20.6727 8.96991 20.5556 8.67963 20.5556 8.33333V5.15556Z"
|
|
2537
|
+
fill="currentColor"
|
|
2538
|
+
/>
|
|
2539
|
+
</svg>
|
|
2540
|
+
`, V = class extends x {
|
|
2541
|
+
constructor() {
|
|
2542
|
+
super(...arguments), this.state = "empty", this.searchTerm = "", this.hasNextPage = !1, this.pageSize = 10, this.results = [], this.handleRequestNextPage = () => {
|
|
2543
|
+
this.dispatchEvent(new CustomEvent("onRequestNextPage", { bubbles: !0, composed: !0 }));
|
|
2544
|
+
}, this.handleLinkClicked = (i) => () => {
|
|
2545
|
+
this.dispatchEvent(new CustomEvent("onLinkClicked", { bubbles: !0, composed: !0, detail: i }));
|
|
2546
|
+
}, this.mockResultData = () => {
|
|
2547
|
+
this.results = Array.from({ length: this.pageSize }).map((i, t) => ({ url: `url ${t}`, excerpt: `excerpt ${t}`, title: `title ${t}` }));
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2550
|
+
connectedCallback() {
|
|
2551
|
+
super.connectedCallback(), this.state === "loading" && this.mockResultData();
|
|
2552
|
+
}
|
|
2553
|
+
attributeChangedCallback(i, t, e) {
|
|
2554
|
+
super.attributeChangedCallback(i, t, e), i === "state" && (e === "loading" && this.mockResultData(), this.state = e);
|
|
2555
|
+
}
|
|
2556
|
+
render() {
|
|
2557
|
+
return this.state === "empty" ? _`
|
|
2558
|
+
<div class="root-wrapper alert-wrapper">
|
|
2559
|
+
<p>No results for '${this.searchTerm}'</p>
|
|
2560
|
+
</div>
|
|
2561
|
+
` : this.state === "error" ? _`
|
|
2562
|
+
<div class="root-wrapper alert-wrapper">
|
|
2563
|
+
<p>We could not load the results</p>
|
|
2564
|
+
<p>Try again later</p>
|
|
2565
|
+
</div>
|
|
2566
|
+
` : _`
|
|
2567
|
+
<div class="content-wrapper">
|
|
2568
|
+
<div class="root-wrapper" loading="${this.state === "loading"}">
|
|
2569
|
+
<ul class="article-list">
|
|
2570
|
+
${this.results.map((i) => _`
|
|
2571
|
+
<li @click=${this.handleLinkClicked(i)}>
|
|
2572
|
+
<a
|
|
2573
|
+
href="${i.url}"
|
|
2574
|
+
target="_blank"
|
|
2575
|
+
rel="noopener noreferrer"
|
|
2576
|
+
loading="${this.state === "loading"}"
|
|
2577
|
+
>
|
|
2578
|
+
<div class="article-title-wrapper ${this.state}">
|
|
2579
|
+
<p>${i.title}</p>
|
|
2580
|
+
${Ws}
|
|
2581
|
+
</div>
|
|
2582
|
+
<p class="article-description ${this.state}">
|
|
2583
|
+
${Ls(i.excerpt)}
|
|
2584
|
+
</p>
|
|
2585
|
+
</a>
|
|
2586
|
+
</li>
|
|
2587
|
+
`)}
|
|
2588
|
+
</ul>
|
|
2589
|
+
|
|
2590
|
+
${this.hasNextPage && this.state !== "loading" ? _`
|
|
2591
|
+
<button
|
|
2592
|
+
class="pagination-btn"
|
|
2593
|
+
@click=${this.handleRequestNextPage}
|
|
2594
|
+
>
|
|
2595
|
+
See more ${this.results.length} results ${Vs}
|
|
2596
|
+
</button>
|
|
2597
|
+
` : _``}
|
|
2598
|
+
</div>
|
|
2599
|
+
</div>
|
|
2600
|
+
`;
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
V.styles = [js, Ds, qs, Bs];
|
|
2604
|
+
f([v()], V.prototype, "state");
|
|
2605
|
+
f([v()], V.prototype, "searchTerm");
|
|
2606
|
+
f([v({ converter: (i) => i === "true" })], V.prototype, "hasNextPage");
|
|
2607
|
+
f([v()], V.prototype, "pageSize");
|
|
2608
|
+
f([v({ type: Array })], V.prototype, "results");
|
|
2609
|
+
B("appcues-search-results", V);
|