@record-evolution/widget-form 1.0.17 → 1.0.19

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.
@@ -8,18 +8,18 @@ import "@material/web/textfield/outlined-text-field.js";
8
8
  import "@material/web/checkbox/checkbox.js";
9
9
  import "@material/web/select/outlined-select.js";
10
10
  import "@material/web/select/select-option.js";
11
- const N = globalThis, W = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
11
+ const H = globalThis, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
12
12
  let dt = class {
13
- constructor(t, s, i) {
14
- if (this._$cssResult$ = !0, i !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
13
+ constructor(t, s, r) {
14
+ if (this._$cssResult$ = !0, r !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
15
15
  this.cssText = t, this.t = s;
16
16
  }
17
17
  get styleSheet() {
18
18
  let t = this.o;
19
19
  const s = this.t;
20
20
  if (W && t === void 0) {
21
- const i = s !== void 0 && s.length === 1;
22
- i && (t = Y.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Y.set(s, t));
21
+ const r = s !== void 0 && s.length === 1;
22
+ r && (t = Y.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Y.set(s, t));
23
23
  }
24
24
  return t;
25
25
  }
@@ -28,27 +28,27 @@ let dt = class {
28
28
  }
29
29
  };
30
30
  const yt = (e) => new dt(typeof e == "string" ? e : e + "", void 0, K), vt = (e, ...t) => {
31
- const s = e.length === 1 ? e[0] : t.reduce(((i, r, o) => i + ((n) => {
32
- if (n._$cssResult$ === !0) return n.cssText;
33
- if (typeof n == "number") return n;
34
- 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.");
35
- })(r) + e[o + 1]), e[0]);
31
+ const s = e.length === 1 ? e[0] : t.reduce(((r, i, n) => r + ((o) => {
32
+ if (o._$cssResult$ === !0) return o.cssText;
33
+ if (typeof o == "number") return o;
34
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
35
+ })(i) + e[n + 1]), e[0]);
36
36
  return new dt(s, e, K);
37
37
  }, At = (e, t) => {
38
38
  if (W) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
39
39
  else for (const s of t) {
40
- const i = document.createElement("style"), r = N.litNonce;
41
- r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
40
+ const r = document.createElement("style"), i = H.litNonce;
41
+ i !== void 0 && r.setAttribute("nonce", i), r.textContent = s.cssText, e.appendChild(r);
42
42
  }
43
43
  }, tt = W ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
44
44
  let s = "";
45
- for (const i of t.cssRules) s += i.cssText;
45
+ for (const r of t.cssRules) s += r.cssText;
46
46
  return yt(s);
47
47
  })(e) : e;
48
- const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnPropertyNames: Et, getOwnPropertySymbols: Ct, getPrototypeOf: Pt } = Object, j = globalThis, et = j.trustedTypes, Dt = et ? et.emptyScript : "", Ot = j.reactiveElementPolyfillSupport, T = (e, t) => e, F = { toAttribute(e, t) {
48
+ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: Et, getOwnPropertyNames: St, getOwnPropertySymbols: Ct, getPrototypeOf: Pt } = Object, R = globalThis, et = R.trustedTypes, kt = et ? et.emptyScript : "", Dt = R.reactiveElementPolyfillSupport, O = (e, t) => e, V = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- e = e ? Dt : null;
51
+ e = e ? kt : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,9 +73,9 @@ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnProperty
73
73
  }
74
74
  }
75
75
  return s;
76
- } }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter: F, reflect: !1, useDefault: !1, hasChanged: Z };
77
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), j.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let E = class extends HTMLElement {
76
+ } }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: Z };
77
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
+ let S = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ??= []).push(t);
81
81
  }
@@ -84,58 +84,58 @@ let E = class extends HTMLElement {
84
84
  }
85
85
  static createProperty(t, s = st) {
86
86
  if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
87
- const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, s);
88
- r !== void 0 && wt(this.prototype, t, r);
87
+ const r = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, r, s);
88
+ i !== void 0 && wt(this.prototype, t, i);
89
89
  }
90
90
  }
