@supersoniks/concorde 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +43 -0
  2. package/README.md +25 -0
  3. package/dist/concorde.bundle.js +2789 -0
  4. package/package.json +32 -0
  5. package/types/components/event/event-card/event-card.d.ts +10 -0
  6. package/types/components/event/event-illustration/ssks-event-illustration.d.ts +14 -0
  7. package/types/components/event/event-prices/ssks-event-price.d.ts +8 -0
  8. package/types/components/event/event-prices/ssks-event-prices.d.ts +8 -0
  9. package/types/components/event/event-title/event-title.d.ts +7 -0
  10. package/types/components/event/event-title/ssks-event-title.d.ts +7 -0
  11. package/types/components/event/event.d.ts +8 -0
  12. package/types/components/event/ssks-event.d.ts +8 -0
  13. package/types/components/giftcards/giftcard/giftcard.d.ts +14 -0
  14. package/types/components/illustration/illustration.d.ts +16 -0
  15. package/types/components/misc/ssks-fetch.d.ts +6 -0
  16. package/types/components/misc/ssks-list.d.ts +8 -0
  17. package/types/components/misc/ssks-subscriber.d.ts +6 -0
  18. package/types/components/misc/ssks-taxonomy.d.ts +13 -0
  19. package/types/components/misc/ssks-text-formatted.d.ts +14 -0
  20. package/types/components/misc/ssks-text.d.ts +12 -0
  21. package/types/components/product/prices-form/price-button/price-button.d.ts +24 -0
  22. package/types/components/product/prices-form/prices-form.d.ts +23 -0
  23. package/types/components/theme/theme-collection/bootstrap5.d.ts +1 -0
  24. package/types/components/theme/theme-collection/dark.d.ts +1 -0
  25. package/types/components/theme/theme-collection/dracula.d.ts +1 -0
  26. package/types/components/theme/theme-collection/light.d.ts +1 -0
  27. package/types/components/theme/theme.d.ts +6 -0
  28. package/types/components/ui/loader/loader.d.ts +12 -0
  29. package/types/components/ui/loader/styles/fixed.d.ts +1 -0
  30. package/types/components/ui/loader/styles/inline.d.ts +1 -0
  31. package/types/components/ui/toast/toast.d.ts +19 -0
  32. package/types/components/ui/tooltip/tooltip.d.ts +9 -0
  33. package/types/core/components/fetch.d.ts +6 -0
  34. package/types/core/components/list.d.ts +9 -0
  35. package/types/core/components/subscriber.d.ts +6 -0
  36. package/types/core/components/taxonomy.d.ts +13 -0
  37. package/types/core/components/text-formatted.d.ts +15 -0
  38. package/types/core/components/text.d.ts +9 -0
  39. package/types/core/core.d.ts +6 -0
  40. package/types/core/mixins/Fetcher.d.ts +9 -0
  41. package/types/core/mixins/Subscriber.d.ts +12 -0
  42. package/types/core/utils/api.d.ts +15 -0
  43. package/types/giftcards/giftcard.d.ts +12 -0
  44. package/types/giftcards/giftcards.d.ts +15 -0
  45. package/types/illustration/illustration.d.ts +14 -0
  46. package/types/index.d.ts +10 -0
  47. package/types/mixins/Fetcher.d.ts +9 -0
  48. package/types/mixins/Subscriber.d.ts +12 -0
  49. package/types/styles/button/button.d.ts +1 -0
  50. package/types/styles/prose/prose.d.ts +2 -0
  51. package/types/styles/text-formatted/text-formatted.d.ts +1 -0
  52. package/types/utils/api.d.ts +15 -0
