@appcues/web-sdk 7.13.3 → 7.15.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.
@@ -1,2137 +0,0 @@
1
- import { c as ut, g as Ve, o as We, a as Ze, n as te, b as Fe } from "./index.DIKlkbGK.js";
2
- const pt = window, Vt = pt.ShadowRoot && (pt.ShadyCSS === void 0 || pt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Wt = /* @__PURE__ */ Symbol(), ee = /* @__PURE__ */ new WeakMap();
3
- let xe = class {
4
- constructor(t, i, s) {
5
- if (this._$cssResult$ = !0, s !== Wt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
6
- this.cssText = t, this.t = i;
7
- }
8
- get styleSheet() {
9
- let t = this.o;
10
- const i = this.t;
11
- if (Vt && t === void 0) {
12
- const s = i !== void 0 && i.length === 1;
13
- s && (t = ee.get(i)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && ee.set(i, t));
14
- }
15
- return t;
16
- }
17
- toString() {
18
- return this.cssText;
19
- }
20
- };
21
- const Je = (e) => new xe(typeof e == "string" ? e : e + "", void 0, Wt), $ = (e, ...t) => {
22
- const i = e.length === 1 ? e[0] : t.reduce(((s, r, o) => s + ((n) => {
23
- if (n._$cssResult$ === !0) return n.cssText;
24
- if (typeof n == "number") return n;
25
- 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.");
26
- })(r) + e[o + 1]), e[0]);
27
- return new xe(i, e, Wt);
28
- }, Xe = (e, t) => {
29
- Vt ? e.adoptedStyleSheets = t.map(((i) => i instanceof CSSStyleSheet ? i : i.styleSheet)) : t.forEach(((i) => {
30
- const s = document.createElement("style"), r = pt.litNonce;
31
- r !== void 0 && s.setAttribute("nonce", r), s.textContent = i.cssText, e.appendChild(s);
32
- }));
33
- }, ie = Vt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
34
- let i = "";
35
- for (const s of t.cssRules) i += s.cssText;
36
- return Je(i);
37
- })(e) : e;
38
- var Et;
39
- const gt = window, se = gt.trustedTypes, Ye = se ? se.emptyScript : "", re = gt.reactiveElementPolyfillSupport, Ot = { toAttribute(e, t) {
40
- switch (t) {
41
- case Boolean:
42
- e = e ? Ye : null;
43
- break;
44
- case Object:
45
- case Array:
46
- e = e == null ? e : JSON.stringify(e);
47
- }
48
- return e;
49
- }, fromAttribute(e, t) {
50
- let i = e;
51
- switch (t) {
52
- case Boolean:
53
- i = e !== null;
54
- break;
55
- case Number:
56
- i = e === null ? null : Number(e);
57
- break;
58
- case Object:
59
- case Array:
60
- try {
61
- i = JSON.parse(e);
62
- } catch {
63
- i = null;
64
- }
65
- }
66
- return i;
67
- } }, Zt = (e, t) => t !== e && (t == t || e == e), Tt = { attribute: !0, type: String, converter: Ot, reflect: !1, hasChanged: Zt }, jt = "finalized";
68
- let F = class extends HTMLElement {
69
- constructor() {
70
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
71
- }
72
- static addInitializer(t) {
73
- var i;
74
- this.finalize(), ((i = this.h) !== null && i !== void 0 ? i : this.h = []).push(t);
75
- }
76
- static get observedAttributes() {
77
- this.finalize();
78
- const t = [];
79
- return this.elementProperties.forEach(((i, s) => {
80
- const r = this._$Ep(s, i);
81
- r !== void 0 && (this._$Ev.set(r, s), t.push(r));
82
- })), t;
83
- }
84
- static createProperty(t, i = Tt) {
85
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
86
- const s = typeof t == "symbol" ? /* @__PURE__ */ Symbol() : "__" + t, r = this.getPropertyDescriptor(t, s, i);
87
- r !== void 0 && Object.defineProperty(this.prototype, t, r);
88
- }
89
- }
90
- static getPropertyDescriptor(t, i, s) {
91
- return { get() {
92
- return this[i];
93
- }, set(r) {
94
- const o = this[t];
95
- this[i] = r, this.requestUpdate(t, o, s);
96
- }, configurable: !0, enumerable: !0 };
97
- }
98
- static getPropertyOptions(t) {
99
- return this.elementProperties.get(t) || Tt;
100
- }
101
- static finalize() {
102
- if (this.hasOwnProperty(jt)) return !1;
103
- this[jt] = !0;
104
- const t = Object.getPrototypeOf(this);
105
- 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")) {
106
- const i = this.properties, s = [...Object.getOwnPropertyNames(i), ...Object.getOwnPropertySymbols(i)];
107
- for (const r of s) this.createProperty(r, i[r]);
108
- }
109
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
110
- }
111
- static finalizeStyles(t) {
112
- const i = [];
113
- if (Array.isArray(t)) {
114
- const s = new Set(t.flat(1 / 0).reverse());
115
- for (const r of s) i.unshift(ie(r));
116
- } else t !== void 0 && i.push(ie(t));
117
- return i;
118
- }
119
- static _$Ep(t, i) {
120
- const s = i.attribute;
121
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
122
- }
123
- _$Eu() {
124
- var t;
125
- this._$E_ = new Promise(((i) => this.enableUpdating = i)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach(((i) => i(this)));
126
- }
127
- addController(t) {
128
- var i, s;
129
- ((i = this._$ES) !== null && i !== void 0 ? i : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
130
- }
131
- removeController(t) {
132
- var i;
133
- (i = this._$ES) === null || i === void 0 || i.splice(this._$ES.indexOf(t) >>> 0, 1);
134
- }
135
- _$Eg() {
136
- this.constructor.elementProperties.forEach(((t, i) => {
137
- this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
138
- }));
139
- }
140
- createRenderRoot() {
141
- var t;
142
- const i = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
143
- return Xe(i, this.constructor.elementStyles), i;
144
- }
145
- connectedCallback() {
146
- var t;
147
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach(((i) => {
148
- var s;
149
- return (s = i.hostConnected) === null || s === void 0 ? void 0 : s.call(i);
150
- }));
151
- }
152
- enableUpdating(t) {
153
- }
154
- disconnectedCallback() {
155
- var t;
156
- (t = this._$ES) === null || t === void 0 || t.forEach(((i) => {
157
- var s;
158
- return (s = i.hostDisconnected) === null || s === void 0 ? void 0 : s.call(i);
159
- }));
160
- }
161
- attributeChangedCallback(t, i, s) {
162
- this._$AK(t, s);
163
- }
164
- _$EO(t, i, s = Tt) {
165
- var r;
166
- const o = this.constructor._$Ep(t, s);
167
- if (o !== void 0 && s.reflect === !0) {
168
- const n = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : Ot).toAttribute(i, s.type);
169
- this._$El = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$El = null;
170
- }
171
- }
172
- _$AK(t, i) {
173
- var s;
174
- const r = this.constructor, o = r._$Ev.get(t);
175
- if (o !== void 0 && this._$El !== o) {
176
- 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 : Ot;
177
- this._$El = o, this[o] = l.fromAttribute(i, n.type), this._$El = null;
178
- }
179
- }
180
- requestUpdate(t, i, s) {
181
- let r = !0;
182
- t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || Zt)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), 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());
183
- }
184
- async _$Ej() {
185
- this.isUpdatePending = !0;
186
- try {
187
- await this._$E_;
188
- } catch (i) {
189
- Promise.reject(i);
190
- }
191
- const t = this.scheduleUpdate();
192
- return t != null && await t, !this.isUpdatePending;
193
- }
194
- scheduleUpdate() {
195
- return this.performUpdate();
196
- }
197
- performUpdate() {
198
- var t;
199
- if (!this.isUpdatePending) return;
200
- this.hasUpdated, this._$Ei && (this._$Ei.forEach(((r, o) => this[o] = r)), this._$Ei = void 0);
201
- let i = !1;
202
- const s = this._$AL;
203
- try {
204
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach(((r) => {
205
- var o;
206
- return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
207
- })), this.update(s)) : this._$Ek();
208
- } catch (r) {
209
- throw i = !1, this._$Ek(), r;
210
- }
211
- i && this._$AE(s);
212
- }
213
- willUpdate(t) {
214
- }
215
- _$AE(t) {
216
- var i;
217
- (i = this._$ES) === null || i === void 0 || i.forEach(((s) => {
218
- var r;
219
- return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
220
- })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
221
- }
222
- _$Ek() {
223
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
224
- }
225
- get updateComplete() {
226
- return this.getUpdateComplete();
227
- }
228
- getUpdateComplete() {
229
- return this._$E_;
230
- }
231
- shouldUpdate(t) {
232
- return !0;
233
- }
234
- update(t) {
235
- this._$EC !== void 0 && (this._$EC.forEach(((i, s) => this._$EO(s, this[s], i))), this._$EC = void 0), this._$Ek();
236
- }
237
- updated(t) {
238
- }
239
- firstUpdated(t) {
240
- }
241
- };
242
- F[jt] = !0, F.elementProperties = /* @__PURE__ */ new Map(), F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, re?.({ ReactiveElement: F }), ((Et = gt.reactiveElementVersions) !== null && Et !== void 0 ? Et : gt.reactiveElementVersions = []).push("1.6.3");
243
- var It;
244
- const vt = window, J = vt.trustedTypes, ne = J ? J.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, zt = "$lit$", I = `lit$${(Math.random() + "").slice(9)}$`, Ae = "?" + I, Ke = `<${Ae}>`, O = document, nt = () => O.createComment(""), ot = (e) => e === null || typeof e != "object" && typeof e != "function", ke = Array.isArray, Ge = (e) => ke(e) || typeof e?.[Symbol.iterator] == "function", Ht = `[
245
- \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, oe = /-->/g, ae = />/g, M = RegExp(`>|${Ht}(?:([^\\s"'>=/]+)(${Ht}*=${Ht}*(?:[^
246
- \f\r"'\`<>=]|("|')|))|$)`, "g"), le = /'/g, he = /"/g, Ce = /^(?:script|style|textarea|title)$/i, Se = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }), w = Se(1), Ee = Se(2), j = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), ce = /* @__PURE__ */ new WeakMap(), R = O.createTreeWalker(O, 129, null, !1);
247
- function Te(e, t) {
248
- if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
249
- return ne !== void 0 ? ne.createHTML(t) : t;
250
- }
251
- const Qe = (e, t) => {
252
- const i = e.length - 1, s = [];
253
- let r, o = t === 2 ? "<svg>" : "", n = it;
254
- for (let l = 0; l < i; l++) {
255
- const a = e[l];
256
- let c, h, d = -1, p = 0;
257
- for (; p < a.length && (n.lastIndex = p, h = n.exec(a), h !== null); ) p = n.lastIndex, n === it ? h[1] === "!--" ? n = oe : h[1] !== void 0 ? n = ae : h[2] !== void 0 ? (Ce.test(h[2]) && (r = RegExp("</" + h[2], "g")), n = M) : h[3] !== void 0 && (n = M) : n === M ? h[0] === ">" ? (n = r ?? it, d = -1) : h[1] === void 0 ? d = -2 : (d = n.lastIndex - h[2].length, c = h[1], n = h[3] === void 0 ? M : h[3] === '"' ? he : le) : n === he || n === le ? n = M : n === oe || n === ae ? n = it : (n = M, r = void 0);
258
- const y = n === M && e[l + 1].startsWith("/>") ? " " : "";
259
- o += n === it ? a + Ke : d >= 0 ? (s.push(c), a.slice(0, d) + zt + a.slice(d) + I + y) : a + I + (d === -2 ? (s.push(void 0), l) : y);
260
- }
261
- return [Te(e, o + (e[i] || "<?>") + (t === 2 ? "</svg>" : "")), s];
262
- };
263
- let Bt = class Ie {
264
- constructor({ strings: t, _$litType$: i }, s) {
265
- let r;
266
- this.parts = [];
267
- let o = 0, n = 0;
268
- const l = t.length - 1, a = this.parts, [c, h] = Qe(t, i);
269
- if (this.el = Ie.createElement(c, s), R.currentNode = this.el.content, i === 2) {
270
- const d = this.el.content, p = d.firstChild;
271
- p.remove(), d.append(...p.childNodes);
272
- }
273
- for (; (r = R.nextNode()) !== null && a.length < l; ) {
274
- if (r.nodeType === 1) {
275
- if (r.hasAttributes()) {
276
- const d = [];
277
- for (const p of r.getAttributeNames()) if (p.endsWith(zt) || p.startsWith(I)) {
278
- const y = h[n++];
279
- if (d.push(p), y !== void 0) {
280
- const S = r.getAttribute(y.toLowerCase() + zt).split(I), E = /([.?@])?(.*)/.exec(y);
281
- a.push({ type: 1, index: o, name: E[2], strings: S, ctor: E[1] === "." ? ei : E[1] === "?" ? si : E[1] === "@" ? ri : bt });
282
- } else a.push({ type: 6, index: o });
283
- }
284
- for (const p of d) r.removeAttribute(p);
285
- }
286
- if (Ce.test(r.tagName)) {
287
- const d = r.textContent.split(I), p = d.length - 1;
288
- if (p > 0) {
289
- r.textContent = J ? J.emptyScript : "";
290
- for (let y = 0; y < p; y++) r.append(d[y], nt()), R.nextNode(), a.push({ type: 2, index: ++o });
291
- r.append(d[p], nt());
292
- }
293
- }
294
- } else if (r.nodeType === 8) if (r.data === Ae) a.push({ type: 2, index: o });
295
- else {
296
- let d = -1;
297
- for (; (d = r.data.indexOf(I, d + 1)) !== -1; ) a.push({ type: 7, index: o }), d += I.length - 1;
298
- }
299
- o++;
300
- }
301
- }
302
- static createElement(t, i) {
303
- const s = O.createElement("template");
304
- return s.innerHTML = t, s;
305
- }
306
- };
307
- function X(e, t, i = e, s) {
308
- var r, o, n, l;
309
- if (t === j) return t;
310
- let a = s !== void 0 ? (r = i._$Co) === null || r === void 0 ? void 0 : r[s] : i._$Cl;
311
- const c = ot(t) ? void 0 : t._$litDirective$;
312
- return a?.constructor !== c && ((o = a?._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(e), a._$AT(e, i, s)), s !== void 0 ? ((n = (l = i)._$Co) !== null && n !== void 0 ? n : l._$Co = [])[s] = a : i._$Cl = a), a !== void 0 && (t = X(e, a._$AS(e, t.values), a, s)), t;
313
- }
314
- class ti {
315
- constructor(t, i) {
316
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
317
- }
318
- get parentNode() {
319
- return this._$AM.parentNode;
320
- }
321
- get _$AU() {
322
- return this._$AM._$AU;
323
- }
324
- u(t) {
325
- var i;
326
- const { el: { content: s }, parts: r } = this._$AD, o = ((i = t?.creationScope) !== null && i !== void 0 ? i : O).importNode(s, !0);
327
- R.currentNode = o;
328
- let n = R.nextNode(), l = 0, a = 0, c = r[0];
329
- for (; c !== void 0; ) {
330
- if (l === c.index) {
331
- let h;
332
- c.type === 2 ? h = new Ft(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];
333
- }
334
- l !== c?.index && (n = R.nextNode(), l++);
335
- }
336
- return R.currentNode = O, o;
337
- }
338
- v(t) {
339
- let i = 0;
340
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
341
- }
342
- }
343
- let Ft = class He {
344
- constructor(t, i, s, r) {
345
- var o;
346
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = r, this._$Cp = (o = r?.isConnected) === null || o === void 0 || o;
347
- }
348
- get _$AU() {
349
- var t, i;
350
- return (i = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && i !== void 0 ? i : this._$Cp;
351
- }
352
- get parentNode() {
353
- let t = this._$AA.parentNode;
354
- const i = this._$AM;
355
- return i !== void 0 && t?.nodeType === 11 && (t = i.parentNode), t;
356
- }
357
- get startNode() {
358
- return this._$AA;
359
- }
360
- get endNode() {
361
- return this._$AB;
362
- }
363
- _$AI(t, i = this) {
364
- t = X(this, t, i), ot(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ge(t) ? this.T(t) : this._(t);
365
- }
366
- k(t) {
367
- return this._$AA.parentNode.insertBefore(t, this._$AB);
368
- }
369
- $(t) {
370
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
371
- }
372
- _(t) {
373
- this._$AH !== m && ot(this._$AH) ? this._$AA.nextSibling.data = t : this.$(O.createTextNode(t)), this._$AH = t;
374
- }
375
- g(t) {
376
- var i;
377
- const { values: s, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Bt.createElement(Te(r.h, r.h[0]), this.options)), r);
378
- if (((i = this._$AH) === null || i === void 0 ? void 0 : i._$AD) === o) this._$AH.v(s);
379
- else {
380
- const n = new ti(o, this), l = n.u(this.options);
381
- n.v(s), this.$(l), this._$AH = n;
382
- }
383
- }
384
- _$AC(t) {
385
- let i = ce.get(t.strings);
386
- return i === void 0 && ce.set(t.strings, i = new Bt(t)), i;
387
- }
388
- T(t) {
389
- ke(this._$AH) || (this._$AH = [], this._$AR());
390
- const i = this._$AH;
391
- let s, r = 0;
392
- for (const o of t) r === i.length ? i.push(s = new He(this.k(nt()), this.k(nt()), this, this.options)) : s = i[r], s._$AI(o), r++;
393
- r < i.length && (this._$AR(s && s._$AB.nextSibling, r), i.length = r);
394
- }
395
- _$AR(t = this._$AA.nextSibling, i) {
396
- var s;
397
- for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, i); t && t !== this._$AB; ) {
398
- const r = t.nextSibling;
399
- t.remove(), t = r;
400
- }
401
- }
402
- setConnected(t) {
403
- var i;
404
- this._$AM === void 0 && (this._$Cp = t, (i = this._$AP) === null || i === void 0 || i.call(this, t));
405
- }
406
- }, bt = class {
407
- constructor(t, i, s, r, o) {
408
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = i, 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 = m;
409
- }
410
- get tagName() {
411
- return this.element.tagName;
412
- }
413
- get _$AU() {
414
- return this._$AM._$AU;
415
- }
416
- _$AI(t, i = this, s, r) {
417
- const o = this.strings;
418
- let n = !1;
419
- if (o === void 0) t = X(this, t, i, 0), n = !ot(t) || t !== this._$AH && t !== j, n && (this._$AH = t);
420
- else {
421
- const l = t;
422
- let a, c;
423
- for (t = o[0], a = 0; a < o.length - 1; a++) c = X(this, l[s + a], i, a), c === j && (c = this._$AH[a]), n || (n = !ot(c) || c !== this._$AH[a]), c === m ? t = m : t !== m && (t += (c ?? "") + o[a + 1]), this._$AH[a] = c;
424
- }
425
- n && !r && this.j(t);
426
- }
427
- j(t) {
428
- t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
429
- }
430
- }, ei = class extends bt {
431
- constructor() {
432
- super(...arguments), this.type = 3;
433
- }
434
- j(t) {
435
- this.element[this.name] = t === m ? void 0 : t;
436
- }
437
- };
438
- const ii = J ? J.emptyScript : "";
439
- let si = class extends bt {
440
- constructor() {
441
- super(...arguments), this.type = 4;
442
- }
443
- j(t) {
444
- t && t !== m ? this.element.setAttribute(this.name, ii) : this.element.removeAttribute(this.name);
445
- }
446
- };
447
- class ri extends bt {
448
- constructor(t, i, s, r, o) {
449
- super(t, i, s, r, o), this.type = 5;
450
- }
451
- _$AI(t, i = this) {
452
- var s;
453
- if ((t = (s = X(this, t, i, 0)) !== null && s !== void 0 ? s : m) === j) return;
454
- const r = this._$AH, o = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== m && (r === m || o);
455
- o && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
456
- }
457
- handleEvent(t) {
458
- var i, s;
459
- typeof this._$AH == "function" ? this._$AH.call((s = (i = this.options) === null || i === void 0 ? void 0 : i.host) !== null && s !== void 0 ? s : this.element, t) : this._$AH.handleEvent(t);
460
- }
461
- }
462
- let ni = class {
463
- constructor(t, i, s) {
464
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
465
- }
466
- get _$AU() {
467
- return this._$AM._$AU;
468
- }
469
- _$AI(t) {
470
- X(this, t);
471
- }
472
- };
473
- const de = vt.litHtmlPolyfillSupport;
474
- de?.(Bt, Ft), ((It = vt.litHtmlVersions) !== null && It !== void 0 ? It : vt.litHtmlVersions = []).push("2.8.0");
475
- const oi = (e, t, i) => {
476
- var s, r;
477
- const o = (s = i?.renderBefore) !== null && s !== void 0 ? s : t;
478
- let n = o._$litPart$;
479
- if (n === void 0) {
480
- const l = (r = i?.renderBefore) !== null && r !== void 0 ? r : null;
481
- o._$litPart$ = n = new Ft(t.insertBefore(nt(), l), l, void 0, i ?? {});
482
- }
483
- return n._$AI(e), n;
484
- };
485
- var Nt, Pt;
486
- class A extends F {
487
- constructor() {
488
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
489
- }
490
- createRenderRoot() {
491
- var t, i;
492
- const s = super.createRenderRoot();
493
- return (t = (i = this.renderOptions).renderBefore) !== null && t !== void 0 || (i.renderBefore = s.firstChild), s;
494
- }
495
- update(t) {
496
- const i = this.render();
497
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = oi(i, this.renderRoot, this.renderOptions);
498
- }
499
- connectedCallback() {
500
- var t;
501
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
502
- }
503
- disconnectedCallback() {
504
- var t;
505
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
506
- }
507
- render() {
508
- return j;
509
- }
510
- }
511
- A.finalized = !0, A._$litElement$ = !0, (Nt = globalThis.litElementHydrateSupport) === null || Nt === void 0 || Nt.call(globalThis, { LitElement: A });
512
- const ue = globalThis.litElementPolyfillSupport;
513
- ue?.({ LitElement: A });
514
- ((Pt = globalThis.litElementVersions) !== null && Pt !== void 0 ? Pt : globalThis.litElementVersions = []).push("3.3.3");
515
- const ai = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(i) {
516
- i.createProperty(t.key, e);
517
- } } : { kind: "field", key: /* @__PURE__ */ Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
518
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
519
- }, finisher(i) {
520
- i.createProperty(t.key, e);
521
- } }, li = (e, t, i) => {
522
- t.constructor.createProperty(i, e);
523
- };
524
- function v(e) {
525
- return (t, i) => i !== void 0 ? li(e, t, i) : ai(e, t);
526
- }
527
- function N(e) {
528
- return v({ ...e, state: !0 });
529
- }
530
- var Mt;
531
- ((Mt = window.HTMLSlotElement) === null || Mt === void 0 ? void 0 : Mt.prototype.assignedElements) != null;
532
- const hi = { CHILD: 2 }, ci = (e) => (...t) => ({ _$litDirective$: e, values: t });
533
- let di = class {
534
- constructor(t) {
535
- }
536
- get _$AU() {
537
- return this._$AM._$AU;
538
- }
539
- _$AT(t, i, s) {
540
- this._$Ct = t, this._$AM = i, this._$Ci = s;
541
- }
542
- _$AS(t, i) {
543
- return this.update(t, i);
544
- }
545
- update(t, i) {
546
- return this.render(...i);
547
- }
548
- };
549
- class Dt extends di {
550
- constructor(t) {
551
- if (super(t), this.et = m, t.type !== hi.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
552
- }
553
- render(t) {
554
- if (t === m || t == null) return this.ft = void 0, this.et = t;
555
- if (t === j) return t;
556
- if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
557
- if (t === this.et) return this.ft;
558
- this.et = t;
559
- const i = [t];
560
- return i.raw = i, this.ft = { _$litType$: this.constructor.resultType, strings: i, values: [] };
561
- }
562
- }
563
- Dt.directiveName = "unsafeHTML", Dt.resultType = 1;
564
- const ui = ci(Dt);
565
- const pi = /* @__PURE__ */ Symbol();
566
- class gi {
567
- get taskComplete() {
568
- return this.t || (this.i === 1 ? this.t = new Promise(((t, i) => {
569
- this.o = t, this.h = i;
570
- })) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
571
- }
572
- constructor(t, i, s) {
573
- this.p = 0, this.i = 0, (this._ = t).addController(this);
574
- const r = typeof i == "object" ? i : { task: i, args: s };
575
- this.v = r.task, this.j = r.args, this.m = r.argsEqual ?? vi, 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?.());
576
- }
577
- hostUpdate() {
578
- this.autoRun === !0 && this.S();
579
- }
580
- hostUpdated() {
581
- this.autoRun === "afterUpdate" && this.S();
582
- }
583
- T() {
584
- if (this.j === void 0) return;
585
- const t = this.j();
586
- if (!Array.isArray(t)) throw Error("The args function must return an array");
587
- return t;
588
- }
589
- async S() {
590
- const t = this.T(), i = this.O;
591
- this.O = t, t === i || t === void 0 || i !== void 0 && this.m(i, t) || await this.run(t);
592
- }
593
- async run(t) {
594
- let i, s;
595
- 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();
596
- const r = ++this.p;
597
- this.q = new AbortController();
598
- let o = !1;
599
- try {
600
- i = await this.v(t, { signal: this.q.signal });
601
- } catch (n) {
602
- o = !0, s = n;
603
- }
604
- if (this.p === r) {
605
- if (i === pi) this.i = 0;
606
- else {
607
- if (o === !1) {
608
- try {
609
- this.k?.(i);
610
- } catch {
611
- }
612
- this.i = 2, this.o?.(i);
613
- } else {
614
- try {
615
- this.A?.(s);
616
- } catch {
617
- }
618
- this.i = 3, this.h?.(s);
619
- }
620
- this.u = i, this.l = s;
621
- }
622
- this._.requestUpdate();
623
- }
624
- }
625
- abort(t) {
626
- this.i === 1 && this.q?.abort(t);
627
- }
628
- get value() {
629
- return this.u;
630
- }
631
- get error() {
632
- return this.l;
633
- }
634
- get status() {
635
- return this.i;
636
- }
637
- render(t) {
638
- switch (this.i) {
639
- case 0:
640
- return t.initial?.();
641
- case 1:
642
- return t.pending?.();
643
- case 2:
644
- return t.complete?.(this.value);
645
- case 3:
646
- return t.error?.(this.error);
647
- default:
648
- throw Error("Unexpected status: " + this.i);
649
- }
650
- }
651
- }
652
- const vi = (e, t) => e === t || e.length === t.length && e.every(((i, s) => !Zt(i, t[s])));
653
- var Ut, pe;
654
- function mi() {
655
- if (pe) return Ut;
656
- pe = 1;
657
- var e = "Expected a function", t = NaN, i = "[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 ut == "object" && ut && ut.Object === Object && ut, c = typeof self == "object" && self && self.Object === Object && self, h = a || c || Function("return this")(), d = Object.prototype, p = d.toString, y = Math.max, S = Math.min, E = function() {
658
- return h.Date.now();
659
- };
660
- function Le(u, _, k) {
661
- var W, G, ct, Z, x, P, Q = 0, Yt = !1, tt = !1, kt = !0;
662
- if (typeof u != "function")
663
- throw new TypeError(e);
664
- _ = Xt(_) || 0, At(k) && (Yt = !!k.leading, tt = "maxWait" in k, ct = tt ? y(Xt(k.maxWait) || 0, _) : ct, kt = "trailing" in k ? !!k.trailing : kt);
665
- function Ct(f) {
666
- var T = W, et = G;
667
- return W = G = void 0, Q = f, Z = u.apply(et, T), Z;
668
- }
669
- function ze(f) {
670
- return Q = f, x = setTimeout(dt, _), Yt ? Ct(f) : Z;
671
- }
672
- function Be(f) {
673
- var T = f - P, et = f - Q, Qt = _ - T;
674
- return tt ? S(Qt, ct - et) : Qt;
675
- }
676
- function Kt(f) {
677
- var T = f - P, et = f - Q;
678
- return P === void 0 || T >= _ || T < 0 || tt && et >= ct;
679
- }
680
- function dt() {
681
- var f = E();
682
- if (Kt(f))
683
- return Gt(f);
684
- x = setTimeout(dt, Be(f));
685
- }
686
- function Gt(f) {
687
- return x = void 0, kt && W ? Ct(f) : (W = G = void 0, Z);
688
- }
689
- function De() {
690
- x !== void 0 && clearTimeout(x), Q = 0, W = P = G = x = void 0;
691
- }
692
- function qe() {
693
- return x === void 0 ? Z : Gt(E());
694
- }
695
- function St() {
696
- var f = E(), T = Kt(f);
697
- if (W = arguments, G = this, P = f, T) {
698
- if (x === void 0)
699
- return ze(P);
700
- if (tt)
701
- return x = setTimeout(dt, _), Ct(P);
702
- }
703
- return x === void 0 && (x = setTimeout(dt, _)), Z;
704
- }
705
- return St.cancel = De, St.flush = qe, St;
706
- }
707
- function At(u) {
708
- var _ = typeof u;
709
- return !!u && (_ == "object" || _ == "function");
710
- }
711
- function Oe(u) {
712
- return !!u && typeof u == "object";
713
- }
714
- function je(u) {
715
- return typeof u == "symbol" || Oe(u) && p.call(u) == i;
716
- }
717
- function Xt(u) {
718
- if (typeof u == "number")
719
- return u;
720
- if (je(u))
721
- return t;
722
- if (At(u)) {
723
- var _ = typeof u.valueOf == "function" ? u.valueOf() : u;
724
- u = At(_) ? _ + "" : _;
725
- }
726
- if (typeof u != "string")
727
- return u === 0 ? u : +u;
728
- u = u.replace(s, "");
729
- var k = o.test(u);
730
- return k || n.test(u) ? l(u.slice(2), k ? 2 : 8) : r.test(u) ? t : +u;
731
- }
732
- return Ut = Le, Ut;
733
- }
734
- var fi = mi();
735
- const $i = /* @__PURE__ */ Ve(fi);
736
- var bi = Object.defineProperty, g = (e, t, i, s) => {
737
- for (var r = void 0, o = e.length - 1, n; o >= 0; o--) (n = e[o]) && (r = n(t, i, r) || r);
738
- return r && bi(t, i, r), r;
739
- }, B = (e = "", t) => {
740
- customElements.get(e) || customElements.define(e, t);
741
- }, ge = (e, t) => [...e].reduce((i, s) => t?.skip?.includes(s.name) ? i : `${i}${s.name}="${s.value}" `, ""), ht = class extends A {
742
- constructor() {
743
- super(...arguments), this.name = "", this.fallbackTag = null, this.defaultStyle = null, this.refElement = null;
744
- }
745
- connectedCallback() {
746
- super.connectedCallback();
747
- let e = this;
748
- for (; e.parentNode; )
749
- e = e.parentNode;
750
- if (this.refElement = e.host.querySelector(`[refElement="${this.name}"]`), this.refElement && this.fallbackTag !== null && this.refElement.tagName.toLowerCase() !== this.fallbackTag)
751
- throw new Error(`Your html tag to customize ${this.name} should be <${this.fallbackTag}></<${this.fallbackTag}>`);
752
- }
753
- render() {
754
- const e = ge(this.attributes, { skip: ["name", "fallbacktag"] }), t = ge(this.refElement?.attributes ?? []);
755
- return w`${ui(`
756
- <style>${this.defaultStyle}</style>
757
- <${this.fallbackTag} ${e} ${t}>
758
- <slot></slot>
759
- </${this.fallbackTag}>`)}`;
760
- }
761
- };
762
- g([v()], ht.prototype, "name");
763
- g([v({ type: String || null })], ht.prototype, "fallbackTag");
764
- g([v({ type: String || null })], ht.prototype, "defaultStyle");
765
- g([v({ type: String || null })], ht.prototype, "refElement");
766
- B("appcues-use-ref", ht);
767
- var yi = () => {
768
- let e = {};
769
- const t = window.AppcuesSettings?.userIdSignature;
770
- return t && (e = { Authorization: `Bearer ${t}` }), e;
771
- }, wi = async (e, t) => {
772
- const i = yi();
773
- return await fetch(e, { headers: i, ...t });
774
- }, _i = "https://api.appcues.net/v1/", xi = $`
775
- .container {
776
- background: #fff;
777
- box-shadow: var(--flows-list-block-shadow);
778
- border-radius: var(--flows-list-block-radius);
779
- padding: 8px 0;
780
- width: 100%;
781
- }
782
-
783
- .container .loading,
784
- .container .error-message {
785
- align-items: center;
786
- color: var(--flows-list-block-color);
787
- display: flex;
788
- font-size: 14px;
789
- font-style: normal;
790
- font-weight: 400;
791
- justify-content: center;
792
- line-height: 160%;
793
- padding: 16px;
794
- text-align: center;
795
- }
796
- `, Ai = $`
797
- slot[name='empty-message'],
798
- ::slotted(p[slot='empty-message']) {
799
- align-items: center;
800
- color: var(--flows-list-block-color);
801
- display: flex;
802
- font-style: normal;
803
- font-weight: 400;
804
- justify-content: center;
805
- line-height: 160%;
806
- padding: 16px;
807
- text-align: center;
808
- font-size: 14px;
809
- }
810
- `, ki = $`
811
- ul {
812
- list-style-type: square;
813
- list-style-position: inside;
814
- margin: 0;
815
- padding: 0 4px;
816
- }
817
- `, Ci = $`
818
- li {
819
- cursor: pointer;
820
- font-size: 14px;
821
- font-style: normal;
822
- font-weight: 400;
823
- line-height: 160%;
824
- padding: 8px 16px;
825
- border-radius: var(--flows-list-block-item-radius);
826
- transition: background-color 0.3s ease 0s;
827
- }
828
-
829
- li:hover {
830
- background-color: var(--flows-list-block-background-hover);
831
- }
832
-
833
- li::marker {
834
- color: var(--flows-list-block-marker-color);
835
- }
836
-
837
- li:hover > span {
838
- background-color: var(--flows-list-block-background-hover);
839
- }
840
-
841
- li > span {
842
- color: var(--flows-list-block-color);
843
- }
844
-
845
- li appcues-use-ref {
846
- display: inline-flex;
847
- max-width: calc(100% - 20px);
848
- }
849
- `, Si = $`
850
- ::slotted(h1[slot='title']),
851
- ::slotted(h2[slot='title']),
852
- ::slotted(h3[slot='title']) {
853
- color: var(--flows-list-block-color);
854
- font-size: 15px;
855
- font-weight: 700;
856
- line-height: 24px;
857
- margin: 0 0 8px;
858
- padding: 0 16px 0;
859
-
860
- display: -webkit-box;
861
- -webkit-box-orient: vertical;
862
- -webkit-line-clamp: 2;
863
- max-height: 48px;
864
- max-width: calc(100% - 32px);
865
- overflow: hidden;
866
- text-overflow: ellipsis;
867
- white-space: normal;
868
- }
869
- `, Rt, mt = window, Y = mt.trustedTypes, ve = Y ? Y.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, qt = "$lit$", H = `lit$${(Math.random() + "").slice(9)}$`, Ne = "?" + H, Ei = `<${Ne}>`, z = document, ft = () => z.createComment(""), at = (e) => e === null || typeof e != "object" && typeof e != "function", Pe = Array.isArray, Ti = (e) => Pe(e) || typeof e?.[Symbol.iterator] == "function", Lt = `[
870
- \f\r]`, st = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, me = /-->/g, fe = />/g, U = RegExp(`>|${Lt}(?:([^\\s"'>=/]+)(${Lt}*=${Lt}*(?:[^
871
- \f\r"'\`<>=]|("|')|))|$)`, "g"), $e = /'/g, be = /"/g, Me = /^(?:script|style|textarea|title)$/i, Ue = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }), rt = Ue(1), yt = Ue(2), lt = /* @__PURE__ */ Symbol.for("lit-noChange"), b = /* @__PURE__ */ Symbol.for("lit-nothing"), ye = /* @__PURE__ */ new WeakMap(), L = z.createTreeWalker(z, 129, null, !1);
872
- function Re(e, t) {
873
- if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
874
- return ve !== void 0 ? ve.createHTML(t) : t;
875
- }
876
- var Ii = (e, t) => {
877
- const i = e.length - 1, s = [];
878
- let r, o = t === 2 ? "<svg>" : "", n = st;
879
- for (let l = 0; l < i; l++) {
880
- const a = e[l];
881
- let c, h, d = -1, p = 0;
882
- for (; p < a.length && (n.lastIndex = p, h = n.exec(a), h !== null); ) p = n.lastIndex, n === st ? h[1] === "!--" ? n = me : h[1] !== void 0 ? n = fe : h[2] !== void 0 ? (Me.test(h[2]) && (r = RegExp("</" + h[2], "g")), n = U) : h[3] !== void 0 && (n = U) : n === U ? 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 ? U : h[3] === '"' ? be : $e) : n === be || n === $e ? n = U : n === me || n === fe ? n = st : (n = U, r = void 0);
883
- const y = n === U && e[l + 1].startsWith("/>") ? " " : "";
884
- o += n === st ? a + Ei : d >= 0 ? (s.push(c), a.slice(0, d) + qt + a.slice(d) + H + y) : a + H + (d === -2 ? (s.push(void 0), l) : y);
885
- }
886
- return [Re(e, o + (e[i] || "<?>") + (t === 2 ? "</svg>" : "")), s];
887
- }, $t = class {
888
- constructor({ strings: e, _$litType$: t }, i) {
889
- let s;
890
- this.parts = [];
891
- let r = 0, o = 0;
892
- const n = e.length - 1, l = this.parts, [a, c] = Ii(e, t);
893
- if (this.el = $t.createElement(a, i), L.currentNode = this.el.content, t === 2) {
894
- const h = this.el.content, d = h.firstChild;
895
- d.remove(), h.append(...d.childNodes);
896
- }
897
- for (; (s = L.nextNode()) !== null && l.length < n; ) {
898
- if (s.nodeType === 1) {
899
- if (s.hasAttributes()) {
900
- const h = [];
901
- for (const d of s.getAttributeNames()) if (d.endsWith(qt) || d.startsWith(H)) {
902
- const p = c[o++];
903
- if (h.push(d), p !== void 0) {
904
- const y = s.getAttribute(p.toLowerCase() + qt).split(H), S = /([.?@])?(.*)/.exec(p);
905
- l.push({ type: 1, index: r, name: S[2], strings: y, ctor: S[1] === "." ? Ni : S[1] === "?" ? Mi : S[1] === "@" ? Ui : wt });
906
- } else l.push({ type: 6, index: r });
907
- }
908
- for (const d of h) s.removeAttribute(d);
909
- }
910
- if (Me.test(s.tagName)) {
911
- const h = s.textContent.split(H), d = h.length - 1;
912
- if (d > 0) {
913
- s.textContent = Y ? Y.emptyScript : "";
914
- for (let p = 0; p < d; p++) s.append(h[p], ft()), L.nextNode(), l.push({ type: 2, index: ++r });
915
- s.append(h[d], ft());
916
- }
917
- }
918
- } else if (s.nodeType === 8) if (s.data === Ne) l.push({ type: 2, index: r });
919
- else {
920
- let h = -1;
921
- for (; (h = s.data.indexOf(H, h + 1)) !== -1; ) l.push({ type: 7, index: r }), h += H.length - 1;
922
- }
923
- r++;
924
- }
925
- }
926
- static createElement(e, t) {
927
- const i = z.createElement("template");
928
- return i.innerHTML = e, i;
929
- }
930
- };
931
- function K(e, t, i = e, s) {
932
- var r, o, n, l;
933
- if (t === lt) return t;
934
- let a = s !== void 0 ? (r = i._$Co) === null || r === void 0 ? void 0 : r[s] : i._$Cl;
935
- const c = at(t) ? void 0 : t._$litDirective$;
936
- return a?.constructor !== c && ((o = a?._$AO) === null || o === void 0 || o.call(a, !1), c === void 0 ? a = void 0 : (a = new c(e), a._$AT(e, i, s)), s !== void 0 ? ((n = (l = i)._$Co) !== null && n !== void 0 ? n : l._$Co = [])[s] = a : i._$Cl = a), a !== void 0 && (t = K(e, a._$AS(e, t.values), a, s)), t;
937
- }
938
- var Hi = class {
939
- constructor(e, t) {
940
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
941
- }
942
- get parentNode() {
943
- return this._$AM.parentNode;
944
- }
945
- get _$AU() {
946
- return this._$AM._$AU;
947
- }
948
- u(e) {
949
- var t;
950
- const { el: { content: i }, parts: s } = this._$AD, r = ((t = e?.creationScope) !== null && t !== void 0 ? t : z).importNode(i, !0);
951
- L.currentNode = r;
952
- let o = L.nextNode(), n = 0, l = 0, a = s[0];
953
- for (; a !== void 0; ) {
954
- if (n === a.index) {
955
- let c;
956
- a.type === 2 ? c = new Jt(o, o.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (c = new Ri(o, this, e)), this._$AV.push(c), a = s[++l];
957
- }
958
- n !== a?.index && (o = L.nextNode(), n++);
959
- }
960
- return L.currentNode = z, r;
961
- }
962
- v(e) {
963
- let t = 0;
964
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
965
- }
966
- }, Jt = class {
967
- constructor(e, t, i, s) {
968
- var r;
969
- this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = s, this._$Cp = (r = s?.isConnected) === null || r === void 0 || r;
970
- }
971
- get _$AU() {
972
- var e, t;
973
- return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cp;
974
- }
975
- get parentNode() {
976
- let e = this._$AA.parentNode;
977
- const t = this._$AM;
978
- return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
979
- }
980
- get startNode() {
981
- return this._$AA;
982
- }
983
- get endNode() {
984
- return this._$AB;
985
- }
986
- _$AI(e, t = this) {
987
- e = K(this, e, t), at(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== lt && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : Ti(e) ? this.T(e) : this._(e);
988
- }
989
- k(e) {
990
- return this._$AA.parentNode.insertBefore(e, this._$AB);
991
- }
992
- $(e) {
993
- this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
994
- }
995
- _(e) {
996
- this._$AH !== b && at(this._$AH) ? this._$AA.nextSibling.data = e : this.$(z.createTextNode(e)), this._$AH = e;
997
- }
998
- g(e) {
999
- var t;
1000
- const { values: i, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = $t.createElement(Re(s.h, s.h[0]), this.options)), s);
1001
- if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r) this._$AH.v(i);
1002
- else {
1003
- const o = new Hi(r, this), n = o.u(this.options);
1004
- o.v(i), this.$(n), this._$AH = o;
1005
- }
1006
- }
1007
- _$AC(e) {
1008
- let t = ye.get(e.strings);
1009
- return t === void 0 && ye.set(e.strings, t = new $t(e)), t;
1010
- }
1011
- T(e) {
1012
- Pe(this._$AH) || (this._$AH = [], this._$AR());
1013
- const t = this._$AH;
1014
- let i, s = 0;
1015
- for (const r of e) s === t.length ? t.push(i = new Jt(this.k(ft()), this.k(ft()), this, this.options)) : i = t[s], i._$AI(r), s++;
1016
- s < t.length && (this._$AR(i && i._$AB.nextSibling, s), t.length = s);
1017
- }
1018
- _$AR(e = this._$AA.nextSibling, t) {
1019
- var i;
1020
- for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, t); e && e !== this._$AB; ) {
1021
- const s = e.nextSibling;
1022
- e.remove(), e = s;
1023
- }
1024
- }
1025
- setConnected(e) {
1026
- var t;
1027
- this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
1028
- }
1029
- }, wt = class {
1030
- constructor(e, t, i, s, r) {
1031
- this.type = 1, this._$AH = b, this._$AN = void 0, this.element = e, this.name = t, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = b;
1032
- }
1033
- get tagName() {
1034
- return this.element.tagName;
1035
- }
1036
- get _$AU() {
1037
- return this._$AM._$AU;
1038
- }
1039
- _$AI(e, t = this, i, s) {
1040
- const r = this.strings;
1041
- let o = !1;
1042
- if (r === void 0) e = K(this, e, t, 0), o = !at(e) || e !== this._$AH && e !== lt, o && (this._$AH = e);
1043
- else {
1044
- const n = e;
1045
- let l, a;
1046
- for (e = r[0], l = 0; l < r.length - 1; l++) a = K(this, n[i + l], t, l), a === lt && (a = this._$AH[l]), o || (o = !at(a) || a !== this._$AH[l]), a === b ? e = b : e !== b && (e += (a ?? "") + r[l + 1]), this._$AH[l] = a;
1047
- }
1048
- o && !s && this.j(e);
1049
- }
1050
- j(e) {
1051
- e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
1052
- }
1053
- }, Ni = class extends wt {
1054
- constructor() {
1055
- super(...arguments), this.type = 3;
1056
- }
1057
- j(e) {
1058
- this.element[this.name] = e === b ? void 0 : e;
1059
- }
1060
- }, Pi = Y ? Y.emptyScript : "", Mi = class extends wt {
1061
- constructor() {
1062
- super(...arguments), this.type = 4;
1063
- }
1064
- j(e) {
1065
- e && e !== b ? this.element.setAttribute(this.name, Pi) : this.element.removeAttribute(this.name);
1066
- }
1067
- }, Ui = class extends wt {
1068
- constructor(e, t, i, s, r) {
1069
- super(e, t, i, s, r), this.type = 5;
1070
- }
1071
- _$AI(e, t = this) {
1072
- var i;
1073
- if ((e = (i = K(this, e, t, 0)) !== null && i !== void 0 ? i : b) === lt) return;
1074
- const s = this._$AH, r = e === b && s !== b || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, o = e !== b && (s === b || r);
1075
- r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
1076
- }
1077
- handleEvent(e) {
1078
- var t, i;
1079
- typeof this._$AH == "function" ? this._$AH.call((i = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && i !== void 0 ? i : this.element, e) : this._$AH.handleEvent(e);
1080
- }
1081
- }, Ri = class {
1082
- constructor(e, t, i) {
1083
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
1084
- }
1085
- get _$AU() {
1086
- return this._$AM._$AU;
1087
- }
1088
- _$AI(e) {
1089
- K(this, e);
1090
- }
1091
- }, we = mt.litHtmlPolyfillSupport;
1092
- we?.($t, Jt), ((Rt = mt.litHtmlVersions) !== null && Rt !== void 0 ? Rt : mt.litHtmlVersions = []).push("2.8.0");
1093
- var Li = yt`
1094
- <svg
1095
- version="1.1"
1096
- xmlns="http://www.w3.org/2000/svg"
1097
- xmlns:xlink="http://www.w3.org/1999/xlink"
1098
- x="0px"
1099
- y="0px"
1100
- width="40px"
1101
- height="40px"
1102
- fill="#0072D6"
1103
- viewBox="0 0 40 40"
1104
- enable-background="new 0 0 40 40"
1105
- xml:space="preserve"
1106
- >
1107
- <path
1108
- opacity="0.2"
1109
- fill="#0072D6"
1110
- 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
1111
- 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
1112
- 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"
1113
- />
1114
- <path
1115
- fill="#0072D6"
1116
- d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
1117
- C22.32,8.481,24.301,9.057,26.013,10.047z"
1118
- >
1119
- <animateTransform
1120
- attributeType="xml"
1121
- attributeName="transform"
1122
- type="rotate"
1123
- from="0 20 20"
1124
- to="360 20 20"
1125
- keySplines="0.17 0.27 0.8 0.65"
1126
- calcMode="spline"
1127
- dur="0.6s"
1128
- repeatCount="indefinite"
1129
- keyTimes="0;1"
1130
- />
1131
- </path>
1132
- </svg>
1133
- `, Oi = 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" }]), ji = async ({ accountId: e, userId: t }, i) => {
1134
- if (!e || !t)
1135
- return [];
1136
- const s = window.location.href, r = new URL(`${_i}/accounts/${e}/users/${t}/widget`);
1137
- return r.searchParams.set("url", s), r.searchParams.set("order_by", i), (await wi(r.toString())).json();
1138
- }, D = class extends A {
1139
- constructor() {
1140
- super(...arguments), this.listItems = [], this.orderBy = "sort_order", this.limit = 5, this.listMock = Oi, this.mode = "live", this.fetchListItems = async () => {
1141
- if (this.mode === "preview")
1142
- return this.listItems = JSON.parse(this.listMock), JSON.parse(this.listMock);
1143
- const e = await Appcues?.user() ?? {}, { contents: t } = await ji({ accountId: AppcuesBundleSettings?.accountId, userId: e?.userId }, this.orderBy), i = t.map(({ id: s, name: r, public_name: o }) => ({ id: s, name: r, publicName: o }));
1144
- return this.listItems = i, i;
1145
- }, this.getListItems = new gi(this, { task: this.fetchListItems, args: () => [] }), this.handleItemClick = (e) => () => {
1146
- const t = new CustomEvent("flow-item-clicked", { detail: this.listItems.find((i) => i.id === e), bubbles: !0, composed: !0 });
1147
- this.dispatchEvent(t);
1148
- }, this.handleItemHover = (e) => () => {
1149
- const t = new CustomEvent("flow-item-hovered", { detail: this.listItems.find((i) => i.id === e), bubbles: !0, composed: !0 });
1150
- this.dispatchEvent(t);
1151
- }, this.containerTemplate = (e) => w`
1152
- <appcues-use-ref
1153
- name="list-container"
1154
- fallbackTag="ul"
1155
- defaultStyle=${ki}
1156
- >
1157
- ${e.slice(0, this.limit).map(this.itemTemplate)}
1158
- </appcues-use-ref>
1159
- `, this.itemTemplate = (e) => w`
1160
- <li
1161
- @click="${this.handleItemClick(e.id)}"
1162
- @mouseover="${this.handleItemHover(e.id)}"
1163
- >
1164
- <appcues-use-ref fallbackTag="span" name="list-item">
1165
- ${e.publicName ?? e.name}
1166
- </appcues-use-ref>
1167
- </li>
1168
- `, this.emptyMessageTemplate = w`
1169
- <slot name="empty-message">
1170
- <p>Nothing to see here at the moment</p>
1171
- </slot>
1172
- `;
1173
- }
1174
- connectedCallback() {
1175
- super.connectedCallback(), this.mode !== "live" && new MutationObserver((t) => {
1176
- t.forEach((i) => {
1177
- const [s] = i.addedNodes;
1178
- (i.type === "attributes" || s && ["UL", "LI", "SPAN"].includes(s.nodeName)) && this.getListItems.run();
1179
- });
1180
- }).observe(this, { childList: !0, subtree: !0, attributes: !0 });
1181
- }
1182
- render() {
1183
- return w`
1184
- <div class="container">
1185
- <slot name="title"></slot>
1186
- ${this.getListItems.render({ pending: () => w`<div class="loading">${Li}</div>`, complete: (e) => e.slice(0, this.limit).length === 0 ? this.emptyMessageTemplate : this.containerTemplate(e), error: () => w`
1187
- <div class="error-message">Nothing to see here at the moment</div>
1188
- ` })}
1189
- </div>
1190
- `;
1191
- }
1192
- };
1193
- D.styles = [xi, Ai, Si, Ci];
1194
- g([N()], D.prototype, "listItems");
1195
- g([v()], D.prototype, "orderBy");
1196
- g([v({ type: Number })], D.prototype, "limit");
1197
- g([v()], D.prototype, "listMock");
1198
- g([v({ type: String })], D.prototype, "mode");
1199
- B("appcues-flows-list", D);
1200
- var zi = $`
1201
- .btn-wrapper {
1202
- display: flex;
1203
- flex-direction: row;
1204
- flex-wrap: nowrap;
1205
- }
1206
-
1207
- .btn-wrapper button {
1208
- background-color: var(--launcher-main-color, #0072d6);
1209
- color: white;
1210
- cursor: pointer;
1211
- outline-color: #0072d6;
1212
- outline-width: 2px;
1213
- }
1214
-
1215
- .btn-wrapper button {
1216
- border: none;
1217
- border-start-start-radius: 80px;
1218
- border-end-start-radius: 80px;
1219
- border-start-end-radius: 0;
1220
- border-end-end-radius: 0;
1221
- padding-inline: 16px 8px;
1222
- padding-block: 4px;
1223
- height: 52px;
1224
- outline-offset: 3px;
1225
- }
1226
-
1227
- .btn-wrapper ::slotted(button) {
1228
- padding: 10px 16px;
1229
- border-radius: 80px;
1230
- border: 2px solid transparent;
1231
- height: 52px;
1232
- display: flex;
1233
- align-items: center;
1234
- justify-content: center;
1235
- gap: 8px;
1236
- outline-offset: 4px;
1237
- }
1238
-
1239
- .btn-wrapper button:hover:not(:active):not([disabled]) {
1240
- background-color: var(--launcher-hover-color, #4848eb) !important;
1241
- }
1242
-
1243
- .btn-wrapper button:active {
1244
- background-color: var(--launcher-active-color, #8c8cff) !important;
1245
- }
1246
-
1247
- .btn-wrapper > .slot-wrapper {
1248
- border: 2px solid white;
1249
- margin-top: -2px;
1250
- border-radius: 80px;
1251
- width: max-content;
1252
- }
1253
-
1254
- .btn-wrapper > .slot-wrapper.active {
1255
- margin-inline-start: -18px;
1256
- }
1257
- `, Bi = $`
1258
- .checklist-content {
1259
- display: flex;
1260
- flex-direction: column;
1261
- text-align: left;
1262
- margin-inline-end: 18px;
1263
- justify-content: center;
1264
- gap: 6px;
1265
- line-height: 1.2;
1266
- }
1267
- `, Di = $`
1268
- .progress-wrapper {
1269
- display: flex;
1270
- align-items: center;
1271
- gap: 2px;
1272
- border-radius: 6px;
1273
- min-width: 100px;
1274
- overflow: hidden;
1275
- }
1276
-
1277
- .progress-bar,
1278
- progress {
1279
- background-color: rgba(255, 255, 255, 0.4);
1280
- height: 4px;
1281
- flex-grow: 1;
1282
- }
1283
-
1284
- .progress-bar.completed {
1285
- background-color: white;
1286
- }
1287
-
1288
- progress[value] {
1289
- --color: white;
1290
- --background: rgba(255, 255, 255, 0.4);
1291
- appearance: none;
1292
- background: var(--background);
1293
- border: none;
1294
- }
1295
-
1296
- progress[value]::-webkit-progress-bar {
1297
- background: var(--background);
1298
- }
1299
-
1300
- progress[value]::-webkit-progress-value {
1301
- background: var(--color);
1302
- }
1303
-
1304
- progress[value]::-moz-progress-bar {
1305
- background: var(--color);
1306
- }
1307
- `, C = class extends A {
1308
- constructor() {
1309
- super(...arguments), this.title = "Checklist", this.totalItems = 0, this.completedItems = 0, this.activeColor = "#4848eb", this.hoverColor = "#4848eb", this.mainColor = "#0072d6", this.checklistId = "", this.handleSlotchange = (e) => {
1310
- const r = (e.target?.assignedNodes({ flatten: !0 })).find((l) => l.querySelector ? l.querySelector("button") : !1)?.querySelector("button");
1311
- if (!r) return;
1312
- const { backgroundColor: o, background: n } = getComputedStyle(r);
1313
- this.mainColor = o || n, this.style.setProperty("--launcher-main-color", this.mainColor);
1314
- }, this.progressbar = () => {
1315
- if (this.totalItems > 8)
1316
- return rt`<progress
1317
- id="items"
1318
- value="${this.completedItems}"
1319
- max="${this.totalItems}"
1320
- ></progress>`;
1321
- const e = [];
1322
- for (let t = 0; t < this.totalItems; t++)
1323
- e.push(rt`<div
1324
- class="progress-bar ${t < this.completedItems && "completed"}"
1325
- ></div>`);
1326
- return e;
1327
- }, this.slotElement = () => rt`
1328
- <slot @slotchange=${this.handleSlotchange}></slot>
1329
- `;
1330
- }
1331
- connectedCallback() {
1332
- 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", We((e) => {
1333
- const t = e, { id: i, name: s, totalItems: r, completedItems: o } = t.detail;
1334
- this.totalItems = r, this.completedItems = o, this.title = s, this.checklistId = i, Fe();
1335
- }), Ze(() => {
1336
- this.totalItems = 0, this.completedItems = 0, this.title = "Checklist", this.checklistId = "";
1337
- });
1338
- }
1339
- attributeChangedCallback(e, t, i) {
1340
- if (e === "totalitems") {
1341
- const s = Number.parseInt(i || "0", 10);
1342
- this.totalItems = s > 0 ? s : 0;
1343
- }
1344
- if (e === "completeditems") {
1345
- const s = Number.parseInt(i || "0", 10);
1346
- s > this.totalItems ? this.completedItems = this.totalItems : s < 0 ? this.completedItems = 0 : this.completedItems = s;
1347
- }
1348
- e === "title" && (this.title = i || "Checklist"), e === "hovercolor" && (this.hoverColor = i || "#4848eb", this.style.setProperty("--launcher-hover-color", this.hoverColor)), e === "activecolor" && (this.activeColor = i || "#8c8cff", this.style.setProperty("--launcher-active-color", this.activeColor));
1349
- }
1350
- render() {
1351
- return rt`
1352
- <div class="btn-wrapper">
1353
- ${this.totalItems === 0 ? this.slotElement() : rt`
1354
- <button @click="${() => te(this.checklistId)}">
1355
- <div class="checklist-content">
1356
- ${this.title}
1357
- <div class="progress-wrapper" aria-role="progressbar">
1358
- ${this.progressbar()}
1359
- </div>
1360
- </div>
1361
- </button>
1362
- <div
1363
- class="slot-wrapper ${this.totalItems > 0 && "active"}"
1364
- @click="${{ handleEvent: () => te(this.checklistId, !0), capture: !0 }}"
1365
- >
1366
- ${this.slotElement()}
1367
- </div>
1368
- `}
1369
- </div>
1370
- `;
1371
- }
1372
- };
1373
- C.styles = [zi, Bi, Di];
1374
- g([v()], C.prototype, "title");
1375
- g([v()], C.prototype, "totalItems");
1376
- g([v()], C.prototype, "completedItems");
1377
- g([v()], C.prototype, "activeColor");
1378
- g([v()], C.prototype, "hoverColor");
1379
- g([N()], C.prototype, "mainColor");
1380
- g([N()], C.prototype, "checklistId");
1381
- B("appcues-checklist-wrapper", C);
1382
- var qi = $`
1383
- .page {
1384
- display: block;
1385
- width: 100%;
1386
- height: 100%;
1387
- }
1388
-
1389
- .idle {
1390
- display: none;
1391
- }
1392
-
1393
- .hidden {
1394
- pointer-events: none;
1395
- }
1396
-
1397
- .animated {
1398
- position: absolute;
1399
- top: 0;
1400
- left: 0;
1401
- }
1402
- `, Vi = $`
1403
- .slide-in-bottom {
1404
- animation: slide-in-bottom 0.4s cubic-bezier(0.15, 1.03, 0.8, 1.03) forwards;
1405
- }
1406
-
1407
- @keyframes slide-in-bottom {
1408
- 0% {
1409
- opacity: 0;
1410
- transform: translateY(80%);
1411
- }
1412
- 20% {
1413
- opacity: 0;
1414
- }
1415
- 100% {
1416
- opacity: 1;
1417
- transform: translateY(0);
1418
- }
1419
- }
1420
- `, Wi = $`
1421
- .slide-out-bottom {
1422
- animation: slide-out-bottom 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
1423
- }
1424
-
1425
- @keyframes slide-out-bottom {
1426
- 0% {
1427
- opacity: 1;
1428
- transform: translateY(0);
1429
- }
1430
-
1431
- 80% {
1432
- opacity: 1;
1433
- }
1434
-
1435
- 99% {
1436
- transform: translateY(80%);
1437
- opacity: 0;
1438
- }
1439
-
1440
- 100% {
1441
- display: none;
1442
- max-height: 0;
1443
- overflow: hidden;
1444
- }
1445
- }
1446
- `, _t = class extends A {
1447
- constructor() {
1448
- super(...arguments), this.status = "idle", this.animation = "", this.minHeight = "auto";
1449
- }
1450
- show({ animation: e = "" } = {}) {
1451
- e !== "" && (this.animation = e), this.status = "showing";
1452
- }
1453
- hide({ animation: e = "" } = {}) {
1454
- e !== "" && (this.animation = e), this.status = "hidden";
1455
- }
1456
- render() {
1457
- return w`
1458
- <div
1459
- class="page ${this.status} ${this.animation && "animated"} ${this.animation}"
1460
- aria-hidden="${["hidden", "idle"].includes(this.status)}"
1461
- >
1462
- <slot></slot>
1463
- </div>
1464
- `;
1465
- }
1466
- };
1467
- _t.styles = [qi, Vi, Wi];
1468
- g([N()], _t.prototype, "status");
1469
- g([v()], _t.prototype, "minHeight");
1470
- B("appcues-page", _t);
1471
- var Zi = $`
1472
- .grow {
1473
- animation: grow-min-height 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
1474
- min-height: auto;
1475
- }
1476
-
1477
- .shrink {
1478
- animation: shrink-min-height 0.4s cubic-bezier(0.7, 0, 0.57, 0.55) forwards;
1479
- }
1480
- `, q = class extends A {
1481
- constructor() {
1482
- super(...arguments), this.currentPage = 0, this.pages = [], this.currentHeight = "auto", this.entry = "slide-in-bottom", this.exit = "slide-out-bottom";
1483
- }
1484
- getChildren() {
1485
- return this.shadowRoot ? this.shadowRoot.querySelector("slot")?.assignedElements({ flatten: !0 }) ?? [] : [];
1486
- }
1487
- updateHeight(e = this.currentPage) {
1488
- const t = this.pages[e].minHeight || "auto";
1489
- this.currentHeight = t !== "auto" ? t : "auto";
1490
- }
1491
- showFirstPage() {
1492
- this.updateHeight(), this.pages[this.currentPage].show();
1493
- }
1494
- prev() {
1495
- 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);
1496
- }
1497
- next() {
1498
- 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());
1499
- }
1500
- goTo(e = 0) {
1501
- e !== this.currentPage && (this.pages[e].show({ animation: e !== 0 ? this.entry : "" }), this.pages[this.currentPage].hide({ animation: this.currentPage !== 0 ? this.exit : "" }), this.currentPage = e, this.updateHeight());
1502
- }
1503
- firstUpdated() {
1504
- this.pages = this.getChildren(), this.showFirstPage();
1505
- }
1506
- connectedCallback() {
1507
- super.connectedCallback();
1508
- }
1509
- render() {
1510
- return w`
1511
- <style>
1512
- @keyframes grow-min-height {
1513
- 0% {
1514
- min-height: 0;
1515
- }
1516
-
1517
- 100% {
1518
- min-height: ${this.currentHeight};
1519
- }
1520
- }
1521
-
1522
- @keyframes shrink-min-height {
1523
- 0% {
1524
- min-height: ${this.currentHeight};
1525
- }
1526
-
1527
- 100% {
1528
- min-height: auto;
1529
- }
1530
- }
1531
- </style>
1532
- <div
1533
- class="${this.currentPage !== 0 ? "grow" : "shrink"}"
1534
- style="position: relative;"
1535
- >
1536
- <slot></slot>
1537
- </div>
1538
- `;
1539
- }
1540
- };
1541
- q.styles = [Zi];
1542
- g([N()], q.prototype, "currentPage");
1543
- g([N()], q.prototype, "pages");
1544
- g([N()], q.prototype, "currentHeight");
1545
- g([v()], q.prototype, "entry");
1546
- g([v()], q.prototype, "exit");
1547
- B("appcues-navigation-stack", q);
1548
- var Fi = yt`
1549
- <svg
1550
- version="1.1"
1551
- xmlns="http://www.w3.org/2000/svg"
1552
- xmlns:xlink="http://www.w3.org/1999/xlink"
1553
- x="0px"
1554
- y="0px"
1555
- width="40px"
1556
- height="40px"
1557
- fill="#0072D6"
1558
- viewBox="0 0 40 40"
1559
- enable-background="new 0 0 40 40"
1560
- xml:space="preserve"
1561
- >
1562
- <path
1563
- opacity="0.2"
1564
- fill="#0072D6"
1565
- 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
1566
- 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
1567
- 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"
1568
- />
1569
- <path
1570
- fill="#0072D6"
1571
- d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
1572
- C22.32,8.481,24.301,9.057,26.013,10.047z"
1573
- >
1574
- <animateTransform
1575
- attributeType="xml"
1576
- attributeName="transform"
1577
- type="rotate"
1578
- from="0 20 20"
1579
- to="360 20 20"
1580
- keySplines="0.17 0.27 0.8 0.65"
1581
- calcMode="spline"
1582
- dur="0.6s"
1583
- repeatCount="indefinite"
1584
- keyTimes="0;1"
1585
- />
1586
- </path>
1587
- </svg>
1588
- `, Ji = yt`
1589
- <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
1590
- <g id="material-icon" clip-path="url(#clip0_19386_6120)">
1591
- <path
1592
- id="Vector"
1593
- 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"
1594
- fill="currentColor"
1595
- />
1596
- </g>
1597
- </svg>
1598
- `, _e = yt`
1599
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
1600
- <path
1601
- fill="currentColor"
1602
- 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"
1603
- />
1604
- </svg>
1605
- `, Xi = $`
1606
- @keyframes fade-in {
1607
- 0% {
1608
- opacity: 0;
1609
- display: none;
1610
- }
1611
-
1612
- 100% {
1613
- opacity: 1;
1614
- display: flex;
1615
- }
1616
- }
1617
-
1618
- @keyframes fade-out {
1619
- 0% {
1620
- opacity: 1;
1621
- display: flex;
1622
- }
1623
-
1624
- 100% {
1625
- opacity: 0;
1626
- display: none;
1627
- }
1628
- }
1629
-
1630
- @keyframes expand {
1631
- 0% {
1632
- width: 0%;
1633
- }
1634
-
1635
- 100% {
1636
- width: 100%;
1637
- }
1638
- }
1639
-
1640
- @keyframes collapse {
1641
- 0% {
1642
- width: 100%;
1643
- }
1644
-
1645
- 100% {
1646
- width: 0%;
1647
- }
1648
- }
1649
-
1650
- @keyframes slide-in {
1651
- 0% {
1652
- transform: translateX(120px);
1653
- }
1654
-
1655
- 100% {
1656
- transform: translateX(0);
1657
- }
1658
- }
1659
-
1660
- @keyframes slide-out {
1661
- 0% {
1662
- transform: translateX(0);
1663
- }
1664
-
1665
- 100% {
1666
- transform: translateX(120px);
1667
- }
1668
- }
1669
- `, Yi = $`
1670
- :host {
1671
- display: flex;
1672
- width: 100%;
1673
- }
1674
-
1675
- .container {
1676
- align-items: center;
1677
- display: flex;
1678
- height: 40px;
1679
- justify-content: space-between;
1680
- position: relative;
1681
- width: 100%;
1682
- }
1683
-
1684
- svg {
1685
- height: 16px;
1686
- }
1687
-
1688
- button {
1689
- align-items: center;
1690
- color: inherit;
1691
- cursor: pointer;
1692
- background: transparent;
1693
- border: none;
1694
- display: flex;
1695
- justify-content: center;
1696
- padding: 12px;
1697
- }
1698
- `, Ki = $`
1699
- .search-container {
1700
- align-items: center;
1701
- display: none;
1702
- opacity: 0;
1703
- position: absolute;
1704
- width: calc(100% + 12px);
1705
- left: -12px;
1706
- }
1707
-
1708
- .search-container input {
1709
- border: none;
1710
- border-start-start-radius: 8px;
1711
- border-end-start-radius: 8px;
1712
- border-start-end-radius: 0;
1713
- border-end-end-radius: 0;
1714
- box-sizing: border-box;
1715
- height: 40px;
1716
- padding: 8px 12px 8px 16px;
1717
- width: 0;
1718
- }
1719
-
1720
- .search-container input:focus {
1721
- outline: none;
1722
- }
1723
-
1724
- .search-container .search-form {
1725
- display: flex;
1726
- flex: 1;
1727
- justify-content: flex-end;
1728
- margin-bottom: 0;
1729
- }
1730
-
1731
- .search-container .search-button {
1732
- background: white;
1733
- border-start-end-radius: 8px;
1734
- border-end-end-radius: 8px;
1735
- border-start-start-radius: 0;
1736
- border-end-start-radius: 0;
1737
- padding: 0 12px;
1738
- }
1739
-
1740
- .search-container .search-button svg {
1741
- width: 16px;
1742
- }
1743
-
1744
- .search-container .search-button svg path {
1745
- fill: black;
1746
- }
1747
-
1748
- .search-container.show {
1749
- animation: fade-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1750
- display: flex;
1751
- }
1752
-
1753
- .search-container.show input {
1754
- animation: expand 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1755
- width: 100%;
1756
- }
1757
-
1758
- .search-container.hide {
1759
- animation: fade-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1760
- }
1761
-
1762
- .search-container.hide input {
1763
- animation: collapse 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1764
- width: 0;
1765
- }
1766
-
1767
- .content-container {
1768
- align-items: center;
1769
- display: flex;
1770
- height: 40px;
1771
- justify-content: space-between;
1772
- width: 100%;
1773
- }
1774
-
1775
- .content-container .content {
1776
- text-wrap: nowrap;
1777
- }
1778
-
1779
- .content-container.show {
1780
- display: flex;
1781
- animation: fade-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1782
- }
1783
-
1784
- .content-container.show .content {
1785
- animation: slide-in 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1786
- }
1787
-
1788
- .content-container.hide {
1789
- animation: fade-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1790
- }
1791
-
1792
- .content-container.hide .content {
1793
- animation: slide-out 0.3s cubic-bezier(0.3, 0.4, 0.3, 0.8) forwards;
1794
- }
1795
-
1796
- .search-bar {
1797
- align-items: center;
1798
- background: white;
1799
- border: none;
1800
- display: none;
1801
- justify-content: flex-end;
1802
- gap: 16px;
1803
- width: 100%;
1804
- }
1805
-
1806
- .search-bar.show {
1807
- display: flex;
1808
- }
1809
- `, xt = class extends A {
1810
- constructor() {
1811
- super(...arguments), this.showSearchBar = null, this.loading = !1, this.handleSubmit = () => {
1812
- const t = this.shadowRoot?.querySelector("input")?.value || "";
1813
- this.dispatchEvent(new CustomEvent("onSearch", { detail: { inputValue: t }, bubbles: !0, composed: !0 })), this.requestUpdate();
1814
- }, this.handleSearch = $i(this.handleSubmit, 700);
1815
- }
1816
- setSearchMode(e) {
1817
- this.showSearchBar = e;
1818
- const t = this.shadowRoot?.querySelector("input");
1819
- this.requestUpdate(), e ? setTimeout(() => {
1820
- t?.focus();
1821
- }, 100) : (this.dispatchEvent(new CustomEvent("onCancel", { bubbles: !0, composed: !0 })), t && (t.value = ""));
1822
- }
1823
- render() {
1824
- return w`
1825
- <div class="container">
1826
- <div
1827
- class="content-container ${this.showSearchBar === null ? "" : this.showSearchBar ? "hide" : "show"}"
1828
- >
1829
- <div class="content" style="${this.style}">
1830
- <slot></slot>
1831
- </div>
1832
- <button @click="${() => this.setSearchMode(!0)}">
1833
- ${_e}
1834
- </button>
1835
- </div>
1836
- <div class="search-container ${this.showSearchBar ? "show" : "hide"}">
1837
- <button
1838
- class="return-button"
1839
- @click="${() => this.setSearchMode(!1)}"
1840
- >
1841
- ${Ji}
1842
- </button>
1843
- <form
1844
- class="search-form"
1845
- @submit="${(e) => {
1846
- e.preventDefault(), this.handleSubmit();
1847
- }}"
1848
- >
1849
- <input
1850
- type="text"
1851
- placeholder="Type to search"
1852
- @keyup=${this.handleSearch}
1853
- />
1854
- <button class="search-button" type="submit">
1855
- ${this.loading ? Fi : _e}
1856
- </button>
1857
- </form>
1858
- </div>
1859
- </div>
1860
- `;
1861
- }
1862
- };
1863
- xt.styles = [Xi, Yi, Ki];
1864
- g([N()], xt.prototype, "showSearchBar");
1865
- g([v({ converter: (e) => e === "true" })], xt.prototype, "loading");
1866
- B("appcues-search-header", xt);
1867
- var Gi = (e) => e && new DOMParser().parseFromString(e, "text/html").body.textContent || "", Qi = $`
1868
- :host {
1869
- height: 100%;
1870
- display: block;
1871
- }
1872
-
1873
- * {
1874
- margin: 0;
1875
- padding: 0;
1876
- box-sizing: border-box;
1877
- }
1878
-
1879
- .root-wrapper {
1880
- height: 100%;
1881
- box-shadow: var(--search-results-block-shadow);
1882
- color: var(--search-results-block-color);
1883
- background-color: var(--search-results-block-background-color);
1884
- }
1885
-
1886
- .content-wrapper {
1887
- padding: 16px 16px 16px 16px;
1888
- background: var(--search-results-block-content-wrapper-background-color);
1889
- min-height: 100%;
1890
- }
1891
-
1892
- .content-wrapper .root-wrapper {
1893
- height: auto;
1894
- border-radius: var(--search-results-block-radius);
1895
- }
1896
-
1897
- .root-wrapper[loading='true'] {
1898
- overflow: hidden;
1899
- }
1900
-
1901
- .alert-wrapper {
1902
- display: flex;
1903
- flex-direction: column;
1904
- gap: 16px;
1905
- align-items: center;
1906
- justify-content: center;
1907
- text-align: center;
1908
- padding: 16px;
1909
- }
1910
- `, ts = $`
1911
- .pagination-btn {
1912
- align-items: center;
1913
- background: transparent;
1914
- border-bottom-left-radius: var(--search-results-block-radius);
1915
- border-bottom-right-radius: var(--search-results-block-radius);
1916
- border-top: 1px solid rgba(66, 86, 120, 0.1);
1917
- border-left: none;
1918
- border-right: none;
1919
- border-bottom: none;
1920
- cursor: pointer;
1921
- display: flex;
1922
- font-size: 14px;
1923
- font-weight: 500;
1924
- justify-content: center;
1925
- line-height: 24px;
1926
- padding: 8px 16px;
1927
- width: 100%;
1928
- position: relative;
1929
- top: 1px;
1930
- }
1931
-
1932
- .pagination-btn:hover {
1933
- background: var(--search-results-block-background-color-hover);
1934
- }
1935
-
1936
- .pagination-btn:focus {
1937
- outline: 2px solid var(--search-results-block-outline-color);
1938
- background: var(--search-results-block-background-color-active);
1939
- }
1940
- `, es = $`
1941
- .article-main-title-wrapper {
1942
- padding: 8px 16px;
1943
- }
1944
-
1945
- .article-main-title {
1946
- font-size: 15px;
1947
- font-style: normal;
1948
- font-weight: 700;
1949
- }
1950
-
1951
- .article-list {
1952
- font-style: normal;
1953
- display: flex;
1954
- flex-direction: column;
1955
- gap: 4px;
1956
- list-style: none;
1957
- }
1958
-
1959
- .article-list a {
1960
- text-decoration: none;
1961
- display: flex;
1962
- flex-direction: column;
1963
- gap: 8px;
1964
- padding: 8px 16px;
1965
- color: currentColor;
1966
- }
1967
-
1968
- .article-list a[loading='false']:hover {
1969
- background-color: var(--search-results-block-background-color-hover);
1970
- }
1971
-
1972
- .article-list a[loading='false']:focus {
1973
- outline: 2px solid var(--search-results-block-outline-color);
1974
- background: var(--search-results-block-background-color-active);
1975
- }
1976
-
1977
- .article-title-wrapper {
1978
- font-size: 14px;
1979
- font-weight: bold;
1980
- line-height: 160%;
1981
- display: flex;
1982
- gap: 8px;
1983
- align-items: center;
1984
- justify-content: space-between;
1985
- }
1986
-
1987
- .article-title-wrapper p {
1988
- text-overflow: ellipsis;
1989
- display: -webkit-box;
1990
- -webkit-line-clamp: 2;
1991
- -webkit-box-orient: vertical;
1992
- overflow: hidden;
1993
- }
1994
-
1995
- .article-title-wrapper svg {
1996
- min-width: 12px;
1997
- min-height: 12px;
1998
- width: 12px;
1999
- height: 12px;
2000
- }
2001
-
2002
- .article-title-wrapper.loading {
2003
- width: 70%;
2004
- }
2005
-
2006
- .article-description {
2007
- font-size: 13px;
2008
- font-weight: normal;
2009
- line-height: 160%;
2010
- text-overflow: ellipsis;
2011
- display: -webkit-box;
2012
- -webkit-line-clamp: 3;
2013
- -webkit-box-orient: vertical;
2014
- overflow: hidden;
2015
- }
2016
-
2017
- .article-description.loading {
2018
- height: 50px;
2019
- }
2020
- `, is = $`
2021
- @keyframes animatedBackgroundPosition {
2022
- 0% {
2023
- background-position: 0% 92%;
2024
- }
2025
- 100% {
2026
- background-position: 100% 9%;
2027
- }
2028
- }
2029
-
2030
- .loading {
2031
- opacity: 0.5;
2032
- background: linear-gradient(
2033
- 135deg,
2034
- rgba(211, 223, 232, 0.5) 30%,
2035
- rgba(169, 184, 197, 0.5) 38%,
2036
- rgba(168, 182, 193, 0.6) 41%,
2037
- rgba(168, 182, 193, 0.6) 50%,
2038
- rgba(168, 182, 193, 0.6) 50%,
2039
- rgba(169, 184, 197, 0.6) 51%,
2040
- rgba(211, 223, 232, 0.6) 57%,
2041
- rgba(211, 223, 232, 0.6) 80%,
2042
- rgba(211, 223, 232, 0.6) 80%
2043
- );
2044
- background-size: 1200% 1200%;
2045
- animation: animatedBackgroundPosition 3s ease infinite reverse;
2046
- color: transparent;
2047
- }
2048
- `, ss = Ee`
2049
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2050
- <g id="Icon">
2051
- <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"/>
2052
- </g>
2053
- </svg>
2054
- `, rs = Ee`
2055
- <svg
2056
- xmlns="http://www.w3.org/2000/svg"
2057
- width="12px"
2058
- height="12px"
2059
- viewBox="0 0 24 24"
2060
- fill="none"
2061
- aria-hidden
2062
- >
2063
- <path
2064
- 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"
2065
- fill="currentColor"
2066
- />
2067
- </svg>
2068
- `, V = class extends A {
2069
- constructor() {
2070
- super(...arguments), this.state = "empty", this.searchTerm = "", this.hasNextPage = !1, this.pageSize = 10, this.results = [], this.handleRequestNextPage = () => {
2071
- this.dispatchEvent(new CustomEvent("onRequestNextPage", { bubbles: !0, composed: !0 }));
2072
- }, this.handleLinkClicked = (e) => () => {
2073
- this.dispatchEvent(new CustomEvent("onLinkClicked", { bubbles: !0, composed: !0, detail: e }));
2074
- }, this.mockResultData = () => {
2075
- this.results = Array.from({ length: this.pageSize }).map((e, t) => ({ url: `url ${t}`, excerpt: `excerpt ${t}`, title: `title ${t}` }));
2076
- };
2077
- }
2078
- connectedCallback() {
2079
- super.connectedCallback(), this.state === "loading" && this.mockResultData();
2080
- }
2081
- attributeChangedCallback(e, t, i) {
2082
- super.attributeChangedCallback(e, t, i), e === "state" && (i === "loading" && this.mockResultData(), this.state = i);
2083
- }
2084
- render() {
2085
- return this.state === "empty" ? w`
2086
- <div class="root-wrapper alert-wrapper">
2087
- <p>No results for '${this.searchTerm}'</p>
2088
- </div>
2089
- ` : this.state === "error" ? w`
2090
- <div class="root-wrapper alert-wrapper">
2091
- <p>We could not load the results</p>
2092
- <p>Try again later</p>
2093
- </div>
2094
- ` : w`
2095
- <div class="content-wrapper">
2096
- <div class="root-wrapper" loading="${this.state === "loading"}">
2097
- <ul class="article-list">
2098
- ${this.results.map((e) => w`
2099
- <li @click=${this.handleLinkClicked(e)}>
2100
- <a
2101
- href="${e.url}"
2102
- target="_blank"
2103
- rel="noopener noreferrer"
2104
- loading="${this.state === "loading"}"
2105
- >
2106
- <div class="article-title-wrapper ${this.state}">
2107
- <p>${e.title}</p>
2108
- ${rs}
2109
- </div>
2110
- <p class="article-description ${this.state}">
2111
- ${Gi(e.excerpt)}
2112
- </p>
2113
- </a>
2114
- </li>
2115
- `)}
2116
- </ul>
2117
-
2118
- ${this.hasNextPage && this.state !== "loading" ? w`
2119
- <button
2120
- class="pagination-btn"
2121
- @click=${this.handleRequestNextPage}
2122
- >
2123
- See more ${this.results.length} results ${ss}
2124
- </button>
2125
- ` : w``}
2126
- </div>
2127
- </div>
2128
- `;
2129
- }
2130
- };
2131
- V.styles = [Qi, es, is, ts];
2132
- g([v()], V.prototype, "state");
2133
- g([v()], V.prototype, "searchTerm");
2134
- g([v({ converter: (e) => e === "true" })], V.prototype, "hasNextPage");
2135
- g([v()], V.prototype, "pageSize");
2136
- g([v({ type: Array })], V.prototype, "results");
2137
- B("appcues-search-results", V);