@vouchfor/embeds 0.0.0-experiment.08c37fe → 0.0.0-experiment.0b5c8d1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/es/embeds.js CHANGED
@@ -1,26 +1,27 @@
1
- import { property as A, state as Lt, customElement as te } from "lit/decorators.js";
2
- import { ifDefined as $t } from "lit/directives/if-defined.js";
3
- import { createRef as Dt, ref as jt } from "lit/directives/ref.js";
4
- import { Task as ee } from "@lit/task";
1
+ import { property as v, state as jt, customElement as he } from "lit/decorators.js";
2
+ import { ifDefined as ft } from "lit/directives/if-defined.js";
3
+ import { createRef as Bt, ref as Wt } from "lit/directives/ref.js";
4
+ import { Task as le } from "@lit/task";
5
+ import { v4 as P } from "uuid";
5
6
  import "@vouchfor/media-player";
6
7
  /**
7
8
  * @license
8
9
  * Copyright 2019 Google LLC
9
10
  * SPDX-License-Identifier: BSD-3-Clause
10
11
  */
11
- const F = window, vt = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Bt = Symbol(), mt = /* @__PURE__ */ new WeakMap();
12
- let ie = class {
12
+ const G = globalThis, _t = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, qt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
13
+ let de = class {
13
14
  constructor(t, e, i) {
14
- if (this._$cssResult$ = !0, i !== Bt)
15
+ if (this._$cssResult$ = !0, i !== qt)
15
16
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
16
17
  this.cssText = t, this.t = e;
17
18
  }
18
19
  get styleSheet() {
19
20
  let t = this.o;
20
21
  const e = this.t;
21
- if (vt && t === void 0) {
22
+ if (_t && t === void 0) {
22
23
  const i = e !== void 0 && e.length === 1;
23
- i && (t = mt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && mt.set(e, t));
24
+ i && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && gt.set(e, t));
24
25
  }
25
26
  return t;
26
27
  }
@@ -28,176 +29,201 @@ let ie = class {
28
29
  return this.cssText;
29
30
  }
30
31
  };
31
- const se = (n) => new ie(typeof n == "string" ? n : n + "", void 0, Bt), ne = (n, t) => {
32
- vt ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
33
- const i = document.createElement("style"), s = F.litNonce;
34
- s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i);
35
- });
36
- }, gt = vt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
32
+ const ce = (r) => new de(typeof r == "string" ? r : r + "", void 0, qt), pe = (r, t) => {
33
+ if (_t)
34
+ r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
35
+ else
36
+ for (const e of t) {
37
+ const i = document.createElement("style"), s = G.litNonce;
38
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
39
+ }
40
+ }, vt = _t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
37
41
  let e = "";
38
42
  for (const i of t.cssRules)
39
43
  e += i.cssText;
40
- return se(e);
41
- })(n) : n;
44
+ return ce(e);
45
+ })(r) : r;
42
46
  /**
43
47
  * @license
44
48
  * Copyright 2017 Google LLC
45
49
  * SPDX-License-Identifier: BSD-3-Clause
46
50
  */
47
- var et;
48
- const K = window, ft = K.trustedTypes, re = ft ? ft.emptyScript : "", At = K.reactiveElementPolyfillSupport, ht = { toAttribute(n, t) {
51
+ const { is: ue, defineProperty: _e, getOwnPropertyDescriptor: me, getOwnPropertyNames: $e, getOwnPropertySymbols: fe, getPrototypeOf: ge } = Object, b = globalThis, yt = b.trustedTypes, ve = yt ? yt.emptyScript : "", rt = b.reactiveElementPolyfillSupport, I = (r, t) => r, ct = { toAttribute(r, t) {
49
52
  switch (t) {
50
53
  case Boolean:
51
- n = n ? re : null;
54
+ r = r ? ve : null;
52
55
  break;
53
56
  case Object:
54
57
  case Array:
55
- n = n == null ? n : JSON.stringify(n);
58
+ r = r == null ? r : JSON.stringify(r);
56
59
  }
57
- return n;
58
- }, fromAttribute(n, t) {
59
- let e = n;
60
+ return r;
61
+ }, fromAttribute(r, t) {
62
+ let e = r;
60
63
  switch (t) {
61
64
  case Boolean:
62
- e = n !== null;
65
+ e = r !== null;
63
66
  break;
64
67
  case Number:
65
- e = n === null ? null : Number(n);
68
+ e = r === null ? null : Number(r);
66
69
  break;
67
70
  case Object:
68
71
  case Array:
69
72
  try {
70
- e = JSON.parse(n);
73
+ e = JSON.parse(r);
71
74
  } catch {
72
75
  e = null;
73
76
  }
74
77
  }
75
78
  return e;
76
- } }, zt = (n, t) => t !== n && (t == t || n == n), it = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: zt }, dt = "finalized";
77
- let x = class extends HTMLElement {
78
- constructor() {
79
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
80
- }
79
+ } }, Xt = (r, t) => !ue(r, t), At = { attribute: !0, type: String, converter: ct, reflect: !1, hasChanged: Xt };
80
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
81
+ let N = class extends HTMLElement {
81
82
  static addInitializer(t) {
82
- var e;
83
- this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
83
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
84
84
  }
85
85
  static get observedAttributes() {
86
- this.finalize();
87
- const t = [];
88
- return this.elementProperties.forEach((e, i) => {
89
- const s = this._$Ep(i, e);
90
- s !== void 0 && (this._$Ev.set(s, i), t.push(s));
91
- }), t;
92
- }
93
- static createProperty(t, e = it) {
94
- if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
95
- const i = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, i, e);
96
- s !== void 0 && Object.defineProperty(this.prototype, t, s);
86
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
87
+ }
88
+ static createProperty(t, e = At) {
89
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
90
+ const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
91
+ s !== void 0 && _e(this.prototype, t, s);
97
92
  }
98
93
  }
