PageSourceSearch

https://www.hackdemo.win/_next/static/chunks/app/layout-fc0c549888099861.js

js hackdemo.win collected 2026-10-02 02:10:49 UTC 4,956 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{7083:function(e,t,n){Promise.resolve().then(n.t.bind(n,7960,23)),Promise.resolve().then(n.bind(n,1523)),Promise.resolve().then(n.bind(n,49)),Promise.resolve().then(n.bind(n,9638)),Promise.resolve().then(n.bind(n,5404)),Promise.resolve().then(n.bind(n,9314))},9638:function(e,t,n){"use strict";n.d(t,{default:function(){return c}});var o=n(7437),i=n(2265),a=n(3786),r=n(8291);function c(e){let{gaId:t}=e,[n,c]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let e=()=>c("accepted"===localStorage.getItem("cookie-consent"));return e(),s(!0),window.addEventListener("consent-changed",e),()=>window.removeEventListener("consent-changed",e)},[]),l&&n)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.GoogleAnalytics,{gaId:t}),(0,o.jsx)(r.c,{})]}):null}},5404:function(e,t,n){"use strict";n.d(t,{default:function(){return r}});var o=n(7437),i=n(2265);let a="cookie-consent";function r(){let[e,t]=(0,i.useState)(!1);(0,i.useEffect)(()=>{localStorage.getItem(a)||t(!0)},[]);let n=e=>{localStorage.setItem(a,e?"accepted":"declined"),t(!1),window.dispatchEvent(new Event("consent-changed"))};return e?(0,o.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white border-t border-gray-200 shadow-lg p-4",children:(0,o.jsxs)("div",{className:"max-w-5xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-3",children:[(0,o.jsxs)("p",{className:"text-sm text-gray-600",children:["We use cookies to improve your experience and analyze site usage."," ",(0,o.jsx)("a",{href:"/privacy",className:"underline text-blue-600 hover:text-blue-800",children:"Learn more"})]}),(0,o.jsxs)("div",{className:"flex gap-2 shrink-0",children:[(0,o.jsx)("button",{onClick:()=>n(!1),className:"px-4 py-2 text-sm text-gray-600 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:"Decline"}),(0,o.jsx)("button",{onClick:()=>n(!0),className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-lg hover:bg-blue-700 transition-colors",children:"Accept All"})]})]})}):null}},9314:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var o=n(7437),i=n(4362);function a(e){let{children:t}=e;return(0,o.jsx)(i.H,{children:t})}},4362:function(e,t,n){"use strict";n.d(t,{H:function(){return m},a:function(){return f}});var o=n(7437),i=n(2265);let a=n(257).env.NEXT_PUBLIC_BACKEND_URL||"";function r(e){return"".concat(a).concat(e)}let c=null;async function l(e){try{let t=await fetch(r("/api/auth/token"),{credentials:"include"});if(!t.ok)return;let n=await t.json();n.token&&(c={source:"hackdemo-web",type:"AUTH_TOKEN",token:n.token,user:{name:e.name,email:e.email,image:e.image}},s())}catch(e){}}function s(){c&&("undefined"!=typeof document&&document.documentElement.setAttribute("data-hackdemo-auth",JSON.stringify(c)),window.postMessage(c,window.location.origin))}function u(){"undefined"!=typeof document&&document.documentElement.removeAttribute("data-hackdemo-auth"),window.postMessage({source:"hackdemo-web",type:"LOGOUT"},window.location.origin)}window.addEventListener("message",function(e){var t,n;(null===(t=e.data)||void 0===t?void 0:t.source)==="hackdemo-cs"&&(null===(n=e.data)||void 0===n?void 0:n.type)==="CS_READY"&&c&&s()});let d=(0,i.createContext)(void 0);function m(e){let{children:t}=e,[n,a]=(0,i.useState)(null),[c,s]=(0,i.useState)(!0);async function m(){try{let n=await fetch(r("/api/auth/session"),{credentials:"include"});if(!n.ok)throw Error("Session fetch failed: ".concat(n.status));let o=await n.json();if(null==o?void 0:o.user){var e,t;let n=o.user;a({name:n.name||"User",email:n.email||"",image:n.image||(t=n.name||"User","https://ui-avatars.com/api/?name=".concat(encodeURIComponent(t),"&background=6366f1&color=fff")),credits:null!==(e=n.credits)&&void 0!==e?e:0}),l({name:n.name||"User",email:n.email||"",image:n.image||void 0})}else a(null),u()}catch(e){a(null)}finally{s(!1)}}(0,i.useEffect)(()=>{m()},[]);let f=(0,i.useCallback)(()=>{if("undefined"==typeof document)return;let e=document.createElement("form");e.method="POST",e.action=r("/api/auth/signin/google");let t=document.createElement("input");t.type="hidden",t.name="callbackUrl",t.value=window.location.origin+"/",e.appendChild(t),document.body.appendChild(e),e.submit()},[]),h=(0,i.useCallback)(()=>
1{if(u(),"undefined"==typeof document)return;let e=document.createElement("form");e.method="POST",e.action=r("/api/auth/signout");let t=document.createElement("input");t.type="hidden",t.name="callbackUrl",t.value=window.location.origin+"/",e.appendChild(t),document.body.appendChild(e),e.submit(),a(null)},[]);return(0,o.jsx)(d.Provider,{value:{user:n,isAuthenticated:!!n,isLoading:c,login:f,logout:h,refresh:m},children:t})}function f(){let e=(0,i.useContext)(d);if(!e)throw Error("useAuth must be used within an AuthProvider");return e}},7960:function(){}},function(e){e.O(0,[587,550,971,117,744],function(){return e(e.s=7083)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.