@oslokommune/punkt-react 11.12.3 → 11.12.8

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/accordion/Accordion.d.ts +1 -1
  3. package/dist/components/accordion/AccordionItem.d.ts +1 -1
  4. package/dist/components/alert/Alert.d.ts +1 -1
  5. package/dist/components/backlink/BackLink.d.ts +1 -1
  6. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
  7. package/dist/components/button/Button.d.ts +1 -1
  8. package/dist/components/checkbox/Checkbox.d.ts +1 -1
  9. package/dist/components/footer/Footer.d.ts +1 -1
  10. package/dist/components/footerSimple/FooterSimple.d.ts +1 -1
  11. package/dist/components/header/Header.d.ts +2 -2
  12. package/dist/components/icon/Icon.d.ts +1 -1
  13. package/dist/components/icon/IconContext.d.ts +1 -1
  14. package/dist/components/index.d.ts +4 -1
  15. package/dist/components/input/Input.d.ts +1 -1
  16. package/dist/components/inputwrapper/InputWrapper.d.ts +2 -2
  17. package/dist/components/linkcard/LinkCard.d.ts +1 -1
  18. package/dist/components/loader/Loader.d.ts +1 -1
  19. package/dist/components/messagebox/Messagebox.d.ts +1 -1
  20. package/dist/components/radio/RadioButton.d.ts +1 -1
  21. package/dist/components/searchinput/SearchInput.d.ts +1 -1
  22. package/dist/components/select/Select.d.ts +2 -2
  23. package/dist/components/table/Table.d.ts +7 -7
  24. package/dist/components/table/Table.test.d.ts +1 -1
  25. package/dist/components/table/TableBody.d.ts +7 -0
  26. package/dist/components/table/TableData.d.ts +1 -1
  27. package/dist/components/table/TableDataCell.d.ts +8 -0
  28. package/dist/components/table/TableHeader.d.ts +3 -2
  29. package/dist/components/table/TableHeaderCell.d.ts +7 -0
  30. package/dist/components/table/TableRow.d.ts +7 -0
  31. package/dist/components/tabs/Tabs.d.ts +1 -1
  32. package/dist/components/tag/Tag.d.ts +1 -1
  33. package/dist/components/textarea/Textarea.d.ts +2 -2
  34. package/dist/components/textinput/Textinput.d.ts +1 -1
  35. package/dist/punkt-react.es.js +1414 -1438
  36. package/dist/punkt-react.umd.js +22 -17
  37. package/package.json +14 -14
  38. package/src/components/accordion/Accordion.test.tsx +1 -1
  39. package/src/components/accordion/Accordion.tsx +0 -1
  40. package/src/components/checkbox/Checkbox.test.tsx +4 -10
  41. package/src/components/footer/Footer.test.tsx +11 -14
  42. package/src/components/footerSimple/FooterSimple.test.tsx +27 -30
  43. package/src/components/header/Header.test.tsx +4 -10
  44. package/src/components/header/Header.tsx +1 -1
  45. package/src/components/icon/Icon.test.tsx +3 -7
  46. package/src/components/index.ts +4 -1
  47. package/src/components/inputwrapper/InputWrapper.tsx +7 -27
  48. package/src/components/linkcard/LinkCard.test.tsx +4 -10
  49. package/src/components/loader/Loader.test.tsx +2 -4
  50. package/src/components/radio/RadioButton.test.tsx +45 -44
  51. package/src/components/searchinput/SearchInput.test.tsx +3 -5
  52. package/src/components/searchinput/SearchInput.tsx +9 -28
  53. package/src/components/select/Select.test.tsx +4 -13
  54. package/src/components/select/Select.tsx +1 -1
  55. package/src/components/table/Table.test.tsx +48 -89
  56. package/src/components/table/Table.tsx +24 -23
  57. package/src/components/table/TableBody.tsx +13 -0
  58. package/src/components/table/TableData.tsx +1 -1
  59. package/src/components/table/TableDataCell.tsx +19 -0
  60. package/src/components/table/TableHeader.tsx +8 -2
  61. package/src/components/table/TableHeaderCell.tsx +13 -0
  62. package/src/components/table/TableRow.tsx +13 -0
  63. package/src/components/tag/Tag.test.tsx +1 -1
  64. package/src/components/textarea/Textarea.test.tsx +4 -13
  65. package/src/components/textinput/Textinput.test.tsx +4 -13
  66. package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -137