@@ -0,0 +1,2789 @@
1
+ var __defProp2 = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a2, b2) => {
9
+ for (var prop in b2 || (b2 = {}))
10
+ if (__hasOwnProp.call(b2, prop))
11
+ __defNormalProp(a2, prop, b2[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b2)) {
14
+ if (__propIsEnum.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
+ }
17
+ return a2;
18
+ };
19
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
+ /**
21
+ * @license
22
+ * Copyright 2019 Google LLC
23
+ * SPDX-License-Identifier: BSD-3-Clause
24
+ */
25
+ const t$2 = window.ShadowRoot && (window.ShadyCSS === void 0 || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, e$6 = Symbol(), n$4 = new Map();
26
+ class s$4 {
27
+ constructor(t2, n2) {
28
+ if (this._$cssResult$ = true, n2 !== e$6)
29
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
30
+ this.cssText = t2;
31
+ }
32
+ get styleSheet() {
33
+ let e2 = n$4.get(this.cssText);
34
+ return t$2 && e2 === void 0 && (n$4.set(this.cssText, e2 = new CSSStyleSheet()), e2.replaceSync(this.cssText)), e2;
35
+ }
36
+ toString() {
37
+ return this.cssText;
38
+ }
39
+ }
40
+ const o$5 = (t2) => new s$4(typeof t2 == "string" ? t2 : t2 + "", e$6), r$2 = (t2, ...n2) => {
41
+ const o2 = t2.length === 1 ? t2[0] : n2.reduce((e2, n3, s2) => e2 + ((t3) => {
42
+ if (t3._$cssResult$ === true)
43
+ return t3.cssText;
44
+ if (typeof t3 == "number")
45
+ return t3;
46
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
47
+ })(n3) + t2[s2 + 1], t2[0]);
48
+ return new s$4(o2, e$6);
49
+ }, i$4 = (e2, n2) => {
50
+ t$2 ? e2.adoptedStyleSheets = n2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet) : n2.forEach((t2) => {
51
+ const n3 = document.createElement("style"), s2 = window.litNonce;
52
+ s2 !== void 0 && n3.setAttribute("nonce", s2), n3.textContent = t2.cssText, e2.appendChild(n3);
53
+ });
54
+ }, S$1 = t$2 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
55
+ let e2 = "";
56
+ for (const n2 of t3.cssRules)
57
+ e2 += n2.cssText;
58
+ return o$5(e2);
59
+ })(t2) : t2;
60
+ /**
61
+ * @license
62
+ * Copyright 2017 Google LLC
63
+ * SPDX-License-Identifier: BSD-3-Clause
64
+ */
65
+ var s$3;
66
+ const e$5 = window.trustedTypes, r$1 = e$5 ? e$5.emptyScript : "", h$1 = window.reactiveElementPolyfillSupport, o$4 = { toAttribute(t2, i2) {
67
+ switch (i2) {
68
+ case Boolean:
69
+ t2 = t2 ? r$1 : null;
70
+ break;
71
+ case Object:
72
+ case Array:
73
+ t2 = t2 == null ? t2 : JSON.stringify(t2);
74
+ }
75
+ return t2;
76
+ }, fromAttribute(t2, i2) {
77
+ let s2 = t2;
78
+ switch (i2) {
79
+ case Boolean:
80
+ s2 = t2 !== null;
81
+ break;
82
+ case Number:
83
+ s2 = t2 === null ? null : Number(t2);
84
+ break;
85
+ case Object:
86
+ case Array:
87
+ try {
88
+ s2 = JSON.parse(t2);
89
+ } catch (t3) {
90
+ s2 = null;
91
+ }
92
+ }
93
+ return s2;
94
+ } }, n$3 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$2 = { attribute: true, type: String, converter: o$4, reflect: false, hasChanged: n$3 };
95
+ class a$2 extends HTMLElement {
96
+ constructor() {
97
+ super(), this._$Et = new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$Ei = null, this.o();
98
+ }
99
+ static addInitializer(t2) {
100
+ var i2;
101
+ (i2 = this.l) !== null && i2 !== void 0 || (this.l = []), this.l.push(t2);
102
+ }
103
+ static get observedAttributes() {
104
+ this.finalize();
105
+ const t2 = [];
106
+ return this.elementProperties.forEach((i2, s2) => {
107
+ const e2 = this._$Eh(s2, i2);
108
+ e2 !== void 0 && (this._$Eu.set(e2, s2), t2.push(e2));
109
+ }), t2;
110
+ }
111
+ static createProperty(t2, i2 = l$2) {
112
+ if (i2.state && (i2.attribute = false), this.finalize(), this.elementProperties.set(t2, i2), !i2.noAccessor && !this.prototype.hasOwnProperty(t2)) {
113
+ const s2 = typeof t2 == "symbol" ? Symbol() : "__" + t2, e2 = this.getPropertyDescriptor(t2, s2, i2);
114
+ e2 !== void 0 && Object.defineProperty(this.prototype, t2, e2);
115
+ }
116
+ }
117
+ static getPropertyDescriptor(t2, i2, s2) {
118
+ return { get() {
119
+ return this[i2];
120
+ }, set(e2) {
121
+ const r2 = this[t2];
122
+ this[i2] = e2, this.requestUpdate(t2, r2, s2);
123
+ }, configurable: true, enumerable: true };
124
+ }
125
+ static getPropertyOptions(t2) {
126
+ return this.elementProperties.get(t2) || l$2;
127
+ }
128
+ static finalize() {
129
+ if (this.hasOwnProperty("finalized"))
130
+ return false;
131
+ this.finalized = true;
132
+ const t2 = Object.getPrototypeOf(this);
133
+ if (t2.finalize(), this.elementProperties = new Map(t2.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
134
+ const t3 = this.properties, i2 = [...Object.getOwnPropertyNames(t3), ...Object.getOwnPropertySymbols(t3)];
135
+ for (const s2 of i2)
136
+ this.createProperty(s2, t3[s2]);
137
+ }
138
+ return this.elementStyles = this.finalizeStyles(this.styles), true;
139
+ }
140
+ static finalizeStyles(i2) {
141
+ const s2 = [];
142
+ if (Array.isArray(i2)) {
143
+ const e2 = new Set(i2.flat(1 / 0).reverse());
144
+ for (const i3 of e2)
145
+ s2.unshift(S$1(i3));
146
+ } else
147
+ i2 !== void 0 && s2.push(S$1(i2));
148
+ return s2;
149
+ }
150
+ static _$Eh(t2, i2) {
151
+ const s2 = i2.attribute;
152
+ return s2 === false ? void 0 : typeof s2 == "string" ? s2 : typeof t2 == "string" ? t2.toLowerCase() : void 0;
153
+ }
154
+ o() {
155
+ var t2;
156
+ this._$Ep = new Promise((t3) => this.enableUpdating = t3), this._$AL = new Map(), this._$Em(), this.requestUpdate(), (t2 = this.constructor.l) === null || t2 === void 0 || t2.forEach((t3) => t3(this));
157
+ }
158
+ addController(t2) {
159
+ var i2, s2;
160
+ ((i2 = this._$Eg) !== null && i2 !== void 0 ? i2 : this._$Eg = []).push(t2), this.renderRoot !== void 0 && this.isConnected && ((s2 = t2.hostConnected) === null || s2 === void 0 || s2.call(t2));
161
+ }
162
+ removeController(t2) {
163
+ var i2;
164
+ (i2 = this._$Eg) === null || i2 === void 0 || i2.splice(this._$Eg.indexOf(t2) >>> 0, 1);
165
+ }
166
+ _$Em() {
167
+ this.constructor.elementProperties.forEach((t2, i2) => {
168
+ this.hasOwnProperty(i2) && (this._$Et.set(i2, this[i2]), delete this[i2]);
169
+ });
170
+ }
171
+ createRenderRoot() {
172
+ var t2;
173
+ const s2 = (t2 = this.shadowRoot) !== null && t2 !== void 0 ? t2 : this.attachShadow(this.constructor.shadowRootOptions);
174
+ return i$4(s2, this.constructor.elementStyles), s2;
175
+ }
176
+ connectedCallback() {
177
+ var t2;
178
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
179
+ var i2;
180
+ return (i2 = t3.hostConnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
181
+ });
182
+ }
183
+ enableUpdating(t2) {
184
+ }
185
+ disconnectedCallback() {
186
+ var t2;
187
+ (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
188
+ var i2;
189
+ return (i2 = t3.hostDisconnected) === null || i2 === void 0 ? void 0 : i2.call(t3);
190
+ });
191
+ }
192
+ attributeChangedCallback(t2, i2, s2) {
193
+ this._$AK(t2, s2);
194
+ }
195
+ _$ES(t2, i2, s2 = l$2) {
196
+ var e2, r2;
197
+ const h2 = this.constructor._$Eh(t2, s2);
198
+ if (h2 !== void 0 && s2.reflect === true) {
199
+ const n2 = ((r2 = (e2 = s2.converter) === null || e2 === void 0 ? void 0 : e2.toAttribute) !== null && r2 !== void 0 ? r2 : o$4.toAttribute)(i2, s2.type);
200
+ this._$Ei = t2, n2 == null ? this.removeAttribute(h2) : this.setAttribute(h2, n2), this._$Ei = null;
201
+ }
202
+ }
203
+ _$AK(t2, i2) {
204
+ var s2, e2, r2;
205
+ const h2 = this.constructor, n2 = h2._$Eu.get(t2);
206
+ if (n2 !== void 0 && this._$Ei !== n2) {
207
+ const t3 = h2.getPropertyOptions(n2), l2 = t3.converter, a2 = (r2 = (e2 = (s2 = l2) === null || s2 === void 0 ? void 0 : s2.fromAttribute) !== null && e2 !== void 0 ? e2 : typeof l2 == "function" ? l2 : null) !== null && r2 !== void 0 ? r2 : o$4.fromAttribute;
208
+ this._$Ei = n2, this[n2] = a2(i2, t3.type), this._$Ei = null;
209
+ }
210
+ }
211
+ requestUpdate(t2, i2, s2) {
212
+ let e2 = true;
213
+ t2 !== void 0 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || n$3)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), s2.reflect === true && this._$Ei !== t2 && (this._$E_ === void 0 && (this._$E_ = new Map()), this._$E_.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$Ep = this._$EC());
214
+ }
215
+ async _$EC() {
216
+ this.isUpdatePending = true;
217
+ try {
218
+ await this._$Ep;
219
+ } catch (t3) {
220
+ Promise.reject(t3);
221
+ }
222
+ const t2 = this.scheduleUpdate();
223
+ return t2 != null && await t2, !this.isUpdatePending;
224
+ }
225
+ scheduleUpdate() {
226
+ return this.performUpdate();
227
+ }
228
+ performUpdate() {
229
+ var t2;
230
+ if (!this.isUpdatePending)
231
+ return;
232
+ this.hasUpdated, this._$Et && (this._$Et.forEach((t3, i3) => this[i3] = t3), this._$Et = void 0);
233
+ let i2 = false;
234
+ const s2 = this._$AL;
235
+ try {
236
+ i2 = this.shouldUpdate(s2), i2 ? (this.willUpdate(s2), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => {
237
+ var i3;
238
+ return (i3 = t3.hostUpdate) === null || i3 === void 0 ? void 0 : i3.call(t3);
239
+ }), this.update(s2)) : this._$EU();
240
+ } catch (t3) {
241
+ throw i2 = false, this._$EU(), t3;
242
+ }
243
+ i2 && this._$AE(s2);
244
+ }
245
+ willUpdate(t2) {
246
+ }
247
+ _$AE(t2) {
248
+ var i2;
249
+ (i2 = this._$Eg) === null || i2 === void 0 || i2.forEach((t3) => {
250
+ var i3;
251
+ return (i3 = t3.hostUpdated) === null || i3 === void 0 ? void 0 : i3.call(t3);
252
+ }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
253
+ }
254
+ _$EU() {
255
+ this._$AL = new Map(), this.isUpdatePending = false;
256
+ }
257
+ get updateComplete() {
258
+ return this.getUpdateComplete();
259
+ }
260
+ getUpdateComplete() {
261
+ return this._$Ep;
262
+ }
263
+ shouldUpdate(t2) {
264
+ return true;
265
+ }
266
+ update(t2) {
267
+ this._$E_ !== void 0 && (this._$E_.forEach((t3, i2) => this._$ES(i2, this[i2], t3)), this._$E_ = void 0), this._$EU();
268
+ }
269
+ updated(t2) {
270
+ }
271
+ firstUpdated(t2) {
272
+ }
273
+ }
274
+ a$2.finalized = true, a$2.elementProperties = new Map(), a$2.elementStyles = [], a$2.shadowRootOptions = { mode: "open" }, h$1 == null || h$1({ ReactiveElement: a$2 }), ((s$3 = globalThis.reactiveElementVersions) !== null && s$3 !== void 0 ? s$3 : globalThis.reactiveElementVersions = []).push("1.0.2");
275
+ /**
276
+ * @license
277
+ * Copyright 2017 Google LLC
278
+ * SPDX-License-Identifier: BSD-3-Clause
279
+ */
280
+ var t$1;
281
+ const i$3 = globalThis.trustedTypes, s$2 = i$3 ? i$3.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$4 = `lit$${(Math.random() + "").slice(9)}$`, o$3 = "?" + e$4, n$2 = `<${o$3}>`, l$1 = document, h = (t2 = "") => l$1.createComment(t2), r = (t2) => t2 === null || typeof t2 != "object" && typeof t2 != "function", d = Array.isArray, u$2 = (t2) => {
282
+ var i2;
283
+ return d(t2) || typeof ((i2 = t2) === null || i2 === void 0 ? void 0 : i2[Symbol.iterator]) == "function";
284
+ }, c$2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, a$1 = />/g, f$1 = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g, _ = /'/g, m$1 = /"/g, g = /^(?:script|style|textarea)$/i, $ = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), p = $(1), b = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), x = new WeakMap(), w = (t2, i2, s2) => {
285
+ var e2, o2;
286
+ const n2 = (e2 = s2 == null ? void 0 : s2.renderBefore) !== null && e2 !== void 0 ? e2 : i2;
287
+ let l2 = n2._$litPart$;
288
+ if (l2 === void 0) {
289
+ const t3 = (o2 = s2 == null ? void 0 : s2.renderBefore) !== null && o2 !== void 0 ? o2 : null;
290
+ n2._$litPart$ = l2 = new N(i2.insertBefore(h(), t3), t3, void 0, s2 != null ? s2 : {});
291
+ }
292
+ return l2._$AI(t2), l2;
293
+ }, A = l$1.createTreeWalker(l$1, 129, null, false), C = (t2, i2) => {
294
+ const o2 = t2.length - 1, l2 = [];
295
+ let h2, r2 = i2 === 2 ? "<svg>" : "", d2 = c$2;
296
+ for (let i3 = 0; i3 < o2; i3++) {
297
+ const s2 = t2[i3];
298
+ let o3, u3, $2 = -1, p2 = 0;
299
+ for (; p2 < s2.length && (d2.lastIndex = p2, u3 = d2.exec(s2), u3 !== null); )
300
+ p2 = d2.lastIndex, d2 === c$2 ? u3[1] === "!--" ? d2 = v : u3[1] !== void 0 ? d2 = a$1 : u3[2] !== void 0 ? (g.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = f$1) : u3[3] !== void 0 && (d2 = f$1) : d2 === f$1 ? u3[0] === ">" ? (d2 = h2 != null ? h2 : c$2, $2 = -1) : u3[1] === void 0 ? $2 = -2 : ($2 = d2.lastIndex - u3[2].length, o3 = u3[1], d2 = u3[3] === void 0 ? f$1 : u3[3] === '"' ? m$1 : _) : d2 === m$1 || d2 === _ ? d2 = f$1 : d2 === v || d2 === a$1 ? d2 = c$2 : (d2 = f$1, h2 = void 0);
301
+ const y = d2 === f$1 && t2[i3 + 1].startsWith("/>") ? " " : "";
302
+ r2 += d2 === c$2 ? s2 + n$2 : $2 >= 0 ? (l2.push(o3), s2.slice(0, $2) + "$lit$" + s2.slice($2) + e$4 + y) : s2 + e$4 + ($2 === -2 ? (l2.push(void 0), i3) : y);
303
+ }
304
+ const u2 = r2 + (t2[o2] || "<?>") + (i2 === 2 ? "</svg>" : "");
305
+ return [s$2 !== void 0 ? s$2.createHTML(u2) : u2, l2];
306
+ };
307
+ class P {
308
+ constructor({ strings: t2, _$litType$: s2 }, n2) {
309
+ let l2;
310
+ this.parts = [];
311
+ let r2 = 0, d2 = 0;
312
+ const u2 = t2.length - 1, c2 = this.parts, [v2, a2] = C(t2, s2);
313
+ if (this.el = P.createElement(v2, n2), A.currentNode = this.el.content, s2 === 2) {
314
+ const t3 = this.el.content, i2 = t3.firstChild;
315
+ i2.remove(), t3.append(...i2.childNodes);
316
+ }
317
+ for (; (l2 = A.nextNode()) !== null && c2.length < u2; ) {
318
+ if (l2.nodeType === 1) {
319
+ if (l2.hasAttributes()) {
320
+ const t3 = [];
321
+ for (const i2 of l2.getAttributeNames())
322
+ if (i2.endsWith("$lit$") || i2.startsWith(e$4)) {
323
+ const s3 = a2[d2++];
324
+ if (t3.push(i2), s3 !== void 0) {
325
+ const t4 = l2.getAttribute(s3.toLowerCase() + "$lit$").split(e$4), i3 = /([.?@])?(.*)/.exec(s3);
326
+ c2.push({ type: 1, index: r2, name: i3[2], strings: t4, ctor: i3[1] === "." ? M : i3[1] === "?" ? H : i3[1] === "@" ? I : S });
327
+ } else
328
+ c2.push({ type: 6, index: r2 });
329
+ }
330
+ for (const i2 of t3)
331
+ l2.removeAttribute(i2);
332
+ }
333
+ if (g.test(l2.tagName)) {
334
+ const t3 = l2.textContent.split(e$4), s3 = t3.length - 1;
335
+ if (s3 > 0) {
336
+ l2.textContent = i$3 ? i$3.emptyScript : "";
337
+ for (let i2 = 0; i2 < s3; i2++)
338
+ l2.append(t3[i2], h()), A.nextNode(), c2.push({ type: 2, index: ++r2 });
339
+ l2.append(t3[s3], h());
340
+ }
341
+ }
342
+ } else if (l2.nodeType === 8)
343
+ if (l2.data === o$3)
344
+ c2.push({ type: 2, index: r2 });
345
+ else {
346
+ let t3 = -1;
347
+ for (; (t3 = l2.data.indexOf(e$4, t3 + 1)) !== -1; )
348
+ c2.push({ type: 7, index: r2 }), t3 += e$4.length - 1;
349
+ }
350
+ r2++;
351
+ }
352
+ }
353
+ static createElement(t2, i2) {
354
+ const s2 = l$1.createElement("template");
355
+ return s2.innerHTML = t2, s2;
356
+ }
357
+ }
358
+ function V(t2, i2, s2 = t2, e2) {
359
+ var o2, n2, l2, h2;
360
+ if (i2 === b)
361
+ return i2;
362
+ let d2 = e2 !== void 0 ? (o2 = s2._$Cl) === null || o2 === void 0 ? void 0 : o2[e2] : s2._$Cu;
363
+ const u2 = r(i2) ? void 0 : i2._$litDirective$;
364
+ return (d2 == null ? void 0 : d2.constructor) !== u2 && ((n2 = d2 == null ? void 0 : d2._$AO) === null || n2 === void 0 || n2.call(d2, false), u2 === void 0 ? d2 = void 0 : (d2 = new u2(t2), d2._$AT(t2, s2, e2)), e2 !== void 0 ? ((l2 = (h2 = s2)._$Cl) !== null && l2 !== void 0 ? l2 : h2._$Cl = [])[e2] = d2 : s2._$Cu = d2), d2 !== void 0 && (i2 = V(t2, d2._$AS(t2, i2.values), d2, e2)), i2;
365
+ }
366
+ class E {
367
+ constructor(t2, i2) {
368
+ this.v = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
369
+ }
370
+ get parentNode() {
371
+ return this._$AM.parentNode;
372
+ }
373
+ get _$AU() {
374
+ return this._$AM._$AU;
375
+ }
376
+ p(t2) {
377
+ var i2;
378
+ const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = ((i2 = t2 == null ? void 0 : t2.creationScope) !== null && i2 !== void 0 ? i2 : l$1).importNode(s2, true);
379
+ A.currentNode = o2;
380
+ let n2 = A.nextNode(), h2 = 0, r2 = 0, d2 = e2[0];
381
+ for (; d2 !== void 0; ) {
382
+ if (h2 === d2.index) {
383
+ let i3;
384
+ d2.type === 2 ? i3 = new N(n2, n2.nextSibling, this, t2) : d2.type === 1 ? i3 = new d2.ctor(n2, d2.name, d2.strings, this, t2) : d2.type === 6 && (i3 = new L(n2, this, t2)), this.v.push(i3), d2 = e2[++r2];
385
+ }
386
+ h2 !== (d2 == null ? void 0 : d2.index) && (n2 = A.nextNode(), h2++);
387
+ }
388
+ return o2;
389
+ }
390
+ m(t2) {
391
+ let i2 = 0;
392
+ for (const s2 of this.v)
393
+ s2 !== void 0 && (s2.strings !== void 0 ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
394
+ }
395
+ }
396
+ class N {
397
+ constructor(t2, i2, s2, e2) {
398
+ var o2;
399
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cg = (o2 = e2 == null ? void 0 : e2.isConnected) === null || o2 === void 0 || o2;
400
+ }
401
+ get _$AU() {
402
+ var t2, i2;
403
+ return (i2 = (t2 = this._$AM) === null || t2 === void 0 ? void 0 : t2._$AU) !== null && i2 !== void 0 ? i2 : this._$Cg;
404
+ }
405
+ get parentNode() {
406
+ let t2 = this._$AA.parentNode;
407
+ const i2 = this._$AM;
408
+ return i2 !== void 0 && t2.nodeType === 11 && (t2 = i2.parentNode), t2;
409
+ }
410
+ get startNode() {
411
+ return this._$AA;
412
+ }
413
+ get endNode() {
414
+ return this._$AB;
415
+ }
416
+ _$AI(t2, i2 = this) {
417
+ t2 = V(this, t2, i2), r(t2) ? t2 === T || t2 == null || t2 === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : t2 !== this._$AH && t2 !== b && this.$(t2) : t2._$litType$ !== void 0 ? this.T(t2) : t2.nodeType !== void 0 ? this.S(t2) : u$2(t2) ? this.M(t2) : this.$(t2);
418
+ }
419
+ A(t2, i2 = this._$AB) {
420
+ return this._$AA.parentNode.insertBefore(t2, i2);
421
+ }
422
+ S(t2) {
423
+ this._$AH !== t2 && (this._$AR(), this._$AH = this.A(t2));
424
+ }
425
+ $(t2) {
426
+ this._$AH !== T && r(this._$AH) ? this._$AA.nextSibling.data = t2 : this.S(l$1.createTextNode(t2)), this._$AH = t2;
427
+ }
428
+ T(t2) {
429
+ var i2;
430
+ const { values: s2, _$litType$: e2 } = t2, o2 = typeof e2 == "number" ? this._$AC(t2) : (e2.el === void 0 && (e2.el = P.createElement(e2.h, this.options)), e2);
431
+ if (((i2 = this._$AH) === null || i2 === void 0 ? void 0 : i2._$AD) === o2)
432
+ this._$AH.m(s2);
433
+ else {
434
+ const t3 = new E(o2, this), i3 = t3.p(this.options);
435
+ t3.m(s2), this.S(i3), this._$AH = t3;
436
+ }
437
+ }
438
+ _$AC(t2) {
439
+ let i2 = x.get(t2.strings);
440
+ return i2 === void 0 && x.set(t2.strings, i2 = new P(t2)), i2;
441
+ }
442
+ M(t2) {
443
+ d(this._$AH) || (this._$AH = [], this._$AR());
444
+ const i2 = this._$AH;
445
+ let s2, e2 = 0;
446
+ for (const o2 of t2)
447
+ e2 === i2.length ? i2.push(s2 = new N(this.A(h()), this.A(h()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++;
448
+ e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
449
+ }
450
+ _$AR(t2 = this._$AA.nextSibling, i2) {
451
+ var s2;
452
+ for ((s2 = this._$AP) === null || s2 === void 0 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
453
+ const i3 = t2.nextSibling;
454
+ t2.remove(), t2 = i3;
455
+ }
456
+ }
457
+ setConnected(t2) {
458
+ var i2;
459
+ this._$AM === void 0 && (this._$Cg = t2, (i2 = this._$AP) === null || i2 === void 0 || i2.call(this, t2));
460
+ }
461
+ }
462
+ class S {
463
+ constructor(t2, i2, s2, e2, o2) {
464
+ this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || s2[0] !== "" || s2[1] !== "" ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = T;
465
+ }
466
+ get tagName() {
467
+ return this.element.tagName;
468
+ }
469
+ get _$AU() {
470
+ return this._$AM._$AU;
471
+ }
472
+ _$AI(t2, i2 = this, s2, e2) {
473
+ const o2 = this.strings;
474
+ let n2 = false;
475
+ if (o2 === void 0)
476
+ t2 = V(this, t2, i2, 0), n2 = !r(t2) || t2 !== this._$AH && t2 !== b, n2 && (this._$AH = t2);
477
+ else {
478
+ const e3 = t2;
479
+ let l2, h2;
480
+ for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++)
481
+ h2 = V(this, e3[s2 + l2], i2, l2), h2 === b && (h2 = this._$AH[l2]), n2 || (n2 = !r(h2) || h2 !== this._$AH[l2]), h2 === T ? t2 = T : t2 !== T && (t2 += (h2 != null ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
482
+ }
483
+ n2 && !e2 && this.k(t2);
484
+ }
485
+ k(t2) {
486
+ t2 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 != null ? t2 : "");
487
+ }
488
+ }
489
+ class M extends S {
490
+ constructor() {
491
+ super(...arguments), this.type = 3;
492
+ }
493
+ k(t2) {
494
+ this.element[this.name] = t2 === T ? void 0 : t2;
495
+ }
496
+ }
497
+ const k = i$3 ? i$3.emptyScript : "";
498
+ class H extends S {
499
+ constructor() {
500
+ super(...arguments), this.type = 4;
501
+ }
502
+ k(t2) {
503
+ t2 && t2 !== T ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
504
+ }
505
+ }
506
+ class I extends S {
507
+ constructor(t2, i2, s2, e2, o2) {
508
+ super(t2, i2, s2, e2, o2), this.type = 5;
509
+ }
510
+ _$AI(t2, i2 = this) {
511
+ var s2;
512
+ if ((t2 = (s2 = V(this, t2, i2, 0)) !== null && s2 !== void 0 ? s2 : T) === b)
513
+ return;
514
+ const e2 = this._$AH, o2 = t2 === T && e2 !== T || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== T && (e2 === T || o2);
515
+ o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
516
+ }
517
+ handleEvent(t2) {
518
+ var i2, s2;
519
+ typeof this._$AH == "function" ? this._$AH.call((s2 = (i2 = this.options) === null || i2 === void 0 ? void 0 : i2.host) !== null && s2 !== void 0 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
520
+ }
521
+ }
522
+ class L {
523
+ constructor(t2, i2, s2) {
524
+ this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
525
+ }
526
+ get _$AU() {
527
+ return this._$AM._$AU;
528
+ }
529
+ _$AI(t2) {
530
+ V(this, t2);
531
+ }
532
+ }
533
+ const R = { P: "$lit$", V: e$4, L: o$3, I: 1, N: C, R: E, D: u$2, j: V, H: N, O: S, F: H, B: I, W: M, Z: L }, z = window.litHtmlPolyfillSupport;
534
+ z == null || z(P, N), ((t$1 = globalThis.litHtmlVersions) !== null && t$1 !== void 0 ? t$1 : globalThis.litHtmlVersions = []).push("2.0.2");
535
+ /**
536
+ * @license
537
+ * Copyright 2017 Google LLC
538
+ * SPDX-License-Identifier: BSD-3-Clause
539
+ */
540
+ var l, o$2;
541
+ class s$1 extends a$2 {
542
+ constructor() {
543
+ super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0;
544
+ }
545
+ createRenderRoot() {
546
+ var t2, e2;
547
+ const i2 = super.createRenderRoot();
548
+ return (t2 = (e2 = this.renderOptions).renderBefore) !== null && t2 !== void 0 || (e2.renderBefore = i2.firstChild), i2;
549
+ }
550
+ update(t2) {
551
+ const i2 = this.render();
552
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Dt = w(i2, this.renderRoot, this.renderOptions);
553
+ }
554
+ connectedCallback() {
555
+ var t2;
556
+ super.connectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(true);
557
+ }
558
+ disconnectedCallback() {
559
+ var t2;
560
+ super.disconnectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(false);
561
+ }
562
+ render() {
563
+ return b;
564
+ }
565
+ }
566
+ s$1.finalized = true, s$1._$litElement$ = true, (l = globalThis.litElementHydrateSupport) === null || l === void 0 || l.call(globalThis, { LitElement: s$1 });
567
+ const n$1 = globalThis.litElementPolyfillSupport;
568
+ n$1 == null || n$1({ LitElement: s$1 });
569
+ ((o$2 = globalThis.litElementVersions) !== null && o$2 !== void 0 ? o$2 : globalThis.litElementVersions = []).push("3.0.2");
570
+ /**
571
+ * @license
572
+ * Copyright 2017 Google LLC
573
+ * SPDX-License-Identifier: BSD-3-Clause
574
+ */
575
+ const n = (n2) => (e2) => typeof e2 == "function" ? ((n3, e3) => (window.customElements.define(n3, e3), e3))(n2, e2) : ((n3, e3) => {
576
+ const { kind: t2, elements: i2 } = e3;
577
+ return { kind: t2, elements: i2, finisher(e4) {
578
+ window.customElements.define(n3, e4);
579
+ } };
580
+ })(n2, e2);
581
+ /**
582
+ * @license
583
+ * Copyright 2017 Google LLC
584
+ * SPDX-License-Identifier: BSD-3-Clause
585
+ */
586
+ const i$2 = (i2, e2) => e2.kind === "method" && e2.descriptor && !("value" in e2.descriptor) ? __spreadProps(__spreadValues({}, e2), { finisher(n2) {
587
+ n2.createProperty(e2.key, i2);
588
+ } }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e2.key, initializer() {
589
+ typeof e2.initializer == "function" && (this[e2.key] = e2.initializer.call(this));
590
+ }, finisher(n2) {
591
+ n2.createProperty(e2.key, i2);
592
+ } };
593
+ function e$3(e2) {
594
+ return (n2, t2) => t2 !== void 0 ? ((i2, e3, n3) => {
595
+ e3.constructor.createProperty(n3, i2);
596
+ })(e2, n2, t2) : i$2(e2, n2);
597
+ }
598
+ var publisherProxy = { exports: {} };
599
+ (function(module) {
600
+ (() => {
601
+ var __webpack_require__ = {};
602
+ (() => {
603
+ __webpack_require__.d = (exports, definition) => {
604
+ for (var key in definition) {
605
+ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
606
+ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
607
+ }
608
+ }
609
+ };
610
+ })();
611
+ (() => {
612
+ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
613
+ })();
614
+ (() => {
615
+ __webpack_require__.r = (exports) => {
616
+ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
617
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
618
+ }
619
+ Object.defineProperty(exports, "__esModule", { value: true });
620
+ };
621
+ })();
622
+ var __webpack_exports__ = {};
623
+ /*!*******************!*\
624
+ !*** ./index.mjs ***!
625
+ \*******************/
626
+ __webpack_require__.r(__webpack_exports__);
627
+ __webpack_require__.d(__webpack_exports__, {
628
+ "PublisherManager": () => PublisherManager,
629
+ "default": () => Publisher
630
+ });
631
+ function _inherits(subClass, superClass) {
632
+ if (typeof superClass !== "function" && superClass !== null) {
633
+ throw new TypeError("Super expression must either be null or a function");
634
+ }
635
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
636
+ if (superClass)
637
+ _setPrototypeOf(subClass, superClass);
638
+ }
639
+ function _setPrototypeOf(o2, p2) {
640
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o3, p3) {
641
+ o3.__proto__ = p3;
642
+ return o3;
643
+ };
644
+ return _setPrototypeOf(o2, p2);
645
+ }
646
+ function _createSuper(Derived) {
647
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
648
+ return function _createSuperInternal() {
649
+ var Super = _getPrototypeOf(Derived), result;
650
+ if (hasNativeReflectConstruct) {
651
+ var NewTarget = _getPrototypeOf(this).constructor;
652
+ result = Reflect.construct(Super, arguments, NewTarget);
653
+ } else {
654
+ result = Super.apply(this, arguments);
655
+ }
656
+ return _possibleConstructorReturn(this, result);
657
+ };
658
+ }
659
+ function _possibleConstructorReturn(self, call) {
660
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
661
+ return call;
662
+ } else if (call !== void 0) {
663
+ throw new TypeError("Derived constructors may only return object or undefined");
664
+ }
665
+ return _assertThisInitialized(self);
666
+ }
667
+ function _assertThisInitialized(self) {
668
+ if (self === void 0) {
669
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
670
+ }
671
+ return self;
672
+ }
673
+ function _isNativeReflectConstruct() {
674
+ if (typeof Reflect === "undefined" || !Reflect.construct)
675
+ return false;
676
+ if (Reflect.construct.sham)
677
+ return false;
678
+ if (typeof Proxy === "function")
679
+ return true;
680
+ try {
681
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
682
+ }));
683
+ return true;
684
+ } catch (e2) {
685
+ return false;
686
+ }
687
+ }
688
+ function _getPrototypeOf(o2) {
689
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o3) {
690
+ return o3.__proto__ || Object.getPrototypeOf(o3);
691
+ };
692
+ return _getPrototypeOf(o2);
693
+ }
694
+ function _defineProperty(obj, key, value) {
695
+ if (key in obj) {
696
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
697
+ } else {
698
+ obj[key] = value;
699
+ }
700
+ return obj;
701
+ }
702
+ function _classCallCheck(instance, Constructor) {
703
+ if (!(instance instanceof Constructor)) {
704
+ throw new TypeError("Cannot call a class as a function");
705
+ }
706
+ }
707
+ function _defineProperties(target, props) {
708
+ for (var i2 = 0; i2 < props.length; i2++) {
709
+ var descriptor = props[i2];
710
+ descriptor.enumerable = descriptor.enumerable || false;
711
+ descriptor.configurable = true;
712
+ if ("value" in descriptor)
713
+ descriptor.writable = true;
714
+ Object.defineProperty(target, descriptor.key, descriptor);
715
+ }
716
+ }
717
+ function _createClass(Constructor, protoProps, staticProps) {
718
+ if (protoProps)
719
+ _defineProperties(Constructor.prototype, protoProps);
720
+ if (staticProps)
721
+ _defineProperties(Constructor, staticProps);
722
+ return Constructor;
723
+ }
724
+ function _typeof(obj) {
725
+ "@babel/helpers - typeof";
726
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
727
+ _typeof = function _typeof2(obj2) {
728
+ return typeof obj2;
729
+ };
730
+ } else {
731
+ _typeof = function _typeof2(obj2) {
732
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
733
+ };
734
+ }
735
+ return _typeof(obj);
736
+ }
737
+ function isComplex(value) {
738
+ return _typeof(value) === "object" && value != null;
739
+ }
740
+ var CustomProxy = /* @__PURE__ */ function() {
741
+ function CustomProxy2(target) {
742
+ var parentProxPub = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
743
+ _classCallCheck(this, CustomProxy2);
744
+ this._proxies_ = new Map();
745
+ this._value_ = target;
746
+ this._assignListeners_ = new Set();
747
+ this._mutationListeners_ = new Set();
748
+ this._fillListeners_ = new Set();
749
+ this._templateFillListeners_ = new Set();
750
+ this.parent = parentProxPub;
751
+ this.root = this;
752
+ while (this.root.parent) {
753
+ this.root = this.root.parent;
754
+ }
755
+ }
756
+ _createClass(CustomProxy2, [{
757
+ key: "_publishInternalMutation_",
758
+ value: function _publishInternalMutation_() {
759
+ this._mutationListeners_.forEach(function(handler) {
760
+ return handler();
761
+ });
762
+ if (this.parent) {
763
+ this.parent._publishInternalMutation_();
764
+ }
765
+ }
766
+ }, {
767
+ key: "_publishAssignement_",
768
+ value: function _publishAssignement_() {
769
+ var _this = this;
770
+ this._assignListeners_.forEach(function(handler) {
771
+ return handler(_this._value_.__value ? _this._value_.__value : _this._value_);
772
+ });
773
+ this._publishInternalMutation_();
774
+ }
775
+ }, {
776
+ key: "_publishDynamicFilling_",
777
+ value: function _publishDynamicFilling_(key, value) {
778
+ this._fillListeners_.forEach(function(handler) {
779
+ return handler[key] = value;
780
+ });
781
+ this._publishTemplateFilling_(key, value);
782
+ }
783
+ }, {
784
+ key: "_publishTemplateFilling_",
785
+ value: function _publishTemplateFilling_(key, value) {
786
+ this._templateFillListeners_.forEach(function(handler) {
787
+ if (typeof handler[key] != "undefined") {
788
+ handler[key] = value;
789
+ }
790
+ });
791
+ }
792
+ }, {
793
+ key: "onAssign",
794
+ value: function onAssign(handler) {
795
+ if (typeof handler != "function")
796
+ return;
797
+ this._assignListeners_.add(handler);
798
+ this._publishAssignement_();
799
+ }
800
+ }, {
801
+ key: "offAssign",
802
+ value: function offAssign(handler) {
803
+ this._assignListeners_["delete"](handler);
804
+ }
805
+ }, {
806
+ key: "onInternalMutation",
807
+ value: function onInternalMutation(handler) {
808
+ if (typeof handler != "function")
809
+ return;
810
+ this._mutationListeners_.add(handler);
811
+ this._publishInternalMutation_();
812
+ }
813
+ }, {
814
+ key: "offInternalMutation",
815
+ value: function offInternalMutation(handler) {
816
+ this._mutationListeners_["delete"](handler);
817
+ }
818
+ }, {
819
+ key: "startTemplateFilling",
820
+ value: function startTemplateFilling(handler) {
821
+ this._templateFillListeners_.add(handler);
822
+ for (var z2 in this._value_) {
823
+ this._publishTemplateFilling_(z2, this._value_[z2]);
824
+ }
825
+ }
826
+ }, {
827
+ key: "stopTemplateFilling",
828
+ value: function stopTemplateFilling(handler) {
829
+ this._templateFillListeners_["delete"](handler);
830
+ }
831
+ }, {
832
+ key: "startDynamicFilling",
833
+ value: function startDynamicFilling(handler) {
834
+ this._fillListeners_.add(handler);
835
+ for (var z2 in this._value_) {
836
+ this._publishDynamicFilling_(z2, this._value_[z2]);
837
+ }
838
+ }
839
+ }, {
840
+ key: "stopDynamicFilling",
841
+ value: function stopDynamicFilling(handler) {
842
+ this._fillListeners_["delete"](handler);
843
+ }
844
+ }, {
845
+ key: "set",
846
+ value: function set(newValue) {
847
+ var _this2 = this;
848
+ this._value_ = newValue;
849
+ if (this._value_.hasOwnProperty("__value")) {
850
+ this._publishAssignement_();
851
+ return true;
852
+ }
853
+ this._proxies_.keys();
854
+ Array.from(this._proxies_.keys()).forEach(function(key) {
855
+ if (!_this2._value_[key]) {
856
+ _this2._proxies_["delete"](key);
857
+ }
858
+ });
859
+ for (var _key in this._value_) {
860
+ var v2 = this._value_[_key];
861
+ if (!this._proxies_.has(_key)) {
862
+ this._proxies_.set(_key, new Publisher(isComplex(v2) ? v2 : {
863
+ __value: v2
864
+ }, this));
865
+ }
866
+ this._proxies_.get(_key).set(isComplex(v2) ? v2 : {
867
+ __value: v2
868
+ });
869
+ this._publishDynamicFilling_(_key, this._value_[_key]);
870
+ }
871
+ this._publishAssignement_();
872
+ return true;
873
+ }
874
+ }, {
875
+ key: "get",
876
+ value: function get() {
877
+ if (this._value_.__value)
878
+ return this._value_.__value;
879
+ return this._value_;
880
+ }
881
+ }]);
882
+ return CustomProxy2;
883
+ }();
884
+ var PublisherManager = /* @__PURE__ */ function() {
885
+ function PublisherManager2() {
886
+ _classCallCheck(this, PublisherManager2);
887
+ if (PublisherManager2.instance != null)
888
+ throw "Singleton / use getInstance";
889
+ PublisherManager2.instance = this;
890
+ this.publishers = new Map();
891
+ }
892
+ _createClass(PublisherManager2, [{
893
+ key: "get",
894
+ value: function get(id) {
895
+ if (!this.publishers.has(id))
896
+ this.publishers.set(id, new Publisher({}));
897
+ return this.publishers.get(id);
898
+ }
899
+ }], [{
900
+ key: "getInstance",
901
+ value: function getInstance(channel) {
902
+ if (PublisherManager2.instance == null)
903
+ return new PublisherManager2();
904
+ return PublisherManager2.instance;
905
+ }
906
+ }]);
907
+ return PublisherManager2;
908
+ }();
909
+ _defineProperty(PublisherManager, "instance", null);
910
+ var Publisher = /* @__PURE__ */ function(_CustomProxy) {
911
+ _inherits(Publisher2, _CustomProxy);
912
+ var _super = _createSuper(Publisher2);
913
+ function Publisher2(target) {
914
+ var _this3;
915
+ var parentProxPub = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
916
+ _classCallCheck(this, Publisher2);
917
+ _this3 = _super.call(this, target, parentProxPub);
918
+ var that = _assertThisInitialized(_this3);
919
+ return _possibleConstructorReturn(_this3, new Proxy(_assertThisInitialized(_this3), {
920
+ "get": function get(oTarget, sKey) {
921
+ if (["onAssign", "offAssign", "startDynamicFilling", "stopDynamicFilling", "startTemplateFilling", "stopTemplateFilling", "onInternalMutation", "set", "get", "_templateFillListeners_", "_fillListeners_", "_assignListeners_", "_publishInternalMutation_", "_mutationListeners_", "_publishDynamicFilling_", "_publishTemplateFilling_", "_publishAssignement_", "_proxies_", "parent", "_value_"].includes(sKey))
922
+ return that[sKey];
923
+ if (!that._proxies_.has(sKey)) {
924
+ var vValue = target[sKey];
925
+ that._proxies_.set(sKey, new Publisher2(isComplex(vValue) ? vValue : {
926
+ __value: vValue
927
+ }, that));
928
+ }
929
+ return that._proxies_.get(sKey);
930
+ },
931
+ "set": function set(oTarget, sKey, vValue) {
932
+ if (sKey == "_value_") {
933
+ oTarget._value_ = vValue;
934
+ return oTarget._value_;
935
+ }
936
+ if (!that._proxies_.has(sKey)) {
937
+ that._proxies_.set(sKey, new Publisher2(isComplex(vValue) ? vValue : {
938
+ __value: vValue
939
+ }, that));
940
+ }
941
+ target[sKey] = vValue;
942
+ that._publishDynamicFilling_(sKey, vValue);
943
+ that._proxies_.get(sKey).set(isComplex(vValue) ? vValue : {
944
+ __value: vValue
945
+ });
946
+ return that._proxies_.get(sKey);
947
+ },
948
+ "deleteProperty": function deleteProperty(oTarget, sKey) {
949
+ that._proxies_.get(sKey).set(null);
950
+ that._publishDynamicFilling_(sKey, null);
951
+ that._proxies_["delete"](sKey);
952
+ return delete target[sKey];
953
+ },
954
+ "enumerate": function enumerate(oTarget, sKey) {
955
+ return target.keys();
956
+ },
957
+ "ownKeys": function ownKeys(oTarget, sKey) {
958
+ return target.keys();
959
+ },
960
+ "has": function has(oTarget, sKey) {
961
+ return sKey in target;
962
+ },
963
+ "defineProperty": function defineProperty(oTarget, sKey, oDesc) {
964
+ if (oDesc && "value" in oDesc) {
965
+ target[sKey] = oDesc.value;
966
+ }
967
+ return target;
968
+ },
969
+ "getOwnPropertyDescriptor": function getOwnPropertyDescriptor(oTarget, sKey) {
970
+ var vValue = target[sKey];
971
+ return vValue ? {
972
+ "value": vValue,
973
+ "writable": true,
974
+ "enumerable": true,
975
+ "configurable": false
976
+ } : void 0;
977
+ }
978
+ }));
979
+ }
980
+ return Publisher2;
981
+ }(CustomProxy);
982
+ module.exports = {
983
+ Publisher,
984
+ PublisherManager
985
+ };
986
+ })();
987
+ })(publisherProxy);
988
+ var __defProp$h = Object.defineProperty;
989
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
990
+ var __decorateClass$h = (decorators, target, key, kind) => {
991
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
992
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
993
+ if (decorator = decorators[i2])
994
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
995
+ if (kind && result)
996
+ __defProp$h(target, key, result);
997
+ return result;
998
+ };
999
+ const Subscriber = (superClass) => {
1000
+ const _SubscriberElement = class extends superClass {
1001
+ constructor(...args) {
1002
+ super();
1003
+ this.title = "";
1004
+ this._dataProvider = null;
1005
+ this._props = null;
1006
+ this.args = args;
1007
+ }
1008
+ makeShadow(props, value) {
1009
+ if (typeof value == "object" && value !== null) {
1010
+ let newValue = Array.isArray(value) ? [] : {};
1011
+ Object.assign(newValue, value);
1012
+ value = newValue;
1013
+ for (let key in props) {
1014
+ if (!value[key])
1015
+ value[key] = props[key];
1016
+ }
1017
+ }
1018
+ return value;
1019
+ }
1020
+ getAncestorAttributeValue(attributeName) {
1021
+ let node = this;
1022
+ while (!(node.hasAttribute && node.hasAttribute(attributeName)) && node.parentNode) {
1023
+ if (node.parentNode)
1024
+ node = node.parentNode;
1025
+ if (node.host)
1026
+ node = node.host;
1027
+ }
1028
+ if (!node.hasAttribute) {
1029
+ return null;
1030
+ }
1031
+ return node.getAttribute(attributeName);
1032
+ }
1033
+ get dataProvider() {
1034
+ return this._dataProvider;
1035
+ }
1036
+ set dataProvider(value) {
1037
+ this._dataProvider = value;
1038
+ this.requestUpdate();
1039
+ }
1040
+ get props() {
1041
+ return this.publisher.get();
1042
+ }
1043
+ set props(value) {
1044
+ if (!this.publisher)
1045
+ this.initPublisher();
1046
+ this._props = value;
1047
+ if (this.publisher) {
1048
+ this.publisher.set(value);
1049
+ }
1050
+ this.requestUpdate();
1051
+ }
1052
+ connectedCallback() {
1053
+ super.connectedCallback();
1054
+ _SubscriberElement.instanceCounter++;
1055
+ this.style.display = "contents";
1056
+ this.initPublisher();
1057
+ }
1058
+ createRenderRoot() {
1059
+ if (this.getAncestorAttributeValue("styled") != void 0) {
1060
+ return super.createRenderRoot();
1061
+ }
1062
+ return this;
1063
+ }
1064
+ initPublisher() {
1065
+ if (!document)
1066
+ return;
1067
+ if (this.publisher)
1068
+ this.publisher.stopTemplateFilling(this);
1069
+ const mng = publisherProxy.exports.PublisherManager.getInstance();
1070
+ let publisherId = this.dataProvider;
1071
+ if (!publisherId)
1072
+ publisherId = this.getAncestorAttributeValue("dataProvider");
1073
+ if (!publisherId) {
1074
+ this.dataProvider = publisherId = "__subscriber__" + _SubscriberElement.instanceCounter;
1075
+ }
1076
+ if (publisherId) {
1077
+ let pub = mng.get(publisherId);
1078
+ this.dataProvider = publisherId;
1079
+ if (this.hasAttribute("dataPath")) {
1080
+ let dataPath = this.getAttribute("dataPath");
1081
+ this.dataProvider = publisherId + "/" + dataPath;
1082
+ let array = dataPath.split(".");
1083
+ for (let key of array)
1084
+ pub = pub[key];
1085
+ pub.onAssign((v2) => {
1086
+ this._props = v2;
1087
+ this.requestUpdate();
1088
+ });
1089
+ }
1090
+ this.publisher = pub;
1091
+ this.publisher.startTemplateFilling(this);
1092
+ if (this._props)
1093
+ this.publisher.set(this._props);
1094
+ }
1095
+ }
1096
+ disconnectedCallback() {
1097
+ if (this.publisher)
1098
+ this.publisher.stopTemplateFilling(this);
1099
+ }
1100
+ };
1101
+ let SubscriberElement = _SubscriberElement;
1102
+ SubscriberElement.instanceCounter = 0;
1103
+ __decorateClass$h([
1104
+ e$3({ type: String, attribute: "data-title" })
1105
+ ], SubscriberElement.prototype, "title", 2);
1106
+ __decorateClass$h([
1107
+ e$3({ type: String })
1108
+ ], SubscriberElement.prototype, "dataProvider", 1);
1109
+ __decorateClass$h([
1110
+ e$3()
1111
+ ], SubscriberElement.prototype, "props", 1);
1112
+ return SubscriberElement;
1113
+ };
1114
+ class API {
1115
+ constructor(config) {
1116
+ this.nologin = false;
1117
+ this.serviceURL = config.serviceURL;
1118
+ if (!this.serviceURL)
1119
+ this.serviceURL = document.location.origin;
1120
+ this.userName = config.userName;
1121
+ this.password = config.password;
1122
+ this.token = config.token;
1123
+ this.tokenProvider = config.tokenProvider;
1124
+ }
1125
+ async auth() {
1126
+ if (!this.userName || !this.password || !this.tokenProvider)
1127
+ return;
1128
+ let headers = { Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password))) };
1129
+ let result = await fetch(this.computeURL(this.tokenProvider), { headers });
1130
+ let json = await result.json();
1131
+ this.token = json.token;
1132
+ }
1133
+ async get(path) {
1134
+ let headers = await this.createHeaders();
1135
+ let result = await fetch(this.computeURL(path), { headers });
1136
+ return result.json();
1137
+ }
1138
+ async createHeaders() {
1139
+ if (!this.token)
1140
+ await this.auth();
1141
+ let headers = {};
1142
+ if (this.token)
1143
+ headers.Authorization = "Bearer " + this.token;
1144
+ headers.credentials = "include";
1145
+ return headers;
1146
+ }
1147
+ computeURL(path) {
1148
+ return this.serviceURL + "/" + path;
1149
+ }
1150
+ async put(path, data) {
1151
+ let headers = await this.createHeaders();
1152
+ headers["Accept"] = "application/json";
1153
+ headers["Content-Type"] = "application/json";
1154
+ let result = await fetch(this.computeURL(path), {
1155
+ headers,
1156
+ method: "PUT",
1157
+ body: JSON.stringify(data)
1158
+ });
1159
+ return result.json();
1160
+ }
1161
+ }
1162
+ const Fetcher = (superClass) => {
1163
+ class FetcherElement extends superClass {
1164
+ constructor(...args) {
1165
+ super();
1166
+ this.api = null;
1167
+ this.tokenProvider = "";
1168
+ this.serviceURL = "";
1169
+ this.userName = "";
1170
+ this.key = "";
1171
+ this.password = "";
1172
+ this.args = args;
1173
+ this.dataProvider = "";
1174
+ }
1175
+ async _fetchEventData() {
1176
+ if (!this.api)
1177
+ return;
1178
+ if (!this.dataProvider)
1179
+ return;
1180
+ if (this.dataProvider.indexOf("__subscriber__") != -1)
1181
+ return;
1182
+ let data;
1183
+ data = await this.api.get(this.dataProvider);
1184
+ if (this.key) {
1185
+ data = data[this.key];
1186
+ }
1187
+ this.props = data;
1188
+ }
1189
+ connectedCallback() {
1190
+ super.connectedCallback();
1191
+ this.tokenProvider = this.getAncestorAttributeValue("tokenProvider");
1192
+ this.serviceURL = this.getAncestorAttributeValue("serviceURL");
1193
+ this.userName = this.getAncestorAttributeValue("user");
1194
+ this.password = this.getAncestorAttributeValue("password");
1195
+ this.key = this.getAncestorAttributeValue("key");
1196
+ if (!this.serviceURL)
1197
+ this.serviceURL = document.location.origin;
1198
+ this.api = new API({
1199
+ serviceURL: this.serviceURL,
1200
+ userName: "api",
1201
+ password: "super",
1202
+ tokenProvider: this.tokenProvider,
1203
+ dataProvider: this.dataProvider
1204
+ });
1205
+ if (this.props) {
1206
+ this.publisher.set(this.props);
1207
+ }
1208
+ this._fetchEventData();
1209
+ }
1210
+ }
1211
+ return FetcherElement;
1212
+ };
1213
+ var __defProp$g = Object.defineProperty;
1214
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
1215
+ var __decorateClass$g = (decorators, target, key, kind) => {
1216
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
1217
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1218
+ if (decorator = decorators[i2])
1219
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1220
+ if (kind && result)
1221
+ __defProp$g(target, key, result);
1222
+ return result;
1223
+ };
1224
+ let SonicFetch = class extends Fetcher(Subscriber(s$1)) {
1225
+ render() {
1226
+ return p`<slot></slot>`;
1227
+ }
1228
+ };
1229
+ SonicFetch = __decorateClass$g([
1230
+ n("sonic-fetch")
1231
+ ], SonicFetch);
1232
+ /**
1233
+ * @license
1234
+ * Copyright 2017 Google LLC
1235
+ * SPDX-License-Identifier: BSD-3-Clause
1236
+ */
1237
+ const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$2 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
1238
+ class i$1 {
1239
+ constructor(t2) {
1240
+ }
1241
+ get _$AU() {
1242
+ return this._$AM._$AU;
1243
+ }
1244
+ _$AT(t2, e2, i2) {
1245
+ this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
1246
+ }
1247
+ _$AS(t2, e2) {
1248
+ return this.update(t2, e2);
1249
+ }
1250
+ update(t2, e2) {
1251
+ return this.render(...e2);
1252
+ }
1253
+ }
1254
+ /**
1255
+ * @license
1256
+ * Copyright 2017 Google LLC
1257
+ * SPDX-License-Identifier: BSD-3-Clause
1258
+ */
1259
+ class e$1 extends i$1 {
1260
+ constructor(i2) {
1261
+ if (super(i2), this.it = T, i2.type !== t.CHILD)
1262
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1263
+ }
1264
+ render(r2) {
1265
+ if (r2 === T || r2 == null)
1266
+ return this.vt = void 0, this.it = r2;
1267
+ if (r2 === b)
1268
+ return r2;
1269
+ if (typeof r2 != "string")
1270
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
1271
+ if (r2 === this.it)
1272
+ return this.vt;
1273
+ this.it = r2;
1274
+ const s2 = [r2];
1275
+ return s2.raw = s2, this.vt = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
1276
+ }
1277
+ }
1278
+ e$1.directiveName = "unsafeHTML", e$1.resultType = 1;
1279
+ const o$1 = e$2(e$1);
1280
+ const cssProse = r$2`
1281
+ ul,
1282
+ ol,
1283
+ p {
1284
+ margin:0 0 1em;
1285
+ }
1286
+
1287
+ li {
1288
+ margin-bottom:.5em;
1289
+ }
1290
+ `;
1291
+ r$2`
1292
+ :host {
1293
+ line-height:1.25;
1294
+ }
1295
+
1296
+ ul,
1297
+ ol,
1298
+ p {
1299
+ margin:0 0 .5em;
1300
+ }
1301
+
1302
+ li {
1303
+ margin-bottom:.5em;
1304
+ }
1305
+ `;
1306
+ var __defProp$f = Object.defineProperty;
1307
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
1308
+ var __decorateClass$f = (decorators, target, key, kind) => {
1309
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
1310
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1311
+ if (decorator = decorators[i2])
1312
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1313
+ if (kind && result)
1314
+ __defProp$f(target, key, result);
1315
+ return result;
1316
+ };
1317
+ let SonicTextFormatted = class extends Subscriber(s$1) {
1318
+ constructor() {
1319
+ super(...arguments);
1320
+ this.html = "";
1321
+ this.leading = "normal";
1322
+ this.className = "";
1323
+ }
1324
+ render() {
1325
+ return p`
1326
+ <div class="${this.className} text-formatted">
1327
+ ${o$1(this.html)}
1328
+ </div>
1329
+ `;
1330
+ }
1331
+ };
1332
+ SonicTextFormatted.styles = [
1333
+ cssProse
1334
+ ];
1335
+ __decorateClass$f([
1336
+ e$3({ type: String })
1337
+ ], SonicTextFormatted.prototype, "html", 2);
1338
+ __decorateClass$f([
1339
+ e$3({ type: String })
1340
+ ], SonicTextFormatted.prototype, "leading", 2);
1341
+ __decorateClass$f([
1342
+ e$3()
1343
+ ], SonicTextFormatted.prototype, "className", 2);
1344
+ SonicTextFormatted = __decorateClass$f([
1345
+ n("sonic-text-formatted")
1346
+ ], SonicTextFormatted);
1347
+ var __defProp$e = Object.defineProperty;
1348
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
1349
+ var __decorateClass$e = (decorators, target, key, kind) => {
1350
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
1351
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1352
+ if (decorator = decorators[i2])
1353
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1354
+ if (kind && result)
1355
+ __defProp$e(target, key, result);
1356
+ return result;
1357
+ };
1358
+ let SonicText = class extends Subscriber(s$1) {
1359
+ constructor() {
1360
+ super(...arguments);
1361
+ this.key = "";
1362
+ this.text = "";
1363
+ this.className = "";
1364
+ }
1365
+ render() {
1366
+ let text = this.text;
1367
+ if (this.props) {
1368
+ if (this.key)
1369
+ text = this.props[this.key];
1370
+ else if (typeof this.props === "string")
1371
+ text = this.props;
1372
+ }
1373
+ return text || this.children.length ? p`<div class="${this.className}">
1374
+ <slot name="prefix"></slot>
1375
+ ${text && o$1(text)}
1376
+ <slot></slot>
1377
+ <slot name="suffix"></slot>
1378
+ </div>` : p`<slot></slot>`;
1379
+ }
1380
+ };
1381
+ __decorateClass$e([
1382
+ e$3()
1383
+ ], SonicText.prototype, "key", 2);
1384
+ __decorateClass$e([
1385
+ e$3()
1386
+ ], SonicText.prototype, "text", 2);
1387
+ __decorateClass$e([
1388
+ e$3()
1389
+ ], SonicText.prototype, "className", 2);
1390
+ SonicText = __decorateClass$e([
1391
+ n("sonic-text")
1392
+ ], SonicText);
1393
+ /**
1394
+ * @license
1395
+ * Copyright 2020 Google LLC
1396
+ * SPDX-License-Identifier: BSD-3-Clause
1397
+ */
1398
+ const { H: i } = R, e = () => document.createComment(""), u$1 = (o2, t2, n2) => {
1399
+ var v2;
1400
+ const l2 = o2._$AA.parentNode, d2 = t2 === void 0 ? o2._$AB : t2._$AA;
1401
+ if (n2 === void 0) {
1402
+ const t3 = l2.insertBefore(e(), d2), v3 = l2.insertBefore(e(), d2);
1403
+ n2 = new i(t3, v3, o2, o2.options);
1404
+ } else {
1405
+ const i2 = n2._$AB.nextSibling, t3 = n2._$AM, r2 = t3 !== o2;
1406
+ if (r2) {
1407
+ let i3;
1408
+ (v2 = n2._$AQ) === null || v2 === void 0 || v2.call(n2, o2), n2._$AM = o2, n2._$AP !== void 0 && (i3 = o2._$AU) !== t3._$AU && n2._$AP(i3);
1409
+ }
1410
+ if (i2 !== d2 || r2) {
1411
+ let o3 = n2._$AA;
1412
+ for (; o3 !== i2; ) {
1413
+ const i3 = o3.nextSibling;
1414
+ l2.insertBefore(o3, d2), o3 = i3;
1415
+ }
1416
+ }
1417
+ }
1418
+ return n2;
1419
+ }, c$1 = (o2, i2, t2 = o2) => (o2._$AI(i2, t2), o2), f = {}, s = (o2, i2 = f) => o2._$AH = i2, a = (o2) => o2._$AH, m = (o2) => {
1420
+ var i2;
1421
+ (i2 = o2._$AP) === null || i2 === void 0 || i2.call(o2, false, true);
1422
+ let t2 = o2._$AA;
1423
+ const n2 = o2._$AB.nextSibling;
1424
+ for (; t2 !== n2; ) {
1425
+ const o3 = t2.nextSibling;
1426
+ t2.remove(), t2 = o3;
1427
+ }
1428
+ };
1429
+ /**
1430
+ * @license
1431
+ * Copyright 2017 Google LLC
1432
+ * SPDX-License-Identifier: BSD-3-Clause
1433
+ */
1434
+ const u = (e2, s2, t2) => {
1435
+ const r2 = new Map();
1436
+ for (let l2 = s2; l2 <= t2; l2++)
1437
+ r2.set(e2[l2], l2);
1438
+ return r2;
1439
+ }, c = e$2(class extends i$1 {
1440
+ constructor(e2) {
1441
+ if (super(e2), e2.type !== t.CHILD)
1442
+ throw Error("repeat() can only be used in text expressions");
1443
+ }
1444
+ dt(e2, s2, t2) {
1445
+ let r2;
1446
+ t2 === void 0 ? t2 = s2 : s2 !== void 0 && (r2 = s2);
1447
+ const l2 = [], o2 = [];
1448
+ let i2 = 0;
1449
+ for (const s3 of e2)
1450
+ l2[i2] = r2 ? r2(s3, i2) : i2, o2[i2] = t2(s3, i2), i2++;
1451
+ return { values: o2, keys: l2 };
1452
+ }
1453
+ render(e2, s2, t2) {
1454
+ return this.dt(e2, s2, t2).values;
1455
+ }
1456
+ update(s$12, [t2, r2, c2]) {
1457
+ var d2;
1458
+ const a$12 = a(s$12), { values: p2, keys: v2 } = this.dt(t2, r2, c2);
1459
+ if (!Array.isArray(a$12))
1460
+ return this.ct = v2, p2;
1461
+ const h2 = (d2 = this.ct) !== null && d2 !== void 0 ? d2 : this.ct = [], m$12 = [];
1462
+ let y, x2, j = 0, k2 = a$12.length - 1, w2 = 0, A2 = p2.length - 1;
1463
+ for (; j <= k2 && w2 <= A2; )
1464
+ if (a$12[j] === null)
1465
+ j++;
1466
+ else if (a$12[k2] === null)
1467
+ k2--;
1468
+ else if (h2[j] === v2[w2])
1469
+ m$12[w2] = c$1(a$12[j], p2[w2]), j++, w2++;
1470
+ else if (h2[k2] === v2[A2])
1471
+ m$12[A2] = c$1(a$12[k2], p2[A2]), k2--, A2--;
1472
+ else if (h2[j] === v2[A2])
1473
+ m$12[A2] = c$1(a$12[j], p2[A2]), u$1(s$12, m$12[A2 + 1], a$12[j]), j++, A2--;
1474
+ else if (h2[k2] === v2[w2])
1475
+ m$12[w2] = c$1(a$12[k2], p2[w2]), u$1(s$12, a$12[j], a$12[k2]), k2--, w2++;
1476
+ else if (y === void 0 && (y = u(v2, w2, A2), x2 = u(h2, j, k2)), y.has(h2[j]))
1477
+ if (y.has(h2[k2])) {
1478
+ const e2 = x2.get(v2[w2]), t3 = e2 !== void 0 ? a$12[e2] : null;
1479
+ if (t3 === null) {
1480
+ const e3 = u$1(s$12, a$12[j]);
1481
+ c$1(e3, p2[w2]), m$12[w2] = e3;
1482
+ } else
1483
+ m$12[w2] = c$1(t3, p2[w2]), u$1(s$12, a$12[j], t3), a$12[e2] = null;
1484
+ w2++;
1485
+ } else
1486
+ m(a$12[k2]), k2--;
1487
+ else
1488
+ m(a$12[j]), j++;
1489
+ for (; w2 <= A2; ) {
1490
+ const e2 = u$1(s$12, m$12[A2 + 1]);
1491
+ c$1(e2, p2[w2]), m$12[w2++] = e2;
1492
+ }
1493
+ for (; j <= k2; ) {
1494
+ const e2 = a$12[j++];
1495
+ e2 !== null && m(e2);
1496
+ }
1497
+ return this.ct = v2, s(s$12, m$12), b;
1498
+ }
1499
+ });
1500
+ /**
1501
+ * @license
1502
+ * Copyright 2020 Google LLC
1503
+ * SPDX-License-Identifier: BSD-3-Clause
1504
+ */
1505
+ const o = e$2(class extends i$1 {
1506
+ constructor(t$12) {
1507
+ if (super(t$12), t$12.type !== t.CHILD)
1508
+ throw Error("templateContent can only be used in child bindings");
1509
+ }
1510
+ render(r2) {
1511
+ return this.at === r2 ? b : (this.at = r2, document.importNode(r2.content, true));
1512
+ }
1513
+ });
1514
+ var __defProp$d = Object.defineProperty;
1515
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
1516
+ var __decorateClass$d = (decorators, target, key, kind) => {
1517
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
1518
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1519
+ if (decorator = decorators[i2])
1520
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1521
+ if (kind && result)
1522
+ __defProp$d(target, key, result);
1523
+ return result;
1524
+ };
1525
+ let SonicList = class extends Fetcher(Subscriber(s$1)) {
1526
+ constructor() {
1527
+ super(...arguments);
1528
+ this.template = null;
1529
+ }
1530
+ connectedCallback() {
1531
+ super.connectedCallback();
1532
+ this.template = this.getElementsByTagName("template")[0];
1533
+ }
1534
+ render() {
1535
+ if (!Array.isArray(this.props))
1536
+ return p``;
1537
+ return p`
1538
+ ${c(this.props, (item) => item.id, (item, index) => p`
1539
+ <sonic-subscriber .props=${item} dataProvider="${this.dataProvider}/${index}">
1540
+ ${o(this.template)}
1541
+ </sonic-subscriber>
1542
+ `)}
1543
+ `;
1544
+ }
1545
+ };
1546
+ SonicList.styles = [
1547
+ r$2`
1548
+ .sonic-no-result-container {
1549
+ color:var(--sc-base-300);
1550
+ font-size:1.65rem;
1551
+
1552
+ }
1553
+ .sonic-no-result-container svg{
1554
+ width:1.2em;
1555
+ height:1.2em;
1556
+ margin-right:.25em;
1557
+ object-fit:contain;
1558
+ vertical-align:middle;
1559
+ }
1560
+ span {
1561
+ vertical-align:middle;
1562
+ }
1563
+ `
1564
+ ];
1565
+ SonicList = __decorateClass$d([
1566
+ n("sonic-list")
1567
+ ], SonicList);
1568
+ var __defProp$c = Object.defineProperty;
1569
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
1570
+ var __decorateClass$c = (decorators, target, key, kind) => {
1571
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
1572
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1573
+ if (decorator = decorators[i2])
1574
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1575
+ if (kind && result)
1576
+ __defProp$c(target, key, result);
1577
+ return result;
1578
+ };
1579
+ let SonicSubscriber = class extends Subscriber(s$1) {
1580
+ render() {
1581
+ return p`
1582
+ <slot></slot>
1583
+ `;
1584
+ }
1585
+ };
1586
+ SonicSubscriber = __decorateClass$c([
1587
+ n("sonic-subscriber")
1588
+ ], SonicSubscriber);
1589
+ var __defProp$b = Object.defineProperty;
1590
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
1591
+ var __decorateClass$b = (decorators, target, key, kind) => {
1592
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
1593
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1594
+ if (decorator = decorators[i2])
1595
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1596
+ if (kind && result)
1597
+ __defProp$b(target, key, result);
1598
+ return result;
1599
+ };
1600
+ let SonicTaxonomy = class extends Subscriber(s$1) {
1601
+ constructor() {
1602
+ super(...arguments);
1603
+ this.taxonomy = [];
1604
+ this.separator = "";
1605
+ }
1606
+ render() {
1607
+ if (this.taxonomy.length === 0)
1608
+ return;
1609
+ const idKey = "category_id";
1610
+ const nameKey = "category_name";
1611
+ return p`
1612
+ <div class="sonic-taxonomy">
1613
+ <i class=" fas fa-circle"></i>
1614
+ <div>
1615
+ ${c(this.taxonomy, (item) => item[idKey], (item) => p`<span>
1616
+ ${item[nameKey]}
1617
+ </span>
1618
+ <span class="sonic-taxonomy-separator"></span>
1619
+ `)}
1620
+ </div>
1621
+
1622
+ </div>
1623
+ `;
1624
+ }
1625
+ };
1626
+ __decorateClass$b([
1627
+ e$3({ type: Array })
1628
+ ], SonicTaxonomy.prototype, "taxonomy", 2);
1629
+ __decorateClass$b([
1630
+ e$3({ type: String })
1631
+ ], SonicTaxonomy.prototype, "separator", 2);
1632
+ SonicTaxonomy = __decorateClass$b([
1633
+ n("sonic-taxonomy")
1634
+ ], SonicTaxonomy);
1635
+ var __defProp$a = Object.defineProperty;
1636
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
1637
+ var __decorateClass$a = (decorators, target, key, kind) => {
1638
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
1639
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1640
+ if (decorator = decorators[i2])
1641
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1642
+ if (kind && result)
1643
+ __defProp$a(target, key, result);
1644
+ return result;
1645
+ };
1646
+ let SonicEventCard = class extends Subscriber(s$1) {
1647
+ constructor() {
1648
+ super(...arguments);
1649
+ this.start_date = "";
1650
+ this.illustration = "";
1651
+ this.categories = [];
1652
+ }
1653
+ render() {
1654
+ return p`
1655
+ <div class="sonic-event-card">
1656
+ <div class="sonic-event-card-illustration">
1657
+ <sonic-illustration
1658
+ illustration=${this.illustration}
1659
+ ></sonic-illustration>
1660
+ </div>
1661
+ <div class="sonic-event-card-text">
1662
+ ${this.start_date}
1663
+ <div class="sonic-event-card-title">${this.title}</div>
1664
+ <div class="sonic-event-card-infos">
1665
+ <sonic-taxonomy .taxonomy=${this.categories} ></sonic-taxonomy>
1666
+ </diV>
1667
+
1668
+ <sonic-prices-form></sonic-prices-form>
1669
+ </div>
1670
+ </div>
1671
+ `;
1672
+ }
1673
+ };
1674
+ SonicEventCard.styles = [
1675
+ r$2`
1676
+ a {
1677
+ text-decoration: none;
1678
+ display: block;
1679
+ color: inherit;
1680
+ }
1681
+
1682
+ .sonic-event-card {
1683
+ max-width: 30em;
1684
+ font-size: var(--sc-fs-root);
1685
+ margin-bottom: 4em;
1686
+ display: grid;
1687
+ flex-wrap: wrap;
1688
+ grid-template-columns: minmax(0, 1fr);
1689
+ }
1690
+
1691
+ .sonic-event-card-title {
1692
+ font-size: var(--sc-card-title-font-size, 1.75em);
1693
+ line-height: var(--sc-card-title-leading, var(--sc-headings-line-height) );
1694
+ font-weight: var(--sc-card-title-fw, var(--sc-headings-font-weight) );
1695
+ margin-bottom: 0.25em;
1696
+ }
1697
+
1698
+ .sonic-event-card-prices {
1699
+ margin-top: 0.8em;
1700
+ }
1701
+ .sonic-event-card-illustration {
1702
+ display:flex; margin-bottom:.8em;
1703
+ }
1704
+
1705
+ .sonic-event-card-body {
1706
+ max-width: 70ch;
1707
+ margin-bottom: 1.25em;
1708
+ }
1709
+
1710
+ .sonic-event-card-text {
1711
+ align-self: center;
1712
+ }
1713
+
1714
+ .sonic-event-card-infos {
1715
+ margin-bottom:1em;
1716
+ }
1717
+ `
1718
+ ];
1719
+ __decorateClass$a([
1720
+ e$3({ type: String })
1721
+ ], SonicEventCard.prototype, "start_date", 2);
1722
+ __decorateClass$a([
1723
+ e$3({ type: String })
1724
+ ], SonicEventCard.prototype, "illustration", 2);
1725
+ __decorateClass$a([
1726
+ e$3({ type: Array })
1727
+ ], SonicEventCard.prototype, "categories", 2);
1728
+ SonicEventCard = __decorateClass$a([
1729
+ n("sonic-event-card")
1730
+ ], SonicEventCard);
1731
+ var __defProp$9 = Object.defineProperty;
1732
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
1733
+ var __decorateClass$9 = (decorators, target, key, kind) => {
1734
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
1735
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1736
+ if (decorator = decorators[i2])
1737
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1738
+ if (kind && result)
1739
+ __defProp$9(target, key, result);
1740
+ return result;
1741
+ };
1742
+ let SonicEventTitle = class extends Subscriber(s$1) {
1743
+ constructor() {
1744
+ super(...arguments);
1745
+ this.title = "";
1746
+ }
1747
+ render() {
1748
+ return p`
1749
+ ${this.title}
1750
+ `;
1751
+ }
1752
+ };
1753
+ __decorateClass$9([
1754
+ e$3({ type: String })
1755
+ ], SonicEventTitle.prototype, "title", 2);
1756
+ SonicEventTitle = __decorateClass$9([
1757
+ n("sonic-event-title")
1758
+ ], SonicEventTitle);
1759
+ var __defProp$8 = Object.defineProperty;
1760
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
1761
+ var __decorateClass$8 = (decorators, target, key, kind) => {
1762
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
1763
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1764
+ if (decorator = decorators[i2])
1765
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1766
+ if (kind && result)
1767
+ __defProp$8(target, key, result);
1768
+ return result;
1769
+ };
1770
+ let SonicEvent = class extends Subscriber(s$1) {
1771
+ render() {
1772
+ return p`
1773
+ <slot></slot>
1774
+ `;
1775
+ }
1776
+ };
1777
+ SonicEvent = __decorateClass$8([
1778
+ n("super-event")
1779
+ ], SonicEvent);
1780
+ var __defProp$7 = Object.defineProperty;
1781
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
1782
+ var __decorateClass$7 = (decorators, target, key, kind) => {
1783
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
1784
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1785
+ if (decorator = decorators[i2])
1786
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1787
+ if (kind && result)
1788
+ __defProp$7(target, key, result);
1789
+ return result;
1790
+ };
1791
+ let SonicIllustration = class extends Subscriber(s$1) {
1792
+ constructor() {
1793
+ super(...arguments);
1794
+ this.illustration = "";
1795
+ this.loadingMode = "lazy";
1796
+ this.ratio = "1x1";
1797
+ this.className = "";
1798
+ }
1799
+ render() {
1800
+ return p` <div class="${this.className} sonic-img-container">
1801
+ <picture
1802
+ ><img src="${this.illustration}" loading="${this.loadingMode}" alt=""
1803
+ /></picture>
1804
+ </div>`;
1805
+ }
1806
+ };
1807
+ SonicIllustration.styles = r$2`
1808
+ img {
1809
+ aspect-ratio: 1 / 1;
1810
+ width: 100%;
1811
+ vertical-align: middle;
1812
+ }
1813
+
1814
+ img[src=""] {
1815
+ visibility: hidden;
1816
+ }
1817
+
1818
+ .sonic-img-container {
1819
+ border-radius: var(--sc-img-radius, var(--sc-rounded-lg) );
1820
+ overflow:hidden;
1821
+ background: var(--sc-placeholder-bg);
1822
+ }
1823
+
1824
+ `;
1825
+ __decorateClass$7([
1826
+ e$3({ type: String })
1827
+ ], SonicIllustration.prototype, "illustration", 2);
1828
+ __decorateClass$7([
1829
+ e$3({ type: String })
1830
+ ], SonicIllustration.prototype, "loadingMode", 2);
1831
+ __decorateClass$7([
1832
+ e$3({ type: String })
1833
+ ], SonicIllustration.prototype, "ratio", 2);
1834
+ __decorateClass$7([
1835
+ e$3({ type: String })
1836
+ ], SonicIllustration.prototype, "className", 2);
1837
+ SonicIllustration = __decorateClass$7([
1838
+ n("sonic-illustration")
1839
+ ], SonicIllustration);
1840
+ var __defProp$6 = Object.defineProperty;
1841
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
1842
+ var __decorateClass$6 = (decorators, target, key, kind) => {
1843
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
1844
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1845
+ if (decorator = decorators[i2])
1846
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1847
+ if (kind && result)
1848
+ __defProp$6(target, key, result);
1849
+ return result;
1850
+ };
1851
+ let SonicGiftcard = class extends Subscriber(s$1) {
1852
+ constructor() {
1853
+ super(...arguments);
1854
+ this.title = "";
1855
+ this.body = "";
1856
+ }
1857
+ render() {
1858
+ return p`
1859
+ <div class="sonic-giftcard-item">
1860
+ <div class="sonic-giftcard-illustration">
1861
+ <sonic-illustration></sonic-illustration>
1862
+ </div>
1863
+ <div class="sonic-giftcard-text">
1864
+ <div class="sonic-giftcard-title">${this.title}</div>
1865
+ <div class="sonic-giftcard-body">
1866
+ <sonic-text-formatted
1867
+ .html=${this.body}
1868
+ leading="tight"
1869
+ ></sonic-text-formatted>
1870
+ </div>
1871
+ <sonic-prices-form></sonic-prices-form>
1872
+ </div>
1873
+ </div>
1874
+ `;
1875
+ }
1876
+ };
1877
+ SonicGiftcard.styles = [
1878
+ r$2`
1879
+ .sonic-giftcard-item {
1880
+ font-size: var(--sc-fs-root);
1881
+ margin-bottom: 4em;
1882
+ display: grid;
1883
+ flex-wrap: wrap;
1884
+ gap: 1.5em;
1885
+ grid-template-columns: minmax(0, 1fr);
1886
+ }
1887
+
1888
+ @media (min-width: 992px) {
1889
+ .sonic-giftcard-item {
1890
+ grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
1891
+ }
1892
+ }
1893
+
1894
+ .sonic-giftcard-title {
1895
+ font-size: var(--sc-card-title-font-size, 1.75em);
1896
+ line-height: var(--sc-card-title-leading, var(--sc-headings-line-height) );
1897
+ font-weight: var(--sc-card-title-fw, var(--sc-headings-font-weight) );
1898
+ margin-bottom: 0.25em;
1899
+ }
1900
+
1901
+ .sonic-giftcard-prices {
1902
+ margin-top: 0.8em;
1903
+ }
1904
+
1905
+ .sonic-giftcard-body {
1906
+ max-width: 70ch;
1907
+ margin-bottom: 1.25em;
1908
+ }
1909
+
1910
+ .sonic-giftcard-illustration {
1911
+ position: relative;
1912
+ }
1913
+
1914
+ .sonic-giftcard-text {
1915
+ align-self: center;
1916
+ }
1917
+ `
1918
+ ];
1919
+ __decorateClass$6([
1920
+ e$3({ type: String })
1921
+ ], SonicGiftcard.prototype, "title", 2);
1922
+ __decorateClass$6([
1923
+ e$3({ type: String })
1924
+ ], SonicGiftcard.prototype, "body", 2);
1925
+ SonicGiftcard = __decorateClass$6([
1926
+ n("sonic-giftcard")
1927
+ ], SonicGiftcard);
1928
+ const cssButton = r$2`
1929
+ button {
1930
+
1931
+ all: unset;
1932
+ cursor: pointer;
1933
+ text-align: center;
1934
+ line-height: 1.2;
1935
+ border-radius: var(--sc-btn-rounded);
1936
+ background: var(--sc-btn-bg, var(--sc-success, #1F2937));
1937
+ color: var(--sc-btn-content, var(--sc-base, #fff));
1938
+
1939
+ font-family: var(--sc-btn-ff, inherit);
1940
+ font-size: var(--sc-btn-fs-lg, 1.5em);
1941
+ padding-block: var(--sc-btn-py, 0.6em);
1942
+ padding-inline: var(--sc-btn-px, 0.8em);
1943
+ }
1944
+
1945
+ button:hover,
1946
+ button:focus {
1947
+ filter:brightness(.99)
1948
+ }
1949
+
1950
+ button:active{
1951
+ transform:scale(.98)
1952
+ }
1953
+ `;
1954
+ var __defProp$5 = Object.defineProperty;
1955
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
1956
+ var __decorateClass$5 = (decorators, target, key, kind) => {
1957
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
1958
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1959
+ if (decorator = decorators[i2])
1960
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1961
+ if (kind && result)
1962
+ __defProp$5(target, key, result);
1963
+ return result;
1964
+ };
1965
+ const removeIcon = `<svg aria-hidden="true" focusable="false" data-icon="xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
1966
+ <path fill="currentColor" d="M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z">
1967
+ </path>
1968
+ </svg>`;
1969
+ const successIcon = `
1970
+ <svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-check" class="svg-inline--fa fa-circle-check" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
1971
+ <path fill="currentColor" d="M340.7 180.7L224 297.4L171.3 244.7c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62l64 64C215.8 334.4 219.9 336 224 336s8.188-1.562 11.31-4.688l128-128c6.25-6.25 6.25-16.38 0-22.62S346.9 174.4 340.7 180.7zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480z">
1972
+ </path>
1973
+ </svg>`;
1974
+ const infoIcon = `
1975
+ <svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-info" class="svg-inline--fa fa-circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
1976
+ <path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480zM256 184c13.25 0 24-10.74 24-24c0-13.25-10.75-24-24-24S232 146.7 232 160C232 173.3 242.7 184 256 184zM304 352h-32V240C272 231.2 264.8 224 256 224H224C215.2 224 208 231.2 208 240S215.2 256 224 256h16v96h-32C199.2 352 192 359.2 192 368C192 376.8 199.2 384 208 384h96c8.836 0 16-7.164 16-16C320 359.2 312.8 352 304 352z">
1977
+ </path>
1978
+ </svg>
1979
+ `;
1980
+ const errorIcon = `
1981
+ <svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="circle-xmark" class="svg-inline--fa fa-circle-xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
1982
+ <path fill="currentColor" d="M331.3 180.7c-6.25-6.25-16.38-6.25-22.62 0L256 233.4L203.3 180.7c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62L233.4 256L180.7 308.7c-6.25 6.25-6.25 16.38 0 22.62c6.246 6.246 16.37 6.254 22.62 0L256 278.6l52.69 52.69c6.246 6.246 16.37 6.254 22.62 0c6.25-6.25 6.25-16.38 0-22.62L278.6 256l52.69-52.69C337.6 197.1 337.6 186.9 331.3 180.7zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256S512 397.4 512 256S397.4 0 256 0zM256 480c-123.5 0-224-100.5-224-224s100.5-224 224-224s224 100.5 224 224S379.5 480 256 480z">
1983
+ </path>
1984
+ </svg>
1985
+ `;
1986
+ let SonicToast = class extends Subscriber(s$1) {
1987
+ constructor() {
1988
+ super(...arguments);
1989
+ this.status = "";
1990
+ this.toastTitle = "";
1991
+ this.text = "";
1992
+ this.className = "";
1993
+ this.btnClass = "";
1994
+ }
1995
+ static show(conf) {
1996
+ let toast = document.createElement("sonic-toast");
1997
+ let v2 = conf;
1998
+ for (let z2 in v2)
1999
+ toast.setAttribute(z2, v2[z2]);
2000
+ let container = document.querySelector("sonic-theme");
2001
+ if (!container)
2002
+ container = document.body;
2003
+ container.appendChild(toast);
2004
+ }
2005
+ render() {
2006
+ let icon;
2007
+ switch (this.status) {
2008
+ case "success":
2009
+ icon = successIcon;
2010
+ break;
2011
+ case "error":
2012
+ icon = errorIcon;
2013
+ break;
2014
+ case "info":
2015
+ icon = infoIcon;
2016
+ break;
2017
+ default:
2018
+ icon = "";
2019
+ break;
2020
+ }
2021
+ return p`<div class="${this.className} sonic-toast ${this.status}">
2022
+ ${icon && p`<div class="sonic-toast-icon">${o$1(icon)}</div>`}
2023
+ <div class="sonic-toast-text">
2024
+ ${this.toastTitle && p`<div class="sonic-toast-title">${this.toastTitle}</div>`}
2025
+ ${o$1(this.text)}
2026
+ <slot> </slot>
2027
+ </div>
2028
+ <button class="${this.btnClass}" @click="${this._remove}">
2029
+ ${o$1(removeIcon)}
2030
+ </button>
2031
+ </div>`;
2032
+ }
2033
+ _remove() {
2034
+ this.remove();
2035
+ }
2036
+ };
2037
+ SonicToast.styles = [
2038
+ r$2`
2039
+ .sonic-toast {
2040
+ position: fixed;
2041
+ top: 1rem;
2042
+ right: 1rem;
2043
+ width:75%;
2044
+ max-width: 40ch;
2045
+ background: var(--sc-base, #fff);
2046
+ color: var(--sc-base-content);
2047
+ box-shadow: var(--sc-shadow);
2048
+ border-radius: var(--sc-rounded);
2049
+ padding: 1em;
2050
+ font-size: 0.85em;
2051
+ z-index: 999;
2052
+ padding-right: 2rem;
2053
+ line-height: 1.25;
2054
+ display: flex;
2055
+ gap: 0.5rem;
2056
+ }
2057
+
2058
+ .sonic-toast-icon {
2059
+ flex-shrink: 0;
2060
+ width: 2em;
2061
+ }
2062
+
2063
+ button {
2064
+ all: unset;
2065
+ position: absolute;
2066
+ right: 0.5em;
2067
+ top: 0.5em;
2068
+ width: 1.5rem;
2069
+ height: 1.5rem;
2070
+ cursor: pointer;
2071
+ display: inline-flex;
2072
+ align-items: center;
2073
+ justify-content: center;
2074
+ border-radius: 50%;
2075
+ text-align: center;
2076
+ opacity: 0.5;
2077
+ background: rgba(0, 0, 0, 0.05);
2078
+ }
2079
+
2080
+ button:focus,
2081
+ button:hover {
2082
+ opacity: 1;
2083
+ background: rgba(0, 0, 0, 0.075);
2084
+ }
2085
+
2086
+ button svg {
2087
+ width: 1rem;
2088
+ height: 1rem;
2089
+ object-fit: contain;
2090
+ object-position: center center;
2091
+ }
2092
+
2093
+ .sonic-toast-title {
2094
+ font-weight: bold;
2095
+ margin-bottom: 0.25em;
2096
+ }
2097
+
2098
+ .success {
2099
+ border-top: 2px solid var(--sc-success);
2100
+ }
2101
+
2102
+ .error {
2103
+ border-top: 2px solid var(--sc-danger);
2104
+ }
2105
+
2106
+ .info {
2107
+ border-top: 2px solid var(--sc-info);
2108
+ }
2109
+
2110
+ .warning {
2111
+ border-top: 2px solid var(--sc-warning);
2112
+ }
2113
+
2114
+ .info .sonic-toast-icon svg {
2115
+ color: var(--sc-info);
2116
+ }
2117
+ .error .sonic-toast-icon svg {
2118
+ color: var(--sc-danger);
2119
+ }
2120
+ .success .sonic-toast-icon svg {
2121
+ color: var(--sc-success);
2122
+ }
2123
+ .warning .sonic-toast-icon svg {
2124
+ color: var(--sc-warning);
2125
+ }
2126
+ `
2127
+ ];
2128
+ __decorateClass$5([
2129
+ e$3({ type: String })
2130
+ ], SonicToast.prototype, "status", 2);
2131
+ __decorateClass$5([
2132
+ e$3({ type: String })
2133
+ ], SonicToast.prototype, "toastTitle", 2);
2134
+ __decorateClass$5([
2135
+ e$3({ type: String })
2136
+ ], SonicToast.prototype, "text", 2);
2137
+ __decorateClass$5([
2138
+ e$3({ type: String })
2139
+ ], SonicToast.prototype, "className", 2);
2140
+ __decorateClass$5([
2141
+ e$3({ type: String })
2142
+ ], SonicToast.prototype, "btnClass", 2);
2143
+ SonicToast = __decorateClass$5([
2144
+ n("sonic-toast")
2145
+ ], SonicToast);
2146
+ var __defProp$4 = Object.defineProperty;
2147
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
2148
+ var __decorateClass$4 = (decorators, target, key, kind) => {
2149
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
2150
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2151
+ if (decorator = decorators[i2])
2152
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2153
+ if (kind && result)
2154
+ __defProp$4(target, key, result);
2155
+ return result;
2156
+ };
2157
+ let SonicPricesButton = class extends Subscriber(s$1) {
2158
+ constructor() {
2159
+ super(...arguments);
2160
+ this.price_amount = "";
2161
+ this.giftcard_id = "";
2162
+ this.price_name = "";
2163
+ this.price_id = "";
2164
+ this.btnClass = "";
2165
+ this.displayBtnIcon = true;
2166
+ this.displayPriceName = true;
2167
+ this.priceNameClass = "";
2168
+ this.price_help_text = "";
2169
+ this.btnIconClass = "fal fa-shopping-basket";
2170
+ }
2171
+ _cleanPrice(price) {
2172
+ return price == null ? void 0 : price.replace(".00", "");
2173
+ }
2174
+ async _handleClick() {
2175
+ let api = new API({});
2176
+ let result = await api.put("/api-billetterie/webcomponents/cart", {
2177
+ events: [
2178
+ {
2179
+ "giftcard_id": this.giftcard_id,
2180
+ "quantity": 1,
2181
+ "price_id": this.price_id
2182
+ }
2183
+ ]
2184
+ });
2185
+ if (result.status) {
2186
+ document.querySelectorAll(".btn-panier-statut").forEach((elt) => elt.innerHTML = result.nb);
2187
+ SonicToast.show({ text: "Votre produit a bien \xE9t\xE9 ajout\xE9", status: "success", styled: true });
2188
+ } else {
2189
+ SonicToast.show({ text: result.data, status: "error", styled: true });
2190
+ }
2191
+ }
2192
+ render() {
2193
+ if (!this.props)
2194
+ return;
2195
+ const icon = this.displayBtnIcon ? p`<i class="${this.btnIconClass}"></i>` : "";
2196
+ const infoTooltip = this.price_help_text ? p`<div class="sonic-price-btn-help"><sonic-tooltip tooltipText="${this.price_help_text}">
2197
+ <span>?</span>
2198
+ </sonic-tooltip></div>` : "";
2199
+ return p`
2200
+
2201
+ <button class="sonic-price-btn ${this.btnClass} ${!this.props.price_available ? "sonic-price-disabled" : ""}" @click="${this._handleClick}">
2202
+ ${this.displayPriceName && p`<span class="${this.priceNameClass} sonic-price-btn-name">
2203
+ ${this.price_name}
2204
+ </span>`}
2205
+ <span> ${icon} ${this._cleanPrice(this.price_amount)}€ </span>
2206
+ ${infoTooltip}
2207
+ </button>
2208
+ `;
2209
+ }
2210
+ };
2211
+ SonicPricesButton.styles = [
2212
+ cssButton,
2213
+ r$2`
2214
+ .sonic-price-btn {
2215
+ position:relative;
2216
+ }
2217
+
2218
+ .sonic-price-btn-name {
2219
+ font-size: 0.75em;
2220
+ display: block;
2221
+ }
2222
+
2223
+ .sonic-price-btn-help {
2224
+ border: 1px;
2225
+ position:absolute;
2226
+ right:.15rem;
2227
+ top:.15rem;
2228
+ width:1.2em;
2229
+ font-size:.65em;
2230
+ line-height:1;
2231
+ display:inline-flex;
2232
+ justify-content:center;
2233
+ align-items: center;
2234
+ height:1.2em;
2235
+ background:var(--sc-base-content);
2236
+ color:var(--sc-base);
2237
+ border-radius:50%;
2238
+ z-index:10;
2239
+ }
2240
+
2241
+ .sonic-price-disabled {
2242
+ opacity:.3;
2243
+ pointer-events:none;
2244
+ user-select:none;
2245
+ }
2246
+
2247
+ `
2248
+ ];
2249
+ __decorateClass$4([
2250
+ e$3({ type: String })
2251
+ ], SonicPricesButton.prototype, "price_amount", 2);
2252
+ __decorateClass$4([
2253
+ e$3({ type: String })
2254
+ ], SonicPricesButton.prototype, "giftcard_id", 2);
2255
+ __decorateClass$4([
2256
+ e$3({ type: String })
2257
+ ], SonicPricesButton.prototype, "price_name", 2);
2258
+ __decorateClass$4([
2259
+ e$3({ type: String })
2260
+ ], SonicPricesButton.prototype, "price_id", 2);
2261
+ __decorateClass$4([
2262
+ e$3({ type: String })
2263
+ ], SonicPricesButton.prototype, "btnClass", 2);
2264
+ __decorateClass$4([
2265
+ e$3({ type: Boolean })
2266
+ ], SonicPricesButton.prototype, "displayBtnIcon", 2);
2267
+ __decorateClass$4([
2268
+ e$3({ type: Boolean })
2269
+ ], SonicPricesButton.prototype, "displayPriceName", 2);
2270
+ __decorateClass$4([
2271
+ e$3({ type: String })
2272
+ ], SonicPricesButton.prototype, "priceNameClass", 2);
2273
+ __decorateClass$4([
2274
+ e$3({ type: String })
2275
+ ], SonicPricesButton.prototype, "price_help_text", 2);
2276
+ __decorateClass$4([
2277
+ e$3({ type: String })
2278
+ ], SonicPricesButton.prototype, "btnIconClass", 2);
2279
+ SonicPricesButton = __decorateClass$4([
2280
+ n("sonic-price-button")
2281
+ ], SonicPricesButton);
2282
+ var __defProp$3 = Object.defineProperty;
2283
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
2284
+ var __decorateClass$3 = (decorators, target, key, kind) => {
2285
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
2286
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2287
+ if (decorator = decorators[i2])
2288
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2289
+ if (kind && result)
2290
+ __defProp$3(target, key, result);
2291
+ return result;
2292
+ };
2293
+ let SonicPricesForm = class extends Subscriber(s$1) {
2294
+ constructor() {
2295
+ super(...arguments);
2296
+ this.giftcard_id = "";
2297
+ this.prices = [];
2298
+ this.wrapper = true;
2299
+ this.displayBtnIcon = false;
2300
+ this.displayPriceName = true;
2301
+ this.className = "";
2302
+ this.itemClass = "";
2303
+ this.btnClass = "";
2304
+ this.iconClass = "";
2305
+ this.priceNameClass = "";
2306
+ }
2307
+ render() {
2308
+ if (this.prices.length === 0)
2309
+ return;
2310
+ return p`
2311
+ <div class="${this.className} sonic-prices-list">
2312
+ ${c(this.prices, (price) => price.price_id, (price, index) => p`<div class="${this.itemClass} sonic-prices-list-item" ><sonic-price-button
2313
+ .props=${this.makeShadow(this.props, price)}
2314
+ dataProvider="${this.dataProvider}/${index}"
2315
+ .btnClass=${this.btnClass}
2316
+ .displayBtnIcon=${this.displayBtnIcon}
2317
+ .priceNameClass=${this.priceNameClass}
2318
+ .displayPriceName=${this.displayPriceName}
2319
+ ></sonic-price-button></div>`)}
2320
+
2321
+ </div>
2322
+ `;
2323
+ }
2324
+ };
2325
+ SonicPricesForm.styles = [
2326
+ r$2`
2327
+ .sonic-prices-list {
2328
+ display:grid;
2329
+ grid-gap:.25em;
2330
+ grid-template-columns:repeat(auto-fill, minmax( min( 8.5em, 100%), 1fr))
2331
+ }
2332
+
2333
+ sonic-price-button,
2334
+ .sonic-prices-list-item {
2335
+ display:contents;
2336
+ background:red;
2337
+ }
2338
+ `
2339
+ ];
2340
+ __decorateClass$3([
2341
+ e$3({ type: String })
2342
+ ], SonicPricesForm.prototype, "giftcard_id", 2);
2343
+ __decorateClass$3([
2344
+ e$3({ type: Array })
2345
+ ], SonicPricesForm.prototype, "prices", 2);
2346
+ __decorateClass$3([
2347
+ e$3({ type: Boolean })
2348
+ ], SonicPricesForm.prototype, "wrapper", 2);
2349
+ __decorateClass$3([
2350
+ e$3({ type: Boolean })
2351
+ ], SonicPricesForm.prototype, "displayBtnIcon", 2);
2352
+ __decorateClass$3([
2353
+ e$3({ type: Boolean })
2354
+ ], SonicPricesForm.prototype, "displayPriceName", 2);
2355
+ __decorateClass$3([
2356
+ e$3({ type: String })
2357
+ ], SonicPricesForm.prototype, "className", 2);
2358
+ __decorateClass$3([
2359
+ e$3({ type: String })
2360
+ ], SonicPricesForm.prototype, "itemClass", 2);
2361
+ __decorateClass$3([
2362
+ e$3({ type: String })
2363
+ ], SonicPricesForm.prototype, "btnClass", 2);
2364
+ __decorateClass$3([
2365
+ e$3({ type: String })
2366
+ ], SonicPricesForm.prototype, "iconClass", 2);
2367
+ __decorateClass$3([
2368
+ e$3({ type: String })
2369
+ ], SonicPricesForm.prototype, "priceNameClass", 2);
2370
+ SonicPricesForm = __decorateClass$3([
2371
+ n("sonic-prices-form")
2372
+ ], SonicPricesForm);
2373
+ var __defProp$2 = Object.defineProperty;
2374
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
2375
+ var __decorateClass$2 = (decorators, target, key, kind) => {
2376
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
2377
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2378
+ if (decorator = decorators[i2])
2379
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2380
+ if (kind && result)
2381
+ __defProp$2(target, key, result);
2382
+ return result;
2383
+ };
2384
+ let SonicTooltip = class extends Subscriber(s$1) {
2385
+ constructor() {
2386
+ super(...arguments);
2387
+ this.tooltipText = "";
2388
+ this.className = "";
2389
+ }
2390
+ render() {
2391
+ return p`<div
2392
+ data-tooltip-text="${this.tooltipText}"
2393
+ class="${this.className} sonic-tooltip"
2394
+ >
2395
+ <slot></slot>
2396
+ </div>`;
2397
+ }
2398
+ };
2399
+ SonicTooltip.styles = [
2400
+ r$2`
2401
+ .sonic-tooltip {
2402
+ position: relative;
2403
+ }
2404
+ .sonic-tooltip:before {
2405
+ position: absolute;
2406
+ content: attr(data-tooltip-text);
2407
+ font-size: 0.85rem;
2408
+ display: block;
2409
+ opacity: 0;
2410
+ pointer-events: none;
2411
+ bottom: calc(100% + 0.25rem);
2412
+ left: 50%;
2413
+ transform: translateX(-50%);
2414
+ background: var(--sc-base-content, #111827);
2415
+ padding: 0.25rem;
2416
+ min-width: 20ch;
2417
+ border-radius: 0.25rem;
2418
+ color:var(--sc-base, #fff);
2419
+ z-index:999;
2420
+ }
2421
+ .sonic-tooltip:hover:before {
2422
+ opacity: 1;
2423
+ }
2424
+ `
2425
+ ];
2426
+ __decorateClass$2([
2427
+ e$3({ type: String })
2428
+ ], SonicTooltip.prototype, "tooltipText", 2);
2429
+ __decorateClass$2([
2430
+ e$3({ type: String })
2431
+ ], SonicTooltip.prototype, "className", 2);
2432
+ SonicTooltip = __decorateClass$2([
2433
+ n("sonic-tooltip")
2434
+ ], SonicTooltip);
2435
+ const inline = r$2`
2436
+ .sonic-loader--inline {
2437
+ display:block;
2438
+ position: relative;
2439
+ width: 80px;
2440
+ height: 80px;
2441
+ margin:auto;
2442
+ z-index:999;
2443
+
2444
+ }
2445
+ .sonic-loader--inline div {
2446
+ position: absolute;
2447
+ top: 33px;
2448
+ width: 13px;
2449
+ height: 13px;
2450
+ border-radius: 50%;
2451
+ background:var(--sc-loader-bg);
2452
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
2453
+ }
2454
+ .sonic-loader--inline div:nth-child(1) {
2455
+ left: 8px;
2456
+ animation: lds-ellipsis1 0.6s infinite;
2457
+ }
2458
+ .sonic-loader--inline div:nth-child(2) {
2459
+ left: 8px;
2460
+ animation: lds-ellipsis2 0.6s infinite;
2461
+ }
2462
+ .sonic-loader--inline div:nth-child(3) {
2463
+ left: 32px;
2464
+ animation: lds-ellipsis2 0.6s infinite;
2465
+ }
2466
+ .sonic-loader--inline div:nth-child(4) {
2467
+ left: 56px;
2468
+ animation: lds-ellipsis3 0.6s infinite;
2469
+ }
2470
+
2471
+ @keyframes lds-ellipsis1 {
2472
+ 0% {
2473
+ transform: scale(0);
2474
+ }
2475
+ 100% {
2476
+ transform: scale(1);
2477
+ }
2478
+ }
2479
+ @keyframes lds-ellipsis3 {
2480
+ 0% {
2481
+ transform: scale(1);
2482
+ }
2483
+ 100% {
2484
+ transform: scale(0);
2485
+ }
2486
+ }
2487
+ @keyframes lds-ellipsis2 {
2488
+ 0% {
2489
+ transform: translate(0, 0);
2490
+ }
2491
+ 100% {
2492
+ transform: translate(24px, 0);
2493
+ }
2494
+ }
2495
+
2496
+ `;
2497
+ const fixed = r$2`
2498
+
2499
+ @keyframes sonic-loader--fixed {
2500
+ 0% {
2501
+ transform: scale(0);
2502
+ opacity: 0;
2503
+ }
2504
+ 5% {
2505
+ opacity: 1;
2506
+ }
2507
+ 70% {
2508
+ opacity:90%;
2509
+ }
2510
+ 100% {
2511
+ transform: scale(1);
2512
+ opacity: 0;
2513
+ }
2514
+ }
2515
+
2516
+ .sonic-loader--fixed {
2517
+ position: fixed;
2518
+ top:50%;
2519
+ left:50%;
2520
+ transform:transateY(-50%) translateX(-50%);
2521
+ z-index:999;
2522
+ }
2523
+ .sonic-loader--fixed > div:nth-child(2) {
2524
+ animation-delay: -0.5s;
2525
+ }
2526
+ .sonic-loader--fixed > div:nth-child(3) {
2527
+ animation-delay: -0.2s;
2528
+
2529
+ }
2530
+ .sonic-loader--fixed > div:nth-child(4) {
2531
+ display:none !important;
2532
+ }
2533
+ .sonic-loader--fixed > div {
2534
+ background-color: var(--sc-loader-bg);
2535
+ width: 5rem;
2536
+ height: 5rem;
2537
+ border-radius: 100%;
2538
+ margin: 2px;
2539
+ animation-fill-mode: both;
2540
+ position: absolute;
2541
+ top: 0px;
2542
+ opacity: 0;
2543
+ margin: 0;
2544
+ top: -2.5rem;
2545
+ left: -2.5rem;
2546
+ width: 5rem;
2547
+ height: 5rem;
2548
+ animation: sonic-loader--fixed 1s 0s linear infinite;
2549
+ }
2550
+
2551
+ `;
2552
+ var __defProp$1 = Object.defineProperty;
2553
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
2554
+ var __decorateClass$1 = (decorators, target, key, kind) => {
2555
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
2556
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2557
+ if (decorator = decorators[i2])
2558
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2559
+ if (kind && result)
2560
+ __defProp$1(target, key, result);
2561
+ return result;
2562
+ };
2563
+ let SonicLoader = class extends Subscriber(s$1) {
2564
+ constructor() {
2565
+ super(...arguments);
2566
+ this.mode = "inline";
2567
+ }
2568
+ static show(conf) {
2569
+ let loader = document.createElement("sonic-loader");
2570
+ let v2 = conf;
2571
+ for (let z2 in v2)
2572
+ loader.setAttribute(z2, v2[z2]);
2573
+ let container = document.querySelector("sonic-theme");
2574
+ if (!container)
2575
+ container = document.body;
2576
+ container.appendChild(loader);
2577
+ }
2578
+ static remove() {
2579
+ this.remove();
2580
+ }
2581
+ render() {
2582
+ return p`<div class="sonic-loader--${this.mode} ">
2583
+ <div></div>
2584
+ <div></div>
2585
+ <div></div>
2586
+ <div></div>
2587
+ </div>`;
2588
+ }
2589
+ };
2590
+ SonicLoader.styles = [
2591
+ inline,
2592
+ fixed,
2593
+ r$2`
2594
+ :host {
2595
+ --sc-loader-bg:var(--sc-primary, currentColor);
2596
+ }`
2597
+ ];
2598
+ __decorateClass$1([
2599
+ e$3({ type: String })
2600
+ ], SonicLoader.prototype, "mode", 2);
2601
+ SonicLoader = __decorateClass$1([
2602
+ n("sonic-loader")
2603
+ ], SonicLoader);
2604
+ const light = r$2`
2605
+ :host([theme="light"]) {
2606
+ --sc-primary: #6366f1;
2607
+ --sc-info: #3b82f6;
2608
+ --sc-danger: #ef4444;
2609
+ --sc-warning: #fb923c;
2610
+ --sc-success: #10b981;
2611
+
2612
+ --sc-primary-content: #fff;
2613
+ --sc-info-content: #fff;
2614
+ --sc-danger-content: #fff;
2615
+ --sc-warning-content: #fff;
2616
+ --sc-success-content: #fff;
2617
+
2618
+ --sc-base: #fff;
2619
+ --sc-base-200: #e5e7eb;
2620
+ --sc-base-300: #4b5563;
2621
+ --sc-base-content: #1f2937;
2622
+
2623
+ --sc-font-family-base: inherit;
2624
+ --sc-headings-font-family: var(--sc-font-family-base);
2625
+ --sc-headings-line-height: 1.25;
2626
+ --sc-headings-font-weight: bold;
2627
+ --sc-headings-text-transform: none;
2628
+
2629
+ --sc-btn-rounded: 0.25em;
2630
+ --sc-rounded: 0.35rem;
2631
+ --sc-rounded-lg: 0.8rem;
2632
+ --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
2633
+
2634
+ --sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
2635
+ --sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
2636
+ --sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
2637
+ }
2638
+ `;
2639
+ const dracula = r$2`
2640
+ :host([theme="dracula"]){
2641
+
2642
+ --sc-primary: #ffb3d9;
2643
+ --sc-info: #8be9fd;
2644
+ --sc-danger: #ef4444;
2645
+ --sc-warning: #ffb86c;
2646
+ --sc-success: #50fa7b;
2647
+
2648
+ --sc-primary-content: #fff;
2649
+ --sc-info-content: #fff;
2650
+ --sc-danger-content: #fff;
2651
+ --sc-warning-content: #fff;
2652
+ --sc-success-content: #fff;
2653
+
2654
+ --sc-base: #302f3d;
2655
+ --sc-base-200: #22212c;
2656
+ --sc-base-300: #1d1e25;
2657
+ --sc-base-content: #d5ccff;
2658
+
2659
+ --sc-font-family-base: inherit;
2660
+ --sc-headings-font-family: var(--sc-font-family-base);
2661
+ --sc-headings-line-height: 1.25;
2662
+ --sc-headings-font-weight: bold;
2663
+ --sc-headings-text-transform: none;
2664
+
2665
+ --sc-btn-rounded: 0.25em;
2666
+ --sc-rounded: 0.35rem;
2667
+ --sc-rounded-lg: 0.8rem;
2668
+ --sc-placeholder-bg: rgba(17, 24, 39, 0.1);
2669
+
2670
+
2671
+ --sc-shadow-sm: 0 .125rem .25rem rgba(0,0,0,.05);
2672
+ --sc-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
2673
+ --sc-shadow-lg: 0 1rem 3rem rgba(0,0,0,.08);
2674
+ }
2675
+ }
2676
+ `;
2677
+ const dark = r$2`
2678
+ :host([theme="dark"]) {
2679
+ --sc-primary: #c395fc;
2680
+ --sc-info: #00b4d8;
2681
+ --sc-danger: #993955;
2682
+ --sc-warning: #E57A44;
2683
+ --sc-success: #1cdecb;
2684
+
2685
+ --sc-primary-content: #212121;
2686
+ --sc-info-content: #212121;
2687
+ --sc-danger-content: #212121;
2688
+ --sc-warning-content: #212121;
2689
+ --sc-success-content: #212121;
2690
+
2691
+ --sc-base: #212121;
2692
+ --sc-base-200: #2e2e2e;
2693
+ --sc-base-300: #373737;
2694
+ --sc-base-content: #e8e8e8;
2695
+
2696
+ --sc-font-family-base: inherit;
2697
+ --sc-headings-font-family: var(--sc-font-family-base);
2698
+ --sc-headings-line-height: 1.25;
2699
+ --sc-headings-font-weight: bold;
2700
+ --sc-headings-text-transform: none;
2701
+
2702
+ --sc-btn-rounded: 0.25em;
2703
+ --sc-rounded: 0.35rem;
2704
+ --sc-rounded-lg: 0.8rem;
2705
+ --sc-placeholder-bg: rgba(0, 0, 0, 0.1);
2706
+
2707
+ --sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
2708
+ --sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
2709
+ --sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
2710
+ }
2711
+ `;
2712
+ const bootstrap5 = r$2`
2713
+ :host([theme="bootstrap5"]) {
2714
+ --sc-primary: var(--bs-primary, #6366f1);
2715
+ --sc-info: var(--bs-info, #fb923c);
2716
+ --sc-danger: var(--bs-danger, #fb923c);
2717
+ --sc-warning: var(--bs-warning, #fb923c);
2718
+ --sc-success: var(--bs-success, #6366f1);
2719
+
2720
+ --sc-primary-content: var(--bs-white, #fff);
2721
+ --sc-info-content: var(--bs-white, #fff);
2722
+ --sc-danger-content: var(--bs-white, #fff);
2723
+ --sc-warning-content: var(--bs-white, #fff);
2724
+ --sc-success-content: var(--bs-white, #fff);
2725
+
2726
+ --sc-base: var(--bs-white, #fff);
2727
+ --sc-base-200: var(--bs-light, #e5e7eb);
2728
+ --sc-base-300: #a9adb3;
2729
+ --sc-base-content: var(--bs-dark, #1f2937);
2730
+
2731
+ --sc-font-family-base: inherit;
2732
+ --sc-headings-font-family: var(--sc-font-family-base);
2733
+ --sc-headings-line-height: 1.25;
2734
+ --sc-headings-font-weight: bold;
2735
+ --sc-headings-text-transform: none;
2736
+
2737
+ --sc-btn-rounded: 0.25em;
2738
+ --sc-rounded: 0.35rem;
2739
+ --sc-rounded-lg: 0.8rem;
2740
+ --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
2741
+
2742
+ --sc-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
2743
+ --sc-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
2744
+ --sc-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.08);
2745
+ }
2746
+ `;
2747
+ var __defProp = Object.defineProperty;
2748
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2749
+ var __decorateClass = (decorators, target, key, kind) => {
2750
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
2751
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2752
+ if (decorator = decorators[i2])
2753
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2754
+ if (kind && result)
2755
+ __defProp(target, key, result);
2756
+ return result;
2757
+ };
2758
+ let SonicTheme = class extends s$1 {
2759
+ constructor() {
2760
+ super(...arguments);
2761
+ this.theme = "light";
2762
+ }
2763
+ render() {
2764
+ return p`<slot></slot>`;
2765
+ }
2766
+ };
2767
+ SonicTheme.styles = [
2768
+ light,
2769
+ dark,
2770
+ bootstrap5,
2771
+ dracula,
2772
+ r$2`
2773
+ :host {
2774
+ --sc-font-size-root: 1rem;
2775
+ color:var(--sc-base-content);
2776
+ }
2777
+ :host([background]){
2778
+ display:block;
2779
+ background:var(--sc-base);
2780
+ }
2781
+
2782
+ `
2783
+ ];
2784
+ __decorateClass([
2785
+ e$3({ type: String, reflect: true })
2786
+ ], SonicTheme.prototype, "theme", 2);
2787
+ SonicTheme = __decorateClass([
2788
+ n("sonic-theme")
2789
+ ], SonicTheme);