@oslokommune/punkt-react 18.6.1 → 18.7.0

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.
@@ -62,7 +62,7 @@ var M = /* @__PURE__ */ O((/* @__PURE__ */ E(((e, t) => {
62
62
  return n;
63
63
  }) : window.classNames = n;
64
64
  })();
65
- })))(), 1), N = "https://punkt-cdn.oslo.kommune.no/18.6/icons/";
65
+ })))(), 1), N = "https://punkt-cdn.oslo.kommune.no/18.7/icons/";
66
66
  typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || N);
67
67
  var P = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", ee = {}, te = 2, ne = 1500, F = typeof Storage < "u" && typeof sessionStorage < "u", re = typeof window < "u" ? d : c, ie = (e, t) => !e || !F ? "" : sessionStorage.getItem(t + e + ".svg") ?? "", ae = (e) => window.pktFetch(e).then((t) => {
68
68
  if (!t.ok) throw Error("Missing icon: " + e);
@@ -527,7 +527,7 @@ var he = {
527
527
  };
528
528
  //#endregion
529
529
  //#region src/components/button/Button.tsx
530
- typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/18.6/animations/");
530
+ typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/18.7/animations/");
531
531
  var X = i(({ children: e, className: t, iconName: n = "user", secondIconName: r = "user", iconPath: i, secondIconPath: a, size: o = "medium", fullWidth: s = !1, fullWidthOnMobile: c = !1, skin: l = "primary", type: u = "button", variant: d = "label-only", state: f, color: p, isLoading: m = void 0, disabled: h = void 0, loadingAnimationPath: g = window.pktAnimationPath, ...y }, b) => {
532
532
  let x = [
533
533
  t,
@@ -2757,8 +2757,19 @@ var In = ({ state: e }) => {
2757
2757
  });
2758
2758
  Ln.displayName = "PktCalendar";
2759
2759
  //#endregion
2760
- //#region src/components/heading/Heading.tsx
2761
- var Rn = (e) => {
2760
+ //#region ../../shared-types/header-footer.ts
2761
+ var Rn = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", zn = "https://www.oslo.kommune.no", Bn = {
2762
+ headingLevel: 3,
2763
+ layout: "vertical",
2764
+ skin: "outlined",
2765
+ padding: "default",
2766
+ tagPosition: "top",
2767
+ openLinkInNewTab: !1,
2768
+ borderOnHover: !0,
2769
+ zoom: !1,
2770
+ imageShape: "square",
2771
+ restrictImageHeight: !1
2772
+ }, Vn = (e) => {
2762
2773
  switch (e) {
2763
2774
  case 1: return "xlarge";
2764
2775
  case 2: return "large";
@@ -2768,7 +2779,7 @@ var Rn = (e) => {
2768
2779
  case 6: return "xsmall";
2769
2780
  default: return "medium";
2770
2781
  }
2771
- }, zn = (e) => {
2782
+ }, Hn = (e) => {
2772
2783
  switch (e) {
2773
2784
  case 1:
2774
2785
  case 2: return "regular";
@@ -2778,8 +2789,8 @@ var Rn = (e) => {
2778
2789
  case 6: return "medium";
2779
2790
  default: return "medium";
2780
2791
  }
2781
- }, Bn = i(function({ level: e = 2, size: t, weight: n, visuallyHidden: r, align: i, className: a, children: o, ...s }, c) {
2782
- let l = t ?? Rn(e), u = n ?? zn(e), d = (0, M.default)("pkt-heading", `pkt-heading--${l}`, `pkt-heading--fw-${u}`, i && `pkt-heading--${i}`, r && "pkt-sr-only", a), f = `h${e}`;
2792
+ }, Un = i(function({ level: e = 2, size: t, weight: n, visuallyHidden: r, align: i, className: a, children: o, ...s }, c) {
2793
+ let l = t ?? Vn(e), u = n ?? Hn(e), d = (0, M.default)("pkt-heading", `pkt-heading--${l}`, `pkt-heading--fw-${u}`, i && `pkt-heading--${i}`, r && "pkt-sr-only", a), f = `h${e}`;
2783
2794
  return /* @__PURE__ */ _(f, {
2784
2795
  ...s,
2785
2796
  ref: c,
@@ -2787,10 +2798,10 @@ var Rn = (e) => {
2787
2798
  children: o
2788
2799
  });
2789
2800
  });
2790
- Bn.displayName = "PktHeading";
2801
+ Un.displayName = "PktHeading";
2791
2802
  //#endregion
2792
2803
  //#region src/components/tag/Tag.tsx
2793
- var Vn = i(({ children: e, skin: t = "blue", textStyle: n, size: r = "medium", closeTag: i, className: a, iconName: s, ariaLabel: l, onClose: u, type: d = "button", "aria-description": h, strings: g, ...y }, b) => {
2804
+ var Wn = i(({ children: e, skin: t = "blue", textStyle: n, size: r = "medium", closeTag: i, className: a, iconName: s, ariaLabel: l, onClose: u, type: d = "button", "aria-description": h, strings: g, ...y }, b) => {
2794
2805
  let [x, S] = m(!1), C = o(() => {
2795
2806
  S(!0), u && u();
2796
2807
  }, [u]), w = p(null), [T, E] = m("");
@@ -2854,10 +2865,10 @@ var Vn = i(({ children: e, skin: t = "blue", textStyle: n, size: r = "medium", c
2854
2865
  })]
2855
2866
  });
2856
2867
  });
2857
- Vn.displayName = "PktTag";
2868
+ Wn.displayName = "PktTag";
2858
2869
  //#endregion
2859
2870
  //#region src/components/card/Card.tsx
2860
- var Hn = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHover: i = !0, metaTrail: a, layout: o = "vertical", heading: s = "", headingLevel: c = 3, image: l, imageShape: u = "square", imageAspect: d, restrictImageHeight: f = !1, clickCardLink: p, padding: m = "default", openLinkInNewTab: h = !1, skin: g = "outlined", subheading: y = "", tagPosition: b = "top", zoom: x = !1, tags: S = [], ...C }, w) => {
2871
+ var Gn = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHover: i = Bn.borderOnHover, metaTrail: a, layout: o = Bn.layout, heading: s = "", headingLevel: c = Bn.headingLevel, image: l, imageShape: u = Bn.imageShape, imageAspect: d, restrictImageHeight: f = Bn.restrictImageHeight, clickCardLink: p, padding: m = Bn.padding, openLinkInNewTab: h = Bn.openLinkInNewTab, skin: g = Bn.skin, subheading: y = "", tagPosition: b = Bn.tagPosition, zoom: x = Bn.zoom, tags: S = [], ...C }, w) => {
2861
2872
  let T = (0, M.default)({
2862
2873
  "pkt-card": !0,
2863
2874
  [`pkt-card--${g}`]: g,
@@ -2875,7 +2886,7 @@ var Hn = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
2875
2886
  className: (0, M.default)("pkt-card__tags", `pkt-card__tags-${b}`),
2876
2887
  role: "list",
2877
2888
  "aria-label": S.length > 1 ? "merkelapper" : "merkelapp",
2878
- children: S.map((e, t) => /* @__PURE__ */ _(Vn, {
2889
+ children: S.map((e, t) => /* @__PURE__ */ _(Wn, {
2879
2890
  role: "listitem",
2880
2891
  textStyle: "normal-text",
2881
2892
  size: "medium",
@@ -2883,13 +2894,13 @@ var Hn = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
2883
2894
  iconName: e.iconName,
2884
2895
  children: /* @__PURE__ */ _("span", { children: e.text })
2885
2896
  }, t))
2886
- }), A = () => !s || p ? null : /* @__PURE__ */ _(Bn, {
2897
+ }), A = () => !s || p ? null : /* @__PURE__ */ _(Un, {
2887
2898
  className: "pkt-card__heading",
2888
2899
  level: c,
2889
2900
  size: "medium",
2890
2901
  weight: "regular",
2891
2902
  children: s
2892
- }), j = () => p ? /* @__PURE__ */ _(Bn, {
2903
+ }), j = () => p ? /* @__PURE__ */ _(Un, {
2893
2904
  className: "pkt-card__link-heading pkt-card__heading",
2894
2905
  level: c,
2895
2906
  size: "medium",
@@ -2941,10 +2952,10 @@ var Hn = i(({ children: e, className: t, ariaLabel: n, metaLead: r, borderOnHove
2941
2952
  })]
2942
2953
  });
2943
2954
  });
2944
- Hn.displayName = "PktCard";
2955
+ Gn.displayName = "PktCard";
2945
2956
  //#endregion
2946
2957
  //#region src/components/checkbox/Checkbox.tsx
2947
- var Un = i(({ id: e, hasTile: t = !1, disabled: n = !1, label: r, checkHelptext: i, hasError: a = !1, className: o, isSwitch: s = !1, hideLabel: l = !1, labelPosition: u = "right", defaultChecked: d, checked: f, indeterminate: m, optionalTag: h, optionalText: y, requiredTag: b, requiredText: x, strings: S, tagText: C, ...w }, T) => {
2958
+ var Kn = i(({ id: e, hasTile: t = !1, disabled: n = !1, label: r, checkHelptext: i, hasError: a = !1, className: o, isSwitch: s = !1, hideLabel: l = !1, labelPosition: u = "right", defaultChecked: d, checked: f, indeterminate: m, optionalTag: h, optionalText: y, requiredTag: b, requiredText: x, strings: S, tagText: C, ...w }, T) => {
2948
2959
  let E = ge(["forms"], S), D = p(null);
2949
2960
  c(() => {
2950
2961
  D.current && m !== void 0 && (D.current.indeterminate = m);
@@ -3024,10 +3035,10 @@ var Un = i(({ id: e, hasTile: t = !1, disabled: n = !1, label: r, checkHelptext:
3024
3035
  })
3025
3036
  });
3026
3037
  });
3027
- Un.displayName = "PktCheckbox";
3038
+ Kn.displayName = "PktCheckbox";
3028
3039
  //#endregion
3029
3040
  //#region src/hooks/useFocusModality.ts
3030
- function Wn(e) {
3041
+ function qn(e) {
3031
3042
  let t = p(null), n = p(!1), r = p(void 0), i = (e) => {
3032
3043
  let n = t.current;
3033
3044
  n && (e === void 0 ? delete n.dataset.navtype : n.dataset.navtype = e);
@@ -3053,14 +3064,14 @@ function Wn(e) {
3053
3064
  }
3054
3065
  //#endregion
3055
3066
  //#region ../../shared-utils/forms/described-by.ts
3056
- var Gn = (e) => {
3067
+ var Jn = (e) => {
3057
3068
  let t = [];
3058
3069
  return e.hasHelptext && t.push(`${e.id}-helptext`), e.hasCounter && t.push(`${e.id}-counter-status`), e.ariaDescribedby && t.push(e.ariaDescribedby), t.length ? t.join(" ") : void 0;
3059
- }, Kn = (e) => `${e}-counter-status`, qn = (e, t) => !!t && t > 0 && (e ?? 0) > t, Jn = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toString(16)).slice(-16), Yn = () => {
3060
- let e = Jn(), t = Jn();
3070
+ }, Yn = (e) => `${e}-counter-status`, Xn = (e, t) => !!t && t > 0 && (e ?? 0) > t, Zn = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toString(16)).slice(-16), Qn = () => {
3071
+ let e = Zn(), t = Zn();
3061
3072
  return e.slice(0, 8) + "-" + e.slice(8, 12) + "-4" + e.slice(13) + "-a" + t.slice(1, 4) + "-" + t.slice(4);
3062
- }, Xn = "Les mer <span class='pkt-sr-only'>om feltet</span>", Zn = (e) => e == null || e === "" ? null : typeof e == "string" ? /* @__PURE__ */ _("span", { dangerouslySetInnerHTML: { __html: e } }) : e, Qn = i(function({ helptext: e, helptextDropdown: t, helptextDropdownButton: n, forId: r, onToggleHelpText: i, className: a, children: o, ...s }, c) {
3063
- let [l, u] = m(!1), d = f(() => Yn(), []), p = r || d, h = () => {
3073
+ }, $n = "Les mer <span class='pkt-sr-only'>om feltet</span>", er = (e) => e == null || e === "" ? null : typeof e == "string" ? /* @__PURE__ */ _("span", { dangerouslySetInnerHTML: { __html: e } }) : e, tr = i(function({ helptext: e, helptextDropdown: t, helptextDropdownButton: n, forId: r, onToggleHelpText: i, className: a, children: o, ...s }, c) {
3074
+ let [l, u] = m(!1), d = f(() => Qn(), []), p = r || d, h = () => {
3064
3075
  let e = !l;
3065
3076
  u(e), i?.(e);
3066
3077
  }, g = (0, M.default)("pkt-inputwrapper__helptext-container", !!(e || t || o) && "pkt-inputwrapper__has-helptext", a);
@@ -3074,7 +3085,7 @@ var Gn = (e) => {
3074
3085
  children: [o && /* @__PURE__ */ _("div", {
3075
3086
  className: "pkt-contents",
3076
3087
  children: o
3077
- }), Zn(e)]
3088
+ }), er(e)]
3078
3089
  }), t && /* @__PURE__ */ v("div", {
3079
3090
  className: "pkt-inputwrapper__helptext-expandable",
3080
3091
  children: [/* @__PURE__ */ v("button", {
@@ -3088,21 +3099,21 @@ var Gn = (e) => {
3088
3099
  name: l ? "chevron-thin-up" : "chevron-thin-down"
3089
3100
  }), /* @__PURE__ */ _("span", {
3090
3101
  className: "pkt-btn__text",
3091
- dangerouslySetInnerHTML: { __html: n ?? Xn }
3102
+ dangerouslySetInnerHTML: { __html: n ?? $n }
3092
3103
  })]
3093
3104
  }), /* @__PURE__ */ _("div", {
3094
3105
  id: `${p}-helptext-expandable`,
3095
3106
  className: (0, M.default)("pkt-inputwrapper__helptext", l ? "pkt-inputwrapper__helptext-expandable-open" : "pkt-inputwrapper__helptext-expandable-closed"),
3096
- children: Zn(t)
3107
+ children: er(t)
3097
3108
  })]
3098
3109
  })]
3099
3110
  });
3100
3111
  });
3101
- Qn.displayName = "PktHelptext";
3112
+ tr.displayName = "PktHelptext";
3102
3113
  //#endregion
3103
3114
  //#region src/components/inputwrapper/InputWrapper.tsx
3104
- var $n = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDropdownButton: i, counter: a, counterCurrent: o = 0, counterMaxLength: s, optionalTag: c = !1, optionalText: l, requiredTag: u = !1, requiredText: d, tagText: p = null, hasError: m = !1, errorMessage: h, disabled: y = !1, inline: b = !1, ariaDescribedby: x, useWrapper: S = !0, children: C, className: w = "", hasFieldset: T = !1, role: E, counterPosition: D = "bottom", size: O = "medium", strings: k }, A) => {
3105
- let j = Wn(A), M = ge(["forms", "validation"], k), N = f(() => Yn(), []), P = e || N, ee = x || (n ? `${P}-helptext` : void 0), te = !!a, ne = te && D === "top", F = te && D === "bottom", re = [
3115
+ var nr = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDropdownButton: i, counter: a, counterCurrent: o = 0, counterMaxLength: s, optionalTag: c = !1, optionalText: l, requiredTag: u = !1, requiredText: d, tagText: p = null, hasError: m = !1, errorMessage: h, disabled: y = !1, inline: b = !1, ariaDescribedby: x, useWrapper: S = !0, children: C, className: w = "", hasFieldset: T = !1, role: E, counterPosition: D = "bottom", size: O = "medium", strings: k }, A) => {
3116
+ let j = qn(A), M = ge(["forms", "validation"], k), N = f(() => Qn(), []), P = e || N, ee = x || (n ? `${P}-helptext` : void 0), te = !!a, ne = te && D === "top", F = te && D === "bottom", re = [
3106
3117
  "pkt-inputwrapper",
3107
3118
  w,
3108
3119
  m ? "pkt-inputwrapper--error" : "",
@@ -3113,13 +3124,13 @@ var $n = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDrop
3113
3124
  "pkt-tag",
3114
3125
  "pkt-tag--small",
3115
3126
  "pkt-tag--thin-text"
3116
- ].join(" "), ae = qn(o, s), oe = () => te ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
3127
+ ].join(" "), ae = Xn(o, s), oe = () => te ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
3117
3128
  className: "pkt-input__counter",
3118
3129
  "aria-hidden": "true",
3119
3130
  children: [o, s ? `/${s}` : ""]
3120
3131
  }), /* @__PURE__ */ _("div", {
3121
3132
  className: "pkt-sr-only",
3122
- id: Kn(P),
3133
+ id: Yn(P),
3123
3134
  "aria-live": "polite",
3124
3135
  children: ae ? B(M.validation.counterExceeded, {
3125
3136
  current: o,
@@ -3161,7 +3172,7 @@ var $n = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDrop
3161
3172
  });
3162
3173
  }, L = () => {
3163
3174
  let e = S ? n : void 0;
3164
- return !e && !r ? null : /* @__PURE__ */ _(Qn, {
3175
+ return !e && !r ? null : /* @__PURE__ */ _(tr, {
3165
3176
  forId: P,
3166
3177
  helptext: e,
3167
3178
  helptextDropdown: r,
@@ -3200,25 +3211,25 @@ var $n = i(({ forId: e, label: t, helptext: n, helptextDropdown: r, helptextDrop
3200
3211
  })
3201
3212
  });
3202
3213
  });
3203
- $n.displayName = "PktInputWrapper";
3214
+ nr.displayName = "PktInputWrapper";
3204
3215
  //#endregion
3205
3216
  //#region ../../shared-utils/combobox/option-utils.ts
3206
- var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label === t)) || null, tr = (e, t) => {
3217
+ var rr = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label === t)) || null, ir = (e, t) => {
3207
3218
  if (!t) return -1;
3208
3219
  let n = e.findIndex((e) => e.value === t);
3209
3220
  return n >= 0 ? n : e.findIndex((e) => e.label === t);
3210
- }, nr = (e, t) => {
3221
+ }, ar = (e, t) => {
3211
3222
  if (!t) return [...e];
3212
3223
  let n = t.toLowerCase();
3213
3224
  return e.filter((e) => (e.fulltext || e.value + (e.label || "") + (e.prefix || "")).toLowerCase().includes(n));
3214
- }, rr = (e) => e.value + (e.label || "") + (e.prefix || ""), ir = (e, t) => t !== null && e >= t, ar = (e, t) => {
3225
+ }, or = (e) => e.value + (e.label || "") + (e.prefix || ""), sr = (e, t) => t !== null && e >= t, cr = (e, t) => {
3215
3226
  if (!e) return "";
3216
3227
  switch (t) {
3217
3228
  case "prefixAndValue": return `${e.prefix || ""} ${e.value}`.trim();
3218
3229
  case "value": return e.value;
3219
3230
  default: return e.label || e.value;
3220
3231
  }
3221
- }, or = (e, t) => e ? Array.isArray(e) ? t ? e : e.length > 0 ? [e[0]] : [] : t ? e.split(",").filter(Boolean) : [e] : [], sr = (e, t) => {
3232
+ }, lr = (e, t) => e ? Array.isArray(e) ? t ? e : e.length > 0 ? [e[0]] : [] : t ? e.split(",").filter(Boolean) : [e] : [], ur = (e, t) => {
3222
3233
  if (!t) return {
3223
3234
  filtered: [...e],
3224
3235
  suggestion: null
@@ -3228,7 +3239,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3228
3239
  filtered: r,
3229
3240
  suggestion: r.find((e) => !e.selected && e.label?.toLowerCase().startsWith(n)) || null
3230
3241
  };
3231
- }, cr = (e, t, n, r) => {
3242
+ }, dr = (e, t, n, r) => {
3232
3243
  if (!e.trim()) return {
3233
3244
  addValueText: null,
3234
3245
  userInfoMessage: ""
@@ -3247,7 +3258,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3247
3258
  addValueText: null,
3248
3259
  userInfoMessage: ""
3249
3260
  };
3250
- }, lr = (e, t, n) => {
3261
+ }, fr = (e, t, n) => {
3251
3262
  switch (e) {
3252
3263
  case ",": return n ? "addValue" : null;
3253
3264
  case "Enter": return "addValue";
@@ -3256,12 +3267,12 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3256
3267
  case "Escape": return "closeOptions";
3257
3268
  default: return null;
3258
3269
  }
3259
- }, ur = (e, t, n, r, i) => {
3270
+ }, pr = (e, t, n, r, i) => {
3260
3271
  if (!e) return {
3261
3272
  action: "none",
3262
3273
  value: null
3263
3274
  };
3264
- let a = er(n, e);
3275
+ let a = rr(n, e);
3265
3276
  return !t.includes(e) && !a ? r ? {
3266
3277
  action: "addUserValue",
3267
3278
  value: e
@@ -3278,36 +3289,36 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3278
3289
  action: "none",
3279
3290
  value: null
3280
3291
  };
3281
- }, dr = (e, t, n) => {
3282
- let r = er(t, e);
3292
+ }, mr = (e, t, n) => {
3293
+ let r = rr(t, e);
3283
3294
  return n === "label" && r?.label ? r.label : e;
3284
- }, fr = (e) => {
3295
+ }, hr = (e) => {
3285
3296
  e.scrollIntoView({ block: "nearest" }), window.setTimeout(() => e.focus(), 0);
3286
- }, pr = (e) => Array.from(e.querySelectorAll("[role=\"option\"]:not([data-disabled])") || []), mr = (e) => {
3297
+ }, gr = (e) => Array.from(e.querySelectorAll("[role=\"option\"]:not([data-disabled])") || []), _r = (e) => {
3287
3298
  let t = e.nextElementSibling;
3288
- t && fr(t);
3289
- }, hr = (e, t, n) => {
3299
+ t && hr(t);
3300
+ }, vr = (e, t, n) => {
3290
3301
  let r = e.previousElementSibling;
3291
3302
  if (e.dataset.index === "0" && n) {
3292
3303
  let e = t.querySelector("[role=\"searchbox\"]");
3293
- e && fr(e);
3294
- } else r && fr(r);
3295
- }, gr = (e) => {
3296
- let t = pr(e);
3297
- t[0] && fr(t[0]);
3298
- }, _r = (e, t) => {
3304
+ e && hr(e);
3305
+ } else r && hr(r);
3306
+ }, yr = (e) => {
3307
+ let t = gr(e);
3308
+ t[0] && hr(t[0]);
3309
+ }, br = (e, t) => {
3299
3310
  if (t.disabled) return;
3300
- let n = pr(e);
3311
+ let n = gr(e);
3301
3312
  if (t.allowUserInput && t.customUserInput) {
3302
3313
  let t = e.querySelector("[data-type=\"new-option\"]");
3303
3314
  if (t) {
3304
- fr(t);
3315
+ hr(t);
3305
3316
  return;
3306
3317
  }
3307
3318
  }
3308
3319
  let r = n.find((e) => e.dataset.selected === "true");
3309
3320
  if (r) {
3310
- fr(r);
3321
+ hr(r);
3311
3322
  return;
3312
3323
  }
3313
3324
  if (t.includeSearch && !(document.activeElement instanceof HTMLInputElement)) {
@@ -3317,8 +3328,8 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3317
3328
  return;
3318
3329
  }
3319
3330
  }
