(()=>{var e={};e.id=931,e.ids=[931],e.modules={2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},65:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>s.a,__next_app__:()=>c,originalPathname:()=>p,pages:()=>u,routeModule:()=>x,tree:()=>d}),r(908),r(1506),r(5866);var o=r(3191),i=r(8716),n=r(7922),s=r.n(n),a=r(5231),l={};for(let e in a)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>a[e]);r.d(t,l);let d=["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,908)),"/opt/uno-click/site/app/page.tsx"]}]},{layout:[()=>Promise.resolve().then(r.bind(r,1506)),"/opt/uno-click/site/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,5866,23)),"next/dist/client/components/not-found-error"]}],u=["/opt/uno-click/site/app/page.tsx"],p="/page",c={require:r,loadChunk:()=>Promise.resolve()},x=new o.AppPageRouteModule({definition:{kind:i.x.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},4199:()=>{},9321:(e,t,r)=>{Promise.resolve().then(r.bind(r,8743))},9682:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,2994,23)),Promise.resolve().then(r.t.bind(r,6114,23)),Promise.resolve().then(r.t.bind(r,9727,23)),Promise.resolve().then(r.t.bind(r,9671,23)),Promise.resolve().then(r.t.bind(r,1868,23)),Promise.resolve().then(r.t.bind(r,4759,23))},8743:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var o=r(326),i=r(7577),n=r(5047);function s(){let e=(0,n.useRouter)(),[t,r]=(0,i.useState)(""),[s,l]=(0,i.useState)(""),[d,u]=(0,i.useState)(""),[p,c]=(0,i.useState)(!1);async function x(r){r.preventDefault(),c(!0),u("");try{let r=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({email:t,password:s})}),o=await r.json();if(!r.ok)throw Error(o.message||"Ошибка входа");e.push("/dashboard")}catch(e){u(e instanceof Error?e.message:"Неизвестная ошибка"),c(!1)}}return o.jsx("div",{style:a.container,children:(0,o.jsxs)("div",{style:a.card,children:[o.jsx("h1",{style:a.title,children:"Uno Click"}),o.jsx("p",{style:a.subtitle,children:"Войдите для продолжения"}),d&&o.jsx("div",{style:a.error,children:d}),(0,o.jsxs)("form",{onSubmit:x,children:[(0,o.jsxs)("div",{style:a.formGroup,children:[o.jsx("label",{htmlFor:"email",style:a.label,children:"Email"}),o.jsx("input",{type:"email",id:"email",value:t,onChange:e=>r(e.target.value),required:!0,placeholder:"test.user@uno-click.local",style:a.input})]}),(0,o.jsxs)("div",{style:a.formGroup,children:[o.jsx("label",{htmlFor:"password",style:a.label,children:"Пароль"}),o.jsx("input",{type:"password",id:"password",value:s,onChange:e=>l(e.target.value),required:!0,placeholder:"test123",style:a.input})]}),o.jsx("button",{type:"submit",disabled:p,style:{...a.button,...p?a.buttonDisabled:{}},children:p?"Вход...":"Войти"})]})]})})}let a={container:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#f5f5f5"},card:{background:"white",padding:"40px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px"},title:{fontSize:"24px",fontWeight:600,marginBottom:"8px",color:"#333"},subtitle:{color:"#666",marginBottom:"32px",fontSize:"14px"},formGroup:{marginBottom:"20px"},label:{display:"block",marginBottom:"6px",fontSize:"14px",color:"#333",fontWeight:500},input:{width:"100%",padding:"12px 14px",border:"1px solid #ddd",borderRadius:"6px",fontSize:"14px",transition:"border-color 0.2s"},button:{width:"100%",padding:"12px",background:"#007bff",color:"white",border:"none",borderRadius:"6px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background 0.2s"},buttonDisabled:{background:"#ccc",cursor:"not-allowed"},error:{background:"#fee",color:"#c00",padding:"12px",borderRadius:"6px",marginBottom:"20px",fontSize:"14px"}}},5047:(e,t,r)=>{"use strict";var o=r(7389);r.o(o,"useRouter")&&r.d(t,{useRouter:function(){return o.useRouter}}),r.o(o,"useSearchParams")&&r.d(t,{useSearchParams:function(){return o.useSearchParams}})},1506:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n,metadata:()=>i});var o=r(9510);r(7272);let i={title:"Uno Click",description:"Uno Click - платформа для генерации контента"};function n({children:e}){return o.jsx("html",{lang:"ru",children:o.jsx("body",{children:e})})}},908:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});let o=(0,r(8570).createProxy)(String.raw`/opt/uno-click/site/app/page.tsx#default`)},7272:()=>{}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[819],()=>r(65));module.exports=o})();