mealz-components 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mealz-components.js +614 -326
- package/dist/mealz-components.min.js +216 -36
- package/dist/mealz-components.umd.cjs +222 -44
- package/dist/store-locator/store-locator.js +614 -326
- package/dist/store-locator/store-locator.min.js +216 -36
- package/dist/store-locator/store-locator.umd.cjs +222 -44
- package/package.json +1 -1
package/dist/mealz-components.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
constructor(t, e,
|
|
9
|
-
if (this._$cssResult$ = !0,
|
|
6
|
+
const N = globalThis, V = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), W = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let nt = class {
|
|
8
|
+
constructor(t, e, i) {
|
|
9
|
+
if (this._$cssResult$ = !0, i !== F)
|
|
10
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
11
|
this.cssText = t, this.t = e;
|
|
12
12
|
}
|
|
@@ -14,8 +14,8 @@ let ot = class {
|
|
|
14
14
|
let t = this.o;
|
|
15
15
|
const e = this.t;
|
|
16
16
|
if (V && t === void 0) {
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const i = e !== void 0 && e.length === 1;
|
|
18
|
+
i && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && W.set(e, t));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -23,65 +23,65 @@ let ot = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
const e =
|
|
26
|
+
const dt = (s) => new nt(typeof s == "string" ? s : s + "", void 0, F), ct = (s, ...t) => {
|
|
27
|
+
const e = s.length === 1 ? s[0] : t.reduce((i, o, r) => i + ((n) => {
|
|
28
28
|
if (n._$cssResult$ === !0)
|
|
29
29
|
return n.cssText;
|
|
30
30
|
if (typeof n == "number")
|
|
31
31
|
return n;
|
|
32
32
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
33
|
-
})(
|
|
34
|
-
return new
|
|
35
|
-
}, ut = (
|
|
33
|
+
})(o) + s[r + 1], s[0]);
|
|
34
|
+
return new nt(e, s, F);
|
|
35
|
+
}, ut = (s, t) => {
|
|
36
36
|
if (V)
|
|
37
|
-
|
|
37
|
+
s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
38
38
|
else
|
|
39
39
|
for (const e of t) {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const i = document.createElement("style"), o = N.litNonce;
|
|
41
|
+
o !== void 0 && i.setAttribute("nonce", o), i.textContent = e.cssText, s.appendChild(i);
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, G = V ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
44
44
|
let e = "";
|
|
45
|
-
for (const
|
|
46
|
-
e +=
|
|
47
|
-
return
|
|
48
|
-
})(
|
|
45
|
+
for (const i of t.cssRules)
|
|
46
|
+
e += i.cssText;
|
|
47
|
+
return dt(e);
|
|
48
|
+
})(s) : s;
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
const { is: mt, defineProperty:
|
|
54
|
+
const { is: mt, defineProperty: gt, getOwnPropertyDescriptor: ft, getOwnPropertyNames: _t, getOwnPropertySymbols: $t, getPrototypeOf: bt } = Object, b = globalThis, Z = b.trustedTypes, yt = Z ? Z.emptyScript : "", z = b.reactiveElementPolyfillSupport, P = (s, t) => s, I = { toAttribute(s, t) {
|
|
55
55
|
switch (t) {
|
|
56
56
|
case Boolean:
|
|
57
|
-
|
|
57
|
+
s = s ? yt : null;
|
|
58
58
|
break;
|
|
59
59
|
case Object:
|
|
60
60
|
case Array:
|
|
61
|
-
|
|
61
|
+
s = s == null ? s : JSON.stringify(s);
|
|
62
62
|
}
|
|
63
|
-
return
|
|
64
|
-
}, fromAttribute(
|
|
65
|
-
let e =
|
|
63
|
+
return s;
|
|
64
|
+
}, fromAttribute(s, t) {
|
|
65
|
+
let e = s;
|
|
66
66
|
switch (t) {
|
|
67
67
|
case Boolean:
|
|
68
|
-
e =
|
|
68
|
+
e = s !== null;
|
|
69
69
|
break;
|
|
70
70
|
case Number:
|
|
71
|
-
e =
|
|
71
|
+
e = s === null ? null : Number(s);
|
|
72
72
|
break;
|
|
73
73
|
case Object:
|
|
74
74
|
case Array:
|
|
75
75
|
try {
|
|
76
|
-
e = JSON.parse(
|
|
76
|
+
e = JSON.parse(s);
|
|
77
77
|
} catch {
|
|
78
78
|
e = null;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return e;
|
|
82
|
-
} }, J = (
|
|
83
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
84
|
-
class
|
|
82
|
+
} }, J = (s, t) => !mt(s, t), K = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J };
|
|
83
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
84
|
+
class w extends HTMLElement {
|
|
85
85
|
static addInitializer(t) {
|
|
86
86
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
87
87
|
}
|
|
@@ -90,67 +90,67 @@ class b extends HTMLElement {
|
|
|
90
90
|
}
|
|
91
91
|
static createProperty(t, e = K) {
|
|
92
92
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
93
|
-
const
|
|
94
|
-
|
|
93
|
+
const i = Symbol(), o = this.getPropertyDescriptor(t, i, e);
|
|
94
|
+
o !== void 0 && gt(this.prototype, t, o);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
static getPropertyDescriptor(t, e,
|
|
98
|
-
const { get:
|
|
97
|
+
static getPropertyDescriptor(t, e, i) {
|
|
98
|
+
const { get: o, set: r } = ft(this.prototype, t) ?? { get() {
|
|
99
99
|
return this[e];
|
|
100
100
|
}, set(n) {
|
|
101
101
|
this[e] = n;
|
|
102
102
|
} };
|
|
103
103
|
return { get() {
|
|
104
|
-
return
|
|
104
|
+
return o == null ? void 0 : o.call(this);
|
|
105
105
|
}, set(n) {
|
|
106
|
-
const l =
|
|
107
|
-
r.call(this, n), this.requestUpdate(t, l,
|
|
106
|
+
const l = o == null ? void 0 : o.call(this);
|
|
107
|
+
r.call(this, n), this.requestUpdate(t, l, i);
|
|
108
108
|
}, configurable: !0, enumerable: !0 };
|
|
109
109
|
}
|
|
110
110
|
static getPropertyOptions(t) {
|
|
111
111
|
return this.elementProperties.get(t) ?? K;
|
|
112
112
|
}
|
|
113
113
|
static _$Ei() {
|
|
114
|
-
if (this.hasOwnProperty(
|
|
114
|
+
if (this.hasOwnProperty(P("elementProperties")))
|
|
115
115
|
return;
|
|
116
|
-
const t =
|
|
116
|
+
const t = bt(this);
|
|
117
117
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
118
118
|
}
|
|
119
119
|
static finalize() {
|
|
120
|
-
if (this.hasOwnProperty(
|
|
120
|
+
if (this.hasOwnProperty(P("finalized")))
|
|
121
121
|
return;
|
|
122
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
123
|
-
const e = this.properties,
|
|
124
|
-
for (const
|
|
125
|
-
this.createProperty(
|
|
122
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
123
|
+
const e = this.properties, i = [..._t(e), ...$t(e)];
|
|
124
|
+
for (const o of i)
|
|
125
|
+
this.createProperty(o, e[o]);
|
|
126
126
|
}
|
|
127
127
|
const t = this[Symbol.metadata];
|
|
128
128
|
if (t !== null) {
|
|
129
129
|
const e = litPropertyMetadata.get(t);
|
|
130
130
|
if (e !== void 0)
|
|
131
|
-
for (const [
|
|
132
|
-
this.elementProperties.set(
|
|
131
|
+
for (const [i, o] of e)
|
|
132
|
+
this.elementProperties.set(i, o);
|
|
133
133
|
}
|
|
134
134
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
135
|
-
for (const [e,
|
|
136
|
-
const
|
|
137
|
-
|
|
135
|
+
for (const [e, i] of this.elementProperties) {
|
|
136
|
+
const o = this._$Eu(e, i);
|
|
137
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
138
138
|
}
|
|
139
139
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
140
140
|
}
|
|
141
141
|
static finalizeStyles(t) {
|
|
142
142
|
const e = [];
|
|
143
143
|
if (Array.isArray(t)) {
|
|
144
|
-
const
|
|
145
|
-
for (const
|
|
146
|
-
e.unshift(
|
|
144
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
|
145
|
+
for (const o of i)
|
|
146
|
+
e.unshift(G(o));
|
|
147
147
|
} else
|
|
148
|
-
t !== void 0 && e.push(
|
|
148
|
+
t !== void 0 && e.push(G(t));
|
|
149
149
|
return e;
|
|
150
150
|
}
|
|
151
151
|
static _$Eu(t, e) {
|
|
152
|
-
const
|
|
153
|
-
return
|
|
152
|
+
const i = e.attribute;
|
|
153
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
154
154
|
}
|
|
155
155
|
constructor() {
|
|
156
156
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -169,8 +169,8 @@ class b extends HTMLElement {
|
|
|
169
169
|
}
|
|
170
170
|
_$E_() {
|
|
171
171
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
172
|
-
for (const
|
|
173
|
-
this.hasOwnProperty(
|
|
172
|
+
for (const i of e.keys())
|
|
173
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
174
174
|
t.size > 0 && (this._$Ep = t);
|
|
175
175
|
}
|
|
176
176
|
createRenderRoot() {
|
|
@@ -180,8 +180,8 @@ class b extends HTMLElement {
|
|
|
180
180
|
connectedCallback() {
|
|
181
181
|
var t;
|
|
182
182
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
183
|
-
var
|
|
184
|
-
return (
|
|
183
|
+
var i;
|
|
184
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
enableUpdating(t) {
|
|
@@ -189,39 +189,39 @@ class b extends HTMLElement {
|
|
|
189
189
|
disconnectedCallback() {
|
|
190
190
|
var t;
|
|
191
191
|
(t = this._$EO) == null || t.forEach((e) => {
|
|
192
|
-
var
|
|
193
|
-
return (
|
|
192
|
+
var i;
|
|
193
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
attributeChangedCallback(t, e,
|
|
197
|
-
this._$AK(t,
|
|
196
|
+
attributeChangedCallback(t, e, i) {
|
|
197
|
+
this._$AK(t, i);
|
|
198
198
|
}
|
|
199
199
|
_$EC(t, e) {
|
|
200
200
|
var r;
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
const n = (((r =
|
|
204
|
-
this._$Em = t, n == null ? this.removeAttribute(
|
|
201
|
+
const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
|
|
202
|
+
if (o !== void 0 && i.reflect === !0) {
|
|
203
|
+
const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : I).toAttribute(e, i.type);
|
|
204
|
+
this._$Em = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
_$AK(t, e) {
|
|
208
208
|
var r;
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const n =
|
|
212
|
-
this._$Em =
|
|
209
|
+
const i = this.constructor, o = i._$Eh.get(t);
|
|
210
|
+
if (o !== void 0 && this._$Em !== o) {
|
|
211
|
+
const n = i.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : I;
|
|
212
|
+
this._$Em = o, this[o] = l.fromAttribute(e, n.type), this._$Em = null;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
requestUpdate(t, e,
|
|
215
|
+
requestUpdate(t, e, i) {
|
|
216
216
|
if (t !== void 0) {
|
|
217
|
-
if (
|
|
217
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? J)(this[t], e))
|
|
218
218
|
return;
|
|
219
|
-
this.P(t, e,
|
|
219
|
+
this.P(t, e, i);
|
|
220
220
|
}
|
|
221
221
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
222
222
|
}
|
|
223
|
-
P(t, e,
|
|
224
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
|
223
|
+
P(t, e, i) {
|
|
224
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
225
225
|
}
|
|
226
226
|
async _$ET() {
|
|
227
227
|
this.isUpdatePending = !0;
|
|
@@ -237,7 +237,7 @@ class b extends HTMLElement {
|
|
|
237
237
|
return this.performUpdate();
|
|
238
238
|
}
|
|
239
239
|
performUpdate() {
|
|
240
|
-
var
|
|
240
|
+
var i;
|
|
241
241
|
if (!this.isUpdatePending)
|
|
242
242
|
return;
|
|
243
243
|
if (!this.hasUpdated) {
|
|
@@ -246,20 +246,20 @@ class b extends HTMLElement {
|
|
|
246
246
|
this[r] = n;
|
|
247
247
|
this._$Ep = void 0;
|
|
248
248
|
}
|
|
249
|
-
const
|
|
250
|
-
if (
|
|
251
|
-
for (const [r, n] of
|
|
249
|
+
const o = this.constructor.elementProperties;
|
|
250
|
+
if (o.size > 0)
|
|
251
|
+
for (const [r, n] of o)
|
|
252
252
|
n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
|
|
253
253
|
}
|
|
254
254
|
let t = !1;
|
|
255
255
|
const e = this._$AL;
|
|
256
256
|
try {
|
|
257
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
|
257
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((o) => {
|
|
258
258
|
var r;
|
|
259
|
-
return (r =
|
|
259
|
+
return (r = o.hostUpdate) == null ? void 0 : r.call(o);
|
|
260
260
|
}), this.update(e)) : this._$EU();
|
|
261
|
-
} catch (
|
|
262
|
-
throw t = !1, this._$EU(),
|
|
261
|
+
} catch (o) {
|
|
262
|
+
throw t = !1, this._$EU(), o;
|
|
263
263
|
}
|
|
264
264
|
t && this._$AE(e);
|
|
265
265
|
}
|
|
@@ -267,9 +267,9 @@ class b extends HTMLElement {
|
|
|
267
267
|
}
|
|
268
268
|
_$AE(t) {
|
|
269
269
|
var e;
|
|
270
|
-
(e = this._$EO) == null || e.forEach((
|
|
271
|
-
var
|
|
272
|
-
return (
|
|
270
|
+
(e = this._$EO) == null || e.forEach((i) => {
|
|
271
|
+
var o;
|
|
272
|
+
return (o = i.hostUpdated) == null ? void 0 : o.call(i);
|
|
273
273
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
274
274
|
}
|
|
275
275
|
_$EU() {
|
|
@@ -292,86 +292,86 @@ class b extends HTMLElement {
|
|
|
292
292
|
firstUpdated(t) {
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
|
|
295
|
+
w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[P("elementProperties")] = /* @__PURE__ */ new Map(), w[P("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: w }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.0.4");
|
|
296
296
|
/**
|
|
297
297
|
* @license
|
|
298
298
|
* Copyright 2017 Google LLC
|
|
299
299
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
300
300
|
*/
|
|
301
|
-
const
|
|
302
|
-
\f\r]`,
|
|
303
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
304
|
-
function ht(
|
|
305
|
-
if (!Array.isArray(
|
|
301
|
+
const L = globalThis, B = L.trustedTypes, Y = B ? B.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, rt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, at = "?" + $, vt = `<${at}>`, A = document, U = () => A.createComment(""), M = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, xt = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", D = `[
|
|
302
|
+
\f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, v = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
303
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, pt = /^(?:script|style|textarea|title)$/i, At = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), u = At(1), S = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), x = A.createTreeWalker(A, 129);
|
|
304
|
+
function ht(s, t) {
|
|
305
|
+
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
|
306
306
|
throw Error("invalid template strings array");
|
|
307
307
|
return Y !== void 0 ? Y.createHTML(t) : t;
|
|
308
308
|
}
|
|
309
|
-
const
|
|
310
|
-
const e =
|
|
311
|
-
let
|
|
309
|
+
const wt = (s, t) => {
|
|
310
|
+
const e = s.length - 1, i = [];
|
|
311
|
+
let o, r = t === 2 ? "<svg>" : "", n = C;
|
|
312
312
|
for (let l = 0; l < e; l++) {
|
|
313
|
-
const a =
|
|
314
|
-
let
|
|
315
|
-
for (;
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
r += n ===
|
|
319
|
-
}
|
|
320
|
-
return [ht(
|
|
313
|
+
const a = s[l];
|
|
314
|
+
let h, c, p = -1, f = 0;
|
|
315
|
+
for (; f < a.length && (n.lastIndex = f, c = n.exec(a), c !== null); )
|
|
316
|
+
f = n.lastIndex, n === C ? c[1] === "!--" ? n = Q : c[1] !== void 0 ? n = X : c[2] !== void 0 ? (pt.test(c[2]) && (o = RegExp("</" + c[2], "g")), n = v) : c[3] !== void 0 && (n = v) : n === v ? c[0] === ">" ? (n = o ?? C, p = -1) : c[1] === void 0 ? p = -2 : (p = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? v : c[3] === '"' ? et : tt) : n === et || n === tt ? n = v : n === Q || n === X ? n = C : (n = v, o = void 0);
|
|
317
|
+
const _ = n === v && s[l + 1].startsWith("/>") ? " " : "";
|
|
318
|
+
r += n === C ? a + vt : p >= 0 ? (i.push(h), a.slice(0, p) + rt + a.slice(p) + $ + _) : a + $ + (p === -2 ? l : _);
|
|
319
|
+
}
|
|
320
|
+
return [ht(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
321
321
|
};
|
|
322
|
-
class
|
|
323
|
-
constructor({ strings: t, _$litType$: e },
|
|
324
|
-
let
|
|
322
|
+
class R {
|
|
323
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
|
324
|
+
let o;
|
|
325
325
|
this.parts = [];
|
|
326
326
|
let r = 0, n = 0;
|
|
327
|
-
const l = t.length - 1, a = this.parts, [
|
|
328
|
-
if (this.el =
|
|
329
|
-
const
|
|
330
|
-
|
|
327
|
+
const l = t.length - 1, a = this.parts, [h, c] = wt(t, e);
|
|
328
|
+
if (this.el = R.createElement(h, i), x.currentNode = this.el.content, e === 2) {
|
|
329
|
+
const p = this.el.content.firstChild;
|
|
330
|
+
p.replaceWith(...p.childNodes);
|
|
331
331
|
}
|
|
332
|
-
for (; (
|
|
333
|
-
if (
|
|
334
|
-
if (
|
|
335
|
-
for (const
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
338
|
-
a.push({ type: 1, index: r, name:
|
|
332
|
+
for (; (o = x.nextNode()) !== null && a.length < l; ) {
|
|
333
|
+
if (o.nodeType === 1) {
|
|
334
|
+
if (o.hasAttributes())
|
|
335
|
+
for (const p of o.getAttributeNames())
|
|
336
|
+
if (p.endsWith(rt)) {
|
|
337
|
+
const f = c[n++], _ = o.getAttribute(p).split($), O = /([.?@])?(.*)/.exec(f);
|
|
338
|
+
a.push({ type: 1, index: r, name: O[2], strings: _, ctor: O[1] === "." ? Et : O[1] === "?" ? Ct : O[1] === "@" ? Pt : H }), o.removeAttribute(p);
|
|
339
339
|
} else
|
|
340
|
-
|
|
341
|
-
if (
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
344
|
-
|
|
345
|
-
for (let
|
|
346
|
-
|
|
347
|
-
|
|
340
|
+
p.startsWith($) && (a.push({ type: 6, index: r }), o.removeAttribute(p));
|
|
341
|
+
if (pt.test(o.tagName)) {
|
|
342
|
+
const p = o.textContent.split($), f = p.length - 1;
|
|
343
|
+
if (f > 0) {
|
|
344
|
+
o.textContent = B ? B.emptyScript : "";
|
|
345
|
+
for (let _ = 0; _ < f; _++)
|
|
346
|
+
o.append(p[_], U()), x.nextNode(), a.push({ type: 2, index: ++r });
|
|
347
|
+
o.append(p[f], U());
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
} else if (
|
|
351
|
-
if (
|
|
350
|
+
} else if (o.nodeType === 8)
|
|
351
|
+
if (o.data === at)
|
|
352
352
|
a.push({ type: 2, index: r });
|
|
353
353
|
else {
|
|
354
|
-
let
|
|
355
|
-
for (; (
|
|
356
|
-
a.push({ type: 7, index: r }),
|
|
354
|
+
let p = -1;
|
|
355
|
+
for (; (p = o.data.indexOf($, p + 1)) !== -1; )
|
|
356
|
+
a.push({ type: 7, index: r }), p += $.length - 1;
|
|
357
357
|
}
|
|
358
358
|
r++;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
static createElement(t, e) {
|
|
362
|
-
const
|
|
363
|
-
return
|
|
362
|
+
const i = A.createElement("template");
|
|
363
|
+
return i.innerHTML = t, i;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function E(s, t, e = s, i) {
|
|
367
367
|
var n, l;
|
|
368
|
-
if (t ===
|
|
368
|
+
if (t === S)
|
|
369
369
|
return t;
|
|
370
|
-
let
|
|
371
|
-
const r =
|
|
372
|
-
return (
|
|
370
|
+
let o = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
|
|
371
|
+
const r = M(t) ? void 0 : t._$litDirective$;
|
|
372
|
+
return (o == null ? void 0 : o.constructor) !== r && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), r === void 0 ? o = void 0 : (o = new r(s), o._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = o : e._$Cl = o), o !== void 0 && (t = E(s, o._$AS(s, t.values), o, i)), t;
|
|
373
373
|
}
|
|
374
|
-
class
|
|
374
|
+
class St {
|
|
375
375
|
constructor(t, e) {
|
|
376
376
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
377
377
|
}
|
|
@@ -382,31 +382,31 @@ class Et {
|
|
|
382
382
|
return this._$AM._$AU;
|
|
383
383
|
}
|
|
384
384
|
u(t) {
|
|
385
|
-
const { el: { content: e }, parts:
|
|
386
|
-
|
|
387
|
-
let r =
|
|
385
|
+
const { el: { content: e }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
|
|
386
|
+
x.currentNode = o;
|
|
387
|
+
let r = x.nextNode(), n = 0, l = 0, a = i[0];
|
|
388
388
|
for (; a !== void 0; ) {
|
|
389
389
|
if (n === a.index) {
|
|
390
|
-
let
|
|
391
|
-
a.type === 2 ?
|
|
390
|
+
let h;
|
|
391
|
+
a.type === 2 ? h = new k(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new Lt(r, this, t)), this._$AV.push(h), a = i[++l];
|
|
392
392
|
}
|
|
393
|
-
n !== (a == null ? void 0 : a.index) && (r =
|
|
393
|
+
n !== (a == null ? void 0 : a.index) && (r = x.nextNode(), n++);
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return x.currentNode = A, o;
|
|
396
396
|
}
|
|
397
397
|
p(t) {
|
|
398
398
|
let e = 0;
|
|
399
|
-
for (const
|
|
400
|
-
|
|
399
|
+
for (const i of this._$AV)
|
|
400
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class k {
|
|
404
404
|
get _$AU() {
|
|
405
405
|
var t;
|
|
406
406
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
407
407
|
}
|
|
408
|
-
constructor(t, e,
|
|
409
|
-
this.type = 2, this._$AH =
|
|
408
|
+
constructor(t, e, i, o) {
|
|
409
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
|
|
410
410
|
}
|
|
411
411
|
get parentNode() {
|
|
412
412
|
let t = this._$AA.parentNode;
|
|
@@ -420,7 +420,7 @@ class O {
|
|
|
420
420
|
return this._$AB;
|
|
421
421
|
}
|
|
422
422
|
_$AI(t, e = this) {
|
|
423
|
-
t =
|
|
423
|
+
t = E(this, t, e), M(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t);
|
|
424
424
|
}
|
|
425
425
|
S(t) {
|
|
426
426
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -429,35 +429,35 @@ class O {
|
|
|
429
429
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
|
430
430
|
}
|
|
431
431
|
_(t) {
|
|
432
|
-
this._$AH !==
|
|
432
|
+
this._$AH !== d && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
|
|
433
433
|
}
|
|
434
434
|
$(t) {
|
|
435
435
|
var r;
|
|
436
|
-
const { values: e, _$litType$:
|
|
437
|
-
if (((r = this._$AH) == null ? void 0 : r._$AD) ===
|
|
436
|
+
const { values: e, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = R.createElement(ht(i.h, i.h[0]), this.options)), i);
|
|
437
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === o)
|
|
438
438
|
this._$AH.p(e);
|
|
439
439
|
else {
|
|
440
|
-
const n = new
|
|
440
|
+
const n = new St(o, this), l = n.u(this.options);
|
|
441
441
|
n.p(e), this.T(l), this._$AH = n;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
_$AC(t) {
|
|
445
|
-
let e =
|
|
446
|
-
return e === void 0 &&
|
|
445
|
+
let e = st.get(t.strings);
|
|
446
|
+
return e === void 0 && st.set(t.strings, e = new R(t)), e;
|
|
447
447
|
}
|
|
448
448
|
k(t) {
|
|
449
|
-
|
|
449
|
+
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
450
450
|
const e = this._$AH;
|
|
451
|
-
let
|
|
451
|
+
let i, o = 0;
|
|
452
452
|
for (const r of t)
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
o === e.length ? e.push(i = new k(this.S(U()), this.S(U()), this, this.options)) : i = e[o], i._$AI(r), o++;
|
|
454
|
+
o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
|
|
455
455
|
}
|
|
456
456
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
457
|
-
var
|
|
458
|
-
for ((
|
|
459
|
-
const
|
|
460
|
-
t.remove(), t =
|
|
457
|
+
var i;
|
|
458
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
459
|
+
const o = t.nextSibling;
|
|
460
|
+
t.remove(), t = o;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
setConnected(t) {
|
|
@@ -472,32 +472,32 @@ class H {
|
|
|
472
472
|
get _$AU() {
|
|
473
473
|
return this._$AM._$AU;
|
|
474
474
|
}
|
|
475
|
-
constructor(t, e,
|
|
476
|
-
this.type = 1, this._$AH =
|
|
475
|
+
constructor(t, e, i, o, r) {
|
|
476
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
|
|
477
477
|
}
|
|
478
|
-
_$AI(t, e = this,
|
|
478
|
+
_$AI(t, e = this, i, o) {
|
|
479
479
|
const r = this.strings;
|
|
480
480
|
let n = !1;
|
|
481
481
|
if (r === void 0)
|
|
482
|
-
t =
|
|
482
|
+
t = E(this, t, e, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
|
|
483
483
|
else {
|
|
484
484
|
const l = t;
|
|
485
|
-
let a,
|
|
485
|
+
let a, h;
|
|
486
486
|
for (t = r[0], a = 0; a < r.length - 1; a++)
|
|
487
|
-
|
|
487
|
+
h = E(this, l[i + a], e, a), h === S && (h = this._$AH[a]), n || (n = !M(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
|
|
488
488
|
}
|
|
489
|
-
n && !
|
|
489
|
+
n && !o && this.j(t);
|
|
490
490
|
}
|
|
491
491
|
j(t) {
|
|
492
|
-
t ===
|
|
492
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
class
|
|
495
|
+
class Et extends H {
|
|
496
496
|
constructor() {
|
|
497
497
|
super(...arguments), this.type = 3;
|
|
498
498
|
}
|
|
499
499
|
j(t) {
|
|
500
|
-
this.element[this.name] = t ===
|
|
500
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
class Ct extends H {
|
|
@@ -505,52 +505,52 @@ class Ct extends H {
|
|
|
505
505
|
super(...arguments), this.type = 4;
|
|
506
506
|
}
|
|
507
507
|
j(t) {
|
|
508
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
508
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
class Pt extends H {
|
|
512
|
-
constructor(t, e,
|
|
513
|
-
super(t, e,
|
|
512
|
+
constructor(t, e, i, o, r) {
|
|
513
|
+
super(t, e, i, o, r), this.type = 5;
|
|
514
514
|
}
|
|
515
515
|
_$AI(t, e = this) {
|
|
516
|
-
if ((t =
|
|
516
|
+
if ((t = E(this, t, e, 0) ?? d) === S)
|
|
517
517
|
return;
|
|
518
|
-
const
|
|
519
|
-
|
|
518
|
+
const i = this._$AH, o = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== d && (i === d || o);
|
|
519
|
+
o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
520
520
|
}
|
|
521
521
|
handleEvent(t) {
|
|
522
522
|
var e;
|
|
523
523
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
class
|
|
527
|
-
constructor(t, e,
|
|
528
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
526
|
+
class Lt {
|
|
527
|
+
constructor(t, e, i) {
|
|
528
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
529
529
|
}
|
|
530
530
|
get _$AU() {
|
|
531
531
|
return this._$AM._$AU;
|
|
532
532
|
}
|
|
533
533
|
_$AI(t) {
|
|
534
|
-
|
|
534
|
+
E(this, t);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
const j =
|
|
538
|
-
j == null || j(
|
|
539
|
-
const Tt = (
|
|
540
|
-
const
|
|
541
|
-
let
|
|
542
|
-
if (
|
|
537
|
+
const j = L.litHtmlPolyfillSupport;
|
|
538
|
+
j == null || j(R, k), (L.litHtmlVersions ?? (L.litHtmlVersions = [])).push("3.1.2");
|
|
539
|
+
const Tt = (s, t, e) => {
|
|
540
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
541
|
+
let o = i._$litPart$;
|
|
542
|
+
if (o === void 0) {
|
|
543
543
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
544
|
-
|
|
544
|
+
i._$litPart$ = o = new k(t.insertBefore(U(), r), r, void 0, e ?? {});
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return o._$AI(s), o;
|
|
547
547
|
};
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
class
|
|
553
|
+
class T extends w {
|
|
554
554
|
constructor() {
|
|
555
555
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
556
556
|
}
|
|
@@ -572,112 +572,128 @@ class C extends b {
|
|
|
572
572
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
573
573
|
}
|
|
574
574
|
render() {
|
|
575
|
-
return
|
|
575
|
+
return S;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
var
|
|
579
|
-
|
|
580
|
-
const
|
|
581
|
-
|
|
578
|
+
var ot;
|
|
579
|
+
T._$litElement$ = !0, T.finalized = !0, (ot = globalThis.litElementHydrateSupport) == null || ot.call(globalThis, { LitElement: T });
|
|
580
|
+
const q = globalThis.litElementPolyfillSupport;
|
|
581
|
+
q == null || q({ LitElement: T });
|
|
582
582
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
|
583
583
|
/**
|
|
584
584
|
* @license
|
|
585
585
|
* Copyright 2017 Google LLC
|
|
586
586
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
587
587
|
*/
|
|
588
|
-
const
|
|
588
|
+
const Ut = (s) => (t, e) => {
|
|
589
589
|
e !== void 0 ? e.addInitializer(() => {
|
|
590
|
-
customElements.define(
|
|
591
|
-
}) : customElements.define(
|
|
590
|
+
customElements.define(s, t);
|
|
591
|
+
}) : customElements.define(s, t);
|
|
592
592
|
};
|
|
593
593
|
/**
|
|
594
594
|
* @license
|
|
595
595
|
* Copyright 2017 Google LLC
|
|
596
596
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
597
597
|
*/
|
|
598
|
-
const Mt = { attribute: !0, type: String, converter:
|
|
599
|
-
const { kind:
|
|
600
|
-
let r = globalThis.litPropertyMetadata.get(
|
|
601
|
-
if (r === void 0 && globalThis.litPropertyMetadata.set(
|
|
598
|
+
const Mt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J }, Rt = (s = Mt, t, e) => {
|
|
599
|
+
const { kind: i, metadata: o } = e;
|
|
600
|
+
let r = globalThis.litPropertyMetadata.get(o);
|
|
601
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), r.set(e.name, s), i === "accessor") {
|
|
602
602
|
const { name: n } = e;
|
|
603
603
|
return { set(l) {
|
|
604
604
|
const a = t.get.call(this);
|
|
605
|
-
t.set.call(this, l), this.requestUpdate(n, a,
|
|
605
|
+
t.set.call(this, l), this.requestUpdate(n, a, s);
|
|
606
606
|
}, init(l) {
|
|
607
|
-
return l !== void 0 && this.P(n, void 0,
|
|
607
|
+
return l !== void 0 && this.P(n, void 0, s), l;
|
|
608
608
|
} };
|
|
609
609
|
}
|
|
610
|
-
if (
|
|
610
|
+
if (i === "setter") {
|
|
611
611
|
const { name: n } = e;
|
|
612
612
|
return function(l) {
|
|
613
613
|
const a = this[n];
|
|
614
|
-
t.call(this, l), this.requestUpdate(n, a,
|
|
614
|
+
t.call(this, l), this.requestUpdate(n, a, s);
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
throw Error("Unsupported decorator location: " +
|
|
617
|
+
throw Error("Unsupported decorator location: " + i);
|
|
618
618
|
};
|
|
619
|
-
function
|
|
620
|
-
return (t, e) => typeof e == "object" ?
|
|
621
|
-
const n =
|
|
622
|
-
return
|
|
623
|
-
})(
|
|
619
|
+
function y(s) {
|
|
620
|
+
return (t, e) => typeof e == "object" ? Rt(s, t, e) : ((i, o, r) => {
|
|
621
|
+
const n = o.hasOwnProperty(r);
|
|
622
|
+
return o.constructor.createProperty(r, n ? { ...i, wrapped: !0 } : i), n ? Object.getOwnPropertyDescriptor(o, r) : void 0;
|
|
623
|
+
})(s, t, e);
|
|
624
624
|
}
|
|
625
625
|
/**
|
|
626
626
|
* @license
|
|
627
627
|
* Copyright 2017 Google LLC
|
|
628
628
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
629
629
|
*/
|
|
630
|
-
|
|
630
|
+
function kt(s) {
|
|
631
|
+
return y({ ...s, state: !0, attribute: !1 });
|
|
632
|
+
}
|
|
631
633
|
/**
|
|
632
634
|
* @license
|
|
633
635
|
* Copyright 2017 Google LLC
|
|
634
636
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
635
637
|
*/
|
|
636
|
-
|
|
637
|
-
|
|
638
|
+
const it = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
|
|
639
|
+
/**
|
|
640
|
+
* @license
|
|
641
|
+
* Copyright 2017 Google LLC
|
|
642
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
643
|
+
*/
|
|
644
|
+
function Ot(s, t) {
|
|
645
|
+
return (e, i, o) => {
|
|
638
646
|
const r = (n) => {
|
|
639
647
|
var l;
|
|
640
|
-
return ((l = n.renderRoot) == null ? void 0 : l.querySelector(
|
|
648
|
+
return ((l = n.renderRoot) == null ? void 0 : l.querySelector(s)) ?? null;
|
|
641
649
|
};
|
|
642
650
|
if (t) {
|
|
643
|
-
const { get: n, set: l } = typeof
|
|
651
|
+
const { get: n, set: l } = typeof i == "object" ? e : o ?? (() => {
|
|
644
652
|
const a = Symbol();
|
|
645
653
|
return { get() {
|
|
646
654
|
return this[a];
|
|
647
|
-
}, set(
|
|
648
|
-
this[a] =
|
|
655
|
+
}, set(h) {
|
|
656
|
+
this[a] = h;
|
|
649
657
|
} };
|
|
650
658
|
})();
|
|
651
|
-
return
|
|
659
|
+
return it(e, i, { get() {
|
|
652
660
|
let a = n.call(this);
|
|
653
661
|
return a === void 0 && (a = r(this), (a !== null || this.hasUpdated) && l.call(this, a)), a;
|
|
654
662
|
} });
|
|
655
663
|
}
|
|
656
|
-
return
|
|
664
|
+
return it(e, i, { get() {
|
|
657
665
|
return r(this);
|
|
658
666
|
} });
|
|
659
667
|
};
|
|
660
668
|
}
|
|
661
|
-
class
|
|
669
|
+
class Nt {
|
|
662
670
|
get extId() {
|
|
663
671
|
return this.attributes["ext-id"];
|
|
664
672
|
}
|
|
665
673
|
}
|
|
666
|
-
var
|
|
667
|
-
for (var
|
|
668
|
-
(n =
|
|
669
|
-
return
|
|
674
|
+
var It = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, g = (s, t, e, i) => {
|
|
675
|
+
for (var o = i > 1 ? void 0 : i ? Bt(t, e) : t, r = s.length - 1, n; r >= 0; r--)
|
|
676
|
+
(n = s[r]) && (o = (i ? n(t, e, o) : n(o)) || o);
|
|
677
|
+
return i && o && It(t, e, o), o;
|
|
670
678
|
};
|
|
671
|
-
let
|
|
679
|
+
let m = class extends T {
|
|
672
680
|
constructor() {
|
|
673
|
-
var o,
|
|
674
|
-
super(...arguments), this.getByAddress = (t = (
|
|
681
|
+
var s, t, e, i, o, r;
|
|
682
|
+
super(...arguments), this.selectedRadius = 25, this.radiusOption = [10, 25, 50], this.getByAddress = (t = (s = window.miam) == null ? void 0 : s.pos) == null ? void 0 : t.getByAddress, this.getByCoordinates = (i = (e = window.miam) == null ? void 0 : e.pos) == null ? void 0 : i.getByCoordinates, this.getAffiliateSuppliers = (r = (o = window.miam) == null ? void 0 : o.supplier) == null ? void 0 : r.getAffiliateSuppliers, this._posList = [], this._markers = [], this._searchingPos = !1, this._searchSubmitted = !1, this._previousSearchMethod = () => {
|
|
683
|
+
}, this._suppliers = [], this._selectedSuppliers = [], this._showPosList = !1;
|
|
684
|
+
}
|
|
685
|
+
set geolocationCoordinates(s) {
|
|
686
|
+
var t, e;
|
|
687
|
+
this._geolocationCoordinates = s, (t = s == null ? void 0 : s.coords) != null && t.latitude && ((e = s == null ? void 0 : s.coords) != null && e.longitude) && this.getPosByCoordinates();
|
|
675
688
|
}
|
|
676
|
-
|
|
677
|
-
return
|
|
689
|
+
get geolocationCoordinates() {
|
|
690
|
+
return this._geolocationCoordinates;
|
|
691
|
+
}
|
|
692
|
+
_nameOfStore(s) {
|
|
693
|
+
return `${s.supplier.attributes.name} - ${s.attributes.name}`;
|
|
678
694
|
}
|
|
679
695
|
connectedCallback() {
|
|
680
|
-
super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet();
|
|
696
|
+
super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet(), this.fetchSuppliers();
|
|
681
697
|
}
|
|
682
698
|
disconnectedCallback() {
|
|
683
699
|
super.disconnectedCallback(), this._leafletCss.remove(), this._miamDs.remove(), this._leafletJs.remove();
|
|
@@ -687,82 +703,161 @@ let v = class extends C {
|
|
|
687
703
|
return this.posSelectionTemplate();
|
|
688
704
|
}
|
|
689
705
|
// Executes after rendering
|
|
690
|
-
|
|
691
|
-
this.loadMap();
|
|
706
|
+
firstUpdated() {
|
|
707
|
+
this.loadMap(), this.geolocationTimeout(), this.listenFormSubmit();
|
|
692
708
|
}
|
|
693
709
|
posSelectionTemplate() {
|
|
694
|
-
return
|
|
710
|
+
return u`
|
|
695
711
|
<div class="wrapper miam-ds-body">
|
|
696
712
|
<div class="pos-selection">
|
|
697
713
|
<div class="title">
|
|
698
714
|
<button @click=${() => this.dispatchShow(!1)}><</button>
|
|
699
715
|
<span>Sélectionner un magasin</span>
|
|
700
716
|
</div>
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
717
|
+
<form id="store-locator-form">
|
|
718
|
+
<div class="address-input-container">
|
|
719
|
+
${this.geolocButtonTemplate()}
|
|
720
|
+
<input required class="address-input" type="text" name="address" placeholder="Votre code postal ou ville">
|
|
721
|
+
<button type="submit" class="miam-ds-button primary search-address-button">OK</button>
|
|
722
|
+
</div>
|
|
723
|
+
${this.selectRadiusTemplate()}
|
|
724
|
+
${this.selectSupplierTemplate()}
|
|
725
|
+
</form>
|
|
726
|
+
${this.posListTemplate()}
|
|
727
|
+
${this._posList.length > 0 ? u`
|
|
728
|
+
<div id="mobile-buttons-wrapper" class="mobile-buttons-wrapper__see-list">
|
|
729
|
+
<button @click=${() => this.togglePosList(this._showPosList)} class="miam-ds-button primary hide-pos-button">
|
|
730
|
+
${this.getButtonLabel()}
|
|
731
|
+
</button>
|
|
732
|
+
</div>` : ""}
|
|
710
733
|
</div>
|
|
734
|
+
</div>
|
|
711
735
|
${this.posMapTemplate()}
|
|
712
736
|
</div>
|
|
737
|
+
`;
|
|
738
|
+
}
|
|
739
|
+
geolocButtonTemplate() {
|
|
740
|
+
var t, e, i, o;
|
|
741
|
+
let s;
|
|
742
|
+
if (this.geolocationCoordinates === void 0)
|
|
743
|
+
s = u`<div class="miam-ds-loader"></div>`;
|
|
744
|
+
else if ((e = (t = this.geolocationCoordinates) == null ? void 0 : t.coords) != null && e.longitude && ((o = (i = this.geolocationCoordinates) == null ? void 0 : i.coords) != null && o.latitude))
|
|
745
|
+
s = u`<img title="Votre position" class="geolocation-icon" src="https://storage.googleapis.com/assets.miam.tech/generic/icons/locate-primary.svg" alt="Geolocaliser"/>`;
|
|
746
|
+
else
|
|
747
|
+
return u``;
|
|
748
|
+
return u`
|
|
749
|
+
<button type="button" ?disabled=${this.geolocationCoordinates === void 0} class="miam-ds-button square ghost locate-button" @click=${this.setGeolocation}>
|
|
750
|
+
${s}
|
|
751
|
+
</button>
|
|
713
752
|
`;
|
|
714
753
|
}
|
|
754
|
+
selectRadiusTemplate() {
|
|
755
|
+
return u`
|
|
756
|
+
<div class="select-radius miam-ds-dropdown">
|
|
757
|
+
<select @change=${this.radiusChanged}>
|
|
758
|
+
${this.radiusOption.map((s) => u`<option ?selected=${s === this.selectedRadius} value=${s}>${s} km</option>`)}
|
|
759
|
+
</select>
|
|
760
|
+
</div>`;
|
|
761
|
+
}
|
|
762
|
+
radiusChanged(s) {
|
|
763
|
+
this.selectedRadius = parseInt(s.target.value), this._showPosList = !0, this._previousSearchMethod(!0);
|
|
764
|
+
}
|
|
715
765
|
posMapTemplate() {
|
|
716
|
-
return
|
|
766
|
+
return u`
|
|
717
767
|
<div id="map"></div>
|
|
718
768
|
`;
|
|
719
769
|
}
|
|
770
|
+
selectSupplierTemplate() {
|
|
771
|
+
return u`
|
|
772
|
+
<div class="select-supplier miam-ds-dropdown">
|
|
773
|
+
<select @change=${this.supplierSelected}>
|
|
774
|
+
<option ?selected=${this._selectedSuppliers.length < 1} value="${null}">Toutes les enseignes</option>
|
|
775
|
+
${this._suppliers.map((s) => u`
|
|
776
|
+
<option ?selected=${s === this._selectedSuppliers[0]} value=${s.id}>
|
|
777
|
+
${s.name}
|
|
778
|
+
</option>`)}
|
|
779
|
+
</select>
|
|
780
|
+
</div>`;
|
|
781
|
+
}
|
|
782
|
+
supplierSelected(s) {
|
|
783
|
+
s.target.value ? this._selectedSuppliers[0] = s.target.value : this._selectedSuppliers = [], this._previousSearchMethod(!0);
|
|
784
|
+
}
|
|
720
785
|
posListTemplate() {
|
|
721
|
-
if (
|
|
722
|
-
return
|
|
723
|
-
|
|
724
|
-
|
|
786
|
+
if (this._searchingPos)
|
|
787
|
+
return u`
|
|
788
|
+
<div class="pos-loader">
|
|
789
|
+
<div class="miam-ds-loader"></div>
|
|
790
|
+
</div>
|
|
791
|
+
`;
|
|
792
|
+
if (this._posList.length < 1 && this._searchSubmitted)
|
|
793
|
+
return u`
|
|
794
|
+
<div class="no-pos-found">
|
|
795
|
+
<b>Aucun magasin trouvé à proximité.</b>
|
|
796
|
+
<span>Essayez une autre adresse.</span>
|
|
797
|
+
</div>
|
|
798
|
+
`;
|
|
799
|
+
if (this._posList.length < 1)
|
|
800
|
+
return;
|
|
801
|
+
const s = this.shadowRoot.querySelector(".pos-selection");
|
|
802
|
+
return s && s.classList.toggle("pos-selection__height", this._showPosList), u`
|
|
803
|
+
<div id="pos-list" class="${this._showPosList ? "pos-list__visible" : "pos-list__hidden"}">
|
|
804
|
+
${this._posList.map((t) => u`
|
|
725
805
|
<div class="pos-item">
|
|
726
806
|
<div class="top">
|
|
727
|
-
<img src="${
|
|
807
|
+
<img src="${t.supplier.attributes.logo}" alt="${t.supplier.attributes.name}"/>
|
|
728
808
|
<div class="top-right">
|
|
729
|
-
<div class="name">${this._nameOfStore(
|
|
730
|
-
<div class="address">${
|
|
809
|
+
<div class="name">${this._nameOfStore(t)}</div>
|
|
810
|
+
<div class="address">${t.attributes.address}</div>
|
|
731
811
|
</div>
|
|
732
812
|
</div>
|
|
733
813
|
<div class="bottom">
|
|
734
|
-
<button @click=${() => this.dispatchPos(
|
|
814
|
+
<button @click=${() => this.dispatchPos(t)} class="miam-ds-button primary select-pos-button">Sélectionner</button>
|
|
735
815
|
</div>
|
|
736
816
|
</div>
|
|
737
817
|
`)}
|
|
738
818
|
</div>
|
|
739
|
-
<div id="hide-pos-wrapper">
|
|
740
|
-
<button @click=${() => this.togglePosList(!1)} class="miam-ds-button primary hide-pos-button">Masquer</button>
|
|
741
|
-
</div>
|
|
742
819
|
`;
|
|
743
820
|
}
|
|
744
|
-
|
|
745
|
-
if (
|
|
821
|
+
getButtonLabel() {
|
|
822
|
+
if (this._showPosList)
|
|
823
|
+
return "Voir la carte";
|
|
824
|
+
const s = this._posList.length;
|
|
825
|
+
return s === 1 ? "Voir le magasin" : `Voir les ${s} magasins`;
|
|
826
|
+
}
|
|
827
|
+
setAddress(s = !1) {
|
|
828
|
+
if (!this._addressInput.value || this._addressInput.value.length < 3 || this._searchingPos || !s && this._prevAddress === this._addressInput.value + ", France")
|
|
746
829
|
return;
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
this.
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
830
|
+
const t = this.shadowRoot.getElementById("pos-list");
|
|
831
|
+
t && t.style.display === "none" && this.togglePosList(!0), this._previousSearchMethod = this.setAddress, this._prevAddress = this._addressInput.value + ", France", this._searchingPos = !0, this.requestUpdate(), this.getByAddress(this._prevAddress, this.selectedRadius, this._selectedSuppliers).subscribe((e) => {
|
|
832
|
+
this.setPosList(e), this.setNewLocation(), this._searchingPos = !1, this._searchSubmitted = !0, this.requestUpdate();
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
setGeolocation(s = !1) {
|
|
836
|
+
const t = this.shadowRoot.getElementById("pos-list");
|
|
837
|
+
t && t.style.display === "none" && this.togglePosList(!0), this._prevAddress = "", this._previousSearchMethod = this.setGeolocation, this.getPosByCoordinates();
|
|
838
|
+
}
|
|
839
|
+
getPosByCoordinates() {
|
|
840
|
+
this._searchingPos = !0, this.requestUpdate(), this.getByCoordinates(this.geolocationCoordinates.coords.latitude, this.geolocationCoordinates.coords.longitude, this.selectedRadius, this._selectedSuppliers).subscribe((s) => {
|
|
841
|
+
this._addressInput.value = "", this.setPosList(s), this._searchingPos = !1, this.setNewLocation(), this._searchSubmitted = !0, this.requestUpdate();
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
setPosList(s) {
|
|
845
|
+
this._posList = s.data.map((t) => {
|
|
846
|
+
const e = Object.assign(new Nt(), t);
|
|
847
|
+
return e.supplier = s.included.find((i) => i.id === e.relationships.supplier.data.id), e;
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
dispatchPos(s) {
|
|
756
851
|
const t = {
|
|
757
|
-
detail: { posId:
|
|
852
|
+
detail: { posId: s.id, posExtId: s.extId, supplierId: s.supplier.id, posName: this._nameOfStore(s) },
|
|
758
853
|
bubbles: !0,
|
|
759
854
|
composed: !0
|
|
760
855
|
};
|
|
761
856
|
console.debug("[MealzComponents] dispatchEvent posIdChange", t), this.dispatchEvent(new CustomEvent("posIdChange", t));
|
|
762
857
|
}
|
|
763
|
-
dispatchShow(
|
|
858
|
+
dispatchShow(s) {
|
|
764
859
|
const t = {
|
|
765
|
-
detail: { show:
|
|
860
|
+
detail: { show: s },
|
|
766
861
|
bubbles: !0,
|
|
767
862
|
composed: !0
|
|
768
863
|
};
|
|
@@ -772,31 +867,56 @@ let v = class extends C {
|
|
|
772
867
|
initLeaflet() {
|
|
773
868
|
this._leafletCss = document.createElement("link"), this._leafletCss.setAttribute("rel", "stylesheet"), this._leafletCss.setAttribute("href", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), this._leafletCss.setAttribute("integrity", "sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="), this._leafletCss.setAttribute("crossorigin", ""), this._leafletJs = document.createElement("script"), this._leafletJs.setAttribute("src", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"), this._leafletJs.setAttribute("integrity", "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="), this._leafletJs.setAttribute("crossorigin", ""), this._miamDs = document.createElement("link"), this._miamDs.setAttribute("rel", "stylesheet"), this._miamDs.setAttribute("href", "https://unpkg.com/miam-ds@1.2.4/miam-ds.min.css"), this.shadowRoot.appendChild(this._miamDs), this.shadowRoot.appendChild(this._leafletCss), document.head.appendChild(this._leafletJs);
|
|
774
869
|
}
|
|
870
|
+
waitForLeaflet(s) {
|
|
871
|
+
let i = 50;
|
|
872
|
+
console.debug("[Map] Checking for window.L");
|
|
873
|
+
const o = setInterval(() => {
|
|
874
|
+
window.L !== void 0 || i === 0 ? (clearInterval(o), window.L !== void 0 ? (console.debug("[Map] window.L is defined"), s(!0)) : (console.error("[Map] Failed to load Leaflet after", 50 * 100, "ms"), s(!1))) : i--;
|
|
875
|
+
}, 100);
|
|
876
|
+
}
|
|
877
|
+
initMap() {
|
|
878
|
+
this._map && (this._map.off(), this._map.remove()), this.setNewLocation(), window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
|
|
879
|
+
maxZoom: 19,
|
|
880
|
+
attribution: "Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."
|
|
881
|
+
}).addTo(this._map);
|
|
882
|
+
}
|
|
775
883
|
loadMap() {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
884
|
+
this.waitForLeaflet((s) => {
|
|
885
|
+
s && this.initMap();
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
fetchSuppliers() {
|
|
889
|
+
this.getAffiliateSuppliers().subscribe((s) => {
|
|
890
|
+
this._suppliers = s.map((t) => ({
|
|
891
|
+
id: t.id,
|
|
892
|
+
name: t.attributes.name
|
|
893
|
+
})), this.requestUpdate();
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
setNewLocation() {
|
|
897
|
+
var t;
|
|
898
|
+
const s = this.shadowRoot.getElementById("map");
|
|
899
|
+
s && (this._map ? (this._markers.forEach((e) => {
|
|
900
|
+
this._map.removeLayer(e);
|
|
901
|
+
}), this._markers = [], this._map.panTo(this.getCoordinates())) : this._map = (t = window.L) == null ? void 0 : t.map(s).setView(this.getCoordinates(), 13), this.addMarkers());
|
|
783
902
|
}
|
|
784
903
|
getCoordinates() {
|
|
785
904
|
return this._posList.length < 1 ? [48.866667, 2.333333] : [this._posList[0].attributes.latitude, this._posList[0].attributes.longitude];
|
|
786
905
|
}
|
|
787
906
|
addMarkers() {
|
|
788
|
-
this._posList.length > 0 && this._posList.forEach((
|
|
789
|
-
|
|
790
|
-
[
|
|
791
|
-
{ icon: this.buildIcon(
|
|
792
|
-
).addTo(this._map)
|
|
907
|
+
this._posList.length > 0 && this._posList.forEach((s, t) => {
|
|
908
|
+
this._markers.push(window.L.marker(
|
|
909
|
+
[s.attributes.latitude, s.attributes.longitude],
|
|
910
|
+
{ icon: this.buildIcon(s.supplier) }
|
|
911
|
+
).addTo(this._map));
|
|
912
|
+
let e = window.L.popup({
|
|
793
913
|
content: `
|
|
794
914
|
<div class="pos-item">
|
|
795
915
|
<div class="top">
|
|
796
|
-
<img class="pos-img" src="${
|
|
916
|
+
<img class="pos-img" src="${s.supplier.attributes.logo}" alt="${s.supplier.attributes.name}"/>
|
|
797
917
|
<div class="top-right">
|
|
798
|
-
<div class="name">${this._nameOfStore(
|
|
799
|
-
<div class="address">${
|
|
918
|
+
<div class="name">${this._nameOfStore(s)}</div>
|
|
919
|
+
<div class="address">${s.attributes.address}</div>
|
|
800
920
|
</div>
|
|
801
921
|
</div>
|
|
802
922
|
<div class="bottom">
|
|
@@ -805,16 +925,16 @@ let v = class extends C {
|
|
|
805
925
|
</div>
|
|
806
926
|
`
|
|
807
927
|
});
|
|
808
|
-
t.bindPopup(e).on("popupopen", (
|
|
809
|
-
|
|
810
|
-
this.dispatchPos(
|
|
928
|
+
this._markers[t].bindPopup(e).on("popupopen", (i) => {
|
|
929
|
+
i.target.getPopup().getElement().querySelector("#select").addEventListener("click", () => {
|
|
930
|
+
this.dispatchPos(s);
|
|
811
931
|
});
|
|
812
932
|
});
|
|
813
933
|
});
|
|
814
934
|
}
|
|
815
|
-
buildIcon(
|
|
935
|
+
buildIcon(s) {
|
|
816
936
|
return window.L.icon({
|
|
817
|
-
iconUrl:
|
|
937
|
+
iconUrl: s.attributes.logo || "https://cdn-icons-png.flaticon.com/512/3515/3515146.png",
|
|
818
938
|
shadowUrl: "https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",
|
|
819
939
|
iconSize: [32, 32],
|
|
820
940
|
// size of the icon
|
|
@@ -828,12 +948,22 @@ let v = class extends C {
|
|
|
828
948
|
// point from which the popup should open relative to the iconAnchor
|
|
829
949
|
});
|
|
830
950
|
}
|
|
831
|
-
togglePosList(
|
|
832
|
-
const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("
|
|
833
|
-
!t || !e || (
|
|
951
|
+
togglePosList(s) {
|
|
952
|
+
const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("mobile-buttons-wrapper");
|
|
953
|
+
!t || !e || (s ? (t.style.display = "none", e.className = "mobile-buttons-wrapper__see-list") : (t.style.display = "flex", e.className = "mobile-buttons-wrapper__see-map"), this._showPosList = !this._showPosList, this.requestUpdate());
|
|
954
|
+
}
|
|
955
|
+
geolocationTimeout() {
|
|
956
|
+
setTimeout(() => {
|
|
957
|
+
this.geolocationCoordinates === void 0 && (this.geolocationCoordinates = {});
|
|
958
|
+
}, 2e4);
|
|
959
|
+
}
|
|
960
|
+
listenFormSubmit() {
|
|
961
|
+
this.shadowRoot.getElementById("store-locator-form").addEventListener("submit", (t) => {
|
|
962
|
+
t.preventDefault(), this.setAddress();
|
|
963
|
+
});
|
|
834
964
|
}
|
|
835
965
|
};
|
|
836
|
-
|
|
966
|
+
m.styles = [
|
|
837
967
|
ct`
|
|
838
968
|
:host {
|
|
839
969
|
display: block;
|
|
@@ -850,12 +980,18 @@ v.styles = [
|
|
|
850
980
|
width: 320px;
|
|
851
981
|
padding: 40px var(--spacing-padding-16-px, 16px);
|
|
852
982
|
flex-direction: column;
|
|
853
|
-
align-items:
|
|
983
|
+
align-items: stretch;
|
|
854
984
|
gap: var(--spacing-padding-16-px, 16px);
|
|
855
985
|
flex-shrink: 0;
|
|
856
986
|
background: var(--miam-ds-color-neutral-50, #FFF);
|
|
857
987
|
box-shadow: 2px 0px 16px 0px rgba(0, 0, 0, 0.15);
|
|
858
988
|
z-index: 1;
|
|
989
|
+
|
|
990
|
+
form {
|
|
991
|
+
display: flex;
|
|
992
|
+
flex-direction: column;
|
|
993
|
+
gap: var(--spacing-padding-8-px, 8px);
|
|
994
|
+
}
|
|
859
995
|
}
|
|
860
996
|
|
|
861
997
|
.pos-selection .title {
|
|
@@ -872,10 +1008,42 @@ v.styles = [
|
|
|
872
1008
|
.pos-selection .address-input-container {
|
|
873
1009
|
display: flex;
|
|
874
1010
|
gap: 8px;
|
|
1011
|
+
height: 40px;
|
|
1012
|
+
position: relative;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.pos-selection .address-input-container {
|
|
1016
|
+
.address-input {
|
|
1017
|
+
padding-left: 8px;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.locate-button + .address-input {
|
|
1021
|
+
padding-left: 40px;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.address-input {
|
|
1025
|
+
flex: 1;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
.pos-selection .address-input-container .locate-button {
|
|
1030
|
+
position: absolute;
|
|
1031
|
+
background: unset;
|
|
1032
|
+
border: unset;
|
|
1033
|
+
padding: 0;
|
|
1034
|
+
top: 8px;
|
|
1035
|
+
left: 8px;
|
|
1036
|
+
width: 24px;
|
|
1037
|
+
height: 24px;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.pos-selection .address-input-container .locate-button img {
|
|
1041
|
+
cursor: pointer;
|
|
1042
|
+
width: 24px;
|
|
1043
|
+
height: 24px;
|
|
875
1044
|
}
|
|
876
1045
|
|
|
877
1046
|
.pos-selection #pos-list {
|
|
878
|
-
display: flex;
|
|
879
1047
|
flex-direction: column;
|
|
880
1048
|
align-items: flex-start;
|
|
881
1049
|
gap: var(--spacing-padding-12-px, 12px);
|
|
@@ -883,6 +1051,58 @@ v.styles = [
|
|
|
883
1051
|
overflow: auto;
|
|
884
1052
|
}
|
|
885
1053
|
|
|
1054
|
+
.pos-list__visible,
|
|
1055
|
+
.pos-list__hidden {
|
|
1056
|
+
display: flex;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.pos-selection .pos-loader {
|
|
1060
|
+
flex: 1;
|
|
1061
|
+
width: 100%;
|
|
1062
|
+
display: flex;
|
|
1063
|
+
justify-content: center;
|
|
1064
|
+
align-items: center;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.pos-selection .pos-loader .miam-ds-loader {
|
|
1068
|
+
margin: 16px;
|
|
1069
|
+
display: flex;
|
|
1070
|
+
width: 72px;
|
|
1071
|
+
height: 72px;
|
|
1072
|
+
background-position-x: 36px;
|
|
1073
|
+
background-size: 36px 36px;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.pos-selection .no-pos-found {
|
|
1077
|
+
margin-bottom: 16px;
|
|
1078
|
+
width: 100%;
|
|
1079
|
+
flex: 1;
|
|
1080
|
+
display: flex;
|
|
1081
|
+
justify-content: center;
|
|
1082
|
+
align-items: center;
|
|
1083
|
+
flex-direction: column;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.pos-selection .select-radius {
|
|
1087
|
+
display: flex;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.pos-selection .select-radius select {
|
|
1091
|
+
flex: 1;
|
|
1092
|
+
padding: 10px;
|
|
1093
|
+
max-width: initial;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.pos-selection .select-supplier {
|
|
1097
|
+
display: flex;
|
|
1098
|
+
|
|
1099
|
+
select {
|
|
1100
|
+
flex: 1;
|
|
1101
|
+
padding: 10px;
|
|
1102
|
+
max-width: initial;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
886
1106
|
.pos-item {
|
|
887
1107
|
display: flex;
|
|
888
1108
|
flex-direction: column;
|
|
@@ -927,7 +1147,7 @@ v.styles = [
|
|
|
927
1147
|
width: 100%;
|
|
928
1148
|
}
|
|
929
1149
|
|
|
930
|
-
#
|
|
1150
|
+
#mobile-buttons-wrapper {
|
|
931
1151
|
display: none;
|
|
932
1152
|
}
|
|
933
1153
|
|
|
@@ -935,6 +1155,8 @@ v.styles = [
|
|
|
935
1155
|
width: 100%;
|
|
936
1156
|
min-height: 100%;
|
|
937
1157
|
z-index: 0;
|
|
1158
|
+
position: absolute;
|
|
1159
|
+
top: 0;
|
|
938
1160
|
}
|
|
939
1161
|
|
|
940
1162
|
#map .pos-item {
|
|
@@ -956,13 +1178,16 @@ v.styles = [
|
|
|
956
1178
|
width: 100%;
|
|
957
1179
|
padding: 0;
|
|
958
1180
|
gap: 0;
|
|
1181
|
+
|
|
1182
|
+
form {
|
|
1183
|
+
padding: 24px 16px;
|
|
1184
|
+
}
|
|
959
1185
|
}
|
|
960
1186
|
|
|
961
1187
|
.pos-selection .title {
|
|
962
1188
|
position: relative;
|
|
963
|
-
height: 56px;
|
|
1189
|
+
min-height: 56px;
|
|
964
1190
|
font-size: 16px;
|
|
965
|
-
width: 100%;
|
|
966
1191
|
display: flex;
|
|
967
1192
|
align-items: center;
|
|
968
1193
|
justify-content: center;
|
|
@@ -978,11 +1203,6 @@ v.styles = [
|
|
|
978
1203
|
height: 32px;
|
|
979
1204
|
}
|
|
980
1205
|
|
|
981
|
-
.pos-selection .address-input-container {
|
|
982
|
-
width: calc(100% - 32px);
|
|
983
|
-
padding: 24px 16px;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
1206
|
.pos-selection .address-input-container input {
|
|
987
1207
|
width: calc(100% - 44px);
|
|
988
1208
|
}
|
|
@@ -990,20 +1210,70 @@ v.styles = [
|
|
|
990
1210
|
.pos-selection .address-input-container button {
|
|
991
1211
|
width: 36px;
|
|
992
1212
|
}
|
|
1213
|
+
|
|
1214
|
+
.pos-selection .suppliers-selection-container {
|
|
1215
|
+
width: calc(100% - 32px);
|
|
1216
|
+
margin: 8px 16px 24px 16px;
|
|
1217
|
+
}
|
|
993
1218
|
|
|
994
1219
|
.pos-selection #pos-list {
|
|
995
1220
|
padding: 0 16px 12px;
|
|
996
|
-
max-height: 235px;
|
|
997
1221
|
align-items: center;
|
|
998
1222
|
}
|
|
1223
|
+
|
|
1224
|
+
.pos-list__visible {
|
|
1225
|
+
display: flex;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.pos-list__hidden {
|
|
1229
|
+
display: none;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.pos-selection__height {
|
|
1233
|
+
height: 100%;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
.pos-selection .pos-loader {
|
|
1237
|
+
position: absolute;
|
|
1238
|
+
height: 100%;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.suppliers-list-wrapper__not-mobile {
|
|
1242
|
+
display: none;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.suppliers-list-wrapper__mobile {
|
|
1246
|
+
display: block;
|
|
1247
|
+
|
|
1248
|
+
.suppliers-list {
|
|
1249
|
+
position: relative;
|
|
1250
|
+
z-index: 1;
|
|
1251
|
+
width: calc(100% - 32px);
|
|
1252
|
+
margin: -16px 16px 8px 16px;
|
|
1253
|
+
|
|
1254
|
+
.suppliers-list__supplier {
|
|
1255
|
+
padding: 8px 16px;
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
999
1259
|
|
|
1000
|
-
#
|
|
1260
|
+
#mobile-buttons-wrapper {
|
|
1001
1261
|
width: 100%;
|
|
1002
1262
|
display: flex;
|
|
1003
1263
|
justify-content: center;
|
|
1004
1264
|
padding: 12px 0;
|
|
1005
1265
|
}
|
|
1006
1266
|
|
|
1267
|
+
.mobile-buttons-wrapper__see-list {
|
|
1268
|
+
z-index: 1;
|
|
1269
|
+
bottom: 40px;
|
|
1270
|
+
position: absolute;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.mobile-buttons-wrapper__see-map {
|
|
1274
|
+
margin-top: auto;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1007
1277
|
#map {
|
|
1008
1278
|
min-height: unset;
|
|
1009
1279
|
position: absolute;
|
|
@@ -1013,19 +1283,37 @@ v.styles = [
|
|
|
1013
1283
|
}
|
|
1014
1284
|
`
|
|
1015
1285
|
];
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
],
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
],
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
],
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
],
|
|
1028
|
-
|
|
1286
|
+
g([
|
|
1287
|
+
y({ type: Boolean })
|
|
1288
|
+
], m.prototype, "show", 2);
|
|
1289
|
+
g([
|
|
1290
|
+
y({ type: Number })
|
|
1291
|
+
], m.prototype, "selectedRadius", 2);
|
|
1292
|
+
g([
|
|
1293
|
+
y({ type: Array })
|
|
1294
|
+
], m.prototype, "radiusOption", 2);
|
|
1295
|
+
g([
|
|
1296
|
+
y({ type: GeolocationPosition })
|
|
1297
|
+
], m.prototype, "geolocationCoordinates", 1);
|
|
1298
|
+
g([
|
|
1299
|
+
y()
|
|
1300
|
+
], m.prototype, "getByAddress", 2);
|
|
1301
|
+
g([
|
|
1302
|
+
y()
|
|
1303
|
+
], m.prototype, "getByCoordinates", 2);
|
|
1304
|
+
g([
|
|
1305
|
+
y()
|
|
1306
|
+
], m.prototype, "getAffiliateSuppliers", 2);
|
|
1307
|
+
g([
|
|
1308
|
+
kt()
|
|
1309
|
+
], m.prototype, "_geolocationCoordinates", 2);
|
|
1310
|
+
g([
|
|
1311
|
+
Ot("input")
|
|
1312
|
+
], m.prototype, "_addressInput", 2);
|
|
1313
|
+
m = g([
|
|
1314
|
+
Ut("mealz-store-locator")
|
|
1315
|
+
], m);
|
|
1316
|
+
window.customElements.get("mealz-store-locator") || window.customElements.define("mealz-store-locator", m);
|
|
1029
1317
|
export {
|
|
1030
|
-
|
|
1318
|
+
m as MealzStoreLocator
|
|
1031
1319
|
};
|