Files
Atomcms-edit/frontend/.next/static/chunks/17hhv68.sf8ez.js
T
2026-05-09 17:32:17 +02:00

1 line
27 KiB
JavaScript
Executable File

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={formatUrl:function(){return n},formatWithValidation:function(){return d},urlObjectKeys:function(){return i}};for(var a in l)Object.defineProperty(t,a,{enumerable:!0,get:l[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function n(e){let{auth:r,hostname:t}=e,l=e.protocol||"",a=e.pathname||"",n=e.hash||"",i=e.query||"",d=!1;r=r?encodeURIComponent(r).replace(/%3A/i,":")+"@":"",e.host?d=r+e.host:t&&(d=r+(~t.indexOf(":")?`[${t}]`:t),e.port&&(d+=":"+e.port)),i&&"object"==typeof i&&(i=String(o.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return l&&!l.endsWith(":")&&(l+=":"),e.slashes||(!l||s.test(l))&&!1!==d?(d="//"+(d||""),a&&"/"!==a[0]&&(a="/"+a)):d||(d=""),n&&"#"!==n[0]&&(n="#"+n),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${l}${d}${a}${c}${n}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return n(e)}},18581,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return a}});let l=e.r(71645);function a(e,r){let t=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useCallback)(l=>{if(null===l){let e=t.current;e&&(t.current=null,e());let r=a.current;r&&(a.current=null,r())}else e&&(t.current=o(e,l)),r&&(a.current=o(r,l))},[e,r])}function o(e,r){if("function"!=typeof e)return e.current=r,()=>{e.current=null};{let t=e(r);return"function"==typeof t?t:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},73668,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let l=e.r(18967),a=e.r(52817);function o(e){if(!(0,l.isAbsoluteUrl)(e))return!0;try{let r=(0,l.getLocationOrigin)(),t=new URL(e,r);return t.origin===r&&(0,a.hasBasePath)(t.pathname)}catch(e){return!1}}},84508,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return l}});let l=e=>{}},22016,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={default:function(){return x},useLinkStatus:function(){return v}};for(var a in l)Object.defineProperty(t,a,{enumerable:!0,get:l[a]});let o=e.r(90809),s=e.r(43476),n=o._(e.r(71645)),i=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),f=e.r(5550);e.r(33525);let m=e.r(88540),p=e.r(91949),h=e.r(73668),b=e.r(9396);function x(r){var t,l;let a,o,x,[v,y]=(0,n.useOptimistic)(p.IDLE_LINK_STATUS),j=(0,n.useRef)(null),{href:w,as:N,children:k,prefetch:C=null,passHref:S,replace:_,shallow:R,scroll:L,onClick:O,onMouseEnter:P,onTouchStart:A,legacyBehavior:M=!1,onNavigate:T,transitionTypes:z,ref:$,unstable_dynamicOnHover:E,...I}=r;a=k,M&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let B=n.default.useContext(d.AppRouterContext),F=!1!==C,U=!1!==C?null===(l=C)||"auto"===l?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,D="string"==typeof(t=N||w)?t:(0,i.formatUrl)(t);if(M){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=n.default.Children.only(a)}let W=M?o&&"object"==typeof o&&o.ref:$,J=n.default.useCallback(e=>(null!==B&&(j.current=(0,p.mountLinkInstance)(e,D,B,U,F,y)),()=>{j.current&&((0,p.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,D,B,U,y]),K={ref:(0,c.useMergedRef)(J,W),onClick(r){M||"function"!=typeof O||O(r),M&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(r),!B||r.defaultPrevented||function(r,t,l,a,o,s,i){if("u">typeof window){let d,{nodeName:c}=r.currentTarget;if("A"===c.toUpperCase()&&((d=r.currentTarget.getAttribute("target"))&&"_self"!==d||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||r.nativeEvent&&2===r.nativeEvent.which)||r.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(t)){a&&(r.preventDefault(),location.replace(t));return}if(r.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);n.default.startTransition(()=>{u(t,a?"replace":"push",!1===o?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,l.current,i)})}}(r,D,j,_,L,T,z)},onMouseEnter(e){M||"function"!=typeof P||P(e),M&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),B&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===E)},onTouchStart:function(e){M||"function"!=typeof A||A(e),M&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),B&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===E)}};return(0,u.isAbsoluteUrl)(D)?K.href=D:M&&!S&&("a"!==o.type||"href"in o.props)||(K.href=(0,f.addBasePath)(D)),x=M?n.default.cloneElement(o,K):(0,s.jsx)("a",{...I,...K,children:a}),(0,s.jsx)(g.Provider,{value:v,children:x})}e.r(84508);let g=(0,n.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,n.useContext)(g);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},88589,e=>{"use strict";var r=e.i(43476),t=e.i(71645),l=e.i(22016);let a=[{href:"/",label:"Home"},{href:"/discord",label:"Discord",external:!0}],o=[{href:"/help-center/rules",label:"Regels"}],s=[{href:"/community/radio",label:"Radio Home"},{href:"/community/radio/rooster",label:"DJ Rooster"},{href:"/community/radio/shouts",label:"Live Berichten"},{href:"/community/radio/dj-aanmelden",label:"DJ worden"},{href:"/community/radio/punten",label:"Radio Punten"}],n=[{code:"nl",flag:"🇳🇱"},{code:"en",flag:"🇬🇧"},{code:"da",flag:"🇩🇰"},{code:"fi",flag:"🇫🇮"},{code:"de",flag:"🇩🇪"},{code:"fr",flag:"🇫🇷"},{code:"tr",flag:"🇹🇷"},{code:"se",flag:"🇸🇪"},{code:"br",flag:"🇧🇷"},{code:"it",flag:"🇮🇹"},{code:"es",flag:"🇪🇸"},{code:"no",flag:"🇳🇴"}];e.s(["default",0,function(){let[e,i]=(0,t.useState)(!1),[d,c]=(0,t.useState)(null),[u,f]=(0,t.useState)(!1),m=e=>{c(d===e?null:e)};return(0,r.jsxs)("nav",{className:"relative shadow-md bg-navbar text-navbar-text",children:[(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,r.jsx)("div",{className:"hidden md:flex items-center space-x-1",children:(0,r.jsxs)("div",{className:"hidden md:flex h-16 items-center gap-6",children:[a.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"nav-item border-b-2 border-primary px-3 py-2 text-sm font-semibold tracking-wide uppercase transition-all duration-200 hover:border-b-primary",style:{color:"var(--color-navbar-text)"},children:e.label},e.href)),(0,r.jsxs)("div",{className:"relative h-16 px-3 text-sm font-semibold tracking-wide uppercase transition-all duration-200 ease-in-out border-b-2 border-transparent hover:border-b-primary z-50",children:[(0,r.jsxs)("button",{onClick:()=>m("support"),className:"flex items-center gap-2 h-full",children:["Ondersteuning",(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${"support"===d?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),"support"===d&&(0,r.jsx)("div",{className:"absolute left-0 mt-0 top-full overflow-hidden shadow-lg whitespace-nowrap z-50 min-w-[150px] rounded-lg border border-primary bg-white",children:o.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"block px-4 py-2 hover:bg-gray-100 transition-colors",children:e.label},e.href))})]}),(0,r.jsxs)("div",{className:"relative h-16 px-3 text-sm font-semibold tracking-wide uppercase transition-all duration-200 ease-in-out border-b-2 border-transparent hover:border-b-primary z-50",children:[(0,r.jsxs)("button",{onClick:()=>m("radio"),className:"flex items-center gap-2 h-full",children:["Radio",(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${"radio"===d?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),"radio"===d&&(0,r.jsx)("div",{className:"absolute left-0 mt-0 top-full overflow-hidden shadow-lg whitespace-nowrap z-50 min-w-[150px] rounded-lg border border-primary bg-white",children:s.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"block px-4 py-2 hover:bg-gray-100 transition-colors",children:e.label},e.href))})]})]})}),(0,r.jsx)("div",{className:"hidden lg:flex items-center",children:(0,r.jsxs)("div",{className:"relative h-16 px-3 text-sm font-semibold tracking-wide uppercase transition-all duration-200 ease-in-out border-b-2 border-transparent hover:border-b-primary z-50",children:[(0,r.jsxs)("button",{onClick:()=>f(!u),className:"flex items-center gap-2 h-full",children:[(0,r.jsx)("span",{className:"w-5 h-4 object-cover rounded-sm",children:"🇩🇪"}),(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${u?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),u&&(0,r.jsx)("div",{className:"absolute left-0 mt-0 top-full overflow-hidden shadow-lg whitespace-nowrap z-50 min-w-[50px] -ml-4 rounded-lg border border-primary bg-white",children:n.map(e=>(0,r.jsx)(l.default,{href:`/language/${e.code}`,className:"block px-4 py-2 hover:bg-gray-100 transition-colors text-lg",children:e.flag},e.code))})]})}),(0,r.jsxs)("button",{onClick:()=>i(!e),className:"absolute right-4 top-4 z-10 p-2 rounded-lg transition-all duration-200 hover:bg-gray-100 md:hidden","aria-controls":"mobile-menu","aria-expanded":e,children:[(0,r.jsx)("span",{className:"sr-only",children:"Menu openen"}),e?(0,r.jsx)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}):(0,r.jsx)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})]})]})}),e&&(0,r.jsx)("div",{className:"absolute top-full left-0 right-0 z-40 shadow-xl border-t-2 max-h-[80vh] overflow-y-auto md:hidden bg-white border-primary",children:(0,r.jsxs)("div",{className:"py-2",children:[a.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"block px-4 py-3 border-b border-gray-200 hover:bg-gray-50",children:e.label},e.href)),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>m("mobile-support"),className:"flex items-center justify-between w-full px-4 py-3 text-sm font-semibold uppercase tracking-wide",children:[(0,r.jsx)("span",{children:"Unterstützung"}),(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${"mobile-support"===d?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),"mobile-support"===d&&(0,r.jsx)("div",{className:"bg-white rounded-lg border border-primary shadow-dropdown",children:o.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"block px-4 py-2 hover:bg-gray-100",children:e.label},e.href))})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>m("mobile-radio"),className:"flex items-center justify-between w-full px-4 py-3 text-sm font-semibold uppercase tracking-wide",children:[(0,r.jsx)("span",{children:"Radio"}),(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${"mobile-radio"===d?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),"mobile-radio"===d&&(0,r.jsx)("div",{className:"bg-white rounded-lg border border-primary shadow-dropdown",children:s.map(e=>(0,r.jsx)(l.default,{href:e.href,className:"block px-4 py-2 hover:bg-gray-100",children:e.label},e.href))})]}),(0,r.jsx)("div",{className:"w-full flex justify-center mt-4 mb-2",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>f(!u),className:"flex items-center gap-2 px-4 py-3 text-sm font-semibold uppercase",children:[(0,r.jsx)("span",{children:"🇳🇱"}),(0,r.jsx)("svg",{className:`h-5 w-5 transition-transform duration-200 ${u?"rotate-180":""}`,style:{color:"#6b7280"},viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]}),u&&(0,r.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 mt-0 top-full bg-white rounded-lg border border-primary shadow-dropdown z-50 min-w-[50px]",children:n.map(e=>(0,r.jsx)(l.default,{href:`/language/${e.code}`,className:"block px-4 py-2 hover:bg-gray-100 text-lg",children:e.flag},e.code))})]})})]})})]})}])},18566,(e,r,t)=>{r.exports=e.r(76562)},32177,e=>{"use strict";var r=e.i(43476),t=e.i(71645),l=e.i(22016),a=e.i(18566);function o({isOpen:e,onClose:s}){let[n,i]=(0,t.useState)(""),[d,c]=(0,t.useState)(""),[u,f]=(0,t.useState)(""),[m,p]=(0,t.useState)(!1),[h,b]=(0,t.useState)(!1),x=(0,a.useRouter)();if(!e)return null;let g=async e=>{if(e.preventDefault(),f(""),p(!0),!n||!d){f("Vul alle velden in"),p(!1);return}try{let e=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({username:n,password:d})}),r=await e.json();if(!e.ok){let e=r.message||r.errors?.email?.[0]||"Inloggen mislukt";f(e),p(!1);return}r.token&&(localStorage.setItem("token",r.token),localStorage.setItem("user",JSON.stringify(r.user)),b(!0),setTimeout(()=>{s(),x.refresh()},1e3))}catch(e){f("Er is iets fout gegaan. Probeer opnieuw.")}p(!1)};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true",children:(0,r.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden p-4",onClick:s,children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50"}),(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"relative w-full max-w-xl rounded px-6 py-6 shadow-md",style:{backgroundColor:"#ffffff",color:"#1f2937"},children:[(0,r.jsx)("button",{type:"button",onClick:s,className:"absolute top-3 right-2.5 rounded-lg p-1.5 ml-auto inline-flex items-center transition-colors hover:bg-gray-100",style:{backgroundColor:"transparent",color:"#6b7280"},children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),(0,r.jsxs)("div",{className:"mb-2 flex flex-col items-center",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold",children:"Hallo!"}),(0,r.jsx)("p",{style:{color:"#6b7280"},children:"Er zijn momenteel 0 gebruikers online"})]}),h&&(0,r.jsx)("div",{className:"mb-4 p-3 rounded bg-green-50 text-green-600 text-sm text-center",children:"Succes! Je wordt ingelogd..."}),u&&(0,r.jsx)("div",{className:"mb-4 p-3 rounded bg-red-50 text-red-600 text-sm",children:u}),(0,r.jsxs)("form",{className:"flex flex-col gap-y-3",onSubmit:g,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"username",children:"Gebruikersnaam"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"username",type:"text",name:"username",value:n,onChange:e=>i(e.target.value),placeholder:"Gebruikersnaam",autoFocus:!0,disabled:m||h})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"password",children:"Wachtwoord"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"password",type:"password",name:"password",value:d,onChange:e=>c(e.target.value),placeholder:"Wachtwoord",disabled:m||h})]}),(0,r.jsx)("div",{className:"cf-turnstile","data-sitekey":"0x4AAAAAAAPbYT6IObDf-CsO"}),(0,r.jsx)("button",{type:"submit",disabled:m||h,className:"w-full rounded font-semibold px-6 py-2 transition duration-200 hover:opacity-90 disabled:opacity-50",style:{backgroundColor:"#eeb425",color:"#1f2937",borderRadius:"8px",border:"2px solid #eeb425"},children:m?"Laden...":h?"Succes!":"Inloggen"}),(0,r.jsx)("div",{className:"text-center text-sm font-semibold",style:{color:"#6b7280"},children:(0,r.jsx)(l.default,{href:"/forgot-password",className:"hover:underline",style:{color:"#eeb425"},children:"Wachtwoord vergeten?"})}),(0,r.jsx)("div",{className:"text-center text-sm font-semibold",style:{color:"#6b7280"},children:(0,r.jsx)(l.default,{href:"/register",className:"hover:underline",style:{color:"#eeb425"},children:"Nog geen account? Nu aanmelden!"})})]})]})]})})}function s({isOpen:e,onClose:l,onLoginClick:o}){let[n,i]=(0,t.useState)({username:"",mail:"",password:"",password_confirmation:"",terms:!1}),[d,c]=(0,t.useState)(""),[u,f]=(0,t.useState)(!1),[m,p]=(0,t.useState)(!1),h=(0,a.useRouter)();if(!e)return null;let b=async e=>{if(e.preventDefault(),c(""),f(!0),!n.username||!n.mail||!n.password||!n.password_confirmation){c("Vul alle velden in"),f(!1);return}if(!n.terms){c("Je moet akkoord gaan met de algemene voorwaarden"),f(!1);return}if(n.password!==n.password_confirmation){c("Wachtwoorden komen niet overeen"),f(!1);return}try{let e=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)}),r=await e.json();if(!e.ok){let e=r.errors?Object.values(r.errors).flat().join(", "):r.message||"Registratie mislukt";c(e),f(!1);return}r.token&&(localStorage.setItem("token",r.token),localStorage.setItem("user",JSON.stringify(r.user)),p(!0),setTimeout(()=>{l(),h.refresh()},1e3))}catch(e){c("Er is iets fout gegaan. Probeer opnieuw.")}f(!1)};return(0,r.jsx)("div",{className:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true",children:(0,r.jsxs)("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden p-4",onClick:l,children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50"}),(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"relative w-full max-w-xl rounded px-6 py-6 shadow-md",style:{backgroundColor:"#ffffff",color:"#1f2937"},children:[(0,r.jsx)("button",{type:"button",onClick:l,className:"absolute top-3 right-2.5 rounded-lg p-1.5 ml-auto inline-flex items-center transition-colors hover:bg-gray-100",style:{backgroundColor:"transparent",color:"#6b7280"},children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),(0,r.jsxs)("div",{className:"mb-2 flex flex-col items-center",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold",children:"Account aanmaken"}),(0,r.jsx)("p",{style:{color:"#6b7280"},children:"Word onderdeel van de community!"})]}),m&&(0,r.jsx)("div",{className:"mb-4 p-3 rounded bg-green-50 text-green-600 text-sm text-center",children:"Succes! Je wordt geregistreerd..."}),d&&(0,r.jsx)("div",{className:"mb-4 p-3 rounded bg-red-50 text-red-600 text-sm",children:d}),(0,r.jsxs)("form",{className:"flex flex-col gap-y-3",onSubmit:b,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"reg_username",children:"Gebruikersnaam"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"reg_username",type:"text",name:"username",value:n.username,onChange:e=>i({...n,username:e.target.value}),placeholder:"Gebruikersnaam",autoFocus:!0,disabled:u||m})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"reg_email",children:"E-mailadres"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"reg_email",type:"email",name:"mail",value:n.mail,onChange:e=>i({...n,mail:e.target.value}),placeholder:"E-mailadres",disabled:u||m})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"reg_password",children:"Wachtwoord"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"reg_password",type:"password",name:"password",value:n.password,onChange:e=>i({...n,password:e.target.value}),placeholder:"Wachtwoord",disabled:u||m})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block font-semibold text-gray-700",htmlFor:"reg_password_confirmation",children:"Wachtwoord bevestigen"}),(0,r.jsx)("input",{className:"focus:ring-0 border-2 rounded w-full mt-1 px-3 py-2",style:{backgroundColor:"#f3f4f6",color:"#1f2937",borderColor:"#eeb425"},id:"reg_password_confirmation",type:"password",name:"password_confirmation",value:n.password_confirmation,onChange:e=>i({...n,password_confirmation:e.target.value}),placeholder:"Wachtwoord bevestigen",disabled:u||m})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"checkbox",id:"terms",checked:n.terms,onChange:e=>i({...n,terms:e.target.checked}),disabled:u||m,className:"w-4 h-4"}),(0,r.jsxs)("label",{htmlFor:"terms",className:"text-sm text-gray-600",children:["Ik ga akkoord met de"," ",(0,r.jsx)("a",{href:"/terms",className:"text-primary hover:underline",children:"algemene voorwaarden"})]})]}),(0,r.jsx)("div",{className:"cf-turnstile","data-sitekey":"0x4AAAAAAAPbYT6IObDf-CsO"}),(0,r.jsx)("button",{type:"submit",disabled:u||m,className:"w-full rounded font-semibold px-6 py-2 transition duration-200 hover:opacity-90 disabled:opacity-50",style:{backgroundColor:"#10b981",color:"#ffffff",borderRadius:"8px",border:"2px solid #10b981"},children:u?"Laden...":m?"Succes!":"Account aanmaken"}),(0,r.jsx)("div",{className:"text-center text-sm font-semibold",style:{color:"#6b7280"},children:(0,r.jsx)("button",{type:"button",onClick:()=>{l(),o()},className:"hover:underline",style:{color:"#eeb425"},children:"Al een account? Nu inloggen!"})})]})]})]})})}e.s(["default",0,function(){let[e,l]=(0,t.useState)(!1),[a,n]=(0,t.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"relative flex min-h-[13rem] h-52 w-full items-center justify-center header-bg",style:{background:"url(/assets/images/kasja_mepage_header.png)",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50"}),(0,r.jsxs)("div",{className:"relative z-10 flex-col md:w-[600px] text-center",children:[(0,r.jsx)("p",{className:"hidden text-center text-xl md:block text-white mb-4",children:"Een online virtuele wereld waarin je je eigen avatar kunt maken, vrienden kunt maken, kunt chatten, kamers kunt maken en nog veel meer!"}),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-x-6 gap-y-4 md:flex-row md:gap-y-0",children:[(0,r.jsx)("button",{type:"button",onClick:()=>l(!0),className:"rounded-full border-2 px-8 py-2 uppercase transition duration-200 ease-in-out font-semibold",style:{borderColor:"#eeb425",backgroundColor:"#eeb425",color:"#1f2937"},children:"Inloggen"}),(0,r.jsx)("p",{className:"text-sm uppercase text-gray-300",children:"Of"}),(0,r.jsx)("button",{onClick:()=>n(!0),className:"uppercase px-8 py-2.5 rounded-full transition ease-in-out duration-200 font-semibold",style:{backgroundColor:"#10b981",color:"#ffffff"},children:"Account aanmaken"})]})]})]}),(0,r.jsx)(o,{isOpen:e,onClose:()=>l(!1)}),(0,r.jsx)(s,{isOpen:a,onClose:()=>n(!1),onLoginClick:()=>{n(!1),l(!0)}})]})}],32177)},56753,e=>{"use strict";var r=e.i(43476),t=e.i(71645);e.s(["default",0,function({photo:e}){let[l,a]=(0,t.useState)(!1),o=e.image?`https://epicnabbo.nl${e.image}`:"";return(0,r.jsx)("a",{href:e.image?`https://epicnabbo.nl${e.image}`:"#","data-fancybox":"gallery",className:"group cursor-pointer block",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,r.jsxs)("div",{className:"relative rounded-lg overflow-hidden shadow-md border border-gray-600 hover:border-[#eeb425] transition-all duration-300",children:[(0,r.jsxs)("div",{className:"aspect-[4/3] relative overflow-hidden",children:[e.image?(0,r.jsx)("img",{src:o,alt:`Photo by ${e.user.username}`,className:`h-full w-full object-cover object-center transition-transform duration-300 ${l?"scale-110":"scale-100"}`}):(0,r.jsx)("div",{className:"w-full h-full bg-gray-700 flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-gray-400 text-xs",children:"No image"})}),(0,r.jsx)("div",{className:`absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent transition-opacity duration-300 ${l?"opacity-100":"opacity-0"}`})]}),(0,r.jsx)("div",{className:`absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/90 to-transparent transition-opacity duration-300 ${l?"opacity-100":"opacity-0"}`,children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex h-7 w-7 items-center justify-center overflow-hidden rounded-full bg-gray-700 border border-gray-500",children:(0,r.jsx)("img",{src:e.user.avatar,alt:e.user.username,className:"h-full w-full object-cover"})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:(0,r.jsx)("p",{className:"text-white text-sm font-semibold truncate",children:e.user.username})})]})})]})})}])}]);