3320
- n[0] && fr(n[0]);
3321
- }, vr = ({ state: e, outside: t = !1 }) => {
3331
+ n[0] && hr(n[0]);
3332
+ }, xr = ({ state: e, outside: t = !1 }) => {
3322
3333
  let { values: n, options: r, disabled: i, displayValueAs: a, handleTagRemove: o, handleTagKeydown: s, focusedTagIndex: l } = e, u = p([]);
3323
3334
  if (c(() => {
3324
3335
  !t && l >= 0 && l < n.length && u.current[l]?.focus();
@@ -3328,10 +3339,10 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3328
3339
  n.length
3329
3340
  ]), n.length === 0) return null;
3330
3341
  let d = n.map((e, n) => {
3331
- let c = er(r, e), d = c?.tagSkinColor, f = c ? ar(c, a) : e;
3342
+ let c = rr(r, e), d = c?.tagSkinColor, f = c ? cr(c, a) : e;
3332
3343
  return i ? /* @__PURE__ */ _("li", {
3333
3344
  role: "listitem",
3334
- children: /* @__PURE__ */ _(Vn, {
3345
+ children: /* @__PURE__ */ _(Wn, {
3335
3346
  skin: d || "blue-dark",
3336
3347
  children: /* @__PURE__ */ _("span", {
3337
3348
  className: "pkt-combobox__value",
@@ -3340,7 +3351,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3340
3351
  })
3341
3352
  }, e) : t ? /* @__PURE__ */ _("li", {
3342
3353
  role: "listitem",
3343
- children: /* @__PURE__ */ _(Vn, {
3354
+ children: /* @__PURE__ */ _(Wn, {
3344
3355
  skin: d || "blue-dark",
3345
3356
  closeTag: !0,
3346
3357
  onClose: () => o(e),
@@ -3353,7 +3364,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3353
3364
  role: "listitem",
3354
3365
  onClick: (e) => e.stopPropagation(),
3355
3366
  onMouseDown: (e) => e.preventDefault(),
3356
- children: /* @__PURE__ */ _(Vn, {
3367
+ children: /* @__PURE__ */ _(Wn, {
3357
3368
  ref: (e) => {
3358
3369
  u.current[n] = e;
3359
3370
  },
@@ -3381,17 +3392,17 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3381
3392
  className: "pkt-combobox__tag-list",
3382
3393
  children: d
3383
3394
  });
3384
- }, yr = ({ state: e }) => {
3395
+ }, Sr = ({ state: e }) => {
3385
3396
  let { values: t, options: n, editingSingleValue: r, displayValueAs: i } = e;
3386
3397
  if (r || t.length === 0) return null;
3387
- let a = er(n, t[0]);
3398
+ let a = rr(n, t[0]);
3388
3399
  if (!a) return null;
3389
- let o = ar(a, i);
3400
+ let o = cr(a, i);
3390
3401
  return /* @__PURE__ */ _("span", {
3391
3402
  className: "pkt-combobox__value",
3392
3403
  children: o
3393
3404
  });
3394
- }, br = ({ state: e }) => {
3405
+ }, Cr = ({ state: e }) => {
3395
3406
  let { id: t, inputId: n, listboxId: r, values: i, options: a, isOpen: o, multiple: s, typeahead: c, allowUserInput: l, tagPlacement: u, placeholder: d, disabled: f, fullwidth: p, hasError: m, label: h, inputFocus: g, inputRef: y, triggerRef: b, handleInputChange: x, handleInputKeydown: S, handleInputFocus: C, handleInputBlur: w, handleInputClick: T, handlePlaceholderClick: E, handleSelectOnlyKeydown: D, name: O, inputSize: k } = e, A = [
3396
3407
  "pkt-combobox__input",
3397
3408
  `pkt-combobox__input--${k}`,
@@ -3399,7 +3410,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3399
3410
  o && "pkt-combobox__input--open",
3400
3411
  m && "pkt-combobox__input--error",
3401
3412
  f && "pkt-combobox__input--disabled"
3402
- ].filter(Boolean).join(" "), j = ["pkt-combobox__arrow-icon", o && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "), M = c || l, N = !M && d && (!i.length || s && u === "outside") && !g, P = u !== "outside", ee = i[0] && er(a, i[0]) ? `${r}-${tr(a, i[0])}` : void 0, te = s && i.length > 0 ? `${i.length} valgt` : void 0, ne = M ? { tabIndex: -1 } : {
3413
+ ].filter(Boolean).join(" "), j = ["pkt-combobox__arrow-icon", o && "pkt-combobox__arrow-icon--open"].filter(Boolean).join(" "), M = c || l, N = !M && d && (!i.length || s && u === "outside") && !g, P = u !== "outside", ee = i[0] && rr(a, i[0]) ? `${r}-${ir(a, i[0])}` : void 0, te = s && i.length > 0 ? `${i.length} valgt` : void 0, ne = M ? { tabIndex: -1 } : {
3403
3414
  id: `${t}-combobox`,
3404
3415
  role: "combobox",
3405
3416
  "aria-expanded": o ? "true" : "false",
@@ -3421,7 +3432,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3421
3432
  className: "pkt-combobox__placeholder",
3422
3433
  onClick: E,
3423
3434
  children: d
3424
- }) : P ? s ? /* @__PURE__ */ _(vr, { state: e }) : M ? null : /* @__PURE__ */ _(yr, { state: e }) : null,
3435
+ }) : P ? s ? /* @__PURE__ */ _(xr, { state: e }) : M ? null : /* @__PURE__ */ _(Sr, { state: e }) : null,
3425
3436
  M ? /* @__PURE__ */ _("div", {
3426
3437
  className: "pkt-combobox__input-div combobox__input",
3427
3438
  children: /* @__PURE__ */ _("input", {
@@ -3459,7 +3470,7 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3459
3470
  })
3460
3471
  ]
3461
3472
  });
3462
- }, xr = ({ state: e }) => {
3473
+ }, wr = ({ state: e }) => {
3463
3474
  let t = ge(["listbox"], e.strings), { listboxId: n, label: r, isOpen: i, options: a, filteredOptions: o, multiple: s, disabled: c, maxIsReached: l, maxlength: u, includeSearch: d, allowUserInput: f, addValueText: p, userInfoMessage: m, searchPlaceholder: h, searchValue: y, handleOptionClick: b, handleOptionKeydown: x, handleSearchInput: S, handleSearchKeydown: C, handleNewOptionClick: w, handleNewOptionKeydown: T, listboxRef: E } = e, D = o.filter((e) => e.selected).length, O = s && D > 0 && u != null && u > 0, k = f && p && !l, A = !!m, j = [
3464
3475
  "pkt-listbox",
3465
3476
  i && "pkt-listbox__open",
@@ -3594,15 +3605,15 @@ var er = (e, t) => t && (e.find((e) => e.value === t) || e.find((e) => e.label =
3594
3605
  };
3595
3606
  //#endregion
3596
3607
  //#region src/components/combobox/useComboboxState.ts
3597
- function Sr(e, t) {
3608
+ function Tr(e, t) {
3598
3609
  return e.map((e) => ({
3599
3610
  ...e,
3600
3611
  label: e.label || e.value,
3601
- fulltext: rr(e),
3612
+ fulltext: or(e),
3602
3613
  selected: t.includes(e.value)
3603
3614
  }));
3604
3615
  }
3605
- function Cr(t, n) {
3616
+ function Er(t, n) {
3606
3617
  let { id: r = "", label: i, value: s, defaultValue: l, options: d, defaultOptions: h, multiple: g = !1, maxlength: _, typeahead: v = !1, includeSearch: y = !1, allowUserInput: b = !1, displayValueAs: x = "label", tagPlacement: S, searchPlaceholder: C, placeholder: w, disabled: T = !1, required: E = !1, fullwidth: D = !1, hasError: O = !1, errorMessage: k, helptext: A, helptextDropdown: j, helptextDropdownButton: M, optionalTag: N = !1, optionalText: P, requiredTag: ee = !1, requiredText: te, tagText: ne, useWrapper: F = !0, inline: re = !1, counter: ie, inputSize: ae = "medium", name: oe, className: se, onChange: I, onValueChange: L, children: R, strings: ce } = t, z = `${r}-input`, B = `${r}-listbox`, V = v || b, H = p(null), le = p(null), ue = p(null), U = p(null), de = p(null), W = o(() => {
3607
3618
  V ? H.current?.focus() : ue.current?.focus();
3608
3619
  }, [V]), G = f(() => {
@@ -3620,30 +3631,30 @@ function Cr(t, n) {
3620
3631
  }), t;
3621
3632
  }, [R]), K = f(() => h && h.length > 0 ? h.map((e) => ({
3622
3633
  ...e,
3623
- fulltext: rr(e)
3634
+ fulltext: or(e)
3624
3635
  })) : d && d.length > 0 ? d.map((e) => ({
3625
3636
  ...e,
3626
- fulltext: rr(e)
3637
+ fulltext: or(e)
3627
3638
  })) : G.length > 0 ? G.map((e) => ({
3628
3639
  ...e,
3629
- fulltext: rr(e)
3640
+ fulltext: or(e)
3630
3641
  })) : [], [
3631
3642
  h,
3632
3643
  d,
3633
3644
  G
3634
- ]), fe = s !== void 0, [q, pe] = m(() => or(s ?? l, g)), me = p(q);
3645
+ ]), fe = s !== void 0, [q, pe] = m(() => lr(s ?? l, g)), me = p(q);
3635
3646
  c(() => {
3636
- fe && pe(or(s, g));
3647
+ fe && pe(lr(s, g));
3637
3648
  }, [
3638
3649
  s,
3639
3650
  fe,
3640
3651
  g
3641
3652
  ]);
3642
- let J = fe ? or(s, g) : q, [Y, he] = m([]), X = f(() => Sr([...Y.filter((e) => !K.some((t) => t.value === e.value)), ...K], J), [
3653
+ let J = fe ? lr(s, g) : q, [Y, he] = m([]), X = f(() => Tr([...Y.filter((e) => !K.some((t) => t.value === e.value)), ...K], J), [
3643
3654
  K,
3644
3655
  Y,
3645
3656
  J
3646
- ]), [Z, Q] = m(!1), [_e, ve] = m(""), [ye, be] = m(""), [xe, Se] = m(""), [Ce, we] = m(null), [Te, Ee] = m(!1), [De, Oe] = m(!1), [ke, $] = m(-1), Ae = p(!1), je = ge(["combobox"], ce), Me = xe ? je.combobox[xe] : "", Ne = ir(J.length, _ ?? null), Pe = ie ?? (g && _ != null), Fe = f(() => _e ? v ? sr(X, _e).filtered : nr(X, _e) : X, [
3657
+ ]), [Z, Q] = m(!1), [_e, ve] = m(""), [ye, be] = m(""), [xe, Se] = m(""), [Ce, we] = m(null), [Te, Ee] = m(!1), [De, Oe] = m(!1), [ke, $] = m(-1), Ae = p(!1), je = ge(["combobox"], ce), Me = xe ? je.combobox[xe] : "", Ne = sr(J.length, _ ?? null), Pe = ie ?? (g && _ != null), Fe = f(() => _e ? v ? ur(X, _e).filtered : ar(X, _e) : X, [
3647
3658
  X,
3648
3659
  _e,
3649
3660
  v
@@ -3657,7 +3668,7 @@ function Cr(t, n) {
3657
3668
  le.current && (le.current.value = Re);
3658
3669
  }, [Re]), c(() => {
3659
3670
  if (Z || !H.current) return;
3660
- let e = !g && J[0] ? dr(J[0], X, x) : "";
3671
+ let e = !g && J[0] ? mr(J[0], X, x) : "";
3661
3672
  H.current.value !== e && (H.current.value = e);
3662
3673
  }, [
3663
3674
  J,
@@ -3674,7 +3685,7 @@ function Cr(t, n) {
3674
3685
  Le
3675
3686
  ]), Be = o((e) => {
3676
3687
  if (!e || J.includes(e)) return;
3677
- if (g && ir(J.length, _ ?? null)) {
3688
+ if (g && sr(J.length, _ ?? null)) {
3678
3689
  Se("maxSelected");
3679
3690
  return;
3680
3691
  }
@@ -3688,7 +3699,7 @@ function Cr(t, n) {
3688
3699
  ]), Ve = o((e) => {
3689
3700
  if (!e) return;
3690
3701
  let t = J.filter((t) => t !== e);
3691
- er(X, e)?.userAdded && he((t) => t.filter((t) => t.value !== e)), ze(t);
3702
+ rr(X, e)?.userAdded && he((t) => t.filter((t) => t.value !== e)), ze(t);
3692
3703
  }, [
3693
3704
  J,
3694
3705
  X,
@@ -3700,7 +3711,7 @@ function Cr(t, n) {
3700
3711
  let t;
3701
3712
  if (!g) t = [e];
3702
3713
  else {
3703
- if (er(X, e) || ir(J.length, _ ?? null)) return;
3714
+ if (rr(X, e) || sr(J.length, _ ?? null)) return;
3704
3715
  t = [...J, e];
3705
3716
  }
3706
3717
  let n = {
@@ -3720,7 +3731,7 @@ function Cr(t, n) {
3720
3731
  if (we(null), e && H.current && H.current.type !== "hidden") {
3721
3732
  ve(""), be("");
3722
3733
  let e = t === void 0 ? J[0] : t;
3723
- !g && e ? H.current.value = dr(e, X, x) : H.current.value = "", g || (Oe(!1), Se(""));
3734
+ !g && e ? H.current.value = mr(e, X, x) : H.current.value = "", g || (Oe(!1), Se(""));
3724
3735
  }
3725
3736
  }, [
3726
3737
  g,
@@ -3730,7 +3741,7 @@ function Cr(t, n) {
3730
3741
  ]), Ge = o((e) => {
3731
3742
  if (T) return;
3732
3743
  Se(""), we(null);
3733
- let t = er(X, e)?.value || null, n = J.includes(e || t || ""), r = !!t, i = X.find((t) => t.value === e)?.disabled || !1, a = !e?.trim(), o = !g, s = g, c = ir(J.length, _ ?? null), l = !1, u = !0, d = "", f = "", p;
3744
+ let t = rr(X, e)?.value || null, n = J.includes(e || t || ""), r = !!t, i = X.find((t) => t.value === e)?.disabled || !1, a = !e?.trim(), o = !g, s = g, c = sr(J.length, _ ?? null), l = !1, u = !0, d = "", f = "", p;
3734
3745
  i || (!r && b && !a ? (Ue(e), d = "valueAdded", l = s, o && (p = e || "")) : !r && !b ? (o && J[0] && Ve(J[0]), u = !1, l = !0, d = "noResults") : n ? (Ve(t), l = !0, p = "", o && V && H.current && H.current.type !== "hidden" && (H.current.value = "")) : a && o ? (He(), l = !0, p = "") : o ? (J[0] && Ve(J[0]), Be(t), l = !1, p = t || "") : s && !c ? (Be(t), l = !0) : s && c ? (d = "maxSelected", u = !1, f = e || "") : (o && He(), d = "noValidValue", u = !1, l = !0, f = e || "", p = ""), Q(l), Se(d), ve(f), We(u, p), l || (o && V && (Ae.current = !0), window.setTimeout(() => {
3735
3746
  W();
3736
3747
  }, 0)));
@@ -3753,11 +3764,11 @@ function Cr(t, n) {
3753
3764
  if (!g) {
3754
3765
  if (!e) J[0] && Ve(J[0]), t = void 0;
3755
3766
  else {
3756
- let n = er(X, e);
3767
+ let n = rr(X, e);
3757
3768
  n && n.value !== J[0] ? (J[0] && Ve(J[0]), Be(n.value), t = n.value) : !n && b && (J[0] && Ve(J[0]), Ue(e), t = e);
3758
3769
  }
3759
3770
  } else if (e !== "") {
3760
- let { action: t, value: n } = ur(e, J, X, b, g);
3771
+ let { action: t, value: n } = pr(e, J, X, b, g);
3761
3772
  switch (t) {
3762
3773
  case "addUserValue":
3763
3774
  Ue(n);
@@ -3768,7 +3779,7 @@ function Cr(t, n) {
3768
3779
  case "removeValue": Ve(n);
3769
3780
  }
3770
3781
  }
3771
- !g && t ? H.current.value = dr(t, X, x) : H.current.value = "";
3782
+ !g && t ? H.current.value = mr(t, X, x) : H.current.value = "";
3772
3783
  }
3773
3784
  Q(!1), Oe(!1);
3774
3785
  }, [
@@ -3785,7 +3796,7 @@ function Cr(t, n) {
3785
3796
  we(null), Se(""), !g && J[0] && Ve(J[0]);
3786
3797
  return;
3787
3798
  }
3788
- let t = cr(e, J, X, b);
3799
+ let t = dr(e, J, X, b);
3789
3800
  we(t.addValueText), Se(t.userInfoMessage);
3790
3801
  }, [
3791
3802
  J,
@@ -3797,7 +3808,7 @@ function Cr(t, n) {
3797
3808
  if (T) return;
3798
3809
  let t = e.target.value;
3799
3810
  if (be(t), ve(t), qe(t), v && t) {
3800
- let { suggestion: n } = sr(X, t);
3811
+ let { suggestion: n } = ur(X, t);
3801
3812
  n?.label && H.current && !e.nativeEvent.inputType?.includes("deleteContent") && (H.current.value = n.label, window.setTimeout(() => H.current?.setSelectionRange(t.length, n.label.length), 0));
3802
3813
  }
3803
3814
  }, [
@@ -3819,7 +3830,7 @@ function Cr(t, n) {
3819
3830
  e.preventDefault(), $(J.length - 1);
3820
3831
  return;
3821
3832
  }
3822
- let t = lr(e.key, e.shiftKey, g);
3833
+ let t = fr(e.key, e.shiftKey, g);
3823
3834
  if (t && !(e.key === "Tab" && !Z)) {
3824
3835
  if (t === "focusListbox" && e.key === "Tab" && !U.current?.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]")) {
3825
3836
  Ke();
@@ -3836,7 +3847,7 @@ function Cr(t, n) {
3836
3847
  break;
3837
3848
  }
3838
3849
  case "focusListbox":
3839
- U.current && (Z || Q(!0), _r(U.current, {
3850
+ U.current && (Z || Q(!0), br(U.current, {
3840
3851
  disabled: T,
3841
3852
  allowUserInput: b,
3842
3853
  customUserInput: Ce,
@@ -3864,7 +3875,7 @@ function Cr(t, n) {
3864
3875
  Ae.current = !1, Ee(!0);
3865
3876
  return;
3866
3877
  }
3867
- !g && J[0] && H.current && H.current.type !== "hidden" && (Oe(!0), H.current.value = dr(J[0], X, x)), Ee(!0), ve(""), Q(!0);
3878
+ !g && J[0] && H.current && H.current.type !== "hidden" && (Oe(!0), H.current.value = mr(J[0], X, x)), Ee(!0), ve(""), Q(!0);
3868
3879
  }
3869
3880
  }, [
3870
3881
  T,
@@ -3891,7 +3902,7 @@ function Cr(t, n) {
3891
3902
  else {
3892
3903
  e.stopPropagation(), e.preventDefault();
3893
3904
  let t = !Z;
3894
- Q(t), t && U.current && _r(U.current, {
3905
+ Q(t), t && U.current && br(U.current, {
3895
3906
  disabled: T,
3896
3907
  allowUserInput: b,
3897
3908
  customUserInput: Ce,
@@ -3914,7 +3925,7 @@ function Cr(t, n) {
3914
3925
  case "ArrowDown":
3915
3926
  case "ArrowUp":
3916
3927
  e.preventDefault(), Z ? Q(!1) : (Q(!0), U.current && window.setTimeout(() => {
3917
- U.current && _r(U.current, {
3928
+ U.current && br(U.current, {
3918
3929
  disabled: T,
3919
3930
  allowUserInput: b && !Ne,
3920
3931
  customUserInput: Ce,
@@ -3928,7 +3939,7 @@ function Cr(t, n) {
3928
3939
  case "Home":
3929
3940
  case "End":
3930
3941
  e.preventDefault(), Z || Q(!0), U.current && window.setTimeout(() => {
3931
- U.current && _r(U.current, {
3942
+ U.current && br(U.current, {
3932
3943
  disabled: T,
3933
3944
  allowUserInput: b && !Ne,
3934
3945
  customUserInput: Ce,
@@ -3965,10 +3976,10 @@ function Cr(t, n) {
3965
3976
  e.preventDefault(), Ge(t);
3966
3977
  break;
3967
3978
  case "ArrowDown":
3968
- e.preventDefault(), mr(e.currentTarget);
3979
+ e.preventDefault(), _r(e.currentTarget);
3969
3980
  break;
3970
3981
  case "ArrowUp":
3971
- e.preventDefault(), U.current && hr(e.currentTarget, U.current, y);
3982
+ e.preventDefault(), U.current && vr(e.currentTarget, U.current, y);
3972
3983
  break;
3973
3984
  case "Escape":
3974
3985
  e.preventDefault(), Q(!1), W();
@@ -4028,10 +4039,10 @@ function Cr(t, n) {
4028
4039
  e.preventDefault(), Ge(e.currentTarget.dataset.value || "");
4029
4040
  break;
4030
4041
  case "ArrowDown":
4031
- e.preventDefault(), U.current && gr(U.current);
4042
+ e.preventDefault(), U.current && yr(U.current);
4032
4043
  break;
4033
4044
  case "ArrowUp":
4034
- e.preventDefault(), U.current && hr(e.currentTarget, U.current, y);
4045
+ e.preventDefault(), U.current && vr(e.currentTarget, U.current, y);
4035
4046
  break;
4036
4047
  case "Escape": e.preventDefault(), Q(!1), W();
4037
4048
  }
@@ -4147,8 +4158,8 @@ function Cr(t, n) {
4147
4158
  }
4148
4159
  //#endregion
4149
4160
  //#region src/components/combobox/Combobox.tsx
4150
- var wr = i((e, t) => {
4151
- let n = Cr(e, t), r = [
4161
+ var Dr = i((e, t) => {
4162
+ let n = Er(e, t), r = [
4152
4163
  "pkt-combobox-component",
4153
4164
  n.fullwidth && "pkt-combobox-component--fullwidth",
4154
4165
  n.className
@@ -4157,7 +4168,7 @@ var wr = i((e, t) => {
4157
4168
  className: r,
4158
4169
  ref: n.wrapperRef,
4159
4170
  id: n.id || void 0,
4160
- children: [/* @__PURE__ */ v($n, {
4171
+ children: [/* @__PURE__ */ v(nr, {
4161
4172
  strings: n.strings,
4162
4173
  forId: a,
4163
4174
  hasFieldset: e.hasFieldset ?? !i,
@@ -4183,8 +4194,8 @@ var wr = i((e, t) => {
4183
4194
  children: [/* @__PURE__ */ v("div", {
4184
4195
  className: "pkt-combobox",
4185
4196
  onBlur: n.handleFocusOut,
4186
- children: [/* @__PURE__ */ _(br, { state: n }), /* @__PURE__ */ _(xr, { state: n })]
4187
- }), n.tagPlacement === "outside" && n.multiple && /* @__PURE__ */ _(vr, {
4197
+ children: [/* @__PURE__ */ _(Cr, { state: n }), /* @__PURE__ */ _(wr, { state: n })]
4198
+ }), n.tagPlacement === "outside" && n.multiple && /* @__PURE__ */ _(xr, {
4188
4199
  state: n,
4189
4200
  outside: !0
4190
4201
  })]
@@ -4199,10 +4210,10 @@ var wr = i((e, t) => {
4199
4210
  })]
4200
4211
  });
4201
4212
  });
4202
- wr.displayName = "PktCombobox";
4213
+ Dr.displayName = "PktCombobox";
4203
4214
  //#endregion
4204
4215
  //#region src/components/consent/Consent.tsx
4205
- var Tr = null, Er = () => Tr || (Tr = new Promise((e, t) => {
4216
+ var Or = null, kr = () => Or || (Or = new Promise((e, t) => {
4206
4217
  if (document.querySelector("#oslo-consent-script")) {
4207
4218
  e();
4208
4219
  return;
@@ -4211,14 +4222,14 @@ var Tr = null, Er = () => Tr || (Tr = new Promise((e, t) => {
4211
4222
  n.src = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js", n.id = "oslo-consent-script", n.onload = () => e(), n.onerror = t, document.head.appendChild(n);
4212
4223
  let r = document.createElement("link");
4213
4224
  r.href = "https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css", r.type = "text/css", r.rel = "stylesheet", r.id = "oslo-consent-styles", document.head.appendChild(r);
4214
- }), Tr), Dr = (e) => {
4225
+ }), Or), Ar = (e) => {
4215
4226
  if (typeof e != "string") return e;
4216
4227
  try {
4217
4228
  return JSON.parse(e);
4218
4229
  } catch {
4219
4230
  return e;
4220
4231
  }
4221
- }, Or = (e) => Dr(e.value).items.reduce((e, t) => (e[t.name] = t.consent, e), {}), kr = i(function({ devMode: e = !1, cookieDomain: t = null, cookieSecure: n = null, cookieExpiryDays: r = null, hotjarId: i = null, googleAnalyticsId: a = null, i18nLanguage: o = "nb", triggerType: s = "button", triggerText: l, onToggleConsent: u, ...d }, f) {
4232
+ }, jr = (e) => Ar(e.value).items.reduce((e, t) => (e[t.name] = t.consent, e), {}), Mr = i(function({ devMode: e = !1, cookieDomain: t = null, cookieSecure: n = null, cookieExpiryDays: r = null, hotjarId: i = null, googleAnalyticsId: a = null, i18nLanguage: o = "nb", triggerType: s = "button", triggerText: l, onToggleConsent: u, ...d }, f) {
4222
4233
  let m = p(u);
4223
4234
  m.current = u;
4224
4235
  let h = p({
@@ -4244,7 +4255,7 @@ var Tr = null, Er = () => Tr || (Tr = new Promise((e, t) => {
4244
4255
  let r = (e) => {
4245
4256
  let t = m.current;
4246
4257
  t && t(new CustomEvent("toggle-consent", {
4247
- detail: Or(e),
4258
+ detail: jr(e),
4248
4259
  bubbles: !0,
4249
4260
  cancelable: !1
4250
4261
  }));
@@ -4262,7 +4273,7 @@ var Tr = null, Er = () => Tr || (Tr = new Promise((e, t) => {
4262
4273
  e || r({ value: o });
4263
4274
  }, 0), t && i.off("CookieManager.setCookie", t), t = (e) => r(e), i.on("CookieManager.setCookie", t);
4264
4275
  });
4265
- }, Er().then(() => {
4276
+ }, kr().then(() => {
4266
4277
  e || g.current();
4267
4278
  }), () => {
4268
4279
  e = !0, t && window.__cookieEvents?.off("CookieManager.setCookie", t);
@@ -4302,13 +4313,13 @@ var Tr = null, Er = () => Tr || (Tr = new Promise((e, t) => {
4302
4313
  children: y
4303
4314
  });
4304
4315
  });
4305
- kr.displayName = "PktConsent";
4316
+ Mr.displayName = "PktConsent";
4306
4317
  //#endregion
4307
4318
  //#region ../../shared-utils/device-utils.ts
4308
- var Ar = () => {
4319
+ var Nr = () => {
4309
4320
  let e = navigator.userAgent;
4310
4321
  return !!(/iP(hone|od|ad)/.test(e) || /Macintosh/.test(e) && "ontouchend" in document);
4311
- }, jr = () => Ar() ? "text" : "date", Mr = (e) => !e || e.length !== 2 || dn(e[0], e[1]), Nr = (e, t, n, r, i, a, o = "medium") => ({
4322
+ }, Pr = () => Nr() ? "text" : "date", Fr = (e) => !e || e.length !== 2 || dn(e[0], e[1]), Ir = (e, t, n, r, i, a, o = "medium") => ({
4312
4323
  "pkt-input": !0,
4313
4324
  "pkt-datepicker__input": !0,
4314
4325
  [`pkt-input--${o}`]: !0,
@@ -4317,27 +4328,27 @@ var Ar = () => {
4317
4328
  "pkt-datepicker--multiple": n,
4318
4329
  "pkt-datepicker--range": r,
4319
4330
  "ios-readonly-hack": i === !1 && a === "text"
4320
- }), Pr = (e = "medium") => ({
4331
+ }), Lr = (e = "medium") => ({
4321
4332
  "pkt-input-icon": !0,
4322
4333
  "pkt-btn": !0,
4323
4334
  "pkt-btn--icon-only": !0,
4324
4335
  "pkt-btn--tertiary": !0,
4325
4336
  [`pkt-btn--${e}`]: !0,
4326
4337
  "pkt-datepicker__calendar-button": !0
4327
- }), Fr = (e) => ({
4338
+ }), Rr = (e) => ({
4328
4339
  "pkt-input-prefix": e,
4329
4340
  "pkt-hide": !e
4330
- }), Ir = (e, t, n) => !t && !n ? Array.isArray(e) ? e[0] || "" : e : Array.isArray(e) ? e.join(",") : e, Lr = (e, t, n = !1) => {
4341
+ }), zr = (e, t, n) => !t && !n ? Array.isArray(e) ? e[0] || "" : e : Array.isArray(e) ? e.join(",") : e, Br = (e, t, n = !1) => {
4331
4342
  if (!e || !t) return;
4332
4343
  let r = t.parentElement?.getBoundingClientRect() || t.getBoundingClientRect(), i = n ? r.height + 30 : r.height, a = e.getBoundingClientRect().height, o = n ? "calc(100% - 30px)" : "100%";
4333
4344
  r && typeof window < "u" && r.top + a > window.innerHeight && r.top - a > 0 && (o = `calc(100% - ${i}px - ${a}px)`), e.style.top = o;
4334
- }, Rr = (e, t, n, r, i, a) => {
4345
+ }, Vr = (e, t, n, r, i, a) => {
4335
4346
  let { key: o } = e;
4336
4347
  o === "," && (e.preventDefault(), a ? a(e) : i && i()), (o === "Space" || o === " ") && (e.preventDefault(), t(e)), o === "Enter" && (e.preventDefault(), n ? n() : r ? r() : i && i());
4337
- }, zr = ({ open: e, multiple: t = !1, range: n = !1, weeknumbers: r = !1, withcontrols: i = !1, selected: a = [], earliest: o, latest: s, excludedates: l, excludeweekdays: u, maxMultiple: d, currentmonth: f, today: m, inputRef: h, hasCounter: g = !1, onDateSelected: v, onClose: y }) => {
4348
+ }, Hr = ({ open: e, multiple: t = !1, range: n = !1, weeknumbers: r = !1, withcontrols: i = !1, selected: a = [], earliest: o, latest: s, excludedates: l, excludeweekdays: u, maxMultiple: d, currentmonth: f, today: m, inputRef: h, hasCounter: g = !1, onDateSelected: v, onClose: y }) => {
4338
4349
  let b = p(null), x = p(!1);
4339
4350
  e && (x.current = !0), c(() => {
4340
- e && Lr(b.current, h?.current ?? null, g);
4351
+ e && Br(b.current, h?.current ?? null, g);
4341
4352
  }, [
4342
4353
  e,
4343
4354
  h,
@@ -4366,14 +4377,14 @@ var Ar = () => {
4366
4377
  onClose: y
4367
4378
  })
4368
4379
  });
4369
- }, Br = ({ dates: e, dateformat: t, idBase: n, strings: r, onDateRemoved: i }) => {
4380
+ }, Ur = ({ dates: e, dateformat: t, idBase: n, strings: r, onDateRemoved: i }) => {
4370
4381
  let a = un(e), o = ge(["datepicker"], r).datepicker.deleteDate;
4371
4382
  return /* @__PURE__ */ _("div", {
4372
4383
  className: "pkt-date-tags pkt-datepicker__tags",
4373
4384
  "aria-live": "polite",
4374
4385
  children: a.map((e) => {
4375
4386
  let r = Zt(e, t);
4376
- return /* @__PURE__ */ _(Vn, {
4387
+ return /* @__PURE__ */ _(Wn, {
4377
4388
  id: `${n}${e}-tag`,
4378
4389
  closeTag: !0,
4379
4390
  ariaLabel: `${o} ${r}`,
@@ -4385,7 +4396,7 @@ var Ar = () => {
4385
4396
  }, e);
4386
4397
  })
4387
4398
  });
4388
- }, Vr = ({ state: e }) => {
4399
+ }, Wr = ({ state: e }) => {
4389
4400
  let { id: t, inputId: n, values: r, dateformat: i, multiple: a, range: o, showRangeLabels: s, disabled: c, readOnly: l, required: u, label: d, name: f, placeholder: p, hasError: m, helptext: h, minStr: y, maxStr: b, inputType: x, isIOSDevice: S, strings: C, inputClasses: w, buttonClasses: T, rangeLabelClasses: E, datepickerInputsClasses: D, isInputDisabled: O, inputRef: k, inputRefTo: A, btnRef: j, toggleCalendar: M, handleFocus: N, handleSingleInputChange: P, handleRangeFromChange: ee, handleRangeToChange: te, handleRangeBlur: ne, handleMultipleBlur: F, handleTagRemoved: re, handleSingleKeydown: ie, handleRangeFromKeydown: ae, handleRangeToKeydown: oe, handleMultipleKeydown: se, restProps: I } = e, R = (e) => {
4390
4401
  e.preventDefault(), M();
4391
4402
  }, ce = (e) => {
@@ -4401,7 +4412,7 @@ var Ar = () => {
4401
4412
  children: C.datepicker.openPicker
4402
4413
  })]
4403
4414
  });
4404
- return a ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Br, {
4415
+ return a ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Ur, {
4405
4416
  dates: r,
4406
4417
  dateformat: i,
4407
4418
  idBase: t,
@@ -4527,7 +4538,7 @@ var Ar = () => {
4527
4538
  }), z()]
4528
4539
  })
4529
4540
  });
4530
- }, Hr = (e) => {
4541
+ }, Gr = (e) => {
4531
4542
  if (!e) return [];
4532
4543
  if (Array.isArray(e)) return e.filter(Boolean);
4533
4544
  if (typeof e == "string" && e.trimStart().startsWith("[")) try {
@@ -4538,8 +4549,8 @@ var Ar = () => {
4538
4549
  };
4539
4550
  //#endregion
4540
4551
  //#region src/components/datepicker/useDatepickerState.ts
4541
- function Ur(e, t) {
4542
- let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown: j, helptextDropdownButton: M, hasError: N = !1, errorMessage: P, optionalTag: ee = !1, optionalText: te, requiredTag: ne = !1, requiredText: F, tagText: re, useWrapper: ie = !0, strings: ae, disabled: oe = !1, readOnly: se = !1, required: I = !1, name: L, min: R, max: ce, placeholder: z, onChange: B, onValueChange: V, className: H, ...le } = e, ue = o((e) => e === void 0 ? [] : Hr(e), []), U = i !== void 0, de = typeof a == "number" ? void 0 : a, [W, G] = m(() => ue(i ?? de)), K = U ? ue(i) : W, fe = p(W);
4552
+ function Kr(e, t) {
4553
+ let { id: n, label: r, value: i, defaultValue: a, dateformat: s = "dd.MM.yyyy", multiple: l = !1, maxlength: d, range: h = !1, showRangeLabels: g = !1, weeknumbers: _ = !1, withcontrols: v = !1, excludedates: y, excludeweekdays: b, currentmonth: x, today: S, calendarOpen: C, timezone: w, fullwidth: T = !1, inputSize: E = "medium", hasFieldset: D = !1, counter: O, inline: k = !1, helptext: A, helptextDropdown: j, helptextDropdownButton: M, hasError: N = !1, errorMessage: P, optionalTag: ee = !1, optionalText: te, requiredTag: ne = !1, requiredText: F, tagText: re, useWrapper: ie = !0, strings: ae, disabled: oe = !1, readOnly: se = !1, required: I = !1, name: L, min: R, max: ce, placeholder: z, onChange: B, onValueChange: V, className: H, ...le } = e, ue = o((e) => e === void 0 ? [] : Gr(e), []), U = i !== void 0, de = typeof a == "number" ? void 0 : a, [W, G] = m(() => ue(i ?? de)), K = U ? ue(i) : W, fe = p(W);
4543
4554
  c(() => {
4544
4555
  U && G(ue(i));
4545
4556
  }, [
@@ -4551,12 +4562,12 @@ function Ur(e, t) {
4551
4562
  c(() => {
4552
4563
  C !== void 0 && pe(C);
4553
4564
  }, [C]);
4554
- let me = p(null), J = p(null), Y = p(null), he = p(null), X = p(null), Z = f(() => jr(), []), Q = f(() => Ar(), []), _e = ge([
4565
+ let me = p(null), J = p(null), Y = p(null), he = p(null), X = p(null), Z = f(() => Pr(), []), Q = f(() => Nr(), []), _e = ge([
4555
4566
  "generic",
4556
4567
  "datepicker",
4557
4568
  "validation"
4558
4569
  ], ae), ve = ae, ye = typeof R == "string" ? R : R === void 0 ? void 0 : String(R), be = typeof ce == "string" ? ce : ce === void 0 ? void 0 : String(ce), xe = f(() => {
4559
- let e = Nr(T, g, l, h, se, Z, E);
4570
+ let e = Ir(T, g, l, h, se, Z, E);
4560
4571
  return Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ");
4561
4572
  }, [
4562
4573
  T,
@@ -4566,8 +4577,8 @@ function Ur(e, t) {
4566
4577
  se,
4567
4578
  Z,
4568
4579
  E
4569
- ]), Se = Object.entries(Pr(E)).filter(([, e]) => e).map(([e]) => e).join(" "), Ce = f(() => {
4570
- let e = Fr(g);
4580
+ ]), Se = Object.entries(Lr(E)).filter(([, e]) => e).map(([e]) => e).join(" "), Ce = f(() => {
4581
+ let e = Rr(g);
4571
4582
  return Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ");
4572
4583
  }, [g]), we = f(() => ["pkt-datepicker__inputs", h && "pkt-input__range-inputs"].filter(Boolean).join(" "), [h, g]), Te = f(() => {
4573
4584
  if (x) return x;
@@ -4604,7 +4615,7 @@ function Ur(e, t) {
4604
4615
  let Pe = o(() => {
4605
4616
  Q && !q && pe(!0);
4606
4617
  }, [Q, q]), Fe = o((e) => {
4607
- let t = Hr(Ir(e, l, h));
4618
+ let t = Gr(zr(e, l, h));
4608
4619
  $(t), je(t), !l && !h && (Ne(), me.current?.focus());
4609
4620
  }, [
4610
4621
  l,
@@ -4632,7 +4643,7 @@ function Ur(e, t) {
4632
4643
  $,
4633
4644
  je
4634
4645
  ]), Be = o(() => {
4635
- K.length === 2 && !Mr(K) && ($([K[0]]), je([K[0]]));
4646
+ K.length === 2 && !Fr(K) && ($([K[0]]), je([K[0]]));
4636
4647
  }, [
4637
4648
  K,
4638
4649
  $,
@@ -4668,13 +4679,13 @@ function Ur(e, t) {
4668
4679
  let t = e?.closest("form");
4669
4680
  t ? t.requestSubmit() : e?.blur();
4670
4681
  }, []), Ke = o((e) => {
4671
- Rr(e.nativeEvent, () => Me(), () => Ge(me.current), void 0, () => me.current?.blur());
4682
+ Vr(e.nativeEvent, () => Me(), () => Ge(me.current), void 0, () => me.current?.blur());
4672
4683
  }, [Me, Ge]), qe = o((e) => {
4673
- Rr(e.nativeEvent, () => Me(), () => Ge(me.current), () => J.current?.focus(), () => me.current?.blur());
4684
+ Vr(e.nativeEvent, () => Me(), () => Ge(me.current), () => J.current?.focus(), () => me.current?.blur());
4674
4685
  }, [Me, Ge]), Je = o((e) => {
4675
- Rr(e.nativeEvent, () => Me(), () => Ge(J.current), void 0, () => J.current?.blur());
4686
+ Vr(e.nativeEvent, () => Me(), () => Ge(J.current), void 0, () => J.current?.blur());
4676
4687
  }, [Me, Ge]), Ye = o((e) => {
4677
- Rr(e.nativeEvent, () => Me(), () => Ge(me.current), void 0, () => me.current?.blur(), Ue);
4688
+ Vr(e.nativeEvent, () => Me(), () => Ge(me.current), void 0, () => me.current?.blur(), Ue);
4678
4689
  }, [
4679
4690
  Me,
4680
4691
  Ge,
@@ -4779,8 +4790,8 @@ function Ur(e, t) {
4779
4790
  }
4780
4791
  //#endregion
4781
4792
  //#region src/components/datepicker/Datepicker.tsx
4782
- var Wr = i((e, t) => {
4783
- let n = Ur(e, t), r = [
4793
+ var qr = i((e, t) => {
4794
+ let n = Kr(e, t), r = [
4784
4795
  "pkt-datepicker",
4785
4796
  `pkt-datepicker--${n.inputSize}`,
4786
4797
  n.fullwidth ? "pkt-datepicker--fullwidth" : "",
@@ -4790,7 +4801,7 @@ var Wr = i((e, t) => {
4790
4801
  className: r,
4791
4802
  id: n.id || void 0,
4792
4803
  children: [
4793
- /* @__PURE__ */ _($n, {
4804
+ /* @__PURE__ */ _(nr, {
4794
4805
  strings: n.stringsOverride,
4795
4806
  ref: n.wrapperRef,
4796
4807
  ariaDescribedby: e.ariaDescribedby,
@@ -4814,9 +4825,9 @@ var Wr = i((e, t) => {
4814
4825
  counter: n.hasCounter,
4815
4826
  counterCurrent: n.values.length,
4816
4827
  counterMaxLength: n.maxlength,
4817
- children: /* @__PURE__ */ _(Vr, { state: n })
4828
+ children: /* @__PURE__ */ _(Wr, { state: n })
4818
4829
  }),
4819
- /* @__PURE__ */ _(zr, {
4830
+ /* @__PURE__ */ _(Hr, {
4820
4831
  open: n.calendarOpen,
4821
4832
  multiple: n.multiple,
4822
4833
  range: n.range,
@@ -4847,10 +4858,10 @@ var Wr = i((e, t) => {
4847
4858
  ]
4848
4859
  });
4849
4860
  });
4850
- Wr.displayName = "PktDatepicker";
4861
+ qr.displayName = "PktDatepicker";
4851
4862
  //#endregion
4852
4863
  //#region ../../shared-utils/fileupload/size.ts
4853
- function Gr(e) {
4864
+ function Jr(e) {
4854
4865
  if (e == null || e === "") return;
4855
4866
  if (typeof e == "number") return Number.isFinite(e) && e > 0 ? e : void 0;
4856
4867
  let t = String(e).trim(), n = Number(t);
@@ -4869,15 +4880,15 @@ function Gr(e) {
4869
4880
  default: return;
4870
4881
  }
4871
4882
  }
4872
- function Kr(e) {
4883
+ function Yr(e) {
4873
4884
  return e < 1024 ? `${Math.round(e)} B` : e < 1048576 ? `${Math.round(e / 1024)} KB` : e < 1073741824 ? `${Math.round(e / 1048576)} MB` : `${Math.round(e / 1073741824)} GB`;
4874
4885
  }
4875
4886
  //#endregion
4876
4887
  //#region ../../shared-utils/fileupload/formats.ts
4877
- function qr(e) {
4888
+ function Xr(e) {
4878
4889
  return Array.isArray(e) ? e.map((e) => String(e).trim().toLowerCase()).filter(Boolean) : [];
4879
4890
  }
4880
- function Jr(e, t, n) {
4891
+ function Zr(e, t, n) {
4881
4892
  let r = e.toLowerCase().replace(/^\./, "");
4882
4893
  if (r.includes("/")) {
4883
4894
  if (r.endsWith("/*")) {
@@ -4888,33 +4899,33 @@ function Jr(e, t, n) {
4888
4899
  }
4889
4900
  return t === r;
4890
4901
  }
4891
- function Yr(e, t) {
4892
- let n = qr(t);
4902
+ function Qr(e, t) {
4903
+ let n = Xr(t);
4893
4904
  if (n.length === 0) return !0;
4894
4905
  let r = e.name.split(".").pop()?.toLowerCase() ?? "", i = e.type.toLowerCase();
4895
- return n.some((e) => Jr(e, r, i));
4906
+ return n.some((e) => Zr(e, r, i));
4896
4907
  }
4897
- function Xr(e, t) {
4908
+ function $r(e, t) {
4898
4909
  let n = (e ?? "").trim();
4899
4910
  if (n) return n;
4900
- let r = qr(t);
4911
+ let r = Xr(t);
4901
4912
  return r.length === 0 ? "" : r.map((e) => e.includes("/") || e.startsWith(".") ? e : `.${e}`).join(", ");
4902
4913
  }
4903
4914
  //#endregion
4904
4915
  //#region ../../shared-utils/fileupload/validation.ts
4905
- function Zr(e, t, n) {
4916
+ function ei(e, t, n) {
4906
4917
  return ((e ?? "").trim() || t).replace(/\{(\w+)\}/g, (e, t) => n[t] ?? `{${t}}`);
4907
4918
  }
4908
- function Qr(e, t) {
4909
- let n = qr(t.allowedFormats);
4910
- if (n.length > 0 && !Yr(e, n)) {
4919
+ function ti(e, t) {
4920
+ let n = Xr(t.allowedFormats);
4921
+ if (n.length > 0 && !Qr(e, n)) {
4911
4922
  let e = n.join(", "), r = ce.fileupload.invalidFormat;
4912
- return Zr(t.formatErrorMessage, r, { formats: e });
4923
+ return ei(t.formatErrorMessage, r, { formats: e });
4913
4924
  }
4914
- let r = Gr(t.maxFileSize);
4925
+ let r = Jr(t.maxFileSize);
4915
4926
  if (r !== void 0 && e.size > r) {
4916
- let e = Kr(r), n = ce.fileupload.sizeTooLarge;
4917
- return Zr(t.sizeErrorMessage, n, { maxSize: e });
4927
+ let e = Yr(r), n = ce.fileupload.sizeTooLarge;
4928
+ return ei(t.sizeErrorMessage, n, { maxSize: e });
4918
4929
  }
4919
4930
  if (t.onFileValidation) {
4920
4931
  let n = t.onFileValidation(e);
@@ -4922,7 +4933,7 @@ function Qr(e, t) {
4922
4933
  }
4923
4934
  return null;
4924
4935
  }
4925
- function $r(e) {
4936
+ function ni(e) {
4926
4937
  let t = e.file;
4927
4938
  if (t?.type?.startsWith("image/")) return !0;
4928
4939
  let n = e.attributes?.targetFilename || t?.name || "";
@@ -4930,10 +4941,10 @@ function $r(e) {
4930
4941
  }
4931
4942
  //#endregion
4932
4943
  //#region ../../shared-utils/fileupload/transfers.ts
4933
- function ei(e) {
4944
+ function ri(e) {
4934
4945
  return typeof e == "number" ? "in-progress" : e === "error" ? "error" : "idle";
4935
4946
  }
4936
- function ti(e, t, n) {
4947
+ function ii(e, t, n) {
4937
4948
  let r = {
4938
4949
  "in-progress": 0,
4939
4950
  error: 1,
@@ -4948,11 +4959,11 @@ function ti(e, t, n) {
4948
4959
  showProgress: r?.showProgress,
4949
4960
  lastProgress: r?.lastProgress
4950
4961
  };
4951
- }).sort((e, t) => r[ei(e.progress)] - r[ei(t.progress)]);
4962
+ }).sort((e, t) => r[ri(e.progress)] - r[ri(t.progress)]);
4952
4963
  }
4953
4964
  //#endregion
4954
4965
  //#region ../../shared-utils/focus-trap/index.ts
4955
- function ni(e) {
4966
+ function ai(e) {
4956
4967
  if (!e) return [];
4957
4968
  let t = [
4958
4969
  "a[href]:not([tabindex=\"-1\"])",
@@ -4964,7 +4975,7 @@ function ni(e) {
4964
4975
  ].join(", ");
4965
4976
  return Array.from(e.querySelectorAll(t)).filter((e) => !e.hasAttribute("inert"));
4966
4977
  }
4967
- var ri = [
4978
+ var oi = [
4968
4979
  "a[href]",
4969
4980
  "button:not([disabled])",
4970
4981
  "input:not([disabled]):not([type=\"hidden\"])",
@@ -4972,7 +4983,7 @@ var ri = [
4972
4983
  "textarea:not([disabled])",
4973
4984
  "summary",
4974
4985
  "[tabindex]:not([tabindex=\"-1\"])"
4975
- ].join(", "), ii = (e) => {
4986
+ ].join(", "), si = (e) => {
4976
4987
  if (e.hasAttribute("inert") || e.closest("[inert]") || e.hidden || e.closest("[hidden]")) return !0;
4977
4988
  let t = e;
4978
4989
  for (; t;) {
@@ -4985,33 +4996,33 @@ var ri = [
4985
4996
  t = n.parentElement;
4986
4997
  }
4987
4998
  return !1;
4988
- }, ai = (e, t) => {
4989
- e.matches(ri) && !ii(e) && t.push(e);
4999
+ }, ci = (e, t) => {
5000
+ e.matches(oi) && !si(e) && t.push(e);
4990
5001
  let n = e.shadowRoot;
4991
- if (n) for (let e of Array.from(n.children)) ai(e, t);
4992
- for (let n of Array.from(e.children)) ai(n, t);
5002
+ if (n) for (let e of Array.from(n.children)) ci(e, t);
5003
+ for (let n of Array.from(e.children)) ci(n, t);
4993
5004
  };
4994
- function oi(e) {
5005
+ function li(e) {
4995
5006
  if (!e) return [];
4996
5007
  let t = [];
4997
- for (let n of Array.from(e.children)) ai(n, t);
5008
+ for (let n of Array.from(e.children)) ci(n, t);
4998
5009
  return t;
4999
5010
  }
5000
- function si(e = document) {
5011
+ function ui(e = document) {
5001
5012
  let t = e.activeElement;
5002
5013
  for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
5003
5014
  return t;
5004
5015
  }
5005
- function ci(e, t) {
5016
+ function di(e, t) {
5006
5017
  if (e.key !== "Tab") return !1;
5007
- let n = ni(t);
5018
+ let n = ai(t);
5008
5019
  if (n.length === 0) return e.preventDefault(), !0;
5009
5020
  let r = n[0], i = n[n.length - 1], a = (t?.ownerDocument ?? document).activeElement, o = !!a && n.includes(a);
5010
5021
  return e.shiftKey ? !o || a === r ? (e.preventDefault(), i.focus(), !0) : !1 : !o || a === i ? (e.preventDefault(), r.focus(), !0) : !1;
5011
5022
  }
5012
5023
  //#endregion
5013
5024
  //#region ../../shared-utils/fileupload/truncate.ts
5014
- function li(e, t) {
5025
+ function fi(e, t) {
5015
5026
  return !t || t <= 0 || e.length <= t + 3 ? null : {
5016
5027
  head: e.slice(0, e.length - t),
5017
5028
  tail: e.slice(-t)
@@ -5019,12 +5030,12 @@ function li(e, t) {
5019
5030
  }
5020
5031
  //#endregion
5021
5032
  //#region ../../shared-utils/fileupload/navigation.ts
5022
- function ui(e, t, n) {
5033
+ function pi(e, t, n) {
5023
5034
  return n <= 0 ? 0 : t === "prev" ? e <= 0 ? n - 1 : e - 1 : e >= n - 1 ? 0 : e + 1;
5024
5035
  }
5025
5036
  //#endregion
5026
5037
  //#region ../../shared-utils/fileupload/announcements.ts
5027
- function di(e, t) {
5038
+ function mi(e, t) {
5028
5039
  let n = e.length;
5029
5040
  if (n === 0 || !t || t.length === 0) return {
5030
5041
  totalCount: n,
@@ -5044,23 +5055,23 @@ function di(e, t) {
5044
5055
  }
5045
5056
  //#endregion
5046
5057
  //#region ../../shared-utils/fileupload/filename.ts
5047
- var fi = ".jpeg, .jpg, .png, .gif, .webp, .heic";
5048
- function pi(e, t = ce.fileupload.unknownFilename) {
5058
+ var hi = ".jpeg, .jpg, .png, .gif, .webp, .heic";
5059
+ function gi(e, t = ce.fileupload.unknownFilename) {
5049
5060
  return e.attributes?.targetFilename || e.file?.name || t;
5050
5061
  }
5051
5062
  //#endregion
5052
5063
  //#region src/utils/stringutils.ts
5053
- var mi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toString(16)).slice(-16), hi = () => {
5054
- let e = mi(), t = mi();
5064
+ var _i = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toString(16)).slice(-16), vi = () => {
5065
+ let e = _i(), t = _i();
5055
5066
  return e.slice(0, 8) + "-" + e.slice(8, 12) + "-4" + e.slice(13) + "-a" + t.slice(1, 4) + "-" + t.slice(4);
5056
- }, gi = class {
5067
+ }, yi = class {
5057
5068
  fileId;
5058
5069
  file;
5059
5070
  attributes;
5060
5071
  constructor(e, t) {
5061
- this.fileId = t || hi(), this.file = e, this.attributes = { targetFilename: e.name };
5072
+ this.fileId = t || vi(), this.file = e, this.attributes = { targetFilename: e.name };
5062
5073
  }
5063
- }, _i = n({}), vi = i(({ id: e, multiple: t, value: n, onFilesAdded: r = () => {}, name: i, uploadStrategy: a, accept: s, isThumbnailView: l = !1, disabled: d = !1, hasVisibleLabel: h = !1, strings: y, ...b }, x) => {
5074
+ }, bi = n({}), xi = i(({ id: e, multiple: t, value: n, onFilesAdded: r = () => {}, name: i, uploadStrategy: a, accept: s, isThumbnailView: l = !1, disabled: d = !1, hasVisibleLabel: h = !1, strings: y, ...b }, x) => {
5064
5075
  let S = p(null), C = typeof s == "string" && s.trim().length > 0 ? s : void 0, w = f(() => C ? C.split(/\s*,\s*/).map((e) => e.trim()).filter(Boolean).join(", ").toUpperCase() : "", [C]);
5065
5076
  u(x, () => S.current);
5066
5077
  let [T, E] = m(!1), D = ge(["fileupload"], y), O = f(() => l ? t ? {
@@ -5085,14 +5096,14 @@ var mi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
5085
5096
  D
5086
5097
  ]), k = o((e) => {
5087
5098
  if (S.current) try {
5088
- S.current.files = yi(e);
5099
+ S.current.files = Si(e);
5089
5100
  } catch {}
5090
5101
  }, [S.current, n]);
5091
5102
  c(() => {
5092
5103
  k(n);
5093
5104
  }, [S, n]);
5094
5105
  let A = o((e) => {
5095
- r(e.map((e) => new gi(e))), S.current && (S.current.value = "");
5106
+ r(e.map((e) => new yi(e))), S.current && (S.current.value = "");
5096
5107
  }, [r]), j = (e) => {
5097
5108
  let t = e.target.files;
5098
5109
  if (t.length === 0) {
@@ -5175,32 +5186,32 @@ var mi = () => ("00000000000000000" + (Math.random() * 0x10000000000000000).toSt
5175
5186
  })
5176
5187
  ]
5177
5188
  });
5178
- }), yi = (e) => {
5189
+ }), Si = (e) => {
5179
5190
  let t = new DataTransfer();
5180
5191
  for (let n of e) t.items.add(n.file);
5181
5192
  return t.files;
5182
5193
  };
5183
5194
  //#endregion
5184
5195
  //#region src/hooks/useGeneratedId.ts
5185
- function bi(e) {
5186
- let t = f(() => Yn(), []);
5196
+ function Ci(e) {
5197
+ let t = f(() => Qn(), []);
5187
5198
  return e || t;
5188
5199
  }
5189
5200
  //#endregion
5190
5201
  //#region src/components/textarea/Textarea.tsx
5191
- var xi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasFieldset: i, counterMaxLength: a, className: o, disabled: s, errorMessage: l, hasError: u = !1, helptext: d, helptextDropdown: f, helptextDropdownButton: p, inline: h, fullwidth: g = !1, label: v, name: y, optionalTag: b = !1, optionalText: x, requiredTag: S = !1, requiredText: C, tagText: w = null, placeholder: T, rows: E, useWrapper: D = !0, onChange: O, value: k, autoComplete: A = "off", minLength: j, maxLength: M, readOnly: N, skipForwardTestid: P = !1, inputSize: ee = "medium", strings: te, ...ne }, F) => {
5202
+ var wi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasFieldset: i, counterMaxLength: a, className: o, disabled: s, errorMessage: l, hasError: u = !1, helptext: d, helptextDropdown: f, helptextDropdownButton: p, inline: h, fullwidth: g = !1, label: v, name: y, optionalTag: b = !1, optionalText: x, requiredTag: S = !1, requiredText: C, tagText: w = null, placeholder: T, rows: E, useWrapper: D = !0, onChange: O, value: k, autoComplete: A = "off", minLength: j, maxLength: M, readOnly: N, skipForwardTestid: P = !1, inputSize: ee = "medium", strings: te, ...ne }, F) => {
5192
5203
  let re = r ?? (a ?? 0) > 0, ie = [
5193
5204
  o,
5194
5205
  "pkt-textinput",
5195
5206
  "pkt-textarea"
5196
- ].filter(Boolean).join(" "), ae = bi(e), oe = `${ae}-input`, se = `${oe}-label`, I = n || se, [L, R] = m(0), ce = (e) => {
5207
+ ].filter(Boolean).join(" "), ae = Ci(e), oe = `${ae}-input`, se = `${oe}-label`, I = n || se, [L, R] = m(0), ce = (e) => {
5197
5208
  re && R(e.currentTarget?.value?.length || 0), O && O(e);
5198
5209
  };
5199
5210
  return c(() => {
5200
5211
  k !== void 0 && R(k?.length || 0);
5201
5212
  }, [k]), /* @__PURE__ */ _("div", {
5202
5213
  className: ie,
5203
- children: /* @__PURE__ */ _($n, {
5214
+ children: /* @__PURE__ */ _(nr, {
5204
5215
  strings: te,
5205
5216
  ariaDescribedby: t,
5206
5217
  disabled: s,
@@ -5236,7 +5247,7 @@ var xi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasField
5236
5247
  "aria-labelledby": I,
5237
5248
  "aria-invalid": u,
5238
5249
  "aria-errormessage": u ? `${ae}-error` : void 0,
5239
- "aria-describedby": Gn({
5250
+ "aria-describedby": Jn({
5240
5251
  id: oe,
5241
5252
  hasHelptext: !!d,
5242
5253
  hasCounter: re,
@@ -5254,19 +5265,19 @@ var xi = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, counter: r, hasField
5254
5265
  })
5255
5266
  });
5256
5267
  });
5257
- xi.displayName = "PktTextarea";
5268
+ wi.displayName = "PktTextarea";
5258
5269
  //#endregion
5259
5270
  //#region src/components/fileupload/extensions/Comments.tsx
5260
- var Si = "comments", Ci = (e) => {
5271
+ var Ti = "comments", Ei = (e) => {
5261
5272
  let t = new Date(e);
5262
5273
  return Number.isNaN(t.getTime()) ? e : `${String(t.getDate()).padStart(2, "0")}.${String(t.getMonth() + 1).padStart(2, "0")}.${t.getFullYear()} kl. ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
5263
- }, wi = ({ fileItem: e, disabled: t, closeOperationUi: n, onAddComment: r, existingComment: i }) => {
5274
+ }, Di = ({ fileItem: e, disabled: t, closeOperationUi: n, onAddComment: r, existingComment: i }) => {
5264
5275
  let a = p(null), o = !!i;
5265
5276
  return d(() => {
5266
5277
  let e = setTimeout(() => a.current?.focus({ preventScroll: !0 }), 0);
5267
5278
  return () => clearTimeout(e);
5268
5279
  }, [e.fileId]), /* @__PURE__ */ v(g, { children: [
5269
- /* @__PURE__ */ _(xi, {
5280
+ /* @__PURE__ */ _(wi, {
5270
5281
  autoFocus: !0,
5271
5282
  label: o ? "Rediger kommentar" : "Legg til kommentar",
5272
5283
  name: `comment-${e.fileId}`,
@@ -5299,7 +5310,7 @@ var Si = "comments", Ci = (e) => {
5299
5310
  children: "Avbryt"
5300
5311
  })
5301
5312
  ] });
5302
- }, Ti = ({ comment: e, disabled: t, onDeleteComment: n, onEditComment: r }) => /* @__PURE__ */ _("div", {
5313
+ }, Oi = ({ comment: e, disabled: t, onDeleteComment: n, onEditComment: r }) => /* @__PURE__ */ _("div", {
5303
5314
  className: "pkt-fileupload__queue-display__item__comments",
5304
5315
  children: /* @__PURE__ */ v("div", {
5305
5316
  className: "pkt-fileupload__queue-display__item__comment",
@@ -5311,7 +5322,7 @@ var Si = "comments", Ci = (e) => {
5311
5322
  children: e.text
5312
5323
  }), /* @__PURE__ */ _("time", {
5313
5324
  className: "pkt-fileupload__queue-display__item__comment__time",
5314
- children: Ci(e.timestamp)
5325
+ children: Ei(e.timestamp)
5315
5326
  })]
5316
5327
  }), /* @__PURE__ */ v("div", {
5317
5328
  className: "pkt-fileupload__queue-display__item__comment__actions",
@@ -5332,46 +5343,46 @@ var Si = "comments", Ci = (e) => {
5332
5343
  })]
5333
5344
  })]
5334
5345
  })
5335
- }), Ei = ({ comments: e }) => {
5336
- let t = s(_i);
5346
+ }), ki = ({ comments: e }) => {
5347
+ let t = s(bi);
5337
5348
  return /* @__PURE__ */ _("input", {
5338
5349
  type: "hidden",
5339
5350
  name: `${t.name}-comments`,
5340
5351
  value: e ? JSON.stringify(e) : ""
5341
5352
  });
5342
- }, Di = (e) => e.getAttribute(Si) ?? [], Oi = {
5353
+ }, Ai = (e) => e.getAttribute(Ti) ?? [], ji = {
5343
5354
  id: "comment",
5344
- title: (e) => (e.attributes?.[Si] ?? []).length > 0 ? "" : "Legg til kommentar",
5355
+ title: (e) => (e.attributes?.[Ti] ?? []).length > 0 ? "" : "Legg til kommentar",
5345
5356
  ariaLabel: "Legg til kommentar",
5346
5357
  renderExtendedUI: (e) => {
5347
- let t = Di(e)[0];
5348
- return /* @__PURE__ */ _(wi, {
5358
+ let t = Ai(e)[0];
5359
+ return /* @__PURE__ */ _(Di, {
5349
5360
  fileItem: e.file,
5350
5361
  disabled: e.disabled,
5351
5362
  closeOperationUi: e.close,
5352
5363
  onAddComment: (t) => {
5353
- e.setAttribute(Si, [t]);
5364
+ e.setAttribute(Ti, [t]);
5354
5365
  },
5355
5366
  existingComment: t
5356
5367
  });
5357
5368
  },
5358
5369
  renderContent: (e) => {
5359
5370
  if (e.isActive) return null;
5360
- let t = Di(e)[0];
5361
- return t ? /* @__PURE__ */ _(Ti, {
5371
+ let t = Ai(e)[0];
5372
+ return t ? /* @__PURE__ */ _(Oi, {
5362
5373
  comment: t,
5363
5374
  disabled: e.disabled,
5364
5375
  onEditComment: e.activate,
5365
- onDeleteComment: () => e.setAttribute(Si, void 0)
5376
+ onDeleteComment: () => e.setAttribute(Ti, void 0)
5366
5377
  }) : null;
5367
5378
  },
5368
- renderHidden: (e) => /* @__PURE__ */ _(Ei, { comments: e.getAttribute(Si) }, `comments${e.file.fileId}`)
5369
- }, ki = (e) => ({
5379
+ renderHidden: (e) => /* @__PURE__ */ _(ki, { comments: e.getAttribute(Ti) }, `comments${e.file.fileId}`)
5380
+ }, Mi = (e) => ({
5370
5381
  id: "remove",
5371
5382
  title: "Slett",
5372
5383
  ariaLabel: "Slett fil",
5373
5384
  onClick: ({ file: t }) => e(t.fileId)
5374
- }), Ai = ({ initialValue: e, disabled: t, onSave: n, onCancel: r }) => {
5385
+ }), Ni = ({ initialValue: e, disabled: t, onSave: n, onCancel: r }) => {
5375
5386
  let i = p(null), a = l(), o = () => n(i.current?.value ?? "");
5376
5387
  return /* @__PURE__ */ v(g, { children: [
5377
5388
  /* @__PURE__ */ _("label", {
@@ -5406,19 +5417,19 @@ var Si = "comments", Ci = (e) => {
5406
5417
  children: "Avbryt"
5407
5418
  })
5408
5419
  ] });
5409
- }, ji = ({ targetFilename: e }) => {
5410
- let t = s(_i);
5420
+ }, Pi = ({ targetFilename: e }) => {
5421
+ let t = s(bi);
5411
5422
  return /* @__PURE__ */ _("input", {
5412
5423
  type: "hidden",
5413
5424
  name: `${t.name}-targetFilename`,
5414
5425
  value: e
5415
5426
  });
5416
- }, Mi = (e) => e.getAttribute("targetFilename") || pi(e.file, ""), Ni = {
5427
+ }, Fi = (e) => e.getAttribute("targetFilename") || gi(e.file, ""), Ii = {
5417
5428
  id: "rename",
5418
5429
  title: "Rediger",
5419
5430
  ariaLabel: "Rediger filnavn",
5420
- renderInlineUI: (e) => /* @__PURE__ */ _(Ai, {
5421
- initialValue: Mi(e),
5431
+ renderInlineUI: (e) => /* @__PURE__ */ _(Ni, {
5432
+ initialValue: Fi(e),
5422
5433
  disabled: e.disabled,
5423
5434
  onSave: (t) => {
5424
5435
  let n = t.trim();
@@ -5426,8 +5437,8 @@ var Si = "comments", Ci = (e) => {
5426
5437
  },
5427
5438
  onCancel: e.close
5428
5439
  }),
5429
- renderHidden: (e) => /* @__PURE__ */ _(ji, { targetFilename: Mi(e) }, `rename${e.file.fileId}`)
5430
- }, Pi = (e, t) => {
5440
+ renderHidden: (e) => /* @__PURE__ */ _(Pi, { targetFilename: Fi(e) }, `rename${e.file.fileId}`)
5441
+ }, Li = (e, t) => {
5431
5442
  let n = o((t, n) => e.find((e) => e.fileId === t)?.attributes?.[n], [e]), r = o((n, r, i) => {
5432
5443
  let a = e.find((e) => e.fileId === n);
5433
5444
  if (!a) return;
@@ -5447,7 +5458,7 @@ var Si = "comments", Ci = (e) => {
5447
5458
  setAttribute: (t, n) => r(e, t, n)
5448
5459
  }), [n, r])
5449
5460
  };
5450
- }, Fi = (e) => {
5461
+ }, Ri = (e) => {
5451
5462
  let [t, n] = m(!1), [r, i] = m(0), a = p(null);
5452
5463
  return {
5453
5464
  isOpen: t,
@@ -5461,10 +5472,10 @@ var Si = "comments", Ci = (e) => {
5461
5472
  n(!1), a.current?.close();
5462
5473
  }, []),
5463
5474
  navigate: o((t) => {
5464
- e.length !== 0 && i((n) => ui(n, t, e.length));
5475
+ e.length !== 0 && i((n) => pi(n, t, e.length));
5465
5476
  }, [e.length])
5466
5477
  };
5467
- }, Ii = (e) => {
5478
+ }, zi = (e) => {
5468
5479
  let [t, n] = m({});
5469
5480
  return c(() => {
5470
5481
  n((t) => {
@@ -5491,7 +5502,7 @@ var Si = "comments", Ci = (e) => {
5491
5502
  });
5492
5503
  }, [])
5493
5504
  };
5494
- }, Li = (e, { uploadStrategy: t, required: n, currentFileCount: r, onMissingFiles: i }) => {
5505
+ }, Bi = (e, { uploadStrategy: t, required: n, currentFileCount: r, onMissingFiles: i }) => {
5495
5506
  c(() => {
5496
5507
  if (t !== "custom" || !n) return;
5497
5508
  let a = e.current?.form;
@@ -5509,8 +5520,8 @@ var Si = "comments", Ci = (e) => {
5509
5520
  r,
5510
5521
  i
5511
5522
  ]);
5512
- }, Ri = i(({ ariaLabel: e, ariaLabelledby: t, ariaLive: n = "polite", ariaValueText: r, id: i, role: a = "progressbar", skin: o = "dark-blue", statusPlacement: s = "following", statusType: l = "none", title: u, titlePosition: d = "left", valueCurrent: h = 0, valueMax: g = 100, valueMin: y = 0, className: b, ...x }, S) => {
5513
- let C = f(() => Yn(), []), w = i || C, T = p(null), [E, D] = m(0);
5523
+ }, Vi = i(({ ariaLabel: e, ariaLabelledby: t, ariaLive: n = "polite", ariaValueText: r, id: i, role: a = "progressbar", skin: o = "dark-blue", statusPlacement: s = "following", statusType: l = "none", title: u, titlePosition: d = "left", valueCurrent: h = 0, valueMax: g = 100, valueMin: y = 0, className: b, ...x }, S) => {
5524
+ let C = f(() => Qn(), []), w = i || C, T = p(null), [E, D] = m(0);
5514
5525
  c(() => {
5515
5526
  T.current && D(T.current.getBoundingClientRect().width || 0);
5516
5527
  }, [h]);
@@ -5561,41 +5572,41 @@ var Si = "comments", Ci = (e) => {
5561
5572
  })
5562
5573
  });
5563
5574
  });
5564
- Ri.displayName = "PktProgressbar";
5575
+ Vi.displayName = "PktProgressbar";
5565
5576
  //#endregion
5566
5577
  //#region ../../shared-utils/scroll-lock/index.ts
5567
- var zi = "is-scroll-locked", Bi = 0, Vi = 0, Hi = () => typeof document < "u" && typeof window < "u", Ui = () => {
5578
+ var Hi = "is-scroll-locked", Ui = 0, Wi = 0, Gi = () => typeof document < "u" && typeof window < "u", Ki = () => {
5568
5579
  let e = document.body, t = document.documentElement;
5569
- Vi = window.scrollY || window.pageYOffset;
5580
+ Wi = window.scrollY || window.pageYOffset;
5570
5581
  let n = window.innerWidth - t.clientWidth;
5571
- n > 0 && (e.style.paddingRight = `${n}px`), e.style.position = "fixed", e.style.top = `-${Vi}px`, e.style.left = "0", e.style.right = "0", e.style.width = "100%", e.style.overflow = "hidden", t.classList.add(zi);
5572
- }, Wi = () => {
5582
+ n > 0 && (e.style.paddingRight = `${n}px`), e.style.position = "fixed", e.style.top = `-${Wi}px`, e.style.left = "0", e.style.right = "0", e.style.width = "100%", e.style.overflow = "hidden", t.classList.add(Hi);
5583
+ }, qi = () => {
5573
5584
  let e = document.body, t = document.documentElement;
5574
- e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("width"), e.style.removeProperty("overflow"), e.style.removeProperty("padding-right"), t.classList.remove(zi), typeof window.scrollTo == "function" && window.scrollTo({ top: Vi });
5575
- }, Gi = () => {
5576
- Hi() && (Bi += 1, Bi === 1 && Ui());
5577
- }, Ki = () => {
5578
- !Hi() || Bi === 0 || (--Bi, Bi === 0 && Wi());
5579
- }, qi = () => ({ locked: !1 }), Ji = (e, t) => {
5580
- e.locked !== t && (e.locked = t, t ? Gi() : Ki());
5581
- }, Yi = i(({ children: e, className: t, open: n = !1, headingText: r = "", hideCloseButton: i = !1, closeOnBackdropClick: a = !1, size: s = "medium", removePadding: l = !1, closeButtonSkin: u = "blue", variant: d = "dialog", drawerPosition: f = "right", transparentBackdrop: m = !1, onClose: h, ...g }, y) => {
5582
- let b = p(null), x = p(qi()), S = o((e) => {
5585
+ e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("width"), e.style.removeProperty("overflow"), e.style.removeProperty("padding-right"), t.classList.remove(Hi), typeof window.scrollTo == "function" && window.scrollTo({ top: Wi });
5586
+ }, Ji = () => {
5587
+ Gi() && (Ui += 1, Ui === 1 && Ki());
5588
+ }, Yi = () => {
5589
+ !Gi() || Ui === 0 || (--Ui, Ui === 0 && qi());
5590
+ }, Xi = () => ({ locked: !1 }), Zi = (e, t) => {
5591
+ e.locked !== t && (e.locked = t, t ? Ji() : Yi());
5592
+ }, Qi = i(({ children: e, className: t, open: n = !1, headingText: r = "", hideCloseButton: i = !1, closeOnBackdropClick: a = !1, size: s = "medium", removePadding: l = !1, closeButtonSkin: u = "blue", variant: d = "dialog", drawerPosition: f = "right", transparentBackdrop: m = !1, onClose: h, ...g }, y) => {
5593
+ let b = p(null), x = p(Xi()), S = o((e) => {
5583
5594
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5584
5595
  }, [y]), C = o(() => {
5585
- b.current?.open && (b.current.close(), Ji(x.current, !1), h?.());
5596
+ b.current?.open && (b.current.close(), Zi(x.current, !1), h?.());
5586
5597
  }, [h]);
5587
5598
  c(() => {
5588
- n ? (b.current?.open || b.current?.showModal(), Ji(x.current, !0)) : (b.current?.open && b.current.close(), Ji(x.current, !1));
5599
+ n ? (b.current?.open || b.current?.showModal(), Zi(x.current, !0)) : (b.current?.open && b.current.close(), Zi(x.current, !1));
5589
5600
  }, [n]), c(() => {
5590
5601
  let e = x.current;
5591
5602
  return () => {
5592
- Ji(e, !1);
5603
+ Zi(e, !1);
5593
5604
  };
5594
5605
  }, []);
5595
5606
  let w = o((e) => {
5596
5607
  a && e.target === b.current && C();
5597
5608
  }, [a, C]), T = o(() => {
5598
- Ji(x.current, !1), h?.();
5609
+ Zi(x.current, !1), h?.();
5599
5610
  }, [h]), E = u === "blue", D = (0, M.default)({
5600
5611
  "pkt-modal": !0,
5601
5612
  "pkt-modal--removePadding": l,
@@ -5649,11 +5660,11 @@ var zi = "is-scroll-locked", Bi = 0, Vi = 0, Hi = () => typeof document < "u" &&
5649
5660
  })
5650
5661
  });
5651
5662
  });
5652
- Yi.displayName = "PktModal";
5663
+ Qi.displayName = "PktModal";
5653
5664
  //#endregion
5654
5665
  //#region src/components/fileupload/Truncate.tsx
5655
- var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5656
- let n = s(Xi), r = li(e, t === void 0 ? n.tail : t);
5666
+ var $i = n({ tail: 5 }), ea = ({ children: e, tail: t }) => {
5667
+ let n = s($i), r = fi(e, t === void 0 ? n.tail : t);
5657
5668
  return r ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
5658
5669
  className: "pkt-fileupload__queue-display__item__title__head",
5659
5670
  "data-pkt-truncate-part": "first",
@@ -5666,18 +5677,18 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5666
5677
  "data-pkt-truncate-part": "first",
5667
5678
  children: e
5668
5679
  });
5669
- }, Qi = (e) => /* @__PURE__ */ _("button", {
5680
+ }, ta = (e) => /* @__PURE__ */ _("button", {
5670
5681
  type: "button",
5671
5682
  onClick: e.onClick,
5672
5683
  disabled: e.disabled,
5673
5684
  className: "pkt-fileupload__queue-display__item__cancel-button",
5674
5685
  "aria-label": e.ariaLabel || "Avbryt opplasting",
5675
5686
  children: e.label || "Avbryt"
5676
- }), $i = () => /* @__PURE__ */ _("span", {
5687
+ }), na = () => /* @__PURE__ */ _("span", {
5677
5688
  className: "pkt-fileupload__queue-display__item__loading-text",
5678
5689
  "aria-label": "Laster opp fil",
5679
5690
  children: "Laster opp"
5680
- }), ea = ({ cancelTransfer: e, transferItem: t, disabled: n = !1 }) => {
5691
+ }), ra = ({ cancelTransfer: e, transferItem: t, disabled: n = !1 }) => {
5681
5692
  let r = t.showProgress ?? t.progress !== 0;
5682
5693
  return /* @__PURE__ */ v(g, { children: [
5683
5694
  /* @__PURE__ */ _(L, {
@@ -5688,21 +5699,21 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5688
5699
  /* @__PURE__ */ v("p", {
5689
5700
  className: "pkt-fileupload__queue-display__item__title",
5690
5701
  "aria-label": "Filnavn",
5691
- children: [/* @__PURE__ */ _(Zi, { children: pi(t) }), /* @__PURE__ */ v("span", {
5702
+ children: [/* @__PURE__ */ _(ea, { children: gi(t) }), /* @__PURE__ */ v("span", {
5692
5703
  className: "pkt-fileupload__queue-display__item__filesize",
5693
5704
  children: [
5694
5705
  " ",
5695
5706
  "(",
5696
- Kr(t.file.size),
5707
+ Yr(t.file.size),
5697
5708
  ")"
5698
5709
  ]
5699
5710
  })]
5700
5711
  }),
5701
- /* @__PURE__ */ _(Qi, {
5712
+ /* @__PURE__ */ _(ta, {
5702
5713
  onClick: e,
5703
5714
  disabled: n
5704
5715
  }),
5705
- r ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Ri, {
5716
+ r ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Vi, {
5706
5717
  valueCurrent: t.progress * 100,
5707
5718
  statusType: "none",
5708
5719
  valueMax: 100,
@@ -5712,20 +5723,20 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5712
5723
  className: "pkt-fileupload__queue-display__item__percentage",
5713
5724
  "aria-hidden": "true",
5714
5725
  children: `${Math.round(t.progress * 100)}%`
5715
- })] }) : /* @__PURE__ */ _($i, {})
5726
+ })] }) : /* @__PURE__ */ _(na, {})
5716
5727
  ] });
5717
- }, ta = ({ transferItem: e }) => /* @__PURE__ */ v("p", {
5728
+ }, ia = ({ transferItem: e }) => /* @__PURE__ */ v("p", {
5718
5729
  className: "pkt-fileupload__queue-display__item__title",
5719
- children: [/* @__PURE__ */ _(Zi, { children: pi(e) }), e.file && /* @__PURE__ */ v("span", {
5730
+ children: [/* @__PURE__ */ _(ea, { children: gi(e) }), e.file && /* @__PURE__ */ v("span", {
5720
5731
  className: "pkt-fileupload__queue-display__item__filesize",
5721
5732
  children: [
5722
5733
  " ",
5723
5734
  "(",
5724
- Kr(e.file.size),
5735
+ Yr(e.file.size),
5725
5736
  ")"
5726
5737
  ]
5727
5738
  })]
5728
- }), na = ({ transferItem: e, onRemove: t, disabled: n }) => {
5739
+ }), aa = ({ transferItem: e, onRemove: t, disabled: n }) => {
5729
5740
  let r = (e.lastProgress ?? 1) * 100;
5730
5741
  return /* @__PURE__ */ v(g, { children: [
5731
5742
  /* @__PURE__ */ _(L, {
@@ -5733,14 +5744,14 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5733
5744
  name: "alert-error",
5734
5745
  "aria-hidden": "true"
5735
5746
  }),
5736
- /* @__PURE__ */ _(ta, { transferItem: e }),
5737
- /* @__PURE__ */ _(Qi, {
5747
+ /* @__PURE__ */ _(ia, { transferItem: e }),
5748
+ /* @__PURE__ */ _(ta, {
5738
5749
  onClick: t,
5739
5750
  label: "Fjern",
5740
5751
  ariaLabel: "Fjern fil som feilet under opplasting",
5741
5752
  disabled: n
5742
5753
  }),
5743
- /* @__PURE__ */ _(Ri, {
5754
+ /* @__PURE__ */ _(Vi, {
5744
5755
  valueCurrent: r,
5745
5756
  statusType: "none",
5746
5757
  valueMax: 100,
@@ -5752,14 +5763,14 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5752
5763
  children: e.errorMessage
5753
5764
  })
5754
5765
  ] });
5755
- }, ra = ({ transferItem: e, onRemove: t, disabled: n }) => /* @__PURE__ */ v(g, { children: [
5766
+ }, oa = ({ transferItem: e, onRemove: t, disabled: n }) => /* @__PURE__ */ v(g, { children: [
5756
5767
  /* @__PURE__ */ _(L, {
5757
5768
  className: "pkt-fileupload__queue-display__item__icon pkt-icon--medium",
5758
5769
  name: "alert-error",
5759
5770
  "aria-hidden": "true"
5760
5771
  }),
5761
- /* @__PURE__ */ _(ta, { transferItem: e }),
5762
- /* @__PURE__ */ _(Qi, {
5772
+ /* @__PURE__ */ _(ia, { transferItem: e }),
5773
+ /* @__PURE__ */ _(ta, {
5763
5774
  onClick: t,
5764
5775
  label: "Fjern",
5765
5776
  ariaLabel: "Fjern fil som feilet under opplasting",
@@ -5769,15 +5780,15 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5769
5780
  className: "pkt-fileupload__queue-display__item__error-message",
5770
5781
  children: e.errorMessage
5771
5782
  })
5772
- ] }), ia = ({ transferItem: e, onRemove: t, disabled: n }) => e.showProgress ? /* @__PURE__ */ _(na, {
5783
+ ] }), sa = ({ transferItem: e, onRemove: t, disabled: n }) => e.showProgress ? /* @__PURE__ */ _(aa, {
5773
5784
  transferItem: e,
5774
5785
  onRemove: t,
5775
5786
  disabled: n
5776
- }) : /* @__PURE__ */ _(ra, {
5787
+ }) : /* @__PURE__ */ _(oa, {
5777
5788
  transferItem: e,
5778
5789
  onRemove: t,
5779
5790
  disabled: n
5780
- }), aa = ({ operation: e, context: t }) => {
5791
+ }), ca = ({ operation: e, context: t }) => {
5781
5792
  let n = typeof e.title == "function" ? e.title(t.file) : e.title;
5782
5793
  return n ? /* @__PURE__ */ _("button", {
5783
5794
  type: "button",
@@ -5789,11 +5800,11 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5789
5800
  "aria-label": typeof e.ariaLabel == "function" ? e.ariaLabel(t.file) : e.ariaLabel,
5790
5801
  children: n
5791
5802
  }) : null;
5792
- }, oa = ({ transferItem: e }) => /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(L, {
5803
+ }, la = ({ transferItem: e }) => /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(L, {
5793
5804
  name: "document-text",
5794
5805
  className: "pkt-fileupload__queue-display__item__icon pkt-icon--medium",
5795
5806
  "aria-hidden": "true"
5796
- }), /* @__PURE__ */ _(ta, { transferItem: e })] }), sa = ({ transferItem: e, onPreviewClick: t }) => {
5807
+ }), /* @__PURE__ */ _(ia, { transferItem: e })] }), ua = ({ transferItem: e, onPreviewClick: t }) => {
5797
5808
  let [n, r] = m(null), [i, a] = m(!1), o = e.file;
5798
5809
  c(() => {
5799
5810
  if (a(!1), o.type.startsWith("image/")) {
@@ -5827,10 +5838,10 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5827
5838
  }), s]
5828
5839
  }), /* @__PURE__ */ _("span", {
5829
5840
  className: "pkt-fileupload__queue-display__item__thumbnail__title",
5830
- children: /* @__PURE__ */ _(Zi, { children: e.attributes.targetFilename })
5841
+ children: /* @__PURE__ */ _(ea, { children: e.attributes.targetFilename })
5831
5842
  })]
5832
5843
  });
5833
- }, ca = ({ isOpen: e, images: t, currentIndex: n, onClose: r, onNavigate: i, modalRef: a }) => {
5844
+ }, da = ({ isOpen: e, images: t, currentIndex: n, onClose: r, onNavigate: i, modalRef: a }) => {
5834
5845
  let [o, s] = m(null), [l, u] = m(!1), d = t[n], f = t.length > 1;
5835
5846
  return c(() => {
5836
5847
  if (u(!1), d && d.file.type.startsWith("image/")) {
@@ -5842,7 +5853,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5842
5853
  if (!e) return;
5843
5854
  let t = (e) => {
5844
5855
  if (e.key === "Tab") {
5845
- ci(e, a.current);
5856
+ di(e, a.current);
5846
5857
  return;
5847
5858
  }
5848
5859
  switch (e.key) {
@@ -5861,7 +5872,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5861
5872
  i,
5862
5873
  r,
5863
5874
  a
5864
- ]), d ? /* @__PURE__ */ _(Yi, {
5875
+ ]), d ? /* @__PURE__ */ _(Qi, {
5865
5876
  ref: a,
5866
5877
  headingText: d.attributes.targetFilename,
5867
5878
  closeOnBackdropClick: !0,
@@ -5911,7 +5922,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5911
5922
  ]
5912
5923
  })
5913
5924
  }) : null;
5914
- }, la = ({ operation: e, transferItem: t, inputName: n, disabled: r, activatedOperation: i, onActivate: a, onClose: o, buildAttributeAccessors: s }) => {
5925
+ }, fa = ({ operation: e, transferItem: t, inputName: n, disabled: r, activatedOperation: i, onActivate: a, onClose: o, buildAttributeAccessors: s }) => {
5915
5926
  let c = s(t.fileId);
5916
5927
  return {
5917
5928
  file: t,
@@ -5923,29 +5934,29 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5923
5934
  getAttribute: c.getAttribute,
5924
5935
  setAttribute: c.setAttribute
5925
5936
  };
5926
- }, ua = (e, t) => e.map((e) => ({
5937
+ }, pa = (e, t) => e.map((e) => ({
5927
5938
  operation: e,
5928
- context: la({
5939
+ context: fa({
5929
5940
  operation: e,
5930
5941
  ...t
5931
5942
  })
5932
- })), da = (e) => {
5933
- let t = ua(e.operations, e);
5943
+ })), ma = (e) => {
5944
+ let t = pa(e.operations, e);
5934
5945
  return /* @__PURE__ */ _("div", {
5935
5946
  className: "pkt-fileupload__queue-display__item__actions",
5936
- children: t.filter(({ operation: t }) => t.id !== e.activatedOperation?.id).map(({ operation: e, context: t }) => /* @__PURE__ */ _(aa, {
5947
+ children: t.filter(({ operation: t }) => t.id !== e.activatedOperation?.id).map(({ operation: e, context: t }) => /* @__PURE__ */ _(ca, {
5937
5948
  operation: e,
5938
5949
  context: t
5939
5950
  }, e.id))
5940
5951
  });
5941
- }, fa = (e) => {
5942
- let t = ua(e.operations, e);
5952
+ }, ha = (e) => {
5953
+ let t = pa(e.operations, e);
5943
5954
  return /* @__PURE__ */ _(g, { children: t.filter(({ operation: e }) => e.renderContent).map(({ operation: e, context: t }) => /* @__PURE__ */ _("div", {
5944
5955
  className: "pkt-fileupload__queue-display__item__operation-content",
5945
5956
  children: e.renderContent(t)
5946
5957
  }, e.id)) });
5947
- }, pa = (e) => {
5948
- let { transferItem: t, activatedOperation: n, operations: r, ItemRenderer: i, onPreviewClick: a } = e, o = n ? la({
5958
+ }, ga = (e) => {
5959
+ let { transferItem: t, activatedOperation: n, operations: r, ItemRenderer: i, onPreviewClick: a } = e, o = n ? fa({
5949
5960
  operation: n,
5950
5961
  ...e
5951
5962
  }) : void 0, s = n?.renderInlineUI || n?.renderExtendedUI ? [] : r;
@@ -5961,43 +5972,43 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
5961
5972
  queueItemOperations: r,
5962
5973
  onPreviewClick: a
5963
5974
  }),
5964
- s.length > 0 && /* @__PURE__ */ _(da, {
5975
+ s.length > 0 && /* @__PURE__ */ _(ma, {
5965
5976
  ...e,
5966
5977
  operations: s
5967
5978
  }),
5968
- /* @__PURE__ */ _(fa, { ...e }),
5979
+ /* @__PURE__ */ _(ha, { ...e }),
5969
5980
  n?.renderExtendedUI && o && /* @__PURE__ */ _("div", {
5970
5981
  className: "pkt-fileupload__queue-display__item__expanded-operation-ui",
5971
5982
  children: n.renderExtendedUI(o)
5972
5983
  })
5973
5984
  ] });
5974
- }, ma = (e) => {
5975
- let { transferItem: t, enableImagePreview: n, onCancelTransfer: r, onOpenPreview: i, disabled: a } = e, o = ei(t.progress), s = n && t.progress === "done" && $r(t);
5985
+ }, _a = (e) => {
5986
+ let { transferItem: t, enableImagePreview: n, onCancelTransfer: r, onOpenPreview: i, disabled: a } = e, o = ri(t.progress), s = n && t.progress === "done" && ni(t);
5976
5987
  switch (o) {
5977
- case "in-progress": return /* @__PURE__ */ _(ea, {
5988
+ case "in-progress": return /* @__PURE__ */ _(ra, {
5978
5989
  transferItem: t,
5979
5990
  cancelTransfer: () => r(t.fileId),
5980
5991
  disabled: a
5981
5992
  });
5982
- case "error": return /* @__PURE__ */ _(ia, {
5993
+ case "error": return /* @__PURE__ */ _(sa, {
5983
5994
  transferItem: t,
5984
5995
  onRemove: () => r(t.fileId),
5985
5996
  disabled: a
5986
5997
  });
5987
- case "idle": return /* @__PURE__ */ _(pa, {
5998
+ case "idle": return /* @__PURE__ */ _(ga, {
5988
5999
  ...e,
5989
6000
  onPreviewClick: s ? () => i(t.fileId) : void 0
5990
6001
  });
5991
6002
  }
5992
- }, ha = (e, t, n) => f(() => ti(e, t, n), [
6003
+ }, va = (e, t, n) => f(() => ii(e, t, n), [
5993
6004
  e,
5994
6005
  t,
5995
6006
  n
5996
- ]), ga = (e, t) => f(() => t ? e.filter((e) => e.progress === "done" && $r(e)) : [], [e, t]), _a = ({ files: e, cancelTransfer: t, transfers: n = [], queueItemOperations: r = [], ItemRenderer: i = oa, truncateTail: a, enableImagePreview: o = !1, uploadStrategy: s = "form", disabled: c = !1, inputName: l, buildAttributeAccessors: u }) => {
5997
- let d = ha(e, n, s), f = ga(d, o), p = Ii(r), m = Fi(f);
6007
+ ]), ya = (e, t) => f(() => t ? e.filter((e) => e.progress === "done" && ni(e)) : [], [e, t]), ba = ({ files: e, cancelTransfer: t, transfers: n = [], queueItemOperations: r = [], ItemRenderer: i = la, truncateTail: a, enableImagePreview: o = !1, uploadStrategy: s = "form", disabled: c = !1, inputName: l, buildAttributeAccessors: u }) => {
6008
+ let d = va(e, n, s), f = ya(d, o), p = zi(r), m = Ri(f);
5998
6009
  return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("ul", {
5999
6010
  className: "pkt-fileupload__queue-display",
6000
- children: /* @__PURE__ */ _(Xi.Provider, {
6011
+ children: /* @__PURE__ */ _($i.Provider, {
6001
6012
  value: { tail: a },
6002
6013
  children: d.map((e) => {
6003
6014
  let n = {
@@ -6015,10 +6026,10 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6015
6026
  "pkt-fileupload__queue-display__item--in-progress": typeof e.progress == "number",
6016
6027
  [`pkt-fileupload__queue-display__item--${e.progress}`]: typeof e.progress == "string"
6017
6028
  }),
6018
- children: [r.filter((e) => e.renderHidden).map((t) => /* @__PURE__ */ _("span", { children: t.renderHidden(la({
6029
+ children: [r.filter((e) => e.renderHidden).map((t) => /* @__PURE__ */ _("span", { children: t.renderHidden(fa({
6019
6030
  operation: t,
6020
6031
  ...n
6021
- })) }, `${t.id}-${e.fileId}`)), /* @__PURE__ */ _(ma, {
6032
+ })) }, `${t.id}-${e.fileId}`)), /* @__PURE__ */ _(_a, {
6022
6033
  ...n,
6023
6034
  ItemRenderer: i,
6024
6035
  enableImagePreview: o,
@@ -6028,7 +6039,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6028
6039
  }, e.fileId);
6029
6040
  })
6030
6041
  })
6031
- }), o && f.length > 0 && /* @__PURE__ */ _(ca, {
6042
+ }), o && f.length > 0 && /* @__PURE__ */ _(da, {
6032
6043
  modalRef: m.modalRef,
6033
6044
  isOpen: m.isOpen,
6034
6045
  images: f,
@@ -6036,10 +6047,10 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6036
6047
  onClose: m.close,
6037
6048
  onNavigate: m.navigate
6038
6049
  })] });
6039
- }, va = {
6040
- filename: oa,
6041
- thumbnail: sa
6042
- }, ya = i(({ value: e, defaultValue: t, id: n, multiple: r = !1, uploadStrategy: i = "form", addCommentsEnabled: a = !1, renameFilesEnabled: s = !1, truncateTail: d = 4, onFilesChanged: h, onFileUploadRequested: g, extraOperations: y = [], itemRenderer: b = va.filename, fullwidth: x = !1, allowedFormats: S, formatErrorMessage: C, maxFileSize: w, sizeErrorMessage: T, onFileValidation: E, onFileValidate: D, errorMessage: O, hasError: k = !1, disabled: A = !1, label: j, helptext: N, helptextDropdown: P, helptextDropdownButton: ee, optionalTag: te, optionalText: ne, requiredTag: F, requiredText: re, tagText: ie, required: ae = !1, enableImagePreview: oe = !1, "aria-describedby": se, "aria-invalid": I, strings: L, ...R }, ce) => {
6050
+ }, xa = {
6051
+ filename: la,
6052
+ thumbnail: ua
6053
+ }, Sa = i(({ value: e, defaultValue: t, id: n, multiple: r = !1, uploadStrategy: i = "form", addCommentsEnabled: a = !1, renameFilesEnabled: s = !1, truncateTail: d = 4, onFilesChanged: h, onFileUploadRequested: g, extraOperations: y = [], itemRenderer: b = xa.filename, fullwidth: x = !1, allowedFormats: S, formatErrorMessage: C, maxFileSize: w, sizeErrorMessage: T, onFileValidation: E, onFileValidate: D, errorMessage: O, hasError: k = !1, disabled: A = !1, label: j, helptext: N, helptextDropdown: P, helptextDropdownButton: ee, optionalTag: te, optionalText: ne, requiredTag: F, requiredText: re, tagText: ie, required: ae = !1, enableImagePreview: oe = !1, "aria-describedby": se, "aria-invalid": I, strings: L, ...R }, ce) => {
6043
6054
  let z = l(), H = n ?? `pkt-fileupload-${z}`, le = p(null);
6044
6055
  u(ce, () => le.current, []);
6045
6056
  let ue = "transfers" in R ? R.transfers : void 0, U = ge(["fileupload"], L).fileupload, [de, W] = m(null), [G, K] = m("");
@@ -6053,7 +6064,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6053
6064
  N ? `${H}-helptext` : void 0,
6054
6065
  pe
6055
6066
  ].filter(Boolean).join(" ") || void 0, J = q || I === !0 || I === "true", Y = o((e) => {
6056
- let t = Qr(e, {
6067
+ let t = ti(e, {
6057
6068
  allowedFormats: S,
6058
6069
  maxFileSize: w,
6059
6070
  formatErrorMessage: C,
@@ -6079,13 +6090,13 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6079
6090
  ]);
6080
6091
  e !== void 0 && t !== void 0 && console.warn("PktFileupload: Både value og defaultValue er angitt. Komponenten kan være enten 'controlled' eller 'uncontrolled', ikke begge deler. Bruk kun én av dem. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable"), e !== void 0 && h === void 0 && console.warn("PktFileupload: value-prop er angitt uten onFilesChanged-callback. Når en komponent er 'controlled', må endringer håndteres via en callback. Vennligst legg til onFilesChanged-callback for å håndtere endringer i fil-listen. Se https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable");
6081
6092
  let he = e !== void 0, [X, Z] = m(() => t ?? []), Q = he ? e : X;
6082
- Li(le, {
6093
+ Bi(le, {
6083
6094
  uploadStrategy: i,
6084
6095
  required: ae,
6085
6096
  currentFileCount: Q.length,
6086
6097
  onMissingFiles: o(() => W(U.requiredMissing), [U])
6087
6098
  });
6088
- let ve = typeof b == "string" ? va[b] : b, ye = b === "thumbnail", be = typeof R.accept == "string" ? R.accept.trim() : void 0, xe = f(() => Xr(be, S) || void 0, [be, S]), Se = s && !ye, Ce = a && !ye, we = o((e) => {
6099
+ let ve = typeof b == "string" ? xa[b] : b, ye = b === "thumbnail", be = typeof R.accept == "string" ? R.accept.trim() : void 0, xe = f(() => $r(be, S) || void 0, [be, S]), Se = s && !ye, Ce = a && !ye, we = o((e) => {
6089
6100
  for (let t of e) {
6090
6101
  let e = Y(t.file);
6091
6102
  if (e) {
@@ -6125,15 +6136,15 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6125
6136
  Q,
6126
6137
  R,
6127
6138
  he
6128
- ]), { buildAttributeAccessors: De } = Pi(Q, Te), Oe = f(() => {
6139
+ ]), { buildAttributeAccessors: De } = Li(Q, Te), Oe = f(() => {
6129
6140
  let e = [];
6130
- return Se && e.push(Ni), Ce && e.push(Oi), e.push(...y), e.push(ki(Ee)), e;
6141
+ return Se && e.push(Ii), Ce && e.push(ji), e.push(...y), e.push(Mi(Ee)), e;
6131
6142
  }, [
6132
6143
  Se,
6133
6144
  Ce,
6134
6145
  y,
6135
6146
  Ee
6136
- ]), { totalCount: ke, uploadedCount: $, failedCount: Ae } = f(() => di(Q, ue), [Q, ue]), je = V(ke, U.fileLabelOne, U.fileLabelOther), Me = /* @__PURE__ */ _("div", {
6147
+ ]), { totalCount: ke, uploadedCount: $, failedCount: Ae } = f(() => mi(Q, ue), [Q, ue]), je = V(ke, U.fileLabelOne, U.fileLabelOther), Me = /* @__PURE__ */ _("div", {
6137
6148
  className: (0, M.default)("pkt-fileupload", {
6138
6149
  "pkt-fileupload--full-width": x,
6139
6150
  "pkt-fileupload--error": q,
@@ -6141,7 +6152,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6141
6152
  }),
6142
6153
  "aria-disabled": A,
6143
6154
  ...A ? { inert: !0 } : {},
6144
- children: /* @__PURE__ */ v(_i.Provider, {
6155
+ children: /* @__PURE__ */ v(bi.Provider, {
6145
6156
  value: {
6146
6157
  name: R.name || "",
6147
6158
  multiple: !!r,
@@ -6168,7 +6179,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6168
6179
  label: je
6169
6180
  })
6170
6181
  }),
6171
- /* @__PURE__ */ _(vi, {
6182
+ /* @__PURE__ */ _(xi, {
6172
6183
  id: H,
6173
6184
  name: R.name || "",
6174
6185
  value: Q,
@@ -6176,7 +6187,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6176
6187
  multiple: r,
6177
6188
  uploadStrategy: i,
6178
6189
  ref: le,
6179
- accept: ye ? fi : xe,
6190
+ accept: ye ? hi : xe,
6180
6191
  isThumbnailView: ye,
6181
6192
  disabled: A,
6182
6193
  required: ae && i === "form",
@@ -6195,7 +6206,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6195
6206
  className: "pkt-fileupload__error-alert",
6196
6207
  children: fe
6197
6208
  }),
6198
- Q.length > 0 && /* @__PURE__ */ _(_a, {
6209
+ Q.length > 0 && /* @__PURE__ */ _(ba, {
6199
6210
  files: Q,
6200
6211
  cancelTransfer: Ee,
6201
6212
  truncateTail: d,
@@ -6213,7 +6224,7 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6213
6224
  });
6214
6225
  return j ? /* @__PURE__ */ _("div", {
6215
6226
  className: "pkt-fileupload-component",
6216
- children: /* @__PURE__ */ _($n, {
6227
+ children: /* @__PURE__ */ _(nr, {
6217
6228
  strings: L,
6218
6229
  forId: H,
6219
6230
  label: j,
@@ -6235,10 +6246,10 @@ var Xi = n({ tail: 5 }), Zi = ({ children: e, tail: t }) => {
6235
6246
  children: Me
6236
6247
  });
6237
6248
  });
6238
- ya.displayName = "PktFileUpload";
6249
+ Sa.displayName = "PktFileUpload";
6239
6250
  //#endregion
6240
- //#region ../../shared-types/header-footer.ts
6241
- var ba = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", xa = "https://www.oslo.kommune.no", Sa = {
6251
+ //#region ../../shared-utils/header-footer/icon-map.ts
6252
+ var Ca = {
6242
6253
  automat: "parking-meter",
6243
6254
  bike: "bicycle",
6244
6255
  corona: "virus",
@@ -6263,10 +6274,10 @@ var ba = "https://cdn.web.oslo.kommune.no/header-footer/header-footer.json", xa
6263
6274
  treatment: "processing",
6264
6275
  "warning-triangle": "alert-warning"
6265
6276
  };
6266
- function Ca(e) {
6267
- return e && (Sa[e] ?? e);
6277
+ function wa(e) {
6278
+ return e && (Ca[e] ?? e);
6268
6279
  }
6269
- var wa = {
6280
+ var Ta = {
6270
6281
  "facebook.com": "facebook",
6271
6282
  "fb.com": "facebook",
6272
6283
  "instagram.com": "instagram",
@@ -6274,36 +6285,36 @@ var wa = {
6274
6285
  "x.com": "x",
6275
6286
  "github.com": "github"
6276
6287
  };
6277
- function Ta(e) {
6288
+ function Ea(e) {
6278
6289
  return e.toLowerCase().replace(/^(?:www|m)\./, "");
6279
6290
  }
6280
- function Ea(e, t) {
6291
+ function Da(e, t) {
6281
6292
  if (e) try {
6282
- let t = wa[Ta(new URL(e).hostname)];
6293
+ let t = Ta[Ea(new URL(e).hostname)];
6283
6294
  if (t) return t;
6284
6295
  } catch {}
6285
6296
  if (t) {
6286
6297
  let e = t.trim().toLowerCase().replace(/\s+/g, "-");
6287
6298
  if (e) {
6288
- let t = Ca(e);
6299
+ let t = wa(e);
6289
6300
  if (t) return t;
6290
6301
  }
6291
6302
  }
6292
6303
  }
6293
6304
  //#endregion
6294
6305
  //#region ../../shared-utils/header-footer/select-megamenu.ts
6295
- var Da = "nb-NO";
6296
- function Oa(e, t = Da) {
6297
- if (e) return e[t] ?? e[Da];
6306
+ var Oa = "nb-NO";
6307
+ function ka(e, t = Oa) {
6308
+ if (e) return e[t] ?? e[Oa];
6298
6309
  }
6299
6310
  //#endregion
6300
6311
  //#region ../../shared-utils/header-footer/external-domain.ts
6301
- var ka = "oslo.kommune.no", Aa = /\.(?:co|com|org|net|gov|edu|ac|kommune)\.[a-z]{2}$/i;
6302
- function ja(e) {
6312
+ var Aa = "oslo.kommune.no", ja = /\.(?:co|com|org|net|gov|edu|ac|kommune)\.[a-z]{2}$/i;
6313
+ function Ma(e) {
6303
6314
  let t = e.toLowerCase().replace(/\.$/, ""), n = t.split(".");
6304
- return n.length <= 2 ? t : n.slice(Aa.test(t) ? -3 : -2).join(".");
6315
+ return n.length <= 2 ? t : n.slice(ja.test(t) ? -3 : -2).join(".");
6305
6316
  }
6306
- function Ma(e) {
6317
+ function Na(e) {
6307
6318
  if (!e) return;
6308
6319
  let t;
6309
6320
  try {
@@ -6311,9 +6322,9 @@ function Ma(e) {
6311
6322
  } catch {
6312
6323
  return;
6313
6324
  }
6314
- if (t.protocol === "http:" || t.protocol === "https:") return ja(t.hostname.toLowerCase().replace(/\.$/, ""));
6325
+ if (t.protocol === "http:" || t.protocol === "https:") return Ma(t.hostname.toLowerCase().replace(/\.$/, ""));
6315
6326
  }
6316
- function Na(e, t = ka) {
6327
+ function Pa(e, t = Aa) {
6317
6328
  if (!e) return;
6318
6329
  let n;
6319
6330
  try {
@@ -6323,21 +6334,21 @@ function Na(e, t = ka) {
6323
6334
  }
6324
6335
  if (n.protocol !== "http:" && n.protocol !== "https:") return;
6325
6336
  let r = n.hostname.toLowerCase().replace(/\.$/, ""), i = t.toLowerCase();
6326
- if (!(r === i || r.endsWith(`.${i}`))) return ja(r);
6337
+ if (!(r === i || r.endsWith(`.${i}`))) return Ma(r);
6327
6338
  }
6328
6339
  //#endregion
6329
6340
  //#region ../../shared-utils/header-footer/fetch-header-footer-data.ts
6330
- var Pa = /* @__PURE__ */ new Map();
6331
- async function Fa(e) {
6341
+ var Fa = /* @__PURE__ */ new Map();
6342
+ async function Ia(e) {
6332
6343
  let t = await fetch(e);
6333
6344
  if (!t.ok) throw Error(`pkt-header-menu: failed to fetch ${e} (HTTP ${t.status})`);
6334
6345
  let n = await t.json();
6335
6346
  if (!n || typeof n != "object") throw Error(`pkt-header-menu: ${e} returned a non-object payload`);
6336
6347
  return n;
6337
6348
  }
6338
- function Ia(e, t) {
6339
- return t ? t.aborted ? Promise.reject(La(t.reason)) : new Promise((n, r) => {
6340
- let i = () => r(La(t.reason));
6349
+ function La(e, t) {
6350
+ return t ? t.aborted ? Promise.reject(Ra(t.reason)) : new Promise((n, r) => {
6351
+ let i = () => r(Ra(t.reason));
6341
6352
  t.addEventListener("abort", i, { once: !0 }), e.then((e) => {
6342
6353
  t.removeEventListener("abort", i), n(e);
6343
6354
  }, (e) => {
@@ -6345,22 +6356,22 @@ function Ia(e, t) {
6345
6356
  });
6346
6357
  }) : e;
6347
6358
  }
6348
- function La(e) {
6359
+ function Ra(e) {
6349
6360
  return e instanceof Error ? e : new DOMException("The operation was aborted.", "AbortError");
6350
6361
  }
6351
- async function Ra(e = ba, t) {
6352
- let n = Pa.get(e);
6353
- return n || (n = Fa(e), n.catch(() => Pa.delete(e)), Pa.set(e, n)), Ia(n, t);
6362
+ async function za(e = Rn, t) {
6363
+ let n = Fa.get(e);
6364
+ return n || (n = Ia(e), n.catch(() => Fa.delete(e)), Fa.set(e, n)), La(n, t);
6354
6365
  }
6355
6366
  //#endregion
6356
6367
  //#region src/components/footer/FooterGlobal.tsx
6357
- var za = "#cb-trigger";
6358
- function Ba({ data: e, dataUrl: t, locale: n = "nb-NO", skipGlobal: r = !1, onDataError: i }) {
6368
+ var Ba = "#cb-trigger";
6369
+ function Va({ data: e, dataUrl: t, locale: n = "nb-NO", skipGlobal: r = !1, onDataError: i }) {
6359
6370
  let [a, o] = m(), s = p(i);
6360
6371
  s.current = i, c(() => {
6361
6372
  if (e || r) return;
6362
6373
  let n = new AbortController();
6363
- return Ra(t, n.signal).then((e) => {
6374
+ return za(t, n.signal).then((e) => {
6364
6375
  n.signal.aborted || o(e);
6365
6376
  }).catch((e) => {
6366
6377
  e.name !== "AbortError" && (console.warn("Failed to fetch header/footer data:", e), s.current?.(e));
@@ -6372,20 +6383,20 @@ function Ba({ data: e, dataUrl: t, locale: n = "nb-NO", skipGlobal: r = !1, onDa
6372
6383
  ]);
6373
6384
  let l = e ?? a;
6374
6385
  return f(() => {
6375
- if (!r) return Oa(l, n)?.footer;
6386
+ if (!r) return ka(l, n)?.footer;
6376
6387
  }, [
6377
6388
  l,
6378
6389
  n,
6379
6390
  r
6380
6391
  ]);
6381
6392
  }
6382
- var Va = ({ link: e, includeConsent: t, consent: n }) => {
6383
- if (e.url === za) return t ? /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(kr, {
6393
+ var Ha = ({ link: e, includeConsent: t, consent: n }) => {
6394
+ if (e.url === Ba) return t ? /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(Mr, {
6384
6395
  triggerType: "footerlink",
6385
6396
  triggerText: e.text,
6386
6397
  ...n
6387
6398
  }) }) : null;
6388
- let r = Na(e.url);
6399
+ let r = Pa(e.url);
6389
6400
  return /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v("a", {
6390
6401
  href: e.url,
6391
6402
  children: [e.text, r && /* @__PURE__ */ v("span", {
@@ -6397,15 +6408,15 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6397
6408
  ]
6398
6409
  })]
6399
6410
  }) });
6400
- }, Ha = ({ section: e, includeConsent: t, consent: n }) => /* @__PURE__ */ v("section", { children: [/* @__PURE__ */ _("h2", { children: e.title }), /* @__PURE__ */ _("ul", {
6411
+ }, Ua = ({ section: e, includeConsent: t, consent: n }) => /* @__PURE__ */ v("section", { children: [/* @__PURE__ */ _("h2", { children: e.title }), /* @__PURE__ */ _("ul", {
6401
6412
  className: "pkt-footer__link-list",
6402
- children: e.links.map((e) => /* @__PURE__ */ _(Va, {
6413
+ children: e.links.map((e) => /* @__PURE__ */ _(Ha, {
6403
6414
  link: e,
6404
6415
  includeConsent: t,
6405
6416
  consent: n
6406
6417
  }, `${e.url}|${e.text}`))
6407
- })] }), Ua = ({ entry: e }) => {
6408
- let t = Ea(e.url, e.text);
6418
+ })] }), Wa = ({ entry: e }) => {
6419
+ let t = Da(e.url, e.text);
6409
6420
  return t ? /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", {
6410
6421
  className: "pkt-footer__some-link",
6411
6422
  href: e.url,
@@ -6418,7 +6429,7 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6418
6429
  href: e.url,
6419
6430
  children: e.text
6420
6431
  }) });
6421
- }, Wa = ({ footer: e, includeConsent: t = !1, consent: n = {} }) => {
6432
+ }, Ga = ({ footer: e, includeConsent: t = !1, consent: n = {} }) => {
6422
6433
  let r = e.links?.length > 0, i = e.some?.length > 0;
6423
6434
  return /* @__PURE__ */ _("div", {
6424
6435
  className: "pkt-footer__band pkt-footer__band--global",
@@ -6426,7 +6437,7 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6426
6437
  className: "pkt-footer__inner",
6427
6438
  children: /* @__PURE__ */ v("div", {
6428
6439
  className: "pkt-footer__sections",
6429
- children: [e.sections.map((e) => /* @__PURE__ */ _(Ha, {
6440
+ children: [e.sections.map((e) => /* @__PURE__ */ _(Ua, {
6430
6441
  section: e,
6431
6442
  includeConsent: t,
6432
6443
  consent: n
@@ -6440,14 +6451,14 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6440
6451
  }) }, `${e.url}|${e.text}`))
6441
6452
  }), i && /* @__PURE__ */ _("ul", {
6442
6453
  className: "pkt-footer__some",
6443
- children: e.some.map((e) => /* @__PURE__ */ _(Ua, { entry: e }, `${e.url}|${e.text}`))
6454
+ children: e.some.map((e) => /* @__PURE__ */ _(Wa, { entry: e }, `${e.url}|${e.text}`))
6444
6455
  })]
6445
6456
  })]
6446
6457
  })
6447
6458
  })
6448
6459
  });
6449
- }, Ga = ({ link: e, openLinksInNewTab: t }) => {
6450
- let n = e.openInNewTab || t, r = e.external ? Ma(e.href) : void 0;
6460
+ }, Ka = ({ link: e, openLinksInNewTab: t }) => {
6461
+ let n = e.openInNewTab || t, r = e.external ? Na(e.href) : void 0;
6451
6462
  return /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v("a", {
6452
6463
  href: e.href,
6453
6464
  target: n ? "_blank" : "_self",
@@ -6461,17 +6472,17 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6461
6472
  ]
6462
6473
  })]
6463
6474
  }) });
6464
- }, Ka = ({ column: e, openLinksInNewTab: t }) => /* @__PURE__ */ v("section", { children: [
6475
+ }, qa = ({ column: e, openLinksInNewTab: t }) => /* @__PURE__ */ v("section", { children: [
6465
6476
  /* @__PURE__ */ _("h2", { children: e.title }),
6466
6477
  e.text && /* @__PURE__ */ _("p", { children: e.text }),
6467
6478
  !!e.links?.length && /* @__PURE__ */ _("ul", {
6468
6479
  className: "pkt-footer__link-list",
6469
- children: e.links.map((e) => /* @__PURE__ */ _(Ga, {
6480
+ children: e.links.map((e) => /* @__PURE__ */ _(Ka, {
6470
6481
  link: e,
6471
6482
  openLinksInNewTab: t
6472
6483
  }, `${e.href}|${e.text}`))
6473
6484
  })
6474
- ] }), qa = ({ columns: e, columnOne: t, columnTwo: n, personvernOgInfoLink: r, tilgjengelighetLink: i, socialLinks: a, skipGlobal: o = !1, data: s, dataUrl: l, locale: u = "nb-NO", openLinksInNewTab: d = !1, includeConsent: p = !1, hotjarId: m = null, googleAnalyticsId: h = null, devMode: g = !1, cookieDomain: y = null, cookieSecure: b = null, cookieExpiryDays: x = null, onToggleConsent: S, onDataError: C, className: w, ...T }) => {
6485
+ ] }), Ja = ({ columns: e, columnOne: t, columnTwo: n, personvernOgInfoLink: r, tilgjengelighetLink: i, socialLinks: a, skipGlobal: o = !1, data: s, dataUrl: l, locale: u = "nb-NO", openLinksInNewTab: d = !1, includeConsent: p = !1, hotjarId: m = null, googleAnalyticsId: h = null, devMode: g = !1, cookieDomain: y = null, cookieSecure: b = null, cookieExpiryDays: x = null, onToggleConsent: S, onDataError: C, className: w, ...T }) => {
6475
6486
  c(() => {
6476
6487
  (t || n) && console.warn("PktFooter: The \"columnOne\"/\"columnTwo\" props are deprecated and will be removed in a future version. Please use \"columns\" instead.");
6477
6488
  }, [t, n]), c(() => {
@@ -6479,7 +6490,7 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6479
6490
  }, [r, i]), c(() => {
6480
6491
  a && console.warn("PktFooter: The \"socialLinks\" prop is deprecated and will be removed in a future version — the social media links now come from the global footer.");
6481
6492
  }, [a]);
6482
- let E = Ba({
6493
+ let E = Va({
6483
6494
  data: s,
6484
6495
  dataUrl: l,
6485
6496
  locale: u,
@@ -6522,14 +6533,14 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6522
6533
  children: [
6523
6534
  D.length > 0 && /* @__PURE__ */ _("div", {
6524
6535
  className: "pkt-footer__sections",
6525
- children: D.map((e) => /* @__PURE__ */ _(Ka, {
6536
+ children: D.map((e) => /* @__PURE__ */ _(qa, {
6526
6537
  column: e,
6527
6538
  openLinksInNewTab: d
6528
6539
  }, e.title))
6529
6540
  }),
6530
6541
  k && /* @__PURE__ */ _("div", {
6531
6542
  className: "pkt-footer__consent",
6532
- children: /* @__PURE__ */ _(kr, {
6543
+ children: /* @__PURE__ */ _(Mr, {
6533
6544
  triggerType: "footerlink",
6534
6545
  ...O
6535
6546
  })
@@ -6562,14 +6573,14 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6562
6573
  })
6563
6574
  ]
6564
6575
  })
6565
- }), E && /* @__PURE__ */ _(Wa, {
6576
+ }), E && /* @__PURE__ */ _(Ga, {
6566
6577
  footer: E,
6567
6578
  includeConsent: p,
6568
6579
  consent: O
6569
6580
  })]
6570
6581
  });
6571
- }, Ja = ({ link: e, openLinksInNewTab: t }) => {
6572
- let n = e.openInNewTab || t, r = e.external ? Ma(e.href) : void 0;
6582
+ }, Ya = ({ link: e, openLinksInNewTab: t }) => {
6583
+ let n = e.openInNewTab || t, r = e.external ? Na(e.href) : void 0;
6573
6584
  return /* @__PURE__ */ v("a", {
6574
6585
  className: "pkt-footer-simple__link",
6575
6586
  href: e.href,
@@ -6587,11 +6598,11 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6587
6598
  ]
6588
6599
  })] })]
6589
6600
  });
6590
- }, Ya = ({ links: e, personvernOgInfoLink: t, tilgjengelighetLink: n, skipGlobal: r = !1, data: i, dataUrl: a, locale: o = "nb-NO", openLinksInNewTab: s = !1, includeConsent: l = !1, hotjarId: u = null, googleAnalyticsId: d = null, devMode: p = !1, cookieDomain: m = null, cookieSecure: h = null, cookieExpiryDays: g = null, onToggleConsent: y, onDataError: b, className: x, ...S }) => {
6601
+ }, Xa = ({ links: e, personvernOgInfoLink: t, tilgjengelighetLink: n, skipGlobal: r = !1, data: i, dataUrl: a, locale: o = "nb-NO", openLinksInNewTab: s = !1, includeConsent: l = !1, hotjarId: u = null, googleAnalyticsId: d = null, devMode: p = !1, cookieDomain: m = null, cookieSecure: h = null, cookieExpiryDays: g = null, onToggleConsent: y, onDataError: b, className: x, ...S }) => {
6591
6602
  c(() => {
6592
6603
  (t || n) && console.warn("PktFooterSimple: The \"personvernOgInfoLink\"/\"tilgjengelighetLink\" props are deprecated — the links now come from the global footer. Overridden values are rendered in the secondary footer.");
6593
6604
  }, [t, n]);
6594
- let C = Ba({
6605
+ let C = Va({
6595
6606
  data: i,
6596
6607
  dataUrl: a,
6597
6608
  locale: o,
@@ -6628,22 +6639,22 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6628
6639
  className: "pkt-footer__inner pkt-footer__inner--compact",
6629
6640
  children: /* @__PURE__ */ v("ul", {
6630
6641
  className: "pkt-footer-simple__list",
6631
- children: [w.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(Ja, {
6642
+ children: [w.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(Ya, {
6632
6643
  link: e,
6633
6644
  openLinksInNewTab: s
6634
- }) }, `${e.href}|${e.text}`)), E && /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(kr, {
6645
+ }) }, `${e.href}|${e.text}`)), E && /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(Mr, {
6635
6646
  triggerType: "footerlink",
6636
6647
  ...T
6637
6648
  }) })]
6638
6649
  })
6639
6650
  })
6640
- }), C && /* @__PURE__ */ _(Wa, {
6651
+ }), C && /* @__PURE__ */ _(Ga, {
6641
6652
  footer: C,
6642
6653
  includeConsent: l,
6643
6654
  consent: T
6644
6655
  })]
6645
6656
  });
6646
- }, Xa = (e, t) => {
6657
+ }, Za = (e, t) => {
6647
6658
  let [n, r] = m(() => typeof window > "u" ? t ?? 0 : t ?? window.innerWidth);
6648
6659
  return c(() => {
6649
6660
  let t = e.current;
@@ -6664,10 +6675,10 @@ var Va = ({ link: e, includeConsent: t, consent: n }) => {
6664
6675
  };
6665
6676
  //#endregion
6666
6677
  //#region src/hooks/useHeaderChrome.ts
6667
- function Za({ forwardedRef: e, mobileBreakpoint: t, tabletBreakpoint: n, position: r, scrollBehavior: i, pauseScrollHide: a = !1 }) {
6678
+ function Qa({ forwardedRef: e, mobileBreakpoint: t, tabletBreakpoint: n, position: r, scrollBehavior: i, pauseScrollHide: a = !1 }) {
6668
6679
  let s = p(null), l = o((t) => {
6669
6680
  s.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
6670
- }, [e]), u = Xa(s), d = u < t, f = u < n, h = r === "fixed", g = r === "sticky", [_, v] = m(!1), y = p(0), b = i === "hide";
6681
+ }, [e]), u = Za(s), d = u < t, f = u < n, h = r === "fixed", g = r === "sticky", [_, v] = m(!1), y = p(0), b = i === "hide";
6671
6682
  c(() => {
6672
6683
  let e = () => {
6673
6684
  if (!b || a) return;
@@ -6697,16 +6708,16 @@ function Za({ forwardedRef: e, mobileBreakpoint: t, tabletBreakpoint: n, positio
6697
6708
  }
6698
6709
  //#endregion
6699
6710
  //#region src/hooks/useScrollLock.ts
6700
- function Qa(e) {
6701
- let t = p(qi());
6711
+ function $a(e) {
6712
+ let t = p(Xi());
6702
6713
  c(() => {
6703
6714
  let n = t.current;
6704
- return Ji(n, e), () => Ji(n, !1);
6715
+ return Zi(n, e), () => Zi(n, !1);
6705
6716
  }, [e]);
6706
6717
  }
6707
6718
  //#endregion
6708
6719
  //#region src/components/header-menu/HeaderMenu.tsx
6709
- var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileBreakpoint: i = 768, className: a, onDataLoaded: s, onDataError: l, ref: u, ...d }) => {
6720
+ var eo = ({ dataUrl: e = Rn, data: t, locale: n = "nb-NO", open: r = !1, mobileBreakpoint: i = 768, className: a, onDataLoaded: s, onDataError: l, ref: u, ...d }) => {
6710
6721
  let [h, y] = m("loading"), [b, x] = m(void 0), S = t ? "ready" : h, C = p(s), w = p(l);
6711
6722
  c(() => {
6712
6723
  C.current = s;
@@ -6715,19 +6726,19 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6715
6726
  }, [l]);
6716
6727
  let T = p(null), E = o((e) => {
6717
6728
  T.current = e, typeof u == "function" ? u(e) : u && (u.current = e);
6718
- }, [u]), D = Xa(T) < i;
6729
+ }, [u]), D = Za(T) < i;
6719
6730
  c(() => {
6720
6731
  t && C.current?.(t);
6721
6732
  }, [t]), c(() => {
6722
6733
  if (t) return;
6723
6734
  let n = new AbortController();
6724
- return Ra(e, n.signal).then((e) => {
6735
+ return za(e, n.signal).then((e) => {
6725
6736
  n.signal.aborted || (x(e), y("ready"), C.current?.(e));
6726
6737
  }).catch((e) => {
6727
6738
  e.name !== "AbortError" && (y("error"), w.current?.(e));
6728
6739
  }), () => n.abort();
6729
6740
  }, [t, e]);
6730
- let O = t ?? b, k = f(() => Oa(O, n), [O, n]), A = [
6741
+ let O = t ?? b, k = f(() => ka(O, n), [O, n]), A = [
6731
6742
  "pkt-header-menu",
6732
6743
  r && "pkt-header-menu--open",
6733
6744
  a
@@ -6759,28 +6770,28 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6759
6770
  className: A,
6760
6771
  "aria-label": N,
6761
6772
  children: [
6762
- D ? /* @__PURE__ */ _(to, {
6773
+ D ? /* @__PURE__ */ _(no, {
6763
6774
  services: j.services,
6764
6775
  sections: j.sections
6765
6776
  }) : /* @__PURE__ */ v(g, { children: [
6766
- /* @__PURE__ */ _(no, { services: j.services }),
6767
- /* @__PURE__ */ _(ro, {
6777
+ /* @__PURE__ */ _(ro, { services: j.services }),
6778
+ /* @__PURE__ */ _(io, {
6768
6779
  buttons: j.buttons,
6769
6780
  mobile: !1
6770
6781
  }),
6771
- /* @__PURE__ */ _(io, { sections: j.sections })
6782
+ /* @__PURE__ */ _(ao, { sections: j.sections })
6772
6783
  ] }),
6773
- /* @__PURE__ */ _(ro, {
6784
+ /* @__PURE__ */ _(io, {
6774
6785
  buttons: j.buttons,
6775
6786
  mobile: !0
6776
6787
  }),
6777
- /* @__PURE__ */ _(oo, {
6788
+ /* @__PURE__ */ _(so, {
6778
6789
  links: j.links,
6779
6790
  some: j.some
6780
6791
  })
6781
6792
  ]
6782
6793
  });
6783
- }, eo = ({ services: e }) => /* @__PURE__ */ _("ul", {
6794
+ }, to = ({ services: e }) => /* @__PURE__ */ _("ul", {
6784
6795
  className: "pkt-header-menu__services-list",
6785
6796
  children: e.links.map((e) => /* @__PURE__ */ _("li", {
6786
6797
  className: "pkt-header-menu__service",
@@ -6789,7 +6800,7 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6789
6800
  href: e.url,
6790
6801
  children: [/* @__PURE__ */ _(L, {
6791
6802
  className: "pkt-header-menu__service-icon",
6792
- name: Ca(e.icon),
6803
+ name: wa(e.icon),
6793
6804
  "aria-hidden": "true"
6794
6805
  }), /* @__PURE__ */ _("span", {
6795
6806
  className: "pkt-header-menu__service-text",
@@ -6797,7 +6808,7 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6797
6808
  })]
6798
6809
  })
6799
6810
  }, e.url))
6800
- }), to = ({ services: e, sections: t }) => /* @__PURE__ */ _("div", {
6811
+ }), no = ({ services: e, sections: t }) => /* @__PURE__ */ _("div", {
6801
6812
  className: "pkt-header-menu__sections",
6802
6813
  children: /* @__PURE__ */ v(j, {
6803
6814
  className: "pkt-header-menu__sections-inner",
@@ -6808,22 +6819,22 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6808
6819
  skin: "plus-minus",
6809
6820
  id: "pkt-header-menu-services",
6810
6821
  title: e.title,
6811
- children: /* @__PURE__ */ _(eo, { services: e })
6822
+ children: /* @__PURE__ */ _(to, { services: e })
6812
6823
  }), t.map((e, t) => /* @__PURE__ */ _(R, {
6813
6824
  className: "pkt-header-menu__section",
6814
6825
  skin: "plus-minus",
6815
6826
  id: `pkt-header-menu-section-${t}`,
6816
6827
  title: e.title,
6817
- children: /* @__PURE__ */ _(ao, { links: e.links })
6828
+ children: /* @__PURE__ */ _(oo, { links: e.links })
6818
6829
  }, e.title))]
6819
6830
  })
6820
- }), no = ({ services: e }) => /* @__PURE__ */ v("div", {
6831
+ }), ro = ({ services: e }) => /* @__PURE__ */ v("div", {
6821
6832
  className: "pkt-header-menu__services",
6822
6833
  children: [/* @__PURE__ */ _("h2", {
6823
6834
  className: "pkt-header-menu__services-title",
6824
6835
  children: e.title
6825
- }), /* @__PURE__ */ _(eo, { services: e })]
6826
- }), ro = ({ buttons: e, mobile: t }) => {
6836
+ }), /* @__PURE__ */ _(to, { services: e })]
6837
+ }), io = ({ buttons: e, mobile: t }) => {
6827
6838
  if (!e || e.length === 0) return null;
6828
6839
  let n = ["pkt-header-menu__buttons", t && "pkt-header-menu__buttons--mobile"].filter(Boolean).join(" ");
6829
6840
  return /* @__PURE__ */ _("div", {
@@ -6833,7 +6844,7 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6833
6844
  href: e.url,
6834
6845
  children: [/* @__PURE__ */ _(L, {
6835
6846
  className: "pkt-btn__icon",
6836
- name: e.iconName ? Ca(e.iconName) : "user",
6847
+ name: e.iconName ? wa(e.iconName) : "user",
6837
6848
  "aria-hidden": "true"
6838
6849
  }), /* @__PURE__ */ _("span", {
6839
6850
  className: "pkt-btn__text",
@@ -6841,7 +6852,7 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6841
6852
  })]
6842
6853
  }, e.url))
6843
6854
  });
6844
- }, io = ({ sections: e }) => !e || e.length === 0 ? null : /* @__PURE__ */ _("div", {
6855
+ }, ao = ({ sections: e }) => !e || e.length === 0 ? null : /* @__PURE__ */ _("div", {
6845
6856
  className: "pkt-header-menu__sections",
6846
6857
  children: /* @__PURE__ */ _("div", {
6847
6858
  className: "pkt-header-menu__sections-inner",
@@ -6850,17 +6861,17 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6850
6861
  children: [/* @__PURE__ */ _("h2", {
6851
6862
  className: "pkt-header-menu__section-title",
6852
6863
  children: e.title
6853
- }), /* @__PURE__ */ _(ao, { links: e.links })]
6864
+ }), /* @__PURE__ */ _(oo, { links: e.links })]
6854
6865
  }, e.title))
6855
6866
  })
6856
- }), ao = ({ links: e }) => /* @__PURE__ */ _("ul", {
6867
+ }), oo = ({ links: e }) => /* @__PURE__ */ _("ul", {
6857
6868
  className: "pkt-header-menu__section-list",
6858
6869
  children: e.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", {
6859
6870
  className: "pkt-header-menu__section-link",
6860
6871
  href: e.url,
6861
6872
  children: e.text
6862
6873
  }) }, e.url))
6863
- }), oo = ({ links: e, some: t }) => {
6874
+ }), so = ({ links: e, some: t }) => {
6864
6875
  let n = e && e.length > 0, r = t && t.length > 0;
6865
6876
  return !n && !r ? null : /* @__PURE__ */ v("div", {
6866
6877
  className: "pkt-header-menu__footer",
@@ -6873,11 +6884,11 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6873
6884
  }) }, e.url))
6874
6885
  }), r && /* @__PURE__ */ _("ul", {
6875
6886
  className: "pkt-header-menu__footer-list pkt-header-menu__footer-list--social",
6876
- children: t.map((e) => /* @__PURE__ */ _(so, { entry: e }, e.url))
6887
+ children: t.map((e) => /* @__PURE__ */ _(co, { entry: e }, e.url))
6877
6888
  })]
6878
6889
  });
6879
- }, so = ({ entry: e }) => {
6880
- let t = Ea(e.url, e.text);
6890
+ }, co = ({ entry: e }) => {
6891
+ let t = Da(e.url, e.text);
6881
6892
  return /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _("a", {
6882
6893
  className: "pkt-header-menu__social-link",
6883
6894
  href: e.url,
@@ -6887,7 +6898,7 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6887
6898
  "aria-hidden": "true"
6888
6899
  }) : /* @__PURE__ */ _("span", { children: e.text })
6889
6900
  }) });
6890
- }, co = ({ href: e, iconName: t, className: n, iconPosition: r, external: i, target: a, renderLink: o, children: s, ...c }) => {
6901
+ }, lo = ({ href: e, iconName: t, className: n, iconPosition: r, external: i, target: a, renderLink: o, children: s, ...c }) => {
6891
6902
  let l = {
6892
6903
  "pkt-link": !0,
6893
6904
  "pkt-link--icon-left": !!t && r === "left" || !!(t && !r),
@@ -6913,10 +6924,10 @@ var $a = ({ dataUrl: e = ba, data: t, locale: n = "nb-NO", open: r = !1, mobileB
6913
6924
  }
6914
6925
  });
6915
6926
  };
6916
- co.displayName = "PktLink";
6927
+ lo.displayName = "PktLink";
6917
6928
  //#endregion
6918
6929
  //#region src/components/headerUserMenu/UserMenu.tsx
6919
- var lo = (e) => typeof e.target == "string" ? {
6930
+ var uo = (e) => typeof e.target == "string" ? {
6920
6931
  title: e.title,
6921
6932
  iconName: e.iconName,
6922
6933
  href: e.target
@@ -6924,7 +6935,7 @@ var lo = (e) => typeof e.target == "string" ? {
6924
6935
  title: e.title,
6925
6936
  iconName: e.iconName,
6926
6937
  onClick: e.target
6927
- }, uo = ({ item: e, className: t }) => "href" in e ? /* @__PURE__ */ _(co, {
6938
+ }, fo = ({ item: e, className: t }) => "href" in e ? /* @__PURE__ */ _(lo, {
6928
6939
  iconName: e.iconName,
6929
6940
  href: e.href,
6930
6941
  className: (0, M.default)("pkt-user-menu__link", t),
@@ -6940,14 +6951,14 @@ var lo = (e) => typeof e.target == "string" ? {
6940
6951
  className: "pkt-link__icon",
6941
6952
  "aria-hidden": "true"
6942
6953
  }), e.title]
6943
- }), fo = ({ links: e }) => /* @__PURE__ */ _("ul", {
6954
+ }), po = ({ links: e }) => /* @__PURE__ */ _("ul", {
6944
6955
  className: "pkt-user-menu__sublist",
6945
6956
  children: e.map((e, t) => /* @__PURE__ */ _("li", {
6946
6957
  className: "pkt-user-menu__subitem",
6947
- children: /* @__PURE__ */ _(uo, { item: e })
6958
+ children: /* @__PURE__ */ _(fo, { item: e })
6948
6959
  }, t))
6949
- }), po = i(({ user: e, formattedLastLoggedIn: t, representing: n, userMenu: r, canChangeRepresentation: i, changeRepresentation: a, logoutOnClick: o }, s) => {
6950
- let c = r?.map(lo);
6960
+ }), mo = i(({ user: e, formattedLastLoggedIn: t, representing: n, userMenu: r, canChangeRepresentation: i, changeRepresentation: a, logoutOnClick: o }, s) => {
6961
+ let c = r?.map(uo);
6951
6962
  return /* @__PURE__ */ _("nav", {
6952
6963
  className: "pkt-user-menu",
6953
6964
  ref: s,
@@ -6975,7 +6986,7 @@ var lo = (e) => typeof e.target == "string" ? {
6975
6986
  }),
6976
6987
  c && c.length > 0 && /* @__PURE__ */ _("li", {
6977
6988
  className: "pkt-user-menu__item",
6978
- children: /* @__PURE__ */ _(fo, { links: c })
6989
+ children: /* @__PURE__ */ _(po, { links: c })
6979
6990
  }),
6980
6991
  n && /* @__PURE__ */ v("li", {
6981
6992
  className: "pkt-user-menu__item",
@@ -6997,7 +7008,7 @@ var lo = (e) => typeof e.target == "string" ? {
6997
7008
  className: "pkt-user-menu__sublist mt-size-16",
6998
7009
  children: /* @__PURE__ */ _("li", {
6999
7010
  className: "pkt-user-menu__subitem",
7000
- children: /* @__PURE__ */ _(uo, { item: {
7011
+ children: /* @__PURE__ */ _(fo, { item: {
7001
7012
  title: "Endre organisasjon",
7002
7013
  iconName: "cogwheel",
7003
7014
  onClick: a
@@ -7012,7 +7023,7 @@ var lo = (e) => typeof e.target == "string" ? {
7012
7023
  className: "pkt-user-menu__sublist",
7013
7024
  children: /* @__PURE__ */ _("li", {
7014
7025
  className: "pkt-user-menu__subitem",
7015
- children: /* @__PURE__ */ _(uo, { item: {
7026
+ children: /* @__PURE__ */ _(fo, { item: {
7016
7027
  title: "Endre organisasjon",
7017
7028
  iconName: "cogwheel",
7018
7029
  onClick: a
@@ -7022,7 +7033,7 @@ var lo = (e) => typeof e.target == "string" ? {
7022
7033
  }),
7023
7034
  o && /* @__PURE__ */ _("li", {
7024
7035
  className: "pkt-user-menu__item",
7025
- children: /* @__PURE__ */ _(uo, { item: {
7036
+ children: /* @__PURE__ */ _(fo, { item: {
7026
7037
  title: "Logg ut",
7027
7038
  iconName: "exit",
7028
7039
  onClick: o
@@ -7032,10 +7043,10 @@ var lo = (e) => typeof e.target == "string" ? {
7032
7043
  })
7033
7044
  });
7034
7045
  });
7035
- po.displayName = "PktHeaderUserMenu";
7046
+ mo.displayName = "PktHeaderUserMenu";
7036
7047
  //#endregion
7037
7048
  //#region src/components/searchinput/SearchInput.tsx
7038
- var mo = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1, fullwidth: r = !1, id: i, label: a, name: o, placeholder: s, suggestions: c, value: l = "", action: u, method: d, onChange: p, onSearch: m, onSuggestionClick: h, strings: y, ...b }, x) => {
7049
+ var ho = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1, fullwidth: r = !1, id: i, label: a, name: o, placeholder: s, suggestions: c, value: l = "", action: u, method: d, onChange: p, onSearch: m, onSuggestionClick: h, strings: y, ...b }, x) => {
7039
7050
  let S = ge(["searchinput"], y), C = s ?? S.searchinput.placeholder, w = (e, t) => {
7040
7051
  e ? e() : h && h(t);
7041
7052
  }, T = (e) => {
@@ -7045,10 +7056,10 @@ var mo = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
7045
7056
  `pkt-searchinput--${e}`,
7046
7057
  `pkt-searchinput--${t}`,
7047
7058
  r && "pkt-searchinput--fullwidth"
7048
- ].filter(Boolean).join(" "), D = f(() => Yn(), []), O = i || D, k = {
7059
+ ].filter(Boolean).join(" "), D = f(() => Qn(), []), O = i || D, k = {
7049
7060
  role: "search",
7050
7061
  className: E,
7051
- ...Wn()
7062
+ ...qn()
7052
7063
  }, A = (e) => u ? /* @__PURE__ */ _("form", {
7053
7064
  ...k,
7054
7065
  action: u,
@@ -7125,19 +7136,19 @@ var mo = i(({ appearance: e = "local", inputSize: t = "medium", disabled: n = !1
7125
7136
  })
7126
7137
  ] }));
7127
7138
  });
7128
- mo.displayName = "PktSearchInput";
7139
+ ho.displayName = "PktSearchInput";
7129
7140
  //#endregion
7130
7141
  //#region src/components/header/HeaderGlobal.tsx
7131
- var ho = "https://punkt-cdn.oslo.kommune.no/18.6/logos/";
7132
- typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || ho);
7133
- var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "pkt-header-global-search-panel", yo = "pkt-header-global-search-toggle", bo = i(({ className: e, "data-mode": t, dataUrl: n, data: r, locale: i = "nb-NO", logoLink: a = xa, logoClick: s, logoPath: l = typeof window < "u" ? window.pktLogoPath : ho, showSearch: u = !0, searchPlaceholder: h, onSearch: y, showContact: b = !0, user: x, userMenu: S, representing: C, canChangeRepresentation: w = !1, changeRepresentation: T, logOutButtonPlacement: E = "none", logOut: D, position: O = "fixed", scrollBehavior: k = "hide", mobileBreakpoint: A = 768, tabletBreakpoint: j = 1024, onDataLoaded: N, onDataError: P, strings: ee }, te) => {
7142
+ var go = "https://punkt-cdn.oslo.kommune.no/18.7/logos/";
7143
+ typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || go);
7144
+ var _o = "pkt-header-global-menu", vo = "pkt-header-global-menu-toggle", yo = "pkt-header-global-search-panel", bo = "pkt-header-global-search-toggle", xo = i(({ className: e, "data-mode": t, dataUrl: n, data: r, locale: i = "nb-NO", logoLink: a = zn, logoClick: s, logoPath: l = typeof window < "u" ? window.pktLogoPath : go, showSearch: u = !0, searchPlaceholder: h, onSearch: y, showContact: b = !0, user: x, userMenu: S, representing: C, canChangeRepresentation: w = !1, changeRepresentation: T, logOutButtonPlacement: E = "none", logOut: D, position: O = "fixed", scrollBehavior: k = "hide", mobileBreakpoint: A = 768, tabletBreakpoint: j = 1024, onDataLoaded: N, onDataError: P, strings: ee }, te) => {
7134
7145
  let ne = k === "hide", [F, re] = m("none"), [ie, ae] = m(void 0), [oe, se] = m(!1), I = p(N), R = p(P);
7135
7146
  c(() => {
7136
7147
  I.current = N;
7137
7148
  }, [N]), c(() => {
7138
7149
  R.current = P;
7139
7150
  }, [P]);
7140
- let { setRef: ce, isMobile: z, isTablet: B, isFixed: V, isSticky: H, hidden: le, captureFocus: ue, flagRestoreFocus: U, restoreFocus: de } = Za({
7151
+ let { setRef: ce, isMobile: z, isTablet: B, isFixed: V, isSticky: H, hidden: le, captureFocus: ue, flagRestoreFocus: U, restoreFocus: de } = Qa({
7141
7152
  forwardedRef: te,
7142
7153
  mobileBreakpoint: A,
7143
7154
  tabletBreakpoint: j,
@@ -7145,13 +7156,13 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7145
7156
  scrollBehavior: k,
7146
7157
  pauseScrollHide: F !== "none"
7147
7158
  });
7148
- Qa(F === "menu" || F === "search");
7159
+ $a(F === "menu" || F === "search");
7149
7160
  let W = p(null), G = o((e) => {
7150
7161
  W.current = e, ce(e);
7151
7162
  }, [ce]);
7152
7163
  d(() => {
7153
7164
  if (F !== "menu" && F !== "search") return;
7154
- let e = document.getElementById(F === "menu" ? go : vo), t = W.current?.getBoundingClientRect();
7165
+ let e = document.getElementById(F === "menu" ? _o : yo), t = W.current?.getBoundingClientRect();
7155
7166
  !e || !t || (e.style.setProperty("--pkt-header-global-top", `${t.top}px`), e.style.setProperty("--pkt-header-global-left", `${t.left}px`), e.style.setProperty("--pkt-header-global-width", `${t.width}px`));
7156
7167
  }, [
7157
7168
  F,
@@ -7162,17 +7173,17 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7162
7173
  }, [r]), c(() => {
7163
7174
  if (r) return;
7164
7175
  let e = new AbortController();
7165
- return Ra(n, e.signal).then((t) => {
7176
+ return za(n, e.signal).then((t) => {
7166
7177
  e.signal.aborted || (ae(t), se(!1), I.current?.(t));
7167
7178
  }).catch((e) => {
7168
7179
  e.name !== "AbortError" && (se(!0), R.current?.(e));
7169
7180
  }), () => e.abort();
7170
7181
  }, [r, n]);
7171
- let K = r ?? ie, fe = f(() => Oa(K, i), [K, i]);
7182
+ let K = r ?? ie, fe = f(() => ka(K, i), [K, i]);
7172
7183
  c(() => {
7173
7184
  let e = (e) => {
7174
7185
  let t = e.target;
7175
- F === "user" && !t.closest(".pkt-header-global__user-container") && !t.closest(".pkt-header-global__user-menu") && re("none"), F === "menu" && !t.closest(".pkt-header-menu") && !t.closest(`#${_o}`) && re("none"), F === "search" && !t.closest(".pkt-header-global__search-panel-inner") && !t.closest(`#${yo}`) && re("none");
7186
+ F === "user" && !t.closest(".pkt-header-global__user-container") && !t.closest(".pkt-header-global__user-menu") && re("none"), F === "menu" && !t.closest(".pkt-header-menu") && !t.closest(`#${vo}`) && re("none"), F === "search" && !t.closest(".pkt-header-global__search-panel-inner") && !t.closest(`#${bo}`) && re("none");
7176
7187
  }, t = (e) => {
7177
7188
  e.key === "Escape" && F !== "none" && (e.preventDefault(), U(), re("none"));
7178
7189
  };
@@ -7186,13 +7197,13 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7186
7197
  U
7187
7198
  ]), c(() => {
7188
7199
  if (F !== "menu" && F !== "search") return;
7189
- let e = F === "menu" ? go : vo, t = F === "menu" ? _o : yo, n = () => document.getElementById(e), r = () => document.getElementById(t), i = (e) => {
7200
+ let e = F === "menu" ? _o : yo, t = F === "menu" ? vo : bo, n = () => document.getElementById(e), r = () => document.getElementById(t), i = (e) => {
7190
7201
  re("none"), (e.querySelector("button") ?? e).focus();
7191
7202
  }, a = (e) => {
7192
7203
  if (e.key !== "Tab") return;
7193
7204
  let t = n(), a = r();
7194
7205
  if (!t || !a) return;
7195
- let o = oi(t), s = si();
7206
+ let o = li(t), s = ui();
7196
7207
  if (s && a.contains(s)) {
7197
7208
  !e.shiftKey && o.length > 0 && (e.preventDefault(), o[0].focus());
7198
7209
  return;
@@ -7246,7 +7257,7 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7246
7257
  children: [
7247
7258
  !be && xe && Y && /* @__PURE__ */ _("div", {
7248
7259
  className: "pkt-header-global__search",
7249
- children: /* @__PURE__ */ _(mo, {
7260
+ children: /* @__PURE__ */ _(ho, {
7250
7261
  appearance: "global",
7251
7262
  inputSize: B ? "small" : "medium",
7252
7263
  fullwidth: !0,
@@ -7261,7 +7272,7 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7261
7272
  })
7262
7273
  }),
7263
7274
  be && xe && /* @__PURE__ */ _(X, {
7264
- id: yo,
7275
+ id: bo,
7265
7276
  className: "pkt-header-global__search-toggle",
7266
7277
  skin: "primary",
7267
7278
  color: ye ? void 0 : "yellow",
@@ -7270,12 +7281,12 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7270
7281
  size: z ? "small" : "medium",
7271
7282
  state: ye ? "active" : "normal",
7272
7283
  "aria-expanded": ye,
7273
- "aria-controls": vo,
7284
+ "aria-controls": yo,
7274
7285
  onClick: () => pe("search"),
7275
7286
  children: Q
7276
7287
  }),
7277
7288
  /* @__PURE__ */ _(X, {
7278
- id: _o,
7289
+ id: vo,
7279
7290
  className: "pkt-header-global__menu-toggle",
7280
7291
  skin: be ? "tertiary" : "secondary",
7281
7292
  variant: be ? "icon-only" : "icon-right",
@@ -7283,7 +7294,7 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7283
7294
  size: B ? "small" : "medium",
7284
7295
  state: _e ? "active" : "normal",
7285
7296
  "aria-expanded": _e,
7286
- "aria-controls": go,
7297
+ "aria-controls": _o,
7287
7298
  disabled: Ce,
7288
7299
  onClick: () => pe("menu"),
7289
7300
  children: Z
@@ -7320,7 +7331,7 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7320
7331
  })]
7321
7332
  }), ve && /* @__PURE__ */ _("div", {
7322
7333
  className: "pkt-header-global__user-menu is-open",
7323
- children: /* @__PURE__ */ _(po, {
7334
+ children: /* @__PURE__ */ _(mo, {
7324
7335
  user: x,
7325
7336
  formattedLastLoggedIn: q,
7326
7337
  representing: C,
@@ -7335,8 +7346,8 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7335
7346
  ]
7336
7347
  }), Te = _e && /* @__PURE__ */ _("div", {
7337
7348
  className: (0, M.default)("pkt-header-global__menu", z && "pkt-header-global__menu--mobile", B && !z && "pkt-header-global__menu--tablet"),
7338
- id: go,
7339
- children: fe ? /* @__PURE__ */ _($a, {
7349
+ id: _o,
7350
+ children: fe ? /* @__PURE__ */ _(eo, {
7340
7351
  data: K,
7341
7352
  locale: i,
7342
7353
  open: !0,
@@ -7350,10 +7361,10 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7350
7361
  })
7351
7362
  }), Ee = ye && xe && Y && /* @__PURE__ */ _("div", {
7352
7363
  className: (0, M.default)("pkt-header-global__search-panel", z && "pkt-header-global__search-panel--mobile", B && !z && "pkt-header-global__search-panel--tablet"),
7353
- id: vo,
7364
+ id: yo,
7354
7365
  children: /* @__PURE__ */ _("div", {
7355
7366
  className: "pkt-header-global__search-panel-inner",
7356
- children: /* @__PURE__ */ _(mo, {
7367
+ children: /* @__PURE__ */ _(ho, {
7357
7368
  appearance: "global",
7358
7369
  fullwidth: !0,
7359
7370
  id: Se,
@@ -7382,18 +7393,18 @@ var go = "pkt-header-global-menu", _o = "pkt-header-global-menu-toggle", vo = "p
7382
7393
  Te
7383
7394
  ] });
7384
7395
  });
7385
- bo.displayName = "PktHeaderGlobal";
7396
+ xo.displayName = "PktHeaderGlobal";
7386
7397
  //#endregion
7387
7398
  //#region src/components/textinput/Textinput.tsx
7388
- var xo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: l = !1, errorMessage: u, hasError: d = !1, helptext: f, helptextDropdown: p, helptextDropdownButton: h, iconNameRight: g, inline: y = !1, fullwidth: b = !1, label: x, name: S, optionalTag: C = !1, optionalText: w, requiredTag: T = !1, requiredText: E, tagText: D = null, placeholder: O, prefix: k, suffix: A, type: j = "text", useWrapper: M = !0, omitSearchIcon: N = !1, value: P, minLength: ee, maxLength: te, min: ne, max: F, step: re, size: ie, readonly: ae, required: oe, dataTestid: se, onChange: I, skipForwardTestid: R = !1, inputSize: ce = "medium", strings: z, ...B }, V) => {
7389
- let H = i ?? (o ?? 0) > 0, le = [s, "pkt-textinput"].filter(Boolean).join(" "), ue = j === "search" && !g && !N, U = j === "date" && P ? P.slice(0, 10) : P, [de, W] = m(P?.length || 0), G = bi(e), K = `${G}`, fe = `${K}-label`, q = n || fe, pe = (e) => {
7399
+ var So = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "off", counter: i, hasFieldset: a, counterMaxLength: o, className: s, disabled: l = !1, errorMessage: u, hasError: d = !1, helptext: f, helptextDropdown: p, helptextDropdownButton: h, iconNameRight: g, inline: y = !1, fullwidth: b = !1, label: x, name: S, optionalTag: C = !1, optionalText: w, requiredTag: T = !1, requiredText: E, tagText: D = null, placeholder: O, prefix: k, suffix: A, type: j = "text", useWrapper: M = !0, omitSearchIcon: N = !1, value: P, minLength: ee, maxLength: te, min: ne, max: F, step: re, size: ie, readonly: ae, required: oe, dataTestid: se, onChange: I, skipForwardTestid: R = !1, inputSize: ce = "medium", strings: z, ...B }, V) => {
7400
+ let H = i ?? (o ?? 0) > 0, le = [s, "pkt-textinput"].filter(Boolean).join(" "), ue = j === "search" && !g && !N, U = j === "date" && P ? P.slice(0, 10) : P, [de, W] = m(P?.length || 0), G = Ci(e), K = `${G}`, fe = `${K}-label`, q = n || fe, pe = (e) => {
7390
7401
  H && W(e.currentTarget?.value?.length || 0), I && I(e);
7391
7402
  };
7392
7403
  return c(() => {
7393
7404
  P !== void 0 && W(P?.length || 0);
7394
7405
  }, [P]), /* @__PURE__ */ _("div", {
7395
7406
  className: le,
7396
- children: /* @__PURE__ */ _($n, {
7407
+ children: /* @__PURE__ */ _(nr, {
7397
7408
  strings: z,
7398
7409
  ariaDescribedby: t,
7399
7410
  disabled: l,
@@ -7438,7 +7449,7 @@ var xo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
7438
7449
  disabled: l,
7439
7450
  "aria-invalid": d,
7440
7451
  "aria-errormessage": d ? `${G}-error` : void 0,
7441
- "aria-describedby": Gn({
7452
+ "aria-describedby": Jn({
7442
7453
  id: K,
7443
7454
  hasHelptext: !!f,
7444
7455
  hasCounter: H,
@@ -7482,12 +7493,12 @@ var xo = i(({ id: e, ariaDescribedby: t, ariaLabelledby: n, autocomplete: r = "o
7482
7493
  })
7483
7494
  });
7484
7495
  });
7485
- xo.displayName = "PktTextinput";
7496
+ So.displayName = "PktTextinput";
7486
7497
  //#endregion
7487
7498
  //#region src/components/header/HeaderService.tsx
7488
- var So = "https://punkt-cdn.oslo.kommune.no/18.6/logos/";
7489
- typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || So);
7490
- var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n, className: r, compact: i = !1, "data-mode": a, logOutButtonPlacement: s = "none", logOut: l, openedMenu: u, showSearch: d = !1, onSearch: h, onSearchChange: y, searchValue: b, searchPlaceholder: x, representing: S, serviceLink: C, serviceClick: w, serviceName: T, user: E, userMenu: D, userMenuFooter: O, userOptions: k, canChangeRepresentation: A = !1, changeRepresentation: j, hideLogo: N = !1, logoLink: P = xa, logoClick: ee, logoPath: te = typeof window < "u" ? window.pktLogoPath : So, position: ne = "fixed", scrollBehavior: F = "hide", slotMenuVariant: re = "icon-only", slotMenuText: ie = "Meny", strings: ae }, oe) => {
7499
+ var Co = "https://punkt-cdn.oslo.kommune.no/18.7/logos/";
7500
+ typeof window < "u" && (window.pktLogoPath = window.pktLogoPath || Co);
7501
+ var wo = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n, className: r, compact: i = !1, "data-mode": a, logOutButtonPlacement: s = "none", logOut: l, openedMenu: u, showSearch: d = !1, onSearch: h, onSearchChange: y, searchValue: b, searchPlaceholder: x, representing: S, serviceLink: C, serviceClick: w, serviceName: T, user: E, userMenu: D, userMenuFooter: O, userOptions: k, canChangeRepresentation: A = !1, changeRepresentation: j, hideLogo: N = !1, logoLink: P = zn, logoClick: ee, logoPath: te = typeof window < "u" ? window.pktLogoPath : Co, position: ne = "fixed", scrollBehavior: F = "hide", slotMenuVariant: re = "icon-only", slotMenuText: ie = "Meny", strings: ae }, oe) => {
7491
7502
  let se = F === "hide";
7492
7503
  c(() => {
7493
7504
  O && console.warn("PktHeaderService: The \"userMenuFooter\" prop is deprecated and will be removed in a future version. Please use \"userMenu\" instead.");
@@ -7508,14 +7519,14 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7508
7519
  c(() => {
7509
7520
  u !== void 0 && B(u);
7510
7521
  }, [u]);
7511
- let [V, H] = m(!1), [le, ue] = m(!1), U = p(null), de = p(null), W = p(null), G = p(null), K = p(null), { setRef: fe, isMobile: q, isTablet: pe, isFixed: me, isSticky: J, hidden: Y, captureFocus: he, flagRestoreFocus: Z, restoreFocus: Q } = Za({
7522
+ let [V, H] = m(!1), [le, ue] = m(!1), U = p(null), de = p(null), W = p(null), G = p(null), K = p(null), { setRef: fe, isMobile: q, isTablet: pe, isFixed: me, isSticky: J, hidden: Y, captureFocus: he, flagRestoreFocus: Z, restoreFocus: Q } = Qa({
7512
7523
  forwardedRef: oe,
7513
7524
  mobileBreakpoint: e,
7514
7525
  tabletBreakpoint: t,
7515
7526
  position: ne,
7516
7527
  scrollBehavior: F
7517
7528
  });
7518
- Qa((me || J) && q && z !== "none");
7529
+ $a((me || J) && q && z !== "none");
7519
7530
  let _e = o((e, t) => {
7520
7531
  let n = e.relatedTarget, r;
7521
7532
  switch (t) {
@@ -7588,7 +7599,7 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7588
7599
  }), T && /* @__PURE__ */ _("span", {
7589
7600
  className: "pkt-header-service__service-name",
7590
7601
  translate: "no",
7591
- children: C ? /* @__PURE__ */ _(co, {
7602
+ children: C ? /* @__PURE__ */ _(lo, {
7592
7603
  href: C,
7593
7604
  className: "pkt-header-service__service-link ",
7594
7605
  children: T
@@ -7651,7 +7662,7 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7651
7662
  }), /* @__PURE__ */ _("div", {
7652
7663
  className: (0, M.default)("pkt-header-service__mobile-menu", z === "search" && "is-open", le && "align-right"),
7653
7664
  ref: K,
7654
- children: z === "search" && /* @__PURE__ */ _(xo, {
7665
+ children: z === "search" && /* @__PURE__ */ _(So, {
7655
7666
  id: "mobile-search-menu",
7656
7667
  className: "pkt-header-service__search-input",
7657
7668
  type: "search",
@@ -7667,7 +7678,7 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7667
7678
  }
7668
7679
  })
7669
7680
  })]
7670
- }) : /* @__PURE__ */ _(xo, {
7681
+ }) : /* @__PURE__ */ _(So, {
7671
7682
  id: "header-service-search",
7672
7683
  className: "pkt-header-service__search-input",
7673
7684
  type: "search",
@@ -7714,7 +7725,7 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7714
7725
  })]
7715
7726
  }), z === "user" && E && /* @__PURE__ */ _("div", {
7716
7727
  className: (0, M.default)(q ? "pkt-header-service__mobile-menu" : "pkt-header-service__user-menu", "is-open"),
7717
- children: /* @__PURE__ */ _(po, {
7728
+ children: /* @__PURE__ */ _(mo, {
7718
7729
  user: E,
7719
7730
  formattedLastLoggedIn: ce,
7720
7731
  representing: S,
@@ -7740,20 +7751,20 @@ var Co = i(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
7740
7751
  children: [xe, /* @__PURE__ */ _("div", { className: (0, M.default)("pkt-header-service-spacer", i && "pkt-header-service-spacer--compact", E && "pkt-header-service-spacer--has-user", q && "pkt-header-service-spacer--mobile", pe && "pkt-header-service-spacer--tablet") })]
7741
7752
  }) : xe;
7742
7753
  });
7743
- Co.displayName = "PktHeaderService";
7754
+ wo.displayName = "PktHeaderService";
7744
7755
  //#endregion
7745
7756
  //#region src/components/header/Header.tsx
7746
- var wo = i((e, t) => e.type === "global" ? /* @__PURE__ */ _(bo, {
7757
+ var To = i((e, t) => e.type === "global" ? /* @__PURE__ */ _(xo, {
7747
7758
  ...e,
7748
7759
  ref: t
7749
- }) : /* @__PURE__ */ _(Co, {
7760
+ }) : /* @__PURE__ */ _(wo, {
7750
7761
  ...e,
7751
7762
  ref: t
7752
7763
  }));
7753
- wo.displayName = "PktHeader";
7764
+ To.displayName = "PktHeader";
7754
7765
  //#endregion
7755
7766
  //#region src/components/input/Input.tsx
7756
- var To = i(({ label: e, id: t, children: n, ...r }, i) => /* @__PURE__ */ v("div", {
7767
+ var Eo = i(({ label: e, id: t, children: n, ...r }, i) => /* @__PURE__ */ v("div", {
7757
7768
  className: "pkt-form-group",
7758
7769
  children: [
7759
7770
  /* @__PURE__ */ _("label", {
@@ -7770,10 +7781,10 @@ var To = i(({ label: e, id: t, children: n, ...r }, i) => /* @__PURE__ */ v("div
7770
7781
  n
7771
7782
  ]
7772
7783
  }));
7773
- To.displayName = "PktInput";
7784
+ Eo.displayName = "PktInput";
7774
7785
  //#endregion
7775
7786
  //#region src/components/linkcard/LinkCard.tsx
7776
- var Eo = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab: a, external: o, className: s, strings: c, ...l }) => {
7787
+ var Do = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab: a, external: o, className: s, strings: c, ...l }) => {
7777
7788
  let u = ge(["linkcard"], c), d = ["pkt-linkcard", t && `pkt-linkcard--${t}`].filter(Boolean).join(" "), f = ["pkt-linkcard__title", o && "pkt-link pkt-link--external"].filter(Boolean).join(" ");
7778
7789
  return /* @__PURE__ */ v("a", {
7779
7790
  ...l,
@@ -7803,14 +7814,14 @@ var Eo = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab:
7803
7814
  };
7804
7815
  //#endregion
7805
7816
  //#region src/components/loader/Loader.tsx
7806
- Eo.displayName = "PktLinkCard", typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/18.6/animations/");
7807
- var Do = (e) => {
7817
+ Do.displayName = "PktLinkCard", typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/18.7/animations/");
7818
+ var Oo = (e) => {
7808
7819
  switch (e) {
7809
7820
  case "blue": return "spinner-blue";
7810
7821
  case "rainbow": return "spinner";
7811
7822
  default: return "loader";
7812
7823
  }
7813
- }, Oo = i(function({ delay: e = 0, inline: t = !1, isLoading: n = !0, message: r = null, size: i = "medium", variant: a = "rainbow", loadingAnimationPath: o = typeof window < "u" ? window.pktAnimationPath : void 0, className: s, children: l, ...u }, d) {
7824
+ }, ko = i(function({ delay: e = 0, inline: t = !1, isLoading: n = !0, message: r = null, size: i = "medium", variant: a = "rainbow", loadingAnimationPath: o = typeof window < "u" ? window.pktAnimationPath : void 0, className: s, children: l, ...u }, d) {
7814
7825
  let [f, p] = m(e === 0);
7815
7826
  c(() => {
7816
7827
  if (e > 0) {
@@ -7831,7 +7842,7 @@ var Do = (e) => {
7831
7842
  children: [n && f && /* @__PURE__ */ v("div", {
7832
7843
  className: "pkt-loader__spinner",
7833
7844
  children: [/* @__PURE__ */ _(L, {
7834
- name: Do(a),
7845
+ name: Oo(a),
7835
7846
  path: o,
7836
7847
  className: `pkt-loader__svg pkt-loader__${a}`
7837
7848
  }), r && /* @__PURE__ */ _("p", { children: r })]
@@ -7841,10 +7852,10 @@ var Do = (e) => {
7841
7852
  })]
7842
7853
  });
7843
7854
  });
7844
- Oo.displayName = "PktLoader";
7855
+ ko.displayName = "PktLoader";
7845
7856
  //#endregion
7846
7857
  //#region src/components/messagebox/Messagebox.tsx
7847
- var ko = ({ children: e, className: t, skin: n, title: i, compact: a, closable: s, onClose: c, ...l }) => {
7858
+ var Ao = ({ children: e, className: t, skin: n, title: i, compact: a, closable: s, onClose: c, ...l }) => {
7848
7859
  let [u, d] = m(!1), f = {
7849
7860
  "pkt-messagebox": !0,
7850
7861
  "pkt-messagebox--compact": a,
@@ -7882,10 +7893,10 @@ var ko = ({ children: e, className: t, skin: n, title: i, compact: a, closable:
7882
7893
  ]
7883
7894
  });
7884
7895
  };
7885
- ko.displayName = "PktMessagebox";
7896
+ Ao.displayName = "PktMessagebox";
7886
7897
  //#endregion
7887
7898
  //#region src/components/radio/RadioButton.tsx
7888
- var Ao = i(({ id: e, name: t, label: n, className: r, hasTile: i = !1, disabled: a = !1, checkHelptext: o, hasError: s = !1, defaultChecked: c, checked: l, optionalTag: u, optionalText: d, requiredTag: f, requiredText: p, strings: m, tagText: h, ...y }, b) => {
7899
+ var jo = i(({ id: e, name: t, label: n, className: r, hasTile: i = !1, disabled: a = !1, checkHelptext: o, hasError: s = !1, defaultChecked: c, checked: l, optionalTag: u, optionalText: d, requiredTag: f, requiredText: p, strings: m, tagText: h, ...y }, b) => {
7889
7900
  let x = ge(["forms"], m), S = [r, "pkt-input-check"].filter(Boolean).join(" "), C = [
7890
7901
  "pkt-input-check__input",
7891
7902
  i ? "pkt-input-check__input--tile" : "",
@@ -7937,14 +7948,14 @@ var Ao = i(({ id: e, name: t, label: n, className: r, hasTile: i = !1, disabled:
7937
7948
  })
7938
7949
  });
7939
7950
  });
7940
- Ao.displayName = "PktRadioButton";
7951
+ jo.displayName = "PktRadioButton";
7941
7952
  //#endregion
7942
7953
  //#region src/components/select/Select.tsx
7943
- var jo = i(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r, disabled: i = !1, errorMessage: a, hasError: o = !1, helptext: s, helptextDropdown: c, helptextDropdownButton: l, id: u, inline: d = !1, fullwidth: f = !1, label: p, name: m, optionalTag: h = !1, optionalText: g, requiredTag: v = !1, requiredText: y, tagText: b, useWrapper: x = !0, hasFieldset: S, inputSize: C = "medium", strings: w, ...T }, E) => {
7944
- let D = bi(u), O = [r, "pkt-select"].filter(Boolean).join(" ");
7954
+ var Mo = i(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r, disabled: i = !1, errorMessage: a, hasError: o = !1, helptext: s, helptextDropdown: c, helptextDropdownButton: l, id: u, inline: d = !1, fullwidth: f = !1, label: p, name: m, optionalTag: h = !1, optionalText: g, requiredTag: v = !1, requiredText: y, tagText: b, useWrapper: x = !0, hasFieldset: S, inputSize: C = "medium", strings: w, ...T }, E) => {
7955
+ let D = Ci(u), O = [r, "pkt-select"].filter(Boolean).join(" ");
7945
7956
  return /* @__PURE__ */ _("div", {
7946
7957
  className: O,
7947
- children: /* @__PURE__ */ _($n, {
7958
+ children: /* @__PURE__ */ _(nr, {
7948
7959
  strings: w,
7949
7960
  forId: `${D}-input`,
7950
7961
  label: p,
@@ -7969,7 +7980,7 @@ var jo = i(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r,
7969
7980
  className: `pkt-input pkt-input--${C} ${f ? "pkt-input--fullwidth" : ""}`,
7970
7981
  "aria-invalid": o,
7971
7982
  "aria-errormessage": o ? `${D}-error` : void 0,
7972
- "aria-describedby": Gn({
7983
+ "aria-describedby": Jn({
7973
7984
  id: `${D}-input`,
7974
7985
  hasHelptext: !!s,
7975
7986
  hasCounter: !1,
@@ -7985,10 +7996,10 @@ var jo = i(({ ariaDescribedby: e, ariaLabelledby: t, children: n, className: r,
7985
7996
  })
7986
7997
  });
7987
7998
  });
7988
- jo.displayName = "PktSelect";
7999
+ Mo.displayName = "PktSelect";
7989
8000
  //#endregion
7990
8001
  //#region src/components/stepper/Step.tsx
7991
- var Mo = /* @__PURE__ */ _("svg", {
8002
+ var No = /* @__PURE__ */ _("svg", {
7992
8003
  xmlns: "http://www.w3.org/2000/svg",
7993
8004
  width: "24",
7994
8005
  height: "24",
@@ -7999,7 +8010,7 @@ var Mo = /* @__PURE__ */ _("svg", {
7999
8010
  r: "7",
8000
8011
  style: { fill: "var(--pkt-color-brand-neutrals-300, #CCC)" }
8001
8012
  })
8002
- }), No = /* @__PURE__ */ v("svg", {
8013
+ }), Po = /* @__PURE__ */ v("svg", {
8003
8014
  xmlns: "http://www.w3.org/2000/svg",
8004
8015
  width: "24",
8005
8016
  height: "24",
@@ -8016,7 +8027,7 @@ var Mo = /* @__PURE__ */ _("svg", {
8016
8027
  r: "6",
8017
8028
  fill: "#2A2859"
8018
8029
  })]
8019
- }), Po = /* @__PURE__ */ v("svg", {
8030
+ }), Fo = /* @__PURE__ */ v("svg", {
8020
8031
  xmlns: "http://www.w3.org/2000/svg",
8021
8032
  width: "24",
8022
8033
  height: "24",
@@ -8028,7 +8039,7 @@ var Mo = /* @__PURE__ */ _("svg", {
8028
8039
  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",
8029
8040
  fill: "#F1FDFF"
8030
8041
  })]
8031
- }), Fo = ({ children: e, className: t, status: n = "incomplete", title: r }) => /* @__PURE__ */ v("li", {
8042
+ }), Io = ({ children: e, className: t, status: n = "incomplete", title: r }) => /* @__PURE__ */ v("li", {
8032
8043
  className: (0, M.default)("pkt-step", t, `pkt-step--${n}`),
8033
8044
  "data-testid": "pkt-step",
8034
8045
  children: [
@@ -8042,7 +8053,7 @@ var Mo = /* @__PURE__ */ _("svg", {
8042
8053
  }),
8043
8054
  /* @__PURE__ */ _("span", {
8044
8055
  className: (0, M.default)("pkt-step__indicator"),
8045
- children: n === "current" ? No : n === "completed" ? Po : Mo
8056
+ children: n === "current" ? Po : n === "completed" ? Fo : No
8046
8057
  }),
8047
8058
  /* @__PURE__ */ _("span", {
8048
8059
  className: "pkt-step__line pkt-step__line--3",
@@ -8059,7 +8070,7 @@ var Mo = /* @__PURE__ */ _("svg", {
8059
8070
  })]
8060
8071
  })
8061
8072
  ]
8062
- }), Io = i(({ activeStep: n, className: r, children: i, hideNonActiveSteps: o = !1, hideNonActiveStepsContent: s = !0, orientation: c = "vertical", ...l }, u) => {
8073
+ }), Lo = i(({ activeStep: n, className: r, children: i, hideNonActiveSteps: o = !1, hideNonActiveStepsContent: s = !0, orientation: c = "vertical", ...l }, u) => {
8063
8074
  let d = (0, M.default)(r, "pkt-stepper", c === "horizontal" ? "pkt-stepper--horizontal" : "pkt-stepper--vertical"), f = e.map(i, (e, r) => a(e) ? t(e, { className: (0, M.default)(e.props.className, {
8064
8075
  "pkt-step--hideStep": o && r !== n,
8065
8076
  "pkt-step--hideContent": s && r !== n
@@ -8072,10 +8083,10 @@ var Mo = /* @__PURE__ */ _("svg", {
8072
8083
  children: f
8073
8084
  });
8074
8085
  });
8075
- Io.displayName = "PktStepper";
8086
+ Lo.displayName = "PktStepper";
8076
8087
  //#endregion
8077
8088
  //#region src/components/table/Table.tsx
8078
- var Lo = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r = !0, children: i, ...a }) => /* @__PURE__ */ _("table", {
8089
+ var Ro = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r = !0, children: i, ...a }) => /* @__PURE__ */ _("table", {
8079
8090
  "data-testid": "pkt-table",
8080
8091
  className: (0, M.default)(e, "pkt-table", {
8081
8092
  "pkt-table--responsive": r,
@@ -8086,36 +8097,36 @@ var Lo = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r
8086
8097
  role: "table",
8087
8098
  ...a,
8088
8099
  children: i
8089
- }), Ro = ({ id: e, children: t, className: n, ...r }) => /* @__PURE__ */ _("tbody", {
8100
+ }), zo = ({ id: e, children: t, className: n, ...r }) => /* @__PURE__ */ _("tbody", {
8090
8101
  id: e,
8091
8102
  className: (0, M.default)(n, "pkt-table__body", {}),
8092
8103
  ...r,
8093
8104
  role: "rowgroup",
8094
8105
  children: t
8095
- }), zo = ({ children: e, className: t, dataLabel: n, ...r }) => /* @__PURE__ */ _("td", {
8106
+ }), Bo = ({ children: e, className: t, dataLabel: n, ...r }) => /* @__PURE__ */ _("td", {
8096
8107
  className: (0, M.default)(t, "pkt-table__data-cell", {}),
8097
8108
  "data-label": n,
8098
8109
  role: "cell",
8099
8110
  "data-testid": "pkt-table__data-cell",
8100
8111
  ...r,
8101
8112
  children: e
8102
- }), Bo = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("thead", {
8113
+ }), Vo = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("thead", {
8103
8114
  className: (0, M.default)(e, "pkt-table__header", {}),
8104
8115
  role: "rowgroup",
8105
8116
  ...n,
8106
8117
  children: t
8107
- }), Vo = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("th", {
8118
+ }), Ho = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("th", {
8108
8119
  className: (0, M.default)(e, "pkt-table__header-cell", {}),
8109
8120
  role: "columnheader",
8110
8121
  ...n,
8111
8122
  children: t
8112
- }), Ho = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("tr", {
8123
+ }), Uo = ({ className: e, children: t, ...n }) => /* @__PURE__ */ _("tr", {
8113
8124
  className: (0, M.default)(e, "pkt-table__row", {}),
8114
8125
  role: "row",
8115
8126
  ...n,
8116
8127
  children: t
8117
- }), Uo = i(({ children: e, active: t, disabled: n = !1, href: r, onClick: i, icon: a, controls: o, tag: s, tagSkin: c, index: l = 0 }, u) => {
8118
- let { arrowNav: d, registerTabRef: f, handleKeyPress: p, selectTab: m } = Go(), h = !!t && !n, y = {
8128
+ }), Wo = i(({ children: e, active: t, disabled: n = !1, href: r, onClick: i, icon: a, controls: o, tag: s, tagSkin: c, index: l = 0 }, u) => {
8129
+ let { arrowNav: d, registerTabRef: f, handleKeyPress: p, selectTab: m } = Ko(), h = !!t && !n, y = {
8119
8130
  "aria-selected": d ? h : void 0,
8120
8131
  "aria-controls": o,
8121
8132
  role: d ? "tab" : void 0,
@@ -8143,7 +8154,7 @@ var Lo = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r
8143
8154
  className: `pkt-icon--small ${a === "check" ? "pkt-tabs__status-icon" : ""}`
8144
8155
  }),
8145
8156
  e,
8146
- s && /* @__PURE__ */ _(Vn, {
8157
+ s && /* @__PURE__ */ _(Wn, {
8147
8158
  skin: c,
8148
8159
  size: "small",
8149
8160
  children: s
@@ -8164,14 +8175,14 @@ var Lo = ({ className: e, compact: t = !1, skin: n = "basic", responsiveView: r
8164
8175
  children: b
8165
8176
  });
8166
8177
  });
8167
- Uo.displayName = "PktTabItem";
8178
+ Wo.displayName = "PktTabItem";
8168
8179
  //#endregion
8169
8180
  //#region src/components/tabs/Tabs.tsx
8170
- var Wo = n(null), Go = () => {
8171
- let e = s(Wo);
8181
+ var Go = n(null), Ko = () => {
8182
+ let e = s(Go);
8172
8183
  if (!e) throw Error("TabItem must be used within a Tabs component");
8173
8184
  return e;
8174
- }, Ko = i(({ arrowNav: t = !0, disableArrowNav: n = !1, separatorIconName: r, separatorIconPath: i, tabs: a, onTabSelected: o, children: s }, l) => {
8185
+ }, qo = i(({ arrowNav: t = !0, disableArrowNav: n = !1, separatorIconName: r, separatorIconPath: i, tabs: a, onTabSelected: o, children: s }, l) => {
8175
8186
  let u = p([]), d = p({}), f = t && !n, m = e.toArray(s), h = m.length > 0, g = h ? m.length : a?.length || 0, v = !!(r || i);
8176
8187
  c(() => {
8177
8188
  u.current = u.current.slice(0, g), Object.keys(d.current).forEach((e) => {
@@ -8218,7 +8229,7 @@ var Wo = n(null), Go = () => {
8218
8229
  name: r,
8219
8230
  className: "pkt-tabs__separator-icon"
8220
8231
  }) : null
8221
- }, e), T = (e) => !v || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, w(`separator-${n}`)] : [t]), E = a?.map((e, t) => /* @__PURE__ */ _(Uo, {
8232
+ }, e), T = (e) => !v || e.length <= 1 ? e : e.flatMap((t, n) => n < e.length - 1 ? [t, w(`separator-${n}`)] : [t]), E = a?.map((e, t) => /* @__PURE__ */ _(Wo, {
8222
8233
  active: !e.disabled && e.active,
8223
8234
  disabled: e.disabled,
8224
8235
  href: e.href,
@@ -8229,7 +8240,7 @@ var Wo = n(null), Go = () => {
8229
8240
  index: t,
8230
8241
  children: e.text
8231
8242
  }, t)), D = ["pkt-tabs", v && "pkt-tabs--with-separator"].filter(Boolean).join(" "), O = T(h ? m : E || []);
8232
- return /* @__PURE__ */ _(Wo.Provider, {
8243
+ return /* @__PURE__ */ _(Go.Provider, {
8233
8244
  value: {
8234
8245
  arrowNav: f,
8235
8246
  registerTabRef: C,
@@ -8247,53 +8258,53 @@ var Wo = n(null), Go = () => {
8247
8258
  })
8248
8259
  });
8249
8260
  });
8250
- Ko.displayName = "PktTabs";
8261
+ qo.displayName = "PktTabs";
8251
8262
  //#endregion
8252
8263
  //#region ../../shared-utils/timepicker/options.ts
8253
- var qo = (e) => e ? Math.max(1, Math.round(e / 60)) : 1, Jo = (e, t) => {
8264
+ var Jo = (e) => e ? Math.max(1, Math.round(e / 60)) : 1, Yo = (e, t) => {
8254
8265
  let n = e ? parseInt(String(e).split(":")[0], 10) : 0, r = t ? parseInt(String(t).split(":")[0], 10) : 23;
8255
8266
  return Array.from({ length: r - n + 1 }, (e, t) => t + n);
8256
- }, Yo = (e) => {
8257
- let t = qo(e);
8267
+ }, Xo = (e) => {
8268
+ let t = Jo(e);
8258
8269
  return Array.from({ length: Math.floor(60 / t) }, (e, n) => n * t);
8259
- }, Xo = (e, t, n, r) => {
8270
+ }, Zo = (e, t, n, r) => {
8260
8271
  let i = e === "" ? n === 1 ? 0 : 23 : parseInt(e, 10), a = t === "" ? n === 1 ? 0 : Math.floor(59 / r) * r : parseInt(t, 10);
8261
8272
  return a += n * r, a > 59 ? (a = 0, i = (i + 1) % 24) : a < 0 && (a = Math.floor(59 / r) * r, i = (i - 1 + 24) % 24), {
8262
8273
  hours: String(i).padStart(2, "0"),
8263
8274
  minutes: String(a).padStart(2, "0")
8264
8275
  };
8265
- }, Zo = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 && parseInt(e.slice(3), 10) <= 59, Qo = (e) => {
8276
+ }, Qo = (e) => /^\d{2}:\d{2}$/.test(e) && parseInt(e.slice(0, 2), 10) <= 23 && parseInt(e.slice(3), 10) <= 59, $o = (e) => {
8266
8277
  let [t, n] = e.split(":").map(Number);
8267
8278
  return t * 60 + n;
8268
8279
  };
8269
8280
  //#endregion
8270
8281
  //#region src/components/timepicker/useTimepickerState.ts
8271
- function $o(e) {
8272
- if (e && Zo(e)) {
8282
+ function es(e) {
8283
+ if (e && Qo(e)) {
8273
8284
  let [t, n] = e.split(":");
8274
8285
  return [t, n];
8275
8286
  }
8276
8287
  return ["", ""];
8277
8288
  }
8278
- function es(e, t) {
8289
+ function ts(e, t) {
8279
8290
  return `${String(parseInt(e, 10)).padStart(2, "0")}:${String(parseInt(t, 10)).padStart(2, "0")}`;
8280
8291
  }
8281
- function ts(e, t, n) {
8292
+ function ns(e, t, n) {
8282
8293
  let { required: r, min: i, max: a, step: o } = t;
8283
8294
  if (r && !e) return {
8284
8295
  valid: !1,
8285
8296
  message: n.valueMissing
8286
8297
  };
8287
8298
  if (!e) return { valid: !0 };
8288
- if (!Zo(e)) return {
8299
+ if (!Qo(e)) return {
8289
8300
  valid: !1,
8290
8301
  message: n.typeMismatch
8291
8302
  };
8292
- let s = Qo(e), c = qo(o);
8293
- return i && s < Qo(String(i)) ? {
8303
+ let s = $o(e), c = Jo(o);
8304
+ return i && s < $o(String(i)) ? {
8294
8305
  valid: !1,
8295
8306
  message: B(n.rangeUnderflowMin, { min: String(i) })
8296
- } : a && s > Qo(String(a)) ? {
8307
+ } : a && s > $o(String(a)) ? {
8297
8308
  valid: !1,
8298
8309
  message: B(n.rangeOverflowMax, { max: String(a) })
8299
8310
  } : o && s % c !== 0 ? {
@@ -8301,11 +8312,11 @@ function ts(e, t, n) {
8301
8312
  message: c === 60 ? n.timeStepMismatchHour : c === 30 ? n.timeStepMismatchHalfHour : B(n.timeStepMismatch, { step: `${c}, ${c * 2}, ${c * 3}` })
8302
8313
  } : { valid: !0 };
8303
8314
  }
8304
- function ns(e) {
8315
+ function rs(e) {
8305
8316
  return e === 3600 || e < 3600 && 3600 % e == 0 && e % 60 == 0;
8306
8317
  }
8307
- function rs(e, t) {
8308
- let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: A, tagText: j, inline: M = !1, useWrapper: N = !0, ariaDescribedby: P, strings: ee, className: te, inputSize: ne = "medium", onValueChange: F, onFocus: re, onBlur: ie } = e, ae = ge(["timepicker", "validation"], ee), oe = ae.timepicker, se = ee, I = i !== void 0, L = i === void 0 ? a ?? "" : i ?? "", R = p(L), [ce, z] = m(() => L), B = I ? i ?? "" : ce, [V, H] = m(() => $o(i === void 0 ? a : i)[0]), [le, ue] = m(() => $o(i === void 0 ? a : i)[1]), U = p(V), de = p(le), W = o((e) => {
8318
+ function is(e, t) {
8319
+ let { id: n, label: r, value: i, defaultValue: a, min: s, max: l, step: h = 60, hidePicker: g = !1, stepArrows: _ = !1, fullwidth: v = !1, name: y, disabled: b = !1, required: x = !1, helptext: S, helptextDropdown: C, helptextDropdownButton: w, hasError: T = !1, errorMessage: E, optionalTag: D = !1, optionalText: O, requiredTag: k = !1, requiredText: A, tagText: j, inline: M = !1, useWrapper: N = !0, ariaDescribedby: P, strings: ee, className: te, inputSize: ne = "medium", onValueChange: F, onFocus: re, onBlur: ie } = e, ae = ge(["timepicker", "validation"], ee), oe = ae.timepicker, se = ee, I = i !== void 0, L = i === void 0 ? a ?? "" : i ?? "", R = p(L), [ce, z] = m(() => L), B = I ? i ?? "" : ce, [V, H] = m(() => es(i === void 0 ? a : i)[0]), [le, ue] = m(() => es(i === void 0 ? a : i)[1]), U = p(V), de = p(le), W = o((e) => {
8309
8320
  U.current = e, H(e);
8310
8321
  }, []), G = o((e) => {
8311
8322
  de.current = e, ue(e);
@@ -8313,7 +8324,7 @@ function rs(e, t) {
8313
8324
  c(() => {
8314
8325
  if (!I || i === me.current) return;
8315
8326
  me.current = i;
8316
- let [e, t] = $o(i);
8327
+ let [e, t] = es(i);
8317
8328
  W(e), G(t);
8318
8329
  }, [
8319
8330
  i,
@@ -8321,13 +8332,13 @@ function rs(e, t) {
8321
8332
  W,
8322
8333
  G
8323
8334
  ]), c(() => {
8324
- h != null && !ns(h) && console.warn(`PktTimepicker: step="${h}" er ikke en gyldig verdi. Step må være et multiplum av 60 (hele minutter) eller nøyaktig 3600 (hel time).`);
8335
+ h != null && !rs(h) && console.warn(`PktTimepicker: step="${h}" er ikke en gyldig verdi. Step må være et multiplum av 60 (hele minutter) eller nøyaktig 3600 (hel time).`);
8325
8336
  }, [h]);
8326
- let J = p(null), Y = p(null), he = p(null), X = p(null), Z = p(null), Q = p(null), _e = p(0), ve = p(-1), ye = p(0), be = p(-1), [xe, Se] = m(!1), Ce = f(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), we = f(() => qo(h), [h]), Te = f(() => Jo(s, l), [s, l]), Ee = f(() => Yo(h), [h]), De = `${n}-hours`, Oe = `${n}-minutes`, ke = `${n}-popup`, $ = `${n}-input`;
8337
+ let J = p(null), Y = p(null), he = p(null), X = p(null), Z = p(null), Q = p(null), _e = p(0), ve = p(-1), ye = p(0), be = p(-1), [xe, Se] = m(!1), Ce = f(() => Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set, []), we = f(() => Jo(h), [h]), Te = f(() => Yo(s, l), [s, l]), Ee = f(() => Xo(h), [h]), De = `${n}-hours`, Oe = `${n}-minutes`, ke = `${n}-popup`, $ = `${n}-input`;
8327
8338
  c(() => {
8328
8339
  let e = J.current;
8329
8340
  if (!e) return;
8330
- let t = ts(B, {
8341
+ let t = ns(B, {
8331
8342
  required: x,
8332
8343
  min: s,
8333
8344
  max: l,
@@ -8354,20 +8365,20 @@ function rs(e, t) {
8354
8365
  ]), je = o(() => {
8355
8366
  let e = U.current, t = de.current;
8356
8367
  if (e !== "" && t !== "") {
8357
- let n = es(e, t);
8368
+ let n = ts(e, t);
8358
8369
  n !== B && Ae(n);
8359
8370
  } else B !== "" && Ae("");
8360
8371
  }, [B, Ae]), Me = o(() => {
8361
8372
  let e = U.current, t = de.current;
8362
8373
  if (e !== "" && t !== "") {
8363
- let n = es(e, t);
8374
+ let n = ts(e, t);
8364
8375
  n === B ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae(n);
8365
8376
  } else B === "" ? Q.current?.dispatchEvent(new Event("input", { bubbles: !0 })) : Ae("");
8366
8377
  }, [B, Ae]), Ne = o(() => {
8367
8378
  Se(!0), je();
8368
8379
  let e = J.current, t = Q.current;
8369
8380
  if (!e) return;
8370
- let n = ts(t?.value ?? "", {
8381
+ let n = ns(t?.value ?? "", {
8371
8382
  required: x,
8372
8383
  min: s,
8373
8384
  max: l,
@@ -8441,7 +8452,7 @@ function rs(e, t) {
8441
8452
  W,
8442
8453
  G
8443
8454
  ]), Le = o((e) => {
8444
- let t = Xo(U.current, de.current, e, we);
8455
+ let t = Zo(U.current, de.current, e, we);
8445
8456
  W(t.hours), G(t.minutes), `${t.hours}:${t.minutes}` !== B && Ae(`${t.hours}:${t.minutes}`);
8446
8457
  }, [
8447
8458
  we,
@@ -8659,7 +8670,7 @@ function rs(e, t) {
8659
8670
  set value(e) {
8660
8671
  let t = e ?? "";
8661
8672
  I || z(t);
8662
- let [n, r] = $o(t);
8673
+ let [n, r] = es(t);
8663
8674
  W(n), G(r), Q.current && (Q.current.value = t);
8664
8675
  },
8665
8676
  focus() {
@@ -8677,7 +8688,7 @@ function rs(e, t) {
8677
8688
  if (!e) return;
8678
8689
  let t = () => {
8679
8690
  window.setTimeout(() => {
8680
- let e = R.current, [t, n] = $o(e);
8691
+ let e = R.current, [t, n] = es(e);
8681
8692
  W(t), G(n), I || z(e), Q.current && (Q.current.value = e), fe(!1), Se(!1);
8682
8693
  }, 0);
8683
8694
  };
@@ -8753,8 +8764,8 @@ function rs(e, t) {
8753
8764
  }
8754
8765
  //#endregion
8755
8766
  //#region src/components/timepicker/Timepicker.tsx
8756
- var is = i((e, t) => {
8757
- let { onChange: n, inputSize: r = "medium" } = e, i = rs(e, t), a = i.strings.hours, o = i.strings.minutes, s = i.label ? `${a}, ${i.label}` : a, c = i.label ? `${o}, ${i.label}` : o, l = (e, t) => {
8767
+ var as = i((e, t) => {
8768
+ let { onChange: n, inputSize: r = "medium" } = e, i = is(e, t), a = i.strings.hours, o = i.strings.minutes, s = i.label ? `${a}, ${i.label}` : a, c = i.label ? `${o}, ${i.label}` : o, l = (e, t) => {
8758
8769
  let n = String(e).padStart(2, "0"), r = e === (t === "hour" ? i.hours === "" ? NaN : parseInt(i.hours, 10) : i.minutes === "" ? NaN : parseInt(i.minutes, 10));
8759
8770
  return /* @__PURE__ */ _("button", {
8760
8771
  type: "button",
@@ -8932,7 +8943,7 @@ var is = i((e, t) => {
8932
8943
  id: i.id || void 0,
8933
8944
  onFocus: i.handleFocusIn,
8934
8945
  onBlur: i.handleFocusOut,
8935
- children: /* @__PURE__ */ _($n, {
8946
+ children: /* @__PURE__ */ _(nr, {
8936
8947
  strings: i.stringsOverride,
8937
8948
  forId: i.hoursId,
8938
8949
  label: i.label,
@@ -8959,6 +8970,6 @@ var is = i((e, t) => {
8959
8970
  })
8960
8971
  });
8961
8972
  });
8962
- is.displayName = "PktTimepicker";
8973
+ as.displayName = "PktTimepicker";
8963
8974
  //#endregion
8964
- export { gi as FileItem, va as ItemRenderers, j as PktAccordion, R as PktAccordionItem, _e as PktAlert, ve as PktBackLink, ye as PktBreadcrumbs, X as PktButton, Ln as PktCalendar, Hn as PktCard, Un as PktCheckbox, wr as PktCombobox, kr as PktConsent, Wr as PktDatepicker, ya as PktFileUpload, qa as PktFooter, Ya as PktFooterSimple, wo as PktHeader, bo as PktHeaderGlobal, $a as PktHeaderMenu, Co as PktHeaderService, Bn as PktHeading, Qn as PktHelptext, L as PktIcon, To as PktInput, $n as PktInputWrapper, co as PktLink, Eo as PktLinkCard, Oo as PktLoader, ko as PktMessagebox, Yi as PktModal, Ri as PktProgressbar, Ao as PktRadioButton, mo as PktSearchInput, jo as PktSelect, Fo as PktStep, Io as PktStepper, Q as PktStringsProvider, Uo as PktTabItem, Lo as PktTable, Ro as PktTableBody, zo as PktTableDataCell, Bo as PktTableHeader, Vo as PktTableHeaderCell, Ho as PktTableRow, Ko as PktTabs, Vn as PktTag, xi as PktTextarea, xo as PktTextinput, is as PktTimepicker, W as getPktStrings, ce as pktStringsNb, G as resetPktStrings, de as setPktStrings, K as subscribePktStrings };
8975
+ export { yi as FileItem, xa as ItemRenderers, j as PktAccordion, R as PktAccordionItem, _e as PktAlert, ve as PktBackLink, ye as PktBreadcrumbs, X as PktButton, Ln as PktCalendar, Gn as PktCard, Kn as PktCheckbox, Dr as PktCombobox, Mr as PktConsent, qr as PktDatepicker, Sa as PktFileUpload, Ja as PktFooter, Xa as PktFooterSimple, To as PktHeader, xo as PktHeaderGlobal, eo as PktHeaderMenu, wo as PktHeaderService, Un as PktHeading, tr as PktHelptext, L as PktIcon, Eo as PktInput, nr as PktInputWrapper, lo as PktLink, Do as PktLinkCard, ko as PktLoader, Ao as PktMessagebox, Qi as PktModal, Vi as PktProgressbar, jo as PktRadioButton, ho as PktSearchInput, Mo as PktSelect, Io as PktStep, Lo as PktStepper, Q as PktStringsProvider, Wo as PktTabItem, Ro as PktTable, zo as PktTableBody, Bo as PktTableDataCell, Vo as PktTableHeader, Ho as PktTableHeaderCell, Uo as PktTableRow, qo as PktTabs, Wn as PktTag, wi as PktTextarea, So as PktTextinput, as as PktTimepicker, W as getPktStrings, ce as pktStringsNb, G as resetPktStrings, de as setPktStrings, K as subscribePktStrings };