"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2463],{68954:function(e,t,r){r.d(t,{T:function(){return o}});var n=r(52322),l=r(39097),i=r.n(l),a=r(20324);let o=e=>{let{fullLogo:t=!0,isLink:r=!0}=e,l=(0,n.jsx)("img",{src:"/logo.png",className:(0,a.m6)("h-8",t?"w-full":"w-7 object-none object-left-bottom"),alt:"Logo"});return r?(0,n.jsx)(i(),{href:"/",className:"block select-none","aria-label":"Kamperhaug",children:l}):l}},49962:function(e,t,r){r.d(t,{d:function(){return i}});var n=r(52322),l=r(68954);let i=e=>{let{children:t}=e;return(0,n.jsxs)("div",{className:"flex h-screen",children:[(0,n.jsx)("div",{className:"h-full w-0 bg-cover bg-center bg-no-repeat lg:w-1/2",style:{backgroundImage:"linear-gradient(to top, transparent -50%, rgba(0, 0, 0, 0.5) 50%, transparent 150%), url('/login-background.jpg')"},children:(0,n.jsx)("div",{className:"flex h-full flex-col items-center justify-center",children:(0,n.jsx)("h1",{className:"text-6xl font-semibold text-white",children:"Kamperhaug"})})}),(0,n.jsxs)("div",{className:"flex w-full flex-col border-slate-700 lg:w-1/2 lg:border-l-4",children:[(0,n.jsx)("div",{className:"inline-flex p-4",children:(0,n.jsx)(l.T,{})}),(0,n.jsx)("div",{className:"center grow",children:(0,n.jsx)("div",{className:"w-[420px] px-6",children:t})})]})]})}},90577:function(e,t,r){r.d(t,{LH:function(){return p},__:function(){return h},Pg:function(){return w},sb:function(){return N},Rh:function(){return v},oi:function(){return b},gx:function(){return x},Dw:function(){return j}});var n=r(52322),l=r(9462),i=r(96589),a=r(2268),o=r(20324),s=r(13892),u=r(75080),d=r(91398),c=r(2784);let f=()=>{let e=(0,c.useRef)(null);return(0,c.useEffect)(()=>{e.current&&e.current.focus()},[]),e},h=e=>{let{id:t,title:r,name:l,description:i,required:a,disabled:s}=e;return r?(0,n.jsxs)("div",{className:"mb-1",children:[(0,n.jsxs)("label",{htmlFor:null!=t?t:l,className:(0,o.m6)("block text-base font-medium text-slate-600",s&&"text-slate-400"),children:[r,a&&(0,n.jsx)("span",{className:"ml-1 text-red-500",children:"*"})]}),i&&(0,n.jsx)("p",{className:"text-xs text-slate-500",children:i})]}):null},m=e=>{let{name:t,error:r}=e;return r?(0,n.jsx)("p",{id:"".concat(t,"-error"),className:"mt-1 text-sm font-medium text-red-600",children:r}):null},b=e=>{let{id:t,label:r,placeholder:l,name:i,value:a,required:s=!1,onChange:u,error:d,type:c="text",description:b,rightSection:x,autoFocus:p,disabled:g,...v}=e,j=f();return(0,n.jsxs)("div",{className:"[&>label]:focus-within:text-blueish-800",children:[(0,n.jsx)(h,{id:null!=t?t:i,title:r,name:i,required:s,description:b,disabled:g}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{type:c,name:i,id:null!=t?t:i,value:a,onChange:u,placeholder:null!=l?l:r,disabled:g,className:(0,o.m6)("peer block max-h-12 w-full rounded border border-slate-400 bg-white px-4 py-3 text-base text-slate-800 outline-none","hover:border-blueish-700 focus:border-blueish-700","disabled:border-slate-200 disabled:opacity-75 disabled:placeholder:text-slate-300"),...v,...p?{ref:j}:{}}),(0,n.jsx)("div",{className:"bg-blueish-700 absolute bottom-0 top-0 h-full rounded-bl rounded-tl peer-focus:w-2"}),x&&(0,n.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-2",children:x})]}),(0,n.jsx)(m,{name:i,error:d})]})},x=e=>{let{label:t,placeholder:r,name:l,required:a=!1,description:o,error:s,onChange:u,value:d}=e;return(0,n.jsxs)("div",{className:"[&>label]:focus-within:text-blueish-800",children:[(0,n.jsx)(h,{title:t,name:l,required:a,description:o}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(i.Z,{id:l,minRows:2,value:d,onChange:u,placeholder:null!=r?r:t,className:"hover:border-blueish-700 focus:border-blueish-700 peer block w-full rounded border border-slate-400 bg-white px-4 py-3 text-base text-slate-800 outline-none"}),(0,n.jsx)("div",{className:"bg-blueish-700 absolute bottom-0 top-0 h-full rounded-bl rounded-tl peer-focus:w-2"})]}),(0,n.jsx)(m,{name:l,error:s})]})},p=e=>{let{label:t,name:r,placeholder:i,value:a,description:o,onChange:s}=e;return(0,n.jsx)(l.h3,{customInput:b,description:o,thousandSeparator:",",allowNegative:!1,decimalScale:0,valueIsNumericString:!0,onValueChange:e=>s(Number(e.value)),label:t,placeholder:i,name:r,value:a})},g=e=>{let{format:t,onChange:r,...i}=e;return(0,n.jsx)(l.HH,{customInput:b,format:t,valueIsNumericString:!0,onValueChange:e=>r(e.value),...i,type:"text"})},v=e=>(0,n.jsx)(g,{format:"###### #####",...e}),j=e=>(0,n.jsx)(g,{format:"####",...e}),N=e=>(0,n.jsx)(g,{format:"### ## ###",...e}),w=e=>{let{min:t=0,max:r,onChange:l,...i}=e;return(0,n.jsx)(b,{type:"tel",onChange:e=>{let n=Number(e.target.value);if(a.a(n)){if(t&&n<t)return l(t);if(r&&n>r)return l(r);l(n)}},...i,rightSection:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)(s.z,{disabled:Number(e.value)<=t,onClick:()=>{let r=Number(e.value);r>t&&l(r-1)},children:[(0,n.jsx)("span",{className:"sr-only",children:"Decrease value"}),(0,n.jsx)(u.Z,{size:16,className:"stroke-2"})]}),(0,n.jsxs)(s.z,{disabled:!!r&&Number(e.value)>=r,onClick:()=>{let t=Number(e.value);r&&t<r&&l(t+1)},children:[(0,n.jsx)("span",{className:"sr-only",children:"Increase value"}),(0,n.jsx)(d.Z,{size:16,className:"stroke-2"})]})]})})}},75080:function(e,t,r){r.d(t,{Z:function(){return n}});var n=(0,r(31423).Z)("minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]])},91398:function(e,t,r){r.d(t,{Z:function(){return n}});var n=(0,r(31423).Z)("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]])},96589:function(e,t,r){r.d(t,{Z:function(){return w}});var n=r(7896),l=r(31461),i=r(2784),a=i.useLayoutEffect,o=function(e){var t=i.useRef(e);return a(function(){t.current=e}),t},s=function(e,t){if("function"==typeof e){e(t);return}e.current=t},u=function(e,t){var r=(0,i.useRef)();return(0,i.useCallback)(function(n){e.current=n,r.current&&s(r.current,null),r.current=t,t&&s(t,n)},[t])},d={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},c=function(e){Object.keys(d).forEach(function(t){e.style.setProperty(t,d[t],"important")})},f=null,h=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize},m=function(){},b=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],x=!!document.documentElement.currentStyle,p=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var r=b.reduce(function(e,r){return e[r]=t[r],e},{}),n=r.boxSizing;if(""===n)return null;x&&"border-box"===n&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var l=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),i=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:l,borderSize:i}};function g(e,t,r){var n=o(r);i.useLayoutEffect(function(){var r=function(e){return n.current(e)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var v=function(e){g(window,"resize",e)},j=function(e){g(document.fonts,"loadingdone",e)},N=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],w=i.forwardRef(function(e,t){var r=e.cacheMeasurements,a=e.maxRows,o=e.minRows,s=e.onChange,d=void 0===s?m:s,b=e.onHeightChange,x=void 0===b?m:b,g=(0,l.Z)(e,N),w=void 0!==g.value,y=i.useRef(null),S=u(y,t),k=i.useRef(0),z=i.useRef(),R=function(){var e,t,n,l,i,s,u,d,m,b,g,v=y.current,j=r&&z.current?z.current:p(v);if(j){z.current=j;var N=(e=v.value||v.placeholder||"x",void 0===(t=o)&&(t=1),void 0===(n=a)&&(n=1/0),f||((f=document.createElement("textarea")).setAttribute("tabindex","-1"),f.setAttribute("aria-hidden","true"),c(f)),null===f.parentNode&&document.body.appendChild(f),l=j.paddingSize,i=j.borderSize,u=(s=j.sizingStyle).boxSizing,Object.keys(s).forEach(function(e){f.style[e]=s[e]}),c(f),f.value=e,d=h(f,j),f.value=e,d=h(f,j),f.value="x",b=(m=f.scrollHeight-l)*t,"border-box"===u&&(b=b+l+i),d=Math.max(b,d),g=m*n,"border-box"===u&&(g=g+l+i),[d=Math.min(g,d),m]),w=N[0],S=N[1];k.current!==w&&(k.current=w,v.style.setProperty("height",w+"px","important"),x(w,{rowHeight:S}))}};return i.useLayoutEffect(R),v(R),j(R),i.createElement("textarea",(0,n.Z)({},g,{onChange:function(e){w||R(),d(e)},ref:S}))})},2268:function(e,t,r){r.d(t,{a:function(){return n}});function n(e){return"number"==typeof e&&!Number.isNaN(e)}}}]);