99
94
  static getPropertyDescriptor(t, e, i) {
100
- return { get() {
95
+ const { get: s, set: n } = me(this.prototype, t) ?? { get() {
101
96
  return this[e];
102
- }, set(s) {
103
- const o = this[t];
104
- this[e] = s, this.requestUpdate(t, o, i);
97
+ }, set(o) {
98
+ this[e] = o;
99
+ } };
100
+ return { get() {
101
+ return s == null ? void 0 : s.call(this);
102
+ }, set(o) {
103
+ const h = s == null ? void 0 : s.call(this);
104
+ n.call(this, o), this.requestUpdate(t, h, i);
105
105
  }, configurable: !0, enumerable: !0 };
106
106
  }
107
107
  static getPropertyOptions(t) {
108
- return this.elementProperties.get(t) || it;
108
+ return this.elementProperties.get(t) ?? At;
109
+ }
110
+ static _$Ei() {
111
+ if (this.hasOwnProperty(I("elementProperties")))
112
+ return;
113
+ const t = ge(this);
114
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
109
115
  }
110
116
  static finalize() {
111
- if (this.hasOwnProperty(dt))
112
- return !1;
113
- this[dt] = !0;
114
- const t = Object.getPrototypeOf(this);
115
- 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")) {
116
- const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
117
+ if (this.hasOwnProperty(I("finalized")))
118
+ return;
119
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
120
+ const e = this.properties, i = [...$e(e), ...fe(e)];
117
121
  for (const s of i)
118
122
  this.createProperty(s, e[s]);
119
123
  }
120
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
124
+ const t = this[Symbol.metadata];
125
+ if (t !== null) {
126
+ const e = litPropertyMetadata.get(t);
127
+ if (e !== void 0)
128
+ for (const [i, s] of e)
129
+ this.elementProperties.set(i, s);
130
+ }
131
+ this._$Eh = /* @__PURE__ */ new Map();
132
+ for (const [e, i] of this.elementProperties) {
133
+ const s = this._$Eu(e, i);
134
+ s !== void 0 && this._$Eh.set(s, e);
135
+ }
136
+ this.elementStyles = this.finalizeStyles(this.styles);
121
137
  }
122
138
  static finalizeStyles(t) {
123
139
  const e = [];
124
140
  if (Array.isArray(t)) {
125
141
  const i = new Set(t.flat(1 / 0).reverse());
126
142
  for (const s of i)
127
- e.unshift(gt(s));
143
+ e.unshift(vt(s));
128
144
  } else
129
- t !== void 0 && e.push(gt(t));
145
+ t !== void 0 && e.push(vt(t));
130
146
  return e;
131
147
  }
132
- static _$Ep(t, e) {
148
+ static _$Eu(t, e) {
133
149
  const i = e.attribute;
134
150
  return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
135
151
  }
136
- u() {
152
+ constructor() {
153
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
154
+ }
155
+ _$Ev() {
137
156
  var t;
138
- 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));
157
+ this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$ES(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
139
158
  }
140
159
  addController(t) {
141
- var e, i;
142
- ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
160
+ var e;
161
+ (this._$E_ ?? (this._$E_ = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
143
162
  }
144
163
  removeController(t) {
145
164
  var e;
146
- (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
165
+ (e = this._$E_) == null || e.delete(t);
147
166
  }
148
- _$Eg() {
149
- this.constructor.elementProperties.forEach((t, e) => {
150
- this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
151
- });
167
+ _$ES() {
168
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
169
+ for (const i of e.keys())
170
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
171
+ t.size > 0 && (this._$Ep = t);
152
172
  }
153
173
  createRenderRoot() {
154
- var t;
155
- const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
156
- return ne(e, this.constructor.elementStyles), e;
174
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
175
+ return pe(t, this.constructor.elementStyles), t;
157
176
  }
158
177
  connectedCallback() {
159
178
  var t;
160
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
179
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
161
180
  var i;
162
- return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e);
181
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
163
182
  });
164
183
  }
165
184
  enableUpdating(t) {
166
185
  }
167
186
  disconnectedCallback() {
168
187
  var t;
169
- (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
188
+ (t = this._$E_) == null || t.forEach((e) => {
170
189
  var i;
171
- return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e);
190
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
172
191
  });
173
192
  }
174
193
  attributeChangedCallback(t, e, i) {
175
194
  this._$AK(t, i);
176
195
  }
177
- _$EO(t, e, i = it) {
178
- var s;
179
- const o = this.constructor._$Ep(t, i);
180
- if (o !== void 0 && i.reflect === !0) {
181
- const r = (((s = i.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? i.converter : ht).toAttribute(e, i.type);
182
- this._$El = t, r == null ? this.removeAttribute(o) : this.setAttribute(o, r), this._$El = null;
196
+ _$EO(t, e) {
197
+ var n;
198
+ const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
199
+ if (s !== void 0 && i.reflect === !0) {
200
+ const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : ct).toAttribute(e, i.type);
201
+ this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
183
202
  }
184
203
  }
185
204
  _$AK(t, e) {
186
- var i;
187
- const s = this.constructor, o = s._$Ev.get(t);
188
- if (o !== void 0 && this._$El !== o) {
189
- const r = s.getPropertyOptions(o), d = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((i = r.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? r.converter : ht;
190
- this._$El = o, this[o] = d.fromAttribute(e, r.type), this._$El = null;
205
+ var n;
206
+ const i = this.constructor, s = i._$Eh.get(t);
207
+ if (s !== void 0 && this._$Em !== s) {
208
+ const o = i.getPropertyOptions(s), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ct;
209
+ this._$Em = s, this[s] = h.fromAttribute(e, o.type), this._$Em = null;
210
+ }
211
+ }
212
+ requestUpdate(t, e, i, s = !1, n) {
213
+ if (t !== void 0) {
214
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? Xt)(s ? n : this[t], e))
215
+ return;
216
+ this.C(t, e, i);
191
217
  }
218
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
192
219
  }
193
- requestUpdate(t, e, i) {
194
- let s = !0;
195
- t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || zt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
220
+ C(t, e, i) {
221
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
196
222
  }
197
- async _$Ej() {
223
+ async _$EP() {
198
224
  this.isUpdatePending = !0;
199
225
  try {
200
- await this._$E_;
226
+ await this._$Eg;
201
227
  } catch (e) {
202
228
  Promise.reject(e);
203
229
  }
@@ -208,139 +234,141 @@ let x = class extends HTMLElement {
208
234
  return this.performUpdate();
209
235
  }
210
236
  performUpdate() {
211
- var t;
237
+ var i;
212
238
  if (!this.isUpdatePending)
213
239
  return;
214
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, o) => this[o] = s), this._$Ei = void 0);
215
- let e = !1;
216
- const i = this._$AL;
240
+ if (!this.hasUpdated) {
241
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
242
+ for (const [n, o] of this._$Ep)
243
+ this[n] = o;
244
+ this._$Ep = void 0;
245
+ }
246
+ const s = this.constructor.elementProperties;
247
+ if (s.size > 0)
248
+ for (const [n, o] of s)
249
+ o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
250
+ }
251
+ let t = !1;
252
+ const e = this._$AL;
217
253
  try {
218
- e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
219
- var o;
220
- return (o = s.hostUpdate) === null || o === void 0 ? void 0 : o.call(s);
221
- }), this.update(i)) : this._$Ek();
254
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$E_) == null || i.forEach((s) => {
255
+ var n;
256
+ return (n = s.hostUpdate) == null ? void 0 : n.call(s);
257
+ }), this.update(e)) : this._$ET();
222
258
  } catch (s) {
223
- throw e = !1, this._$Ek(), s;
259
+ throw t = !1, this._$ET(), s;
224
260
  }
225
- e && this._$AE(i);
261
+ t && this._$AE(e);
226
262
  }
227
263
  willUpdate(t) {
228
264
  }
229
265
  _$AE(t) {
230
266
  var e;
231
- (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
267
+ (e = this._$E_) == null || e.forEach((i) => {
232
268
  var s;
233
- return (s = i.hostUpdated) === null || s === void 0 ? void 0 : s.call(i);
269
+ return (s = i.hostUpdated) == null ? void 0 : s.call(i);
234
270
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
235
271
  }
236
- _$Ek() {
272
+ _$ET() {
237
273
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
238
274
  }
239
275
  get updateComplete() {
240
276
  return this.getUpdateComplete();
241
277
  }
242
278
  getUpdateComplete() {
243
- return this._$E_;
279
+ return this._$Eg;
244
280
  }
245
281
  shouldUpdate(t) {
246
282
  return !0;
247
283
  }
248
284
  update(t) {
249
- this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek();
285
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
250
286
  }
251
287
  updated(t) {
252
288
  }
253
289
  firstUpdated(t) {
254
290
  }
255
291
  };
256
- x[dt] = !0, x.elementProperties = /* @__PURE__ */ new Map(), x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, At == null || At({ ReactiveElement: x }), ((et = K.reactiveElementVersions) !== null && et !== void 0 ? et : K.reactiveElementVersions = []).push("1.6.2");
292
+ N.elementStyles = [], N.shadowRootOptions = { mode: "open" }, N[I("elementProperties")] = /* @__PURE__ */ new Map(), N[I("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: N }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.0.2");
257
293
  /**
258
294
  * @license
259
295
  * Copyright 2017 Google LLC
260
296
  * SPDX-License-Identifier: BSD-3-Clause
261
297
  */
262
- var st;
263
- const G = window, R = G.trustedTypes, yt = R ? R.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, ct = "$lit$", E = `lit$${(Math.random() + "").slice(9)}$`, qt = "?" + E, oe = `<${qt}>`, U = document, J = () => U.createComment(""), D = (n) => n === null || typeof n != "object" && typeof n != "function", Wt = Array.isArray, le = (n) => Wt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", nt = `[
264
- \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Et = /-->/g, wt = />/g, b = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
265
- \f\r"'\`<>=]|("|')|))|$)`, "g"), bt = /'/g, St = /"/g, Zt = /^(?:script|style|textarea|title)$/i, j = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), Pt = /* @__PURE__ */ new WeakMap(), P = U.createTreeWalker(U, 129, null, !1);
266
- function Ft(n, t) {
267
- if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
298
+ const V = globalThis, Y = V.trustedTypes, bt = Y ? Y.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Jt = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, Kt = "?" + y, ye = `<${Kt}>`, T = document, Q = () => T.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", Ft = Array.isArray, Ae = (r) => Ft(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", nt = `[
299
+ \f\r]`, L = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Et = /-->/g, St = />/g, S = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
300
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, Pt = /"/g, Gt = /^(?:script|style|textarea|title)$/i, W = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), C = T.createTreeWalker(T, 129);
301
+ function Zt(r, t) {
302
+ if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
268
303
  throw Error("invalid template strings array");
269
- return yt !== void 0 ? yt.createHTML(t) : t;
304
+ return bt !== void 0 ? bt.createHTML(t) : t;
270
305
  }
271
- const ae = (n, t) => {
272
- const e = n.length - 1, i = [];
273
- let s, o = t === 2 ? "<svg>" : "", r = O;
274
- for (let d = 0; d < e; d++) {
275
- const l = n[d];
276
- let a, u, h = -1, c = 0;
277
- for (; c < l.length && (r.lastIndex = c, u = r.exec(l), u !== null); )
278
- c = r.lastIndex, r === O ? u[1] === "!--" ? r = Et : u[1] !== void 0 ? r = wt : u[2] !== void 0 ? (Zt.test(u[2]) && (s = RegExp("</" + u[2], "g")), r = b) : u[3] !== void 0 && (r = b) : r === b ? u[0] === ">" ? (r = s ?? O, h = -1) : u[1] === void 0 ? h = -2 : (h = r.lastIndex - u[2].length, a = u[1], r = u[3] === void 0 ? b : u[3] === '"' ? St : bt) : r === St || r === bt ? r = b : r === Et || r === wt ? r = O : (r = b, s = void 0);
279
- const p = r === b && n[d + 1].startsWith("/>") ? " " : "";
280
- o += r === O ? l + oe : h >= 0 ? (i.push(a), l.slice(0, h) + ct + l.slice(h) + E + p) : l + E + (h === -2 ? (i.push(void 0), d) : p);
281
- }
282
- return [Ft(n, o + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
306
+ const be = (r, t) => {
307
+ const e = r.length - 1, i = [];
308
+ let s, n = t === 2 ? "<svg>" : "", o = L;
309
+ for (let h = 0; h < e; h++) {
310
+ const a = r[h];
311
+ let d, c, l = -1, p = 0;
312
+ for (; p < a.length && (o.lastIndex = p, c = o.exec(a), c !== null); )
313
+ p = o.lastIndex, o === L ? c[1] === "!--" ? o = Et : c[1] !== void 0 ? o = St : c[2] !== void 0 ? (Gt.test(c[2]) && (s = RegExp("</" + c[2], "g")), o = S) : c[3] !== void 0 && (o = S) : o === S ? c[0] === ">" ? (o = s ?? L, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, d = c[1], o = c[3] === void 0 ? S : c[3] === '"' ? Pt : wt) : o === Pt || o === wt ? o = S : o === Et || o === St ? o = L : (o = S, s = void 0);
314
+ const u = o === S && r[h + 1].startsWith("/>") ? " " : "";
315
+ n += o === L ? a + ye : l >= 0 ? (i.push(d), a.slice(0, l) + Jt + a.slice(l) + y + u) : a + y + (l === -2 ? h : u);
316
+ }
317
+ return [Zt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
283
318
  };
284
- let ut = class Kt {
319
+ let pt = class Yt {
285
320
  constructor({ strings: t, _$litType$: e }, i) {
286
321
  let s;
287
322
  this.parts = [];
288
- let o = 0, r = 0;
289
- const d = t.length - 1, l = this.parts, [a, u] = ae(t, e);
290
- if (this.el = Kt.createElement(a, i), P.currentNode = this.el.content, e === 2) {
291
- const h = this.el.content, c = h.firstChild;
292
- c.remove(), h.append(...c.childNodes);
323
+ let n = 0, o = 0;
324
+ const h = t.length - 1, a = this.parts, [d, c] = be(t, e);
325
+ if (this.el = Yt.createElement(d, i), C.currentNode = this.el.content, e === 2) {
326
+ const l = this.el.content.firstChild;
327
+ l.replaceWith(...l.childNodes);
293
328
  }
294
- for (; (s = P.nextNode()) !== null && l.length < d; ) {
329
+ for (; (s = C.nextNode()) !== null && a.length < h; ) {
295
330
  if (s.nodeType === 1) {
296
- if (s.hasAttributes()) {
297
- const h = [];
298
- for (const c of s.getAttributeNames())
299
- if (c.endsWith(ct) || c.startsWith(E)) {
300
- const p = u[r++];
301
- if (h.push(c), p !== void 0) {
302
- const y = s.getAttribute(p.toLowerCase() + ct).split(E), m = /([.?@])?(.*)/.exec(p);
303
- l.push({ type: 1, index: o, name: m[2], strings: y, ctor: m[1] === "." ? de : m[1] === "?" ? ue : m[1] === "@" ? pe : Q });
304
- } else
305
- l.push({ type: 6, index: o });
306
- }
307
- for (const c of h)
308
- s.removeAttribute(c);
309
- }
310
- if (Zt.test(s.tagName)) {
311
- const h = s.textContent.split(E), c = h.length - 1;
312
- if (c > 0) {
313
- s.textContent = R ? R.emptyScript : "";
314
- for (let p = 0; p < c; p++)
315
- s.append(h[p], J()), P.nextNode(), l.push({ type: 2, index: ++o });
316
- s.append(h[c], J());
331
+ if (s.hasAttributes())
332
+ for (const l of s.getAttributeNames())
333
+ if (l.endsWith(Jt)) {
334
+ const p = c[o++], u = s.getAttribute(l).split(y), g = /([.?@])?(.*)/.exec(p);
335
+ a.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Se : g[1] === "?" ? we : g[1] === "@" ? Pe : it }), s.removeAttribute(l);
336
+ } else
337
+ l.startsWith(y) && (a.push({ type: 6, index: n }), s.removeAttribute(l));
338
+ if (Gt.test(s.tagName)) {
339
+ const l = s.textContent.split(y), p = l.length - 1;
340
+ if (p > 0) {
341
+ s.textContent = Y ? Y.emptyScript : "";
342
+ for (let u = 0; u < p; u++)
343
+ s.append(l[u], Q()), C.nextNode(), a.push({ type: 2, index: ++n });
344
+ s.append(l[p], Q());
317
345
  }
318
346
  }
319
347
  } else if (s.nodeType === 8)
320
- if (s.data === qt)
321
- l.push({ type: 2, index: o });
348
+ if (s.data === Kt)
349
+ a.push({ type: 2, index: n });
322
350
  else {
323
- let h = -1;
324
- for (; (h = s.data.indexOf(E, h + 1)) !== -1; )
325
- l.push({ type: 7, index: o }), h += E.length - 1;
351
+ let l = -1;
352
+ for (; (l = s.data.indexOf(y, l + 1)) !== -1; )
353
+ a.push({ type: 7, index: n }), l += y.length - 1;
326
354
  }
327
- o++;
355
+ n++;
328
356
  }
329
357
  }
330
358
  static createElement(t, e) {
331
- const i = U.createElement("template");
359
+ const i = T.createElement("template");
332
360
  return i.innerHTML = t, i;
333
361
  }
334
362
  };
335
- function H(n, t, e = n, i) {
336
- var s, o, r, d;
337
- if (t === j)
363
+ function H(r, t, e = r, i) {
364
+ var o, h;
365
+ if (t === W)
338
366
  return t;
339
- let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl;
340
- const a = D(t) ? void 0 : t._$litDirective$;
341
- return (l == null ? void 0 : l.constructor) !== a && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((r = (d = e)._$Co) !== null && r !== void 0 ? r : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = H(n, l._$AS(n, t.values), l, i)), t;
367
+ let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
368
+ const n = B(t) ? void 0 : t._$litDirective$;
369
+ return (s == null ? void 0 : s.constructor) !== n && ((h = s == null ? void 0 : s._$AO) == null || h.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = H(r, s._$AS(r, t.values), s, i)), t;
342
370
  }
343
- let he = class {
371
+ let Ee = class {
344
372
  constructor(t, e) {
345
373
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
346
374
  }
@@ -351,32 +379,30 @@ let he = class {
351
379
  return this._$AM._$AU;
352
380
  }
353
381
  u(t) {
354
- var e;
355
- const { el: { content: i }, parts: s } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : U).importNode(i, !0);
356
- P.currentNode = o;
357
- let r = P.nextNode(), d = 0, l = 0, a = s[0];
382
+ const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? T).importNode(e, !0);
383
+ C.currentNode = s;
384
+ let n = C.nextNode(), o = 0, h = 0, a = i[0];
358
385
  for (; a !== void 0; ) {
359
- if (d === a.index) {
360
- let u;
361
- a.type === 2 ? u = new Gt(r, r.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (u = new ve(r, this, t)), this._$AV.push(u), a = s[++l];
386
+ if (o === a.index) {
387
+ let d;
388
+ a.type === 2 ? d = new Qt(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ce(n, this, t)), this._$AV.push(d), a = i[++h];
362
389
  }
363
- d !== (a == null ? void 0 : a.index) && (r = P.nextNode(), d++);
390
+ o !== (a == null ? void 0 : a.index) && (n = C.nextNode(), o++);
364
391
  }
365
- return P.currentNode = U, o;
392
+ return C.currentNode = T, s;
366
393
  }
367
- v(t) {
394
+ p(t) {
368
395
  let e = 0;
369
396
  for (const i of this._$AV)
370
397
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
371
398
  }
372
- }, Gt = class Jt {
373
- constructor(t, e, i, s) {
374
- var o;
375
- this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (o = s == null ? void 0 : s.isConnected) === null || o === void 0 || o;
376
- }
399
+ }, Qt = class te {
377
400
  get _$AU() {
378
- var t, e;
379
- return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
401
+ var t;
402
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
403
+ }
404
+ constructor(t, e, i, s) {
405
+ this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
380
406
  }
381
407
  get parentNode() {
382
408
  let t = this._$AA.parentNode;
@@ -390,7 +416,7 @@ let he = class {
390
416
  return this._$AB;
391
417
  }
392
418
  _$AI(t, e = this) {
393
- t = H(this, t, e), D(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : le(t) ? this.T(t) : this._(t);
419
+ t = H(this, t, e), B(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ae(t) ? this.T(t) : this._(t);
394
420
  }
395
421
  k(t) {
396
422
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -399,100 +425,96 @@ let he = class {
399
425
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
400
426
  }
401
427
  _(t) {
402
- this._$AH !== v && D(this._$AH) ? this._$AA.nextSibling.data = t : this.$(U.createTextNode(t)), this._$AH = t;
428
+ this._$AH !== _ && B(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
403
429
  }
404
430
  g(t) {
405
- var e;
406
- const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = ut.createElement(Ft(s.h, s.h[0]), this.options)), s);
407
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
408
- this._$AH.v(i);
431
+ var n;
432
+ const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = pt.createElement(Zt(i.h, i.h[0]), this.options)), i);
433
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
434
+ this._$AH.p(e);
409
435
  else {
410
- const r = new he(o, this), d = r.u(this.options);
411
- r.v(i), this.$(d), this._$AH = r;
436
+ const o = new Ee(s, this), h = o.u(this.options);
437
+ o.p(e), this.$(h), this._$AH = o;
412
438
  }
413
439
  }
414
440
  _$AC(t) {
415
- let e = Pt.get(t.strings);
416
- return e === void 0 && Pt.set(t.strings, e = new ut(t)), e;
441
+ let e = Ct.get(t.strings);
442
+ return e === void 0 && Ct.set(t.strings, e = new pt(t)), e;
417
443
  }
418
444
  T(t) {
419
- Wt(this._$AH) || (this._$AH = [], this._$AR());
445
+ Ft(this._$AH) || (this._$AH = [], this._$AR());
420
446
  const e = this._$AH;
421
447
  let i, s = 0;
422
- for (const o of t)
423
- s === e.length ? e.push(i = new Jt(this.k(J()), this.k(J()), this, this.options)) : i = e[s], i._$AI(o), s++;
448
+ for (const n of t)
449
+ s === e.length ? e.push(i = new te(this.k(Q()), this.k(Q()), this, this.options)) : i = e[s], i._$AI(n), s++;
424
450
  s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
425
451
  }
426
452
  _$AR(t = this._$AA.nextSibling, e) {
427
453
  var i;
428
- for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
454
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
429
455
  const s = t.nextSibling;
430
456
  t.remove(), t = s;
431
457
  }
432
458
  }
433
459
  setConnected(t) {
434
460
  var e;
435
- this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
436
- }
437
- }, Q = class {
438
- constructor(t, e, i, s, o) {
439
- this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = v;
461
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
440
462
  }
463
+ }, it = class {
441
464
  get tagName() {
442
465
  return this.element.tagName;
443
466
  }
444
467
  get _$AU() {
445
468
  return this._$AM._$AU;
446
469
  }
470
+ constructor(t, e, i, s, n) {
471
+ this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
472
+ }
447
473
  _$AI(t, e = this, i, s) {
448
- const o = this.strings;
449
- let r = !1;
450
- if (o === void 0)
451
- t = H(this, t, e, 0), r = !D(t) || t !== this._$AH && t !== j, r && (this._$AH = t);
474
+ const n = this.strings;
475
+ let o = !1;
476
+ if (n === void 0)
477
+ t = H(this, t, e, 0), o = !B(t) || t !== this._$AH && t !== W, o && (this._$AH = t);
452
478
  else {
453
- const d = t;
454
- let l, a;
455
- for (t = o[0], l = 0; l < o.length - 1; l++)
456
- a = H(this, d[i + l], e, l), a === j && (a = this._$AH[l]), r || (r = !D(a) || a !== this._$AH[l]), a === v ? t = v : t !== v && (t += (a ?? "") + o[l + 1]), this._$AH[l] = a;
479
+ const h = t;
480
+ let a, d;
481
+ for (t = n[0], a = 0; a < n.length - 1; a++)
482
+ d = H(this, h[i + a], e, a), d === W && (d = this._$AH[a]), o || (o = !B(d) || d !== this._$AH[a]), d === _ ? t = _ : t !== _ && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
457
483
  }
458
- r && !s && this.j(t);
484
+ o && !s && this.O(t);
459
485
  }
460
- j(t) {
461
- t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
486
+ O(t) {
487
+ t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
462
488
  }
463
- }, de = class extends Q {
489
+ }, Se = class extends it {
464
490
  constructor() {
465
491
  super(...arguments), this.type = 3;
466
492
  }
467
- j(t) {
468
- this.element[this.name] = t === v ? void 0 : t;
493
+ O(t) {
494
+ this.element[this.name] = t === _ ? void 0 : t;
469
495
  }
470
- };
471
- const ce = R ? R.emptyScript : "";
472
- let ue = class extends Q {
496
+ }, we = class extends it {
473
497
  constructor() {
474
498
  super(...arguments), this.type = 4;
475
499
  }
476
- j(t) {
477
- t && t !== v ? this.element.setAttribute(this.name, ce) : this.element.removeAttribute(this.name);
500
+ O(t) {
501
+ this.element.toggleAttribute(this.name, !!t && t !== _);
478
502
  }
479
- }, pe = class extends Q {
480
- constructor(t, e, i, s, o) {
481
- super(t, e, i, s, o), this.type = 5;
503
+ }, Pe = class extends it {
504
+ constructor(t, e, i, s, n) {
505
+ super(t, e, i, s, n), this.type = 5;
482
506
  }
483
507
  _$AI(t, e = this) {
484
- var i;
485
- if ((t = (i = H(this, t, e, 0)) !== null && i !== void 0 ? i : v) === j)
508
+ if ((t = H(this, t, e, 0) ?? _) === W)
486
509
  return;
487
- const s = this._$AH, o = t === v && s !== v || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== v && (s === v || o);
488
- o && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
510
+ const i = this._$AH, s = t === _ && i !== _ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== _ && (i === _ || s);
511
+ s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
489
512
  }
490
513
  handleEvent(t) {
491
- var e, i;
492
- typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
514
+ var e;
515
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
493
516
  }
494
- };
495
- class ve {
517
+ }, Ce = class {
496
518
  constructor(t, e, i) {
497
519
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
498
520
  }
@@ -502,93 +524,374 @@ class ve {
502
524
  _$AI(t) {
503
525
  H(this, t);
504
526
  }
527
+ };
528
+ const ot = V.litHtmlPolyfillSupport;
529
+ ot == null || ot(pt, Qt), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("3.1.0");
530
+ /**
531
+ * @license
532
+ * Copyright 2019 Google LLC
533
+ * SPDX-License-Identifier: BSD-3-Clause
534
+ */
535
+ const Z = globalThis, mt = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ee = Symbol(), Ut = /* @__PURE__ */ new WeakMap();
536
+ let Ue = class {
537
+ constructor(t, e, i) {
538
+ if (this._$cssResult$ = !0, i !== ee)
539
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
540
+ this.cssText = t, this.t = e;
541
+ }
542
+ get styleSheet() {
543
+ let t = this.o;
544
+ const e = this.t;
545
+ if (mt && t === void 0) {
546
+ const i = e !== void 0 && e.length === 1;
547
+ i && (t = Ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Ut.set(e, t));
548
+ }
549
+ return t;
550
+ }
551
+ toString() {
552
+ return this.cssText;
553
+ }
554
+ };
555
+ const Te = (r) => new Ue(typeof r == "string" ? r : r + "", void 0, ee), xe = (r, t) => {
556
+ if (mt)
557
+ r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
558
+ else
559
+ for (const e of t) {
560
+ const i = document.createElement("style"), s = Z.litNonce;
561
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
562
+ }
563
+ }, Tt = mt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
564
+ let e = "";
565
+ for (const i of t.cssRules)
566
+ e += i.cssText;
567
+ return Te(e);
568
+ })(r) : r;
569
+ /**
570
+ * @license
571
+ * Copyright 2017 Google LLC
572
+ * SPDX-License-Identifier: BSD-3-Clause
573
+ */
574
+ const { is: Re, defineProperty: He, getOwnPropertyDescriptor: ke, getOwnPropertyNames: Oe, getOwnPropertySymbols: Ne, getPrototypeOf: Le } = Object, E = globalThis, xt = E.trustedTypes, Me = xt ? xt.emptyScript : "", at = E.reactiveElementPolyfillSupport, D = (r, t) => r, ut = { toAttribute(r, t) {
575
+ switch (t) {
576
+ case Boolean:
577
+ r = r ? Me : null;
578
+ break;
579
+ case Object:
580
+ case Array:
581
+ r = r == null ? r : JSON.stringify(r);
582
+ }
583
+ return r;
584
+ }, fromAttribute(r, t) {
585
+ let e = r;
586
+ switch (t) {
587
+ case Boolean:
588
+ e = r !== null;
589
+ break;
590
+ case Number:
591
+ e = r === null ? null : Number(r);
592
+ break;
593
+ case Object:
594
+ case Array:
595
+ try {
596
+ e = JSON.parse(r);
597
+ } catch {
598
+ e = null;
599
+ }
600
+ }
601
+ return e;
602
+ } }, ie = (r, t) => !Re(r, t), Rt = { attribute: !0, type: String, converter: ut, reflect: !1, hasChanged: ie };
603
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
604
+ class R extends HTMLElement {
605
+ static addInitializer(t) {
606
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
607
+ }
608
+ static get observedAttributes() {
609
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
610
+ }
611
+ static createProperty(t, e = Rt) {
612
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
613
+ const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
614
+ s !== void 0 && He(this.prototype, t, s);
615
+ }
616
+ }
617
+ static getPropertyDescriptor(t, e, i) {
618
+ const { get: s, set: n } = ke(this.prototype, t) ?? { get() {
619
+ return this[e];
620
+ }, set(o) {
621
+ this[e] = o;
622
+ } };
623
+ return { get() {
624
+ return s == null ? void 0 : s.call(this);
625
+ }, set(o) {
626
+ const h = s == null ? void 0 : s.call(this);
627
+ n.call(this, o), this.requestUpdate(t, h, i);
628
+ }, configurable: !0, enumerable: !0 };
629
+ }
630
+ static getPropertyOptions(t) {
631
+ return this.elementProperties.get(t) ?? Rt;
632
+ }
633
+ static _$Ei() {
634
+ if (this.hasOwnProperty(D("elementProperties")))
635
+ return;
636
+ const t = Le(this);
637
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
638
+ }
639
+ static finalize() {
640
+ if (this.hasOwnProperty(D("finalized")))
641
+ return;
642
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) {
643
+ const e = this.properties, i = [...Oe(e), ...Ne(e)];
644
+ for (const s of i)
645
+ this.createProperty(s, e[s]);
646
+ }
647
+ const t = this[Symbol.metadata];
648
+ if (t !== null) {
649
+ const e = litPropertyMetadata.get(t);
650
+ if (e !== void 0)
651
+ for (const [i, s] of e)
652
+ this.elementProperties.set(i, s);
653
+ }
654
+ this._$Eh = /* @__PURE__ */ new Map();
655
+ for (const [e, i] of this.elementProperties) {
656
+ const s = this._$Eu(e, i);
657
+ s !== void 0 && this._$Eh.set(s, e);
658
+ }
659
+ this.elementStyles = this.finalizeStyles(this.styles);
660
+ }
661
+ static finalizeStyles(t) {
662
+ const e = [];
663
+ if (Array.isArray(t)) {
664
+ const i = new Set(t.flat(1 / 0).reverse());
665
+ for (const s of i)
666
+ e.unshift(Tt(s));
667
+ } else
668
+ t !== void 0 && e.push(Tt(t));
669
+ return e;
670
+ }
671
+ static _$Eu(t, e) {
672
+ const i = e.attribute;
673
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
674
+ }
675
+ constructor() {
676
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
677
+ }
678
+ _$Ev() {
679
+ var t;
680
+ this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$ES(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
681
+ }
682
+ addController(t) {
683
+ var e;
684
+ (this._$E_ ?? (this._$E_ = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
685
+ }
686
+ removeController(t) {
687
+ var e;
688
+ (e = this._$E_) == null || e.delete(t);
689
+ }
690
+ _$ES() {
691
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
692
+ for (const i of e.keys())
693
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
694
+ t.size > 0 && (this._$Ep = t);
695
+ }
696
+ createRenderRoot() {
697
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
698
+ return xe(t, this.constructor.elementStyles), t;
699
+ }
700
+ connectedCallback() {
701
+ var t;
702
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
703
+ var i;
704
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
705
+ });
706
+ }
707
+ enableUpdating(t) {
708
+ }
709
+ disconnectedCallback() {
710
+ var t;
711
+ (t = this._$E_) == null || t.forEach((e) => {
712
+ var i;
713
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
714
+ });
715
+ }
716
+ attributeChangedCallback(t, e, i) {
717
+ this._$AK(t, i);
718
+ }
719
+ _$EO(t, e) {
720
+ var n;
721
+ const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
722
+ if (s !== void 0 && i.reflect === !0) {
723
+ const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : ut).toAttribute(e, i.type);
724
+ this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
725
+ }
726
+ }
727
+ _$AK(t, e) {
728
+ var n;
729
+ const i = this.constructor, s = i._$Eh.get(t);
730
+ if (s !== void 0 && this._$Em !== s) {
731
+ const o = i.getPropertyOptions(s), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ut;
732
+ this._$Em = s, this[s] = h.fromAttribute(e, o.type), this._$Em = null;
733
+ }
734
+ }
735
+ requestUpdate(t, e, i, s = !1, n) {
736
+ if (t !== void 0) {
737
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? ie)(s ? n : this[t], e))
738
+ return;
739
+ this.C(t, e, i);
740
+ }
741
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
742
+ }
743
+ C(t, e, i) {
744
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
745
+ }
746
+ async _$EP() {
747
+ this.isUpdatePending = !0;
748
+ try {
749
+ await this._$Eg;
750
+ } catch (e) {
751
+ Promise.reject(e);
752
+ }
753
+ const t = this.scheduleUpdate();
754
+ return t != null && await t, !this.isUpdatePending;
755
+ }
756
+ scheduleUpdate() {
757
+ return this.performUpdate();
758
+ }
759
+ performUpdate() {
760
+ var i;
761
+ if (!this.isUpdatePending)
762
+ return;
763
+ if (!this.hasUpdated) {
764
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
765
+ for (const [n, o] of this._$Ep)
766
+ this[n] = o;
767
+ this._$Ep = void 0;
768
+ }
769
+ const s = this.constructor.elementProperties;
770
+ if (s.size > 0)
771
+ for (const [n, o] of s)
772
+ o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
773
+ }
774
+ let t = !1;
775
+ const e = this._$AL;
776
+ try {
777
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$E_) == null || i.forEach((s) => {
778
+ var n;
779
+ return (n = s.hostUpdate) == null ? void 0 : n.call(s);
780
+ }), this.update(e)) : this._$ET();
781
+ } catch (s) {
782
+ throw t = !1, this._$ET(), s;
783
+ }
784
+ t && this._$AE(e);
785
+ }
786
+ willUpdate(t) {
787
+ }
788
+ _$AE(t) {
789
+ var e;
790
+ (e = this._$E_) == null || e.forEach((i) => {
791
+ var s;
792
+ return (s = i.hostUpdated) == null ? void 0 : s.call(i);
793
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
794
+ }
795
+ _$ET() {
796
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
797
+ }
798
+ get updateComplete() {
799
+ return this.getUpdateComplete();
800
+ }
801
+ getUpdateComplete() {
802
+ return this._$Eg;
803
+ }
804
+ shouldUpdate(t) {
805
+ return !0;
806
+ }
807
+ update(t) {
808
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
809
+ }
810
+ updated(t) {
811
+ }
812
+ firstUpdated(t) {
813
+ }
505
814
  }
506
- const Ct = G.litHtmlPolyfillSupport;
507
- Ct == null || Ct(ut, Gt), ((st = G.litHtmlVersions) !== null && st !== void 0 ? st : G.litHtmlVersions = []).push("2.8.0");
815
+ R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[D("elementProperties")] = /* @__PURE__ */ new Map(), R[D("finalized")] = /* @__PURE__ */ new Map(), at == null || at({ ReactiveElement: R }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.2");
508
816
  /**
509
817
  * @license
510
818
  * Copyright 2017 Google LLC
511
819
  * SPDX-License-Identifier: BSD-3-Clause
512
820
  */
513
- var rt;
514
- const X = window, N = X.trustedTypes, Ut = N ? N.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, pt = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + w, _e = `<${Xt}>`, T = document, B = () => T.createComment(""), z = (n) => n === null || typeof n != "object" && typeof n != "function", Yt = Array.isArray, $e = (n) => Yt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ot = `[
515
- \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, xt = />/g, S = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
516
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Rt = /'/g, Ht = /"/g, Qt = /^(?:script|style|textarea|title)$/i, me = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), ge = me(1), I = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Nt = /* @__PURE__ */ new WeakMap(), C = T.createTreeWalker(T, 129, null, !1), fe = (n, t) => {
517
- const e = n.length - 1, i = [];
518
- let s, o = t === 2 ? "<svg>" : "", r = k;
519
- for (let l = 0; l < e; l++) {
520
- const a = n[l];
521
- let u, h, c = -1, p = 0;
522
- for (; p < a.length && (r.lastIndex = p, h = r.exec(a), h !== null); )
523
- p = r.lastIndex, r === k ? h[1] === "!--" ? r = Tt : h[1] !== void 0 ? r = xt : h[2] !== void 0 ? (Qt.test(h[2]) && (s = RegExp("</" + h[2], "g")), r = S) : h[3] !== void 0 && (r = S) : r === S ? h[0] === ">" ? (r = s ?? k, c = -1) : h[1] === void 0 ? c = -2 : (c = r.lastIndex - h[2].length, u = h[1], r = h[3] === void 0 ? S : h[3] === '"' ? Ht : Rt) : r === Ht || r === Rt ? r = S : r === Tt || r === xt ? r = k : (r = S, s = void 0);
524
- const y = r === S && n[l + 1].startsWith("/>") ? " " : "";
525
- o += r === k ? a + _e : c >= 0 ? (i.push(u), a.slice(0, c) + pt + a.slice(c) + w + y) : a + w + (c === -2 ? (i.push(void 0), l) : y);
526
- }
527
- const d = o + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
528
- if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
821
+ const z = globalThis, tt = z.trustedTypes, Ht = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, se = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, re = "?" + A, Ie = `<${re}>`, x = document, q = () => x.createComment(""), X = (r) => r === null || typeof r != "object" && typeof r != "function", ne = Array.isArray, Ve = (r) => ne(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ht = `[
822
+ \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, kt = /-->/g, Ot = />/g, w = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
823
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Nt = /'/g, Lt = /"/g, oe = /^(?:script|style|textarea|title)$/i, De = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), ze = De(1), k = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Mt = /* @__PURE__ */ new WeakMap(), U = x.createTreeWalker(x, 129);
824
+ function ae(r, t) {
825
+ if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
529
826
  throw Error("invalid template strings array");
530
- return [Ut !== void 0 ? Ut.createHTML(d) : d, i];
827
+ return Ht !== void 0 ? Ht.createHTML(t) : t;
828
+ }
829
+ const je = (r, t) => {
830
+ const e = r.length - 1, i = [];
831
+ let s, n = t === 2 ? "<svg>" : "", o = M;
832
+ for (let h = 0; h < e; h++) {
833
+ const a = r[h];
834
+ let d, c, l = -1, p = 0;
835
+ for (; p < a.length && (o.lastIndex = p, c = o.exec(a), c !== null); )
836
+ p = o.lastIndex, o === M ? c[1] === "!--" ? o = kt : c[1] !== void 0 ? o = Ot : c[2] !== void 0 ? (oe.test(c[2]) && (s = RegExp("</" + c[2], "g")), o = w) : c[3] !== void 0 && (o = w) : o === w ? c[0] === ">" ? (o = s ?? M, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, d = c[1], o = c[3] === void 0 ? w : c[3] === '"' ? Lt : Nt) : o === Lt || o === Nt ? o = w : o === kt || o === Ot ? o = M : (o = w, s = void 0);
837
+ const u = o === w && r[h + 1].startsWith("/>") ? " " : "";
838
+ n += o === M ? a + Ie : l >= 0 ? (i.push(d), a.slice(0, l) + se + a.slice(l) + A + u) : a + A + (l === -2 ? h : u);
839
+ }
840
+ return [ae(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
531
841
  };
532
- class q {
842
+ class J {
533
843
  constructor({ strings: t, _$litType$: e }, i) {
534
844
  let s;
535
845
  this.parts = [];
536
- let o = 0, r = 0;
537
- const d = t.length - 1, l = this.parts, [a, u] = fe(t, e);
538
- if (this.el = q.createElement(a, i), C.currentNode = this.el.content, e === 2) {
539
- const h = this.el.content, c = h.firstChild;
540
- c.remove(), h.append(...c.childNodes);
846
+ let n = 0, o = 0;
847
+ const h = t.length - 1, a = this.parts, [d, c] = je(t, e);
848
+ if (this.el = J.createElement(d, i), U.currentNode = this.el.content, e === 2) {
849
+ const l = this.el.content.firstChild;
850
+ l.replaceWith(...l.childNodes);
541
851
  }
542
- for (; (s = C.nextNode()) !== null && l.length < d; ) {
852
+ for (; (s = U.nextNode()) !== null && a.length < h; ) {
543
853
  if (s.nodeType === 1) {
544
- if (s.hasAttributes()) {
545
- const h = [];
546
- for (const c of s.getAttributeNames())
547
- if (c.endsWith(pt) || c.startsWith(w)) {
548
- const p = u[r++];
549
- if (h.push(c), p !== void 0) {
550
- const y = s.getAttribute(p.toLowerCase() + pt).split(w), m = /([.?@])?(.*)/.exec(p);
551
- l.push({ type: 1, index: o, name: m[2], strings: y, ctor: m[1] === "." ? ye : m[1] === "?" ? we : m[1] === "@" ? be : tt });
552
- } else
553
- l.push({ type: 6, index: o });
554
- }
555
- for (const c of h)
556
- s.removeAttribute(c);
557
- }
558
- if (Qt.test(s.tagName)) {
559
- const h = s.textContent.split(w), c = h.length - 1;
560
- if (c > 0) {
561
- s.textContent = N ? N.emptyScript : "";
562
- for (let p = 0; p < c; p++)
563
- s.append(h[p], B()), C.nextNode(), l.push({ type: 2, index: ++o });
564
- s.append(h[c], B());
854
+ if (s.hasAttributes())
855
+ for (const l of s.getAttributeNames())
856
+ if (l.endsWith(se)) {
857
+ const p = c[o++], u = s.getAttribute(l).split(A), g = /([.?@])?(.*)/.exec(p);
858
+ a.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? We : g[1] === "?" ? qe : g[1] === "@" ? Xe : st }), s.removeAttribute(l);
859
+ } else
860
+ l.startsWith(A) && (a.push({ type: 6, index: n }), s.removeAttribute(l));
861
+ if (oe.test(s.tagName)) {
862
+ const l = s.textContent.split(A), p = l.length - 1;
863
+ if (p > 0) {
864
+ s.textContent = tt ? tt.emptyScript : "";
865
+ for (let u = 0; u < p; u++)
866
+ s.append(l[u], q()), U.nextNode(), a.push({ type: 2, index: ++n });
867
+ s.append(l[p], q());
565
868
  }
566
869
  }
567
870
  } else if (s.nodeType === 8)
568
- if (s.data === Xt)
569
- l.push({ type: 2, index: o });
871
+ if (s.data === re)
872
+ a.push({ type: 2, index: n });
570
873
  else {
571
- let h = -1;
572
- for (; (h = s.data.indexOf(w, h + 1)) !== -1; )
573
- l.push({ type: 7, index: o }), h += w.length - 1;
874
+ let l = -1;
875
+ for (; (l = s.data.indexOf(A, l + 1)) !== -1; )
876
+ a.push({ type: 7, index: n }), l += A.length - 1;
574
877
  }
575
- o++;
878
+ n++;
576
879
  }
577
880
  }
578
881
  static createElement(t, e) {
579
- const i = T.createElement("template");
882
+ const i = x.createElement("template");
580
883
  return i.innerHTML = t, i;
581
884
  }
582
885
  }
583
- function V(n, t, e = n, i) {
584
- var s, o, r, d;
585
- if (t === I)
886
+ function O(r, t, e = r, i) {
887
+ var o, h;
888
+ if (t === k)
586
889
  return t;
587
- let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl;
588
- const a = z(t) ? void 0 : t._$litDirective$;
589
- return (l == null ? void 0 : l.constructor) !== a && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((r = (d = e)._$Co) !== null && r !== void 0 ? r : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = V(n, l._$AS(n, t.values), l, i)), t;
890
+ let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
891
+ const n = X(t) ? void 0 : t._$litDirective$;
892
+ return (s == null ? void 0 : s.constructor) !== n && ((h = s == null ? void 0 : s._$AO) == null || h.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = O(r, s._$AS(r, t.values), s, i)), t;
590
893
  }
591
- class Ae {
894
+ class Be {
592
895
  constructor(t, e) {
593
896
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
594
897
  }
@@ -599,33 +902,31 @@ class Ae {
599
902
  return this._$AM._$AU;
600
903
  }
601
904
  u(t) {
602
- var e;
603
- const { el: { content: i }, parts: s } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : T).importNode(i, !0);
604
- C.currentNode = o;
605
- let r = C.nextNode(), d = 0, l = 0, a = s[0];
905
+ const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
906
+ U.currentNode = s;
907
+ let n = U.nextNode(), o = 0, h = 0, a = i[0];
606
908
  for (; a !== void 0; ) {
607
- if (d === a.index) {
608
- let u;
609
- a.type === 2 ? u = new W(r, r.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (u = new Se(r, this, t)), this._$AV.push(u), a = s[++l];
909
+ if (o === a.index) {
910
+ let d;
911
+ a.type === 2 ? d = new K(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Je(n, this, t)), this._$AV.push(d), a = i[++h];
610
912
  }
611
- d !== (a == null ? void 0 : a.index) && (r = C.nextNode(), d++);
913
+ o !== (a == null ? void 0 : a.index) && (n = U.nextNode(), o++);
612
914
  }
613
- return C.currentNode = T, o;
915
+ return U.currentNode = x, s;
614
916
  }
615
- v(t) {
917
+ p(t) {
616
918
  let e = 0;
617
919
  for (const i of this._$AV)
618
920
  i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
619
921
  }
620
922
  }
621
- class W {
622
- constructor(t, e, i, s) {
623
- var o;
624
- this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (o = s == null ? void 0 : s.isConnected) === null || o === void 0 || o;
625
- }
923
+ class K {
626
924
  get _$AU() {
627
- var t, e;
628
- return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
925
+ var t;
926
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
927
+ }
928
+ constructor(t, e, i, s) {
929
+ this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
629
930
  }
630
931
  get parentNode() {
631
932
  let t = this._$AA.parentNode;
@@ -639,7 +940,7 @@ class W {
639
940
  return this._$AB;
640
941
  }
641
942
  _$AI(t, e = this) {
642
- t = V(this, t, e), z(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== I && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : $e(t) ? this.T(t) : this._(t);
943
+ t = O(this, t, e), X(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== k && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ve(t) ? this.T(t) : this._(t);
643
944
  }
644
945
  k(t) {
645
946
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -648,103 +949,101 @@ class W {
648
949
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
649
950
  }
650
951
  _(t) {
651
- this._$AH !== _ && z(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
952
+ this._$AH !== m && X(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
652
953
  }
653
954
  g(t) {
654
- var e;
655
- const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = q.createElement(s.h, this.options)), s);
656
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
657
- this._$AH.v(i);
955
+ var n;
956
+ const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = J.createElement(ae(i.h, i.h[0]), this.options)), i);
957
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
958
+ this._$AH.p(e);
658
959
  else {
659
- const r = new Ae(o, this), d = r.u(this.options);
660
- r.v(i), this.$(d), this._$AH = r;
960
+ const o = new Be(s, this), h = o.u(this.options);
961
+ o.p(e), this.$(h), this._$AH = o;
661
962
  }
662
963
  }
663
964
  _$AC(t) {
664
- let e = Nt.get(t.strings);
665
- return e === void 0 && Nt.set(t.strings, e = new q(t)), e;
965
+ let e = Mt.get(t.strings);
966
+ return e === void 0 && Mt.set(t.strings, e = new J(t)), e;
666
967
  }
667
968
  T(t) {
668
- Yt(this._$AH) || (this._$AH = [], this._$AR());
969
+ ne(this._$AH) || (this._$AH = [], this._$AR());
669
970
  const e = this._$AH;
670
971
  let i, s = 0;
671
- for (const o of t)
672
- s === e.length ? e.push(i = new W(this.k(B()), this.k(B()), this, this.options)) : i = e[s], i._$AI(o), s++;
972
+ for (const n of t)
973
+ s === e.length ? e.push(i = new K(this.k(q()), this.k(q()), this, this.options)) : i = e[s], i._$AI(n), s++;
673
974
  s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
674
975
  }
675
976
  _$AR(t = this._$AA.nextSibling, e) {
676
977
  var i;
677
- for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
978
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
678
979
  const s = t.nextSibling;
679
980
  t.remove(), t = s;
680
981
  }
681
982
  }
682
983
  setConnected(t) {
683
984
  var e;
684
- this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
985
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
685
986
  }
686
987
  }
687
- class tt {
688
- constructor(t, e, i, s, o) {
689
- this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
690
- }
988
+ class st {
691
989
  get tagName() {
692
990
  return this.element.tagName;
693
991
  }
694
992
  get _$AU() {
695
993
  return this._$AM._$AU;
696
994
  }
995
+ constructor(t, e, i, s, n) {
996
+ this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = m;
997
+ }
697
998
  _$AI(t, e = this, i, s) {
698
- const o = this.strings;
699
- let r = !1;
700
- if (o === void 0)
701
- t = V(this, t, e, 0), r = !z(t) || t !== this._$AH && t !== I, r && (this._$AH = t);
999
+ const n = this.strings;
1000
+ let o = !1;
1001
+ if (n === void 0)
1002
+ t = O(this, t, e, 0), o = !X(t) || t !== this._$AH && t !== k, o && (this._$AH = t);
702
1003
  else {
703
- const d = t;
704
- let l, a;
705
- for (t = o[0], l = 0; l < o.length - 1; l++)
706
- a = V(this, d[i + l], e, l), a === I && (a = this._$AH[l]), r || (r = !z(a) || a !== this._$AH[l]), a === _ ? t = _ : t !== _ && (t += (a ?? "") + o[l + 1]), this._$AH[l] = a;
1004
+ const h = t;
1005
+ let a, d;
1006
+ for (t = n[0], a = 0; a < n.length - 1; a++)
1007
+ d = O(this, h[i + a], e, a), d === k && (d = this._$AH[a]), o || (o = !X(d) || d !== this._$AH[a]), d === m ? t = m : t !== m && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
707
1008
  }
708
- r && !s && this.j(t);
1009
+ o && !s && this.O(t);
709
1010
  }
710
- j(t) {
711
- t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1011
+ O(t) {
1012
+ t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
712
1013
  }
713
1014
  }
714
- class ye extends tt {
1015
+ class We extends st {
715
1016
  constructor() {
716
1017
  super(...arguments), this.type = 3;
717
1018
  }
718
- j(t) {
719
- this.element[this.name] = t === _ ? void 0 : t;
1019
+ O(t) {
1020
+ this.element[this.name] = t === m ? void 0 : t;
720
1021
  }
721
1022
  }
722
- const Ee = N ? N.emptyScript : "";
723
- class we extends tt {
1023
+ class qe extends st {
724
1024
  constructor() {
725
1025
  super(...arguments), this.type = 4;
726
1026
  }
727
- j(t) {
728
- t && t !== _ ? this.element.setAttribute(this.name, Ee) : this.element.removeAttribute(this.name);
1027
+ O(t) {
1028
+ this.element.toggleAttribute(this.name, !!t && t !== m);
729
1029
  }
730
1030
  }
731
- class be extends tt {
732
- constructor(t, e, i, s, o) {
733
- super(t, e, i, s, o), this.type = 5;
1031
+ class Xe extends st {
1032
+ constructor(t, e, i, s, n) {
1033
+ super(t, e, i, s, n), this.type = 5;
734
1034
  }
735
1035
  _$AI(t, e = this) {
736
- var i;
737
- if ((t = (i = V(this, t, e, 0)) !== null && i !== void 0 ? i : _) === I)
1036
+ if ((t = O(this, t, e, 0) ?? m) === k)
738
1037
  return;
739
- const s = this._$AH, o = t === _ && s !== _ || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== _ && (s === _ || o);
740
- o && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
1038
+ const i = this._$AH, s = t === m && i !== m || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== m && (i === m || s);
1039
+ s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
741
1040
  }
742
1041
  handleEvent(t) {
743
- var e, i;
744
- typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
1042
+ var e;
1043
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
745
1044
  }
746
1045
  }
747
- class Se {
1046
+ class Je {
748
1047
  constructor(t, e, i) {
749
1048
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
750
1049
  }
@@ -752,75 +1051,74 @@ class Se {
752
1051
  return this._$AM._$AU;
753
1052
  }
754
1053
  _$AI(t) {
755
- V(this, t);
1054
+ O(this, t);
756
1055
  }
757
1056
  }
758
- const It = X.litHtmlPolyfillSupport;
759
- It == null || It(q, W), ((rt = X.litHtmlVersions) !== null && rt !== void 0 ? rt : X.litHtmlVersions = []).push("2.7.4");
760
- const Pe = (n, t, e) => {
761
- var i, s;
762
- const o = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
763
- let r = o._$litPart$;
764
- if (r === void 0) {
765
- const d = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null;
766
- o._$litPart$ = r = new W(t.insertBefore(B(), d), d, void 0, e ?? {});
767
- }
768
- return r._$AI(n), r;
1057
+ const lt = z.litHtmlPolyfillSupport;
1058
+ lt == null || lt(J, K), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.1.0");
1059
+ const Ke = (r, t, e) => {
1060
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
1061
+ let s = i._$litPart$;
1062
+ if (s === void 0) {
1063
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
1064
+ i._$litPart$ = s = new K(t.insertBefore(q(), n), n, void 0, e ?? {});
1065
+ }
1066
+ return s._$AI(r), s;
769
1067
  };
770
1068
  /**
771
1069
  * @license
772
1070
  * Copyright 2017 Google LLC
773
1071
  * SPDX-License-Identifier: BSD-3-Clause
774
1072
  */
775
- var lt, at;
776
- class L extends x {
1073
+ class j extends R {
777
1074
  constructor() {
778
1075
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
779
1076
  }
780
1077
  createRenderRoot() {
781
- var t, e;
782
- const i = super.createRenderRoot();
783
- return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i;
1078
+ var e;
1079
+ const t = super.createRenderRoot();
1080
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
784
1081
  }
785
1082
  update(t) {
786
1083
  const e = this.render();
787
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Pe(e, this.renderRoot, this.renderOptions);
1084
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ke(e, this.renderRoot, this.renderOptions);
788
1085
  }
789
1086
  connectedCallback() {
790
1087
  var t;
791
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
1088
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
792
1089
  }
793
1090
  disconnectedCallback() {
794
1091
  var t;
795
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
1092
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
796
1093
  }
797
1094
  render() {
798
- return I;
1095
+ return k;
799
1096
  }
800
1097
  }
801
- L.finalized = !0, L._$litElement$ = !0, (lt = globalThis.litElementHydrateSupport) === null || lt === void 0 || lt.call(globalThis, { LitElement: L });
802
- const Vt = globalThis.litElementPolyfillSupport;
803
- Vt == null || Vt({ LitElement: L });
804
- ((at = globalThis.litElementVersions) !== null && at !== void 0 ? at : globalThis.litElementVersions = []).push("3.3.2");
805
- function Ce(n, t, e) {
1098
+ var zt;
1099
+ j._$litElement$ = !0, j.finalized = !0, (zt = globalThis.litElementHydrateSupport) == null || zt.call(globalThis, { LitElement: j });
1100
+ const dt = globalThis.litElementPolyfillSupport;
1101
+ dt == null || dt({ LitElement: j });
1102
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.2");
1103
+ function Fe(r, t, e) {
806
1104
  function i(s) {
807
1105
  e.dispatchEvent(new CustomEvent(s.type, s));
808
1106
  }
809
- return t.addEventListener(n, i), () => {
810
- t.removeEventListener(n, i);
1107
+ return t.addEventListener(r, i), () => {
1108
+ t.removeEventListener(r, i);
811
1109
  };
812
1110
  }
813
- class Ue {
1111
+ class Ge {
814
1112
  constructor(t, e) {
815
- this._events = [], this._cleanup = [], this._forwardElementRef = Dt(), this.host = t, this._events = e, t.addController(this);
1113
+ this._events = [], this._cleanup = [], this._forwardElementRef = Bt(), this.host = t, this._events = e, t.addController(this);
816
1114
  }
817
1115
  register() {
818
- return jt(this._forwardElementRef);
1116
+ return Wt(this._forwardElementRef);
819
1117
  }
820
1118
  hostConnected() {
821
1119
  requestAnimationFrame(() => {
822
1120
  this._events.forEach((t) => {
823
- this._forwardElementRef.value && this._cleanup.push(Ce(t, this._forwardElementRef.value, this.host));
1121
+ this._forwardElementRef.value && this._cleanup.push(Fe(t, this._forwardElementRef.value, this.host));
824
1122
  });
825
1123
  });
826
1124
  }
@@ -830,76 +1128,84 @@ class Ue {
830
1128
  }), this._cleanup = [];
831
1129
  }
832
1130
  }
833
- const Ot = "https://d2rxhdlm2q91uk.cloudfront.net", Te = "https://d1ix11aj5kfygl.cloudfront.net", xe = "https://d157jlwnudd93d.cloudfront.net", kt = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", Re = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", He = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", Ne = "http://localhost:6060/v2", Ie = "https://embed-dev.vouchfor.com/v2", Ve = "https://embed-staging.vouchfor.com/v2", Oe = "https://embed.vouchfor.com/v2";
834
- function Y(n) {
835
- if (!["local", "dev", "staging", "prod"].includes(n))
836
- throw new Error(`Unknown environment: ${n}`);
837
- if (n === "local")
1131
+ const It = "https://d2rxhdlm2q91uk.cloudfront.net", Ze = "https://d1ix11aj5kfygl.cloudfront.net", Ye = "https://d157jlwnudd93d.cloudfront.net", Vt = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", Qe = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", ti = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", ei = "http://localhost:6060/v2", ii = "https://embed-dev.vouchfor.com/v2", si = "https://embed-staging.vouchfor.com/v2", ri = "https://embed.vouchfor.com/v2";
1132
+ function et(r) {
1133
+ if (!["local", "dev", "staging", "prod"].includes(r))
1134
+ throw new Error(`Unknown environment: ${r}`);
1135
+ if (r === "local")
838
1136
  return {
839
- videoUrl: Ot,
840
- publicApiUrl: kt,
841
- embedApiUrl: Ne
1137
+ videoUrl: It,
1138
+ publicApiUrl: Vt,
1139
+ embedApiUrl: ei
842
1140
  };
843
- if (n === "dev")
1141
+ if (r === "dev")
844
1142
  return {
845
- videoUrl: Ot,
846
- publicApiUrl: kt,
847
- embedApiUrl: Ie
1143
+ videoUrl: It,
1144
+ publicApiUrl: Vt,
1145
+ embedApiUrl: ii
848
1146
  };
849
- if (n === "staging")
1147
+ if (r === "staging")
850
1148
  return {
851
- videoUrl: Te,
852
- publicApiUrl: Re,
853
- embedApiUrl: Ve
1149
+ videoUrl: Ze,
1150
+ publicApiUrl: Qe,
1151
+ embedApiUrl: si
854
1152
  };
855
- if (n === "prod")
1153
+ if (r === "prod")
856
1154
  return {
857
- videoUrl: xe,
858
- publicApiUrl: He,
859
- embedApiUrl: Oe
1155
+ videoUrl: Ye,
1156
+ publicApiUrl: ti,
1157
+ embedApiUrl: ri
860
1158
  };
861
1159
  }
862
- class ke {
1160
+ class ni {
863
1161
  constructor(t) {
864
1162
  this._fetching = !1, this.getVouch = async (e, i, s) => {
865
- const { embedApiUrl: o } = Y(e), r = await fetch(`${o}/vouches/${s}`, {
1163
+ var c;
1164
+ const { embedApiUrl: n } = et(e), o = P(), h = await fetch(`${n}/vouches/${s}`, {
866
1165
  method: "GET",
867
- headers: [["X-Api-Key", i]]
868
- }).then((d) => (this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: s })), d.json()));
869
- return fetch(`${o}/vouches/${s}`, {
1166
+ headers: [
1167
+ ["X-Api-Key", i],
1168
+ ["X-Cache-Check", o]
1169
+ ]
1170
+ }), a = await h.json();
1171
+ return this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: a == null ? void 0 : a.id })), ((c = h == null ? void 0 : h.headers) == null ? void 0 : c.get("X-Cache-Check")) !== o && fetch(`${n}/vouches/${s}`, {
870
1172
  method: "GET",
871
1173
  headers: [
872
1174
  ["X-Api-Key", i],
873
1175
  ["Cache-Control", "max-age=0"]
874
1176
  ]
875
- }), r;
1177
+ }), a;
876
1178
  }, this.getTemplate = async (e, i, s) => {
877
- const { embedApiUrl: o } = Y(e), r = await fetch(`${o}/templates/${s}`, {
1179
+ var c;
1180
+ const { embedApiUrl: n } = et(e), o = P(), h = await fetch(`${n}/templates/${s}`, {
878
1181
  method: "GET",
879
- headers: [["X-Api-Key", i]]
880
- }).then((d) => d.json());
881
- return fetch(`${o}/templates/${s}`, {
1182
+ headers: [
1183
+ ["X-Api-Key", i],
1184
+ ["X-Cache-Check", o]
1185
+ ]
1186
+ }), a = await h.json();
1187
+ return ((c = h == null ? void 0 : h.headers) == null ? void 0 : c.get("X-Cache-Check")) !== o && fetch(`${n}/templates/${s}`, {
882
1188
  method: "GET",
883
1189
  headers: [
884
1190
  ["X-Api-Key", i],
885
1191
  ["Cache-Control", "max-age=0"]
886
1192
  ]
887
- }), r;
888
- }, this.host = t, new ee(
1193
+ }), a;
1194
+ }, this.host = t, new le(
889
1195
  this.host,
890
- async ([e, i, s, o, r]) => {
891
- var d, l, a, u;
1196
+ async ([e, i, s, n, o]) => {
1197
+ var h, a, d, c;
892
1198
  try {
893
1199
  if (t.vouch = void 0, t.template = void 0, s) {
894
- let h;
895
- r && (this.fetching = !0, h = await this.getTemplate(e, i, r)), t.vouch = s, t.template = h ?? ((l = (d = s == null ? void 0 : s.settings) == null ? void 0 : d.template) == null ? void 0 : l.instance);
896
- } else if (o) {
1200
+ let l;
1201
+ o && (this.fetching = !0, l = await this.getTemplate(e, i, o)), t.vouch = s, t.template = l ?? ((a = (h = s == null ? void 0 : s.settings) == null ? void 0 : h.template) == null ? void 0 : a.instance);
1202
+ } else if (n) {
897
1203
  this.fetching = !0;
898
- const [h, c] = await Promise.all([
899
- this.getVouch(e, i, o),
900
- r ? this.getTemplate(e, i, r) : null
1204
+ const [l, p] = await Promise.all([
1205
+ this.getVouch(e, i, n),
1206
+ o ? this.getTemplate(e, i, o) : null
901
1207
  ]);
902
- t.vouch = h, t.template = c ?? ((u = (a = h == null ? void 0 : h.settings) == null ? void 0 : a.template) == null ? void 0 : u.instance);
1208
+ t.vouch = l, t.template = p ?? ((c = (d = l == null ? void 0 : l.settings) == null ? void 0 : d.template) == null ? void 0 : c.instance);
903
1209
  }
904
1210
  } finally {
905
1211
  this.fetching = !1;
@@ -915,49 +1221,97 @@ class ke {
915
1221
  return this._fetching;
916
1222
  }
917
1223
  }
918
- let Z;
919
- const Me = new Uint8Array(16);
920
- function Le() {
921
- if (!Z && (Z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Z))
922
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
923
- return Z(Me);
924
- }
925
- const $ = [];
926
- for (let n = 0; n < 256; ++n)
927
- $.push((n + 256).toString(16).slice(1));
928
- function De(n, t = 0) {
929
- return $[n[t + 0]] + $[n[t + 1]] + $[n[t + 2]] + $[n[t + 3]] + "-" + $[n[t + 4]] + $[n[t + 5]] + "-" + $[n[t + 6]] + $[n[t + 7]] + "-" + $[n[t + 8]] + $[n[t + 9]] + "-" + $[n[t + 10]] + $[n[t + 11]] + $[n[t + 12]] + $[n[t + 13]] + $[n[t + 14]] + $[n[t + 15]];
930
- }
931
- const je = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Mt = {
932
- randomUUID: je
933
- };
934
- function M(n, t, e) {
935
- if (Mt.randomUUID && !t && !n)
936
- return Mt.randomUUID();
937
- n = n || {};
938
- const i = n.random || (n.rng || Le)();
939
- if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
940
- e = e || 0;
941
- for (let s = 0; s < 16; ++s)
942
- t[e + s] = i[s];
943
- return t;
944
- }
945
- return De(i);
946
- }
947
- const Be = 2e3;
948
- class ze {
1224
+ const oi = "@vouchfor/embeds", ai = "0.0.0-experiment.0b5c8d1", hi = "MIT", li = "Aaron Williams", di = "dist/es/embeds.js", ci = "dist/es/embeds.js", pi = "module", ui = "dist/es/index.d.ts", _i = {
1225
+ ".": "./dist/es/embeds.js"
1226
+ }, mi = [
1227
+ "dist",
1228
+ "src"
1229
+ ], $i = {
1230
+ tag: "experiment",
1231
+ access: "public"
1232
+ }, fi = {
1233
+ build: "rm -rf dist && tsc && vite build --mode iife && vite build --mode es",
1234
+ "build:deps": "yarn --cwd ../media-player build",
1235
+ "build:package": "yarn build",
1236
+ "build:storybook": "yarn prebuild && storybook build",
1237
+ "generate:manifest": "wca src --outFile custom-elements.json",
1238
+ lint: "eslint . --quiet",
1239
+ "lint:fix": "eslint . --fix",
1240
+ "lint:staged": "lint-staged",
1241
+ prepublishOnly: "yarn build",
1242
+ size: "size-limit",
1243
+ storybook: "yarn prebuild && storybook dev -p 6007",
1244
+ prebuild: "yarn build:deps && yarn generate:manifest",
1245
+ test: "true"
1246
+ }, gi = {
1247
+ "@lit/task": "^1.0.0",
1248
+ "@vouchfor/media-player": "0.0.0-experiment.0b5c8d1",
1249
+ uuid: "^9.0.1"
1250
+ }, vi = {
1251
+ lit: "^3.1.0"
1252
+ }, yi = {
1253
+ "@esm-bundle/chai": "^4.3.4-fix.0",
1254
+ "@open-wc/testing": "^3.2.0",
1255
+ "@storybook/addon-essentials": "^7.4.5",
1256
+ "@storybook/addon-links": "^7.4.5",
1257
+ "@storybook/blocks": "^7.4.5",
1258
+ "@storybook/web-components": "^7.4.5",
1259
+ "@storybook/web-components-vite": "^7.4.5",
1260
+ "@types/mocha": "^10.0.1",
1261
+ "@vouchfor/eslint-config": "^1.0.0",
1262
+ "@vouchfor/prettier-config": "^1.0.0",
1263
+ "@web/dev-server-esbuild": "^0.4.1",
1264
+ "@web/test-runner": "^0.17.1",
1265
+ "@web/test-runner-browserstack": "^0.6.1",
1266
+ "@web/test-runner-mocha": "^0.8.1",
1267
+ "@web/test-runner-playwright": "^0.10.1",
1268
+ dotenv: "^16.3.1",
1269
+ eslint: "^8.50.0",
1270
+ "eslint-plugin-import": "^2.28.1",
1271
+ "lint-staged": "^14.0.1",
1272
+ lit: "^3.1.0",
1273
+ prettier: "^3.0.3",
1274
+ react: "^18.2.0",
1275
+ "react-dom": "^18.2.0",
1276
+ storybook: "^7.4.5",
1277
+ typescript: "^5.1.3",
1278
+ vite: "^4.4.9",
1279
+ "vite-plugin-dts": "^3.6.0",
1280
+ "web-component-analyzer": "^1.1.7"
1281
+ }, Ai = {
1282
+ name: oi,
1283
+ version: ai,
1284
+ license: hi,
1285
+ author: li,
1286
+ main: di,
1287
+ module: ci,
1288
+ type: pi,
1289
+ types: ui,
1290
+ exports: _i,
1291
+ files: mi,
1292
+ publishConfig: $i,
1293
+ scripts: fi,
1294
+ "lint-staged": {
1295
+ "**/*.{ts,tsx,js}": "eslint --fix --quiet",
1296
+ "**/*.{md,json,yml}": "prettier --write"
1297
+ },
1298
+ dependencies: gi,
1299
+ peerDependencies: vi,
1300
+ devDependencies: yi
1301
+ }, Dt = 1;
1302
+ class bi {
949
1303
  constructor(t) {
950
- this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamedTime = {}, this._streamedPrevTimestamp = {}, this._createVisitor = (e) => {
951
- var s, o;
952
- const { publicApiUrl: i } = Y(this.host.env);
953
- return (o = (s = window.localStorage) == null ? void 0 : s.setItem) == null || o.call(s, "vouch-uid-visitor", e), navigator.sendBeacon(`${i}/api/visitor`, JSON.stringify({ visitorId: e })), e;
1304
+ this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamStartTime = {}, this._streamLatestTime = {}, this._currentlyPlayingVideo = null, this._createVisitor = (e) => {
1305
+ var s, n;
1306
+ const { publicApiUrl: i } = et(this.host.env);
1307
+ return (n = (s = window.localStorage) == null ? void 0 : s.setItem) == null || n.call(s, "vouch-uid-visitor", e), navigator.sendBeacon(`${i}/api/visitor`, JSON.stringify({ visitorId: e })), e;
954
1308
  }, this._getReportingMetadata = () => {
955
- var o, r;
956
- const [e, i] = ((r = (o = Intl.DateTimeFormat().resolvedOptions().timeZone) == null ? void 0 : o.split) == null ? void 0 : r.call(o, "/")) ?? [], s = {};
957
- return [...new URLSearchParams(location.search).entries()].forEach(([d, l]) => {
958
- if (/utm/.test(d)) {
959
- const a = d.toLowerCase().replace(/[-_][a-z0-9]/g, (u) => u.slice(-1).toUpperCase());
960
- s[a] = l;
1309
+ var n, o;
1310
+ const [e, i] = ((o = (n = Intl.DateTimeFormat().resolvedOptions().timeZone) == null ? void 0 : n.split) == null ? void 0 : o.call(n, "/")) ?? [], s = {};
1311
+ return [...new URLSearchParams(location.search).entries()].forEach(([h, a]) => {
1312
+ if (/utm/.test(h)) {
1313
+ const d = h.toLowerCase().replace(/[-_][a-z0-9]/g, (c) => c.slice(-1).toUpperCase());
1314
+ s[d] = a;
961
1315
  }
962
1316
  }), {
963
1317
  source: this.host.trackingSource,
@@ -971,75 +1325,79 @@ class ze {
971
1325
  ...s
972
1326
  };
973
1327
  }, this._sendTrackingEvent = (e, i) => {
974
- const { publicApiUrl: s } = Y(this.host.env), { client: o, tab: r, request: d, visitor: l } = this._getUids();
1328
+ const s = this._findVouchId(i);
1329
+ if (!s || this.host.disableTracking)
1330
+ return;
1331
+ const { publicApiUrl: n } = et(this.host.env), { client: o, tab: h, request: a, visitor: d } = this._getUids();
975
1332
  navigator.sendBeacon(
976
- `${s}/api/events`,
1333
+ `${n}/api/v2/events`,
977
1334
  JSON.stringify({
978
1335
  event: e,
979
- payload: i,
1336
+ payload: {
1337
+ ...i,
1338
+ vouchId: s
1339
+ },
980
1340
  context: {
981
1341
  "x-uid-client": o,
982
- "x-uid-tab": r,
983
- "x-uid-request": d,
984
- "x-uid-visitor": l,
985
- "x-reporting-metadata": this._getReportingMetadata()
1342
+ "x-uid-tab": h,
1343
+ "x-uid-request": a,
1344
+ "x-uid-visitor": d,
1345
+ "x-reporting-metadata": this._getReportingMetadata(),
1346
+ "x-embeds-version": Ai.version
986
1347
  }
987
1348
  })
988
1349
  );
1350
+ }, this._streamEnded = () => {
1351
+ if (this._currentlyPlayingVideo) {
1352
+ const { id: e, key: i } = this._currentlyPlayingVideo;
1353
+ this._streamLatestTime[i] > this._streamStartTime[i] + Dt && this._sendTrackingEvent("VIDEO_STREAMED", {
1354
+ answerId: e,
1355
+ streamStart: this._streamStartTime[i],
1356
+ streamEnd: this._streamLatestTime[i]
1357
+ }), delete this._streamStartTime[i], delete this._streamLatestTime[i];
1358
+ }
989
1359
  }, this._handleVouchLoaded = ({ detail: e }) => {
990
- e && (this._hasLoaded[e] || (this._sendTrackingEvent("VOUCH_LOADED", {
991
- vouchId: e
992
- }), this._hasLoaded[e] = !0));
1360
+ e && (this._hasLoaded[e] || (this._sendTrackingEvent("VOUCH_LOADED", { vouchId: e }), this._hasLoaded[e] = !0));
993
1361
  }, this._handlePlay = () => {
994
- const e = this._findVouchId();
995
- e && (this._hasPlayed || (this._sendTrackingEvent("VIDEO_PLAYED", {
996
- vouchId: e,
1362
+ this._hasPlayed || (this._sendTrackingEvent("VIDEO_PLAYED", {
997
1363
  streamStart: this.host.currentTime
998
- }), this._hasPlayed = !0));
999
- }, this._handleVideoPlay = ({ detail: { id: e, node: i } }) => {
1000
- const s = this._findVouchId();
1001
- s && (this._answersViewed[e] || (this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED", {
1002
- vouchId: s,
1364
+ }), this._hasPlayed = !0);
1365
+ }, this._handleVideoPlay = ({ detail: { id: e, key: i, node: s } }) => {
1366
+ this._answersViewed[i] || (this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED", {
1003
1367
  answerId: e
1004
- }), this._answersViewed[e] = !0), this._streamedTime[e] = i.currentTime, this._streamedPrevTimestamp[e] = Date.now());
1005
- }, this._handleVideoTimeUpdate = ({ detail: { id: e, node: i } }) => {
1006
- var r, d;
1007
- const s = this._findVouchId();
1008
- if (!s)
1009
- return;
1010
- const o = Date.now();
1011
- !this.host.paused && // Only fire the video seeked event when this video is the active one
1012
- e === ((d = (r = this.host.scene) == null ? void 0 : r.video) == null ? void 0 : d.id) && // Throttle the frequency that we send streamed events while playing
1013
- o - this._streamedPrevTimestamp[e] > Be && (this._sendTrackingEvent("VIDEO_STREAMED", {
1014
- vouchId: s,
1368
+ }), this._answersViewed[i] = !0), this._streamStartTime[i] || (this._streamStartTime[i] = s.currentTime, this._streamLatestTime[i] = s.currentTime);
1369
+ }, this._handleVideoTimeUpdate = ({ detail: { id: e, key: i, node: s } }) => {
1370
+ var n, o;
1371
+ // We only want to count any time that the video is actually playing
1372
+ !this.host.paused && // Only update the latest time if this event fires for the currently active video
1373
+ e === ((o = (n = this.host.scene) == null ? void 0 : n.video) == null ? void 0 : o.id) && (this._currentlyPlayingVideo = { id: e, key: i, node: s }, this._streamLatestTime[i] = s.currentTime);
1374
+ }, this._handleVideoPause = ({ detail: { id: e, key: i } }) => {
1375
+ this._streamLatestTime[i] > this._streamStartTime[i] + Dt && this._sendTrackingEvent("VIDEO_STREAMED", {
1015
1376
  answerId: e,
1016
- streamStart: this._streamedTime[e],
1017
- streamEnd: i.currentTime
1018
- }), this._streamedTime[e] = i.currentTime, this._streamedPrevTimestamp[e] = o);
1019
- }, this._handleVideoPause = ({ detail: { id: e, node: i } }) => {
1020
- const s = this._findVouchId();
1021
- s && (this._sendTrackingEvent("VIDEO_STREAMED", {
1022
- vouchId: s,
1023
- answerId: e,
1024
- streamStart: this._streamedTime[e],
1025
- streamEnd: i.currentTime
1026
- }), delete this._streamedTime[e], delete this._streamedPrevTimestamp[e]);
1377
+ streamStart: this._streamStartTime[i],
1378
+ streamEnd: this._streamLatestTime[i]
1379
+ }), delete this._streamStartTime[i], delete this._streamLatestTime[i];
1380
+ }, this._pageUnloading = () => {
1381
+ this._streamEnded(), this.host.pause();
1382
+ }, this._handleVisibilityChange = () => {
1383
+ document.visibilityState === "hidden" && this._pageUnloading();
1384
+ }, this._handlePageHide = () => {
1385
+ this._pageUnloading();
1027
1386
  }, this.host = t, t.addController(this);
1028
1387
  }
1029
- _findVouchId() {
1030
- if (this.host.data)
1031
- return "uuid" in this.host.data ? this.host.data.uuid : this.host.data.id;
1388
+ _findVouchId(t) {
1389
+ return t && "vouchId" in t ? t.vouchId : this.host.vouch ? this.host.vouch.id : null;
1032
1390
  }
1033
1391
  _getUids() {
1034
- var o, r, d, l, a, u, h, c, p, y, m, _t;
1392
+ var n, o, h, a, d, c, l, p, u, g, F, $t;
1035
1393
  if (typeof window > "u")
1036
1394
  return {
1037
1395
  client: null,
1038
1396
  tab: null,
1039
- request: M()
1397
+ request: P()
1040
1398
  };
1041
- const t = this._visitorId || ((r = (o = window.localStorage) == null ? void 0 : o.getItem) == null ? void 0 : r.call(o, "vouch-uid-visitor")) || this._createVisitor(M()), e = this._clientId || ((l = (d = window.localStorage) == null ? void 0 : d.getItem) == null ? void 0 : l.call(d, "vouch-uid-client")) || M(), i = this._tabId || ((u = (a = window.sessionStorage) == null ? void 0 : a.getItem) == null ? void 0 : u.call(a, "vouch-uid-tab")) || M(), s = M();
1042
- return t !== this._visitorId && (this._visitorId = t, (c = (h = window.localStorage) == null ? void 0 : h.setItem) == null || c.call(h, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (y = (p = window.localStorage) == null ? void 0 : p.setItem) == null || y.call(p, "vouch-uid-client", e)), i !== this._tabId && (this._tabId = i, (_t = (m = window.sessionStorage) == null ? void 0 : m.setItem) == null || _t.call(m, "vouch-uid-tab", i)), {
1399
+ const t = this._visitorId || ((o = (n = window.localStorage) == null ? void 0 : n.getItem) == null ? void 0 : o.call(n, "vouch-uid-visitor")) || this._createVisitor(P()), e = this._clientId || ((a = (h = window.localStorage) == null ? void 0 : h.getItem) == null ? void 0 : a.call(h, "vouch-uid-client")) || P(), i = this._tabId || ((c = (d = window.sessionStorage) == null ? void 0 : d.getItem) == null ? void 0 : c.call(d, "vouch-uid-tab")) || P(), s = P();
1400
+ return t !== this._visitorId && (this._visitorId = t, (p = (l = window.localStorage) == null ? void 0 : l.setItem) == null || p.call(l, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (g = (u = window.localStorage) == null ? void 0 : u.setItem) == null || g.call(u, "vouch-uid-client", e)), i !== this._tabId && (this._tabId = i, ($t = (F = window.sessionStorage) == null ? void 0 : F.setItem) == null || $t.call(F, "vouch-uid-tab", i)), {
1043
1401
  client: e,
1044
1402
  tab: i,
1045
1403
  request: s,
@@ -1049,22 +1407,22 @@ class ze {
1049
1407
  hostConnected() {
1050
1408
  requestAnimationFrame(() => {
1051
1409
  var t, e, i, s;
1052
- this.host.addEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.addEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.addEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.addEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.addEventListener("video:timeupdate", this._handleVideoTimeUpdate);
1410
+ "onvisibilitychange" in document ? document.addEventListener("visibilitychange", this._handleVisibilityChange) : window.addEventListener("pagehide", this._handlePageHide), this.host.addEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.addEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.addEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.addEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.addEventListener("video:timeupdate", this._handleVideoTimeUpdate);
1053
1411
  });
1054
1412
  }
1055
1413
  hostDisconnected() {
1056
1414
  var t, e, i, s;
1057
- this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.removeEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.removeEventListener("video:timeupdate", this._handleVideoTimeUpdate);
1415
+ this._streamEnded(), "onvisibilitychange" in document ? document.removeEventListener("visibilitychange", this._handleVisibilityChange) : window.removeEventListener("pagehide", this._handlePageHide), this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.removeEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.removeEventListener("video:timeupdate", this._handleVideoTimeUpdate);
1058
1416
  }
1059
1417
  }
1060
- var qe = Object.defineProperty, We = Object.getOwnPropertyDescriptor, f = (n, t, e, i) => {
1061
- for (var s = i > 1 ? void 0 : i ? We(t, e) : t, o = n.length - 1, r; o >= 0; o--)
1062
- (r = n[o]) && (s = (i ? r(t, e, s) : r(s)) || s);
1063
- return i && s && qe(t, e, s), s;
1418
+ var Ei = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, f = (r, t, e, i) => {
1419
+ for (var s = i > 1 ? void 0 : i ? Si(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1420
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
1421
+ return i && s && Ei(t, e, s), s;
1064
1422
  };
1065
- let g = class extends L {
1423
+ let $ = class extends j {
1066
1424
  constructor() {
1067
- super(...arguments), this._mediaPlayerRef = Dt(), this.env = "prod", this.apiKey = "", this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Ue(this, [
1425
+ super(...arguments), this._mediaPlayerRef = Bt(), this.env = "prod", this.apiKey = "", this.disableTracking = !1, this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Ge(this, [
1068
1426
  "durationchange",
1069
1427
  "ended",
1070
1428
  "error",
@@ -1081,6 +1439,7 @@ let g = class extends L {
1081
1439
  "volumechange",
1082
1440
  "waiting",
1083
1441
  "video:loadeddata",
1442
+ "video:seeking",
1084
1443
  "video:seeked",
1085
1444
  "video:play",
1086
1445
  "video:playing",
@@ -1089,146 +1448,153 @@ let g = class extends L {
1089
1448
  "video:timeupdate",
1090
1449
  "video:ended",
1091
1450
  "video:error"
1092
- ]), this._fetcherController = new ke(this), this._trackingController = new ze(this);
1451
+ ]), this._fetcherController = new ni(this), this._trackingController = new bi(this);
1093
1452
  }
1094
1453
  get fetching() {
1095
1454
  return this._fetcherController.fetching;
1096
1455
  }
1097
1456
  get waiting() {
1098
- var n;
1099
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.waiting;
1457
+ var r;
1458
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.waiting;
1100
1459
  }
1101
1460
  get seeking() {
1102
- var n;
1103
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.seeking;
1461
+ var r;
1462
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.seeking;
1104
1463
  }
1105
1464
  get paused() {
1106
- var n;
1107
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.paused;
1465
+ var r;
1466
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.paused;
1108
1467
  }
1109
1468
  get captions() {
1110
- var n;
1111
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.captions;
1469
+ var r;
1470
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.captions;
1112
1471
  }
1113
1472
  get fullscreen() {
1114
- var n;
1115
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.fullscreen;
1473
+ var r;
1474
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.fullscreen;
1116
1475
  }
1117
1476
  get duration() {
1118
- var n;
1119
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.duration;
1477
+ var r;
1478
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.duration;
1120
1479
  }
1121
- set currentTime(n) {
1122
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime = n);
1480
+ set currentTime(r) {
1481
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.currentTime = r);
1123
1482
  }
1124
1483
  get currentTime() {
1125
- var n;
1126
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.currentTime) ?? 0;
1484
+ var r;
1485
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.currentTime) ?? 0;
1127
1486
  }
1128
- set playbackRate(n) {
1129
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate = n);
1487
+ set playbackRate(r) {
1488
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.playbackRate = r);
1130
1489
  }
1131
1490
  get playbackRate() {
1132
- var n;
1133
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.playbackRate) ?? 1;
1491
+ var r;
1492
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.playbackRate) ?? 1;
1134
1493
  }
1135
- set volume(n) {
1136
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume = n);
1494
+ set volume(r) {
1495
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.volume = r);
1137
1496
  }
1138
1497
  get volume() {
1139
- var n;
1140
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.volume) ?? 1;
1498
+ var r;
1499
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.volume) ?? 1;
1141
1500
  }
1142
- set muted(n) {
1143
- this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted = n);
1501
+ set muted(r) {
1502
+ this._mediaPlayerRef.value && (this._mediaPlayerRef.value.muted = r);
1144
1503
  }
1145
1504
  get muted() {
1146
- var n;
1147
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.muted) ?? !1;
1505
+ var r;
1506
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.muted) ?? !1;
1148
1507
  }
1149
1508
  get scene() {
1150
- var n;
1151
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.scene) ?? null;
1509
+ var r;
1510
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scene) ?? null;
1152
1511
  }
1153
1512
  get scenes() {
1154
- var n;
1155
- return ((n = this._mediaPlayerRef.value) == null ? void 0 : n.scenes) ?? [];
1513
+ var r;
1514
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.scenes) ?? [];
1515
+ }
1516
+ get sceneConfig() {
1517
+ var r;
1518
+ return ((r = this._mediaPlayerRef.value) == null ? void 0 : r.sceneConfig) ?? null;
1156
1519
  }
1157
1520
  get videoState() {
1158
- var n;
1159
- return (n = this._mediaPlayerRef.value) == null ? void 0 : n.videoState;
1521
+ var r;
1522
+ return (r = this._mediaPlayerRef.value) == null ? void 0 : r.videoState;
1160
1523
  }
1161
1524
  get mediaPlayer() {
1162
1525
  return this._mediaPlayerRef.value;
1163
1526
  }
1164
1527
  play() {
1165
- var n;
1166
- (n = this._mediaPlayerRef.value) == null || n.play();
1528
+ var r;
1529
+ (r = this._mediaPlayerRef.value) == null || r.play();
1167
1530
  }
1168
1531
  pause() {
1169
- var n;
1170
- (n = this._mediaPlayerRef.value) == null || n.pause();
1532
+ var r;
1533
+ (r = this._mediaPlayerRef.value) == null || r.pause();
1171
1534
  }
1172
- setScene(n) {
1535
+ setScene(r) {
1173
1536
  var t;
1174
- (t = this._mediaPlayerRef.value) == null || t.setScene(n);
1537
+ (t = this._mediaPlayerRef.value) == null || t.setScene(r);
1175
1538
  }
1176
1539
  render() {
1177
- return ge`
1540
+ return ze`
1178
1541
  <vmp-new-media-player
1179
- ${jt(this._mediaPlayerRef)}
1542
+ ${Wt(this._mediaPlayerRef)}
1180
1543
  ${this.eventController.register()}
1181
1544
  ?autoplay=${this.autoplay}
1182
1545
  ?loading=${this.fetching}
1183
1546
  .data=${this.vouch}
1184
1547
  .template=${this.template}
1185
- aspectRatio=${$t(this.aspectRatio)}
1186
- preload=${$t(this.preload)}
1548
+ aspectRatio=${ft(this.aspectRatio)}
1549
+ preload=${ft(this.preload)}
1187
1550
  .controls=${this.controls}
1188
1551
  ></vmp-new-media-player>
1189
1552
  `;
1190
1553
  }
1191
1554
  };
1192
1555
  f([
1193
- A({ type: Object, attribute: "data" })
1194
- ], g.prototype, "data", 2);
1556
+ v({ type: Object, attribute: "data" })
1557
+ ], $.prototype, "data", 2);
1558
+ f([
1559
+ v({ type: String })
1560
+ ], $.prototype, "vouchId", 2);
1195
1561
  f([
1196
- A({ type: String })
1197
- ], g.prototype, "vouchId", 2);
1562
+ v({ type: String })
1563
+ ], $.prototype, "templateId", 2);
1198
1564
  f([
1199
- A({ type: String })
1200
- ], g.prototype, "templateId", 2);
1565
+ v({ type: String })
1566
+ ], $.prototype, "env", 2);
1201
1567
  f([
1202
- A({ type: String })
1203
- ], g.prototype, "env", 2);
1568
+ v({ type: String })
1569
+ ], $.prototype, "apiKey", 2);
1204
1570
  f([
1205
- A({ type: String })
1206
- ], g.prototype, "apiKey", 2);
1571
+ v({ type: Boolean })
1572
+ ], $.prototype, "disableTracking", 2);
1207
1573
  f([
1208
- A({ type: String })
1209
- ], g.prototype, "trackingSource", 2);
1574
+ v({ type: String })
1575
+ ], $.prototype, "trackingSource", 2);
1210
1576
  f([
1211
- A({ type: Array })
1212
- ], g.prototype, "controls", 2);
1577
+ v({ type: Array })
1578
+ ], $.prototype, "controls", 2);
1213
1579
  f([
1214
- A({ type: String })
1215
- ], g.prototype, "preload", 2);
1580
+ v({ type: String })
1581
+ ], $.prototype, "preload", 2);
1216
1582
  f([
1217
- A({ type: Boolean })
1218
- ], g.prototype, "autoplay", 2);
1583
+ v({ type: Boolean })
1584
+ ], $.prototype, "autoplay", 2);
1219
1585
  f([
1220
- A({ type: Number })
1221
- ], g.prototype, "aspectRatio", 2);
1586
+ v({ type: Number })
1587
+ ], $.prototype, "aspectRatio", 2);
1222
1588
  f([
1223
- Lt()
1224
- ], g.prototype, "vouch", 2);
1589
+ jt()
1590
+ ], $.prototype, "vouch", 2);
1225
1591
  f([
1226
- Lt()
1227
- ], g.prototype, "template", 2);
1228
- g = f([
1229
- te("vouch-embed")
1230
- ], g);
1592
+ jt()
1593
+ ], $.prototype, "template", 2);
1594
+ $ = f([
1595
+ he("vouch-embed")
1596
+ ], $);
1231
1597
  export {
1232
- g as Embed
1598
+ $ as Embed
1233
1599
  };
1234
1600
  //# sourceMappingURL=embeds.js.map