91
- static getPropertyDescriptor(t, s, i) {
92
- const { get: r, set: o } = St(this.prototype, t) ?? { get() {
91
+ static getPropertyDescriptor(t, s, r) {
92
+ const { get: i, set: n } = Et(this.prototype, t) ?? { get() {
93
93
  return this[s];
94
- }, set(n) {
95
- this[s] = n;
94
+ }, set(o) {
95
+ this[s] = o;
96
96
  } };
97
- return { get: r, set(n) {
98
- const h = r?.call(this);
99
- o?.call(this, n), this.requestUpdate(t, h, i);
97
+ return { get: i, set(o) {
98
+ const h = i?.call(this);
99
+ n?.call(this, o), this.requestUpdate(t, h, r);
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
102
  static getPropertyOptions(t) {
103
103
  return this.elementProperties.get(t) ?? st;
104
104
  }
105
105
  static _$Ei() {
106
- if (this.hasOwnProperty(T("elementProperties"))) return;
106
+ if (this.hasOwnProperty(O("elementProperties"))) return;
107
107
  const t = Pt(this);
108
108
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
109
109
  }
110
110
  static finalize() {
111
- if (this.hasOwnProperty(T("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
113
- const s = this.properties, i = [...Et(s), ...Ct(s)];
114
- for (const r of i) this.createProperty(r, s[r]);
111
+ if (this.hasOwnProperty(O("finalized"))) return;
112
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
113
+ const s = this.properties, r = [...St(s), ...Ct(s)];
114
+ for (const i of r) this.createProperty(i, s[i]);
115
115
  }
116
116
  const t = this[Symbol.metadata];
117
117
  if (t !== null) {
118
118
  const s = litPropertyMetadata.get(t);
119
- if (s !== void 0) for (const [i, r] of s) this.elementProperties.set(i, r);
119
+ if (s !== void 0) for (const [r, i] of s) this.elementProperties.set(r, i);
120
120
  }
121
121
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [s, i] of this.elementProperties) {
123
- const r = this._$Eu(s, i);
124
- r !== void 0 && this._$Eh.set(r, s);
122
+ for (const [s, r] of this.elementProperties) {
123
+ const i = this._$Eu(s, r);
124
+ i !== void 0 && this._$Eh.set(i, s);
125
125
  }
126
126
  this.elementStyles = this.finalizeStyles(this.styles);
127
127
  }
128
128
  static finalizeStyles(t) {
129
129
  const s = [];
130
130
  if (Array.isArray(t)) {
131
- const i = new Set(t.flat(1 / 0).reverse());
132
- for (const r of i) s.unshift(tt(r));
131
+ const r = new Set(t.flat(1 / 0).reverse());
132
+ for (const i of r) s.unshift(tt(i));
133
133
  } else t !== void 0 && s.push(tt(t));
134
134
  return s;
135
135
  }
136
136
  static _$Eu(t, s) {
137
- const i = s.attribute;
138
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
137
+ const r = s.attribute;
138
+ return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
139
139
  }
140
140
  constructor() {
141
141
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -151,7 +151,7 @@ let E = class extends HTMLElement {
151
151
  }
152
152
  _$E_() {
153
153
  const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
154
- for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
154
+ for (const r of s.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
155
155
  t.size > 0 && (this._$Ep = t);
156
156
  }
157
157
  createRenderRoot() {
@@ -166,33 +166,33 @@ let E = class extends HTMLElement {
166
166
  disconnectedCallback() {
167
167
  this._$EO?.forEach(((t) => t.hostDisconnected?.()));
168
168
  }
169
- attributeChangedCallback(t, s, i) {
170
- this._$AK(t, i);
169
+ attributeChangedCallback(t, s, r) {
170
+ this._$AK(t, r);
171
171
  }
172
172
  _$ET(t, s) {
173
- const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
174
- if (r !== void 0 && i.reflect === !0) {
175
- const o = (i.converter?.toAttribute !== void 0 ? i.converter : F).toAttribute(s, i.type);
176
- this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
173
+ const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r);
174
+ if (i !== void 0 && r.reflect === !0) {
175
+ const n = (r.converter?.toAttribute !== void 0 ? r.converter : V).toAttribute(s, r.type);
176
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
177
177
  }
178
178
  }
179
179
  _$AK(t, s) {
180
- const i = this.constructor, r = i._$Eh.get(t);
181
- if (r !== void 0 && this._$Em !== r) {
182
- const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : F;
183
- this._$Em = r, this[r] = n.fromAttribute(s, o.type) ?? this._$Ej?.get(r) ?? null, this._$Em = null;
180
+ const r = this.constructor, i = r._$Eh.get(t);
181
+ if (i !== void 0 && this._$Em !== i) {
182
+ const n = r.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : V;
183
+ this._$Em = i, this[i] = o.fromAttribute(s, n.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
184
184
  }
185
185
  }
186
- requestUpdate(t, s, i) {
186
+ requestUpdate(t, s, r) {
187
187
  if (t !== void 0) {
188
- const r = this.constructor, o = this[t];
189
- if (i ??= r.getPropertyOptions(t), !((i.hasChanged ?? Z)(o, s) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
190
- this.C(t, s, i);
188
+ const i = this.constructor, n = this[t];
189
+ if (r ??= i.getPropertyOptions(t), !((r.hasChanged ?? Z)(n, s) || r.useDefault && r.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, r)))) return;
190
+ this.C(t, s, r);
191
191
  }
192
192
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
193
193
  }
194
- C(t, s, { useDefault: i, reflect: r, wrapped: o }, n) {
195
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? s ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
194
+ C(t, s, { useDefault: r, reflect: i, wrapped: n }, o) {
195
+ r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? s ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (s = void 0), this._$AL.set(t, s)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
196
196
  }
197
197
  async _$EP() {
198
198
  this.isUpdatePending = !0;
@@ -211,21 +211,21 @@ let E = class extends HTMLElement {
211
211
  if (!this.isUpdatePending) return;
212
212
  if (!this.hasUpdated) {
213
213
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
214
- for (const [r, o] of this._$Ep) this[r] = o;
214
+ for (const [i, n] of this._$Ep) this[i] = n;
215
215
  this._$Ep = void 0;
216
216
  }
217
- const i = this.constructor.elementProperties;
218
- if (i.size > 0) for (const [r, o] of i) {
219
- const { wrapped: n } = o, h = this[r];
220
- n !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, o, h);
217
+ const r = this.constructor.elementProperties;
218
+ if (r.size > 0) for (const [i, n] of r) {
219
+ const { wrapped: o } = n, h = this[i];
220
+ o !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
221
221
  }
222
222
  }
223
223
  let t = !1;
224
224
  const s = this._$AL;
225
225
  try {
226
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(s)) : this._$EM();
227
- } catch (i) {
228
- throw t = !1, this._$EM(), i;
226
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(s)) : this._$EM();
227
+ } catch (r) {
228
+ throw t = !1, this._$EM(), r;
229
229
  }
230
230
  t && this._$AE(s);
231
231
  }
@@ -254,70 +254,70 @@ let E = class extends HTMLElement {
254
254
  firstUpdated(t) {
255
255
  }
256
256
  };
257
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), Ot?.({ ReactiveElement: E }), (j.reactiveElementVersions ??= []).push("2.1.0");
258
- const J = globalThis, V = J.trustedTypes, it = V ? V.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Tt = `<${mt}>`, w = document, k = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Ut = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
259
- \f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
260
- \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, kt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = kt(1), S = /* @__PURE__ */ Symbol.for("lit-noChange"), p = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
257
+ S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[O("elementProperties")] = /* @__PURE__ */ new Map(), S[O("finalized")] = /* @__PURE__ */ new Map(), Dt?.({ ReactiveElement: S }), (R.reactiveElementVersions ??= []).push("2.1.0");
258
+ const J = globalThis, N = J.trustedTypes, rt = N ? N.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Ot = `<${mt}>`, w = document, U = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Tt = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
259
+ \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
260
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Ut = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = Ut(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
261
261
  function ft(e, t) {
262
262
  if (!Q(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
- return it !== void 0 ? it.createHTML(t) : t;
263
+ return rt !== void 0 ? rt.createHTML(t) : t;
264
264
  }
265
265
  const Mt = (e, t) => {
266
- const s = e.length - 1, i = [];
267
- let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = D;
266
+ const s = e.length - 1, r = [];
267
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
268
268
  for (let h = 0; h < s; h++) {
269
269
  const l = e[h];
270
- let c, m, a = -1, d = 0;
271
- for (; d < l.length && (n.lastIndex = d, m = n.exec(l), m !== null); ) d = n.lastIndex, n === D ? m[1] === "!--" ? n = rt : m[1] !== void 0 ? n = ot : m[2] !== void 0 ? ($t.test(m[2]) && (r = RegExp("</" + m[2], "g")), n = v) : m[3] !== void 0 && (n = v) : n === v ? m[0] === ">" ? (n = r ?? D, a = -1) : m[1] === void 0 ? a = -2 : (a = n.lastIndex - m[2].length, c = m[1], n = m[3] === void 0 ? v : m[3] === '"' ? lt : nt) : n === lt || n === nt ? n = v : n === rt || n === ot ? n = D : (n = v, r = void 0);
272
- const u = n === v && e[h + 1].startsWith("/>") ? " " : "";
273
- o += n === D ? l + Tt : a >= 0 ? (i.push(c), l.slice(0, a) + pt + l.slice(a) + y + u) : l + y + (a === -2 ? h : u);
270
+ let c, p, a = -1, d = 0;
271
+ for (; d < l.length && (o.lastIndex = d, p = o.exec(l), p !== null); ) d = o.lastIndex, o === k ? p[1] === "!--" ? o = it : p[1] !== void 0 ? o = ot : p[2] !== void 0 ? ($t.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? k, a = -1) : p[1] === void 0 ? a = -2 : (a = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? lt : nt) : o === lt || o === nt ? o = v : o === it || o === ot ? o = k : (o = v, i = void 0);
272
+ const u = o === v && e[h + 1].startsWith("/>") ? " " : "";
273
+ n += o === k ? l + Ot : a >= 0 ? (r.push(c), l.slice(0, a) + pt + l.slice(a) + y + u) : l + y + (a === -2 ? h : u);
274
274
  }
275
- return [ft(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
275
+ return [ft(e, n + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
276
276
  };
277
- class H {
278
- constructor({ strings: t, _$litType$: s }, i) {
279
- let r;
277
+ class F {
278
+ constructor({ strings: t, _$litType$: s }, r) {
279
+ let i;
280
280
  this.parts = [];
281
- let o = 0, n = 0;
282
- const h = t.length - 1, l = this.parts, [c, m] = Mt(t, s);
283
- if (this.el = H.createElement(c, i), x.currentNode = this.el.content, s === 2 || s === 3) {
281
+ let n = 0, o = 0;
282
+ const h = t.length - 1, l = this.parts, [c, p] = Mt(t, s);
283
+ if (this.el = F.createElement(c, r), x.currentNode = this.el.content, s === 2 || s === 3) {
284
284
  const a = this.el.content.firstChild;
285
285
  a.replaceWith(...a.childNodes);
286
286
  }
287
- for (; (r = x.nextNode()) !== null && l.length < h; ) {
288
- if (r.nodeType === 1) {
289
- if (r.hasAttributes()) for (const a of r.getAttributeNames()) if (a.endsWith(pt)) {
290
- const d = m[n++], u = r.getAttribute(a).split(y), $ = /([.?@])?(.*)/.exec(d);
291
- l.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? Rt : $[1] === "?" ? Nt : $[1] === "@" ? Ft : B }), r.removeAttribute(a);
292
- } else a.startsWith(y) && (l.push({ type: 6, index: o }), r.removeAttribute(a));
293
- if ($t.test(r.tagName)) {
294
- const a = r.textContent.split(y), d = a.length - 1;
287
+ for (; (i = x.nextNode()) !== null && l.length < h; ) {
288
+ if (i.nodeType === 1) {
289
+ if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(pt)) {
290
+ const d = p[o++], u = i.getAttribute(a).split(y), $ = /([.?@])?(.*)/.exec(d);
291
+ l.push({ type: 1, index: n, name: $[2], strings: u, ctor: $[1] === "." ? Ht : $[1] === "?" ? Vt : $[1] === "@" ? Nt : j }), i.removeAttribute(a);
292
+ } else a.startsWith(y) && (l.push({ type: 6, index: n }), i.removeAttribute(a));
293
+ if ($t.test(i.tagName)) {
294
+ const a = i.textContent.split(y), d = a.length - 1;
295
295
  if (d > 0) {
296
- r.textContent = V ? V.emptyScript : "";
297
- for (let u = 0; u < d; u++) r.append(a[u], k()), x.nextNode(), l.push({ type: 2, index: ++o });
298
- r.append(a[d], k());
296
+ i.textContent = N ? N.emptyScript : "";
297
+ for (let u = 0; u < d; u++) i.append(a[u], U()), x.nextNode(), l.push({ type: 2, index: ++n });
298
+ i.append(a[d], U());
299
299
  }
300
300
  }
301
- } else if (r.nodeType === 8) if (r.data === mt) l.push({ type: 2, index: o });
301
+ } else if (i.nodeType === 8) if (i.data === mt) l.push({ type: 2, index: n });
302
302
  else {
303
303
  let a = -1;
304
- for (; (a = r.data.indexOf(y, a + 1)) !== -1; ) l.push({ type: 7, index: o }), a += y.length - 1;
304
+ for (; (a = i.data.indexOf(y, a + 1)) !== -1; ) l.push({ type: 7, index: n }), a += y.length - 1;
305
305
  }
306
- o++;
306
+ n++;
307
307
  }
308
308
  }
309
309
  static createElement(t, s) {
310
- const i = w.createElement("template");
311
- return i.innerHTML = t, i;
310
+ const r = w.createElement("template");
311
+ return r.innerHTML = t, r;
312
312
  }
313
313
  }
314
- function C(e, t, s = e, i) {
315
- if (t === S) return t;
316
- let r = i !== void 0 ? s._$Co?.[i] : s._$Cl;
317
- const o = M(t) ? void 0 : t._$litDirective$;
318
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(e), r._$AT(e, s, i)), i !== void 0 ? (s._$Co ??= [])[i] = r : s._$Cl = r), r !== void 0 && (t = C(e, r._$AS(e, t.values), r, i)), t;
314
+ function C(e, t, s = e, r) {
315
+ if (t === E) return t;
316
+ let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
317
+ const n = M(t) ? void 0 : t._$litDirective$;
318
+ return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (t = C(e, i._$AS(e, t.values), i, r)), t;
319
319
  }
320
- let Ht = class {
320
+ let Ft = class {
321
321
  constructor(t, s) {
322
322
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
323
323
  }
@@ -328,29 +328,29 @@ let Ht = class {
328
328
  return this._$AM._$AU;
329
329
  }
330
330
  u(t) {
331
- const { el: { content: s }, parts: i } = this._$AD, r = (t?.creationScope ?? w).importNode(s, !0);
332
- x.currentNode = r;
333
- let o = x.nextNode(), n = 0, h = 0, l = i[0];
331
+ const { el: { content: s }, parts: r } = this._$AD, i = (t?.creationScope ?? w).importNode(s, !0);
332
+ x.currentNode = i;
333
+ let n = x.nextNode(), o = 0, h = 0, l = r[0];
334
334
  for (; l !== void 0; ) {
335
- if (n === l.index) {
335
+ if (o === l.index) {
336
336
  let c;
337
- l.type === 2 ? c = new P(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Vt(o, this, t)), this._$AV.push(c), l = i[++h];
337
+ l.type === 2 ? c = new P(n, n.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (c = new Rt(n, this, t)), this._$AV.push(c), l = r[++h];
338
338
  }
339
- n !== l?.index && (o = x.nextNode(), n++);
339
+ o !== l?.index && (n = x.nextNode(), o++);
340
340
  }
341
- return x.currentNode = w, r;
341
+ return x.currentNode = w, i;
342
342
  }
343
343
  p(t) {
344
344
  let s = 0;
345
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
345
+ for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, s), s += r.strings.length - 2) : r._$AI(t[s])), s++;
346
346
  }
347
347
  };
348
348
  class P {
349
349
  get _$AU() {
350
350
  return this._$AM?._$AU ?? this._$Cv;
351
351
  }
352
- constructor(t, s, i, r) {
353
- this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
352
+ constructor(t, s, r, i) {
353
+ this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
354
354
  }
355
355
  get parentNode() {
356
356
  let t = this._$AA.parentNode;
@@ -364,7 +364,7 @@ class P {
364
364
  return this._$AB;
365
365
  }
366
366
  _$AI(t, s = this) {
367
- t = C(this, t, s), M(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ut(t) ? this.k(t) : this._(t);
367
+ t = C(this, t, s), M(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Tt(t) ? this.k(t) : this._(t);
368
368
  }
369
369
  O(t) {
370
370
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -373,94 +373,94 @@ class P {
373
373
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
374
374
  }
375
375
  _(t) {
376
- this._$AH !== p && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
376
+ this._$AH !== m && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
377
377
  }
378
378
  $(t) {
379
- const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = H.createElement(ft(i.h, i.h[0]), this.options)), i);
380
- if (this._$AH?._$AD === r) this._$AH.p(s);
379
+ const { values: s, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = F.createElement(ft(r.h, r.h[0]), this.options)), r);
380
+ if (this._$AH?._$AD === i) this._$AH.p(s);
381
381
  else {
382
- const o = new Ht(r, this), n = o.u(this.options);
383
- o.p(s), this.T(n), this._$AH = o;
382
+ const n = new Ft(i, this), o = n.u(this.options);
383
+ n.p(s), this.T(o), this._$AH = n;
384
384
  }
385
385
  }
386
386
  _$AC(t) {
387
387
  let s = at.get(t.strings);
388
- return s === void 0 && at.set(t.strings, s = new H(t)), s;
388
+ return s === void 0 && at.set(t.strings, s = new F(t)), s;
389
389
  }
390
390
  k(t) {
391
391
  Q(this._$AH) || (this._$AH = [], this._$AR());
392
392
  const s = this._$AH;
393
- let i, r = 0;
394
- for (const o of t) r === s.length ? s.push(i = new P(this.O(k()), this.O(k()), this, this.options)) : i = s[r], i._$AI(o), r++;
395
- r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
393
+ let r, i = 0;
394
+ for (const n of t) i === s.length ? s.push(r = new P(this.O(U()), this.O(U()), this, this.options)) : r = s[i], r._$AI(n), i++;
395
+ i < s.length && (this._$AR(r && r._$AB.nextSibling, i), s.length = i);
396
396
  }
397
397
  _$AR(t = this._$AA.nextSibling, s) {
398
398
  for (this._$AP?.(!1, !0, s); t && t !== this._$AB; ) {
399
- const i = t.nextSibling;
400
- t.remove(), t = i;
399
+ const r = t.nextSibling;
400
+ t.remove(), t = r;
401
401
  }
402
402
  }
403
403
  setConnected(t) {
404
404
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
405
405
  }
406
406
  }
407
- class B {
407
+ class j {
408
408
  get tagName() {
409
409
  return this.element.tagName;
410
410
  }
411
411
  get _$AU() {
412
412
  return this._$AM._$AU;
413
413
  }
414
- constructor(t, s, i, r, o) {
415
- this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = s, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
414
+ constructor(t, s, r, i, n) {
415
+ this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = s, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = m;
416
416
  }
417
- _$AI(t, s = this, i, r) {
418
- const o = this.strings;
419
- let n = !1;
420
- if (o === void 0) t = C(this, t, s, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
417
+ _$AI(t, s = this, r, i) {
418
+ const n = this.strings;
419
+ let o = !1;
420
+ if (n === void 0) t = C(this, t, s, 0), o = !M(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
421
421
  else {
422
422
  const h = t;
423
423
  let l, c;
424
- for (t = o[0], l = 0; l < o.length - 1; l++) c = C(this, h[i + l], s, l), c === S && (c = this._$AH[l]), n ||= !M(c) || c !== this._$AH[l], c === p ? t = p : t !== p && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
424
+ for (t = n[0], l = 0; l < n.length - 1; l++) c = C(this, h[r + l], s, l), c === E && (c = this._$AH[l]), o ||= !M(c) || c !== this._$AH[l], c === m ? t = m : t !== m && (t += (c ?? "") + n[l + 1]), this._$AH[l] = c;
425
425
  }
426
- n && !r && this.j(t);
426
+ o && !i && this.j(t);
427
427
  }
428
428
  j(t) {
429
- t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
429
+ t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
430
430
  }
431
431
  }
432
- class Rt extends B {
432
+ class Ht extends j {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 3;
435
435
  }
436
436
  j(t) {
437
- this.element[this.name] = t === p ? void 0 : t;
437
+ this.element[this.name] = t === m ? void 0 : t;
438
438
  }
439
439
  }
440
- class Nt extends B {
440
+ class Vt extends j {
441
441
  constructor() {
442
442
  super(...arguments), this.type = 4;
443
443
  }
444
444
  j(t) {
445
- this.element.toggleAttribute(this.name, !!t && t !== p);
445
+ this.element.toggleAttribute(this.name, !!t && t !== m);
446
446
  }
447
447
  }
448
- class Ft extends B {
449
- constructor(t, s, i, r, o) {
450
- super(t, s, i, r, o), this.type = 5;
448
+ class Nt extends j {
449
+ constructor(t, s, r, i, n) {
450
+ super(t, s, r, i, n), this.type = 5;
451
451
  }
452
452
  _$AI(t, s = this) {
453
- if ((t = C(this, t, s, 0) ?? p) === S) return;
454
- const i = this._$AH, r = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== p && (i === p || r);
455
- r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
453
+ if ((t = C(this, t, s, 0) ?? m) === E) return;
454
+ const r = this._$AH, i = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== m && (r === m || i);
455
+ i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
456
456
  }
457
457
  handleEvent(t) {
458
458
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
459
459
  }
460
460
  }
461
- class Vt {
462
- constructor(t, s, i) {
463
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
461
+ class Rt {
462
+ constructor(t, s, r) {
463
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r;
464
464
  }
465
465
  get _$AU() {
466
466
  return this._$AM._$AU;
@@ -470,18 +470,18 @@ class Vt {
470
470
  }
471
471
  }
472
472
  const jt = { I: P }, Bt = J.litHtmlPolyfillSupport;
473
- Bt?.(H, P), (J.litHtmlVersions ??= []).push("3.3.0");
473
+ Bt?.(F, P), (J.litHtmlVersions ??= []).push("3.3.0");
474
474
  const qt = (e, t, s) => {
475
- const i = s?.renderBefore ?? t;
476
- let r = i._$litPart$;
477
- if (r === void 0) {
478
- const o = s?.renderBefore ?? null;
479
- i._$litPart$ = r = new P(t.insertBefore(k(), o), o, void 0, s ?? {});
475
+ const r = s?.renderBefore ?? t;
476
+ let i = r._$litPart$;
477
+ if (i === void 0) {
478
+ const n = s?.renderBefore ?? null;
479
+ r._$litPart$ = i = new P(t.insertBefore(U(), n), n, void 0, s ?? {});
480
480
  }
481
- return r._$AI(e), r;
481
+ return i._$AI(e), i;
482
482
  };
483
483
  const G = globalThis;
484
- let U = class extends E {
484
+ let T = class extends S {
485
485
  constructor() {
486
486
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
487
487
  }
@@ -500,22 +500,22 @@ let U = class extends E {
500
500
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
501
501
  }
502
502
  render() {
503
- return S;
503
+ return E;
504
504
  }
505
505
  };
506
- U._$litElement$ = !0, U.finalized = !0, G.litElementHydrateSupport?.({ LitElement: U });
506
+ T._$litElement$ = !0, T.finalized = !0, G.litElementHydrateSupport?.({ LitElement: T });
507
507
  const zt = G.litElementPolyfillSupport;
508
- zt?.({ LitElement: U });
508
+ zt?.({ LitElement: T });
509
509
  (G.litElementVersions ??= []).push("4.2.0");
510
510
  const It = { CHILD: 2 }, bt = (e) => (...t) => ({ _$litDirective$: e, values: t });
511
- let _t = class {
511
+ let gt = class {
512
512
  constructor(t) {
513
513
  }
514
514
  get _$AU() {
515
515
  return this._$AM._$AU;
516
516
  }
517
- _$AT(t, s, i) {
518
- this._$Ct = t, this._$AM = s, this._$Ci = i;
517
+ _$AT(t, s, r) {
518
+ this._$Ct = t, this._$AM = s, this._$Ci = r;
519
519
  }
520
520
  _$AS(t, s) {
521
521
  return this.update(t, s);
@@ -524,94 +524,94 @@ let _t = class {
524
524
  return this.render(...s);
525
525
  }
526
526
  };
527
- const { I: Lt } = jt, ht = () => document.createComment(""), O = (e, t, s) => {
528
- const i = e._$AA.parentNode, r = t === void 0 ? e._$AB : t._$AA;
527
+ const { I: Lt } = jt, ht = () => document.createComment(""), D = (e, t, s) => {
528
+ const r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
529
529
  if (s === void 0) {
530
- const o = i.insertBefore(ht(), r), n = i.insertBefore(ht(), r);
531
- s = new Lt(o, n, e, e.options);
530
+ const n = r.insertBefore(ht(), i), o = r.insertBefore(ht(), i);
531
+ s = new Lt(n, o, e, e.options);
532
532
  } else {
533
- const o = s._$AB.nextSibling, n = s._$AM, h = n !== e;
533
+ const n = s._$AB.nextSibling, o = s._$AM, h = o !== e;
534
534
  if (h) {
535
535
  let l;
536
- s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (l = e._$AU) !== n._$AU && s._$AP(l);
536
+ s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (l = e._$AU) !== o._$AU && s._$AP(l);
537
537
  }
538
- if (o !== r || h) {
538
+ if (n !== i || h) {
539
539
  let l = s._$AA;
540
- for (; l !== o; ) {
540
+ for (; l !== n; ) {
541
541
  const c = l.nextSibling;
542
- i.insertBefore(l, r), l = c;
542
+ r.insertBefore(l, i), l = c;
543
543
  }
544
544
  }
545
545
  }
546
546
  return s;
547
- }, A = (e, t, s = e) => (e._$AI(t, s), e), Wt = {}, gt = (e, t = Wt) => e._$AH = t, Kt = (e) => e._$AH, L = (e) => {
547
+ }, A = (e, t, s = e) => (e._$AI(t, s), e), Wt = {}, _t = (e, t = Wt) => e._$AH = t, Kt = (e) => e._$AH, L = (e) => {
548
548
  e._$AP?.(!1, !0);
549
549
  let t = e._$AA;
550
550
  const s = e._$AB.nextSibling;
551
551
  for (; t !== s; ) {
552
- const i = t.nextSibling;
553
- t.remove(), t = i;
552
+ const r = t.nextSibling;
553
+ t.remove(), t = r;
554
554
  }
555
555
  };
556
556
  const ct = (e, t, s) => {
557
- const i = /* @__PURE__ */ new Map();
558
- for (let r = t; r <= s; r++) i.set(e[r], r);
559
- return i;
560
- }, ut = bt(class extends _t {
557
+ const r = /* @__PURE__ */ new Map();
558
+ for (let i = t; i <= s; i++) r.set(e[i], i);
559
+ return r;
560
+ }, ut = bt(class extends gt {
561
561
  constructor(e) {
562
562
  if (super(e), e.type !== It.CHILD) throw Error("repeat() can only be used in text expressions");
563
563
  }
564
564
  dt(e, t, s) {
565
- let i;
566
- s === void 0 ? s = t : t !== void 0 && (i = t);
567
- const r = [], o = [];
568
- let n = 0;
569
- for (const h of e) r[n] = i ? i(h, n) : n, o[n] = s(h, n), n++;
570
- return { values: o, keys: r };
565
+ let r;
566
+ s === void 0 ? s = t : t !== void 0 && (r = t);
567
+ const i = [], n = [];
568
+ let o = 0;
569
+ for (const h of e) i[o] = r ? r(h, o) : o, n[o] = s(h, o), o++;
570
+ return { values: n, keys: i };
571
571
  }
572
572
  render(e, t, s) {
573
573
  return this.dt(e, t, s).values;
574
574
  }
575
- update(e, [t, s, i]) {
576
- const r = Kt(e), { values: o, keys: n } = this.dt(t, s, i);
577
- if (!Array.isArray(r)) return this.ut = n, o;
575
+ update(e, [t, s, r]) {
576
+ const i = Kt(e), { values: n, keys: o } = this.dt(t, s, r);
577
+ if (!Array.isArray(i)) return this.ut = o, n;
578
578
  const h = this.ut ??= [], l = [];
579
- let c, m, a = 0, d = r.length - 1, u = 0, $ = o.length - 1;
580
- for (; a <= d && u <= $; ) if (r[a] === null) a++;
581
- else if (r[d] === null) d--;
582
- else if (h[a] === n[u]) l[u] = A(r[a], o[u]), a++, u++;
583
- else if (h[d] === n[$]) l[$] = A(r[d], o[$]), d--, $--;
584
- else if (h[a] === n[$]) l[$] = A(r[a], o[$]), O(e, l[$ + 1], r[a]), a++, $--;
585
- else if (h[d] === n[u]) l[u] = A(r[d], o[u]), O(e, r[a], r[d]), d--, u++;
586
- else if (c === void 0 && (c = ct(n, u, $), m = ct(h, a, d)), c.has(h[a])) if (c.has(h[d])) {
587
- const g = m.get(n[u]), z = g !== void 0 ? r[g] : null;
579
+ let c, p, a = 0, d = i.length - 1, u = 0, $ = n.length - 1;
580
+ for (; a <= d && u <= $; ) if (i[a] === null) a++;
581
+ else if (i[d] === null) d--;
582
+ else if (h[a] === o[u]) l[u] = A(i[a], n[u]), a++, u++;
583
+ else if (h[d] === o[$]) l[$] = A(i[d], n[$]), d--, $--;
584
+ else if (h[a] === o[$]) l[$] = A(i[a], n[$]), D(e, l[$ + 1], i[a]), a++, $--;
585
+ else if (h[d] === o[u]) l[u] = A(i[d], n[u]), D(e, i[a], i[d]), d--, u++;
586
+ else if (c === void 0 && (c = ct(o, u, $), p = ct(h, a, d)), c.has(h[a])) if (c.has(h[d])) {
587
+ const g = p.get(o[u]), z = g !== void 0 ? i[g] : null;
588
588
  if (z === null) {
589
- const X = O(e, r[a]);
590
- A(X, o[u]), l[u] = X;
591
- } else l[u] = A(z, o[u]), O(e, r[a], z), r[g] = null;
589
+ const X = D(e, i[a]);
590
+ A(X, n[u]), l[u] = X;
591
+ } else l[u] = A(z, n[u]), D(e, i[a], z), i[g] = null;
592
592
  u++;
593
- } else L(r[d]), d--;
594
- else L(r[a]), a++;
593
+ } else L(i[d]), d--;
594
+ else L(i[a]), a++;
595
595
  for (; u <= $; ) {
596
- const g = O(e, l[$ + 1]);
597
- A(g, o[u]), l[u++] = g;
596
+ const g = D(e, l[$ + 1]);
597
+ A(g, n[u]), l[u++] = g;
598
598
  }
599
599
  for (; a <= d; ) {
600
- const g = r[a++];
600
+ const g = i[a++];
601
601
  g !== null && L(g);
602
602
  }
603
- return this.ut = n, gt(e, l), S;
603
+ return this.ut = o, _t(e, l), E;
604
604
  }
605
605
  });
606
- const Zt = bt(class extends _t {
606
+ const Zt = bt(class extends gt {
607
607
  constructor() {
608
- super(...arguments), this.key = p;
608
+ super(...arguments), this.key = m;
609
609
  }
610
610
  render(e, t) {
611
611
  return this.key = e, t;
612
612
  }
613
613
  update(e, [t, s]) {
614
- return t !== this.key && (gt(e), this.key = t), s;
614
+ return t !== this.key && (_t(e), this.key = t), s;
615
615
  }
616
616
  });
617
617
  const Jt = (e) => (t, s) => {
@@ -619,53 +619,53 @@ const Jt = (e) => (t, s) => {
619
619
  customElements.define(e, t);
620
620
  })) : customElements.define(e, t);
621
621
  };
622
- const Qt = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, s) => {
623
- const { kind: i, metadata: r } = s;
624
- let o = globalThis.litPropertyMetadata.get(r);
625
- if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") {
626
- const { name: n } = s;
622
+ const Qt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, s) => {
623
+ const { kind: r, metadata: i } = s;
624
+ let n = globalThis.litPropertyMetadata.get(i);
625
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), n.set(s.name, e), r === "accessor") {
626
+ const { name: o } = s;
627
627
  return { set(h) {
628
628
  const l = t.get.call(this);
629
- t.set.call(this, h), this.requestUpdate(n, l, e);
629
+ t.set.call(this, h), this.requestUpdate(o, l, e);
630
630
  }, init(h) {
631
- return h !== void 0 && this.C(n, void 0, e, h), h;
631
+ return h !== void 0 && this.C(o, void 0, e, h), h;
632
632
  } };
633
633
  }
634
- if (i === "setter") {
635
- const { name: n } = s;
634
+ if (r === "setter") {
635
+ const { name: o } = s;
636
636
  return function(h) {
637
- const l = this[n];
638
- t.call(this, h), this.requestUpdate(n, l, e);
637
+ const l = this[o];
638
+ t.call(this, h), this.requestUpdate(o, l, e);
639
639
  };
640
640
  }
641
- throw Error("Unsupported decorator location: " + i);
641
+ throw Error("Unsupported decorator location: " + r);
642
642
  };
643
- function q(e) {
644
- return (t, s) => typeof s == "object" ? Gt(e, t, s) : ((i, r, o) => {
645
- const n = r.hasOwnProperty(o);
646
- return r.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
643
+ function B(e) {
644
+ return (t, s) => typeof s == "object" ? Gt(e, t, s) : ((r, i, n) => {
645
+ const o = i.hasOwnProperty(n);
646
+ return i.constructor.createProperty(n, r), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
647
647
  })(e, t, s);
648
648
  }
649
- function R(e) {
650
- return q({ ...e, state: !0, attribute: !1 });
649
+ function q(e) {
650
+ return B({ ...e, state: !0, attribute: !1 });
651
651
  }
652
652
  const Xt = (e, t, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, s), s);
653
653
  function Yt(e, t) {
654
- return (s, i, r) => {
655
- const o = (n) => n.renderRoot?.querySelector(e) ?? null;
656
- return Xt(s, i, { get() {
657
- return o(this);
654
+ return (s, r, i) => {
655
+ const n = (o) => o.renderRoot?.querySelector(e) ?? null;
656
+ return Xt(s, r, { get() {
657
+ return n(this);
658
658
  } });
659
659
  };
660
660
  }
661
- var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t, s, i) => {
662
- for (var r = i > 1 ? void 0 : i ? ee(t, s) : t, o = e.length - 1, n; o >= 0; o--)
663
- (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
664
- return i && r && te(t, s, r), r;
661
+ var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t, s, r) => {
662
+ for (var i = r > 1 ? void 0 : r ? ee(t, s) : t, n = e.length - 1, o; n >= 0; n--)
663
+ (o = e[n]) && (i = (r ? o(t, s, i) : o(i)) || i);
664
+ return r && i && te(t, s, i), i;
665
665
  };
666
- let b = class extends U {
666
+ let b = class extends T {
667
667
  constructor() {
668
- super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.17";
668
+ super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.19";
669
669
  }
670
670
  update(e) {
671
671
  e.has("theme") && this.registerTheme(this.theme), super.update(e);
@@ -675,42 +675,50 @@ let b = class extends U {
675
675
  }
676
676
  registerTheme(e) {
677
677
  const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), s = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
678
- this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = t || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor;
678
+ this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
679
679
  }
680
680
  openFormDialog() {
681
681
  this.dialogOpen = !0;
682
682
  }
683
683
  handleFormSubmit(e) {
684
684
  e.preventDefault();
685
- const s = e.submitter?.getAttribute("value") ?? "submit", i = e.target, r = new FormData(i), o = this.inputData?.formFields?.map((n, h) => {
685
+ const s = e.submitter?.getAttribute("value") ?? "submit", r = e.target, i = new FormData(r), n = this.inputData?.formFields?.map((o, h) => {
686
686
  const l = `column-${h}`;
687
687
  let c;
688
- return n.type === "checkbox" ? c = r.has(l) ? "on" : "off" : c = r.get(l) ?? n.defaultValue ?? "", {
689
- swarm_app_databackend_key: n.targetColumn?.swarm_app_databackend_key,
690
- table_name: n.targetColumn?.tablename,
691
- column_name: n.targetColumn?.column,
692
- value: this.formatValue(c, n.type ?? "textfield")
688
+ if (o.hiddenField)
689
+ c = o.preFilledValue ?? o.defaultValue ?? "";
690
+ else if (o.type === "checkbox")
691
+ c = i.has(l) ? "on" : "off";
692
+ else {
693
+ const p = i.get(l);
694
+ c = p === null || p === "" ? o.defaultValue ?? "" : p;
695
+ }
696
+ return {
697
+ swarm_app_databackend_key: o.targetColumn?.swarm_app_databackend_key,
698
+ table_name: o.targetColumn?.tablename,
699
+ column_name: o.targetColumn?.column,
700
+ value: this.formatValue(c, o.type ?? "textfield")
693
701
  };
694
702
  });
695
- if (this.inputData?.deleteFlagColumn && o?.push({
703
+ if (this.inputData?.deleteFlagColumn && n?.push({
696
704
  swarm_app_databackend_key: this.inputData?.deleteFlagColumn?.swarm_app_databackend_key,
697
705
  table_name: this.inputData?.deleteFlagColumn?.tablename,
698
706
  column_name: this.inputData?.deleteFlagColumn?.column,
699
707
  value: s === "delete"
700
708
  }), this.dispatchEvent(
701
709
  new CustomEvent("data-submit", {
702
- detail: o,
710
+ detail: n,
703
711
  bubbles: !1,
704
712
  composed: !1
705
713
  })
706
714
  ), s === "delete") {
707
- const n = this.resolveRoute({
715
+ const o = this.resolveRoute({
708
716
  route: this.inputData?.deleteNavigationRoute,
709
717
  variables: this.inputData?.variables
710
718
  });
711
- n && this.dispatchEvent(
719
+ o && this.dispatchEvent(
712
720
  new CustomEvent("nav-submit", {
713
- detail: { path: String(n) },
721
+ detail: { path: String(o) },
714
722
  bubbles: !0,
715
723
  composed: !0
716
724
  })
@@ -720,10 +728,13 @@ let b = class extends U {
720
728
  }
721
729
  formatValue(e, t) {
722
730
  switch (t) {
723
- case "numberfield":
724
- return parseFloat(e);
731
+ case "numberfield": {
732
+ if (e === "" || e === null || e === void 0) return null;
733
+ const s = parseFloat(e);
734
+ return Number.isNaN(s) ? null : s;
735
+ }
725
736
  case "checkbox":
726
- return e === "on";
737
+ return e === "on" || e === "true";
727
738
  default:
728
739
  return e;
729
740
  }
@@ -739,7 +750,7 @@ let b = class extends U {
739
750
  .pattern="${e.validation ?? ""}"
740
751
  supporting-text=${e.description ?? ""}
741
752
  validation-message="${e.validationMessage ?? "Invalid input"}"
742
- ?required=${e.required && !e.defaultValue}
753
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
743
754
  ></md-outlined-text-field>
744
755
  `;
745
756
  }
@@ -756,7 +767,7 @@ let b = class extends U {
756
767
  min=${e.min ?? ""}
757
768
  max=${e.max ?? ""}
758
769
  supporting-text=${e.description ?? ""}
759
- ?required=${e.required && !e.defaultValue}
770
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
760
771
  ></md-outlined-text-field>
761
772
  `;
762
773
  }
@@ -766,9 +777,9 @@ let b = class extends U {
766
777
  <md-checkbox
767
778
  name="column-${t}"
768
779
  aria-label=${e.label ?? ""}
769
- ?checked=${(String(e.preFilledValue) ?? e.defaultValue) === "true"}
780
+ ?checked=${String(e.preFilledValue ?? e.defaultValue) === "true"}
770
781
  supporting-text=${e.description ?? ""}
771
- ?required=${e.required && !e.defaultValue}
782
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
772
783
  ></md-checkbox>
773
784
  <label class="label"> ${e.label} </label>
774
785
  </div>
@@ -783,7 +794,7 @@ let b = class extends U {
783
794
  .value="${e.preFilledValue ?? ""}"
784
795
  .placeholder="${e.defaultValue ?? ""}"
785
796
  rows="3"
786
- ?required=${e.required && !e.defaultValue}
797
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
787
798
  supporting-text=${e.description ?? ""}
788
799
  ></md-outlined-text-field>
789
800
  `;
@@ -795,7 +806,7 @@ let b = class extends U {
795
806
  <md-outlined-select
796
807
  name="column-${t}"
797
808
  supporting-text=${e.description ?? ""}
798
- ?required=${e.required && !e.defaultValue}
809
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
799
810
  >
800
811
  ${ut(
801
812
  e.values ?? [],
@@ -822,7 +833,7 @@ let b = class extends U {
822
833
  type="datetime-local"
823
834
  .value="${e.preFilledValue ?? e.defaultValue ?? ""}"
824
835
  supporting-text=${e.description ?? ""}
825
- ?required=${e.required && !e.defaultValue}
836
+ ?required=${e.required && !e.defaultValue && !e.preFilledValue}
826
837
  ></md-outlined-text-field>
827
838
  `;
828
839
  }
@@ -830,16 +841,16 @@ let b = class extends U {
830
841
  this.formKey++;
831
842
  }
832
843
  resolveRoute(e) {
833
- let t = String(e?.route ?? "");
844
+ let t = e?.route ?? "";
834
845
  if (t) {
835
846
  if (e?.variables)
836
847
  for (const s of e.variables)
837
848
  s.label && (t = t.split(`{{${s.label}}}`).join(encodeURIComponent(String(s.value ?? ""))));
838
849
  if (t.includes("*")) {
839
- const s = (this.route || "").split("/").filter(Boolean), i = t.split("/").filter(Boolean);
840
- for (let r = 0; r < i.length; r++)
841
- i[r] === "*" && (i[r] = s[r] ?? "");
842
- t = (t.startsWith("/") ? "/" : "") + i.filter(Boolean).join("/");
850
+ const s = (this.route || "").split("/").filter(Boolean), r = t.split("/").filter(Boolean);
851
+ for (let i = 0; i < r.length; i++)
852
+ r[i] === "*" && (r[i] = s[i] ?? "");
853
+ t = (t.startsWith("/") ? "/" : "") + r.filter(Boolean).join("/");
843
854
  }
844
855
  return t;
845
856
  }
@@ -866,12 +877,12 @@ let b = class extends U {
866
877
  ${this.inputData?.formButton ? f`
867
878
  <md-fab
868
879
  aria-label="Add"
869
- style="margin-left: 16px; --md-fab-container-color: ${this.theme?.theme_object?.color[0] ?? "#9064f7"}"
880
+ style="margin-left: 16px; --md-fab-container-color: ${this.theme?.theme_object?.color?.[0] ?? "#9064f7"}"
870
881
  @click=${this.openFormDialog}
871
882
  >
872
883
  <md-icon slot="icon">add</md-icon>
873
884
  </md-fab>
874
- ` : p}
885
+ ` : m}
875
886
  <header>
876
887
  <h3 class="paging" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>
877
888
  <p class="paging" ?active=${this.inputData?.subTitle}>${this.inputData?.subTitle}</p>
@@ -883,11 +894,11 @@ let b = class extends U {
883
894
  class="form"
884
895
  quick
885
896
  ?open=${this.dialogOpen}
886
- @cancel=${(i) => {
887
- i.preventDefault();
897
+ @cancel=${(r) => {
898
+ r.preventDefault();
888
899
  }}
889
- @keydown=${(i) => {
890
- i.key === "Escape" && i.preventDefault();
900
+ @keydown=${(r) => {
901
+ r.key === "Escape" && r.preventDefault();
891
902
  }}
892
903
  @closed=${() => this.dialogOpen = !1}
893
904
  >
@@ -899,9 +910,9 @@ let b = class extends U {
899
910
  form="form"
900
911
  value="delete"
901
912
  type="submit"
902
- autofocus
903
913
  >Delete</md-filled-button
904
- >` : p}
914
+ >` : m}
915
+ <md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
905
916
  <md-outlined-button @click=${this.cancelEdit}>Cancel</md-outlined-button>
906
917
  <md-filled-button form="form" value="submit" type="submit" autofocus
907
918
  >Submit</md-filled-button
@@ -917,9 +928,8 @@ let b = class extends U {
917
928
  form="form"
918
929
  value="delete"
919
930
  type="submit"
920
- autofocus
921
931
  >Delete</md-filled-button
922
- >` : p}
932
+ >` : m}
923
933
  <md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
924
934
  <md-filled-button form="form" value="submit" type="submit" autofocus
925
935
  >Submit</md-filled-button
@@ -944,12 +954,7 @@ let b = class extends U {
944
954
  this.inputData?.formFields ?? [],
945
955
  (e, t) => t,
946
956
  (e, t) => {
947
- if (e.hiddenField)
948
- return f`<input
949
- type="hidden"
950
- name="column-${t}"
951
- .value="${e.preFilledValue ?? e.defaultValue ?? ""}"
952
- />`;
957
+ if (e.hiddenField) return m;
953
958
  switch (e.type) {
954
959
  case "textfield":
955
960
  return this.renderTextField(e, t);
@@ -1001,6 +1006,29 @@ b.styles = vt`
1001
1006
  padding: 16px;
1002
1007
  box-sizing: border-box;
1003
1008
  overflow: auto;
1009
+ /* Derive scrollbar colors from the (inherited) text color so they
1010
+ follow custom styles and themes — e.g. light thumb on dark bg. */
1011
+ scrollbar-width: thin;
1012
+ scrollbar-color: color-mix(in srgb, currentColor 35%, transparent) transparent;
1013
+ }
1014
+
1015
+ /* WebKit/Blink fallback for browsers without scrollbar-color support. */
1016
+ .wrapper::-webkit-scrollbar {
1017
+ width: 8px;
1018
+ height: 8px;
1019
+ }
1020
+
1021
+ .wrapper::-webkit-scrollbar-track {
1022
+ background: transparent;
1023
+ }
1024
+
1025
+ .wrapper::-webkit-scrollbar-thumb {
1026
+ background-color: color-mix(in srgb, currentColor 35%, transparent);
1027
+ border-radius: 4px;
1028
+ }
1029
+
1030
+ .wrapper::-webkit-scrollbar-thumb:hover {
1031
+ background-color: color-mix(in srgb, currentColor 55%, transparent);
1004
1032
  }
1005
1033
 
1006
1034
  .form-actions {
@@ -1095,34 +1123,31 @@ b.styles = vt`
1095
1123
  }
1096
1124
  `;
1097
1125
  _([
1098
- q({ type: Object })
1126
+ B({ type: Object })
1099
1127
  ], b.prototype, "inputData", 2);
1100
1128
  _([
1101
- q({ type: Object })
1129
+ B({ type: Object })
1102
1130
  ], b.prototype, "theme", 2);
1103
1131
  _([
1104
- q({ type: String })
1132
+ B({ type: String })
1105
1133
  ], b.prototype, "route", 2);
1106
1134
  _([
1107
- R()
1135
+ q()
1108
1136
  ], b.prototype, "themeBgColor", 2);
1109
1137
  _([
1110
- R()
1138
+ q()
1111
1139
  ], b.prototype, "themeTitleColor", 2);
1112
1140
  _([
1113
- R()
1114
- ], b.prototype, "themeSubtitleColor", 2);
1115
- _([
1116
- R()
1141
+ q()
1117
1142
  ], b.prototype, "dialogOpen", 2);
1118
1143
  _([
1119
1144
  Yt("md-dialog")
1120
1145
  ], b.prototype, "dialog", 2);
1121
1146
  _([
1122
- R()
1147
+ q()
1123
1148
  ], b.prototype, "formKey", 2);
1124
1149
  b = _([
1125
- Jt("widget-form-1.0.17")
1150
+ Jt("widget-form-1.0.19")
1126
1151
  ], b);
1127
1152
  export {
1128
1153
  b as WidgetForm