rk-designsystem 1.1.86 → 1.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/componentlibrary.es.js +267 -258
- package/dist/componentlibrary.umd.js +15 -6
- package/dist/rk-designsystem.css +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r, jsxs as _, Fragment as Vt } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Alert as Yt, Avatar as qt, BadgePosition as Zt, Badge as Xt, Breadcrumbs as Jt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as qe, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as Dt, Chip as an, Spinner as ln, Details as dn, Dialog as cn, Divider as un, Dropdown as pn, DropdownTrigger as mn, DropdownTriggerContext as gn, DropdownHeading as
|
|
2
|
+
import ze, { forwardRef as he, useState as oe, createContext as Kt, useContext as It, useEffect as Y, useMemo as Te, useCallback as se, useRef as Ye } from "react";
|
|
3
|
+
import { Alert as Yt, Avatar as qt, BadgePosition as Zt, Badge as Xt, Breadcrumbs as Jt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as qe, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as Dt, Chip as an, Spinner as ln, Details as dn, Dialog as cn, Divider as un, Dropdown as pn, DropdownTrigger as mn, DropdownTriggerContext as gn, DropdownHeading as hn, DropdownList as fn, DropdownItem as kn, DropdownButton as vn, ErrorSummary as yn, Field as bn, FieldDescription as xn, FieldCounter as Tn, Heading as Sn, Input as Cn, Label as wn, Link as In, List as Dn, Pagination as _n, PaginationList as An, PaginationItem as Mn, PaginationButton as Ln, usePagination as jn, Paragraph as En, Popover as Fn, Radio as Nn, useRadioGroup as Bn, Search as zn, SearchInput as Pn, SearchClear as $n, SearchButton as Rn, Select as Gn, Skeleton as Wn, SkipLink as Hn, EXPERIMENTAL_Suggestion as Un, Switch as On, Table as Vn, Tabs as Kn, Tag as Yn, Textarea as qn, Textfield as Zn, ToggleGroup as Xn, Tooltip as Jn, ValidationMessage as Qn } from "@digdir/designsystemet-react";
|
|
4
4
|
import { startOfMonth as be, isValid as Oe, isSameMonth as gt, startOfWeek as _t, format as we, addDays as At, subMonths as eo, addMonths as to, isSameDay as no, isToday as oo, eachDayOfInterval as ro } from "date-fns";
|
|
5
|
-
import { ChevronLeftIcon as so, ChevronRightIcon as io, ChevronDownIcon as
|
|
6
|
-
const co =
|
|
5
|
+
import { ChevronLeftIcon as so, ChevronRightIcon as io, ChevronDownIcon as ht, XMarkIcon as ft, MagnifyingGlassIcon as kt, MenuHamburgerIcon as ao, HeartIcon as lo } from "@navikt/aksel-icons";
|
|
6
|
+
const co = he((t, e) => /* @__PURE__ */ r(Yt, { ref: e, ...t }));
|
|
7
7
|
co.displayName = "Alert";
|
|
8
|
-
const Mt =
|
|
8
|
+
const Mt = he((t, e) => /* @__PURE__ */ r(qt, { ref: e, ...t }));
|
|
9
9
|
Mt.displayName = "Avatar";
|
|
10
|
-
const uo =
|
|
10
|
+
const uo = he((t, e) => /* @__PURE__ */ r(Xt, { ref: e, ...t }));
|
|
11
11
|
uo.displayName = "Badge";
|
|
12
12
|
const na = Zt, oa = Jt, ra = Qt, sa = en, ia = tn, Se = qe;
|
|
13
13
|
Se.displayName = "Button";
|
|
@@ -43,9 +43,9 @@ function De(t) {
|
|
|
43
43
|
const s = n.width, l = s && t.matchPatterns[s] || t.matchPatterns[t.defaultMatchWidth], i = e.match(l);
|
|
44
44
|
if (!i)
|
|
45
45
|
return null;
|
|
46
|
-
const o = i[0], c = s && t.parsePatterns[s] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ?
|
|
46
|
+
const o = i[0], c = s && t.parsePatterns[s] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? fo(c, (m) => m.test(o)) : (
|
|
47
47
|
// [TODO] -- I challenge you to fix the type
|
|
48
|
-
|
|
48
|
+
ho(c, (m) => m.test(o))
|
|
49
49
|
);
|
|
50
50
|
let u;
|
|
51
51
|
u = t.valueCallback ? t.valueCallback(d) : d, u = n.valueCallback ? (
|
|
@@ -56,12 +56,12 @@ function De(t) {
|
|
|
56
56
|
return { value: u, rest: v };
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ho(t, e) {
|
|
60
60
|
for (const n in t)
|
|
61
61
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
62
62
|
return n;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function fo(t, e) {
|
|
65
65
|
for (let n = 0; n < t.length; n++)
|
|
66
66
|
if (e(t[n]))
|
|
67
67
|
return n;
|
|
@@ -290,11 +290,11 @@ const vo = {
|
|
|
290
290
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
291
291
|
}, Bo = {
|
|
292
292
|
any: [/^f/i, /^e/i]
|
|
293
|
-
},
|
|
293
|
+
}, zo = {
|
|
294
294
|
narrow: /^[1234]/i,
|
|
295
295
|
abbreviated: /^q[1234]/i,
|
|
296
296
|
wide: /^[1234](\.)? kvartal/i
|
|
297
|
-
},
|
|
297
|
+
}, Po = {
|
|
298
298
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
299
299
|
}, $o = {
|
|
300
300
|
narrow: /^[jfmasond]/i,
|
|
@@ -363,9 +363,9 @@ const vo = {
|
|
|
363
363
|
defaultParseWidth: "any"
|
|
364
364
|
}),
|
|
365
365
|
quarter: De({
|
|
366
|
-
matchPatterns:
|
|
366
|
+
matchPatterns: zo,
|
|
367
367
|
defaultMatchWidth: "wide",
|
|
368
|
-
parsePatterns:
|
|
368
|
+
parsePatterns: Po,
|
|
369
369
|
defaultParseWidth: "any",
|
|
370
370
|
valueCallback: (t) => t + 1
|
|
371
371
|
}),
|
|
@@ -450,7 +450,7 @@ const jt = ({ title: t, ...e }) => /* @__PURE__ */ _(
|
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
jt.displayName = "ChevronRightIcon";
|
|
453
|
-
const Vo = "
|
|
453
|
+
const Vo = "_calendarContainer_htlea_1", Ko = "_calendarHeader_htlea_16", Yo = "_monthYear_htlea_23", qo = "_navigationButtons_htlea_34", Zo = "_grid_htlea_43", Xo = "_dayNameCell_htlea_51", Jo = "_dateCell_htlea_69", Qo = "_dateNumberContainer_htlea_95", er = "_otherMonth_htlea_108", tr = "_disabled_htlea_108", nr = "_selectedDate_htlea_134", ne = {
|
|
454
454
|
calendarContainer: Vo,
|
|
455
455
|
calendarHeader: Ko,
|
|
456
456
|
monthYear: Yo,
|
|
@@ -2565,7 +2565,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2565
2565
|
const w = we(At(g, D), "EEEEEE", { locale: xe });
|
|
2566
2566
|
return vt(w);
|
|
2567
2567
|
});
|
|
2568
|
-
}, []),
|
|
2568
|
+
}, []), h = se(() => {
|
|
2569
2569
|
u || c((g) => be(eo(g, 1)));
|
|
2570
2570
|
}, [u]), x = se(() => {
|
|
2571
2571
|
c((g) => be(to(g, 1)));
|
|
@@ -2574,7 +2574,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2574
2574
|
n && n(g);
|
|
2575
2575
|
},
|
|
2576
2576
|
[n]
|
|
2577
|
-
),
|
|
2577
|
+
), f = se(
|
|
2578
2578
|
(g, L) => {
|
|
2579
2579
|
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), a(L));
|
|
2580
2580
|
},
|
|
@@ -2595,7 +2595,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2595
2595
|
{
|
|
2596
2596
|
variant: "tertiary",
|
|
2597
2597
|
icon: !0,
|
|
2598
|
-
onClick:
|
|
2598
|
+
onClick: h,
|
|
2599
2599
|
"aria-label": i("datePicker.previousMonth"),
|
|
2600
2600
|
disabled: u,
|
|
2601
2601
|
children: /* @__PURE__ */ r(Lt, {})
|
|
@@ -2627,7 +2627,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2627
2627
|
{
|
|
2628
2628
|
className: C,
|
|
2629
2629
|
onClick: () => a(g),
|
|
2630
|
-
onKeyDown: (A) =>
|
|
2630
|
+
onKeyDown: (A) => f(A, g),
|
|
2631
2631
|
role: "button",
|
|
2632
2632
|
tabIndex: 0,
|
|
2633
2633
|
"aria-pressed": D ?? !1,
|
|
@@ -2684,6 +2684,7 @@ function ir(t) {
|
|
|
2684
2684
|
grid-template-columns: repeat(7, 1fr);
|
|
2685
2685
|
width: 100%;
|
|
2686
2686
|
text-align: center;
|
|
2687
|
+
overflow: hidden;
|
|
2687
2688
|
}
|
|
2688
2689
|
.${t.dayNameCell} {
|
|
2689
2690
|
display: flex;
|
|
@@ -2698,6 +2699,7 @@ function ir(t) {
|
|
|
2698
2699
|
font-weight: var(--ds-font-weight-semibold, 600);
|
|
2699
2700
|
line-height: var(--ds-body-short-xs-line-height, 1.3);
|
|
2700
2701
|
box-sizing: border-box;
|
|
2702
|
+
min-width: 0;
|
|
2701
2703
|
}
|
|
2702
2704
|
.${t.dateCell} {
|
|
2703
2705
|
display: flex;
|
|
@@ -2717,6 +2719,7 @@ function ir(t) {
|
|
|
2717
2719
|
cursor: pointer;
|
|
2718
2720
|
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
2719
2721
|
user-select: none;
|
|
2722
|
+
min-width: 0;
|
|
2720
2723
|
}
|
|
2721
2724
|
.${t.dateNumberContainer} {
|
|
2722
2725
|
display: flex;
|
|
@@ -2762,6 +2765,7 @@ function ir(t) {
|
|
|
2762
2765
|
.${t.calendarContainer} {
|
|
2763
2766
|
padding: var(--ds-size-4, 16px);
|
|
2764
2767
|
gap: var(--ds-size-2, 8px);
|
|
2768
|
+
width: 100%;
|
|
2765
2769
|
}
|
|
2766
2770
|
.${t.monthYear} {
|
|
2767
2771
|
font-size: var(--ds-heading-xs-font-size, 1.125rem);
|
|
@@ -2771,7 +2775,7 @@ function ir(t) {
|
|
|
2771
2775
|
font-size: var(--ds-body-2xs-font-size, 12px);
|
|
2772
2776
|
}
|
|
2773
2777
|
.${t.dateCell} {
|
|
2774
|
-
padding: var(--ds-size-
|
|
2778
|
+
padding: var(--ds-size-2, 8px);
|
|
2775
2779
|
font-size: var(--ds-body-2xs-font-size, 12px);
|
|
2776
2780
|
}
|
|
2777
2781
|
.${t.dateNumberContainer} {
|
|
@@ -2781,14 +2785,19 @@ function ir(t) {
|
|
|
2781
2785
|
}
|
|
2782
2786
|
@media (max-width: 360px) {
|
|
2783
2787
|
.${t.calendarContainer} {
|
|
2784
|
-
padding: var(--ds-size-
|
|
2788
|
+
padding: var(--ds-size-2, 8px);
|
|
2789
|
+
}
|
|
2790
|
+
.${t.dayNameCell} {
|
|
2791
|
+
padding: 2px;
|
|
2792
|
+
font-size: 10px;
|
|
2785
2793
|
}
|
|
2786
2794
|
.${t.dateCell} {
|
|
2787
|
-
padding: var(--ds-size-
|
|
2795
|
+
padding: var(--ds-size-1, 4px);
|
|
2796
|
+
font-size: 11px;
|
|
2788
2797
|
}
|
|
2789
2798
|
.${t.dateNumberContainer} {
|
|
2790
|
-
width:
|
|
2791
|
-
height:
|
|
2799
|
+
width: 16px;
|
|
2800
|
+
height: 16px;
|
|
2792
2801
|
}
|
|
2793
2802
|
}
|
|
2794
2803
|
`;
|
|
@@ -2815,13 +2824,13 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2815
2824
|
!isNaN(n) && n > 12 && (e = e.substring(0, 2) + "12" + e.substring(4));
|
|
2816
2825
|
}
|
|
2817
2826
|
return e.slice(0, 8);
|
|
2818
|
-
}, gr =
|
|
2827
|
+
}, gr = he(
|
|
2819
2828
|
(t, e) => {
|
|
2820
2829
|
const { t: n } = Ee();
|
|
2821
2830
|
Y(() => {
|
|
2822
2831
|
const S = "rk-dateinput-inline-styles";
|
|
2823
2832
|
if (typeof document > "u" || document.getElementById(S)) return;
|
|
2824
|
-
const E =
|
|
2833
|
+
const E = hr(ge), H = document.createElement("style");
|
|
2825
2834
|
H.id = S, H.textContent = E, document.head.appendChild(H);
|
|
2826
2835
|
}, []);
|
|
2827
2836
|
const {
|
|
@@ -2837,10 +2846,10 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2837
2846
|
value: u,
|
|
2838
2847
|
defaultValue: v,
|
|
2839
2848
|
onChange: m,
|
|
2840
|
-
readOnly:
|
|
2849
|
+
readOnly: h,
|
|
2841
2850
|
placeholder: x = "dd.mm.åååå",
|
|
2842
2851
|
id: a,
|
|
2843
|
-
name:
|
|
2852
|
+
name: f,
|
|
2844
2853
|
required: k,
|
|
2845
2854
|
disabled: p,
|
|
2846
2855
|
onClick: y,
|
|
@@ -2859,33 +2868,33 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2859
2868
|
"data-size": B,
|
|
2860
2869
|
// <-- Destrukturering
|
|
2861
2870
|
...G
|
|
2862
|
-
} = t, O = u !== void 0,
|
|
2863
|
-
|
|
2871
|
+
} = t, O = u !== void 0, z = Ye(null);
|
|
2872
|
+
ze.useImperativeHandle(
|
|
2864
2873
|
e,
|
|
2865
|
-
() =>
|
|
2874
|
+
() => z.current
|
|
2866
2875
|
);
|
|
2867
|
-
const
|
|
2876
|
+
const P = se(
|
|
2868
2877
|
(S) => {
|
|
2869
2878
|
const E = bt(S), H = xt(E);
|
|
2870
2879
|
return yt(H);
|
|
2871
2880
|
},
|
|
2872
2881
|
[]
|
|
2873
2882
|
), [M, V] = oe(
|
|
2874
|
-
() =>
|
|
2883
|
+
() => P(u ?? v)
|
|
2875
2884
|
);
|
|
2876
2885
|
Y(() => {
|
|
2877
2886
|
if (O) {
|
|
2878
|
-
const S =
|
|
2879
|
-
S !== M && (V(S),
|
|
2887
|
+
const S = P(u);
|
|
2888
|
+
S !== M && (V(S), z.current && z.current.value !== S && (z.current.value = S));
|
|
2880
2889
|
}
|
|
2881
|
-
}, [u, O, M,
|
|
2890
|
+
}, [u, O, M, P]);
|
|
2882
2891
|
const te = se(
|
|
2883
2892
|
(S) => {
|
|
2884
2893
|
const E = S.target, H = E.value, X = M, W = bt(H).slice(0, 8), I = xt(W), $ = yt(I);
|
|
2885
2894
|
let R = 0;
|
|
2886
2895
|
const K = I.length;
|
|
2887
2896
|
K <= 2 ? R = K : K <= 4 ? R = K + 1 : R = K + 2, R = Math.min(R, $.length), requestAnimationFrame(() => {
|
|
2888
|
-
if (
|
|
2897
|
+
if (z.current && (V($), z.current.value = $, z.current.setSelectionRange(R, R), ($ !== X || O) && m)) {
|
|
2889
2898
|
const re = {
|
|
2890
2899
|
...S,
|
|
2891
2900
|
target: { ...E, value: $ }
|
|
@@ -2894,7 +2903,7 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2894
2903
|
}
|
|
2895
2904
|
});
|
|
2896
2905
|
},
|
|
2897
|
-
[M, O, m,
|
|
2906
|
+
[M, O, m, P]
|
|
2898
2907
|
), Q = [ge.fieldset, o].filter(Boolean).join(" "), ie = [
|
|
2899
2908
|
ge.inputWrapper,
|
|
2900
2909
|
c,
|
|
@@ -2922,16 +2931,16 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2922
2931
|
/* @__PURE__ */ r(
|
|
2923
2932
|
"input",
|
|
2924
2933
|
{
|
|
2925
|
-
ref:
|
|
2934
|
+
ref: z,
|
|
2926
2935
|
type: "text",
|
|
2927
2936
|
inputMode: "numeric",
|
|
2928
2937
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
2929
2938
|
maxLength: 10,
|
|
2930
2939
|
value: M,
|
|
2931
|
-
readOnly:
|
|
2940
|
+
readOnly: h,
|
|
2932
2941
|
placeholder: x,
|
|
2933
2942
|
id: a,
|
|
2934
|
-
name:
|
|
2943
|
+
name: f,
|
|
2935
2944
|
required: k,
|
|
2936
2945
|
disabled: p,
|
|
2937
2946
|
onClick: y,
|
|
@@ -2969,7 +2978,7 @@ const ar = "_fieldset_16fx7_2", lr = "_description_16fx7_14", dr = "_error_16fx7
|
|
|
2969
2978
|
}
|
|
2970
2979
|
);
|
|
2971
2980
|
gr.displayName = "DateInput";
|
|
2972
|
-
function
|
|
2981
|
+
function hr(t) {
|
|
2973
2982
|
return `
|
|
2974
2983
|
.${t.fieldset} {
|
|
2975
2984
|
margin-bottom: var(--ds-spacing-4, 16px);
|
|
@@ -3062,11 +3071,11 @@ function fr(t) {
|
|
|
3062
3071
|
}
|
|
3063
3072
|
`;
|
|
3064
3073
|
}
|
|
3065
|
-
function
|
|
3074
|
+
function fr(t) {
|
|
3066
3075
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
3067
3076
|
}
|
|
3068
3077
|
function Tt(t) {
|
|
3069
|
-
return
|
|
3078
|
+
return fr(t) || Array.isArray(t);
|
|
3070
3079
|
}
|
|
3071
3080
|
function kr() {
|
|
3072
3081
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
@@ -3212,7 +3221,7 @@ function Tr(t, e, n, s) {
|
|
|
3212
3221
|
const y = c / i;
|
|
3213
3222
|
s(y), d && (d = e.requestAnimationFrame(m));
|
|
3214
3223
|
}
|
|
3215
|
-
function
|
|
3224
|
+
function h() {
|
|
3216
3225
|
d || (d = e.requestAnimationFrame(m));
|
|
3217
3226
|
}
|
|
3218
3227
|
function x() {
|
|
@@ -3224,7 +3233,7 @@ function Tr(t, e, n, s) {
|
|
|
3224
3233
|
return {
|
|
3225
3234
|
init: u,
|
|
3226
3235
|
destroy: v,
|
|
3227
|
-
start:
|
|
3236
|
+
start: h,
|
|
3228
3237
|
stop: x,
|
|
3229
3238
|
update: n,
|
|
3230
3239
|
render: s
|
|
@@ -3234,10 +3243,10 @@ function Sr(t, e) {
|
|
|
3234
3243
|
const n = e === "rtl", s = t === "y", l = s ? "y" : "x", i = s ? "x" : "y", o = !s && n ? -1 : 1, c = v(), d = m();
|
|
3235
3244
|
function u(a) {
|
|
3236
3245
|
const {
|
|
3237
|
-
height:
|
|
3246
|
+
height: f,
|
|
3238
3247
|
width: k
|
|
3239
3248
|
} = a;
|
|
3240
|
-
return s ?
|
|
3249
|
+
return s ? f : k;
|
|
3241
3250
|
}
|
|
3242
3251
|
function v() {
|
|
3243
3252
|
return s ? "top" : n ? "right" : "left";
|
|
@@ -3245,7 +3254,7 @@ function Sr(t, e) {
|
|
|
3245
3254
|
function m() {
|
|
3246
3255
|
return s ? "bottom" : n ? "left" : "right";
|
|
3247
3256
|
}
|
|
3248
|
-
function
|
|
3257
|
+
function h(a) {
|
|
3249
3258
|
return a * o;
|
|
3250
3259
|
}
|
|
3251
3260
|
return {
|
|
@@ -3254,7 +3263,7 @@ function Sr(t, e) {
|
|
|
3254
3263
|
startEdge: c,
|
|
3255
3264
|
endEdge: d,
|
|
3256
3265
|
measureSize: u,
|
|
3257
|
-
direction:
|
|
3266
|
+
direction: h
|
|
3258
3267
|
};
|
|
3259
3268
|
}
|
|
3260
3269
|
function ve(t = 0, e = 0) {
|
|
@@ -3290,17 +3299,17 @@ function Ft(t, e, n) {
|
|
|
3290
3299
|
constrain: s
|
|
3291
3300
|
} = ve(0, t), l = t + 1;
|
|
3292
3301
|
let i = o(e);
|
|
3293
|
-
function o(
|
|
3294
|
-
return n ? U((l +
|
|
3302
|
+
function o(h) {
|
|
3303
|
+
return n ? U((l + h) % l) : s(h);
|
|
3295
3304
|
}
|
|
3296
3305
|
function c() {
|
|
3297
3306
|
return i;
|
|
3298
3307
|
}
|
|
3299
|
-
function d(
|
|
3300
|
-
return i = o(
|
|
3308
|
+
function d(h) {
|
|
3309
|
+
return i = o(h), m;
|
|
3301
3310
|
}
|
|
3302
|
-
function u(
|
|
3303
|
-
return v().set(c() +
|
|
3311
|
+
function u(h) {
|
|
3312
|
+
return v().set(c() + h);
|
|
3304
3313
|
}
|
|
3305
3314
|
function v() {
|
|
3306
3315
|
return Ft(t, c(), n);
|
|
@@ -3313,7 +3322,7 @@ function Ft(t, e, n) {
|
|
|
3313
3322
|
};
|
|
3314
3323
|
return m;
|
|
3315
3324
|
}
|
|
3316
|
-
function Cr(t, e, n, s, l, i, o, c, d, u, v, m,
|
|
3325
|
+
function Cr(t, e, n, s, l, i, o, c, d, u, v, m, h, x, a, f, k, p, y) {
|
|
3317
3326
|
const {
|
|
3318
3327
|
cross: g,
|
|
3319
3328
|
direction: L
|
|
@@ -3326,7 +3335,7 @@ function Cr(t, e, n, s, l, i, o, c, d, u, v, m, f, x, a, h, k, p, y) {
|
|
|
3326
3335
|
mouse: 500,
|
|
3327
3336
|
touch: 600
|
|
3328
3337
|
}, G = a ? 43 : 25;
|
|
3329
|
-
let O = !1,
|
|
3338
|
+
let O = !1, z = 0, P = 0, M = !1, V = !1, te = !1, Q = !1;
|
|
3330
3339
|
function ie(I) {
|
|
3331
3340
|
if (!y) return;
|
|
3332
3341
|
function $(K) {
|
|
@@ -3357,19 +3366,19 @@ function Cr(t, e, n, s, l, i, o, c, d, u, v, m, f, x, a, h, k, p, y) {
|
|
|
3357
3366
|
}
|
|
3358
3367
|
function T(I) {
|
|
3359
3368
|
const $ = Xe(I, s);
|
|
3360
|
-
Q = $, te = a && $ && !I.buttons && O, O = Ae(l.get(), o.get()) >= 2, !($ && I.button !== 0) && (ae(I.target) || (M = !0, i.pointerDown(I), u.useFriction(0).useDuration(0), l.set(o), de(),
|
|
3369
|
+
Q = $, te = a && $ && !I.buttons && O, O = Ae(l.get(), o.get()) >= 2, !($ && I.button !== 0) && (ae(I.target) || (M = !0, i.pointerDown(I), u.useFriction(0).useDuration(0), l.set(o), de(), z = i.readPoint(I), P = i.readPoint(I, g), h.emit("pointerDown")));
|
|
3361
3370
|
}
|
|
3362
3371
|
function S(I) {
|
|
3363
3372
|
if (!Xe(I, s) && I.touches.length >= 2) return E(I);
|
|
3364
|
-
const R = i.readPoint(I), K = i.readPoint(I, g), re = Ae(R,
|
|
3373
|
+
const R = i.readPoint(I), K = i.readPoint(I, g), re = Ae(R, z), pe = Ae(K, P);
|
|
3365
3374
|
if (!V && !Q && (!I.cancelable || (V = re > pe, !V)))
|
|
3366
3375
|
return E(I);
|
|
3367
|
-
const
|
|
3368
|
-
re >
|
|
3376
|
+
const fe = i.pointerMove(I);
|
|
3377
|
+
re > f && (te = !0), u.useFriction(0.3).useDuration(0.75), c.start(), l.add(L(fe)), I.preventDefault();
|
|
3369
3378
|
}
|
|
3370
3379
|
function E(I) {
|
|
3371
|
-
const R = v.byDistance(0, !1).index !== m.get(), K = i.pointerUp(I) * q(), re = ce(L(K), R), pe = yr(K, re),
|
|
3372
|
-
V = !1, M = !1, A.clear(), u.useDuration(
|
|
3380
|
+
const R = v.byDistance(0, !1).index !== m.get(), K = i.pointerUp(I) * q(), re = ce(L(K), R), pe = yr(K, re), fe = G - 10 * pe, me = p + pe / 50;
|
|
3381
|
+
V = !1, M = !1, A.clear(), u.useDuration(fe).useFriction(me), d.distance(re, !a), Q = !1, h.emit("pointerUp");
|
|
3373
3382
|
}
|
|
3374
3383
|
function H(I) {
|
|
3375
3384
|
te && (I.stopPropagation(), I.preventDefault(), te = !1);
|
|
@@ -3388,21 +3397,21 @@ function wr(t, e) {
|
|
|
3388
3397
|
function i(m) {
|
|
3389
3398
|
return m.timeStamp;
|
|
3390
3399
|
}
|
|
3391
|
-
function o(m,
|
|
3392
|
-
const a = `client${(
|
|
3400
|
+
function o(m, h) {
|
|
3401
|
+
const a = `client${(h || t.scroll) === "x" ? "X" : "Y"}`;
|
|
3393
3402
|
return (Xe(m, e) ? m : m.touches[0])[a];
|
|
3394
3403
|
}
|
|
3395
3404
|
function c(m) {
|
|
3396
3405
|
return s = m, l = m, o(m);
|
|
3397
3406
|
}
|
|
3398
3407
|
function d(m) {
|
|
3399
|
-
const
|
|
3400
|
-
return l = m, x && (s = m),
|
|
3408
|
+
const h = o(m) - o(l), x = i(m) - i(s) > 170;
|
|
3409
|
+
return l = m, x && (s = m), h;
|
|
3401
3410
|
}
|
|
3402
3411
|
function u(m) {
|
|
3403
3412
|
if (!s || !l) return 0;
|
|
3404
|
-
const
|
|
3405
|
-
return x && !a && U(
|
|
3413
|
+
const h = o(l) - o(s), x = i(m) - i(s), a = i(m) - i(l) > 170, f = h / x;
|
|
3414
|
+
return x && !a && U(f) > 0.1 ? f : 0;
|
|
3406
3415
|
}
|
|
3407
3416
|
return {
|
|
3408
3417
|
pointerDown: c,
|
|
@@ -3443,16 +3452,16 @@ function Dr(t) {
|
|
|
3443
3452
|
function _r(t, e, n, s, l, i, o) {
|
|
3444
3453
|
const c = [t].concat(s);
|
|
3445
3454
|
let d, u, v = [], m = !1;
|
|
3446
|
-
function
|
|
3455
|
+
function h(k) {
|
|
3447
3456
|
return l.measureSize(o.measure(k));
|
|
3448
3457
|
}
|
|
3449
3458
|
function x(k) {
|
|
3450
3459
|
if (!i) return;
|
|
3451
|
-
u =
|
|
3460
|
+
u = h(t), v = s.map(h);
|
|
3452
3461
|
function p(y) {
|
|
3453
3462
|
for (const g of y) {
|
|
3454
3463
|
if (m) return;
|
|
3455
|
-
const L = g.target === t, D = s.indexOf(g.target), w = L ? u : v[D], C =
|
|
3464
|
+
const L = g.target === t, D = s.indexOf(g.target), w = L ? u : v[D], C = h(L ? t : s[D]);
|
|
3456
3465
|
if (U(C - w) >= 0.5) {
|
|
3457
3466
|
k.reInit(), e.emit("resize");
|
|
3458
3467
|
break;
|
|
@@ -3475,7 +3484,7 @@ function _r(t, e, n, s, l, i, o) {
|
|
|
3475
3484
|
}
|
|
3476
3485
|
function Ar(t, e, n, s, l, i) {
|
|
3477
3486
|
let o = 0, c = 0, d = l, u = i, v = t.get(), m = 0;
|
|
3478
|
-
function
|
|
3487
|
+
function h() {
|
|
3479
3488
|
const w = s.get() - t.get(), C = !d;
|
|
3480
3489
|
let A = 0;
|
|
3481
3490
|
return C ? (o = 0, n.set(s), t.set(s), A = w) : (n.set(t), o += w / d, o *= u, v += o, t.add(o), A = v - m), c = nt(A), m = v, D;
|
|
@@ -3487,7 +3496,7 @@ function Ar(t, e, n, s, l, i) {
|
|
|
3487
3496
|
function a() {
|
|
3488
3497
|
return d;
|
|
3489
3498
|
}
|
|
3490
|
-
function
|
|
3499
|
+
function f() {
|
|
3491
3500
|
return c;
|
|
3492
3501
|
}
|
|
3493
3502
|
function k() {
|
|
@@ -3506,10 +3515,10 @@ function Ar(t, e, n, s, l, i) {
|
|
|
3506
3515
|
return u = w, D;
|
|
3507
3516
|
}
|
|
3508
3517
|
const D = {
|
|
3509
|
-
direction:
|
|
3518
|
+
direction: f,
|
|
3510
3519
|
duration: a,
|
|
3511
3520
|
velocity: k,
|
|
3512
|
-
seek:
|
|
3521
|
+
seek: h,
|
|
3513
3522
|
settled: x,
|
|
3514
3523
|
useBaseFriction: y,
|
|
3515
3524
|
useBaseDuration: p,
|
|
@@ -3526,7 +3535,7 @@ function Mr(t, e, n, s, l) {
|
|
|
3526
3535
|
}
|
|
3527
3536
|
function v(x) {
|
|
3528
3537
|
if (!u()) return;
|
|
3529
|
-
const a = t.reachedMin(e.get()) ? "min" : "max",
|
|
3538
|
+
const a = t.reachedMin(e.get()) ? "min" : "max", f = U(t[a] - e.get()), k = n.get() - e.get(), p = c.constrain(f / o);
|
|
3530
3539
|
n.subtract(k * p), !x && U(k) < i && (n.set(t.constrain(n.get())), s.useDuration(25).useBaseFriction());
|
|
3531
3540
|
}
|
|
3532
3541
|
function m(x) {
|
|
@@ -3539,31 +3548,31 @@ function Mr(t, e, n, s, l) {
|
|
|
3539
3548
|
};
|
|
3540
3549
|
}
|
|
3541
3550
|
function Lr(t, e, n, s, l) {
|
|
3542
|
-
const i = ve(-e + t, 0), o = m(), c = v(), d =
|
|
3543
|
-
function u(a,
|
|
3544
|
-
return Ae(a,
|
|
3551
|
+
const i = ve(-e + t, 0), o = m(), c = v(), d = h();
|
|
3552
|
+
function u(a, f) {
|
|
3553
|
+
return Ae(a, f) <= 1;
|
|
3545
3554
|
}
|
|
3546
3555
|
function v() {
|
|
3547
|
-
const a = o[0],
|
|
3556
|
+
const a = o[0], f = le(o), k = o.lastIndexOf(a), p = o.indexOf(f) + 1;
|
|
3548
3557
|
return ve(k, p);
|
|
3549
3558
|
}
|
|
3550
3559
|
function m() {
|
|
3551
|
-
return n.map((a,
|
|
3560
|
+
return n.map((a, f) => {
|
|
3552
3561
|
const {
|
|
3553
3562
|
min: k,
|
|
3554
3563
|
max: p
|
|
3555
|
-
} = i, y = i.constrain(a), g = !
|
|
3564
|
+
} = i, y = i.constrain(a), g = !f, L = ot(n, f);
|
|
3556
3565
|
return g ? p : L || u(k, y) ? k : u(p, y) ? p : y;
|
|
3557
3566
|
}).map((a) => parseFloat(a.toFixed(3)));
|
|
3558
3567
|
}
|
|
3559
|
-
function
|
|
3568
|
+
function h() {
|
|
3560
3569
|
if (e <= t + l) return [i.max];
|
|
3561
3570
|
if (s === "keepSnaps") return o;
|
|
3562
3571
|
const {
|
|
3563
3572
|
min: a,
|
|
3564
|
-
max:
|
|
3573
|
+
max: f
|
|
3565
3574
|
} = c;
|
|
3566
|
-
return o.slice(a,
|
|
3575
|
+
return o.slice(a, f);
|
|
3567
3576
|
}
|
|
3568
3577
|
return {
|
|
3569
3578
|
snapsContained: d,
|
|
@@ -3581,12 +3590,12 @@ function Er(t, e, n, s) {
|
|
|
3581
3590
|
reachedMin: c,
|
|
3582
3591
|
reachedMax: d
|
|
3583
3592
|
} = ve(i, o);
|
|
3584
|
-
function u(
|
|
3585
|
-
return
|
|
3593
|
+
function u(h) {
|
|
3594
|
+
return h === 1 ? d(n.get()) : h === -1 ? c(n.get()) : !1;
|
|
3586
3595
|
}
|
|
3587
|
-
function v(
|
|
3588
|
-
if (!u(
|
|
3589
|
-
const x = t * (
|
|
3596
|
+
function v(h) {
|
|
3597
|
+
if (!u(h)) return;
|
|
3598
|
+
const x = t * (h * -1);
|
|
3590
3599
|
s.forEach((a) => a.add(x));
|
|
3591
3600
|
}
|
|
3592
3601
|
return {
|
|
@@ -3612,15 +3621,15 @@ function Nr(t, e, n, s, l) {
|
|
|
3612
3621
|
endEdge: o
|
|
3613
3622
|
} = t, {
|
|
3614
3623
|
groupSlides: c
|
|
3615
|
-
} = l, d = m().map(e.measure), u =
|
|
3624
|
+
} = l, d = m().map(e.measure), u = h(), v = x();
|
|
3616
3625
|
function m() {
|
|
3617
|
-
return c(s).map((
|
|
3626
|
+
return c(s).map((f) => le(f)[o] - f[0][i]).map(U);
|
|
3618
3627
|
}
|
|
3619
|
-
function
|
|
3620
|
-
return s.map((
|
|
3628
|
+
function h() {
|
|
3629
|
+
return s.map((f) => n[i] - f[i]).map((f) => -U(f));
|
|
3621
3630
|
}
|
|
3622
3631
|
function x() {
|
|
3623
|
-
return c(u).map((
|
|
3632
|
+
return c(u).map((f) => f[0]).map((f, k) => f + d[k]);
|
|
3624
3633
|
}
|
|
3625
3634
|
return {
|
|
3626
3635
|
snaps: u,
|
|
@@ -3635,9 +3644,9 @@ function Br(t, e, n, s, l, i) {
|
|
|
3635
3644
|
max: d
|
|
3636
3645
|
} = s, u = v();
|
|
3637
3646
|
function v() {
|
|
3638
|
-
const
|
|
3639
|
-
return n.length === 1 ? [i] : x ?
|
|
3640
|
-
const p = !
|
|
3647
|
+
const h = o(i), x = !t || e === "keepSnaps";
|
|
3648
|
+
return n.length === 1 ? [i] : x ? h : h.slice(c, d).map((a, f, k) => {
|
|
3649
|
+
const p = !f, y = ot(k, f);
|
|
3641
3650
|
if (p) {
|
|
3642
3651
|
const g = le(k[0]) + 1;
|
|
3643
3652
|
return wt(g);
|
|
@@ -3653,47 +3662,47 @@ function Br(t, e, n, s, l, i) {
|
|
|
3653
3662
|
slideRegistry: u
|
|
3654
3663
|
};
|
|
3655
3664
|
}
|
|
3656
|
-
function
|
|
3665
|
+
function zr(t, e, n, s, l) {
|
|
3657
3666
|
const {
|
|
3658
3667
|
reachedAny: i,
|
|
3659
3668
|
removeOffset: o,
|
|
3660
3669
|
constrain: c
|
|
3661
3670
|
} = s;
|
|
3662
3671
|
function d(a) {
|
|
3663
|
-
return a.concat().sort((
|
|
3672
|
+
return a.concat().sort((f, k) => U(f) - U(k))[0];
|
|
3664
3673
|
}
|
|
3665
3674
|
function u(a) {
|
|
3666
|
-
const
|
|
3667
|
-
diff: v(y -
|
|
3675
|
+
const f = t ? o(a) : c(a), k = e.map((y, g) => ({
|
|
3676
|
+
diff: v(y - f, 0),
|
|
3668
3677
|
index: g
|
|
3669
3678
|
})).sort((y, g) => U(y.diff) - U(g.diff)), {
|
|
3670
3679
|
index: p
|
|
3671
3680
|
} = k[0];
|
|
3672
3681
|
return {
|
|
3673
3682
|
index: p,
|
|
3674
|
-
distance:
|
|
3683
|
+
distance: f
|
|
3675
3684
|
};
|
|
3676
3685
|
}
|
|
3677
|
-
function v(a,
|
|
3686
|
+
function v(a, f) {
|
|
3678
3687
|
const k = [a, a + n, a - n];
|
|
3679
3688
|
if (!t) return a;
|
|
3680
|
-
if (!
|
|
3681
|
-
const p = k.filter((y) => nt(y) ===
|
|
3689
|
+
if (!f) return d(k);
|
|
3690
|
+
const p = k.filter((y) => nt(y) === f);
|
|
3682
3691
|
return p.length ? d(p) : le(k) - n;
|
|
3683
3692
|
}
|
|
3684
|
-
function m(a,
|
|
3685
|
-
const k = e[a] - l.get(), p = v(k,
|
|
3693
|
+
function m(a, f) {
|
|
3694
|
+
const k = e[a] - l.get(), p = v(k, f);
|
|
3686
3695
|
return {
|
|
3687
3696
|
index: a,
|
|
3688
3697
|
distance: p
|
|
3689
3698
|
};
|
|
3690
3699
|
}
|
|
3691
|
-
function
|
|
3700
|
+
function h(a, f) {
|
|
3692
3701
|
const k = l.get() + a, {
|
|
3693
3702
|
index: p,
|
|
3694
3703
|
distance: y
|
|
3695
3704
|
} = u(k), g = !t && i(k);
|
|
3696
|
-
if (!
|
|
3705
|
+
if (!f || g) return {
|
|
3697
3706
|
index: p,
|
|
3698
3707
|
distance: a
|
|
3699
3708
|
};
|
|
@@ -3704,22 +3713,22 @@ function Pr(t, e, n, s, l) {
|
|
|
3704
3713
|
};
|
|
3705
3714
|
}
|
|
3706
3715
|
return {
|
|
3707
|
-
byDistance:
|
|
3716
|
+
byDistance: h,
|
|
3708
3717
|
byIndex: m,
|
|
3709
3718
|
shortcut: v
|
|
3710
3719
|
};
|
|
3711
3720
|
}
|
|
3712
|
-
function
|
|
3721
|
+
function Pr(t, e, n, s, l, i, o) {
|
|
3713
3722
|
function c(m) {
|
|
3714
|
-
const
|
|
3715
|
-
i.add(
|
|
3723
|
+
const h = m.distance, x = m.index !== e.get();
|
|
3724
|
+
i.add(h), h && (s.duration() ? t.start() : (t.update(), t.render(1), t.update())), x && (n.set(e.get()), e.set(m.index), o.emit("select"));
|
|
3716
3725
|
}
|
|
3717
|
-
function d(m,
|
|
3718
|
-
const x = l.byDistance(m,
|
|
3726
|
+
function d(m, h) {
|
|
3727
|
+
const x = l.byDistance(m, h);
|
|
3719
3728
|
c(x);
|
|
3720
3729
|
}
|
|
3721
|
-
function u(m,
|
|
3722
|
-
const x = e.clone().set(m), a = l.byIndex(x.get(),
|
|
3730
|
+
function u(m, h) {
|
|
3731
|
+
const x = e.clone().set(m), a = l.byIndex(x.get(), h);
|
|
3723
3732
|
c(a);
|
|
3724
3733
|
}
|
|
3725
3734
|
return {
|
|
@@ -3735,14 +3744,14 @@ function $r(t, e, n, s, l, i, o, c) {
|
|
|
3735
3744
|
let u = 0;
|
|
3736
3745
|
function v(x) {
|
|
3737
3746
|
if (!c) return;
|
|
3738
|
-
function a(
|
|
3747
|
+
function a(f) {
|
|
3739
3748
|
if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
|
|
3740
3749
|
o.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
3741
|
-
const y = n.findIndex((g) => g.includes(
|
|
3750
|
+
const y = n.findIndex((g) => g.includes(f));
|
|
3742
3751
|
tt(y) && (l.useDuration(0), s.index(y, 0), o.emit("slideFocus"));
|
|
3743
3752
|
}
|
|
3744
|
-
i.add(document, "keydown", m, !1), e.forEach((
|
|
3745
|
-
i.add(
|
|
3753
|
+
i.add(document, "keydown", m, !1), e.forEach((f, k) => {
|
|
3754
|
+
i.add(f, "focus", (p) => {
|
|
3746
3755
|
($e(c) || c(x, p)) && a(k);
|
|
3747
3756
|
}, d);
|
|
3748
3757
|
});
|
|
@@ -3781,19 +3790,19 @@ function _e(t) {
|
|
|
3781
3790
|
function Nt(t, e) {
|
|
3782
3791
|
const n = t.scroll === "x" ? o : c, s = e.style;
|
|
3783
3792
|
let l = null, i = !1;
|
|
3784
|
-
function o(
|
|
3785
|
-
return `translate3d(${
|
|
3793
|
+
function o(h) {
|
|
3794
|
+
return `translate3d(${h}px,0px,0px)`;
|
|
3786
3795
|
}
|
|
3787
|
-
function c(
|
|
3788
|
-
return `translate3d(0px,${
|
|
3796
|
+
function c(h) {
|
|
3797
|
+
return `translate3d(0px,${h}px,0px)`;
|
|
3789
3798
|
}
|
|
3790
|
-
function d(
|
|
3799
|
+
function d(h) {
|
|
3791
3800
|
if (i) return;
|
|
3792
|
-
const x = br(t.direction(
|
|
3801
|
+
const x = br(t.direction(h));
|
|
3793
3802
|
x !== l && (s.transform = n(x), l = x);
|
|
3794
3803
|
}
|
|
3795
|
-
function u(
|
|
3796
|
-
i = !
|
|
3804
|
+
function u(h) {
|
|
3805
|
+
i = !h;
|
|
3797
3806
|
}
|
|
3798
3807
|
function v() {
|
|
3799
3808
|
i || (s.transform = "", e.getAttribute("style") || e.removeAttribute("style"));
|
|
@@ -3805,29 +3814,29 @@ function Nt(t, e) {
|
|
|
3805
3814
|
};
|
|
3806
3815
|
}
|
|
3807
3816
|
function Rr(t, e, n, s, l, i, o, c, d) {
|
|
3808
|
-
const v = Me(l), m = Me(l).reverse(),
|
|
3817
|
+
const v = Me(l), m = Me(l).reverse(), h = p().concat(y());
|
|
3809
3818
|
function x(C, A) {
|
|
3810
3819
|
return C.reduce((j, N) => j - l[N], A);
|
|
3811
3820
|
}
|
|
3812
3821
|
function a(C, A) {
|
|
3813
3822
|
return C.reduce((j, N) => x(j, A) > 0 ? j.concat([N]) : j, []);
|
|
3814
3823
|
}
|
|
3815
|
-
function
|
|
3824
|
+
function f(C) {
|
|
3816
3825
|
return i.map((A, j) => ({
|
|
3817
3826
|
start: A - s[j] + 0.5 + C,
|
|
3818
3827
|
end: A + e - 0.5 + C
|
|
3819
3828
|
}));
|
|
3820
3829
|
}
|
|
3821
3830
|
function k(C, A, j) {
|
|
3822
|
-
const N =
|
|
3831
|
+
const N = f(A);
|
|
3823
3832
|
return C.map((B) => {
|
|
3824
|
-
const G = j ? 0 : -n, O = j ? n : 0,
|
|
3833
|
+
const G = j ? 0 : -n, O = j ? n : 0, z = j ? "end" : "start", P = N[B][z];
|
|
3825
3834
|
return {
|
|
3826
3835
|
index: B,
|
|
3827
|
-
loopPoint:
|
|
3836
|
+
loopPoint: P,
|
|
3828
3837
|
slideLocation: _e(-1),
|
|
3829
3838
|
translate: Nt(t, d[B]),
|
|
3830
|
-
target: () => c.get() >
|
|
3839
|
+
target: () => c.get() > P ? G : O
|
|
3831
3840
|
};
|
|
3832
3841
|
});
|
|
3833
3842
|
}
|
|
@@ -3840,7 +3849,7 @@ function Rr(t, e, n, s, l, i, o, c, d) {
|
|
|
3840
3849
|
return k(A, -n, !0);
|
|
3841
3850
|
}
|
|
3842
3851
|
function g() {
|
|
3843
|
-
return
|
|
3852
|
+
return h.every(({
|
|
3844
3853
|
index: C
|
|
3845
3854
|
}) => {
|
|
3846
3855
|
const A = v.filter((j) => j !== C);
|
|
@@ -3848,7 +3857,7 @@ function Rr(t, e, n, s, l, i, o, c, d) {
|
|
|
3848
3857
|
});
|
|
3849
3858
|
}
|
|
3850
3859
|
function L() {
|
|
3851
|
-
|
|
3860
|
+
h.forEach((C) => {
|
|
3852
3861
|
const {
|
|
3853
3862
|
target: A,
|
|
3854
3863
|
translate: j,
|
|
@@ -3858,13 +3867,13 @@ function Rr(t, e, n, s, l, i, o, c, d) {
|
|
|
3858
3867
|
});
|
|
3859
3868
|
}
|
|
3860
3869
|
function D() {
|
|
3861
|
-
|
|
3870
|
+
h.forEach((C) => C.translate.clear());
|
|
3862
3871
|
}
|
|
3863
3872
|
return {
|
|
3864
3873
|
canLoop: g,
|
|
3865
3874
|
clear: D,
|
|
3866
3875
|
loop: L,
|
|
3867
|
-
loopPoints:
|
|
3876
|
+
loopPoints: h
|
|
3868
3877
|
};
|
|
3869
3878
|
}
|
|
3870
3879
|
function Gr(t, e, n) {
|
|
@@ -3897,9 +3906,9 @@ function Wr(t, e, n, s) {
|
|
|
3897
3906
|
let i = null, o = null, c, d = !1;
|
|
3898
3907
|
function u() {
|
|
3899
3908
|
c = new IntersectionObserver((a) => {
|
|
3900
|
-
d || (a.forEach((
|
|
3901
|
-
const k = e.indexOf(
|
|
3902
|
-
l[k] =
|
|
3909
|
+
d || (a.forEach((f) => {
|
|
3910
|
+
const k = e.indexOf(f.target);
|
|
3911
|
+
l[k] = f;
|
|
3903
3912
|
}), i = null, o = null, n.emit("slidesInView"));
|
|
3904
3913
|
}, {
|
|
3905
3914
|
root: t.parentElement,
|
|
@@ -3910,23 +3919,23 @@ function Wr(t, e, n, s) {
|
|
|
3910
3919
|
c && c.disconnect(), d = !0;
|
|
3911
3920
|
}
|
|
3912
3921
|
function m(a) {
|
|
3913
|
-
return Le(l).reduce((
|
|
3922
|
+
return Le(l).reduce((f, k) => {
|
|
3914
3923
|
const p = parseInt(k), {
|
|
3915
3924
|
isIntersecting: y
|
|
3916
3925
|
} = l[p];
|
|
3917
|
-
return (a && y || !a && !y) &&
|
|
3926
|
+
return (a && y || !a && !y) && f.push(p), f;
|
|
3918
3927
|
}, []);
|
|
3919
3928
|
}
|
|
3920
|
-
function
|
|
3929
|
+
function h(a = !0) {
|
|
3921
3930
|
if (a && i) return i;
|
|
3922
3931
|
if (!a && o) return o;
|
|
3923
|
-
const
|
|
3924
|
-
return a && (i =
|
|
3932
|
+
const f = m(a);
|
|
3933
|
+
return a && (i = f), a || (o = f), f;
|
|
3925
3934
|
}
|
|
3926
3935
|
return {
|
|
3927
3936
|
init: u,
|
|
3928
3937
|
destroy: v,
|
|
3929
|
-
get:
|
|
3938
|
+
get: h
|
|
3930
3939
|
};
|
|
3931
3940
|
}
|
|
3932
3941
|
function Hr(t, e, n, s, l, i) {
|
|
@@ -3934,13 +3943,13 @@ function Hr(t, e, n, s, l, i) {
|
|
|
3934
3943
|
measureSize: o,
|
|
3935
3944
|
startEdge: c,
|
|
3936
3945
|
endEdge: d
|
|
3937
|
-
} = t, u = n[0] && l, v = a(), m =
|
|
3946
|
+
} = t, u = n[0] && l, v = a(), m = f(), h = n.map(o), x = k();
|
|
3938
3947
|
function a() {
|
|
3939
3948
|
if (!u) return 0;
|
|
3940
3949
|
const y = n[0];
|
|
3941
3950
|
return U(e[c] - y[c]);
|
|
3942
3951
|
}
|
|
3943
|
-
function
|
|
3952
|
+
function f() {
|
|
3944
3953
|
if (!u) return 0;
|
|
3945
3954
|
const y = i.getComputedStyle(le(s));
|
|
3946
3955
|
return parseFloat(y.getPropertyValue(`margin-${d}`));
|
|
@@ -3948,11 +3957,11 @@ function Hr(t, e, n, s, l, i) {
|
|
|
3948
3957
|
function k() {
|
|
3949
3958
|
return n.map((y, g, L) => {
|
|
3950
3959
|
const D = !g, w = ot(L, g);
|
|
3951
|
-
return D ?
|
|
3960
|
+
return D ? h[g] + v : w ? h[g] + m : L[g + 1][c] - y[c];
|
|
3952
3961
|
}).map(U);
|
|
3953
3962
|
}
|
|
3954
3963
|
return {
|
|
3955
|
-
slideSizes:
|
|
3964
|
+
slideSizes: h,
|
|
3956
3965
|
slideSizesWithGaps: x,
|
|
3957
3966
|
startGap: v,
|
|
3958
3967
|
endGap: m
|
|
@@ -3963,7 +3972,7 @@ function Ur(t, e, n, s, l, i, o, c, d) {
|
|
|
3963
3972
|
startEdge: u,
|
|
3964
3973
|
endEdge: v,
|
|
3965
3974
|
direction: m
|
|
3966
|
-
} = t,
|
|
3975
|
+
} = t, h = tt(n);
|
|
3967
3976
|
function x(p, y) {
|
|
3968
3977
|
return Me(p).filter((g) => g % y === 0).map((g) => p.slice(g, g + y));
|
|
3969
3978
|
}
|
|
@@ -3976,11 +3985,11 @@ function Ur(t, e, n, s, l, i, o, c, d) {
|
|
|
3976
3985
|
return p.slice(D, y);
|
|
3977
3986
|
}) : [];
|
|
3978
3987
|
}
|
|
3979
|
-
function
|
|
3980
|
-
return
|
|
3988
|
+
function f(p) {
|
|
3989
|
+
return h ? x(p, n) : a(p);
|
|
3981
3990
|
}
|
|
3982
3991
|
return {
|
|
3983
|
-
groupSlides:
|
|
3992
|
+
groupSlides: f
|
|
3984
3993
|
};
|
|
3985
3994
|
}
|
|
3986
3995
|
function Or(t, e, n, s, l, i, o) {
|
|
@@ -3990,10 +3999,10 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
3990
3999
|
direction: u,
|
|
3991
4000
|
startIndex: v,
|
|
3992
4001
|
loop: m,
|
|
3993
|
-
duration:
|
|
4002
|
+
duration: h,
|
|
3994
4003
|
dragFree: x,
|
|
3995
4004
|
dragThreshold: a,
|
|
3996
|
-
inViewThreshold:
|
|
4005
|
+
inViewThreshold: f,
|
|
3997
4006
|
slidesToScroll: k,
|
|
3998
4007
|
skipSnaps: p,
|
|
3999
4008
|
containScroll: y,
|
|
@@ -4001,7 +4010,7 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
4001
4010
|
watchSlides: L,
|
|
4002
4011
|
watchDrag: D,
|
|
4003
4012
|
watchFocus: w
|
|
4004
|
-
} = i, C = 2, A = Ir(), j = A.measure(e), N = n.map(A.measure), B = Sr(d, u), G = B.measureSize(j), O = Dr(G),
|
|
4013
|
+
} = i, C = 2, A = Ir(), j = A.measure(e), N = n.map(A.measure), B = Sr(d, u), G = B.measureSize(j), O = Dr(G), z = xr(c, G), P = !m && !!y, M = m || !!y, {
|
|
4005
4014
|
slideSizes: V,
|
|
4006
4015
|
slideSizesWithGaps: te,
|
|
4007
4016
|
startGap: Q,
|
|
@@ -4009,10 +4018,10 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
4009
4018
|
} = Hr(B, j, N, n, M, l), ee = Ur(B, G, k, m, j, N, Q, ie, C), {
|
|
4010
4019
|
snaps: de,
|
|
4011
4020
|
snapsAligned: ae
|
|
4012
|
-
} = Nr(B,
|
|
4021
|
+
} = Nr(B, z, j, N, ee), q = -le(de) + le(te), {
|
|
4013
4022
|
snapsContained: ce,
|
|
4014
4023
|
scrollContainLimit: T
|
|
4015
|
-
} = Lr(G, q, ae, y, C), S =
|
|
4024
|
+
} = Lr(G, q, ae, y, C), S = P ? ce : ae, {
|
|
4016
4025
|
limit: E
|
|
4017
4026
|
} = jr(q, S, m), H = Ft(Fe(S), v, m), X = H.clone(), W = Me(n), I = ({
|
|
4018
4027
|
dragHandler: ye,
|
|
@@ -4028,7 +4037,7 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
4028
4037
|
translate: He,
|
|
4029
4038
|
location: Ue,
|
|
4030
4039
|
offsetLocation: Ne,
|
|
4031
|
-
previousLocation:
|
|
4040
|
+
previousLocation: Pt,
|
|
4032
4041
|
scrollLooper: $t,
|
|
4033
4042
|
slideLooper: Rt,
|
|
4034
4043
|
dragHandler: Gt,
|
|
@@ -4041,11 +4050,11 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
4041
4050
|
}, ct) => {
|
|
4042
4051
|
const ut = ye.settled(), Ut = !Ht.shouldConstrain(), pt = dt ? ut : ut && Ut, mt = pt && !Gt.pointerDown();
|
|
4043
4052
|
mt && Wt.stop();
|
|
4044
|
-
const Ot = Ue.get() * ct +
|
|
4053
|
+
const Ot = Ue.get() * ct + Pt.get() * (1 - ct);
|
|
4045
4054
|
Ne.set(Ot), dt && ($t.loop(ye.direction()), Rt.loop()), He.to(Ne.get()), mt && lt.emit("settle"), pt || lt.emit("scroll");
|
|
4046
|
-
}, R = Tr(s, l, () => I(We), (ye) => $(We, ye)), K = 0.68, re = S[H.get()], pe = _e(re),
|
|
4055
|
+
}, R = Tr(s, l, () => I(We), (ye) => $(We, ye)), K = 0.68, re = S[H.get()], pe = _e(re), fe = _e(re), me = _e(re), ke = _e(re), Ce = Ar(pe, me, fe, ke, h, K), Re = zr(m, S, q, E, ke), Ge = Pr(R, H, X, Ce, Re, ke, o), st = Fr(E), it = je(), Bt = Wr(e, n, o, f), {
|
|
4047
4056
|
slideRegistry: at
|
|
4048
|
-
} = Br(
|
|
4057
|
+
} = Br(P, y, S, T, ee, W), zt = $r(t, n, at, Ge, Ce, it, o, w), We = {
|
|
4049
4058
|
ownerDocument: s,
|
|
4050
4059
|
ownerWindow: l,
|
|
4051
4060
|
eventHandler: o,
|
|
@@ -4061,19 +4070,19 @@ function Or(t, e, n, s, l, i, o) {
|
|
|
4061
4070
|
limit: E,
|
|
4062
4071
|
location: pe,
|
|
4063
4072
|
offsetLocation: me,
|
|
4064
|
-
previousLocation:
|
|
4073
|
+
previousLocation: fe,
|
|
4065
4074
|
options: i,
|
|
4066
4075
|
resizeHandler: _r(e, o, l, n, B, g, A),
|
|
4067
4076
|
scrollBody: Ce,
|
|
4068
4077
|
scrollBounds: Mr(E, me, ke, Ce, O),
|
|
4069
|
-
scrollLooper: Er(q, E, me, [pe, me,
|
|
4078
|
+
scrollLooper: Er(q, E, me, [pe, me, fe, ke]),
|
|
4070
4079
|
scrollProgress: st,
|
|
4071
4080
|
scrollSnapList: S.map(st.get),
|
|
4072
4081
|
scrollSnaps: S,
|
|
4073
4082
|
scrollTarget: Re,
|
|
4074
4083
|
scrollTo: Ge,
|
|
4075
4084
|
slideLooper: Rr(B, G, q, V, te, de, S, me, n),
|
|
4076
|
-
slideFocus:
|
|
4085
|
+
slideFocus: zt,
|
|
4077
4086
|
slidesHandler: Gr(e, o, L),
|
|
4078
4087
|
slidesInView: Bt,
|
|
4079
4088
|
slideIndexes: W,
|
|
@@ -4169,17 +4178,17 @@ function qr(t) {
|
|
|
4169
4178
|
destroy: s
|
|
4170
4179
|
};
|
|
4171
4180
|
}
|
|
4172
|
-
function
|
|
4181
|
+
function Pe(t, e, n) {
|
|
4173
4182
|
const s = t.ownerDocument, l = s.defaultView, i = Yr(l), o = qr(i), c = je(), d = Vr(), {
|
|
4174
4183
|
mergeOptions: u,
|
|
4175
4184
|
optionsAtMedia: v,
|
|
4176
4185
|
optionsMediaQueries: m
|
|
4177
4186
|
} = i, {
|
|
4178
|
-
on:
|
|
4187
|
+
on: h,
|
|
4179
4188
|
off: x,
|
|
4180
4189
|
emit: a
|
|
4181
|
-
} = d,
|
|
4182
|
-
let k = !1, p, y = u(Kr,
|
|
4190
|
+
} = d, f = B;
|
|
4191
|
+
let k = !1, p, y = u(Kr, Pe.globalOptions), g = u(y), L = [], D, w, C;
|
|
4183
4192
|
function A() {
|
|
4184
4193
|
const {
|
|
4185
4194
|
container: W,
|
|
@@ -4216,16 +4225,16 @@ function ze(t, e, n) {
|
|
|
4216
4225
|
function O() {
|
|
4217
4226
|
k || (k = !0, c.clear(), G(), d.emit("destroy"), d.clear());
|
|
4218
4227
|
}
|
|
4219
|
-
function
|
|
4228
|
+
function z(W, I, $) {
|
|
4220
4229
|
!g.active || k || (p.scrollBody.useBaseFriction().useDuration(I === !0 ? 0 : g.duration), p.scrollTo.index(W, $ || 0));
|
|
4221
4230
|
}
|
|
4222
|
-
function
|
|
4231
|
+
function P(W) {
|
|
4223
4232
|
const I = p.index.add(1).get();
|
|
4224
|
-
|
|
4233
|
+
z(I, W, -1);
|
|
4225
4234
|
}
|
|
4226
4235
|
function M(W) {
|
|
4227
4236
|
const I = p.index.add(-1).get();
|
|
4228
|
-
|
|
4237
|
+
z(I, W, 1);
|
|
4229
4238
|
}
|
|
4230
4239
|
function V() {
|
|
4231
4240
|
return p.index.add(1).get() !== ee();
|
|
@@ -4273,17 +4282,17 @@ function ze(t, e, n) {
|
|
|
4273
4282
|
internalEngine: T,
|
|
4274
4283
|
destroy: O,
|
|
4275
4284
|
off: x,
|
|
4276
|
-
on:
|
|
4285
|
+
on: h,
|
|
4277
4286
|
emit: a,
|
|
4278
4287
|
plugins: ce,
|
|
4279
4288
|
previousScrollSnap: de,
|
|
4280
|
-
reInit:
|
|
4289
|
+
reInit: f,
|
|
4281
4290
|
rootNode: S,
|
|
4282
|
-
scrollNext:
|
|
4291
|
+
scrollNext: P,
|
|
4283
4292
|
scrollPrev: M,
|
|
4284
4293
|
scrollProgress: ie,
|
|
4285
4294
|
scrollSnapList: Q,
|
|
4286
|
-
scrollTo:
|
|
4295
|
+
scrollTo: z,
|
|
4287
4296
|
selectedScrollSnap: ee,
|
|
4288
4297
|
slideNodes: H,
|
|
4289
4298
|
slidesInView: ae,
|
|
@@ -4291,7 +4300,7 @@ function ze(t, e, n) {
|
|
|
4291
4300
|
};
|
|
4292
4301
|
return N(e, n), setTimeout(() => d.emit("init"), 0), X;
|
|
4293
4302
|
}
|
|
4294
|
-
|
|
4303
|
+
Pe.globalOptions = void 0;
|
|
4295
4304
|
function rt(t = {}, e = []) {
|
|
4296
4305
|
const n = Ye(t), s = Ye(e), [l, i] = oe(), [o, c] = oe(), d = se(() => {
|
|
4297
4306
|
l && l.reInit(n.current, s.current);
|
|
@@ -4302,8 +4311,8 @@ function rt(t = {}, e = []) {
|
|
|
4302
4311
|
vr(s.current, e) || (s.current = e, d());
|
|
4303
4312
|
}, [e, d]), Y(() => {
|
|
4304
4313
|
if (kr() && o) {
|
|
4305
|
-
|
|
4306
|
-
const u =
|
|
4314
|
+
Pe.globalOptions = rt.globalOptions;
|
|
4315
|
+
const u = Pe(o, n.current, s.current);
|
|
4307
4316
|
return i(u), () => u.destroy();
|
|
4308
4317
|
} else
|
|
4309
4318
|
i(void 0);
|
|
@@ -4341,28 +4350,28 @@ const Zr = "_carouselContainer_gu7c2_1", Xr = "_viewport_gu7c2_14", Jr = "_slide
|
|
|
4341
4350
|
}) => {
|
|
4342
4351
|
const { t: m } = Ee();
|
|
4343
4352
|
Y(() => {
|
|
4344
|
-
const
|
|
4345
|
-
if (typeof document > "u" || document.getElementById(
|
|
4346
|
-
const
|
|
4347
|
-
M.id =
|
|
4353
|
+
const z = "rk-carousel-inline-styles";
|
|
4354
|
+
if (typeof document > "u" || document.getElementById(z)) return;
|
|
4355
|
+
const P = ms(Z), M = document.createElement("style");
|
|
4356
|
+
M.id = z, M.textContent = P, document.head.appendChild(M);
|
|
4348
4357
|
}, []);
|
|
4349
|
-
const
|
|
4358
|
+
const h = {
|
|
4350
4359
|
loop: !0,
|
|
4351
4360
|
align: "start",
|
|
4352
4361
|
containScroll: "trimSnaps",
|
|
4353
4362
|
slidesToScroll: 1
|
|
4354
|
-
}, [x, a] = rt(
|
|
4363
|
+
}, [x, a] = rt(h), [f, k] = oe(0), [p, y] = oe([]), [g, L] = oe([]);
|
|
4355
4364
|
Y(() => {
|
|
4356
4365
|
L(new Array((t == null ? void 0 : t.length) || 0).fill(!1));
|
|
4357
4366
|
}, [t]);
|
|
4358
|
-
const D = se((
|
|
4359
|
-
L((
|
|
4360
|
-
const M = [...
|
|
4361
|
-
return M[
|
|
4367
|
+
const D = se((z) => {
|
|
4368
|
+
L((P) => {
|
|
4369
|
+
const M = [...P];
|
|
4370
|
+
return M[z] = !0, M;
|
|
4362
4371
|
});
|
|
4363
4372
|
}, []), w = Te(() => n * 1e3, [n]), C = se(() => {
|
|
4364
4373
|
a && k(a.selectedScrollSnap());
|
|
4365
|
-
}, [a]), A = se((
|
|
4374
|
+
}, [a]), A = se((z) => a && a.scrollTo(z), [a]), j = se(() => a && a.scrollPrev(), [a]), N = se(() => a && a.scrollNext(), [a]);
|
|
4366
4375
|
Y(() => {
|
|
4367
4376
|
if (a)
|
|
4368
4377
|
return a.on("select", C), a.on("reInit", C), y(a.scrollSnapList()), () => {
|
|
@@ -4372,11 +4381,11 @@ const Zr = "_carouselContainer_gu7c2_1", Xr = "_viewport_gu7c2_14", Jr = "_slide
|
|
|
4372
4381
|
a && (a.reInit(), y(a.scrollSnapList()));
|
|
4373
4382
|
}, [a, t, o, c]), Y(() => {
|
|
4374
4383
|
if (!e || !a || !t || t.length <= 1) return;
|
|
4375
|
-
const
|
|
4384
|
+
const z = window.setInterval(() => {
|
|
4376
4385
|
a.canScrollNext() && a.scrollNext();
|
|
4377
4386
|
}, w);
|
|
4378
4387
|
return () => {
|
|
4379
|
-
window.clearInterval(
|
|
4388
|
+
window.clearInterval(z);
|
|
4380
4389
|
};
|
|
4381
4390
|
}, [e, w, a, t]);
|
|
4382
4391
|
const B = Math.max(1, o), G = `${100 / B}%`, O = c / 2;
|
|
@@ -4396,7 +4405,7 @@ const Zr = "_carouselContainer_gu7c2_1", Xr = "_viewport_gu7c2_14", Jr = "_slide
|
|
|
4396
4405
|
marginLeft: `-${O}px`,
|
|
4397
4406
|
marginRight: `-${O}px`
|
|
4398
4407
|
},
|
|
4399
|
-
children: t && t.length > 0 ? t.map((
|
|
4408
|
+
children: t && t.length > 0 ? t.map((z, P) => /* @__PURE__ */ r(
|
|
4400
4409
|
"div",
|
|
4401
4410
|
{
|
|
4402
4411
|
className: Z.slide,
|
|
@@ -4409,24 +4418,24 @@ const Zr = "_carouselContainer_gu7c2_1", Xr = "_viewport_gu7c2_14", Jr = "_slide
|
|
|
4409
4418
|
// Ensure radius clips content
|
|
4410
4419
|
},
|
|
4411
4420
|
children: /* @__PURE__ */ _("div", { className: Z.slideInner, style: { borderRadius: `${d}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
4412
|
-
!g[
|
|
4421
|
+
!g[P] && /* @__PURE__ */ r("div", { className: Z.loaderOverlay, children: /* @__PURE__ */ r(us, { "aria-label": m("carousel.loading") }) }),
|
|
4413
4422
|
/* @__PURE__ */ r(
|
|
4414
4423
|
"img",
|
|
4415
4424
|
{
|
|
4416
|
-
className: `${Z.image} ${g[
|
|
4417
|
-
src:
|
|
4418
|
-
alt:
|
|
4419
|
-
loading:
|
|
4425
|
+
className: `${Z.image} ${g[P] ? Z.loaded : Z.loadingImage}`,
|
|
4426
|
+
src: z.src,
|
|
4427
|
+
alt: z.alt,
|
|
4428
|
+
loading: P < B ? "eager" : "lazy",
|
|
4420
4429
|
crossOrigin: "anonymous",
|
|
4421
|
-
onLoad: () => D(
|
|
4430
|
+
onLoad: () => D(P),
|
|
4422
4431
|
onError: (M) => {
|
|
4423
|
-
M.target.style.display = "none", D(
|
|
4432
|
+
M.target.style.display = "none", D(P);
|
|
4424
4433
|
}
|
|
4425
4434
|
}
|
|
4426
4435
|
)
|
|
4427
4436
|
] })
|
|
4428
4437
|
},
|
|
4429
|
-
`image-${
|
|
4438
|
+
`image-${P}-${z.src}`
|
|
4430
4439
|
)) : /* @__PURE__ */ r("div", { className: Z.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ r("div", { className: Z.empty, children: "Ingen bilder" }) })
|
|
4431
4440
|
}
|
|
4432
4441
|
) }),
|
|
@@ -4455,19 +4464,19 @@ const Zr = "_carouselContainer_gu7c2_1", Xr = "_viewport_gu7c2_14", Jr = "_slide
|
|
|
4455
4464
|
}
|
|
4456
4465
|
)
|
|
4457
4466
|
] }),
|
|
4458
|
-
l && t && t.length > 1 && /* @__PURE__ */ r("div", { className: Z.dots, role: "tablist", "aria-label": m("carousel.imagePosition"), children: p.map((
|
|
4459
|
-
const M =
|
|
4467
|
+
l && t && t.length > 1 && /* @__PURE__ */ r("div", { className: Z.dots, role: "tablist", "aria-label": m("carousel.imagePosition"), children: p.map((z, P) => {
|
|
4468
|
+
const M = P === f;
|
|
4460
4469
|
return /* @__PURE__ */ r(
|
|
4461
4470
|
"button",
|
|
4462
4471
|
{
|
|
4463
4472
|
type: "button",
|
|
4464
4473
|
className: `${Z.dot} ${M ? Z.dotActive : ""}`,
|
|
4465
|
-
onClick: () => A(
|
|
4466
|
-
"aria-label": `${m("carousel.goToImage")} ${
|
|
4474
|
+
onClick: () => A(P),
|
|
4475
|
+
"aria-label": `${m("carousel.goToImage")} ${P + 1}`,
|
|
4467
4476
|
"aria-selected": M,
|
|
4468
4477
|
role: "tab"
|
|
4469
4478
|
},
|
|
4470
|
-
`dot-${
|
|
4479
|
+
`dot-${P}`
|
|
4471
4480
|
);
|
|
4472
4481
|
}) })
|
|
4473
4482
|
] })
|
|
@@ -4648,30 +4657,30 @@ function ms(t) {
|
|
|
4648
4657
|
}
|
|
4649
4658
|
`;
|
|
4650
4659
|
}
|
|
4651
|
-
const pa = dn, ma = cn, ga = un, J = pn,
|
|
4660
|
+
const pa = dn, ma = cn, ga = un, J = pn, ha = mn, fa = gn, ka = hn, va = fn, ya = kn, ba = vn, xa = yn, Ta = bn, gs = xn, hs = Tn;
|
|
4652
4661
|
gs.displayName = "Field.Description";
|
|
4653
|
-
|
|
4654
|
-
const Sa = Dt,
|
|
4655
|
-
|
|
4662
|
+
hs.displayName = "Field.Counter";
|
|
4663
|
+
const Sa = Dt, fs = he((t, e) => /* @__PURE__ */ r(Sn, { ref: e, ...t }));
|
|
4664
|
+
fs.displayName = "Heading";
|
|
4656
4665
|
const ks = Cn;
|
|
4657
4666
|
ks.displayName = "Input";
|
|
4658
|
-
const vs =
|
|
4667
|
+
const vs = he((t, e) => /* @__PURE__ */ r(wn, { ref: e, ...t }));
|
|
4659
4668
|
vs.displayName = "Label";
|
|
4660
4669
|
const ue = In, Ca = Dn, ys = _n, wa = An, Ia = Mn, Da = Ln, _a = jn;
|
|
4661
4670
|
ys.displayName = "Pagination";
|
|
4662
|
-
const Je =
|
|
4671
|
+
const Je = he(
|
|
4663
4672
|
(t, e) => /* @__PURE__ */ r(En, { ref: e, ...t })
|
|
4664
4673
|
);
|
|
4665
4674
|
Je.displayName = "Paragraph";
|
|
4666
|
-
const Aa = Fn, Ma = Nn, La = Bn, Be = Object.assign(
|
|
4675
|
+
const Aa = Fn, Ma = Nn, La = Bn, Be = Object.assign(zn, {
|
|
4667
4676
|
Button: Rn,
|
|
4668
4677
|
ClearButton: $n,
|
|
4669
|
-
Input:
|
|
4678
|
+
Input: Pn
|
|
4670
4679
|
}), ja = Gn, Ea = Wn, Fa = Hn, bs = Un;
|
|
4671
4680
|
bs.displayName = "Suggestion";
|
|
4672
|
-
const Ke = On, Na = Vn, Ba = Kn,
|
|
4681
|
+
const Ke = On, Na = Vn, Ba = Kn, za = Yn, Pa = qn, $a = Zn, Ra = Xn, Ga = Jn, xs = he((t, e) => /* @__PURE__ */ r(Qn, { ref: e, ...t }));
|
|
4673
4682
|
xs.displayName = "ValidationMessage";
|
|
4674
|
-
const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOverlay_ymzss_40", ws = "_headerExtension_ymzss_45", Is = "_extensionContentWrapper_ymzss_73", Ds = "_extensionContent_ymzss_73", _s = "_extensionDivider_ymzss_100", As = "_languageLabel_ymzss_124", Ms = "_languageLink_ymzss_140", Ls = "_headerInner_ymzss_175", js = "_logoWrapper_ymzss_192", Es = "_logo_ymzss_192", Fs = "_secondaryLogoWrapper_ymzss_215", Ns = "_slotComponent_ymzss_224", Bs = "_slotContainer_ymzss_234",
|
|
4683
|
+
const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOverlay_ymzss_40", ws = "_headerExtension_ymzss_45", Is = "_extensionContentWrapper_ymzss_73", Ds = "_extensionContent_ymzss_73", _s = "_extensionDivider_ymzss_100", As = "_languageLabel_ymzss_124", Ms = "_languageLink_ymzss_140", Ls = "_headerInner_ymzss_175", js = "_logoWrapper_ymzss_192", Es = "_logo_ymzss_192", Fs = "_secondaryLogoWrapper_ymzss_215", Ns = "_slotComponent_ymzss_224", Bs = "_slotContainer_ymzss_234", zs = "_slotText_ymzss_242", Ps = "_secondaryLogo_ymzss_215", $s = "_redCrossLogo_ymzss_269", Rs = "_primaryLogo_ymzss_275", Gs = "_navItems_ymzss_279", Ws = "_navLink_ymzss_288", Hs = "_actions_ymzss_301", Us = "_ctaButton_ymzss_309", Os = "_themeToggle_ymzss_314", Vs = "_userInfo_ymzss_319", Ks = "_userName_ymzss_325", Ys = "_loginLink_ymzss_332", qs = "_loginText_ymzss_341", Zs = "_underline_ymzss_348", Xs = "_searchButtonWrapper_ymzss_354", Js = "_buttonText_ymzss_358", Qs = "_menuButton_ymzss_363", ei = "_menuOverlay_ymzss_368", ti = "_searchContent_ymzss_402", ni = "_menuContent_ymzss_412", oi = "_menuLeftColumn_ymzss_421", ri = "_menuRightColumn_ymzss_427", si = "_slotContent_ymzss_441", ii = "_navList_ymzss_454", ai = "_menuUtilities_ymzss_461", li = "_menuBrand_ymzss_468", di = "_suggestionsSection_ymzss_472", ci = "_suggestionsTitle_ymzss_478", ui = "_searchResults_ymzss_487", pi = "_resultList_ymzss_493", mi = "_resultItem_ymzss_499", gi = "_resultLink_ymzss_507", hi = "_suggestionIcon_ymzss_521", fi = "_suggestionText_ymzss_534", ki = "_highlightedText_ymzss_541", vi = "_remainingText_ymzss_546", yi = "_viewAllLink_ymzss_559", bi = "_noResults_ymzss_594", b = {
|
|
4675
4684
|
header: Ts,
|
|
4676
4685
|
languageSwitch: Ss,
|
|
4677
4686
|
searchOverlay: Cs,
|
|
@@ -4687,8 +4696,8 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4687
4696
|
secondaryLogoWrapper: Fs,
|
|
4688
4697
|
slotComponent: Ns,
|
|
4689
4698
|
slotContainer: Bs,
|
|
4690
|
-
slotText:
|
|
4691
|
-
secondaryLogo:
|
|
4699
|
+
slotText: zs,
|
|
4700
|
+
secondaryLogo: Ps,
|
|
4692
4701
|
redCrossLogo: $s,
|
|
4693
4702
|
primaryLogo: Rs,
|
|
4694
4703
|
navItems: Gs,
|
|
@@ -4719,8 +4728,8 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4719
4728
|
resultList: pi,
|
|
4720
4729
|
resultItem: mi,
|
|
4721
4730
|
resultLink: gi,
|
|
4722
|
-
suggestionIcon:
|
|
4723
|
-
suggestionText:
|
|
4731
|
+
suggestionIcon: hi,
|
|
4732
|
+
suggestionText: fi,
|
|
4724
4733
|
highlightedText: ki,
|
|
4725
4734
|
remainingText: vi,
|
|
4726
4735
|
viewAllLink: yi,
|
|
@@ -4801,10 +4810,10 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4801
4810
|
ctaIcon: u = /* @__PURE__ */ r(lo, { "aria-hidden": !0 }),
|
|
4802
4811
|
onCtaClick: v,
|
|
4803
4812
|
showThemeToggle: m = !1,
|
|
4804
|
-
secondaryLogo:
|
|
4813
|
+
secondaryLogo: h = !1,
|
|
4805
4814
|
secondaryLogoSrc: x,
|
|
4806
4815
|
secondaryLogoSrcDark: a,
|
|
4807
|
-
secondaryLogoAlt:
|
|
4816
|
+
secondaryLogoAlt: f = "Secondary Logo",
|
|
4808
4817
|
navItems: k,
|
|
4809
4818
|
showNavItems: p = !0,
|
|
4810
4819
|
showMenuButton: y = !0,
|
|
@@ -4812,7 +4821,7 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4812
4821
|
showModeToggle: L = !1,
|
|
4813
4822
|
showLanguageSwitch: D = !1
|
|
4814
4823
|
}) => {
|
|
4815
|
-
const [w, C] = oe(!1), [A, j] = oe(!1), [N, B] = oe(""), [G, O] = oe("light"), { language:
|
|
4824
|
+
const [w, C] = oe(!1), [A, j] = oe(!1), [N, B] = oe(""), [G, O] = oe("light"), { language: z, setLanguage: P, t: M } = Ee(), [V, te] = oe(!1);
|
|
4816
4825
|
Y(() => {
|
|
4817
4826
|
const T = "rk-header-inline-styles";
|
|
4818
4827
|
if (typeof document > "u" || document.getElementById(T)) return;
|
|
@@ -4948,9 +4957,9 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4948
4957
|
"aria-label": M("header.selectLanguage"),
|
|
4949
4958
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4950
4959
|
children: [
|
|
4951
|
-
|
|
4960
|
+
z,
|
|
4952
4961
|
" ",
|
|
4953
|
-
/* @__PURE__ */ r(
|
|
4962
|
+
/* @__PURE__ */ r(ht, { "aria-hidden": !0 })
|
|
4954
4963
|
]
|
|
4955
4964
|
}
|
|
4956
4965
|
),
|
|
@@ -4960,8 +4969,8 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4960
4969
|
"data-color-scheme": G,
|
|
4961
4970
|
placement: "bottom-end",
|
|
4962
4971
|
children: /* @__PURE__ */ _(J.List, { children: [
|
|
4963
|
-
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () =>
|
|
4964
|
-
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () =>
|
|
4972
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("NO"), children: "Norsk (NO)" }) }),
|
|
4973
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("EN"), children: "English (EN)" }) })
|
|
4965
4974
|
] })
|
|
4966
4975
|
}
|
|
4967
4976
|
)
|
|
@@ -4980,14 +4989,14 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
4980
4989
|
children: /* @__PURE__ */ r(Q, {})
|
|
4981
4990
|
}
|
|
4982
4991
|
),
|
|
4983
|
-
/* @__PURE__ */ r("div", { className: b.secondaryLogoWrapper, children:
|
|
4992
|
+
/* @__PURE__ */ r("div", { className: b.secondaryLogoWrapper, children: h && x ? /* @__PURE__ */ r(
|
|
4984
4993
|
"img",
|
|
4985
4994
|
{
|
|
4986
4995
|
src: G === "dark" && a ? a : x,
|
|
4987
|
-
alt:
|
|
4996
|
+
alt: f,
|
|
4988
4997
|
className: b.secondaryLogo
|
|
4989
4998
|
}
|
|
4990
|
-
) :
|
|
4999
|
+
) : h ? /* @__PURE__ */ r("div", { className: b.slotComponent, children: /* @__PURE__ */ r("div", { className: b.slotContainer, children: /* @__PURE__ */ r("p", { className: b.slotText, children: "SLOT" }) }) }) : null })
|
|
4991
5000
|
] }),
|
|
4992
5001
|
p && k && k.length > 0 && !V && /* @__PURE__ */ r("nav", { className: b.navItems, children: k.map((T, S) => /* @__PURE__ */ r(
|
|
4993
5002
|
ue,
|
|
@@ -5042,7 +5051,7 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
5042
5051
|
"aria-expanded": A,
|
|
5043
5052
|
"aria-label": M(A ? "header.closeSearch" : "header.openSearch"),
|
|
5044
5053
|
children: [
|
|
5045
|
-
A ? /* @__PURE__ */ r(
|
|
5054
|
+
A ? /* @__PURE__ */ r(ft, { "aria-hidden": !0 }) : /* @__PURE__ */ r(kt, { "aria-hidden": !0 }),
|
|
5046
5055
|
/* @__PURE__ */ r("span", { className: b.buttonText, children: M(A ? "header.close" : "header.search") })
|
|
5047
5056
|
]
|
|
5048
5057
|
}
|
|
@@ -5058,7 +5067,7 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
5058
5067
|
"aria-label": M(w ? "header.closeMenu" : "header.openMenu"),
|
|
5059
5068
|
className: b.menuButton,
|
|
5060
5069
|
children: [
|
|
5061
|
-
w ? /* @__PURE__ */ r(
|
|
5070
|
+
w ? /* @__PURE__ */ r(ft, { "aria-hidden": !0 }) : /* @__PURE__ */ r(ao, { "aria-hidden": !0 }),
|
|
5062
5071
|
/* @__PURE__ */ r("span", { className: b.buttonText, children: M(w ? "header.close" : "header.menu") })
|
|
5063
5072
|
]
|
|
5064
5073
|
}
|
|
@@ -5079,9 +5088,9 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
5079
5088
|
"aria-label": M("header.selectLanguage"),
|
|
5080
5089
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
5081
5090
|
children: [
|
|
5082
|
-
|
|
5091
|
+
z,
|
|
5083
5092
|
" ",
|
|
5084
|
-
/* @__PURE__ */ r(
|
|
5093
|
+
/* @__PURE__ */ r(ht, { "aria-hidden": !0 })
|
|
5085
5094
|
]
|
|
5086
5095
|
}
|
|
5087
5096
|
),
|
|
@@ -5091,8 +5100,8 @@ const Ts = "_header_ymzss_1", Ss = "_languageSwitch_ymzss_36", Cs = "_searchOver
|
|
|
5091
5100
|
"data-color-scheme": G,
|
|
5092
5101
|
placement: "bottom-start",
|
|
5093
5102
|
children: /* @__PURE__ */ _(J.List, { children: [
|
|
5094
|
-
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () =>
|
|
5095
|
-
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () =>
|
|
5103
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("NO"), children: "Norsk (NO)" }) }),
|
|
5104
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("EN"), children: "English (EN)" }) })
|
|
5096
5105
|
] })
|
|
5097
5106
|
}
|
|
5098
5107
|
)
|
|
@@ -5332,7 +5341,7 @@ function Ti(t) {
|
|
|
5332
5341
|
}
|
|
5333
5342
|
`;
|
|
5334
5343
|
}
|
|
5335
|
-
const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6xhfo_26", Ii = "_shortcutsSection_6xhfo_35", Di = "_shortcutsColumn_6xhfo_43", _i = "_shortcutsTitle_6xhfo_51", Ai = "_shortcutsList_6xhfo_60", Mi = "_shortcutLink_6xhfo_69", Li = "_slotComponent_6xhfo_92", ji = "_divider_6xhfo_131", Ei = "_contactSection_6xhfo_139", Fi = "_contactColumn_6xhfo_146", Ni = "_contactTitle_6xhfo_154", Bi = "_contactContent_6xhfo_163",
|
|
5344
|
+
const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6xhfo_26", Ii = "_shortcutsSection_6xhfo_35", Di = "_shortcutsColumn_6xhfo_43", _i = "_shortcutsTitle_6xhfo_51", Ai = "_shortcutsList_6xhfo_60", Mi = "_shortcutLink_6xhfo_69", Li = "_slotComponent_6xhfo_92", ji = "_divider_6xhfo_131", Ei = "_contactSection_6xhfo_139", Fi = "_contactColumn_6xhfo_146", Ni = "_contactTitle_6xhfo_154", Bi = "_contactContent_6xhfo_163", zi = "_legalSection_6xhfo_177", Pi = "_copyrightText_6xhfo_184", $i = "_legalLinks_6xhfo_193", Ri = "_legalLink_6xhfo_193", Gi = "_whiteSection_6xhfo_223", Wi = "_whiteContainer_6xhfo_228", Hi = "_whiteContent_6xhfo_241", Ui = "_logo_6xhfo_248", Oi = "_redCrossLogo_6xhfo_265", Vi = "_secondaryLogoWrapper_6xhfo_271", Ki = "_designSystemLogo_6xhfo_278", Yi = "_slotSmall_6xhfo_285", qi = "_slotLarge_6xhfo_296", F = {
|
|
5336
5345
|
footer: Si,
|
|
5337
5346
|
redSection: Ci,
|
|
5338
5347
|
redContainer: wi,
|
|
@@ -5347,8 +5356,8 @@ const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6x
|
|
|
5347
5356
|
contactColumn: Fi,
|
|
5348
5357
|
contactTitle: Ni,
|
|
5349
5358
|
contactContent: Bi,
|
|
5350
|
-
legalSection:
|
|
5351
|
-
copyrightText:
|
|
5359
|
+
legalSection: zi,
|
|
5360
|
+
copyrightText: Pi,
|
|
5352
5361
|
legalLinks: $i,
|
|
5353
5362
|
legalLink: Ri,
|
|
5354
5363
|
whiteSection: Gi,
|
|
@@ -5373,17 +5382,17 @@ const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6x
|
|
|
5373
5382
|
secondaryLogoSrcDark: u,
|
|
5374
5383
|
secondaryLogoAlt: v = "Designsystem Logo",
|
|
5375
5384
|
shortcutsLinksLeft: m,
|
|
5376
|
-
shortcutsLinksRight:
|
|
5385
|
+
shortcutsLinksRight: h
|
|
5377
5386
|
} = {}) => {
|
|
5378
5387
|
const x = (/* @__PURE__ */ new Date()).getFullYear(), { t: a } = Ee();
|
|
5379
|
-
|
|
5388
|
+
ze.useEffect(() => {
|
|
5380
5389
|
const D = "rk-footer-inline-styles";
|
|
5381
5390
|
if (typeof document > "u" || document.getElementById(D)) return;
|
|
5382
5391
|
const w = Zi(F), C = document.createElement("style");
|
|
5383
5392
|
C.id = D, C.textContent = w, document.head.appendChild(C);
|
|
5384
5393
|
}, []);
|
|
5385
|
-
const [
|
|
5386
|
-
|
|
5394
|
+
const [f, k] = ze.useState("light");
|
|
5395
|
+
ze.useEffect(() => {
|
|
5387
5396
|
if (typeof document > "u") return;
|
|
5388
5397
|
const D = document.documentElement, w = D.getAttribute("data-color-scheme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
5389
5398
|
k(w);
|
|
@@ -5426,7 +5435,7 @@ const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6x
|
|
|
5426
5435
|
{ label: a("footer.shortcutsLinks.about"), href: "#" },
|
|
5427
5436
|
{ label: a("footer.shortcutsLinks.support"), href: "#" },
|
|
5428
5437
|
{ label: a("footer.shortcutsLinks.contact"), href: "#" }
|
|
5429
|
-
], g = m || y, L =
|
|
5438
|
+
], g = m || y, L = h || y;
|
|
5430
5439
|
return /* @__PURE__ */ _("footer", { className: F.footer, "data-color": t, children: [
|
|
5431
5440
|
/* @__PURE__ */ r("div", { className: F.redSection, children: /* @__PURE__ */ _("div", { className: F.redContainer, children: [
|
|
5432
5441
|
/* @__PURE__ */ _("div", { className: F.shortcutsSection, children: [
|
|
@@ -5487,7 +5496,7 @@ const Si = "_footer_6xhfo_1", Ci = "_redSection_6xhfo_7", wi = "_redContainer_6x
|
|
|
5487
5496
|
c && d && /* @__PURE__ */ r("div", { className: F.secondaryLogoWrapper, children: /* @__PURE__ */ r(
|
|
5488
5497
|
"img",
|
|
5489
5498
|
{
|
|
5490
|
-
src:
|
|
5499
|
+
src: f === "dark" && u ? u : d,
|
|
5491
5500
|
alt: v,
|
|
5492
5501
|
className: F.designSystemLogo,
|
|
5493
5502
|
loading: "lazy"
|
|
@@ -5785,16 +5794,16 @@ export {
|
|
|
5785
5794
|
ka as DropdownHeading,
|
|
5786
5795
|
ya as DropdownItem,
|
|
5787
5796
|
va as DropdownList,
|
|
5788
|
-
|
|
5789
|
-
|
|
5797
|
+
ha as DropdownTrigger,
|
|
5798
|
+
fa as DropdownTriggerContext,
|
|
5790
5799
|
xa as ErrorSummary,
|
|
5791
5800
|
Ta as Field,
|
|
5792
|
-
|
|
5801
|
+
hs as FieldCounter,
|
|
5793
5802
|
gs as FieldDescription,
|
|
5794
5803
|
Sa as Fieldset,
|
|
5795
5804
|
Ha as Footer,
|
|
5796
5805
|
Wa as Header,
|
|
5797
|
-
|
|
5806
|
+
fs as Heading,
|
|
5798
5807
|
ks as Input,
|
|
5799
5808
|
vs as Label,
|
|
5800
5809
|
ca as LanguageProvider,
|
|
@@ -5816,8 +5825,8 @@ export {
|
|
|
5816
5825
|
Ke as Switch,
|
|
5817
5826
|
Na as Table,
|
|
5818
5827
|
Ba as Tabs,
|
|
5819
|
-
|
|
5820
|
-
|
|
5828
|
+
za as Tag,
|
|
5829
|
+
Pa as Textarea,
|
|
5821
5830
|
$a as Textfield,
|
|
5822
5831
|
Ra as ToggleGroup,
|
|
5823
5832
|
Ga as Tooltip,
|