"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[40967],{21917:(e,t,r)=>{function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){for(var t=1;ti.YL,I6:()=>a});const a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o({},e)};var i=r(16749)},16749:(e,t,r)=>{r.d(t,{YL:()=>c});var n=r(20573),o=function(e){return e.algolia},a=(0,n.P1)(o,(function(e){return e.ALGOLIA_APP_ID})),i=(0,n.P1)(o,(function(e){return e.ALGOLIA_API_KEY})),u=(0,n.P1)(o,(function(e){return e.INDEX_NAME})),c=(0,n.P1)([a,i,u],(function(e,t,r){return{ALGOLIA_APP_ID:e,ALGOLIA_API_KEY:t,INDEX_NAME:r}}))},61161:(e,t,r)=>{r.d(t,{Bd:()=>y,Sl:()=>h,Td:()=>m,Xv:()=>b,b$:()=>w,gM:()=>v,qM:()=>d});var n,o=r(54461),a=r(65822);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u,c,s,l,f,p,d=(i(n={},o.Pp.COM,o.lI.es_ES),i(n,o.Pp.PT,o.lI.pt_PT),i(n,o.Pp.FR,o.lI.fr_FR),i(n,o.Pp.IT,o.lI.it_IT),n),y=(i(u={},o.Pp.COM,o.nh.ES),i(u,o.Pp.PT,o.nh.PT),i(u,o.Pp.FR,o.nh.FR),i(u,o.Pp.IT,o.nh.IT),u),b=(i(c={},o.Pp.COM,a.Ee.es),i(c,o.Pp.FR,a.Ee.fr),i(c,o.Pp.IT,a.Ee.it),i(c,o.Pp.PT,a.Ee.pt),c),h=(i(s={},a.C6.CATEGORY_LIST_VIEW,o.bW.FAMILY),i(s,a.C6.CAMPAIGN_VIEW,o.bW.PROMOTION),i(s,a.C6.CMS_POST,o.bW.CMS),i(s,a.C6.BRAND_LIST_VIEW,o.bW.TRADEMARK),i(s,a.C6.PRODUCT_DETAIL,o.bW.ARTICLE),i(s,a.C6.SHOP_MARKETPLACE,o.bW.VENDOR),i(s,a.C6.SUPPORT,o.bW.SUPPORT),s),w=(i(l={},o.Pp.COM,"https://www.pccomponentes.com/condiciones-de-compra"),i(l,o.Pp.FR,"https://www.pccomponentes.fr/conditions-de-vente"),i(l,o.Pp.PT,"https://www.pccomponentes.pt/condicoes-de-compra"),i(l,o.Pp.IT,"https://www.pccomponentes.com/condiciones-de-compra"),l),m=(i(f={},o.Pp.COM,"https://www.pccomponentes.com/soporte/condiciones-de-uso-de-los-saldos-a-favor"),i(f,o.Pp.FR,"https://www.pccomponentes.fr/assistance/conditions-de-utilisation-des-soldes-crediteurs"),i(f,o.Pp.PT,"https://www.pccomponentes.pt/soporte/condies-de-uso-de-saldos-a-favor"),i(f,o.Pp.IT,"https://www.pccomponentes.com/soporte/condiciones-de-uso-de-los-saldos-a-favor"),f),v=(i(p={},o.Pp.COM,"https://www.pccomponentes.com/cupones-descuento-y-codigos-promocionales"),i(p,o.Pp.FR,"https://www.pccomponentes.fr/coupons-de-reduction-et-codes-promotionnels"),i(p,o.Pp.PT,"https://www.pccomponentes.pt/cupoes-de-desconto-e-codigos-promocionais"),i(p,o.Pp.IT,"https://www.pccomponentes.com/cupones-descuento-y-codigos-promocionales"),p)},54461:(e,t,r)=>{r.d(t,{nh:()=>n.nh,Pp:()=>n.Pp,lI:()=>n.lI,t4:()=>n.t4,Lr:()=>n.Lr,bW:()=>n.bW,Fc:()=>l.Fc,uv:()=>l.uv,FT:()=>l.FT,$W:()=>l.$W,G9:()=>l.G9,I6:()=>s,lE:()=>l.lE,oV:()=>f});var n=r(95152),o="@APP/SET_IS_APP_HYDRATED";function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;return t.type===o?u(i({},e),{isAppHydrated:t.payload}):i({},e)};var l=r(98601),f=function(e){return{type:o,payload:e}}},98601:(e,t,r)=>{r.d(t,{$W:()=>a,FT:()=>l,Fc:()=>i,G9:()=>c,lE:()=>u,uv:()=>s});var n=r(20573),o=function(e){return e.app},a=(0,n.P1)(o,(function(e){return null===e||void 0===e?void 0:e.platform})),i=(0,n.P1)(o,(function(e){return null===e||void 0===e?void 0:e.domainExtension})),u=(0,n.P1)(o,(function(e){return null===e||void 0===e?void 0:e.selectedLanguage})),c=(0,n.P1)(o,(function(e){return null===e||void 0===e?void 0:e.protocol})),s=(0,n.P1)(o,(function(e){return null===e||void 0===e?void 0:e.environment})),l=(0,n.P1)(o,(function(e){return e.isAppHydrated}))},95152:(e,t,r)=>{var n,o;r.d(t,{Lr:()=>c,Pp:()=>a,bW:()=>s,lI:()=>n,nh:()=>i,t4:()=>o}),function(e){e.es_ES="es_ES",e.fr_FR="fr_FR",e.pt_PT="pt_PT",e.it_IT="it_IT"}(n||(n={})),function(e){e.PCCOMPONENTES="pccomponentes"}(o||(o={}));var a,i;!function(e){e.COM=".com",e.PT=".pt",e.FR=".fr",e.IT=".it"}(a||(a={})),function(e){e.ES="ES",e.FR="FR",e.PT="PT",e.IT="IT"}(i||(i={}));var u;!function(e){e.HTTP="http",e.HTTPS="https"}(u||(u={}));var c,s;!function(e){e.PCCOMPONENTES="PcComponentes"}(c||(c={})),function(e){e.FAMILY="family",e.PROMOTION="promotion",e.CMS="cms",e.TRADEMARK="trademark",e.ARTICLE="article",e.VENDOR="vendor",e.SUPPORT="support",e.LANDING="landing",e.BLOG_POST="blogPost",e.SUPPORT_LANDING="support-landing",e.SUPPORT_POST="support-Post"}(s||(s={}))},11363:(e,t,r)=>{r.d(t,{C0:()=>p,N_:()=>l,kS:()=>s,dd:()=>d,f0:()=>I,GR:()=>_,Hr:()=>W,o3:()=>q,T4:()=>re});var n=r(24702),o=r(54461),a=function(e,t,r){return n.V0.fetch("/api-v1/auth/login",n.w$.POST,{username:e,password:t,captchaToken:r})},i=function(e,t){var r=e.name,a=e.username,i=e.password,u=e.newsletter;return n.V0.fetch("/api-v1/auth/register",n.w$.POST,{name:r,username:a,password:i,newsletter:u},{headers:{"x-selected-language":t||o.lI.es_ES}})},u=function(e,t,r){var a=e.captchaToken,i=e.username;return n.V0.fetch("/api-v1/user/password-reset-request",n.w$.POST,{captchaToken:a,username:i},{headers:{"x-selected-language":t||o.lI.es_ES,"x-domain-extension":r||o.Pp.COM}})},c=function(e){var t=e.password,r=e.token;return n.V0.fetch("/api-v1/user/password-reset",n.w$.PUT,{password:t,token:r})},s=function(){return n.V0.fetch("/api-v1/auth/logout",n.w$.POST)},l=function(e){return n.V0.fetch("/api-v1/auth/login-google",n.w$.POST,{token:e})},f=r(67294);var p="redirectReferrer",d=function(){var e=document.cookie.replace(/(?:(?:^|.*;\s*)redirectReferrer\s*=\s*([^;]*).*$)|^.*$/,"$1");if(e){document.cookie="".concat(p,"=;path=/;expires=-1;");var t=decodeURIComponent(e);window.location.assign(t)}else 0===document.referrer.indexOf(location.protocol+"//"+location.host)&&document.referrer!==window.location.href?("undefined"!==typeof window&&window.Cypress&&Object.defineProperty(document,"referrer",{get:function(){return"/"}}),window.location.assign(document.referrer)):window.location.assign("/")},y=function(e){return!!(0,n.Kn)(e)&&("username"in e&&"string"===typeof e.username&&"expireDateTime"in e&&("string"===typeof e.expireDateTime||"number"===typeof e.expireDateTime||(t=e.expireDateTime,null!=(r=Date)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](t):t instanceof r)));var t,r},b=function(e){try{var t=window.atob(e),r=window.atob(t.split(".")[1]),n=JSON.parse(r),o=y(a=n)&&new Date(a.expireDateTime)>new Date;return{token:o?t:void 0,username:o?n.username:void 0}}catch(e){return{}}var a},h=r(91085),w=r(89652);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]5&&o(h.Z.RECOVERY_PASSWORD)}),[o,u.loginAttempts]),y=(t=g((function(e){var t,n,o,i;return T(this,(function(s){switch(s.label){case 0:if(t=e.username,n=e.password,u.loading)return[3,4];c((function(e){return S(O({},e),{loading:!0})})),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,a(t,n,u.captchaToken)];case 2:return(o=s.sent()).ok?(r&&r.user.userLoginOk(),d()):(i=Date.now(),c((function(e){return S(O({},e),{showErrMsg:!0,loading:!1,captchaId:i})})),r&&r.user.userLoginError(),p(o.err)),[3,4];case 3:return s.sent(),w.Z,[3,4];case 4:return[2]}}))})),function(e){return t.apply(this,arguments)});return(0,f.useEffect)((function(){if(!l.current){l.current=!0;var e,t=function(){var e=g((function(){var e,t;return T(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,n.V0.fetch("/api-v1/auth/login-attempts",n.w$.POST,{})];case 1:return(e=r.sent()).ok?(t=e.data,c((function(e){return S(O({},e),{loginAttempts:(null===t||void 0===t?void 0:t.attempts)||e.loginAttempts})}))):p(e.err),[3,3];case 2:return r.sent(),w.Z,[3,3];case 3:return[2]}}))}));return function(){return e.apply(this,arguments)}}();(e=document.getElementById("login-form"))&&(e.onsubmit=function(e){return e.stopImmediatePropagation()}),t(),s.current=localStorage.getItem("newPassword"),localStorage.removeItem("newPassword"),localStorage.removeItem("username")}}),[p]),{captchaId:u.captchaId,captchaToken:u.captchaToken,hasNewPassword:s,loading:u.loading,login:y,loginAttempts:u.loginAttempts,maxLoginAttempts:5,setState:c,showErrMsg:u.showErrMsg}},A=r(89250);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:"",r=B((0,f.useState)(Z(H({},X),{username:t})),2),n=r[0],a=r[1],i=(0,$.v9)(o.lE),c=(0,$.v9)(o.Fc),s=(e=U((function(){var e;return J(this,(function(t){switch(t.label){case 0:a(Z(H({},n),{token:"",isResendDisabled:!0,loading:!0})),e=Date.now(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,u({captchaToken:n.token,username:n.username},i,c)];case 2:return t.sent().ok&&a(Z(H({},n),{captchaId:e,isResendDisabled:!0,loading:!1,username:""})),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))})),function(){return e.apply(this,arguments)});return{handleResendPasswordLink:s,setState:a,state:n}};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]