@salla.sa/ui-address-autocomplete-widget 1.0.5 → 1.0.6

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 (2) hide show
  1. package/dist/index.js +339 -432
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,20 +1,15 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const D = globalThis, G = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), X = /* @__PURE__ */ new WeakMap();
7
- let pe = class {
8
- constructor(e, t, r) {
9
- if (this._$cssResult$ = !0, r !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1
+ const U = globalThis, q = U.ShadowRoot && (U.ShadyCSS === void 0 || U.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, H = /* @__PURE__ */ Symbol(), Z = /* @__PURE__ */ new WeakMap();
2
+ let le = class {
3
+ constructor(e, t, s) {
4
+ if (this._$cssResult$ = !0, s !== H) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
5
  this.cssText = e, this.t = t;
11
6
  }
12
7
  get styleSheet() {
13
8
  let e = this.o;
14
9
  const t = this.t;
15
- if (G && e === void 0) {
16
- const r = t !== void 0 && t.length === 1;
17
- r && (e = X.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && X.set(t, e));
10
+ if (q && e === void 0) {
11
+ const s = t !== void 0 && t.length === 1;
12
+ s && (e = Z.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Z.set(t, e));
18
13
  }
19
14
  return e;
20
15
  }
@@ -22,33 +17,28 @@ let pe = class {
22
17
  return this.cssText;
23
18
  }
24
19
  };
25
- const ve = (i) => new pe(typeof i == "string" ? i : i + "", void 0, Z), be = (i, ...e) => {
26
- const t = i.length === 1 ? i[0] : e.reduce((r, s, o) => r + ((a) => {
20
+ const ue = (i) => new le(typeof i == "string" ? i : i + "", void 0, H), me = (i, ...e) => {
21
+ const t = i.length === 1 ? i[0] : e.reduce((s, r, o) => s + ((a) => {
27
22
  if (a._$cssResult$ === !0) return a.cssText;
28
23
  if (typeof a == "number") return a;
29
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(s) + i[o + 1], i[0]);
31
- return new pe(t, i, Z);
32
- }, ye = (i, e) => {
33
- if (G) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
25
+ })(r) + i[o + 1], i[0]);
26
+ return new le(t, i, H);
27
+ }, fe = (i, e) => {
28
+ if (q) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
34
29
  else for (const t of e) {
35
- const r = document.createElement("style"), s = D.litNonce;
36
- s !== void 0 && r.setAttribute("nonce", s), r.textContent = t.cssText, i.appendChild(r);
30
+ const s = document.createElement("style"), r = U.litNonce;
31
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
37
32
  }
38
- }, Q = G ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
33
+ }, Y = q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
39
34
  let t = "";
40
- for (const r of e.cssRules) t += r.cssText;
41
- return ve(t);
35
+ for (const s of e.cssRules) t += s.cssText;
36
+ return ue(t);
42
37
  })(i) : i;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: $e, defineProperty: Ae, getOwnPropertyDescriptor: we, getOwnPropertyNames: _e, getOwnPropertySymbols: xe, getPrototypeOf: Se } = Object, A = globalThis, ee = A.trustedTypes, Ee = ee ? ee.emptyScript : "", H = A.reactiveElementPolyfillSupport, C = (i, e) => i, M = { toAttribute(i, e) {
38
+ const { is: ge, defineProperty: ve, getOwnPropertyDescriptor: be, getOwnPropertyNames: ye, getOwnPropertySymbols: $e, getPrototypeOf: Ae } = Object, D = globalThis, J = D.trustedTypes, we = J ? J.emptyScript : "", _e = D.reactiveElementPolyfillSupport, P = (i, e) => i, V = { toAttribute(i, e) {
49
39
  switch (e) {
50
40
  case Boolean:
51
- i = i ? Ee : null;
41
+ i = i ? we : null;
52
42
  break;
53
43
  case Object:
54
44
  case Array:
@@ -73,142 +63,128 @@ const { is: $e, defineProperty: Ae, getOwnPropertyDescriptor: we, getOwnProperty
73
63
  }
74
64
  }
75
65
  return t;
76
- } }, Y = (i, e) => !$e(i, e), te = { attribute: !0, type: String, converter: M, reflect: !1, useDefault: !1, hasChanged: Y };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- let k = class extends HTMLElement {
66
+ } }, j = (i, e) => !ge(i, e), X = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: j };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), D.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
+ let S = class extends HTMLElement {
79
69
  static addInitializer(e) {
80
- this._$Ei(), (this.l ?? (this.l = [])).push(e);
70
+ this._$Ei(), (this.l ??= []).push(e);
81
71
  }
82
72
  static get observedAttributes() {
83
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
74
  }
85
- static createProperty(e, t = te) {
75
+ static createProperty(e, t = X) {
86
76
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
87
- const r = Symbol(), s = this.getPropertyDescriptor(e, r, t);
88
- s !== void 0 && Ae(this.prototype, e, s);
77
+ const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(e, s, t);
78
+ r !== void 0 && ve(this.prototype, e, r);
89
79
  }
90
80
  }
91
- static getPropertyDescriptor(e, t, r) {
92
- const { get: s, set: o } = we(this.prototype, e) ?? { get() {
81
+ static getPropertyDescriptor(e, t, s) {
82
+ const { get: r, set: o } = be(this.prototype, e) ?? { get() {
93
83
  return this[t];
94
84
  }, set(a) {
95
85
  this[t] = a;
96
86
  } };
97
- return { get: s, set(a) {
98
- const l = s == null ? void 0 : s.call(this);
99
- o == null || o.call(this, a), this.requestUpdate(e, l, r);
87
+ return { get: r, set(a) {
88
+ const n = r?.call(this);
89
+ o?.call(this, a), this.requestUpdate(e, n, s);
100
90
  }, configurable: !0, enumerable: !0 };
101
91
  }
102
92
  static getPropertyOptions(e) {
103
- return this.elementProperties.get(e) ?? te;
93
+ return this.elementProperties.get(e) ?? X;
104
94
  }
105
95
  static _$Ei() {
106
- if (this.hasOwnProperty(C("elementProperties"))) return;
107
- const e = Se(this);
96
+ if (this.hasOwnProperty(P("elementProperties"))) return;
97
+ const e = Ae(this);
108
98
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
99
  }
110
100
  static finalize() {
111
- if (this.hasOwnProperty(C("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(C("properties"))) {
113
- const t = this.properties, r = [..._e(t), ...xe(t)];
114
- for (const s of r) this.createProperty(s, t[s]);
101
+ if (this.hasOwnProperty(P("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
103
+ const t = this.properties, s = [...ye(t), ...$e(t)];
104
+ for (const r of s) this.createProperty(r, t[r]);
115
105
  }
116
106
  const e = this[Symbol.metadata];
117
107
  if (e !== null) {
118
108
  const t = litPropertyMetadata.get(e);
119
- if (t !== void 0) for (const [r, s] of t) this.elementProperties.set(r, s);
109
+ if (t !== void 0) for (const [s, r] of t) this.elementProperties.set(s, r);
120
110
  }
121
111
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [t, r] of this.elementProperties) {
123
- const s = this._$Eu(t, r);
124
- s !== void 0 && this._$Eh.set(s, t);
112
+ for (const [t, s] of this.elementProperties) {
113
+ const r = this._$Eu(t, s);
114
+ r !== void 0 && this._$Eh.set(r, t);
125
115
  }
126
116
  this.elementStyles = this.finalizeStyles(this.styles);
127
117
  }
128
118
  static finalizeStyles(e) {
129
119
  const t = [];
130
120
  if (Array.isArray(e)) {
131
- const r = new Set(e.flat(1 / 0).reverse());
132
- for (const s of r) t.unshift(Q(s));
133
- } else e !== void 0 && t.push(Q(e));
121
+ const s = new Set(e.flat(1 / 0).reverse());
122
+ for (const r of s) t.unshift(Y(r));
123
+ } else e !== void 0 && t.push(Y(e));
134
124
  return t;
135
125
  }
136
126
  static _$Eu(e, t) {
137
- const r = t.attribute;
138
- return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0;
127
+ const s = t.attribute;
128
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
139
129
  }
140
130
  constructor() {
141
131
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
142
132
  }
143
133
  _$Ev() {
144
- var e;
145
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
134
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
146
135
  }
147
136
  addController(e) {
148
- var t;
149
- (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
137
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
150
138
  }
151
139
  removeController(e) {
152
- var t;
153
- (t = this._$EO) == null || t.delete(e);
140
+ this._$EO?.delete(e);
154
141
  }
155
142
  _$E_() {
156
143
  const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
157
- for (const r of t.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
144
+ for (const s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
158
145
  e.size > 0 && (this._$Ep = e);
159
146
  }
160
147
  createRenderRoot() {
161
148
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
162
- return ye(e, this.constructor.elementStyles), e;
149
+ return fe(e, this.constructor.elementStyles), e;
163
150
  }
164
151
  connectedCallback() {
165
- var e;
166
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
167
- var r;
168
- return (r = t.hostConnected) == null ? void 0 : r.call(t);
169
- });
152
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
170
153
  }
171
154
  enableUpdating(e) {
172
155
  }
173
156
  disconnectedCallback() {
174
- var e;
175
- (e = this._$EO) == null || e.forEach((t) => {
176
- var r;
177
- return (r = t.hostDisconnected) == null ? void 0 : r.call(t);
178
- });
157
+ this._$EO?.forEach((e) => e.hostDisconnected?.());
179
158
  }
180
- attributeChangedCallback(e, t, r) {
181
- this._$AK(e, r);
159
+ attributeChangedCallback(e, t, s) {
160
+ this._$AK(e, s);
182
161
  }
183
162
  _$ET(e, t) {
184
- var o;
185
- const r = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, r);
186
- if (s !== void 0 && r.reflect === !0) {
187
- const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : M).toAttribute(t, r.type);
188
- this._$Em = e, a == null ? this.removeAttribute(s) : this.setAttribute(s, a), this._$Em = null;
163
+ const s = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, s);
164
+ if (r !== void 0 && s.reflect === !0) {
165
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : V).toAttribute(t, s.type);
166
+ this._$Em = e, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
189
167
  }
190
168
  }
191
169
  _$AK(e, t) {
192
- var o, a;
193
- const r = this.constructor, s = r._$Eh.get(e);
194
- if (s !== void 0 && this._$Em !== s) {
195
- const l = r.getPropertyOptions(s), n = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((o = l.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? l.converter : M;
196
- this._$Em = s;
197
- const m = n.fromAttribute(t, l.type);
198
- this[s] = m ?? ((a = this._$Ej) == null ? void 0 : a.get(s)) ?? m, this._$Em = null;
170
+ const s = this.constructor, r = s._$Eh.get(e);
171
+ if (r !== void 0 && this._$Em !== r) {
172
+ const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : V;
173
+ this._$Em = r;
174
+ const n = a.fromAttribute(t, o.type);
175
+ this[r] = n ?? this._$Ej?.get(r) ?? n, this._$Em = null;
199
176
  }
200
177
  }
201
- requestUpdate(e, t, r, s = !1, o) {
202
- var a;
178
+ requestUpdate(e, t, s, r = !1, o) {
203
179
  if (e !== void 0) {
204
- const l = this.constructor;
205
- if (s === !1 && (o = this[e]), r ?? (r = l.getPropertyOptions(e)), !((r.hasChanged ?? Y)(o, t) || r.useDefault && r.reflect && o === ((a = this._$Ej) == null ? void 0 : a.get(e)) && !this.hasAttribute(l._$Eu(e, r)))) return;
206
- this.C(e, t, r);
180
+ const a = this.constructor;
181
+ if (r === !1 && (o = this[e]), s ??= a.getPropertyOptions(e), !((s.hasChanged ?? j)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, s)))) return;
182
+ this.C(e, t, s);
207
183
  }
208
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
209
185
  }
210
- C(e, t, { useDefault: r, reflect: s, wrapped: o }, a) {
211
- r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), s === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
186
+ C(e, t, { useDefault: s, reflect: r, wrapped: o }, a) {
187
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
212
188
  }
213
189
  async _$EP() {
214
190
  this.isUpdatePending = !0;
@@ -224,26 +200,22 @@ let k = class extends HTMLElement {
224
200
  return this.performUpdate();
225
201
  }
226
202
  performUpdate() {
227
- var r;
228
203
  if (!this.isUpdatePending) return;
229
204
  if (!this.hasUpdated) {
230
- if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
231
- for (const [o, a] of this._$Ep) this[o] = a;
205
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
206
+ for (const [r, o] of this._$Ep) this[r] = o;
232
207
  this._$Ep = void 0;
233
208
  }
234
209
  const s = this.constructor.elementProperties;
235
- if (s.size > 0) for (const [o, a] of s) {
236
- const { wrapped: l } = a, n = this[o];
237
- l !== !0 || this._$AL.has(o) || n === void 0 || this.C(o, void 0, a, n);
210
+ if (s.size > 0) for (const [r, o] of s) {
211
+ const { wrapped: a } = o, n = this[r];
212
+ a !== !0 || this._$AL.has(r) || n === void 0 || this.C(r, void 0, o, n);
238
213
  }
239
214
  }
240
215
  let e = !1;
241
216
  const t = this._$AL;
242
217
  try {
243
- e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((s) => {
244
- var o;
245
- return (o = s.hostUpdate) == null ? void 0 : o.call(s);
246
- }), this.update(t)) : this._$EM();
218
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(t)) : this._$EM();
247
219
  } catch (s) {
248
220
  throw e = !1, this._$EM(), s;
249
221
  }
@@ -252,11 +224,7 @@ let k = class extends HTMLElement {
252
224
  willUpdate(e) {
253
225
  }
254
226
  _$AE(e) {
255
- var t;
256
- (t = this._$EO) == null || t.forEach((r) => {
257
- var s;
258
- return (s = r.hostUpdated) == null ? void 0 : s.call(r);
259
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
227
+ this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
260
228
  }
261
229
  _$EM() {
262
230
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -271,83 +239,77 @@ let k = class extends HTMLElement {
271
239
  return !0;
272
240
  }
273
241
  update(e) {
274
- this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
242
+ this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
275
243
  }
276
244
  updated(e) {
277
245
  }
278
246
  firstUpdated(e) {
279
247
  }
280
248
  };
281
- k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[C("elementProperties")] = /* @__PURE__ */ new Map(), k[C("finalized")] = /* @__PURE__ */ new Map(), H == null || H({ ReactiveElement: k }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.1.2");
282
- /**
283
- * @license
284
- * Copyright 2017 Google LLC
285
- * SPDX-License-Identifier: BSD-3-Clause
286
- */
287
- const R = globalThis, ie = (i) => i, L = R.trustedTypes, re = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ue = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + $, ke = `<${me}>`, S = document, N = () => S.createComment(""), z = (i) => i === null || typeof i != "object" && typeof i != "function", J = Array.isArray, Pe = (i) => J(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", B = `[
288
- \f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, oe = />/g, w = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
289
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, ne = /"/g, fe = /^(?:script|style|textarea|title)$/i, Te = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), g = Te(1), E = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), _ = S.createTreeWalker(S, 129);
290
- function ge(i, e) {
291
- if (!J(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
292
- return re !== void 0 ? re.createHTML(e) : e;
249
+ S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[P("elementProperties")] = /* @__PURE__ */ new Map(), S[P("finalized")] = /* @__PURE__ */ new Map(), _e?.({ ReactiveElement: S }), (D.reactiveElementVersions ??= []).push("2.1.2");
250
+ const W = globalThis, Q = (i) => i, O = W.trustedTypes, ee = O ? O.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, de = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, he = "?" + $, xe = `<${he}>`, _ = document, C = () => _.createComment(""), R = (i) => i === null || typeof i != "object" && typeof i != "function", K = Array.isArray, Se = (i) => K(i) || typeof i?.[Symbol.iterator] == "function", L = `[
251
+ \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, te = /-->/g, ie = />/g, A = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), se = /'/g, re = /"/g, ce = /^(?:script|style|textarea|title)$/i, Ee = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), g = Ee(1), x = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), oe = /* @__PURE__ */ new WeakMap(), w = _.createTreeWalker(_, 129);
253
+ function pe(i, e) {
254
+ if (!K(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return ee !== void 0 ? ee.createHTML(e) : e;
293
256
  }
294
- const Ce = (i, e) => {
295
- const t = i.length - 1, r = [];
296
- let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = T;
297
- for (let l = 0; l < t; l++) {
298
- const n = i[l];
299
- let m, c, u = -1, v = 0;
300
- for (; v < n.length && (a.lastIndex = v, c = a.exec(n), c !== null); ) v = a.lastIndex, a === T ? c[1] === "!--" ? a = se : c[1] !== void 0 ? a = oe : c[2] !== void 0 ? (fe.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = w) : c[3] !== void 0 && (a = w) : a === w ? c[0] === ">" ? (a = s ?? T, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, m = c[1], a = c[3] === void 0 ? w : c[3] === '"' ? ne : ae) : a === ne || a === ae ? a = w : a === se || a === oe ? a = T : (a = w, s = void 0);
301
- const y = a === w && i[l + 1].startsWith("/>") ? " " : "";
302
- o += a === T ? n + ke : u >= 0 ? (r.push(m), n.slice(0, u) + ue + n.slice(u) + $ + y) : n + $ + (u === -2 ? l : y);
303
- }
304
- return [ge(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
257
+ const ke = (i, e) => {
258
+ const t = i.length - 1, s = [];
259
+ let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = k;
260
+ for (let n = 0; n < t; n++) {
261
+ const l = i[n];
262
+ let m, c, u = -1, b = 0;
263
+ for (; b < l.length && (a.lastIndex = b, c = a.exec(l), c !== null); ) b = a.lastIndex, a === k ? c[1] === "!--" ? a = te : c[1] !== void 0 ? a = ie : c[2] !== void 0 ? (ce.test(c[2]) && (r = RegExp("</" + c[2], "g")), a = A) : c[3] !== void 0 && (a = A) : a === A ? c[0] === ">" ? (a = r ?? k, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, m = c[1], a = c[3] === void 0 ? A : c[3] === '"' ? re : se) : a === re || a === se ? a = A : a === te || a === ie ? a = k : (a = A, r = void 0);
264
+ const y = a === A && i[n + 1].startsWith("/>") ? " " : "";
265
+ o += a === k ? l + xe : u >= 0 ? (s.push(m), l.slice(0, u) + de + l.slice(u) + $ + y) : l + $ + (u === -2 ? n : y);
266
+ }
267
+ return [pe(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
305
268
  };
306
- class F {
307
- constructor({ strings: e, _$litType$: t }, r) {
308
- let s;
269
+ class I {
270
+ constructor({ strings: e, _$litType$: t }, s) {
271
+ let r;
309
272
  this.parts = [];
310
273
  let o = 0, a = 0;
311
- const l = e.length - 1, n = this.parts, [m, c] = Ce(e, t);
312
- if (this.el = F.createElement(m, r), _.currentNode = this.el.content, t === 2 || t === 3) {
274
+ const n = e.length - 1, l = this.parts, [m, c] = ke(e, t);
275
+ if (this.el = I.createElement(m, s), w.currentNode = this.el.content, t === 2 || t === 3) {
313
276
  const u = this.el.content.firstChild;
314
277
  u.replaceWith(...u.childNodes);
315
278
  }
316
- for (; (s = _.nextNode()) !== null && n.length < l; ) {
317
- if (s.nodeType === 1) {
318
- if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(ue)) {
319
- const v = c[a++], y = s.getAttribute(u).split($), V = /([.?@])?(.*)/.exec(v);
320
- n.push({ type: 1, index: o, name: V[2], strings: y, ctor: V[1] === "." ? Ie : V[1] === "?" ? Ne : V[1] === "@" ? ze : q }), s.removeAttribute(u);
321
- } else u.startsWith($) && (n.push({ type: 6, index: o }), s.removeAttribute(u));
322
- if (fe.test(s.tagName)) {
323
- const u = s.textContent.split($), v = u.length - 1;
324
- if (v > 0) {
325
- s.textContent = L ? L.emptyScript : "";
326
- for (let y = 0; y < v; y++) s.append(u[y], N()), _.nextNode(), n.push({ type: 2, index: ++o });
327
- s.append(u[v], N());
279
+ for (; (r = w.nextNode()) !== null && l.length < n; ) {
280
+ if (r.nodeType === 1) {
281
+ if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(de)) {
282
+ const b = c[a++], y = r.getAttribute(u).split($), z = /([.?@])?(.*)/.exec(b);
283
+ l.push({ type: 1, index: o, name: z[2], strings: y, ctor: z[1] === "." ? Te : z[1] === "?" ? Ce : z[1] === "@" ? Re : M }), r.removeAttribute(u);
284
+ } else u.startsWith($) && (l.push({ type: 6, index: o }), r.removeAttribute(u));
285
+ if (ce.test(r.tagName)) {
286
+ const u = r.textContent.split($), b = u.length - 1;
287
+ if (b > 0) {
288
+ r.textContent = O ? O.emptyScript : "";
289
+ for (let y = 0; y < b; y++) r.append(u[y], C()), w.nextNode(), l.push({ type: 2, index: ++o });
290
+ r.append(u[b], C());
328
291
  }
329
292
  }
330
- } else if (s.nodeType === 8) if (s.data === me) n.push({ type: 2, index: o });
293
+ } else if (r.nodeType === 8) if (r.data === he) l.push({ type: 2, index: o });
331
294
  else {
332
295
  let u = -1;
333
- for (; (u = s.data.indexOf($, u + 1)) !== -1; ) n.push({ type: 7, index: o }), u += $.length - 1;
296
+ for (; (u = r.data.indexOf($, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += $.length - 1;
334
297
  }
335
298
  o++;
336
299
  }
337
300
  }
338
301
  static createElement(e, t) {
339
- const r = S.createElement("template");
340
- return r.innerHTML = e, r;
302
+ const s = _.createElement("template");
303
+ return s.innerHTML = e, s;
341
304
  }
342
305
  }
343
- function P(i, e, t = i, r) {
344
- var a, l;
345
- if (e === E) return e;
346
- let s = r !== void 0 ? (a = t._$Co) == null ? void 0 : a[r] : t._$Cl;
347
- const o = z(e) ? void 0 : e._$litDirective$;
348
- return (s == null ? void 0 : s.constructor) !== o && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), o === void 0 ? s = void 0 : (s = new o(i), s._$AT(i, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = s : t._$Cl = s), s !== void 0 && (e = P(i, s._$AS(i, e.values), s, r)), e;
306
+ function E(i, e, t = i, s) {
307
+ if (e === x) return e;
308
+ let r = s !== void 0 ? t._$Co?.[s] : t._$Cl;
309
+ const o = R(e) ? void 0 : e._$litDirective$;
310
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = E(i, r._$AS(i, e.values), r, s)), e;
349
311
  }
350
- class Re {
312
+ class Pe {
351
313
  constructor(e, t) {
352
314
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
353
315
  }
@@ -358,35 +320,34 @@ class Re {
358
320
  return this._$AM._$AU;
359
321
  }
360
322
  u(e) {
361
- const { el: { content: t }, parts: r } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ?? S).importNode(t, !0);
362
- _.currentNode = s;
363
- let o = _.nextNode(), a = 0, l = 0, n = r[0];
364
- for (; n !== void 0; ) {
365
- if (a === n.index) {
323
+ const { el: { content: t }, parts: s } = this._$AD, r = (e?.creationScope ?? _).importNode(t, !0);
324
+ w.currentNode = r;
325
+ let o = w.nextNode(), a = 0, n = 0, l = s[0];
326
+ for (; l !== void 0; ) {
327
+ if (a === l.index) {
366
328
  let m;
367
- n.type === 2 ? m = new U(o, o.nextSibling, this, e) : n.type === 1 ? m = new n.ctor(o, n.name, n.strings, this, e) : n.type === 6 && (m = new Fe(o, this, e)), this._$AV.push(m), n = r[++l];
329
+ l.type === 2 ? m = new N(o, o.nextSibling, this, e) : l.type === 1 ? m = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (m = new Ie(o, this, e)), this._$AV.push(m), l = s[++n];
368
330
  }
369
- a !== (n == null ? void 0 : n.index) && (o = _.nextNode(), a++);
331
+ a !== l?.index && (o = w.nextNode(), a++);
370
332
  }
371
- return _.currentNode = S, s;
333
+ return w.currentNode = _, r;
372
334
  }
373
335
  p(e) {
374
336
  let t = 0;
375
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++;
337
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
376
338
  }
377
339
  }
378
- class U {
340
+ class N {
379
341
  get _$AU() {
380
- var e;
381
- return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
342
+ return this._$AM?._$AU ?? this._$Cv;
382
343
  }
383
- constructor(e, t, r, s) {
384
- this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
344
+ constructor(e, t, s, r) {
345
+ this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
385
346
  }
386
347
  get parentNode() {
387
348
  let e = this._$AA.parentNode;
388
349
  const t = this._$AM;
389
- return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
350
+ return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
390
351
  }
391
352
  get startNode() {
392
353
  return this._$AA;
@@ -395,7 +356,7 @@ class U {
395
356
  return this._$AB;
396
357
  }
397
358
  _$AI(e, t = this) {
398
- e = P(this, e, t), z(e) ? e === f || e == null || e === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : e !== this._$AH && e !== E && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Pe(e) ? this.k(e) : this._(e);
359
+ e = E(this, e, t), R(e) ? e === f || e == null || e === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : e !== this._$AH && e !== x && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Se(e) ? this.k(e) : this._(e);
399
360
  }
400
361
  O(e) {
401
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -404,66 +365,63 @@ class U {
404
365
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
405
366
  }
406
367
  _(e) {
407
- this._$AH !== f && z(this._$AH) ? this._$AA.nextSibling.data = e : this.T(S.createTextNode(e)), this._$AH = e;
368
+ this._$AH !== f && R(this._$AH) ? this._$AA.nextSibling.data = e : this.T(_.createTextNode(e)), this._$AH = e;
408
369
  }
409
370
  $(e) {
410
- var o;
411
- const { values: t, _$litType$: r } = e, s = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = F.createElement(ge(r.h, r.h[0]), this.options)), r);
412
- if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
371
+ const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = I.createElement(pe(s.h, s.h[0]), this.options)), s);
372
+ if (this._$AH?._$AD === r) this._$AH.p(t);
413
373
  else {
414
- const a = new Re(s, this), l = a.u(this.options);
415
- a.p(t), this.T(l), this._$AH = a;
374
+ const o = new Pe(r, this), a = o.u(this.options);
375
+ o.p(t), this.T(a), this._$AH = o;
416
376
  }
417
377
  }
418
378
  _$AC(e) {
419
- let t = le.get(e.strings);
420
- return t === void 0 && le.set(e.strings, t = new F(e)), t;
379
+ let t = oe.get(e.strings);
380
+ return t === void 0 && oe.set(e.strings, t = new I(e)), t;
421
381
  }
422
382
  k(e) {
423
- J(this._$AH) || (this._$AH = [], this._$AR());
383
+ K(this._$AH) || (this._$AH = [], this._$AR());
424
384
  const t = this._$AH;
425
- let r, s = 0;
426
- for (const o of e) s === t.length ? t.push(r = new U(this.O(N()), this.O(N()), this, this.options)) : r = t[s], r._$AI(o), s++;
427
- s < t.length && (this._$AR(r && r._$AB.nextSibling, s), t.length = s);
385
+ let s, r = 0;
386
+ for (const o of e) r === t.length ? t.push(s = new N(this.O(C()), this.O(C()), this, this.options)) : s = t[r], s._$AI(o), r++;
387
+ r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
428
388
  }
429
389
  _$AR(e = this._$AA.nextSibling, t) {
430
- var r;
431
- for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) {
432
- const s = ie(e).nextSibling;
433
- ie(e).remove(), e = s;
390
+ for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
391
+ const s = Q(e).nextSibling;
392
+ Q(e).remove(), e = s;
434
393
  }
435
394
  }
436
395
  setConnected(e) {
437
- var t;
438
- this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
396
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
439
397
  }
440
398
  }
441
- class q {
399
+ class M {
442
400
  get tagName() {
443
401
  return this.element.tagName;
444
402
  }
445
403
  get _$AU() {
446
404
  return this._$AM._$AU;
447
405
  }
448
- constructor(e, t, r, s, o) {
449
- this.type = 1, this._$AH = f, this._$AN = void 0, this.element = e, this.name = t, this._$AM = s, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = f;
406
+ constructor(e, t, s, r, o) {
407
+ this.type = 1, this._$AH = f, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
450
408
  }
451
- _$AI(e, t = this, r, s) {
409
+ _$AI(e, t = this, s, r) {
452
410
  const o = this.strings;
453
411
  let a = !1;
454
- if (o === void 0) e = P(this, e, t, 0), a = !z(e) || e !== this._$AH && e !== E, a && (this._$AH = e);
412
+ if (o === void 0) e = E(this, e, t, 0), a = !R(e) || e !== this._$AH && e !== x, a && (this._$AH = e);
455
413
  else {
456
- const l = e;
457
- let n, m;
458
- for (e = o[0], n = 0; n < o.length - 1; n++) m = P(this, l[r + n], t, n), m === E && (m = this._$AH[n]), a || (a = !z(m) || m !== this._$AH[n]), m === f ? e = f : e !== f && (e += (m ?? "") + o[n + 1]), this._$AH[n] = m;
414
+ const n = e;
415
+ let l, m;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) m = E(this, n[s + l], t, l), m === x && (m = this._$AH[l]), a ||= !R(m) || m !== this._$AH[l], m === f ? e = f : e !== f && (e += (m ?? "") + o[l + 1]), this._$AH[l] = m;
459
417
  }
460
- a && !s && this.j(e);
418
+ a && !r && this.j(e);
461
419
  }
462
420
  j(e) {
463
421
  e === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
464
422
  }
465
423
  }
466
- class Ie extends q {
424
+ class Te extends M {
467
425
  constructor() {
468
426
  super(...arguments), this.type = 3;
469
427
  }
@@ -471,7 +429,7 @@ class Ie extends q {
471
429
  this.element[this.name] = e === f ? void 0 : e;
472
430
  }
473
431
  }
474
- class Ne extends q {
432
+ class Ce extends M {
475
433
  constructor() {
476
434
  super(...arguments), this.type = 4;
477
435
  }
@@ -479,164 +437,121 @@ class Ne extends q {
479
437
  this.element.toggleAttribute(this.name, !!e && e !== f);
480
438
  }
481
439
  }
482
- class ze extends q {
483
- constructor(e, t, r, s, o) {
484
- super(e, t, r, s, o), this.type = 5;
440
+ class Re extends M {
441
+ constructor(e, t, s, r, o) {
442
+ super(e, t, s, r, o), this.type = 5;
485
443
  }
486
444
  _$AI(e, t = this) {
487
- if ((e = P(this, e, t, 0) ?? f) === E) return;
488
- const r = this._$AH, s = e === f && r !== f || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== f && (r === f || s);
489
- s && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
445
+ if ((e = E(this, e, t, 0) ?? f) === x) return;
446
+ const s = this._$AH, r = e === f && s !== f || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, o = e !== f && (s === f || r);
447
+ r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
490
448
  }
491
449
  handleEvent(e) {
492
- var t;
493
- typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
450
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
494
451
  }
495
452
  }
496
- class Fe {
497
- constructor(e, t, r) {
498
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
453
+ class Ie {
454
+ constructor(e, t, s) {
455
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
499
456
  }
500
457
  get _$AU() {
501
458
  return this._$AM._$AU;
502
459
  }
503
460
  _$AI(e) {
504
- P(this, e);
461
+ E(this, e);
505
462
  }
506
463
  }
507
- const j = R.litHtmlPolyfillSupport;
508
- j == null || j(F, U), (R.litHtmlVersions ?? (R.litHtmlVersions = [])).push("3.3.2");
509
- const Ue = (i, e, t) => {
510
- const r = (t == null ? void 0 : t.renderBefore) ?? e;
511
- let s = r._$litPart$;
512
- if (s === void 0) {
513
- const o = (t == null ? void 0 : t.renderBefore) ?? null;
514
- r._$litPart$ = s = new U(e.insertBefore(N(), o), o, void 0, t ?? {});
515
- }
516
- return s._$AI(i), s;
464
+ const Ne = W.litHtmlPolyfillSupport;
465
+ Ne?.(I, N), (W.litHtmlVersions ??= []).push("3.3.2");
466
+ const ze = (i, e, t) => {
467
+ const s = t?.renderBefore ?? e;
468
+ let r = s._$litPart$;
469
+ if (r === void 0) {
470
+ const o = t?.renderBefore ?? null;
471
+ s._$litPart$ = r = new N(e.insertBefore(C(), o), o, void 0, t ?? {});
472
+ }
473
+ return r._$AI(i), r;
517
474
  };
518
- /**
519
- * @license
520
- * Copyright 2017 Google LLC
521
- * SPDX-License-Identifier: BSD-3-Clause
522
- */
523
- const x = globalThis;
524
- let I = class extends k {
475
+ const G = globalThis;
476
+ let T = class extends S {
525
477
  constructor() {
526
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
527
479
  }
528
480
  createRenderRoot() {
529
- var t;
530
481
  const e = super.createRenderRoot();
531
- return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
482
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
532
483
  }
533
484
  update(e) {
534
485
  const t = this.render();
535
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ue(t, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = ze(t, this.renderRoot, this.renderOptions);
536
487
  }
537
488
  connectedCallback() {
538
- var e;
539
- super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
489
+ super.connectedCallback(), this._$Do?.setConnected(!0);
540
490
  }
541
491
  disconnectedCallback() {
542
- var e;
543
- super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
492
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
544
493
  }
545
494
  render() {
546
- return E;
495
+ return x;
547
496
  }
548
497
  };
549
- var ce;
550
- I._$litElement$ = !0, I.finalized = !0, (ce = x.litElementHydrateSupport) == null || ce.call(x, { LitElement: I });
551
- const W = x.litElementPolyfillSupport;
552
- W == null || W({ LitElement: I });
553
- (x.litElementVersions ?? (x.litElementVersions = [])).push("4.2.2");
554
- /**
555
- * @license
556
- * Copyright 2017 Google LLC
557
- * SPDX-License-Identifier: BSD-3-Clause
558
- */
559
- const Ve = (i) => (e, t) => {
498
+ T._$litElement$ = !0, T.finalized = !0, G.litElementHydrateSupport?.({ LitElement: T });
499
+ const Fe = G.litElementPolyfillSupport;
500
+ Fe?.({ LitElement: T });
501
+ (G.litElementVersions ??= []).push("4.2.2");
502
+ const Ue = (i) => (e, t) => {
560
503
  t !== void 0 ? t.addInitializer(() => {
561
504
  customElements.define(i, e);
562
505
  }) : customElements.define(i, e);
563
506
  };
564
- /**
565
- * @license
566
- * Copyright 2017 Google LLC
567
- * SPDX-License-Identifier: BSD-3-Clause
568
- */
569
- const Oe = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: Y }, De = (i = Oe, e, t) => {
570
- const { kind: r, metadata: s } = t;
571
- let o = globalThis.litPropertyMetadata.get(s);
572
- if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), r === "accessor") {
507
+ const Ve = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: j }, Oe = (i = Ve, e, t) => {
508
+ const { kind: s, metadata: r } = t;
509
+ let o = globalThis.litPropertyMetadata.get(r);
510
+ if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), s === "accessor") {
573
511
  const { name: a } = t;
574
- return { set(l) {
575
- const n = e.get.call(this);
576
- e.set.call(this, l), this.requestUpdate(a, n, i, !0, l);
577
- }, init(l) {
578
- return l !== void 0 && this.C(a, void 0, i, l), l;
512
+ return { set(n) {
513
+ const l = e.get.call(this);
514
+ e.set.call(this, n), this.requestUpdate(a, l, i, !0, n);
515
+ }, init(n) {
516
+ return n !== void 0 && this.C(a, void 0, i, n), n;
579
517
  } };
580
518
  }
581
- if (r === "setter") {
519
+ if (s === "setter") {
582
520
  const { name: a } = t;
583
- return function(l) {
584
- const n = this[a];
585
- e.call(this, l), this.requestUpdate(a, n, i, !0, l);
521
+ return function(n) {
522
+ const l = this[a];
523
+ e.call(this, n), this.requestUpdate(a, l, i, !0, n);
586
524
  };
587
525
  }
588
- throw Error("Unsupported decorator location: " + r);
526
+ throw Error("Unsupported decorator location: " + s);
589
527
  };
590
528
  function p(i) {
591
- return (e, t) => typeof t == "object" ? De(i, e, t) : ((r, s, o) => {
592
- const a = s.hasOwnProperty(o);
593
- return s.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(s, o) : void 0;
529
+ return (e, t) => typeof t == "object" ? Oe(i, e, t) : ((s, r, o) => {
530
+ const a = r.hasOwnProperty(o);
531
+ return r.constructor.createProperty(o, s), a ? Object.getOwnPropertyDescriptor(r, o) : void 0;
594
532
  })(i, e, t);
595
533
  }
596
- /**
597
- * @license
598
- * Copyright 2017 Google LLC
599
- * SPDX-License-Identifier: BSD-3-Clause
600
- */
601
- function b(i) {
534
+ function v(i) {
602
535
  return p({ ...i, state: !0, attribute: !1 });
603
536
  }
604
- /**
605
- * @license
606
- * Copyright 2017 Google LLC
607
- * SPDX-License-Identifier: BSD-3-Clause
608
- */
609
- const Me = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
610
- /**
611
- * @license
612
- * Copyright 2017 Google LLC
613
- * SPDX-License-Identifier: BSD-3-Clause
614
- */
615
- function Le(i, e) {
616
- return (t, r, s) => {
617
- const o = (a) => {
618
- var l;
619
- return ((l = a.renderRoot) == null ? void 0 : l.querySelector(i)) ?? null;
620
- };
621
- return Me(t, r, { get() {
537
+ const De = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
538
+ function Me(i, e) {
539
+ return (t, s, r) => {
540
+ const o = (a) => a.renderRoot?.querySelector(i) ?? null;
541
+ return De(t, s, { get() {
622
542
  return o(this);
623
543
  } });
624
544
  };
625
545
  }
626
- /**
627
- * @license
628
- * Copyright 2017 Google LLC
629
- * SPDX-License-Identifier: BSD-3-Clause
630
- */
631
- const qe = { ATTRIBUTE: 1 }, He = (i) => (...e) => ({ _$litDirective$: i, values: e });
632
- class Be {
546
+ const Le = { ATTRIBUTE: 1 }, Be = (i) => (...e) => ({ _$litDirective$: i, values: e });
547
+ class qe {
633
548
  constructor(e) {
634
549
  }
635
550
  get _$AU() {
636
551
  return this._$AM._$AU;
637
552
  }
638
- _$AT(e, t, r) {
639
- this._$Ct = e, this._$AM = t, this._$Ci = r;
553
+ _$AT(e, t, s) {
554
+ this._$Ct = e, this._$AM = t, this._$Ci = s;
640
555
  }
641
556
  _$AS(e, t) {
642
557
  return this.update(e, t);
@@ -645,35 +560,28 @@ class Be {
645
560
  return this.render(...t);
646
561
  }
647
562
  }
648
- /**
649
- * @license
650
- * Copyright 2018 Google LLC
651
- * SPDX-License-Identifier: BSD-3-Clause
652
- */
653
- const O = He(class extends Be {
563
+ const F = Be(class extends qe {
654
564
  constructor(i) {
655
- var e;
656
- if (super(i), i.type !== qe.ATTRIBUTE || i.name !== "class" || ((e = i.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
565
+ if (super(i), i.type !== Le.ATTRIBUTE || i.name !== "class" || i.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
657
566
  }
658
567
  render(i) {
659
568
  return " " + Object.keys(i).filter((e) => i[e]).join(" ") + " ";
660
569
  }
661
570
  update(i, [e]) {
662
- var r, s;
663
571
  if (this.st === void 0) {
664
- this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((o) => o !== "")));
665
- for (const o in e) e[o] && !((r = this.nt) != null && r.has(o)) && this.st.add(o);
572
+ this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((s) => s !== "")));
573
+ for (const s in e) e[s] && !this.nt?.has(s) && this.st.add(s);
666
574
  return this.render(e);
667
575
  }
668
576
  const t = i.element.classList;
669
- for (const o of this.st) o in e || (t.remove(o), this.st.delete(o));
670
- for (const o in e) {
671
- const a = !!e[o];
672
- a === this.st.has(o) || (s = this.nt) != null && s.has(o) || (a ? (t.add(o), this.st.add(o)) : (t.remove(o), this.st.delete(o)));
577
+ for (const s of this.st) s in e || (t.remove(s), this.st.delete(s));
578
+ for (const s in e) {
579
+ const r = !!e[s];
580
+ r === this.st.has(s) || this.nt?.has(s) || (r ? (t.add(s), this.st.add(s)) : (t.remove(s), this.st.delete(s)));
673
581
  }
674
- return E;
582
+ return x;
675
583
  }
676
- }), je = [
584
+ }), He = [
677
585
  "AE",
678
586
  "AR",
679
587
  "AT",
@@ -728,63 +636,63 @@ const O = He(class extends Be {
728
636
  "VN",
729
637
  "ZA"
730
638
  ];
731
- function tt(i, e) {
732
- let t = null, r = 0;
733
- return function(...s) {
734
- const o = Date.now(), a = e - (o - r);
735
- a <= 0 || a > e ? (t && (clearTimeout(t), t = null), r = o, i.apply(this, s)) : t || (t = setTimeout(() => {
736
- r = Date.now(), t = null, i.apply(this, s);
639
+ function et(i, e) {
640
+ let t = null, s = 0;
641
+ return function(...r) {
642
+ const o = Date.now(), a = e - (o - s);
643
+ a <= 0 || a > e ? (t && (clearTimeout(t), t = null), s = o, i.apply(this, r)) : t || (t = setTimeout(() => {
644
+ s = Date.now(), t = null, i.apply(this, r);
737
645
  }, a));
738
646
  };
739
647
  }
740
- function We(i, e) {
648
+ function je(i, e) {
741
649
  let t = null;
742
- return function(...r) {
650
+ return function(...s) {
743
651
  t && clearTimeout(t), t = setTimeout(() => {
744
- i.apply(this, r);
652
+ i.apply(this, s);
745
653
  }, e);
746
654
  };
747
655
  }
748
- function Ke() {
656
+ function We() {
749
657
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
750
658
  const e = Math.random() * 16 | 0;
751
659
  return (i === "x" ? e : e & 3 | 8).toString(16);
752
660
  });
753
661
  }
754
- function Ge(i) {
662
+ function Ke(i) {
755
663
  if (!i) return null;
756
664
  const e = i.find(
757
- (t) => t.types.includes("country")
665
+ (t) => t.types?.includes("country")
758
666
  );
759
667
  return e ? e.short_name : null;
760
668
  }
761
- function de(i, e) {
669
+ function ae(i, e) {
762
670
  let t = null;
763
- return i.address_components ? t = Ge(i.address_components) : e && e.length === 1 && (t = e[0].toUpperCase()), t ? {
764
- isSupported: je.includes(t),
671
+ return i.address_components ? t = Ke(i.address_components) : e && e.length === 1 && (t = e[0].toUpperCase()), t ? {
672
+ isSupported: He.includes(t),
765
673
  countryCode: t
766
674
  } : {
767
675
  isSupported: null,
768
676
  countryCode: null
769
677
  };
770
678
  }
771
- function it(i, e) {
679
+ function tt(i, e) {
772
680
  const t = [];
773
- let r = 0;
681
+ let s = 0;
774
682
  return [...e].sort((o, a) => o.offset - a.offset).forEach((o) => {
775
- o.offset > r && t.push({
776
- text: i.substring(r, o.offset),
683
+ o.offset > s && t.push({
684
+ text: i.substring(s, o.offset),
777
685
  highlight: !1
778
686
  }), t.push({
779
687
  text: i.substring(o.offset, o.offset + o.length),
780
688
  highlight: !0
781
- }), r = o.offset + o.length;
782
- }), r < i.length && t.push({
783
- text: i.substring(r),
689
+ }), s = o.offset + o.length;
690
+ }), s < i.length && t.push({
691
+ text: i.substring(s),
784
692
  highlight: !1
785
693
  }), t;
786
694
  }
787
- const he = {
695
+ const ne = {
788
696
  en: {
789
697
  placeholder: "Search for an address...",
790
698
  noResults: "No address found for this search. Try different keywords.",
@@ -916,18 +824,18 @@ const he = {
916
824
  validationSaudiFormat: "Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"
917
825
  }
918
826
  };
919
- function K(i = "en") {
920
- return he[i] || he.en;
827
+ function B(i = "en") {
828
+ return ne[i] || ne.en;
921
829
  }
922
- function Ze(i) {
830
+ function Ge(i) {
923
831
  return ["ar"].includes(i);
924
832
  }
925
- var Ye = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, h = (i, e, t, r) => {
926
- for (var s = r > 1 ? void 0 : r ? Je(e, t) : e, o = i.length - 1, a; o >= 0; o--)
927
- (a = i[o]) && (s = (r ? a(e, t, s) : a(s)) || s);
928
- return r && s && Ye(e, t, s), s;
833
+ var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, h = (i, e, t, s) => {
834
+ for (var r = s > 1 ? void 0 : s ? Ye(e, t) : e, o = i.length - 1, a; o >= 0; o--)
835
+ (a = i[o]) && (r = (s ? a(e, t, r) : a(r)) || r);
836
+ return s && r && Ze(e, t, r), r;
929
837
  };
930
- let d = class extends I {
838
+ let d = class extends T {
931
839
  constructor() {
932
840
  super(), this.proxyUrl = "https://api.salla.dev", this.authToken = null, this.placeholder = "", this.defaultPlace = "", this.label = null, this.className = "", this.language = "en", this.dir = "auto", this.mode = "search", this.name = "", this.required = !1, this.pattern = null, this.tooltip = null, this.selectedId = null, this.errors = [], this.disabled = !1, this._value = "", this._country = null, this.locationBias = null, this.locationRestriction = null, this.types = null, this._fields = ["formatted_address", "geometry"], this.strictBounds = !1, this.useSessionToken = !0, this.resolve = !1, this.onValidateAddress = null, this.debounceDelay = 300, this.minChars = 3, this.predictions = [], this.isOpen = !1, this.isLoading = !1, this.error = null, this.activeIndex = -1, this.inputValue = "", this.sessionToken = null, this.validationError = null, this.touched = !1, this.showNationalAddressIcon = !1, this.abortController = null, this._internals = this.attachInternals();
933
841
  }
@@ -963,7 +871,7 @@ let d = class extends I {
963
871
  super.disconnectedCallback(), this.terminateSession(), this.cancelPendingRequest();
964
872
  }
965
873
  initializeDebounce() {
966
- this.debouncedFetch = We(this.fetchPredictions.bind(this), this.debounceDelay);
874
+ this.debouncedFetch = je(this.fetchPredictions.bind(this), this.debounceDelay);
967
875
  }
968
876
  firstUpdated() {
969
877
  const i = this.value || this.defaultPlace || "";
@@ -973,7 +881,7 @@ let d = class extends I {
973
881
  Promise.resolve().then(i);
974
882
  }
975
883
  isShortAddressFormat(i) {
976
- return /^[a-zA-Z]{4}\d{4}$/.test(i == null ? void 0 : i.trim());
884
+ return /^[a-zA-Z]{4}\d{4}$/.test(i?.trim());
977
885
  }
978
886
  updated(i) {
979
887
  if (i.has("value")) {
@@ -983,7 +891,7 @@ let d = class extends I {
983
891
  i.has("defaultPlace") && !this.value && this.defaultPlace !== this.inputValue && (this.inputValue = this.defaultPlace || "", this.isSaudiFormMode() && this.defaultPlace && this.isShortAddressFormat(this.defaultPlace) ? this.showNationalAddressIcon = !0 : this.showNationalAddressIcon = !1), i.has("selectedId") && this.selectedId && this.selectedId !== this.inputValue && this.isSaudiFormMode() && this.isShortAddressFormat(this.selectedId) && (this.inputValue = this.selectedId || "", this.showNationalAddressIcon = !0, this._internals.setFormValue(this.selectedId || "")), i.has("debounceDelay") && this.initializeDebounce();
984
892
  }
985
893
  createNewSession() {
986
- this.useSessionToken && (this.sessionToken = Ke());
894
+ this.useSessionToken && (this.sessionToken = We());
987
895
  }
988
896
  terminateSession() {
989
897
  this.sessionToken = null;
@@ -1006,13 +914,13 @@ let d = class extends I {
1006
914
  try {
1007
915
  const t = { input: i };
1008
916
  this.sessionToken && (t.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (t.country = this.country.join(",")), this.types && this.types.length > 0 && (t.types = this.types.join("|")), this.locationBias && this.locationBias.radius && this.locationBias.center && (t.location = `${this.locationBias.center.lat},${this.locationBias.center.lng}`, t.radius = this.locationBias.radius.toString()), this.strictBounds && (t.strictbounds = "true");
1009
- const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${r.toString()}`, a = {};
917
+ const s = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${s.toString()}`, a = {};
1010
918
  this.authToken && (a.Authorization = `Bearer ${this.authToken}`);
1011
- const l = await fetch(o, { signal: e, headers: a });
1012
- if (!l.ok)
1013
- throw new Error(`HTTP ${l.status}: ${l.statusText}`);
1014
- const n = await l.json();
1015
- n.success && Array.isArray(n.data) ? (this.error = null, n.data.length > 0 ? (this.predictions = n.data.map((c) => ({
919
+ const n = await fetch(o, { signal: e, headers: a });
920
+ if (!n.ok)
921
+ throw new Error(`HTTP ${n.status}: ${n.statusText}`);
922
+ const l = await n.json();
923
+ l.success && Array.isArray(l.data) ? (this.error = null, l.data.length > 0 ? (this.predictions = l.data.map((c) => ({
1016
924
  place_id: c.id,
1017
925
  description: c.description || c.formatted_address,
1018
926
  formatted_address: c.formatted_address,
@@ -1035,30 +943,30 @@ let d = class extends I {
1035
943
  }
1036
944
  }
1037
945
  async fetchPlaceDetails(i) {
1038
- var e;
1039
946
  this.isLoading = !0, this.error = null;
1040
947
  try {
1041
- const t = { place_id: i };
1042
- this.fields && this.fields.length > 0 && (t.fields = this.fields.join(",")), this.sessionToken && (t.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (t.country = this.country.join(",")), this.resolve && (t.resolve = "true");
1043
- const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${r.toString()}`, a = {};
1044
- this.authToken && (a.Authorization = `Bearer ${this.authToken}`);
1045
- const l = await fetch(o, { headers: a });
1046
- if (!l.ok)
1047
- throw new Error(`HTTP ${l.status}: ${l.statusText}`);
1048
- const n = await l.json();
948
+ const e = { place_id: i };
949
+ this.fields && this.fields.length > 0 && (e.fields = this.fields.join(",")), this.sessionToken && (e.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (e.country = this.country.join(",")), this.resolve && (e.resolve = "true");
950
+ const t = new URLSearchParams(e), r = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${t.toString()}`, o = {};
951
+ this.authToken && (o.Authorization = `Bearer ${this.authToken}`);
952
+ const a = await fetch(r, { headers: o });
953
+ if (!a.ok)
954
+ throw new Error(`HTTP ${a.status}: ${a.statusText}`);
955
+ const n = await a.json();
1049
956
  return !n.success || n.message ? (this.error = n.message || "Failed to fetch place details", null) : n.success && n.data && n.data.id ? {
1050
957
  place_id: n.data.id,
1051
958
  ...n.data,
1052
- components: (e = n.data.address_components) == null ? void 0 : e.reduce((c, u) => (u.types.forEach((v) => {
1053
- c[v] || (c[v] = []), c[v].push({
1054
- long_name: u.long_name,
1055
- short_name: u.short_name
959
+ components: n.data.address_components?.reduce((m, c) => (c.types?.forEach((u) => {
960
+ m[u] || (m[u] = []), m[u].push({
961
+ long_name: c.long_name,
962
+ short_name: c.short_name
1056
963
  });
1057
- }), c), {})
964
+ }), m), {})
1058
965
  } : null;
1059
- } catch (t) {
1060
- const r = K(this.language);
1061
- return this.error = t instanceof Error ? t.message : r.errorFetchDetails, null;
966
+ } catch (e) {
967
+ console.error("Error fetching place details:", e);
968
+ const t = B(this.language);
969
+ return this.error = e instanceof Error ? e.message : t.errorFetchDetails, null;
1062
970
  } finally {
1063
971
  this.isLoading = !1;
1064
972
  }
@@ -1069,7 +977,7 @@ let d = class extends I {
1069
977
  return console.error("Cannot validate address - place or formatted_address is missing"), null;
1070
978
  if (!this.onValidateAddress || typeof this.onValidateAddress != "function")
1071
979
  return console.error("onValidateAddress callback is required for address validation"), null;
1072
- const e = de(i, this.country), t = await this.onValidateAddress({
980
+ const e = ae(i, this.country), t = await this.onValidateAddress({
1073
981
  place: i,
1074
982
  sessionToken: this.sessionToken,
1075
983
  validationSupport: e
@@ -1080,7 +988,7 @@ let d = class extends I {
1080
988
  }
1081
989
  }
1082
990
  getValidationSupport(i) {
1083
- return de(i, this.country);
991
+ return ae(i, this.country);
1084
992
  }
1085
993
  isSaudiFormMode() {
1086
994
  return this.mode === "form" && this.country !== null && this.country.length === 1 && this.country[0].toLowerCase() === "sa";
@@ -1106,10 +1014,10 @@ let d = class extends I {
1106
1014
  const i = this.inputValue && this.inputValue.trim().length > 0;
1107
1015
  let e, t;
1108
1016
  i ? (e = "العنوان الوطني المختصر غير صحيح (الصيغة: AAAA1234). يمكنك الحصول عليه بسهولة", t = "The short national address format is incorrect (format: AAAA1234). You can easily get it") : (e = "العنوان الوطني المختصر مطلوب. يمكنك الحصول عليه بسهولة", t = "The short national address is required. You can easily get it");
1109
- const r = "عبر الواتساب (اضغط هنا)", s = "via WhatsApp (click here)", o = "أو ابحث أعلاه", a = "or search above", l = this.language === "ar" ? e : t, n = this.language === "ar" ? r : s, m = this.language === "ar" ? o : a;
1017
+ const s = "عبر الواتساب (اضغط هنا)", r = "via WhatsApp (click here)", o = "أو ابحث أعلاه", a = "or search above", n = this.language === "ar" ? e : t, l = this.language === "ar" ? s : r, m = this.language === "ar" ? o : a;
1110
1018
  return g`
1111
1019
  <span>
1112
- ${l}
1020
+ ${n}
1113
1021
  <a
1114
1022
  href="${this.getWhatsAppLink()}"
1115
1023
  target="_blank"
@@ -1118,7 +1026,7 @@ let d = class extends I {
1118
1026
  part="whatsapp-link"
1119
1027
  >
1120
1028
  ${this.renderWhatsAppIcon()}
1121
- ${n}
1029
+ ${l}
1122
1030
  </a>
1123
1031
  ${m}
1124
1032
  </span>
@@ -1127,7 +1035,7 @@ let d = class extends I {
1127
1035
  renderSaudiHelpText() {
1128
1036
  if (!this.isSaudiFormMode() || this.validationError || this.errors && this.errors.length > 0)
1129
1037
  return "";
1130
- const i = "لا تعرف العنوان الوطني؟ احصل عليه بسهولة", e = "Don't know your national address? Get it easily", t = "عبر الواتساب (اضغط هنا)", r = "via WhatsApp (click here)", s = "أو ابحث أعلاه", o = "or search above", a = this.language === "ar" ? i : e, l = this.language === "ar" ? t : r, n = this.language === "ar" ? s : o;
1038
+ const i = "لا تعرف العنوان الوطني؟ احصل عليه بسهولة", e = "Don't know your national address? Get it easily", t = "عبر الواتساب (اضغط هنا)", s = "via WhatsApp (click here)", r = "أو ابحث أعلاه", o = "or search above", a = this.language === "ar" ? i : e, n = this.language === "ar" ? t : s, l = this.language === "ar" ? r : o;
1131
1039
  return g`
1132
1040
  <div class="help-text" part="help-text">
1133
1041
  <span>
@@ -1140,9 +1048,9 @@ let d = class extends I {
1140
1048
  part="whatsapp-link"
1141
1049
  >
1142
1050
  ${this.renderWhatsAppIcon()}
1143
- ${l}
1051
+ ${n}
1144
1052
  </a>
1145
- ${n}
1053
+ ${l}
1146
1054
  </span>
1147
1055
  </div>
1148
1056
  `;
@@ -1172,7 +1080,7 @@ let d = class extends I {
1172
1080
  validate() {
1173
1081
  if (this.mode !== "form")
1174
1082
  return !0;
1175
- const i = K(this.language), e = this.inputValue || "";
1083
+ const i = B(this.language), e = this.inputValue || "";
1176
1084
  return this.required && !e.trim() ? (this.validationError = i.validationRequired, this._internals.setValidity(
1177
1085
  { valueMissing: !0 },
1178
1086
  this.validationError,
@@ -1204,11 +1112,10 @@ let d = class extends I {
1204
1112
  }));
1205
1113
  }
1206
1114
  async handleSelect(i) {
1207
- var t;
1208
1115
  if (this.disabled) return;
1209
1116
  this.isSaudiFormMode() && i.place_id && this.isShortAddressFormat(i.place_id) ? (this.inputValue = i.place_id, this.showNationalAddressIcon = !0) : (this.inputValue = i.formatted_address, this.showNationalAddressIcon = !1), this.isOpen = !1, this.predictions = [], this.touched = !0;
1210
1117
  let e = null;
1211
- if (this.mode === "form" ? e = await this.fetchPlaceDetails(i.place_id) : (t = i.geometry) != null && t.location ? e = {
1118
+ if (this.mode === "form" ? e = await this.fetchPlaceDetails(i.place_id) : i.geometry?.location ? e = {
1212
1119
  place_id: i.place_id,
1213
1120
  formatted_address: i.formatted_address || i.description,
1214
1121
  geometry: i.geometry,
@@ -1223,13 +1130,13 @@ let d = class extends I {
1223
1130
  bubbles: !0,
1224
1131
  composed: !0
1225
1132
  }));
1226
- const r = this.getValidationSupport(e);
1133
+ const t = this.getValidationSupport(e);
1227
1134
  this.dispatchEvent(new CustomEvent("place-select", {
1228
- detail: { place: e, validationSupport: r },
1135
+ detail: { place: e, validationSupport: t },
1229
1136
  bubbles: !0,
1230
1137
  composed: !0
1231
1138
  })), this.dispatchEvent(new CustomEvent("place-changed", {
1232
- detail: { place: e, validationSupport: r },
1139
+ detail: { place: e, validationSupport: t },
1233
1140
  bubbles: !0,
1234
1141
  composed: !0
1235
1142
  }));
@@ -1285,10 +1192,10 @@ let d = class extends I {
1285
1192
  "dropdown-item": !0,
1286
1193
  active: e === this.activeIndex
1287
1194
  };
1288
- let r = i.structured_formatting.main_text;
1289
- return i.short_address && r.includes(i.short_address) && (r = r.replace(i.short_address, "").trim(), r = r.replace(/\s*,\s*,\s*/g, ", ").replace(/^\s*,\s*|\s*,\s*$/g, "").trim()), g`
1195
+ let s = i.structured_formatting.main_text;
1196
+ return i.short_address && s.includes(i.short_address) && (s = s.replace(i.short_address, "").trim(), s = s.replace(/\s*,\s*,\s*/g, ", ").replace(/^\s*,\s*|\s*,\s*$/g, "").trim()), g`
1290
1197
  <div
1291
- class=${O(t)}
1198
+ class=${F(t)}
1292
1199
  part="dropdown-item ${e === this.activeIndex ? "dropdown-item-active" : ""}"
1293
1200
  @click=${() => this.handleSelect(i)}
1294
1201
  role="option"
@@ -1308,7 +1215,7 @@ let d = class extends I {
1308
1215
  <span class="national-address-separator">-</span>
1309
1216
  </span>
1310
1217
  ` : ""}
1311
- ${r}
1218
+ ${s}
1312
1219
  </div>
1313
1220
  ${i.structured_formatting.secondary_text ? g`
1314
1221
  <div class="secondary-text" part="secondary-text">
@@ -1328,12 +1235,12 @@ let d = class extends I {
1328
1235
  "with-national-icon": this.showNationalAddressIcon
1329
1236
  }, t = {
1330
1237
  required: this.mode === "form" && this.required
1331
- }, r = K(this.language), s = this.dir === "auto" ? Ze(this.language) ? "rtl" : "ltr" : this.dir, o = this.placeholder || r.placeholder, a = this.name || "salla-address-search";
1238
+ }, s = B(this.language), r = this.dir === "auto" ? Ge(this.language) ? "rtl" : "ltr" : this.dir, o = this.placeholder || s.placeholder, a = this.name || "salla-address-search";
1332
1239
  return g`
1333
- <div class="wrapper ${this.className}" part="wrapper" dir="${s}">
1240
+ <div class="wrapper ${this.className}" part="wrapper" dir="${r}">
1334
1241
  <div class="input-container" part="input-container">
1335
1242
  ${this.label ? g`
1336
- <label part="label" class=${O(t)}>
1243
+ <label part="label" class=${F(t)}>
1337
1244
  <span class="label-content">
1338
1245
  <span>${this.label}</span>
1339
1246
  ${this.renderTooltip()}
@@ -1343,7 +1250,7 @@ let d = class extends I {
1343
1250
  <div class="input-wrapper">
1344
1251
  <input
1345
1252
  part="input"
1346
- class=${O(e)}
1253
+ class=${F(e)}
1347
1254
  type="text"
1348
1255
  name="${a}"
1349
1256
  .value=${this.inputValue}
@@ -1368,11 +1275,11 @@ let d = class extends I {
1368
1275
 
1369
1276
  <div
1370
1277
  id="predictions-list"
1371
- class=${O(i)}
1278
+ class=${F(i)}
1372
1279
  part="dropdown"
1373
1280
  role="listbox"
1374
1281
  >
1375
- ${this.predictions.length > 0 ? this.predictions.map((l, n) => this.renderPrediction(l, n)) : this.inputValue && !this.isLoading ? g`<div class="no-results" part="no-results">${r.noResults}</div>` : ""}
1282
+ ${this.predictions.length > 0 ? this.predictions.map((n, l) => this.renderPrediction(n, l)) : this.inputValue && !this.isLoading ? g`<div class="no-results" part="no-results">${s.noResults}</div>` : ""}
1376
1283
  </div>
1377
1284
  </div>
1378
1285
  ${this.mode === "form" && this.validationError ? g`
@@ -1391,7 +1298,7 @@ let d = class extends I {
1391
1298
  }
1392
1299
  };
1393
1300
  d.formAssociated = !0;
1394
- d.styles = be`
1301
+ d.styles = me`
1395
1302
  :host {
1396
1303
  display: block;
1397
1304
  position: relative;
@@ -1956,50 +1863,50 @@ h([
1956
1863
  p({ type: Number })
1957
1864
  ], d.prototype, "minChars", 2);
1958
1865
  h([
1959
- b()
1866
+ v()
1960
1867
  ], d.prototype, "predictions", 2);
1961
1868
  h([
1962
- b()
1869
+ v()
1963
1870
  ], d.prototype, "isOpen", 2);
1964
1871
  h([
1965
- b()
1872
+ v()
1966
1873
  ], d.prototype, "isLoading", 2);
1967
1874
  h([
1968
- b()
1875
+ v()
1969
1876
  ], d.prototype, "error", 2);
1970
1877
  h([
1971
- b()
1878
+ v()
1972
1879
  ], d.prototype, "activeIndex", 2);
1973
1880
  h([
1974
- b()
1881
+ v()
1975
1882
  ], d.prototype, "inputValue", 2);
1976
1883
  h([
1977
- b()
1884
+ v()
1978
1885
  ], d.prototype, "sessionToken", 2);
1979
1886
  h([
1980
- b()
1887
+ v()
1981
1888
  ], d.prototype, "validationError", 2);
1982
1889
  h([
1983
- b()
1890
+ v()
1984
1891
  ], d.prototype, "touched", 2);
1985
1892
  h([
1986
- b()
1893
+ v()
1987
1894
  ], d.prototype, "showNationalAddressIcon", 2);
1988
1895
  h([
1989
- Le("input")
1896
+ Me("input")
1990
1897
  ], d.prototype, "inputElement", 2);
1991
1898
  d = h([
1992
- Ve("salla-address-autocomplete")
1899
+ Ue("salla-address-autocomplete")
1993
1900
  ], d);
1994
1901
  export {
1995
- je as ADDRESS_VALIDATION_SUPPORTED_COUNTRIES,
1902
+ He as ADDRESS_VALIDATION_SUPPORTED_COUNTRIES,
1996
1903
  d as SallaAddressAutocomplete,
1997
- de as checkValidationSupport,
1998
- We as debounce,
1999
- Ke as generateSessionToken,
2000
- Ge as getCountryCode,
2001
- K as getTranslations,
2002
- Ze as isRTL,
2003
- it as parseHighlight,
2004
- tt as throttle
1904
+ ae as checkValidationSupport,
1905
+ je as debounce,
1906
+ We as generateSessionToken,
1907
+ Ke as getCountryCode,
1908
+ B as getTranslations,
1909
+ Ge as isRTL,
1910
+ tt as parseHighlight,
1911
+ et as throttle
2005
1912
  };