1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2979,692],{2979:function(t,e,a){a.r(e),a.d(e,{default:function(){return m}});var n=a(5893),o=a(9332),r=a(7294),s=a(490),i=a(4957),c=a(9498),u=a(9576),d=a(9657),l=a(9071);function m(t){let{liferayFields:e}=t,{dataLayerPush:a}=(0,c._0)(),m=(0,o.usePathname)(),{logoImage:_,logoLink:p,mainButtonLabel:A,mainButtonLink:I,menuSection:E,mainButtonIcon:S,mainButtonIconPosition:y}=(0,r.useMemo)(()=>(0,u.e)(e),[e]),{locale:T}=(0,d.bU)(),h=Array.isArray(E)?E:[E],C=h[0].menuSectionItem.map(t=>t.menuSectionItemLabel.toLowerCase().trim()),v=t=>{let e=t.target,n=e.closest("a,button");if(!n)return;let o=(n.textContent||"").trim().toLowerCase();if(o===(A||"").trim().toLowerCase()){a({event:"cta_login",section:"home",sub_section:"header"});return}C.includes(o)&&a({event:"user_interaction",action:"click",element:o,section:"home",sub_section:"header"})},g=(0,r.useMemo)(()=>l.kl[T],[T]);return(0,i.J)({page:m}),(0,n.jsx)("div",{className:"menu-header-translucent-ott",onClickCapture:v,children:(0,n.jsx)(s.Z,{country:g,buttonText:A,buttonLink:I,buttonIcon:{iconName:null!=S?S:"",iconPosition:null!=y?y:"left"},image:_,imageLink:p,menu:h.map(t=>({menuTitle:t.menuSectionTitle,menuIcon:t.menuSectionIcon,menuItems:t.menuSectionItem.map(t=>({menuName:t.menuSectionItemLabel,menuLink:t.menuSectionItemLink,disable:!1,active:!1}))}))})})}},3397:function(t,e,a){a.d(e,{EP:function(){return n}});let n={ApiEndpoint:"https://magento.bss-prd.directvgo.com/graphql",mseEcommerceHandler:"https://kong-api.bss-prd.directvgo.com/api/msecommercehandler/global",HOME_CAROUSELS_API:"https://hub.directvgo.com/ssla/v2/carousel",HOME_CAROUSELS_API_KEY:"vM8GLAHwYJ4BiPGEoN0nk2duaERWa6RXa4EVm1Y7",KONG_BASE_URL_BUYFLOW:"https://kong-api.bss-prd.directvgo.com/api/msbuyflowmw/global",RECAPTCHA_KEY:"6LfGO2QqAAAAAK11FLA2Rgu7_E-b4jBPyJMI1PEu",DNI_VALIDATION_ARG:"https://api.app.directvla.com/ecommerce/v2/identityValidatorDniCheck",CPF_VALIDATION_BR:"https://api.bss-stg.directvgo.com/document/v1/statusdocumentbr",PAYMENT_METHOD_VIEW_KEY:"tZOEqFyfgV39EUXO5XVIf3cN57Y6XOgea8DAYAW7",POSTCODE_ARG:"https://api.app.directvla.com/ecommerce/v2/address/validation",POSTCODE_API_KEY:"tZOEqFyfgV39EUXO5XVIf3cN57Y6XOgea8DAYAW7",CC_IFRAME_BASE_URL:"https://iframe.prod-cc.pe.grpw.io",OTP_GENERATE_API:"https://api.bss-prd.directvgo.com/otp/v1/generate",OTP_VALIDATE_API:"https://api.bss-prd.directvgo.com/otp/v1/validate",API_MQTT_AUTH:"https://api.directvgo.com/mqttauth/v1/auth",API_BSS_DIRECTVGO_BASE_URL:"https://api.bss-prd.directvgo.com",ACCOUNT_STATUS_API_KEY:"x3N27XCvtC7Wvtxcr1Qz043Cl9WIl1JM55B47R7P",API_PIX_FLOW_SUBSCRIPTION_UPDATE_DISPATCHER:"https://api.bss-prd.directvgo.com/account/v2/subscription/update/dispatcher",API_PIX_FLOW_CHANGE_PLAN_DISPATCHER:"https://api.bss-prd.directvgo.com/account/v2/change/plan/dispatcher",BSS_API_KEY:"sWRXU89TrM2tU3GKV1vKb8m7r9x5pdzwUwSlDES2",API_PIX_FLOW_UNPAID_INVOICES:"https://api.bss-prd.directvgo.com/account/v2/unpaid-invoices",ECOMMERCE_GRAPHQL:"https://api-ecom.bss-prd.directvgo.com/graphql",DEVICES_BASE_URL:"https://api.directvgo.com",API_DIRECTVGO_BASE_URL:"https://api.bss-prd.directvgo.com",API_GLOBAL_DIRECTVGO_BASE_URL:"https://global.digital.directvgo.com",INVOICE_STATUS_API_KEY:"yrCOnl8gop5dNqsu7BI6Z7fNcjY4TBIVaodxNE9c",SUBSCRIPTION_ENTITLEMENTS_API_KEY:"sWRXU89TrM2tU3GKV1vKb8m7r9x5pdzwUwSlDES2",STATUS_PRIME_VIDEO_API_KEY:"JIhlDcbNqU75zn0nHwoalajcPCczJ7m16pueEwIX"}},7658:function(t,e,a){a.d(e,{n:function(){return c}});var n=a(3934),o=a(3397),r=a(9071),s=a(4688);let i=async(t,e)=>{let a=await fetch("".concat(o.EP.API_BSS_DIRECTVGO_BASE_URL,"/entitlement/v2/statusbyaccount"),{method:"GET",headers:{authorization:t,"x-api-key":o.EP.ACCOUNT_STATUS_API_KEY,"x-client-id":e}});if(!a.ok)throw Error("Failed to fetch account status");return a.json()},c=t=>{let{token:e,userId:a,enabled:o=!0}=t,{data:c,isLoading:u,isError:d,error:l}=(0,n.a)({queryKey:[s.U.ACCOUNT_STATUS,a],queryFn:()=>i(e,a),enabled:o&&!!e&&!!a,...r.Cd,gcTime:0});return{data:c,isLoading:u,isError:d,error:l}}},4957:function(t,e,a){a.d(e,{J:function(){return u}});var n=a(7294),o=a(9657),r=a(7494),s=a(1093),i=a(7658),c=a(9071);let u=t=>{let{page:e}=t,{idToken:a,userId:u}=(0,r.a)(),{market:d}
1=(0,o.bU)(),l=(0,s.L)(t=>t.meta.cartId),m=sessionStorage.getItem(c.sO.CART_ID),_=[c.vf[d].PAYMENT,c.vf[d].PAYMENT_IN_ANALYSYS,c.vf[d].WELCOME,c.vf[d].PAYMENT_PIX,c.vf[d].ERROR],p=_.some(t=>e.includes(t)),{data:A,isLoading:I}=(0,i.n)({token:null!=a?a:"",userId:null!=u?u:""}),E=(null==A?void 0:A.status)===0,S=(null==A?void 0:A.status)===1,y=(null==A?void 0:A.status)===2;(0,n.useEffect)(()=>{!y&&(!E||l||m)&&(!S||l||m)||p||(window.location.href="/".concat(c.Wu))},[A,I,E,S,y,p,d,l,m])}},1093:function(t,e,a){a.d(e,{L:function(){return m}});var n=a(3513),o=a(4529),r=a(782),s=a(4838),i=a(9071);let c=t=>Object.fromEntries(Object.entries(t).filter(t=>{let[,e]=t;return null!=e&&""!==e})),u=(t,e)=>{let a={...t};return Object.keys(e).forEach(n=>{let o=e[n],r=t[n];"object"!=typeof o||null===o||Array.isArray(o)?a[n]=o:a[n]=u(r||{},o)}),a},d=()=>!0,l=()=>({country:null,personalInfo:{},billingAddress:{},paymentMethod:{hasCoupon:!1,hasCard:!1,totalCoveredByAccountBalance:!1,paymentData:{hasCard:!1}},meta:{cartId:d()&&sessionStorage.getItem(i.sO.CART_ID)?sessionStorage.getItem(i.sO.CART_ID):""},_hasHydrated:!1}),m=(0,o.Ue)()((0,r.tJ)((0,r.mW)((t,e)=>{var a,o,r,d,m,_,p;let A=s.k.getAuthFromStorage();return{...l(),country:["BR","AR"].includes(null!==(m=null===(a=A.user)||void 0===a?void 0:a.country)&&void 0!==m?m:"")?null===(o=A.user)||void 0===o?void 0:o.country:"SSLA",personalInfo:{firstname:null!==(_=null===(r=A.user)||void 0===r?void 0:r.givenName)&&void 0!==_?_:"",lastname:null!==(p=null===(d=A.user)||void 0===d?void 0:d.familyName)&&void 0!==p?p:""},setHasHydrated:e=>t({_hasHydrated:e}),setCountry:e=>t((0,n.Uy)(t=>{t.country=e,"AR"===e&&(t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},{dni:{verifiedUserComplete:"false"}}))})),setPersonalInfo:e=>t((0,n.Uy)(t=>{t.personalInfo=u(t.personalInfo,c(e))})),setBillingAddress:e=>t((0,n.Uy)(t=>{t.billingAddress=u(t.billingAddress,c(e))})),setPaymentMethod:e=>t((0,n.Uy)(t=>{t.paymentMethod=u(t.paymentMethod,c(e))})),removePaymentMethod:()=>t((0,n.Uy)(t=>{t.paymentMethod={hasCard:!1,hasCoupon:!1,totalCoveredByAccountBalance:!1,paymentData:{hasCard:!1}}})),updateCartId:e=>t((0,n.Uy)(t=>{t.meta.cartId=e})),updateDocumentId:e=>t((0,n.Uy)(t=>{t.meta.documentId=e})),updateBirthDate:e=>t((0,n.Uy)(t=>{t.meta.birthDate=e})),setLyraData:e=>t((0,n.Uy)(t=>{t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},c(e))})),setCheckoutData:e=>t((0,n.Uy)(t=>{t.paymentMethod.paymentData=u(t.paymentMethod.paymentData||{},c(e))})),getOrderPayload:()=>{let t=e(),a=null;if(!t.meta.cartId||"SSLA"!==t.country&&!t.meta.documentId)return null;try{let t=window.localStorage.getItem(i.dA.UTM_PARAMS);t&&(a=JSON.parse(t))}catch(t){console.error("Error reading UTM params from localStorage:",t)}return{...i.sx,cartId:t.meta.cartId,documentId:t.meta.documentId,setBillingAddressOnCart:{...t.personalInfo,...t.billingAddress},setPaymentMethodOnCart:{...t.paymentMethod,paymentData:{...t.paymentMethod.paymentData,...a?{utmCampaign:a.utm_campaign,utmContent:a.utm_content,utmMedium:a.utm_medium,utmSource:a.utm_source,utmTerm:a.utm_term}:{}}}}},reset:()=>t(l())}}),{name:"create-order-payload",storage:(0,r.FL)(()=>sessionStorage),onRehydrateStorage:()=>t=>{null==t||t.setHasHydrated(!0)}}))},4688:function(t,e,a){a.d(e,{U:function(){return n}});let n={SUMMARY:"summary_query",EMAIL_CONFIRMATION_STATUS:"email-confirmation-status",EXTRAS_STORE:"extras_store",DEVICES_COUNT:"devices_count",INVOCE_STATUS:"invoice_status",BASIC_PLAN:"basic_plan",SUBSCRIPTION_ENTITLEMENTS:"subscription_entitlements",STATUS_DISNEY_PLUS:"status_disney_plus",GET_LINK_DISNEY_PLUS:"get_link_disney_plus",STATUS_PRIME_VIDEO:"status_prime_video",GET_LINK_PRIME_VIDEO:"get_link_disney_plus",ACCOUNT_STATUS:"account_status",SUBSCRIPTION_CANCELATION_STATUS:"subscription_cancelation_status"}},9576:function(t,e,a){a.d(e,{e:function(){return function t(e){return"object"!=typeof e||null===e?e:Array.isArray(e)?e.map(e=>"null"===e||""===e||"[]"===e?"":"true"===e||"false"!==e&&t(e)):Object.entries(e).reduce((e,a)=>{let[n,o]=a;switch(o){case"null":case"":e[n]="";break;case"[]":e[n]=[];break;case"true":e[n]=!0;break;case"false":e[n]=!1;break;default:e[n]="object"==typeof o?t(o):o}return e},{})}}})}}]); 2//# sourceMappingURL=2979.ab3ce9b21f91f29f.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.