@record-evolution/widget-form 1.0.27 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/widget-form.d.ts +3 -3
- package/dist/widget-form.js +275 -265
- package/dist/widget-form.js.map +1 -1
- package/package.json +1 -1
- package/src/default-data.json +0 -1
- package/src/definition-schema.d.ts +1 -1
- package/src/definition-schema.json +15 -1
- package/src/widget-form.ts +17 -5
package/dist/widget-form.js
CHANGED
|
@@ -10,16 +10,16 @@ import "@material/web/select/outlined-select.js";
|
|
|
10
10
|
import "@material/web/select/select-option.js";
|
|
11
11
|
const R = globalThis, W = R.ShadowRoot && (R.ShadyCSS === void 0 || R.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,
|
|
14
|
-
if (this._$cssResult$ = !0,
|
|
15
|
-
this.cssText = t, this.t =
|
|
13
|
+
constructor(t, i, r) {
|
|
14
|
+
if (this._$cssResult$ = !0, r !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
15
|
+
this.cssText = t, this.t = i;
|
|
16
16
|
}
|
|
17
17
|
get styleSheet() {
|
|
18
18
|
let t = this.o;
|
|
19
|
-
const
|
|
19
|
+
const i = this.t;
|
|
20
20
|
if (W && t === void 0) {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const r = i !== void 0 && i.length === 1;
|
|
22
|
+
r && (t = Y.get(i)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Y.set(i, t));
|
|
23
23
|
}
|
|
24
24
|
return t;
|
|
25
25
|
}
|
|
@@ -28,22 +28,22 @@ 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
|
|
31
|
+
const i = e.length === 1 ? e[0] : t.reduce(((r, s, o) => r + ((n) => {
|
|
32
32
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
33
33
|
if (typeof n == "number") return n;
|
|
34
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
35
|
})(s) + e[o + 1]), e[0]);
|
|
36
|
-
return new dt(
|
|
36
|
+
return new dt(i, e, K);
|
|
37
37
|
}, At = (e, t) => {
|
|
38
|
-
if (W) e.adoptedStyleSheets = t.map(((
|
|
39
|
-
else for (const
|
|
40
|
-
const
|
|
41
|
-
s !== void 0 &&
|
|
38
|
+
if (W) e.adoptedStyleSheets = t.map(((i) => i instanceof CSSStyleSheet ? i : i.styleSheet));
|
|
39
|
+
else for (const i of t) {
|
|
40
|
+
const r = document.createElement("style"), s = R.litNonce;
|
|
41
|
+
s !== void 0 && r.setAttribute("nonce", s), r.textContent = i.cssText, e.appendChild(r);
|
|
42
42
|
}
|
|
43
43
|
}, tt = W ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
44
|
-
let
|
|
45
|
-
for (const
|
|
46
|
-
return yt(
|
|
44
|
+
let i = "";
|
|
45
|
+
for (const r of t.cssRules) i += r.cssText;
|
|
46
|
+
return yt(i);
|
|
47
47
|
})(e) : e;
|
|
48
48
|
const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnPropertyNames: Et, getOwnPropertySymbols: Ct, getPrototypeOf: Dt } = Object, N = globalThis, et = N.trustedTypes, Pt = et ? et.emptyScript : "", kt = N.reactiveElementPolyfillSupport, V = (e, t) => e, H = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
@@ -56,24 +56,24 @@ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnProperty
|
|
|
56
56
|
}
|
|
57
57
|
return e;
|
|
58
58
|
}, fromAttribute(e, t) {
|
|
59
|
-
let
|
|
59
|
+
let i = e;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
|
|
62
|
+
i = e !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
|
|
65
|
+
i = e === null ? null : Number(e);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
|
|
70
|
+
i = JSON.parse(e);
|
|
71
71
|
} catch {
|
|
72
|
-
|
|
72
|
+
i = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
} }, Z = (e, t) => !xt(e, t),
|
|
75
|
+
return i;
|
|
76
|
+
} }, Z = (e, t) => !xt(e, t), it = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: Z };
|
|
77
77
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), N.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
78
78
|
let E = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -82,25 +82,25 @@ let E = class extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t,
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
85
|
+
static createProperty(t, i = it) {
|
|
86
|
+
if (i.state && (i.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((i = Object.create(i)).wrapped = !0), this.elementProperties.set(t, i), !i.noAccessor) {
|
|
87
|
+
const r = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, r, i);
|
|
88
88
|
s !== void 0 && wt(this.prototype, t, s);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t,
|
|
91
|
+
static getPropertyDescriptor(t, i, r) {
|
|
92
92
|
const { get: s, set: o } = St(this.prototype, t) ?? { get() {
|
|
93
|
-
return this[
|
|
93
|
+
return this[i];
|
|
94
94
|
}, set(n) {
|
|
95
|
-
this[
|
|
95
|
+
this[i] = n;
|
|
96
96
|
} };
|
|
97
97
|
return { get: s, set(n) {
|
|
98
98
|
const h = s?.call(this);
|
|
99
|
-
o?.call(this, n), this.requestUpdate(t, h,
|
|
99
|
+
o?.call(this, n), this.requestUpdate(t, h, r);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
|
-
return this.elementProperties.get(t) ??
|
|
103
|
+
return this.elementProperties.get(t) ?? it;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(V("elementProperties"))) return;
|
|
@@ -110,32 +110,32 @@ let E = class extends HTMLElement {
|
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(V("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(V("properties"))) {
|
|
113
|
-
const
|
|
114
|
-
for (const s of
|
|
113
|
+
const i = this.properties, r = [...Et(i), ...Ct(i)];
|
|
114
|
+
for (const s of r) this.createProperty(s, i[s]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
117
117
|
if (t !== null) {
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
118
|
+
const i = litPropertyMetadata.get(t);
|
|
119
|
+
if (i !== void 0) for (const [r, s] of i) this.elementProperties.set(r, s);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [
|
|
123
|
-
const s = this._$Eu(
|
|
124
|
-
s !== void 0 && this._$Eh.set(s,
|
|
122
|
+
for (const [i, r] of this.elementProperties) {
|
|
123
|
+
const s = this._$Eu(i, r);
|
|
124
|
+
s !== void 0 && this._$Eh.set(s, i);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(t) {
|
|
129
|
-
const
|
|
129
|
+
const i = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const s of
|
|
133
|
-
} else t !== void 0 &&
|
|
134
|
-
return
|
|
131
|
+
const r = new Set(t.flat(1 / 0).reverse());
|
|
132
|
+
for (const s of r) i.unshift(tt(s));
|
|
133
|
+
} else t !== void 0 && i.push(tt(t));
|
|
134
|
+
return i;
|
|
135
135
|
}
|
|
136
|
-
static _$Eu(t,
|
|
137
|
-
const
|
|
138
|
-
return
|
|
136
|
+
static _$Eu(t, i) {
|
|
137
|
+
const r = i.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();
|
|
@@ -150,8 +150,8 @@ let E = class extends HTMLElement {
|
|
|
150
150
|
this._$EO?.delete(t);
|
|
151
151
|
}
|
|
152
152
|
_$E_() {
|
|
153
|
-
const t = /* @__PURE__ */ new Map(),
|
|
154
|
-
for (const
|
|
153
|
+
const t = /* @__PURE__ */ new Map(), i = this.constructor.elementProperties;
|
|
154
|
+
for (const r of i.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,40 +166,40 @@ let E = class extends HTMLElement {
|
|
|
166
166
|
disconnectedCallback() {
|
|
167
167
|
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
168
168
|
}
|
|
169
|
-
attributeChangedCallback(t,
|
|
170
|
-
this._$AK(t,
|
|
169
|
+
attributeChangedCallback(t, i, r) {
|
|
170
|
+
this._$AK(t, r);
|
|
171
171
|
}
|
|
172
|
-
_$ET(t,
|
|
173
|
-
const
|
|
174
|
-
if (s !== void 0 &&
|
|
175
|
-
const o = (
|
|
172
|
+
_$ET(t, i) {
|
|
173
|
+
const r = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, r);
|
|
174
|
+
if (s !== void 0 && r.reflect === !0) {
|
|
175
|
+
const o = (r.converter?.toAttribute !== void 0 ? r.converter : H).toAttribute(i, r.type);
|
|
176
176
|
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
_$AK(t,
|
|
180
|
-
const
|
|
179
|
+
_$AK(t, i) {
|
|
180
|
+
const r = this.constructor, s = r._$Eh.get(t);
|
|
181
181
|
if (s !== void 0 && this._$Em !== s) {
|
|
182
|
-
const o =
|
|
183
|
-
this._$Em = s, this[s] = n.fromAttribute(
|
|
182
|
+
const o = r.getPropertyOptions(s), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
|
|
183
|
+
this._$Em = s, this[s] = n.fromAttribute(i, o.type) ?? this._$Ej?.get(s) ?? null, this._$Em = null;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
requestUpdate(t,
|
|
186
|
+
requestUpdate(t, i, r) {
|
|
187
187
|
if (t !== void 0) {
|
|
188
188
|
const s = this.constructor, o = this[t];
|
|
189
|
-
if (
|
|
190
|
-
this.C(t,
|
|
189
|
+
if (r ??= s.getPropertyOptions(t), !((r.hasChanged ?? Z)(o, i) || r.useDefault && r.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(s._$Eu(t, r)))) return;
|
|
190
|
+
this.C(t, i, r);
|
|
191
191
|
}
|
|
192
192
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
193
193
|
}
|
|
194
|
-
C(t,
|
|
195
|
-
|
|
194
|
+
C(t, i, { useDefault: r, reflect: s, wrapped: o }, n) {
|
|
195
|
+
r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? i ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (i = void 0), this._$AL.set(t, i)), s === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
196
196
|
}
|
|
197
197
|
async _$EP() {
|
|
198
198
|
this.isUpdatePending = !0;
|
|
199
199
|
try {
|
|
200
200
|
await this._$ES;
|
|
201
|
-
} catch (
|
|
202
|
-
Promise.reject(
|
|
201
|
+
} catch (i) {
|
|
202
|
+
Promise.reject(i);
|
|
203
203
|
}
|
|
204
204
|
const t = this.scheduleUpdate();
|
|
205
205
|
return t != null && await t, !this.isUpdatePending;
|
|
@@ -214,25 +214,25 @@ let E = class extends HTMLElement {
|
|
|
214
214
|
for (const [s, o] of this._$Ep) this[s] = o;
|
|
215
215
|
this._$Ep = void 0;
|
|
216
216
|
}
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
217
|
+
const r = this.constructor.elementProperties;
|
|
218
|
+
if (r.size > 0) for (const [s, o] of r) {
|
|
219
219
|
const { wrapped: n } = o, h = this[s];
|
|
220
220
|
n !== !0 || this._$AL.has(s) || h === void 0 || this.C(s, void 0, o, h);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
let t = !1;
|
|
224
|
-
const
|
|
224
|
+
const i = this._$AL;
|
|
225
225
|
try {
|
|
226
|
-
t = this.shouldUpdate(
|
|
227
|
-
} catch (
|
|
228
|
-
throw t = !1, this._$EM(),
|
|
226
|
+
t = this.shouldUpdate(i), t ? (this.willUpdate(i), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(i)) : this._$EM();
|
|
227
|
+
} catch (r) {
|
|
228
|
+
throw t = !1, this._$EM(), r;
|
|
229
229
|
}
|
|
230
|
-
t && this._$AE(
|
|
230
|
+
t && this._$AE(i);
|
|
231
231
|
}
|
|
232
232
|
willUpdate(t) {
|
|
233
233
|
}
|
|
234
234
|
_$AE(t) {
|
|
235
|
-
this._$EO?.forEach(((
|
|
235
|
+
this._$EO?.forEach(((i) => i.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
236
236
|
}
|
|
237
237
|
_$EM() {
|
|
238
238
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -247,7 +247,7 @@ let E = class extends HTMLElement {
|
|
|
247
247
|
return !0;
|
|
248
248
|
}
|
|
249
249
|
update(t) {
|
|
250
|
-
this._$Eq &&= this._$Eq.forEach(((
|
|
250
|
+
this._$Eq &&= this._$Eq.forEach(((i) => this._$ET(i, this[i]))), this._$EM();
|
|
251
251
|
}
|
|
252
252
|
updated(t) {
|
|
253
253
|
}
|
|
@@ -255,47 +255,47 @@ let E = class extends HTMLElement {
|
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[V("elementProperties")] = /* @__PURE__ */ new Map(), E[V("finalized")] = /* @__PURE__ */ new Map(), kt?.({ ReactiveElement: E }), (N.reactiveElementVersions ??= []).push("2.1.0");
|
|
258
|
-
const J = globalThis, B = J.trustedTypes,
|
|
258
|
+
const J = globalThis, B = J.trustedTypes, rt = B ? B.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Vt = `<${mt}>`, w = document, O = () => w.createComment(""), T = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Ft = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
|
|
259
259
|
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, ft = /^(?:script|style|textarea|title)$/i, Ot = (e) => (t, ...
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, ft = /^(?:script|style|textarea|title)$/i, Ot = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }), $ = Ot(1), S = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
|
|
261
261
|
function $t(e, t) {
|
|
262
262
|
if (!Q(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
263
|
-
return
|
|
263
|
+
return rt !== void 0 ? rt.createHTML(t) : t;
|
|
264
264
|
}
|
|
265
265
|
const Tt = (e, t) => {
|
|
266
|
-
const
|
|
266
|
+
const i = e.length - 1, r = [];
|
|
267
267
|
let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = P;
|
|
268
|
-
for (let h = 0; h <
|
|
268
|
+
for (let h = 0; h < i; h++) {
|
|
269
269
|
const l = e[h];
|
|
270
|
-
let c, m, a = -1,
|
|
271
|
-
for (;
|
|
270
|
+
let c, m, a = -1, p = 0;
|
|
271
|
+
for (; p < l.length && (n.lastIndex = p, m = n.exec(l), m !== null); ) p = n.lastIndex, n === P ? m[1] === "!--" ? n = st : m[1] !== void 0 ? n = ot : m[2] !== void 0 ? (ft.test(m[2]) && (s = RegExp("</" + m[2], "g")), n = v) : m[3] !== void 0 && (n = v) : n === v ? m[0] === ">" ? (n = s ?? P, 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 === st || n === ot ? n = P : (n = v, s = void 0);
|
|
272
272
|
const u = n === v && e[h + 1].startsWith("/>") ? " " : "";
|
|
273
|
-
o += n === P ? l + Vt : a >= 0 ? (
|
|
273
|
+
o += n === P ? l + Vt : 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 [$t(e, o + (e[
|
|
275
|
+
return [$t(e, o + (e[i] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
276
276
|
};
|
|
277
277
|
class U {
|
|
278
|
-
constructor({ strings: t, _$litType$:
|
|
278
|
+
constructor({ strings: t, _$litType$: i }, r) {
|
|
279
279
|
let s;
|
|
280
280
|
this.parts = [];
|
|
281
281
|
let o = 0, n = 0;
|
|
282
|
-
const h = t.length - 1, l = this.parts, [c, m] = Tt(t,
|
|
283
|
-
if (this.el = U.createElement(c,
|
|
282
|
+
const h = t.length - 1, l = this.parts, [c, m] = Tt(t, i);
|
|
283
|
+
if (this.el = U.createElement(c, r), x.currentNode = this.el.content, i === 2 || i === 3) {
|
|
284
284
|
const a = this.el.content.firstChild;
|
|
285
285
|
a.replaceWith(...a.childNodes);
|
|
286
286
|
}
|
|
287
287
|
for (; (s = x.nextNode()) !== null && l.length < h; ) {
|
|
288
288
|
if (s.nodeType === 1) {
|
|
289
289
|
if (s.hasAttributes()) for (const a of s.getAttributeNames()) if (a.endsWith(pt)) {
|
|
290
|
-
const
|
|
290
|
+
const p = m[n++], u = s.getAttribute(a).split(y), f = /([.?@])?(.*)/.exec(p);
|
|
291
291
|
l.push({ type: 1, index: o, name: f[2], strings: u, ctor: f[1] === "." ? Mt : f[1] === "?" ? Rt : f[1] === "@" ? Ht : j }), s.removeAttribute(a);
|
|
292
292
|
} else a.startsWith(y) && (l.push({ type: 6, index: o }), s.removeAttribute(a));
|
|
293
293
|
if (ft.test(s.tagName)) {
|
|
294
|
-
const a = s.textContent.split(y),
|
|
295
|
-
if (
|
|
294
|
+
const a = s.textContent.split(y), p = a.length - 1;
|
|
295
|
+
if (p > 0) {
|
|
296
296
|
s.textContent = B ? B.emptyScript : "";
|
|
297
|
-
for (let u = 0; u <
|
|
298
|
-
s.append(a[
|
|
297
|
+
for (let u = 0; u < p; u++) s.append(a[u], O()), x.nextNode(), l.push({ type: 2, index: ++o });
|
|
298
|
+
s.append(a[p], O());
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
} else if (s.nodeType === 8) if (s.data === mt) l.push({ type: 2, index: o });
|
|
@@ -306,20 +306,20 @@ class U {
|
|
|
306
306
|
o++;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
static createElement(t,
|
|
310
|
-
const
|
|
311
|
-
return
|
|
309
|
+
static createElement(t, i) {
|
|
310
|
+
const r = w.createElement("template");
|
|
311
|
+
return r.innerHTML = t, r;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function C(e, t,
|
|
314
|
+
function C(e, t, i = e, r) {
|
|
315
315
|
if (t === S) return t;
|
|
316
|
-
let s =
|
|
316
|
+
let s = r !== void 0 ? i._$Co?.[r] : i._$Cl;
|
|
317
317
|
const o = T(t) ? void 0 : t._$litDirective$;
|
|
318
|
-
return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(e), s._$AT(e,
|
|
318
|
+
return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(e), s._$AT(e, i, r)), r !== void 0 ? (i._$Co ??= [])[r] = s : i._$Cl = s), s !== void 0 && (t = C(e, s._$AS(e, t.values), s, r)), t;
|
|
319
319
|
}
|
|
320
320
|
let Ut = class {
|
|
321
|
-
constructor(t,
|
|
322
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM =
|
|
321
|
+
constructor(t, i) {
|
|
322
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
323
323
|
}
|
|
324
324
|
get parentNode() {
|
|
325
325
|
return this._$AM.parentNode;
|
|
@@ -328,34 +328,34 @@ let Ut = class {
|
|
|
328
328
|
return this._$AM._$AU;
|
|
329
329
|
}
|
|
330
330
|
u(t) {
|
|
331
|
-
const { el: { content:
|
|
331
|
+
const { el: { content: i }, parts: r } = this._$AD, s = (t?.creationScope ?? w).importNode(i, !0);
|
|
332
332
|
x.currentNode = s;
|
|
333
|
-
let o = x.nextNode(), n = 0, h = 0, l =
|
|
333
|
+
let o = x.nextNode(), n = 0, h = 0, l = r[0];
|
|
334
334
|
for (; l !== void 0; ) {
|
|
335
335
|
if (n === l.index) {
|
|
336
336
|
let c;
|
|
337
|
-
l.type === 2 ? c = new D(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Bt(o, this, t)), this._$AV.push(c), l =
|
|
337
|
+
l.type === 2 ? c = new D(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Bt(o, this, t)), this._$AV.push(c), l = r[++h];
|
|
338
338
|
}
|
|
339
339
|
n !== l?.index && (o = x.nextNode(), n++);
|
|
340
340
|
}
|
|
341
341
|
return x.currentNode = w, s;
|
|
342
342
|
}
|
|
343
343
|
p(t) {
|
|
344
|
-
let
|
|
345
|
-
for (const
|
|
344
|
+
let i = 0;
|
|
345
|
+
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, i), i += r.strings.length - 2) : r._$AI(t[i])), i++;
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
class D {
|
|
349
349
|
get _$AU() {
|
|
350
350
|
return this._$AM?._$AU ?? this._$Cv;
|
|
351
351
|
}
|
|
352
|
-
constructor(t,
|
|
353
|
-
this.type = 2, this._$AH =
|
|
352
|
+
constructor(t, i, r, s) {
|
|
353
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? !0;
|
|
354
354
|
}
|
|
355
355
|
get parentNode() {
|
|
356
356
|
let t = this._$AA.parentNode;
|
|
357
|
-
const
|
|
358
|
-
return
|
|
357
|
+
const i = this._$AM;
|
|
358
|
+
return i !== void 0 && t?.nodeType === 11 && (t = i.parentNode), t;
|
|
359
359
|
}
|
|
360
360
|
get startNode() {
|
|
361
361
|
return this._$AA;
|
|
@@ -363,8 +363,8 @@ class D {
|
|
|
363
363
|
get endNode() {
|
|
364
364
|
return this._$AB;
|
|
365
365
|
}
|
|
366
|
-
_$AI(t,
|
|
367
|
-
t = C(this, t,
|
|
366
|
+
_$AI(t, i = this) {
|
|
367
|
+
t = C(this, t, i), T(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ft(t) ? this.k(t) : this._(t);
|
|
368
368
|
}
|
|
369
369
|
O(t) {
|
|
370
370
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -373,31 +373,31 @@ class D {
|
|
|
373
373
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
374
374
|
}
|
|
375
375
|
_(t) {
|
|
376
|
-
this._$AH !==
|
|
376
|
+
this._$AH !== d && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
|
|
377
377
|
}
|
|
378
378
|
$(t) {
|
|
379
|
-
const { values:
|
|
380
|
-
if (this._$AH?._$AD === s) this._$AH.p(
|
|
379
|
+
const { values: i, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = U.createElement($t(r.h, r.h[0]), this.options)), r);
|
|
380
|
+
if (this._$AH?._$AD === s) this._$AH.p(i);
|
|
381
381
|
else {
|
|
382
382
|
const o = new Ut(s, this), n = o.u(this.options);
|
|
383
|
-
o.p(
|
|
383
|
+
o.p(i), this.T(n), this._$AH = o;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
_$AC(t) {
|
|
387
|
-
let
|
|
388
|
-
return
|
|
387
|
+
let i = at.get(t.strings);
|
|
388
|
+
return i === void 0 && at.set(t.strings, i = new U(t)), i;
|
|
389
389
|
}
|
|
390
390
|
k(t) {
|
|
391
391
|
Q(this._$AH) || (this._$AH = [], this._$AR());
|
|
392
|
-
const
|
|
393
|
-
let
|
|
394
|
-
for (const o of t) s ===
|
|
395
|
-
s <
|
|
396
|
-
}
|
|
397
|
-
_$AR(t = this._$AA.nextSibling,
|
|
398
|
-
for (this._$AP?.(!1, !0,
|
|
399
|
-
const
|
|
400
|
-
t.remove(), t =
|
|
392
|
+
const i = this._$AH;
|
|
393
|
+
let r, s = 0;
|
|
394
|
+
for (const o of t) s === i.length ? i.push(r = new D(this.O(O()), this.O(O()), this, this.options)) : r = i[s], r._$AI(o), s++;
|
|
395
|
+
s < i.length && (this._$AR(r && r._$AB.nextSibling, s), i.length = s);
|
|
396
|
+
}
|
|
397
|
+
_$AR(t = this._$AA.nextSibling, i) {
|
|
398
|
+
for (this._$AP?.(!1, !0, i); t && t !== this._$AB; ) {
|
|
399
|
+
const r = t.nextSibling;
|
|
400
|
+
t.remove(), t = r;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
setConnected(t) {
|
|
@@ -411,22 +411,22 @@ class j {
|
|
|
411
411
|
get _$AU() {
|
|
412
412
|
return this._$AM._$AU;
|
|
413
413
|
}
|
|
414
|
-
constructor(t,
|
|
415
|
-
this.type = 1, this._$AH =
|
|
414
|
+
constructor(t, i, r, s, o) {
|
|
415
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = i, 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 = d;
|
|
416
416
|
}
|
|
417
|
-
_$AI(t,
|
|
417
|
+
_$AI(t, i = this, r, s) {
|
|
418
418
|
const o = this.strings;
|
|
419
419
|
let n = !1;
|
|
420
|
-
if (o === void 0) t = C(this, t,
|
|
420
|
+
if (o === void 0) t = C(this, t, i, 0), n = !T(t) || t !== this._$AH && t !== S, n && (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[
|
|
424
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) c = C(this, h[r + l], i, l), c === S && (c = this._$AH[l]), n ||= !T(c) || c !== this._$AH[l], c === d ? t = d : t !== d && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
|
|
425
425
|
}
|
|
426
426
|
n && !s && this.j(t);
|
|
427
427
|
}
|
|
428
428
|
j(t) {
|
|
429
|
-
t ===
|
|
429
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
class Mt extends j {
|
|
@@ -434,7 +434,7 @@ class Mt extends j {
|
|
|
434
434
|
super(...arguments), this.type = 3;
|
|
435
435
|
}
|
|
436
436
|
j(t) {
|
|
437
|
-
this.element[this.name] = t ===
|
|
437
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
class Rt extends j {
|
|
@@ -442,25 +442,25 @@ class Rt extends j {
|
|
|
442
442
|
super(...arguments), this.type = 4;
|
|
443
443
|
}
|
|
444
444
|
j(t) {
|
|
445
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
445
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
class Ht extends j {
|
|
449
|
-
constructor(t,
|
|
450
|
-
super(t,
|
|
449
|
+
constructor(t, i, r, s, o) {
|
|
450
|
+
super(t, i, r, s, o), this.type = 5;
|
|
451
451
|
}
|
|
452
|
-
_$AI(t,
|
|
453
|
-
if ((t = C(this, t,
|
|
454
|
-
const
|
|
455
|
-
s && this.element.removeEventListener(this.name, this,
|
|
452
|
+
_$AI(t, i = this) {
|
|
453
|
+
if ((t = C(this, t, i, 0) ?? d) === S) return;
|
|
454
|
+
const r = this._$AH, s = t === d && r !== d || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== d && (r === d || s);
|
|
455
|
+
s && this.element.removeEventListener(this.name, this, r), o && 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
461
|
class Bt {
|
|
462
|
-
constructor(t,
|
|
463
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM =
|
|
462
|
+
constructor(t, i, r) {
|
|
463
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = r;
|
|
464
464
|
}
|
|
465
465
|
get _$AU() {
|
|
466
466
|
return this._$AM._$AU;
|
|
@@ -471,12 +471,12 @@ class Bt {
|
|
|
471
471
|
}
|
|
472
472
|
const Nt = { I: D }, jt = J.litHtmlPolyfillSupport;
|
|
473
473
|
jt?.(U, D), (J.litHtmlVersions ??= []).push("3.3.0");
|
|
474
|
-
const qt = (e, t,
|
|
475
|
-
const
|
|
476
|
-
let s =
|
|
474
|
+
const qt = (e, t, i) => {
|
|
475
|
+
const r = i?.renderBefore ?? t;
|
|
476
|
+
let s = r._$litPart$;
|
|
477
477
|
if (s === void 0) {
|
|
478
|
-
const o =
|
|
479
|
-
|
|
478
|
+
const o = i?.renderBefore ?? null;
|
|
479
|
+
r._$litPart$ = s = new D(t.insertBefore(O(), o), o, void 0, i ?? {});
|
|
480
480
|
}
|
|
481
481
|
return s._$AI(e), s;
|
|
482
482
|
};
|
|
@@ -490,8 +490,8 @@ let F = class extends E {
|
|
|
490
490
|
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
491
491
|
}
|
|
492
492
|
update(t) {
|
|
493
|
-
const
|
|
494
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(
|
|
493
|
+
const i = this.render();
|
|
494
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(i, this.renderRoot, this.renderOptions);
|
|
495
495
|
}
|
|
496
496
|
connectedCallback() {
|
|
497
497
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -514,89 +514,89 @@ let gt = class {
|
|
|
514
514
|
get _$AU() {
|
|
515
515
|
return this._$AM._$AU;
|
|
516
516
|
}
|
|
517
|
-
_$AT(t,
|
|
518
|
-
this._$Ct = t, this._$AM =
|
|
517
|
+
_$AT(t, i, r) {
|
|
518
|
+
this._$Ct = t, this._$AM = i, this._$Ci = r;
|
|
519
519
|
}
|
|
520
|
-
_$AS(t,
|
|
521
|
-
return this.update(t,
|
|
520
|
+
_$AS(t, i) {
|
|
521
|
+
return this.update(t, i);
|
|
522
522
|
}
|
|
523
|
-
update(t,
|
|
524
|
-
return this.render(...
|
|
523
|
+
update(t, i) {
|
|
524
|
+
return this.render(...i);
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
|
-
const { I: Lt } = Nt, ht = () => document.createComment(""), k = (e, t,
|
|
528
|
-
const
|
|
529
|
-
if (
|
|
530
|
-
const o =
|
|
531
|
-
|
|
527
|
+
const { I: Lt } = Nt, ht = () => document.createComment(""), k = (e, t, i) => {
|
|
528
|
+
const r = e._$AA.parentNode, s = t === void 0 ? e._$AB : t._$AA;
|
|
529
|
+
if (i === void 0) {
|
|
530
|
+
const o = r.insertBefore(ht(), s), n = r.insertBefore(ht(), s);
|
|
531
|
+
i = new Lt(o, n, e, e.options);
|
|
532
532
|
} else {
|
|
533
|
-
const o =
|
|
533
|
+
const o = i._$AB.nextSibling, n = i._$AM, h = n !== e;
|
|
534
534
|
if (h) {
|
|
535
535
|
let l;
|
|
536
|
-
|
|
536
|
+
i._$AQ?.(e), i._$AM = e, i._$AP !== void 0 && (l = e._$AU) !== n._$AU && i._$AP(l);
|
|
537
537
|
}
|
|
538
538
|
if (o !== s || h) {
|
|
539
|
-
let l =
|
|
539
|
+
let l = i._$AA;
|
|
540
540
|
for (; l !== o; ) {
|
|
541
541
|
const c = l.nextSibling;
|
|
542
|
-
|
|
542
|
+
r.insertBefore(l, s), l = c;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
return
|
|
547
|
-
}, A = (e, t,
|
|
546
|
+
return i;
|
|
547
|
+
}, A = (e, t, i = e) => (e._$AI(t, i), 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
|
-
const
|
|
551
|
-
for (; t !==
|
|
552
|
-
const
|
|
553
|
-
t.remove(), t =
|
|
550
|
+
const i = e._$AB.nextSibling;
|
|
551
|
+
for (; t !== i; ) {
|
|
552
|
+
const r = t.nextSibling;
|
|
553
|
+
t.remove(), t = r;
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
|
-
const ut = (e, t,
|
|
557
|
-
const
|
|
558
|
-
for (let s = t; s <=
|
|
559
|
-
return
|
|
556
|
+
const ut = (e, t, i) => {
|
|
557
|
+
const r = /* @__PURE__ */ new Map();
|
|
558
|
+
for (let s = t; s <= i; s++) r.set(e[s], s);
|
|
559
|
+
return r;
|
|
560
560
|
}, ct = 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
|
-
dt(e, t,
|
|
565
|
-
let
|
|
566
|
-
|
|
564
|
+
dt(e, t, i) {
|
|
565
|
+
let r;
|
|
566
|
+
i === void 0 ? i = t : t !== void 0 && (r = t);
|
|
567
567
|
const s = [], o = [];
|
|
568
568
|
let n = 0;
|
|
569
|
-
for (const h of e) s[n] =
|
|
569
|
+
for (const h of e) s[n] = r ? r(h, n) : n, o[n] = i(h, n), n++;
|
|
570
570
|
return { values: o, keys: s };
|
|
571
571
|
}
|
|
572
|
-
render(e, t,
|
|
573
|
-
return this.dt(e, t,
|
|
572
|
+
render(e, t, i) {
|
|
573
|
+
return this.dt(e, t, i).values;
|
|
574
574
|
}
|
|
575
|
-
update(e, [t,
|
|
576
|
-
const s = Kt(e), { values: o, keys: n } = this.dt(t,
|
|
575
|
+
update(e, [t, i, r]) {
|
|
576
|
+
const s = Kt(e), { values: o, keys: n } = this.dt(t, i, r);
|
|
577
577
|
if (!Array.isArray(s)) return this.ut = n, o;
|
|
578
578
|
const h = this.ut ??= [], l = [];
|
|
579
|
-
let c, m, a = 0,
|
|
580
|
-
for (; a <=
|
|
581
|
-
else if (s[
|
|
579
|
+
let c, m, a = 0, p = s.length - 1, u = 0, f = o.length - 1;
|
|
580
|
+
for (; a <= p && u <= f; ) if (s[a] === null) a++;
|
|
581
|
+
else if (s[p] === null) p--;
|
|
582
582
|
else if (h[a] === n[u]) l[u] = A(s[a], o[u]), a++, u++;
|
|
583
|
-
else if (h[
|
|
583
|
+
else if (h[p] === n[f]) l[f] = A(s[p], o[f]), p--, f--;
|
|
584
584
|
else if (h[a] === n[f]) l[f] = A(s[a], o[f]), k(e, l[f + 1], s[a]), a++, f--;
|
|
585
|
-
else if (h[
|
|
586
|
-
else if (c === void 0 && (c = ut(n, u, f), m = ut(h, a,
|
|
585
|
+
else if (h[p] === n[u]) l[u] = A(s[p], o[u]), k(e, s[a], s[p]), p--, u++;
|
|
586
|
+
else if (c === void 0 && (c = ut(n, u, f), m = ut(h, a, p)), c.has(h[a])) if (c.has(h[p])) {
|
|
587
587
|
const _ = m.get(n[u]), z = _ !== void 0 ? s[_] : null;
|
|
588
588
|
if (z === null) {
|
|
589
589
|
const X = k(e, s[a]);
|
|
590
590
|
A(X, o[u]), l[u] = X;
|
|
591
591
|
} else l[u] = A(z, o[u]), k(e, s[a], z), s[_] = null;
|
|
592
592
|
u++;
|
|
593
|
-
} else L(s[
|
|
593
|
+
} else L(s[p]), p--;
|
|
594
594
|
else L(s[a]), a++;
|
|
595
595
|
for (; u <= f; ) {
|
|
596
596
|
const _ = k(e, l[f + 1]);
|
|
597
597
|
A(_, o[u]), l[u++] = _;
|
|
598
598
|
}
|
|
599
|
-
for (; a <=
|
|
599
|
+
for (; a <= p; ) {
|
|
600
600
|
const _ = s[a++];
|
|
601
601
|
_ !== null && L(_);
|
|
602
602
|
}
|
|
@@ -605,25 +605,25 @@ const ut = (e, t, r) => {
|
|
|
605
605
|
});
|
|
606
606
|
const Zt = bt(class extends gt {
|
|
607
607
|
constructor() {
|
|
608
|
-
super(...arguments), this.key =
|
|
608
|
+
super(...arguments), this.key = d;
|
|
609
609
|
}
|
|
610
610
|
render(e, t) {
|
|
611
611
|
return this.key = e, t;
|
|
612
612
|
}
|
|
613
|
-
update(e, [t,
|
|
614
|
-
return t !== this.key && (_t(e), this.key = t),
|
|
613
|
+
update(e, [t, i]) {
|
|
614
|
+
return t !== this.key && (_t(e), this.key = t), i;
|
|
615
615
|
}
|
|
616
616
|
});
|
|
617
|
-
const Jt = (e) => (t,
|
|
618
|
-
|
|
617
|
+
const Jt = (e) => (t, i) => {
|
|
618
|
+
i !== void 0 ? i.addInitializer((() => {
|
|
619
619
|
customElements.define(e, t);
|
|
620
620
|
})) : customElements.define(e, t);
|
|
621
621
|
};
|
|
622
|
-
const Qt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t,
|
|
623
|
-
const { kind:
|
|
622
|
+
const Qt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, i) => {
|
|
623
|
+
const { kind: r, metadata: s } = i;
|
|
624
624
|
let o = globalThis.litPropertyMetadata.get(s);
|
|
625
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()),
|
|
626
|
-
const { name: n } =
|
|
625
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(i.name, e), r === "accessor") {
|
|
626
|
+
const { name: n } = i;
|
|
627
627
|
return { set(h) {
|
|
628
628
|
const l = t.get.call(this);
|
|
629
629
|
t.set.call(this, h), this.requestUpdate(n, l, e);
|
|
@@ -631,41 +631,41 @@ const Qt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged:
|
|
|
631
631
|
return h !== void 0 && this.C(n, void 0, e, h), h;
|
|
632
632
|
} };
|
|
633
633
|
}
|
|
634
|
-
if (
|
|
635
|
-
const { name: n } =
|
|
634
|
+
if (r === "setter") {
|
|
635
|
+
const { name: n } = i;
|
|
636
636
|
return function(h) {
|
|
637
637
|
const l = this[n];
|
|
638
638
|
t.call(this, h), this.requestUpdate(n, l, e);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
throw Error("Unsupported decorator location: " +
|
|
641
|
+
throw Error("Unsupported decorator location: " + r);
|
|
642
642
|
};
|
|
643
643
|
function q(e) {
|
|
644
|
-
return (t,
|
|
644
|
+
return (t, i) => typeof i == "object" ? Gt(e, t, i) : ((r, s, o) => {
|
|
645
645
|
const n = s.hasOwnProperty(o);
|
|
646
|
-
return s.constructor.createProperty(o,
|
|
647
|
-
})(e, t,
|
|
646
|
+
return s.constructor.createProperty(o, r), n ? Object.getOwnPropertyDescriptor(s, o) : void 0;
|
|
647
|
+
})(e, t, i);
|
|
648
648
|
}
|
|
649
649
|
function M(e) {
|
|
650
650
|
return q({ ...e, state: !0, attribute: !1 });
|
|
651
651
|
}
|
|
652
|
-
const Xt = (e, t,
|
|
652
|
+
const Xt = (e, t, i) => (i.configurable = !0, i.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, i), i);
|
|
653
653
|
function Yt(e, t) {
|
|
654
|
-
return (
|
|
654
|
+
return (i, r, s) => {
|
|
655
655
|
const o = (n) => n.renderRoot?.querySelector(e) ?? null;
|
|
656
|
-
return Xt(
|
|
656
|
+
return Xt(i, r, { get() {
|
|
657
657
|
return o(this);
|
|
658
658
|
} });
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, g = (e, t,
|
|
662
|
-
for (var s =
|
|
663
|
-
(n = e[o]) && (s = (
|
|
664
|
-
return
|
|
661
|
+
var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, g = (e, t, i, r) => {
|
|
662
|
+
for (var s = r > 1 ? void 0 : r ? ee(t, i) : t, o = e.length - 1, n; o >= 0; o--)
|
|
663
|
+
(n = e[o]) && (s = (r ? n(t, i, s) : n(s)) || s);
|
|
664
|
+
return r && s && te(t, i, s), s;
|
|
665
665
|
};
|
|
666
666
|
let b = class extends F {
|
|
667
667
|
constructor() {
|
|
668
|
-
super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.fieldValues = {}, this.version = "1.0.
|
|
668
|
+
super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.fieldValues = {}, this.version = "1.0.31", this.dialogScrimPatched = !1;
|
|
669
669
|
}
|
|
670
670
|
update(e) {
|
|
671
671
|
e.has("theme") && this.registerTheme(this.theme), super.update(e);
|
|
@@ -703,15 +703,15 @@ let b = class extends F {
|
|
|
703
703
|
`), e.adoptedStyleSheets = [...e.adoptedStyleSheets, t], this.dialogScrimPatched = !0;
|
|
704
704
|
}
|
|
705
705
|
registerTheme(e) {
|
|
706
|
-
const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(),
|
|
707
|
-
this.themeBgColor =
|
|
706
|
+
const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), i = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
|
|
707
|
+
this.themeBgColor = i || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
|
|
708
708
|
}
|
|
709
709
|
openFormDialog() {
|
|
710
710
|
this.dialogOpen = !0;
|
|
711
711
|
}
|
|
712
712
|
handleFormSubmit(e) {
|
|
713
713
|
e.preventDefault();
|
|
714
|
-
const
|
|
714
|
+
const i = e.submitter?.getAttribute("value") ?? "submit", r = e.target, s = new FormData(r), o = this.inputData?.formFields?.map((n, h) => {
|
|
715
715
|
const l = {
|
|
716
716
|
swarm_app_databackend_key: n.targetColumn?.swarm_app_databackend_key,
|
|
717
717
|
table_name: n.targetColumn?.tablename,
|
|
@@ -726,14 +726,14 @@ let b = class extends F {
|
|
|
726
726
|
swarm_app_databackend_key: this.inputData?.deleteFlagColumn?.swarm_app_databackend_key,
|
|
727
727
|
table_name: this.inputData?.deleteFlagColumn?.tablename,
|
|
728
728
|
column_name: this.inputData?.deleteFlagColumn?.column,
|
|
729
|
-
value:
|
|
729
|
+
value: i === "delete"
|
|
730
730
|
}), this.dispatchEvent(
|
|
731
731
|
new CustomEvent("data-submit", {
|
|
732
732
|
detail: o,
|
|
733
733
|
bubbles: !1,
|
|
734
734
|
composed: !1
|
|
735
735
|
})
|
|
736
|
-
),
|
|
736
|
+
), i === "delete") {
|
|
737
737
|
const n = this.resolveRoute({
|
|
738
738
|
route: this.inputData?.deleteNavigationRoute,
|
|
739
739
|
variables: this.inputData?.variables
|
|
@@ -765,8 +765,8 @@ let b = class extends F {
|
|
|
765
765
|
switch (t) {
|
|
766
766
|
case "numberfield": {
|
|
767
767
|
if (e === "" || e === null || e === void 0) return null;
|
|
768
|
-
const
|
|
769
|
-
return Number.isNaN(
|
|
768
|
+
const i = parseFloat(e);
|
|
769
|
+
return Number.isNaN(i) ? null : i;
|
|
770
770
|
}
|
|
771
771
|
case "checkbox":
|
|
772
772
|
return e === "on" || e === "true";
|
|
@@ -779,12 +779,12 @@ let b = class extends F {
|
|
|
779
779
|
// submission agree. Checkbox is normalized to 'true'/'false' (matching the
|
|
780
780
|
// literals designers use in a condition list); a field absent from the DOM
|
|
781
781
|
// (hidden by its own condition) yields its effective default value.
|
|
782
|
-
currentRawValue(e, t,
|
|
783
|
-
const
|
|
782
|
+
currentRawValue(e, t, i) {
|
|
783
|
+
const r = `column-${t}`;
|
|
784
784
|
if (e.hiddenField)
|
|
785
785
|
return this.effectivePreFilledValue(e) ?? this.effectiveDefaultValue(e) ?? "";
|
|
786
|
-
if (e.type === "checkbox") return
|
|
787
|
-
const s =
|
|
786
|
+
if (e.type === "checkbox") return i.has(r) ? "true" : "false";
|
|
787
|
+
const s = i.get(r);
|
|
788
788
|
return s === null || s === "" ? this.effectiveDefaultValue(e) ?? "" : String(s);
|
|
789
789
|
}
|
|
790
790
|
// Rebuild the label→value map on every input/change so conditional-display
|
|
@@ -793,10 +793,10 @@ let b = class extends F {
|
|
|
793
793
|
handleFieldChange(e) {
|
|
794
794
|
const t = e.currentTarget;
|
|
795
795
|
if (!t) return;
|
|
796
|
-
const
|
|
796
|
+
const i = new FormData(t), r = {};
|
|
797
797
|
this.inputData?.formFields?.forEach((s, o) => {
|
|
798
|
-
s.label && (
|
|
799
|
-
}), this.fieldValues =
|
|
798
|
+
s.label && (r[s.label] = this.currentRawValue(s, o, i));
|
|
799
|
+
}), this.fieldValues = r;
|
|
800
800
|
}
|
|
801
801
|
// A field is visible unless it declares a conditional-display rule whose
|
|
802
802
|
// controlling field (referenced by label) does not currently hold one of the
|
|
@@ -805,12 +805,12 @@ let b = class extends F {
|
|
|
805
805
|
isFieldVisible(e) {
|
|
806
806
|
const t = e.conditionalDisplay?.conditionField?.trim();
|
|
807
807
|
if (!t) return !0;
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
810
|
-
const
|
|
811
|
-
if (!
|
|
812
|
-
const s = this.fieldValues[t] ?? this.effectivePreFilledValue(
|
|
813
|
-
return
|
|
808
|
+
const i = (e.conditionalDisplay?.conditionValues ?? "").split(",").map((o) => o.trim()).filter((o) => o !== "");
|
|
809
|
+
if (i.length === 0) return !0;
|
|
810
|
+
const r = this.inputData?.formFields?.find((o) => o.label === t);
|
|
811
|
+
if (!r) return !0;
|
|
812
|
+
const s = this.fieldValues[t] ?? this.effectivePreFilledValue(r) ?? this.effectiveDefaultValue(r) ?? "";
|
|
813
|
+
return i.includes(String(s));
|
|
814
814
|
}
|
|
815
815
|
renderTextField(e, t) {
|
|
816
816
|
return $`
|
|
@@ -845,31 +845,33 @@ let b = class extends F {
|
|
|
845
845
|
`;
|
|
846
846
|
}
|
|
847
847
|
renderCheckbox(e, t) {
|
|
848
|
-
const
|
|
848
|
+
const i = this.effectivePreFilledValue(e), r = this.effectiveDefaultValue(e);
|
|
849
849
|
return $`
|
|
850
850
|
<div class="checkbox-container">
|
|
851
851
|
<md-checkbox
|
|
852
852
|
name="column-${t}"
|
|
853
853
|
aria-label=${e.label ?? ""}
|
|
854
|
-
?checked=${String(
|
|
855
|
-
|
|
856
|
-
?required=${e.required && !i && !r}
|
|
854
|
+
?checked=${String(i ?? r) === "true"}
|
|
855
|
+
?required=${e.required && !r && !i}
|
|
857
856
|
></md-checkbox>
|
|
858
|
-
<label class="label">
|
|
857
|
+
<label class="label">
|
|
858
|
+
${e.label}
|
|
859
|
+
${e.description ? $`<span class="supporting-text">${e.description}</span>` : d}
|
|
860
|
+
</label>
|
|
859
861
|
</div>
|
|
860
862
|
`;
|
|
861
863
|
}
|
|
862
864
|
renderTextArea(e, t) {
|
|
863
|
-
const
|
|
865
|
+
const i = this.effectivePreFilledValue(e), r = this.effectiveDefaultValue(e);
|
|
864
866
|
return $`
|
|
865
867
|
<md-outlined-text-field
|
|
866
868
|
.name="column-${t}"
|
|
867
869
|
.label="${e.label ?? ""}"
|
|
868
870
|
type="textarea"
|
|
869
|
-
.value="${
|
|
870
|
-
.placeholder="${
|
|
871
|
+
.value="${i ?? ""}"
|
|
872
|
+
.placeholder="${r ?? ""}"
|
|
871
873
|
rows="3"
|
|
872
|
-
?required=${e.required && !
|
|
874
|
+
?required=${e.required && !r && !i}
|
|
873
875
|
supporting-text=${e.description ?? ""}
|
|
874
876
|
></md-outlined-text-field>
|
|
875
877
|
`;
|
|
@@ -886,10 +888,10 @@ let b = class extends F {
|
|
|
886
888
|
>
|
|
887
889
|
${ct(
|
|
888
890
|
e.values ?? [],
|
|
889
|
-
(
|
|
890
|
-
(
|
|
891
|
-
<md-select-option .value="${
|
|
892
|
-
${
|
|
891
|
+
(i) => i.value,
|
|
892
|
+
(i) => $`
|
|
893
|
+
<md-select-option .value="${i.value ?? ""}">
|
|
894
|
+
${i.displayLabel}
|
|
893
895
|
</md-select-option>
|
|
894
896
|
`
|
|
895
897
|
)}
|
|
@@ -917,13 +919,13 @@ let b = class extends F {
|
|
|
917
919
|
let t = e?.route ?? "";
|
|
918
920
|
if (t) {
|
|
919
921
|
if (e?.variables)
|
|
920
|
-
for (const
|
|
921
|
-
|
|
922
|
+
for (const i of e.variables)
|
|
923
|
+
i.label && (t = t.split(`{{${i.label}}}`).join(encodeURIComponent(String(i.value ?? ""))));
|
|
922
924
|
if (t.includes("*")) {
|
|
923
|
-
const
|
|
924
|
-
for (let s = 0; s <
|
|
925
|
-
|
|
926
|
-
t = (t.startsWith("/") ? "/" : "") +
|
|
925
|
+
const i = (this.route || "").split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
926
|
+
for (let s = 0; s < r.length; s++)
|
|
927
|
+
r[s] === "*" && (r[s] = i[s] ?? "");
|
|
928
|
+
t = (t.startsWith("/") ? "/" : "") + r.filter(Boolean).join("/");
|
|
927
929
|
}
|
|
928
930
|
return t;
|
|
929
931
|
}
|
|
@@ -932,20 +934,20 @@ let b = class extends F {
|
|
|
932
934
|
this.resetForm(), this.dialogOpen = !1;
|
|
933
935
|
}
|
|
934
936
|
render() {
|
|
935
|
-
const e = this.themeTitleColor, t = this.themeBgColor,
|
|
937
|
+
const e = this.themeTitleColor, t = this.themeBgColor, i = t?.startsWith("rgba") ? t.replace(/rgba\(([^)]+),\s*[\d.]+\)/, "rgb($1)") : t?.startsWith("#") && t.length === 9 ? t.substring(0, 7) : t?.startsWith("#") && t.length === 5 ? t.substring(0, 4) : t;
|
|
936
938
|
return $`
|
|
937
939
|
<style>
|
|
938
940
|
:host {
|
|
939
941
|
--md-sys-color-on-surface: ${e};
|
|
940
942
|
--md-sys-color-on-surface-variant: ${e};
|
|
941
943
|
--md-sys-color-outline: ${e};
|
|
942
|
-
--md-sys-color-surface-container: ${
|
|
944
|
+
--md-sys-color-surface-container: ${i};
|
|
943
945
|
/* Dialog container and select dropdown panel always use the
|
|
944
946
|
alpha-stripped color so they stay fully opaque regardless of
|
|
945
947
|
the theme's (possibly translucent) background. */
|
|
946
|
-
--md-dialog-container-color: ${
|
|
947
|
-
--md-menu-container-color: ${
|
|
948
|
-
--md-menu-item-selected-container-color: ${
|
|
948
|
+
--md-dialog-container-color: ${i};
|
|
949
|
+
--md-menu-container-color: ${i};
|
|
950
|
+
--md-menu-item-selected-container-color: ${i};
|
|
949
951
|
--md-menu-item-selected-label-text-color: ${e};
|
|
950
952
|
color: ${e};
|
|
951
953
|
}
|
|
@@ -960,8 +962,8 @@ let b = class extends F {
|
|
|
960
962
|
>
|
|
961
963
|
<md-icon slot="icon">add</md-icon>
|
|
962
964
|
</md-fab>
|
|
963
|
-
` :
|
|
964
|
-
${this.inputData?.formButton ?
|
|
965
|
+
` : d}
|
|
966
|
+
${this.inputData?.formButton ? d : $`
|
|
965
967
|
<header>
|
|
966
968
|
<h3 class="paging" ?active=${this.inputData?.title}>
|
|
967
969
|
${this.inputData?.title}
|
|
@@ -978,11 +980,11 @@ let b = class extends F {
|
|
|
978
980
|
class="form"
|
|
979
981
|
quick
|
|
980
982
|
?open=${this.dialogOpen}
|
|
981
|
-
@cancel=${(
|
|
982
|
-
|
|
983
|
+
@cancel=${(r) => {
|
|
984
|
+
r.preventDefault();
|
|
983
985
|
}}
|
|
984
|
-
@keydown=${(
|
|
985
|
-
|
|
986
|
+
@keydown=${(r) => {
|
|
987
|
+
r.key === "Escape" && r.preventDefault();
|
|
986
988
|
}}
|
|
987
989
|
@closed=${() => this.dialogOpen = !1}
|
|
988
990
|
>
|
|
@@ -995,7 +997,7 @@ let b = class extends F {
|
|
|
995
997
|
value="delete"
|
|
996
998
|
type="submit"
|
|
997
999
|
>Delete</md-filled-button
|
|
998
|
-
>` :
|
|
1000
|
+
>` : d}
|
|
999
1001
|
<md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
|
|
1000
1002
|
<md-outlined-button @click=${this.cancelEdit}>Cancel</md-outlined-button>
|
|
1001
1003
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
@@ -1013,7 +1015,7 @@ let b = class extends F {
|
|
|
1013
1015
|
value="delete"
|
|
1014
1016
|
type="submit"
|
|
1015
1017
|
>Delete</md-filled-button
|
|
1016
|
-
>` :
|
|
1018
|
+
>` : d}
|
|
1017
1019
|
<md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
|
|
1018
1020
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
1019
1021
|
>Submit</md-filled-button
|
|
@@ -1040,7 +1042,7 @@ let b = class extends F {
|
|
|
1040
1042
|
this.inputData?.formFields ?? [],
|
|
1041
1043
|
(e, t) => t,
|
|
1042
1044
|
(e, t) => {
|
|
1043
|
-
if (e.hiddenField || !this.isFieldVisible(e)) return
|
|
1045
|
+
if (e.hiddenField || !this.isFieldVisible(e)) return d;
|
|
1044
1046
|
switch (e.type) {
|
|
1045
1047
|
case "textfield":
|
|
1046
1048
|
return this.renderTextField(e, t);
|
|
@@ -1186,6 +1188,14 @@ b.styles = vt`
|
|
|
1186
1188
|
flex-direction: column;
|
|
1187
1189
|
}
|
|
1188
1190
|
|
|
1191
|
+
/* md-checkbox has no supporting-text of its own, unlike md-outlined-text-field
|
|
1192
|
+
and md-outlined-select, so the hint is rendered by hand to match theirs. */
|
|
1193
|
+
.supporting-text {
|
|
1194
|
+
font-size: 12px;
|
|
1195
|
+
line-height: 16px;
|
|
1196
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1189
1199
|
md-outlined-select {
|
|
1190
1200
|
flex: 1;
|
|
1191
1201
|
}
|
|
@@ -1238,7 +1248,7 @@ g([
|
|
|
1238
1248
|
M()
|
|
1239
1249
|
], b.prototype, "fieldValues", 2);
|
|
1240
1250
|
b = g([
|
|
1241
|
-
Jt("widget-form-1.0.
|
|
1251
|
+
Jt("widget-form-1.0.31")
|
|
1242
1252
|
], b);
|
|
1243
1253
|
export {
|
|
1244
1254
|
b as WidgetForm
|