(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{71384:function(e,t,r){"use strict";var n=r(92777),o=r(82262),a=r(81531),s=r(63553),i=r(37247),c=r(67294),u=r(79180),l=r(85893);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,i.Z)(e);if(t){var o=(0,i.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}var p=function(e){(0,a.Z)(r,e);var t=d(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,o.Z)(r,[{key:"render",value:function(){return(0,l.jsx)("footer",{className:"footerLogin",children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsxs)("p",{className:"copy",children:["\xa9 ",(new Date).getFullYear()," Claro."," ",(0,l.jsx)(u._H,{id:"label.reservedRights"})]}),(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"https://tiendaonline.claro.com.co/wcsstore/Claro/images/contenidos/CarruselClaro/TerminosCondiciones.pdf",target:"_blank",children:(0,l.jsx)(u._H,{id:"label.terms"})})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"/support",children:(0,l.jsx)(u._H,{id:"label.help"})})})]})]})})}}]),r}(c.PureComponent);t.Z=p},44816:function(e,t,r){"use strict";var n=r(97048),o=r(28867),a=r(22424),s=r(85893);t.Z=function(e){var t=e.message,r=void 0===t?"":t,i=e.isOpen,c=void 0!==i&&i,u=e.iconSuccess,l=void 0!==u&&u,d=e.iconCustom,p=void 0===d?"":d,f=e.onClose,m=void 0===f?function(){}:f,v=e.portabilidad,h=void 0!==v&&v,g=e.closeIcon,x=void 0!==g&&g,I=e.twoLines,A=void 0!==I&&I,S=e.isFlowOms,w=void 0!==S&&S,b=e.isDynamicContent,E=void 0!==b&&b,O=e.dynamicContent,P=void 0===O?{}:O,_=e.type,j=void 0===_?void 0:_,C=e.codeSentRedContent,y=void 0===C?void 0:C,R=e.riskValidation,N=void 0===R?{riskValidation:!1,title:"",onCloseModal:function(){},resetButton:{isActive:!1,onClick:function(){}}}:R,k=l?"icon_success_red":"errorSaveTelefono",T=localStorage.getItem("isGuest"),D=p||"".concat(k),L="",F="";return"true"===T?(L=r.replace(/\01*/g,"\n"),F=r.split("01*")):(L=r.replace(/\*/g,"\n"),F=r.split("*")),j&&"codeSendRed"===j?(0,s.jsx)(o.Zi,{open:c,onClose:m,data:y}):N.riskValidation?(0,s.jsx)(n.Z,{open:c,center:!0,onClose:m,showCloseIcon:x,classNames:{modal:"modal-error-validations"},children:(0,s.jsxs)("div",{className:"modal-error-validations",children:[(0,s.jsx)("img",{src:D}),(0,s.jsxs)("div",{className:"content",children:[N.title&&(0,s.jsx)("h3",{children:N.title}),r&&(0,s.jsx)("p",{children:r})]}),N.resetButton.isActive&&(0,s.jsx)("button",{onClick:N.resetButton.onClick,className:"reset-button",children:"Reintentar"}),(0,s.jsx)("button",{onClick:N.onCloseModal,children:"Aceptar"})]})}):h?(0,s.jsx)(n.Z,{open:c,onClose:m,center:!0,showCloseIcon:x,children:(0,s.jsxs)("div",{className:E?"modal-general-error-porta-dynamic no_selection":"modal-general-error no_selection",children:[(0,s.jsx)("img",{src:"/static/images/icons/".concat(D,".svg")}),E?(0,s.jsxs)(s.Fragment,{children:[""!==P.title?(0,s.jsxs)("p",{style:{textAlign:"center",font:"normal normal bold 20px/20px AMX",color:"#1F1F1F"},children:[" ",P.title," "]}):null,P.contents.map((function(e){for(var t,r=e.text.split(" "),n=0;n"}t=r.join(" ");var o=a.Z.sanitize(t);return(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:o},style:{textAlign:"center",font:"normal normal normal 16px/20px Roboto",marginBottom:"5px"}})})),(0,s.jsx)("button",{className:"btn-rojo",onClick:m,style:{width:"100%",height:"40px",borderRadius:"40px",fontSize:"16px"},children:P.buttonText})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h3",{children:[(0,s.jsxs)("span",{children:[splitedMsg[0].split(" el")[0]," "]}),(0,s.jsxs)("strong",{children:[" ",splitedMsg[0].split("con ")[1]]}),(0,s.jsxs)("span",{children:[" ",r.split("NIP")[1]," "]})]}),(0,s.jsx)("button",{onClick:m,children:"Continuar"})]})]})}):w?(0,s.jsx)(n.Z,{open:c,onClose:function(){return window.location.reload()},center:!0,showCloseIcon:x,classNames:{modal:"modal-CreateAndUpdateAddress-newDelivery"},children:(0,s.jsxs)("div",{className:"modal-general-error-newDelivery no_selection",children:[(0,s.jsx)("img",{src:"/static/images/icons/".concat(D,".svg")}),(0,s.jsx)("h3",{children:r.includes(" con \xe9xito.")&&!A?(0,s.jsxs)("p",{children:[F[0],(0,s.jsx)("br",{}),F[1]]}):(0,s.jsx)("p",{children:L})}),(0,s.jsx)("button",{onClick:function(){return window.location.reload()},children:"Aceptar"})]})}):(0,s.jsx)(n.Z,{open:c,onClose:m,center:!0,showCloseIcon:x,classNames:{modal:"modal-CreateAndUpdateAddress-newDelivery"},children:(0,s.jsxs)("div",{className:"modal-general-error-newDelivery no_selection",children:[(0,s.jsx)("img",{src:"/static/images/icons/".concat(D,".svg")}),(0,s.jsx)("h3",{children:r.includes(" con \xe9xito.")&&!A?(0,s.jsxs)("p",{children:[F[0],(0,s.jsx)("br",{}),F[1]]}):(0,s.jsx)("p",{children:L})}),(0,s.jsx)("button",{onClick:m,children:"Aceptar"})]})})}},3516:function(e,t,r){"use strict";r.d(t,{e:function(){return n}});var n=["gmail.com","hotmail.com","yahoo.com","live.com","outlook.com","google.com"]},1274:function(e,t){"use strict";t.Z={SIM_MAS_PAQUETE:"SIM_MAS_PAQUETE",POSTPAGO_LINEA_NUEVA:"POSTPAGO_LINEA_NUEVA",KIT_PREPAGO:"KIT_PREPAGO",PORTABILIDAD_PRE:"PORTABILIDAD_PRE",PORTABILIDAD_POST:"PORTABILIDAD_POST",TERMINALES_LIBRES:"TERMINALES_LIBRES",TECNOLOGIA:"TECNOLOGIA",HOGARES:"HOGARES",FinancingTecnologia:"FinancingTecnologia",FinancingTerminales:"FinancingTerminales",ClaroShop:"ClaroShop",PREAPOST:"PREAPOST",default:"default"}},75901:function(e,t,r){"use strict";r.d(t,{t:function(){return n}});var n={ARTICULOS_PERMITIDOS:"ARTICULOS_PERMITIDOS",DIAS_DEL_PERIODO:"DIAS_DEL_PERIODO",ARTICULOS_POR_PERIODO:"ARTICULOS_POR_PERIODO",MONTO_POR_PERIODO:"MONTO_POR_PERIODO",DIAS_ENTREGA:"DIAS_ENTREGA",VIGENCIA_DECRETO:"VIGENCIA_DECRETO",UNIDADES_NO_DISPONIBLES:"UNIDADES_NO_DISPONIBLES",POCAS_UNIDADES_DISPONIBLES:"POCAS_UNIDADES_DISPONIBLES",ENTRE_UNIDADES_DISPONIBLES:"ENTRE_UNIDADES_DISPONIBLES",MAXIMO_UNIDADES_DISPONIBLES:"MAXIMO_UNIDADES_DISPONIBLES",DEFAULT_DISPONIBILIDAD:"DEFAULT_DISPONIBILIDAD"}},68045:function(e,t,r){"use strict";r.d(t,{L:function(){return l}});var n=r(50029),o=r(87794),a=r.n(o),s=r(67294),i=r(24872),c=r(97066),u=r(12039);function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e},t=(0,s.useState)([]),r=t[0],o=t[1],l=(0,s.useState)(!0),d=l[0],p=l[1],f=(0,s.useState)(!1),m=f[0],v=f[1];function h(){return g.apply(this,arguments)}function g(){return(g=(0,n.Z)(a().mark((function t(){var r,n,s,l;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(null!==(n=(0,u.Gg)(c.t.categories))&&((null===n||void 0===n?void 0:n.length)||0)>0)){t.next=6;break}return p(!1),e(n),t.abrupt("return",o(n));case 6:return t.next=8,(0,i.C)();case 8:s=t.sent,l=(null===s||void 0===s||null===(r=s.data)||void 0===r?void 0:r.catalogGroupView)||[],(0,u.KY)(c.t.categories,l),o(l),e(l),p(!1),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(0),console.error({error:t.t0}),v(!0);case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))).apply(this,arguments)}return(0,s.useEffect)((function(){h()}),[]),{data:r,error:m,load:d}}},82853:function(e,t,r){"use strict";r.d(t,{r:function(){return c}});var n=r(90116),o=r(21113),a=r(14416),s=r(1274),i=r(27132);r(80767),r(12009);function c(){var e,t,r,c,u=(0,a.v9)((function(e){return e.CartManager})),l=(0,a.v9)((function(e){var t;return(null===e||void 0===e||null===(t=e.CartManager)||void 0===t?void 0:t.cartInfo)||{}})),d=(0,a.v9)((function(e){return e.CheckoutManager?e.CheckoutManager:{}})),p=(null===u||void 0===u||null===(e=u.cartInfo)||void 0===e?void 0:e.orderItem)||[],f=(0,a.v9)((function(e){var t,r;return(null===e||void 0===e||null===(t=e.CartManager)||void 0===t||null===(r=t.cartInfo)||void 0===r?void 0:r.orderId)||""})),m=u.totalItems,v=((0,a.v9)((function(e){return e.SessionManager.isLoggedIn})),(0,a.v9)((function(e){return e.CheckoutManager.omsConfig}))||{}),h=v.registered,g=v.guest,x=v.freightMessage,I=localStorage.getItem("isGuest"),A=p.map((function(e){return(0,o.Ml)((null===e||void 0===e?void 0:e.orderItemExtendAttribute)||[])})),S=null===d||void 0===d?void 0:d.isAllowedFlowGuest,w=A.some((function(e){return"POSTPAGO_LINEA_NUEVA"===(null===e||void 0===e?void 0:e.purchaseFlow)})),b=A.some((function(e){return"PREAPOST"===(null===e||void 0===e?void 0:e.purchaseFlow)})),E=A.some((function(e){return"SIM_MAS_PAQUETE"===(null===e||void 0===e?void 0:e.purchaseFlow)})),O=A.some((function(e){return"TERMINALES_LIBRES"===(null===e||void 0===e?void 0:e.purchaseFlow)})),P=A.some((function(e){return"KIT_PREPAGO"===(null===e||void 0===e?void 0:e.purchaseFlow)})),_=A.some((function(e){return"TECNOLOGIA"===(null===e||void 0===e?void 0:e.purchaseFlow)})),j=A.some((function(e){return"ClaroShop"===(null===e||void 0===e?void 0:e.typeProduct)})),C=A.some((function(e){return"PORTABILIDAD_PRE"===(null===e||void 0===e?void 0:e.purchaseFlow)})),y=A.some((function(e){return"PORTABILIDAD_POST"===(null===e||void 0===e?void 0:e.purchaseFlow)})),R=A.some((function(e){return"HOGARES"===(null===e||void 0===e?void 0:e.purchaseFlow)})),N=(_||O)&&!j,k=(0,i.PF)(l),T=_||O||j||P,D=(_||O)&&(!1===j||1!==m),L=A.map((function(e){if(e.typeProduct===s.Z.ClaroShop)return e.typeProduct;return e.purchaseFlow})),F=(0,n.Z)(new Set(L)),Z=F.map((function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return{};function r(e){var t=e.purchaseFlow,r=void 0===t?"":t,n=e.typeProduct,o=void 0===n?"":n;return r===s.Z.TECNOLOGIA&&o===s.Z.ClaroShop}function n(t){var r=t.purchaseFlow;return(void 0===r?"":r)===e}if(e===s.Z.ClaroShop)return t.find(r);return t.find(n)}(e,A)})),M=(null===Z||void 0===Z?void 0:Z[0])||"",B=null===x||void 0===x?void 0:x.active;if(P&&h){var G=void 0!=h.flowStatusCont.KIT_PREPAGO&&!0===h.flowStatusCont.KIT_PREPAGO;G&&(r=!k&&h.omsEnabled&&G&&(S&&I?!0===g.flowStatusCont.omsEnabled&&g.omsEnabled&&void 0!=g.flowStatusCont.KIT_PREPAGO&&!j:void 0!=h.flowStatusCont.KIT_PREPAGO&&!j))}_&&h&&(c=!!((void 0!=h.flowStatusCont.TECNOLOGIA||void 0!=h.flowStatusFin.TECNOLOGIA)&&(!0===h.flowStatusCont.TECNOLOGIA||!0===h.flowStatusFin.TECNOLOGIA))&&(!(k||!h.omsEnabled)&&!j));var U=!k&&(null===h||void 0===h?void 0:h.omsEnabled)&&(S&&I?!0===g.omsEnabled&&!j:((0,o.xm)(M,(null===h||void 0===h?void 0:h.flowStatusCont)||{})||(null===h||void 0===h||null===(t=h.flowStatusFin)||void 0===t?void 0:t.TERMINALES_LIBRES))&&!j);P&&(U=r),_&&(U=c);var H=!k&&(!(null===h||void 0===h||!h.omsEnabled)&&((0,o.xm)(M,(null===h||void 0===h?void 0:h.flowStatusCont)||{})&&!j)),V=!k&&(!(null===h||void 0===h||!h.omsEnabled)&&((0,o.xm)(M,(null===h||void 0===h?void 0:h.flowStatusFin)||{})&&!j));return{flowPrincipal:M,ListDataFlows:A,listUniqueFlows:Z,existFlowLineNueva:w,existFlowTerminales:O,existFlowTecnologia:_,existFlowKitPrepago:P,existFlowClaroShop:j,listUniqueFlowsNames:F,existFlowSimMasPaquete:E,existProductFinancing:D,existProductFinancieras:T,existFlowPortPre:C,existFlowPortPost:y,existFlowHogares:R,existProductFin:N,existFlowPrePost:b,promiseFeatureEnabled:U,promisePaymentConEnabled:H,promisePaymentFinEnabled:V,isPreSale:k,orderId:f,showMessageFreeShipping:B}}},44489:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(50029),o=r(87794),a=r.n(o),s=r(67294),i=r(14739),c=r(14416),u=r(85665);function l(){var e=(0,c.v9)((function(e){return e.SessionManager.token?e.SessionManager.token:""})),t=(0,s.useState)([]),r=t[0],o=t[1],l=(0,s.useState)([]),d=l[0],p=l[1],f=(0,s.useState)(!0),m=f[0],v=f[1],h=(0,s.useState)(!1),g=h[0],x=h[1];function I(){return A.apply(this,arguments)}function A(){return A=(0,n.Z)(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.r)(e).then((function(e){var t,r=e.data,n=e.error;if(n)return x(n);if(void 0!==(null===r||void 0===r?void 0:r.contact)&&Array.isArray(null===r||void 0===r?void 0:r.contact)&&0!==(null===r||void 0===r||null===(t=r.contact)||void 0===t?void 0:t.length)){p(r.contact);var a=(r.contact||[]).filter(i.iH).map((function(e){return(0,i.EQ)(e)})),s=a.filter((function(e){return null!==e})).sort((function(e,t){return!e.primary&&t.primary?1:e.primary&&!t.primary?-1:0}));o(s),v(!1)}else v(!1)})).catch((function(e){x(e),v(!1),console.error(e)})));case 1:case"end":return t.stop()}}),t)}))),A.apply(this,arguments)}return(0,s.useEffect)((function(){I()}),[]),{addressCrude:d,userAddress:r,loading:m,errorAddresses:g,getAddress:I}}},62275:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(67294);function o(){var e=(0,n.useState)([0,0]),t=e[0],r=e[1];return(0,n.useLayoutEffect)((function(){function e(){r([window.innerWidth,window.innerHeight])}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),t}},18454:function(e,t,r){"use strict";r(87794),r(82074)},9374:function(e,t,r){"use strict";r.d(t,{ag:function(){return m},rc:function(){return v},YS:function(){return g}});var n=r(50029),o=r(87794),a=r.n(o),s=r(75901),i=(r(95672),r(48043)),c=r(6862),u=r(19203),l=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,o,s,l,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={bodyOfferValidate:t},e.t0="".concat(i.default.GETPRICEOFFERVALIDATE),!r){e.next=8;break}return e.next=5,(0,u._O)(r);case 5:e.t1=e.sent,e.next=9;break;case 8:e.t1="no-flow";case 9:return e.t2=e.t1,e.t3={Accept:"application/json","Content-Type":"application/json",DataAuditLog:e.t2},e.next=13,(0,c._)(n);case 13:return e.t4=e.sent,o={method:"POST",url:e.t0,headers:e.t3,body:e.t4},e.prev=15,e.next=18,fetch(o.url,o);case 18:return s=e.sent,e.next=21,s.json();case 21:return l=e.sent,d=(0,c.D)(l.data),e.abrupt("return",d);case 26:e.prev=26,e.t5=e.catch(15),console.error("[getPriceOfferValidate]",e.t5);case 29:case"end":return e.stop()}}),e,null,[[15,26]])})));return function(t,r){return e.apply(this,arguments)}}(),d=r(21113),p=r(48399),f=r(85893);function m(e){var t=e.inventory,r=void 0===t?[]:t,n=e.selectedSku2,o=void 0===n?"":n,a=e.isBoolean,i=void 0!==a&&a,c=e.sellLimitsMarketing,u=void 0===c?[]:c,l=e.shortHand,d=void 0!==l&&l,p=null===r,m=Array.isArray(r);return p||!m?i?[!1]:(0,f.jsx)("p",{className:"noAvailability",children:"No disponible"}):r.filter((function(e){return e.catEntry.includes(o)})).map((function(e){var t=s.t.UNIDADES_NO_DISPONIBLES,r=s.t.POCAS_UNIDADES_DISPONIBLES,n=s.t.ENTRE_UNIDADES_DISPONIBLES,o=s.t.MAXIMO_UNIDADES_DISPONIBLES,a=s.t.DEFAULT_DISPONIBILIDAD,c=parseInt(e.catEntryQuantity||0),l=function(e){return u.find((function(t){return t.identificador===e}))},p=function(e,t,r){return e&&e.includes("$$")?e.replace("$$",t):e||r},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return d?(0,f.jsx)(f.Fragment,{children:(0,f.jsx)("p",{className:"availability2",children:"Disponible"})}):(0,f.jsx)(f.Fragment,{children:(0,f.jsx)("p",{className:"availability2",children:null!==e&&void 0!==e?e:"Disponible"})})},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return d?(0,f.jsx)(f.Fragment,{children:(0,f.jsx)("p",{className:"noAvailability",children:"No disponible"})}):(0,f.jsx)(f.Fragment,{children:(0,f.jsx)("p",{className:"noAvailability",children:null!==e&&void 0!==e?e:"No disponible"})})};if(u.length>0){if(![t,r,n,o,a].every((function(e){return l(e)}))){var h=l(a),g=p(null===h||void 0===h?void 0:h.message,Number(c),"".concat(Number(c)," unidades disponibles"));return 0===Number(c)?v():!!i||m(g)}var x=l(t),I=Number(x.valor),A=(null===x||void 0===x?void 0:x.message)||"No disponible";if(c<=I)return!i&&v(A);var S=l(r),w=Number(S.min),b=Number(S.max),E=p(S.message,Number(b),"Quedan menos de ".concat(b," unidades disponibles"));if(c>=w&&c<=b)return!!i||m(E);var O=l(n),P=Number(O.min),_=Number(O.max),j=p(O.message,Number(c),"".concat(Number(c)," unidades disponibles"));if(c>=P&&c<=_)return!!i||m(j);var C=l(o),y=Number(C.max),R=p(C.message,y,"M\xe1s de ".concat(y," Unidades disponibles"));if(c>y)return!!i||m(R);var N=p(l(a).message,Number(c),"".concat(Number(c)," unidades disponibles"));return!!i||m(N)}return!i&&v()}))}function v(e){return h.apply(this,arguments)}function h(){return(h=(0,n.Z)(a().mark((function e(t){var r,n,o,s,i,c,u,p,f,m,v,h,g,x,I,A,S,w,b,E,O,P,_,j,C,y,R;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.shippingCost,n=void 0===r?{}:r,o=t.message,s=void 0===o?"":o,i=t.dataSelfcare,c=void 0===i?{}:i,u=t.partNumber,p=void 0===u?"":u,f=t.currentProductQuantity,m=t.procSales,v=t.typePayment,h=t.typePlan,g=t.typeSales,x=t.typeProduct,I=t.numberAccount,A=t.typeAccount,S=t.pAhT,w=t.pSIT,b=t.ivaT,E=t.dT,O=t.auditLogHeader,P=void 0===O?null:O,C={},y={isMigratedUser:"false"!==(null===c||void 0===c?void 0:c.isMigratedUser),termsConditions:!0,product:[{idProduct:(0,d.TS)(p),salesProducts:{procSales:m,typePayment:v,typePlan:h,typeSales:g,typeProduct:"Claro"},priceSale:{price:S,subPrice:w,iva:b,discount:E},typeProduct:x,quantity:f}],InfoUser:{typeDocument:"CC"===(null===c||void 0===c?void 0:c.documentType)?"1":"4",numberDocument:null===c||void 0===c?void 0:c.document,numberAccount:I,typeAccount:A}},e.next=5,l(y,P);case 5:if(200===(null===(R=e.sent)||void 0===R?void 0:R.status)){e.next=10;break}return e.abrupt("return","error");case 10:return _={pWTFin:R.documents.products[0].price,pWOTFin:R.documents.products[0].subPrice,fPWTFin:R.documents.total,fPWOTFin:R.documents.subTotal,ivaP:R.documents.products[0].iva,shippingCost:null===n||void 0===n?void 0:n.value,shippingWOTax:null===n||void 0===n?void 0:n.formatPrice,shippingTax:null===n||void 0===n?void 0:n.tax,message:s},j=R.documents.products[0].idProduct,C={prices:_,idProduct:j,appliesFinancing:R.documents.products[0].AppliesFinancing,products:R.documents.products[0]},e.abrupt("return",C);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return x.apply(this,arguments)}function x(){return(x=(0,n.Z)(a().mark((function e(t){var r,n,o,s,i,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.partNumber,n=void 0===r?"":r,o=t.typePlan,s=(0,d.TS)(n),i=o,e.next=5,(0,p.Ij)(s,i);case 5:if("OK"===(null===(c=e.sent)||void 0===c?void 0:c.status)){e.next=10;break}return e.abrupt("return","error");case 10:return e.abrupt("return",c);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},24628:function(e,t,r){"use strict";var n=r(50029),o=r(92777),a=r(82262),s=r(10748),i=r(81531),c=r(63553),u=r(37247),l=r(59499),d=r(87794),p=r.n(d),f=r(67294),m=r(14416),v=r(45217),h=r(70821),g=r(6862),x=r(98754),I=r(48043),A=(r(19203),r(85893));function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){i=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)){e.next=81;break}if(P=(0,U.Oc)(null===I||void 0===I||null===(A=I.data)||void 0===A||null===(w=A.orderItem[0])||void 0===w?void 0:w.orderItemExtendAttribute),_=(0,U.oL)(null===I||void 0===I||null===(E=I.data)||void 0===E||null===(O=E.orderItem[0])||void 0===O?void 0:O.orderItemExtendAttribute),!p){e.next=16;break}return u.push("2"),e.next=16,validateExcepcionProductsSaved(null===I||void 0===I||null===(j=I.data)||void 0===j?void 0:j.orderItem);case 16:if(b(ae(ae({},S),{},{loading:!0})),!("TECNOLOGIA"===P&&"TECNOLOGIA"!==t[0].purchaseFlow||"TECNOLOGIA"!==P&&"TECNOLOGIA"===t[0].purchaseFlow||"TECNOLOGIA"===P&&"ClaroShop"===_&&"TECNOLOGIA"===t[0].purchaseFlow&&"ClaroShop"!==t[0].typeProduct||"TECNOLOGIA"===P&&"ClaroShop"!==_&&"TECNOLOGIA"===t[0].purchaseFlow&&"ClaroShop"===t[0].typeProduct||"KIT_PREPAGO"===P&&"KIT_PREPAGO"!==t[0].purchaseFlow||"KIT_PREPAGO"!==P&&"KIT_PREPAGO"===t[0].purchaseFlow||"TERMINALES_LIBRES"===P&&"TERMINALES_LIBRES"!==t[0].purchaseFlow||"TERMINALES_LIBRES"!==P&&"TERMINALES_LIBRES"===t[0].purchaseFlow||"PORTABILIDAD_PRE"===P&&"PORTABILIDAD_PRE"!==t[0].purchaseFlow||"PORTABILIDAD_PRE"!==P&&"PORTABILIDAD_PRE"===t[0].purchaseFlow||"PORTABILIDAD_POST"===P&&"PORTABILIDAD_POST"!==t[0].purchaseFlow||"PORTABILIDAD_POST"!==P&&"PORTABILIDAD_POST"===t[0].purchaseFlow||"PREAPOST"===P&&"PREAPOST"!==t[0].purchaseFlow||"PREAPOST"!==P&&"PREAPOST"===t[0].purchaseFlow||"HOGARES"===P&&"HOGARES"!==t[0].purchaseFlow||"HOGARES"!==P&&"HOGARES"===t[0].purchaseFlow)){e.next=49;break}if("PORTABILIDAD_PRE"!==P&&"PREAPOST"!==P){e.next=36;break}return e.next=21,d(null===I||void 0===I||null===(C=I.data)||void 0===C?void 0:C.orderId);case 21:return e.prev=21,e.next=24,s.add(t,o);case 24:!1===e.sent.error?((0,F.eQ)(),g.push("/cart")):((0,F.eQ)(),n("error","No se puedo agregar el producto a tu carrito","",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,g.push("/");case 4:case"end":return e.stop()}}),e)}))))),e.next=34;break;case 28:e.prev=28,e.t0=e.catch(21),console.error({error:e.t0}),y=(0,R.Z)(e.t0),n("error"),n("error",y.message,"",(function(){g.push("/")}));case 34:e.next=47;break;case 36:if(p){e.next=41;break}n("warning","Ten en cuenta que no puedes mezclar productos de categor\xedas diferentes. Por favor completa la primera compra para continuar con esta solicitud.","",(function(){b((function(e){return ae(ae({},e),{},{isLoading:!0})})),(0,F.eQ)(),g.push("/cart")}),"","Aceptar","btn-rojo"),b((function(e){return ae(ae({},e),{},{isLoading:!1})})),e.next=47;break;case 41:return u.push("1"),e.next=44,s.add(t,o);case 44:!1===e.sent.error?((0,F.eQ)(),sessionStorage.setItem(c,u),g.push("/cart")):((0,F.eQ)(),n("error","No se puedo agregar el producto a tu carrito","",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,g.push("/");case 4:case"end":return e.stop()}}),e)}))))),b((function(e){return ae(ae({},e),{},{isLoading:!1})}));case 47:e.next=79;break;case 49:if("PORTABILIDAD_POST"!==P||"PORTABILIDAD_POST"!==t[0].purchaseFlow){e.next=54;break}n("error","","Ups, solamente puedes agregar un producto para portabilidad postpago",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b((function(e){return ae(ae({},e),{},{isLoading:!0})})),(0,Z.GE)(I.data.orderItem,ne),(0,F.eQ)(),g.push("/cart");case 4:case"end":return e.stop()}}),e)}))),"","Aceptar","btn-rojo"),b((function(e){return ae(ae({},e),{},{isLoading:!1})})),e.next=79;break;case 54:if("PORTABILIDAD_PRE"!==P||"PORTABILIDAD_PRE"!==t[0].purchaseFlow){e.next=60;break}(0,F.eQ)(),g.push("/prepago/cambiate-con-tu-mismo-numero/datos-personales"),b((function(e){return ae(ae({},e),{},{isLoading:!1})})),e.next=79;break;case 60:if("PREAPOST"!==P||"PREAPOST"!==t[0].purchaseFlow){e.next=66;break}b((function(e){return ae(ae({},e),{},{isLoading:!1})})),(0,Z.GE)(I.data.orderItem,ne),g.push("/datos-personales-prepost"),e.next=79;break;case 66:return e.prev=66,e.next=69,s.add(t,o);case 69:!1===(N=e.sent).error?"PREAPOST"===P?((0,Z.GE)(N.data.orderItem,ne),(0,F.eQ)(),g.push("/datos-personales-prepost")):((0,F.eQ)(),p&&sessionStorage.setItem(c,u),g.push("/cart")):((0,F.eQ)(),n("error","No se puedo agregar el producto a tu carrito","",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g.push("/");case 1:case"end":return e.stop()}}),e)}))))),e.next=79;break;case 73:e.prev=73,e.t1=e.catch(66),console.error({error:e.t1}),k=(0,R.Z)(e.t1),n("error"),n("error",k.message,"",(function(){g.push("/")}));case 79:e.next=95;break;case 81:return e.prev=81,e.next=84,s.add(t,o);case 84:!1===(T=e.sent).error?"PREAPOST"===t[0].purchaseFlow?((0,Z.GE)(T.data.orderItem,ne),(0,F.eQ)(),g.push("/datos-personales-prepost")):"PORTABILIDAD_POST"===t[0].purchaseFlow?(T.data.orderItem.map((function(e,t){h((0,L.uh)({productId:e.productId,plan:(0,F.vQ)()}))})),(0,F.eQ)(),(0,Z.GE)(T.data.orderItem,ne),g.push("/postpago/cambiate-con-tu-mismo-numero/datos-personales")):"PORTABILIDAD_PRE"===t[0].purchaseFlow?((0,F.eQ)(),g.push("/")):((0,F.eQ)(),u.length>0&&p&&sessionStorage.setItem(c,u),g.push("/cart")):((0,F.eQ)(),n("error","No se puedo agregar el producto a tu carrito","",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,g.push("/");case 4:case"end":return e.stop()}}),e)}))))),b(ae(ae({},S),{},{loading:!1})),e.next=95;break;case 89:e.prev=89,e.t2=e.catch(81),console.error({error:e.t2}),D=(0,R.Z)(e.t2),n("error"),n("error",D.message,"",(function(){g.push("/")}));case 95:localStorage.removeItem("isGuest");case 96:case"end":return e.stop()}}),e,null,[[21,28],[66,73],[81,89]])})));return function(t,r,n){return e.apply(this,arguments)}}(),de=function(){var e=(0,l.Z)(m().mark((function e(t,o,a){var s,c,u,d,p,v,h,x,A,w,E,O,P;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:if(c=e.sent,!(Object.keys(null===c||void 0===c||null===(s=c.data)||void 0===s?void 0:s.orderItem).length>0)){e.next=9;break}p=(0,U.Oc)(null===c||void 0===c||null===(u=c.data)||void 0===u||null===(d=u.orderItem[0])||void 0===d?void 0:d.orderItemExtendAttribute),b(ae(ae({},S),{},{loading:!1})),n("warning","HOGARES"===p?"Por favor completa la primera compra de Hogares para continuar con esta solicitud.":"Ten en cuenta que no puedes mezclar productos de categor\xedas diferentes. Por favor completa la primera compra para continuar con esta solicitud.","",(function(){g.push("/cart")}),"","Aceptar","btn-rojo"),e.next=38;break;case 9:return e.prev=9,e.next=12,i.add(t,o);case 12:if(!1!==e.sent.error){e.next=28;break}if(!(void 0!==I&&null!==I&&Object.keys(I).length>0)){e.next=25;break}return x=I.stratum.split(" ")[1],A="HOGARES_"+(null===a||void 0===a||null===(v=a.userName)||void 0===v?void 0:v.trim()),w=I.complete.match(/.{1,120}/g),E={firstName:null===a||void 0===a?void 0:a.clientName,lastName:null===a||void 0===a?void 0:a.clientLastName,addressLine:[w[0]||"",w[1]||"",w[2]||""],country:"Colombia",city:I.cityName,state:I.stateName,email1:null===a||void 0===a||null===(h=a.userName)||void 0===h?void 0:h.trim(),nickName:A,zipCode:I.ciudad,businessTitle:I.nameTown,internalOfficeAddress:I.neighborhoodName,primary:"false",geographicalShippingCode:I.informacionadicional.trim(),geographicalTaxCode:'{"ID":"'.concat(I.addressId,'","ST":"').concat("-1"===I.estrato?x:I.estrato,'","CDC":"').concat(I.centroPoblado,'","CDS":"').concat(I.normCodeDaneState,'","IDD":"').concat(I.detailsdireccion_id,'"}'),fax1:"",middleName:I.normAddressStr},e.next=21,f(E);case 21:"OK"!==(null===(O=e.sent)||void 0===O?void 0:O.status)?(setLoading(!1),n("error","No se pudo guardar tu direcci\xf3n correctamente, por favor intenta nuevamente el proceso.","",(function(){g.push("/armatuplay")}),"","Aceptar","btn-rojo")):((0,F.eQ)(),g.push("/cart")),e.next=26;break;case 25:n("error","No tienes ninguna direcci\xf3n asociada, por favor intenta nuevamente el proceso.","",(function(){g.push("/armatuplay")}),"","Aceptar","btn-rojo");case 26:e.next=30;break;case 28:(0,F.eQ)(),n("error","No se puedo agregar el producto a tu carrito","",(0,l.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,g.push("/");case 4:case"end":return e.stop()}}),e)}))));case 30:e.next=38;break;case 32:e.prev=32,e.t0=e.catch(9),console.error({error:e.t0}),P=(0,R.Z)(e.t0),n("error"),n("error",P.message,"",(function(){g.push("/")}));case 38:case"end":return e.stop()}}),e,null,[[9,32]])})));return function(t,r,n){return e.apply(this,arguments)}}(),pe=function(){var e=(0,l.Z)(m().mark((function e(){var t,n,s,i,c,u,l,d,p,f,x,I,A,w,E,O,j,C,R,N,k;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b(ae(ae({},S),{},{loading:!0})),i=(0,F.y9)(),c=S.email,u=S.password,e.next=6,(0,D.pH)((0,G.B)(c),(0,G.B)(u),"v9");case 6:if(!(l=e.sent).error){e.next=11;break}return b(ae(ae({},S),{},{loading:!1})),(0,Z.ps)("Inicio de sesi\xf3n",l.message),e.abrupt("return",Q({open:!0,message:l.message}));case 11:return o(l.token,l.user),(0,_.C6)(l.token,l.user),h((0,H.YU)()),h((0,V.FB)()),e.next=17,(0,y.EA)(l.token);case 17:return d=e.sent,p=d.data,p.firstName,p.lastName,p.email1,p.phone1,f=JSON.parse(null!==(t=localStorage.getItem("flujo_general_catalogo"))&&void 0!==t?t:'""'),x=f.flowName||"no_categorizado",I=f.business_unit2||"",(0,Z.t2)(x,I,null===(n=d.data)||void 0===n?void 0:n.userId),h((0,P.ps)(d.data)),A=l.user.user,w=A.isTemporaryPassword,E=A.clientName,O=A.clientLastName,A.userName,A.document,"".concat(E," ").concat(O," "),e.next=28,r();case 28:if(j=e.sent,C="",Object.keys(null===j||void 0===j||null===(s=j.data)||void 0===s?void 0:s.orderItem).length>0&&(C=(0,U.Oc)(null===j||void 0===j||null===(R=j.data)||void 0===R||null===(N=R.orderItem[0])||void 0===N?void 0:N.orderItemExtendAttribute)),k=l.user.user,!(0,F.yc)()){e.next=34;break}return e.abrupt("return",de(i,l.token,k));case 34:if(!(0,F.Qq)()&&!(0,F.Il)()){e.next=38;break}return e.abrupt("return",le(i,l.token,k));case 38:localStorage.removeItem("isGuest");case 39:if("true"!==w){e.next=42;break}return v({key:T,object:{value:"true"===w}}),e.abrupt("return",g.push("/myAccount"));case 42:if(!(0,F.t3)()){e.next=45;break}return(0,F.eQ)(),e.abrupt("return",g.push("/simulator"));case 45:"HOGARES"===C?window.location.href=sessionStorage.getItem("previousPathHogares")?JSON.parse(sessionStorage.getItem("previousPathHogares")):"/":"/"===a?g.push("/"):g.back(),e.next=54;break;case 48:return e.prev=48,e.t0=e.catch(0),console.error({error:e.t0}),b(ae(ae({},S),{},{loading:!1})),(0,Z.ps)("Inicio de sesi\xf3n","Error al iniciar sesi\xf3n, favor de intentar nuevamente."),e.abrupt("return",Q({open:!0,message:"Error al iniciar sesi\xf3n, favor de intentar nuevamente."}));case 54:case"end":return e.stop()}}),e,null,[[0,48]])})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){var e=(0,F._n)();null!==e&&b((function(t){return ae(ae({},t),{},{emailIsValid:!0,email:e.trim()})}))}),[]),(0,w.jsx)(te,{intl:t,state:S,previousRoute:a,onChangeEmailInput:ce,onChangePasswordInput:function(e){var t=e.target.value;b(ae(ae({},S),{},""!==t?{passwordError:ae(ae({},S.passwordError),{},{show:!1,message:""}),passwordIsValid:!0,password:t}:{passwordError:ae(ae({},S.passwordError),{},{show:!0,message:"message.fieldRequired"}),passwordIsValid:!1,password:t}))},handleClickLogin:function(e){e.preventDefault(),ue(pe)},isListSuggestions:C,setListSuggestions:N,handleSelectEmailOption:function(e){var t,r,n=S.email,o=n.indexOf("@");o+=1,(null===(t=r=(n=n.slice(0,o))+e)||void 0===t?void 0:t.length)>45||(b(ae(ae({},S),{},{emailError:ae(ae({},S.emailError),{},{show:!1,message:""}),emailIsValid:!0,email:r})),N(!1))},modalErrorLog:B,handleCloseModalErrorLog:function(){Q({open:!1,message:""})},userAcceptsCentralRiesgo:Y,checkedInputCentralRiesgo:$,setCheckedInputCentralRiesgo:W})}));function ie(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,i.Z)(e);if(t){var o=(0,i.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}var ce=function(e){(0,a.Z)(r,e);var t=ie(r);function r(e){return(0,n.Z)(this,r),t.call(this,e)}return(0,o.Z)(r,[{key:"render",value:function(){return(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(se,{previousRoute:this.props.previousRoute})})}}]),r}(c.Component),ue=(0,u.withRouter)(ce)},85665:function(e,t,r){"use strict";r.d(t,{I:function(){return d},r:function(){return l}});var n=r(50029),o=r(87794),a=r.n(o),s=r(63144),i=r.n(s),c=r(48043),u=r(6862),l=function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,o,s,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={method:"GET",url:"".concat(c.default.USER_ADDRESS,"?addressType=ShippingAndBilling"),headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(t)}},e.prev=1,e.next=4,i()(r.url,r);case 4:return n=e.sent,e.next=7,n.json();case 7:return o=e.sent,s=(0,u.D)(o.data),l="OK"!==o.status,e.abrupt("return",{data:s,error:l});case 13:return e.prev=13,e.t0=e.catch(1),console.error("[getAddressShippingAndBilling]",e.t0),e.abrupt("return",{data:null,error:e.t0});case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}(),d=function(){var e=(0,n.Z)(a().mark((function e(t,r){var n,o,s,l,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"GET",url:"".concat(c.default.USER_ADDRESS_REPORTS,"?addressType=ShippingAndBilling&filternickname=").concat(r),headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(t)}},e.prev=1,e.next=4,i()(n.url,n);case 4:return o=e.sent,e.next=7,o.json();case 7:return s=e.sent,l=(0,u.D)(s.data),d="OK"!==s.status,e.abrupt("return",{data:l,error:d});case 13:return e.prev=13,e.t0=e.catch(1),console.error("[getAddressShippingAndBilling]",e.t0),e.abrupt("return",{data:null,error:e.t0});case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t,r){return e.apply(this,arguments)}}()},82074:function(e,t,r){"use strict";r.d(t,{d:function(){return i}});var n=r(50029),o=r(87794),a=r.n(o),s=r(48043),i=(r(6862),function(){var e=(0,n.Z)(a().mark((function e(t){var r,n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={method:"POST",url:"".concat(s.default.CENTRALES_RIESGO),headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)},e.prev=1,e.next=4,fetch(r.url,r);case 4:return n=e.sent,e.next=7,n.json();case 7:return o=e.sent,e.abrupt("return",o);case 11:e.prev=11,e.t0=e.catch(1),console.error("[guardaCentrales]",e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}())},64167:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return r(55922)}])}},function(e){e.O(0,[2175,1664,6063,2679,9219,6506,1224,63,5871,6240,8744,7763,9949,2620,2867,2710,9546,3026,8246,8867,9774,2888,179],(function(){return t=64167,e(e.s=t);var t}));var t=e.O();_N_E=t}]);