@oslokommune/punkt-react 9.4.0 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(T,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],N):(T=typeof globalThis<"u"?globalThis:T||self,N(T["punkt-react"]={},T.React))})(this,function(T,N){"use strict";function Bt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const b=Bt(N);function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pe={exports:{}},oe={};/**
1
+ (function(j,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(j=typeof globalThis<"u"?globalThis:j||self,y(j["punkt-react"]={},j.React))})(this,function(j,y){"use strict";function Bt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const g=Bt(y);function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pe={exports:{}},oe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ke;function Vt(){if(Ke)return oe;Ke=1;var e=N,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(p,f,c){var m,v={},w=null,P=null;c!==void 0&&(w=""+c),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(P=f.ref);for(m in f)o.call(f,m)&&!i.hasOwnProperty(m)&&(v[m]=f[m]);if(p&&p.defaultProps)for(m in f=p.defaultProps,f)v[m]===void 0&&(v[m]=f[m]);return{$$typeof:n,type:p,key:w,ref:P,props:v,_owner:a.current}}return oe.Fragment=r,oe.jsx=s,oe.jsxs=s,oe}var ie={};/**
9
+ */var Ge;function Vt(){if(Ge)return oe;Ge=1;var e=y,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(p,f,c){var m,k={},w=null,P=null;c!==void 0&&(w=""+c),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(P=f.ref);for(m in f)i.call(f,m)&&!o.hasOwnProperty(m)&&(k[m]=f[m]);if(p&&p.defaultProps)for(m in f=p.defaultProps,f)k[m]===void 0&&(k[m]=f[m]);return{$$typeof:n,type:p,key:w,ref:P,props:k,_owner:a.current}}return oe.Fragment=r,oe.jsx=s,oe.jsxs=s,oe}var se={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Xe;function Mt(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&function(){var e=N,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),p=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),O=Symbol.iterator,S="@@iterator";function D(t){if(t===null||typeof t!="object")return null;var u=O&&t[O]||t[S];return typeof u=="function"?u:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(t){{for(var u=arguments.length,d=new Array(u>1?u-1:0),k=1;k<u;k++)d[k-1]=arguments[k];$("error",t,d)}}function $(t,u,d){{var k=x.ReactDebugCurrentFrame,R=k.getStackAddendum();R!==""&&(u+="%s",d=d.concat([R]));var j=d.map(function(C){return String(C)});j.unshift("Warning: "+u),Function.prototype.apply.call(console[t],console,j)}}var U=!1,B=!1,W=!1,Y=!1,q=!1,J;J=Symbol.for("react.module.reference");function G(t){return!!(typeof t=="string"||typeof t=="function"||t===o||t===i||q||t===a||t===c||t===m||Y||t===P||U||B||W||typeof t=="object"&&t!==null&&(t.$$typeof===w||t.$$typeof===v||t.$$typeof===s||t.$$typeof===p||t.$$typeof===f||t.$$typeof===J||t.getModuleId!==void 0))}function M(t,u,d){var k=t.displayName;if(k)return k;var R=u.displayName||u.name||"";return R!==""?d+"("+R+")":d}function _(t){return t.displayName||"Context"}function I(t){if(t==null)return null;if(typeof t.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case o:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case m:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case p:var u=t;return _(u)+".Consumer";case s:var d=t;return _(d._context)+".Provider";case f:return M(t,t.render,"ForwardRef");case v:var k=t.displayName||null;return k!==null?k:I(t.type)||"Memo";case w:{var R=t,j=R._payload,C=R._init;try{return I(C(j))}catch{return null}}}return null}var H=Object.assign,K=0,ee,te,fe,Nt,yt,Et,wt;function xt(){}xt.__reactDisabledLog=!0;function Yn(){{if(K===0){ee=console.log,te=console.info,fe=console.warn,Nt=console.error,yt=console.group,Et=console.groupCollapsed,wt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:xt,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}K++}}function Jn(){{if(K--,K===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},t,{value:ee}),info:H({},t,{value:te}),warn:H({},t,{value:fe}),error:H({},t,{value:Nt}),group:H({},t,{value:yt}),groupCollapsed:H({},t,{value:Et}),groupEnd:H({},t,{value:wt})})}K<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ve=x.ReactCurrentDispatcher,Me;function ye(t,u,d){{if(Me===void 0)try{throw Error()}catch(R){var k=R.stack.trim().match(/\n( *(at )?)/);Me=k&&k[1]||""}return`
18
- `+Me+t}}var Ye=!1,Ee;{var Hn=typeof WeakMap=="function"?WeakMap:Map;Ee=new Hn}function Ct(t,u){if(!t||Ye)return"";{var d=Ee.get(t);if(d!==void 0)return d}var k;Ye=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=Ve.current,Ve.current=null,Yn();try{if(u){var C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(X){k=X}Reflect.construct(t,[],C)}else{try{C.call()}catch(X){k=X}t.call(C.prototype)}}else{try{throw Error()}catch(X){k=X}t()}}catch(X){if(X&&k&&typeof X.stack=="string"){for(var E=X.stack.split(`
19
- `),V=k.stack.split(`
20
- `),L=E.length-1,F=V.length-1;L>=1&&F>=0&&E[L]!==V[F];)F--;for(;L>=1&&F>=0;L--,F--)if(E[L]!==V[F]){if(L!==1||F!==1)do if(L--,F--,F<0||E[L]!==V[F]){var z=`
21
- `+E[L].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),typeof t=="function"&&Ee.set(t,z),z}while(L>=1&&F>=0);break}}}finally{Ye=!1,Ve.current=j,Jn(),Error.prepareStackTrace=R}var le=t?t.displayName||t.name:"",Ut=le?ye(le):"";return typeof t=="function"&&Ee.set(t,Ut),Ut}function zn(t,u,d){return Ct(t,!1)}function qn(t){var u=t.prototype;return!!(u&&u.isReactComponent)}function we(t,u,d){if(t==null)return"";if(typeof t=="function")return Ct(t,qn(t));if(typeof t=="string")return ye(t);switch(t){case c:return ye("Suspense");case m:return ye("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return zn(t.render);case v:return we(t.type,u,d);case w:{var k=t,R=k._payload,j=k._init;try{return we(j(R),u,d)}catch{}}}return""}var xe=Object.prototype.hasOwnProperty,Pt={},Rt=x.ReactDebugCurrentFrame;function Ce(t){if(t){var u=t._owner,d=we(t.type,t._source,u?u.type:null);Rt.setExtraStackFrame(d)}else Rt.setExtraStackFrame(null)}function Gn(t,u,d,k,R){{var j=Function.call.bind(xe);for(var C in t)if(j(t,C)){var E=void 0;try{if(typeof t[C]!="function"){var V=Error((k||"React class")+": "+d+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}E=t[C](u,C,k,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){E=L}E&&!(E instanceof Error)&&(Ce(R),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",k||"React class",d,C,typeof E),Ce(null)),E instanceof Error&&!(E.message in Pt)&&(Pt[E.message]=!0,Ce(R),g("Failed %s type: %s",d,E.message),Ce(null))}}}var Kn=Array.isArray;function Je(t){return Kn(t)}function Xn(t){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function Zn(t){try{return St(t),!1}catch{return!0}}function St(t){return""+t}function Ot(t){if(Zn(t))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xn(t)),St(t)}var pe=x.ReactCurrentOwner,Qn={key:!0,ref:!0,__self:!0,__source:!0},Tt,jt,He;He={};function er(t){if(xe.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function tr(t){if(xe.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function nr(t,u){if(typeof t.ref=="string"&&pe.current&&u&&pe.current.stateNode!==u){var d=I(pe.current.type);He[d]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(pe.current.type),t.ref),He[d]=!0)}}function rr(t,u){{var d=function(){Tt||(Tt=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function ar(t,u){{var d=function(){jt||(jt=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var lr=function(t,u,d,k,R,j,C){var E={$$typeof:n,type:t,key:u,ref:d,props:C,_owner:j};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function or(t,u,d,k,R){{var j,C={},E=null,V=null;d!==void 0&&(Ot(d),E=""+d),tr(u)&&(Ot(u.key),E=""+u.key),er(u)&&(V=u.ref,nr(u,R));for(j in u)xe.call(u,j)&&!Qn.hasOwnProperty(j)&&(C[j]=u[j]);if(t&&t.defaultProps){var L=t.defaultProps;for(j in L)C[j]===void 0&&(C[j]=L[j])}if(E||V){var F=typeof t=="function"?t.displayName||t.name||"Unknown":t;E&&rr(C,F),V&&ar(C,F)}return lr(t,E,V,R,k,pe.current,C)}}var ze=x.ReactCurrentOwner,Dt=x.ReactDebugCurrentFrame;function ae(t){if(t){var u=t._owner,d=we(t.type,t._source,u?u.type:null);Dt.setExtraStackFrame(d)}else Dt.setExtraStackFrame(null)}var qe;qe=!1;function Ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function $t(){{if(ze.current){var t=I(ze.current.type);if(t)return`
17
+ */var Xe;function Mt(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&function(){var e=y,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),p=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),O=Symbol.iterator,S="@@iterator";function D(t){if(t===null||typeof t!="object")return null;var u=O&&t[O]||t[S];return typeof u=="function"?u:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function N(t){{for(var u=arguments.length,d=new Array(u>1?u-1:0),v=1;v<u;v++)d[v-1]=arguments[v];b("error",t,d)}}function b(t,u,d){{var v=x.ReactDebugCurrentFrame,T=v.getStackAddendum();T!==""&&(u+="%s",d=d.concat([T]));var $=d.map(function(R){return String(R)});$.unshift("Warning: "+u),Function.prototype.apply.call(console[t],console,$)}}var I=!1,B=!1,W=!1,Y=!1,q=!1,z;z=Symbol.for("react.module.reference");function X(t){return!!(typeof t=="string"||typeof t=="function"||t===i||t===o||q||t===a||t===c||t===m||Y||t===P||I||B||W||typeof t=="object"&&t!==null&&(t.$$typeof===w||t.$$typeof===k||t.$$typeof===s||t.$$typeof===p||t.$$typeof===f||t.$$typeof===z||t.getModuleId!==void 0))}function J(t,u,d){var v=t.displayName;if(v)return v;var T=u.displayName||u.name||"";return T!==""?d+"("+T+")":d}function _(t){return t.displayName||"Context"}function L(t){if(t==null)return null;if(typeof t.tag=="number"&&N("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case i:return"Fragment";case r:return"Portal";case o:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case m:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case p:var u=t;return _(u)+".Consumer";case s:var d=t;return _(d._context)+".Provider";case f:return J(t,t.render,"ForwardRef");case k:var v=t.displayName||null;return v!==null?v:L(t.type)||"Memo";case w:{var T=t,$=T._payload,R=T._init;try{return L(R($))}catch{return null}}}return null}var M=Object.assign,H=0,ee,te,fe,Nt,yt,Et,wt;function Ct(){}Ct.__reactDisabledLog=!0;function Jn(){{if(H===0){ee=console.log,te=console.info,fe=console.warn,Nt=console.error,yt=console.group,Et=console.groupCollapsed,wt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Ct,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}H++}}function Hn(){{if(H--,H===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},t,{value:ee}),info:M({},t,{value:te}),warn:M({},t,{value:fe}),error:M({},t,{value:Nt}),group:M({},t,{value:yt}),groupCollapsed:M({},t,{value:Et}),groupEnd:M({},t,{value:wt})})}H<0&&N("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ve=x.ReactCurrentDispatcher,Me;function ye(t,u,d){{if(Me===void 0)try{throw Error()}catch(T){var v=T.stack.trim().match(/\n( *(at )?)/);Me=v&&v[1]||""}return`
18
+ `+Me+t}}var Ye=!1,Ee;{var zn=typeof WeakMap=="function"?WeakMap:Map;Ee=new zn}function xt(t,u){if(!t||Ye)return"";{var d=Ee.get(t);if(d!==void 0)return d}var v;Ye=!0;var T=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=Ve.current,Ve.current=null,Jn();try{if(u){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(Z){v=Z}Reflect.construct(t,[],R)}else{try{R.call()}catch(Z){v=Z}t.call(R.prototype)}}else{try{throw Error()}catch(Z){v=Z}t()}}catch(Z){if(Z&&v&&typeof Z.stack=="string"){for(var C=Z.stack.split(`
19
+ `),V=v.stack.split(`
20
+ `),F=C.length-1,A=V.length-1;F>=1&&A>=0&&C[F]!==V[A];)A--;for(;F>=1&&A>=0;F--,A--)if(C[F]!==V[A]){if(F!==1||A!==1)do if(F--,A--,A<0||C[F]!==V[A]){var K=`
21
+ `+C[F].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),typeof t=="function"&&Ee.set(t,K),K}while(F>=1&&A>=0);break}}}finally{Ye=!1,Ve.current=$,Hn(),Error.prepareStackTrace=T}var ie=t?t.displayName||t.name:"",Ut=ie?ye(ie):"";return typeof t=="function"&&Ee.set(t,Ut),Ut}function Kn(t,u,d){return xt(t,!1)}function qn(t){var u=t.prototype;return!!(u&&u.isReactComponent)}function we(t,u,d){if(t==null)return"";if(typeof t=="function")return xt(t,qn(t));if(typeof t=="string")return ye(t);switch(t){case c:return ye("Suspense");case m:return ye("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return Kn(t.render);case k:return we(t.type,u,d);case w:{var v=t,T=v._payload,$=v._init;try{return we($(T),u,d)}catch{}}}return""}var Ce=Object.prototype.hasOwnProperty,Pt={},Rt=x.ReactDebugCurrentFrame;function xe(t){if(t){var u=t._owner,d=we(t.type,t._source,u?u.type:null);Rt.setExtraStackFrame(d)}else Rt.setExtraStackFrame(null)}function Gn(t,u,d,v,T){{var $=Function.call.bind(Ce);for(var R in t)if($(t,R)){var C=void 0;try{if(typeof t[R]!="function"){var V=Error((v||"React class")+": "+d+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}C=t[R](u,R,v,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){C=F}C&&!(C instanceof Error)&&(xe(T),N("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",v||"React class",d,R,typeof C),xe(null)),C instanceof Error&&!(C.message in Pt)&&(Pt[C.message]=!0,xe(T),N("Failed %s type: %s",d,C.message),xe(null))}}}var Xn=Array.isArray;function Je(t){return Xn(t)}function Zn(t){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function Qn(t){try{return St(t),!1}catch{return!0}}function St(t){return""+t}function Ot(t){if(Qn(t))return N("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Zn(t)),St(t)}var pe=x.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Tt,jt,He;He={};function tr(t){if(Ce.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function nr(t){if(Ce.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function rr(t,u){if(typeof t.ref=="string"&&pe.current&&u&&pe.current.stateNode!==u){var d=L(pe.current.type);He[d]||(N('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',L(pe.current.type),t.ref),He[d]=!0)}}function ar(t,u){{var d=function(){Tt||(Tt=!0,N("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function lr(t,u){{var d=function(){jt||(jt=!0,N("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var ir=function(t,u,d,v,T,$,R){var C={$$typeof:n,type:t,key:u,ref:d,props:R,_owner:$};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function or(t,u,d,v,T){{var $,R={},C=null,V=null;d!==void 0&&(Ot(d),C=""+d),nr(u)&&(Ot(u.key),C=""+u.key),tr(u)&&(V=u.ref,rr(u,T));for($ in u)Ce.call(u,$)&&!er.hasOwnProperty($)&&(R[$]=u[$]);if(t&&t.defaultProps){var F=t.defaultProps;for($ in F)R[$]===void 0&&(R[$]=F[$])}if(C||V){var A=typeof t=="function"?t.displayName||t.name||"Unknown":t;C&&ar(R,A),V&&lr(R,A)}return ir(t,C,V,T,v,pe.current,R)}}var ze=x.ReactCurrentOwner,$t=x.ReactDebugCurrentFrame;function le(t){if(t){var u=t._owner,d=we(t.type,t._source,u?u.type:null);$t.setExtraStackFrame(d)}else $t.setExtraStackFrame(null)}var Ke;Ke=!1;function qe(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Dt(){{if(ze.current){var t=L(ze.current.type);if(t)return`
22
22
 
23
- Check the render method of \``+t+"`."}return""}}function ir(t){{if(t!==void 0){var u=t.fileName.replace(/^.*[\\\/]/,""),d=t.lineNumber;return`
23
+ Check the render method of \``+t+"`."}return""}}function sr(t){{if(t!==void 0){var u=t.fileName.replace(/^.*[\\\/]/,""),d=t.lineNumber;return`
24
24
 
25
- Check your code at `+u+":"+d+"."}return""}}var It={};function sr(t){{var u=$t();if(!u){var d=typeof t=="string"?t:t.displayName||t.name;d&&(u=`
25
+ Check your code at `+u+":"+d+"."}return""}}var It={};function cr(t){{var u=Dt();if(!u){var d=typeof t=="string"?t:t.displayName||t.name;d&&(u=`
26
26
 
27
- Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=sr(u);if(It[d])return;It[d]=!0;var k="";t&&t._owner&&t._owner!==ze.current&&(k=" It was passed a child from "+I(t._owner.type)+"."),ae(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),ae(null)}}function Ft(t,u){{if(typeof t!="object")return;if(Je(t))for(var d=0;d<t.length;d++){var k=t[d];Ge(k)&&Lt(k,u)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var R=D(t);if(typeof R=="function"&&R!==t.entries)for(var j=R.call(t),C;!(C=j.next()).done;)Ge(C.value)&&Lt(C.value,u)}}}function cr(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=I(u);Gn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!qe){qe=!0;var R=I(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){ae(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),ae(null);break}}t.ref!==null&&(ae(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),ae(null))}}function At(t,u,d,k,R,j){{var C=G(t);if(!C){var E="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=ir(R);V?E+=V:E+=$t();var L;t===null?L="null":Je(t)?L="array":t!==void 0&&t.$$typeof===n?(L="<"+(I(t.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):L=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,E)}var F=or(t,u,d,R,j);if(F==null)return F;if(C){var z=u.children;if(z!==void 0)if(k)if(Je(z)){for(var le=0;le<z.length;le++)Ft(z[le],t);Object.freeze&&Object.freeze(z)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(z,t)}return t===o?ur(F):cr(F),F}}function fr(t,u,d){return At(t,u,d,!0)}function pr(t,u,d){return At(t,u,d,!1)}var dr=pr,mr=fr;ie.Fragment=o,ie.jsx=dr,ie.jsxs=mr}()),ie}process.env.NODE_ENV==="production"?Pe.exports=Vt():Pe.exports=Mt();var Re=Pe.exports;const Z=Re.Fragment,l=Re.jsx,h=Re.jsxs,Se={},Yt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/9.4/icons/",Ht=(e,n)=>(!Se[e]&&typeof window.fetch=="function"&&(Se[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Yt)).then(r=>r)),Promise.resolve(Se[e])),zt={fetchIcon:async(e,n)=>Ht(e,n||Jt)},Ze=N.createContext(zt),y=({name:e,path:n,className:r="",...o})=>{const[a,i]=N.useState(null),s=N.useContext(Ze);return N.useEffect(()=>{e?s.fetchIcon(e,n).then(i):i(null)},[e,n]),a?l("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:a},...o}):null},Qe=N.forwardRef(({children:e,className:n,skin:r="info",closeAlert:o=!1,onClose:a,title:i,date:s,ariaLive:p="polite",slim:f=!1,...c},m)=>{const v=[n,"pkt-alert",r&&`pkt-alert--${r}`,f&&"pkt-alert--slim"].filter(Boolean).join(" "),[w,P]=N.useState(!0),O=()=>{P(!1),a&&a()};return w?h("div",{...c,className:v,"aria-live":p,ref:m,children:[l(y,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),o&&l("div",{className:"pkt-alert__close",children:l("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:l(y,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&l("div",{className:"pkt-alert__title",children:i}),l("div",{className:"pkt-alert__text",children:e}),s&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),qt=N.forwardRef(({href:e,text:n,onClick:r,className:o,...a},i)=>{const s=[o,"pkt-back-link"].filter(Boolean).join(" ");return l("nav",{ref:i,className:s,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),l("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
27
+ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=cr(u);if(It[d])return;It[d]=!0;var v="";t&&t._owner&&t._owner!==ze.current&&(v=" It was passed a child from "+L(t._owner.type)+"."),le(t),N('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,v),le(null)}}function Ft(t,u){{if(typeof t!="object")return;if(Je(t))for(var d=0;d<t.length;d++){var v=t[d];qe(v)&&Lt(v,u)}else if(qe(t))t._store&&(t._store.validated=!0);else if(t){var T=D(t);if(typeof T=="function"&&T!==t.entries)for(var $=T.call(t),R;!(R=$.next()).done;)qe(R.value)&&Lt(R.value,u)}}}function ur(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===k))d=u.propTypes;else return;if(d){var v=L(u);Gn(d,t.props,"prop",v,t)}else if(u.PropTypes!==void 0&&!Ke){Ke=!0;var T=L(u);N("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&N("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fr(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var v=u[d];if(v!=="children"&&v!=="key"){le(t),N("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v),le(null);break}}t.ref!==null&&(le(t),N("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}function At(t,u,d,v,T,$){{var R=X(t);if(!R){var C="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=sr(T);V?C+=V:C+=Dt();var F;t===null?F="null":Je(t)?F="array":t!==void 0&&t.$$typeof===n?(F="<"+(L(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):F=typeof t,N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,C)}var A=or(t,u,d,T,$);if(A==null)return A;if(R){var K=u.children;if(K!==void 0)if(v)if(Je(K)){for(var ie=0;ie<K.length;ie++)Ft(K[ie],t);Object.freeze&&Object.freeze(K)}else N("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(K,t)}return t===i?fr(A):ur(A),A}}function pr(t,u,d){return At(t,u,d,!0)}function dr(t,u,d){return At(t,u,d,!1)}var mr=dr,hr=pr;se.Fragment=i,se.jsx=mr,se.jsxs=hr}()),se}process.env.NODE_ENV==="production"?Pe.exports=Vt():Pe.exports=Mt();var Re=Pe.exports;const G=Re.Fragment,l=Re.jsx,h=Re.jsxs,Se={},Yt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/9.5/icons/",Ht=(e,n)=>(!Se[e]&&typeof window.fetch=="function"&&(Se[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Yt)).then(r=>r)),Promise.resolve(Se[e])),zt={fetchIcon:async(e,n)=>Ht(e,n||Jt)},Ze=y.createContext(zt),E=({name:e,path:n,className:r="",...i})=>{const[a,o]=y.useState(null),s=y.useContext(Ze);return y.useEffect(()=>{e?s.fetchIcon(e,n).then(o):o(null)},[e,n]),a?l("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:a},...i}):null},Qe=y.forwardRef(({children:e,className:n,skin:r="info",closeAlert:i=!1,onClose:a,title:o,date:s,ariaLive:p="polite",slim:f=!1,...c},m)=>{const k=[n,"pkt-alert",r&&`pkt-alert--${r}`,f&&"pkt-alert--slim"].filter(Boolean).join(" "),[w,P]=y.useState(!0),O=()=>{P(!1),a&&a()};return w?h("div",{...c,className:k,"aria-live":p,ref:m,children:[l(E,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),i&&l("div",{className:"pkt-alert__close",children:l("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:O,children:l(E,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&l("div",{className:"pkt-alert__title",children:o}),l("div",{className:"pkt-alert__text",children:e}),s&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Kt=y.forwardRef(({href:e,text:n,onClick:r,className:i,...a},o)=>{const s=[i,"pkt-back-link"].filter(Boolean).join(" ");return l("nav",{ref:o,className:s,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[l(E,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),l("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
28
28
  * @remix-run/router v1.7.1
29
29
  *
30
30
  * Copyright (c) Remix Software Inc.
@@ -33,7 +33,7 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
33
33
  * LICENSE.md file in the root directory of this source tree.
34
34
  *
35
35
  * @license MIT
36
- */function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Oe.apply(this,arguments)}var et;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(et||(et={}));function A(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function de(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Te(e){let{pathname:n="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function tt(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}var nt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nt||(nt={}));function je(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function Gt(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:a=""}=typeof e=="string"?tt(e):e;return{pathname:r?r.startsWith("/")?r:Kt(r,n):n,search:Xt(o),hash:Zt(a)}}function Kt(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function De(e,n,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function rt(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function at(e,n,r,o){o===void 0&&(o=!1);let a;typeof e=="string"?a=tt(e):(a=Oe({},e),A(!a.pathname||!a.pathname.includes("?"),De("?","pathname","search",a)),A(!a.pathname||!a.pathname.includes("#"),De("#","pathname","hash",a)),A(!a.search||!a.search.includes("#"),De("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,p;if(o||s==null)p=r;else{let v=n.length-1;if(s.startsWith("..")){let w=s.split("/");for(;w[0]==="..";)w.shift(),v-=1;a.pathname=w.join("/")}p=v>=0?n[v]:"/"}let f=Gt(a,p),c=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(c||m)&&(f.pathname+="/"),f}const $e=e=>e.join("/").replace(/\/\/+/g,"/"),Xt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lt=["post","put","patch","delete"];new Set(lt);const Qt=["get",...lt];new Set(Qt);/**
36
+ */function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Oe.apply(this,arguments)}var et;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(et||(et={}));function U(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function de(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Te(e){let{pathname:n="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function tt(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(n.search=e.substr(i),e=e.substr(0,i)),e&&(n.pathname=e)}return n}var nt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nt||(nt={}));function je(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function qt(e,n){n===void 0&&(n="/");let{pathname:r,search:i="",hash:a=""}=typeof e=="string"?tt(e):e;return{pathname:r?r.startsWith("/")?r:Gt(r,n):n,search:Xt(i),hash:Zt(a)}}function Gt(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function $e(e,n,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function rt(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function at(e,n,r,i){i===void 0&&(i=!1);let a;typeof e=="string"?a=tt(e):(a=Oe({},e),U(!a.pathname||!a.pathname.includes("?"),$e("?","pathname","search",a)),U(!a.pathname||!a.pathname.includes("#"),$e("#","pathname","hash",a)),U(!a.search||!a.search.includes("#"),$e("#","search","hash",a)));let o=e===""||a.pathname==="",s=o?"/":a.pathname,p;if(i||s==null)p=r;else{let k=n.length-1;if(s.startsWith("..")){let w=s.split("/");for(;w[0]==="..";)w.shift(),k-=1;a.pathname=w.join("/")}p=k>=0?n[k]:"/"}let f=qt(a,p),c=s&&s!=="/"&&s.endsWith("/"),m=(o||s===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(c||m)&&(f.pathname+="/"),f}const De=e=>e.join("/").replace(/\/\/+/g,"/"),Xt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,lt=["post","put","patch","delete"];new Set(lt);const Qt=["get",...lt];new Set(Qt);/**
37
37
  * React Router v6.14.1
38
38
  *
39
39
  * Copyright (c) Remix Software Inc.
@@ -42,7 +42,7 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
42
42
  * LICENSE.md file in the root directory of this source tree.
43
43
  *
44
44
  * @license MIT
45
- */function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ie.apply(this,arguments)}const me=b.createContext(null);process.env.NODE_ENV!=="production"&&(me.displayName="DataRouter");const ot=b.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouterState");const en=b.createContext(null);process.env.NODE_ENV!=="production"&&(en.displayName="Await");const Q=b.createContext(null);process.env.NODE_ENV!=="production"&&(Q.displayName="Navigation");const Le=b.createContext(null);process.env.NODE_ENV!=="production"&&(Le.displayName="Location");const re=b.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const tn=b.createContext(null);process.env.NODE_ENV!=="production"&&(tn.displayName="RouteError");function nn(e,n){let{relative:r}=n===void 0?{}:n;Fe()||(process.env.NODE_ENV!=="production"?A(!1,"useHref() may be used only in the context of a <Router> component."):A(!1));let{basename:o,navigator:a}=b.useContext(Q),{hash:i,pathname:s,search:p}=he(e,{relative:r}),f=s;return o!=="/"&&(f=s==="/"?o:$e([o,s])),a.createHref({pathname:f,search:p,hash:i})}function Fe(){return b.useContext(Le)!=null}function se(){return Fe()||(process.env.NODE_ENV!=="production"?A(!1,"useLocation() may be used only in the context of a <Router> component."):A(!1)),b.useContext(Le).location}const it="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function st(e){b.useContext(Q).static||b.useLayoutEffect(e)}function rn(){let{isDataRoute:e}=b.useContext(re);return e?cn():an()}function an(){Fe()||(process.env.NODE_ENV!=="production"?A(!1,"useNavigate() may be used only in the context of a <Router> component."):A(!1));let e=b.useContext(me),{basename:n,navigator:r}=b.useContext(Q),{matches:o}=b.useContext(re),{pathname:a}=se(),i=JSON.stringify(rt(o).map(f=>f.pathnameBase)),s=b.useRef(!1);return st(()=>{s.current=!0}),b.useCallback(function(f,c){if(c===void 0&&(c={}),process.env.NODE_ENV!=="production"&&de(s.current,it),!s.current)return;if(typeof f=="number"){r.go(f);return}let m=at(f,JSON.parse(i),a,c.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:$e([n,m.pathname])),(c.replace?r.replace:r.push)(m,c.state,c)},[n,r,i,a,e])}function he(e,n){let{relative:r}=n===void 0?{}:n,{matches:o}=b.useContext(re),{pathname:a}=se(),i=JSON.stringify(rt(o).map(s=>s.pathnameBase));return b.useMemo(()=>at(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}var Ae;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ae||(Ae={}));var ke;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(ke||(ke={}));function ct(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ln(e){let n=b.useContext(me);return n||(process.env.NODE_ENV!=="production"?A(!1,ct(e)):A(!1)),n}function on(e){let n=b.useContext(re);return n||(process.env.NODE_ENV!=="production"?A(!1,ct(e)):A(!1)),n}function ut(e){let n=on(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?A(!1,e+' can only be used on routes that contain a unique "id"'):A(!1)),r.route.id}function sn(){return ut(ke.UseRouteId)}function cn(){let{router:e}=ln(Ae.UseNavigateStable),n=ut(ke.UseNavigateStable),r=b.useRef(!1);return st(()=>{r.current=!0}),b.useCallback(function(a,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&de(r.current,it),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Ie({fromRouteId:n},i)))},[e,n])}var ft;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ft||(ft={})),new Promise(()=>{});/**
45
+ */function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ie.apply(this,arguments)}const me=g.createContext(null);process.env.NODE_ENV!=="production"&&(me.displayName="DataRouter");const it=g.createContext(null);process.env.NODE_ENV!=="production"&&(it.displayName="DataRouterState");const en=g.createContext(null);process.env.NODE_ENV!=="production"&&(en.displayName="Await");const Q=g.createContext(null);process.env.NODE_ENV!=="production"&&(Q.displayName="Navigation");const Le=g.createContext(null);process.env.NODE_ENV!=="production"&&(Le.displayName="Location");const re=g.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const tn=g.createContext(null);process.env.NODE_ENV!=="production"&&(tn.displayName="RouteError");function nn(e,n){let{relative:r}=n===void 0?{}:n;Fe()||(process.env.NODE_ENV!=="production"?U(!1,"useHref() may be used only in the context of a <Router> component."):U(!1));let{basename:i,navigator:a}=g.useContext(Q),{hash:o,pathname:s,search:p}=he(e,{relative:r}),f=s;return i!=="/"&&(f=s==="/"?i:De([i,s])),a.createHref({pathname:f,search:p,hash:o})}function Fe(){return g.useContext(Le)!=null}function ce(){return Fe()||(process.env.NODE_ENV!=="production"?U(!1,"useLocation() may be used only in the context of a <Router> component."):U(!1)),g.useContext(Le).location}const ot="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function st(e){g.useContext(Q).static||g.useLayoutEffect(e)}function rn(){let{isDataRoute:e}=g.useContext(re);return e?cn():an()}function an(){Fe()||(process.env.NODE_ENV!=="production"?U(!1,"useNavigate() may be used only in the context of a <Router> component."):U(!1));let e=g.useContext(me),{basename:n,navigator:r}=g.useContext(Q),{matches:i}=g.useContext(re),{pathname:a}=ce(),o=JSON.stringify(rt(i).map(f=>f.pathnameBase)),s=g.useRef(!1);return st(()=>{s.current=!0}),g.useCallback(function(f,c){if(c===void 0&&(c={}),process.env.NODE_ENV!=="production"&&de(s.current,ot),!s.current)return;if(typeof f=="number"){r.go(f);return}let m=at(f,JSON.parse(o),a,c.relative==="path");e==null&&n!=="/"&&(m.pathname=m.pathname==="/"?n:De([n,m.pathname])),(c.replace?r.replace:r.push)(m,c.state,c)},[n,r,o,a,e])}function he(e,n){let{relative:r}=n===void 0?{}:n,{matches:i}=g.useContext(re),{pathname:a}=ce(),o=JSON.stringify(rt(i).map(s=>s.pathnameBase));return g.useMemo(()=>at(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}var Ae;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ae||(Ae={}));var ke;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(ke||(ke={}));function ct(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ln(e){let n=g.useContext(me);return n||(process.env.NODE_ENV!=="production"?U(!1,ct(e)):U(!1)),n}function on(e){let n=g.useContext(re);return n||(process.env.NODE_ENV!=="production"?U(!1,ct(e)):U(!1)),n}function ut(e){let n=on(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?U(!1,e+' can only be used on routes that contain a unique "id"'):U(!1)),r.route.id}function sn(){return ut(ke.UseRouteId)}function cn(){let{router:e}=ln(Ae.UseNavigateStable),n=ut(ke.UseNavigateStable),r=g.useRef(!1);return st(()=>{r.current=!0}),g.useCallback(function(a,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&de(r.current,ot),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Ie({fromRouteId:n},o)))},[e,n])}var ft;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ft||(ft={})),new Promise(()=>{});/**
46
46
  * React Router DOM v6.14.1
47
47
  *
48
48
  * Copyright (c) Remix Software Inc.
@@ -51,8 +51,8 @@ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(
51
51
  * LICENSE.md file in the root directory of this source tree.
52
52
  *
53
53
  * @license MIT
54
- */function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ne.apply(this,arguments)}function Ue(e,n){if(e==null)return{};var r={},o=Object.keys(e),a,i;for(i=0;i<o.length;i++)a=o[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function un(e){return be(e)&&e.tagName.toLowerCase()==="button"}function fn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function pn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function dn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mn(e,n){return e.button===0&&(!n||n==="_self")&&!dn(e)}let ge=null;function hn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!kn.has(e)?(process.env.NODE_ENV!=="production"&&de(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function vn(e,n){let r,o,a,i,s;if(fn(e)){let p=e.getAttribute("action");o=p?je(p,n):null,r=e.getAttribute("method")||ve,a=Be(e.getAttribute("enctype"))||_e,i=new FormData(e)}else if(un(e)||pn(e)&&(e.type==="submit"||e.type==="image")){let p=e.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||p.getAttribute("action");if(o=f?je(f,n):null,r=e.getAttribute("formmethod")||p.getAttribute("method")||ve,a=Be(e.getAttribute("formenctype"))||Be(p.getAttribute("enctype"))||_e,i=new FormData(p,e),!hn()){let{name:c,type:m,value:v}=e;if(m==="image"){let w=c?c+".":"";i.append(w+"x","0"),i.append(w+"y","0")}else c&&i.append(c,v)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ve,o=null,a=_e,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:o,method:r.toLowerCase(),encType:a,formData:i,body:s}}const _n=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],bn=["aria-current","caseSensitive","className","end","style","to","children"],gn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const Nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=b.forwardRef(function(n,r){let{onClick:o,relative:a,reloadDocument:i,replace:s,state:p,target:f,to:c,preventScrollReset:m}=n,v=Ue(n,_n),{basename:w}=b.useContext(Q),P,O=!1;if(typeof c=="string"&&yn.test(c)&&(P=c,Nn))try{let g=new URL(window.location.href),$=c.startsWith("//")?new URL(g.protocol+c):new URL(c),U=je($.pathname,w);$.origin===g.origin&&U!=null?c=U+$.search+$.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&de(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let S=nn(c,{relative:a}),D=Pn(c,{replace:s,state:p,target:f,preventScrollReset:m,relative:a});function x(g){o&&o(g),g.defaultPrevented||D(g)}return b.createElement("a",ne({},v,{href:P||S,onClick:O||i?o:x,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const En=b.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:a=!1,className:i="",end:s=!1,style:p,to:f,children:c}=n,m=Ue(n,bn),v=he(f,{relative:m.relative}),w=se(),P=b.useContext(ot),{navigator:O}=b.useContext(Q),S=O.encodeLocation?O.encodeLocation(v).pathname:v.pathname,D=w.pathname,x=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),x=x?x.toLowerCase():null,S=S.toLowerCase());let g=D===S||!s&&D.startsWith(S)&&D.charAt(S.length)==="/",$=x!=null&&(x===S||!s&&x.startsWith(S)&&x.charAt(S.length)==="/"),U=g?o:void 0,B;typeof i=="function"?B=i({isActive:g,isPending:$}):B=[i,g?"active":null,$?"pending":null].filter(Boolean).join(" ");let W=typeof p=="function"?p({isActive:g,isPending:$}):p;return b.createElement(Ne,ne({},m,{"aria-current":U,className:B,ref:r,style:W,to:f}),typeof c=="function"?c({isActive:g,isPending:$}):c)});process.env.NODE_ENV!=="production"&&(En.displayName="NavLink");const wn=b.forwardRef((e,n)=>{let r=Sn();return b.createElement(pt,ne({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(wn.displayName="Form");const pt=b.forwardRef((e,n)=>{let{reloadDocument:r,replace:o,method:a=ve,action:i,onSubmit:s,submit:p,relative:f,preventScrollReset:c}=e,m=Ue(e,gn),v=a.toLowerCase()==="get"?"get":"post",w=On(i,{relative:f}),P=O=>{if(s&&s(O),O.defaultPrevented)return;O.preventDefault();let S=O.nativeEvent.submitter,D=(S==null?void 0:S.getAttribute("formmethod"))||a;p(S||O.currentTarget,{method:D,replace:o,relative:f,preventScrollReset:c})};return b.createElement("form",ne({ref:n,method:v,action:w,onSubmit:r?s:P},m))});process.env.NODE_ENV!=="production"&&(pt.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var dt;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dt||(dt={}));function xn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Cn(e){let n=b.useContext(me);return n||(process.env.NODE_ENV!=="production"?A(!1,xn(e)):A(!1)),n}function Pn(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,p=rn(),f=se(),c=he(e,{relative:s});return b.useCallback(m=>{if(mn(m,r)){m.preventDefault();let v=o!==void 0?o:Te(f)===Te(c);p(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,p,c,o,a,r,e,i,s])}function Rn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function Sn(){let{router:e}=Cn(We.UseSubmit),{basename:n}=b.useContext(Q),r=sn();return b.useCallback(function(o,a){a===void 0&&(a={}),Rn();let{action:i,method:s,encType:p,formData:f,body:c}=vn(o,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||p,replace:a.replace,fromRouteId:r})},[e,n,r])}function On(e,n){let{relative:r}=n===void 0?{}:n,{basename:o}=b.useContext(Q),a=b.useContext(re);a||(process.env.NODE_ENV!=="production"?A(!1,"useFormAction must be used inside a RouteContext"):A(!1));let[i]=a.matches.slice(-1),s=ne({},he(e||".",{relative:r})),p=se();if(e==null&&(s.search=p.search,s.hash=p.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(s.pathname=s.pathname==="/"?o:$e([o,s.pathname])),Te(s)}const Tn=N.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...o},a)=>{const i=e.slice(0,4),s=i[i.length-2],p=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:a,"aria-label":"brødsmulemeny",className:p,children:[l("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,c)=>l("li",{className:"pkt-breadcrumbs__item",children:c===i.length-1?l("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[l(y,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${c}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[l(y,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),ce=N.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:o="user",size:a="medium",skin:i="primary",type:s="button",variant:p="label-only",color:f,...c},m)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,p&&`pkt-btn--${p}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...c,className:v,type:s,ref:m,children:[p!=="label-only"&&l(y,{className:"pkt-btn__icon",name:r}),l("span",{className:"pkt-btn__text",children:e}),p==="icons-right-and-left"&&l(y,{className:"pkt-btn__icon",name:o})]})});ce.displayName="PktButton";const mt=N.forwardRef(({id:e,hasTile:n=!1,disabled:r=!1,label:o,checkHelptext:a,hasError:i=!1,className:s,...p},f)=>{const c=[s,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:c,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${r&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:f,className:`pkt-input-check__input-checkbox ${i?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:r,...p}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[o,a&&l("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});mt.displayName="PktCheckbox";const jn=({columnOne:e,columnTwo:n,socialLinks:r,className:o,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var p,f;const s=[o,"pkt-footer"].filter(Boolean).join(" ");return l("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&l("li",{className:"pkt-footer__text",children:e.text}),(p=e.links)==null?void 0:p.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&l("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:a,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:i,children:[l(y,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,m)=>l("div",{className:"pkt-footer__social-language",children:l("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${m}`))}),l("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,m)=>l(N.Fragment,{children:l("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:l(y,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${m}`))})]})]})})},Dn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",className:o})=>{const a=[o,"pkt-footer-simple"].filter(Boolean).join(" ");return l("footer",{className:a,"data-mode":"dark",children:l("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((i,s)=>l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:`pkt-footer-simple__link ${i.external?" pkt-link--external":""}`,href:i.href,target:i.openInNewTab?"_blank":"_self",rel:i.openInNewTab?"noopener noreferrer":void 0,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},s)),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:r,children:[l(y,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var ht={exports:{}};/*!
54
+ */function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ne.apply(this,arguments)}function Ue(e,n){if(e==null)return{};var r={},i=Object.keys(e),a,o;for(o=0;o<i.length;o++)a=i[o],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function un(e){return be(e)&&e.tagName.toLowerCase()==="button"}function fn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function pn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function dn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mn(e,n){return e.button===0&&(!n||n==="_self")&&!dn(e)}let ge=null;function hn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const kn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!kn.has(e)?(process.env.NODE_ENV!=="production"&&de(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function vn(e,n){let r,i,a,o,s;if(fn(e)){let p=e.getAttribute("action");i=p?je(p,n):null,r=e.getAttribute("method")||ve,a=Be(e.getAttribute("enctype"))||_e,o=new FormData(e)}else if(un(e)||pn(e)&&(e.type==="submit"||e.type==="image")){let p=e.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||p.getAttribute("action");if(i=f?je(f,n):null,r=e.getAttribute("formmethod")||p.getAttribute("method")||ve,a=Be(e.getAttribute("formenctype"))||Be(p.getAttribute("enctype"))||_e,o=new FormData(p,e),!hn()){let{name:c,type:m,value:k}=e;if(m==="image"){let w=c?c+".":"";o.append(w+"x","0"),o.append(w+"y","0")}else c&&o.append(c,k)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ve,i=null,a=_e,s=e}return o&&a==="text/plain"&&(s=o,o=void 0),{action:i,method:r.toLowerCase(),encType:a,formData:o,body:s}}const _n=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],bn=["aria-current","caseSensitive","className","end","style","to","children"],gn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const Nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=g.forwardRef(function(n,r){let{onClick:i,relative:a,reloadDocument:o,replace:s,state:p,target:f,to:c,preventScrollReset:m}=n,k=Ue(n,_n),{basename:w}=g.useContext(Q),P,O=!1;if(typeof c=="string"&&yn.test(c)&&(P=c,Nn))try{let N=new URL(window.location.href),b=c.startsWith("//")?new URL(N.protocol+c):new URL(c),I=je(b.pathname,w);b.origin===N.origin&&I!=null?c=I+b.search+b.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&de(!1,'<Link to="'+c+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let S=nn(c,{relative:a}),D=Pn(c,{replace:s,state:p,target:f,preventScrollReset:m,relative:a});function x(N){i&&i(N),N.defaultPrevented||D(N)}return g.createElement("a",ne({},k,{href:P||S,onClick:O||o?i:x,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const En=g.forwardRef(function(n,r){let{"aria-current":i="page",caseSensitive:a=!1,className:o="",end:s=!1,style:p,to:f,children:c}=n,m=Ue(n,bn),k=he(f,{relative:m.relative}),w=ce(),P=g.useContext(it),{navigator:O}=g.useContext(Q),S=O.encodeLocation?O.encodeLocation(k).pathname:k.pathname,D=w.pathname,x=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),x=x?x.toLowerCase():null,S=S.toLowerCase());let N=D===S||!s&&D.startsWith(S)&&D.charAt(S.length)==="/",b=x!=null&&(x===S||!s&&x.startsWith(S)&&x.charAt(S.length)==="/"),I=N?i:void 0,B;typeof o=="function"?B=o({isActive:N,isPending:b}):B=[o,N?"active":null,b?"pending":null].filter(Boolean).join(" ");let W=typeof p=="function"?p({isActive:N,isPending:b}):p;return g.createElement(Ne,ne({},m,{"aria-current":I,className:B,ref:r,style:W,to:f}),typeof c=="function"?c({isActive:N,isPending:b}):c)});process.env.NODE_ENV!=="production"&&(En.displayName="NavLink");const wn=g.forwardRef((e,n)=>{let r=Sn();return g.createElement(pt,ne({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(wn.displayName="Form");const pt=g.forwardRef((e,n)=>{let{reloadDocument:r,replace:i,method:a=ve,action:o,onSubmit:s,submit:p,relative:f,preventScrollReset:c}=e,m=Ue(e,gn),k=a.toLowerCase()==="get"?"get":"post",w=On(o,{relative:f}),P=O=>{if(s&&s(O),O.defaultPrevented)return;O.preventDefault();let S=O.nativeEvent.submitter,D=(S==null?void 0:S.getAttribute("formmethod"))||a;p(S||O.currentTarget,{method:D,replace:i,relative:f,preventScrollReset:c})};return g.createElement("form",ne({ref:n,method:k,action:w,onSubmit:r?s:P},m))});process.env.NODE_ENV!=="production"&&(pt.displayName="FormImpl"),process.env.NODE_ENV;var We;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(We||(We={}));var dt;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dt||(dt={}));function Cn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function xn(e){let n=g.useContext(me);return n||(process.env.NODE_ENV!=="production"?U(!1,Cn(e)):U(!1)),n}function Pn(e,n){let{target:r,replace:i,state:a,preventScrollReset:o,relative:s}=n===void 0?{}:n,p=rn(),f=ce(),c=he(e,{relative:s});return g.useCallback(m=>{if(mn(m,r)){m.preventDefault();let k=i!==void 0?i:Te(f)===Te(c);p(e,{replace:k,state:a,preventScrollReset:o,relative:s})}},[f,p,c,i,a,r,e,o,s])}function Rn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function Sn(){let{router:e}=xn(We.UseSubmit),{basename:n}=g.useContext(Q),r=sn();return g.useCallback(function(i,a){a===void 0&&(a={}),Rn();let{action:o,method:s,encType:p,formData:f,body:c}=vn(i,n);e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:f,body:c,formMethod:a.method||s,formEncType:a.encType||p,replace:a.replace,fromRouteId:r})},[e,n,r])}function On(e,n){let{relative:r}=n===void 0?{}:n,{basename:i}=g.useContext(Q),a=g.useContext(re);a||(process.env.NODE_ENV!=="production"?U(!1,"useFormAction must be used inside a RouteContext"):U(!1));let[o]=a.matches.slice(-1),s=ne({},he(e||".",{relative:r})),p=ce();if(e==null&&(s.search=p.search,s.hash=p.hash,o.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(s.pathname=s.pathname==="/"?i:De([i,s.pathname])),Te(s)}const Tn=y.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...i},a)=>{const o=e.slice(0,4),s=o[o.length-2],p=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:a,"aria-label":"brødsmulemeny",className:p,children:[l("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((f,c)=>l("li",{className:"pkt-breadcrumbs__item",children:c===o.length-1?l("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l(E,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l(E,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${c}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l(E,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l(E,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),ae=y.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:i="user",size:a="medium",skin:o="primary",type:s="button",variant:p="label-only",color:f,...c},m)=>{const k=[n,"pkt-btn",a&&`pkt-btn--${a}`,o&&`pkt-btn--${o}`,p&&`pkt-btn--${p}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...c,className:k,type:s,ref:m,children:[p!=="label-only"&&l(E,{className:"pkt-btn__icon",name:r}),l("span",{className:"pkt-btn__text",children:e}),p==="icons-right-and-left"&&l(E,{className:"pkt-btn__icon",name:i})]})});ae.displayName="PktButton";const mt=y.forwardRef(({id:e,hasTile:n=!1,disabled:r=!1,label:i,checkHelptext:a,hasError:o=!1,className:s,...p},f)=>{const c=[s,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:c,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${r&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:f,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:r,...p}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[i,a&&l("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});mt.displayName="PktCheckbox";const jn=({columnOne:e,columnTwo:n,socialLinks:r,className:i,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var p,f;const s=[i,"pkt-footer"].filter(Boolean).join(" ");return l("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&l("li",{className:"pkt-footer__text",children:e.text}),(p=e.links)==null?void 0:p.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(E,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&l("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((c,m)=>l("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[l(E,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${m}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:a,children:[l(E,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:o,children:[l(E,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,m)=>l("div",{className:"pkt-footer__social-language",children:l("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${m}`))}),l("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,m)=>l(y.Fragment,{children:l("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:l(E,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${m}`))})]})]})})},$n=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",className:i})=>{const a=[i,"pkt-footer-simple"].filter(Boolean).join(" ");return l("footer",{className:a,"data-mode":"dark",children:l("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((o,s)=>l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:`pkt-footer-simple__link ${o.external?" pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[l(E,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},s)),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[l(E,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:r,children:[l(E,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var ht={exports:{}};/*!
55
55
  Copyright (c) 2018 Jed Watson.
56
56
  Licensed under the MIT License (MIT), see
57
57
  http://jedwatson.github.io/classnames
58
- */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var o=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")o.push(i);else if(Array.isArray(i)){if(i.length){var p=r.apply(null,i);p&&o.push(p)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){o.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&o.push(f)}}}return o.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ht);var $n=ht.exports;const kt=Wt($n),In=N.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:o=!0,user:a,userMenu:i,representing:s,userOptions:p,userMenuFooter:f,canChangeRepresentation:c=!0,showMenuButton:m=!1,showLogOutButton:v=!1,openMenu:w,logOut:P,changeRepresentation:O,...S},D)=>{const x=N.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,$]=N.useState(!1),[U,B]=N.useState(0),[W,Y]=N.useState(!1),q=N.useRef(null);N.useEffect(()=>(document.addEventListener("mouseup",G),window.addEventListener("scroll",M),()=>{document.removeEventListener("mouseup",G),window.removeEventListener("scroll",M)}));const J=()=>{Y(!W)},G=_=>{q.current&&!q.current.contains(_.target)&&Y(!1)},M=()=>{if(o){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-U)<60)return;$(_>U),B(_)}};return h("header",{...S,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":o,"pkt-header--hidden":g}),ref:D,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?l("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.4/logos/"})}):l("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:l(y,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.4/logos/"})}),l("span",{className:"pkt-header__logo-service",children:n})]}),l("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[m&&l("li",{children:l(ce,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:w,children:"Meny"})}),(a||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!g?"pkt-header--open-dropdown":""}`,ref:q,children:[h("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":W,onClick:J,children:[l(y,{name:"user",className:"pkt-btn__icon"}),l("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),l("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),l(y,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l(y,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&h("li",{children:[l("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l("time",{children:x})]})]}),i&&l("li",{children:l("ul",{className:"pkt-list",children:i.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${I}`))})}),(s||c)&&h("li",{children:[s&&h(Z,{children:[l("div",{className:"pkt-user-menu__label",children:"Representerer"}),l("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),l("ul",{className:"pkt-list mt-size-16",children:c&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:O,children:[l(y,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l("li",{children:l("ul",{className:"pkt-list",children:(p||!v)&&h(Z,{children:[p==null?void 0:p.map((_,I)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(y,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${I}`)),!v&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:P,children:[l(y,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&l("li",{className:"footer",children:l("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,I)=>l("li",{children:typeof _.target=="string"?l("a",{href:_.target,className:"pkt-link",children:_.title}):l("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${I}`))})})]})]}),v&&l("li",{children:l(ce,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),vt=N.forwardRef(({label:e,id:n,children:r,...o},a)=>h("div",{className:"pkt-form-group",children:[l("label",{htmlFor:n,className:"pkt-form-label",children:e}),l("input",{className:"pkt-form-input",id:n,...o,ref:a}),r]}));vt.displayName="PktInput";const ue=N.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:o,helptextDropdownButton:a,optionalTag:i=!1,optionalText:s="Valgfritt",requiredTag:p=!1,requiredText:f="Må fylles ut",hasError:c,errorMessage:m,disabled:v,inline:w,ariaDescribedby:P,useWrapper:O=!0,children:S,className:D,hasFieldset:x=!1},g)=>{const[$,U]=N.useState(!1),B=()=>{U(!$)},W=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":p?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",Y=i?s:p?f:"",q=v?"pkt-inputwrapper--disabled":"",J=w?"pkt-inputwrapper--inline":"",G=c?"pkt-inputwrapper--error":"",M=!!o&&o!=="",_=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',I=x?"fieldset":M?"div":"label",H=x?"legend":M?"h2":"span",K=P||(r?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",D,q,J,G].join(" "),ref:g,children:[O?l(Z,{children:h(I,{htmlFor:x?void 0:e,"aria-describedby":M?void 0:P,className:`pkt-inputwrapper__label${x?" pkt-inputwrapper__fieldset":""}`,children:[h(H,{id:`${e}-label`,className:`${x?" pkt-inputwrapper__legend":""}`,children:[n,Y!==""&&l("span",{className:W(),children:Y})]}),r&&l("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:r}}),M&&o!==""&&h("div",{children:[l(ce,{skin:"tertiary",size:"small",variant:"icon-right",iconName:$?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:B,children:l("span",{dangerouslySetInnerHTML:{__html:_}})}),l("div",{className:`pkt-inputwrapper__helptext ${$?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:l("span",{dangerouslySetInnerHTML:{__html:o}})}),!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,children:n})]}),l(Z,{children:S})]})}):h(Z,{children:[!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":K,id:`${e}-label`,children:n}),S]}),c&&m&&l("div",{children:l(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,slim:!0,children:m})})]})});ue.displayName="PktInputWrapper";const _t=N.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:o=!1,skin:a="normal",href:i="#",external:s=!1,title:p,...f},c)=>{const m=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return h("a",{...f,href:i,className:`pkt-linkcard pkt-link ${m}`,target:o?"_blank":"_self",rel:o?"noopener noreferrer":void 0,ref:c,children:[l(y,{className:"pkt-link__icon",name:r}),h("div",{className:"pkt-linkcard__content",children:[l("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:p}),l("div",{className:"pkt-linkcard__text",children:e})]})]})});_t.displayName="PktLinkCard";const Ln=({children:e,skin:n="beige",title:r,className:o,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,o].filter(Boolean).join(" ");return h("div",{...a,className:i,children:[r&&l("div",{className:"pkt-messagebox__title",children:r}),l("div",{className:"pkt-messagebox__text",children:e})]})},bt=N.forwardRef(({id:e,name:n,label:r,className:o,hasTile:a=!1,disabled:i=!1,checkHelptext:s,hasError:p=!1,...f},c)=>{const m=[o,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:m,children:h("div",{className:`pkt-input-check__input ${a?"pkt-input-check__input--tile":""} ${i&&a?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:c,className:`pkt-input-check__input-checkbox ${p?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[r,s&&l("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});bt.displayName="PktRadioButton";const Fn=N.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:r,className:o,disabled:a=!1,errorMessage:i,hasError:s,helptext:p,helptextDropdown:f,helptextDropdownButton:c,id:m,inline:v=!1,fullwidth:w=!1,label:P,name:O,optionalTag:S=!1,optionalText:D,requiredTag:x=!1,requiredText:g,...$},U)=>{const B=[o,"pkt-select"].join(" ");return l(ue,{className:B,forId:m,label:P,helptext:p,helptextDropdown:f,helptextDropdownButton:c,optionalTag:S,optionalText:D,requiredTag:x,requiredText:g,hasError:s,errorMessage:i,disabled:a,inline:v,ariaDescribedby:e,children:l("select",{ref:U,className:`pkt-input ${w?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${m}-error`,"aria-labelledby":n||`${m}-label`,disabled:a,id:m,name:O||m,...$,children:r})})}),An=({isResponsive:e,children:n})=>e?l("div",{className:"pkt-table-container",children:n}):l(Z,{children:n}),Un=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:o=!1,shadow:a=!1}={},children:i})=>l(An,{isResponsive:e,children:l("table",{className:kt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":o,"pkt-table--shadow":a}),children:i})}),Bn=({children:e})=>l("td",{className:"pkt-table__th",children:e}),Wn=({children:e})=>l("th",{className:"pkt-table__th",children:e}),gt=N.forwardRef(({children:e,className:n,skin:r="blue",textStyle:o="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:p="button",ariaLabel:f="close",onClick:c=()=>{}},m)=>{const[v,w]=N.useState(!1),P=x=>{w(!0),c(x)},O=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,n].filter(Boolean).join(" "),S=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,o&&`pkt-tag--${o}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__icon",name:s}),e,l(y,{className:"pkt-tag__close-btn",name:"close"})]})}):i?l(Z,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(y,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:O,children:[l(y,{className:"pkt-tag__icon",name:s}),e]}):l("span",{className:O,children:e})});gt.displayName="PktTag";const Vn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:o,counterMaxLength:a,className:i,disabled:s,errorMessage:p,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,rows:B,useWrapper:W=!0,onChange:Y,...q},J)=>{const G=[i,"pkt-textinput","pkt-textarea"].join(" "),M=r||`${e}-label`,_=N.useRef(null),[I,H]=N.useState(0),K=ee=>{var te,fe;if(o&&H(((fe=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:fe.length)||0),Y)return Y(ee)};return N.useEffect(()=>{var ee,te;typeof J=="function"&&J(_.current),o&&H(((te=(ee=_==null?void 0:_.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[J]),h(ue,{ariaDescribedby:n,className:G,disabled:s,errorMessage:p,forId:e,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:v,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:W,children:[l("textarea",{ref:_,className:`pkt-input ${P?"pkt-input--fullwidth":""} ${a&&I>a?"pkt-input--counter-error":""}`,name:S||e,id:e,placeholder:U,disabled:s,rows:B,"aria-labelledby":M,"aria-invalid":f,"aria-errormessage":`${e}-error`,...q,onChange:K}),o&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[I||0,a&&`/${a}`]})]})}),Mn=N.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:o="off",className:a,disabled:i=!1,errorMessage:s,hasError:p=!1,helptext:f,helptextDropdown:c,helptextDropdownButton:m,iconNameRight:v,inline:w=!1,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:g=!1,requiredText:$,placeholder:U,prefix:B,suffix:W,type:Y="text",useWrapper:q=!0,value:J,...G},M)=>{const _=[a,"pkt-textinput"].join(" "),I=r||`${e}-label`;return l(ue,{ariaDescribedby:n,className:_,disabled:i,errorMessage:s,forId:e,hasError:p,helptext:f,helptextDropdown:c,helptextDropdownButton:m,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:g,requiredText:$,useWrapper:q,children:h("div",{className:"pkt-input__container",children:[B&&l("div",{className:"pkt-input-prefix",children:B}),l("input",{ref:M,className:`pkt-input ${P?"pkt-input--fullwidth":""}`,type:Y,name:S||e,id:e,placeholder:U,autoComplete:o,value:J,disabled:i,"aria-invalid":p,"aria-errormessage":`${e}-error`,"aria-labelledby":I,...G}),W&&h("p",{className:"pkt-input-suffix",children:[W,v&&l(y,{className:"pkt-input-suffix-icon",name:v})]}),!W&&v&&l(y,{className:"pkt-input-icon",name:v})]})})});T.PktAlert=Qe,T.PktBackLink=qt,T.PktBreadcrumbs=Tn,T.PktButton=ce,T.PktCheckbox=mt,T.PktFooter=jn,T.PktFooterSimple=Dn,T.PktHeader=In,T.PktIcon=y,T.PktIconContext=Ze,T.PktInput=vt,T.PktInputWrapper=ue,T.PktLinkCard=_t,T.PktMessagebox=Ln,T.PktRadioButton=bt,T.PktSelect=Fn,T.PktTable=Un,T.PktTableData=Bn,T.PktTableHeader=Wn,T.PktTag=gt,T.PktTextarea=Vn,T.PktTextinput=Mn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
58
+ */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var i=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var s=typeof o;if(s==="string"||s==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var p=r.apply(null,o);p&&i.push(p)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){i.push(o.toString());continue}for(var f in o)n.call(o,f)&&o[f]&&i.push(f)}}}return i.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ht);var Dn=ht.exports;const kt=Wt(Dn),In=y.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:i=!0,user:a,userMenu:o,representing:s,userOptions:p,userMenuFooter:f,canChangeRepresentation:c=!0,showMenuButton:m=!1,showLogOutButton:k=!1,openMenu:w,logOut:P,changeRepresentation:O,...S},D)=>{const x=y.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[N,b]=y.useState(!1),[I,B]=y.useState(0),[W,Y]=y.useState(!1),q=y.useRef(null);y.useEffect(()=>(document.addEventListener("mouseup",X),window.addEventListener("scroll",J),()=>{document.removeEventListener("mouseup",X),window.removeEventListener("scroll",J)}));const z=()=>{Y(!W)},X=_=>{q.current&&!q.current.contains(_.target)&&Y(!1)},J=()=>{if(i){const _=window.pageYOffset||document.documentElement.scrollTop;if(_<0||Math.abs(_-I)<60)return;b(_>I),B(_)}};return h("header",{...S,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kt("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":N}),ref:D,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?l("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:l(E,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.5/logos/"})}):l("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:l(E,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/9.5/logos/"})}),l("span",{className:"pkt-header__logo-service",children:n})]}),l("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[m&&l("li",{children:l(ae,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:w,children:"Meny"})}),(a||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!N?"pkt-header--open-dropdown":""}`,ref:q,children:[h("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":W,onClick:z,children:[l(E,{name:"user",className:"pkt-btn__icon"}),l("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),l("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),l(E,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l(E,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&h("li",{children:[l("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l("time",{children:x})]})]}),o&&l("li",{children:l("ul",{className:"pkt-list",children:o.map((_,L)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(E,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(E,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userMenu-${L}`))})}),(s||c)&&h("li",{children:[s&&h(G,{children:[l("div",{className:"pkt-user-menu__label",children:"Representerer"}),l("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),l("ul",{className:"pkt-list mt-size-16",children:c&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:O,children:[l(E,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l("li",{children:l("ul",{className:"pkt-list",children:(p||!k)&&h(G,{children:[p==null?void 0:p.map((_,L)=>l("li",{children:typeof _.target=="string"?h("a",{href:_.target,className:"pkt-link",children:[_.iconName&&l(E,{name:_.iconName,className:"pkt-link__icon"}),_.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:[_.iconName&&l(E,{name:_.iconName,className:"pkt-link__icon"}),_.title]})},`userOptions-${L}`)),!k&&l("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:P,children:[l(E,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&l("li",{className:"footer",children:l("ul",{className:"pkt-list-horizontal bordered",children:f.map((_,L)=>l("li",{children:typeof _.target=="string"?l("a",{href:_.target,className:"pkt-link",children:_.title}):l("button",{className:"pkt-link-button pkt-link",onClick:_.target,children:_.title})},`userMenuFooter-${L}`))})})]})]}),k&&l("li",{children:l(ae,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),vt=y.forwardRef(({label:e,id:n,children:r,...i},a)=>h("div",{className:"pkt-form-group",children:[l("label",{htmlFor:n,className:"pkt-form-label",children:e}),l("input",{className:"pkt-form-input",id:n,...i,ref:a}),r]}));vt.displayName="PktInput";const ue=y.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:i,helptextDropdownButton:a,optionalTag:o=!1,optionalText:s="Valgfritt",requiredTag:p=!1,requiredText:f="Må fylles ut",hasError:c,errorMessage:m,disabled:k,inline:w,ariaDescribedby:P,useWrapper:O=!0,children:S,className:D,hasFieldset:x=!1},N)=>{const[b,I]=y.useState(!1),B=()=>{I(!b)},W=()=>o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":p?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",Y=o?s:p?f:"",q=k?"pkt-inputwrapper--disabled":"",z=w?"pkt-inputwrapper--inline":"",X=c?"pkt-inputwrapper--error":"",J=!!i&&i!=="",_=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',L=x?"fieldset":J?"div":"label",M=x?"legend":J?"h2":"span",H=P||(r?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",D,q,z,X].join(" "),ref:N,children:[O?l(G,{children:h(L,{htmlFor:x?void 0:e,"aria-describedby":J?void 0:P,className:`pkt-inputwrapper__label${x?" pkt-inputwrapper__fieldset":""}`,children:[h(M,{id:`${e}-label`,className:`${x?" pkt-inputwrapper__legend":""}`,children:[n,Y!==""&&l("span",{className:W(),children:Y})]}),r&&l("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:r}}),J&&i!==""&&h("div",{children:[l(ae,{skin:"tertiary",size:"small",variant:"icon-right",iconName:b?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:B,children:l("span",{dangerouslySetInnerHTML:{__html:_}})}),l("div",{className:`pkt-inputwrapper__helptext ${b?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:l("span",{dangerouslySetInnerHTML:{__html:i}})}),!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,children:n})]}),l(G,{children:S})]})}):h(G,{children:[!x&&l("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":H,id:`${e}-label`,children:n}),S]}),c&&m&&l("div",{children:l(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,slim:!0,children:m})})]})});ue.displayName="PktInputWrapper";const _t=y.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:i=!1,skin:a="normal",href:o="#",external:s=!1,title:p,...f},c)=>{const m=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return h("a",{...f,href:o,className:`pkt-linkcard pkt-link ${m}`,target:i?"_blank":"_self",rel:i?"noopener noreferrer":void 0,ref:c,children:[l(E,{className:"pkt-link__icon",name:r}),h("div",{className:"pkt-linkcard__content",children:[l("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:p}),l("div",{className:"pkt-linkcard__text",children:e})]})]})});_t.displayName="PktLinkCard";const Ln=({children:e,skin:n="beige",title:r,className:i,...a})=>{const o=["pkt-messagebox",n&&`pkt-messagebox--${n}`,i].filter(Boolean).join(" ");return h("div",{...a,className:o,children:[r&&l("div",{className:"pkt-messagebox__title",children:r}),l("div",{className:"pkt-messagebox__text",children:e})]})},bt=y.forwardRef(({id:e,name:n,label:r,className:i,hasTile:a=!1,disabled:o=!1,checkHelptext:s,hasError:p=!1,...f},c)=>{const m=[i,"pkt-input-check"].filter(Boolean).join(" ");return l("div",{className:m,children:h("div",{className:`pkt-input-check__input ${a?"pkt-input-check__input--tile":""} ${o&&a?"pkt-input-check__input--tile-disabled":""}`,children:[l("input",{ref:c,className:`pkt-input-check__input-checkbox ${p?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:o,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[r,s&&l("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});bt.displayName="PktRadioButton";const Fn=y.forwardRef(({action:e,appearance:n="local",disabled:r=!1,fullwidth:i=!1,id:a,label:o,method:s="get",name:p,placeholder:f="Søk…",suggestions:c,value:m="",onSearch:k,onSuggestionClick:w,...P},O)=>{const S=(b,I)=>{b?b():w&&w(I)},D=`pkt-searchinput pkt-searchinput--${n} ${i?"pkt-searchinput--fullwidth":""}`;return h(e?"form":"div",{className:D,onSubmit:k&&(()=>k(m)),action:e||void 0,method:e?s:void 0,role:"search",ref:O,...P,children:[h(o?"label":"div",{htmlFor:o?a:void 0,className:o?"pkt-inputwrapper__label":"",children:[o&&l(G,{children:o}),h("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l("input",{className:`pkt-input ${i?"pkt-input--fullwidth":""}`,type:"search",name:p||a,id:a,placeholder:f,value:m,disabled:r,onInput:k&&(b=>k(b.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${a}-suggestions`}),l(ae,{className:`pkt-searchinput__button ${n==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:n==="local"?"tertiary":"primary",color:n==="global"?"yellow":void 0,type:"submit",disabled:r,onClick:k&&(()=>k(m)),onKeyUp:k&&(b=>b.key==="Enter"&&k(m)),children:o||f})]})]}),c&&l("ul",{id:`${a}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:c.map((b,I)=>l("li",{children:y.createElement(b.href?"a":b.onClick?"button":"div",{href:b.href,className:`pkt-searchinput__suggestion ${b.onClick?"pkt-link-button":""} ${b.href||b.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:b.onClick?"button":void 0,onClick:()=>S(b.onClick,I),onKeyUp:()=>S(b.onClick,I)},h(G,{children:[b.title&&l("h3",{className:"pkt-searchinput__suggestion-title",children:b.title}),b.text&&l("p",{className:"pkt-searchinput__suggestion-text",children:b.text})]}))},`search-suggestion-${I}`))})]})}),An=y.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:r,className:i,disabled:a=!1,errorMessage:o,hasError:s,helptext:p,helptextDropdown:f,helptextDropdownButton:c,id:m,inline:k=!1,fullwidth:w=!1,label:P,name:O,optionalTag:S=!1,optionalText:D,requiredTag:x=!1,requiredText:N,...b},I)=>{const B=[i,"pkt-select"].join(" ");return l(ue,{className:B,forId:m,label:P,helptext:p,helptextDropdown:f,helptextDropdownButton:c,optionalTag:S,optionalText:D,requiredTag:x,requiredText:N,hasError:s,errorMessage:o,disabled:a,inline:k,ariaDescribedby:e,children:l("select",{ref:I,className:`pkt-input ${w?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${m}-error`,"aria-labelledby":n||`${m}-label`,disabled:a,id:m,name:O||m,...b,children:r})})}),Un=({isResponsive:e,children:n})=>e?l("div",{className:"pkt-table-container",children:n}):l(G,{children:n}),Bn=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:i=!1,shadow:a=!1}={},children:o})=>l(Un,{isResponsive:e,children:l("table",{className:kt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":i,"pkt-table--shadow":a}),children:o})}),Wn=({children:e})=>l("td",{className:"pkt-table__th",children:e}),Vn=({children:e})=>l("th",{className:"pkt-table__th",children:e}),gt=y.forwardRef(({children:e,className:n,skin:r="blue",textStyle:i="normal-text",size:a="medium",closeTag:o=!1,iconName:s="",type:p="button",ariaLabel:f="close",onClick:c=()=>{}},m)=>{const[k,w]=y.useState(!1),P=x=>{w(!0),c(x)},O=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,i&&`pkt-tag--${i}`,n].filter(Boolean).join(" "),S=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,i&&`pkt-tag--${i}`,s&&o?"pkt-btn--icons-right-and-left":null,o&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!k;return o&&s?l(G,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(E,{className:"pkt-tag__icon",name:s}),e,l(E,{className:"pkt-tag__close-btn",name:"close"})]})}):o?l(G,{children:D&&h("button",{className:S,type:p,"aria-label":f,onClick:P,ref:m,children:[l(E,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:O,children:[l(E,{className:"pkt-tag__icon",name:s}),e]}):l("span",{className:O,children:e})});gt.displayName="PktTag";const Mn=y.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:i,counterMaxLength:a,className:o,disabled:s,errorMessage:p,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:k,inline:w,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:N=!1,requiredText:b,placeholder:I,rows:B,useWrapper:W=!0,onChange:Y,...q},z)=>{const X=[o,"pkt-textinput","pkt-textarea"].join(" "),J=r||`${e}-label`,_=y.useRef(null),[L,M]=y.useState(0),H=ee=>{var te,fe;if(i&&M(((fe=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:fe.length)||0),Y)return Y(ee)};return y.useEffect(()=>{var ee,te;typeof z=="function"&&z(_.current),i&&M(((te=(ee=_==null?void 0:_.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[z]),h(ue,{ariaDescribedby:n,className:X,disabled:s,errorMessage:p,forId:e,hasError:f,helptext:c,helptextDropdown:m,helptextDropdownButton:k,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:N,requiredText:b,useWrapper:W,children:[l("textarea",{ref:_,className:`pkt-input ${P?"pkt-input--fullwidth":""} ${a&&L>a?"pkt-input--counter-error":""}`,name:S||e,id:e,placeholder:I,disabled:s,rows:B,"aria-labelledby":J,"aria-invalid":f,"aria-errormessage":`${e}-error`,...q,onChange:H}),i&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[L||0,a&&`/${a}`]})]})}),Yn=y.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:i="off",className:a,disabled:o=!1,errorMessage:s,hasError:p=!1,helptext:f,helptextDropdown:c,helptextDropdownButton:m,iconNameRight:k,inline:w=!1,fullwidth:P=!1,label:O,name:S,optionalTag:D=!1,optionalText:x,requiredTag:N=!1,requiredText:b,placeholder:I,prefix:B,suffix:W,type:Y="text",useWrapper:q=!0,omitSearchIcon:z=!1,value:X,...J},_)=>{const L=[a,"pkt-textinput"].join(" "),M=r||`${e}-label`,H=Y==="search"&&!k&&!z;return l(ue,{ariaDescribedby:n,className:L,disabled:o,errorMessage:s,forId:e,hasError:p,helptext:f,helptextDropdown:c,helptextDropdownButton:m,inline:w,label:O,optionalTag:D,optionalText:x,requiredTag:N,requiredText:b,useWrapper:q,children:h("div",{className:"pkt-input__container",children:[B&&l("div",{className:"pkt-input-prefix",children:B}),l("input",{ref:_,className:`pkt-input ${P?"pkt-input--fullwidth":""}`,type:Y,name:S||e,id:e,placeholder:I,autoComplete:i,value:X,disabled:o,"aria-invalid":p,"aria-errormessage":`${e}-error`,"aria-labelledby":M,...J}),W&&h("p",{className:"pkt-input-suffix",children:[W,k&&l(E,{className:"pkt-input-suffix-icon",name:k}),H&&l(E,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!W&&k&&l(E,{className:"pkt-input-icon",name:k}),!W&&H&&l(E,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});j.PktAlert=Qe,j.PktBackLink=Kt,j.PktBreadcrumbs=Tn,j.PktButton=ae,j.PktCheckbox=mt,j.PktFooter=jn,j.PktFooterSimple=$n,j.PktHeader=In,j.PktIcon=E,j.PktIconContext=Ze,j.PktInput=vt,j.PktInputWrapper=ue,j.PktLinkCard=_t,j.PktMessagebox=Ln,j.PktRadioButton=bt,j.PktSearchInput=Fn,j.PktSelect=An,j.PktTable=Bn,j.PktTableData=Wn,j.PktTableHeader=Vn,j.PktTag=gt,j.PktTextarea=Mn,j.PktTextinput=Yn,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,24 @@
1
+ import React, { HTMLProps } from 'react';
2
+ interface SearchSuggestion {
3
+ title?: string;
4
+ text?: string;
5
+ href?: string;
6
+ onClick?: () => void;
7
+ }
8
+ interface ISearchInput extends HTMLProps<HTMLFormElement & HTMLDivElement> {
9
+ action?: string;
10
+ appearance?: 'local' | 'local-with-button' | 'global';
11
+ disabled?: boolean;
12
+ fullwidth?: boolean;
13
+ id: string;
14
+ label?: string;
15
+ method?: 'get' | 'post' | 'dialog';
16
+ name?: string;
17
+ placeholder?: string;
18
+ suggestions?: SearchSuggestion[];
19
+ value?: string | undefined;
20
+ onSearch?: (value: string) => void;
21
+ onSuggestionClick?: (index: number) => void;
22
+ }
23
+ export declare const PktSearchInput: React.ForwardRefExoticComponent<Omit<ISearchInput, "ref"> & React.RefAttributes<HTMLFormElement & HTMLDivElement>>;
24
+ export {};
@@ -25,5 +25,6 @@ export interface IPktTextinput extends InputHTMLAttributes<HTMLInputElement> {
25
25
  type?: string;
26
26
  useWrapper?: boolean;
27
27
  value?: string;
28
+ omitSearchIcon?: boolean;
28
29
  }
29
30
  export declare const PktTextinput: React.ForwardRefExoticComponent<IPktTextinput & React.RefAttributes<HTMLInputElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@oslokommune/punkt-assets": "^9.2.2",
36
- "@oslokommune/punkt-css": "^9.4.0",
36
+ "@oslokommune/punkt-css": "^9.5.0",
37
37
  "@testing-library/jest-dom": "^5.16.5",
38
38
  "@testing-library/react": "^14.0.0",
39
39
  "@testing-library/user-event": "^14.4.3",
@@ -91,5 +91,5 @@
91
91
  "url": "https://github.com/oslokommune/punkt/issues"
92
92
  },
93
93
  "license": "MIT",
94
- "gitHead": "83be982bc70185235a77feda8a8628bb44964aba"
94
+ "gitHead": "b3440f0d1a9cec53e08bb5fdaae88bf6c74b586e"
95
95
  }
@@ -7,12 +7,13 @@ export { PktFooter } from './footer/Footer'
7
7
  export { PktFooterSimple } from './footerSimple/FooterSimple'
8
8
  export { PktHeader } from './header/Header'
9
9
  export { PktIcon } from './icon/Icon'
10
- export { PktIconContext } from './icon/IconContext';
10
+ export { PktIconContext } from './icon/IconContext'
11
11
  export { PktInput } from './input/Input'
12
12
  export { PktInputWrapper } from './inputwrapper/InputWrapper'
13
13
  export { PktLinkCard } from './linkcard/LinkCard'
14
14
  export { PktMessagebox } from './messagebox/Messagebox'
15
15
  export { PktRadioButton } from './radio/RadioButton'
16
+ export { PktSearchInput } from './searchinput/SearchInput'
16
17
  export { PktSelect } from './select/Select'
17
18
  export { PktTable } from './table/Table'
18
19
  export { PktTableData } from './table/TableData'
@@ -23,13 +23,21 @@ export const PktLinkCard = forwardRef(
23
23
  external = false,
24
24
  title,
25
25
  ...props
26
- }: IPktLinkCard, ref: ForwardedRef<HTMLAnchorElement>
26
+ }: IPktLinkCard,
27
+ ref: ForwardedRef<HTMLAnchorElement>,
27
28
  ) => {
28
- const classes = [className, 'pkt-linkcard', skin && `pkt-linkcard--${skin}`].filter(Boolean).join(' ')
29
+ const classes = [className, 'pkt-linkcard', skin && `pkt-linkcard--${skin}`]
30
+ .filter(Boolean)
31
+ .join(' ')
29
32
  return (
30
- <a {...props} href={href} className={`pkt-linkcard pkt-link ${classes}`}
33
+ <a
34
+ {...props}
35
+ href={href}
36
+ className={`pkt-linkcard pkt-link ${classes}`}
31
37
  target={openInNewTab ? '_blank' : '_self'}
32
- rel={openInNewTab ? 'noopener noreferrer' : undefined} ref={ref}>
38
+ rel={openInNewTab ? 'noopener noreferrer' : undefined}
39
+ ref={ref}
40
+ >
33
41
  <PktIcon className="pkt-link__icon" name={iconName}></PktIcon>
34
42
  <div className="pkt-linkcard__content">
35
43
  <div className={`pkt-linkcard__title ${external ? 'pkt-link pkt-link--external' : ''}`}>
@@ -0,0 +1,80 @@
1
+ import '@testing-library/jest-dom/extend-expect'
2
+
3
+ import { fireEvent, render, screen } from '@testing-library/react'
4
+ import { axe, toHaveNoViolations } from 'jest-axe'
5
+ import React from 'react'
6
+
7
+ import { PktSearchInput } from './SearchInput'
8
+
9
+ expect.extend(toHaveNoViolations)
10
+
11
+ describe('PktSearchInput', () => {
12
+ it('renders with form element when action prop exists', () => {
13
+ const { container } = render(<PktSearchInput id="test-search-input" action="/search" />)
14
+ expect(container.querySelector('form')).toBeInTheDocument()
15
+ })
16
+
17
+ it('renders with div element when action prop does not exist', () => {
18
+ const { container } = render(<PktSearchInput id="test-search-input" />)
19
+ expect(container.querySelector('div')).toBeInTheDocument()
20
+ expect(container.querySelector('form')).not.toBeInTheDocument();
21
+ })
22
+
23
+ it('renders with label element when label prop exists', () => {
24
+ const { container } = render(<PktSearchInput id="test-search-input" label="Test Label" />)
25
+ expect(container.querySelector('label')).toBeInTheDocument()
26
+ })
27
+
28
+ it('renders with div element when label prop does not exist', () => {
29
+ const { container } = render(<PktSearchInput id="test-search-input" />)
30
+ expect(container.querySelector('div')).toBeInTheDocument()
31
+ expect(container.querySelector('label')).not.toBeInTheDocument()
32
+ })
33
+
34
+ it('calls onSearch prop with input value on button click', () => {
35
+ const mockOnSearch = jest.fn()
36
+ const { getByRole, getByPlaceholderText } = render(
37
+ <PktSearchInput id="test-search-input" onSearch={mockOnSearch} />,
38
+ )
39
+
40
+ const inputElement = getByPlaceholderText('Søk…')
41
+ const buttonElement = getByRole('button')
42
+
43
+ // Type a value in the input
44
+ fireEvent.input(inputElement, { target: { value: 'test value' } })
45
+
46
+ // Click the button
47
+ fireEvent.click(buttonElement)
48
+
49
+ // Check if onSearch was called with the correct value
50
+ expect(mockOnSearch).toHaveBeenCalledWith('test value')
51
+ })
52
+
53
+ it('renders search suggestions when suggestions prop exists', () => {
54
+ const suggestions = [
55
+ { title: 'Suggestion 1', onClick: jest.fn() },
56
+ { title: 'Suggestion 2', onClick: jest.fn() },
57
+ ]
58
+
59
+ render(<PktSearchInput id="test-search-input" suggestions={suggestions} />)
60
+
61
+ // Check if suggestion elements are rendered
62
+ suggestions.forEach((suggestion) => {
63
+ expect(screen.getByText(suggestion.title)).toBeInTheDocument()
64
+ })
65
+ })
66
+
67
+ describe('accessibility', () => {
68
+ it('renders with no wcag errors with axe', async () => {
69
+ const suggestions = [
70
+ { title: 'Suggestion 1', onClick: jest.fn() },
71
+ { title: 'Suggestion 2', onClick: jest.fn() },
72
+ ]
73
+ const { container } = render(
74
+ <PktSearchInput id="test-search-input" label="My label" suggestions={suggestions} />,
75
+ )
76
+ const results = await axe(container)
77
+ expect(results).toHaveNoViolations()
78
+ })
79
+ })
80
+ })