PageSourceSearch

https://app.srna.co/static/js/4305.e4c860b1.chunk.js

js srna.co collected 2026-09-25 04:44:07 UTC 4,917 bytes, 2 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="90eb7d89-f2f5-4c01-9a5d-ee2f936d2545",e._sentryDebugIdIdentifier="sentry-dbid-90eb7d89-f2f5-4c01-9a5d-ee2f936d2545")}()}catch(e){}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var o=arguments[a];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{dsn:"https://99a8b772eb67ff925f07eea75b4ac46d@o4509910817112064.ingest.us.sentry.io/4509912287805440",release:"0e78ed0d34f068a79a63d3a110ca37137b8297a8"})}catch(e){}}(),function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0e78ed0d34f068a79a63d3a110ca37137b8297a8"}}catch(e){}}(),(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4305],{74305:(e,a,o)=>{o.r(a),o.d(a,{default:()=>g});var n=o(22227),s=o.n(n),t=o(1680),d=o(76863),r=o(51417),i=o(26075),l=o(78975),c=o(95900),u=o(11204),f=o(88099),m=o(49704),p=o(33804),h=o(80184);const x=(e,a)=>(0,r.formatCurrency)(e*(a/100)*12),g=()=>{const e=m.Z.get(),{accessToken:a}=(0,u.useAuth)(),o=(0,t.useNavigate)(),{throwServerError:g}=(0,f.useServerError)(),{dataContrato:b,cnpj:y}=(0,c.XC)(),j=null===b||void 0===b?void 0:b.distribuidora,[E,w]=(0,n.useState)(null),[v,N]=(0,n.useState)([]),[I,A]=(0,n.use
1State)(null),[T,C]=(0,n.useState)(null);s().useCallback((()=>{(0,i.aM)(["valorFatura",y],((e,o)=>l.req.get("migracao/agente/".concat(o),{token:a})),{onSuccess:e=>A(e.valorMedioConsumo)})}),[y])();s().useCallback((()=>{(0,i.aM)(["planosAz",j],((e,o)=>l.req.get("importacao-migracao-az/parametros/".concat(o),{token:a})),{onSuccess:e=>C(e),onError:e=>{404===e.statusCode&&o(p.Z.MAIN_PAGE)}})}),[j])();const[M,{status:k}]=(0,i.Db)((e=>l.req.post("/migracao-az/propostas",e,{token:a})),{onSuccess:()=>{o(p.Z.MIGRACAO_AZ_MEU_PLANO)},onError:e=>{g(e)}});(0,n.useEffect)((()=>{I&&T&&N([{planoId:1,periodoFornecimento:1,desconto:T.descontoUmAno,economiaEstimada:x(I,T.descontoUmAno)},{planoId:2,periodoFornecimento:3,desconto:T.descontoTresAnos,economiaEstimada:x(I,T.descontoTresAnos),tag:"RECOMENDADO"},{planoId:3,periodoFornecimento:5,desconto:T.descontoCincoAnos,economiaEstimada:x(I,T.descontoCincoAnos)}])}),[I,T]);return(0,h.jsxs)("main",{className:"rounded-lg bg-neutral-lightest p-4 flex flex-col gap-4 lg:min-h-[26.5rem]",children:[(0,h.jsxs)("h4",{className:"text-brand-primary text-h4-bold",children:["Economia do seu jeito,",(0,h.jsx)("br",{className:"md:hidden"})," selecione o plano ideal:"]}),(0,h.jsx)("div",{className:"grid lg:grid-cols-3 gap-2 md:gap-4",children:v&&v.map((e=>{return(0,h.jsxs)(d.H6,{selected:(a=e.planoId,a===E),onClick:()=>(e=>{w(e)})(e.planoId),className:"!min-w-fit",children:[e.tag?(0,h.jsx)(d.H6.Tag,{children:e.tag}):"",(0,h.jsx)(d.H6.Title,{children:1===e.periodoFornecimento?"".concat(e.periodoFornecimento," ano"):"".concat(e.periodoFornecimento," anos")}),(0,h.jsxs)(d.H6.MainText,{children:[(0,h.jsx)("span",{className:"text-5",children:"Desconto m\xe9dio de "}),(0,h.jsxs)("span",{className:"text-6",children:[e.desconto,"%"]})]}),(0,h.jsx)(d.H6.MainSubText,{children:"na sua conta de luz mensal."}),(0,h.jsx)(d.H6.InfoText,{children:"Economia estimada de at\xe9"}),(0,h.jsxs)(d.H6.InfoSubText,{children:[e.economiaEstimada,"/ano"]})]},e.planoId);var a}))}),(0,h.jsxs)("div",{className:"flex items-center justify-between",children:[(0,h.jsxs)("div",{className:"gap-2 hidden lg:flex",children:[(0,h.jsx)(d.JO.HelpIcon,{className:"text-brand-highlight"}),(0,h.jsx)("h5",{className:"text-h5-regular text-brand-primary",children:"Necess\xe1ria a valida\xe7\xe3o dos dados da conta de luz para efetiva\xe7\xe3o do desconto"})]}),(0,h.jsxs)("div",{className:"w-full lg:w-auto flex lg:flex-row flex-col-reverse",children:[(0,h.jsx)("a",{href:"#saiba-mais",children:(0,h.jsx)(d.zx,{variant:d.Yb.VariantsEnum.SECONDARY,children:(0,h.jsx)(d.zx.Text,{children:"Saiba mais"})})}),(0,h.jsx)(d.zx,{disabled:(0,r.isNil)(E)||"loading"===k,onClick:()=>(()=>{const a=v.find((e=>{let{planoId:a}=e;return a===E})),o={empresaContratanteId:e.empresaId,percentualDesconto:a.desconto,prazoEmAnos:a.periodoFornecimento};M(o)})(),children:"loading"===k?(0,h.jsx)("div",{style:{minWidth:"113px"},className:"flex justify-center",children:(0,h.jsx)(d.aN,{endless:!0,size:"small"})}):(0,h.jsx)(d.zx.Text,{children:"Quero economizar"})})]})]})]})}}}]);
2//# sourceMappingURL=4305.e4c860b1.chunk.js.map

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.