PageSourceSearch

https://app.nutritec.ai/_next/static/chunks/8679-a787fe7f702d004b.js

js nutritec.ai collected 2026-10-05 12:19:35 UTC 14,547 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8679],{94128:function(e,t,a){a.d(t,{Z:function(){return n}});var r=a(57437),s=a(27648);function n(){return(0,r.jsxs)("div",{className:"text-balance text-center text-xs text-muted-foreground [&_a]:underline [&_a]:underline-offset-4 hover:[&_a]:text-primary",children:["Cliccando continua, accetti i nostri"," ",(0,r.jsx)(s.default,{href:"/public/terms-of-service",target:"_blank",rel:"noopener noreferrer",children:"Termini di Servizio"})," ","e la nostra"," ",(0,r.jsx)(s.default,{href:"/public/privacy-policy",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),"."]})}},38679:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var r=a(57437),s=a(93448),n=a(88110),i=a(4544),o=a(29251),l=a(22311),d=a(96364),c=a(33145),u=a(2265),h=a(99376),m=a(28667),A=a(85253),p=a(27648),g=a(94128);function x(e){let{className:t,...a}=e,x=(0,h.useRouter)(),[f]=(0,m.Rp)(A.I8),[v,b]=(0,u.useState)({studioName:"",email:"",password:"",confirmPassword:"",wantPaymentMethod:!1}),[w,j]=(0,u.useState)(!1),[y,N]=(0,u.useState)(!1),[C,k]=(0,u.useState)(null),[M,z]=(0,u.useState)(!1),E=e=>{let{name:t,value:a}=e.target;b(e=>({...e,[t]:a}))},P=()=>{let{studioName:e,email:t,password:a,confirmPassword:r}=v;return e&&t&&a&&r?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(t)?a.length<6?(k("La password deve contenere almeno 6 caratteri"),!1):a===r||(k("Le password non coincidono"),!1):(k("Email non valida"),!1):(k("Compila tutti i campi"),!1)},I=async()=>{if(k(null),!M&&P())try{z(!0);let e="/api/auth/register",t=globalThis.crypto&&"randomUUID"in globalThis.crypto?globalThis.crypto.randomUUID():"".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2));console.log("[signup][".concat(t,"] submit"),{url:e,studioName:v.studioName,email:v.email,wantPaymentMethod:v.wantPaymentMethod,password:v.password?"***":void 0});let a=await fetch(e,{method:"POST",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v.email,password:v.password,studioName:v.studioName,wantPaymentMethod:v.wantPaymentMethod})});if(a.ok){let e=await a.json().catch(()=>null);if(console.log("[signup][".concat(t,"] ok"),{status:a.status,trialDays:null==e?void 0:e.trialDays,hasPortalUrl:!!(null==e?void 0:e.portalUrl)}),null==e?void 0:e.portalUrl){window.location.href=e.portalUrl;return}x.push("/auth/onboarding")}else{let e=await a.json().catch(()=>null);console.error("[signup][".concat(t,"] fail"),{status:a.status,body:e}),k((null==e?void 0:e.error)||"Errore durante la registrazione. Riprova pi\xf9 tardi."),z(!1)}}catch(e){console.error("Errore durante la registrazione:",e),k("Errore durante la registrazione. Riprova pi\xf9 tardi."),z(!1)}};return(0,r.jsxs)("div",{className:(0,s.cn)("flex flex-col gap-6",t),...a,children:[(0,r.jsx)(i.Zb,{className:"overflow-hidden px-2",children:(0,r.jsxs)(i.aY,{className:"grid p-0 md:grid-cols-2",children:[(0,r.jsx)("div",{className:"p-6 md:p-8 ",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 ",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold",children:"Nutritec"}),(0,r.jsx)("p",{className:"text-balance text-muted-foreground",children:"Crea il tuo account"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"14 giorni di prova gratuita, senza impegno."})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(l._,{htmlFor:"studioName",children:"Nome studio"}),(0,r.jsx)(o.I,{id:"studioName",type:"text",name:"studioName",placeholder:"Es. Studio Rossi",onChange:E,value:v.studioName,required:!0})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(l._,{htmlFor:"email",children:"Email"}),(0,r.jsx)(o.I,{id:"email",type:"email",name:"email",placeholder:"[email protected]",onChange:E,value:v.email,required:!0})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(l._,{htmlFor:"password",children:"Password"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(o.I,{id:"password",type:w?"text":"password",placeholder:"Password",name:"password",onChange:E,value:v.password,required:!0}),(0,r.jsx)(n.z,{type:"button",variant:"ghost",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>j(!w),children:w?(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-eye-slash",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z"}),(0,r.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829"}),(0,r.jsx)("path",{d:"M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm
110.296 8.884-12-12 .708-.708 12 12z"})]}):(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-eye",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"}),(0,r.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"})]})})]})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(l._,{htmlFor:"confirmPassword",children:"Conferma Password"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(o.I,{id:"confirmPassword",type:y?"text":"password",placeholder:"Conferma Password",name:"confirmPassword",onChange:E,value:v.confirmPassword,required:!0}),(0,r.jsxs)(n.z,{type:"button",variant:"ghost",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>N(!y),children:[y?(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-eye-slash",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z"}),(0,r.jsx)("path",{d:"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829"}),(0,r.jsx)("path",{d:"M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z"})]}):(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-eye",viewBox:"0 0 16 16",children:[(0,r.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"}),(0,r.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"})]}),"                  "]})]})]}),(0,r.jsxs)("div",{children:[C&&(0,r.jsx)("p",{className:"text-red-500",children:C}),(0,r.jsx)(n.z,{onClick:I,disabled:M,"aria-busy":M,className:"w-full mt-2 hover:cursor-pointer disabled:cursor-not-allowed disabled:opacity-70",children:M?(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent","aria-hidden":"true"}),"Registrazione..."]}):"Registrati"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("input",{id:"wantPaymentMethod",type:"checkbox",checked:v.wantPaymentMethod,onChange:e=>b(t=>({...t,wantPaymentMethod:e.target.checked}))}),(0,r.jsx)(l._,{htmlFor:"wantPaymentMethod",children:"Aggiungi metodo di pagamento ora (opzionale)"})]}),(0,r.jsxs)("div",{className:"text-center text-sm",children:["Hai gi\xe0 un account?"," ",(0,r.jsx)(p.default,{href:"/auth",className:"underline underline-offset-4 cursor-pointer",children:"Accedi"})]})]})}),(0,r.jsx)("div",{className:"relative hidden md:block px-4 h-full lg:flex items-center justify-center",children:(0,r.jsx)(c.default,{src:d.Z,alt:"Image",className:"inset-0  w-full object-cover "})})]})}),(0,r.jsx)(g.Z,{})]})}function f(){let[e,t]=(0,u.useState)(!0);return(0,r.jsx)("div",{className:"flex min-h-svh flex-col items-center justify-center bg-muted p-6 md:p-10",children:(0,r.jsx)("div",{className:"w-full max-w-sm md:max-w-3xl",children:(0,r.jsx)(x,{})})})}},88110:function(e,t,a){a.d(t,{d:function(){return l},z:function(){return d}});var r=a(57437),s=a(2265),n=a(37053),i=a(90535),o=a(93448);let l=(0,i.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),d=s.forwardRef((e,t)=>
1{let{className:a,variant:s,size:i,asChild:d=!1,...c}=e,u=d?n.g7:"button";return(0,r.jsx)(u,{"data-slot":"button",className:(0,o.cn)(l({variant:s,size:i,className:a})),ref:t,...c})});d.displayName="Button"},4544:function(e,t,a){a.d(t,{Ol:function(){return i},SZ:function(){return l},Zb:function(){return n},aY:function(){return d},ll:function(){return o}});var r=a(57437);a(2265);var s=a(93448);function n(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"card",className:(0,s.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...a})}function i(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function o(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("leading-none font-semibold",t),...a})}function l(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-muted-foreground text-sm",t),...a})}function d(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-6",t),...a})}},29251:function(e,t,a){a.d(t,{I:function(){return i}});var r=a(57437),s=a(2265),n=a(93448);let i=s.forwardRef((e,t)=>{let{className:a,type:s,...i}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",className:(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),ref:t,...i})});i.displayName="Input"},22311:function(e,t,a){a.d(t,{_:function(){return i}});var r=a(57437);a(2265);var s=a(6394),n=a(93448);function i(e){let{className:t,...a}=e;return(0,r.jsx)(s.f,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},85253:function(e,t,a){a.d(t,{Fw:function(){return l},I8:function(){return o}});var r=a(738),s=a(44752),n=a(4818);let i=(0,r.C6)().length?(0,r.Mq)():(0,r.ZF)({apiKey:"AIzaSyC7nuVDSLy2e2AoDPc7yksjtvyZaJsMRqo",authDomain:"nutritec-7ec88.firebaseapp.com",projectId:"nutritec-7ec88",storageBucket:"nutritec-7ec88.firebasestorage.app",messagingSenderId:"1008844250877",appId:"1:1008844250877:web:1dbcbff9ff5916df762894"}),o=(0,s.v0)(i),l=null;l=(0,n.KL)(i)},93448:function(e,t,a){a.d(t,{cn:function(){return n}});var r=a(61994),s=a(53335);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,s.m6)((0,r.W)(t))}},96364:function(e,t){t.Z={src:"/_next/static/media/login-form-image.8b886965.jpg",height:414,width:826,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoKCgoKCgsMDAsPEA4QDxYUExMUFiIYGhgaGCIzICUgICUgMy03LCksNy1RQDg4QFFeT0pPXnFlZXGPiI+7u/sBCgoKCgoKCwwMCw8QDhAPFhQTExQWIhgaGBoYIjMgJSAgJSAzLTcsKSw3LVFAODhAUV5PSk9ecWVlcY+Ij7u7+//CABEIAAQACAMBIgACEQEDEQH/xAAoAAEBAAAAAAAAAAAAAAAAAAAABwEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAALAE/8QAGhAAAQUBAAAAAAAAAAAAAAAAAgABAxESIf/aAAgBAQABPwDBCZOE0jNq64v/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAECAQE/AH//xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDAQE/AH//2Q==",blurWidth:8,blurHeight:4}}}]);

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.