PageSourceSearch

https://agibank.com.br/_next/static/chunks/KBb7MMl_MAmZ0fOYnwzGl-6707-12f79012085083ca.js

js agibank.com.br collected 2026-10-01 11:30:02 UTC 15,151 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6707],{27294:(e,t,r)=>{r.d(t,{I:()=>o});var a=r(65551),n=r(81762),l=r(29972);let o=e=>{let t=(e=>{var t;return{event:"interaction",action:e.action,element_name:(0,l.J)(e.element_name),element_type:e.element_type,element_location:e.element_location,...e.product_category&&{product_category:e.product_category},...e.destination_url&&{destination_url:e.destination_url,destination_type:null!=(t=e.destination_type)?t:n.$},...e.video_link&&{video_link:e.video_link},...e.video_duration&&{video_duration:e.video_duration},...void 0!==e.video_progress&&{video_progress:e.video_progress}}})(e);(0,a.d)(t)}},27750:(e,t,r)=>{r.d(t,{_:()=>o});var a=r(65069),n=r(54879),l=r(87358);let o=(0,a.w)({server:{ENV_TYPE:n.k5(["dev","hlg","hom","prd","test"]).transform(e=>"hlg"===e?"hom":e).default("dev"),NODE_ENV:n.k5(["development","production"]),PORT:n.au.number().optional().default(3e3),GROWTHBOOK_CLIENT_KEY:n.Yj(),GROWTHBOOK_API_HOST:n.Yj()},client:{NEXT_PUBLIC_GTM_ID:n.Yj(),NEXT_PUBLIC_NEW_GTM_ID:n.Yj(),NEXT_PUBLIC_FGTS_TAX:n.Yj(),NEXT_PUBLIC_CONSIGNADO_TAX:n.Yj(),NEXT_PUBLIC_FGTS_INSTALLMENTS:n.Yj(),NEXT_PUBLIC_PHONE_WPP:n.Yj(),NEXT_PUBLIC_RECAPTCHA_KEY:n.Yj(),NEXT_PUBLIC_FGTS_MINIMUM_LOAN_VALUE:n.Yj(),NEXT_PUBLIC_EMPRESTIMO_PESSOAL_LEAD_MODAL:n.Yj(),NEXT_PUBLIC_API_MOCKING:n.k5(["enabled","disabled"]).optional(),NEXT_PUBLIC_UTM_CODE_DEFAULT:n.Yj()},runtimeEnv:{NEXT_PUBLIC_GTM_ID:"GTM-PLNRV3N",NEXT_PUBLIC_NEW_GTM_ID:"GTM-M4Z6VJHF",NEXT_PUBLIC_PHONE_WPP:"551130042221",NEXT_PUBLIC_FGTS_TAX:"1.24",NEXT_PUBLIC_CONSIGNADO_TAX:"1,80",NEXT_PUBLIC_FGTS_INSTALLMENTS:"10",NEXT_PUBLIC_RECAPTCHA_KEY:"6LePz58UAAAAAMq9LLfCka-mSvGPOCdGIgBkQ7nX",NEXT_PUBLIC_FGTS_MINIMUM_LOAN_VALUE:"150",NEXT_PUBLIC_EMPRESTIMO_PESSOAL_LEAD_MODAL:"x-enabled",ENV_TYPE:l.env.ENV_TYPE,NODE_ENV:"production",PORT:l.env.PORT,NEXT_PUBLIC_UTM_CODE_DEFAULT:"CeosDpi",NEXT_PUBLIC_API_MOCKING:l.env.NEXT_PUBLIC_API_MOCKING,GROWTHBOOK_CLIENT_KEY:l.env.GROWTHBOOK_CLIENT_KEY,GROWTHBOOK_API_HOST:l.env.GROWTHBOOK_API_HOST}})},29972:(e,t,r)=>{r.d(t,{J:()=>a});let a=e=>null==e?void 0:e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"_").replace(/^_|_$/g,"")},38999:(e,t,r)=>{r.d(t,{Q:()=>n});var a=r(27750);async function n(){return window.grecaptcha?window.grecaptcha.execute(a._.NEXT_PUBLIC_RECAPTCHA_KEY,{action:"leadForm"}):null}},50723:(e,t,r)=>{r.d(t,{q:()=>a});function a(e){let t=e.replace(/\D/g,"");if(11!==t.length||/^(\d)\1+$/.test(t))return!1;let r=0;for(let e=0;e<9;e+=1)r+=parseInt(t.charAt(e),10)*(10-e);let a=r%11,n=a<2?0:11-a;r=0;for(let e=0;e<10;e+=1)r+=parseInt(t.charAt(e),10)*(11-e);let l=(a=r%11)<2?0:11-a;return n===parseInt(t.charAt(9),10)&&l===parseInt(t.charAt(10),10)}},51329:(e,t,r)=>{r.d(t,{x:()=>n});let a=/^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?@[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])?\.[a-zA-Z]{2,}$/;function n(e){return a.test(e)}},52296:(e,t,r)=>{r.d(t,{N:()=>L});var a=r(95155),n=r(77979),l=r(12768),o=r(12115),i=function(e){return e[e.VALID=1]="VALID",e[e.INVALID=2]="INVALID",e[e.INITIAL=3]="INITIAL",e}({});let s=(0,o.createContext)(null),c=()=>{let e=(0,o.useContext)(s);if(!e)throw Error("Input compound components must be used within Input");return e},d=e=>{let{children:t,position:r,onClick:l,className:o=""}=e,{disabled:i}=c(),s=(0,n.Q)("appearance-none border-0 bg-transparent p-0 m-0 shadow-none",{"order-first":"left"===r,"order-last":"right"===r,"cursor-pointer":l&&!i,"cursor-not-allowed":i},o);return l?(0,a.jsx)("button",{type:"button",className:s,onClick:()=>{i||l()},disabled:i,children:t}):(0,a.jsx)("div",{className:s,children:t})},u=(0,o.forwardRef)((e,t)=>{let{placeholder:r,type:s="text",className:u="",children:_}=e,{value:m,onValueChange:p,error:h,id:I,disabled:E,setError:N,validateFunc:T,onInputBlur:v}=c(),L=(0,o.useMemo)(()=>h.isValid===i.INVALID,[h]),g=(0,o.useMemo)(()=>h.isValid===i.VALID,[h]);return(0,a.jsxs)("div",{className:(0,n.Q)("relative flex rounded-lg px-3 py-2 outline-none outline-1 outline-primary-100 transition-colors duration-200 focus-within:ring-2",{"border-critical-200":L},{"cursor-not-allowed bg-gray-200 text-gray-700 opacity-60":E}),children:[(0,a.jsx)("input",{ref:t,id:I,type:s,value:m,onInput:e=>{let t=e.currentTarget.value;if(p(t),t&&T&&"function"==typeof T){let e=T(t);e.isValid===i.VALID&&N(e)}},onBlur:e=>{let t=e.target.value;if(T&&"function"==typeof T){let e=T(t);N(e),null==v||v((null==e?void 0:e.isValid)===i.VALID);return}null==v||v(!0)},placeholder:r,disabled:E,"data-testid":"input-field",className:(0,n.Q)("w-full appearance-none border-none bg-transparent text-primary-100 outline-none",u),"aria-invalid":L,"aria-describedby":L?"".concat(I,"-error"):void 0}),_,g&&(0,a.jsx)(d,{position:"right",children:(0,a.jsx)(l.q2G,{className:"h-6 w-4 text-primary-200"})}),L&&(0,a.jsx)(d,{position:"right",children:(0,a.jsx)(l._Kz,{className:"h-6 w-4 text-critical-200"})})]})});u.displayName="InputField";let _=e=>{let{children:t,value:r,defaultValue:l="",disabled:c=!1,className:d,onValueChange:u,maskFunc:_,validateFunc:m,onInputBlur:p}=e,[h,I]=(0,o.useState)(null!=r?r:l),E=void 0!==r?r:h,[N,T]=(0,o.useState)({isValid:i.INITIAL}),v=o.useId(),L=(0,o.useCallback)(e=>{c||(_&&"function"==typeof _&&(e=_(e)),void 0===r&&I(e),null==u||u(e))},[r,c,u]),g=(0,o.useCallback)(e=>null==p?void 0:p(e),[p]);return(0,a.jsx)(s.Provider,{value:{value:E,error:N,setError:T,id:v,disabled:c,maskFunc:_,validateFunc:m,onValueChange:L,onInputBlur:g},children:(0,a.jsx)("div",{className:(0,n.Q)("flex flex-col",d),"data-testid":"input-wrapper",children:t})})};_.Label=e=>{let{children:t,required:r=!1}=e,{id:l}=c();return(0,a.jsxs)("label",{htmlFor:l,"data-testid":"input-label",className:(0,n.Q)("text-base font-medium text-primary-100"),children:[t,r&&(0,a.jsx)("span",{className:"required",children:"*"})]})},_.Field=u,_.Error=e=>{let{children:t}=e,{error:r,id:l}=c();return r||t?(0,a.jsx)("span",{id:"".concat(l,"-error"),className:(0,n.Q)("mt-2 text-critical-200",{hidden:r.isValid===i.VALID}),role:"alert",children:t||(null==r?void 0:r.message)}):null},_.Icon=d,_.Hint=e=>{let{children:t}=e,{error:r,id:n}=c();return r.isValid!==i.INVALID&&t?(0,a.jsx)("span",{id:"".concat(n,"-hint"),className:"mt-2 text-sm text-primary-100",role:"tooltip",children:t}):null};var m=r(54921);let p=["de","da","do","dos","das","d'","de","del","dell","di","la","le","lo","el","la","las","los"];var h=r(54879),I=r(50723),E=r(51329);class N{required(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Campo \xe9 obrigat\xf3rio";return this.schema=this.schema.refine(e=>""!==e.trim(),{message:e}),this}minLength(e,t){return this.schema=this.schema.refine(t=>t.trim().length>e,{message:t||"Deve ter no m\xednimo ".concat(e," caracteres")}),this}maxLength(e,t){return this.schema=this.schema.refine(t=>t.trim().length<=e,{message:t||"Deve ter no m\xe1ximo ".concat(e," caracteres")}),this}email(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"E-mail inv\xe1lido";return this.schema=this.schema.refine(e=>(0,E.x)(e),{message:e}),this}noNumbers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"N\xe3o deve conter n\xfameros";return this.schema=this.schema.refine(e=>!/\d/.test(e),{message:e}),this}validCPF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"CPF inv\xe1lido";return this.schema=this.schema.refine(e=>(0,I.q)(e),{message:e}),this}validPhone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Celular inv\xe1lido";return this.schema=this.schema.refine(e=>e.replace(/\D/g,"").length>=10,{message:e}),this}currencyRange(e,t,r,a){return this.schema=this.schema.refine(t=>{let r=Number(t.replace(/\D/g,""))/100;return!isNaN(r)&&r>=e},{message:r||"O valor n\xe3o pode ser menor que ".concat(e.toLocaleStr
1ing("pt-BR",{currency:"BRL",style:"currency"}))}).refine(e=>{let r=Number(e.replace(/\D/g,""))/100;return!isNaN(r)&&r<=t},{message:a||"O valor n\xe3o pode ser maior que ".concat(t.toLocaleString("pt-BR",{currency:"BRL",style:"currency"}))}),this}customValidation(e,t){return this.schema=this.schema.refine(e,{message:t}),this}build(){let e=this.schema;return t=>{var r;let a=e.safeParse(t);return a.success?{isValid:i.VALID}:{isValid:i.INVALID,message:(null==(r=a.error.errors[0])?void 0:r.message)||"Valor inv\xe1lido"}}}static create(){return new N}constructor(){this.schema=h.au.string()}}let T={text:{mask:e=>e,validate:e=>N.create().required(e||"Campo \xe9 obrigat\xf3rio.").build()},name:{mask:function(e){return e.toLowerCase().split(" ").map(e=>{let t=e.charAt(0).toUpperCase(),r=e.slice(1);return p.includes(e)?e:t+r}).join(" ")},validate:()=>N.create().required("Nome \xe9 obrigat\xf3rio.").noNumbers("Nome inv\xe1lido").build()},cpf:{mask:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/\D/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")},validate:()=>N.create().required("CPF \xe9 obrigat\xf3rio.").validCPF("CPF inv\xe1lido.").build()},phone:{mask:function(e){return e.replace(/\D/g,"").replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").replace(/(\d{4})-(\d)(\d{4})/,"$1$2-$3").replace(/(-\d{4})\d+?$/,"$1")},validate:()=>N.create().required("Celular \xe9 obrigat\xf3rio.").validPhone("Celular inv\xe1lido.").build()},cep:{mask:function(e){return e.replace(/\D/g,"").replace(/(\d{5})(\d)/,"$1-$2").replace(/(-\d{3})\d+?$/,"$1")},validate:()=>()=>({isValid:i.VALID})},currency:{mask:function(e){let t=e.replace(/\D/g,""),r=parseInt(t,10);(0,m.yr)(r)&&(r=0),t.length>=8&&(r=parseInt(t.substring(0,8),10));let a=Math.floor(r/100),n=r%100,l=a.toString(),o=n.toString().padStart(2,"0"),i=l.replace(/\B(?=(\d{3})+(?!\d))/g,".");return"R$ ".concat(i,",").concat(o)},validate:e=>{let t=N.create().required("Campo \xe9 obrigat\xf3rio.").customValidation(e=>Number(e.replace(/\D/g,""))/100>0,"Campo \xe9 obrigat\xf3rio.");if((null==e?void 0:e.minValue)&&(null==e?void 0:e.maxValue)){let{maxValue:r,minValue:a}=e;return t.currencyRange(a,r).build()}return t.build()}},email:{mask:e=>e,validate:()=>N.create().required("E-mail \xe9 obrigat\xf3rio.").email("E-mail inv\xe1lido.").build()}},v={Texto:"text",Nome:"name",Celular:"phone",CPF:"cpf",Email:"email",Moeda:"currency"};function L(e){let{label:t,placeholder:r,hint:o,type:i="text",format:s,required:c=!1,disabled:d=!1,onValueChange:u,size:m,className:p,validateCustomParam:h,customValidate:I,defaultValue:E,value:N,onInputBlur:L}=e;if(s){let e=T[v[s]];return(0,a.jsxs)(_,{defaultValue:E,disabled:d,value:N,onValueChange:u,onInputBlur:L,maskFunc:e.mask,validateFunc:c?I||e.validate(h):I,className:(0,n.Q)({"max-w-[250px]":"P"===m,"max-w-[500px]":"M"===m},p),children:[(0,a.jsx)(_.Label,{required:c,children:t}),(0,a.jsx)(_.Field,{type:i,placeholder:r,children:"Email"===s&&(0,a.jsx)(_.Icon,{position:"left",children:(0,a.jsx)(l.Lh2,{className:"h-6 w-6 font-bold text-primary-300 mr-1"})})}),o&&(0,a.jsx)(_.Hint,{children:o}),(0,a.jsx)(_.Error,{})]})}return(0,a.jsxs)(_,{disabled:d,className:(0,n.Q)(p),validateFunc:I,value:N,onValueChange:u,onInputBlur:L,children:[(0,a.jsx)(_.Label,{required:c,children:t}),(0,a.jsx)(_.Field,{type:i,placeholder:r}),o&&(0,a.jsx)(_.Hint,{children:o}),(0,a.jsx)(_.Error,{})]})}},65551:(e,t,r)=>{r.d(t,{d:()=>a});let a=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)}},73913:(e,t,r)=>{r.d(t,{Z:()=>l});var a=r(12115),n=r(93312);function l(e){let[t,r]=(0,a.useState)("");return(0,a.useEffect)(()=>{r((0,n.Iq)(e))},[e]),t}},77979:(e,t,r)=>{r.d(t,{Q:()=>l});var a=r(2821),n=r(75889);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,a.A)(...t))}},79875:(e,t,r)=>{r.d(t,{u:()=>n});var a=r(65551);let n=e=>{let{element_name:t,product_category:r}=e;(0,a.d)({event:"modal_view",element_name:t,page_location:window.location.href,...r&&{product_category:r}})}},81762:(e,t,r)=>{r.d(t,{$:()=>a});let a="not_defined_on_cms"},83167:(e,t,r)=>{r.d(t,{t:()=>l});var a=r(12115);let n={async execute(e){let{cpf:t,phone:r,name:a,email:n,product:l,origin:o,terms:i,campanhas:s,recaptcha:c,additionalData:d}=e;try{let e=await fetch("/api/lead-service/v2/lead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cpf:t,phone:r,name:a,email:n,product:l,origin:o,terms:i,campanhas:s,additionalData:d,recaptcha:c})});if(!e.ok){let t=await e.text();return console.error("Erro na API SaveLead:",t),[Error("Erro ".concat(e.status,": ").concat(e.statusText)),null]}let u=await e.json();return[null,u]}catch(e){return console.error("Erro on request: ",e),[e,null]}}};function l(){let[e,t]=(0,a.useState)({loading:!1,error:null,success:!1,leadId:null}),r=(0,a.useCallback)(async e=>{t({loading:!0,error:null,success:!1,leadId:null});try{var r;let[a,l]=await n.execute(e);
1if(a)return void t({loading:!1,error:"Erro ao salvar lead",success:!1,leadId:null});t({loading:!1,error:null,success:!0,leadId:null!=(r=null==l?void 0:l.id)?r:null})}catch(e){console.error("Erro inesperado no hook SaveLead:",e),t({loading:!1,error:"Erro inesperado ao salvar lead",success:!1,leadId:null})}},[]);return{loading:e.loading,error:e.error,success:e.success,leadId:e.leadId,saveLead:r}}},86120:(e,t,r)=>{r.d(t,{C_:()=>l,ei:()=>o,fA:()=>i,x9:()=>s});let a="@agi_utm",n=["v","state","token","documentId"];function l(){try{let e=localStorage.getItem(a);return e?JSON.parse(e):{}}catch(e){return console.error("Erro ao parsear UTMs do localStorage:",e),{}}}function o(){let e=function(){let e=new URLSearchParams(window.location.search),t={};return e.forEach((e,r)=>{n.includes(r)||(t[r]=e)}),t}();Object.keys(e).length>0&&function(e){try{localStorage.setItem(a,JSON.stringify(e))}catch(e){console.error("Erro ao armazenar UTMs no localStorage:",e)}}(e)}function i(){return l()}function s(){let e=i().utm_custom;e&&document.querySelectorAll('a[href*="SEND_WPP"]').forEach(t=>{let r=t.getAttribute("href");if(!r||r.includes("utm_custom="))return;let a=r.includes("?")?"&":"?",n="".concat(r).concat(a,"utm_custom=").concat(encodeURIComponent(e));t.setAttribute("href",n)})}},93312:(e,t,r)=>{r.d(t,{Iq:()=>l,M4:()=>i,ZQ:()=>o});var a=r(27750),n=r(95168);function l(e){var t,r;let l=null==(t=(0,n.f)())?void 0:t.utm_custom,o=null!=(r=null!=l?l:e)?r:a._.NEXT_PUBLIC_UTM_CODE_DEFAULT,i=encodeURIComponent("Ol\xe1! Meu c\xf3digo \xe9 (".concat(o,") e quero falar com o Agi!"));return"https://api.whatsapp.com/send?phone=".concat(a._.NEXT_PUBLIC_PHONE_WPP,"&text=").concat(i,"&type=phone_number&app_absent=0")}function o(e){var t;let{canalAtendimento:r}=e,l=null==(t=(0,n.f)())?void 0:t.utm_custom,[o]=(null!=l?l:a._.NEXT_PUBLIC_UTM_CODE_DEFAULT).split("D"),i="".concat(o).concat(r),s=encodeURIComponent("Ol\xe1! Meu c\xf3digo \xe9 (".concat(i,") e quero falar com o Agi!"));return"https://api.whatsapp.com/send?phone=".concat(a._.NEXT_PUBLIC_PHONE_WPP,"&text=").concat(s,"&type=phone_number&app_absent=0")}function i(e){if(!e)return null;let[,t]=e.split(":");return null!=t?t:null}},95168:(e,t,r)=>{r.d(t,{f:()=>n});var a=r(86120);function n(){return(0,a.C_)()}}}]);

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.