@oslokommune/punkt-react 14.5.3 → 14.5.4
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/punkt-react.es.js +942 -928
- package/dist/punkt-react.umd.js +82 -82
- package/package.json +3 -3
package/dist/punkt-react.es.js
CHANGED
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
import { jsx as c, jsxs as S, Fragment as Jt } from "react/jsx-runtime";
|
|
37
|
-
import le, { createContext as
|
|
38
|
-
import { Link as
|
|
39
|
-
const
|
|
37
|
+
import le, { createContext as Zn, forwardRef as Z, useContext as Xn, useState as Pt, useEffect as Nt, useCallback as Oe, useRef as Xt, Fragment as Fa, useMemo as Jn, createRef as Va, createElement as ja, Children as zs, isValidElement as Ha, cloneElement as Ua } from "react";
|
|
38
|
+
import { Link as za } from "react-router-dom";
|
|
39
|
+
const Qn = Zn({}), qa = () => Xn(Qn), Wa = Z(
|
|
40
40
|
({ compact: i = !1, skin: t = "borderless", ariaLabelledBy: e, children: s, name: n, className: a }, r) => {
|
|
41
41
|
const l = [
|
|
42
42
|
"pkt-accordion",
|
|
@@ -44,7 +44,7 @@ const Jn = Gn({}), Ua = () => Zn(Jn), za = Z(
|
|
|
44
44
|
t && `pkt-accordion--${t}`,
|
|
45
45
|
a
|
|
46
46
|
].filter(Boolean).join(" ");
|
|
47
|
-
return /* @__PURE__ */ c(
|
|
47
|
+
return /* @__PURE__ */ c(Qn.Provider, { value: { name: n }, children: /* @__PURE__ */ c(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
ref: r,
|
|
@@ -56,29 +56,29 @@ const Jn = Gn({}), Ua = () => Zn(Jn), za = Z(
|
|
|
56
56
|
) });
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
|
-
|
|
59
|
+
Wa.displayName = "PktAccordion";
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2018 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
const
|
|
65
|
+
const Ka = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), cn = /* @__PURE__ */ new WeakMap(), un = (i, t, e, s, n) => {
|
|
66
66
|
const a = n == null ? void 0 : n[t];
|
|
67
67
|
a === void 0 ? (i[t] = e, e == null && t in HTMLElement.prototype && i.removeAttribute(t)) : e !== s && ((r, l, u) => {
|
|
68
|
-
let p =
|
|
69
|
-
p === void 0 &&
|
|
68
|
+
let p = cn.get(r);
|
|
69
|
+
p === void 0 && cn.set(r, p = /* @__PURE__ */ new Map());
|
|
70
70
|
let g = p.get(l);
|
|
71
71
|
u !== void 0 ? g === void 0 ? (p.set(l, g = { handleEvent: u }), r.addEventListener(l, g)) : g.handleEvent = u : g !== void 0 && (p.delete(l), r.removeEventListener(l, g));
|
|
72
72
|
})(i, a, e);
|
|
73
73
|
}, he = ({ react: i, tagName: t, elementClass: e, events: s, displayName: n }) => {
|
|
74
74
|
const a = new Set(Object.keys(s ?? {})), r = i.forwardRef(((l, u) => {
|
|
75
75
|
const p = i.useRef(/* @__PURE__ */ new Map()), g = i.useRef(null), v = {}, y = {};
|
|
76
|
-
for (const [$, k] of Object.entries(l))
|
|
76
|
+
for (const [$, k] of Object.entries(l)) Ka.has($) ? v[$ === "className" ? "class" : $] = k : a.has($) || $ in e.prototype ? y[$] = k : v[$] = k;
|
|
77
77
|
return i.useLayoutEffect((() => {
|
|
78
78
|
if (g.current === null) return;
|
|
79
79
|
const $ = /* @__PURE__ */ new Map();
|
|
80
|
-
for (const k in y)
|
|
81
|
-
for (const [k, w] of p.current)
|
|
80
|
+
for (const k in y) un(g.current, k, l[k], p.current.get(k), s), p.current.delete(k), $.set(k, l[k]);
|
|
81
|
+
for (const [k, w] of p.current) un(g.current, k, void 0, w, s);
|
|
82
82
|
p.current = $;
|
|
83
83
|
})), i.useLayoutEffect((() => {
|
|
84
84
|
var $;
|
|
@@ -94,50 +94,50 @@ const qa = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
|
|
|
94
94
|
* Copyright 2017 Google LLC
|
|
95
95
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
96
96
|
*/
|
|
97
|
-
const
|
|
98
|
-
\f\r]`, Pi = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
99
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
100
|
-
function
|
|
101
|
-
if (!
|
|
102
|
-
return
|
|
97
|
+
const ps = globalThis, ms = ps.trustedTypes, dn = ms ? ms.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ta = "$lit$", Ee = `lit$${Math.random().toFixed(9).slice(2)}$`, ea = "?" + Ee, Ya = `<${ea}>`, Ze = document, Yi = () => Ze.createComment(""), Gi = (i) => i === null || typeof i != "object" && typeof i != "function", Js = Array.isArray, Ga = (i) => Js(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Es = `[
|
|
98
|
+
\f\r]`, Pi = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pn = /-->/g, mn = />/g, Ue = RegExp(`>|${Es}(?:([^\\s"'>=/]+)(${Es}*=${Es}*(?:[^
|
|
99
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), fn = /'/g, gn = /"/g, ia = /^(?:script|style|textarea|title)$/i, Za = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), d = Za(1), Dt = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), vn = /* @__PURE__ */ new WeakMap(), Ke = Ze.createTreeWalker(Ze, 129);
|
|
100
|
+
function sa(i, t) {
|
|
101
|
+
if (!Js(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
102
|
+
return dn !== void 0 ? dn.createHTML(t) : t;
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const Xa = (i, t) => {
|
|
105
105
|
const e = i.length - 1, s = [];
|
|
106
106
|
let n, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = Pi;
|
|
107
107
|
for (let l = 0; l < e; l++) {
|
|
108
108
|
const u = i[l];
|
|
109
109
|
let p, g, v = -1, y = 0;
|
|
110
|
-
for (; y < u.length && (r.lastIndex = y, g = r.exec(u), g !== null); ) y = r.lastIndex, r === Pi ? g[1] === "!--" ? r =
|
|
110
|
+
for (; y < u.length && (r.lastIndex = y, g = r.exec(u), g !== null); ) y = r.lastIndex, r === Pi ? g[1] === "!--" ? r = pn : g[1] !== void 0 ? r = mn : g[2] !== void 0 ? (ia.test(g[2]) && (n = RegExp("</" + g[2], "g")), r = Ue) : g[3] !== void 0 && (r = Ue) : r === Ue ? g[0] === ">" ? (r = n ?? Pi, v = -1) : g[1] === void 0 ? v = -2 : (v = r.lastIndex - g[2].length, p = g[1], r = g[3] === void 0 ? Ue : g[3] === '"' ? gn : fn) : r === gn || r === fn ? r = Ue : r === pn || r === mn ? r = Pi : (r = Ue, n = void 0);
|
|
111
111
|
const $ = r === Ue && i[l + 1].startsWith("/>") ? " " : "";
|
|
112
|
-
a += r === Pi ? u +
|
|
112
|
+
a += r === Pi ? u + Ya : v >= 0 ? (s.push(p), u.slice(0, v) + ta + u.slice(v) + Ee + $) : u + Ee + (v === -2 ? l : $);
|
|
113
113
|
}
|
|
114
|
-
return [
|
|
114
|
+
return [sa(i, a + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
115
115
|
};
|
|
116
|
-
let
|
|
116
|
+
let qs = class na {
|
|
117
117
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
118
118
|
let n;
|
|
119
119
|
this.parts = [];
|
|
120
120
|
let a = 0, r = 0;
|
|
121
|
-
const l = t.length - 1, u = this.parts, [p, g] =
|
|
122
|
-
if (this.el =
|
|
121
|
+
const l = t.length - 1, u = this.parts, [p, g] = Xa(t, e);
|
|
122
|
+
if (this.el = na.createElement(p, s), Ke.currentNode = this.el.content, e === 2 || e === 3) {
|
|
123
123
|
const v = this.el.content.firstChild;
|
|
124
124
|
v.replaceWith(...v.childNodes);
|
|
125
125
|
}
|
|
126
126
|
for (; (n = Ke.nextNode()) !== null && u.length < l; ) {
|
|
127
127
|
if (n.nodeType === 1) {
|
|
128
|
-
if (n.hasAttributes()) for (const v of n.getAttributeNames()) if (v.endsWith(
|
|
128
|
+
if (n.hasAttributes()) for (const v of n.getAttributeNames()) if (v.endsWith(ta)) {
|
|
129
129
|
const y = g[r++], $ = n.getAttribute(v).split(Ee), k = /([.?@])?(.*)/.exec(y);
|
|
130
|
-
u.push({ type: 1, index: a, name: k[2], strings: $, ctor: k[1] === "." ?
|
|
130
|
+
u.push({ type: 1, index: a, name: k[2], strings: $, ctor: k[1] === "." ? Qa : k[1] === "?" ? tr : k[1] === "@" ? er : ws }), n.removeAttribute(v);
|
|
131
131
|
} else v.startsWith(Ee) && (u.push({ type: 6, index: a }), n.removeAttribute(v));
|
|
132
|
-
if (
|
|
132
|
+
if (ia.test(n.tagName)) {
|
|
133
133
|
const v = n.textContent.split(Ee), y = v.length - 1;
|
|
134
134
|
if (y > 0) {
|
|
135
|
-
n.textContent =
|
|
136
|
-
for (let $ = 0; $ < y; $++) n.append(v[$],
|
|
137
|
-
n.append(v[y],
|
|
135
|
+
n.textContent = ms ? ms.emptyScript : "";
|
|
136
|
+
for (let $ = 0; $ < y; $++) n.append(v[$], Yi()), Ke.nextNode(), u.push({ type: 2, index: ++a });
|
|
137
|
+
n.append(v[y], Yi());
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
} else if (n.nodeType === 8) if (n.data ===
|
|
140
|
+
} else if (n.nodeType === 8) if (n.data === ea) u.push({ type: 2, index: a });
|
|
141
141
|
else {
|
|
142
142
|
let v = -1;
|
|
143
143
|
for (; (v = n.data.indexOf(Ee, v + 1)) !== -1; ) u.push({ type: 7, index: a }), v += Ee.length - 1;
|
|
@@ -154,10 +154,10 @@ function ki(i, t, e = i, s) {
|
|
|
154
154
|
var n, a;
|
|
155
155
|
if (t === Dt) return t;
|
|
156
156
|
let r = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
|
|
157
|
-
const l =
|
|
157
|
+
const l = Gi(t) ? void 0 : t._$litDirective$;
|
|
158
158
|
return (r == null ? void 0 : r.constructor) !== l && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), l === void 0 ? r = void 0 : (r = new l(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = ki(i, r._$AS(i, t.values), r, s)), t;
|
|
159
159
|
}
|
|
160
|
-
let
|
|
160
|
+
let Ja = class {
|
|
161
161
|
constructor(t, e) {
|
|
162
162
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
163
163
|
}
|
|
@@ -174,7 +174,7 @@ let Za = class {
|
|
|
174
174
|
for (; u !== void 0; ) {
|
|
175
175
|
if (r === u.index) {
|
|
176
176
|
let p;
|
|
177
|
-
u.type === 2 ? p = new
|
|
177
|
+
u.type === 2 ? p = new _s(a, a.nextSibling, this, t) : u.type === 1 ? p = new u.ctor(a, u.name, u.strings, this, t) : u.type === 6 && (p = new ir(a, this, t)), this._$AV.push(p), u = s[++l];
|
|
178
178
|
}
|
|
179
179
|
r !== (u == null ? void 0 : u.index) && (a = Ke.nextNode(), r++);
|
|
180
180
|
}
|
|
@@ -184,7 +184,7 @@ let Za = class {
|
|
|
184
184
|
let e = 0;
|
|
185
185
|
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++;
|
|
186
186
|
}
|
|
187
|
-
},
|
|
187
|
+
}, _s = class aa {
|
|
188
188
|
get _$AU() {
|
|
189
189
|
var t;
|
|
190
190
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -204,7 +204,7 @@ let Za = class {
|
|
|
204
204
|
return this._$AB;
|
|
205
205
|
}
|
|
206
206
|
_$AI(t, e = this) {
|
|
207
|
-
t = ki(this, t, e),
|
|
207
|
+
t = ki(this, t, e), Gi(t) ? t === b || t == null || t === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : t !== this._$AH && t !== Dt && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ga(t) ? this.k(t) : this._(t);
|
|
208
208
|
}
|
|
209
209
|
O(t) {
|
|
210
210
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -213,26 +213,26 @@ let Za = class {
|
|
|
213
213
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
214
214
|
}
|
|
215
215
|
_(t) {
|
|
216
|
-
this._$AH !== b &&
|
|
216
|
+
this._$AH !== b && Gi(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Ze.createTextNode(t)), this._$AH = t;
|
|
217
217
|
}
|
|
218
218
|
$(t) {
|
|
219
219
|
var e;
|
|
220
|
-
const { values: s, _$litType$: n } = t, a = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el =
|
|
220
|
+
const { values: s, _$litType$: n } = t, a = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = qs.createElement(sa(n.h, n.h[0]), this.options)), n);
|
|
221
221
|
if (((e = this._$AH) == null ? void 0 : e._$AD) === a) this._$AH.p(s);
|
|
222
222
|
else {
|
|
223
|
-
const r = new
|
|
223
|
+
const r = new Ja(a, this), l = r.u(this.options);
|
|
224
224
|
r.p(s), this.T(l), this._$AH = r;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
_$AC(t) {
|
|
228
|
-
let e =
|
|
229
|
-
return e === void 0 &&
|
|
228
|
+
let e = vn.get(t.strings);
|
|
229
|
+
return e === void 0 && vn.set(t.strings, e = new qs(t)), e;
|
|
230
230
|
}
|
|
231
231
|
k(t) {
|
|
232
|
-
|
|
232
|
+
Js(this._$AH) || (this._$AH = [], this._$AR());
|
|
233
233
|
const e = this._$AH;
|
|
234
234
|
let s, n = 0;
|
|
235
|
-
for (const a of t) n === e.length ? e.push(s = new
|
|
235
|
+
for (const a of t) n === e.length ? e.push(s = new aa(this.O(Yi()), this.O(Yi()), this, this.options)) : s = e[n], s._$AI(a), n++;
|
|
236
236
|
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
237
237
|
}
|
|
238
238
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -246,7 +246,7 @@ let Za = class {
|
|
|
246
246
|
var e;
|
|
247
247
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
248
248
|
}
|
|
249
|
-
},
|
|
249
|
+
}, ws = class {
|
|
250
250
|
get tagName() {
|
|
251
251
|
return this.element.tagName;
|
|
252
252
|
}
|
|
@@ -259,18 +259,18 @@ let Za = class {
|
|
|
259
259
|
_$AI(t, e = this, s, n) {
|
|
260
260
|
const a = this.strings;
|
|
261
261
|
let r = !1;
|
|
262
|
-
if (a === void 0) t = ki(this, t, e, 0), r = !
|
|
262
|
+
if (a === void 0) t = ki(this, t, e, 0), r = !Gi(t) || t !== this._$AH && t !== Dt, r && (this._$AH = t);
|
|
263
263
|
else {
|
|
264
264
|
const l = t;
|
|
265
265
|
let u, p;
|
|
266
|
-
for (t = a[0], u = 0; u < a.length - 1; u++) p = ki(this, l[s + u], e, u), p === Dt && (p = this._$AH[u]), r || (r = !
|
|
266
|
+
for (t = a[0], u = 0; u < a.length - 1; u++) p = ki(this, l[s + u], e, u), p === Dt && (p = this._$AH[u]), r || (r = !Gi(p) || p !== this._$AH[u]), p === b ? t = b : t !== b && (t += (p ?? "") + a[u + 1]), this._$AH[u] = p;
|
|
267
267
|
}
|
|
268
268
|
r && !n && this.j(t);
|
|
269
269
|
}
|
|
270
270
|
j(t) {
|
|
271
271
|
t === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
272
272
|
}
|
|
273
|
-
},
|
|
273
|
+
}, Qa = class extends ws {
|
|
274
274
|
constructor() {
|
|
275
275
|
super(...arguments), this.type = 3;
|
|
276
276
|
}
|
|
@@ -278,7 +278,7 @@ let Za = class {
|
|
|
278
278
|
this.element[this.name] = t === b ? void 0 : t;
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
class
|
|
281
|
+
class tr extends ws {
|
|
282
282
|
constructor() {
|
|
283
283
|
super(...arguments), this.type = 4;
|
|
284
284
|
}
|
|
@@ -286,7 +286,7 @@ class Ja extends _s {
|
|
|
286
286
|
this.element.toggleAttribute(this.name, !!t && t !== b);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
let
|
|
289
|
+
let er = class extends ws {
|
|
290
290
|
constructor(t, e, s, n, a) {
|
|
291
291
|
super(t, e, s, n, a), this.type = 5;
|
|
292
292
|
}
|
|
@@ -299,7 +299,7 @@ let Qa = class extends _s {
|
|
|
299
299
|
var e;
|
|
300
300
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
301
301
|
}
|
|
302
|
-
},
|
|
302
|
+
}, ir = class {
|
|
303
303
|
constructor(t, e, s) {
|
|
304
304
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
305
305
|
}
|
|
@@ -310,14 +310,14 @@ let Qa = class extends _s {
|
|
|
310
310
|
ki(this, t);
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
const
|
|
313
|
+
const sr = { I: _s }, kn = ps.litHtmlPolyfillSupport;
|
|
314
|
+
kn == null || kn(qs, _s), (ps.litHtmlVersions ?? (ps.litHtmlVersions = [])).push("3.3.1");
|
|
315
|
+
const nr = (i, t, e) => {
|
|
316
316
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
317
317
|
let n = s._$litPart$;
|
|
318
318
|
if (n === void 0) {
|
|
319
319
|
const a = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
320
|
-
s._$litPart$ = n = new
|
|
320
|
+
s._$litPart$ = n = new _s(t.insertBefore(Yi(), a), a, void 0, e ?? {});
|
|
321
321
|
}
|
|
322
322
|
return n._$AI(i), n;
|
|
323
323
|
};
|
|
@@ -336,18 +336,18 @@ const V = (i) => (t, e) => {
|
|
|
336
336
|
* Copyright 2019 Google LLC
|
|
337
337
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
338
338
|
*/
|
|
339
|
-
const
|
|
340
|
-
let
|
|
339
|
+
const cs = globalThis, Qs = cs.ShadowRoot && (cs.ShadyCSS === void 0 || cs.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ra = Symbol(), bn = /* @__PURE__ */ new WeakMap();
|
|
340
|
+
let ar = class {
|
|
341
341
|
constructor(t, e, s) {
|
|
342
|
-
if (this._$cssResult$ = !0, s !==
|
|
342
|
+
if (this._$cssResult$ = !0, s !== ra) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
343
343
|
this.cssText = t, this.t = e;
|
|
344
344
|
}
|
|
345
345
|
get styleSheet() {
|
|
346
346
|
let t = this.o;
|
|
347
347
|
const e = this.t;
|
|
348
|
-
if (
|
|
348
|
+
if (Qs && t === void 0) {
|
|
349
349
|
const s = e !== void 0 && e.length === 1;
|
|
350
|
-
s && (t =
|
|
350
|
+
s && (t = bn.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && bn.set(e, t));
|
|
351
351
|
}
|
|
352
352
|
return t;
|
|
353
353
|
}
|
|
@@ -355,26 +355,26 @@ let sr = class {
|
|
|
355
355
|
return this.cssText;
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
358
|
+
const rr = (i) => new ar(typeof i == "string" ? i : i + "", void 0, ra), or = (i, t) => {
|
|
359
|
+
if (Qs) i.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
360
360
|
else for (const e of t) {
|
|
361
|
-
const s = document.createElement("style"), n =
|
|
361
|
+
const s = document.createElement("style"), n = cs.litNonce;
|
|
362
362
|
n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
|
|
363
363
|
}
|
|
364
|
-
},
|
|
364
|
+
}, yn = Qs ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
365
365
|
let e = "";
|
|
366
366
|
for (const s of t.cssRules) e += s.cssText;
|
|
367
|
-
return
|
|
367
|
+
return rr(e);
|
|
368
368
|
})(i) : i;
|
|
369
369
|
/**
|
|
370
370
|
* @license
|
|
371
371
|
* Copyright 2017 Google LLC
|
|
372
372
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
373
373
|
*/
|
|
374
|
-
const { is:
|
|
374
|
+
const { is: lr, defineProperty: hr, getOwnPropertyDescriptor: cr, getOwnPropertyNames: ur, getOwnPropertySymbols: dr, getPrototypeOf: pr } = Object, bi = globalThis, $n = bi.trustedTypes, mr = $n ? $n.emptyScript : "", _n = bi.reactiveElementPolyfillSupport, Wi = (i, t) => i, fs = { toAttribute(i, t) {
|
|
375
375
|
switch (t) {
|
|
376
376
|
case Boolean:
|
|
377
|
-
i = i ?
|
|
377
|
+
i = i ? mr : null;
|
|
378
378
|
break;
|
|
379
379
|
case Object:
|
|
380
380
|
case Array:
|
|
@@ -399,7 +399,7 @@ const { is: rr, defineProperty: or, getOwnPropertyDescriptor: lr, getOwnProperty
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
return e;
|
|
402
|
-
} },
|
|
402
|
+
} }, tn = (i, t) => !lr(i, t), wn = { attribute: !0, type: String, converter: fs, reflect: !1, useDefault: !1, hasChanged: tn };
|
|
403
403
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), bi.litPropertyMetadata ?? (bi.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
404
404
|
let pi = class extends HTMLElement {
|
|
405
405
|
static addInitializer(t) {
|
|
@@ -408,14 +408,14 @@ let pi = class extends HTMLElement {
|
|
|
408
408
|
static get observedAttributes() {
|
|
409
409
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
410
410
|
}
|
|
411
|
-
static createProperty(t, e =
|
|
411
|
+
static createProperty(t, e = wn) {
|
|
412
412
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
413
413
|
const s = Symbol(), n = this.getPropertyDescriptor(t, s, e);
|
|
414
|
-
n !== void 0 &&
|
|
414
|
+
n !== void 0 && hr(this.prototype, t, n);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
static getPropertyDescriptor(t, e, s) {
|
|
418
|
-
const { get: n, set: a } =
|
|
418
|
+
const { get: n, set: a } = cr(this.prototype, t) ?? { get() {
|
|
419
419
|
return this[e];
|
|
420
420
|
}, set(r) {
|
|
421
421
|
this[e] = r;
|
|
@@ -426,17 +426,17 @@ let pi = class extends HTMLElement {
|
|
|
426
426
|
}, configurable: !0, enumerable: !0 };
|
|
427
427
|
}
|
|
428
428
|
static getPropertyOptions(t) {
|
|
429
|
-
return this.elementProperties.get(t) ??
|
|
429
|
+
return this.elementProperties.get(t) ?? wn;
|
|
430
430
|
}
|
|
431
431
|
static _$Ei() {
|
|
432
|
-
if (this.hasOwnProperty(
|
|
433
|
-
const t =
|
|
432
|
+
if (this.hasOwnProperty(Wi("elementProperties"))) return;
|
|
433
|
+
const t = pr(this);
|
|
434
434
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
435
435
|
}
|
|
436
436
|
static finalize() {
|
|
437
|
-
if (this.hasOwnProperty(
|
|
438
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
439
|
-
const e = this.properties, s = [...
|
|
437
|
+
if (this.hasOwnProperty(Wi("finalized"))) return;
|
|
438
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Wi("properties"))) {
|
|
439
|
+
const e = this.properties, s = [...ur(e), ...dr(e)];
|
|
440
440
|
for (const n of s) this.createProperty(n, e[n]);
|
|
441
441
|
}
|
|
442
442
|
const t = this[Symbol.metadata];
|
|
@@ -455,8 +455,8 @@ let pi = class extends HTMLElement {
|
|
|
455
455
|
const e = [];
|
|
456
456
|
if (Array.isArray(t)) {
|
|
457
457
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
458
|
-
for (const n of s) e.unshift(
|
|
459
|
-
} else t !== void 0 && e.push(
|
|
458
|
+
for (const n of s) e.unshift(yn(n));
|
|
459
|
+
} else t !== void 0 && e.push(yn(t));
|
|
460
460
|
return e;
|
|
461
461
|
}
|
|
462
462
|
static _$Eu(t, e) {
|
|
@@ -485,7 +485,7 @@ let pi = class extends HTMLElement {
|
|
|
485
485
|
}
|
|
486
486
|
createRenderRoot() {
|
|
487
487
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
488
|
-
return
|
|
488
|
+
return or(t, this.constructor.elementStyles), t;
|
|
489
489
|
}
|
|
490
490
|
connectedCallback() {
|
|
491
491
|
var t;
|
|
@@ -510,7 +510,7 @@ let pi = class extends HTMLElement {
|
|
|
510
510
|
var s;
|
|
511
511
|
const n = this.constructor.elementProperties.get(t), a = this.constructor._$Eu(t, n);
|
|
512
512
|
if (a !== void 0 && n.reflect === !0) {
|
|
513
|
-
const r = (((s = n.converter) == null ? void 0 : s.toAttribute) !== void 0 ? n.converter :
|
|
513
|
+
const r = (((s = n.converter) == null ? void 0 : s.toAttribute) !== void 0 ? n.converter : fs).toAttribute(e, n.type);
|
|
514
514
|
this._$Em = t, r == null ? this.removeAttribute(a) : this.setAttribute(a, r), this._$Em = null;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
@@ -518,7 +518,7 @@ let pi = class extends HTMLElement {
|
|
|
518
518
|
var s, n;
|
|
519
519
|
const a = this.constructor, r = a._$Eh.get(t);
|
|
520
520
|
if (r !== void 0 && this._$Em !== r) {
|
|
521
|
-
const l = a.getPropertyOptions(r), u = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((s = l.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? l.converter :
|
|
521
|
+
const l = a.getPropertyOptions(r), u = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((s = l.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? l.converter : fs;
|
|
522
522
|
this._$Em = r;
|
|
523
523
|
const p = u.fromAttribute(e, l.type);
|
|
524
524
|
this[r] = p ?? ((n = this._$Ej) == null ? void 0 : n.get(r)) ?? p, this._$Em = null;
|
|
@@ -528,7 +528,7 @@ let pi = class extends HTMLElement {
|
|
|
528
528
|
var n;
|
|
529
529
|
if (t !== void 0) {
|
|
530
530
|
const a = this.constructor, r = this[t];
|
|
531
|
-
if (s ?? (s = a.getPropertyOptions(t)), !((s.hasChanged ??
|
|
531
|
+
if (s ?? (s = a.getPropertyOptions(t)), !((s.hasChanged ?? tn)(r, e) || s.useDefault && s.reflect && r === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(a._$Eu(t, s)))) return;
|
|
532
532
|
this.C(t, e, s);
|
|
533
533
|
}
|
|
534
534
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -604,13 +604,13 @@ let pi = class extends HTMLElement {
|
|
|
604
604
|
firstUpdated(t) {
|
|
605
605
|
}
|
|
606
606
|
};
|
|
607
|
-
pi.elementStyles = [], pi.shadowRootOptions = { mode: "open" }, pi[
|
|
607
|
+
pi.elementStyles = [], pi.shadowRootOptions = { mode: "open" }, pi[Wi("elementProperties")] = /* @__PURE__ */ new Map(), pi[Wi("finalized")] = /* @__PURE__ */ new Map(), _n == null || _n({ ReactiveElement: pi }), (bi.reactiveElementVersions ?? (bi.reactiveElementVersions = [])).push("2.1.1");
|
|
608
608
|
/**
|
|
609
609
|
* @license
|
|
610
610
|
* Copyright 2017 Google LLC
|
|
611
611
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
612
612
|
*/
|
|
613
|
-
const
|
|
613
|
+
const fr = { attribute: !0, type: String, converter: fs, reflect: !1, hasChanged: tn }, gr = (i = fr, t, e) => {
|
|
614
614
|
const { kind: s, metadata: n } = e;
|
|
615
615
|
let a = globalThis.litPropertyMetadata.get(n);
|
|
616
616
|
if (a === void 0 && globalThis.litPropertyMetadata.set(n, a = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), a.set(e.name, i), s === "accessor") {
|
|
@@ -632,7 +632,7 @@ const pr = { attribute: !0, type: String, converter: ms, reflect: !1, hasChanged
|
|
|
632
632
|
throw Error("Unsupported decorator location: " + s);
|
|
633
633
|
};
|
|
634
634
|
function o(i) {
|
|
635
|
-
return (t, e) => typeof e == "object" ?
|
|
635
|
+
return (t, e) => typeof e == "object" ? gr(i, t, e) : ((s, n, a) => {
|
|
636
636
|
const r = n.hasOwnProperty(a);
|
|
637
637
|
return n.constructor.createProperty(a, s), r ? Object.getOwnPropertyDescriptor(n, a) : void 0;
|
|
638
638
|
})(i, t, e);
|
|
@@ -642,7 +642,7 @@ function o(i) {
|
|
|
642
642
|
* Copyright 2017 Google LLC
|
|
643
643
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
644
644
|
*/
|
|
645
|
-
const
|
|
645
|
+
const Zi = globalThis;
|
|
646
646
|
let fi = class extends pi {
|
|
647
647
|
constructor() {
|
|
648
648
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -654,7 +654,7 @@ let fi = class extends pi {
|
|
|
654
654
|
}
|
|
655
655
|
update(t) {
|
|
656
656
|
const e = this.render();
|
|
657
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
657
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = nr(e, this.renderRoot, this.renderOptions);
|
|
658
658
|
}
|
|
659
659
|
connectedCallback() {
|
|
660
660
|
var t;
|
|
@@ -668,24 +668,24 @@ let fi = class extends pi {
|
|
|
668
668
|
return Dt;
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
|
-
var
|
|
672
|
-
fi._$litElement$ = !0, fi.finalized = !0, (
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
(
|
|
676
|
-
const
|
|
677
|
-
example:
|
|
678
|
-
generic:
|
|
679
|
-
calendar:
|
|
680
|
-
dates:
|
|
681
|
-
forms:
|
|
671
|
+
var xn;
|
|
672
|
+
fi._$litElement$ = !0, fi.finalized = !0, (xn = Zi.litElementHydrateSupport) == null || xn.call(Zi, { LitElement: fi });
|
|
673
|
+
const Sn = Zi.litElementPolyfillSupport;
|
|
674
|
+
Sn == null || Sn({ LitElement: fi });
|
|
675
|
+
(Zi.litElementVersions ?? (Zi.litElementVersions = [])).push("4.2.1");
|
|
676
|
+
const vr = { hi: "Hei!" }, kr = { from: "Fra", to: "Til" }, br = { buttonAltText: "Åpne kalender", deleteDate: "Fjern dato" }, yr = { month: "Måned", year: "År", 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" }, $r = { search: { placeholder: "Søk…" }, 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", rangeUnderflowMin: "Verdien må være større enn eller lik {min}.", rangeOverflowMax: "Verdien må være mindre enn eller lik {max}.", dateUnderflow: "For tidlig dato", dateOverflow: "For sen dato" }, helptext: { helptextDropdownButton: "Les mer" }, date: { multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato." } }, Et = {
|
|
677
|
+
example: vr,
|
|
678
|
+
generic: kr,
|
|
679
|
+
calendar: br,
|
|
680
|
+
dates: yr,
|
|
681
|
+
forms: $r
|
|
682
682
|
};
|
|
683
|
-
var
|
|
683
|
+
var _r = Object.defineProperty, oa = (i, t, e, s) => {
|
|
684
684
|
for (var n = void 0, a = i.length - 1, r; a >= 0; a--)
|
|
685
685
|
(r = i[a]) && (n = r(t, e, n) || n);
|
|
686
|
-
return n &&
|
|
686
|
+
return n && _r(t, e, n), n;
|
|
687
687
|
};
|
|
688
|
-
let
|
|
688
|
+
let xs = class extends fi {
|
|
689
689
|
constructor() {
|
|
690
690
|
super(...arguments), this.strings = Et, this.role = null;
|
|
691
691
|
}
|
|
@@ -696,13 +696,13 @@ let ws = class extends fi {
|
|
|
696
696
|
this.requestUpdate();
|
|
697
697
|
}
|
|
698
698
|
};
|
|
699
|
-
|
|
699
|
+
oa([
|
|
700
700
|
o({ type: Object })
|
|
701
|
-
],
|
|
702
|
-
|
|
701
|
+
], xs.prototype, "strings");
|
|
702
|
+
oa([
|
|
703
703
|
o({ type: String })
|
|
704
|
-
],
|
|
705
|
-
let X = class extends
|
|
704
|
+
], xs.prototype, "role");
|
|
705
|
+
let X = class extends xs {
|
|
706
706
|
/**
|
|
707
707
|
* Make sure the component renders in light DOM instead of shadow DOM
|
|
708
708
|
*/
|
|
@@ -769,7 +769,7 @@ const N = ii(class extends xi {
|
|
|
769
769
|
function R(i) {
|
|
770
770
|
return o({ ...i, state: !0, attribute: !1 });
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function la(i, t) {
|
|
773
773
|
return t.some((e) => e.value === i);
|
|
774
774
|
}
|
|
775
775
|
function Di(i) {
|
|
@@ -778,10 +778,10 @@ function Di(i) {
|
|
|
778
778
|
function gi(i) {
|
|
779
779
|
return i.nodeName === "OPTION" || i.nodeName === "DATA";
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
return i.nodeType === Node.ELEMENT_NODE && !
|
|
781
|
+
function wr(i, t) {
|
|
782
|
+
return i.nodeType === Node.ELEMENT_NODE && !la(i, t);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function Ps(i) {
|
|
785
785
|
var t;
|
|
786
786
|
return i.nodeType === Node.TEXT_NODE && ((t = i.nodeValue) == null ? void 0 : t.trim()) !== "";
|
|
787
787
|
}
|
|
@@ -801,7 +801,7 @@ let lt = class {
|
|
|
801
801
|
// ********* UPDATE NODES *********
|
|
802
802
|
updateNodes() {
|
|
803
803
|
this.nodes = [], Array.from(this.host.childNodes).forEach((t) => {
|
|
804
|
-
Di(t) || gi(t) && this.skipOptions || (!
|
|
804
|
+
Di(t) || gi(t) && this.skipOptions || (!la(t, this.slots) || Ps(t)) && this.nodes.push(t);
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
// ********* UPDATE SLOTS *********
|
|
@@ -823,7 +823,7 @@ let lt = class {
|
|
|
823
823
|
return !1;
|
|
824
824
|
}) && t.add(s);
|
|
825
825
|
const n = this.nodes.flatMap(
|
|
826
|
-
(a) =>
|
|
826
|
+
(a) => Ps(a) || a.getAttribute && a.getAttribute("slot") == s && !Di(a) ? a : []
|
|
827
827
|
).filter(
|
|
828
828
|
(a) => e.value && !e.value.contains(a) && !a.contains(e.value)
|
|
829
829
|
);
|
|
@@ -841,7 +841,7 @@ let lt = class {
|
|
|
841
841
|
let e = !1;
|
|
842
842
|
t.forEach((s) => {
|
|
843
843
|
s.type === "childList" && (s.addedNodes.forEach((n) => {
|
|
844
|
-
Di(n) || gi(n) && this.skipOptions || (
|
|
844
|
+
Di(n) || gi(n) && this.skipOptions || (wr(n, this.slots) || Ps(n)) && (this.nodes.push(n), e = !0);
|
|
845
845
|
}), s.removedNodes.forEach((n) => {
|
|
846
846
|
Di(n) || gi(n) && this.skipOptions || (this.nodes = this.nodes.filter((a) => a !== n), e = !0);
|
|
847
847
|
}));
|
|
@@ -863,12 +863,12 @@ let lt = class {
|
|
|
863
863
|
* Copyright 2020 Google LLC
|
|
864
864
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
865
865
|
*/
|
|
866
|
-
const { I:
|
|
866
|
+
const { I: xr } = sr, ha = (i) => i.strings === void 0, Cn = () => document.createComment(""), Ri = (i, t, e) => {
|
|
867
867
|
var s;
|
|
868
868
|
const n = i._$AA.parentNode, a = t === void 0 ? i._$AB : t._$AA;
|
|
869
869
|
if (e === void 0) {
|
|
870
|
-
const r = n.insertBefore(
|
|
871
|
-
e = new
|
|
870
|
+
const r = n.insertBefore(Cn(), a), l = n.insertBefore(Cn(), a);
|
|
871
|
+
e = new xr(r, l, i, i.options);
|
|
872
872
|
} else {
|
|
873
873
|
const r = e._$AB.nextSibling, l = e._$AM, u = l !== i;
|
|
874
874
|
if (u) {
|
|
@@ -884,7 +884,7 @@ const { I: _r } = er, la = (i) => i.strings === void 0, Sn = () => document.crea
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
return e;
|
|
887
|
-
}, ze = (i, t, e = i) => (i._$AI(t, e), i),
|
|
887
|
+
}, ze = (i, t, e = i) => (i._$AI(t, e), i), Sr = {}, ca = (i, t = Sr) => i._$AH = t, Cr = (i) => i._$AH, Ds = (i) => {
|
|
888
888
|
i._$AR(), i._$AA.remove();
|
|
889
889
|
};
|
|
890
890
|
/**
|
|
@@ -892,51 +892,51 @@ const { I: _r } = er, la = (i) => i.strings === void 0, Sn = () => document.crea
|
|
|
892
892
|
* Copyright 2017 Google LLC
|
|
893
893
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
894
894
|
*/
|
|
895
|
-
const
|
|
895
|
+
const Ki = (i, t) => {
|
|
896
896
|
var e;
|
|
897
897
|
const s = i._$AN;
|
|
898
898
|
if (s === void 0) return !1;
|
|
899
|
-
for (const n of s) (e = n._$AO) == null || e.call(n, t, !1),
|
|
899
|
+
for (const n of s) (e = n._$AO) == null || e.call(n, t, !1), Ki(n, t);
|
|
900
900
|
return !0;
|
|
901
|
-
},
|
|
901
|
+
}, gs = (i) => {
|
|
902
902
|
let t, e;
|
|
903
903
|
do {
|
|
904
904
|
if ((t = i._$AM) === void 0) break;
|
|
905
905
|
e = t._$AN, e.delete(i), i = t;
|
|
906
906
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
907
|
-
},
|
|
907
|
+
}, ua = (i) => {
|
|
908
908
|
for (let t; t = i._$AM; i = t) {
|
|
909
909
|
let e = t._$AN;
|
|
910
910
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
911
911
|
else if (e.has(i)) break;
|
|
912
|
-
e.add(i),
|
|
912
|
+
e.add(i), Ar(t);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
function
|
|
916
|
-
this._$AN !== void 0 ? (
|
|
915
|
+
function Tr(i) {
|
|
916
|
+
this._$AN !== void 0 ? (gs(this), this._$AM = i, ua(this)) : this._$AM = i;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function Nr(i, t = !1, e = 0) {
|
|
919
919
|
const s = this._$AH, n = this._$AN;
|
|
920
|
-
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(s)) for (let a = e; a < s.length; a++)
|
|
921
|
-
else s != null && (
|
|
922
|
-
else
|
|
920
|
+
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(s)) for (let a = e; a < s.length; a++) Ki(s[a], !1), gs(s[a]);
|
|
921
|
+
else s != null && (Ki(s, !1), gs(s));
|
|
922
|
+
else Ki(this, i);
|
|
923
923
|
}
|
|
924
|
-
const
|
|
925
|
-
i.type == se.CHILD && (i._$AP ?? (i._$AP =
|
|
924
|
+
const Ar = (i) => {
|
|
925
|
+
i.type == se.CHILD && (i._$AP ?? (i._$AP = Nr), i._$AQ ?? (i._$AQ = Tr));
|
|
926
926
|
};
|
|
927
|
-
let
|
|
927
|
+
let Mr = class extends xi {
|
|
928
928
|
constructor() {
|
|
929
929
|
super(...arguments), this._$AN = void 0;
|
|
930
930
|
}
|
|
931
931
|
_$AT(t, e, s) {
|
|
932
|
-
super._$AT(t, e, s),
|
|
932
|
+
super._$AT(t, e, s), ua(this), this.isConnected = t._$AU;
|
|
933
933
|
}
|
|
934
934
|
_$AO(t, e = !0) {
|
|
935
935
|
var s, n;
|
|
936
|
-
t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (n = this.disconnected) == null || n.call(this)), e && (
|
|
936
|
+
t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (n = this.disconnected) == null || n.call(this)), e && (Ki(this, t), gs(this));
|
|
937
937
|
}
|
|
938
938
|
setValue(t) {
|
|
939
|
-
if (
|
|
939
|
+
if (ha(this._$Ct)) this._$Ct._$AI(t, this);
|
|
940
940
|
else {
|
|
941
941
|
const e = [...this._$Ct._$AH];
|
|
942
942
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
@@ -952,10 +952,10 @@ let Nr = class extends xi {
|
|
|
952
952
|
* Copyright 2020 Google LLC
|
|
953
953
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
954
954
|
*/
|
|
955
|
-
const O = () => new
|
|
956
|
-
let
|
|
955
|
+
const O = () => new Or();
|
|
956
|
+
let Or = class {
|
|
957
957
|
};
|
|
958
|
-
const
|
|
958
|
+
const Rs = /* @__PURE__ */ new WeakMap(), E = ii(class extends Mr {
|
|
959
959
|
render(i) {
|
|
960
960
|
return b;
|
|
961
961
|
}
|
|
@@ -967,13 +967,13 @@ const Ds = /* @__PURE__ */ new WeakMap(), E = ii(class extends Nr {
|
|
|
967
967
|
rt(i) {
|
|
968
968
|
if (this.isConnected || (i = void 0), typeof this.G == "function") {
|
|
969
969
|
const t = this.ht ?? globalThis;
|
|
970
|
-
let e =
|
|
971
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
|
970
|
+
let e = Rs.get(t);
|
|
971
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Rs.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, i), i !== void 0 && this.G.call(this.ht, i);
|
|
972
972
|
} else this.G.value = i;
|
|
973
973
|
}
|
|
974
974
|
get lt() {
|
|
975
975
|
var i, t;
|
|
976
|
-
return typeof this.G == "function" ? (i =
|
|
976
|
+
return typeof this.G == "function" ? (i = Rs.get(this.ht ?? globalThis)) == null ? void 0 : i.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
977
977
|
}
|
|
978
978
|
disconnected() {
|
|
979
979
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -982,7 +982,7 @@ const Ds = /* @__PURE__ */ new WeakMap(), E = ii(class extends Nr {
|
|
|
982
982
|
this.rt(this.ct);
|
|
983
983
|
}
|
|
984
984
|
});
|
|
985
|
-
function
|
|
985
|
+
function da(i, t, e) {
|
|
986
986
|
const s = i.getAttribute("class") || "", n = new Set(s.split(/\s+/).filter(Boolean));
|
|
987
987
|
e ? n.add(t) : n.delete(t), i.setAttribute("class", Array.from(n).join(" "));
|
|
988
988
|
}
|
|
@@ -991,7 +991,7 @@ function ua(i, t, e) {
|
|
|
991
991
|
* Copyright 2017 Google LLC
|
|
992
992
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
993
993
|
*/
|
|
994
|
-
let
|
|
994
|
+
let vs = class extends xi {
|
|
995
995
|
constructor(t) {
|
|
996
996
|
if (super(t), this.it = b, t.type !== se.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
997
997
|
}
|
|
@@ -1005,36 +1005,41 @@ let gs = class extends xi {
|
|
|
1005
1005
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
|
-
|
|
1009
|
-
const
|
|
1008
|
+
vs.directiveName = "unsafeHTML", vs.resultType = 1;
|
|
1009
|
+
const us = ii(vs);
|
|
1010
1010
|
/**
|
|
1011
1011
|
* @license
|
|
1012
1012
|
* Copyright 2017 Google LLC
|
|
1013
1013
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1014
1014
|
*/
|
|
1015
|
-
let
|
|
1015
|
+
let Ws = class extends vs {
|
|
1016
1016
|
};
|
|
1017
|
-
|
|
1018
|
-
const
|
|
1019
|
-
var
|
|
1020
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1017
|
+
Ws.directiveName = "unsafeSVG", Ws.resultType = 2;
|
|
1018
|
+
const Is = ii(Ws);
|
|
1019
|
+
var Er = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, ss = (i, t, e, s) => {
|
|
1020
|
+
for (var n = s > 1 ? void 0 : s ? Pr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1021
1021
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1022
|
-
return s && n &&
|
|
1023
|
-
};
|
|
1024
|
-
const
|
|
1025
|
-
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath ||
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1022
|
+
return s && n && Er(t, e, n), n;
|
|
1023
|
+
};
|
|
1024
|
+
const Ks = "https://punkt-cdn.oslo.kommune.no/14.5/icons/";
|
|
1025
|
+
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || Ks);
|
|
1026
|
+
const Xi = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', Ii = {}, Dr = 2, Rr = 1500, Tn = typeof Storage < "u" && typeof sessionStorage < "u", Ir = (i) => window.pktFetch(i).then((t) => {
|
|
1027
|
+
if (!t.ok)
|
|
1028
|
+
throw new Error("Missing icon: " + i);
|
|
1029
|
+
return t.text();
|
|
1030
|
+
}), pa = async (i, t = Dr) => {
|
|
1031
|
+
try {
|
|
1032
|
+
return await Ir(i);
|
|
1033
|
+
} catch {
|
|
1034
|
+
return t > 0 ? (await new Promise((e) => setTimeout(e, Rr)), pa(i, t - 1)) : (console.error("Failed to fetch icon: " + i), Xi);
|
|
1035
|
+
}
|
|
1036
|
+
}, Lr = async (i, t) => {
|
|
1037
|
+
const e = t + i + ".svg";
|
|
1038
|
+
return Tn && sessionStorage.getItem(e) ? sessionStorage.getItem(e) : e in Ii ? Ii[e] : typeof window < "u" && typeof window.pktFetch == "function" ? (Ii[e] = pa(e).then((s) => (s !== Xi && Tn && sessionStorage.setItem(e, s), delete Ii[e], s)), Ii[e]) : Xi;
|
|
1034
1039
|
};
|
|
1035
1040
|
let Xe = class extends X {
|
|
1036
1041
|
constructor() {
|
|
1037
|
-
super(...arguments), this.path = typeof window < "u" ? window.pktIconPath :
|
|
1042
|
+
super(...arguments), this.path = typeof window < "u" ? window.pktIconPath : Ks, this.name = "", this.icon = Is(Xi), this._updatedProps = [];
|
|
1038
1043
|
}
|
|
1039
1044
|
connectedCallback() {
|
|
1040
1045
|
super.connectedCallback(), this.classList.add("pkt-icon");
|
|
@@ -1046,27 +1051,36 @@ let Xe = class extends X {
|
|
|
1046
1051
|
super.updated(t), (t.has("name") || t.has("path")) && this.getIcon(this.name);
|
|
1047
1052
|
}
|
|
1048
1053
|
async getIcon(t = "") {
|
|
1049
|
-
this._updatedProps.length > 0
|
|
1050
|
-
|
|
1051
|
-
|
|
1054
|
+
if (this._updatedProps.length > 0) {
|
|
1055
|
+
this.path || (this.path = typeof window < "u" ? window.pktIconPath : Ks);
|
|
1056
|
+
try {
|
|
1057
|
+
this.icon = Is(
|
|
1058
|
+
await Lr(this.name || "", this.path)
|
|
1059
|
+
);
|
|
1060
|
+
} catch {
|
|
1061
|
+
this.icon = Is(Xi);
|
|
1062
|
+
}
|
|
1063
|
+
this._updatedProps = [];
|
|
1064
|
+
} else
|
|
1065
|
+
this._updatedProps.includes(t) || this._updatedProps.push(t);
|
|
1052
1066
|
}
|
|
1053
1067
|
render() {
|
|
1054
1068
|
return d`${this.name && this.icon}`;
|
|
1055
1069
|
}
|
|
1056
1070
|
};
|
|
1057
|
-
|
|
1071
|
+
ss([
|
|
1058
1072
|
o({ type: String, reflect: !1 })
|
|
1059
1073
|
], Xe.prototype, "path", 2);
|
|
1060
|
-
|
|
1074
|
+
ss([
|
|
1061
1075
|
o({ type: String, reflect: !0 })
|
|
1062
1076
|
], Xe.prototype, "name", 2);
|
|
1063
|
-
|
|
1077
|
+
ss([
|
|
1064
1078
|
o({ type: SVGElement })
|
|
1065
1079
|
], Xe.prototype, "icon", 2);
|
|
1066
|
-
|
|
1080
|
+
ss([
|
|
1067
1081
|
o({ type: Array, noAccessor: !0 })
|
|
1068
1082
|
], Xe.prototype, "_updatedProps", 2);
|
|
1069
|
-
Xe =
|
|
1083
|
+
Xe = ss([
|
|
1070
1084
|
V("pkt-icon")
|
|
1071
1085
|
], Xe);
|
|
1072
1086
|
/**
|
|
@@ -1075,10 +1089,10 @@ Xe = es([
|
|
|
1075
1089
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1076
1090
|
*/
|
|
1077
1091
|
const C = (i) => i ?? b;
|
|
1078
|
-
var
|
|
1079
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1092
|
+
var Br = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, vt = (i, t, e, s) => {
|
|
1093
|
+
for (var n = s > 1 ? void 0 : s ? Fr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1080
1094
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1081
|
-
return s && n &&
|
|
1095
|
+
return s && n && Br(t, e, n), n;
|
|
1082
1096
|
};
|
|
1083
1097
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.5/animations/";
|
|
1084
1098
|
let dt = class extends X {
|
|
@@ -1204,17 +1218,17 @@ vt([
|
|
|
1204
1218
|
dt = vt([
|
|
1205
1219
|
V("pkt-button")
|
|
1206
1220
|
], dt);
|
|
1207
|
-
const
|
|
1208
|
-
props:
|
|
1221
|
+
const Vr = { skin: { default: "info" }, ariaLive: { default: "polite" }, compact: { default: !1 }, closeAlert: { default: !1 } }, os = {
|
|
1222
|
+
props: Vr
|
|
1209
1223
|
};
|
|
1210
|
-
var
|
|
1211
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1224
|
+
var jr = Object.defineProperty, Hr = Object.getOwnPropertyDescriptor, fe = (i, t, e, s) => {
|
|
1225
|
+
for (var n = s > 1 ? void 0 : s ? Hr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1212
1226
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1213
|
-
return s && n &&
|
|
1227
|
+
return s && n && jr(t, e, n), n;
|
|
1214
1228
|
};
|
|
1215
1229
|
let ne = class extends X {
|
|
1216
1230
|
constructor() {
|
|
1217
|
-
super(), this.defaultSlot = O(), this.compact =
|
|
1231
|
+
super(), this.defaultSlot = O(), this.compact = os.props.compact.default, this.title = "", this.skin = os.props.skin.default, this.ariaLive = os.props.ariaLive.default, this["aria-live"] = null, this.closeAlert = os.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (t) => {
|
|
1218
1232
|
this._isClosed = !0, this.dispatchEvent(
|
|
1219
1233
|
new CustomEvent("close", { detail: { origin: t }, bubbles: !0, composed: !0 })
|
|
1220
1234
|
), this.dispatchEvent(
|
|
@@ -1230,7 +1244,7 @@ let ne = class extends X {
|
|
|
1230
1244
|
t === "ariaLive" && (this["aria-live"] = s), super.attributeChangedCallback(t, e, s);
|
|
1231
1245
|
}
|
|
1232
1246
|
updated(t) {
|
|
1233
|
-
super.updated(t), t.has("ariaLive") && (this["aria-live"] = this.ariaLive), t.has("_isClosed") &&
|
|
1247
|
+
super.updated(t), t.has("ariaLive") && (this["aria-live"] = this.ariaLive), t.has("_isClosed") && da(this, "pkt-hide", this._isClosed);
|
|
1234
1248
|
}
|
|
1235
1249
|
// Render
|
|
1236
1250
|
render() {
|
|
@@ -1309,10 +1323,10 @@ fe([
|
|
|
1309
1323
|
ne = fe([
|
|
1310
1324
|
V("pkt-alert")
|
|
1311
1325
|
], ne);
|
|
1312
|
-
var
|
|
1313
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1326
|
+
var Ur = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, ns = (i, t, e, s) => {
|
|
1327
|
+
for (var n = s > 1 ? void 0 : s ? zr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1314
1328
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1315
|
-
return s && n &&
|
|
1329
|
+
return s && n && Ur(t, e, n), n;
|
|
1316
1330
|
};
|
|
1317
1331
|
let yi = class extends fi {
|
|
1318
1332
|
constructor() {
|
|
@@ -1355,25 +1369,25 @@ let yi = class extends fi {
|
|
|
1355
1369
|
`;
|
|
1356
1370
|
}
|
|
1357
1371
|
};
|
|
1358
|
-
|
|
1372
|
+
ns([
|
|
1359
1373
|
o({ type: String, reflect: !0, attribute: "aria-labelledby" })
|
|
1360
1374
|
], yi.prototype, "ariaLabelledBy", 2);
|
|
1361
|
-
|
|
1375
|
+
ns([
|
|
1362
1376
|
o({ type: Boolean, reflect: !0, attribute: "compact" })
|
|
1363
1377
|
], yi.prototype, "compact", 2);
|
|
1364
|
-
|
|
1378
|
+
ns([
|
|
1365
1379
|
o({ type: String, reflect: !0, attribute: "skin" })
|
|
1366
1380
|
], yi.prototype, "skin", 2);
|
|
1367
|
-
|
|
1381
|
+
ns([
|
|
1368
1382
|
o({ type: String, reflect: !0, attribute: "name" })
|
|
1369
1383
|
], yi.prototype, "name", 2);
|
|
1370
|
-
yi =
|
|
1384
|
+
yi = ns([
|
|
1371
1385
|
V("pkt-accordion")
|
|
1372
1386
|
], yi);
|
|
1373
|
-
var
|
|
1374
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1387
|
+
var qr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, si = (i, t, e, s) => {
|
|
1388
|
+
for (var n = s > 1 ? void 0 : s ? Wr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1375
1389
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1376
|
-
return s && n &&
|
|
1390
|
+
return s && n && qr(t, e, n), n;
|
|
1377
1391
|
};
|
|
1378
1392
|
let De = class extends X {
|
|
1379
1393
|
constructor() {
|
|
@@ -1436,10 +1450,10 @@ si([
|
|
|
1436
1450
|
De = si([
|
|
1437
1451
|
V("pkt-accordion-item")
|
|
1438
1452
|
], De);
|
|
1439
|
-
var
|
|
1440
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1453
|
+
var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Ss = (i, t, e, s) => {
|
|
1454
|
+
for (var n = s > 1 ? void 0 : s ? Yr(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
1441
1455
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1442
|
-
return s && n &&
|
|
1456
|
+
return s && n && Kr(t, e, n), n;
|
|
1443
1457
|
};
|
|
1444
1458
|
let $i = class extends X {
|
|
1445
1459
|
constructor() {
|
|
@@ -1465,50 +1479,50 @@ let $i = class extends X {
|
|
|
1465
1479
|
</nav>`;
|
|
1466
1480
|
}
|
|
1467
1481
|
};
|
|
1468
|
-
|
|
1482
|
+
Ss([
|
|
1469
1483
|
o({ type: String })
|
|
1470
1484
|
], $i.prototype, "href", 2);
|
|
1471
|
-
|
|
1485
|
+
Ss([
|
|
1472
1486
|
o({ type: String })
|
|
1473
1487
|
], $i.prototype, "text", 2);
|
|
1474
|
-
|
|
1488
|
+
Ss([
|
|
1475
1489
|
o({ type: String })
|
|
1476
1490
|
], $i.prototype, "ariaLabel", 2);
|
|
1477
|
-
$i =
|
|
1491
|
+
$i = Ss([
|
|
1478
1492
|
V("pkt-backlink")
|
|
1479
1493
|
], $i);
|
|
1480
|
-
const
|
|
1494
|
+
const ma = 6048e5, Gr = 864e5, Nn = Symbol.for("constructDateFrom");
|
|
1481
1495
|
function pe(i, t) {
|
|
1482
|
-
return typeof i == "function" ? i(t) : i && typeof i == "object" &&
|
|
1496
|
+
return typeof i == "function" ? i(t) : i && typeof i == "object" && Nn in i ? i[Nn](t) : i instanceof Date ? new i.constructor(t) : new Date(t);
|
|
1483
1497
|
}
|
|
1484
1498
|
function zt(i, t) {
|
|
1485
1499
|
return pe(t || i, i);
|
|
1486
1500
|
}
|
|
1487
|
-
function
|
|
1501
|
+
function An(i, t, e) {
|
|
1488
1502
|
const s = zt(i, void 0);
|
|
1489
1503
|
return isNaN(t) ? pe(i, NaN) : (t && s.setDate(s.getDate() + t), s);
|
|
1490
1504
|
}
|
|
1491
|
-
let
|
|
1492
|
-
function
|
|
1493
|
-
return
|
|
1505
|
+
let Zr = {};
|
|
1506
|
+
function Cs() {
|
|
1507
|
+
return Zr;
|
|
1494
1508
|
}
|
|
1495
|
-
function
|
|
1509
|
+
function Ji(i, t) {
|
|
1496
1510
|
var e, s, n, a;
|
|
1497
|
-
const r =
|
|
1511
|
+
const r = Cs(), l = (t == null ? void 0 : t.weekStartsOn) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.weekStartsOn) ?? r.weekStartsOn ?? ((a = (n = r.locale) == null ? void 0 : n.options) == null ? void 0 : a.weekStartsOn) ?? 0, u = zt(i, t == null ? void 0 : t.in), p = u.getDay(), g = (p < l ? 7 : 0) + p - l;
|
|
1498
1512
|
return u.setDate(u.getDate() - g), u.setHours(0, 0, 0, 0), u;
|
|
1499
1513
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return
|
|
1514
|
+
function ks(i, t) {
|
|
1515
|
+
return Ji(i, { ...t, weekStartsOn: 1 });
|
|
1502
1516
|
}
|
|
1503
|
-
function
|
|
1517
|
+
function fa(i, t) {
|
|
1504
1518
|
const e = zt(i, void 0), s = e.getFullYear(), n = pe(e, 0);
|
|
1505
1519
|
n.setFullYear(s + 1, 0, 4), n.setHours(0, 0, 0, 0);
|
|
1506
|
-
const a =
|
|
1520
|
+
const a = ks(n), r = pe(e, 0);
|
|
1507
1521
|
r.setFullYear(s, 0, 4), r.setHours(0, 0, 0, 0);
|
|
1508
|
-
const l =
|
|
1522
|
+
const l = ks(r);
|
|
1509
1523
|
return e.getTime() >= a.getTime() ? s + 1 : e.getTime() >= l.getTime() ? s : s - 1;
|
|
1510
1524
|
}
|
|
1511
|
-
function
|
|
1525
|
+
function Mn(i) {
|
|
1512
1526
|
const t = zt(i), e = new Date(
|
|
1513
1527
|
Date.UTC(
|
|
1514
1528
|
t.getFullYear(),
|
|
@@ -1522,41 +1536,41 @@ function An(i) {
|
|
|
1522
1536
|
);
|
|
1523
1537
|
return e.setUTCFullYear(t.getFullYear()), +i - +e;
|
|
1524
1538
|
}
|
|
1525
|
-
function
|
|
1539
|
+
function ga(i, ...t) {
|
|
1526
1540
|
const e = pe.bind(
|
|
1527
1541
|
null,
|
|
1528
1542
|
t.find((s) => typeof s == "object")
|
|
1529
1543
|
);
|
|
1530
1544
|
return t.map(e);
|
|
1531
1545
|
}
|
|
1532
|
-
function
|
|
1546
|
+
function On(i, t) {
|
|
1533
1547
|
const e = zt(i, void 0);
|
|
1534
1548
|
return e.setHours(0, 0, 0, 0), e;
|
|
1535
1549
|
}
|
|
1536
|
-
function
|
|
1537
|
-
const [s, n] =
|
|
1550
|
+
function Xr(i, t, e) {
|
|
1551
|
+
const [s, n] = ga(
|
|
1538
1552
|
void 0,
|
|
1539
1553
|
i,
|
|
1540
1554
|
t
|
|
1541
|
-
), a =
|
|
1542
|
-
return Math.round((l - u) /
|
|
1555
|
+
), a = On(s), r = On(n), l = +a - Mn(a), u = +r - Mn(r);
|
|
1556
|
+
return Math.round((l - u) / Gr);
|
|
1543
1557
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const e =
|
|
1546
|
-
return s.setFullYear(e, 0, 4), s.setHours(0, 0, 0, 0),
|
|
1558
|
+
function Jr(i, t) {
|
|
1559
|
+
const e = fa(i), s = pe(i, 0);
|
|
1560
|
+
return s.setFullYear(e, 0, 4), s.setHours(0, 0, 0, 0), ks(s);
|
|
1547
1561
|
}
|
|
1548
|
-
function
|
|
1562
|
+
function Qr(i) {
|
|
1549
1563
|
return i instanceof Date || typeof i == "object" && Object.prototype.toString.call(i) === "[object Date]";
|
|
1550
1564
|
}
|
|
1551
|
-
function
|
|
1552
|
-
return !(!
|
|
1565
|
+
function to(i) {
|
|
1566
|
+
return !(!Qr(i) && typeof i != "number" || isNaN(+zt(i)));
|
|
1553
1567
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const [e, s] =
|
|
1568
|
+
function eo(i, t) {
|
|
1569
|
+
const [e, s] = ga(i, t.start, t.end);
|
|
1556
1570
|
return { start: e, end: s };
|
|
1557
1571
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const { start: e, end: s } =
|
|
1572
|
+
function va(i, t) {
|
|
1573
|
+
const { start: e, end: s } = eo(void 0, i);
|
|
1560
1574
|
let n = +e > +s;
|
|
1561
1575
|
const a = n ? +e : +s, r = n ? s : e;
|
|
1562
1576
|
r.setHours(0, 0, 0, 0);
|
|
@@ -1566,11 +1580,11 @@ function fa(i, t) {
|
|
|
1566
1580
|
u.push(pe(e, r)), r.setDate(r.getDate() + l), r.setHours(0, 0, 0, 0);
|
|
1567
1581
|
return n ? u.reverse() : u;
|
|
1568
1582
|
}
|
|
1569
|
-
function
|
|
1583
|
+
function io(i, t) {
|
|
1570
1584
|
const e = zt(i, void 0);
|
|
1571
1585
|
return e.setFullYear(e.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1572
1586
|
}
|
|
1573
|
-
const
|
|
1587
|
+
const so = {
|
|
1574
1588
|
lessThanXSeconds: {
|
|
1575
1589
|
one: "less than a second",
|
|
1576
1590
|
other: "less than {{count}} seconds"
|
|
@@ -1632,54 +1646,54 @@ const Qr = {
|
|
|
1632
1646
|
one: "almost 1 year",
|
|
1633
1647
|
other: "almost {{count}} years"
|
|
1634
1648
|
}
|
|
1635
|
-
},
|
|
1649
|
+
}, no = (i, t, e) => {
|
|
1636
1650
|
let s;
|
|
1637
|
-
const n =
|
|
1651
|
+
const n = so[i];
|
|
1638
1652
|
return typeof n == "string" ? s = n : t === 1 ? s = n.one : s = n.other.replace("{{count}}", t.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + s : s + " ago" : s;
|
|
1639
1653
|
};
|
|
1640
|
-
function
|
|
1654
|
+
function Ls(i) {
|
|
1641
1655
|
return (t = {}) => {
|
|
1642
1656
|
const e = t.width ? String(t.width) : i.defaultWidth;
|
|
1643
1657
|
return i.formats[e] || i.formats[i.defaultWidth];
|
|
1644
1658
|
};
|
|
1645
1659
|
}
|
|
1646
|
-
const
|
|
1660
|
+
const ao = {
|
|
1647
1661
|
full: "EEEE, MMMM do, y",
|
|
1648
1662
|
long: "MMMM do, y",
|
|
1649
1663
|
medium: "MMM d, y",
|
|
1650
1664
|
short: "MM/dd/yyyy"
|
|
1651
|
-
},
|
|
1665
|
+
}, ro = {
|
|
1652
1666
|
full: "h:mm:ss a zzzz",
|
|
1653
1667
|
long: "h:mm:ss a z",
|
|
1654
1668
|
medium: "h:mm:ss a",
|
|
1655
1669
|
short: "h:mm a"
|
|
1656
|
-
},
|
|
1670
|
+
}, oo = {
|
|
1657
1671
|
full: "{{date}} 'at' {{time}}",
|
|
1658
1672
|
long: "{{date}} 'at' {{time}}",
|
|
1659
1673
|
medium: "{{date}}, {{time}}",
|
|
1660
1674
|
short: "{{date}}, {{time}}"
|
|
1661
|
-
},
|
|
1662
|
-
date:
|
|
1663
|
-
formats:
|
|
1675
|
+
}, lo = {
|
|
1676
|
+
date: Ls({
|
|
1677
|
+
formats: ao,
|
|
1664
1678
|
defaultWidth: "full"
|
|
1665
1679
|
}),
|
|
1666
|
-
time:
|
|
1667
|
-
formats:
|
|
1680
|
+
time: Ls({
|
|
1681
|
+
formats: ro,
|
|
1668
1682
|
defaultWidth: "full"
|
|
1669
1683
|
}),
|
|
1670
|
-
dateTime:
|
|
1671
|
-
formats:
|
|
1684
|
+
dateTime: Ls({
|
|
1685
|
+
formats: oo,
|
|
1672
1686
|
defaultWidth: "full"
|
|
1673
1687
|
})
|
|
1674
|
-
},
|
|
1688
|
+
}, ho = {
|
|
1675
1689
|
lastWeek: "'last' eeee 'at' p",
|
|
1676
1690
|
yesterday: "'yesterday at' p",
|
|
1677
1691
|
today: "'today at' p",
|
|
1678
1692
|
tomorrow: "'tomorrow at' p",
|
|
1679
1693
|
nextWeek: "eeee 'at' p",
|
|
1680
1694
|
other: "P"
|
|
1681
|
-
},
|
|
1682
|
-
function
|
|
1695
|
+
}, co = (i, t, e, s) => ho[i];
|
|
1696
|
+
function Li(i) {
|
|
1683
1697
|
return (t, e) => {
|
|
1684
1698
|
const s = e != null && e.context ? String(e.context) : "standalone";
|
|
1685
1699
|
let n;
|
|
@@ -1694,15 +1708,15 @@ function Ii(i) {
|
|
|
1694
1708
|
return n[a];
|
|
1695
1709
|
};
|
|
1696
1710
|
}
|
|
1697
|
-
const
|
|
1711
|
+
const uo = {
|
|
1698
1712
|
narrow: ["B", "A"],
|
|
1699
1713
|
abbreviated: ["BC", "AD"],
|
|
1700
1714
|
wide: ["Before Christ", "Anno Domini"]
|
|
1701
|
-
},
|
|
1715
|
+
}, po = {
|
|
1702
1716
|
narrow: ["1", "2", "3", "4"],
|
|
1703
1717
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1704
1718
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1705
|
-
},
|
|
1719
|
+
}, mo = {
|
|
1706
1720
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1707
1721
|
abbreviated: [
|
|
1708
1722
|
"Jan",
|
|
@@ -1732,7 +1746,7 @@ const oo = {
|
|
|
1732
1746
|
"November",
|
|
1733
1747
|
"December"
|
|
1734
1748
|
]
|
|
1735
|
-
},
|
|
1749
|
+
}, fo = {
|
|
1736
1750
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1737
1751
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1738
1752
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -1745,7 +1759,7 @@ const oo = {
|
|
|
1745
1759
|
"Friday",
|
|
1746
1760
|
"Saturday"
|
|
1747
1761
|
]
|
|
1748
|
-
},
|
|
1762
|
+
}, go = {
|
|
1749
1763
|
narrow: {
|
|
1750
1764
|
am: "a",
|
|
1751
1765
|
pm: "p",
|
|
@@ -1776,7 +1790,7 @@ const oo = {
|
|
|
1776
1790
|
evening: "evening",
|
|
1777
1791
|
night: "night"
|
|
1778
1792
|
}
|
|
1779
|
-
},
|
|
1793
|
+
}, vo = {
|
|
1780
1794
|
narrow: {
|
|
1781
1795
|
am: "a",
|
|
1782
1796
|
pm: "p",
|
|
@@ -1807,7 +1821,7 @@ const oo = {
|
|
|
1807
1821
|
evening: "in the evening",
|
|
1808
1822
|
night: "at night"
|
|
1809
1823
|
}
|
|
1810
|
-
},
|
|
1824
|
+
}, ko = (i, t) => {
|
|
1811
1825
|
const e = Number(i), s = e % 100;
|
|
1812
1826
|
if (s > 20 || s < 10)
|
|
1813
1827
|
switch (s % 10) {
|
|
@@ -1819,40 +1833,40 @@ const oo = {
|
|
|
1819
1833
|
return e + "rd";
|
|
1820
1834
|
}
|
|
1821
1835
|
return e + "th";
|
|
1822
|
-
},
|
|
1823
|
-
ordinalNumber:
|
|
1824
|
-
era:
|
|
1825
|
-
values:
|
|
1836
|
+
}, bo = {
|
|
1837
|
+
ordinalNumber: ko,
|
|
1838
|
+
era: Li({
|
|
1839
|
+
values: uo,
|
|
1826
1840
|
defaultWidth: "wide"
|
|
1827
1841
|
}),
|
|
1828
|
-
quarter:
|
|
1829
|
-
values:
|
|
1842
|
+
quarter: Li({
|
|
1843
|
+
values: po,
|
|
1830
1844
|
defaultWidth: "wide",
|
|
1831
1845
|
argumentCallback: (i) => i - 1
|
|
1832
1846
|
}),
|
|
1833
|
-
month:
|
|
1834
|
-
values:
|
|
1847
|
+
month: Li({
|
|
1848
|
+
values: mo,
|
|
1835
1849
|
defaultWidth: "wide"
|
|
1836
1850
|
}),
|
|
1837
|
-
day:
|
|
1838
|
-
values:
|
|
1851
|
+
day: Li({
|
|
1852
|
+
values: fo,
|
|
1839
1853
|
defaultWidth: "wide"
|
|
1840
1854
|
}),
|
|
1841
|
-
dayPeriod:
|
|
1842
|
-
values:
|
|
1855
|
+
dayPeriod: Li({
|
|
1856
|
+
values: go,
|
|
1843
1857
|
defaultWidth: "wide",
|
|
1844
|
-
formattingValues:
|
|
1858
|
+
formattingValues: vo,
|
|
1845
1859
|
defaultFormattingWidth: "wide"
|
|
1846
1860
|
})
|
|
1847
1861
|
};
|
|
1848
|
-
function
|
|
1862
|
+
function Bi(i) {
|
|
1849
1863
|
return (t, e = {}) => {
|
|
1850
1864
|
const s = e.width, n = s && i.matchPatterns[s] || i.matchPatterns[i.defaultMatchWidth], a = t.match(n);
|
|
1851
1865
|
if (!a)
|
|
1852
1866
|
return null;
|
|
1853
|
-
const r = a[0], l = s && i.parsePatterns[s] || i.parsePatterns[i.defaultParseWidth], u = Array.isArray(l) ?
|
|
1867
|
+
const r = a[0], l = s && i.parsePatterns[s] || i.parsePatterns[i.defaultParseWidth], u = Array.isArray(l) ? $o(l, (v) => v.test(r)) : (
|
|
1854
1868
|
// [TODO] -- I challenge you to fix the type
|
|
1855
|
-
|
|
1869
|
+
yo(l, (v) => v.test(r))
|
|
1856
1870
|
);
|
|
1857
1871
|
let p;
|
|
1858
1872
|
p = i.valueCallback ? i.valueCallback(u) : u, p = e.valueCallback ? (
|
|
@@ -1863,17 +1877,17 @@ function Li(i) {
|
|
|
1863
1877
|
return { value: p, rest: g };
|
|
1864
1878
|
};
|
|
1865
1879
|
}
|
|
1866
|
-
function
|
|
1880
|
+
function yo(i, t) {
|
|
1867
1881
|
for (const e in i)
|
|
1868
1882
|
if (Object.prototype.hasOwnProperty.call(i, e) && t(i[e]))
|
|
1869
1883
|
return e;
|
|
1870
1884
|
}
|
|
1871
|
-
function
|
|
1885
|
+
function $o(i, t) {
|
|
1872
1886
|
for (let e = 0; e < i.length; e++)
|
|
1873
1887
|
if (t(i[e]))
|
|
1874
1888
|
return e;
|
|
1875
1889
|
}
|
|
1876
|
-
function
|
|
1890
|
+
function _o(i) {
|
|
1877
1891
|
return (t, e = {}) => {
|
|
1878
1892
|
const s = t.match(i.matchPattern);
|
|
1879
1893
|
if (!s) return null;
|
|
@@ -1885,23 +1899,23 @@ function ko(i) {
|
|
|
1885
1899
|
return { value: r, rest: l };
|
|
1886
1900
|
};
|
|
1887
1901
|
}
|
|
1888
|
-
const
|
|
1902
|
+
const wo = /^(\d+)(th|st|nd|rd)?/i, xo = /\d+/i, So = {
|
|
1889
1903
|
narrow: /^(b|a)/i,
|
|
1890
1904
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1891
1905
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1892
|
-
},
|
|
1906
|
+
}, Co = {
|
|
1893
1907
|
any: [/^b/i, /^(a|c)/i]
|
|
1894
|
-
},
|
|
1908
|
+
}, To = {
|
|
1895
1909
|
narrow: /^[1234]/i,
|
|
1896
1910
|
abbreviated: /^q[1234]/i,
|
|
1897
1911
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1898
|
-
},
|
|
1912
|
+
}, No = {
|
|
1899
1913
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1900
|
-
},
|
|
1914
|
+
}, Ao = {
|
|
1901
1915
|
narrow: /^[jfmasond]/i,
|
|
1902
1916
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1903
1917
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1904
|
-
},
|
|
1918
|
+
}, Mo = {
|
|
1905
1919
|
narrow: [
|
|
1906
1920
|
/^j/i,
|
|
1907
1921
|
/^f/i,
|
|
@@ -1930,18 +1944,18 @@ const bo = /^(\d+)(th|st|nd|rd)?/i, yo = /\d+/i, $o = {
|
|
|
1930
1944
|
/^n/i,
|
|
1931
1945
|
/^d/i
|
|
1932
1946
|
]
|
|
1933
|
-
},
|
|
1947
|
+
}, Oo = {
|
|
1934
1948
|
narrow: /^[smtwf]/i,
|
|
1935
1949
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1936
1950
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1937
1951
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1938
|
-
},
|
|
1952
|
+
}, Eo = {
|
|
1939
1953
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1940
1954
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1941
|
-
},
|
|
1955
|
+
}, Po = {
|
|
1942
1956
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1943
1957
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1944
|
-
},
|
|
1958
|
+
}, Do = {
|
|
1945
1959
|
any: {
|
|
1946
1960
|
am: /^a/i,
|
|
1947
1961
|
pm: /^p/i,
|
|
@@ -1952,80 +1966,80 @@ const bo = /^(\d+)(th|st|nd|rd)?/i, yo = /\d+/i, $o = {
|
|
|
1952
1966
|
evening: /evening/i,
|
|
1953
1967
|
night: /night/i
|
|
1954
1968
|
}
|
|
1955
|
-
},
|
|
1956
|
-
ordinalNumber:
|
|
1957
|
-
matchPattern:
|
|
1958
|
-
parsePattern:
|
|
1969
|
+
}, Ro = {
|
|
1970
|
+
ordinalNumber: _o({
|
|
1971
|
+
matchPattern: wo,
|
|
1972
|
+
parsePattern: xo,
|
|
1959
1973
|
valueCallback: (i) => parseInt(i, 10)
|
|
1960
1974
|
}),
|
|
1961
|
-
era:
|
|
1962
|
-
matchPatterns:
|
|
1975
|
+
era: Bi({
|
|
1976
|
+
matchPatterns: So,
|
|
1963
1977
|
defaultMatchWidth: "wide",
|
|
1964
|
-
parsePatterns:
|
|
1978
|
+
parsePatterns: Co,
|
|
1965
1979
|
defaultParseWidth: "any"
|
|
1966
1980
|
}),
|
|
1967
|
-
quarter:
|
|
1968
|
-
matchPatterns:
|
|
1981
|
+
quarter: Bi({
|
|
1982
|
+
matchPatterns: To,
|
|
1969
1983
|
defaultMatchWidth: "wide",
|
|
1970
|
-
parsePatterns:
|
|
1984
|
+
parsePatterns: No,
|
|
1971
1985
|
defaultParseWidth: "any",
|
|
1972
1986
|
valueCallback: (i) => i + 1
|
|
1973
1987
|
}),
|
|
1974
|
-
month:
|
|
1975
|
-
matchPatterns:
|
|
1988
|
+
month: Bi({
|
|
1989
|
+
matchPatterns: Ao,
|
|
1976
1990
|
defaultMatchWidth: "wide",
|
|
1977
|
-
parsePatterns:
|
|
1991
|
+
parsePatterns: Mo,
|
|
1978
1992
|
defaultParseWidth: "any"
|
|
1979
1993
|
}),
|
|
1980
|
-
day:
|
|
1981
|
-
matchPatterns:
|
|
1994
|
+
day: Bi({
|
|
1995
|
+
matchPatterns: Oo,
|
|
1982
1996
|
defaultMatchWidth: "wide",
|
|
1983
|
-
parsePatterns:
|
|
1997
|
+
parsePatterns: Eo,
|
|
1984
1998
|
defaultParseWidth: "any"
|
|
1985
1999
|
}),
|
|
1986
|
-
dayPeriod:
|
|
1987
|
-
matchPatterns:
|
|
2000
|
+
dayPeriod: Bi({
|
|
2001
|
+
matchPatterns: Po,
|
|
1988
2002
|
defaultMatchWidth: "any",
|
|
1989
|
-
parsePatterns:
|
|
2003
|
+
parsePatterns: Do,
|
|
1990
2004
|
defaultParseWidth: "any"
|
|
1991
2005
|
})
|
|
1992
|
-
},
|
|
2006
|
+
}, Io = {
|
|
1993
2007
|
code: "en-US",
|
|
1994
|
-
formatDistance:
|
|
1995
|
-
formatLong:
|
|
1996
|
-
formatRelative:
|
|
1997
|
-
localize:
|
|
1998
|
-
match:
|
|
2008
|
+
formatDistance: no,
|
|
2009
|
+
formatLong: lo,
|
|
2010
|
+
formatRelative: co,
|
|
2011
|
+
localize: bo,
|
|
2012
|
+
match: Ro,
|
|
1999
2013
|
options: {
|
|
2000
2014
|
weekStartsOn: 0,
|
|
2001
2015
|
firstWeekContainsDate: 1
|
|
2002
2016
|
}
|
|
2003
2017
|
};
|
|
2004
|
-
function
|
|
2018
|
+
function Lo(i, t) {
|
|
2005
2019
|
const e = zt(i, void 0);
|
|
2006
|
-
return
|
|
2020
|
+
return Xr(e, io(e)) + 1;
|
|
2007
2021
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const e = zt(i, void 0), s = +
|
|
2010
|
-
return Math.round(s /
|
|
2022
|
+
function Bo(i, t) {
|
|
2023
|
+
const e = zt(i, void 0), s = +ks(e) - +Jr(e);
|
|
2024
|
+
return Math.round(s / ma) + 1;
|
|
2011
2025
|
}
|
|
2012
|
-
function
|
|
2026
|
+
function ka(i, t) {
|
|
2013
2027
|
var e, s, n, a;
|
|
2014
|
-
const r = zt(i, t == null ? void 0 : t.in), l = r.getFullYear(), u =
|
|
2028
|
+
const r = zt(i, t == null ? void 0 : t.in), l = r.getFullYear(), u = Cs(), p = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.firstWeekContainsDate) ?? u.firstWeekContainsDate ?? ((a = (n = u.locale) == null ? void 0 : n.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, g = pe((t == null ? void 0 : t.in) || i, 0);
|
|
2015
2029
|
g.setFullYear(l + 1, 0, p), g.setHours(0, 0, 0, 0);
|
|
2016
|
-
const v =
|
|
2030
|
+
const v = Ji(g, t), y = pe((t == null ? void 0 : t.in) || i, 0);
|
|
2017
2031
|
y.setFullYear(l, 0, p), y.setHours(0, 0, 0, 0);
|
|
2018
|
-
const $ =
|
|
2032
|
+
const $ = Ji(y, t);
|
|
2019
2033
|
return +r >= +v ? l + 1 : +r >= +$ ? l : l - 1;
|
|
2020
2034
|
}
|
|
2021
|
-
function
|
|
2035
|
+
function Fo(i, t) {
|
|
2022
2036
|
var e, s, n, a;
|
|
2023
|
-
const r =
|
|
2024
|
-
return p.setFullYear(u, 0, l), p.setHours(0, 0, 0, 0),
|
|
2037
|
+
const r = Cs(), l = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((a = (n = r.locale) == null ? void 0 : n.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, u = ka(i, t), p = pe((t == null ? void 0 : t.in) || i, 0);
|
|
2038
|
+
return p.setFullYear(u, 0, l), p.setHours(0, 0, 0, 0), Ji(p, t);
|
|
2025
2039
|
}
|
|
2026
|
-
function
|
|
2027
|
-
const e = zt(i, t == null ? void 0 : t.in), s = +
|
|
2028
|
-
return Math.round(s /
|
|
2040
|
+
function ba(i, t) {
|
|
2041
|
+
const e = zt(i, t == null ? void 0 : t.in), s = +Ji(e, t) - +Fo(e, t);
|
|
2042
|
+
return Math.round(s / ma) + 1;
|
|
2029
2043
|
}
|
|
2030
2044
|
function W(i, t) {
|
|
2031
2045
|
const e = i < 0 ? "-" : "", s = Math.abs(i).toString().padStart(t, "0");
|
|
@@ -2092,7 +2106,7 @@ const Me = {
|
|
|
2092
2106
|
afternoon: "afternoon",
|
|
2093
2107
|
evening: "evening",
|
|
2094
2108
|
night: "night"
|
|
2095
|
-
},
|
|
2109
|
+
}, En = {
|
|
2096
2110
|
// Era
|
|
2097
2111
|
G: function(i, t, e) {
|
|
2098
2112
|
const s = i.getFullYear() > 0 ? 1 : 0;
|
|
@@ -2121,7 +2135,7 @@ const Me = {
|
|
|
2121
2135
|
},
|
|
2122
2136
|
// Local week-numbering year
|
|
2123
2137
|
Y: function(i, t, e, s) {
|
|
2124
|
-
const n =
|
|
2138
|
+
const n = ka(i, s), a = n > 0 ? n : 1 - n;
|
|
2125
2139
|
if (t === "YY") {
|
|
2126
2140
|
const r = a % 100;
|
|
2127
2141
|
return W(r, 2);
|
|
@@ -2130,7 +2144,7 @@ const Me = {
|
|
|
2130
2144
|
},
|
|
2131
2145
|
// ISO week-numbering year
|
|
2132
2146
|
R: function(i, t) {
|
|
2133
|
-
const e =
|
|
2147
|
+
const e = fa(i);
|
|
2134
2148
|
return W(e, t.length);
|
|
2135
2149
|
},
|
|
2136
2150
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -2275,12 +2289,12 @@ const Me = {
|
|
|
2275
2289
|
},
|
|
2276
2290
|
// Local week of year
|
|
2277
2291
|
w: function(i, t, e, s) {
|
|
2278
|
-
const n =
|
|
2292
|
+
const n = ba(i, s);
|
|
2279
2293
|
return t === "wo" ? e.ordinalNumber(n, { unit: "week" }) : W(n, t.length);
|
|
2280
2294
|
},
|
|
2281
2295
|
// ISO week of year
|
|
2282
2296
|
I: function(i, t, e) {
|
|
2283
|
-
const s =
|
|
2297
|
+
const s = Bo(i);
|
|
2284
2298
|
return t === "Io" ? e.ordinalNumber(s, { unit: "week" }) : W(s, t.length);
|
|
2285
2299
|
},
|
|
2286
2300
|
// Day of the month
|
|
@@ -2289,7 +2303,7 @@ const Me = {
|
|
|
2289
2303
|
},
|
|
2290
2304
|
// Day of year
|
|
2291
2305
|
D: function(i, t, e) {
|
|
2292
|
-
const s =
|
|
2306
|
+
const s = Lo(i);
|
|
2293
2307
|
return t === "Do" ? e.ordinalNumber(s, { unit: "dayOfYear" }) : W(s, t.length);
|
|
2294
2308
|
},
|
|
2295
2309
|
// Day of week
|
|
@@ -2567,7 +2581,7 @@ const Me = {
|
|
|
2567
2581
|
switch (t) {
|
|
2568
2582
|
// Hours and optional minutes
|
|
2569
2583
|
case "X":
|
|
2570
|
-
return
|
|
2584
|
+
return Dn(s);
|
|
2571
2585
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
2572
2586
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2573
2587
|
// so this token always has the same output as `XX`
|
|
@@ -2590,7 +2604,7 @@ const Me = {
|
|
|
2590
2604
|
switch (t) {
|
|
2591
2605
|
// Hours and optional minutes
|
|
2592
2606
|
case "x":
|
|
2593
|
-
return
|
|
2607
|
+
return Dn(s);
|
|
2594
2608
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
2595
2609
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
2596
2610
|
// so this token always has the same output as `xx`
|
|
@@ -2615,7 +2629,7 @@ const Me = {
|
|
|
2615
2629
|
case "O":
|
|
2616
2630
|
case "OO":
|
|
2617
2631
|
case "OOO":
|
|
2618
|
-
return "GMT" +
|
|
2632
|
+
return "GMT" + Pn(s, ":");
|
|
2619
2633
|
// Long
|
|
2620
2634
|
case "OOOO":
|
|
2621
2635
|
default:
|
|
@@ -2630,7 +2644,7 @@ const Me = {
|
|
|
2630
2644
|
case "z":
|
|
2631
2645
|
case "zz":
|
|
2632
2646
|
case "zzz":
|
|
2633
|
-
return "GMT" +
|
|
2647
|
+
return "GMT" + Pn(s, ":");
|
|
2634
2648
|
// Long
|
|
2635
2649
|
case "zzzz":
|
|
2636
2650
|
default:
|
|
@@ -2647,18 +2661,18 @@ const Me = {
|
|
|
2647
2661
|
return W(+i, t.length);
|
|
2648
2662
|
}
|
|
2649
2663
|
};
|
|
2650
|
-
function
|
|
2664
|
+
function Pn(i, t = "") {
|
|
2651
2665
|
const e = i > 0 ? "-" : "+", s = Math.abs(i), n = Math.trunc(s / 60), a = s % 60;
|
|
2652
2666
|
return a === 0 ? e + String(n) : e + String(n) + t + W(a, 2);
|
|
2653
2667
|
}
|
|
2654
|
-
function
|
|
2668
|
+
function Dn(i, t) {
|
|
2655
2669
|
return i % 60 === 0 ? (i > 0 ? "-" : "+") + W(Math.abs(i) / 60, 2) : We(i, t);
|
|
2656
2670
|
}
|
|
2657
2671
|
function We(i, t = "") {
|
|
2658
2672
|
const e = i > 0 ? "-" : "+", s = Math.abs(i), n = W(Math.trunc(s / 60), 2), a = W(s % 60, 2);
|
|
2659
2673
|
return e + n + t + a;
|
|
2660
2674
|
}
|
|
2661
|
-
const
|
|
2675
|
+
const Rn = (i, t) => {
|
|
2662
2676
|
switch (i) {
|
|
2663
2677
|
case "P":
|
|
2664
2678
|
return t.date({ width: "short" });
|
|
@@ -2670,7 +2684,7 @@ const Dn = (i, t) => {
|
|
|
2670
2684
|
default:
|
|
2671
2685
|
return t.date({ width: "full" });
|
|
2672
2686
|
}
|
|
2673
|
-
},
|
|
2687
|
+
}, ya = (i, t) => {
|
|
2674
2688
|
switch (i) {
|
|
2675
2689
|
case "p":
|
|
2676
2690
|
return t.time({ width: "short" });
|
|
@@ -2682,10 +2696,10 @@ const Dn = (i, t) => {
|
|
|
2682
2696
|
default:
|
|
2683
2697
|
return t.time({ width: "full" });
|
|
2684
2698
|
}
|
|
2685
|
-
},
|
|
2699
|
+
}, Vo = (i, t) => {
|
|
2686
2700
|
const e = i.match(/(P+)(p+)?/) || [], s = e[1], n = e[2];
|
|
2687
2701
|
if (!n)
|
|
2688
|
-
return
|
|
2702
|
+
return Rn(i, t);
|
|
2689
2703
|
let a;
|
|
2690
2704
|
switch (s) {
|
|
2691
2705
|
case "P":
|
|
@@ -2702,47 +2716,47 @@ const Dn = (i, t) => {
|
|
|
2702
2716
|
a = t.dateTime({ width: "full" });
|
|
2703
2717
|
break;
|
|
2704
2718
|
}
|
|
2705
|
-
return a.replace("{{date}}",
|
|
2706
|
-
},
|
|
2707
|
-
p:
|
|
2708
|
-
P:
|
|
2709
|
-
},
|
|
2710
|
-
function
|
|
2711
|
-
return
|
|
2719
|
+
return a.replace("{{date}}", Rn(s, t)).replace("{{time}}", ya(n, t));
|
|
2720
|
+
}, jo = {
|
|
2721
|
+
p: ya,
|
|
2722
|
+
P: Vo
|
|
2723
|
+
}, Ho = /^D+$/, Uo = /^Y+$/, zo = ["D", "DD", "YY", "YYYY"];
|
|
2724
|
+
function qo(i) {
|
|
2725
|
+
return Ho.test(i);
|
|
2712
2726
|
}
|
|
2713
|
-
function
|
|
2714
|
-
return
|
|
2727
|
+
function Wo(i) {
|
|
2728
|
+
return Uo.test(i);
|
|
2715
2729
|
}
|
|
2716
|
-
function
|
|
2717
|
-
const s =
|
|
2718
|
-
if (console.warn(s),
|
|
2730
|
+
function Ko(i, t, e) {
|
|
2731
|
+
const s = Yo(i, t, e);
|
|
2732
|
+
if (console.warn(s), zo.includes(i)) throw new RangeError(s);
|
|
2719
2733
|
}
|
|
2720
|
-
function
|
|
2734
|
+
function Yo(i, t, e) {
|
|
2721
2735
|
const s = i[0] === "Y" ? "years" : "days of the month";
|
|
2722
2736
|
return `Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${t}\`) for formatting ${s} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2723
2737
|
}
|
|
2724
|
-
const
|
|
2725
|
-
function
|
|
2738
|
+
const Go = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Zo = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xo = /^'([^]*?)'?$/, Jo = /''/g, Qo = /[a-zA-Z]/;
|
|
2739
|
+
function tl(i, t, e) {
|
|
2726
2740
|
var s, n, a, r;
|
|
2727
|
-
const l =
|
|
2728
|
-
if (!
|
|
2741
|
+
const l = Cs(), u = l.locale ?? Io, p = l.firstWeekContainsDate ?? ((n = (s = l.locale) == null ? void 0 : s.options) == null ? void 0 : n.firstWeekContainsDate) ?? 1, g = l.weekStartsOn ?? ((r = (a = l.locale) == null ? void 0 : a.options) == null ? void 0 : r.weekStartsOn) ?? 0, v = zt(i, void 0);
|
|
2742
|
+
if (!to(v))
|
|
2729
2743
|
throw new RangeError("Invalid time value");
|
|
2730
|
-
let y = t.match(
|
|
2744
|
+
let y = t.match(Zo).map((k) => {
|
|
2731
2745
|
const w = k[0];
|
|
2732
2746
|
if (w === "p" || w === "P") {
|
|
2733
|
-
const T =
|
|
2747
|
+
const T = jo[w];
|
|
2734
2748
|
return T(k, u.formatLong);
|
|
2735
2749
|
}
|
|
2736
2750
|
return k;
|
|
2737
|
-
}).join("").match(
|
|
2751
|
+
}).join("").match(Go).map((k) => {
|
|
2738
2752
|
if (k === "''")
|
|
2739
2753
|
return { isToken: !1, value: "'" };
|
|
2740
2754
|
const w = k[0];
|
|
2741
2755
|
if (w === "'")
|
|
2742
|
-
return { isToken: !1, value:
|
|
2743
|
-
if (
|
|
2756
|
+
return { isToken: !1, value: el(k) };
|
|
2757
|
+
if (En[w])
|
|
2744
2758
|
return { isToken: !0, value: k };
|
|
2745
|
-
if (w.match(
|
|
2759
|
+
if (w.match(Qo))
|
|
2746
2760
|
throw new RangeError(
|
|
2747
2761
|
"Format string contains an unescaped latin alphabet character `" + w + "`"
|
|
2748
2762
|
);
|
|
@@ -2757,20 +2771,20 @@ function Zo(i, t, e) {
|
|
|
2757
2771
|
return y.map((k) => {
|
|
2758
2772
|
if (!k.isToken) return k.value;
|
|
2759
2773
|
const w = k.value;
|
|
2760
|
-
(
|
|
2761
|
-
const T =
|
|
2774
|
+
(Wo(w) || qo(w)) && Ko(w, t, String(i));
|
|
2775
|
+
const T = En[w[0]];
|
|
2762
2776
|
return T(v, w, u.localize, $);
|
|
2763
2777
|
}).join("");
|
|
2764
2778
|
}
|
|
2765
|
-
function
|
|
2766
|
-
const t = i.match(
|
|
2767
|
-
return t ? t[1].replace(
|
|
2779
|
+
function el(i) {
|
|
2780
|
+
const t = i.match(Xo);
|
|
2781
|
+
return t ? t[1].replace(Jo, "'") : i;
|
|
2768
2782
|
}
|
|
2769
|
-
function
|
|
2783
|
+
function il(i, t) {
|
|
2770
2784
|
const e = zt(i, void 0).getDay();
|
|
2771
2785
|
return e === 0 ? 7 : e;
|
|
2772
2786
|
}
|
|
2773
|
-
function
|
|
2787
|
+
function sl(i, t, e = "long") {
|
|
2774
2788
|
return new Intl.DateTimeFormat("en-US", {
|
|
2775
2789
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
2776
2790
|
hour: "numeric",
|
|
@@ -2778,37 +2792,37 @@ function Qo(i, t, e = "long") {
|
|
|
2778
2792
|
timeZoneName: e
|
|
2779
2793
|
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
2780
2794
|
}
|
|
2781
|
-
const
|
|
2795
|
+
const In = {}, ji = {};
|
|
2782
2796
|
function Ye(i, t) {
|
|
2783
2797
|
try {
|
|
2784
|
-
const e = (
|
|
2798
|
+
const e = (In[i] || (In[i] = new Intl.DateTimeFormat("en-US", {
|
|
2785
2799
|
timeZone: i,
|
|
2786
2800
|
timeZoneName: "longOffset"
|
|
2787
2801
|
}).format))(t).split("GMT")[1];
|
|
2788
|
-
return e in
|
|
2802
|
+
return e in ji ? ji[e] : Ln(e, e.split(":"));
|
|
2789
2803
|
} catch {
|
|
2790
|
-
if (i in
|
|
2791
|
-
const e = i == null ? void 0 : i.match(
|
|
2792
|
-
return e ?
|
|
2804
|
+
if (i in ji) return ji[i];
|
|
2805
|
+
const e = i == null ? void 0 : i.match(nl);
|
|
2806
|
+
return e ? Ln(i, e.slice(1)) : NaN;
|
|
2793
2807
|
}
|
|
2794
2808
|
}
|
|
2795
|
-
const
|
|
2796
|
-
function
|
|
2809
|
+
const nl = /([+-]\d\d):?(\d\d)?/;
|
|
2810
|
+
function Ln(i, t) {
|
|
2797
2811
|
const e = +(t[0] || 0), s = +(t[1] || 0), n = +(t[2] || 0) / 60;
|
|
2798
|
-
return
|
|
2812
|
+
return ji[i] = e * 60 + s > 0 ? e * 60 + s + n : e * 60 - s - n;
|
|
2799
2813
|
}
|
|
2800
|
-
let
|
|
2814
|
+
let Hi = class Ui extends Date {
|
|
2801
2815
|
//#region static
|
|
2802
2816
|
constructor(...t) {
|
|
2803
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Ye(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)),
|
|
2817
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Ye(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), $a(this), Ys(this)) : this.setTime(Date.now());
|
|
2804
2818
|
}
|
|
2805
2819
|
static tz(t, ...e) {
|
|
2806
|
-
return e.length ? new
|
|
2820
|
+
return e.length ? new Ui(...e, t) : new Ui(Date.now(), t);
|
|
2807
2821
|
}
|
|
2808
2822
|
//#endregion
|
|
2809
2823
|
//#region time zone
|
|
2810
2824
|
withTimeZone(t) {
|
|
2811
|
-
return new
|
|
2825
|
+
return new Ui(+this, t);
|
|
2812
2826
|
}
|
|
2813
2827
|
getTimezoneOffset() {
|
|
2814
2828
|
const t = -Ye(this.timeZone, this);
|
|
@@ -2817,34 +2831,34 @@ let ji = class Hi extends Date {
|
|
|
2817
2831
|
//#endregion
|
|
2818
2832
|
//#region time
|
|
2819
2833
|
setTime(t) {
|
|
2820
|
-
return Date.prototype.setTime.apply(this, arguments),
|
|
2834
|
+
return Date.prototype.setTime.apply(this, arguments), Ys(this), +this;
|
|
2821
2835
|
}
|
|
2822
2836
|
//#endregion
|
|
2823
2837
|
//#region date-fns integration
|
|
2824
2838
|
[Symbol.for("constructDateFrom")](t) {
|
|
2825
|
-
return new
|
|
2839
|
+
return new Ui(+new Date(t), this.timeZone);
|
|
2826
2840
|
}
|
|
2827
2841
|
//#endregion
|
|
2828
2842
|
};
|
|
2829
|
-
const
|
|
2843
|
+
const Bn = /^(get|set)(?!UTC)/;
|
|
2830
2844
|
Object.getOwnPropertyNames(Date.prototype).forEach((i) => {
|
|
2831
|
-
if (!
|
|
2832
|
-
const t = i.replace(
|
|
2833
|
-
|
|
2845
|
+
if (!Bn.test(i)) return;
|
|
2846
|
+
const t = i.replace(Bn, "$1UTC");
|
|
2847
|
+
Hi.prototype[t] && (i.startsWith("get") ? Hi.prototype[i] = function() {
|
|
2834
2848
|
return this.internal[t]();
|
|
2835
|
-
} : (
|
|
2836
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
2837
|
-
},
|
|
2838
|
-
return Date.prototype[t].apply(this, arguments),
|
|
2849
|
+
} : (Hi.prototype[i] = function() {
|
|
2850
|
+
return Date.prototype[t].apply(this.internal, arguments), al(this), +this;
|
|
2851
|
+
}, Hi.prototype[t] = function() {
|
|
2852
|
+
return Date.prototype[t].apply(this, arguments), Ys(this), +this;
|
|
2839
2853
|
}));
|
|
2840
2854
|
});
|
|
2841
|
-
function
|
|
2855
|
+
function Ys(i) {
|
|
2842
2856
|
i.internal.setTime(+i), i.internal.setUTCSeconds(i.internal.getUTCSeconds() - Math.round(-Ye(i.timeZone, i) * 60));
|
|
2843
2857
|
}
|
|
2844
|
-
function
|
|
2845
|
-
Date.prototype.setFullYear.call(i, i.internal.getUTCFullYear(), i.internal.getUTCMonth(), i.internal.getUTCDate()), Date.prototype.setHours.call(i, i.internal.getUTCHours(), i.internal.getUTCMinutes(), i.internal.getUTCSeconds(), i.internal.getUTCMilliseconds()),
|
|
2858
|
+
function al(i) {
|
|
2859
|
+
Date.prototype.setFullYear.call(i, i.internal.getUTCFullYear(), i.internal.getUTCMonth(), i.internal.getUTCDate()), Date.prototype.setHours.call(i, i.internal.getUTCHours(), i.internal.getUTCMinutes(), i.internal.getUTCSeconds(), i.internal.getUTCMilliseconds()), $a(i);
|
|
2846
2860
|
}
|
|
2847
|
-
function
|
|
2861
|
+
function $a(i) {
|
|
2848
2862
|
const t = Ye(i.timeZone, i), e = t > 0 ? Math.floor(t) : Math.ceil(t), s = /* @__PURE__ */ new Date(+i);
|
|
2849
2863
|
s.setUTCHours(s.getUTCHours() - 1);
|
|
2850
2864
|
const n = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+s)).getTimezoneOffset(), r = n - a, l = Date.prototype.getHours.apply(i) !== i.internal.getUTCHours();
|
|
@@ -2862,10 +2876,10 @@ function ba(i) {
|
|
|
2862
2876
|
I && (i.internal.setUTCMinutes(i.internal.getUTCMinutes() + I), Date.prototype.setUTCMinutes.call(i, Date.prototype.getUTCMinutes.call(i) + I));
|
|
2863
2877
|
}
|
|
2864
2878
|
}
|
|
2865
|
-
let
|
|
2879
|
+
let Gs = class zi extends Hi {
|
|
2866
2880
|
//#region static
|
|
2867
2881
|
static tz(t, ...e) {
|
|
2868
|
-
return e.length ? new
|
|
2882
|
+
return e.length ? new zi(...e, t) : new zi(Date.now(), t);
|
|
2869
2883
|
}
|
|
2870
2884
|
//#endregion
|
|
2871
2885
|
//#region representation
|
|
@@ -2882,7 +2896,7 @@ let Ys = class Ui extends ji {
|
|
|
2882
2896
|
}
|
|
2883
2897
|
toTimeString() {
|
|
2884
2898
|
const t = this.internal.toUTCString().split(" ")[4], [e, s, n] = this.tzComponents();
|
|
2885
|
-
return `${t} GMT${e}${s}${n} (${
|
|
2899
|
+
return `${t} GMT${e}${s}${n} (${sl(this.timeZone, this)})`;
|
|
2886
2900
|
}
|
|
2887
2901
|
toLocaleString(t, e) {
|
|
2888
2902
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
@@ -2910,17 +2924,17 @@ let Ys = class Ui extends ji {
|
|
|
2910
2924
|
}
|
|
2911
2925
|
//#endregion
|
|
2912
2926
|
withTimeZone(t) {
|
|
2913
|
-
return new
|
|
2927
|
+
return new zi(+this, t);
|
|
2914
2928
|
}
|
|
2915
2929
|
//#region date-fns integration
|
|
2916
2930
|
[Symbol.for("constructDateFrom")](t) {
|
|
2917
|
-
return new
|
|
2931
|
+
return new zi(+new Date(t), this.timeZone);
|
|
2918
2932
|
}
|
|
2919
2933
|
//#endregion
|
|
2920
2934
|
};
|
|
2921
2935
|
window.pktTz = window.pktTz === void 0 ? "Europe/Oslo" : window.pktTz;
|
|
2922
|
-
const
|
|
2923
|
-
const t = new
|
|
2936
|
+
const rl = (i = window.pktTz) => {
|
|
2937
|
+
const t = new Gs((/* @__PURE__ */ new Date()).toISOString(), i);
|
|
2924
2938
|
return t.setHours(0, 0, 0, 0), isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
2925
2939
|
};
|
|
2926
2940
|
function Re(i) {
|
|
@@ -2944,9 +2958,9 @@ const gt = (i) => {
|
|
|
2944
2958
|
return null;
|
|
2945
2959
|
const t = Re(i);
|
|
2946
2960
|
return isNaN(t.getTime()) ? null : t;
|
|
2947
|
-
},
|
|
2961
|
+
}, Fn = (i, t) => {
|
|
2948
2962
|
const e = xe(i);
|
|
2949
|
-
return isNaN(e.getTime()) ? "" :
|
|
2963
|
+
return isNaN(e.getTime()) ? "" : tl(e, t);
|
|
2950
2964
|
}, xe = (i = "", t) => {
|
|
2951
2965
|
const e = typeof i == "string" ? Re(i) : i;
|
|
2952
2966
|
return !e || isNaN(e.getTime()) ? /* @__PURE__ */ new Date() : e;
|
|
@@ -2955,47 +2969,47 @@ const gt = (i) => {
|
|
|
2955
2969
|
return /* @__PURE__ */ new Date();
|
|
2956
2970
|
const s = new Date(i, t, e);
|
|
2957
2971
|
return isNaN(s.getTime()) ? /* @__PURE__ */ new Date() : s;
|
|
2958
|
-
},
|
|
2972
|
+
}, Fi = (i) => {
|
|
2959
2973
|
let t;
|
|
2960
|
-
return typeof i == "number" ? t = new
|
|
2961
|
-
},
|
|
2974
|
+
return typeof i == "number" ? t = new Gs(i, window.pktTz) : t = new Gs(i, window.pktTz), t.setHours(12, 0, 0, 0), t;
|
|
2975
|
+
}, ol = (i) => !i || isNaN(i.getTime()) ? "" : new Intl.DateTimeFormat("no", { dateStyle: "full", timeZone: window.pktTz }).format(i), ll = (i, t, e) => {
|
|
2962
2976
|
if (!i || isNaN(i.getTime())) return !1;
|
|
2963
2977
|
const s = t ? xe(t) : null, n = e ? xe(e) : null;
|
|
2964
2978
|
return !(s && i < s || n && i > n);
|
|
2965
|
-
},
|
|
2979
|
+
}, hl = (i, t) => {
|
|
2966
2980
|
if (!i || isNaN(i.getTime()) || !Array.isArray(t)) return !1;
|
|
2967
2981
|
const e = gt(i);
|
|
2968
2982
|
return t.includes(e);
|
|
2969
|
-
},
|
|
2983
|
+
}, cl = (i, t) => {
|
|
2970
2984
|
if (!i || isNaN(i.getTime()) || !Array.isArray(t)) return !1;
|
|
2971
2985
|
const e = i.getDay().toString();
|
|
2972
2986
|
return t.includes(e);
|
|
2973
|
-
},
|
|
2987
|
+
}, _a = (i, t, e, s, n) => !(!i || isNaN(i.getTime()) || !ll(i, t, e) || s && hl(i, s) || n && cl(i, n)), ul = (i, t, e, s, n) => i.filter((a) => {
|
|
2974
2988
|
const r = Ie(a);
|
|
2975
|
-
return r &&
|
|
2976
|
-
}),
|
|
2989
|
+
return r && _a(r, t, e, s, n);
|
|
2990
|
+
}), wa = (i) => i.slice().sort((t, e) => {
|
|
2977
2991
|
const s = Ie(t), n = Ie(e);
|
|
2978
2992
|
return !s || !n ? 0 : s.getTime() - n.getTime();
|
|
2979
|
-
}),
|
|
2993
|
+
}), dl = (i, t) => {
|
|
2980
2994
|
const e = Ie(i), s = Ie(t);
|
|
2981
2995
|
return !e || !s ? !1 : e <= s;
|
|
2982
|
-
},
|
|
2996
|
+
}, qi = (i) => i ? Array.isArray(i) ? i.filter(Boolean) : String(i).split(",").map((t) => t.trim()).filter(Boolean) : [], pl = (i) => i.join(","), ml = (i) => qi(i), fl = (i) => i ? Re(i) : null, gl = (i) => {
|
|
2983
2997
|
if (typeof i == "string")
|
|
2984
2998
|
return i.split(",").map((t) => Re(t));
|
|
2985
2999
|
if (Array.isArray(i))
|
|
2986
3000
|
return i.map((t) => Re(t));
|
|
2987
3001
|
}, Si = {
|
|
2988
|
-
csvToArray:
|
|
2989
|
-
stringToDate:
|
|
2990
|
-
stringsToDate:
|
|
2991
|
-
},
|
|
2992
|
-
props:
|
|
3002
|
+
csvToArray: ml,
|
|
3003
|
+
stringToDate: fl,
|
|
3004
|
+
stringsToDate: gl
|
|
3005
|
+
}, vl = { earliest: { default: null }, latest: { default: null }, weeknumbers: { default: !1 }, withcontrols: { default: !1 }, multiple: { default: !1 }, maxMultiple: { default: 4 }, range: { default: !1 } }, qe = {
|
|
3006
|
+
props: vl
|
|
2993
3007
|
};
|
|
2994
|
-
function
|
|
3008
|
+
function xa(i, t) {
|
|
2995
3009
|
const e = t.excludedates.map(
|
|
2996
3010
|
(s) => typeof s == "string" ? s : gt(s)
|
|
2997
3011
|
);
|
|
2998
|
-
return !
|
|
3012
|
+
return !_a(
|
|
2999
3013
|
i,
|
|
3000
3014
|
t.earliest,
|
|
3001
3015
|
t.latest,
|
|
@@ -3003,14 +3017,14 @@ function _a(i, t) {
|
|
|
3003
3017
|
t.excludeweekdays
|
|
3004
3018
|
);
|
|
3005
3019
|
}
|
|
3006
|
-
function
|
|
3007
|
-
return !!(
|
|
3020
|
+
function kl(i, t, e, s) {
|
|
3021
|
+
return !!(xa(i, e) || !t && s.multiple && s.maxMultiple > 0 && s.selectedCount >= s.maxMultiple);
|
|
3008
3022
|
}
|
|
3009
|
-
function
|
|
3023
|
+
function bl(i, t, e) {
|
|
3010
3024
|
const s = Ge(i, t, 0);
|
|
3011
3025
|
return !(e && xe(e) > s);
|
|
3012
3026
|
}
|
|
3013
|
-
function
|
|
3027
|
+
function yl(i, t, e) {
|
|
3014
3028
|
const s = Ge(
|
|
3015
3029
|
t === 11 ? i + 1 : i,
|
|
3016
3030
|
t === 11 ? 0 : t + 1,
|
|
@@ -3018,9 +3032,9 @@ function gl(i, t, e) {
|
|
|
3018
3032
|
);
|
|
3019
3033
|
return !(e && xe(e) < s);
|
|
3020
3034
|
}
|
|
3021
|
-
const
|
|
3022
|
-
function
|
|
3023
|
-
const e = Ge(i, t, 1), s = Ge(i, t + 1, 0), n = (e.getDay() +
|
|
3035
|
+
const Qi = 7, $l = 6;
|
|
3036
|
+
function _l(i, t) {
|
|
3037
|
+
const e = Ge(i, t, 1), s = Ge(i, t + 1, 0), n = (e.getDay() + $l) % Qi, a = s.getDate(), r = Math.ceil((a + n) / Qi), l = Ge(i, t, 0).getDate(), u = ba(e);
|
|
3024
3038
|
return {
|
|
3025
3039
|
firstDayOfMonth: e,
|
|
3026
3040
|
lastDayOfMonth: s,
|
|
@@ -3031,19 +3045,19 @@ function kl(i, t) {
|
|
|
3031
3045
|
initialWeek: u
|
|
3032
3046
|
};
|
|
3033
3047
|
}
|
|
3034
|
-
function
|
|
3048
|
+
function wl(i, t, e, s) {
|
|
3035
3049
|
const { startingDay: n, numDays: a } = s;
|
|
3036
3050
|
return i === 0 && t < n ? "prev-month" : e > a ? "next-month" : "current-month";
|
|
3037
3051
|
}
|
|
3038
|
-
function
|
|
3052
|
+
function xl(i, t, e, s) {
|
|
3039
3053
|
const { startingDay: n, numDaysPrevMonth: a, numDays: r } = s;
|
|
3040
3054
|
return i === "prev-month" ? a - (n - t - 1) : i === "next-month" ? e - r : e;
|
|
3041
3055
|
}
|
|
3042
3056
|
function mi(i) {
|
|
3043
3057
|
return typeof i == "string" && (i = i.split(",")), i.length === 1 && i[0] === "" ? [] : i.map((t) => Re(t));
|
|
3044
3058
|
}
|
|
3045
|
-
function
|
|
3046
|
-
const e =
|
|
3059
|
+
function Vn(i, t) {
|
|
3060
|
+
const e = va({ start: i, end: t }), s = {};
|
|
3047
3061
|
if (Array.isArray(e) && e.length)
|
|
3048
3062
|
for (let n = 0; n < e.length; n++) {
|
|
3049
3063
|
const a = e[n], r = a > i && a < t;
|
|
@@ -3051,9 +3065,9 @@ function Fn(i, t) {
|
|
|
3051
3065
|
}
|
|
3052
3066
|
return s;
|
|
3053
3067
|
}
|
|
3054
|
-
function
|
|
3068
|
+
function Sa(i, t, e, s) {
|
|
3055
3069
|
if (t.length !== 1) return !0;
|
|
3056
|
-
const n =
|
|
3070
|
+
const n = va({
|
|
3057
3071
|
start: t[0],
|
|
3058
3072
|
end: i
|
|
3059
3073
|
});
|
|
@@ -3062,66 +3076,66 @@ function wa(i, t, e, s) {
|
|
|
3062
3076
|
for (const r of e)
|
|
3063
3077
|
if (r > t[0] && r < i)
|
|
3064
3078
|
return !1;
|
|
3065
|
-
if (s.includes(
|
|
3079
|
+
if (s.includes(il(n[a]).toString()))
|
|
3066
3080
|
return !1;
|
|
3067
3081
|
}
|
|
3068
3082
|
return !0;
|
|
3069
3083
|
}
|
|
3070
|
-
function
|
|
3084
|
+
function en(i, t) {
|
|
3071
3085
|
const e = gt(i);
|
|
3072
3086
|
return t.includes(e) ? t : [...t, e];
|
|
3073
3087
|
}
|
|
3074
|
-
function
|
|
3088
|
+
function sn(i, t) {
|
|
3075
3089
|
const e = gt(i), s = t.indexOf(e);
|
|
3076
3090
|
if (s === -1) return t;
|
|
3077
3091
|
if (t.length === 1) return [];
|
|
3078
3092
|
const n = [...t];
|
|
3079
3093
|
return n.splice(s, 1), n;
|
|
3080
3094
|
}
|
|
3081
|
-
function
|
|
3095
|
+
function Sl(i, t, e) {
|
|
3082
3096
|
const s = gt(i);
|
|
3083
|
-
return t.includes(s) ?
|
|
3097
|
+
return t.includes(s) ? sn(i, t) : e > 0 && t.length >= e ? t : en(i, t);
|
|
3084
3098
|
}
|
|
3085
|
-
function
|
|
3099
|
+
function Cl(i, t, e) {
|
|
3086
3100
|
const s = gt(i), n = mi(t);
|
|
3087
3101
|
if (t.includes(s))
|
|
3088
|
-
return t.indexOf(s) === 0 ? [] :
|
|
3102
|
+
return t.indexOf(s) === 0 ? [] : sn(i, t);
|
|
3089
3103
|
if (t.length > 1)
|
|
3090
3104
|
return [s];
|
|
3091
3105
|
if (t.length === 1) {
|
|
3092
|
-
if (!
|
|
3106
|
+
if (!Sa(i, n, e.excludedates, e.excludeweekdays))
|
|
3093
3107
|
return [s];
|
|
3094
3108
|
if (n[0] > i)
|
|
3095
3109
|
return [s];
|
|
3096
3110
|
}
|
|
3097
|
-
return
|
|
3111
|
+
return en(i, t);
|
|
3098
3112
|
}
|
|
3099
|
-
const
|
|
3113
|
+
const Tl = {
|
|
3100
3114
|
ArrowLeft: -1,
|
|
3101
3115
|
ArrowRight: 1,
|
|
3102
|
-
ArrowUp: -
|
|
3103
|
-
ArrowDown:
|
|
3116
|
+
ArrowUp: -Qi,
|
|
3117
|
+
ArrowDown: Qi
|
|
3104
3118
|
};
|
|
3105
|
-
function
|
|
3119
|
+
function Nl(i) {
|
|
3106
3120
|
var t;
|
|
3107
3121
|
const e = i.nodeName;
|
|
3108
3122
|
return e === "INPUT" || e === "SELECT" || e === "BUTTON" && !((t = i.dataset) != null && t.date);
|
|
3109
3123
|
}
|
|
3110
|
-
function
|
|
3111
|
-
let s =
|
|
3124
|
+
function Al(i, t, e) {
|
|
3125
|
+
let s = An(i, t);
|
|
3112
3126
|
if (!s) return null;
|
|
3113
3127
|
let n = e(`button[data-date="${gt(s)}"]`);
|
|
3114
3128
|
for (; n instanceof HTMLButtonElement && n.dataset.disabled; )
|
|
3115
|
-
if (s =
|
|
3129
|
+
if (s = An(s, t), n = e(`button[data-date="${gt(s)}"]`), !n) return null;
|
|
3116
3130
|
return s;
|
|
3117
3131
|
}
|
|
3118
|
-
function
|
|
3119
|
-
return
|
|
3132
|
+
function Ml(i) {
|
|
3133
|
+
return Tl[i] ?? null;
|
|
3120
3134
|
}
|
|
3121
|
-
var
|
|
3122
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
3135
|
+
var Ol = Object.defineProperty, El = Object.getOwnPropertyDescriptor, G = (i, t, e, s) => {
|
|
3136
|
+
for (var n = s > 1 ? void 0 : s ? El(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
3123
3137
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
3124
|
-
return s && n &&
|
|
3138
|
+
return s && n && Ol(t, e, n), n;
|
|
3125
3139
|
};
|
|
3126
3140
|
let Y = class extends X {
|
|
3127
3141
|
constructor() {
|
|
@@ -3143,30 +3157,30 @@ let Y = class extends X {
|
|
|
3143
3157
|
* Date and selection management
|
|
3144
3158
|
*/
|
|
3145
3159
|
convertSelected() {
|
|
3146
|
-
typeof this.selected == "string" && (this.selected = this.selected.split(",")), this.selected.length === 1 && this.selected[0] === "" && (this.selected = []), this._selected = mi(this.selected), this.range && this.selected.length === 2 && (this.inRange =
|
|
3160
|
+
typeof this.selected == "string" && (this.selected = this.selected.split(",")), this.selected.length === 1 && this.selected[0] === "" && (this.selected = []), this._selected = mi(this.selected), this.range && this.selected.length === 2 && (this.inRange = Vn(this._selected[0], this._selected[1])), this.setCurrentMonth();
|
|
3147
3161
|
}
|
|
3148
3162
|
setCurrentMonth() {
|
|
3149
3163
|
if (this.currentmonth === null && !this.currentmonthtouched && (this.currentmonthtouched = !0), this.selected.length && this.selected[0] !== "") {
|
|
3150
3164
|
const t = Re(this.selected[this.selected.length - 1]);
|
|
3151
|
-
this.currentmonth = isNaN(t.getTime()) ?
|
|
3152
|
-
} else this.currentmonth === null && (this.currentmonth =
|
|
3153
|
-
(!this.currentmonth || isNaN(this.currentmonth.getTime())) && (this.currentmonth =
|
|
3165
|
+
this.currentmonth = isNaN(t.getTime()) ? Fi(/* @__PURE__ */ new Date()) : t;
|
|
3166
|
+
} else this.currentmonth === null && (this.currentmonth = Fi(/* @__PURE__ */ new Date()));
|
|
3167
|
+
(!this.currentmonth || isNaN(this.currentmonth.getTime())) && (this.currentmonth = Fi(/* @__PURE__ */ new Date())), this.year = this.currentmonth.getFullYear(), this.month = this.currentmonth.getMonth();
|
|
3154
3168
|
}
|
|
3155
3169
|
/**
|
|
3156
3170
|
* Keyboard navigation
|
|
3157
3171
|
*/
|
|
3158
3172
|
handleKeydown(t) {
|
|
3159
|
-
const e =
|
|
3173
|
+
const e = Ml(t.key);
|
|
3160
3174
|
e !== null && this.handleArrowKey(t, e);
|
|
3161
3175
|
}
|
|
3162
3176
|
handleArrowKey(t, e) {
|
|
3163
3177
|
const s = t.target;
|
|
3164
|
-
if (
|
|
3178
|
+
if (Nl(s)) return;
|
|
3165
3179
|
if (t.preventDefault(), !this.focusedDate) {
|
|
3166
3180
|
this.focusOnCurrentDate();
|
|
3167
3181
|
return;
|
|
3168
3182
|
}
|
|
3169
|
-
const n = this.focusedDate ? xe(this.focusedDate) : Ge(this.year, this.month, 1), a =
|
|
3183
|
+
const n = this.focusedDate ? xe(this.focusedDate) : Ge(this.year, this.month, 1), a = Al(n, e, this.querySelector.bind(this));
|
|
3170
3184
|
if (a) {
|
|
3171
3185
|
const r = this.querySelector(`button[data-date="${gt(a)}"]`);
|
|
3172
3186
|
r instanceof HTMLButtonElement && !r.dataset.disabled && (this.focusedDate = gt(a), r.focus());
|
|
@@ -3281,7 +3295,7 @@ let Y = class extends X {
|
|
|
3281
3295
|
isToday: a,
|
|
3282
3296
|
isSelected: r,
|
|
3283
3297
|
isDisabled: l,
|
|
3284
|
-
ariaLabel:
|
|
3298
|
+
ariaLabel: ol(s),
|
|
3285
3299
|
tabindex: u
|
|
3286
3300
|
};
|
|
3287
3301
|
}
|
|
@@ -3294,7 +3308,7 @@ let Y = class extends X {
|
|
|
3294
3308
|
};
|
|
3295
3309
|
}
|
|
3296
3310
|
isDayDisabled(t, e) {
|
|
3297
|
-
return
|
|
3311
|
+
return kl(t, e, this.getDateConstraints(), {
|
|
3298
3312
|
multiple: this.multiple,
|
|
3299
3313
|
maxMultiple: this.maxMultiple,
|
|
3300
3314
|
selectedCount: this.selected.length
|
|
@@ -3372,19 +3386,19 @@ let Y = class extends X {
|
|
|
3372
3386
|
return d`<tr class="pkt-cal-week-row" role="row">${t}</tr>`;
|
|
3373
3387
|
}
|
|
3374
3388
|
renderCalendarBody() {
|
|
3375
|
-
const t =
|
|
3389
|
+
const t = rl(), e = _l(this.year, this.month);
|
|
3376
3390
|
let s = 1;
|
|
3377
3391
|
this.week = e.initialWeek;
|
|
3378
3392
|
const n = [];
|
|
3379
3393
|
for (let a = 0; a < e.numRows; a++) {
|
|
3380
3394
|
const r = [];
|
|
3381
3395
|
this.weeknumbers && r.push(d`<td class="pkt-cal-week">${this.week}</td>`), this.week++;
|
|
3382
|
-
for (let l = 0; l <
|
|
3383
|
-
const u =
|
|
3396
|
+
for (let l = 0; l < Qi; l++) {
|
|
3397
|
+
const u = wl(a, l, s, e);
|
|
3384
3398
|
if (u === "current-month")
|
|
3385
3399
|
r.push(this.renderDayView(s, t)), s++;
|
|
3386
3400
|
else {
|
|
3387
|
-
const p =
|
|
3401
|
+
const p = xl(u, l, s, e);
|
|
3388
3402
|
r.push(this.renderEmptyDayCell(p)), u === "next-month" && s++;
|
|
3389
3403
|
}
|
|
3390
3404
|
}
|
|
@@ -3396,27 +3410,27 @@ let Y = class extends X {
|
|
|
3396
3410
|
* Date validation
|
|
3397
3411
|
*/
|
|
3398
3412
|
isExcluded(t) {
|
|
3399
|
-
return
|
|
3413
|
+
return xa(t, this.getDateConstraints());
|
|
3400
3414
|
}
|
|
3401
3415
|
/**
|
|
3402
3416
|
* Month navigation
|
|
3403
3417
|
*/
|
|
3404
3418
|
isPrevMonthAllowed() {
|
|
3405
|
-
return
|
|
3419
|
+
return bl(this.year, this.month, this.earliest);
|
|
3406
3420
|
}
|
|
3407
3421
|
prevMonth() {
|
|
3408
3422
|
const t = this.month === 0 ? 11 : this.month - 1, e = this.month === 0 ? this.year - 1 : this.year;
|
|
3409
3423
|
this.changeMonth(e, t);
|
|
3410
3424
|
}
|
|
3411
3425
|
isNextMonthAllowed() {
|
|
3412
|
-
return
|
|
3426
|
+
return yl(this.year, this.month, this.latest);
|
|
3413
3427
|
}
|
|
3414
3428
|
nextMonth() {
|
|
3415
3429
|
const t = this.month === 11 ? 0 : this.month + 1, e = this.month === 11 ? this.year + 1 : this.year;
|
|
3416
3430
|
this.changeMonth(e, t);
|
|
3417
3431
|
}
|
|
3418
3432
|
changeMonth(t, e) {
|
|
3419
|
-
this.year = typeof t == "string" ? parseInt(t) : t, this.month = typeof e == "string" ? parseInt(e) : e, this.currentmonth =
|
|
3433
|
+
this.year = typeof t == "string" ? parseInt(t) : t, this.month = typeof e == "string" ? parseInt(e) : e, this.currentmonth = Fi(new Date(this.year, this.month, 1)), this.tabIndexSet = 0, this.focusedDate = null, this.selectableDates = [];
|
|
3420
3434
|
}
|
|
3421
3435
|
/**
|
|
3422
3436
|
* Date selection logic
|
|
@@ -3428,19 +3442,19 @@ let Y = class extends X {
|
|
|
3428
3442
|
return typeof this.selected == "string" ? this.selected.split(",") : this.selected;
|
|
3429
3443
|
}
|
|
3430
3444
|
addToSelected(t) {
|
|
3431
|
-
this.selected =
|
|
3445
|
+
this.selected = en(t, this.normalizeSelected()), this._selected = mi(this.selected), this.range && this.selected.length === 2 && (this.convertSelected(), this.close());
|
|
3432
3446
|
}
|
|
3433
3447
|
removeFromSelected(t) {
|
|
3434
|
-
this.selected =
|
|
3448
|
+
this.selected = sn(t, this.normalizeSelected()), this._selected = mi(this.selected);
|
|
3435
3449
|
}
|
|
3436
3450
|
toggleSelected(t) {
|
|
3437
|
-
this.selected =
|
|
3451
|
+
this.selected = Sl(t, this.normalizeSelected(), this.maxMultiple), this._selected = mi(this.selected);
|
|
3438
3452
|
}
|
|
3439
3453
|
isRangeAllowed(t) {
|
|
3440
|
-
return
|
|
3454
|
+
return Sa(t, this._selected, this.excludedates, this.excludeweekdays);
|
|
3441
3455
|
}
|
|
3442
3456
|
handleRangeSelect(t) {
|
|
3443
|
-
return this.selected =
|
|
3457
|
+
return this.selected = Cl(t, this.normalizeSelected(), {
|
|
3444
3458
|
excludedates: this.excludedates,
|
|
3445
3459
|
excludeweekdays: this.excludeweekdays
|
|
3446
3460
|
}), this._selected = mi(this.selected), this.selected.length === 2 ? this.convertSelected() : this.selected.length === 1 && (this.inRange = {}), Promise.resolve();
|
|
@@ -3450,7 +3464,7 @@ let Y = class extends X {
|
|
|
3450
3464
|
this.rangeHovered = null;
|
|
3451
3465
|
return;
|
|
3452
3466
|
}
|
|
3453
|
-
this.rangeHovered = t, this.inRange =
|
|
3467
|
+
this.rangeHovered = t, this.inRange = Vn(this._selected[0], t);
|
|
3454
3468
|
}
|
|
3455
3469
|
handleDateSelect(t) {
|
|
3456
3470
|
return t && (this.range ? this.handleRangeSelect(t) : this.multiple ? this.toggleSelected(t) : (this.selected.includes(gt(t)) ? this.emptySelected() : (this.emptySelected(), this.addToSelected(t)), this.close()), this.dispatchEvent(
|
|
@@ -3465,7 +3479,7 @@ let Y = class extends X {
|
|
|
3465
3479
|
* Focus management and event handlers
|
|
3466
3480
|
*/
|
|
3467
3481
|
focusOnCurrentDate() {
|
|
3468
|
-
const t = gt(
|
|
3482
|
+
const t = gt(Fi(/* @__PURE__ */ new Date())), e = this.querySelector(`button[data-date="${t}"]`);
|
|
3469
3483
|
if (e instanceof HTMLButtonElement) {
|
|
3470
3484
|
this.focusedDate = t, e.focus();
|
|
3471
3485
|
return;
|
|
@@ -3575,17 +3589,17 @@ G([
|
|
|
3575
3589
|
Y = G([
|
|
3576
3590
|
V("pkt-calendar")
|
|
3577
3591
|
], Y);
|
|
3578
|
-
const
|
|
3579
|
-
props:
|
|
3592
|
+
const Pl = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, ls = {
|
|
3593
|
+
props: Pl
|
|
3580
3594
|
};
|
|
3581
|
-
var
|
|
3582
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
3595
|
+
var Dl = Object.defineProperty, Rl = Object.getOwnPropertyDescriptor, ge = (i, t, e, s) => {
|
|
3596
|
+
for (var n = s > 1 ? void 0 : s ? Rl(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
3583
3597
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
3584
|
-
return s && n &&
|
|
3598
|
+
return s && n && Dl(t, e, n), n;
|
|
3585
3599
|
};
|
|
3586
3600
|
let ae = class extends X {
|
|
3587
3601
|
constructor() {
|
|
3588
|
-
super(), this.defaultSlot = O(), this.closeTag =
|
|
3602
|
+
super(), this.defaultSlot = O(), this.closeTag = ls.props.closeTag.default, this.size = ls.props.size.default, this.skin = ls.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = ls.props.type.default, this.ariaLabel = null, this._isClosed = !1, this._ariaDescription = null, this.close = (t) => {
|
|
3589
3603
|
this._isClosed = !0, this.dispatchEvent(
|
|
3590
3604
|
new CustomEvent("close", { detail: { origin: t }, bubbles: !1, composed: !0 })
|
|
3591
3605
|
), this.dispatchEvent(
|
|
@@ -3677,12 +3691,12 @@ ge([
|
|
|
3677
3691
|
ae = ge([
|
|
3678
3692
|
V("pkt-tag")
|
|
3679
3693
|
], ae);
|
|
3680
|
-
var
|
|
3681
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
3694
|
+
var Il = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, Ci = (i, t, e, s) => {
|
|
3695
|
+
for (var n = s > 1 ? void 0 : s ? Ll(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
3682
3696
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
3683
|
-
return s && n &&
|
|
3697
|
+
return s && n && Il(t, e, n), n;
|
|
3684
3698
|
};
|
|
3685
|
-
let Le = class extends
|
|
3699
|
+
let Le = class extends xs {
|
|
3686
3700
|
constructor() {
|
|
3687
3701
|
super(...arguments), this.size = void 0, this.level = 2, this.weight = void 0, this.visuallyHidden = !1, this.align = void 0;
|
|
3688
3702
|
}
|
|
@@ -3774,13 +3788,13 @@ Ci([
|
|
|
3774
3788
|
Le = Ci([
|
|
3775
3789
|
V("pkt-heading")
|
|
3776
3790
|
], Le);
|
|
3777
|
-
const
|
|
3778
|
-
props:
|
|
3791
|
+
const Bl = { layout: { default: "vertical" }, skin: { type: ["outlined", "outlined-beige", "gray", "blue", "beige", "green"], default: "outlined" }, padding: { default: "default" } }, vi = {
|
|
3792
|
+
props: Bl
|
|
3779
3793
|
};
|
|
3780
|
-
var
|
|
3781
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
3794
|
+
var Fl = Object.defineProperty, Vl = Object.getOwnPropertyDescriptor, _t = (i, t, e, s) => {
|
|
3795
|
+
for (var n = s > 1 ? void 0 : s ? Vl(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
3782
3796
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
3783
|
-
return s && n &&
|
|
3797
|
+
return s && n && Fl(t, e, n), n;
|
|
3784
3798
|
};
|
|
3785
3799
|
let pt = class extends X {
|
|
3786
3800
|
//Constructor
|
|
@@ -4003,11 +4017,11 @@ pt = _t([
|
|
|
4003
4017
|
* Copyright 2017 Google LLC
|
|
4004
4018
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4005
4019
|
*/
|
|
4006
|
-
const
|
|
4020
|
+
const jn = (i, t, e) => {
|
|
4007
4021
|
const s = /* @__PURE__ */ new Map();
|
|
4008
4022
|
for (let n = t; n <= e; n++) s.set(i[n], n);
|
|
4009
4023
|
return s;
|
|
4010
|
-
},
|
|
4024
|
+
}, nn = ii(class extends xi {
|
|
4011
4025
|
constructor(i) {
|
|
4012
4026
|
if (super(i), i.type !== se.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
4013
4027
|
}
|
|
@@ -4023,7 +4037,7 @@ const Vn = (i, t, e) => {
|
|
|
4023
4037
|
return this.dt(i, t, e).values;
|
|
4024
4038
|
}
|
|
4025
4039
|
update(i, [t, e, s]) {
|
|
4026
|
-
const n =
|
|
4040
|
+
const n = Cr(i), { values: a, keys: r } = this.dt(t, e, s);
|
|
4027
4041
|
if (!Array.isArray(n)) return this.ut = r, a;
|
|
4028
4042
|
const l = this.ut ?? (this.ut = []), u = [];
|
|
4029
4043
|
let p, g, v = 0, y = n.length - 1, $ = 0, k = a.length - 1;
|
|
@@ -4033,27 +4047,27 @@ const Vn = (i, t, e) => {
|
|
|
4033
4047
|
else if (l[y] === r[k]) u[k] = ze(n[y], a[k]), y--, k--;
|
|
4034
4048
|
else if (l[v] === r[k]) u[k] = ze(n[v], a[k]), Ri(i, u[k + 1], n[v]), v++, k--;
|
|
4035
4049
|
else if (l[y] === r[$]) u[$] = ze(n[y], a[$]), Ri(i, n[v], n[y]), y--, $++;
|
|
4036
|
-
else if (p === void 0 && (p =
|
|
4050
|
+
else if (p === void 0 && (p = jn(r, $, k), g = jn(l, v, y)), p.has(l[v])) if (p.has(l[y])) {
|
|
4037
4051
|
const w = g.get(r[$]), T = w !== void 0 ? n[w] : null;
|
|
4038
4052
|
if (T === null) {
|
|
4039
4053
|
const M = Ri(i, n[v]);
|
|
4040
4054
|
ze(M, a[$]), u[$] = M;
|
|
4041
4055
|
} else u[$] = ze(T, a[$]), Ri(i, n[v], T), n[w] = null;
|
|
4042
4056
|
$++;
|
|
4043
|
-
} else
|
|
4044
|
-
else
|
|
4057
|
+
} else Ds(n[y]), y--;
|
|
4058
|
+
else Ds(n[v]), v++;
|
|
4045
4059
|
for (; $ <= k; ) {
|
|
4046
4060
|
const w = Ri(i, u[k + 1]);
|
|
4047
4061
|
ze(w, a[$]), u[$++] = w;
|
|
4048
4062
|
}
|
|
4049
4063
|
for (; v <= y; ) {
|
|
4050
4064
|
const w = n[v++];
|
|
4051
|
-
w !== null &&
|
|
4065
|
+
w !== null && Ds(w);
|
|
4052
4066
|
}
|
|
4053
|
-
return this.ut = r,
|
|
4067
|
+
return this.ut = r, ca(i, u), Dt;
|
|
4054
4068
|
}
|
|
4055
|
-
}),
|
|
4056
|
-
const i =
|
|
4069
|
+
}), Hn = () => ("00000000000000000" + (Math.random() * 18446744073709552e3).toString(16)).slice(-16), jl = (i) => new Promise((t) => setTimeout(t, i)), Pe = () => {
|
|
4070
|
+
const i = Hn(), t = Hn();
|
|
4057
4071
|
return i.slice(0, 8) + "-" + i.slice(8, 12) + "-4" + i.slice(13) + "-a" + t.slice(1, 4) + "-" + t.slice(4);
|
|
4058
4072
|
}, Lt = {
|
|
4059
4073
|
fromAttribute(i) {
|
|
@@ -4062,12 +4076,12 @@ const Vn = (i, t, e) => {
|
|
|
4062
4076
|
toAttribute(i) {
|
|
4063
4077
|
return i ? "true" : "false";
|
|
4064
4078
|
}
|
|
4065
|
-
},
|
|
4066
|
-
props:
|
|
4079
|
+
}, Hl = { helptextDropdownButton: { default: "Les mer <span class='pkt-sr-only'>om feltet</span>" }, counter: { default: !1 }, optionalTag: { default: !1 }, optionalText: { default: "Valgfritt" }, requiredTag: { default: !1 }, requiredText: { default: "Må fylles ut" }, hasError: { default: !1 }, disabled: { default: !1 }, inline: { default: !1 }, hasFieldset: { default: !1 }, useWrapper: { default: !0 } }, Ht = {
|
|
4080
|
+
props: Hl
|
|
4067
4081
|
};
|
|
4068
|
-
var
|
|
4069
|
-
function
|
|
4070
|
-
return
|
|
4082
|
+
var Ul = {}, Un;
|
|
4083
|
+
function zl() {
|
|
4084
|
+
return Un || (Un = 1, (function() {
|
|
4071
4085
|
(function(i) {
|
|
4072
4086
|
const t = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = {
|
|
4073
4087
|
ariaAtomic: "aria-atomic",
|
|
@@ -4167,8 +4181,8 @@ function Vl() {
|
|
|
4167
4181
|
}
|
|
4168
4182
|
if (F.localName === "form") {
|
|
4169
4183
|
const bt = u.get(F), jt = document.createTreeWalker(F, NodeFilter.SHOW_ELEMENT, {
|
|
4170
|
-
acceptNode(
|
|
4171
|
-
return n.has(
|
|
4184
|
+
acceptNode(Os) {
|
|
4185
|
+
return n.has(Os) && Os.constructor.formAssociated && !(bt && bt.has(Os)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
4172
4186
|
}
|
|
4173
4187
|
});
|
|
4174
4188
|
let Ei = jt.nextNode();
|
|
@@ -4467,7 +4481,7 @@ function Vl() {
|
|
|
4467
4481
|
return nt(h, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(h.disabled || h.hasAttribute("disabled") || h.hasAttribute("readonly"));
|
|
4468
4482
|
}
|
|
4469
4483
|
}
|
|
4470
|
-
function
|
|
4484
|
+
function Ms() {
|
|
4471
4485
|
if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals)
|
|
4472
4486
|
return !1;
|
|
4473
4487
|
class f extends HTMLElement {
|
|
@@ -4535,17 +4549,17 @@ function Vl() {
|
|
|
4535
4549
|
ie() && typeof document < "u" && new MutationObserver(J).observe(document.documentElement, et), typeof HTMLFormElement < "u" && kt(), (f || typeof window < "u" && !window.CustomStateSet) && ci();
|
|
4536
4550
|
}
|
|
4537
4551
|
}
|
|
4538
|
-
return customElements.polyfillWrapFlushCallback || (
|
|
4552
|
+
return customElements.polyfillWrapFlushCallback || (Ms() ? typeof window < "u" && !window.CustomStateSet && ci(HTMLElement.prototype.attachInternals) : ui(!1)), i.forceCustomStateSetPolyfill = ci, i.forceElementInternalsPolyfill = ui, Object.defineProperty(i, "__esModule", { value: !0 }), i;
|
|
4539
4553
|
})({});
|
|
4540
|
-
})()),
|
|
4554
|
+
})()), Ul;
|
|
4541
4555
|
}
|
|
4542
|
-
|
|
4543
|
-
var
|
|
4556
|
+
zl();
|
|
4557
|
+
var ql = Object.defineProperty, B = (i, t, e, s) => {
|
|
4544
4558
|
for (var n = void 0, a = i.length - 1, r; a >= 0; a--)
|
|
4545
4559
|
(r = i[a]) && (n = r(t, e, n) || n);
|
|
4546
|
-
return n &&
|
|
4560
|
+
return n && ql(t, e, n), n;
|
|
4547
4561
|
};
|
|
4548
|
-
const
|
|
4562
|
+
const zn = "on", Bs = "--checked", hs = ",";
|
|
4549
4563
|
let D = class extends X {
|
|
4550
4564
|
constructor() {
|
|
4551
4565
|
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Pe(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = Ht.props.helptextDropdownButton.default, this.label = null, this.optionalText = Et.forms.labels.optional, this.requiredText = Et.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
@@ -4610,7 +4624,7 @@ let D = class extends X {
|
|
|
4610
4624
|
var s;
|
|
4611
4625
|
if (e !== this && e.getAttribute("name") === this.name && e.getAttribute("value") !== this.value) {
|
|
4612
4626
|
const n = e;
|
|
4613
|
-
n.checked && (n.checked = !1, n.internals && (n.internals.setFormValue(null), (s = n.internals.states) == null || s.delete(
|
|
4627
|
+
n.checked && (n.checked = !1, n.internals && (n.internals.setFormValue(null), (s = n.internals.states) == null || s.delete(Bs)));
|
|
4614
4628
|
}
|
|
4615
4629
|
});
|
|
4616
4630
|
}
|
|
@@ -4626,10 +4640,10 @@ let D = class extends X {
|
|
|
4626
4640
|
if (!this.touched) return;
|
|
4627
4641
|
const e = this.internals.form || this.closest("form"), s = e ? new FormData(e) : null;
|
|
4628
4642
|
if (this.type === "radio" && this.coordinateRadioGroup(), typeof t == "string" ? (this.checked = t === "true", this.internals.ariaChecked = String(t === "true")) : typeof t == "boolean" && (this.checked = t, this.internals.ariaChecked = String(t)), this.checked) {
|
|
4629
|
-
const n = (typeof this.value == "string" ? this.value : "") ||
|
|
4630
|
-
this.internals.setFormValue(n), s && s.append(this.name, n), this.internals.states.add(
|
|
4643
|
+
const n = (typeof this.value == "string" ? this.value : "") || zn;
|
|
4644
|
+
this.internals.setFormValue(n), s && s.append(this.name, n), this.internals.states.add(Bs);
|
|
4631
4645
|
} else
|
|
4632
|
-
this.internals.setFormValue(null), s && s.delete(this.name), this.internals.states.delete(
|
|
4646
|
+
this.internals.setFormValue(null), s && s.delete(this.name), this.internals.states.delete(Bs);
|
|
4633
4647
|
this.dispatchChangeEvents(this.checked), this.internals.reportValidity();
|
|
4634
4648
|
}
|
|
4635
4649
|
/**
|
|
@@ -4648,7 +4662,7 @@ let D = class extends X {
|
|
|
4648
4662
|
* ```
|
|
4649
4663
|
*/
|
|
4650
4664
|
valueChanged(t, e) {
|
|
4651
|
-
(e !== this.value || e !== this._value) && (typeof t == "string" ? ((this.multiple || this.range) && t.includes(
|
|
4665
|
+
(e !== this.value || e !== this._value) && (typeof t == "string" ? ((this.multiple || this.range) && t.includes(hs) && (t = t.split(hs)), this.value = t, this._value = Array.isArray(t) ? t : [t]) : Array.isArray(t) ? (this.value = this.multiple || this.range ? t : t[0], 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.onChange(this.value), this.updateComplete.then(() => this.requestUpdate()));
|
|
4652
4666
|
}
|
|
4653
4667
|
/**
|
|
4654
4668
|
* Dispatches change and value-change events
|
|
@@ -4702,7 +4716,7 @@ let D = class extends X {
|
|
|
4702
4716
|
* @private
|
|
4703
4717
|
*/
|
|
4704
4718
|
normalizeValue(t) {
|
|
4705
|
-
return (this.range || this.multiple) && typeof t == "string" && t.includes(
|
|
4719
|
+
return (this.range || this.multiple) && typeof t == "string" && t.includes(hs) ? t.split(hs) : !this.multiple && !this.range && Array.isArray(t) ? t[0] || "" : t;
|
|
4706
4720
|
}
|
|
4707
4721
|
/**
|
|
4708
4722
|
* Validates the input element(s)
|
|
@@ -4758,7 +4772,7 @@ let D = class extends X {
|
|
|
4758
4772
|
if (this.value && this.defaultValue !== null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null), this.defaultChecked && (this.internals.ariaChecked = "true", this.checked = !0), this.required && (this.internals.ariaRequired = "true"), this.disabled && (this.internals.ariaDisabled = "true"), this.id && !this.name && (this.name = this.id), this.checked !== void 0) {
|
|
4759
4773
|
const e = this.checked === "" || this.checked === "true" || this.checked === !0;
|
|
4760
4774
|
this.internals.ariaChecked = String(e);
|
|
4761
|
-
const s = e ? (typeof this.value == "string" ? this.value : "") ||
|
|
4775
|
+
const s = e ? (typeof this.value == "string" ? this.value : "") || zn : null;
|
|
4762
4776
|
this.internals.setFormValue(s);
|
|
4763
4777
|
} else
|
|
4764
4778
|
this.setFormValue(this.value);
|
|
@@ -4897,7 +4911,7 @@ B([
|
|
|
4897
4911
|
B([
|
|
4898
4912
|
R()
|
|
4899
4913
|
], D.prototype, "touched");
|
|
4900
|
-
let
|
|
4914
|
+
let Ca = class {
|
|
4901
4915
|
constructor(t) {
|
|
4902
4916
|
this.nodes = [], this.options = [], this.host = t, this.host.addController(this), this.nodes = [], this.options = [], this.observer = new MutationObserver((e) => this.handleMutations(e));
|
|
4903
4917
|
}
|
|
@@ -4932,10 +4946,10 @@ let xa = class {
|
|
|
4932
4946
|
}), e && this.createOptions();
|
|
4933
4947
|
}
|
|
4934
4948
|
};
|
|
4935
|
-
var
|
|
4936
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
4949
|
+
var Wl = Object.defineProperty, Kl = Object.getOwnPropertyDescriptor, ni = (i, t, e, s) => {
|
|
4950
|
+
for (var n = s > 1 ? void 0 : s ? Kl(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
4937
4951
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
4938
|
-
return s && n &&
|
|
4952
|
+
return s && n && Wl(t, e, n), n;
|
|
4939
4953
|
};
|
|
4940
4954
|
let Se = class extends X {
|
|
4941
4955
|
constructor() {
|
|
@@ -4966,7 +4980,7 @@ let Se = class extends X {
|
|
|
4966
4980
|
class="pkt-btn__icon"
|
|
4967
4981
|
name="${this.isHelpTextOpen ? "chevron-thin-up" : "chevron-thin-down"}"
|
|
4968
4982
|
></pkt-icon>
|
|
4969
|
-
<span class="pkt-btn__text">${
|
|
4983
|
+
<span class="pkt-btn__text">${us(this.helptextDropdownButton)}</span>
|
|
4970
4984
|
</button>
|
|
4971
4985
|
<div
|
|
4972
4986
|
class="${N({
|
|
@@ -4975,13 +4989,13 @@ let Se = class extends X {
|
|
|
4975
4989
|
"pkt-inputwrapper__helptext-expandable-closed": !this.isHelpTextOpen
|
|
4976
4990
|
})}"
|
|
4977
4991
|
>
|
|
4978
|
-
${
|
|
4992
|
+
${us(this.helptextDropdown)}
|
|
4979
4993
|
</div>
|
|
4980
4994
|
</div>` : b;
|
|
4981
4995
|
return d`${d`<div class="${e}">
|
|
4982
4996
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
4983
4997
|
<div class="pkt-contents" ${E(this.defaultSlot)} name="helptext"></div>
|
|
4984
|
-
${this.helptext &&
|
|
4998
|
+
${this.helptext && us(this.helptext)}
|
|
4985
4999
|
</div>
|
|
4986
5000
|
${s()}
|
|
4987
5001
|
</div>`}`;
|
|
@@ -5008,10 +5022,10 @@ ni([
|
|
|
5008
5022
|
Se = ni([
|
|
5009
5023
|
V("pkt-helptext")
|
|
5010
5024
|
], Se);
|
|
5011
|
-
var
|
|
5012
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
5025
|
+
var Yl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, it = (i, t, e, s) => {
|
|
5026
|
+
for (var n = s > 1 ? void 0 : s ? Gl(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
5013
5027
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
5014
|
-
return s && n &&
|
|
5028
|
+
return s && n && Yl(t, e, n), n;
|
|
5015
5029
|
};
|
|
5016
5030
|
let Q = class extends X {
|
|
5017
5031
|
constructor() {
|
|
@@ -5073,7 +5087,7 @@ let Q = class extends X {
|
|
|
5073
5087
|
aria-live="assertive"
|
|
5074
5088
|
aria-atomic="true"
|
|
5075
5089
|
>
|
|
5076
|
-
${
|
|
5090
|
+
${us(this.errorMessage)}
|
|
5077
5091
|
</pkt-alert>` : b, p = () => d`
|
|
5078
5092
|
${a()}
|
|
5079
5093
|
${r()}
|
|
@@ -5176,10 +5190,10 @@ it([
|
|
|
5176
5190
|
Q = it([
|
|
5177
5191
|
V("pkt-input-wrapper")
|
|
5178
5192
|
], Q);
|
|
5179
|
-
var
|
|
5180
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
5193
|
+
var Zl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor, wt = (i, t, e, s) => {
|
|
5194
|
+
for (var n = s > 1 ? void 0 : s ? Xl(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
5181
5195
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
5182
|
-
return s && n &&
|
|
5196
|
+
return s && n && Zl(t, e, n), n;
|
|
5183
5197
|
};
|
|
5184
5198
|
let yt = class extends X {
|
|
5185
5199
|
constructor() {
|
|
@@ -5233,7 +5247,7 @@ let yt = class extends X {
|
|
|
5233
5247
|
}
|
|
5234
5248
|
renderList() {
|
|
5235
5249
|
return d`
|
|
5236
|
-
${
|
|
5250
|
+
${nn(
|
|
5237
5251
|
this._filteredOptions,
|
|
5238
5252
|
(t) => t.value,
|
|
5239
5253
|
(t, e) => d`
|
|
@@ -5527,17 +5541,17 @@ wt([
|
|
|
5527
5541
|
yt = wt([
|
|
5528
5542
|
V("pkt-listbox")
|
|
5529
5543
|
], yt);
|
|
5530
|
-
const
|
|
5531
|
-
props:
|
|
5544
|
+
const Jl = { displayValueAs: { default: "label" } }, Ql = {
|
|
5545
|
+
props: Jl
|
|
5532
5546
|
};
|
|
5533
|
-
var
|
|
5534
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
5547
|
+
var th = Object.defineProperty, eh = Object.getOwnPropertyDescriptor, ht = (i, t, e, s) => {
|
|
5548
|
+
for (var n = s > 1 ? void 0 : s ? eh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
5535
5549
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
5536
|
-
return s && n &&
|
|
5550
|
+
return s && n && th(t, e, n), n;
|
|
5537
5551
|
};
|
|
5538
5552
|
let at = class extends D {
|
|
5539
5553
|
constructor() {
|
|
5540
|
-
super(), this.helptextSlot = O(), this.value = "", this.options = [], this.defaultOptions = [], this.allowUserInput = !1, this.typeahead = !1, this.includeSearch = !1, this.searchPlaceholder = "", this.multiple = !1, this.maxlength = null, this.displayValueAs =
|
|
5554
|
+
super(), this.helptextSlot = O(), this.value = "", this.options = [], this.defaultOptions = [], this.allowUserInput = !1, this.typeahead = !1, this.includeSearch = !1, this.searchPlaceholder = "", this.multiple = !1, this.maxlength = null, this.displayValueAs = Ql.props.displayValueAs.default, this.tagPlacement = null, this._options = [], this._value = [], this._isOptionsOpen = !1, this._userInfoMessage = "", this._addValueText = null, this._maxIsReached = !1, this._search = "", this._inputFocus = !1, this._editingSingleValue = !1, this.inputRef = O(), this.arrowRef = O(), this.listboxRef = O(), this.focusRef = O(), this.optionTagRef = O(), this.optionsController = new Ca(this), this.slotController = new lt(this, this.helptextSlot), this.slotController.skipOptions = !0;
|
|
5541
5555
|
}
|
|
5542
5556
|
// Lifecycle methods
|
|
5543
5557
|
connectedCallback() {
|
|
@@ -5724,7 +5738,7 @@ let at = class extends D {
|
|
|
5724
5738
|
`;
|
|
5725
5739
|
}
|
|
5726
5740
|
renderSingleOrMultipleValues() {
|
|
5727
|
-
const t = !this.multiple, e = this._editingSingleValue ? null : this.renderValueTag(this.findValueInOptions(this._value[0])), s =
|
|
5741
|
+
const t = !this.multiple, e = this._editingSingleValue ? null : this.renderValueTag(this.findValueInOptions(this._value[0])), s = nn(
|
|
5728
5742
|
this._value,
|
|
5729
5743
|
(n) => n,
|
|
5730
5744
|
(n) => {
|
|
@@ -6045,7 +6059,7 @@ ht([
|
|
|
6045
6059
|
at = ht([
|
|
6046
6060
|
V("pkt-combobox")
|
|
6047
6061
|
], at);
|
|
6048
|
-
const
|
|
6062
|
+
const ih = {
|
|
6049
6063
|
i18n: {
|
|
6050
6064
|
nb: {
|
|
6051
6065
|
contentPresentation: {
|
|
@@ -6098,14 +6112,14 @@ const Jl = {
|
|
|
6098
6112
|
}
|
|
6099
6113
|
}
|
|
6100
6114
|
};
|
|
6101
|
-
var
|
|
6102
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
6115
|
+
var sh = Object.defineProperty, nh = Object.getOwnPropertyDescriptor, ve = (i, t, e, s) => {
|
|
6116
|
+
for (var n = s > 1 ? void 0 : s ? nh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
6103
6117
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
6104
|
-
return s && n &&
|
|
6118
|
+
return s && n && sh(t, e, n), n;
|
|
6105
6119
|
};
|
|
6106
|
-
let
|
|
6107
|
-
function
|
|
6108
|
-
return
|
|
6120
|
+
let Fs = null;
|
|
6121
|
+
function ah() {
|
|
6122
|
+
return Fs || (Fs = new Promise((i, t) => {
|
|
6109
6123
|
if (document.querySelector("#oslo-consent-script")) {
|
|
6110
6124
|
i();
|
|
6111
6125
|
return;
|
|
@@ -6114,14 +6128,14 @@ function eh() {
|
|
|
6114
6128
|
e.src = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js", e.id = "oslo-consent-script", e.onload = () => i(), e.onerror = t, document.head.appendChild(e);
|
|
6115
6129
|
const s = document.createElement("link");
|
|
6116
6130
|
s.href = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css", s.type = "text/css", s.rel = "stylesheet", s.id = "oslo-consent-styles", document.head.appendChild(s);
|
|
6117
|
-
}),
|
|
6131
|
+
}), Fs);
|
|
6118
6132
|
}
|
|
6119
6133
|
let Qt = class extends X {
|
|
6120
6134
|
constructor() {
|
|
6121
6135
|
super(), this.devMode = !1, this.hotjarId = null, this.googleAnalyticsId = null, this.cookieDomain = null, this.cookieSecure = null, this.cookieExpiryDays = null, this.triggerType = "button", this.triggerText = null, this.i18nLanguage = "nb";
|
|
6122
6136
|
}
|
|
6123
6137
|
connectedCallback() {
|
|
6124
|
-
super.connectedCallback(), this.triggerText = this.triggerText ||
|
|
6138
|
+
super.connectedCallback(), this.triggerText = this.triggerText || ih.i18n[this.i18nLanguage].contentPresentation.buttons.settings;
|
|
6125
6139
|
}
|
|
6126
6140
|
disconnectedCallback() {
|
|
6127
6141
|
var t;
|
|
@@ -6147,7 +6161,7 @@ let Qt = class extends X {
|
|
|
6147
6161
|
);
|
|
6148
6162
|
}
|
|
6149
6163
|
async firstUpdated(t) {
|
|
6150
|
-
window.cookieBanner_googleAnalyticsId = this.googleAnalyticsId, window.cookieBanner_hotjarId = this.hotjarId, this.cookieDomain && (window.cookieBanner_cookieDomain = this.cookieDomain), this.cookieSecure && (window.cookieBanner_cookieSecure = this.cookieSecure), this.cookieExpiryDays && (window.cookieBanner_cookieExpiryDays = this.cookieExpiryDays), this.devMode && (window.cookieBanner_devMode = this.devMode), await
|
|
6164
|
+
window.cookieBanner_googleAnalyticsId = this.googleAnalyticsId, window.cookieBanner_hotjarId = this.hotjarId, this.cookieDomain && (window.cookieBanner_cookieDomain = this.cookieDomain), this.cookieSecure && (window.cookieBanner_cookieSecure = this.cookieSecure), this.cookieExpiryDays && (window.cookieBanner_cookieExpiryDays = this.cookieExpiryDays), this.devMode && (window.cookieBanner_devMode = this.devMode), await ah(), this.triggerInit();
|
|
6151
6165
|
}
|
|
6152
6166
|
triggerInit() {
|
|
6153
6167
|
window.document.dispatchEvent(
|
|
@@ -6212,10 +6226,10 @@ ve([
|
|
|
6212
6226
|
Qt = ve([
|
|
6213
6227
|
V("pkt-consent")
|
|
6214
6228
|
], Qt);
|
|
6215
|
-
var
|
|
6216
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
6229
|
+
var rh = Object.defineProperty, oh = Object.getOwnPropertyDescriptor, xt = (i, t, e, s) => {
|
|
6230
|
+
for (var n = s > 1 ? void 0 : s ? oh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
6217
6231
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
6218
|
-
return s && n &&
|
|
6232
|
+
return s && n && rh(t, e, n), n;
|
|
6219
6233
|
};
|
|
6220
6234
|
let $t = class extends D {
|
|
6221
6235
|
constructor() {
|
|
@@ -6350,10 +6364,10 @@ xt([
|
|
|
6350
6364
|
$t = xt([
|
|
6351
6365
|
V("pkt-checkbox")
|
|
6352
6366
|
], $t);
|
|
6353
|
-
var
|
|
6354
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
6367
|
+
var lh = Object.defineProperty, hh = Object.getOwnPropertyDescriptor, as = (i, t, e, s) => {
|
|
6368
|
+
for (var n = s > 1 ? void 0 : s ? hh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
6355
6369
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
6356
|
-
return s && n &&
|
|
6370
|
+
return s && n && lh(t, e, n), n;
|
|
6357
6371
|
};
|
|
6358
6372
|
let _i = class extends X {
|
|
6359
6373
|
constructor() {
|
|
@@ -6365,8 +6379,8 @@ let _i = class extends X {
|
|
|
6365
6379
|
[this.className]: !0
|
|
6366
6380
|
}, d`
|
|
6367
6381
|
<div class=${N(this.classes)} aria-live="polite">
|
|
6368
|
-
${Array.isArray(this.dates) && this.dates[0] ?
|
|
6369
|
-
|
|
6382
|
+
${Array.isArray(this.dates) && this.dates[0] ? nn(
|
|
6383
|
+
wa((this.dates ?? []).filter(Boolean)),
|
|
6370
6384
|
(t) => t,
|
|
6371
6385
|
(t) => {
|
|
6372
6386
|
var e;
|
|
@@ -6376,9 +6390,9 @@ let _i = class extends X {
|
|
|
6376
6390
|
@close=${() => {
|
|
6377
6391
|
this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: t }));
|
|
6378
6392
|
}}
|
|
6379
|
-
.ariaLabel=${`${(e = this.strings) == null ? void 0 : e.calendar.deleteDate} ${
|
|
6393
|
+
.ariaLabel=${`${(e = this.strings) == null ? void 0 : e.calendar.deleteDate} ${Fn(t, this.dateformat)}`}
|
|
6380
6394
|
>
|
|
6381
|
-
<time datetime=${t}>${
|
|
6395
|
+
<time datetime=${t}>${Fn(t, this.dateformat)}</time>
|
|
6382
6396
|
</pkt-tag>`;
|
|
6383
6397
|
}
|
|
6384
6398
|
) : b}
|
|
@@ -6386,27 +6400,27 @@ let _i = class extends X {
|
|
|
6386
6400
|
`;
|
|
6387
6401
|
}
|
|
6388
6402
|
};
|
|
6389
|
-
|
|
6403
|
+
as([
|
|
6390
6404
|
o({ type: Array })
|
|
6391
6405
|
], _i.prototype, "dates", 2);
|
|
6392
|
-
|
|
6406
|
+
as([
|
|
6393
6407
|
o({ type: String })
|
|
6394
6408
|
], _i.prototype, "dateformat", 2);
|
|
6395
|
-
|
|
6409
|
+
as([
|
|
6396
6410
|
o({ type: String, attribute: "class" })
|
|
6397
6411
|
], _i.prototype, "className", 2);
|
|
6398
|
-
|
|
6412
|
+
as([
|
|
6399
6413
|
o({ type: String, attribute: "id-base" })
|
|
6400
6414
|
], _i.prototype, "idBase", 2);
|
|
6401
|
-
_i =
|
|
6415
|
+
_i = as([
|
|
6402
6416
|
V("pkt-date-tags")
|
|
6403
6417
|
], _i);
|
|
6404
|
-
const
|
|
6405
|
-
props:
|
|
6418
|
+
const ch = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }, withcontrols: { default: !1 }, multiple: { default: !1 }, range: { default: !1 } }, Vi = {
|
|
6419
|
+
props: ch
|
|
6406
6420
|
}, Je = () => {
|
|
6407
6421
|
const i = navigator.userAgent;
|
|
6408
6422
|
return !!(/iP(hone|od|ad)/.test(i) || /Macintosh/.test(i) && "ontouchend" in document);
|
|
6409
|
-
},
|
|
6423
|
+
}, qn = {
|
|
6410
6424
|
/**
|
|
6411
6425
|
* Validates that a range has valid order (start <= end)
|
|
6412
6426
|
*
|
|
@@ -6419,7 +6433,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6419
6433
|
* validateRangeOrder(['2024-01-01']) // Returns true (incomplete range)
|
|
6420
6434
|
*/
|
|
6421
6435
|
validateRangeOrder(i) {
|
|
6422
|
-
return !i || i.length !== 2 ? !0 :
|
|
6436
|
+
return !i || i.length !== 2 ? !0 : dl(i[0], i[1]);
|
|
6423
6437
|
},
|
|
6424
6438
|
/**
|
|
6425
6439
|
* Sorts date strings chronologically
|
|
@@ -6432,7 +6446,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6432
6446
|
* // Returns ['2024-01-10', '2024-02-20', '2024-03-15']
|
|
6433
6447
|
*/
|
|
6434
6448
|
sortDates(i) {
|
|
6435
|
-
return
|
|
6449
|
+
return wa(i);
|
|
6436
6450
|
},
|
|
6437
6451
|
/**
|
|
6438
6452
|
* Filters dates to only include selectable ones based on constraints
|
|
@@ -6460,9 +6474,9 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6460
6474
|
* // Returns ['2024-01-06'] (after min, not excluded, not a weekend)
|
|
6461
6475
|
*/
|
|
6462
6476
|
filterSelectableDates(i, t, e, s, n) {
|
|
6463
|
-
return
|
|
6477
|
+
return ul(i, t, e, s, n);
|
|
6464
6478
|
}
|
|
6465
|
-
},
|
|
6479
|
+
}, uh = {
|
|
6466
6480
|
/**
|
|
6467
6481
|
* Determines the appropriate input type based on device
|
|
6468
6482
|
*
|
|
@@ -6479,7 +6493,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6479
6493
|
getInputType() {
|
|
6480
6494
|
return Je() ? "text" : "date";
|
|
6481
6495
|
}
|
|
6482
|
-
},
|
|
6496
|
+
}, ts = {
|
|
6483
6497
|
/**
|
|
6484
6498
|
* Submits the form that contains the given element
|
|
6485
6499
|
*
|
|
@@ -6549,7 +6563,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6549
6563
|
i
|
|
6550
6564
|
));
|
|
6551
6565
|
}
|
|
6552
|
-
},
|
|
6566
|
+
}, bs = {
|
|
6553
6567
|
/**
|
|
6554
6568
|
* Adds a date to selected dates if it's valid
|
|
6555
6569
|
*
|
|
@@ -6605,7 +6619,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6605
6619
|
let l = e ? "calc(100% - 30px)" : "100%";
|
|
6606
6620
|
n && n.top + r > window.innerHeight && n.top - r > 0 && (l = `calc(100% - ${a}px - ${r}px)`), i.value.style.top = l;
|
|
6607
6621
|
}
|
|
6608
|
-
},
|
|
6622
|
+
}, an = {
|
|
6609
6623
|
/**
|
|
6610
6624
|
* Generates input classes for datepicker
|
|
6611
6625
|
*
|
|
@@ -6666,7 +6680,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6666
6680
|
"pkt-hide": !i
|
|
6667
6681
|
};
|
|
6668
6682
|
}
|
|
6669
|
-
},
|
|
6683
|
+
}, Vs = {
|
|
6670
6684
|
/**
|
|
6671
6685
|
* Processes date selection from calendar events
|
|
6672
6686
|
*
|
|
@@ -6748,7 +6762,7 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6748
6762
|
l && ((a = e == null ? void 0 : e.value) == null || a.handleDateSelect(l));
|
|
6749
6763
|
} else t[0] && s();
|
|
6750
6764
|
}
|
|
6751
|
-
},
|
|
6765
|
+
}, ys = {
|
|
6752
6766
|
/**
|
|
6753
6767
|
* Handles common keyboard interactions for datepicker inputs
|
|
6754
6768
|
*
|
|
@@ -6811,10 +6825,10 @@ const rh = { dateformat: { default: "dd.MM.yyyy" }, weeknumbers: { default: !1 }
|
|
|
6811
6825
|
(e === "Enter" || e === " " || e === "Space") && (i.preventDefault(), t(i));
|
|
6812
6826
|
}
|
|
6813
6827
|
};
|
|
6814
|
-
var
|
|
6815
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
6828
|
+
var dh = Object.defineProperty, ph = Object.getOwnPropertyDescriptor, qt = (i, t, e, s) => {
|
|
6829
|
+
for (var n = s > 1 ? void 0 : s ? ph(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
6816
6830
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
6817
|
-
return s && n &&
|
|
6831
|
+
return s && n && dh(t, e, n), n;
|
|
6818
6832
|
};
|
|
6819
6833
|
let Rt = class extends X {
|
|
6820
6834
|
constructor() {
|
|
@@ -6851,8 +6865,8 @@ let Rt = class extends X {
|
|
|
6851
6865
|
t && typeof t.focusOnCurrentDate == "function" && t.focusOnCurrentDate();
|
|
6852
6866
|
}
|
|
6853
6867
|
addToSelected(t, e, s) {
|
|
6854
|
-
if (typeof
|
|
6855
|
-
return
|
|
6868
|
+
if (typeof bs.addToSelected == "function")
|
|
6869
|
+
return bs.addToSelected(t, this.calendarRef, e, s);
|
|
6856
6870
|
}
|
|
6857
6871
|
handleDateSelect(t) {
|
|
6858
6872
|
const e = this.calendarRef.value;
|
|
@@ -6933,10 +6947,10 @@ qt([
|
|
|
6933
6947
|
Rt = qt([
|
|
6934
6948
|
V("pkt-datepicker-popup")
|
|
6935
6949
|
], Rt);
|
|
6936
|
-
var
|
|
6950
|
+
var mh = Object.defineProperty, Ce = (i, t, e, s) => {
|
|
6937
6951
|
for (var n = void 0, a = i.length - 1, r; a >= 0; a--)
|
|
6938
6952
|
(r = i[a]) && (n = r(t, e, n) || n);
|
|
6939
|
-
return n &&
|
|
6953
|
+
return n && mh(t, e, n), n;
|
|
6940
6954
|
};
|
|
6941
6955
|
let te = class extends X {
|
|
6942
6956
|
constructor() {
|
|
@@ -7002,7 +7016,7 @@ let te = class extends X {
|
|
|
7002
7016
|
var t;
|
|
7003
7017
|
return d`
|
|
7004
7018
|
<button
|
|
7005
|
-
class="${N(
|
|
7019
|
+
class="${N(an.getButtonClasses())}"
|
|
7006
7020
|
type="button"
|
|
7007
7021
|
@click=${(e) => this.dispatchToggleCalendar(e)}
|
|
7008
7022
|
@keydown=${(e) => {
|
|
@@ -7049,20 +7063,20 @@ Ce([
|
|
|
7049
7063
|
Ce([
|
|
7050
7064
|
o({ type: Object })
|
|
7051
7065
|
], te.prototype, "internals");
|
|
7052
|
-
const
|
|
7066
|
+
const Ta = {
|
|
7053
7067
|
calendar: { buttonAltText: "Åpne kalender" }
|
|
7054
|
-
},
|
|
7068
|
+
}, fh = {
|
|
7055
7069
|
calendar: { buttonAltText: "Åpne kalender" },
|
|
7056
7070
|
generic: { from: "Fra", to: "Til" }
|
|
7057
7071
|
};
|
|
7058
|
-
var
|
|
7059
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7072
|
+
var gh = Object.defineProperty, vh = Object.getOwnPropertyDescriptor, rn = (i, t, e, s) => {
|
|
7073
|
+
for (var n = s > 1 ? void 0 : s ? vh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7060
7074
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7061
|
-
return s && n &&
|
|
7075
|
+
return s && n && gh(t, e, n), n;
|
|
7062
7076
|
};
|
|
7063
|
-
let
|
|
7077
|
+
let $s = class extends te {
|
|
7064
7078
|
constructor() {
|
|
7065
|
-
super(...arguments), this.value = "", this.strings =
|
|
7079
|
+
super(...arguments), this.value = "", this.strings = Ta;
|
|
7066
7080
|
}
|
|
7067
7081
|
dispatchManageValidity(t) {
|
|
7068
7082
|
this.dispatchEvent(
|
|
@@ -7093,10 +7107,10 @@ let ys = class extends te {
|
|
|
7093
7107
|
t.preventDefault(), this.dispatchToggleCalendar(t);
|
|
7094
7108
|
}}
|
|
7095
7109
|
?disabled=${this.disabled}
|
|
7096
|
-
@keydown=${(t) =>
|
|
7110
|
+
@keydown=${(t) => ys.handleInputKeydown(
|
|
7097
7111
|
t,
|
|
7098
7112
|
(e) => this.dispatchToggleCalendar(e),
|
|
7099
|
-
() =>
|
|
7113
|
+
() => ts.submitFormOrFallback(this.internals, () => {
|
|
7100
7114
|
var e;
|
|
7101
7115
|
return (e = this.inputRef.value) == null ? void 0 : e.blur();
|
|
7102
7116
|
}),
|
|
@@ -7131,30 +7145,30 @@ let ys = class extends te {
|
|
|
7131
7145
|
`;
|
|
7132
7146
|
}
|
|
7133
7147
|
};
|
|
7134
|
-
|
|
7148
|
+
rn([
|
|
7135
7149
|
o({ type: String })
|
|
7136
|
-
],
|
|
7137
|
-
|
|
7150
|
+
], $s.prototype, "value", 2);
|
|
7151
|
+
rn([
|
|
7138
7152
|
o({ type: Object })
|
|
7139
|
-
],
|
|
7140
|
-
|
|
7153
|
+
], $s.prototype, "strings", 2);
|
|
7154
|
+
$s = rn([
|
|
7141
7155
|
V("pkt-datepicker-single")
|
|
7142
|
-
],
|
|
7143
|
-
var
|
|
7144
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7156
|
+
], $s);
|
|
7157
|
+
var kh = Object.defineProperty, bh = Object.getOwnPropertyDescriptor, Ts = (i, t, e, s) => {
|
|
7158
|
+
for (var n = s > 1 ? void 0 : s ? bh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7145
7159
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7146
|
-
return s && n &&
|
|
7160
|
+
return s && n && kh(t, e, n), n;
|
|
7147
7161
|
};
|
|
7148
|
-
let
|
|
7162
|
+
let es = class extends te {
|
|
7149
7163
|
constructor() {
|
|
7150
|
-
super(...arguments), this.value = [], this.showRangeLabels = !1, this.strings =
|
|
7164
|
+
super(...arguments), this.value = [], this.showRangeLabels = !1, this.strings = fh, this.inputRefTo = O();
|
|
7151
7165
|
}
|
|
7152
7166
|
get inputElementTo() {
|
|
7153
7167
|
return this.inputRefTo.value;
|
|
7154
7168
|
}
|
|
7155
7169
|
render() {
|
|
7156
7170
|
var t, e;
|
|
7157
|
-
const s =
|
|
7171
|
+
const s = an.getRangeLabelClasses(this.showRangeLabels);
|
|
7158
7172
|
return d`
|
|
7159
7173
|
<div class="pkt-input__container">
|
|
7160
7174
|
${this.showRangeLabels ? d` <div class="pkt-input-prefix">${(t = this.strings.generic) == null ? void 0 : t.from}</div> ` : b}
|
|
@@ -7174,10 +7188,10 @@ let Qi = class extends te {
|
|
|
7174
7188
|
@touchend=${(n) => {
|
|
7175
7189
|
n.preventDefault(), this.dispatchToggleCalendar(n);
|
|
7176
7190
|
}}
|
|
7177
|
-
@keydown=${(n) =>
|
|
7191
|
+
@keydown=${(n) => ys.handleInputKeydown(
|
|
7178
7192
|
n,
|
|
7179
7193
|
(a) => this.dispatchToggleCalendar(a),
|
|
7180
|
-
() =>
|
|
7194
|
+
() => ts.submitFormOrFallback(
|
|
7181
7195
|
this.internals,
|
|
7182
7196
|
() => {
|
|
7183
7197
|
var a;
|
|
@@ -7238,10 +7252,10 @@ let Qi = class extends te {
|
|
|
7238
7252
|
@touchend=${(n) => {
|
|
7239
7253
|
n.preventDefault(), this.dispatchToggleCalendar(n);
|
|
7240
7254
|
}}
|
|
7241
|
-
@keydown=${(n) =>
|
|
7255
|
+
@keydown=${(n) => ys.handleInputKeydown(
|
|
7242
7256
|
n,
|
|
7243
7257
|
(a) => this.dispatchToggleCalendar(a),
|
|
7244
|
-
() =>
|
|
7258
|
+
() => ts.submitFormOrFallback(this.internals, () => {
|
|
7245
7259
|
var a;
|
|
7246
7260
|
return (a = this.inputRefTo.value) == null ? void 0 : a.blur();
|
|
7247
7261
|
}),
|
|
@@ -7280,26 +7294,26 @@ let Qi = class extends te {
|
|
|
7280
7294
|
`;
|
|
7281
7295
|
}
|
|
7282
7296
|
};
|
|
7283
|
-
|
|
7297
|
+
Ts([
|
|
7284
7298
|
o({ type: Array })
|
|
7285
|
-
],
|
|
7286
|
-
|
|
7299
|
+
], es.prototype, "value", 2);
|
|
7300
|
+
Ts([
|
|
7287
7301
|
o({ type: Boolean })
|
|
7288
|
-
],
|
|
7289
|
-
|
|
7302
|
+
], es.prototype, "showRangeLabels", 2);
|
|
7303
|
+
Ts([
|
|
7290
7304
|
o({ type: Object })
|
|
7291
|
-
],
|
|
7292
|
-
|
|
7305
|
+
], es.prototype, "strings", 2);
|
|
7306
|
+
es = Ts([
|
|
7293
7307
|
V("pkt-datepicker-range")
|
|
7294
|
-
],
|
|
7295
|
-
var
|
|
7296
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7308
|
+
], es);
|
|
7309
|
+
var yh = Object.defineProperty, $h = Object.getOwnPropertyDescriptor, Ns = (i, t, e, s) => {
|
|
7310
|
+
for (var n = s > 1 ? void 0 : s ? $h(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7297
7311
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7298
|
-
return s && n &&
|
|
7312
|
+
return s && n && yh(t, e, n), n;
|
|
7299
7313
|
};
|
|
7300
|
-
let
|
|
7314
|
+
let is = class extends te {
|
|
7301
7315
|
constructor() {
|
|
7302
|
-
super(...arguments), this.value = [], this.strings =
|
|
7316
|
+
super(...arguments), this.value = [], this.strings = Ta;
|
|
7303
7317
|
}
|
|
7304
7318
|
get isInputDisabled() {
|
|
7305
7319
|
return this.disabled || this.maxlength !== void 0 && this.maxlength !== null && this.value.length >= this.maxlength;
|
|
@@ -7340,10 +7354,10 @@ let ts = class extends te {
|
|
|
7340
7354
|
@focus=${() => {
|
|
7341
7355
|
this.dispatchFocus(), Je() && this.dispatchToggleCalendar(new Event("focus"));
|
|
7342
7356
|
}}
|
|
7343
|
-
@keydown=${(t) =>
|
|
7357
|
+
@keydown=${(t) => ys.handleInputKeydown(
|
|
7344
7358
|
t,
|
|
7345
7359
|
(e) => this.dispatchToggleCalendar(e),
|
|
7346
|
-
() =>
|
|
7360
|
+
() => ts.submitFormOrFallback(this.internals, () => {
|
|
7347
7361
|
var e;
|
|
7348
7362
|
return (e = this.inputRef.value) == null ? void 0 : e.blur();
|
|
7349
7363
|
}),
|
|
@@ -7361,31 +7375,31 @@ let ts = class extends te {
|
|
|
7361
7375
|
`;
|
|
7362
7376
|
}
|
|
7363
7377
|
};
|
|
7364
|
-
|
|
7378
|
+
Ns([
|
|
7365
7379
|
o({ type: Array })
|
|
7366
|
-
],
|
|
7367
|
-
|
|
7380
|
+
], is.prototype, "value", 2);
|
|
7381
|
+
Ns([
|
|
7368
7382
|
o({ type: Number })
|
|
7369
|
-
],
|
|
7370
|
-
|
|
7383
|
+
], is.prototype, "maxlength", 2);
|
|
7384
|
+
Ns([
|
|
7371
7385
|
o({ type: Object })
|
|
7372
|
-
],
|
|
7373
|
-
|
|
7386
|
+
], is.prototype, "strings", 2);
|
|
7387
|
+
is = Ns([
|
|
7374
7388
|
V("pkt-datepicker-multiple")
|
|
7375
|
-
],
|
|
7376
|
-
var
|
|
7377
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7389
|
+
], is);
|
|
7390
|
+
var _h = Object.defineProperty, wh = Object.getOwnPropertyDescriptor, mt = (i, t, e, s) => {
|
|
7391
|
+
for (var n = s > 1 ? void 0 : s ? wh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7378
7392
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7379
|
-
return s && n &&
|
|
7393
|
+
return s && n && _h(t, e, n), n;
|
|
7380
7394
|
};
|
|
7381
7395
|
let rt = class extends D {
|
|
7382
7396
|
/**
|
|
7383
7397
|
* Housekeeping / lifecycle methods
|
|
7384
7398
|
*/
|
|
7385
7399
|
constructor() {
|
|
7386
|
-
super(), this._valueProperty = "", this.datepickerPopupRef = O(), this._value = [], this.label = "Datovelger", this.dateformat =
|
|
7400
|
+
super(), this._valueProperty = "", this.datepickerPopupRef = O(), this._value = [], this.label = "Datovelger", this.dateformat = Vi.props.dateformat.default, this.multiple = Vi.props.multiple.default, this.maxlength = null, this.range = Vi.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = Vi.props.weeknumbers.default, this.withcontrols = Vi.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = O(), this.popupRef = O(), this.helptextSlot = O(), this.singleInputRef = O(), this.rangeInputRef = O(), this.multipleInputRef = O(), this.addToSelected = (i) => {
|
|
7387
7401
|
const t = this.datepickerPopupRef.value;
|
|
7388
|
-
return t && typeof t.addToSelected == "function" ? t.addToSelected(i, this.min, this.max) :
|
|
7402
|
+
return t && typeof t.addToSelected == "function" ? t.addToSelected(i, this.min, this.max) : bs.addToSelected(i, this.calRef, this.min, this.max);
|
|
7389
7403
|
}, this.slotController = new lt(this, this.helptextSlot);
|
|
7390
7404
|
}
|
|
7391
7405
|
get value() {
|
|
@@ -7399,7 +7413,7 @@ let rt = class extends D {
|
|
|
7399
7413
|
* Computed properties
|
|
7400
7414
|
*/
|
|
7401
7415
|
get inputType() {
|
|
7402
|
-
return
|
|
7416
|
+
return uh.getInputType();
|
|
7403
7417
|
}
|
|
7404
7418
|
connectedCallback() {
|
|
7405
7419
|
super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone);
|
|
@@ -7412,30 +7426,30 @@ let rt = class extends D {
|
|
|
7412
7426
|
}
|
|
7413
7427
|
valueChanged(i, t) {
|
|
7414
7428
|
if (i === t) return;
|
|
7415
|
-
const e =
|
|
7429
|
+
const e = qi(i), s = this.multiple && e.length > 1 ? qn.filterSelectableDates(
|
|
7416
7430
|
e,
|
|
7417
7431
|
this.min,
|
|
7418
7432
|
this.max,
|
|
7419
7433
|
this.excludedates,
|
|
7420
7434
|
this.excludeweekdays
|
|
7421
7435
|
) : e;
|
|
7422
|
-
if (this.range && !
|
|
7436
|
+
if (this.range && !qn.validateRangeOrder(s)) {
|
|
7423
7437
|
this._value = [], this._valueProperty = "", super.valueChanged("", t);
|
|
7424
7438
|
return;
|
|
7425
7439
|
}
|
|
7426
7440
|
this._value = s;
|
|
7427
|
-
const n =
|
|
7441
|
+
const n = pl(s);
|
|
7428
7442
|
this._valueProperty !== n && (this._valueProperty = n), super.valueChanged(n, t);
|
|
7429
7443
|
}
|
|
7430
7444
|
attributeChangedCallback(i, t, e) {
|
|
7431
|
-
i === "value" && this.value !== t && this.valueChanged(e, t), i === "excludedates" && typeof this.excludedates == "string" && (this.excludedates =
|
|
7445
|
+
i === "value" && this.value !== t && this.valueChanged(e, t), i === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = qi(e || "")), i === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = qi(e || "")), super.attributeChangedCallback(i, t, e);
|
|
7432
7446
|
}
|
|
7433
7447
|
updated(i) {
|
|
7434
7448
|
if (i.has("value")) {
|
|
7435
7449
|
const t = Array.isArray(this.value) ? this.value.join(",") : this.value, e = i.get("value"), s = Array.isArray(e) ? e.join(",") : e;
|
|
7436
7450
|
this.valueChanged(t, s);
|
|
7437
7451
|
}
|
|
7438
|
-
i.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value =
|
|
7452
|
+
i.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = qi(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), super.updated(i);
|
|
7439
7453
|
}
|
|
7440
7454
|
/**
|
|
7441
7455
|
* Element references
|
|
@@ -7533,7 +7547,7 @@ let rt = class extends D {
|
|
|
7533
7547
|
a.length > 0 && (a[0] !== this._value[0] || a[1] !== this._value[1]) && (this._value = a, this.value = a.join(","));
|
|
7534
7548
|
}
|
|
7535
7549
|
}
|
|
7536
|
-
|
|
7550
|
+
Vs.processRangeBlur(
|
|
7537
7551
|
i.detail.event,
|
|
7538
7552
|
i.detail.values,
|
|
7539
7553
|
this.calRef,
|
|
@@ -7543,7 +7557,7 @@ let rt = class extends D {
|
|
|
7543
7557
|
}}
|
|
7544
7558
|
@manage-validity=${(i) => this.manageValidity(i.detail)}
|
|
7545
7559
|
@validate-date-input=${(i) => {
|
|
7546
|
-
|
|
7560
|
+
ts.validateDateInput(i.detail, this.internals, this.min, this.max, this.strings);
|
|
7547
7561
|
}}
|
|
7548
7562
|
@handle-date-select=${(i) => {
|
|
7549
7563
|
var t, e;
|
|
@@ -7607,7 +7621,7 @@ let rt = class extends D {
|
|
|
7607
7621
|
.excludeweekdays=${this.excludeweekdays}
|
|
7608
7622
|
.currentmonth=${this.currentmonth ? Re(this.currentmonth) : null}
|
|
7609
7623
|
@date-selected=${(i) => {
|
|
7610
|
-
this.value =
|
|
7624
|
+
this.value = Vs.processDateSelection(i.detail, this.multiple, this.range), this._value = i.detail, Vs.updateInputValues(
|
|
7611
7625
|
this.inputRef,
|
|
7612
7626
|
this.inputRefTo,
|
|
7613
7627
|
this._value,
|
|
@@ -7624,7 +7638,7 @@ let rt = class extends D {
|
|
|
7624
7638
|
`;
|
|
7625
7639
|
}
|
|
7626
7640
|
render() {
|
|
7627
|
-
return this.inputClasses =
|
|
7641
|
+
return this.inputClasses = an.getInputClasses(
|
|
7628
7642
|
this.fullwidth,
|
|
7629
7643
|
this.showRangeLabels,
|
|
7630
7644
|
this.multiple,
|
|
@@ -7682,7 +7696,7 @@ let rt = class extends D {
|
|
|
7682
7696
|
*/
|
|
7683
7697
|
handleCalendarPosition() {
|
|
7684
7698
|
const i = this.multiple && !!this.maxlength;
|
|
7685
|
-
|
|
7699
|
+
bs.handleCalendarPosition(this.popupRef, this.inputRef, i);
|
|
7686
7700
|
}
|
|
7687
7701
|
async showCalendar() {
|
|
7688
7702
|
var i;
|
|
@@ -7691,7 +7705,7 @@ let rt = class extends D {
|
|
|
7691
7705
|
t.show(), Je() && t.focusOnCurrentDate();
|
|
7692
7706
|
return;
|
|
7693
7707
|
}
|
|
7694
|
-
await
|
|
7708
|
+
await jl(20), this.handleCalendarPosition(), Je() && ((i = this.calRef.value) == null || i.focusOnCurrentDate());
|
|
7695
7709
|
}
|
|
7696
7710
|
hideCalendar() {
|
|
7697
7711
|
const i = this.datepickerPopupRef.value;
|
|
@@ -7774,17 +7788,17 @@ mt([
|
|
|
7774
7788
|
rt = mt([
|
|
7775
7789
|
V("pkt-datepicker")
|
|
7776
7790
|
], rt);
|
|
7777
|
-
const
|
|
7778
|
-
props:
|
|
7791
|
+
const xh = { href: { default: "#" }, target: { default: "_self" } }, Wn = {
|
|
7792
|
+
props: xh
|
|
7779
7793
|
};
|
|
7780
|
-
var
|
|
7781
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7794
|
+
var Sh = Object.defineProperty, Ch = Object.getOwnPropertyDescriptor, Ti = (i, t, e, s) => {
|
|
7795
|
+
for (var n = s > 1 ? void 0 : s ? Ch(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7782
7796
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7783
|
-
return s && n &&
|
|
7797
|
+
return s && n && Sh(t, e, n), n;
|
|
7784
7798
|
};
|
|
7785
7799
|
let Qe = class extends X {
|
|
7786
7800
|
constructor() {
|
|
7787
|
-
super(), this.defaultSlot = O(), this.href =
|
|
7801
|
+
super(), this.defaultSlot = O(), this.href = Wn.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = !1, this.target = Wn.props.target.default, this.slotController = new lt(this, this.defaultSlot);
|
|
7788
7802
|
}
|
|
7789
7803
|
render() {
|
|
7790
7804
|
const t = {
|
|
@@ -7820,10 +7834,10 @@ Ti([
|
|
|
7820
7834
|
Qe = Ti([
|
|
7821
7835
|
V("pkt-link")
|
|
7822
7836
|
], Qe);
|
|
7823
|
-
var
|
|
7824
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7837
|
+
var Th = Object.defineProperty, Nh = Object.getOwnPropertyDescriptor, ke = (i, t, e, s) => {
|
|
7838
|
+
for (var n = s > 1 ? void 0 : s ? Nh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7825
7839
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7826
|
-
return s && n &&
|
|
7840
|
+
return s && n && Th(t, e, n), n;
|
|
7827
7841
|
};
|
|
7828
7842
|
let re = class extends D {
|
|
7829
7843
|
constructor() {
|
|
@@ -7958,7 +7972,7 @@ ke([
|
|
|
7958
7972
|
re = ke([
|
|
7959
7973
|
V("pkt-textinput")
|
|
7960
7974
|
], re);
|
|
7961
|
-
const
|
|
7975
|
+
const Ah = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.iconName, href: i.target } : { title: i.title, iconName: i.iconName, onClick: i.target }, Mh = (i) => Ah(i), Oh = (i) => {
|
|
7962
7976
|
if (!i) return;
|
|
7963
7977
|
const t = typeof i == "string" ? new Date(i) : i;
|
|
7964
7978
|
if (!isNaN(t.getTime()))
|
|
@@ -7970,10 +7984,10 @@ const Sh = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.ic
|
|
|
7970
7984
|
minute: "2-digit"
|
|
7971
7985
|
});
|
|
7972
7986
|
};
|
|
7973
|
-
var
|
|
7974
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
7987
|
+
var Eh = Object.defineProperty, Ph = Object.getOwnPropertyDescriptor, ai = (i, t, e, s) => {
|
|
7988
|
+
for (var n = s > 1 ? void 0 : s ? Ph(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
7975
7989
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
7976
|
-
return s && n &&
|
|
7990
|
+
return s && n && Eh(t, e, n), n;
|
|
7977
7991
|
};
|
|
7978
7992
|
let Be = class extends X {
|
|
7979
7993
|
constructor() {
|
|
@@ -8039,7 +8053,7 @@ let Be = class extends X {
|
|
|
8039
8053
|
}
|
|
8040
8054
|
render() {
|
|
8041
8055
|
var t;
|
|
8042
|
-
const e = (t = this.userMenu) == null ? void 0 : t.map(
|
|
8056
|
+
const e = (t = this.userMenu) == null ? void 0 : t.map(Mh);
|
|
8043
8057
|
return d`
|
|
8044
8058
|
<nav class="pkt-user-menu" aria-label="Meny for innlogget bruker">
|
|
8045
8059
|
<ul class="pkt-user-menu__list">
|
|
@@ -8138,12 +8152,12 @@ ai([
|
|
|
8138
8152
|
Be = ai([
|
|
8139
8153
|
V("pkt-header-user-menu")
|
|
8140
8154
|
], Be);
|
|
8141
|
-
var
|
|
8142
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
8155
|
+
var Dh = Object.defineProperty, Rh = Object.getOwnPropertyDescriptor, q = (i, t, e, s) => {
|
|
8156
|
+
for (var n = s > 1 ? void 0 : s ? Rh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
8143
8157
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
8144
|
-
return s && n &&
|
|
8158
|
+
return s && n && Dh(t, e, n), n;
|
|
8145
8159
|
};
|
|
8146
|
-
const
|
|
8160
|
+
const Ih = "https://punkt-cdn.oslo.kommune.no/14.5/logos/";
|
|
8147
8161
|
let U = class extends X {
|
|
8148
8162
|
constructor() {
|
|
8149
8163
|
super(), this.searchPlaceholder = "Søk", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.slotMenuVariant = "icon-only", this.slotMenuText = "Meny", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.isMobile = !1, this.isTablet = !1, this.openMenu = "none", this.isHidden = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.hasSlotContent = !1, this.alignSlotRight = !1, this.alignSearchRight = !1, this.defaultSlot = O(), this.headerRef = O(), this.userContainerRef = O(), this.slotContainerRef = O(), this.searchContainerRef = O(), this.slotContentRef = O(), this.searchMenuRef = O(), this.lastScrollPosition = 0, this.savedScrollY = 0, this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
|
|
@@ -8291,7 +8305,7 @@ let U = class extends X {
|
|
|
8291
8305
|
}
|
|
8292
8306
|
get formattedLastLoggedIn() {
|
|
8293
8307
|
var t;
|
|
8294
|
-
return
|
|
8308
|
+
return Oh((t = this.user) == null ? void 0 : t.lastLoggedIn);
|
|
8295
8309
|
}
|
|
8296
8310
|
get isFixed() {
|
|
8297
8311
|
return this.position === "fixed";
|
|
@@ -8308,7 +8322,7 @@ let U = class extends X {
|
|
|
8308
8322
|
renderLogo() {
|
|
8309
8323
|
if (this.hideLogo) return b;
|
|
8310
8324
|
const t = d`
|
|
8311
|
-
<pkt-icon name="oslologo" aria-hidden="true" path=${
|
|
8325
|
+
<pkt-icon name="oslologo" aria-hidden="true" path=${Ih}></pkt-icon>
|
|
8312
8326
|
`;
|
|
8313
8327
|
return this.logoLink && typeof this.logoLink == "string" ? d`
|
|
8314
8328
|
<span class="pkt-header-service__logo">
|
|
@@ -8673,10 +8687,10 @@ q([
|
|
|
8673
8687
|
U = q([
|
|
8674
8688
|
V("pkt-header-service")
|
|
8675
8689
|
], U);
|
|
8676
|
-
var
|
|
8677
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
8690
|
+
var Lh = Object.defineProperty, Bh = Object.getOwnPropertyDescriptor, st = (i, t, e, s) => {
|
|
8691
|
+
for (var n = s > 1 ? void 0 : s ? Bh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
8678
8692
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
8679
|
-
return s && n &&
|
|
8693
|
+
return s && n && Lh(t, e, n), n;
|
|
8680
8694
|
};
|
|
8681
8695
|
let tt = class extends X {
|
|
8682
8696
|
constructor() {
|
|
@@ -8801,10 +8815,10 @@ st([
|
|
|
8801
8815
|
tt = st([
|
|
8802
8816
|
V("pkt-header")
|
|
8803
8817
|
], tt);
|
|
8804
|
-
var
|
|
8805
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
8818
|
+
var Fh = Object.defineProperty, Vh = Object.getOwnPropertyDescriptor, ri = (i, t, e, s) => {
|
|
8819
|
+
for (var n = s > 1 ? void 0 : s ? Vh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
8806
8820
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
8807
|
-
return s && n &&
|
|
8821
|
+
return s && n && Fh(t, e, n), n;
|
|
8808
8822
|
};
|
|
8809
8823
|
let Fe = class extends X {
|
|
8810
8824
|
constructor() {
|
|
@@ -8848,10 +8862,10 @@ ri([
|
|
|
8848
8862
|
Fe = ri([
|
|
8849
8863
|
V("pkt-linkcard")
|
|
8850
8864
|
], Fe);
|
|
8851
|
-
var
|
|
8852
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
8865
|
+
var jh = Object.defineProperty, Hh = Object.getOwnPropertyDescriptor, Te = (i, t, e, s) => {
|
|
8866
|
+
for (var n = s > 1 ? void 0 : s ? Hh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
8853
8867
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
8854
|
-
return s && n &&
|
|
8868
|
+
return s && n && jh(t, e, n), n;
|
|
8855
8869
|
};
|
|
8856
8870
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.5/animations/";
|
|
8857
8871
|
let oe = class extends X {
|
|
@@ -8933,23 +8947,23 @@ Te([
|
|
|
8933
8947
|
oe = Te([
|
|
8934
8948
|
V("pkt-loader")
|
|
8935
8949
|
], oe);
|
|
8936
|
-
const
|
|
8937
|
-
props:
|
|
8950
|
+
const Uh = { skin: { default: "beige" }, compact: { default: !1 }, closable: { default: !1 } }, js = {
|
|
8951
|
+
props: Uh
|
|
8938
8952
|
};
|
|
8939
|
-
var
|
|
8940
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
8953
|
+
var zh = Object.defineProperty, qh = Object.getOwnPropertyDescriptor, Ni = (i, t, e, s) => {
|
|
8954
|
+
for (var n = s > 1 ? void 0 : s ? qh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
8941
8955
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
8942
|
-
return s && n &&
|
|
8956
|
+
return s && n && zh(t, e, n), n;
|
|
8943
8957
|
};
|
|
8944
8958
|
let ti = class extends X {
|
|
8945
8959
|
constructor() {
|
|
8946
|
-
super(), this.defaultSlot = O(), this.closable =
|
|
8960
|
+
super(), this.defaultSlot = O(), this.closable = js.props.closable.default, this.compact = js.props.compact.default, this.title = "", this.skin = js.props.skin.default, this._isClosed = !1, this.close = (i) => {
|
|
8947
8961
|
this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", { detail: { origin: i }, bubbles: !0 })), this.dispatchEvent(new CustomEvent("on-close", { detail: { origin: i }, bubbles: !0 }));
|
|
8948
8962
|
}, this.slotController = new lt(this, this.defaultSlot), this._isClosed = !1;
|
|
8949
8963
|
}
|
|
8950
8964
|
// Lifecycle
|
|
8951
8965
|
updated(i) {
|
|
8952
|
-
super.updated(i), i.has("_isClosed") &&
|
|
8966
|
+
super.updated(i), i.has("_isClosed") && da(this, "pkt-hide", this._isClosed);
|
|
8953
8967
|
}
|
|
8954
8968
|
// Render
|
|
8955
8969
|
render() {
|
|
@@ -8993,17 +9007,17 @@ Ni([
|
|
|
8993
9007
|
ti = Ni([
|
|
8994
9008
|
V("pkt-messagebox")
|
|
8995
9009
|
], ti);
|
|
8996
|
-
const
|
|
8997
|
-
props:
|
|
9010
|
+
const Wh = { hideCloseButton: { default: !1 }, closeOnBackdropClick: { default: !1 }, size: { default: "medium" } }, Hs = {
|
|
9011
|
+
props: Wh
|
|
8998
9012
|
};
|
|
8999
|
-
var
|
|
9000
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9013
|
+
var Kh = Object.defineProperty, Yh = Object.getOwnPropertyDescriptor, ce = (i, t, e, s) => {
|
|
9014
|
+
for (var n = s > 1 ? void 0 : s ? Yh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9001
9015
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9002
|
-
return s && n &&
|
|
9016
|
+
return s && n && Kh(t, e, n), n;
|
|
9003
9017
|
};
|
|
9004
9018
|
let Ut = class extends X {
|
|
9005
9019
|
constructor() {
|
|
9006
|
-
super(), this.headingText = "", this.removePadding = !1, this.hideCloseButton =
|
|
9020
|
+
super(), this.headingText = "", this.removePadding = !1, this.hideCloseButton = Hs.props.hideCloseButton.default, this.closeOnBackdropClick = Hs.props.closeOnBackdropClick.default, this.closeButtonSkin = "blue", this.size = Hs.props.size.default, this.variant = "dialog", this.drawerPosition = "right", this.transparentBackdrop = !1, this.defaultSlot = O(), this.dialogRef = O(), this._isOpen = !1, this.close = (i, t = !1) => {
|
|
9007
9021
|
var e;
|
|
9008
9022
|
if (!this._isOpen) return;
|
|
9009
9023
|
this._isOpen = !1, document.body.classList.remove("pkt-modal--open");
|
|
@@ -9143,7 +9157,7 @@ Ut = ce([
|
|
|
9143
9157
|
* Copyright 2018 Google LLC
|
|
9144
9158
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9145
9159
|
*/
|
|
9146
|
-
const
|
|
9160
|
+
const Na = "important", Gh = " !" + Na, Zh = ii(class extends xi {
|
|
9147
9161
|
constructor(i) {
|
|
9148
9162
|
var t;
|
|
9149
9163
|
if (super(i), i.type !== se.ATTRIBUTE || i.name !== "style" || ((t = i.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
@@ -9162,17 +9176,17 @@ const Ca = "important", qh = " !" + Ca, Wh = ii(class extends xi {
|
|
|
9162
9176
|
const n = t[s];
|
|
9163
9177
|
if (n != null) {
|
|
9164
9178
|
this.ft.add(s);
|
|
9165
|
-
const a = typeof n == "string" && n.endsWith(
|
|
9166
|
-
s.includes("-") || a ? e.setProperty(s, a ? n.slice(0, -11) : n, a ?
|
|
9179
|
+
const a = typeof n == "string" && n.endsWith(Gh);
|
|
9180
|
+
s.includes("-") || a ? e.setProperty(s, a ? n.slice(0, -11) : n, a ? Na : "") : e[s] = n;
|
|
9167
9181
|
}
|
|
9168
9182
|
}
|
|
9169
9183
|
return Dt;
|
|
9170
9184
|
}
|
|
9171
9185
|
});
|
|
9172
|
-
var
|
|
9173
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9186
|
+
var Xh = Object.defineProperty, Jh = Object.getOwnPropertyDescriptor, ft = (i, t, e, s) => {
|
|
9187
|
+
for (var n = s > 1 ? void 0 : s ? Jh(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9174
9188
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9175
|
-
return s && n &&
|
|
9189
|
+
return s && n && Xh(t, e, n), n;
|
|
9176
9190
|
};
|
|
9177
9191
|
let ot = class extends X {
|
|
9178
9192
|
constructor() {
|
|
@@ -9202,7 +9216,7 @@ let ot = class extends X {
|
|
|
9202
9216
|
return d` <div
|
|
9203
9217
|
class="pkt-progressbar__container"
|
|
9204
9218
|
.ref=${this.progressBarRef}
|
|
9205
|
-
style=${
|
|
9219
|
+
style=${Zh({
|
|
9206
9220
|
"--pkt-progress-label-width": `${this.labelWidth}px`,
|
|
9207
9221
|
"--pkt-progress-width": `${n}%`
|
|
9208
9222
|
})}
|
|
@@ -9288,10 +9302,10 @@ ft([
|
|
|
9288
9302
|
ot = ft([
|
|
9289
9303
|
V("pkt-progressbar")
|
|
9290
9304
|
], ot);
|
|
9291
|
-
var
|
|
9292
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9305
|
+
var Qh = Object.defineProperty, tc = Object.getOwnPropertyDescriptor, Wt = (i, t, e, s) => {
|
|
9306
|
+
for (var n = s > 1 ? void 0 : s ? tc(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9293
9307
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9294
|
-
return s && n &&
|
|
9308
|
+
return s && n && Qh(t, e, n), n;
|
|
9295
9309
|
};
|
|
9296
9310
|
let It = class extends D {
|
|
9297
9311
|
constructor() {
|
|
@@ -9396,7 +9410,7 @@ It = Wt([
|
|
|
9396
9410
|
* Copyright 2021 Google LLC
|
|
9397
9411
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9398
9412
|
*/
|
|
9399
|
-
let
|
|
9413
|
+
let Aa = class extends Event {
|
|
9400
9414
|
constructor(t, e, s, n) {
|
|
9401
9415
|
super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = e, this.callback = s, this.subscribe = n ?? !1;
|
|
9402
9416
|
}
|
|
@@ -9411,7 +9425,7 @@ let Ta = class extends Event {
|
|
|
9411
9425
|
* Copyright 2021 Google LLC
|
|
9412
9426
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9413
9427
|
*/
|
|
9414
|
-
let
|
|
9428
|
+
let Kn = class {
|
|
9415
9429
|
constructor(i, t, e, s) {
|
|
9416
9430
|
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (n, a) => {
|
|
9417
9431
|
this.unsubscribe && (this.unsubscribe !== a && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = n, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(n, a)), this.unsubscribe = a;
|
|
@@ -9428,7 +9442,7 @@ let Wn = class {
|
|
|
9428
9442
|
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
9429
9443
|
}
|
|
9430
9444
|
dispatchRequest() {
|
|
9431
|
-
this.host.dispatchEvent(new
|
|
9445
|
+
this.host.dispatchEvent(new Aa(this.context, this.host, this.t, this.subscribe));
|
|
9432
9446
|
}
|
|
9433
9447
|
};
|
|
9434
9448
|
/**
|
|
@@ -9436,7 +9450,7 @@ let Wn = class {
|
|
|
9436
9450
|
* Copyright 2021 Google LLC
|
|
9437
9451
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9438
9452
|
*/
|
|
9439
|
-
class
|
|
9453
|
+
class ec {
|
|
9440
9454
|
get value() {
|
|
9441
9455
|
return this.o;
|
|
9442
9456
|
}
|
|
@@ -9469,11 +9483,11 @@ class Xh {
|
|
|
9469
9483
|
* Copyright 2021 Google LLC
|
|
9470
9484
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9471
9485
|
*/
|
|
9472
|
-
let
|
|
9486
|
+
let ic = class extends Event {
|
|
9473
9487
|
constructor(i, t) {
|
|
9474
9488
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = i, this.contextTarget = t;
|
|
9475
9489
|
}
|
|
9476
|
-
},
|
|
9490
|
+
}, Yn = class extends ec {
|
|
9477
9491
|
constructor(t, e, s) {
|
|
9478
9492
|
var n, a;
|
|
9479
9493
|
super(e.context !== void 0 ? e.initialValue : s), this.onContextRequest = (r) => {
|
|
@@ -9483,7 +9497,7 @@ let Jh = class extends Event {
|
|
|
9483
9497
|
}, this.onProviderRequest = (r) => {
|
|
9484
9498
|
if (r.context !== this.context || (r.contextTarget ?? r.composedPath()[0]) === this.host) return;
|
|
9485
9499
|
const l = /* @__PURE__ */ new Set();
|
|
9486
|
-
for (const [u, { consumerHost: p }] of this.subscriptions) l.has(u) || (l.add(u), p.dispatchEvent(new
|
|
9500
|
+
for (const [u, { consumerHost: p }] of this.subscriptions) l.has(u) || (l.add(u), p.dispatchEvent(new Aa(this.context, p, u, !0)));
|
|
9487
9501
|
r.stopPropagation();
|
|
9488
9502
|
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (a = (n = this.host).addController) == null || a.call(n, this);
|
|
9489
9503
|
}
|
|
@@ -9491,7 +9505,7 @@ let Jh = class extends Event {
|
|
|
9491
9505
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
9492
9506
|
}
|
|
9493
9507
|
hostConnected() {
|
|
9494
|
-
this.host.dispatchEvent(new
|
|
9508
|
+
this.host.dispatchEvent(new ic(this.context, this.host));
|
|
9495
9509
|
}
|
|
9496
9510
|
};
|
|
9497
9511
|
/**
|
|
@@ -9499,7 +9513,7 @@ let Jh = class extends Event {
|
|
|
9499
9513
|
* Copyright 2017 Google LLC
|
|
9500
9514
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9501
9515
|
*/
|
|
9502
|
-
function
|
|
9516
|
+
function sc({ context: i }) {
|
|
9503
9517
|
return (t, e) => {
|
|
9504
9518
|
const s = /* @__PURE__ */ new WeakMap();
|
|
9505
9519
|
if (typeof e == "object") return { get() {
|
|
@@ -9507,11 +9521,11 @@ function Qh({ context: i }) {
|
|
|
9507
9521
|
}, set(n) {
|
|
9508
9522
|
return s.get(this).setValue(n), t.set.call(this, n);
|
|
9509
9523
|
}, init(n) {
|
|
9510
|
-
return s.set(this, new
|
|
9524
|
+
return s.set(this, new Yn(this, { context: i, initialValue: n })), n;
|
|
9511
9525
|
} };
|
|
9512
9526
|
{
|
|
9513
9527
|
t.constructor.addInitializer(((r) => {
|
|
9514
|
-
s.set(r, new
|
|
9528
|
+
s.set(r, new Yn(r, { context: i }));
|
|
9515
9529
|
}));
|
|
9516
9530
|
const n = Object.getOwnPropertyDescriptor(t, e);
|
|
9517
9531
|
let a;
|
|
@@ -9537,24 +9551,24 @@ function Qh({ context: i }) {
|
|
|
9537
9551
|
* Copyright 2022 Google LLC
|
|
9538
9552
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9539
9553
|
*/
|
|
9540
|
-
function
|
|
9554
|
+
function nc({ context: i, subscribe: t }) {
|
|
9541
9555
|
return (e, s) => {
|
|
9542
9556
|
typeof s == "object" ? s.addInitializer((function() {
|
|
9543
|
-
new
|
|
9557
|
+
new Kn(this, { context: i, callback: (n) => {
|
|
9544
9558
|
e.set.call(this, n);
|
|
9545
9559
|
}, subscribe: t });
|
|
9546
9560
|
})) : e.constructor.addInitializer(((n) => {
|
|
9547
|
-
new
|
|
9561
|
+
new Kn(n, { context: i, callback: (a) => {
|
|
9548
9562
|
n[s] = a;
|
|
9549
9563
|
}, subscribe: t });
|
|
9550
9564
|
}));
|
|
9551
9565
|
};
|
|
9552
9566
|
}
|
|
9553
|
-
const
|
|
9554
|
-
var
|
|
9555
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9567
|
+
const Ma = Symbol("pkt-tabs-context");
|
|
9568
|
+
var ac = Object.defineProperty, rc = Object.getOwnPropertyDescriptor, Ai = (i, t, e, s) => {
|
|
9569
|
+
for (var n = s > 1 ? void 0 : s ? rc(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9556
9570
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9557
|
-
return s && n &&
|
|
9571
|
+
return s && n && ac(t, e, n), n;
|
|
9558
9572
|
};
|
|
9559
9573
|
let ei = class extends X {
|
|
9560
9574
|
constructor() {
|
|
@@ -9619,16 +9633,16 @@ Ai([
|
|
|
9619
9633
|
R()
|
|
9620
9634
|
], ei.prototype, "tabCount", 2);
|
|
9621
9635
|
Ai([
|
|
9622
|
-
|
|
9636
|
+
sc({ context: Ma }),
|
|
9623
9637
|
R()
|
|
9624
9638
|
], ei.prototype, "context", 2);
|
|
9625
9639
|
ei = Ai([
|
|
9626
9640
|
V("pkt-tabs")
|
|
9627
9641
|
], ei);
|
|
9628
|
-
var
|
|
9629
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9642
|
+
var oc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, Ne = (i, t, e, s) => {
|
|
9643
|
+
for (var n = s > 1 ? void 0 : s ? lc(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9630
9644
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9631
|
-
return s && n &&
|
|
9645
|
+
return s && n && oc(t, e, n), n;
|
|
9632
9646
|
};
|
|
9633
9647
|
let me = class extends X {
|
|
9634
9648
|
constructor() {
|
|
@@ -9705,7 +9719,7 @@ Ne([
|
|
|
9705
9719
|
o({ type: Number, reflect: !0 })
|
|
9706
9720
|
], me.prototype, "index", 2);
|
|
9707
9721
|
Ne([
|
|
9708
|
-
|
|
9722
|
+
nc({ context: Ma, subscribe: !0 }),
|
|
9709
9723
|
o({ attribute: !1 })
|
|
9710
9724
|
], me.prototype, "context", 2);
|
|
9711
9725
|
me = Ne([
|
|
@@ -9716,10 +9730,10 @@ me = Ne([
|
|
|
9716
9730
|
* Copyright 2020 Google LLC
|
|
9717
9731
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9718
9732
|
*/
|
|
9719
|
-
const
|
|
9733
|
+
const hc = ii(class extends xi {
|
|
9720
9734
|
constructor(i) {
|
|
9721
9735
|
if (super(i), i.type !== se.PROPERTY && i.type !== se.ATTRIBUTE && i.type !== se.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
9722
|
-
if (!
|
|
9736
|
+
if (!ha(i)) throw Error("`live` bindings can only contain a single expression");
|
|
9723
9737
|
}
|
|
9724
9738
|
render(i) {
|
|
9725
9739
|
return i;
|
|
@@ -9732,13 +9746,13 @@ const ac = ii(class extends xi {
|
|
|
9732
9746
|
} else if (i.type === se.BOOLEAN_ATTRIBUTE) {
|
|
9733
9747
|
if (!!t === e.hasAttribute(s)) return Dt;
|
|
9734
9748
|
} else if (i.type === se.ATTRIBUTE && e.getAttribute(s) === t + "") return Dt;
|
|
9735
|
-
return
|
|
9749
|
+
return ca(i), t;
|
|
9736
9750
|
}
|
|
9737
9751
|
});
|
|
9738
|
-
var
|
|
9739
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9752
|
+
var cc = Object.defineProperty, uc = Object.getOwnPropertyDescriptor, rs = (i, t, e, s) => {
|
|
9753
|
+
for (var n = s > 1 ? void 0 : s ? uc(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9740
9754
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9741
|
-
return s && n &&
|
|
9755
|
+
return s && n && cc(t, e, n), n;
|
|
9742
9756
|
};
|
|
9743
9757
|
let wi = class extends D {
|
|
9744
9758
|
constructor() {
|
|
@@ -9787,7 +9801,7 @@ let wi = class extends D {
|
|
|
9787
9801
|
id=${this.id + "-input"}
|
|
9788
9802
|
name=${(this.name || this.id) + "-input"}
|
|
9789
9803
|
placeholder=${C(this.placeholder)}
|
|
9790
|
-
.value=${
|
|
9804
|
+
.value=${hc(this.value)}
|
|
9791
9805
|
minlength=${C(this.minlength)}
|
|
9792
9806
|
maxlength=${C(this.maxlength)}
|
|
9793
9807
|
?readonly=${this.readonly}
|
|
@@ -9813,27 +9827,27 @@ let wi = class extends D {
|
|
|
9813
9827
|
</pkt-input-wrapper>`;
|
|
9814
9828
|
}
|
|
9815
9829
|
};
|
|
9816
|
-
|
|
9830
|
+
rs([
|
|
9817
9831
|
o({ type: String, reflect: !0 })
|
|
9818
9832
|
], wi.prototype, "value", 2);
|
|
9819
|
-
|
|
9833
|
+
rs([
|
|
9820
9834
|
o({ type: String })
|
|
9821
9835
|
], wi.prototype, "autocomplete", 2);
|
|
9822
|
-
|
|
9836
|
+
rs([
|
|
9823
9837
|
o({ type: Number })
|
|
9824
9838
|
], wi.prototype, "rows", 2);
|
|
9825
|
-
|
|
9839
|
+
rs([
|
|
9826
9840
|
R()
|
|
9827
9841
|
], wi.prototype, "counterCurrent", 2);
|
|
9828
|
-
wi =
|
|
9842
|
+
wi = rs([
|
|
9829
9843
|
V("pkt-textarea")
|
|
9830
9844
|
], wi);
|
|
9831
|
-
var
|
|
9845
|
+
var dc = Object.defineProperty, Oa = (i, t, e, s) => {
|
|
9832
9846
|
for (var n = void 0, a = i.length - 1, r; a >= 0; a--)
|
|
9833
9847
|
(r = i[a]) && (n = r(t, e, n) || n);
|
|
9834
|
-
return n &&
|
|
9848
|
+
return n && dc(t, e, n), n;
|
|
9835
9849
|
};
|
|
9836
|
-
class
|
|
9850
|
+
class on extends D {
|
|
9837
9851
|
constructor() {
|
|
9838
9852
|
super(...arguments), this._optionsProp = [], this._options = [];
|
|
9839
9853
|
}
|
|
@@ -9904,20 +9918,20 @@ class rn extends D {
|
|
|
9904
9918
|
super.willUpdate(t), this.parseOptions();
|
|
9905
9919
|
}
|
|
9906
9920
|
}
|
|
9907
|
-
|
|
9921
|
+
Oa([
|
|
9908
9922
|
o({ type: Array, attribute: "options" })
|
|
9909
|
-
],
|
|
9910
|
-
|
|
9923
|
+
], on.prototype, "_optionsProp");
|
|
9924
|
+
Oa([
|
|
9911
9925
|
R()
|
|
9912
|
-
],
|
|
9913
|
-
var
|
|
9914
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
9926
|
+
], on.prototype, "_options");
|
|
9927
|
+
var pc = Object.defineProperty, mc = Object.getOwnPropertyDescriptor, Ea = (i, t, e, s) => {
|
|
9928
|
+
for (var n = s > 1 ? void 0 : s ? mc(t, e) : t, a = i.length - 1, r; a >= 0; a--)
|
|
9915
9929
|
(r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
9916
|
-
return s && n &&
|
|
9930
|
+
return s && n && pc(t, e, n), n;
|
|
9917
9931
|
};
|
|
9918
|
-
let
|
|
9932
|
+
let Zs = class extends on {
|
|
9919
9933
|
constructor() {
|
|
9920
|
-
super(), this.inputRef = O(), this.helptextSlot = O(), this.value = "", this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new
|
|
9934
|
+
super(), this.inputRef = O(), this.helptextSlot = O(), this.value = "", this.selectedIndex = -1, this.selectedOptions = void 0, this.optionsController = new Ca(this), this.slotController = new lt(this, this.helptextSlot), this.slotController.skipOptions = !0;
|
|
9921
9935
|
}
|
|
9922
9936
|
connectedCallback() {
|
|
9923
9937
|
super.connectedCallback(), this.parseOptions(), this._options.forEach((i) => {
|
|
@@ -10039,19 +10053,19 @@ let Gs = class extends rn {
|
|
|
10039
10053
|
return i == null || isNaN(i) ? null : i;
|
|
10040
10054
|
}
|
|
10041
10055
|
};
|
|
10042
|
-
|
|
10056
|
+
Ea([
|
|
10043
10057
|
o({ type: String })
|
|
10044
|
-
],
|
|
10045
|
-
|
|
10058
|
+
], Zs.prototype, "value", 2);
|
|
10059
|
+
Zs = Ea([
|
|
10046
10060
|
V("pkt-select")
|
|
10047
|
-
],
|
|
10061
|
+
], Zs);
|
|
10048
10062
|
const z = he({
|
|
10049
10063
|
tagName: "pkt-icon",
|
|
10050
10064
|
elementClass: Xe,
|
|
10051
10065
|
react: le,
|
|
10052
10066
|
displayName: "PktIcon",
|
|
10053
10067
|
events: {}
|
|
10054
|
-
}),
|
|
10068
|
+
}), fc = Z(
|
|
10055
10069
|
({
|
|
10056
10070
|
defaultOpen: i = !1,
|
|
10057
10071
|
id: t,
|
|
@@ -10065,7 +10079,7 @@ const z = he({
|
|
|
10065
10079
|
onClick: p,
|
|
10066
10080
|
onToggle: g
|
|
10067
10081
|
}, v) => {
|
|
10068
|
-
const [y, $] = Pt(i), { name: k } =
|
|
10082
|
+
const [y, $] = Pt(i), { name: k } = qa(), w = l || k, T = a !== void 0 ? a : y;
|
|
10069
10083
|
Nt(() => {
|
|
10070
10084
|
a === void 0 && $(i);
|
|
10071
10085
|
}, [i, a]);
|
|
@@ -10103,19 +10117,19 @@ const z = he({
|
|
|
10103
10117
|
);
|
|
10104
10118
|
}
|
|
10105
10119
|
);
|
|
10106
|
-
|
|
10107
|
-
function
|
|
10120
|
+
fc.displayName = "PktAccordionItem";
|
|
10121
|
+
function gc(i) {
|
|
10108
10122
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
10109
10123
|
}
|
|
10110
|
-
var
|
|
10124
|
+
var Us = { exports: {} };
|
|
10111
10125
|
/*!
|
|
10112
10126
|
Copyright (c) 2018 Jed Watson.
|
|
10113
10127
|
Licensed under the MIT License (MIT), see
|
|
10114
10128
|
http://jedwatson.github.io/classnames
|
|
10115
10129
|
*/
|
|
10116
|
-
var
|
|
10117
|
-
function
|
|
10118
|
-
return
|
|
10130
|
+
var Gn;
|
|
10131
|
+
function vc() {
|
|
10132
|
+
return Gn || (Gn = 1, (function(i) {
|
|
10119
10133
|
(function() {
|
|
10120
10134
|
var t = {}.hasOwnProperty;
|
|
10121
10135
|
function e() {
|
|
@@ -10144,10 +10158,10 @@ function pc() {
|
|
|
10144
10158
|
}
|
|
10145
10159
|
i.exports ? (e.default = e, i.exports = e) : window.classNames = e;
|
|
10146
10160
|
})();
|
|
10147
|
-
})(
|
|
10161
|
+
})(Us)), Us.exports;
|
|
10148
10162
|
}
|
|
10149
|
-
var
|
|
10150
|
-
const K = /* @__PURE__ */
|
|
10163
|
+
var kc = vc();
|
|
10164
|
+
const K = /* @__PURE__ */ gc(kc), Pa = ({
|
|
10151
10165
|
children: i,
|
|
10152
10166
|
closeAlert: t,
|
|
10153
10167
|
compact: e,
|
|
@@ -10203,17 +10217,17 @@ const K = /* @__PURE__ */ dc(mc), Oa = ({
|
|
|
10203
10217
|
] })
|
|
10204
10218
|
] }) });
|
|
10205
10219
|
};
|
|
10206
|
-
|
|
10207
|
-
const
|
|
10220
|
+
Pa.displayName = "PktAlert";
|
|
10221
|
+
const bc = he({
|
|
10208
10222
|
tagName: "pkt-backlink",
|
|
10209
10223
|
elementClass: $i,
|
|
10210
10224
|
react: le,
|
|
10211
10225
|
displayName: "PktBackLink"
|
|
10212
10226
|
});
|
|
10213
|
-
|
|
10214
|
-
const
|
|
10227
|
+
bc.displayName = "PktBackLink";
|
|
10228
|
+
const yc = Z(
|
|
10215
10229
|
({ breadcrumbs: i, navigationType: t, renderLink: e, className: s, ...n }, a) => {
|
|
10216
|
-
const r = i, l = r[r.length - 2], u = [s, "pkt-breadcrumbs"].filter(Boolean).join(" "), p = e || (t === "router" ? ({ href: g, className: v, children: y, props: $ }) => /* @__PURE__ */ c(
|
|
10230
|
+
const r = i, l = r[r.length - 2], u = [s, "pkt-breadcrumbs"].filter(Boolean).join(" "), p = e || (t === "router" ? ({ href: g, className: v, children: y, props: $ }) => /* @__PURE__ */ c(za, { to: g, className: v, ...$, children: y }) : ({ href: g, className: v, children: y, props: $ }) => /* @__PURE__ */ c("a", { href: g, className: v, ...$, children: y }));
|
|
10217
10231
|
return /* @__PURE__ */ S("nav", { ref: a, "aria-label": "brødsmulemeny", className: u, children: [
|
|
10218
10232
|
/* @__PURE__ */ c("ol", { className: "pkt-breadcrumbs__list pkt-breadcrumbs--desktop", children: r.map((g, v) => /* @__PURE__ */ c("li", { className: "pkt-breadcrumbs__item", children: v === r.length - 1 ? /* @__PURE__ */ c("span", { className: "pkt-breadcrumbs__label", "aria-current": "true", children: /* @__PURE__ */ c("span", { className: "pkt-breadcrumbs__text", children: g.text }) }) : p({
|
|
10219
10233
|
href: g.href,
|
|
@@ -10236,7 +10250,7 @@ const gc = Z(
|
|
|
10236
10250
|
] });
|
|
10237
10251
|
}
|
|
10238
10252
|
);
|
|
10239
|
-
|
|
10253
|
+
yc.displayName = "PktBreadcrumbs";
|
|
10240
10254
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.5/animations/";
|
|
10241
10255
|
const we = Z(
|
|
10242
10256
|
({
|
|
@@ -10299,17 +10313,17 @@ const we = Z(
|
|
|
10299
10313
|
}
|
|
10300
10314
|
);
|
|
10301
10315
|
we.displayName = "PktButton";
|
|
10302
|
-
const
|
|
10316
|
+
const $c = he({
|
|
10303
10317
|
tagName: "pkt-card",
|
|
10304
10318
|
elementClass: pt,
|
|
10305
10319
|
react: le,
|
|
10306
10320
|
displayName: "PktCard",
|
|
10307
10321
|
events: {}
|
|
10308
|
-
}),
|
|
10309
|
-
({ children: i, ...t }, e) => /* @__PURE__ */ c(
|
|
10322
|
+
}), _c = Z(
|
|
10323
|
+
({ children: i, ...t }, e) => /* @__PURE__ */ c($c, { ...t, ref: e, children: /* @__PURE__ */ c("div", { className: "pkt-contents", children: i }) })
|
|
10310
10324
|
);
|
|
10311
|
-
|
|
10312
|
-
const
|
|
10325
|
+
_c.displayName = "PktCard";
|
|
10326
|
+
const wc = Z(
|
|
10313
10327
|
({
|
|
10314
10328
|
id: i,
|
|
10315
10329
|
hasTile: t = !1,
|
|
@@ -10380,8 +10394,8 @@ const bc = Z(
|
|
|
10380
10394
|
] }) });
|
|
10381
10395
|
}
|
|
10382
10396
|
);
|
|
10383
|
-
|
|
10384
|
-
const
|
|
10397
|
+
wc.displayName = "PktCheckbox";
|
|
10398
|
+
const xc = he({
|
|
10385
10399
|
tagName: "pkt-combobox",
|
|
10386
10400
|
elementClass: at,
|
|
10387
10401
|
react: le,
|
|
@@ -10395,12 +10409,12 @@ const yc = he({
|
|
|
10395
10409
|
onValueChange: "value-change",
|
|
10396
10410
|
onToggleHelpText: "toggleHelpText"
|
|
10397
10411
|
}
|
|
10398
|
-
}),
|
|
10412
|
+
}), Sc = Z(({ children: i, helptext: t, ...e }, s) => /* @__PURE__ */ S(xc, { ...e, ref: s, children: [
|
|
10399
10413
|
t && /* @__PURE__ */ c("div", { slot: "helptext", className: "pkt-contents", children: t }),
|
|
10400
10414
|
i
|
|
10401
10415
|
] }));
|
|
10402
|
-
|
|
10403
|
-
const
|
|
10416
|
+
Sc.displayName = "PktCombobox";
|
|
10417
|
+
const ln = he({
|
|
10404
10418
|
tagName: "pkt-consent",
|
|
10405
10419
|
elementClass: Qt,
|
|
10406
10420
|
react: le,
|
|
@@ -10409,8 +10423,8 @@ const on = he({
|
|
|
10409
10423
|
onToggleConsent: "toggle-consent"
|
|
10410
10424
|
}
|
|
10411
10425
|
});
|
|
10412
|
-
|
|
10413
|
-
const
|
|
10426
|
+
ln.displayName = "PktConsent";
|
|
10427
|
+
const Cc = he({
|
|
10414
10428
|
tagName: "pkt-datepicker",
|
|
10415
10429
|
elementClass: rt,
|
|
10416
10430
|
react: le,
|
|
@@ -10422,11 +10436,11 @@ const _c = he({
|
|
|
10422
10436
|
onValueChange: "value-change",
|
|
10423
10437
|
onToggleHelpText: "toggleHelpText"
|
|
10424
10438
|
}
|
|
10425
|
-
}),
|
|
10426
|
-
({ helptext: i, ...t }, e) => /* @__PURE__ */ c(
|
|
10439
|
+
}), Tc = Z(
|
|
10440
|
+
({ helptext: i, ...t }, e) => /* @__PURE__ */ c(Cc, { ref: e, ...t, children: /* @__PURE__ */ c("div", { className: "pkt-contents", slot: "helptext", children: i }) })
|
|
10427
10441
|
);
|
|
10428
|
-
|
|
10429
|
-
const
|
|
10442
|
+
Tc.displayName = "PktDatepicker";
|
|
10443
|
+
const ed = ({
|
|
10430
10444
|
columnOne: i,
|
|
10431
10445
|
columnTwo: t,
|
|
10432
10446
|
socialLinks: e,
|
|
@@ -10517,7 +10531,7 @@ const Xu = ({
|
|
|
10517
10531
|
}
|
|
10518
10532
|
) }),
|
|
10519
10533
|
l && /* @__PURE__ */ c("li", { className: "pkt-footer__list-item", children: /* @__PURE__ */ c(
|
|
10520
|
-
|
|
10534
|
+
ln,
|
|
10521
10535
|
{
|
|
10522
10536
|
triggerType: "footerlink",
|
|
10523
10537
|
hotjarId: u,
|
|
@@ -10543,7 +10557,7 @@ const Xu = ({
|
|
|
10543
10557
|
children: x.language
|
|
10544
10558
|
}
|
|
10545
10559
|
) }, `sociallinks-language-${I}`)) }),
|
|
10546
|
-
/* @__PURE__ */ c("div", { className: "pkt-footer__social-icons", children: e.filter((x) => x.iconName).map((x, I) => /* @__PURE__ */ c(
|
|
10560
|
+
/* @__PURE__ */ c("div", { className: "pkt-footer__social-icons", children: e.filter((x) => x.iconName).map((x, I) => /* @__PURE__ */ c(Fa, { children: /* @__PURE__ */ c(
|
|
10547
10561
|
"a",
|
|
10548
10562
|
{
|
|
10549
10563
|
href: x.href,
|
|
@@ -10556,7 +10570,7 @@ const Xu = ({
|
|
|
10556
10570
|
) }, `sociallinks-${I}`)) })
|
|
10557
10571
|
] })
|
|
10558
10572
|
] }) });
|
|
10559
|
-
},
|
|
10573
|
+
}, id = ({
|
|
10560
10574
|
links: i = [],
|
|
10561
10575
|
openLinksInNewTab: t = !1,
|
|
10562
10576
|
personvernOgInfoLink: e = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
|
|
@@ -10615,7 +10629,7 @@ const Xu = ({
|
|
|
10615
10629
|
}
|
|
10616
10630
|
) }),
|
|
10617
10631
|
n && /* @__PURE__ */ c("li", { className: "pkt-footer-simple__list-item", children: /* @__PURE__ */ c(
|
|
10618
|
-
|
|
10632
|
+
ln,
|
|
10619
10633
|
{
|
|
10620
10634
|
triggerType: "footerlink",
|
|
10621
10635
|
hotjarId: a,
|
|
@@ -10628,7 +10642,7 @@ const Xu = ({
|
|
|
10628
10642
|
}
|
|
10629
10643
|
) })
|
|
10630
10644
|
] }) }) });
|
|
10631
|
-
},
|
|
10645
|
+
}, Nc = (i, t) => {
|
|
10632
10646
|
const e = () => typeof window > "u" ? 0 : window.innerWidth, [s, n] = Pt(e);
|
|
10633
10647
|
return Nt(() => {
|
|
10634
10648
|
const a = i.current;
|
|
@@ -10648,7 +10662,7 @@ const Xu = ({
|
|
|
10648
10662
|
};
|
|
10649
10663
|
}, [i]), s;
|
|
10650
10664
|
};
|
|
10651
|
-
function
|
|
10665
|
+
function Ac(i) {
|
|
10652
10666
|
const t = Xt(0);
|
|
10653
10667
|
Nt(() => {
|
|
10654
10668
|
const e = document.body, s = document.documentElement;
|
|
@@ -10663,7 +10677,7 @@ function Sc(i) {
|
|
|
10663
10677
|
};
|
|
10664
10678
|
}, [i]);
|
|
10665
10679
|
}
|
|
10666
|
-
const
|
|
10680
|
+
const hn = ({
|
|
10667
10681
|
href: i,
|
|
10668
10682
|
iconName: t,
|
|
10669
10683
|
className: e,
|
|
@@ -10691,9 +10705,9 @@ const ln = ({
|
|
|
10691
10705
|
]
|
|
10692
10706
|
}
|
|
10693
10707
|
);
|
|
10694
|
-
|
|
10695
|
-
const
|
|
10696
|
-
|
|
10708
|
+
hn.displayName = "PktLink";
|
|
10709
|
+
const Mc = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.iconName, href: i.target } : { title: i.title, iconName: i.iconName, onClick: i.target }, ds = ({ item: i, className: t }) => "href" in i ? /* @__PURE__ */ c(
|
|
10710
|
+
hn,
|
|
10697
10711
|
{
|
|
10698
10712
|
iconName: i.iconName,
|
|
10699
10713
|
href: i.href,
|
|
@@ -10714,7 +10728,7 @@ const Cc = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.ic
|
|
|
10714
10728
|
i.title
|
|
10715
10729
|
]
|
|
10716
10730
|
}
|
|
10717
|
-
),
|
|
10731
|
+
), Oc = ({ links: i }) => /* @__PURE__ */ c("ul", { className: "pkt-user-menu__sublist", children: i.map((t, e) => /* @__PURE__ */ c("li", { className: "pkt-user-menu__subitem", children: /* @__PURE__ */ c(ds, { item: t }) }, e)) }), Da = Z(
|
|
10718
10732
|
({
|
|
10719
10733
|
user: i,
|
|
10720
10734
|
formattedLastLoggedIn: t,
|
|
@@ -10724,7 +10738,7 @@ const Cc = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.ic
|
|
|
10724
10738
|
changeRepresentation: a,
|
|
10725
10739
|
logoutOnClick: r
|
|
10726
10740
|
}, l) => {
|
|
10727
|
-
const u = s == null ? void 0 : s.map(
|
|
10741
|
+
const u = s == null ? void 0 : s.map(Mc);
|
|
10728
10742
|
return /* @__PURE__ */ c("nav", { className: "pkt-user-menu", ref: l, "aria-label": "Meny for innlogget bruker", children: /* @__PURE__ */ S("ul", { className: "pkt-user-menu__list", children: [
|
|
10729
10743
|
i && /* @__PURE__ */ S("li", { className: "pkt-user-menu__item", children: [
|
|
10730
10744
|
/* @__PURE__ */ c("div", { className: "pkt-user-menu__label", children: "Pålogget som" }),
|
|
@@ -10734,7 +10748,7 @@ const Cc = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.ic
|
|
|
10734
10748
|
/* @__PURE__ */ c("time", { children: t })
|
|
10735
10749
|
] })
|
|
10736
10750
|
] }),
|
|
10737
|
-
u && u.length > 0 && /* @__PURE__ */ c("li", { className: "pkt-user-menu__item", children: /* @__PURE__ */ c(
|
|
10751
|
+
u && u.length > 0 && /* @__PURE__ */ c("li", { className: "pkt-user-menu__item", children: /* @__PURE__ */ c(Oc, { links: u }) }),
|
|
10738
10752
|
e && /* @__PURE__ */ S("li", { className: "pkt-user-menu__item", children: [
|
|
10739
10753
|
/* @__PURE__ */ c("div", { className: "pkt-user-menu__label", children: "Representerer" }),
|
|
10740
10754
|
/* @__PURE__ */ c("div", { className: "pkt-user-menu__name", translate: "no", children: e.name }),
|
|
@@ -10743,24 +10757,24 @@ const Cc = (i) => typeof i.target == "string" ? { title: i.title, iconName: i.ic
|
|
|
10743
10757
|
e.orgNumber
|
|
10744
10758
|
] }),
|
|
10745
10759
|
n && a && /* @__PURE__ */ c("ul", { className: "pkt-user-menu__sublist mt-size-16", children: /* @__PURE__ */ c("li", { className: "pkt-user-menu__subitem", children: /* @__PURE__ */ c(
|
|
10746
|
-
|
|
10760
|
+
ds,
|
|
10747
10761
|
{
|
|
10748
10762
|
item: { title: "Endre organisasjon", iconName: "cogwheel", onClick: a }
|
|
10749
10763
|
}
|
|
10750
10764
|
) }) })
|
|
10751
10765
|
] }),
|
|
10752
10766
|
!e && n && a && /* @__PURE__ */ c("li", { className: "pkt-user-menu__item", children: /* @__PURE__ */ c("ul", { className: "pkt-user-menu__sublist", children: /* @__PURE__ */ c("li", { className: "pkt-user-menu__subitem", children: /* @__PURE__ */ c(
|
|
10753
|
-
|
|
10767
|
+
ds,
|
|
10754
10768
|
{
|
|
10755
10769
|
item: { title: "Endre organisasjon", iconName: "cogwheel", onClick: a }
|
|
10756
10770
|
}
|
|
10757
10771
|
) }) }) }),
|
|
10758
|
-
r && /* @__PURE__ */ c("li", { className: "pkt-user-menu__item", children: /* @__PURE__ */ c(
|
|
10772
|
+
r && /* @__PURE__ */ c("li", { className: "pkt-user-menu__item", children: /* @__PURE__ */ c(ds, { item: { title: "Logg ut", iconName: "exit", onClick: r } }) })
|
|
10759
10773
|
] }) });
|
|
10760
10774
|
}
|
|
10761
10775
|
);
|
|
10762
|
-
|
|
10763
|
-
const
|
|
10776
|
+
Da.displayName = "PktHeaderUserMenu";
|
|
10777
|
+
const As = Z(
|
|
10764
10778
|
({
|
|
10765
10779
|
forId: i,
|
|
10766
10780
|
label: t,
|
|
@@ -10843,13 +10857,13 @@ const Ns = Z(
|
|
|
10843
10857
|
ct && /* @__PURE__ */ c(Yt, {}),
|
|
10844
10858
|
I,
|
|
10845
10859
|
be && /* @__PURE__ */ c(Yt, {}),
|
|
10846
|
-
$ && k && /* @__PURE__ */ c("div", { className: "pkt-inputwrapper__alert-wrapper", children: /* @__PURE__ */ c(
|
|
10860
|
+
$ && k && /* @__PURE__ */ c("div", { className: "pkt-inputwrapper__alert-wrapper", children: /* @__PURE__ */ c(Pa, { skin: "error", "aria-live": "assertive", role: "alert", id: `${i}-error`, compact: !0, children: k }) })
|
|
10847
10861
|
] });
|
|
10848
10862
|
return /* @__PURE__ */ c("div", { className: Mt, ref: Ct, role: J, children: H ? /* @__PURE__ */ c("fieldset", { className: "pkt-inputwrapper__fieldset", "aria-describedby": Bt, children: Ot }) : /* @__PURE__ */ c("div", { className: "pkt-inputwrapper__fieldset", children: Ot }) });
|
|
10849
10863
|
}
|
|
10850
10864
|
);
|
|
10851
|
-
|
|
10852
|
-
const
|
|
10865
|
+
As.displayName = "PktInputWrapper";
|
|
10866
|
+
const Xs = Z(
|
|
10853
10867
|
({
|
|
10854
10868
|
id: i,
|
|
10855
10869
|
ariaDescribedby: t,
|
|
@@ -10901,7 +10915,7 @@ const Zs = Z(
|
|
|
10901
10915
|
return Nt(() => {
|
|
10902
10916
|
ct !== void 0 && ue((ct == null ? void 0 : ct.length) || 0);
|
|
10903
10917
|
}, [ct]), /* @__PURE__ */ c(
|
|
10904
|
-
|
|
10918
|
+
As,
|
|
10905
10919
|
{
|
|
10906
10920
|
ariaDescribedby: t,
|
|
10907
10921
|
className: Mi,
|
|
@@ -10972,8 +10986,8 @@ const Zs = Z(
|
|
|
10972
10986
|
);
|
|
10973
10987
|
}
|
|
10974
10988
|
);
|
|
10975
|
-
|
|
10976
|
-
const
|
|
10989
|
+
Xs.displayName = "PktTextinput";
|
|
10990
|
+
const Ra = Z(
|
|
10977
10991
|
({
|
|
10978
10992
|
mobileBreakpoint: i = 768,
|
|
10979
10993
|
tabletBreakpoint: t = 1280,
|
|
@@ -11021,20 +11035,20 @@ const Pa = Z(
|
|
|
11021
11035
|
'PktHeaderService: The "shortname" property on the representing object is deprecated and will be removed in a future version.'
|
|
11022
11036
|
);
|
|
11023
11037
|
}, [x == null ? void 0 : x.shortname, k == null ? void 0 : k.shortname]);
|
|
11024
|
-
const Yt =
|
|
11038
|
+
const Yt = Jn(() => {
|
|
11025
11039
|
if (x != null && x.lastLoggedIn)
|
|
11026
11040
|
return typeof x.lastLoggedIn == "string" ? x.lastLoggedIn : new Date(x.lastLoggedIn).toLocaleString("nb-NO", {
|
|
11027
11041
|
year: "numeric",
|
|
11028
11042
|
month: "long",
|
|
11029
11043
|
day: "numeric"
|
|
11030
11044
|
});
|
|
11031
|
-
}, [x == null ? void 0 : x.lastLoggedIn]), [j, Tt] = Pt(u || "none"), [ee, Ot] = Pt(!1), [nt, ye] = Pt(0), [$e, ie] = Pt(!1), [Mi, oi] = Pt(!1), li = Xt(null), Ve = Xt(null), ue = Xt(null), de = Xt(null), Ae = Xt(null), je = Xt(null), _e = Xt(null), Gt = Xt(!1), He =
|
|
11045
|
+
}, [x == null ? void 0 : x.lastLoggedIn]), [j, Tt] = Pt(u || "none"), [ee, Ot] = Pt(!1), [nt, ye] = Pt(0), [$e, ie] = Pt(!1), [Mi, oi] = Pt(!1), li = Xt(null), Ve = Xt(null), ue = Xt(null), de = Xt(null), Ae = Xt(null), je = Xt(null), _e = Xt(null), Gt = Xt(!1), He = Nc(li), kt = He < i, Zt = He < t, Ms = Oe(
|
|
11032
11046
|
(h) => {
|
|
11033
11047
|
li.current = h, typeof At == "function" ? At(h) : At && (At.current = h);
|
|
11034
11048
|
},
|
|
11035
11049
|
[At]
|
|
11036
11050
|
);
|
|
11037
|
-
|
|
11051
|
+
Ac(Mt && kt && j !== "none");
|
|
11038
11052
|
const hi = Oe((h, m) => {
|
|
11039
11053
|
const _ = h.relatedTarget;
|
|
11040
11054
|
let P;
|
|
@@ -11113,7 +11127,7 @@ const Pa = Z(
|
|
|
11113
11127
|
s
|
|
11114
11128
|
),
|
|
11115
11129
|
"data-mode": a,
|
|
11116
|
-
ref:
|
|
11130
|
+
ref: Ms,
|
|
11117
11131
|
children: [
|
|
11118
11132
|
/* @__PURE__ */ S(
|
|
11119
11133
|
"div",
|
|
@@ -11153,7 +11167,7 @@ const Pa = Z(
|
|
|
11153
11167
|
path: "https://punkt-cdn.oslo.kommune.no/14.5/logos/"
|
|
11154
11168
|
}
|
|
11155
11169
|
) }),
|
|
11156
|
-
M && /* @__PURE__ */ c("span", { className: "pkt-header-service__service-name", children: w ? /* @__PURE__ */ c(
|
|
11170
|
+
M && /* @__PURE__ */ c("span", { className: "pkt-header-service__service-name", children: w ? /* @__PURE__ */ c(hn, { href: w, className: "pkt-header-service__service-link ", children: M }) : T ? /* @__PURE__ */ c("button", { className: "pkt-link-button pkt-link pkt-header-service__service-link", onClick: T, children: M }) : /* @__PURE__ */ c("span", { className: "pkt-header-service__service-link", children: M }) })
|
|
11157
11171
|
]
|
|
11158
11172
|
}
|
|
11159
11173
|
),
|
|
@@ -11226,7 +11240,7 @@ const Pa = Z(
|
|
|
11226
11240
|
),
|
|
11227
11241
|
ref: je,
|
|
11228
11242
|
children: j === "search" && /* @__PURE__ */ c(
|
|
11229
|
-
|
|
11243
|
+
Xs,
|
|
11230
11244
|
{
|
|
11231
11245
|
id: "mobile-search-menu",
|
|
11232
11246
|
className: "pkt-header-service__search-input",
|
|
@@ -11248,7 +11262,7 @@ const Pa = Z(
|
|
|
11248
11262
|
]
|
|
11249
11263
|
}
|
|
11250
11264
|
) : /* @__PURE__ */ c(
|
|
11251
|
-
|
|
11265
|
+
Xs,
|
|
11252
11266
|
{
|
|
11253
11267
|
id: "header-service-search",
|
|
11254
11268
|
className: "pkt-header-service__search-input",
|
|
@@ -11311,7 +11325,7 @@ const Pa = Z(
|
|
|
11311
11325
|
"is-open"
|
|
11312
11326
|
),
|
|
11313
11327
|
children: /* @__PURE__ */ c(
|
|
11314
|
-
|
|
11328
|
+
Da,
|
|
11315
11329
|
{
|
|
11316
11330
|
user: x,
|
|
11317
11331
|
formattedLastLoggedIn: Yt,
|
|
@@ -11349,17 +11363,17 @@ const Pa = Z(
|
|
|
11349
11363
|
] }) : f;
|
|
11350
11364
|
}
|
|
11351
11365
|
);
|
|
11352
|
-
|
|
11353
|
-
const
|
|
11354
|
-
|
|
11355
|
-
const
|
|
11366
|
+
Ra.displayName = "PktHeaderService";
|
|
11367
|
+
const Ec = Z((i, t) => /* @__PURE__ */ c(Ra, { ...i, ref: t }));
|
|
11368
|
+
Ec.displayName = "PktHeader";
|
|
11369
|
+
const Pc = he({
|
|
11356
11370
|
tagName: "pkt-heading",
|
|
11357
11371
|
elementClass: Le,
|
|
11358
11372
|
react: le,
|
|
11359
11373
|
displayName: "PktHeading"
|
|
11360
|
-
}),
|
|
11361
|
-
|
|
11362
|
-
const
|
|
11374
|
+
}), Dc = Z(({ children: i, ...t }, e) => /* @__PURE__ */ c(Pc, { "data-testid": "pkt-heading", ...t, ref: e, children: i }));
|
|
11375
|
+
Dc.displayName = "PktHeading";
|
|
11376
|
+
const Rc = he({
|
|
11363
11377
|
tagName: "pkt-helptext",
|
|
11364
11378
|
elementClass: Se,
|
|
11365
11379
|
react: le,
|
|
@@ -11367,19 +11381,19 @@ const Oc = he({
|
|
|
11367
11381
|
events: {
|
|
11368
11382
|
onToggleHelpText: "toggleHelpText"
|
|
11369
11383
|
}
|
|
11370
|
-
}),
|
|
11371
|
-
({ children: i, ...t }, e) => /* @__PURE__ */ c(
|
|
11384
|
+
}), Ic = Z(
|
|
11385
|
+
({ children: i, ...t }, e) => /* @__PURE__ */ c(Rc, { ...t, ref: e, children: /* @__PURE__ */ c("div", { className: "pkt-contents", children: i }) })
|
|
11372
11386
|
);
|
|
11373
|
-
|
|
11374
|
-
const
|
|
11387
|
+
Ic.displayName = "PktHelptext";
|
|
11388
|
+
const Lc = Z(
|
|
11375
11389
|
({ label: i, id: t, children: e, ...s }, n) => /* @__PURE__ */ S("div", { className: "pkt-form-group", children: [
|
|
11376
11390
|
/* @__PURE__ */ c("label", { htmlFor: t, className: "pkt-form-label", children: i }),
|
|
11377
11391
|
/* @__PURE__ */ c("input", { className: "pkt-form-input", id: t, ...s, ref: n }),
|
|
11378
11392
|
e
|
|
11379
11393
|
] })
|
|
11380
11394
|
);
|
|
11381
|
-
|
|
11382
|
-
const
|
|
11395
|
+
Lc.displayName = "PktInput";
|
|
11396
|
+
const Bc = ({
|
|
11383
11397
|
children: i,
|
|
11384
11398
|
skin: t,
|
|
11385
11399
|
title: e,
|
|
@@ -11407,18 +11421,18 @@ const Dc = ({
|
|
|
11407
11421
|
}
|
|
11408
11422
|
);
|
|
11409
11423
|
};
|
|
11410
|
-
|
|
11411
|
-
const
|
|
11424
|
+
Bc.displayName = "PktLinkCard";
|
|
11425
|
+
const Fc = he({
|
|
11412
11426
|
tagName: "pkt-loader",
|
|
11413
11427
|
elementClass: oe,
|
|
11414
11428
|
react: le,
|
|
11415
11429
|
displayName: "PktLoader",
|
|
11416
11430
|
events: {}
|
|
11417
|
-
}),
|
|
11418
|
-
({ children: i, ...t }, e) => /* @__PURE__ */ c(
|
|
11431
|
+
}), Vc = Z(
|
|
11432
|
+
({ children: i, ...t }, e) => /* @__PURE__ */ c(Fc, { ...t, ref: e, children: /* @__PURE__ */ c("div", { className: "pkt-contents", children: i }) })
|
|
11419
11433
|
);
|
|
11420
|
-
|
|
11421
|
-
const
|
|
11434
|
+
Vc.displayName = "PktLoader";
|
|
11435
|
+
const jc = ({
|
|
11422
11436
|
children: i,
|
|
11423
11437
|
className: t,
|
|
11424
11438
|
skin: e,
|
|
@@ -11434,7 +11448,7 @@ const Lc = ({
|
|
|
11434
11448
|
[`pkt-messagebox--${e}`]: e,
|
|
11435
11449
|
"pkt-messagebox--closable": a,
|
|
11436
11450
|
"pkt-hide": u
|
|
11437
|
-
}, v =
|
|
11451
|
+
}, v = Va(), y = Oe(() => {
|
|
11438
11452
|
p(!0), r && r();
|
|
11439
11453
|
}, [p, r]);
|
|
11440
11454
|
return /* @__PURE__ */ S("div", { ...l, className: K(g, t), ref: v, children: [
|
|
@@ -11451,28 +11465,28 @@ const Lc = ({
|
|
|
11451
11465
|
/* @__PURE__ */ c("div", { className: "pkt-messagebox__text", children: i })
|
|
11452
11466
|
] });
|
|
11453
11467
|
};
|
|
11454
|
-
|
|
11455
|
-
const
|
|
11468
|
+
jc.displayName = "PktMessagebox";
|
|
11469
|
+
const Hc = he({
|
|
11456
11470
|
tagName: "pkt-modal",
|
|
11457
11471
|
elementClass: Ut,
|
|
11458
11472
|
react: le,
|
|
11459
11473
|
displayName: "PktModal",
|
|
11460
11474
|
events: {}
|
|
11461
|
-
}),
|
|
11462
|
-
({ children: i, ...t }, e) => /* @__PURE__ */ c(
|
|
11475
|
+
}), Uc = Z(
|
|
11476
|
+
({ children: i, ...t }, e) => /* @__PURE__ */ c(Hc, { ...t, ref: e, children: /* @__PURE__ */ c("div", { className: "pkt-contents", children: i }) })
|
|
11463
11477
|
);
|
|
11464
|
-
|
|
11465
|
-
const
|
|
11478
|
+
Uc.displayName = "PktModal";
|
|
11479
|
+
const zc = he({
|
|
11466
11480
|
tagName: "pkt-progressbar",
|
|
11467
11481
|
elementClass: ot,
|
|
11468
11482
|
react: le,
|
|
11469
11483
|
displayName: "PktProgressbar",
|
|
11470
11484
|
events: {}
|
|
11471
|
-
}),
|
|
11472
|
-
({ children: i, ...t }, e) => /* @__PURE__ */ c(
|
|
11485
|
+
}), qc = Z(
|
|
11486
|
+
({ children: i, ...t }, e) => /* @__PURE__ */ c(zc, { ref: e, ...t, children: /* @__PURE__ */ c("div", { className: "pkt-contents", children: i }) })
|
|
11473
11487
|
);
|
|
11474
|
-
|
|
11475
|
-
const
|
|
11488
|
+
qc.displayName = "PktProgressbar";
|
|
11489
|
+
const Wc = Z(
|
|
11476
11490
|
({
|
|
11477
11491
|
id: i,
|
|
11478
11492
|
name: t,
|
|
@@ -11526,8 +11540,8 @@ const Hc = Z(
|
|
|
11526
11540
|
] }) });
|
|
11527
11541
|
}
|
|
11528
11542
|
);
|
|
11529
|
-
|
|
11530
|
-
const
|
|
11543
|
+
Wc.displayName = "PktRadioButton";
|
|
11544
|
+
const Kc = Z(
|
|
11531
11545
|
({
|
|
11532
11546
|
appearance: i = "local",
|
|
11533
11547
|
disabled: t = !1,
|
|
@@ -11593,7 +11607,7 @@ const Uc = Z(
|
|
|
11593
11607
|
}
|
|
11594
11608
|
)
|
|
11595
11609
|
] }),
|
|
11596
|
-
l && /* @__PURE__ */ c("ul", { id: `${s}-suggestions`, className: "pkt-searchinput__suggestions", "aria-live": "assertive", children: l.map((A, H) => /* @__PURE__ */ c("li", { children:
|
|
11610
|
+
l && /* @__PURE__ */ c("ul", { id: `${s}-suggestions`, className: "pkt-searchinput__suggestions", "aria-live": "assertive", children: l.map((A, H) => /* @__PURE__ */ c("li", { children: ja(
|
|
11597
11611
|
A.href ? "a" : A.onClick ? "button" : "div",
|
|
11598
11612
|
{
|
|
11599
11613
|
href: A.href,
|
|
@@ -11611,8 +11625,8 @@ const Uc = Z(
|
|
|
11611
11625
|
);
|
|
11612
11626
|
}
|
|
11613
11627
|
);
|
|
11614
|
-
|
|
11615
|
-
const
|
|
11628
|
+
Kc.displayName = "PktSearchInput";
|
|
11629
|
+
const Yc = Z(
|
|
11616
11630
|
({
|
|
11617
11631
|
ariaDescribedby: i,
|
|
11618
11632
|
ariaLabelledby: t,
|
|
@@ -11638,7 +11652,7 @@ const zc = Z(
|
|
|
11638
11652
|
}, H) => {
|
|
11639
11653
|
const J = [s, "pkt-select"].join(" ");
|
|
11640
11654
|
return /* @__PURE__ */ c(
|
|
11641
|
-
|
|
11655
|
+
As,
|
|
11642
11656
|
{
|
|
11643
11657
|
className: J,
|
|
11644
11658
|
forId: `${g}-input`,
|
|
@@ -11675,23 +11689,23 @@ const zc = Z(
|
|
|
11675
11689
|
);
|
|
11676
11690
|
}
|
|
11677
11691
|
);
|
|
11678
|
-
|
|
11679
|
-
const
|
|
11692
|
+
Yc.displayName = "PktSelect";
|
|
11693
|
+
const Gc = /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: /* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "7", style: { fill: "var(--pkt-color-grays-grey-200, #CCC)" } }) }), Zc = /* @__PURE__ */ S("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: [
|
|
11680
11694
|
/* @__PURE__ */ c("circle", { opacity: ".15", cx: "12", cy: "12", r: "12", fill: "#2A2859" }),
|
|
11681
11695
|
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "6", fill: "#2A2859" })
|
|
11682
|
-
] }),
|
|
11696
|
+
] }), Xc = /* @__PURE__ */ S("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: [
|
|
11683
11697
|
/* @__PURE__ */ c("path", { fill: "#2A2859", d: "M3 3h18v18H3z" }),
|
|
11684
11698
|
/* @__PURE__ */ c("path", { d: "m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z", fill: "#F1FDFF" })
|
|
11685
|
-
] }),
|
|
11699
|
+
] }), sd = ({ children: i, className: t, status: e = "incomplete", title: s }) => /* @__PURE__ */ S("li", { className: K("pkt-step", t, `pkt-step--${e}`), "data-testid": "pkt-step", children: [
|
|
11686
11700
|
/* @__PURE__ */ c("span", { className: "pkt-step__line pkt-step__line--1", "aria-hidden": !0 }),
|
|
11687
11701
|
/* @__PURE__ */ c("span", { className: "pkt-step__line pkt-step__line--2", "aria-hidden": !0 }),
|
|
11688
|
-
/* @__PURE__ */ c("span", { className: K("pkt-step__indicator"), children: e === "current" ?
|
|
11702
|
+
/* @__PURE__ */ c("span", { className: K("pkt-step__indicator"), children: e === "current" ? Zc : e === "completed" ? Xc : Gc }),
|
|
11689
11703
|
/* @__PURE__ */ c("span", { className: "pkt-step__line pkt-step__line--3", "aria-hidden": !0 }),
|
|
11690
11704
|
/* @__PURE__ */ S("div", { className: "pkt-step__wrapper", children: [
|
|
11691
11705
|
/* @__PURE__ */ c("div", { className: "pkt-step__title", children: s }),
|
|
11692
11706
|
/* @__PURE__ */ c("div", { className: "pkt-step__content", children: i })
|
|
11693
11707
|
] })
|
|
11694
|
-
] }),
|
|
11708
|
+
] }), Jc = Z(
|
|
11695
11709
|
({
|
|
11696
11710
|
activeStep: i,
|
|
11697
11711
|
className: t,
|
|
@@ -11705,7 +11719,7 @@ const qc = /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width
|
|
|
11705
11719
|
t,
|
|
11706
11720
|
"pkt-stepper",
|
|
11707
11721
|
a === "horizontal" ? "pkt-stepper--horizontal" : "pkt-stepper--vertical"
|
|
11708
|
-
), p =
|
|
11722
|
+
), p = zs.map(e, (g, v) => Ha(g) ? Ua(g, {
|
|
11709
11723
|
className: K(g.props.className, {
|
|
11710
11724
|
"pkt-step--hideStep": s && v !== i,
|
|
11711
11725
|
"pkt-step--hideContent": n && v !== i
|
|
@@ -11714,8 +11728,8 @@ const qc = /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", width
|
|
|
11714
11728
|
return /* @__PURE__ */ c("ol", { "data-testid": "pkt-stepper", className: u, ref: l, ...r, children: p });
|
|
11715
11729
|
}
|
|
11716
11730
|
);
|
|
11717
|
-
|
|
11718
|
-
const
|
|
11731
|
+
Jc.displayName = "PktStepper";
|
|
11732
|
+
const nd = ({
|
|
11719
11733
|
className: i,
|
|
11720
11734
|
compact: t = !1,
|
|
11721
11735
|
skin: e = "basic",
|
|
@@ -11736,7 +11750,7 @@ const td = ({
|
|
|
11736
11750
|
...a,
|
|
11737
11751
|
children: n
|
|
11738
11752
|
}
|
|
11739
|
-
),
|
|
11753
|
+
), ad = ({ id: i, children: t, className: e, ...s }) => /* @__PURE__ */ c("tbody", { id: i, className: K(e, "pkt-table__body", {}), ...s, role: "rowgroup", children: t }), rd = ({ children: i, className: t, dataLabel: e, ...s }) => /* @__PURE__ */ c(
|
|
11740
11754
|
"td",
|
|
11741
11755
|
{
|
|
11742
11756
|
className: K(t, "pkt-table__data-cell", {}),
|
|
@@ -11746,7 +11760,7 @@ const td = ({
|
|
|
11746
11760
|
...s,
|
|
11747
11761
|
children: i
|
|
11748
11762
|
}
|
|
11749
|
-
),
|
|
11763
|
+
), od = ({ className: i, children: t, ...e }) => /* @__PURE__ */ c("thead", { className: K(i, "pkt-table__header", {}), role: "rowgroup", ...e, children: t }), ld = ({ className: i, children: t, ...e }) => /* @__PURE__ */ c("th", { className: K(i, "pkt-table__header-cell", {}), role: "columnheader", ...e, children: t }), hd = ({ className: i, children: t, ...e }) => /* @__PURE__ */ c("tr", { className: K(i, "pkt-table__row", {}), role: "row", ...e, children: t }), Ia = Z(
|
|
11750
11764
|
({
|
|
11751
11765
|
children: i,
|
|
11752
11766
|
skin: t,
|
|
@@ -11768,7 +11782,7 @@ const td = ({
|
|
|
11768
11782
|
var J, St;
|
|
11769
11783
|
x(((St = (J = T.current) == null ? void 0 : J.textContent) == null ? void 0 : St.trim()) ?? "");
|
|
11770
11784
|
}, [i]);
|
|
11771
|
-
const I =
|
|
11785
|
+
const I = Jn(() => {
|
|
11772
11786
|
if (n && !l) return M && `Klikk for å fjerne ${M}` || g;
|
|
11773
11787
|
}, [n, l, M, g]), A = {
|
|
11774
11788
|
"pkt-tag": !0,
|
|
@@ -11807,10 +11821,10 @@ const td = ({
|
|
|
11807
11821
|
] });
|
|
11808
11822
|
}
|
|
11809
11823
|
);
|
|
11810
|
-
|
|
11811
|
-
const
|
|
11824
|
+
Ia.displayName = "PktTag";
|
|
11825
|
+
const La = Z(
|
|
11812
11826
|
({ children: i, active: t, href: e, onClick: s, icon: n, controls: a, tag: r, tagSkin: l, index: u = 0 }, p) => {
|
|
11813
|
-
const { arrowNav: g, registerTabRef: v, handleKeyPress: y, selectTab: $ } =
|
|
11827
|
+
const { arrowNav: g, registerTabRef: v, handleKeyPress: y, selectTab: $ } = Qc(), w = {
|
|
11814
11828
|
"aria-selected": g ? !!t : void 0,
|
|
11815
11829
|
"aria-controls": a,
|
|
11816
11830
|
role: g ? "tab" : void 0,
|
|
@@ -11825,20 +11839,20 @@ const Ra = Z(
|
|
|
11825
11839
|
}, T = /* @__PURE__ */ S(Jt, { children: [
|
|
11826
11840
|
n && /* @__PURE__ */ c(z, { name: n, className: "pkt-icon--small" }),
|
|
11827
11841
|
i,
|
|
11828
|
-
r && /* @__PURE__ */ c(
|
|
11842
|
+
r && /* @__PURE__ */ c(Ia, { skin: l, size: "small", children: r })
|
|
11829
11843
|
] });
|
|
11830
11844
|
return e ? /* @__PURE__ */ c("a", { ...w, href: e, className: `pkt-tabs__link ${t ? "active" : ""}`, children: T }) : /* @__PURE__ */ c("button", { ...w, type: "button", className: `pkt-tabs__button pkt-link-button ${t ? "active" : ""}`, children: T });
|
|
11831
11845
|
}
|
|
11832
11846
|
);
|
|
11833
|
-
|
|
11834
|
-
const
|
|
11835
|
-
const i =
|
|
11847
|
+
La.displayName = "PktTabItem";
|
|
11848
|
+
const Ba = Zn(null), Qc = () => {
|
|
11849
|
+
const i = Xn(Ba);
|
|
11836
11850
|
if (!i)
|
|
11837
11851
|
throw new Error("TabItem must be used within a Tabs component");
|
|
11838
11852
|
return i;
|
|
11839
|
-
},
|
|
11853
|
+
}, tu = Z(
|
|
11840
11854
|
({ arrowNav: i = !0, disableArrowNav: t = !1, tabs: e, onTabSelected: s, children: n }, a) => {
|
|
11841
|
-
const r = Xt([]), l = i && !t, p = n &&
|
|
11855
|
+
const r = Xt([]), l = i && !t, p = n && zs.count(n) > 0 ? zs.count(n) : (e == null ? void 0 : e.length) || 0;
|
|
11842
11856
|
Nt(() => {
|
|
11843
11857
|
r.current = r.current.slice(0, p);
|
|
11844
11858
|
}, [p]);
|
|
@@ -11853,7 +11867,7 @@ const Ia = Gn(null), Gc = () => {
|
|
|
11853
11867
|
}, $ = e == null ? void 0 : e.map((k, w) => {
|
|
11854
11868
|
var T, M;
|
|
11855
11869
|
return /* @__PURE__ */ c(
|
|
11856
|
-
|
|
11870
|
+
La,
|
|
11857
11871
|
{
|
|
11858
11872
|
active: k.active,
|
|
11859
11873
|
href: k.href,
|
|
@@ -11868,11 +11882,11 @@ const Ia = Gn(null), Gc = () => {
|
|
|
11868
11882
|
w
|
|
11869
11883
|
);
|
|
11870
11884
|
});
|
|
11871
|
-
return /* @__PURE__ */ c(
|
|
11885
|
+
return /* @__PURE__ */ c(Ba.Provider, { value: { arrowNav: l, registerTabRef: y, handleKeyPress: v, selectTab: g }, children: /* @__PURE__ */ c("div", { className: "pkt-tabs", ref: a, children: /* @__PURE__ */ c("div", { className: "pkt-tabs__list", role: l ? "tablist" : "navigation", children: n || $ }) }) });
|
|
11872
11886
|
}
|
|
11873
11887
|
);
|
|
11874
|
-
|
|
11875
|
-
const
|
|
11888
|
+
tu.displayName = "PktTabs";
|
|
11889
|
+
const eu = Z(
|
|
11876
11890
|
({
|
|
11877
11891
|
id: i,
|
|
11878
11892
|
ariaDescribedby: t,
|
|
@@ -11914,7 +11928,7 @@ const Xc = Z(
|
|
|
11914
11928
|
return Nt(() => {
|
|
11915
11929
|
et !== void 0 && Ot((et == null ? void 0 : et.length) || 0);
|
|
11916
11930
|
}, [et]), /* @__PURE__ */ c(
|
|
11917
|
-
|
|
11931
|
+
As,
|
|
11918
11932
|
{
|
|
11919
11933
|
ariaDescribedby: t,
|
|
11920
11934
|
className: Ft,
|
|
@@ -11963,48 +11977,48 @@ const Xc = Z(
|
|
|
11963
11977
|
);
|
|
11964
11978
|
}
|
|
11965
11979
|
);
|
|
11966
|
-
|
|
11980
|
+
eu.displayName = "PktTextarea";
|
|
11967
11981
|
export {
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11982
|
+
Wa as PktAccordion,
|
|
11983
|
+
fc as PktAccordionItem,
|
|
11984
|
+
Pa as PktAlert,
|
|
11985
|
+
bc as PktBackLink,
|
|
11986
|
+
yc as PktBreadcrumbs,
|
|
11973
11987
|
we as PktButton,
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11988
|
+
_c as PktCard,
|
|
11989
|
+
wc as PktCheckbox,
|
|
11990
|
+
Sc as PktCombobox,
|
|
11991
|
+
ln as PktConsent,
|
|
11992
|
+
Tc as PktDatepicker,
|
|
11993
|
+
ed as PktFooter,
|
|
11994
|
+
id as PktFooterSimple,
|
|
11995
|
+
Ec as PktHeader,
|
|
11996
|
+
Ra as PktHeaderService,
|
|
11997
|
+
Dc as PktHeading,
|
|
11998
|
+
Ic as PktHelptext,
|
|
11985
11999
|
z as PktIcon,
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12000
|
+
Lc as PktInput,
|
|
12001
|
+
As as PktInputWrapper,
|
|
12002
|
+
hn as PktLink,
|
|
12003
|
+
Bc as PktLinkCard,
|
|
12004
|
+
Vc as PktLoader,
|
|
12005
|
+
jc as PktMessagebox,
|
|
12006
|
+
Uc as PktModal,
|
|
12007
|
+
qc as PktProgressbar,
|
|
12008
|
+
Wc as PktRadioButton,
|
|
12009
|
+
Kc as PktSearchInput,
|
|
12010
|
+
Yc as PktSelect,
|
|
12011
|
+
sd as PktStep,
|
|
12012
|
+
Jc as PktStepper,
|
|
12013
|
+
La as PktTabItem,
|
|
12014
|
+
nd as PktTable,
|
|
12015
|
+
ad as PktTableBody,
|
|
12016
|
+
rd as PktTableDataCell,
|
|
12017
|
+
od as PktTableHeader,
|
|
12018
|
+
ld as PktTableHeaderCell,
|
|
12019
|
+
hd as PktTableRow,
|
|
12020
|
+
tu as PktTabs,
|
|
12021
|
+
Ia as PktTag,
|
|
12022
|
+
eu as PktTextarea,
|
|
12023
|
+
Xs as PktTextinput
|
|
12010
12024
|
};
|