@oslokommune/punkt-elements 12.3.4 → 12.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{class-map-1LSYgumx.cjs → class-map-CFiVus5w.cjs} +1 -1
- package/dist/{class-map-QbdgvBsV.js → class-map-DnAEF9tj.js} +1 -1
- package/dist/{index-CGGB6fVA.js → index-BoxUN9GL.js} +100 -85
- package/dist/{index-C9AIH4rL.js → index-CiTPWPc2.js} +3 -3
- package/dist/{index-t0H-gKGh.js → index-CsKoXqeT.js} +1 -1
- package/dist/{index-C7NOKSUx.cjs → index-DZ0cjZdG.cjs} +1 -1
- package/dist/{index-CSa2k4ML.cjs → index-DZGlpxj6.cjs} +7 -7
- package/dist/{index-B5_qWvbO.cjs → index-ZXmkp0To.cjs} +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +4 -4
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +4 -4
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +4 -4
- package/dist/pkt-component-template.cjs +1 -1
- package/dist/pkt-component-template.js +3 -3
- package/dist/pkt-datepicker.cjs +9 -9
- package/dist/pkt-datepicker.js +58 -57
- package/dist/pkt-element.cjs +1 -1
- package/dist/pkt-element.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -2
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +2 -2
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +4 -4
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +4 -4
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +4 -4
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +4 -4
- package/dist/{ref-v9geUvt6.js → ref-DzpbHCb_.js} +1 -1
- package/dist/{ref-BK6FYWo3.cjs → ref-G2cIenWo.cjs} +1 -1
- package/package.json +2 -2
- package/src/components/datepicker/index.ts +9 -25
- package/src/components/element/index.ts +53 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-DZGlpxj6.cjs"),n=require("./directive-19_ixLKS.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -22,7 +22,7 @@ let vt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt),
|
|
25
|
+
const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt), Et = (r, t) => {
|
|
26
26
|
if (W) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
27
27
|
else for (const e of t) {
|
|
28
28
|
const s = document.createElement("style"), i = I.litNonce;
|
|
@@ -38,7 +38,7 @@ const bt = (r) => new vt(typeof r == "string" ? r : r + "", void 0, dt), St = (r
|
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
40
|
*/
|
|
41
|
-
const { is:
|
|
41
|
+
const { is: St, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnPropertyNames: xt, getOwnPropertySymbols: Pt, getPrototypeOf: Ct } = Object, v = globalThis, tt = v.trustedTypes, Tt = tt ? tt.emptyScript : "", q = v.reactiveElementPolyfillSupport, T = (r, t) => r, D = { toAttribute(r, t) {
|
|
42
42
|
switch (t) {
|
|
43
43
|
case Boolean:
|
|
44
44
|
r = r ? Tt : null;
|
|
@@ -66,7 +66,7 @@ const { is: Et, defineProperty: wt, getOwnPropertyDescriptor: Ut, getOwnProperty
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
return e;
|
|
69
|
-
} }, K = (r, t) => !
|
|
69
|
+
} }, K = (r, t) => !St(r, t), et = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: K };
|
|
70
70
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), v.litPropertyMetadata ?? (v.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
71
71
|
class U extends HTMLElement {
|
|
72
72
|
static addInitializer(t) {
|
|
@@ -154,7 +154,7 @@ class U extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
createRenderRoot() {
|
|
156
156
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
157
|
-
return
|
|
157
|
+
return Et(t, this.constructor.elementStyles), t;
|
|
158
158
|
}
|
|
159
159
|
connectedCallback() {
|
|
160
160
|
var t;
|
|
@@ -266,26 +266,26 @@ class U extends HTMLElement {
|
|
|
266
266
|
firstUpdated(t) {
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[T("elementProperties")] = /* @__PURE__ */ new Map(), U[T("finalized")] = /* @__PURE__ */ new Map(),
|
|
269
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[T("elementProperties")] = /* @__PURE__ */ new Map(), U[T("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: U }), (v.reactiveElementVersions ?? (v.reactiveElementVersions = [])).push("2.0.4");
|
|
270
270
|
/**
|
|
271
271
|
* @license
|
|
272
272
|
* Copyright 2017 Google LLC
|
|
273
273
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
274
274
|
*/
|
|
275
|
-
const M = globalThis,
|
|
276
|
-
\f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, rt = />/g, b = RegExp(`>|${
|
|
277
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Ot = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Kt = Ot(1), x = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(),
|
|
275
|
+
const M = globalThis, F = M.trustedTypes, st = F ? F.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, G = "?" + _, Mt = `<${G}>`, S = document, R = () => S.createComment(""), N = (r) => r === null || typeof r != "object" && typeof r != "function", Q = Array.isArray, ct = (r) => Q(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", j = `[
|
|
276
|
+
\f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, rt = />/g, b = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
277
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, ot = /"/g, pt = /^(?:script|style|textarea|title)$/i, Ot = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Kt = Ot(1), x = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
|
|
278
278
|
function ut(r, t) {
|
|
279
279
|
if (!Q(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
280
280
|
return st !== void 0 ? st.createHTML(t) : t;
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const gt = (r, t) => {
|
|
283
283
|
const e = r.length - 1, s = [];
|
|
284
284
|
let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = C;
|
|
285
285
|
for (let h = 0; h < e; h++) {
|
|
286
286
|
const a = r[h];
|
|
287
|
-
let d,
|
|
288
|
-
for (; $ < a.length && (n.lastIndex = $,
|
|
287
|
+
let d, f, l = -1, $ = 0;
|
|
288
|
+
for (; $ < a.length && (n.lastIndex = $, f = n.exec(a), f !== null); ) $ = n.lastIndex, n === C ? f[1] === "!--" ? n = it : f[1] !== void 0 ? n = rt : f[2] !== void 0 ? (pt.test(f[2]) && (i = RegExp("</" + f[2], "g")), n = b) : f[3] !== void 0 && (n = b) : n === b ? f[0] === ">" ? (n = i ?? C, l = -1) : f[1] === void 0 ? l = -2 : (l = n.lastIndex - f[2].length, d = f[1], n = f[3] === void 0 ? b : f[3] === '"' ? ot : nt) : n === ot || n === nt ? n = b : n === it || n === rt ? n = C : (n = b, i = void 0);
|
|
289
289
|
const A = n === b && r[h + 1].startsWith("/>") ? " " : "";
|
|
290
290
|
o += n === C ? a + Mt : l >= 0 ? (s.push(d), a.slice(0, l) + Z + a.slice(l) + _ + A) : a + _ + (l === -2 ? h : A);
|
|
291
291
|
}
|
|
@@ -296,22 +296,22 @@ class k {
|
|
|
296
296
|
let i;
|
|
297
297
|
this.parts = [];
|
|
298
298
|
let o = 0, n = 0;
|
|
299
|
-
const h = t.length - 1, a = this.parts, [d,
|
|
300
|
-
if (this.el = k.createElement(d, s),
|
|
299
|
+
const h = t.length - 1, a = this.parts, [d, f] = gt(t, e);
|
|
300
|
+
if (this.el = k.createElement(d, s), E.currentNode = this.el.content, e === 2 || e === 3) {
|
|
301
301
|
const l = this.el.content.firstChild;
|
|
302
302
|
l.replaceWith(...l.childNodes);
|
|
303
303
|
}
|
|
304
|
-
for (; (i =
|
|
304
|
+
for (; (i = E.nextNode()) !== null && a.length < h; ) {
|
|
305
305
|
if (i.nodeType === 1) {
|
|
306
306
|
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(Z)) {
|
|
307
|
-
const $ =
|
|
308
|
-
a.push({ type: 1, index: o, name: V[2], strings: A, ctor: V[1] === "." ?
|
|
307
|
+
const $ = f[n++], A = i.getAttribute(l).split(_), V = /([.?@])?(.*)/.exec($);
|
|
308
|
+
a.push({ type: 1, index: o, name: V[2], strings: A, ctor: V[1] === "." ? ft : V[1] === "?" ? yt : V[1] === "@" ? $t : H }), i.removeAttribute(l);
|
|
309
309
|
} else l.startsWith(_) && (a.push({ type: 6, index: o }), i.removeAttribute(l));
|
|
310
310
|
if (pt.test(i.tagName)) {
|
|
311
311
|
const l = i.textContent.split(_), $ = l.length - 1;
|
|
312
312
|
if ($ > 0) {
|
|
313
|
-
i.textContent =
|
|
314
|
-
for (let A = 0; A < $; A++) i.append(l[A], R()),
|
|
313
|
+
i.textContent = F ? F.emptyScript : "";
|
|
314
|
+
for (let A = 0; A < $; A++) i.append(l[A], R()), E.nextNode(), a.push({ type: 2, index: ++o });
|
|
315
315
|
i.append(l[$], R());
|
|
316
316
|
}
|
|
317
317
|
}
|
|
@@ -324,7 +324,7 @@ class k {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
static createElement(t, e) {
|
|
327
|
-
const s =
|
|
327
|
+
const s = S.createElement("template");
|
|
328
328
|
return s.innerHTML = t, s;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -335,7 +335,7 @@ function w(r, t, e = r, s) {
|
|
|
335
335
|
const o = N(t) ? void 0 : t._$litDirective$;
|
|
336
336
|
return (i == null ? void 0 : i.constructor) !== o && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e.o ?? (e.o = []))[s] = i : e.l = i), i !== void 0 && (t = w(r, i._$AS(r, t.values), i, s)), t;
|
|
337
337
|
}
|
|
338
|
-
class
|
|
338
|
+
class mt {
|
|
339
339
|
constructor(t, e) {
|
|
340
340
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
341
341
|
}
|
|
@@ -346,17 +346,17 @@ class ft {
|
|
|
346
346
|
return this._$AM._$AU;
|
|
347
347
|
}
|
|
348
348
|
u(t) {
|
|
349
|
-
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ??
|
|
350
|
-
|
|
351
|
-
let o =
|
|
349
|
+
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0);
|
|
350
|
+
E.currentNode = i;
|
|
351
|
+
let o = E.nextNode(), n = 0, h = 0, a = s[0];
|
|
352
352
|
for (; a !== void 0; ) {
|
|
353
353
|
if (n === a.index) {
|
|
354
354
|
let d;
|
|
355
355
|
a.type === 2 ? d = new P(o, o.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (d = new _t(o, this, t)), this._$AV.push(d), a = s[++h];
|
|
356
356
|
}
|
|
357
|
-
n !== (a == null ? void 0 : a.index) && (o =
|
|
357
|
+
n !== (a == null ? void 0 : a.index) && (o = E.nextNode(), n++);
|
|
358
358
|
}
|
|
359
|
-
return
|
|
359
|
+
return E.currentNode = S, i;
|
|
360
360
|
}
|
|
361
361
|
p(t) {
|
|
362
362
|
let e = 0;
|
|
@@ -392,14 +392,14 @@ class P {
|
|
|
392
392
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
393
393
|
}
|
|
394
394
|
_(t) {
|
|
395
|
-
this._$AH !== c && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
395
|
+
this._$AH !== c && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
|
|
396
396
|
}
|
|
397
397
|
$(t) {
|
|
398
398
|
var o;
|
|
399
399
|
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = k.createElement(ut(s.h, s.h[0]), this.options)), s);
|
|
400
400
|
if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e);
|
|
401
401
|
else {
|
|
402
|
-
const n = new
|
|
402
|
+
const n = new mt(i, this), h = n.u(this.options);
|
|
403
403
|
n.p(e), this.T(h), this._$AH = n;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
@@ -451,7 +451,7 @@ class H {
|
|
|
451
451
|
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
class
|
|
454
|
+
class ft extends H {
|
|
455
455
|
constructor() {
|
|
456
456
|
super(...arguments), this.type = 3;
|
|
457
457
|
}
|
|
@@ -459,7 +459,7 @@ class gt extends H {
|
|
|
459
459
|
this.element[this.name] = t === c ? void 0 : t;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
class
|
|
462
|
+
class yt extends H {
|
|
463
463
|
constructor() {
|
|
464
464
|
super(...arguments), this.type = 4;
|
|
465
465
|
}
|
|
@@ -492,8 +492,8 @@ class _t {
|
|
|
492
492
|
w(this, t);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
const Zt = { M: Z, P: _, A: G, C: 1, L:
|
|
496
|
-
|
|
495
|
+
const Zt = { M: Z, P: _, A: G, C: 1, L: gt, R: mt, D: ct, V: w, I: P, H, N: yt, U: $t, B: ft, F: _t }, B = M.litHtmlPolyfillSupport;
|
|
496
|
+
B == null || B(k, P), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.2.0");
|
|
497
497
|
const Rt = (r, t, e) => {
|
|
498
498
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
499
499
|
let i = s._$litPart$;
|
|
@@ -578,11 +578,11 @@ function p(r) {
|
|
|
578
578
|
function Ht(r) {
|
|
579
579
|
return p({ ...r, state: !0, attribute: !1 });
|
|
580
580
|
}
|
|
581
|
-
var
|
|
581
|
+
var g = [];
|
|
582
582
|
for (var J = 0; J < 256; ++J)
|
|
583
|
-
|
|
583
|
+
g.push((J + 256).toString(16).slice(1));
|
|
584
584
|
function Vt(r, t = 0) {
|
|
585
|
-
return (
|
|
585
|
+
return (g[r[t + 0]] + g[r[t + 1]] + g[r[t + 2]] + g[r[t + 3]] + "-" + g[r[t + 4]] + g[r[t + 5]] + "-" + g[r[t + 6]] + g[r[t + 7]] + "-" + g[r[t + 8]] + g[r[t + 9]] + "-" + g[r[t + 10]] + g[r[t + 11]] + g[r[t + 12]] + g[r[t + 13]] + g[r[t + 14]] + g[r[t + 15]]).toLowerCase();
|
|
586
586
|
}
|
|
587
587
|
var L, Lt = new Uint8Array(16);
|
|
588
588
|
function It() {
|
|
@@ -594,18 +594,18 @@ var Dt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(cryp
|
|
|
594
594
|
const ht = {
|
|
595
595
|
randomUUID: Dt
|
|
596
596
|
};
|
|
597
|
-
function
|
|
597
|
+
function Ft(r, t, e) {
|
|
598
598
|
if (ht.randomUUID && !t && !r)
|
|
599
599
|
return ht.randomUUID();
|
|
600
600
|
r = r || {};
|
|
601
601
|
var s = r.random || (r.rng || It)();
|
|
602
602
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Vt(s);
|
|
603
603
|
}
|
|
604
|
-
const
|
|
604
|
+
const qt = {
|
|
605
605
|
hi: "Hei!"
|
|
606
|
-
},
|
|
606
|
+
}, jt = {
|
|
607
607
|
buttonAltText: "Åpne kalender"
|
|
608
|
-
},
|
|
608
|
+
}, Bt = {
|
|
609
609
|
days: [
|
|
610
610
|
"Mandag",
|
|
611
611
|
"Tirsdag",
|
|
@@ -674,10 +674,10 @@ const jt = {
|
|
|
674
674
|
date: {
|
|
675
675
|
multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."
|
|
676
676
|
}
|
|
677
|
-
},
|
|
678
|
-
example:
|
|
679
|
-
calendar:
|
|
680
|
-
dates:
|
|
677
|
+
}, y = {
|
|
678
|
+
example: qt,
|
|
679
|
+
calendar: jt,
|
|
680
|
+
dates: Bt,
|
|
681
681
|
forms: zt
|
|
682
682
|
};
|
|
683
683
|
var Jt = Object.defineProperty, u = (r, t, e, s) => {
|
|
@@ -690,7 +690,7 @@ class At extends O {
|
|
|
690
690
|
* Add extra stuff here whenever we decide what should be added here…
|
|
691
691
|
*/
|
|
692
692
|
constructor() {
|
|
693
|
-
super(), this.strings =
|
|
693
|
+
super(), this.strings = y;
|
|
694
694
|
}
|
|
695
695
|
/**
|
|
696
696
|
* Runs on mount, used to set up various values and whatever you need to run
|
|
@@ -714,50 +714,65 @@ class At extends O {
|
|
|
714
714
|
u([
|
|
715
715
|
p({ type: Object })
|
|
716
716
|
], At.prototype, "strings");
|
|
717
|
-
class
|
|
717
|
+
class m extends At {
|
|
718
718
|
constructor() {
|
|
719
|
-
super(), this.id =
|
|
719
|
+
super(), this.id = Ft(), this.name = this.id, this.required = !1, this.disabled = !1, this.placeholder = "", this.min = null, this.max = null, this.minlength = 0, this.maxlength = 0, this.pattern = "", this.optionalTag = !1, this.optionalText = y.forms.labels.optional, this.requiredTag = !1, this.requiredText = y.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.touched = !1, this.internals = this.attachInternals();
|
|
720
720
|
}
|
|
721
721
|
static get formAssociated() {
|
|
722
722
|
return !0;
|
|
723
723
|
}
|
|
724
724
|
manageValidity(t) {
|
|
725
|
-
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
725
|
+
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, y.forms.messages.required, t) : t.validity.typeMismatch || t.validity.badInput ? this.internals.setValidity({ typeMismatch: !0 }, y.forms.messages.invalid, t) : t.validity.patternMismatch ? this.internals.setValidity(
|
|
726
726
|
{ patternMismatch: !0 },
|
|
727
|
-
|
|
727
|
+
y.forms.messages.invalidPattern,
|
|
728
728
|
t
|
|
729
|
-
) : t.validity.tooShort || this.minLength > 0 && this.value.length < this.minLength ? this.internals.setValidity({ tooShort: !0 },
|
|
729
|
+
) : t.validity.tooShort || this.minLength > 0 && this.value.length < this.minLength ? this.internals.setValidity({ tooShort: !0 }, y.forms.messages.tooShort, t) : t.validity.tooLong || this.maxLength > 0 && this.value.length > this.maxLength ? this.internals.setValidity({ tooLong: !0 }, y.forms.messages.tooLong, t) : t.validity.rangeUnderflow ? this.internals.setValidity(
|
|
730
730
|
{ rangeUnderflow: !0 },
|
|
731
|
-
|
|
731
|
+
y.forms.messages.rangeUnderflow,
|
|
732
732
|
t
|
|
733
733
|
) : t.validity.rangeOverflow ? this.internals.setValidity(
|
|
734
734
|
{ rangeOverflow: !0 },
|
|
735
|
-
|
|
735
|
+
y.forms.messages.rangeOverflow,
|
|
736
736
|
t
|
|
737
737
|
) : t.validity.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({});
|
|
738
738
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
this.touched = !0;
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
if (!(typeof t != "string" && !Array.isArray(t))) {
|
|
746
|
-
if ((this.range || this.multiple) && !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), Array.isArray(t)) {
|
|
739
|
+
setFormValue(t) {
|
|
740
|
+
if (this.internals)
|
|
741
|
+
if (Array.isArray(t)) {
|
|
747
742
|
const e = new FormData();
|
|
748
743
|
t.forEach((s) => {
|
|
749
744
|
e.append(this.name, s);
|
|
750
745
|
}), this.internals.setFormValue(e);
|
|
751
746
|
} else
|
|
752
747
|
this.internals.setFormValue(t);
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
748
|
+
}
|
|
749
|
+
valueChanged(t, e) {
|
|
750
|
+
typeof t == "string" ? ((this.multiple || this.range) && t.includes(",") && (t = t.split(",")), this.value = t, this._value = Array.isArray(t) ? t : [t]) : Array.isArray(t) ? (this.value = t, this._value = t) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && e && e.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (e == null ? void 0 : e.toString()) && this.onInput(this.value), this.updateComplete.then(() => this.requestUpdate());
|
|
751
|
+
}
|
|
752
|
+
// When input goes from content to no content
|
|
753
|
+
clearInputValue() {
|
|
754
|
+
const t = this.multiple || this.range ? [] : "";
|
|
755
|
+
this.value = t, this.internals.setFormValue(t), this.dispatchEvent(new Event("change")), this.dispatchEvent(
|
|
756
|
+
new CustomEvent("value-change", {
|
|
757
|
+
detail: t,
|
|
758
|
+
bubbles: !0,
|
|
759
|
+
composed: !0
|
|
760
|
+
})
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
// Trigger this when you want to set the value of the input out to the form
|
|
764
|
+
onInput(t) {
|
|
765
|
+
if (!this.touched) {
|
|
766
|
+
this.touched = !0, t && this.setFormValue(t);
|
|
767
|
+
return;
|
|
760
768
|
}
|
|
769
|
+
typeof t != "string" && !Array.isArray(t) || ((this.range || this.multiple) && !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), this.setFormValue(t), this.manageValidity(this.inputRef.value), this.inputRef2 && this.manageValidity(this.inputRef2.value), this.dispatchEvent(new Event("input")), this.dispatchEvent(new Event("change")), this.dispatchEvent(
|
|
770
|
+
new CustomEvent("value-change", {
|
|
771
|
+
detail: t,
|
|
772
|
+
bubbles: !0,
|
|
773
|
+
composed: !0
|
|
774
|
+
})
|
|
775
|
+
), this.internals.reportValidity());
|
|
761
776
|
}
|
|
762
777
|
firstUpdated(t) {
|
|
763
778
|
super.firstUpdated(t), this.required && (this.internals.ariaRequired = !0), this.disabled && (this.internals.disabled = !0, this.internals.ariaDisabled = !0), this.internals.setFormValue(this.value), this.manageValidity(this.inputRef.value);
|
|
@@ -765,64 +780,64 @@ class f extends At {
|
|
|
765
780
|
}
|
|
766
781
|
u([
|
|
767
782
|
p({ type: String, reflect: !0 })
|
|
768
|
-
],
|
|
783
|
+
], m.prototype, "id");
|
|
769
784
|
u([
|
|
770
785
|
p({ type: String, reflect: !0 })
|
|
771
|
-
],
|
|
786
|
+
], m.prototype, "name");
|
|
772
787
|
u([
|
|
773
788
|
p({ type: Boolean, reflect: !0 })
|
|
774
|
-
],
|
|
789
|
+
], m.prototype, "required");
|
|
775
790
|
u([
|
|
776
791
|
p({ type: Boolean, reflect: !0 })
|
|
777
|
-
],
|
|
792
|
+
], m.prototype, "disabled");
|
|
778
793
|
u([
|
|
779
794
|
p({ type: String, reflect: !0 })
|
|
780
|
-
],
|
|
795
|
+
], m.prototype, "placeholder");
|
|
781
796
|
u([
|
|
782
797
|
p({ type: Number, reflect: !0 })
|
|
783
|
-
],
|
|
798
|
+
], m.prototype, "min");
|
|
784
799
|
u([
|
|
785
800
|
p({ type: Number, reflect: !0 })
|
|
786
|
-
],
|
|
801
|
+
], m.prototype, "max");
|
|
787
802
|
u([
|
|
788
803
|
p({ type: Number, reflect: !0 })
|
|
789
|
-
],
|
|
804
|
+
], m.prototype, "minlength");
|
|
790
805
|
u([
|
|
791
806
|
p({ type: Number, reflect: !0 })
|
|
792
|
-
],
|
|
807
|
+
], m.prototype, "maxlength");
|
|
793
808
|
u([
|
|
794
809
|
p({ type: String, reflect: !0 })
|
|
795
|
-
],
|
|
810
|
+
], m.prototype, "pattern");
|
|
796
811
|
u([
|
|
797
812
|
p({ type: Boolean, reflect: !0 })
|
|
798
|
-
],
|
|
813
|
+
], m.prototype, "optionalTag");
|
|
799
814
|
u([
|
|
800
815
|
p({ type: String, reflect: !0 })
|
|
801
|
-
],
|
|
816
|
+
], m.prototype, "optionalText");
|
|
802
817
|
u([
|
|
803
818
|
p({ type: Boolean, reflect: !0 })
|
|
804
|
-
],
|
|
819
|
+
], m.prototype, "requiredTag");
|
|
805
820
|
u([
|
|
806
821
|
p({ type: String, reflect: !0 })
|
|
807
|
-
],
|
|
822
|
+
], m.prototype, "requiredText");
|
|
808
823
|
u([
|
|
809
824
|
p({ type: Boolean, reflect: !0 })
|
|
810
|
-
],
|
|
825
|
+
], m.prototype, "hasError");
|
|
811
826
|
u([
|
|
812
827
|
p({ type: String, reflect: !0 })
|
|
813
|
-
],
|
|
828
|
+
], m.prototype, "errorMessage");
|
|
814
829
|
u([
|
|
815
830
|
Ht()
|
|
816
|
-
],
|
|
831
|
+
], m.prototype, "touched");
|
|
817
832
|
export {
|
|
818
833
|
c as D,
|
|
819
834
|
At as P,
|
|
820
835
|
x as R,
|
|
821
|
-
|
|
836
|
+
m as a,
|
|
822
837
|
Kt as k,
|
|
823
838
|
p as n,
|
|
824
839
|
Ht as r,
|
|
825
840
|
Zt as s,
|
|
826
|
-
|
|
827
|
-
|
|
841
|
+
y as t,
|
|
842
|
+
Ft as v
|
|
828
843
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as O, P as $, k as f, D, n as c } from "./index-
|
|
1
|
+
import { r as O, P as $, k as f, D, n as c } from "./index-BoxUN9GL.js";
|
|
2
2
|
import { a as b } from "./converters-DNCwIFwr.js";
|
|
3
3
|
import { t as A } from "./directive-DA0-wdk7.js";
|
|
4
|
-
import { R as I } from "./class-map-
|
|
5
|
-
import "./index-
|
|
4
|
+
import { R as I } from "./class-map-DnAEF9tj.js";
|
|
5
|
+
import "./index-CsKoXqeT.js";
|
|
6
6
|
function k(e) {
|
|
7
7
|
const t = Object.prototype.toString.call(e);
|
|
8
8
|
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-DZGlpxj6.cjs"),n=require("./directive-19_ixLKS.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const L=globalThis,W=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),X=new WeakMap;let Et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(W&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}};const St=r=>new Et(typeof r=="string"?r:r+"",void 0,ct),wt=(r,t)=>{if(W)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=L.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},tt=W?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return St(e)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:xt,getOwnPropertyNames:Ct,getOwnPropertySymbols:Tt,getPrototypeOf:Mt}=Object,v=globalThis,et=v.trustedTypes,Ot=et?et.emptyScript:"",
|
|
9
|
+
*/const{is:Ut,defineProperty:Pt,getOwnPropertyDescriptor:xt,getOwnPropertyNames:Ct,getOwnPropertySymbols:Tt,getPrototypeOf:Mt}=Object,v=globalThis,et=v.trustedTypes,Ot=et?et.emptyScript:"",q=v.reactiveElementPolyfillSupport,T=(r,t)=>r,D={toAttribute(r,t){switch(t){case Boolean:r=r?Ot:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},K=(r,t)=>!Ut(r,t),st={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:K};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),v.litPropertyMetadata??(v.litPropertyMetadata=new WeakMap);class P extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Pt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=xt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const h=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Mt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,s=[...Ct(e),...Tt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(tt(i))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return wt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:D).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),h=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:D;this._$Em=i,this[i]=h.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??K)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[T("elementProperties")]=new Map,P[T("finalized")]=new Map,q==null||q({ReactiveElement:P}),(v.reactiveElementVersions??(v.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const M=globalThis,
|
|
14
|
-
\f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rt=/-->/g,nt=/>/g,b=RegExp(`>|${
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ut=/^(?:script|style|textarea|title)$/i,kt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Nt=kt(1),w=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ht=new WeakMap,E=S.createTreeWalker(S,129);function mt(r,t){if(!Q(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}const
|
|
13
|
+
*/const M=globalThis,F=M.trustedTypes,it=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,Z="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+_,Rt=`<${G}>`,S=document,R=()=>S.createComment(""),k=r=>r===null||typeof r!="object"&&typeof r!="function",Q=Array.isArray,pt=r=>Q(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",j=`[
|
|
14
|
+
\f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rt=/-->/g,nt=/>/g,b=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ut=/^(?:script|style|textarea|title)$/i,kt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Nt=kt(1),w=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ht=new WeakMap,E=S.createTreeWalker(S,129);function mt(r,t){if(!Q(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}const gt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let h=0;h<e;h++){const a=r[h];let p,f,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,f=n.exec(a),f!==null);)$=n.lastIndex,n===C?f[1]==="!--"?n=rt:f[1]!==void 0?n=nt:f[2]!==void 0?(ut.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=b):f[3]!==void 0&&(n=b):n===b?f[0]===">"?(n=i??C,l=-1):f[1]===void 0?l=-2:(l=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?b:f[3]==='"'?at:ot):n===at||n===ot?n=b:n===rt||n===nt?n=C:(n=b,i=void 0);const A=n===b&&r[h+1].startsWith("/>")?" ":"";o+=n===C?a+Rt:l>=0?(s.push(p),a.slice(0,l)+Z+a.slice(l)+_+A):a+_+(l===-2?h:A)}return[mt(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const h=t.length-1,a=this.parts,[p,f]=gt(t,e);if(this.el=N.createElement(p,s),E.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=E.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Z)){const $=f[n++],A=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:V[2],strings:A,ctor:V[1]==="."?yt:V[1]==="?"?$t:V[1]==="@"?_t:H}),i.removeAttribute(l)}else l.startsWith(_)&&(a.push({type:6,index:o}),i.removeAttribute(l));if(ut.test(i.tagName)){const l=i.textContent.split(_),$=l.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let A=0;A<$;A++)i.append(l[A],R()),E.nextNode(),a.push({type:2,index:++o});i.append(l[$],R())}}}else if(i.nodeType===8)if(i.data===G)a.push({type:2,index:o});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)a.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function U(r,t,e=r,s){var n,h;if(t===w)return t;let i=s!==void 0?(n=e.o)==null?void 0:n[s]:e.l;const o=k(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e.o??(e.o=[]))[s]=i:e.l=i),i!==void 0&&(t=U(r,i._$AS(r,t.values),i,s)),t}class ft{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??S).importNode(e,!0);E.currentNode=i;let o=E.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new x(o,o.nextSibling,this,t):a.type===1?p=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(p=new At(o,this,t)),this._$AV.push(p),a=s[++h]}n!==(a==null?void 0:a.index)&&(o=E.nextNode(),n++)}return E.currentNode=S,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),k(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(mt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new ft(i,this),h=n.u(this.options);n.p(e),this.T(h),this._$AH=n}}_$AC(t){let e=ht.get(t.strings);return e===void 0&&ht.set(t.strings,e=new N(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(R()),this.O(R()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=U(this,t,e,0),n=!k(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const h=t;let a,p;for(t=o[0],a=0;a<o.length-1;a++)p=U(this,h[s+a],e,a),p===w&&(p=this._$AH[a]),n||(n=!k(p)||p!==this._$AH[a]),p===d?t=d:t!==d&&(t+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class $t extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class _t extends H{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??d)===w)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class At{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const Ht={M:Z,P:_,A:G,C:1,L:gt,R:ft,D:pt,V:U,I:x,H,N:$t,U:_t,B:yt,F:At},B=M.litHtmlPolyfillSupport;B==null||B(N,x),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.2.0");const Vt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(R(),o),o,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const It={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:K},Lt=(r=It,t,e)=>{const{kind:s,metadata:i}=e;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(e.name,r),s==="accessor"){const{name:n}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,r)},init(h){return h!==void 0&&this.P(n,void 0,r),h}}}if(s==="setter"){const{name:n}=e;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+s)};function c(r){return(t,e)=>typeof e=="object"?Lt(r,t,e):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,n?{...s,wrapped:!0}:s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/function vt(r){return c({...r,state:!0,attribute:!1})}var
|
|
27
|
+
*/function vt(r){return c({...r,state:!0,attribute:!1})}var g=[];for(var J=0;J<256;++J)g.push((J+256).toString(16).slice(1));function Dt(r,t=0){return(g[r[t+0]]+g[r[t+1]]+g[r[t+2]]+g[r[t+3]]+"-"+g[r[t+4]]+g[r[t+5]]+"-"+g[r[t+6]]+g[r[t+7]]+"-"+g[r[t+8]]+g[r[t+9]]+"-"+g[r[t+10]]+g[r[t+11]]+g[r[t+12]]+g[r[t+13]]+g[r[t+14]]+g[r[t+15]]).toLowerCase()}var I,Ft=new Uint8Array(16);function qt(){if(!I&&(I=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(Ft)}var jt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const lt={randomUUID:jt};function bt(r,t,e){if(lt.randomUUID&&!t&&!r)return lt.randomUUID();r=r||{};var s=r.random||(r.rng||qt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dt(s)}const Bt={hi:"Hei!"},zt={buttonAltText:"Åpne kalender"},Jt={days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Wt={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},y={example:Bt,calendar:zt,dates:Jt,forms:Wt};var Kt=Object.defineProperty,u=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Kt(t,e,i),i};class Y extends O{constructor(){super(),this.strings=y}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}}u([c({type:Object})],Y.prototype,"strings");class m extends Y{constructor(){super(),this.id=bt(),this.name=this.id,this.required=!1,this.disabled=!1,this.placeholder="",this.min=null,this.max=null,this.minlength=0,this.maxlength=0,this.pattern="",this.optionalTag=!1,this.optionalText=y.forms.labels.optional,this.requiredTag=!1,this.requiredText=y.forms.labels.required,this.hasError=!1,this.errorMessage="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){this.required&&!this.value?this.internals.setValidity({valueMissing:!0},y.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},y.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},y.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},y.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},y.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},y.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},y.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(s=>{e.append(this.name,s)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChanged(t,e){typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=t,this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onInput(this.value),this.updateComplete.then(()=>this.requestUpdate())}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onInput(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.dispatchEvent(new Event("input")),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}firstUpdated(t){super.firstUpdated(t),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.disabled=!0,this.internals.ariaDisabled=!0),this.internals.setFormValue(this.value),this.manageValidity(this.inputRef.value)}}u([c({type:String,reflect:!0})],m.prototype,"id");u([c({type:String,reflect:!0})],m.prototype,"name");u([c({type:Boolean,reflect:!0})],m.prototype,"required");u([c({type:Boolean,reflect:!0})],m.prototype,"disabled");u([c({type:String,reflect:!0})],m.prototype,"placeholder");u([c({type:Number,reflect:!0})],m.prototype,"min");u([c({type:Number,reflect:!0})],m.prototype,"max");u([c({type:Number,reflect:!0})],m.prototype,"minlength");u([c({type:Number,reflect:!0})],m.prototype,"maxlength");u([c({type:String,reflect:!0})],m.prototype,"pattern");u([c({type:Boolean,reflect:!0})],m.prototype,"optionalTag");u([c({type:String,reflect:!0})],m.prototype,"optionalText");u([c({type:Boolean,reflect:!0})],m.prototype,"requiredTag");u([c({type:String,reflect:!0})],m.prototype,"requiredText");u([c({type:Boolean,reflect:!0})],m.prototype,"hasError");u([c({type:String,reflect:!0})],m.prototype,"errorMessage");u([vt()],m.prototype,"touched");exports.D=d;exports.PktElement=Y;exports.PktInputElement=m;exports.R=w;exports.ke=Nt;exports.n=c;exports.r=vt;exports.si=Ht;exports.translations=y;exports.v4=bt;
|