@@ -1,4 +1,4 @@
1
- (function(T,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(T=typeof globalThis<"u"?globalThis:T||self,g(T["punkt-react"]={},T.React))})(this,function(T,g){"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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const y=Bt(g);function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={exports:{}},se={};/**
1
+ (function(C,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(C=typeof globalThis<"u"?globalThis:C||self,g(C["punkt-react"]={},C.React))})(this,function(C,g){"use strict";function Bt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const N=Bt(g);function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Se={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 Xe;function Yt(){if(Xe)return se;Xe=1;var e=g,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(s,f,u){var d,k={},v=null,R=null;u!==void 0&&(v=""+u),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(R=f.ref);for(d in f)a.call(f,d)&&!o.hasOwnProperty(d)&&(k[d]=f[d]);if(s&&s.defaultProps)for(d in f=s.defaultProps,f)k[d]===void 0&&(k[d]=f[d]);return{$$typeof:n,type:s,key:v,ref:R,props:k,_owner:l.current}}return se.Fragment=r,se.jsx=c,se.jsxs=c,se}var ce={};/**
9
+ */var Xe;function Mt(){if(Xe)return oe;Xe=1;var e=g,r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(o,f,u){var d,h={},k=null,S=null;u!==void 0&&(k=""+u),f.key!==void 0&&(k=""+f.key),f.ref!==void 0&&(S=f.ref);for(d in f)s.call(f,d)&&!i.hasOwnProperty(d)&&(h[d]=f[d]);if(o&&o.defaultProps)for(d in f=o.defaultProps,f)h[d]===void 0&&(h[d]=f[d]);return{$$typeof:r,type:o,key:k,ref:S,props:h,_owner:l.current}}return oe.Fragment=a,oe.jsx=c,oe.jsxs=c,oe}var ce={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,18 +14,23 @@
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 Ze;function Kt(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){var e=g,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),x=Symbol.iterator,$="@@iterator";function I(t){if(t===null||typeof t!="object")return null;var p=x&&t[x]||t[$];return typeof p=="function"?p:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(t){{for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];_("error",t,m)}}function _(t,p,m){{var N=E.ReactDebugCurrentFrame,O=N.getStackAddendum();O!==""&&(p+="%s",m=m.concat([O]));var D=m.map(function(S){return String(S)});D.unshift("Warning: "+p),Function.prototype.apply.call(console[t],console,D)}}var j=!1,A=!1,M=!1,Y=!1,z=!1,B;B=Symbol.for("react.module.reference");function q(t){return!!(typeof t=="string"||typeof t=="function"||t===a||t===o||z||t===l||t===u||t===d||Y||t===R||j||A||M||typeof t=="object"&&t!==null&&(t.$$typeof===v||t.$$typeof===k||t.$$typeof===c||t.$$typeof===s||t.$$typeof===f||t.$$typeof===B||t.getModuleId!==void 0))}function G(t,p,m){var N=t.displayName;if(N)return N;var O=p.displayName||p.name||"";return O!==""?m+"("+O+")":m}function K(t){return t.displayName||"Context"}function V(t){if(t==null)return null;if(typeof t.tag=="number"&&C("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 a:return"Fragment";case r:return"Portal";case o:return"Profiler";case l:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case s:var p=t;return K(p)+".Consumer";case c:var m=t;return K(m._context)+".Provider";case f:return G(t,t.render,"ForwardRef");case k:var N=t.displayName||null;return N!==null?N:V(t.type)||"Memo";case v:{var O=t,D=O._payload,S=O._init;try{return V(S(D))}catch{return null}}}return null}var b=Object.assign,W=0,ee,te,me,wt,Et,Ct,xt;function Pt(){}Pt.__reactDisabledLog=!0;function tr(){{if(W===0){ee=console.log,te=console.info,me=console.warn,wt=console.error,Et=console.group,Ct=console.groupCollapsed,xt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Pt,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}W++}}function nr(){{if(W--,W===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:b({},t,{value:ee}),info:b({},t,{value:te}),warn:b({},t,{value:me}),error:b({},t,{value:wt}),group:b({},t,{value:Et}),groupCollapsed:b({},t,{value:Ct}),groupEnd:b({},t,{value:xt})})}W<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Me=E.ReactCurrentDispatcher,Ye;function Ee(t,p,m){{if(Ye===void 0)try{throw Error()}catch(O){var N=O.stack.trim().match(/\n( *(at )?)/);Ye=N&&N[1]||""}return`
18
- `+Ye+t}}var Ke=!1,Ce;{var rr=typeof WeakMap=="function"?WeakMap:Map;Ce=new rr}function St(t,p){if(!t||Ke)return"";{var m=Ce.get(t);if(m!==void 0)return m}var N;Ke=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=Me.current,Me.current=null,tr();try{if(p){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(Q){N=Q}Reflect.construct(t,[],S)}else{try{S.call()}catch(Q){N=Q}t.call(S.prototype)}}else{try{throw Error()}catch(Q){N=Q}t()}}catch(Q){if(Q&&N&&typeof Q.stack=="string"){for(var P=Q.stack.split(`
19
- `),J=N.stack.split(`
20
- `),F=P.length-1,U=J.length-1;F>=1&&U>=0&&P[F]!==J[U];)U--;for(;F>=1&&U>=0;F--,U--)if(P[F]!==J[U]){if(F!==1||U!==1)do if(F--,U--,U<0||P[F]!==J[U]){var H=`
21
- `+P[F].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),typeof t=="function"&&Ce.set(t,H),H}while(F>=1&&U>=0);break}}}finally{Ke=!1,Me.current=D,nr(),Error.prepareStackTrace=O}var oe=t?t.displayName||t.name:"",Wt=oe?Ee(oe):"";return typeof t=="function"&&Ce.set(t,Wt),Wt}function ar(t,p,m){return St(t,!1)}function lr(t){var p=t.prototype;return!!(p&&p.isReactComponent)}function xe(t,p,m){if(t==null)return"";if(typeof t=="function")return St(t,lr(t));if(typeof t=="string")return Ee(t);switch(t){case u:return Ee("Suspense");case d:return Ee("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return ar(t.render);case k:return xe(t.type,p,m);case v:{var N=t,O=N._payload,D=N._init;try{return xe(D(O),p,m)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,Rt={},Tt=E.ReactDebugCurrentFrame;function Se(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);Tt.setExtraStackFrame(m)}else Tt.setExtraStackFrame(null)}function ir(t,p,m,N,O){{var D=Function.call.bind(Pe);for(var S in t)if(D(t,S)){var P=void 0;try{if(typeof t[S]!="function"){var J=Error((N||"React class")+": "+m+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw J.name="Invariant Violation",J}P=t[S](p,S,N,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){P=F}P&&!(P instanceof Error)&&(Se(O),C("%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).",N||"React class",m,S,typeof P),Se(null)),P instanceof Error&&!(P.message in Rt)&&(Rt[P.message]=!0,Se(O),C("Failed %s type: %s",m,P.message),Se(null))}}}var or=Array.isArray;function Je(t){return or(t)}function sr(t){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&t[Symbol.toStringTag]||t.constructor.name||"Object";return m}}function cr(t){try{return Ot(t),!1}catch{return!0}}function Ot(t){return""+t}function $t(t){if(cr(t))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",sr(t)),Ot(t)}var he=E.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},jt,Dt,ze;ze={};function fr(t){if(Pe.call(t,"ref")){var p=Object.getOwnPropertyDescriptor(t,"ref").get;if(p&&p.isReactWarning)return!1}return t.ref!==void 0}function pr(t){if(Pe.call(t,"key")){var p=Object.getOwnPropertyDescriptor(t,"key").get;if(p&&p.isReactWarning)return!1}return t.key!==void 0}function dr(t,p){if(typeof t.ref=="string"&&he.current&&p&&he.current.stateNode!==p){var m=V(he.current.type);ze[m]||(C('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',V(he.current.type),t.ref),ze[m]=!0)}}function mr(t,p){{var m=function(){jt||(jt=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"key",{get:m,configurable:!0})}}function hr(t,p){{var m=function(){Dt||(Dt=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"ref",{get:m,configurable:!0})}}var kr=function(t,p,m,N,O,D,S){var P={$$typeof:n,type:t,key:p,ref:m,props:S,_owner:D};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function vr(t,p,m,N,O){{var D,S={},P=null,J=null;m!==void 0&&($t(m),P=""+m),pr(p)&&($t(p.key),P=""+p.key),fr(p)&&(J=p.ref,dr(p,O));for(D in p)Pe.call(p,D)&&!ur.hasOwnProperty(D)&&(S[D]=p[D]);if(t&&t.defaultProps){var F=t.defaultProps;for(D in F)S[D]===void 0&&(S[D]=F[D])}if(P||J){var U=typeof t=="function"?t.displayName||t.name||"Unknown":t;P&&mr(S,U),J&&hr(S,U)}return kr(t,P,J,O,N,he.current,S)}}var qe=E.ReactCurrentOwner,It=E.ReactDebugCurrentFrame;function ie(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);It.setExtraStackFrame(m)}else It.setExtraStackFrame(null)}var Ge;Ge=!1;function He(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Lt(){{if(qe.current){var t=V(qe.current.type);if(t)return`
17
+ */var Ze;function Yt(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){var e=g,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),y=Symbol.iterator,O="@@iterator";function D(n){if(n===null||typeof n!="object")return null;var p=y&&n[y]||n[O];return typeof p=="function"?p:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(n){{for(var p=arguments.length,m=new Array(p>1?p-1:0),x=1;x<p;x++)m[x-1]=arguments[x];v("error",n,m)}}function v(n,p,m){{var x=R.ReactDebugCurrentFrame,T=x.getStackAddendum();T!==""&&(p+="%s",m=m.concat([T]));var $=m.map(function(P){return String(P)});$.unshift("Warning: "+p),Function.prototype.apply.call(console[n],console,$)}}var w=!1,V=!1,B=!1,W=!1,M=!1,Y;Y=Symbol.for("react.module.reference");function K(n){return!!(typeof n=="string"||typeof n=="function"||n===s||n===i||M||n===l||n===u||n===d||W||n===S||w||V||B||typeof n=="object"&&n!==null&&(n.$$typeof===k||n.$$typeof===h||n.$$typeof===c||n.$$typeof===o||n.$$typeof===f||n.$$typeof===Y||n.getModuleId!==void 0))}function q(n,p,m){var x=n.displayName;if(x)return x;var T=p.displayName||p.name||"";return T!==""?m+"("+T+")":m}function z(n){return n.displayName||"Context"}function L(n){if(n==null)return null;if(typeof n.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case s:return"Fragment";case a:return"Portal";case i:return"Profiler";case l:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case o:var p=n;return z(p)+".Consumer";case c:var m=n;return z(m._context)+".Provider";case f:return q(n,n.render,"ForwardRef");case h:var x=n.displayName||null;return x!==null?x:L(n.type)||"Memo";case k:{var T=n,$=T._payload,P=T._init;try{return L(P($))}catch{return null}}}return null}var b=Object.assign,U=0,Z,Q,me,Nt,jt,yt,wt;function Et(){}Et.__reactDisabledLog=!0;function nr(){{if(U===0){Z=console.log,Q=console.info,me=console.warn,Nt=console.error,jt=console.group,yt=console.groupCollapsed,wt=console.groupEnd;var n={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})}U++}}function rr(){{if(U--,U===0){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:b({},n,{value:Z}),info:b({},n,{value:Q}),warn:b({},n,{value:me}),error:b({},n,{value:Nt}),group:b({},n,{value:jt}),groupCollapsed:b({},n,{value:yt}),groupEnd:b({},n,{value:wt})})}U<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var We=R.ReactCurrentDispatcher,Me;function we(n,p,m){{if(Me===void 0)try{throw Error()}catch(T){var x=T.stack.trim().match(/\n( *(at )?)/);Me=x&&x[1]||""}return`
18
+ `+Me+n}}var Ye=!1,Ee;{var ar=typeof WeakMap=="function"?WeakMap:Map;Ee=new ar}function Ct(n,p){if(!n||Ye)return"";{var m=Ee.get(n);if(m!==void 0)return m}var x;Ye=!0;var T=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=We.current,We.current=null,nr();try{if(p){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(G){x=G}Reflect.construct(n,[],P)}else{try{P.call()}catch(G){x=G}n.call(P.prototype)}}else{try{throw Error()}catch(G){x=G}n()}}catch(G){if(G&&x&&typeof G.stack=="string"){for(var E=G.stack.split(`
19
+ `),J=x.stack.split(`
20
+ `),F=E.length-1,A=J.length-1;F>=1&&A>=0&&E[F]!==J[A];)A--;for(;F>=1&&A>=0;F--,A--)if(E[F]!==J[A]){if(F!==1||A!==1)do if(F--,A--,A<0||E[F]!==J[A]){var H=`
21
+ `+E[F].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),typeof n=="function"&&Ee.set(n,H),H}while(F>=1&&A>=0);break}}}finally{Ye=!1,We.current=$,rr(),Error.prepareStackTrace=T}var ie=n?n.displayName||n.name:"",te=ie?we(ie):"";return typeof n=="function"&&Ee.set(n,te),te}function sr(n,p,m){return Ct(n,!1)}function lr(n){var p=n.prototype;return!!(p&&p.isReactComponent)}function Ce(n,p,m){if(n==null)return"";if(typeof n=="function")return Ct(n,lr(n));if(typeof n=="string")return we(n);switch(n){case u:return we("Suspense");case d:return we("SuspenseList")}if(typeof n=="object")switch(n.$$typeof){case f:return sr(n.render);case h:return Ce(n.type,p,m);case k:{var x=n,T=x._payload,$=x._init;try{return Ce($(T),p,m)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,Pt={},St=R.ReactDebugCurrentFrame;function Pe(n){if(n){var p=n._owner,m=Ce(n.type,n._source,p?p.type:null);St.setExtraStackFrame(m)}else St.setExtraStackFrame(null)}function ir(n,p,m,x,T){{var $=Function.call.bind(he);for(var P in n)if($(n,P)){var E=void 0;try{if(typeof n[P]!="function"){var J=Error((x||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof n[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw J.name="Invariant Violation",J}E=n[P](p,P,x,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){E=F}E&&!(E instanceof Error)&&(Pe(T),_("%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).",x||"React class",m,P,typeof E),Pe(null)),E instanceof Error&&!(E.message in Pt)&&(Pt[E.message]=!0,Pe(T),_("Failed %s type: %s",m,E.message),Pe(null))}}}var or=Array.isArray;function Ke(n){return or(n)}function cr(n){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&n[Symbol.toStringTag]||n.constructor.name||"Object";return m}}function ur(n){try{return Rt(n),!1}catch{return!0}}function Rt(n){return""+n}function Tt(n){if(ur(n))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(n)),Rt(n)}var ke=R.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Ot,$t,ze;ze={};function pr(n){if(he.call(n,"ref")){var p=Object.getOwnPropertyDescriptor(n,"ref").get;if(p&&p.isReactWarning)return!1}return n.ref!==void 0}function dr(n){if(he.call(n,"key")){var p=Object.getOwnPropertyDescriptor(n,"key").get;if(p&&p.isReactWarning)return!1}return n.key!==void 0}function mr(n,p){if(typeof n.ref=="string"&&ke.current&&p&&ke.current.stateNode!==p){var m=L(ke.current.type);ze[m]||(_('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(ke.current.type),n.ref),ze[m]=!0)}}function hr(n,p){{var m=function(){Ot||(Ot=!0,_("%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)",p))};m.isReactWarning=!0,Object.defineProperty(n,"key",{get:m,configurable:!0})}}function kr(n,p){{var m=function(){$t||($t=!0,_("%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)",p))};m.isReactWarning=!0,Object.defineProperty(n,"ref",{get:m,configurable:!0})}}var vr=function(n,p,m,x,T,$,P){var E={$$typeof:r,type:n,key:p,ref:m,props:P,_owner:$};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:x}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function _r(n,p,m,x,T){{var $,P={},E=null,J=null;m!==void 0&&(Tt(m),E=""+m),dr(p)&&(Tt(p.key),E=""+p.key),pr(p)&&(J=p.ref,mr(p,T));for($ in p)he.call(p,$)&&!fr.hasOwnProperty($)&&(P[$]=p[$]);if(n&&n.defaultProps){var F=n.defaultProps;for($ in F)P[$]===void 0&&(P[$]=F[$])}if(E||J){var A=typeof n=="function"?n.displayName||n.name||"Unknown":n;E&&hr(P,A),J&&kr(P,A)}return vr(n,E,J,T,x,ke.current,P)}}var Je=R.ReactCurrentOwner,Dt=R.ReactDebugCurrentFrame;function le(n){if(n){var p=n._owner,m=Ce(n.type,n._source,p?p.type:null);Dt.setExtraStackFrame(m)}else Dt.setExtraStackFrame(null)}var qe;qe=!1;function Ge(n){return typeof n=="object"&&n!==null&&n.$$typeof===r}function It(){{if(Je.current){var n=L(Je.current.type);if(n)return`
22
22
 
23
- Check the render method of \``+t+"`."}return""}}function _r(t){{if(t!==void 0){var p=t.fileName.replace(/^.*[\\\/]/,""),m=t.lineNumber;return`
23
+ Check the render method of \``+n+"`."}return""}}function br(n){{if(n!==void 0){var p=n.fileName.replace(/^.*[\\\/]/,""),m=n.lineNumber;return`
24
24
 
25
- Check your code at `+p+":"+m+"."}return""}}var Ft={};function br(t){{var p=Lt();if(!p){var m=typeof t=="string"?t:t.displayName||t.name;m&&(p=`
25
+ Check your code at `+p+":"+m+"."}return""}}var Ft={};function gr(n){{var p=It();if(!p){var m=typeof n=="string"?n:n.displayName||n.name;m&&(p=`
26
26
 
27
- Check the top-level render call using <`+m+">.")}return p}}function Ut(t,p){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var m=br(p);if(Ft[m])return;Ft[m]=!0;var N="";t&&t._owner&&t._owner!==qe.current&&(N=" It was passed a child from "+V(t._owner.type)+"."),ie(t),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,N),ie(null)}}function At(t,p){{if(typeof t!="object")return;if(Je(t))for(var m=0;m<t.length;m++){var N=t[m];He(N)&&Ut(N,p)}else if(He(t))t._store&&(t._store.validated=!0);else if(t){var O=I(t);if(typeof O=="function"&&O!==t.entries)for(var D=O.call(t),S;!(S=D.next()).done;)He(S.value)&&Ut(S.value,p)}}}function gr(t){{var p=t.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===k))m=p.propTypes;else return;if(m){var N=V(p);ir(m,t.props,"prop",N,t)}else if(p.PropTypes!==void 0&&!Ge){Ge=!0;var O=V(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nr(t){{for(var p=Object.keys(t.props),m=0;m<p.length;m++){var N=p[m];if(N!=="children"&&N!=="key"){ie(t),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),ie(null);break}}t.ref!==null&&(ie(t),C("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}function Vt(t,p,m,N,O,D){{var S=q(t);if(!S){var P="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(P+=" 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 J=_r(O);J?P+=J:P+=Lt();var F;t===null?F="null":Je(t)?F="array":t!==void 0&&t.$$typeof===n?(F="<"+(V(t.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):F=typeof t,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,P)}var U=vr(t,p,m,O,D);if(U==null)return U;if(S){var H=p.children;if(H!==void 0)if(N)if(Je(H)){for(var oe=0;oe<H.length;oe++)At(H[oe],t);Object.freeze&&Object.freeze(H)}else C("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 At(H,t)}return t===a?Nr(U):gr(U),U}}function yr(t,p,m){return Vt(t,p,m,!0)}function wr(t,p,m){return Vt(t,p,m,!1)}var Er=wr,Cr=yr;ce.Fragment=a,ce.jsx=Er,ce.jsxs=Cr}()),ce}process.env.NODE_ENV==="production"?Re.exports=Yt():Re.exports=Kt();var Te=Re.exports;const X=Te.Fragment,i=Te.jsx,h=Te.jsxs,Oe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/11.12/icons/";function zt(e){return new Promise(n=>setTimeout(n,e))}const $e={},qt=async(e,n)=>{let r=0;for(;$e[n+e+".svg"]==="fetching"&&(r++,!(r>50));)await zt(50);return localStorage.getItem(n+e+".svg")?Promise.resolve(localStorage.getItem(n+e+".svg")):typeof window.fetch=="function"?($e[n+e+".svg"]="fetching",Promise.resolve(fetch(n+e+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+n+e+".svg"),Oe)).then(a=>(a!==Oe&&localStorage.setItem(n+e+".svg",a),$e[n+e+".svg"]="fetched",a)))):Promise.resolve(Oe)},Gt={fetchIcon:async(e,n)=>qt(e,n||Jt)},Qe=g.createContext(Gt),w=({name:e,path:n,className:r="",...a})=>{const[l,o]=g.useState(null),c=g.useContext(Qe);return g.useEffect(()=>{e?c.fetchIcon(e,n).then(o):o(null)},[e,n]),l?i("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:l},...a}):null},et=g.forwardRef(({children:e,className:n,skin:r="info",closeAlert:a=!1,onClose:l,title:o,date:c,ariaLive:s="polite",compact:f=!1,...u},d)=>{const k=[n,"pkt-alert",r&&`pkt-alert--${r}`,f&&"pkt-alert--compact"].filter(Boolean).join(" "),[v,R]=g.useState(!0),x=()=>{R(!1),l&&l()};return v?h("div",{...u,className:k,"aria-live":s,ref:d,children:[i(w,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),a&&i("div",{className:"pkt-alert__close",children:i("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:x,children:i(w,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&i("div",{className:"pkt-alert__title",children:o}),i("div",{className:"pkt-alert__text",children:e}),c&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",c]})]}):null}),Ht=g.forwardRef(({href:e,text:n,onClick:r,className:a,...l},o)=>{const c=[a,"pkt-back-link"].filter(Boolean).join(" ");return i("nav",{ref:o,className:c,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:f=>{r&&r(f)},...l,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),i("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
28
- * @remix-run/router v1.14.0
27
+ Check the top-level render call using <`+m+">.")}return p}}function Lt(n,p){{if(!n._store||n._store.validated||n.key!=null)return;n._store.validated=!0;var m=gr(p);if(Ft[m])return;Ft[m]=!0;var x="";n&&n._owner&&n._owner!==Je.current&&(x=" It was passed a child from "+L(n._owner.type)+"."),le(n),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,x),le(null)}}function At(n,p){{if(typeof n!="object")return;if(Ke(n))for(var m=0;m<n.length;m++){var x=n[m];Ge(x)&&Lt(x,p)}else if(Ge(n))n._store&&(n._store.validated=!0);else if(n){var T=D(n);if(typeof T=="function"&&T!==n.entries)for(var $=T.call(n),P;!(P=$.next()).done;)Ge(P.value)&&Lt(P.value,p)}}}function xr(n){{var p=n.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===h))m=p.propTypes;else return;if(m){var x=L(p);ir(m,n.props,"prop",x,n)}else if(p.PropTypes!==void 0&&!qe){qe=!0;var T=L(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nr(n){{for(var p=Object.keys(n.props),m=0;m<p.length;m++){var x=p[m];if(x!=="children"&&x!=="key"){le(n),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),le(null);break}}n.ref!==null&&(le(n),_("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var Ut={};function Vt(n,p,m,x,T,$){{var P=K(n);if(!P){var E="";(n===void 0||typeof n=="object"&&n!==null&&Object.keys(n).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 J=br(T);J?E+=J:E+=It();var F;n===null?F="null":Ke(n)?F="array":n!==void 0&&n.$$typeof===r?(F="<"+(L(n.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):F=typeof 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,E)}var A=_r(n,p,m,T,$);if(A==null)return A;if(P){var H=p.children;if(H!==void 0)if(x)if(Ke(H)){for(var ie=0;ie<H.length;ie++)At(H[ie],n);Object.freeze&&Object.freeze(H)}else _("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 At(H,n)}if(he.call(p,"key")){var te=L(n),G=Object.keys(p).filter(function(Pr){return Pr!=="key"}),He=G.length>0?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}";if(!Ut[te+He]){var Cr=G.length>0?"{"+G.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
28
+ let props = %s;
29
+ <%s {...props} />
30
+ React keys must be passed directly to JSX without using spread:
31
+ let props = %s;
32
+ <%s key={someKey} {...props} />`,He,te,Cr,te),Ut[te+He]=!0}}return n===s?Nr(A):xr(A),A}}function jr(n,p,m){return Vt(n,p,m,!0)}function yr(n,p,m){return Vt(n,p,m,!1)}var wr=yr,Er=jr;ce.Fragment=s,ce.jsx=wr,ce.jsxs=Er}()),ce}process.env.NODE_ENV==="production"?Se.exports=Mt():Se.exports=Yt();var t=Se.exports;const Re='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Kt="https://punkt-cdn.oslo.kommune.no/11.12/icons/";function zt(e){return new Promise(r=>setTimeout(r,e))}const Te={},Jt=async(e,r)=>{let a=0;for(;Te[r+e+".svg"]==="fetching"&&(a++,!(a>50));)await zt(50);return localStorage.getItem(r+e+".svg")?Promise.resolve(localStorage.getItem(r+e+".svg")):typeof window.fetch=="function"?(Te[r+e+".svg"]="fetching",Promise.resolve(fetch(r+e+".svg").then(s=>s.ok?s.text():(console.error("Missing icon: "+r+e+".svg"),Re)).then(s=>(s!==Re&&localStorage.setItem(r+e+".svg",s),Te[r+e+".svg"]="fetched",s)))):Promise.resolve(Re)},qt={fetchIcon:async(e,r)=>Jt(e,r||Kt)},Qe=g.createContext(qt),j=({name:e,path:r,className:a="",...s})=>{const[l,i]=g.useState(null),c=g.useContext(Qe);return g.useEffect(()=>{e?c.fetchIcon(e,r).then(i):i(null)},[e,r]),l?t.jsx("span",{className:`pkt-icon ${a}`,dangerouslySetInnerHTML:{__html:l},...s}):null},et=g.forwardRef(({children:e,className:r,skin:a="info",closeAlert:s=!1,onClose:l,title:i,date:c,ariaLive:o="polite",compact:f=!1,...u},d)=>{const h=[r,"pkt-alert",a&&`pkt-alert--${a}`,f&&"pkt-alert--compact"].filter(Boolean).join(" "),[k,S]=g.useState(!0),y=()=>{S(!1),l&&l()};return k?t.jsxs("div",{...u,className:h,"aria-live":o,ref:d,children:[t.jsx(j,{className:"pkt-alert__icon",name:a==="info"?"alert-information":`alert-${a}`}),s&&t.jsx("div",{className:"pkt-alert__close",children:t.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:y,children:t.jsx(j,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&t.jsx("div",{className:"pkt-alert__title",children:i}),t.jsx("div",{className:"pkt-alert__text",children:e}),c&&t.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",c]})]}):null}),Gt=g.forwardRef(({href:e,text:r,onClick:a,className:s,...l},i)=>{const c=[s,"pkt-back-link"].filter(Boolean).join(" "),o=f=>{a&&a(f)};return t.jsx("nav",{ref:i,className:c,"aria-label":"Gå tilbake et steg",children:t.jsxs("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:o,...l,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),t.jsx("span",{className:"pkt-back-link__text",children:r||"Forsiden"})]})})});/**
33
+ * @remix-run/router v1.16.0
29
34
  *
30
35
  * Copyright (c) Remix Software Inc.
31
36
  *
@@ -33,8 +38,8 @@ Check the top-level render call using <`+m+">.")}return p}}function Ut(t,p){{if(
33
38
  * LICENSE.md file in the root directory of this source tree.
34
39
  *
35
40
  * @license MIT
36
- */function je(){return je=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},je.apply(this,arguments)}var tt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tt||(tt={}));function L(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ne(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function De(e){let{pathname:n="/",search:r="",hash:a=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),n}function nt(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substr(a),e=e.substr(0,a)),e&&(n.pathname=e)}return n}var rt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rt||(rt={}));function at(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Xt(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),s=l.slice(1);return{params:a.reduce((u,d,k)=>{let{paramName:v,isOptional:R}=d;if(v==="*"){let $=s[k]||"";c=o.slice(0,o.length-$.length).replace(/(.)\/+$/,"$1")}const x=s[k];return R&&!x?u[v]=void 0:u[v]=Zt(x||"",v),u},{}),pathname:o,pathnameBase:c,pattern:e}}function Xt(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),ne(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(c,s,f)=>(a.push({paramName:s,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),a]}function Zt(e,n){try{return decodeURIComponent(e)}catch(r){return ne(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function ue(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Qt(e,n){n===void 0&&(n="/");let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?nt(e):e;return{pathname:r?r.startsWith("/")?r:en(r,n):n,search:nn(a),hash:rn(l)}}function en(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function Ie(e,n,r,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(a)+"]. 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 tn(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function lt(e,n){let r=tn(e);return n?r.map((a,l)=>l===e.length-1?a.pathname:a.pathnameBase):r.map(a=>a.pathnameBase)}function it(e,n,r,a){a===void 0&&(a=!1);let l;typeof e=="string"?l=nt(e):(l=je({},e),L(!l.pathname||!l.pathname.includes("?"),Ie("?","pathname","search",l)),L(!l.pathname||!l.pathname.includes("#"),Ie("#","pathname","hash",l)),L(!l.search||!l.search.includes("#"),Ie("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,s;if(c==null)s=r;else if(a){let k=n.length===0?[]:n[n.length-1].replace(/^\//,"").split("/");if(c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),k.pop();l.pathname=v.join("/")}s="/"+k.join("/")}else{let k=n.length-1;if(c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),k-=1;l.pathname=v.join("/")}s=k>=0?n[k]:"/"}let f=Qt(l,s),u=c&&c!=="/"&&c.endsWith("/"),d=(o||c===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(u||d)&&(f.pathname+="/"),f}const Le=e=>e.join("/").replace(/\/\/+/g,"/"),nn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ot=["post","put","patch","delete"];new Set(ot);const an=["get",...ot];new Set(an);/**
37
- * React Router v6.21.0
41
+ */function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Oe.apply(this,arguments)}var tt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tt||(tt={}));function I(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function ue(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function $e(e){let{pathname:r="/",search:a="",hash:s=""}=e;return a&&a!=="?"&&(r+=a.charAt(0)==="?"?a:"?"+a),s&&s!=="#"&&(r+=s.charAt(0)==="#"?s:"#"+s),r}function nt(e){let r={};if(e){let a=e.indexOf("#");a>=0&&(r.hash=e.substr(a),e=e.substr(0,a));let s=e.indexOf("?");s>=0&&(r.search=e.substr(s),e=e.substr(0,s)),e&&(r.pathname=e)}return r}var rt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(rt||(rt={}));function at(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,s]=Ht(e.path,e.caseSensitive,e.end),l=r.match(a);if(!l)return null;let i=l[0],c=i.replace(/(.)\/+$/,"$1"),o=l.slice(1);return{params:s.reduce((u,d,h)=>{let{paramName:k,isOptional:S}=d;if(k==="*"){let O=o[h]||"";c=i.slice(0,i.length-O.length).replace(/(.)\/+$/,"$1")}const y=o[h];return S&&!y?u[k]=void 0:u[k]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:c,pattern:e}}function Ht(e,r,a){r===void 0&&(r=!1),a===void 0&&(a=!0),ue(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,o,f)=>(s.push({paramName:o,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),s]}function ne(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,s=e.charAt(a);return s&&s!=="/"?null:e.slice(a)||"/"}function Xt(e,r){r===void 0&&(r="/");let{pathname:a,search:s="",hash:l=""}=typeof e=="string"?nt(e):e;return{pathname:a?a.startsWith("/")?a:Zt(a,r):r,search:en(s),hash:tn(l)}}function Zt(e,r){let a=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function De(e,r,a,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+r+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Qt(e){return e.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function st(e,r){let a=Qt(e);return r?a.map((s,l)=>l===e.length-1?s.pathname:s.pathnameBase):a.map(s=>s.pathnameBase)}function lt(e,r,a,s){s===void 0&&(s=!1);let l;typeof e=="string"?l=nt(e):(l=Oe({},e),I(!l.pathname||!l.pathname.includes("?"),De("?","pathname","search",l)),I(!l.pathname||!l.pathname.includes("#"),De("#","pathname","hash",l)),I(!l.search||!l.search.includes("#"),De("#","search","hash",l)));let i=e===""||l.pathname==="",c=i?"/":l.pathname,o;if(c==null)o=a;else{let h=r.length-1;if(!s&&c.startsWith("..")){let k=c.split("/");for(;k[0]==="..";)k.shift(),h-=1;l.pathname=k.join("/")}o=h>=0?r[h]:"/"}let f=Xt(l,o),u=c&&c!=="/"&&c.endsWith("/"),d=(i||c===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(u||d)&&(f.pathname+="/"),f}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),en=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,it=["post","put","patch","delete"];new Set(it);const nn=["get",...it];new Set(nn);/**
42
+ * React Router v6.23.0
38
43
  *
39
44
  * Copyright (c) Remix Software Inc.
40
45
  *
@@ -42,8 +47,8 @@ Check the top-level render call using <`+m+">.")}return p}}function Ut(t,p){{if(
42
47
  * LICENSE.md file in the root directory of this source tree.
43
48
  *
44
49
  * @license MIT
45
- */function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Fe.apply(this,arguments)}const ke=y.createContext(null);process.env.NODE_ENV!=="production"&&(ke.displayName="DataRouter");const st=y.createContext(null);process.env.NODE_ENV!=="production"&&(st.displayName="DataRouterState");const ln=y.createContext(null);process.env.NODE_ENV!=="production"&&(ln.displayName="Await");const Z=y.createContext(null);process.env.NODE_ENV!=="production"&&(Z.displayName="Navigation");const Ue=y.createContext(null);process.env.NODE_ENV!=="production"&&(Ue.displayName="Location");const re=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const on=y.createContext(null);process.env.NODE_ENV!=="production"&&(on.displayName="RouteError");function sn(e,n){let{relative:r}=n===void 0?{}:n;Ae()||(process.env.NODE_ENV!=="production"?L(!1,"useHref() may be used only in the context of a <Router> component."):L(!1));let{basename:a,navigator:l}=y.useContext(Z),{hash:o,pathname:c,search:s}=pe(e,{relative:r}),f=c;return a!=="/"&&(f=c==="/"?a:Le([a,c])),l.createHref({pathname:f,search:s,hash:o})}function Ae(){return y.useContext(Ue)!=null}function fe(){return Ae()||(process.env.NODE_ENV!=="production"?L(!1,"useLocation() may be used only in the context of a <Router> component."):L(!1)),y.useContext(Ue).location}const ct="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ut(e){y.useContext(Z).static||y.useLayoutEffect(e)}function cn(){let{isDataRoute:e}=y.useContext(re);return e?mn():un()}function un(){Ae()||(process.env.NODE_ENV!=="production"?L(!1,"useNavigate() may be used only in the context of a <Router> component."):L(!1));let e=y.useContext(ke),{basename:n,future:r,navigator:a}=y.useContext(Z),{matches:l}=y.useContext(re),{pathname:o}=fe(),c=JSON.stringify(lt(l,r.v7_relativeSplatPath)),s=y.useRef(!1);return ut(()=>{s.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),process.env.NODE_ENV!=="production"&&ne(s.current,ct),!s.current)return;if(typeof u=="number"){a.go(u);return}let k=it(u,JSON.parse(c),o,d.relative==="path");e==null&&n!=="/"&&(k.pathname=k.pathname==="/"?n:Le([n,k.pathname])),(d.replace?a.replace:a.push)(k,d.state,d)},[n,a,c,o,e])}function pe(e,n){let{relative:r}=n===void 0?{}:n,{future:a}=y.useContext(Z),{matches:l}=y.useContext(re),{pathname:o}=fe(),c=JSON.stringify(lt(l,a.v7_relativeSplatPath));return y.useMemo(()=>it(e,JSON.parse(c),o,r==="path"),[e,c,o,r])}var ft=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ft||{}),Ve=function(e){return 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",e}(Ve||{});function pt(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function fn(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?L(!1,pt(e)):L(!1)),n}function pn(e){let n=y.useContext(re);return n||(process.env.NODE_ENV!=="production"?L(!1,pt(e)):L(!1)),n}function dt(e){let n=pn(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?L(!1,e+' can only be used on routes that contain a unique "id"'):L(!1)),r.route.id}function dn(){return dt(Ve.UseRouteId)}function mn(){let{router:e}=fn(ft.UseNavigateStable),n=dt(Ve.UseNavigateStable),r=y.useRef(!1);return ut(()=>{r.current=!0}),y.useCallback(function(l,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&ne(r.current,ct),r.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Fe({fromRouteId:n},o)))},[e,n])}new Promise(()=>{});/**
46
- * React Router DOM v6.21.0
50
+ */function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Fe.apply(this,arguments)}const ve=N.createContext(null);process.env.NODE_ENV!=="production"&&(ve.displayName="DataRouter");const ot=N.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouterState");const rn=N.createContext(null);process.env.NODE_ENV!=="production"&&(rn.displayName="Await");const X=N.createContext(null);process.env.NODE_ENV!=="production"&&(X.displayName="Navigation");const Le=N.createContext(null);process.env.NODE_ENV!=="production"&&(Le.displayName="Location");const re=N.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const an=N.createContext(null);process.env.NODE_ENV!=="production"&&(an.displayName="RouteError");function sn(e,r){let{relative:a}=r===void 0?{}:r;Ae()||(process.env.NODE_ENV!=="production"?I(!1,"useHref() may be used only in the context of a <Router> component."):I(!1));let{basename:s,navigator:l}=N.useContext(X),{hash:i,pathname:c,search:o}=pe(e,{relative:a}),f=c;return s!=="/"&&(f=c==="/"?s:Ie([s,c])),l.createHref({pathname:f,search:o,hash:i})}function Ae(){return N.useContext(Le)!=null}function fe(){return Ae()||(process.env.NODE_ENV!=="production"?I(!1,"useLocation() may be used only in the context of a <Router> component."):I(!1)),N.useContext(Le).location}const ct="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ut(e){N.useContext(X).static||N.useLayoutEffect(e)}function ln(){let{isDataRoute:e}=N.useContext(re);return e?pn():on()}function on(){Ae()||(process.env.NODE_ENV!=="production"?I(!1,"useNavigate() may be used only in the context of a <Router> component."):I(!1));let e=N.useContext(ve),{basename:r,future:a,navigator:s}=N.useContext(X),{matches:l}=N.useContext(re),{pathname:i}=fe(),c=JSON.stringify(st(l,a.v7_relativeSplatPath)),o=N.useRef(!1);return ut(()=>{o.current=!0}),N.useCallback(function(u,d){if(d===void 0&&(d={}),process.env.NODE_ENV!=="production"&&ue(o.current,ct),!o.current)return;if(typeof u=="number"){s.go(u);return}let h=lt(u,JSON.parse(c),i,d.relative==="path");e==null&&r!=="/"&&(h.pathname=h.pathname==="/"?r:Ie([r,h.pathname])),(d.replace?s.replace:s.push)(h,d.state,d)},[r,s,c,i,e])}function pe(e,r){let{relative:a}=r===void 0?{}:r,{future:s}=N.useContext(X),{matches:l}=N.useContext(re),{pathname:i}=fe(),c=JSON.stringify(st(l,s.v7_relativeSplatPath));return N.useMemo(()=>lt(e,JSON.parse(c),i,a==="path"),[e,c,i,a])}var ft=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ft||{}),Ue=function(e){return 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",e}(Ue||{});function pt(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function cn(e){let r=N.useContext(ve);return r||(process.env.NODE_ENV!=="production"?I(!1,pt(e)):I(!1)),r}function un(e){let r=N.useContext(re);return r||(process.env.NODE_ENV!=="production"?I(!1,pt(e)):I(!1)),r}function dt(e){let r=un(e),a=r.matches[r.matches.length-1];return a.route.id||(process.env.NODE_ENV!=="production"?I(!1,e+' can only be used on routes that contain a unique "id"'):I(!1)),a.route.id}function fn(){return dt(Ue.UseRouteId)}function pn(){let{router:e}=cn(ft.UseNavigateStable),r=dt(Ue.UseNavigateStable),a=N.useRef(!1);return ut(()=>{a.current=!0}),N.useCallback(function(l,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&ue(a.current,ct),a.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Fe({fromRouteId:r},i)))},[e,r])}new Promise(()=>{});/**
51
+ * React Router DOM v6.23.0
47
52
  *
48
53
  * Copyright (c) Remix Software Inc.
49
54
  *
@@ -51,8 +56,8 @@ Check the top-level render call using <`+m+">.")}return p}}function Ut(t,p){{if(
51
56
  * LICENSE.md file in the root directory of this source tree.
52
57
  *
53
58
  * @license MIT
54
- */function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ae.apply(this,arguments)}function We(e,n){if(e==null)return{};var r={},a=Object.keys(e),l,o;for(o=0;o<a.length;o++)l=a[o],!(n.indexOf(l)>=0)&&(r[l]=e[l]);return r}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function hn(e){return be(e)&&e.tagName.toLowerCase()==="button"}function kn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function vn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function _n(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bn(e,n){return e.button===0&&(!n||n==="_self")&&!_n(e)}let ge=null;function gn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const Nn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!Nn.has(e)?(process.env.NODE_ENV!=="production"&&ne(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function yn(e,n){let r,a,l,o,c;if(kn(e)){let s=e.getAttribute("action");a=s?ue(s,n):null,r=e.getAttribute("method")||ve,l=Be(e.getAttribute("enctype"))||_e,o=new FormData(e)}else if(hn(e)||vn(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||s.getAttribute("action");if(a=f?ue(f,n):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||ve,l=Be(e.getAttribute("formenctype"))||Be(s.getAttribute("enctype"))||_e,o=new FormData(s,e),!gn()){let{name:u,type:d,value:k}=e;if(d==="image"){let v=u?u+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else u&&o.append(u,k)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ve,a=null,l=_e,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:c}}const wn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],En=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Cn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],mt=y.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(mt.displayName="ViewTransition");const xn=y.createContext(new Map);process.env.NODE_ENV!=="production"&&(xn.displayName="Fetchers"),process.env.NODE_ENV;const Pn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=y.forwardRef(function(n,r){let{onClick:a,relative:l,reloadDocument:o,replace:c,state:s,target:f,to:u,preventScrollReset:d,unstable_viewTransition:k}=n,v=We(n,wn),{basename:R}=y.useContext(Z),x,$=!1;if(typeof u=="string"&&Sn.test(u)&&(x=u,Pn))try{let _=new URL(window.location.href),j=u.startsWith("//")?new URL(_.protocol+u):new URL(u),A=ue(j.pathname,R);j.origin===_.origin&&A!=null?u=A+j.search+j.hash:$=!0}catch{process.env.NODE_ENV!=="production"&&ne(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let I=sn(u,{relative:l}),E=$n(u,{replace:c,state:s,target:f,preventScrollReset:d,relative:l,unstable_viewTransition:k});function C(_){a&&a(_),_.defaultPrevented||E(_)}return y.createElement("a",ae({},v,{href:x||I,onClick:$||o?a:C,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Rn=y.forwardRef(function(n,r){let{"aria-current":a="page",caseSensitive:l=!1,className:o="",end:c=!1,style:s,to:f,unstable_viewTransition:u,children:d}=n,k=We(n,En),v=pe(f,{relative:k.relative}),R=fe(),x=y.useContext(st),{navigator:$}=y.useContext(Z),I=x!=null&&Un(v)&&u===!0,E=$.encodeLocation?$.encodeLocation(v).pathname:v.pathname,C=R.pathname,_=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;l||(C=C.toLowerCase(),_=_?_.toLowerCase():null,E=E.toLowerCase());const j=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let A=C===E||!c&&C.startsWith(E)&&C.charAt(j)==="/",M=_!=null&&(_===E||!c&&_.startsWith(E)&&_.charAt(E.length)==="/"),Y={isActive:A,isPending:M,isTransitioning:I},z=A?a:void 0,B;typeof o=="function"?B=o(Y):B=[o,A?"active":null,M?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let q=typeof s=="function"?s(Y):s;return y.createElement(Ne,ae({},k,{"aria-current":z,className:B,ref:r,style:q,to:f,unstable_viewTransition:u}),typeof d=="function"?d(Y):d)});process.env.NODE_ENV!=="production"&&(Rn.displayName="NavLink");const Tn=y.forwardRef((e,n)=>{let{fetcherKey:r,navigate:a,reloadDocument:l,replace:o,state:c,method:s=ve,action:f,onSubmit:u,relative:d,preventScrollReset:k,unstable_viewTransition:v}=e,R=We(e,Cn),x=Ln(),$=Fn(f,{relative:d}),I=s.toLowerCase()==="get"?"get":"post",E=C=>{if(u&&u(C),C.defaultPrevented)return;C.preventDefault();let _=C.nativeEvent.submitter,j=(_==null?void 0:_.getAttribute("formmethod"))||s;x(_||C.currentTarget,{fetcherKey:r,method:j,navigate:a,replace:o,state:c,relative:d,preventScrollReset:k,unstable_viewTransition:v})};return y.createElement("form",ae({ref:n,method:I,action:$,onSubmit:l?u:E},R))});process.env.NODE_ENV!=="production"&&(Tn.displayName="Form"),process.env.NODE_ENV;var ye;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ye||(ye={}));var ht;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ht||(ht={}));function On(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function kt(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?L(!1,On(e)):L(!1)),n}function $n(e,n){let{target:r,replace:a,state:l,preventScrollReset:o,relative:c,unstable_viewTransition:s}=n===void 0?{}:n,f=cn(),u=fe(),d=pe(e,{relative:c});return y.useCallback(k=>{if(bn(k,r)){k.preventDefault();let v=a!==void 0?a:De(u)===De(d);f(e,{replace:v,state:l,preventScrollReset:o,relative:c,unstable_viewTransition:s})}},[u,f,d,a,l,r,e,o,c,s])}function jn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Dn=0,In=()=>"__"+String(++Dn)+"__";function Ln(){let{router:e}=kt(ye.UseSubmit),{basename:n}=y.useContext(Z),r=dn();return y.useCallback(function(a,l){l===void 0&&(l={}),jn();let{action:o,method:c,encType:s,formData:f,body:u}=yn(a,n);if(l.navigate===!1){let d=l.fetcherKey||In();e.fetch(d,r,l.action||o,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||s,unstable_flushSync:l.unstable_flushSync})}else e.navigate(l.action||o,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||s,replace:l.replace,state:l.state,fromRouteId:r,unstable_flushSync:l.unstable_flushSync,unstable_viewTransition:l.unstable_viewTransition})},[e,n,r])}function Fn(e,n){let{relative:r}=n===void 0?{}:n,{basename:a}=y.useContext(Z),l=y.useContext(re);l||(process.env.NODE_ENV!=="production"?L(!1,"useFormAction must be used inside a RouteContext"):L(!1));let[o]=l.matches.slice(-1),c=ae({},pe(e||".",{relative:r})),s=fe();if(e==null){c.search=s.search;let f=new URLSearchParams(c.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),c.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:Le([a,c.pathname])),De(c)}function Un(e,n){n===void 0&&(n={});let r=y.useContext(mt);r==null&&(process.env.NODE_ENV!=="production"?L(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):L(!1));let{basename:a}=kt(ye.useViewTransitionState),l=pe(e,{relative:n.relative});if(!r.isTransitioning)return!1;let o=ue(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=ue(r.nextLocation.pathname,a)||r.nextLocation.pathname;return at(l.pathname,c)!=null||at(l.pathname,o)!=null}const An=g.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...a},l)=>{const o=e.slice(0,4),c=o[o.length-2],s=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:l,"aria-label":"brødsmulemeny",className:s,children:[i("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((f,u)=>i("li",{className:"pkt-breadcrumbs__item",children:u===o.length-1?i("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:i("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",...a,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("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",...a,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),n==="router"?h(Ne,{to:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...a,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):h("a",{href:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...a,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:c.text})]})]})}),le=g.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:a="user",size:l="medium",skin:o="primary",type:c="button",variant:s="label-only",color:f,isLoading:u=!1,...d},k)=>{const v=[n,"pkt-btn",l&&`pkt-btn--${l}`,o&&`pkt-btn--${o}`,s&&`pkt-btn--${s}`,f&&`pkt-btn--${f}`,u&&"pkt-btn--active"].filter(Boolean).join(" ");return h("button",{...d,className:v,type:c,ref:k,children:[u&&i(w,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/"}),s!=="label-only"&&i(w,{className:"pkt-btn__icon",name:r}),i("span",{className:"pkt-btn__text",children:e}),s==="icons-right-and-left"&&i(w,{className:"pkt-btn__icon",name:a})]})});le.displayName="PktButton";const vt=g.forwardRef(({id:e,hasTile:n=!1,disabled:r=!1,label:a,labelPosition:l="right",hideLabel:o=!1,checkHelptext:c,hasError:s=!1,isSwitch:f=!1,className:u,...d},k)=>{const v=[u,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:v,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${r&&n?"pkt-input-check__input--tile-disabled":""}`,children:[a&&l==="left"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[a,c&&i("div",{className:"pkt-input-check__input-helptext",children:c})]}),i("input",{ref:k,className:`pkt-input-check__input-checkbox ${s?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:r,...d}),a&&l==="right"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[a,c&&i("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});vt.displayName="PktCheckbox";const Vn=({columnOne:e,columnTwo:n,socialLinks:r,className:a,personvernOgInfoLink:l="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var s,f;const c=[a,"pkt-footer"].filter(Boolean).join(" ");return i("footer",{className:c,"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:[i("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&i("li",{className:"pkt-footer__text",children:e.text}),(s=e.links)==null?void 0:s.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&i("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:l,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:o,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[i("div",{className:"pkt-footer__social-languages",children:r.filter(u=>u.language).map((u,d)=>i("div",{className:"pkt-footer__social-language",children:i("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),i("div",{className:"pkt-footer__social-icons",children:r.filter(u=>u.iconName).map((u,d)=>i(g.Fragment,{children:i("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:i(w,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Wn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",className:a})=>{const l=[a,"pkt-footer-simple"].filter(Boolean).join(" ");return i("footer",{className:l,"data-mode":"dark",children:i("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((o,c)=>i("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:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},c)),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:r,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var _t={exports:{}};/*!
59
+ */function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},ae.apply(this,arguments)}function Ve(e,r){if(e==null)return{};var a={},s=Object.keys(e),l,i;for(i=0;i<s.length;i++)l=s[i],!(r.indexOf(l)>=0)&&(a[l]=e[l]);return a}const _e="get",be="application/x-www-form-urlencoded";function ge(e){return e!=null&&typeof e.tagName=="string"}function dn(e){return ge(e)&&e.tagName.toLowerCase()==="button"}function mn(e){return ge(e)&&e.tagName.toLowerCase()==="form"}function hn(e){return ge(e)&&e.tagName.toLowerCase()==="input"}function kn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vn(e,r){return e.button===0&&(!r||r==="_self")&&!kn(e)}let xe=null;function _n(){if(xe===null)try{new FormData(document.createElement("form"),0),xe=!1}catch{xe=!0}return xe}const bn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Be(e){return e!=null&&!bn.has(e)?(process.env.NODE_ENV!=="production"&&ue(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+be+'"')),null):e}function gn(e,r){let a,s,l,i,c;if(mn(e)){let o=e.getAttribute("action");s=o?ne(o,r):null,a=e.getAttribute("method")||_e,l=Be(e.getAttribute("enctype"))||be,i=new FormData(e)}else if(dn(e)||hn(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||o.getAttribute("action");if(s=f?ne(f,r):null,a=e.getAttribute("formmethod")||o.getAttribute("method")||_e,l=Be(e.getAttribute("formenctype"))||Be(o.getAttribute("enctype"))||be,i=new FormData(o,e),!_n()){let{name:u,type:d,value:h}=e;if(d==="image"){let k=u?u+".":"";i.append(k+"x","0"),i.append(k+"y","0")}else u&&i.append(u,h)}}else{if(ge(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=_e,s=null,l=be,c=e}return i&&l==="text/plain"&&(c=i,i=void 0),{action:s,method:a.toLowerCase(),encType:l,formData:i,body:c}}const xn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Nn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],jn=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],yn="6";try{window.__reactRouterVersion=yn}catch{}const mt=N.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(mt.displayName="ViewTransition");const wn=N.createContext(new Map);process.env.NODE_ENV!=="production"&&(wn.displayName="Fetchers"),process.env.NODE_ENV;const En=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=N.forwardRef(function(r,a){let{onClick:s,relative:l,reloadDocument:i,replace:c,state:o,target:f,to:u,preventScrollReset:d,unstable_viewTransition:h}=r,k=Ve(r,xn),{basename:S}=N.useContext(X),y,O=!1;if(typeof u=="string"&&Cn.test(u)&&(y=u,En))try{let v=new URL(window.location.href),w=u.startsWith("//")?new URL(v.protocol+u):new URL(u),V=ne(w.pathname,S);w.origin===v.origin&&V!=null?u=V+w.search+w.hash:O=!0}catch{process.env.NODE_ENV!=="production"&&ue(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let D=sn(u,{relative:l}),R=Tn(u,{replace:c,state:o,target:f,preventScrollReset:d,relative:l,unstable_viewTransition:h});function _(v){s&&s(v),v.defaultPrevented||R(v)}return N.createElement("a",ae({},k,{href:y||D,onClick:O||i?s:_,ref:a,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Pn=N.forwardRef(function(r,a){let{"aria-current":s="page",caseSensitive:l=!1,className:i="",end:c=!1,style:o,to:f,unstable_viewTransition:u,children:d}=r,h=Ve(r,Nn),k=pe(f,{relative:h.relative}),S=fe(),y=N.useContext(ot),{navigator:O,basename:D}=N.useContext(X),R=y!=null&&Ln(k)&&u===!0,_=O.encodeLocation?O.encodeLocation(k).pathname:k.pathname,v=S.pathname,w=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;l||(v=v.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&D&&(w=ne(w,D)||w);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=v===_||!c&&v.startsWith(_)&&v.charAt(V)==="/",W=w!=null&&(w===_||!c&&w.startsWith(_)&&w.charAt(_.length)==="/"),M={isActive:B,isPending:W,isTransitioning:R},Y=B?s:void 0,K;typeof i=="function"?K=i(M):K=[i,B?"active":null,W?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let q=typeof o=="function"?o(M):o;return N.createElement(Ne,ae({},h,{"aria-current":Y,className:K,ref:a,style:q,to:f,unstable_viewTransition:u}),typeof d=="function"?d(M):d)});process.env.NODE_ENV!=="production"&&(Pn.displayName="NavLink");const Sn=N.forwardRef((e,r)=>{let{fetcherKey:a,navigate:s,reloadDocument:l,replace:i,state:c,method:o=_e,action:f,onSubmit:u,relative:d,preventScrollReset:h,unstable_viewTransition:k}=e,S=Ve(e,jn),y=In(),O=Fn(f,{relative:d}),D=o.toLowerCase()==="get"?"get":"post",R=_=>{if(u&&u(_),_.defaultPrevented)return;_.preventDefault();let v=_.nativeEvent.submitter,w=(v==null?void 0:v.getAttribute("formmethod"))||o;y(v||_.currentTarget,{fetcherKey:a,method:w,navigate:s,replace:i,state:c,relative:d,preventScrollReset:h,unstable_viewTransition:k})};return N.createElement("form",ae({ref:r,method:D,action:O,onSubmit:l?u:R},S))});process.env.NODE_ENV!=="production"&&(Sn.displayName="Form"),process.env.NODE_ENV;var je;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(je||(je={}));var ht;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ht||(ht={}));function Rn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function kt(e){let r=N.useContext(ve);return r||(process.env.NODE_ENV!=="production"?I(!1,Rn(e)):I(!1)),r}function Tn(e,r){let{target:a,replace:s,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o}=r===void 0?{}:r,f=ln(),u=fe(),d=pe(e,{relative:c});return N.useCallback(h=>{if(vn(h,a)){h.preventDefault();let k=s!==void 0?s:$e(u)===$e(d);f(e,{replace:k,state:l,preventScrollReset:i,relative:c,unstable_viewTransition:o})}},[u,f,d,s,l,a,e,i,c,o])}function On(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let $n=0,Dn=()=>"__"+String(++$n)+"__";function In(){let{router:e}=kt(je.UseSubmit),{basename:r}=N.useContext(X),a=fn();return N.useCallback(function(s,l){l===void 0&&(l={}),On();let{action:i,method:c,encType:o,formData:f,body:u}=gn(s,r);if(l.navigate===!1){let d=l.fetcherKey||Dn();e.fetch(d,a,l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,unstable_flushSync:l.unstable_flushSync})}else e.navigate(l.action||i,{preventScrollReset:l.preventScrollReset,formData:f,body:u,formMethod:l.method||c,formEncType:l.encType||o,replace:l.replace,state:l.state,fromRouteId:a,unstable_flushSync:l.unstable_flushSync,unstable_viewTransition:l.unstable_viewTransition})},[e,r,a])}function Fn(e,r){let{relative:a}=r===void 0?{}:r,{basename:s}=N.useContext(X),l=N.useContext(re);l||(process.env.NODE_ENV!=="production"?I(!1,"useFormAction must be used inside a RouteContext"):I(!1));let[i]=l.matches.slice(-1),c=ae({},pe(e||".",{relative:a})),o=fe();if(e==null){c.search=o.search;let f=new URLSearchParams(c.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),c.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&i.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:Ie([s,c.pathname])),$e(c)}function Ln(e,r){r===void 0&&(r={});let a=N.useContext(mt);a==null&&(process.env.NODE_ENV!=="production"?I(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):I(!1));let{basename:s}=kt(je.useViewTransitionState),l=pe(e,{relative:r.relative});if(!a.isTransitioning)return!1;let i=ne(a.currentLocation.pathname,s)||a.currentLocation.pathname,c=ne(a.nextLocation.pathname,s)||a.nextLocation.pathname;return at(l.pathname,c)!=null||at(l.pathname,i)!=null}const An=g.forwardRef(({breadcrumbs:e,navigationType:r,className:a,...s},l)=>{const i=e.slice(0,4),c=i[i.length-2],o=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return t.jsxs("nav",{ref:l,"aria-label":"brødsmulemeny",className:o,children:[t.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,u)=>t.jsx("li",{className:"pkt-breadcrumbs__item",children:u===i.length-1?t.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})}):r==="router"?t.jsxs(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):t.jsxs("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...s,children:[t.jsx(j,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),r==="router"?t.jsxs(Ne,{to:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):t.jsxs("a",{href:c.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...s,children:[t.jsx(j,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),t.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]})]})}),se=g.forwardRef(({children:e,className:r,iconName:a="user",secondIconName:s="user",size:l="medium",skin:i="primary",type:c="button",variant:o="label-only",color:f,isLoading:u=!1,...d},h)=>{const k=[r,"pkt-btn",l&&`pkt-btn--${l}`,i&&`pkt-btn--${i}`,o&&`pkt-btn--${o}`,f&&`pkt-btn--${f}`,u&&"pkt-btn--active"].filter(Boolean).join(" ");return t.jsxs("button",{...d,className:k,type:c,ref:h,children:[u&&t.jsx(j,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/"}),o!=="label-only"&&t.jsx(j,{className:"pkt-btn__icon",name:a}),t.jsx("span",{className:"pkt-btn__text",children:e}),o==="icons-right-and-left"&&t.jsx(j,{className:"pkt-btn__icon",name:s})]})});se.displayName="PktButton";const vt=g.forwardRef(({id:e,hasTile:r=!1,disabled:a=!1,label:s,labelPosition:l="right",hideLabel:i=!1,checkHelptext:c,hasError:o=!1,isSwitch:f=!1,className:u,...d},h)=>{const k=[u,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:k,children:t.jsxs("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${a&&r?"pkt-input-check__input--tile-disabled":""}`,children:[s&&l==="left"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]}),t.jsx("input",{ref:h,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:a,...d}),s&&l==="right"&&t.jsxs("label",{className:`pkt-input-check__input-label ${i?"pkt-sr-only":""}`,htmlFor:e,children:[s,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});vt.displayName="PktCheckbox";const Un=({columnOne:e,columnTwo:r,socialLinks:a,className:s,personvernOgInfoLink:l="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var o,f;const c=[s,"pkt-footer"].filter(Boolean).join(" ");return t.jsx("footer",{className:c,"data-mode":"dark",children:t.jsxs("div",{className:"pkt-footer__container",children:[t.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:e.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&t.jsx("li",{className:"pkt-footer__text",children:e.text}),(o=e.links)==null?void 0:o.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:r.title}),t.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&t.jsx("li",{className:"pkt-footer__text",children:r.text}),(f=r.links)==null?void 0:f.map((u,d)=>t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),t.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),t.jsxs("ul",{className:"pkt-footer__list",children:[t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:l,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer__list-item",children:t.jsxs("a",{className:"pkt-footer__link",href:i,children:[t.jsx(j,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),a&&t.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[t.jsx("div",{className:"pkt-footer__social-languages",children:a.filter(u=>u.language).map((u,d)=>t.jsx("div",{className:"pkt-footer__social-language",children:t.jsx("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),t.jsx("div",{className:"pkt-footer__social-icons",children:a.filter(u=>u.iconName).map((u,d)=>t.jsx(g.Fragment,{children:t.jsx("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:t.jsx(j,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Vn=({links:e=[],personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:a="https://www.oslo.kommune.no/tilgjengelighet/",className:s})=>{const l=[s,"pkt-footer-simple"].filter(Boolean).join(" ");return t.jsx("footer",{className:l,"data-mode":"dark",children:t.jsx("div",{className:"pkt-footer-simple__container",children:t.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((i,c)=>t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("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:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},c)),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:r,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t.jsx("li",{className:"pkt-footer-simple__list-item",children:t.jsxs("a",{className:"pkt-footer-simple__link",href:a,children:[t.jsx(j,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var _t={exports:{}};/*!
55
60
  Copyright (c) 2018 Jed Watson.
56
61
  Licensed under the MIT License (MIT), see
57
62
  http://jedwatson.github.io/classnames
58
- */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var a=[],l=0;l<arguments.length;l++){var o=arguments[l];if(o){var c=typeof o;if(c==="string"||c==="number")a.push(o);else if(Array.isArray(o)){if(o.length){var s=r.apply(null,o);s&&a.push(s)}}else if(c==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){a.push(o.toString());continue}for(var f in o)n.call(o,f)&&o[f]&&a.push(f)}}}return a.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(_t);var Bn=_t.exports;const bt=Mt(Bn),Mn=g.forwardRef(({className:e,logoLink:n="https://www.oslo.kommune.no/",serviceName:r,fixed:a=!0,scrollToHide:l=!0,user:o,userMenu:c,representing:s,userOptions:f,userMenuFooter:u,canChangeRepresentation:d=!0,showMenuButton:k=!1,showLogOutButton:v=!1,openMenu:R,logOut:x,changeRepresentation:$,children:I,...E},C)=>{const _=g.useMemo(()=>typeof(o==null?void 0:o.lastLoggedIn)=="string"?o.lastLoggedIn:o!=null&&o.lastLoggedIn?new Date(o.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[o]),[j,A]=g.useState(!1),[M,Y]=g.useState(0),[z,B]=g.useState(!1),q=g.useRef(null);g.useEffect(()=>(document.addEventListener("mouseup",K),window.addEventListener("scroll",V),()=>{document.removeEventListener("mouseup",K),window.removeEventListener("scroll",V)}));const G=()=>{B(!z)},K=b=>{q.current&&!q.current.contains(b.target)&&B(!1)},V=()=>{if(l){const b=window.pageYOffset||document.documentElement.scrollTop;if(b<0||Math.abs(b-M)<60)return;A(b>M),Y(b)}};return h("header",{...E,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:bt(e,"pkt-header",{"pkt-header--fixed":a,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":j}),ref:C,children:[h("div",{className:"pkt-header__logo",children:[typeof n=="string"?i("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}):i("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}),i("span",{className:"pkt-header__logo-service",children:r})]}),i("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[k&&i("li",{children:i(le,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:R,children:"Meny"})}),(o||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${z&&!j?"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":z,onClick:G,children:[i(w,{name:"user",className:"pkt-btn__icon"}),i("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(o==null?void 0:o.name)}),i("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(o==null?void 0:o.shortname)}),i(w,{name:"chevron-thin-down",className:"pkt-btn--closed"}),i(w,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[o&&h("li",{children:[i("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),i("div",{className:"pkt-user-menu__name",children:o.name}),o.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",i("time",{children:_})]})]}),c&&i("li",{children:i("ul",{className:"pkt-list",children:c.map((b,W)=>i("li",{children:typeof b.target=="string"?h("a",{href:b.target,className:"pkt-link",children:[b.iconName&&i(w,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&i(w,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userMenu-${W}`))})}),(s||d)&&h("li",{children:[s&&h(X,{children:[i("div",{className:"pkt-user-menu__label",children:"Representerer"}),i("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),i("ul",{className:"pkt-list mt-size-16",children:d&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:$,children:[i(w,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),i("li",{children:i("ul",{className:"pkt-list",children:(f||!v)&&h(X,{children:[f==null?void 0:f.map((b,W)=>i("li",{children:typeof b.target=="string"?h("a",{href:b.target,className:"pkt-link",children:[b.iconName&&i(w,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&i(w,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userOptions-${W}`)),!v&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:x,children:[i(w,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),u&&i("li",{className:"footer",children:i("ul",{className:"pkt-list-horizontal bordered",children:u.map((b,W)=>i("li",{children:typeof b.target=="string"?i("a",{href:b.target,className:"pkt-link",children:b.title}):i("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:b.title})},`userMenuFooter-${W}`))})})]})]}),I&&i("li",{children:I}),v&&i("li",{children:i(le,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:x,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),gt=g.forwardRef(({label:e,id:n,children:r,...a},l)=>h("div",{className:"pkt-form-group",children:[i("label",{htmlFor:n,className:"pkt-form-label",children:e}),i("input",{className:"pkt-form-input",id:n,...a,ref:l}),r]}));gt.displayName="PktInput";const de=g.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:a,helptextDropdownButton:l,optionalTag:o=!1,optionalText:c="Valgfritt",requiredTag:s=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:k,inline:v,ariaDescribedby:R,useWrapper:x=!0,children:$,className:I,hasFieldset:E=!1},C)=>{const[_,j]=g.useState(!1),A=()=>{j(!_)},M=()=>o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":s?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",Y=o?c:s?f:"",z=k?"pkt-inputwrapper--disabled":"",B=v?"pkt-inputwrapper--inline":"",q=u?"pkt-inputwrapper--error":"",G=!!a&&a!=="",K=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',V=E?"fieldset":G?"div":"label",b=E?"legend":G?"h2":"span",W=R||(r?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",I,z,B,q].join(" "),ref:C,children:[x?i(X,{children:h(V,{htmlFor:E?void 0:e,"aria-describedby":G?void 0:R,className:`pkt-inputwrapper__label${E?" pkt-inputwrapper__fieldset":""}`,children:[h(b,{id:`${e}-label`,className:`${E?" pkt-inputwrapper__legend":""}`,children:[n,Y!==""&&i("span",{className:M(),children:Y})]}),r&&i("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:r}}),G&&a!==""&&h("div",{children:[i(le,{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:A,children:i("span",{dangerouslySetInnerHTML:{__html:K}})}),i("div",{className:`pkt-inputwrapper__helptext ${_?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i("span",{dangerouslySetInnerHTML:{__html:a}})}),!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":W,children:n})]}),i(X,{children:$})]})}):h(X,{children:[!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":W,id:`${e}-label`,children:n}),$]}),u&&d&&i("div",{children:i(et,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const Nt=g.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:a=!1,skin:l="normal",href:o="#",external:c=!1,title:s,...f},u)=>{const d=[n,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return h("a",{...f,href:o,className:`pkt-linkcard pkt-link ${d}`,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,ref:u,children:[i(w,{className:"pkt-link__icon",name:r}),h("div",{className:"pkt-linkcard__content",children:[i("div",{className:`pkt-linkcard__title ${c?"pkt-link pkt-link--external":""}`,children:s}),i("div",{className:"pkt-linkcard__text",children:e})]})]})});Nt.displayName="PktLinkCard";const Yn=g.forwardRef(({className:e,message:n,size:r="medium",inline:a=!1,isLoading:l=!0,variant:o="rainbow",delay:c=0,children:s,...f},u)=>{const d=`pkt-loader pkt-loader--${r}`,[k,v]=g.useState(!(c>0));c>0&&setTimeout(()=>{v(!0)},c);const R=x=>x==="shapes"?"loader":x==="blue"?"spinner-blue":"spinner";return i("div",{role:"status","aria-live":"polite","aria-busy":l,className:`pkt-loader--${a?"inline":"box"} ${e||""}`,children:l?i(X,{children:k?h("div",{className:d,"data-testid":"pkt-loader",ref:u,...f,children:[i(w,{name:R(o),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/",className:`pkt-loader__svg pkt-loader__${o}`}),n&&i("p",{children:n})]}):null}):s})}),Kn=({children:e,className:n,compact:r=!1,skin:a="beige",title:l,...o})=>{const c=[n,"pkt-messagebox",a&&`pkt-messagebox--${a}`,r&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return h("div",{...o,className:c,children:[l&&i("div",{className:"pkt-messagebox__title",children:l}),i("div",{className:"pkt-messagebox__text",children:e})]})},yt=g.forwardRef(({id:e,name:n,label:r,className:a,hasTile:l=!1,disabled:o=!1,checkHelptext:c,hasError:s=!1,...f},u)=>{const d=[a,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:d,children:h("div",{className:`pkt-input-check__input ${l?"pkt-input-check__input--tile":""} ${o&&l?"pkt-input-check__input--tile-disabled":""}`,children:[i("input",{ref:u,className:`pkt-input-check__input-checkbox ${s?"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,c&&i("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});yt.displayName="PktRadioButton";const Jn=g.forwardRef(({action:e,appearance:n="local",disabled:r=!1,fullwidth:a=!1,id:l,label:o,method:c="get",name:s,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:k,onSuggestionClick:v,...R},x)=>{const $=(_,j)=>{_?_():v&&v(j)},I=`pkt-searchinput pkt-searchinput--${n} ${a?"pkt-searchinput--fullwidth":""}`;return h(e?"form":"div",{className:I,onSubmit:k&&(()=>k(d)),action:e||void 0,method:e?c:void 0,role:"search",ref:x,...R,children:[h(o?"label":"div",{htmlFor:o?l:void 0,className:o?"pkt-inputwrapper__label":"",children:[o&&i(X,{children:o}),h("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[i("input",{className:`pkt-input ${a?"pkt-input--fullwidth":""}`,type:"search",name:s||l,id:l,placeholder:f,value:d,disabled:r,onInput:k&&(_=>k(_.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${l}-suggestions`}),i(le,{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(d)),onKeyUp:k&&(_=>_.key==="Enter"&&k(d)),children:o||f})]})]}),u&&i("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((_,j)=>i("li",{children:g.createElement(_.href?"a":_.onClick?"button":"div",{href:_.href,className:`pkt-searchinput__suggestion ${_.onClick?"pkt-link-button":""} ${_.href||_.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:_.onClick?"button":void 0,onClick:()=>$(_.onClick,j),onKeyUp:()=>$(_.onClick,j)},h(X,{children:[_.title&&i("h3",{className:"pkt-searchinput__suggestion-title",children:_.title}),_.text&&i("p",{className:"pkt-searchinput__suggestion-text",children:_.text})]}))},`search-suggestion-${j}`))})]})}),zn=g.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:r,className:a,disabled:l=!1,errorMessage:o,hasError:c,helptext:s,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:k=!1,fullwidth:v=!1,label:R,name:x,optionalTag:$=!1,optionalText:I,requiredTag:E=!1,requiredText:C,..._},j)=>{const A=[a,"pkt-select"].join(" ");return i(de,{className:A,forId:d,label:R,helptext:s,helptextDropdown:f,helptextDropdownButton:u,optionalTag:$,optionalText:I,requiredTag:E,requiredText:C,hasError:c,errorMessage:o,disabled:l,inline:k,ariaDescribedby:e,children:i("select",{ref:j,className:`pkt-input ${v?"pkt-input--fullwidth":""}`,"aria-invalid":c,"aria-errormessage":`${d}-error`,"aria-labelledby":n||`${d}-label`,disabled:l,id:d,name:x||d,..._,children:r})})}),qn=({isResponsive:e,children:n})=>e?i("div",{className:"pkt-table-container",children:n}):i(X,{children:n}),Gn=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:a=!1,shadow:l=!1}={},children:o})=>i(qn,{isResponsive:e,children:i("table",{className:bt("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":a,"pkt-table--shadow":l}),children:o})}),Hn=({children:e})=>i("td",{className:"pkt-table__th",children:e}),Xn=({children:e})=>i("th",{className:"pkt-table__th",children:e}),we=g.forwardRef(({children:e,className:n,skin:r="blue",textStyle:a="normal-text",size:l="medium",closeTag:o=!1,iconName:c="",type:s="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[k,v]=g.useState(!1),R=E=>{v(!0),u(E)},x=["pkt-tag",l&&`pkt-tag--${l}`,r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,n].filter(Boolean).join(" "),$=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,c&&o?"pkt-btn--icons-right-and-left":null,o&&!c?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),I=!k;return o&&c?i(X,{children:I&&h("button",{className:$,type:s,"aria-label":f,onClick:R,ref:d,children:[i(w,{className:"pkt-tag__icon",name:c}),e,i(w,{className:"pkt-tag__close-btn",name:"close"})]})}):o?i(X,{children:I&&h("button",{className:$,type:s,"aria-label":f,onClick:R,ref:d,children:[i(w,{className:"pkt-tag__close-btn",name:"close"}),e]})}):c?h("span",{className:x,children:[i(w,{className:"pkt-tag__icon",name:c}),e]}):i("span",{className:x,children:e})});we.displayName="PktTag";const Zn=g.forwardRef(({arrowNav:e=!0,tabs:n,onTabSelected:r},a)=>{const l=g.useRef([]);g.useEffect(()=>{l.current=l.current.slice(0,n.length)},[n]);const o=(s,f)=>{f.action&&f.action(s),r&&r(s)},c=(s,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&s!==0&&((u=l.current[s-1])==null||u.focus()),f.code==="ArrowRight"&&s<n.length-1&&((d=l.current[s+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&o(s,n[s]))};return i("div",{className:"pkt-tabs",ref:a,children:i("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:n.map((s,f)=>i(g.Fragment,{children:s.href?h("a",{"aria-selected":!!s.active,role:e?"tab":void 0,href:s.href,"aria-controls":s.controls,className:`pkt-tabs__link ${s.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>o(f,s),tabIndex:s.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[s.icon&&i(w,{name:s.icon,className:"pkt-icon--small"}),s.text,s.tag&&i(we,{skin:s.tag.skin,size:"small",children:s.tag.text})]}):h("button",{"aria-selected":!!s.active,role:e?"tab":void 0,type:"button","aria-controls":s.controls,className:`pkt-tabs__button pkt-link-button ${s.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>o(f,s),tabIndex:s.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[s.icon&&i(w,{name:s.icon,className:"pkt-icon--small"}),s.text,s.tag&&i(we,{skin:s.tag.skin,size:"small",children:s.tag.text})]},"b-"+f)},f))})})}),Qn=g.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:a,counterMaxLength:l,className:o,disabled:c,errorMessage:s,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:v,fullwidth:R=!1,label:x,name:$,optionalTag:I=!1,optionalText:E,requiredTag:C=!1,requiredText:_,placeholder:j,rows:A,useWrapper:M=!0,onChange:Y,...z},B)=>{const q=[o,"pkt-textinput","pkt-textarea"].join(" "),G=r||`${e}-label`,K=g.useRef(null),[V,b]=g.useState(0),W=ee=>{var te,me;if(a&&b(((me=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:me.length)||0),Y)return Y(ee)};return g.useEffect(()=>{var ee,te;typeof B=="function"&&B(K.current),a&&b(((te=(ee=K==null?void 0:K.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[B]),h(de,{ariaDescribedby:n,className:q,disabled:c,errorMessage:s,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:v,label:x,optionalTag:I,optionalText:E,requiredTag:C,requiredText:_,useWrapper:M,children:[i("textarea",{ref:K,className:`pkt-input ${R?"pkt-input--fullwidth":""} ${l&&V>l?"pkt-input--counter-error":""}`,name:$||e,id:e,placeholder:j,disabled:c,rows:A,"aria-labelledby":G,"aria-invalid":f,"aria-errormessage":`${e}-error`,...z,onChange:W}),a&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[V||0,l&&`/${l}`]})]})}),er=g.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:a="off",className:l,disabled:o=!1,errorMessage:c,hasError:s=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:k,inline:v=!1,fullwidth:R=!1,label:x,name:$,optionalTag:I=!1,optionalText:E,requiredTag:C=!1,requiredText:_,placeholder:j,prefix:A,suffix:M,type:Y="text",useWrapper:z=!0,omitSearchIcon:B=!1,value:q,...G},K)=>{const V=[l,"pkt-textinput"].join(" "),b=r||`${e}-label`,W=Y==="search"&&!k&&!B;return i(de,{ariaDescribedby:n,className:V,disabled:o,errorMessage:c,forId:e,hasError:s,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:v,label:x,optionalTag:I,optionalText:E,requiredTag:C,requiredText:_,useWrapper:z,children:h("div",{className:"pkt-input__container",children:[A&&i("div",{className:"pkt-input-prefix",children:A}),i("input",{ref:K,className:`pkt-input ${R?"pkt-input--fullwidth":""}`,type:Y,name:$||e,id:e,placeholder:j,autoComplete:a,value:q,disabled:o,"aria-invalid":s,"aria-errormessage":`${e}-error`,"aria-labelledby":b,...G}),M&&h("p",{className:"pkt-input-suffix",children:[M,k&&i(w,{className:"pkt-input-suffix-icon",name:k}),W&&i(w,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!M&&k&&i(w,{className:"pkt-input-icon",name:k}),!M&&W&&i(w,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});T.PktAlert=et,T.PktBackLink=Ht,T.PktBreadcrumbs=An,T.PktButton=le,T.PktCheckbox=vt,T.PktFooter=Vn,T.PktFooterSimple=Wn,T.PktHeader=Mn,T.PktIcon=w,T.PktIconContext=Qe,T.PktInput=gt,T.PktInputWrapper=de,T.PktLinkCard=Nt,T.PktLoader=Yn,T.PktMessagebox=Kn,T.PktRadioButton=yt,T.PktSearchInput=Jn,T.PktSelect=zn,T.PktTable=Gn,T.PktTableData=Hn,T.PktTableHeader=Xn,T.PktTabs=Zn,T.PktTag=we,T.PktTextarea=Qn,T.PktTextinput=er,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
63
+ */(function(e){(function(){var r={}.hasOwnProperty;function a(){for(var i="",c=0;c<arguments.length;c++){var o=arguments[c];o&&(i=l(i,s(o)))}return i}function s(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return a.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var c="";for(var o in i)r.call(i,o)&&i[o]&&(c=l(c,o));return c}function l(i,c){return c?i?i+" "+c:i+c:i}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(_t);var Bn=_t.exports;const ee=Wt(Bn),Wn=g.forwardRef(({className:e,logoLink:r="https://www.oslo.kommune.no/",serviceName:a,fixed:s=!0,scrollToHide:l=!0,user:i,userMenu:c,representing:o,userOptions:f,userMenuFooter:u,canChangeRepresentation:d=!0,showMenuButton:h=!1,showLogOutButton:k=!1,openMenu:S,logOut:y,changeRepresentation:O,children:D,...R},_)=>{const v=g.useMemo(()=>typeof(i==null?void 0:i.lastLoggedIn)=="string"?i.lastLoggedIn:i!=null&&i.lastLoggedIn?new Date(i.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[i]),[w,V]=g.useState(!1),[B,W]=g.useState(0),[M,Y]=g.useState(!1),K=g.useRef(null);g.useEffect(()=>(document.addEventListener("mouseup",z),window.addEventListener("scroll",L),()=>{document.removeEventListener("mouseup",z),window.removeEventListener("scroll",L)}));const q=()=>{Y(!M)},z=b=>{K.current&&!K.current.contains(b.target)&&Y(!1)},L=()=>{if(l){const b=window.pageYOffset||document.documentElement.scrollTop;if(b<0||Math.abs(b-B)<60)return;V(b>B),W(b)}};return t.jsxs("header",{...R,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ee(e,"pkt-header",{"pkt-header--fixed":s,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":w}),ref:_,children:[t.jsxs("div",{className:"pkt-header__logo",children:[typeof r=="string"?t.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}):t.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:r,children:t.jsx(j,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.12/logos/"})}),t.jsx("span",{className:"pkt-header__logo-service",children:a})]}),t.jsx("nav",{className:"pkt-header__actions",children:t.jsxs("ul",{className:"pkt-header__actions-row",children:[h&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(i||o)&&t.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${M&&!w?"pkt-header--open-dropdown":""}`,ref:K,children:[t.jsxs("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":M,onClick:q,children:[t.jsx(j,{name:"user",className:"pkt-btn__icon"}),t.jsx("span",{className:"pkt-header__user-fullname",children:(o==null?void 0:o.name)||(i==null?void 0:i.name)}),t.jsx("span",{className:"pkt-header__user-shortname",children:(o==null?void 0:o.shortname)||(i==null?void 0:i.shortname)}),t.jsx(j,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t.jsx(j,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),t.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[i&&t.jsxs("li",{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t.jsx("div",{className:"pkt-user-menu__name",children:i.name}),i.lastLoggedIn&&t.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t.jsx("time",{children:v})]})]}),c&&t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:c.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userMenu-${U}`))})}),(o||d)&&t.jsxs("li",{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),t.jsx("div",{className:"pkt-user-menu__name",children:o.name}),o.orgNumber&&t.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",o.orgNumber]})]}),t.jsx("ul",{className:"pkt-list mt-size-16",children:d&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:O,children:[t.jsx(j,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t.jsx("li",{children:t.jsx("ul",{className:"pkt-list",children:(f||!k)&&t.jsxs(t.Fragment,{children:[f==null?void 0:f.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsxs("a",{href:b.target,className:"pkt-link",children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&t.jsx(j,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userOptions-${U}`)),!k&&t.jsx("li",{children:t.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[t.jsx(j,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),u&&t.jsx("li",{className:"footer",children:t.jsx("ul",{className:"pkt-list-horizontal bordered",children:u.map((b,U)=>t.jsx("li",{children:typeof b.target=="string"?t.jsx("a",{href:b.target,className:"pkt-link",children:b.title}):t.jsx("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:b.title})},`userMenuFooter-${U}`))})})]})]}),D&&t.jsx("li",{children:D}),k&&t.jsx("li",{children:t.jsx(se,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),bt=g.forwardRef(({label:e,id:r,children:a,...s},l)=>t.jsxs("div",{className:"pkt-form-group",children:[t.jsx("label",{htmlFor:r,className:"pkt-form-label",children:e}),t.jsx("input",{className:"pkt-form-input",id:r,...s,ref:l}),a]}));bt.displayName="PktInput";const de=g.forwardRef(({forId:e,label:r,helptext:a,helptextDropdown:s,helptextDropdownButton:l,optionalTag:i=!1,optionalText:c="Valgfritt",requiredTag:o=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:h,inline:k,ariaDescribedby:S,useWrapper:y=!0,children:O,className:D,hasFieldset:R=!1},_)=>{const[v,w]=g.useState(!1),V=()=>{w(!v)},B=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",W=i?c:o?f:"",M=h?"pkt-inputwrapper--disabled":"",Y=k?"pkt-inputwrapper--inline":"",K=u?"pkt-inputwrapper--error":"",q=!!s&&s!=="",z=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',L=R?"fieldset":q?"div":"label",b=R?"legend":q?"h2":"span",U=S||(a?`${e}-helptext`:void 0);return t.jsxs("div",{className:["pkt-inputwrapper",D,M,Y,K].join(" "),ref:_,children:[y?t.jsx(t.Fragment,{children:t.jsxs(L,{htmlFor:R?void 0:e,"aria-describedby":q?void 0:S,className:`pkt-inputwrapper__label${R?" pkt-inputwrapper__fieldset":""}`,children:[t.jsxs(b,{id:`${e}-label`,className:`${R?" pkt-inputwrapper__legend":""}`,children:[r,W!==""&&t.jsx("span",{className:B(),children:W})]}),a&&t.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:a}}),q&&s!==""&&t.jsxs("div",{children:[t.jsx(se,{skin:"tertiary",size:"small",variant:"icon-right",iconName:v?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:V,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:z}})}),t.jsx("div",{className:`pkt-inputwrapper__helptext ${v?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t.jsx("span",{dangerouslySetInnerHTML:{__html:s}})}),!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,children:r})]}),t.jsx(t.Fragment,{children:O})]})}):t.jsxs(t.Fragment,{children:[!R&&t.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":U,id:`${e}-label`,children:r}),O]}),u&&d&&t.jsx("div",{children:t.jsx(et,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const gt=g.forwardRef(({children:e,className:r,iconName:a="user",openInNewTab:s=!1,skin:l="normal",href:i="#",external:c=!1,title:o,...f},u)=>{const d=[r,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return t.jsxs("a",{...f,href:i,className:`pkt-linkcard pkt-link ${d}`,target:s?"_blank":"_self",rel:s?"noopener noreferrer":void 0,ref:u,children:[t.jsx(j,{className:"pkt-link__icon",name:a}),t.jsxs("div",{className:"pkt-linkcard__content",children:[t.jsx("div",{className:`pkt-linkcard__title ${c?"pkt-link pkt-link--external":""}`,children:o}),t.jsx("div",{className:"pkt-linkcard__text",children:e})]})]})});gt.displayName="PktLinkCard";const Mn=g.forwardRef(({className:e,message:r,size:a="medium",inline:s=!1,isLoading:l=!0,variant:i="rainbow",delay:c=0,children:o,...f},u)=>{const d=`pkt-loader pkt-loader--${a}`,[h,k]=g.useState(!(c>0));c>0&&setTimeout(()=>{k(!0)},c);const S=y=>y==="shapes"?"loader":y==="blue"?"spinner-blue":"spinner";return t.jsx("div",{role:"status","aria-live":"polite","aria-busy":l,className:`pkt-loader--${s?"inline":"box"} ${e||""}`,children:l?t.jsx(t.Fragment,{children:h?t.jsxs("div",{className:d,"data-testid":"pkt-loader",ref:u,...f,children:[t.jsx(j,{name:S(i),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.12/animations/",className:`pkt-loader__svg pkt-loader__${i}`}),r&&t.jsx("p",{children:r})]}):null}):o})}),Yn=({children:e,className:r,compact:a=!1,skin:s="beige",title:l,...i})=>{const c=[r,"pkt-messagebox",s&&`pkt-messagebox--${s}`,a&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return t.jsxs("div",{...i,className:c,children:[l&&t.jsx("div",{className:"pkt-messagebox__title",children:l}),t.jsx("div",{className:"pkt-messagebox__text",children:e})]})},xt=g.forwardRef(({id:e,name:r,label:a,className:s,hasTile:l=!1,disabled:i=!1,checkHelptext:c,hasError:o=!1,...f},u)=>{const d=[s,"pkt-input-check"].filter(Boolean).join(" ");return t.jsx("div",{className:d,children:t.jsxs("div",{className:`pkt-input-check__input ${l?"pkt-input-check__input--tile":""} ${i&&l?"pkt-input-check__input--tile-disabled":""}`,children:[t.jsx("input",{ref:u,className:`pkt-input-check__input-checkbox ${o?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:i,name:r,...f}),t.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[a,c&&t.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});xt.displayName="PktRadioButton";const Kn=g.forwardRef(({action:e,appearance:r="local",disabled:a=!1,fullwidth:s=!1,id:l,label:i,method:c="get",name:o,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:h,onSuggestionClick:k,...S},y)=>{const O=(v,w)=>{v?v():k&&k(w)},D=`pkt-searchinput pkt-searchinput--${r} ${s?"pkt-searchinput--fullwidth":""}`,R=e?"form":"div",_=i?"label":"div";return t.jsxs(R,{className:D,onSubmit:h&&(()=>h(d)),action:e||void 0,method:e?c:void 0,role:"search",ref:y,...S,children:[t.jsxs(_,{htmlFor:i?l:void 0,className:i?"pkt-inputwrapper__label":"",children:[i&&t.jsx(t.Fragment,{children:i}),t.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[t.jsx("input",{className:`pkt-input ${s?"pkt-input--fullwidth":""}`,type:"search",name:o||l,id:l,placeholder:f,defaultValue:d,disabled:a,onInput:h&&(v=>h(v.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${l}-suggestions`}),t.jsx(se,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:a,onClick:h&&(()=>h(d)),onKeyUp:h&&(v=>v.key==="Enter"&&h(d)),children:i||f})]})]}),u&&t.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((v,w)=>t.jsx("li",{children:g.createElement(v.href?"a":v.onClick?"button":"div",{href:v.href,className:`pkt-searchinput__suggestion ${v.onClick?"pkt-link-button":""} ${v.href||v.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:v.onClick?"button":void 0,onClick:()=>O(v.onClick,w),onKeyUp:()=>O(v.onClick,w)},t.jsxs(t.Fragment,{children:[v.title&&t.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:v.title}),v.text&&t.jsx("p",{className:"pkt-searchinput__suggestion-text",children:v.text})]}))},`search-suggestion-${w}`))})]})}),zn=g.forwardRef(({ariaDescribedby:e,ariaLabelledby:r,children:a,className:s,disabled:l=!1,errorMessage:i,hasError:c,helptext:o,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:h=!1,fullwidth:k=!1,label:S,name:y,optionalTag:O=!1,optionalText:D,requiredTag:R=!1,requiredText:_,...v},w)=>{const V=[s,"pkt-select"].join(" ");return t.jsx(de,{className:V,forId:d,label:S,helptext:o,helptextDropdown:f,helptextDropdownButton:u,optionalTag:O,optionalText:D,requiredTag:R,requiredText:_,hasError:c,errorMessage:i,disabled:l,inline:h,ariaDescribedby:e,children:t.jsx("select",{ref:w,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":c,"aria-errormessage":`${d}-error`,"aria-labelledby":r||`${d}-label`,disabled:l,id:d,name:y||d,...v,children:a})})}),Jn=({className:e,compact:r=!1,skin:a="basic",responsiveView:s=!0,children:l})=>t.jsx("table",{"data-testid":"pkt-table",className:ee(e,"pkt-table",{"pkt-table--responsive":s,"pkt-table--compact":r,"pkt-table--basic":a==="basic","pkt-table--zebra-grey":a==="zebra-grey","pkt-table--zebra-blue":a==="zebra-blue"}),role:"table",children:l}),qn=({children:e,className:r,dataLabel:a})=>t.jsx("td",{className:ee(r,"pkt-table__data-cell",{}),"data-label":a,role:"cell","data-testid":"pkt-table__data-cell",children:e}),Gn=({className:e,children:r})=>t.jsx("th",{className:ee(e,"pkt-table__header-cell",{}),role:"columnheader",children:r}),Hn=({className:e,children:r})=>t.jsx("thead",{className:ee(e,"pkt-table__header",{}),role:"rowgroup",children:r}),Xn=({className:e,children:r})=>t.jsx("tr",{className:ee(e,"pkt-table__row",{}),role:"row",children:r}),Zn=({children:e,className:r})=>t.jsx("tbody",{className:ee(r,"pkt-table__body",{}),role:"rowgroup",children:e}),ye=g.forwardRef(({children:e,className:r,skin:a="blue",textStyle:s="normal-text",size:l="medium",closeTag:i=!1,iconName:c="",type:o="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[h,k]=g.useState(!1),S=R=>{k(!0),u(R)},y=["pkt-tag",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,r].filter(Boolean).join(" "),O=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,a&&`pkt-tag--${a}`,s&&`pkt-tag--${s}`,c&&i?"pkt-btn--icons-right-and-left":null,i&&!c?"pkt-btn--icon-right":null,r].filter(Boolean).join(" "),D=!h;return i&&c?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e,t.jsx(j,{className:"pkt-tag__close-btn",name:"close"})]})}):i?t.jsx(t.Fragment,{children:D&&t.jsxs("button",{className:O,type:o,"aria-label":f,onClick:S,ref:d,children:[t.jsx(j,{className:"pkt-tag__close-btn",name:"close"}),e]})}):c?t.jsxs("span",{className:y,children:[t.jsx(j,{className:"pkt-tag__icon",name:c}),e]}):t.jsx("span",{className:y,children:e})});ye.displayName="PktTag";const Qn=g.forwardRef(({arrowNav:e=!0,tabs:r,onTabSelected:a},s)=>{const l=g.useRef([]);g.useEffect(()=>{l.current=l.current.slice(0,r.length)},[r]);const i=(o,f)=>{f.action&&f.action(o),a&&a(o)},c=(o,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&o!==0&&((u=l.current[o-1])==null||u.focus()),f.code==="ArrowRight"&&o<r.length-1&&((d=l.current[o+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&i(o,r[o]))};return t.jsx("div",{className:"pkt-tabs",ref:s,children:t.jsx("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:r.map((o,f)=>t.jsx(g.Fragment,{children:o.href?t.jsxs("a",{"aria-selected":!!o.active,role:e?"tab":void 0,href:o.href,"aria-controls":o.controls,className:`pkt-tabs__link ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]}):t.jsxs("button",{"aria-selected":!!o.active,role:e?"tab":void 0,type:"button","aria-controls":o.controls,className:`pkt-tabs__button pkt-link-button ${o.active?"active":""}`,onKeyUp:u=>c(f,u),onClick:()=>i(f,o),tabIndex:o.active||!e?void 0:-1,ref:u=>{l.current[f]=u},children:[o.icon&&t.jsx(j,{name:o.icon,className:"pkt-icon--small"}),o.text,o.tag&&t.jsx(ye,{skin:o.tag.skin,size:"small",children:o.tag.text})]},"b-"+f)},f))})})}),er=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,counter:s,counterMaxLength:l,className:i,disabled:c,errorMessage:o,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,rows:V,useWrapper:B=!0,onChange:W,...M},Y)=>{const K=[i,"pkt-textinput","pkt-textarea"].join(" "),q=a||`${e}-label`,z=g.useRef(null),[L,b]=g.useState(0),U=Z=>{var Q,me;if(s&&b(((me=(Q=Z.currentTarget)==null?void 0:Q.value)==null?void 0:me.length)||0),W)return W(Z)};return g.useEffect(()=>{var Z,Q;typeof Y=="function"&&Y(z.current),s&&b(((Q=(Z=z==null?void 0:z.current)==null?void 0:Z.value)==null?void 0:Q.length)||0)},[Y]),t.jsxs(de,{ariaDescribedby:r,className:K,disabled:c,errorMessage:o,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:h,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:B,children:[t.jsx("textarea",{ref:z,className:`pkt-input ${S?"pkt-input--fullwidth":""} ${l&&L>l?"pkt-input--counter-error":""}`,name:O||e,id:e,placeholder:w,disabled:c,rows:V,"aria-labelledby":q,"aria-invalid":f,"aria-errormessage":`${e}-error`,...M,onChange:U}),s&&t.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[L||0,l&&`/${l}`]})]})}),tr=g.forwardRef(({id:e,ariaDescribedby:r,ariaLabelledby:a,autocomplete:s="off",className:l,disabled:i=!1,errorMessage:c,hasError:o=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:h,inline:k=!1,fullwidth:S=!1,label:y,name:O,optionalTag:D=!1,optionalText:R,requiredTag:_=!1,requiredText:v,placeholder:w,prefix:V,suffix:B,type:W="text",useWrapper:M=!0,omitSearchIcon:Y=!1,value:K,...q},z)=>{const L=[l,"pkt-textinput"].join(" "),b=a||`${e}-label`,U=W==="search"&&!h&&!Y;return t.jsx(de,{ariaDescribedby:r,className:L,disabled:i,errorMessage:c,forId:e,hasError:o,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:k,label:y,optionalTag:D,optionalText:R,requiredTag:_,requiredText:v,useWrapper:M,children:t.jsxs("div",{className:"pkt-input__container",children:[V&&t.jsx("div",{className:"pkt-input-prefix",children:V}),t.jsx("input",{ref:z,className:`pkt-input ${S?"pkt-input--fullwidth":""}`,type:W,name:O||e,id:e,placeholder:w,autoComplete:s,value:K,disabled:i,"aria-invalid":o,"aria-errormessage":`${e}-error`,"aria-labelledby":b,...q}),B&&t.jsxs("p",{className:"pkt-input-suffix",children:[B,h&&t.jsx(j,{className:"pkt-input-suffix-icon",name:h}),U&&t.jsx(j,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!B&&h&&t.jsx(j,{className:"pkt-input-icon",name:h}),!B&&U&&t.jsx(j,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});C.PktAlert=et,C.PktBackLink=Gt,C.PktBreadcrumbs=An,C.PktButton=se,C.PktCheckbox=vt,C.PktFooter=Un,C.PktFooterSimple=Vn,C.PktHeader=Wn,C.PktIcon=j,C.PktIconContext=Qe,C.PktInput=bt,C.PktInputWrapper=de,C.PktLinkCard=gt,C.PktLoader=Mn,C.PktMessagebox=Yn,C.PktRadioButton=xt,C.PktSearchInput=Kn,C.PktSelect=zn,C.PktTable=Jn,C.PktTableBody=Zn,C.PktTableDataCell=qn,C.PktTableHeader=Hn,C.PktTableHeaderCell=Gn,C.PktTableRow=Xn,C.PktTabs=Qn,C.PktTag=ye,C.PktTextarea=er,C.PktTextinput=tr,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "11.12.3",
3
+ "version": "11.12.8",
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,16 +33,16 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@oslokommune/punkt-assets": "^11.9.4",
36
- "@oslokommune/punkt-css": "^11.12.3",
37
- "@testing-library/jest-dom": "^5.16.5",
38
- "@testing-library/react": "^14.0.0",
39
- "@testing-library/user-event": "^14.4.3",
40
- "@types/jest": "^29.5.3",
41
- "@types/jest-axe": "^3.5.5",
42
- "@types/node": "^18.16.19",
43
- "@types/react": "^18.2.14",
44
- "@types/react-dom": "^18.2.6",
45
- "@vitejs/plugin-react": "^3.1.0",
36
+ "@oslokommune/punkt-css": "^11.12.8",
37
+ "@testing-library/jest-dom": "^6.4.5",
38
+ "@testing-library/react": "^15.0.7",
39
+ "@testing-library/user-event": "^14.5.2",
40
+ "@types/jest": "^29.5.12",
41
+ "@types/jest-axe": "^3.5.9",
42
+ "@types/node": "^20.12.10",
43
+ "@types/react": "^18.2.22",
44
+ "@types/react-dom": "^18.2.22",
45
+ "@vitejs/plugin-react": "^4.2.1",
46
46
  "classnames": "^2.3.2",
47
47
  "eslint": "^8.56.0",
48
48
  "eslint-config-prettier": "^9.1.0",
@@ -63,8 +63,8 @@
63
63
  "peerDependencies": {
64
64
  "@oslokommune/punkt-assets": ">=3.0.0",
65
65
  "@oslokommune/punkt-css": ">=3.0.0",
66
- "react": ">=18.0.0",
67
- "react-dom": ">=18.0.0"
66
+ "react": ">=18.2.22",
67
+ "react-dom": ">=18.2.22"
68
68
  },
69
69
  "engines": {
70
70
  "node": ">=16.0.0"
@@ -91,5 +91,5 @@
91
91
  "url": "https://github.com/oslokommune/punkt/issues"
92
92
  },
93
93
  "license": "MIT",
94
- "gitHead": "3d1c0ec4fee5ae98b0e26d1068b76faec73406b0"
94
+ "gitHead": "5e5e6bc584d883a6f35e9008be199d690a1765e9"
95
95
  }
@@ -1,4 +1,4 @@
1
- import '@testing-library/jest-dom/extend-expect'
1
+ import '@testing-library/jest-dom'
2
2
  import { axe, toHaveNoViolations } from 'jest-axe'
3
3
  import { PktAccordion } from './Accordion'
4
4
  import { PktAccordionItem } from './AccordionItem'
@@ -16,7 +16,6 @@ export interface IPktAccordion {
16
16
  /**
17
17
  * @description A unique identifier to connect the accordion with a heading
18
18
  */
19
-
20
19
  }
21
20
 
22
21
  export const PktAccordion = forwardRef(
@@ -1,4 +1,4 @@
1
- import '@testing-library/jest-dom/extend-expect'
1
+ import '@testing-library/jest-dom'
2
2
 
3
3
  import { fireEvent, render, screen } from '@testing-library/react'
4
4
  import { axe, toHaveNoViolations } from 'jest-axe'
@@ -34,9 +34,7 @@ describe('PktCheckbox', () => {
34
34
  })
35
35
 
36
36
  test('renders a default checked checkbox', () => {
37
- const { getByRole } = render(
38
- <PktCheckbox id="myCheckbox" label="My Checkbox" defaultChecked={true} />,
39
- )
37
+ const { getByRole } = render(<PktCheckbox id="myCheckbox" label="My Checkbox" defaultChecked={true} />)
40
38
  // Find the checkbox element by its "checkbox" role
41
39
  const checkbox = getByRole('checkbox') as HTMLInputElement
42
40
  // Verify that the checkbox is initially checked
@@ -45,9 +43,7 @@ describe('PktCheckbox', () => {
45
43
 
46
44
  test('handles onClick callback', () => {
47
45
  const onClickMock = jest.fn()
48
- const { getByLabelText } = render(
49
- <PktCheckbox id="myCheckbox" label="My Checkbox" onClick={onClickMock} />,
50
- )
46
+ const { getByLabelText } = render(<PktCheckbox id="myCheckbox" label="My Checkbox" onClick={onClickMock} />)
51
47
 
52
48
  // Get the checkbox label element
53
49
  const checkboxLabel = getByLabelText('My Checkbox')
@@ -61,9 +57,7 @@ describe('PktCheckbox', () => {
61
57
 
62
58
  describe('accessibility', () => {
63
59
  it('renders with no wcag errors with axe', async () => {
64
- const { container } = render(
65
- <PktCheckbox id="accessibilityTest" label="My checkkbox"></PktCheckbox>,
66
- )
60
+ const { container } = render(<PktCheckbox id="accessibilityTest" label="My checkkbox"></PktCheckbox>)
67
61
  const results = await axe(container)
68
62
 
69
63
  expect(results).toHaveNoViolations()