1import{j as e,r as x}from"./client-CHNkNmmv.js";import{l as c,ae as N,X as $,i as G,U,A as Y,c as xe}from"./app-D0qFt-Cz.js";import{S as m,D as X,u as fe,a as J,au as ge,B as M,T as I,b as u,l as be}from"./index-BB5ttvTm.js";import{W as Q}from"./index-BO9fgsti.js";import{S as Z}from"./SEO-dh0oOJ7G.js";import{C as ee}from"./index-CkxS83TH.js";import{S as je,a as te,F as _e,D as se}from"./DefaultSocialButtons-TQ0upKUS.js";import{I as ae}from"./index-Cw-Hc8Qj.js";import{P as oe}from"./index-BZHkeTZ5.js";import{C as re}from"./index-DnF9hndv.js";import{u as ne}from"./firebase-DkALb49A.js";import{a as P,d as ve}from"./colorManipulator-D-o6esCn.js";import"./index-DMwnyYyp.js";import"./index-SH3yyHz1.js";import"./Checkbox-C_6ZshI3.js";import"./FormGroup-D-p2fZnY.js";const w={height:"20px",width:"20px",display:"block",marginRight:".4rem"},we=()=>e.jsxs("svg",{viewBox:"0 0 23 23",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:[e.jsx("path",{fill:"#f25022",d:"M1 1h10v10H1z"}),e.jsx("path",{fill:"#7fba00",d:"M12 1h10v10H12z"}),e.jsx("path",{fill:"#00a4ef",d:"M1 12h10v10H1z"}),e.jsx("path",{fill:"#ffb900",d:"M12 12h10v10H12z"})]}),Se=()=>e.jsxs("svg",{viewBox:"0 0 24 24",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:[e.jsx("path",{fill:"#ff9900",d:"M6.76 13.63c0 .3.03.54.09.72.07.18.16.37.28.58a.35.35 0 0 1 .06.19c0 .08-.05.16-.16.24l-.52.35a.4.4 0 0 1-.22.07c-.08 0-.16-.04-.24-.11a2.5 2.5 0 0 1-.29-.38 6.1 6.1 0 0 1-.25-.47c-.64.76-1.45 1.14-2.42 1.14-.69 0-1.24-.2-1.65-.6-.4-.39-.61-.92-.61-1.58 0-.7.25-1.27.75-1.7.5-.43 1.17-.64 2.02-.64.28 0 .57.02.87.06.3.05.62.11.94.19v-.6c0-.63-.13-1.07-.39-1.32-.27-.26-.72-.38-1.36-.38-.29 0-.59.03-.9.1-.3.08-.6.17-.89.29a2.4 2.4 0 0 1-.29.1.5.5 0 0 1-.13.03c-.12 0-.18-.09-.18-.27v-.42c0-.14.02-.24.06-.3a.63.63 0 0 1 .23-.19c.29-.15.63-.27 1.03-.37a5 5 0 0 1 1.28-.16c.98 0 1.69.22 2.15.67.45.44.68 1.12.68 2.02v2.66zm-3.34 1.25c.27 0 .55-.05.85-.15.3-.1.56-.28.78-.53.14-.16.24-.34.29-.54.05-.2.08-.45.08-.73v-.35a6.8 6.8 0 0 0-1.53-.16c-.55 0-.95.1-1.22.32-.27.22-.4.53-.4.94 0 .38.1.67.3.86.19.2.47.29.85.29zm6.6.89c-.15 0-.26-.03-.33-.09-.07-.05-.13-.17-.19-.34L7.57 8.47a1.5 1.5 0 0 1-.08-.35c0-.14.07-.22.21-.22h.81c.17 0 .28.03.34.09.07.05.12.17.18.34l1.38 5.44 1.28-5.44c.05-.18.1-.29.17-.34a.62.62 0 0 1 .35-.09h.66c.17 0 .29.03.35.09.07.05.13.17.17.34l1.3 5.5 1.42-5.5c.06-.18.12-.29.18-.34a.58.58 0 0 1 .34-.09h.77c.14 0 .22.07.22.22 0 .04 0 .09-.02.14a1.2 1.2 0 0 1-.06.22l-1.98 6.37c-.06.18-.12.29-.19.34a.58.58 0 0 1-.33.09h-.71c-.17 0-.29-.03-.36-.09-.06-.06-.12-.17-.16-.35l-1.27-5.3-1.27 5.3c-.04.18-.1.29-.16.35-.07.06-.19.09-.36.09z"}),e.jsx("path",{fill:"#ff9900",d:"M21.7 18.4c-2.62 1.94-6.43 2.97-9.7 2.97a17.6 17.6 0 0 1-11.87-4.53c-.25-.22-.03-.53.27-.36a23.9 23.9 0 0 0 11.88 3.15c2.9 0 6.1-.6 9.04-1.85.44-.19.81.29.38.62zm1.09-1.24c-.34-.43-2.22-.2-3.07-.1-.26.03-.3-.19-.06-.35 1.5-1.05 3.95-.75 4.24-.4.28.36-.08 2.82-1.48 4-.22.18-.43.08-.33-.16.32-.8 1.03-2.57.7-3z"})]}),ye=()=>e.jsx("svg",{viewBox:"0 0 24 24",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:e.jsx("path",{fill:"#007dc1",d:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 15a5 5 0 1 1 0-10 5 5 0 0 1 0 10z"})}),Ie=()=>e.jsx("svg",{viewBox:"0 0 24 24",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:e.jsx("path",{fill:"#eb5424",d:"M12 1.5 3 5v6.5c0 5 3.8 9.6 9 11 5.2-1.4 9-6 9-11V5l-9-3.5zm0 3.2 2 5.9h5.4l-4.4 3.2 1.7 5.9L12 16l-4.7 3.7 1.7-5.9-4.4-3.2H10l2-5.9z"})}),ke=()=>e.jsx("svg",{viewBox:"0 0 24 24",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:e.jsx("path",{fill:"#4d4d4d",d:"M14.5 3a6.5 6.5 0 0 0-6.2 8.5L2 17.8V22h4.2v-2.2h2.2v-2.2h2.2l1.6-1.6A6.5 6.5 0 1 0 14.5 3zm2 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})}),ie=()=>e.jsx("svg",{viewBox:"0 0 24 24",role:"presentation","aria-hidden":"true",focusable:"false",style:w,children:e.jsx("path",{fill:"currentColor",d:"M12 1 3 5v6c0 5 3.8 9.7 9 11 5.2-1.3 9-6 9-11V5l-9-4zm0 6a2.8 2.8 0 0 1 1.4 5.2V15a1.4 1.4 0 0 1-2.8 0v-2.8A2.8 2.8 0 0 1 12 7z"})}),ze={entra:we,google:je,cognito:Se,okta:ye,auth0:Ie,keycloak:ke,custom:ie},Re=n=>n&&ze[n]||ie,le=n=>{const{connections:t,titlePrefix:p,orLineText:i,showDivider:j=!0,singleConnectionTitle:h,variant:_="default"}=n;if(!t||t.length===0)return null;const f=_==="auth";return e.jsxs(m,{className:"sso-group",...f?{gap:"8px",width:"100%"}:{},children:[t.map(d=>e.jsx(te,{icon:f?_e:Re(d.provider),route:d.login_url,title:t.length===1&&h?h:`${p} ${d.name}`,variant:f?"sso":"default"},d.slug)),j&&i&&e.jsx(X,{sx:{my:"16px"},children:i})]})},De={[N.marketing]:"/cadastre-se",[N.checkout]:"/checkout/identifique-se"},ce=(n,{ssoOnly:t})=>{const p=c.parseInt(c.get(n,"ott_business_type",N.marketing.toString())),i=De[p]??"";return{canRegister:!!i&&!t,href:i,ottBusinessType:p}},Ce=({additional_data:n,external_login_button:t=null,has_login_social:p,has_social_apple:i=!1,has_social_facebook:j,has_social_google:h,should_show_password_form:_,should_show_terms_notice:f=!0,sso_connections:d=[],sso_only:g=!1})=>{const k=x.useRef(null),[z,R]=x.useState(!1),[S,D]=x.useState(!1),[C,v]=x.useState(""),r=$().props,b=fe(),o=c.get(r,"theme",{}),l=(b.palette.mode==="dark"?o.DARK_BASE_COLORS_PRIMARY:o.LIGHT_BASE_COLORS_PRIMARY)||b.palette.primary.main,T=c.get(r,"errors",{}),W=c.get(r,"shouldDisableRegisterFlow",!1),{namespaces:{laravel:a,inertia:y}}=G,s=J(),{analyticEvent:A}=ne(),pe=!g&&p&&[i,j,h].some(Boolean),F=d.length>0,de=pe||F,E=ce(n,{ssoOnly:g}),B=_??!g,he=de&&(B||!!t),H={color:l,minWidth:0,padding:0,"&:hover":{backgroundColor:"transparent",color:l,textDecoration:"underline"}},K={backgroundColor:l,borderRadius:"8px",boxShadow:`0 2px 6px ${P(l,.3)}`,fontSize:"16px",fontWeight:600,height:"48px",lineHeight:"26px","&:hover":{backgroundColor:ve(l,.2),boxShadow:`0 4px 8px ${P(l,.3)}`}},V={...H,fontSize:"12px",fontWeight:400,lineHeight:1.66},q={marginBottom:0,"& .MuiOutlinedInput-root":{borderRadius:"8px",height:"56px",paddingRight:"12px"},"& .MuiInputLabel-root":{fontSize:"16px",fontWeight:400,left:"-2px",letterSpacing:"0.15px"},"& .MuiInputLabel-shrink":{fontSize:"12px"},"& .MuiInputBase-input":{fontWeight:400},"& .MuiInputAdornment-root .MuiIconButton-root":{height:"24px",padding:0,width:"24px"},"& .MuiFormLabel-asterisk":{display:"none"}},ue=L=>{L.preventDefault(),R(!0);const O=U.getFieldsAndMountFormData(k,[{formDataName:"email",formRefKey:"current.email.value"},{formDataName:"password",formRefKey:"current.password.value"},{formDataName:"remember",formRefKey:"current.remember.checked"}
1,{formDataName:"g-recaptcha-response",formRefKey:"current.g-recaptcha-response.value"}]);C&&O.set("g-recaptcha-response",C),Y.post("/acesse-sua-conta",O,{onFinish:()=>R(!1),onError:()=>{D(!0),A("login",{method:"default",success:"false"})},onSuccess:()=>A("login",{method:"default",success:"true"})})},me=L=>{v(L)};return e.jsxs(Q,{pageId:"login-ui-v2",variant:"login",children:[e.jsx(Z,{title:s("login.page_title",a)}),e.jsxs(m,{alignItems:"center",gap:{xs:"24px",md:"32px"},width:"100%",children:[e.jsx(ge,{href:"/",externalHref:!0,variant:"auth"}),e.jsxs(M,{component:"form",onSubmit:ue,ref:k,noValidate:!0,className:"login-form",sx:{alignItems:"center",display:"flex",flexDirection:"column",gap:"24px",maxWidth:"400px",width:"100%"},children:[e.jsx(I,{component:"h1",sx:{fontSize:"24px",fontWeight:600,letterSpacing:0,lineHeight:1.334,margin:0,textAlign:"center",width:"100%"},children:s("login.form_title",a)}),e.jsx(le,{connections:d,titlePrefix:s("socialite.button_login",a),showDivider:!1,singleConnectionTitle:s("login.continue_with_sso",a),variant:"auth"}),!g&&e.jsx(se,{titlePrefix:s("socialite.button_login",a),hasLoginSocial:p,hasSocialApple:i,hasSocialFacebook:j,hasSocialGoogle:h,variant:"compact"}),he&&e.jsx(X,{sx:{color:b.palette.text.secondary,fontSize:"14px",letterSpacing:"0.17px",lineHeight:1.43,width:"100%","&::before, &::after":{borderColor:P(b.palette.text.primary,.12)}},children:s("socialite.or_line",a)}),B&&e.jsxs(e.Fragment,{children:[e.jsxs(m,{alignItems:"stretch",gap:"8px",width:"100%",children:[e.jsxs(m,{gap:"12px",width:"100%",children:[e.jsx(ae,{label:s("forms.labels.email",a),id:"email",name:"email",error:S,helperText:c.get(T,"email",""),className:"login-input-email",InputLabelProps:{sx:{"&.Mui-focused":{color:l}}},sx:q,required:!0}),e.jsx(oe,{label:s("forms.labels.password",a),id:"password",error:S,helperText:c.get(T,"password",""),name:"password",className:"login-input-password",InputLabelProps:{sx:{"&.Mui-focused":{color:l}}},sx:q,required:!0})]}),e.jsxs(m,{direction:"row",justifyContent:"space-between",alignItems:"center",minHeight:"36px",width:"100%",children:[e.jsx(re,{label:s("login.keep_conected",a),name:"remember",compact:!0}),e.jsx(u,{variant:"text",href:"/resgatar-senha",className:"login-forgot-password",sx:{...H,fontSize:"14px",fontWeight:500,lineHeight:"24px"},children:s("login.forgot_password_question",a)})]})]}),e.jsx(ee,{action:"login",onTokenGenerated:me,variant:"auth"}),e.jsx(u,{type:"submit",fullWidth:!0,size:"large",disabled:z,sx:K,className:"login-button",children:s("forms.labels.form_button_login",a)})]}),t&&(t.style==="contained"?e.jsx(be,{href:t.url,variant:"contained",size:"large",fullWidth:!0,sx:K,className:"login-external-button",children:t.label}):e.jsx(M,{className:"login-external-button",width:"100%",children:e.jsx(te,{route:t.url,title:t.label,variant:"sso"})})),B&&!F&&E.canRegister&&!W&&e.jsxs(m,{direction:"row",alignItems:"center",justifyContent:"center",gap:"4px",minHeight:"40px",padding:"8px 16px",width:"100%",children:[e.jsx(I,{component:"span",sx:{fontSize:"16px",fontWeight:400,letterSpacing:"0.15px",lineHeight:1.5},children:s("login.no_account",a)}),e.jsx(u,{variant:"text",href:E.href,sx:{...H,fontSize:"16px",fontWeight:400,letterSpacing:"0.15px",lineHeight:1.5},children:s("labels.register.new_account",y)})]})]}),f&&e.jsxs(M,{className:"login-terms-notice",sx:{display:"flex",flexWrap:"wrap",gap:"3px",justifyContent:"center",maxWidth:"300px",textAlign:"center"},children:[e.jsx(I,{component:"span",sx:{fontSize:"12px",fontWeight:400,lineHeight:1.66,opacity:.7},children:s("login.terms_intro",a)}),e.jsx(u,{variant:"text",href:"/termos-de-uso",sx:V,children:s("footer.terms_of_use",a)}),e.jsx(I,{component:"span",sx:{fontSize:"12px",fontWeight:400,lineHeight:1.66,opacity:.7},children:s("login.terms_connector",a)}),e.jsx(u,{variant:"text",href:"/politica-de-privacidade",sx:V,children:s("footer.privacy_policy",a)})]})]})]})},Te=({additional_data:n,has_login_social:t,has_social_facebook:p,has_social_google:i,sso_connections:j=[],sso_only:h=!1})=>{const _=x.useRef(null),[f,d]=x.useState(!1),[g,k]=x.useState(!1),[z,R]=x.useState(""),S=$().props,D=c.get(S,"errors",{}),C=c.get(S,"shouldDisableRegisterFlow",!1),v=ce(n,{ssoOnly:h}),{namespaces:{laravel:r,inertia:b}}=G,o=J(),{analyticEvent:l}=ne(),T=y=>{y.preventDefault(),d(!0);const s=U.getFieldsAndMountFormData(_,[{formDataName:"email",formRefKey:"current.email.value"},{formDataName:"password",formRefKey:"current.password.value"},{formDataName:"remember",formRefKey:"current.remember.checked"}
1,{formDataName:"g-recaptcha-response",formRefKey:"current.g-recaptcha-response.value"}]);z&&s.set("g-recaptcha-response",z),Y.post("/acesse-sua-conta",s,{onFinish:()=>d(!1),onError:()=>{k(!0),l("login",{method:"default",success:"false"})},onSuccess:()=>l("login",{method:"default",success:"true"})})},W=y=>{R(y)},a=()=>v.canRegister?v.ottBusinessType===N.checkout?e.jsx(u,{href:v.href,variant:"outlined",size:"large",sx:{fontWeight:700,height:{xs:"36px",sm:"48px"}},children:e.jsx("b",{children:o("labels.register.new_account",b)})}):C?null:e.jsx(u,{href:v.href,variant:"outlined",size:"large",className:"btn-header-register",sx:{height:{xs:"36px",sm:"48px"}},children:o("labels.register.new_account",b)}):null;return e.jsxs(Q,{headComponent:a(),pageId:"login-ui-legacy",children:[e.jsx(Z,{title:o("login.page_title",r)}),e.jsxs(m,{alignItems:"center",children:[e.jsx(I,{mb:"30px",sx:{fontSize:"24px"},children:o("login.page_title",r)}),e.jsxs(M,{component:"form",onSubmit:T,ref:_,noValidate:!0,sx:{maxWidth:xe},children:[e.jsx(le,{connections:j,titlePrefix:o("socialite.button_login",r),orLineText:o("socialite.or_line",r),showDivider:!h&&!(t&&(i||p)),variant:"default"}),!h&&e.jsxs(e.Fragment,{children:[e.jsx(se,{titlePrefix:o("socialite.button_login",r),orLineText:o("socialite.or_line",r),hasLoginSocial:t,hasSocialFacebook:p,hasSocialGoogle:i}),e.jsx(ae,{label:o("forms.labels.email",r),id:"email",name:"email",error:g,helperText:c.get(D,"email",""),className:"login-input-email",required:!0}),e.jsx(oe,{label:o("forms.labels.password",r),id:"password",error:g,helperText:c.get(D,"password",""),name:"password",className:"login-input-password",required:!0}),e.jsxs(m,{direction:"row",justifyContent:"space-between",alignItems:"center",paddingBottom:"16px",children:[e.jsx(re,{label:o("login.keep_conected",r),name:"remember"}),e.jsx(u,{variant:"text",href:"/resgatar-senha",className:"login-forgot-password",children:o("login.forgot_password",r)})]}),e.jsx(ee,{action:"login",mb:"30px",onTokenGenerated:W}),e.jsx(u,{type:"submit",fullWidth:!0,size:"large",disabled:f,sx:{height:"48px"},className:"login-button",children:o("forms.labels.form_button_login",r)})]})]})]})]})},Ue=({login_ui_v2_enabled:n=!1,...t})=>n?e.jsx(Ce,{...t}):e.jsx(Te,{...t});export{Ue as default};
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.