@mattilsynet/design 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,9 @@ export type FieldOptionProps = React.ComponentPropsWithoutRef<"option">;
29
29
  export type FieldComboboxProps = ReactUcombobox & {
30
30
  "data-multiple"?: boolean;
31
31
  "data-creatable"?: boolean;
32
+ onAfterChange?: (e: CustomEvent<HTMLDataElement>) => void;
33
+ onBeforeChange?: (e: CustomEvent<HTMLDataElement>) => void;
34
+ onBeforeMatch?: (e: CustomEvent<HTMLOptionElement>) => void;
32
35
  };
33
36
  export declare const Field: FieldComponent & {
34
37
  Affixes: React.ForwardRefExoticComponent<Omit<FieldProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -32,66 +32,75 @@ import "../togglegroup/togglegroup.js";
32
32
  import "../typography/typography.js";
33
33
  import "../validation/validation.js";
34
34
  import m from "../styles.module.css.js";
35
- import { toCustomElementProps as c } from "../utils.js";
35
+ import { toCustomElementProps as u } from "../utils.js";
36
36
  const E = p(function({
37
- "data-size": o,
38
- as: t,
39
- className: a,
40
- count: f,
41
- description: u,
37
+ "data-size": t,
38
+ as: o,
39
+ className: n,
40
+ count: l,
41
+ description: s,
42
42
  error: j,
43
43
  helpText: b,
44
44
  helpTextLabel: y,
45
45
  label: h,
46
46
  options: A,
47
- prefix: l,
47
+ prefix: c,
48
48
  style: D,
49
- suffix: s,
49
+ suffix: d,
50
50
  validation: H,
51
- ...n
52
- }, d) {
53
- const F = t || "div", z = !!s || !!l, x = H || j, g = {
54
- "data-size": o,
55
- className: N(m.field, a),
51
+ ...e
52
+ }, f) {
53
+ const F = o || "div", z = !!d || !!c, g = H || j, x = {
54
+ "data-size": t,
55
+ className: N(m.field, n),
56
56
  style: D
57
57
  };
58
- return t === "select" && !n.children && Object.assign(n, {
58
+ return o === "select" && !e.children && Object.assign(e, {
59
59
  children: /* @__PURE__ */ i(W, { children: A?.map((r) => typeof r == "string" ? { label: r, value: r } : r).map(({ label: r, value: v }) => /* @__PURE__ */ i("option", { value: v, children: r }, v)) })
60
- }), t ? /* @__PURE__ */ C("div", { ...g, children: [
60
+ }), o ? /* @__PURE__ */ C("div", { ...x, children: [
61
61
  !!h && /* @__PURE__ */ i("label", { suppressHydrationWarning: !0, children: h }),
62
62
  !!b && /* @__PURE__ */ i(w, { "aria-label": y, children: b }),
63
- !!u && /* @__PURE__ */ i("p", { children: u }),
63
+ !!s && /* @__PURE__ */ i("p", { children: s }),
64
64
  z ? /* @__PURE__ */ C(O, { children: [
65
- !!l && /* @__PURE__ */ i("span", { children: l }),
66
- /* @__PURE__ */ i(F, { className: m.input, ref: d, ...n }),
67
- !!s && /* @__PURE__ */ i("span", { children: s })
65
+ !!c && /* @__PURE__ */ i("span", { children: c }),
66
+ /* @__PURE__ */ i(F, { className: m.input, ref: f, ...e }),
67
+ !!d && /* @__PURE__ */ i("span", { children: d })
68
68
  ] }) : /* @__PURE__ */ i(
69
69
  F,
70
70
  {
71
71
  className: m.input,
72
72
  suppressHydrationWarning: !0,
73
- ref: d,
74
- ...n
73
+ ref: f,
74
+ ...e
75
75
  }
76
76
  ),
77
- !!x && /* @__PURE__ */ i("div", { className: m.validation, children: x }),
78
- !!f && /* @__PURE__ */ i("p", { "data-count": f })
79
- ] }) : /* @__PURE__ */ i("div", { ref: d, ...g, ...n });
77
+ !!g && /* @__PURE__ */ i("div", { className: m.validation, children: g }),
78
+ !!l && /* @__PURE__ */ i("p", { "data-count": l })
79
+ ] }) : /* @__PURE__ */ i("div", { ref: f, ...x, ...e });
80
80
  }), O = p(
81
- function({ className: o, ...t }, a) {
82
- return /* @__PURE__ */ i("div", { className: N(m.affixes, o), ref: a, ...t });
81
+ function({ className: t, ...o }, n) {
82
+ return /* @__PURE__ */ i("div", { className: N(m.affixes, t), ref: n, ...o });
83
83
  }
84
84
  ), P = p(
85
- function(o, t) {
86
- return /* @__PURE__ */ i("u-datalist", { ref: t, ...c(o) });
85
+ function(t, o) {
86
+ return /* @__PURE__ */ i("u-datalist", { ref: o, ...u(t) });
87
87
  }
88
88
  ), R = p(
89
- function(o, t) {
90
- return /* @__PURE__ */ i("u-option", { ref: t, ...c(o) });
89
+ function(t, o) {
90
+ return /* @__PURE__ */ i("u-option", { ref: o, ...u(t) });
91
91
  }
92
92
  ), T = p(
93
- function(o, t) {
94
- return /* @__PURE__ */ i("u-combobox", { ref: t, ...c(o) });
93
+ function({ onAfterChange: t, onBeforeChange: o, onBeforeMatch: n, ...l }, s) {
94
+ return /* @__PURE__ */ i(
95
+ "u-combobox",
96
+ {
97
+ ref: s,
98
+ onafterchange: t,
99
+ onbeforechange: o,
100
+ onbeforematch: n,
101
+ ...u(l)
102
+ }
103
+ );
95
104
  }
96
105
  ), Fi = Object.assign(E, {
97
106
  Affixes: O,
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport { HelpText } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { type AnchorPosition, toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: Array<string | { label: string; value: string }>;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\toptions,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{options\n\t\t\t\t\t\t?.map((o) => (typeof o === \"string\" ? { label: o, value: o } : o))\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag className={styles.input} ref={ref} {...rest} />\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && <div className={styles.validation}>{valid}</div>}\n\t\t\t{!!count && <p data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n\t\"data-position\"?: AnchorPosition;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist(props, ref) {\n\t\treturn <u-datalist ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\n\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-multiple\"?: boolean;\n\t\"data-creatable\"?: boolean;\n};\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(props, ref) {\n\t\treturn <u-combobox ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n});\n"],"names":["FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","options","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","jsx","Fragment","o","value","jsxs","HelpText","FieldAffixes","FieldDatalist","props","toCustomElementProps","FieldOption","FieldCombobox","Field"],"mappings":"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"}
1
+ {"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport { HelpText } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { type AnchorPosition, toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: Array<string | { label: string; value: string }>;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\toptions,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{options\n\t\t\t\t\t\t?.map((o) => (typeof o === \"string\" ? { label: o, value: o } : o))\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag className={styles.input} ref={ref} {...rest} />\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && <div className={styles.validation}>{valid}</div>}\n\t\t\t{!!count && <p data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n\t\"data-position\"?: AnchorPosition;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist(props, ref) {\n\t\treturn <u-datalist ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\n\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-multiple\"?: boolean;\n\t\"data-creatable\"?: boolean;\n\tonAfterChange?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonBeforeChange?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonBeforeMatch?: (e: CustomEvent<HTMLOptionElement>) => void; // Custom event to handle before change\n};\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(\n\t\t{ onAfterChange, onBeforeChange, onBeforeMatch, ...props },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<u-combobox\n\t\t\t\tref={ref}\n\t\t\t\t/* @ts-expect-error React 19 supports custom events out of the box */\n\t\t\t\tonafterchange={onAfterChange}\n\t\t\t\tonbeforechange={onBeforeChange}\n\t\t\t\tonbeforematch={onBeforeMatch}\n\t\t\t\t{...toCustomElementProps(props)}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n});\n"],"names":["FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","options","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","jsx","Fragment","o","value","jsxs","HelpText","FieldAffixes","FieldDatalist","props","toCustomElementProps","FieldOption","FieldCombobox","onAfterChange","onBeforeChange","onBeforeMatch","Field"],"mappings":"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"}
@@ -5,7 +5,7 @@ var mtds=function($){"use strict";var Et=typeof window<"u"&&typeof window.docume
5
5
  ::slotted(del) { text-decoration: none }
6
6
  ::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
7
7
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto }
8
- ::slotted(data:focus) { ${xn} }`))}static get observedAttributes(){return Object.keys(dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Ln(this),at(this,ve,this,!0),Ct(this,{attributeFilter:["value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ft,0,this),setTimeout(pt,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];dt[n]&&(this._texts[n]=o||dt[n])}disconnectedCallback(){Ct(this,!1),kn(this,ve,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Rn(this),t.type==="click"&&Un(this,t),t.type==="focus"&&Hn(this,t),t.type==="input"&&qn(this,t),t.type==="keydown"&&Fn(this,t),t.type==="mousedown"&&Lt(t),t.type==="mutation"&&ft(this,t)}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:ct)!==ct}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:ct)!==ct}set creatable(t){f(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector("u-datalist,datalist")),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const o=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},At=t=>t instanceof HTMLDataElement,ft=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:a,control:r,list:d,multiple:l}=t;let h=`${O((o=r?.labels)==null?void 0:o[0])}, ${l?a.length?s.found.replace("%d",`${a.length}`):s.empty:""}`;const u=[];for(const{addedNodes:_,removedNodes:I}of e?.detail||[]){for(const m of _)At(m)&&u.unshift(m);for(const m of I)At(m)&&u.push(m)}const T=l?u.length===1:u[0]===i;if(i&&r&&T){const _=f(r,"inputmode"),I=At(i)?r:i;t._speak=`${s[u[0].isConnected?"added":"removed"]} ${O(u[0])}, `,(Nn||i===r)&&kt(t._speak),r!==I&&(f(r,"aria-expanded",null),f(r,"inputmode","none"),h=" ",r.focus()),setTimeout(()=>{var m;f(r,"aria-expanded","true"),f(r,"inputmode",_),(m=I?.focus)==null||m.call(I),t._speak="",Dn?at(t,"blur",()=>ft(t),_e):setTimeout(ft,100,t)},100)}let w=0;const k=t.querySelector("select");for(const _ of a){const I=k?.options[w],m=O(_),A=_.value||m,te=`${t._speak}${m}, ${s.remove}, ${++w} ${s.of} ${a.length}`;f(_,"role","button"),f(_,"value",A),f(_,"tabindex","-1"),f(_,"aria-label",te),I?Object.assign(I,{textContent:m,value:A}):k?.appendChild(new Option(m,A,!0,!0))}k&&f(k,"multiple",l?"":null);for(const _ of[...k?.options||[]].slice(w))_.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),d&&f(d,"aria-multiselectable",`${l}`),r&&f(r,"list",Mn(d)),r&&f(r,"aria-label",`${t._speak}${h}`);const J=O(a[0]);J!==t._itemText&&pt(t,!1),t._itemText=J,ge(t),ye(t),(n=Ct(t))==null||n.takeRecords()},ge=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value))},ye=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const a=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(a)?"":null)}},pt=(t,e=!0)=>{const{multiple:o,control:n,items:i}=t,s=O(i[0]);if(!(o||!n||s===n.value)){if(e)return be(n,s,"insertText");n.value=s}},Mt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:a,items:r,multiple:d}=t,l=((o=a?.value)==null?void 0:o.trim())||"",h=l.toLowerCase()||null;let u=[...i].find(w=>(f(w,"label")||O(w)).trim().toLowerCase()===h);const T={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("beforematch",T))||(u=[...i].find(w=>w.selected)),e)return ye(t),u?q(t,u,!1):s&&l?q(t,{value:l},!1):(!d&&r[0]?q(t,r[0]):pt(t),kt(n.invalid));for(const w of i)w.selected=w===u},q=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,a=lt("data",e.label||e.value,{value:e.value}),r=[...i].find(h=>h.value===e.value),d={bubbles:!0,cancelable:!0,detail:r||a};if(r&&!o)return pt(t);if(t.dispatchEvent(new CustomEvent("beforechange",d))){if(!s)for(const h of[...i])h.remove();r?r.remove():n?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("afterchange",d))}},Hn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),kt()},Rn=t=>Lt()||setTimeout(Bn,0,t),Bn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Mt(t),t._focus=void 0)},Un=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:a,items:r}=t;if(s?.contains(i))return a&&be(a,"","deleteContentBackward"),a?.focus();for(const d of r){const{top:l,right:h,bottom:u,left:T}=d.getBoundingClientRect();if(d.contains(i))return q(t,d);if(n>=l&&n<=u&&o>=T&&o<=h)return d.focus()}i===t&&a?.focus()},qn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const d of n)if(d.value&&d.value===a)return q(t,d,s)}else s||Mt(t,!1);ge(t)},Fn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:a,repeat:r,target:d}=e,l=i&&i===d,h=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(d);if(l&&a==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),at(n,"blur",()=>f(n,"tabindex",null),_e)),!(!l&&In(e)||u===-1)){if(a==="ArrowRight"&&!l)u+=1;else if(a==="ArrowLeft"&&!h)u-=1;else if(a==="Enter"&&l){const T=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",T)),Mt(t)}else if((a==="Backspace"||a==="Delete")&&!h){if(e.preventDefault(),!r&&s[u])return q(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,u)]||i)==null||o.focus()}};On.define("u-combobox",ut);const Vn="1.3.7",E={capture:!0,passive:!0},K=typeof window<"u"&&typeof document<"u";function Yn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let jn=0;const Kn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function Ot(t){return t.id||(t.id=`${Kn}${++jn}`),t.id}const Wn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Wn("add",t,e),W=K?document.createElement("div"):null,ht=new Map,Xn=()=>{for(const[t,e]of ht)e()};W&&(W.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Xn,E));const F={top:0,right:1,bottom:2,left:3};function P(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return ht.delete(t);W?.isConnected||document.body.append(W||""),ht.has(t)||ht.set(t,()=>P(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:a,offsetHeight:r}=t,d=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:h,height:u,left:T,top:w}=e.getBoundingClientRect(),k=window.visualViewport?.width||window.innerWidth,J=window.visualViewport?.height||window.innerHeight,_=window.pageXOffset||document.documentElement.scrollLeft,I=window.pageYOffset||document.documentElement.scrollTop,m=Math.round(T-(d-h)/2),A=Math.round(w-(l-u)/2),te=Math.min(Math.max(10,m-(a-d)/2),k-a-10),as=Math.min(Math.max(10,A-(r-l)/2),J-r-10),rs=m-a>0,ls=m+d+a<k,cs=A-r>0,ds=A+l+r<J,un=i===F.top||i===F.bottom,us=i===F.right&&(n||ls)||!rs,fn=i===F.bottom&&(n||ds)||!cs,fs=Math.round(un?te:us?m+d:m-a),ps=Math.round(un?fn?A+l:A-r:as);t.style.position="absolute",t.style.left=`${fs+_}px`,t.style.top=`${ps+I}px`,W?.style.setProperty("translate",`0px ${Math.round(fn?_+A+l+r+30:0)}px`)}function we(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Pt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Pt.get(t)||[];i.length||(Pt.set(t,i),we((s,a)=>{if(t.isConnected&&i?.length)for(const r of i)r();else a?.disconnect(),Pt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},x=t=>{if(!K)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Dt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Ee="mattilsynet.matomo.cloud";let Nt=!0;function Gn(t,e={}){if(K){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Ee}/matomo.php`]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${Ee}/matomo.js`}))),t==="init"){const{matomoId:o,enabled:n=!0}=e;Nt=n,window._paq.push(["setSiteId",o])}if(Nt==="debug")return console.info(`Analytics: "${t}"`,e);if(!(Nt===!1||window.location.hostname==="localhost"))if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:s}=e,a=["trackEvent",o,n,i,s];window._paq.push(a.filter(r=>r!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const zn=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&s<e&&a.splice(-2,2,0,e),a},Qn=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:zn(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),$e="_alert_1bf95_1 _ds-alert_uxa1f_1",Se="_app_1bf95_1",Te="_sticky_1bf95_1",xe="_avatar_1bf95_1 _ds-avatar_uxa1f_1",Ce="_badge_1bf95_1",ke="_breadcrumbs_1bf95_1 _ds-breadcrumbs_uxa1f_1",Ie="_button_1bf95_1 _ds-button_uxa1f_1",Le="_card_1bf95_1",Ae="_group_1bf95_1",Me="_chip_1bf95_1 _ds-chip_uxa1f_1",Oe="_details_1bf95_1 _ds-details_uxa1f_1",Pe="_dialog_1bf95_1 _ds-dialog_uxa1f_1",De="_divider_1bf95_1",Ne="_errorsummary_1bf95_1 _ds-error-summary_uxa1f_1",He="__errorsummary_1bf95_1",Re="_field_1bf95_1 _ds-field_uxa1f_1",Be="__datalist_1bf95_1",Ue="_affixes_1bf95_1 _ds-field-affixes_uxa1f_1",qe="_fieldset_1bf95_1 _ds-fieldset_uxa1f_1",Fe="_heading_1bf95_1 _ds-heading_uxa1f_1",Ve="_ingress_1bf95_1",Ye="_muted_1bf95_1",je="_info_1bf95_1",Ke="_prose_1bf95_1",We="_helptext_1bf95_1 _ds-focus_uxa1f_1",Xe="_input_1bf95_1 _ds-input_uxa1f_1",Ge="_grid_1bf95_1",ze="_flex_1bf95_1",Qe="_link_1bf95_1",Je="_logo_1bf95_1",Ze="_pagination_1bf95_1 _ds-pagination_uxa1f_1",to="_popover_1bf95_1",eo="_progress_1bf95_1",oo="__indeterminate_1bf95_1",no="_skeleton_1bf95_1 _ds-skeleton_uxa1f_1",io="__skeleton_1bf95_1",so="_spinner_1bf95_1",ao="_steps_1bf95_1",ro="_table_1bf95_1 _ds-table_uxa1f_1",lo="__scrollShadow_1bf95_1",co="_tabs_1bf95_1 _ds-tabs_uxa1f_1",uo="__scrollMask_1bf95_1",fo="_tag_1bf95_1 _ds-tag_uxa1f_1",po="_togglegroup_1bf95_1",ho="__tooltip_1bf95_1",mo="_validation_1bf95_1 _ds-validation-message_uxa1f_1",bo="_body_1bf95_153",vo="__checked_1bf95_1",v={alert:$e,app:Se,sticky:Te,avatar:xe,badge:Ce,breadcrumbs:ke,button:Ie,card:Le,group:Ae,chip:Me,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,_errorsummary:He,field:Re,_datalist:Be,affixes:Ue,fieldset:qe,heading:Fe,ingress:Ve,muted:Ye,info:je,prose:Ke,helptext:We,input:Xe,grid:Ge,flex:ze,link:Qe,logo:Je,pagination:Ze,popover:to,progress:eo,_indeterminate:oo,skeleton:no,_skeleton:io,spinner:so,steps:ao,table:ro,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:ho,validation:mo,body:bo,_checked:vo},Jn=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Be,_errorsummary:He,_indeterminate:oo,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:ho,affixes:Ue,alert:$e,app:Se,avatar:xe,badge:Ce,body:bo,breadcrumbs:ke,button:Ie,card:Le,chip:Me,default:v,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,field:Re,fieldset:qe,flex:ze,grid:Ge,group:Ae,heading:Fe,helptext:We,info:je,ingress:Ve,input:Xe,link:Qe,logo:Je,muted:Ye,pagination:Ze,popover:to,progress:eo,prose:Ke,skeleton:no,spinner:so,steps:ao,sticky:Te,table:ro,tabs:co,tag:fo,togglegroup:po,validation:mo},Symbol.toStringTag,{value:"Module"}));typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const _o=v.app.split(" ")[0],Zn=v.sticky.split(" ")[0],ti='[data-command="toggle-app-expanded"]',go=`.${_o} > dialog,.${_o} dialog ~ main`,yo=t=>{document.startViewTransition?document.startViewTransition(t):t()},wo=t=>yo(()=>window.mtdsToggleAppExpanded?.(t));function ei({target:t,defaultPrevented:e}){if(!(e||!(t instanceof HTMLButtonElement)||!t.matches(ti))){if(getComputedStyle(t).position==="sticky")return wo();yo(()=>{const o=document.querySelector(go);o?.setAttribute("data-closedby","any"),o?.showModal()})}}function oi(){document.querySelector(go)?.close()}let Ht=0,Y,M=0,g,Rt=0,mt=0,Bt=!1,Ut=0,N=0;function ni([t]){g=t,Eo()}function Eo(){if(!g?.isConnected)return;const t=window.scrollY,e=t<N;N=t,e!==Y&&(Ht=(g.parentElement?.getBoundingClientRect().top||0)+N,Y=e,Rt=g.offsetHeight,mt=g.getBoundingClientRect().top+N,Bt=g.offsetHeight<=window.innerHeight,Ut=window.innerHeight),!(M===-1&&Bt)&&(M!==-1&&(Bt||Y&&N<=mt)?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${Math.max(0,N-Ht)}px`),M=0):M!==1&&!Y&&N+Ut>=mt+Rt?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top",`${Ut-Rt}px`),M=1):M===1&&Y&&(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${mt-Ht}px`),M=0))}x(()=>{V(document.documentElement,Zn,ni),b(document,"click",ei,E),b(window,"resize",Yn(oi,100),E),b(window,"scroll",Eo,E)});const ii=v.breadcrumbs.split(" ")[0];function si(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}x(()=>V(document.documentElement,ii,si));const ai=v.dialog.split(" ")[0],ri=K?document.getElementsByClassName(ai):[],li=()=>{for(const t of ri)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},ci=({clientX:t,clientY:e,target:o})=>{if(o instanceof HTMLDialogElement&&c(o,"data-closedby")==="any"){const{top:n,right:i,bottom:s,left:a}=o.getBoundingClientRect();n<=e&&e<=s&&a<=t&&t<=i||o.close()}else o instanceof Element&&o.closest('button[data-command="close"]')&&o?.closest("dialog")?.close()};x(()=>{b(document,"click",ci,E),we(li).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function di(t){if(t.animationName!==v._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}x(()=>b(document,"animationend",di,E));var ui=Object.defineProperty,$o=Object.getOwnPropertySymbols,fi=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,So=(t,e,o)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,hi=(t,e)=>{for(var o in e||(e={}))fi.call(e,o)&&So(t,o,e[o]);if($o)for(var o of $o(e))pi.call(e,o)&&So(t,o,e[o]);return t},X=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=X&&/android/i.test(navigator.userAgent),qt=X&&/iPad|iPhone|iPod/.test(navigator.userAgent),To;X&&/^Mac/i.test(((To=navigator.userAgentData)==null?void 0:To.platform)||navigator.platform);var mi=`${bt?"data":"aria"}-labelledby`,bi=":host(:not([hidden])) { display: block }",vi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",xo=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Co=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},G=(t,...e)=>Co("add",t,e),vt=(t,...e)=>Co("remove",t,e),_i=(t,e)=>t.attachShadow({mode:"open"}).append(Yt("slot"),Yt("style",e)),_t=new WeakMap,Ft=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),_t.set(t,o)}},ko=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},gi=0,Vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++gi).toString(32)}`),t.id):"",Yt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Io={define:(t,e)=>!X||window.customElements.get(t)||window.customElements.define(t,e)},H,yi=0,Lo=t=>{H||(H=Yt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${yi++%2?" ":""}`)},wi=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},jt=!1,Kt=t=>(t?.type==="mouseup"&&(jt=!1),t?.type==="mousedown"&&(jt=!0,G(document,"mouseup",Kt,{once:!0})),jt),Wt="disabled",z="selected",Ei=class extends xo{static get observedAttributes(){return[Wt,z]}connectedCallback(){qt||(this.tabIndex=-1),this.hasAttribute("role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[z]}set defaultSelected(t){this[z]=t}get disabled(){return p(this,Wt)!==null}set disabled(t){p(this,Wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=p(this,"label"))!=null?t:this.text}set label(t){p(this,"label",t)}get selected(){return p(this,z)!==null}set selected(t){p(this,z,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=p(this,"value"))!=null?t:this.text}set value(t){p(this,"value",t)}};Io.define("u-option",Ei);var Ao,Mo=0,$i=qt||bt,Oo="click,focusout,input,keydown,mousedown,mouseup",Po="focus,focusin,blur,focusout",gt={singular:"%d hit",plural:"%d hits"},Do=class extends xo{constructor(){super(),this._texts=hi({},gt),this._value="",_i(this,`${bi}
8
+ ::slotted(data:focus) { ${xn} }`))}static get observedAttributes(){return Object.keys(dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Ln(this),at(this,ve,this,!0),Ct(this,{attributeFilter:["value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ft,0,this),setTimeout(pt,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];dt[n]&&(this._texts[n]=o||dt[n])}disconnectedCallback(){Ct(this,!1),kn(this,ve,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Rn(this),t.type==="click"&&Un(this,t),t.type==="focus"&&Hn(this,t),t.type==="input"&&qn(this,t),t.type==="keydown"&&Fn(this,t),t.type==="mousedown"&&Lt(t),t.type==="mutation"&&ft(this,t)}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:ct)!==ct}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:ct)!==ct}set creatable(t){f(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector("u-datalist,datalist")),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const o=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},At=t=>t instanceof HTMLDataElement,ft=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:a,control:r,list:d,multiple:l}=t;let h=`${O((o=r?.labels)==null?void 0:o[0])}, ${l?a.length?s.found.replace("%d",`${a.length}`):s.empty:""}`;const u=[];for(const{addedNodes:_,removedNodes:I}of e?.detail||[]){for(const m of _)At(m)&&u.unshift(m);for(const m of I)At(m)&&u.push(m)}const T=l?u.length===1:u[0]===i;if(i&&r&&T){const _=f(r,"inputmode"),I=At(i)?r:i;t._speak=`${s[u[0].isConnected?"added":"removed"]} ${O(u[0])}, `,(Nn||i===r)&&kt(t._speak),r!==I&&(f(r,"aria-expanded",null),f(r,"inputmode","none"),h=" ",r.focus()),setTimeout(()=>{var m;f(r,"aria-expanded","true"),f(r,"inputmode",_),(m=I?.focus)==null||m.call(I),t._speak="",Dn?at(t,"blur",()=>ft(t),_e):setTimeout(ft,100,t)},100)}let w=0;const k=t.querySelector("select");for(const _ of a){const I=k?.options[w],m=O(_),A=_.value||m,te=`${t._speak}${m}, ${s.remove}, ${++w} ${s.of} ${a.length}`;f(_,"role","button"),f(_,"value",A),f(_,"tabindex","-1"),f(_,"aria-label",te),I?Object.assign(I,{textContent:m,value:A}):k?.appendChild(new Option(m,A,!0,!0))}k&&f(k,"multiple",l?"":null);for(const _ of[...k?.options||[]].slice(w))_.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),d&&f(d,"aria-multiselectable",`${l}`),r&&f(r,"list",Mn(d)),r&&f(r,"aria-label",`${t._speak}${h}`);const J=O(a[0]);J!==t._itemText&&pt(t,!1),t._itemText=J,ge(t),ye(t),(n=Ct(t))==null||n.takeRecords()},ge=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value))},ye=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const a=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(a)?"":null)}},pt=(t,e=!0)=>{const{multiple:o,control:n,items:i}=t,s=O(i[0]);if(!(o||!n||s===n.value)){if(e)return be(n,s,"insertText");n.value=s}},Mt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:a,items:r,multiple:d}=t,l=((o=a?.value)==null?void 0:o.trim())||"",h=l.toLowerCase()||null;let u=[...i].find(w=>(f(w,"label")||O(w)).trim().toLowerCase()===h);const T={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("beforematch",T))||(u=[...i].find(w=>w.selected)),e)return ye(t),u?q(t,u,!1):s&&l?q(t,{value:l},!1):(!d&&r[0]?q(t,r[0]):pt(t),kt(n.invalid));for(const w of i)w.selected=w===u},q=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,a=lt("data",e.label||e.value,{value:e.value}),r=[...i].find(h=>h.value===e.value),d={bubbles:!0,cancelable:!0,detail:r||a};if(r&&!o)return pt(t);if(t.dispatchEvent(new CustomEvent("beforechange",d))){if(!s)for(const h of[...i])h.remove();r?r.remove():n?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("afterchange",d))}},Hn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),kt()},Rn=t=>Lt()||setTimeout(Bn,0,t),Bn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Mt(t),t._focus=void 0)},Un=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:a,items:r}=t;if(s?.contains(i))return a&&be(a,"","deleteContentBackward"),a?.focus();for(const d of r){const{top:l,right:h,bottom:u,left:T}=d.getBoundingClientRect();if(d.contains(i))return q(t,d);if(n>=l&&n<=u&&o>=T&&o<=h)return d.focus()}i===t&&a?.focus()},qn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const d of n)if(d.value&&d.value===a)return q(t,d,s)}else s||Mt(t,!1);ge(t)},Fn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:a,repeat:r,target:d}=e,l=i&&i===d,h=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(d);if(l&&a==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),at(n,"blur",()=>f(n,"tabindex",null),_e)),!(!l&&In(e)||u===-1)){if(a==="ArrowRight"&&!l)u+=1;else if(a==="ArrowLeft"&&!h)u-=1;else if(a==="Enter"&&l){const T=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",T)),Mt(t)}else if((a==="Backspace"||a==="Delete")&&!h){if(e.preventDefault(),!r&&s[u])return q(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,u)]||i)==null||o.focus()}};On.define("u-combobox",ut);const Vn="1.3.9",E={capture:!0,passive:!0},K=typeof window<"u"&&typeof document<"u";function Yn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let jn=0;const Kn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function Ot(t){return t.id||(t.id=`${Kn}${++jn}`),t.id}const Wn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Wn("add",t,e),W=K?document.createElement("div"):null,ht=new Map,Xn=()=>{for(const[t,e]of ht)e()};W&&(W.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Xn,E));const F={top:0,right:1,bottom:2,left:3};function P(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return ht.delete(t);W?.isConnected||document.body.append(W||""),ht.has(t)||ht.set(t,()=>P(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:a,offsetHeight:r}=t,d=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:h,height:u,left:T,top:w}=e.getBoundingClientRect(),k=window.visualViewport?.width||window.innerWidth,J=window.visualViewport?.height||window.innerHeight,_=window.pageXOffset||document.documentElement.scrollLeft,I=window.pageYOffset||document.documentElement.scrollTop,m=Math.round(T-(d-h)/2),A=Math.round(w-(l-u)/2),te=Math.min(Math.max(10,m-(a-d)/2),k-a-10),as=Math.min(Math.max(10,A-(r-l)/2),J-r-10),rs=m-a>0,ls=m+d+a<k,cs=A-r>0,ds=A+l+r<J,un=i===F.top||i===F.bottom,us=i===F.right&&(n||ls)||!rs,fn=i===F.bottom&&(n||ds)||!cs,fs=Math.round(un?te:us?m+d:m-a),ps=Math.round(un?fn?A+l:A-r:as);t.style.position="absolute",t.style.left=`${fs+_}px`,t.style.top=`${ps+I}px`,W?.style.setProperty("translate",`0px ${Math.round(fn?_+A+l+r+30:0)}px`)}function we(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Pt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Pt.get(t)||[];i.length||(Pt.set(t,i),we((s,a)=>{if(t.isConnected&&i?.length)for(const r of i)r();else a?.disconnect(),Pt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},x=t=>{if(!K)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Dt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Ee="mattilsynet.matomo.cloud";let Nt=!0;function Gn(t,e={}){if(K){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Ee}/matomo.php`]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${Ee}/matomo.js`}))),t==="init"){const{matomoId:o,enabled:n=!0}=e;Nt=n,window._paq.push(["setSiteId",o])}if(Nt==="debug")return console.info(`Analytics: "${t}"`,e);if(!(Nt===!1||window.location.hostname==="localhost"))if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:s}=e,a=["trackEvent",o,n,i,s];window._paq.push(a.filter(r=>r!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const zn=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&s<e&&a.splice(-2,2,0,e),a},Qn=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:zn(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),$e="_alert_1bf95_1 _ds-alert_uxa1f_1",Se="_app_1bf95_1",Te="_sticky_1bf95_1",xe="_avatar_1bf95_1 _ds-avatar_uxa1f_1",Ce="_badge_1bf95_1",ke="_breadcrumbs_1bf95_1 _ds-breadcrumbs_uxa1f_1",Ie="_button_1bf95_1 _ds-button_uxa1f_1",Le="_card_1bf95_1",Ae="_group_1bf95_1",Me="_chip_1bf95_1 _ds-chip_uxa1f_1",Oe="_details_1bf95_1 _ds-details_uxa1f_1",Pe="_dialog_1bf95_1 _ds-dialog_uxa1f_1",De="_divider_1bf95_1",Ne="_errorsummary_1bf95_1 _ds-error-summary_uxa1f_1",He="__errorsummary_1bf95_1",Re="_field_1bf95_1 _ds-field_uxa1f_1",Be="__datalist_1bf95_1",Ue="_affixes_1bf95_1 _ds-field-affixes_uxa1f_1",qe="_fieldset_1bf95_1 _ds-fieldset_uxa1f_1",Fe="_heading_1bf95_1 _ds-heading_uxa1f_1",Ve="_ingress_1bf95_1",Ye="_muted_1bf95_1",je="_info_1bf95_1",Ke="_prose_1bf95_1",We="_helptext_1bf95_1 _ds-focus_uxa1f_1",Xe="_input_1bf95_1 _ds-input_uxa1f_1",Ge="_grid_1bf95_1",ze="_flex_1bf95_1",Qe="_link_1bf95_1",Je="_logo_1bf95_1",Ze="_pagination_1bf95_1 _ds-pagination_uxa1f_1",to="_popover_1bf95_1",eo="_progress_1bf95_1",oo="__indeterminate_1bf95_1",no="_skeleton_1bf95_1 _ds-skeleton_uxa1f_1",io="__skeleton_1bf95_1",so="_spinner_1bf95_1",ao="_steps_1bf95_1",ro="_table_1bf95_1 _ds-table_uxa1f_1",lo="__scrollShadow_1bf95_1",co="_tabs_1bf95_1 _ds-tabs_uxa1f_1",uo="__scrollMask_1bf95_1",fo="_tag_1bf95_1 _ds-tag_uxa1f_1",po="_togglegroup_1bf95_1",ho="__tooltip_1bf95_1",mo="_validation_1bf95_1 _ds-validation-message_uxa1f_1",bo="_body_1bf95_153",vo="__checked_1bf95_1",v={alert:$e,app:Se,sticky:Te,avatar:xe,badge:Ce,breadcrumbs:ke,button:Ie,card:Le,group:Ae,chip:Me,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,_errorsummary:He,field:Re,_datalist:Be,affixes:Ue,fieldset:qe,heading:Fe,ingress:Ve,muted:Ye,info:je,prose:Ke,helptext:We,input:Xe,grid:Ge,flex:ze,link:Qe,logo:Je,pagination:Ze,popover:to,progress:eo,_indeterminate:oo,skeleton:no,_skeleton:io,spinner:so,steps:ao,table:ro,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:ho,validation:mo,body:bo,_checked:vo},Jn=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Be,_errorsummary:He,_indeterminate:oo,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:ho,affixes:Ue,alert:$e,app:Se,avatar:xe,badge:Ce,body:bo,breadcrumbs:ke,button:Ie,card:Le,chip:Me,default:v,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,field:Re,fieldset:qe,flex:ze,grid:Ge,group:Ae,heading:Fe,helptext:We,info:je,ingress:Ve,input:Xe,link:Qe,logo:Je,muted:Ye,pagination:Ze,popover:to,progress:eo,prose:Ke,skeleton:no,spinner:so,steps:ao,sticky:Te,table:ro,tabs:co,tag:fo,togglegroup:po,validation:mo},Symbol.toStringTag,{value:"Module"}));typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const _o=v.app.split(" ")[0],Zn=v.sticky.split(" ")[0],ti='[data-command="toggle-app-expanded"]',go=`.${_o} > dialog,.${_o} dialog ~ main`,yo=t=>{document.startViewTransition?document.startViewTransition(t):t()},wo=t=>yo(()=>window.mtdsToggleAppExpanded?.(t));function ei({target:t,defaultPrevented:e}){if(!(e||!(t instanceof HTMLButtonElement)||!t.matches(ti))){if(getComputedStyle(t).position==="sticky")return wo();yo(()=>{const o=document.querySelector(go);o?.setAttribute("data-closedby","any"),o?.showModal()})}}function oi(){document.querySelector(go)?.close()}let Ht=0,Y,M=0,g,Rt=0,mt=0,Bt=!1,Ut=0,N=0;function ni([t]){g=t,Eo()}function Eo(){if(!g?.isConnected)return;const t=window.scrollY,e=t<N;N=t,e!==Y&&(Ht=(g.parentElement?.getBoundingClientRect().top||0)+N,Y=e,Rt=g.offsetHeight,mt=g.getBoundingClientRect().top+N,Bt=g.offsetHeight<=window.innerHeight,Ut=window.innerHeight),!(M===-1&&Bt)&&(M!==-1&&(Bt||Y&&N<=mt)?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${Math.max(0,N-Ht)}px`),M=0):M!==1&&!Y&&N+Ut>=mt+Rt?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top",`${Ut-Rt}px`),M=1):M===1&&Y&&(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${mt-Ht}px`),M=0))}x(()=>{V(document.documentElement,Zn,ni),b(document,"click",ei,E),b(window,"resize",Yn(oi,100),E),b(window,"scroll",Eo,E)});const ii=v.breadcrumbs.split(" ")[0];function si(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}x(()=>V(document.documentElement,ii,si));const ai=v.dialog.split(" ")[0],ri=K?document.getElementsByClassName(ai):[],li=()=>{for(const t of ri)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},ci=({clientX:t,clientY:e,target:o})=>{if(o instanceof HTMLDialogElement&&c(o,"data-closedby")==="any"){const{top:n,right:i,bottom:s,left:a}=o.getBoundingClientRect();n<=e&&e<=s&&a<=t&&t<=i||o.close()}else o instanceof Element&&o.closest('button[data-command="close"]')&&o?.closest("dialog")?.close()};x(()=>{b(document,"click",ci,E),we(li).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function di(t){if(t.animationName!==v._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}x(()=>b(document,"animationend",di,E));var ui=Object.defineProperty,$o=Object.getOwnPropertySymbols,fi=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,So=(t,e,o)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,hi=(t,e)=>{for(var o in e||(e={}))fi.call(e,o)&&So(t,o,e[o]);if($o)for(var o of $o(e))pi.call(e,o)&&So(t,o,e[o]);return t},X=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=X&&/android/i.test(navigator.userAgent),qt=X&&/iPad|iPhone|iPod/.test(navigator.userAgent),To;X&&/^Mac/i.test(((To=navigator.userAgentData)==null?void 0:To.platform)||navigator.platform);var mi=`${bt?"data":"aria"}-labelledby`,bi=":host(:not([hidden])) { display: block }",vi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",xo=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Co=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},G=(t,...e)=>Co("add",t,e),vt=(t,...e)=>Co("remove",t,e),_i=(t,e)=>t.attachShadow({mode:"open"}).append(Yt("slot"),Yt("style",e)),_t=new WeakMap,Ft=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),_t.set(t,o)}},ko=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},gi=0,Vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++gi).toString(32)}`),t.id):"",Yt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Io={define:(t,e)=>!X||window.customElements.get(t)||window.customElements.define(t,e)},H,yi=0,Lo=t=>{H||(H=Yt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${yi++%2?" ":""}`)},wi=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},jt=!1,Kt=t=>(t?.type==="mouseup"&&(jt=!1),t?.type==="mousedown"&&(jt=!0,G(document,"mouseup",Kt,{once:!0})),jt),Wt="disabled",z="selected",Ei=class extends xo{static get observedAttributes(){return[Wt,z]}connectedCallback(){qt||(this.tabIndex=-1),this.hasAttribute("role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[z]}set defaultSelected(t){this[z]=t}get disabled(){return p(this,Wt)!==null}set disabled(t){p(this,Wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=p(this,"label"))!=null?t:this.text}set label(t){p(this,"label",t)}get selected(){return p(this,z)!==null}set selected(t){p(this,z,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=p(this,"value"))!=null?t:this.text}set value(t){p(this,"value",t)}};Io.define("u-option",Ei);var Ao,Mo=0,$i=qt||bt,Oo="click,focusout,input,keydown,mousedown,mouseup",Po="focus,focusin,blur,focusout",gt={singular:"%d hit",plural:"%d hits"},Do=class extends xo{constructor(){super(),this._texts=hi({},gt),this._value="",_i(this,`${bi}
9
9
  ::slotted(u-option) { display: block; cursor: pointer }
10
10
  ::slotted(u-option:focus) { ${vi} }
11
11
  ::slotted(u-option[aria-hidden="true"]),
@@ -1,4 +1,4 @@
1
- const o = "1.3.7";
1
+ const o = "1.3.9";
2
2
  export {
3
3
  o as version
4
4
  };