"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9524],{35870:(e,t,n)=>{n.d(t,{T:()=>c});var r=n(8442),a=n(28489),i=n(26911),o=n(93307),c=function(){return r.V0.fetch("/api-v1/commerce/api/v1/cart",r.w$.GET).then((function(e){if(e.data)return e.data.data;throw(0,a.xK)(e)})).catch((function(e){throw(0,a.xK)(e)})).then((function(e){return{totalPrice:e.cartLines.reduce((function(e,t){return e+t.totalPrice.amountCents}),0)/100,totalToPay:e.totalPrice.amountCents/100,paymentIntention:e.paymentIntention,balance:0,balanceToSpend:0,totalDiscountInCart:0,totalGiftCardDiscountInCart:0,lastEditDate:"2022-02-21T00:00:00+01:00",shippingAddress:e.shippingAddress,totalQty:e.cartLines.reduce((function(e,t){return e+t.qty}),0),marketPlaceShippingCost:e.deliveries.reduce((function(e,t){if(!t.fulFilledByPcc){var n=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(n?n.price.amountCents:0)}return e}),0)/100,dropShippingShippingCost:0,shippingCost:e.deliveries.reduce((function(e,t){if(t.fulFilledByPcc){var n=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(n?n.price.amountCents:0)}return e}),0)/100,totalInstallationPrice:0,giftCardAmountToSpend:0,totalPayed:0,surcharge:0,directPoints:0,cartShops:[],shippingCostISP:0,commission:0,commissionISP:0,talonOneNotifications:[],isCustomPcCom:!1,articles:e.cartLines.map((function(t){return{idArticle:+t.product.id,idLine:t.id,type:"normal",articleImage:t.product.image,ean:"123456789",articleReference:0,lineReference:e.lineRelationships.reduce((function(e,n){return e||(n.relatedLineId===t.id?n.parentLineId:void 0)}),void 0),availabilityCode:e.deliveries.reduce((function(e,n){return n.items.reduce((function(e,n){return n.lineId===t.id?(0,o.XU)(n.availabilityType):e}),i.wr.OUT_OF_STOCK.valueOf())}),i.wr.OUT_OF_STOCK.valueOf()),name:t.product.name,family:"Portátiles",superFamily:"Ordenadores",totalPrice:t.totalPrice.amountCents/100,totalPriceWithSpanishCanon:t.totalPrice.amountCents/100,unitPrice:(t.unitPrice.amountCents+t.unitTaxAmount.amountCents)/100,basePrice:t.unitPrice.amountCents/100,unitTaxAmount:t.unitTaxAmount.amountCents/100,qty:t.qty,slug:"lenovo-ideapad",trademark:"Lenovo",trademarkRef:"345jkhgkj35",promotions:[],mpOffer:{idOffer:0,shopId:t.seller.id,shopName:t.seller.name,shopSlug:"",condition:t.condition,shipTax:0,priceOffer:0,valorateShop:0,maxShippingDays:0,minShippingDays:0,shippingTypeCode:"",deliveryKey:0},deliveryDate:{strDeliveryDate:"hoy no, mañana",isSameDay:!1,minDeliveryDate:"min",maxDeliveryDate:"max"},storeAvailability:{1:!0,26:!1,27:!1,28:!1,30:!1,44:!0,45:!1,62:!1,295:!1},articleStock:0,isOem:!1,extendedInsurance:void 0,extendedInsurances:[],installationService:void 0,canAddGiftPaper:!1,isCustomPcCom:!1,insuranceSelected:void 0,extraServiceSelected:void 0,articleWarrantyReference:0,isPromotional:0,mpOfferReference:"",subExtraOptions:[],subExtraArticles:[],isElectronic:!1,digitalData:null,isExtraServiceArticle:e.lineRelationships.reduce((function(e,n){return e||n.relatedLineId===t.id}),!1),extraServices:[],couponDiscountTextValue:"",detail:"",date:""}}))}}))}},78671:(e,t,n)=>{n.d(t,{s:()=>i});var r=n(8442),a=n(28489),i=function(){return r.V0.fetch("/api-v1/commerce/api/v1/country",r.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,a.xK)(e)})).then((function(e){var t=[];return Object.keys(e).forEach((function(n,r){t.push({idCountry:r,iso:e[r].isoCode,name:e[r].isoName})})),t}))}},47242:(e,t,n)=>{n.d(t,{S:()=>c});var r=n(8442),a=n(28489);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?function(e){var t=o(new Set(e));return r.V0.fetch("/api-v1/commerce/api/v1/offer/relatable",r.w$.GET,{productIds:t}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,a.xK)(e)}))}(e).then((function(e){return e})):[]}},39140:(e,t,n)=>{n.d(t,{b:()=>I});var r=n(35870),a=n(8442),i=n(28489),o=n(3678),c=n(93307),d=n(77733);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0?(p[0].default=1,I?[3,3]:(I=p[0],[4,(0,d.M)({id:I.id.toString(),name:I.name+" "+I.surname,addressLine:I.address,email:I.email,phone:I.phone,countryIsoCode:I.country.iso,provinceIsoCode:I.province.id,city:I.city,postalCode:I.postalCode}).catch((function(){I=void 0}))])):[3,3];case 2:A.sent(),A.label=3;case 3:return l.length>0&&(l[0].defaultUser=!0,f||(f=l[0])),y=function(e){var t=[];return e.includes(o.XL.ADYEN_CARD)&&t.push({bank:"Adyen",description:"Esta forma de pago es inmediata y totalmente segura. Todos los pagos efectuados mediante esta forma de pago serán validados por su entidad bancaria y en caso de ser aceptados nos será remitido de forma automática e instantanea. Requiere de una clave de seguridad para poder realizar este tipo de pagos online. Consulte a su entidad bancaria si desconoce su clave de seguridad. Se aceptan tarjetas VISA\\/ VISA Electron y MasterCard\\/Maestro.",groupType:"tarjeta",idPayment:o.XL.ADYEN_CARD,message:"",name:"Tarjeta de Crédito / Débito",slug:"adyen",url:""}),e.includes(o.XL.APLAZAME)&&t.push({bank:"Aplazame",description:"Financiación a plazos con Tarjeta. Puedes financiar cualquier importe hasta un máximo de 2.500€ y elegir pagarlo entre 2 y 30 meses. Para solicitar la financiación es necesario que tengas un DNI o NIE válido, un teléfono móvil, y la tarjeta bancaria. El pedido tiene que tener dirección de entrega en España. La financiación tiene un coste TAE del 12,5%. Pagas una entrada inicial en momento de la compra, que no incluye intereses, y el resto se reparte entre las cuotas seleccionadas. RECUERDA TENER EL DNI / NIE ORIGINAL A MANO para tramitar la financiación.
IMPORTANTE: Si tu pedido incluye artículos que entran dentro de una campaña sin intereses, Aplazame lo tendrá en cuenta para no aplicar intereses sobre la financiación en aquellos artículos que estén dentro de la campaña correspondiente.",groupType:"financiacion",idPayment:o.XL.APLAZAME,message:"",name:"Financiación Aplazame de 2 a 30 meses (inmediata)",slug:"aplazame",url:""}),t}(s),[2,{cart:t,shippingAddress:p,billingAddress:l,billingSelected:f?f.idUser:0,shippingSelected:I?I.id:0,agencySelected:69,paymentTypeSelected:23,agencies:{availableAgencies:[]},payments:y,paymentsNotAllowed:[],deliveryTimeCollection:[],delegations:[],availableClientPromotions:[],canShowGiftPaper:0,canShowNeutralDelivery:!0,hasOtherTwoOrdersWithPaypal:!1,hasAssembly:!1,hasCif:!1,hasPublicCif:!1,customMessage:0,availableShops:[],adyenBankstores:{},canBeSimplifiedInvoice:!1,criticalErrors:[],canShowShippingPoints:!1,canBePremium:!1,authorizedPoints:[],isCollectInShop:!1,talonCoupons:[],ordersAndDeliveries:[],awardedFinancing:void 0,payPerUseInstallments:[],shopCounter:!1}]}}))},f=function(){var e=this,t=arguments;return new Promise((function(n,r){var a=p.apply(e,t);function i(e){l(a,n,r,i,o,"next",e)}function o(e){l(a,n,r,i,o,"throw",e)}i(void 0)}))},function(){return f.apply(this,arguments)})},93307:(e,t,n)=>{n.d(t,{XU:()=>c,Zi:()=>i,m2:()=>o});var r=n(38483),a=n(26911),i=function(e){return{streetNumber:"",id:parseInt(e.id),nif:"29318711J",alias:"",company:"",name:d(e.name),surname:s(e.name),address:e.addressLine,postalCode:e.postalCode,city:e.city,phone:e.phone,default:0,province:{id:e.provinceIsoCode,name:e.provinceIsoName},country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},email:e.email,optionalInformation:""}},o=function(e){return{streetNumber:"",activated:"",address:e.addressLine,alias:"",billingType:r.y.INDIVIDUAL,cellPhone:e.phone,city:e.city,clientPromotions:{promotions:[]},company:"",country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},defaultUser:!1,domain:"",idUser:parseInt(e.id),name:d(e.name),nif:"29318711J",postalCode:e.postalCode,province:{id:e.provinceIsoCode,name:e.provinceIsoName},surname:s(e.name)}},c=function(e){var t={STOCK_ON_HAND:a.wr.IN_STOCK,STOCK_IN_TRANSIT:a.wr.INMINENT_REPLENISHMENT,PLANNED_REPLENISHMENT:a.wr.HIGH_AVAILABILITY,OUT_OF_STOCK:a.wr.OUT_OF_STOCK};if(!(e in t))throw new Error("Availability type not supported "+e);return t[e]},d=function(e){return e.split(" ")[0]},s=function(e){var t=e.split(" ");return t.length>1?(t.shift(),t.join(" ")):" "}},77733:(e,t,n)=>{n.d(t,{M:()=>i});var r=n(8442);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function(e){return r.V0.fetch("/api-v1/commerce/api/v1/cart/shipping-address",r.w$.PUT,function(e){for(var t=1;t{n.d(t,{r:()=>i});var r=n(8442),a=n(28489),i=function(e){return r.V0.fetch("/api-v1/commerce/api/v1/payment/".concat(e,"/aplazame/checkout"),r.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,a.xK)(e)}))}},3678:(e,t,n)=>{var r,a,i;n.d(t,{XL:()=>r,bG:()=>a}),function(e){e.ADYEN_CARD="adyen-card",e.REDSYS_CARD="redsys-card",e.APLAZAME="aplazame"}(r||(r={})),function(e){e.ERROR="Error",e.REDIRECT="Redirect",e.AUTHORISED="Authorised",e.PENDING="Pending",e.PAID="Paid"}(a||(a={})),function(e){e.STOCK_ON_HAND="STOCK_ON_HAND",e.STOCK_IN_TRANSIT="STOCK_IN_TRANSIT",e.PLANNED_REPLENISHMENT="PLANNED_REPLENISHMENT",e.OUT_OF_STOCK="OUT_OF_STOCK"}(i||(i={}))},94062:(e,t,n)=>{n.d(t,{M:()=>i});var r=n(3678),a=n(50519),i=function(e,t){if(e.cart.paymentIntention&&(r.XL.APLAZAME===e.cart.paymentIntention.paymentMethod&&t((0,a.XV)(r.XL.APLAZAME)),r.XL.ADYEN_CARD===e.cart.paymentIntention.paymentMethod)){var n=e.cart.paymentIntention.paymentData;t((0,a.$V)(r.XL.ADYEN_CARD)),t((0,a.K1)({cardData:{cardBrand:n.paymentMethod.brand,cardName:n.paymentMethod.holderName,endDigits:n.paymentMethod.endDigits},data:{browserInfo:{acceptHeader:n.browserInfo.acceptHeader,colorDepth:n.browserInfo.colorDepth,javaEnabled:n.browserInfo.javaEnabled,language:n.browserInfo.language,screenHeight:n.browserInfo.screenHeight,screenWidth:n.browserInfo.screenWidth,timeZoneOffset:n.browserInfo.timeZoneOffset,userAgent:n.browserInfo.userAgent},clientStateDataIndicator:n.clientStateDataIndicator,paymentMethod:{brand:n.paymentMethod.brand,encryptedCardNumber:n.paymentMethod.encryptedCardNumber,encryptedExpiryMonth:n.paymentMethod.encryptedExpiryMonth,encryptedExpiryYear:n.paymentMethod.encryptedExpiryYear,encryptedSecurityCode:n.paymentMethod.encryptedSecurityCode,holderName:n.paymentMethod.holderName,type:n.paymentMethod.type},riskData:{clientData:n.riskData.clientData},storePaymentMethod:n.storePaymentMethod}}))}}},28489:(e,t,n)=>{n.d(t,{C0:()=>H,Ck:()=>P,JN:()=>W,Lu:()=>M,Lw:()=>X,Ot:()=>k,PI:()=>F,Rr:()=>V,Ux:()=>R,Yg:()=>C,_y:()=>S,o1:()=>B,pY:()=>w,rY:()=>K,xK:()=>G});var r=n(33945),a=n(26911),i=n(23031),o=n(49553),c=n(50519);function d(e,t,n,r,a,i,o){try{var c=e[i](o),d=c.value}catch(e){return void n(e)}c.done?t(d):Promise.resolve(d).then(r,a)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){d(i,r,a,o,c,"next",e)}function c(e){d(i,r,a,o,c,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,n){return p=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&_(a,n.prototype),a},p.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function A(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}function I(e,t){return null!=t&&"undefined"!==typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function y(e,t){return!t||"object"!==v(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e,t){return _=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_(e,t)}var v=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function m(e){var t="function"===typeof Map?new Map:void 0;return m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return p(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)},m(e)}function E(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 n,r=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return y(this,n)}}var h,T=function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]").concat(null!==(n=t.articleName)&&void 0!==n?n:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case a.LI.OUT_OF_STOCK:var r;return{text:"".concat((0,i.t)("checkout.errors.outOfStock")," ").concat(null!==(r=t.articleName)&&void 0!==r?r:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case a.LI.EMPTY_CART:var o;return{text:"".concat((0,i.t)("checkout.errors.emptyCart")," ").concat(null!==(o=t.articleName)&&void 0!==o?o:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case a.LI.USER_NOT_FOUND:var c;return{text:"".concat((0,i.t)("checkout.errors.userNotFound")," ").concat(null!==(c=t.articleName)&&void 0!==c?c:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case a.LI.ARTICLE_CANT_BE_ALONE_IN_ORDER:var d;return{text:"".concat((0,i.t)("checkout.errors.articleCantBeAloneInOrder")," ").concat(null!==(d=t.articleName)&&void 0!==d?d:"",""),type:"danger",errorCode:t.code,hasIcon:!0,blockNextStep:!0};case a.LI.URGENT_LIMIT_STOCK_REACHED:return{text:(0,i.t)("checkout.alerts.stockLimitReached"),type:"info",errorCode:t.code};case a.LI.MARKETPLACE_OFFER_MATCH:return{text:(0,i.t)("checkout.alerts.marketplaceOfferMatch"),type:"info",errorCode:t.code};case a.LI.WEIGHT_INTERNATIONAL_SHIPPING:return{text:(0,i.t)("checkout.alerts.weightInternationalShipping"),type:"info",errorCode:t.code};case a.LI.CP_BLOCKED:return{text:(0,i.t)("checkout.alerts.cpBlocked"),type:"info",errorCode:t.code};case a.LI.MARKET_PLACEORDER_WITHOUT_ADYEN:return{text:(0,i.t)("checkout.alerts.marketPlaceOrderWithoutAdyen"),type:"info",errorCode:t.code};case a.LI.CANARY_LIMITATION:return{text:(0,i.t)("checkout.alerts.canaryLimitation"),type:"info",errorCode:t.code};case a.LI.DROPSHIPPING_ADDRESS_LIMITATION:return{text:t.articleName?(0,i.t)("checkout.alerts.dropShippingAddressSendingLimitation").replace(":article","".concat(t.articleName,"")):(0,i.t)("checkout.alerts.dropShippingAddressSendingLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case a.LI.PREMIUM_TARIFF_ADDRESS_LIMITATION:return{text:(0,i.t)("checkout.alerts.premiumTariffAddressLimitation"),type:"info",errorCode:t.code};case a.LI.SHIPPING_COUNTRY_LIMITATION:return{text:(0,i.t)("checkout.alerts.shippingCountryLimitation"),type:"info",errorCode:t.code};case a.LI.DIGITAL_CODES_AMOUNT_LIMITATION:return{text:(0,i.t)("checkout.alerts.digitalCodesAmountLimitation"),type:"info",errorCode:t.code};case a.LI.DIGITAL_CODES_ZONES_LIMITATION:return{text:(0,i.t)("checkout.alerts.digitalCodesZonesLimitation"),type:"info",errorCode:t.code};case a.LI.CART_WITHOUT_ADDRESS:return{text:(0,i.t)("checkout.alerts.cartWithoutAddress"),type:"info",errorCode:t.code};case a.LI.CHANGE_BILLING_MODIFIER:return{text:(0,i.t)("checkout.alerts.changeBillingInModifier"),type:"info",errorCode:t.code,blockNextStep:!0};case a.LI.CART_WITHOUT_AGENCIES:return{text:(0,i.t)("checkout.alerts.cartWithoutAgencies"),type:"info",errorCode:t.code,blockNextStep:!0};case a.LI.CART_WITHOUT_PAYMENTMETHODS:return{text:(0,i.t)("checkout.alerts.cartWithoutPaymentMethods"),type:"info",errorCode:t.code};case a.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE:return{text:(0,i.t)("checkout.alerts.noZonesAvailableInMktPlace"),type:"info",errorCode:t.code,blockNextStep:!0};case a.LI.CART_FORCE_BILLING:return{text:(0,i.t)("checkout.alerts.cartForceBilling"),type:"info",errorCode:t.code};case a.LI.MAX_COD_DELIVERY_MODIFIER:return{text:(0,i.t)("checkout.alerts.maxCodDeliveryModifier"),type:"info",errorCode:t.code};case a.LI.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER:return{text:"",type:"info",errorCode:t.code};case a.LI.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE:return{text:(0,i.t)("checkout.alerts.pickingPointOrInShopPayPerUse"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case a.LI.PORTUGAL_ARTICLES_VALIDATION:return{text:t.articleName?(0,i.t)("checkout.alerts.portugalArticlesLimitation").replace(":article","".concat(t.articleName,"")):(0,i.t)("checkout.alerts.portugalArticlesLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case a.LI.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION:return{text:(0,i.t)("checkout.alerts.shippingIsIncompatibleWithBillingValidation"),type:"danger",errorCode:t.code,blockNextStep:!0,hasIcon:!0};default:return{text:(0,i.t)("checkout.alerts.genericError"),type:"info",errorCode:t.code}}},F=function(e){var t,n,r,a,o,c,d,s=(null===(t=e.detail)||void 0===t||null===(n=t.info)||void 0===n?void 0:n.limits)&&(null===(r=e.detail)||void 0===r||null===(a=r.info)||void 0===a||null===(o=a.limits)||void 0===o?void 0:o.length)?null===(c=e.detail)||void 0===c||null===(d=c.info)||void 0===d?void 0:d.limits[0].name:void 0;return s?"".concat((0,i.t)("checkout.alerts.stockLimitReachedWithArticle")," ").concat(s,". ").concat((0,i.t)("checkout.alerts.yourCartHasBeenUpdated")):(0,i.t)("checkout.alerts.stockLimitReached")},K=(h=s((function(e,t){var n;return T(this,(function(r){switch(r.label){case 0:return I(e,L)||I(e,g)?((n=sessionStorage.getItem("koUrl"))&&n.includes("/cart/ko")?t((0,c.A7)(n)):window.location.href="/usuarios/panel/mis-pedidos-y-facturas",[3,4]):[3,1];case 1:return I(e,S)||I(e,P)?[4,(0,o.QV)()]:[3,3];case 2:return r.sent(),t(c.wt.failure(e)),[3,4];case 3:I(e,C)?t(c.wt.failure(e)):I(e,D)?t((0,c.bI)((0,i.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.wt.failure(e)),r.label=4;case 4:return[2]}}))})),function(e,t){return h.apply(this,arguments)}),W=function(){var e=s((function(e,t){return T(this,(function(n){switch(n.label){case 0:return I(e,L)||I(e,g)?(window.location.href="/usuarios/panel/mis-pedidos-y-facturas",[3,4]):[3,1];case 1:return I(e,S)||I(e,P)?[4,(0,o.QV)()]:[3,3];case 2:return n.sent(),t(c.kX.failure(e)),[3,4];case 3:I(e,C)?t(c.kX.failure(e)):I(e,D)?t((0,c.bI)((0,i.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.kX.failure(e)),n.label=4;case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),X=function(){var e=s((function(e,t,n,a,i){var d;return T(this,(function(s){switch(s.label){case 0:return I(e,S)||I(e,P)?[4,(0,o.QV)()]:[3,2];case 1:return s.sent(),t(c.Uq.failure(e)),[3,3];case 2:I(e,O)?t((0,c.sT)({idCart:n,query:(0,r.A8)(a,"idPayment"),setNewDeliveryAgency:!1,newDefaultPaymentMethod:!0,relatableOffers:i})):I(e,N)?t((0,c.sT)({idCart:n,query:(0,r.A8)(a,"idAgency"),setNewDeliveryAgency:!0,relatableOffers:i})):I(e,C)||I(e,U)?t(c.Uq.failure(e)):I(e,L)||I(e,g)?(d=sessionStorage.getItem("koUrl"))&&d.includes("/cart/ko")?t((0,c.A7)(d)):t(c.Uq.failure(e)):(I(e,b),t(c.Uq.failure(e))),s.label=3;case 3:return[2]}}))}));return function(t,n,r,a,i){return e.apply(this,arguments)}}()},72065:(e,t,n)=>{n.d(t,{$Vj:()=>r.$V,A3x:()=>a.A3,A40:()=>a.A4,A7T:()=>r.A7,Ahb:()=>a.Ah,ArB:()=>a.Ar,Bko:()=>a.Bk,BoC:()=>a.Bo,BrQ:()=>i.Br,CYj:()=>a.CY,Chx:()=>a.Ch,Coy:()=>a.Co,DQ9:()=>r.DQ,DXA:()=>a.DX,DqV:()=>a.Dq,Dsx:()=>i.Ds,E6b:()=>a.E6,EFr:()=>a.EF,EVb:()=>a.EV,Efm:()=>a.Ef,Eof:()=>r.Eo,Eth:()=>r.Et,FMh:()=>a.FM,FYt:()=>a.FY,H6W:()=>r.H6,H7R:()=>i.H7,H97:()=>r.H9,HPM:()=>r.HP,HUT:()=>a.HU,Hm2:()=>r.Hm,HqV:()=>a.Hq,Itk:()=>a.It,JP3:()=>r.JP,Jaj:()=>a.J,Jcs:()=>r.Jc,K1L:()=>r.K1,L1p:()=>a.L1,LIY:()=>i.LI,LOu:()=>a.LO,LSj:()=>a.LS,MVr:()=>a.MV,MZK:()=>a.MZ,Nle:()=>i.Nl,NpQ:()=>r.Np,O0T:()=>i.O0,Of5:()=>r.Of,Oim:()=>r.Oi,Oo5:()=>a.Oo,P7h:()=>r.P7,PYf:()=>a.PY,Pf5:()=>a.Pf,Q02:()=>a.Q0,QEG:()=>a.QE,QEN:()=>a.oy,QVz:()=>r.QV,QfI:()=>a.Qf,QkQ:()=>a.Qk,Qrj:()=>a.Qr,QvV:()=>a.Qv,RK0:()=>r.RK,RUH:()=>r.RU,R_R:()=>a.R_,RnJ:()=>r.Rn,S2R:()=>a.S2,SGx:()=>i.SG,Syk:()=>a.Sy,Tny:()=>a.Tn,U8n:()=>a.U8,UD5:()=>a.UD,UGj:()=>i.UG,V7P:()=>i.V7,VZ5:()=>a.VZ,WFr:()=>i.WF,Wiq:()=>a.Wi,WuQ:()=>a.Wu,WvY:()=>a.Wv,Wwl:()=>r.Ww,X6K:()=>a.X6,XL7:()=>i.XL,XTI:()=>r.XT,XVd:()=>r.XV,XZx:()=>a.XZ,Xb9:()=>r.Xb,Xcl:()=>i.Xc,XpC:()=>a.Xp,Xzp:()=>r.Xz,Zlu:()=>i.Zl,ZpS:()=>r.Zp,_Iv:()=>a._I,_Vd:()=>i._V,_pP:()=>a._p,_vP:()=>a._v,aDD:()=>a.aD,bIw:()=>r.bI,bPC:()=>r.bP,bTv:()=>r.bT,cJO:()=>a.cJ,cRT:()=>r.cR,ckw:()=>i.ck,cm7:()=>a.cm,dBV:()=>a.dB,dMi:()=>a.dM,dtU:()=>a.dt,duF:()=>r.du,eVC:()=>a.eV,eYc:()=>a.eY,fW2:()=>a.fW,gHe:()=>a.gH,gMe:()=>i.gM,h8e:()=>i.h8,hbI:()=>i.hb,i6p:()=>a.i6,iBt:()=>a.iB,iG$:()=>r.iG,i_L:()=>r.i_,iyK:()=>i.iy,izz:()=>i.iz,jb7:()=>a.jb,k8Z:()=>r.k8,kEf:()=>a.kE,kWl:()=>i.kW,kaJ:()=>a.k,kun:()=>a.ku,lV0:()=>a.lV,lzc:()=>r.lz,mfd:()=>r.mf,mwV:()=>i.mw,nT7:()=>a.nT,ncy:()=>r.nc,nut:()=>r.nu,oLt:()=>r.oL,pPk:()=>r.pP,pYJ:()=>r.pY,peT:()=>i.pe,pt3:()=>a.pt,px3:()=>r.px,qDK:()=>a.qD,qbP:()=>r.qb,qp7:()=>a.qp,rTZ:()=>a.rT,rc9:()=>a.rc,rdZ:()=>r.rd,rwq:()=>a.rw,s4q:()=>r.s4,sC4:()=>a.sC,sKd:()=>i.sK,sNc:()=>a.sN,sRH:()=>r.sR,sTi:()=>r.sT,sxb:()=>i.sx,tIm:()=>a.tI,t_p:()=>r.t_,tdJ:()=>r.td,uKi:()=>a.uK,uen:()=>a.ue,vCA:()=>a.vC,vZM:()=>a.vZ,vaw:()=>a.v,vo1:()=>i.vo,vqT:()=>r.vq,w1$:()=>a.w1,wC2:()=>r.wC,wDp:()=>r.wD,wGL:()=>a.wG,wI4:()=>r.wI,wPS:()=>r.wP,wrp:()=>i.wr,xlD:()=>a.xl,yJU:()=>r.yJ,yTB:()=>a.yT,zwv:()=>a.zw});var r=n(50519),a=(n(73859),n(80899)),i=n(26911)},73859:(e,t,n)=>{n.d(t,{J:()=>v});var r=n(63814),a=n(26911),i=n(33945),o=n(28489),c=n(23031),d=n(50519),s=n(3678),l=n(40093);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0,n={text:"",type:"info"},u=!1,p=function(e){var t;if((null===(t=e.filter((function(e){return e.code!==a.LI.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD})))||void 0===t?void 0:t.length)>0)return(0,o.C0)(e)},v=function(t){var n,r,o,c,d=void 0;(null===(n=t.financing)||void 0===n?void 0:n.financingMethods)&&(null===(r=t.financing)||void 0===r?void 0:r.financingMethods.length)>0&&(d=null===(c=t.financing.financingMethods.find((function(t){return t.idPayment===e.order.paymentMethodSelected})))||void 0===c?void 0:c.idPayment);var s,l=void 0;(null===(o=t.others)||void 0===o?void 0:o.othersMethods)&&t.others.othersMethods.length>0&&(l=null===(s=t.others.othersMethods.filter((function(t){if("payinshop"!==t.slug||t.idPayment!==a.XL.PAY_IN_SHOP||e.order.shippingMethod===a.sx.SHOP||(0,i.CZ)())return t})).find((function(t){return t.idPayment===e.order.paymentMethodSelected})))||void 0===s?void 0:s.idPayment);return{financingMethodSelected:d,otherPaymentMethodSelected:l}},m=function(e){var t="",n="warning";if(f(e,o._y)){var r,a=null===(r=e.detail.info)||void 0===r?void 0:r.bookings;a&&(a.length>1&&(t=(0,c.t)("checkout.errors.outOfStockWithArticles",{articleNames:a.join(", ")})),1===a.length&&(t=(0,c.t)("checkout.errors.outOfStockWithArticle",{articleName:a[0].name})))}return f(e,o.Yg)&&(t=(0,c.t)("checkout.errors.userNotFound")),f(e,o.Ck)&&(t=(0,o.PI)(e)),f(e,o.pY)&&(t=(0,c.t)("checkout.errors.genericError"),n="danger"),{alertTextReturned:t,typeReturned:n}},E=function(t){var n=e.alert;return(0,i.vA)(t)?n=I(A({},e.alert),{global:(0,i.Of)(a.nE.PCC_ARTICLE_SPLIT)}):e.alert.global.alertSlug===a.pe.PCC_ARTICLE_SPLIT&&(n=I(A({},e.alert),{global:{text:"",type:"info"}})),n};switch(t.type){case r.s0:return I(A({},e),{stepper:I(A({},e.stepper),{currentStep:t.payload})});case r.kI:return I(A({},e),{redirectToBasket:t.payload});case r.K3:return I(A({},e),{allowFromBasketToStepTwo:t.payload});case r.ze:return I(A({},e),{cart:I(A({},e.cart),{isLoading:!0})});case r.Rz:return I(A({},e),{allowFromBasketToStepTwo:!0});case r.rT:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var h=m(t.payload),T=h.alertTextReturned,S=h.typeReturned;n={text:T,type:S}}return I(A({},_),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:u,stepper:{currentStep:1},alert:I(A({},e.alert),{global:n})});case r.Gm:return I(A({},_),{stepper:{currentStep:a.h8.CART},datalayerCartItems:e.datalayerCartItems,alert:E(t.payload.articles),redirectToBasket:e.redirectToBasket,stepTwoCriticalError:!t.payload.articles.length,cart:t.payload});case r.n1:return I(A({},e),{stepTwoCriticalError:t.payload});case r.W:return I(A({},e),{isLoading:!0});case r.es:var P,N,O,L,g,C=t.payload.paymentMethods.others.selected===a.XL.GRATIS,D=(0,i.UJ)(t.payload);(null===(P=e.order)||void 0===P?void 0:P.adyen)&&(D.adyen=e.order.adyen);var R=t.payload.paymentMethods,M=v(R),b=M.financingMethodSelected,w=M.otherPaymentMethodSelected,U=t.payload.addresses.shippingAddresses.find((function(e){return e.isDefault})),Y=null===(N=t.payload.criticalErrors)||void 0===N?void 0:N.find((function(e){return e.code===a.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),k=!!U&&(0,i.pS)(U.addressData.province)&&!!Y;return t.payload.cart.relatableOffers=e.cart.relatableOffers,I(A({},e,t.payload),{hasShippingErrorInCanarias:k,alert:I(A({},e.alert),{deliveryAlerts:t.payload.deliveryAlerts,paymentAlerts:t.payload.paymentAlerts,addressForm:{text:"",type:"info"}}),paymentTab:t.payload.defaultPaymentMethod===a.XL.PAY_PER_USAGE?a.iy.FINANCING:t.payload.paymentMethods.multibanco?a.iy.MULTIBANCO:e.paymentTab,paymentMethods:I(A({},R),{financing:I(A({},R.financing),{selected:null!==b&&void 0!==b?b:null===(O=R.financing)||void 0===O?void 0:O.selected}),others:I(A({},R.others),{selected:null!==w&&void 0!==w?w:null===(L=R.others)||void 0===L?void 0:L.selected})}),order:A(I(A({},e.order),{paymentMethodSelected:C?a.XL.GRATIS:D.paymentMethodSelected}),D),isLoading:!1,deliveries:(0,d.RU)(null===(g=e.user)||void 0===g?void 0:g.email)?e.deliveries:t.payload.deliveries});case r.gJ:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var x=m(t.payload),B=x.alertTextReturned,V=x.typeReturned;n={text:B,type:V}}return I(A({},e),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:u,alert:I(A({},e.alert),{global:n})});case r.qA:return I(A({},e),{cart:I(A({},e.cart),{isLoading:!0})});case r.rE:var G,H,F,K,W,X,j,Z,$,q,z,J,Q,ee,te,ne,re,ae,ie,oe,ce,de,se=t.payload,le=se.cart,ue=se.paymentMethods,pe=se.deliveries,fe=se.billingAddresses,Ae=se.setNewDeliveryAgency,Ie=se.criticalErrors,ye=se.coupons,_e=se.payPerUseInstallments,ve=se.newDefaultPaymentMethod,me=ue.others.selected===a.XL.GRATIS,Ee=null!==(oe=ue.paymentCard.methods)&&void 0!==oe?oe:[],he=null!==(ce=ue.others.othersMethods)&&void 0!==ce?ce:[],Te=null!==(de=ue.financing.financingMethods)&&void 0!==de?de:[],Se=null===(G=y(Ee).concat(y(he),y(Te)).find((function(t){return(null===t||void 0===t?void 0:t.idPayment)===e.order.paymentMethodSelected})))||void 0===G?void 0:G.idPayment,Pe=Ie?p(Ie):void 0,Ne=fe.find((function(t){return t.addressData.id===e.order.billingAddressSelected})),Oe=Ne?e.order.billingAddressSelected:fe.length>0?null===(H=fe.find((function(e){return e.isChecked})))||void 0===H?void 0:H.addressData.id:void 0,Le=null===(F=e.addresses.billingAddresses.find((function(e){return e.addressData.id===Oe})))||void 0===F?void 0:F.addressData.country,ge=null===(K=e.addresses.shippingAddresses.find((function(t){return t.addressData.id===e.order.shippingAddressSelected})))||void 0===K?void 0:K.addressData.province,Ce=null===Ie||void 0===Ie?void 0:Ie.find((function(e){return e.code===a.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),De=(0,i.pS)(ge)&&!!Ce,Re=le.articles.find((function(e){return e.id===l.fy})),Me=(!e.order.solidaryAmountChecked||"España"===Le||!Re)&&e.order.solidaryAmountChecked,be=v(ue),we=be.financingMethodSelected,Ue=be.otherPaymentMethodSelected,Ye=(0,d.RU)(null===(W=e.user)||void 0===W?void 0:W.email)?[]:pe.filter((function(e){return"marketplace"===e.type&&e.agencies.length>0})).map((function(e){return{id:String(e.idShop),orderKey:Number(e.orderKey),offers:e.offers,value:e.defaultAgency}})),ke=null===pe||void 0===pe?void 0:pe.find((function(e){return"pccomponentes"===e.type})),xe=!1,Be=!1;if((null===(X=ue.paymentCard)||void 0===X?void 0:X.methods)&&ue.paymentCard.methods.length>0){var Ve=!0,Ge=!1,He=void 0;try{for(var Fe,Ke=ue.paymentCard.methods[Symbol.iterator]();!(Ve=(Fe=Ke.next()).done);Ve=!0){var We=Fe.value;We.idPayment===a.XL.ADYEN&&(xe=!0),We.idPayment===a.XL.REDSYS&&(Be=!0)}}catch(e){Ge=!0,He=e}finally{try{Ve||null==Ke.return||Ke.return()}finally{if(Ge)throw He}}}var Xe=xe?a.XL.ADYEN:Be?a.XL.REDSYS:void 0,je=e.paymentTab;return!ve||Xe!==a.XL.ADYEN&&Xe!==a.XL.REDSYS||(je=a.iy.CARD),Se&&Se===s.XL.APLAZAME&&(je=a.iy.FINANCING),le.relatableOffers=e.cart.relatableOffers,I(A({},e),{cart:I(A({},le),{isLoading:!1}),hasShippingErrorInCanarias:De,coupons:ye,addresses:I(A({},e.addresses),{billingAddresses:fe}),stepTwoCriticalError:!De&&!!(null===Pe||void 0===Pe?void 0:Pe.blockNextStep),alert:I(A({},e.alert),{global:n,criticalErrors:{text:Pe&&!De?Pe.text:"",type:null===Pe||void 0===Pe?void 0:Pe.type,hasIcon:null===Pe||void 0===Pe?void 0:Pe.hasIcon}}),paymentTab:ue.multibanco||je!==a.iy.MULTIBANCO?je:a.iy.CARD,paymentMethods:I(A({},ue),{paymentCard:I(A({},ue.paymentCard),{newCard:e.paymentMethods.paymentCard.newCard}),financing:I(A({},ue.financing),{selected:null!==we&&void 0!==we?we:null===(j=ue.financing)||void 0===j?void 0:j.selected}),others:I(A({},ue.others),{selected:null!==Ue&&void 0!==Ue?Ue:null===(Z=ue.others)||void 0===Z?void 0:Z.selected})}),order:I(A({},e.order),{solidaryAmountChecked:Me,marketplaceAgencies:JSON.stringify(Ye)===JSON.stringify(e.order.marketplaceAgencies)?e.order.marketplaceAgencies:Ye,billingAddressSelected:Oe,deliveryAgency:Ae?null===ke||void 0===ke?void 0:ke.defaultAgency:e.order.deliveryAgency,adyen:(null===($=e.order.adyen)||void 0===$?void 0:$.adyenData)?e.order.adyen:{adyenIdUserCard:(null===(q=e.order.adyen)||void 0===q?void 0:q.adyenIdUserCard)||((null===(z=ue.paymentCard)||void 0===z||null===(J=z.storedPaymentCards)||void 0===J||null===(Q=J.cards)||void 0===Q?void 0:Q.length)&&ue.paymentCard.storedPaymentCards.cards.length>0?ue.paymentCard.storedPaymentCards.cards[0].clientId:void 0),adyenDataCard:(null===(ee=e.order.adyen)||void 0===ee?void 0:ee.adyenDataCard)||((null===(te=ue.paymentCard)||void 0===te||null===(ne=te.storedPaymentCards)||void 0===ne||null===(re=ne.cards)||void 0===re?void 0:re.length)&&ue.paymentCard.storedPaymentCards.cards.length>0?ue.paymentCard.storedPaymentCards.cards[0].recurringDetailReference:void 0)},paymentMethodSelected:(0,d.RU)(null===(ae=e.user)||void 0===ae?void 0:ae.email)?null!==Se&&void 0!==Se?Se:Xe:me?a.XL.GRATIS:je===a.iy.MULTIBANCO?e.order.paymentMethodSelected===a.XL.MULTIBANCO&&ue.multibanco?a.XL.MULTIBANCO:a.XL.ADYEN:je===a.iy.FINANCING?null!==we&&void 0!==we?we:ue.financing.selected:je===a.iy.OTHER_OPTIONS?null!==Ue&&void 0!==Ue?Ue:ue.others.selected:Se||Xe||a.XL.ADYEN}),deliveries:(0,d.RU)(null===(ie=e.user)||void 0===ie?void 0:ie.email)?e.deliveries:pe,payPerUseInstallments:null!==_e&&void 0!==_e?_e:[]});case r.Vi:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var Ze=m(t.payload),$e=Ze.alertTextReturned,qe=Ze.typeReturned;n={text:$e,type:qe}}return I(A({},e),{cart:I(A({},e.cart),{isLoading:!1}),redirectToBasket:u,stepTwoCriticalError:e.stepTwoCriticalError,alert:I(A({},e.alert),{global:n})});case r.Q1:return I(A({},e),{cart:I(A({},e.cart),{showModalRecoverOrderOptions:t.payload})});case r.F7:return A({},e);case r.wi:return I(A({},e,t.payload),{footer:t.payload});case r.Fg:return A({},e);case r.O3:return I(A({},e),{order:I(A({},e.order),{conditionsAccepted:t.payload})});case r.BE:return I(A({},e),{order:I(A({},e.order),{deliveryAgency:t.payload})});case r.Yb:return I(A({},e),{order:I(A({},e.order),{deliveryDate:t.payload})});case r.ZB:return I(A({},e),{order:I(A({},e.order),{deliveryTime:t.payload})});case r.ne:return I(A({},e),{order:I(A({},e.order),{deliveryDateTimeStr:t.payload})});case r.bZ:return I(A({},e),{order:I(A({},e.order),{isSameDay:t.payload})});case r.gM:return I(A({},e),{order:I(A({},e.order),{isNeutralOrder:t.payload})});case r.zr:return I(A({},e),{order:I(A({},e.order),{isSubmittingAdress:t.payload})});case r.f8:return I(A({},e),{order:I(A({},e.order),{isValidatingAddress:t.payload})});case r.LB:return I(A({},e),{order:I(A({},e.order),{isCheckingValidAddress:t.payload})});case r.Pe:return I(A({},e),{order:I(A({},e.order),{productsWithGiftPaper:y(e.order.productsWithGiftPaper).concat([t.payload])})});case r.iX:return I(A({},e),{order:I(A({},e.order),{productsWithGiftPaper:y(e.order.productsWithGiftPaper.filter((function(e){return e!==t.payload})))})});case r.Bs:return I(A({},e),{order:I(A({},e.order),{agencyObservations:t.payload})});case r.b0:return I(A({},e),{order:I(A({},e.order),{marketplaceAgencies:t.payload.marketplaceAgencies,deliveryAgency:t.payload.agencySelected})});case r.dp:var ze=e.order.marketplaceAgencies.findIndex((function(e){return e.id===t.payload.id&&e.orderKey===t.payload.orderKey}));if(ze>=0&&e.order.marketplaceAgencies[ze].value===t.payload.value)return A({},e);var Je=y(e.order.marketplaceAgencies);return-1===ze?Je.push(t.payload):Je[ze]=t.payload,I(A({},e),{order:I(A({},e.order),{marketplaceAgencies:Je})});case r.RB:var Qe=e.addresses.shippingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),et=e.addresses.shippingAddresses.map((function(e,t){return I(A({},e),{isChecked:t===Qe})}));return I(A({},e),{addresses:I(A({},e.addresses),{shippingAddresses:et}),order:I(A({},e.order),{shippingAddressSelected:t.payload})});case r.T6:var tt=e.addresses.billingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),nt=e.addresses.billingAddresses.map((function(e,t){return I(A({},e),{isChecked:t===tt})}));return I(A({},e),{addresses:I(A({},e.addresses),{billingAddresses:nt}),order:I(A({},e.order),{billingAddressSelected:t.payload})});case r.Qy:return I(A({},e),{order:I(A({},e.order),{pickingPointSelected:t.payload})});case r.sg:return I(A({},e),{pickingPointSearchValues:A({},e.pickingPointSearchValues,t.payload)});case r.tI:return I(A({},e),{order:I(A({},e.order),{shopSelected:t.payload})});case r.SQ:return I(A({},e),{order:I(A({},e.order),{shippingMethod:t.payload||a.sx.SHIPPING_ADDRESS})});case r.E$:return I(A({},e),{order:I(A({},e.order),{whoPicksUp:I(A({},e.order.whoPicksUp),{data:t.payload?A({},e.order.whoPicksUp.data,t.payload):e.order.whoPicksUp.data?A({},e.order.whoPicksUp.data):void 0})})});case r.rh:return I(A({},e),{order:I(A({},e.order),{whoPicksUp:I(A({},e.order.whoPicksUp),{isValid:t.payload})})});case r.WL:return I(A({},e),{paymentTab:t.payload});case r.Wu:case r.O9:return I(A({},e),{order:I(A({},e.order),{paymentMethodSelected:t.payload})});case r.Vf:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{financing:I(A({},e.paymentMethods.financing),{selected:t.payload})}),order:I(A({},e.order),{paymentMethodSelected:t.payload})});case r.md:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{others:I(A({},e.paymentMethods.others),{selected:t.payload})}),order:I(A({},e.order),{paymentMethodSelected:t.payload})});case r.oP:return I(A({},e),{isLoading:t.payload});case r.Bf:return I(A({},e),{isLoadingAddressForm:t.payload});case r.uY:return I(A({},e),{isAddressFormValid:t.payload});case r.kc:return I(A({},e),{order:I(A({},e.order),{adyen:{adyenData:t.payload.data}}),paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{newCard:I(A({},t.payload.cardData),{data:t.payload.data})})})});case r.Wf:var rt;return I(A({},e),{order:I(A({},e.order),{adyen:{adyenData:null===(rt=e.paymentMethods.paymentCard.newCard)||void 0===rt?void 0:rt.data}})});case r.Zd:var at,it;return I(A({},e),{order:I(A({},e.order),{adyen:{adyenIdUserCard:null===(at=t.payload)||void 0===at?void 0:at.adyenIdUserCard,adyenDataCard:null===(it=t.payload)||void 0===it?void 0:it.adyenDataCard}})});case r.gc:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:t.payload})})});case r.$p:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:void 0})})});case r.fj:var ot,ct=null===(ot=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===ot?void 0:ot.cards.filter((function(e){return e.recurringDetailReference!==t.payload}));return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:ct&&ct.length>0?I(A({},e.paymentMethods.paymentCard.storedPaymentCards),{cards:ct}):void 0})}),order:I(A({},e.order),{adyen:ct&&ct.length>0?{adyenIdUserCard:ct[0].clientId,adyenDataCard:ct[0].recurringDetailReference}:e.paymentMethods.paymentCard.newCard?{adyenData:e.paymentMethods.paymentCard.newCard.data}:void 0})});case r.w_:var dt,st=null===(dt=e.paymentMethods.paymentCard.expiredCards)||void 0===dt?void 0:dt.cards.filter((function(e){return e.recurringDetailReference!==t.payload}));return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{expiredCards:st&&st.length>0?I(A({},e.paymentMethods.paymentCard.expiredCards),{cards:st}):void 0})})});case r.b9:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{newCard:void 0})}),order:I(A({},e.order),{adyen:void 0})});case r.f_:var lt,ut;return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{clientWithNoCards:t.payload})}),order:I(A({},e.order),{adyen:(null===(lt=e.paymentMethods.paymentCard)||void 0===lt||null===(ut=lt.newCard)||void 0===ut?void 0:ut.data)?{adyenData:e.paymentMethods.paymentCard.newCard.data}:void 0})});case r.hL:return I(A({},e),{order:I(A({},e.order),{selectedCoupon:t.payload})});case r.Nm:return I(A({},e),{datalayerCartItems:t.payload});case r.JB:return I(A({},e),{alert:I(A({},e.alert),{global:t.payload})});case r.XC:return I(A({},e),{alert:I(A({},e.alert),{criticalErrors:t.payload})});case r.qX:return I(A({},e),{order:I(A({},e.order),{giftCardCode:t.payload})});case r.nQ:return I(A({},e),{alert:I(A({},e.alert),{addressForm:t.payload})});case r.f4:return I(A({},e),{incompleteAddressType:t.payload});case r.vR:return I(A({},e),{order:I(A({},e.order),{solidaryAmountChecked:t.payload})});case r.yU:return I(A({},e),{order:I(A({},e.order),{financingTerms:t.payload})});case r.Gt:return I(A({},e),{order:I(A({},e.order),{billingAddressSelected:t.payload.billingAddressId}),stepper:{currentStep:t.payload.step}});case r.DM:return I(A({},e),{deliveries:t.payload});default:return e}}},80899:(e,t,n)=>{n.d(t,{A3:()=>q,A4:()=>C,Ah:()=>ze,Ar:()=>Te,Bk:()=>v,Bo:()=>R,CY:()=>ce,Ch:()=>le,Co:()=>W,DX:()=>_,Dq:()=>Ne,E6:()=>at,EF:()=>ie,EV:()=>w,Ef:()=>ee,FM:()=>ne,FY:()=>Q,HU:()=>V,Hq:()=>oe,It:()=>H,J:()=>D,L1:()=>K,LO:()=>te,LS:()=>U,MV:()=>be,MZ:()=>B,Oo:()=>Z,PY:()=>ve,Pf:()=>Y,Q0:()=>N,QE:()=>b,Qf:()=>it,Qk:()=>ae,Qr:()=>y,Qv:()=>x,R_:()=>Be,S2:()=>A,Sy:()=>He,Tn:()=>M,U8:()=>_e,UD:()=>j,VZ:()=>Ye,Wi:()=>Ze,Wu:()=>ye,Wv:()=>Le,X6:()=>E,XZ:()=>Re,Xp:()=>z,_I:()=>Ee,_p:()=>$,_v:()=>nt,aD:()=>Je,cJ:()=>$e,cm:()=>se,dB:()=>O,dM:()=>G,dt:()=>me,eV:()=>T,eY:()=>ot,fW:()=>h,gH:()=>k,i6:()=>I,iB:()=>xe,jb:()=>Pe,k:()=>X,kE:()=>Ae,ku:()=>Ve,lV:()=>m,nT:()=>F,oy:()=>De,pt:()=>ue,qD:()=>g,qp:()=>J,rT:()=>ke,rc:()=>tt,rw:()=>we,sC:()=>Ue,sN:()=>ge,tI:()=>rt,uK:()=>fe,ue:()=>pe,v:()=>Ke,vC:()=>de,vZ:()=>he,w1:()=>re,wG:()=>L,xl:()=>Ie,yT:()=>Me,zw:()=>Fe});var r=n(22222),a=n(38483),i=n(26911),o=n(23031),c=n(37148),d=n(33945),s=n(3678),l=n(50519),u=function(e){return e.checkout},p=function(e){return e.user},f=(0,r.P1)(u,(function(e){return e.order})),A=(0,r.P1)(u,(function(e){return e.cart.showModalRecoverOrderOptions})),I=(0,r.P1)(u,(function(e){return e.isLoading})),y=(0,r.P1)(u,(function(e){return e.isLoadingAddressForm})),_=(0,r.P1)(u,(function(e){return e.isAddressFormValid})),v=(0,r.P1)(u,(function(e){return e.cart.articles})),m=(0,r.P1)(u,(function(e){return e.cart.relatableOffers})),E=(0,r.P1)(u,(function(e){return e.cart.awardedFinancing})),h=(0,r.P1)(u,(function(e){return e.deliveries})),T=(0,r.P1)(u,(function(e){return e.cart.articles})),S=(0,r.P1)(h,(function(e){return e.filter((function(e){return e.type===a.l.Dropshipping})).length})),P=(0,r.P1)(u,(function(e){return e.cart.dropShippingShippingCost})),N=(0,r.P1)(u,(function(e){return e.cart.articles.find((function(e){return"mañana"!==e.deliveryStr}))})),O=(0,r.P1)(u,(function(e){return!e.cart.articles.find((function(e){return e.type!==i.V7.DIGITAL}))})),L=(0,r.P1)(u,(function(e){return e.cart.refundShipping})),g=(0,r.P1)(u,(function(e){return e.redirectToBasket})),C=(0,r.P1)(u,(function(e){return e.allowFromBasketToStepTwo})),D=(0,r.P1)(u,(function(e){return e.cart.lastEditDate})),R=(0,r.P1)(P,S,(function(e,t){return(0,d.bO)(+(null!==e&&void 0!==e?e:"0")/+t)})),M=(0,r.P1)(u,(function(e){return e.addresses})),b=(0,r.P1)(u,(function(e){return e.countries})),w=(0,r.P1)(u,(function(e){return e.stepper.currentStep})),U=(0,r.P1)(u,(function(e){return e.coupons})),Y=(0,r.P1)(u,(function(e){return e.order.selectedCoupon})),k=(0,r.P1)(u,(function(e){return e.order.solidaryAmountChecked})),x=(0,r.P1)(u,(function(e){return e.order.financingTerms})),B=(0,r.P1)(u,(function(e){return e.cart.talonOneNotifications})),V=(0,r.P1)(u,(function(e){return{balance:e.cart.balance,balanceToSpend:e.cart.balanceToSpend,birthdayDiscount:e.cart.birthdayDiscount,price:e.cart.price,shippingCost:e.cart.shippingCost,marketPlaceShippingCost:e.cart.marketplaceShippingCost,dropShippingShippingCost:e.cart.dropShippingShippingCost,neutralPaperCost:e.cart.neutralPaperCost,giftPaperCost:e.cart.neutralPaperCost,talonPromotions:e.cart.talonPromotions,totalPaid:e.cart.totalPaid,totalDiscountInCart:e.cart.totalDiscountInCart,totalGiftCardDiscountInCart:e.cart.totalGiftCardDiscountInCart,total:e.cart.total,installation:e.cart.installation}})),G=(0,r.P1)(u,(function(e){return e.cart.canShowShippingPoints})),H=(0,r.P1)(u,(function(e){return e.footer.legalLinks})),F=(0,r.P1)(u,(function(e){return e.datalayerCartItems})),K=(0,r.P1)(u,(function(e){return e.order.shippingAddressSelected})),W=(0,r.P1)(M,K,(function(e,t){var n,r;return null===(r=null===(n=e.shippingAddresses)||void 0===n?void 0:n.find((function(e){return e.addressData.id===t})))||void 0===r?void 0:r.addressData})),X=(0,r.P1)(u,(function(e){return e.order.billingAddressSelected})),j=(0,r.P1)(M,X,(function(e,t){var n,r;return null===(r=null===(n=e.billingAddresses)||void 0===n?void 0:n.find((function(e){return e.addressData.id===t})))||void 0===r?void 0:r.addressData})),Z=(0,r.P1)(u,(function(e){return e.order.pickingPointSelected})),$=(0,r.P1)(u,(function(e){return e.pickingPointSearchValues})),q=(0,r.P1)(u,(function(e){return e.availableShops})),z=(0,r.P1)(u,(function(e){return e.order.whoPicksUp.data})),J=(0,r.P1)(u,(function(e){return e.order.isSubmittingAdress})),Q=(0,r.P1)(u,(function(e){return e.order.isValidatingAddress})),ee=(0,r.P1)(u,(function(e){return e.order.isCheckingValidAddress})),te=(0,r.P1)(u,(function(e){return e.order.shopSelected})),ne=(0,r.P1)(u,(function(e){return e.order.shippingMethod})),re=(0,r.P1)(u,(function(e){return e.paymentTab})),ae=(0,r.P1)(u,(function(e){return e.order.paymentMethodSelected})),ie=(0,r.P1)(u,(function(e){return e.paymentMethods.paymentCard.storedPaymentCards})),oe=(0,r.P1)(u,(function(e){return e.paymentMethods.paymentCard.expiredCards})),ce=(0,r.P1)(u,(function(e){var t,n=e.order,r=e.paymentMethods;return(null===(t=n.adyen)||void 0===t?void 0:t.adyenData)||!r.paymentCard.storedPaymentCards?i.iz.NEW:i.iz.STORED})),de=(0,r.P1)(u,(function(e){var t;return null===(t=e.order.adyen)||void 0===t?void 0:t.adyenData})),se=(0,r.P1)(u,(function(e){return e.paymentMethods.paymentCard.clientWithNoCards})),le=(0,r.P1)(u,(function(e){return e.paymentMethods.paymentCard.newCard})),ue=(0,r.P1)(u,(function(e){return e.paymentMethods.financing.financingMethods})),pe=(0,r.P1)(u,(function(e){var t;return null===(t=e.paymentMethods.financing)||void 0===t?void 0:t.selected})),fe=((0,r.P1)(u,(function(e){var t;return"Portugal"===(null===(t=e.addresses.billingAddresses.find((function(t){return t.addressData.id===e.order.billingAddressSelected})))||void 0===t?void 0:t.addressData.country)})),(0,r.P1)(u,(function(e){return e.paymentMethods.multibanco}))),Ae=(0,r.P1)(u,(function(e){return e.alert.global})),Ie=(0,r.P1)(u,(function(e){return e.alert.criticalErrors})),ye=(0,r.P1)(u,(function(e){return e.alert.addressForm})),_e=(0,r.P1)(u,(function(e){return e.alert.deliveryAlerts})),ve=(0,r.P1)(u,(function(e){return e.alert.paymentAlerts})),me=(0,r.P1)(u,(function(e){var t,n=e.paymentMethods,r=e.order;return(null===(t=n.others)||void 0===t?void 0:t.othersMethods)?(0,d.CZ)()||r.shippingMethod===i.sx.SHOP?n.others.othersMethods:n.others.othersMethods.filter((function(e){return"payinshop"!==e.slug})):[]})),Ee=(0,r.P1)(u,(function(e){return e.paymentMethods.othersNotAllowed.othersMethodsNotAllowed})),he=(0,r.P1)(u,(function(e){return e.paymentMethods.financingNotAllowed.financingMethodsNotAllowed})),Te=(0,r.P1)(u,(function(e){var t;return null===(t=e.paymentMethods.others)||void 0===t?void 0:t.selected})),Se=(0,r.P1)(u,(function(e){return e.stepTwoCriticalError})),Pe=(0,r.P1)(u,(function(e){return e.payPerUseInstallments})),Ne=(0,r.P1)(u,(function(e){var t,n=e.payPerUseInstallments,r=e.cart;if(0===n.length)return"";var a=null===(t=r.articles.find((function(e){return+e.id===n[0].articleId})))||void 0===t?void 0:t.name;return a||""})),Oe=(0,r.P1)(M,X,K,Se,(function(e,t,n,r){return!!n&&(!!t||0===e.billingAddresses.length)&&!r})),Le=(0,r.P1)(M,X,b,(function(e,t,n){return(0,d.Qu)(e,t,n)})),ge=(0,r.P1)(M,K,b,(function(e,t,n){return(0,d.e$)(e,t,n)})),Ce=(0,r.P1)(Oe,Le,ge,(function(e,t,n){return e&&t&&n})),De=(0,r.P1)(u,(function(e){return e.incompleteAddressType})),Re=(0,r.P1)(u,(function(e){return e.order.deliveryAgency})),Me=(0,r.P1)(u,(function(e){return e.order.deliveryDate})),be=(0,r.P1)(u,(function(e){return e.order.deliveryTime})),we=(0,r.P1)(u,(function(e){return e.order.deliveryDateTimeStr})),Ue=(0,r.P1)(u,(function(e){return e.order.isSameDay})),Ye=(0,r.P1)(u,(function(e){return e.order.agencyObservations})),ke=(0,r.P1)(u,(function(e){return e.order.isNeutralOrder})),xe=(0,r.P1)(u,(function(e){return e.order.productsWithGiftPaper})),Be=(0,r.P1)(u,(function(e){return e.order.marketplaceAgencies})),Ve=(0,r.P1)(u,(function(e){return!!e.cart.articles.find((function(e){return e.vendor}))})),Ge=(0,r.P1)(u,(function(e){return!!e.cart.articles.find((function(e){return i.EM.includes(e.id)}))})),He=(0,r.P1)(Ve,Ge,(function(e,t){return e&&t})),Fe=(0,r.P1)(u,p,(function(e){var t,n,r=e.paymentMethods,a=e.user;return(0,l.RU)(null===a||void 0===a?void 0:a.email)?null===(n=r.paymentCard.methods)||void 0===n?void 0:n.find((function(e){return e.idPayment===s.XL.REDSYS_CARD})):null===(t=r.paymentCard.methods)||void 0===t?void 0:t.find((function(e){return e.idPayment===i.XL.REDSYS}))})),Ke=(0,r.P1)(u,p,(function(e){var t,n,r=e.paymentMethods,a=e.user;return(0,l.RU)(null===a||void 0===a?void 0:a.email)?null===(n=r.paymentCard.methods)||void 0===n?void 0:n.find((function(e){return e.idPayment===s.XL.ADYEN_CARD})):null===(t=r.paymentCard.methods)||void 0===t?void 0:t.find((function(e){return e.idPayment===i.XL.ADYEN}))})),We=(0,r.P1)(f,(function(e){return!!e.pickingPointSelected&&e.whoPicksUp.isValid})),Xe=(0,r.P1)(f,(function(e){return!!e.shopSelected&&e.whoPicksUp.isValid})),je=(0,r.P1)(f,(function(e){return e.paymentMethodSelected===i.XL.REDSYS||!!e.adyen&&(!!e.adyen.adyenData||e.adyen.adyenDataCard&&e.adyen.adyenIdUserCard)})),Ze=(0,r.P1)(f,(function(e){var t;return null===(t=e.adyen)||void 0===t?void 0:t.adyenDataCard})),$e=(0,r.P1)(u,(function(e){return e.cart.isLoading})),qe=(0,r.P1)(f,(function(e){return e.conditionsAccepted})),ze=(0,r.P1)(u,(function(e){return e.hasShippingErrorInCanarias})),Je=(0,r.P1)(w,ne,re,ae,Oe,We,Xe,je,$e,qe,Se,_,(function(e,t,n,r,a,o,c,d,s,l,u,p){if(s)return!1;switch(e){case i.h8.CART:return!u;case i.h8.ADDRESSES:switch(t){case i.sx.SHIPPING_ADDRESS:return a||p;case i.sx.PICKUP_POINT:return o&&!u;case i.sx.SHOP:return c&&!u;default:return!1}case i.h8.PAYMENT:switch(n){case i.iy.CARD:return!!d;case i.iy.FINANCING:return!!r;case i.iy.MULTIBANCO:return r===i.XL.MULTIBANCO;case i.iy.OTHER_OPTIONS:return!!r;default:return!1}case i.h8.SUMMARY:return l&&!u;default:return!0}})),Qe=(0,r.P1)(ae,je,(function(e,t){return e===i.XL.ADYEN?!!t:!!e})),et=(0,r.P1)(Ce,We,Xe,(function(e,t,n){return e||t||n})),tt=(0,r.P1)(et,Qe,(function(e,t){var n=i.h8.ADDRESSES;return e&&(n=i.h8.PAYMENT,t&&(n=i.h8.SUMMARY)),n})),nt=(0,r.P1)(ae,ce,je,Ze,le,ie,ue,me,fe,x,(function(e,t,n,r,a,c,d,l,u,p){switch(e){case i.XL.REDSYS:return{info:(0,o.t)("checkout.payments.cardTitle")};case i.XL.ADYEN:case s.XL.ADYEN_CARD:var f="/prod/v1/img/iconos/32x32-VisaBlue.svg",A="Card logo visa",I="/prod/v1/img/iconos/32-mastercard.svg",y="Card logo mastercard";if(t===i.iz.STORED){var _,v=null===c||void 0===c||null===(_=c.cards)||void 0===_?void 0:_.find((function(e){return e.recurringDetailReference===r}));return{imgUrl:(null===v||void 0===v?void 0:v.brand)===i.H7.MASTER_CARD?I:f,altText:(null===v||void 0===v?void 0:v.brand)===i.H7.MASTER_CARD?y:A,name:null===v||void 0===v?void 0:v.name,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===v||void 0===v?void 0:v.lastFourDigits}}return{imgUrl:(null===a||void 0===a?void 0:a.cardBrand)===i.H7.MASTER_CARD?I:f,altText:(null===a||void 0===a?void 0:a.cardBrand)===i.H7.MASTER_CARD?y:A,name:null===a||void 0===a?void 0:a.cardName,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===a||void 0===a?void 0:a.endDigits};case i.XL.APLAZAME:case s.XL.APLAZAME:var m;return{imgUrl:"/Unilae/svg/32-aplazame.svg",altText:null===(m=null===d||void 0===d?void 0:d.find((function(e){return e.idPayment===i.XL.APLAZAME})))||void 0===m?void 0:m.name,info:"Con Aplázame a 6, 12, 20, 30 y 40 meses."};case i.XL.CETELEM:var E;return{imgUrl:"/Unilae/svg/cetelem_32x32.svg",altText:"cetelem logo",info:null===(E=null===d||void 0===d?void 0:d.find((function(e){return e.idPayment===i.XL.CETELEM})))||void 0===E?void 0:E.name};case i.XL.ONEY:var h,T;return{imgUrl:"/Unilae/svg/oneyLogo.svg",altText:"oney logo",info:"".concat(null!==(T=null===(h=d.find((function(e){return e.idPayment===i.XL.ONEY})))||void 0===h?void 0:h.name)&&void 0!==T?T:""," en ").concat(p?parseInt(p):""," plazos")};case i.XL.PAY_PER_USAGE:return{info:(0,o.t)("checkout.summary.rentingWithWiserentr")};case i.XL.BANK_TRANSFER:var S;return{info:null===(S=l.find((function(e){return e.idPayment===i.XL.BANK_TRANSFER})))||void 0===S?void 0:S.name};case i.XL.PAY_IN_SHOP:var P;return{info:null===(P=l.find((function(e){return e.idPayment===i.XL.PAY_IN_SHOP})))||void 0===P?void 0:P.name};case i.XL.GOOGLE_PAY:var N;return{imgUrl:"/Unilae/svg/google_pay_32x32.svg",altText:"google pay logo",info:null===(N=l.find((function(e){return e.idPayment===i.XL.GOOGLE_PAY})))||void 0===N?void 0:N.name};case i.XL.BIZUM:var O;return{imgUrl:"/Unilae/svg/bizum_32x32.svg",altText:"bizum logo",info:null===(O=l.find((function(e){return e.idPayment===i.XL.BIZUM})))||void 0===O?void 0:O.name};case i.XL.MULTIBANCO:return{imgUrl:"/Unilae/svg/230_multibanco.svg",altText:"multibanco logo",info:null===u||void 0===u?void 0:u.name};case i.XL.GRATIS:var L;return{info:null===(L=l.find((function(e){return e.idPayment===i.XL.GRATIS})))||void 0===L?void 0:L.name};case i.XL.INESPAY:var g;return{info:null===(g=l.find((function(e){return e.idPayment===i.XL.INESPAY})))||void 0===g?void 0:g.name};default:return{info:""}}})),rt=(0,r.P1)(u,(function(e){return e.order.giftCardCode})),at=(0,r.P1)(u,(function(e){var t=e.cart,n=e.order;return!t.isLoading&&!!n.giftCardCode&&t.total>0})),it=(0,r.P1)(c.$W,(function(e){return e===c.t4.PCCOMPONENTES})),ot=(0,r.P1)(ae,(function(e){return e===i.XL.CETELEM||e===i.XL.APLAZAME||e===i.XL.PAY_PER_USAGE}))},74782:(e,t,n)=>{n.d(t,{AH:()=>Z,EI:()=>H,F9:()=>B,FU:()=>G,IU:()=>k,IX:()=>P,J:()=>_,J9:()=>F,MM:()=>$,NJ:()=>b,OL:()=>R,P6:()=>M,Pz:()=>ne,Vl:()=>S,WS:()=>g,Xq:()=>m,Yu:()=>h,ZY:()=>N,_Z:()=>E,__:()=>x,dp:()=>Y,ej:()=>W,fu:()=>ee,jf:()=>T,kh:()=>K,lX:()=>te,lr:()=>V,m_:()=>j,od:()=>L,pY:()=>X,pc:()=>O,qI:()=>C,rU:()=>U,s3:()=>q,sl:()=>w,uz:()=>D,vD:()=>y,vs:()=>z,x9:()=>v,xF:()=>Q,zH:()=>J});var r=n(8442),a=n(28489),i=n(33945),o=n(17738),c=n(26911),d=n(3618),s=n(22318);function l(e,t,n,r,a,i,o){try{var c=e[i](o),d=c.value}catch(e){return void n(e)}c.done?t(d):Promise.resolve(d).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){l(i,r,a,o,c,"next",e)}function c(e){l(i,r,a,o,c,"throw",e)}o(void 0)}))}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){for(var t=1;t0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]5&&void 0!==arguments[5]?arguments[5]:null;return r.V0.fetch("/api-v1/user/address/validate",r.w$.POST,{address:e,cp:t,city:n,province:a,country:i,id:o})},L=function(e){return r.V0.fetch("/api-v1/user-panel/user/get?idUser=".concat(e),r.w$.GET)},g=function(e){return r.V0.fetch("/api-v1/user/address/shipping/".concat(e),r.w$.DELETE)},C=function(e){return r.V0.fetch("/api-v1/user/address/billing/".concat(e),r.w$.DELETE)},D=function(e,t){return r.V0.fetch("/api-v1/user/address/create-shipping",r.w$.POST,f({email:e},(0,o._s)(t)))},R=function(e,t){return r.V0.fetch("/api-v1/user/address/create-billing",r.w$.POST,f({email:e},t))},M=function(e,t){return r.V0.fetch("/api-v1/user/address/shipping",r.w$.PUT,f({addressId:e},(0,o.kW)(t)))},b=function(e,t){return r.V0.fetch("/api-v1/user/address/billing",r.w$.PUT,f({addressId:e},(0,o.YP)(t)))},w=function(){var e=u((function(e){return I(this,(function(t){return[2,r.V0.fetch("/api-v1/checkout/countries/".concat(e,"/provinces"),r.w$.GET)]}))}));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=u((function(e,t,n){return I(this,(function(a){return e&&t&&n?[2,r.V0.fetch("/api-v1/checkout/cart/shipping-points",r.w$.GET,{country:e,cp:t,idArticle:n})]:[2,r.V0.fetch("/api-v1/checkout/cart/shipping-points",r.w$.GET)]}))}));return function(t,n,r){return e.apply(this,arguments)}}(),Y=function(e){return r.V0.fetch("/api-v1/user-panel/orders/payment/error/".concat(e),r.w$.GET)},k=function(){var e=u((function(e){var t;return I(this,(function(n){switch(n.label){case 0:return[4,r.V0.fetch("/api-v1/user-panel/user/orders/".concat(e,"/minimal"),r.w$.GET)];case 1:if((t=n.sent()).ok)return[2,t.data];throw(0,a.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}(),x=function(e,t,n){var r=""===t?location.origin:t,a=e.paymentMethod,o=e.paymentSlug,l=e.pccOrder,u=e.hash,p=e.fromRetry,f=e.financingTerms,A=(0,d.e)("shopLocalSale"),I=(0,d.e)("cookieMostrador"),y=new FormData;(0,i.CZ)()?("1"===A&&y.append("shopLocalSale","1"),"1"===I&&y.append("shopCounter","1"),y.append("shopId",(0,d.e)("shopVersion"))):y.append("shopId","null"),y.append("payment","".concat(a)),y.append("paymentId","".concat(a)),y.append("paymentSlug","".concat(o)),y.append("successUrl","".concat(r,"/cart/order/finished/ok")),y.append("failUrl","".concat(r,"/cart/ko")),y.append("reference",l),p&&(window.document.cookie="pay_now_hash=".concat(u,"; max-age=300; path=/")),a===c.XL.ONEY&&f&&y.append("financingTerms",(0,i.vm)(f)),(0,s.IB)(y,l,t,n)},B=function(e){var t=e.shopVersion,n=e.shopCounter,r=e.idBilling,a=e.neutralOrder,o=e.shippingMethod,s=e.idShipping,l=e.selectedPickingPoint,u=e.whoPicksUp,p=e.selectedShop,f=e.marketplaceAgencies,A=e.selectedAgencyId,I=e.paymentMethod,y=e.newCardData,_=e.selectedCard,v=e.selectedCoupon,m=e.giftCardCode,E=e.selectedDeliveryDate,h=e.selectedDeliveryTime,T=e.isSameDay,S=e.observations,P=e.shopLocalSale,N=e.solidaryAmountChecked,O=e.financingTerms,L=new FormData;switch(t&&L.append("shopId",(0,d.e)("shopVersion")),n&&L.append("shopCounter","1"),L.append("idBilling",r||"0"),L.append("neutralOrder",a.toString()),o){case c.sx.SHIPPING_ADDRESS:s&&L.append("idShipping",s);break;case c.sx.PICKUP_POINT:l&&u&&(L.append("shippingPointId",l),L.append("shippingPointName",u.name),L.append("shippingPointSurname",u.lastName),L.append("shippingPointNif",u.nif),L.append("shippingPointPhone",u.phoneNumber));break;case c.sx.SHOP:p&&u&&(L.append("idShipping",t&&p===c.gM.SALA?"".concat(-t):"".concat(-p)),L.append("pickerName",u.name),L.append("pickerSurname",u.lastName),L.append("pickerNif",u.nif),L.append("pickerPhone",u.phoneNumber))}(f.length>0&&f.forEach((function(e){e.offers.forEach((function(t){L.append("mpAgencies[".concat(e.id,"][").concat(e.orderKey,"][").concat(t,"]"),e.value)}))})),A&&o===c.sx.SHIPPING_ADDRESS&&!isNaN(+A)&&L.append("agency",A),Object.entries((0,d.S)()).forEach((function(e){return L.append("browserInfo[".concat(e[0],"]"),e[1].toString())})),L.append("payment","".concat(I)),I===c.XL.ONEY&&O&&L.append("financingTerms",(0,i.vm)(O)),y)&&(Object.entries(y.browserInfo).forEach((function(e){L.append("adyenData[browserInfo][".concat(e[0],"]"),"".concat(e[1]))})),Object.entries(y.clientStateDataIndicator).forEach((function(e){L.append("adyenData[clientStateDataIndicator][".concat(e[0],"]"),"".concat(e[1]))})),L.append("adyenData[storePaymentMethod]","".concat(y.storePaymentMethod)),Object.entries(y.paymentMethod).forEach((function(e){L.append("adyenData[paymentMethod][".concat(e[0],"]"),"".concat(e[1]))})),y.riskData&&Object.entries(y.riskData).forEach((function(e){L.append("adyenData[riskData][".concat(e[0],"]"),"".concat(e[1]))})));return _&&(L.append("adyenDataCard",_.recurringDetailReference),L.append("adyenIdUserCard",_.clientId),L.append("cardType",_.brand)),v&&L.append("couponSelected",v),m&&L.append("giftCardCode",m),E&&L.append("customerSelectedDeliveryDate",E),h&&L.append("customerSelectedDeliveryTime",h),T?L.append("isSameDay","1"):L.append("isSameDay","0"),S&&L.append("shippingComment",S),L.append("setDefaultShipping","0"),L.append("withoutDeliveryNote","0"),P&&L.append("shopLocalSale","1"),N&&L.append("solidaryAmount","1"),L},V=function(e){return r.V0.fetch("/api-v1/paynow/".concat(e),r.w$.GET)},G=function(e,t){try{return r.V0.fetch("/api-v1/checkout/order/finish/".concat(t),r.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,a.xK)(e)}))}catch(e){throw(0,a.xK)(e)}},H=function(e,t){try{return r.V0.fetch("/api-v1/paynow/payunpaid/".concat(t),r.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,a.xK)(e)}))}catch(e){throw(0,a.xK)(e)}},F=function(e,t){return r.V0.fetch("/api-v1/user-panel/adm/web/alerts/".concat(e,"?domain=").concat(t),r.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,a.xK)(e)}))},K=function(){var e=u((function(e){return I(this,(function(t){try{return[2,r.V0.fetch("/api-v1/user-panel/orders/payment/adyen/data?orderId=".concat(e),r.w$.POST,{}).then((function(e){var t;if(e.ok)return null===(t=e.data)||void 0===t?void 0:t.data;throw new a.pY({error:0,message:JSON.stringify(e.err)})}))]}catch(e){throw(0,a.xK)(e)}return[2]}))}));return function(t){return e.apply(this,arguments)}}(),W=function(e){try{return r.V0.fetch("/api-v1/user-panel/orders/payment/link/create/".concat(e),r.w$.POST,{}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,a.xK)(e)}))}catch(e){throw(0,a.xK)(e)}},X=function(e){return r.V0.fetch("/api-v1/order-articles/".concat(e),r.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,a.xK)(e)}))},j=function(e){return r.V0.fetch("/api-v1/adyen/adyenAuthorization",r.w$.POST,e)},Z=function(){return r.V0.fetch("/api-v1/user-panel/basket/",r.w$.GET).then((function(e){if(e.ok)return e.data;throw(0,a.xK)(e)}))},$=function(e,t,n){return r.V0.fetch("/api-v1/basket/?name=".concat(e,"&type=").concat(t,"&visibility=").concat(n),r.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,a.xK)(e)}))},q=function(e,t,n){return r.V0.fetch("/api-v1/basket/add-to-wishlist?basketKey=".concat(e,"&cartId=").concat(t,"&sendEmail=").concat(n.toString()),r.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,a.xK)(e)}))},z=function(e){return r.V0.fetch("/api-v1/basket/empty-basket?cartId=".concat(e),r.w$.DELETE).then((function(e){if(e.ok)return e.data;throw(0,a.xK)(e)}))},J=function(){return r.V0.fetch("/api-v1/oney/business-info-data",r.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,a.xK)(e)}))},Q=function(e,t){return r.V0.fetch("/api-v1/oney/variants-info-data/".concat(e),r.w$.POST,{variantCodes:t}).then((function(e){if(e.ok)return e;throw(0,a.xK)(e)}))},ee=function(e,t){return r.V0.fetch("/api-v1/checkout/order/transaction/aplazame/init/".concat(e),r.w$.POST,t).then((function(e){if(e.ok&&e.data)return e.data;throw(0,a.xK)(e)}))},te=function(){return r.V0.fetch("/api-v1/checkout/cart/session/reset",r.w$.GET)},ne=function(){var e=u((function(e){var t;return I(this,(function(n){switch(n.label){case 0:return[4,r.V0.fetch("/api-v1/show/marketing/orders",r.w$.POST,e)];case 1:if((t=n.sent()).ok)return[2,t.data];throw(0,a.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}()},26911:(e,t,n)=>{n.d(t,{Br:()=>O,Ds:()=>s,EM:()=>B,H7:()=>y,Jj:()=>Z,LI:()=>N,Nl:()=>L,O0:()=>i,Ow:()=>C,PO:()=>X,SG:()=>$,Sh:()=>D,UG:()=>u,V7:()=>Y,WF:()=>M,XL:()=>p,Xc:()=>k,Zl:()=>x,_V:()=>E,ck:()=>a,dt:()=>f,gM:()=>m,h8:()=>c,hb:()=>A,iy:()=>l,iz:()=>I,k0:()=>j,kW:()=>w,mw:()=>q,nE:()=>U,pL:()=>v,pe:()=>r,qU:()=>g,sK:()=>R,sx:()=>d,vo:()=>F,wr:()=>o,zc:()=>_});var r,a,i,o,c,d,s,l,u,p,f,A,I,y,_,v,m,E,h,T,S=n(91085);function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.MISSING_ADDRESS_FIELDS="missing-address-fields",e.ORDER_HAS_SPECIAL_ASSEMBLY_WITH_MARKETPLACE="order-has-special-assembly-with-marketplace",e.OUT_OF_STOCK="out-of-stock",e.EMPTY_CART="empty-cart",e.USER_NOT_FOUND="user-not-found",e.PCC_ARTICLE_SPLIT="pcc_article_split"}(r||(r={})),function(e){e.INDIVIDUAL="individual",e.FREELANCE="freelance",e.COMPANY="company"}(a||(a={})),function(e){e.PCC="pcc",e.MARKETPLACE="marketplace"}(i||(i={})),function(e){e[e.WITHOUT_MOVEMENT=0]="WITHOUT_MOVEMENT",e[e.IN_STOCK=1]="IN_STOCK",e[e.INMINENT_REPLENISHMENT=2]="INMINENT_REPLENISHMENT",e[e.HIGH_AVAILABILITY=3]="HIGH_AVAILABILITY",e[e.OUT_OF_STOCK=4]="OUT_OF_STOCK",e[e.PRESALE=5]="PRESALE",e[e.CONSULT=6]="CONSULT",e[e.DISCONTINUED=7]="DISCONTINUED",e[e.ZONE_NOT_AVAILABLE=9876]="ZONE_NOT_AVAILABLE",e[e.FORCE_DISCONTINUED=9999]="FORCE_DISCONTINUED"}(o||(o={})),function(e){e[e.CART=1]="CART",e[e.ADDRESSES=2]="ADDRESSES",e[e.DELIVERY=3]="DELIVERY",e[e.PAYMENT=4]="PAYMENT",e[e.SUMMARY=5]="SUMMARY"}(c||(c={})),function(e){e[e.SHIPPING_ADDRESS=1]="SHIPPING_ADDRESS",e[e.PICKUP_POINT=2]="PICKUP_POINT",e[e.SHOP=3]="SHOP"}(d||(d={})),function(e){e.PICKUP_POINT="?shipping=picking",e.SHOP="?shipping=shop"}(s||(s={})),function(e){e.CARD="card",e.FINANCING="financing",e.OTHER_OPTIONS="other-options",e.MULTIBANCO="multibanco"}(l||(l={})),function(e){e.TWO_HOURS="A2h"}(u||(u={})),function(e){e[e.ADYEN=23]="ADYEN",e[e.REDSYS=3]="REDSYS",e[e.APLAZAME=25]="APLAZAME",e[e.CETELEM=20]="CETELEM",e[e.PAY_PER_USAGE=40]="PAY_PER_USAGE",e[e.PAY_IN_SHOP=1]="PAY_IN_SHOP",e[e.BANK_TRANSFER=5]="BANK_TRANSFER",e[e.CASH_ON_DELIVERY=1]="CASH_ON_DELIVERY",e[e.GOOGLE_PAY=24]="GOOGLE_PAY",e[e.BIZUM=36]="BIZUM",e[e.INESPAY=37]="INESPAY",e[e.GRATIS=69]="GRATIS",e[e.MULTIBANCO=26]="MULTIBANCO",e[e.ONEY=27]="ONEY",e[e.RENTALL=41]="RENTALL"}(p||(p={})),function(e){e.BIZUM="bizum",e.CETELEM="financiacion12",e.APLAZAME="aplazame",e.BANK_TRANSFER="transferencia",e.INESPAY="inespay",e.MULTIBANCO="multibanco",e.ADYEN="adyen",e.PAY_PER_USAGE="payPerUsage",e.PAY_IN_SHOP="payinshop",e.REDSYS="tarjeta",e.ONEY="oney",e.GRATIS="free",e.RENTALL="rentall"}(f||(f={})),function(e){e.CETELEM="Cetelem",e.APLAZAME="Aplazame",e.PAY_IN_SHOP="Pagar en tienda",e.BANK_TRANSFER="Transferencia ordinaria",e.CASH_ON_DELIVERY="Contrarrembolso",e.GOOGLE_PAY="Google pay",e.BIZUM="Bizum",e.MULTIBANCO="Multibanco",e.INESPAY="Transferencia inmediata",e.GRATIS="Gratis",e.PAY_PER_USAGE="Renting",e.CREDIT_CARD="Tarjeta de crédito o débito",e.UNKNOWN="Desconocido"}(A||(A={})),function(e){e.STORED="STORED",e.NEW="NEW"}(I||(I={})),function(e){e.MASTER_CARD="mc",e.VISA="visa",e.GENERIC="card"}(y||(y={})),function(e){e[e.TALON=235577]="TALON"}(_||(_={})),function(e){e[e.TALON=235577]="TALON",e[e.CANON=133414]="CANON",e[e.SHIPPING_REFUND=20006]="SHIPPING_REFUND",e[e.BIRTHDAY_GIFT=20008]="BIRTHDAY_GIFT",e[e.PREMIUM=157154]="PREMIUM"}(v||(v={})),function(e){e.MADRID="30",e.MURCIA="1",e.BARCELONA="71",e.SALA="sala"}(m||(m={})),function(e){e[e.PAYMENT_TYPE_IS_DISABLED=32e3]="PAYMENT_TYPE_IS_DISABLED",e[e.PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT=32007]="PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY=32008]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES=32001]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES=32002]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING=32003]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING=32004]="PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN=32005]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL=32006]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE=32009]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY=32010]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY",e[e.PAYMENT_TYPE_REACHED_PRICE_LIMIT=32011]="PAYMENT_TYPE_REACHED_PRICE_LIMIT",e[e.PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE=32012]="PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR=32013]="PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT=32014]="PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT=32015]="PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES=32016]="PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS=32017]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2=32018]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES=32019]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES=32020]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES=32021]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS=32022]="PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP=32023]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE=32024]="PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES=32025]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES=32026]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT=32027]="PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS=32028]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS",e[e.PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART=32030]="PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY=32031]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC=32032]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC"}(E||(E={})),function(e){e.BLACK_FRIDAY_START="2021-11-14 22:00:00",e.BLACK_FRIDAY_END="2021-11-28 23:59:59"}(h||(h={})),function(e){e.CYBER_MONDAY_START="2021-11-29 00:00:00",e.CYBER_MONDAY_END="2021-11-29 23:59:59"}(T||(T={}));var N,O,L,g,C,D,R,M,b,w=["deal","reaconditioned","refurbished","recertified"];!function(e){e[e.PAYMENT_TYPE_NOT_AVAILABLE=1109]="PAYMENT_TYPE_NOT_AVAILABLE",e[e.URGENT_LIMIT_STOCK_REACHED=1139]="URGENT_LIMIT_STOCK_REACHED",e[e.AGENCY_NOT_AVAILABLE=1117]="AGENCY_NOT_AVAILABLE",e[e.OUT_OF_STOCK=1119]="OUT_OF_STOCK",e[e.EMPTY_CART=1102]="EMPTY_CART",e[e.ORDER_NOT_MARK_AS_IN_EDITION=1429]="ORDER_NOT_MARK_AS_IN_EDITION",e[e.OEM_WITHOUT_ASSEMBLY=1145]="OEM_WITHOUT_ASSEMBLY",e[e.USER_NOT_FOUND=1301]="USER_NOT_FOUND",e[e.ARTICLE_CANT_BE_ALONE_IN_ORDER=1146]="ARTICLE_CANT_BE_ALONE_IN_ORDER",e[e.MARKETPLACE_OFFER_MATCH=1147]="MARKETPLACE_OFFER_MATCH",e[e.WEIGHT_INTERNATIONAL_SHIPPING=1148]="WEIGHT_INTERNATIONAL_SHIPPING",e[e.CP_BLOCKED=1149]="CP_BLOCKED",e[e.MARKET_PLACEORDER_WITHOUT_ADYEN=1150]="MARKET_PLACEORDER_WITHOUT_ADYEN",e[e.CANARY_LIMITATION=1156]="CANARY_LIMITATION",e[e.DROPSHIPPING_ADDRESS_LIMITATION=1155]="DROPSHIPPING_ADDRESS_LIMITATION",e[e.PREMIUM_TARIFF_ADDRESS_LIMITATION=1154]="PREMIUM_TARIFF_ADDRESS_LIMITATION",e[e.SHIPPING_COUNTRY_LIMITATION=1153]="SHIPPING_COUNTRY_LIMITATION",e[e.DIGITAL_CODES_AMOUNT_LIMITATION=1152]="DIGITAL_CODES_AMOUNT_LIMITATION",e[e.DIGITAL_CODES_ZONES_LIMITATION=1151]="DIGITAL_CODES_ZONES_LIMITATION",e[e.CART_WITHOUT_ADDRESS=1157]="CART_WITHOUT_ADDRESS",e[e.CHANGE_BILLING_MODIFIER=1158]="CHANGE_BILLING_MODIFIER",e[e.CART_WITHOUT_AGENCIES=1159]="CART_WITHOUT_AGENCIES",e[e.CART_WITHOUT_PAYMENTMETHODS=1160]="CART_WITHOUT_PAYMENTMETHODS",e[e.NO_ZONES_AVAILABLE_IN_MKTPLACE=1161]="NO_ZONES_AVAILABLE_IN_MKTPLACE",e[e.CART_FORCE_BILLING=1162]="CART_FORCE_BILLING",e[e.MAX_COD_DELIVERY_MODIFIER=1163]="MAX_COD_DELIVERY_MODIFIER",e[e.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD=1168]="ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD",e[e.PAY_NOW_ORDER_NOT_FOUND=1402]="PAY_NOW_ORDER_NOT_FOUND",e[e.PAY_NOW_ORDER_IS_PAID=1421]="PAY_NOW_ORDER_IS_PAID",e[e.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER=1169]="PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER",e[e.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE=1170]="PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE",e[e.PORTUGAL_ARTICLES_VALIDATION=1171]="PORTUGAL_ARTICLES_VALIDATION",e[e.SHOP_ID_NEEDED_IN_CART=1172]="SHOP_ID_NEEDED_IN_CART",e[e.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION=1173]="SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION",e[e.NIF_ALREADY_EXISTS=1310]="NIF_ALREADY_EXISTS",e[e.GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES=1174]="GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES",e[e.INSTALLATION_PRICE_NOT_FOUND=38001]="INSTALLATION_PRICE_NOT_FOUND",e[e.INSTALLATION_SERVICE_NOT_FOUND=38002]="INSTALLATION_SERVICE_NOT_FOUND",e[e.ONEY_FINANCING_TERMS_NOT_FOUND=46001]="ONEY_FINANCING_TERMS_NOT_FOUND"}(N||(N={})),function(e){e.BBVA="bbva",e.CAJAMAR="cajamar",e.MILLENIUM="millenium"}(O||(O={})),function(e){e.BBVA="ES18 0182 3204 1702 0151 4921",e.CAJAMAR="ES03 3058 0202 0927 2001 3704",e.MILLENIUM="PT50 0033 0000 4550 3510 3390 5"}(L||(L={})),function(e){e[e.TYPE_LOAD_REDIRECT=1]="TYPE_LOAD_REDIRECT",e[e.TYPE_LOAD_FORM=2]="TYPE_LOAD_FORM",e[e.TYPE_LOAD_IFRAME=3]="TYPE_LOAD_IFRAME"}(g||(g={})),function(e){e.ES="com",e.PT="pt"}(C||(C={})),function(e){e.LAS_PALMAS="Las Palmas",e.TENERIFE="Tenerife"}(D||(D={})),function(e){e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(R||(R={})),function(e){e.HIDROGEL_SMARTPHONE="10464593",e.HIDROGEL_TABLET="10464596",e.HIDROGEL_SMARTWATCH="10464595",e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(M||(M={})),function(e){e.SO_INSTALLATION_ARTICLE_ID="31045",e.ASSEMBLY_ARTICLE_ID="31046",e.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID="135052",e.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID="135028",e.BIOS_UPDATE_ARTICLE_ID="31044",e.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID="281923",e.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID="281623",e.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID="615049",e.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID="613681"}(b||(b={}));var U,Y,k,x=[p.ONEY],B=[b.SO_INSTALLATION_ARTICLE_ID,b.ASSEMBLY_ARTICLE_ID,b.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID,b.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID,b.BIOS_UPDATE_ARTICLE_ID,b.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID,b.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID];!function(e){e[e.PCC_ARTICLE_SPLIT=r.PCC_ARTICLE_SPLIT]="PCC_ARTICLE_SPLIT"}(U||(U={})),function(e){e.DIGITAL="digital",e.COMPOUND="compound"}(Y||(Y={})),function(e){e.DIGITAL="digital"}(k||(k={}));var V,G,H,F,K,W,X=P({},p.INESPAY,"/api/paymentGateway/inespay/notification"),j=(P(V={},p.ADYEN,"/api/paymentGateway/adyen/authorise3d"),P(V,p.APLAZAME,"/cart/payment/aplazame/gw"),P(V,p.CETELEM,"/api/paymentGateway/cetelem/notification"),P(V,p.INESPAY,"/api/paymentGateway/inespay/notification"),P(V,p.ONEY,"/api/paymentGateway/oney/notification"),V),Z=(P(G={},p.CETELEM,S.Z5.ORDER_OK),P(G,p.INESPAY,"/api/paymentGateway/inespay/notification"),G),$=(P(H={},f.PAY_IN_SHOP,p.PAY_IN_SHOP),P(H,f.PAY_PER_USAGE,p.PAY_PER_USAGE),P(H,f.BIZUM,p.BIZUM),P(H,f.ADYEN,p.ADYEN),P(H,f.CETELEM,p.CETELEM),P(H,f.APLAZAME,p.APLAZAME),P(H,f.INESPAY,p.INESPAY),P(H,f.BANK_TRANSFER,p.BANK_TRANSFER),P(H,f.MULTIBANCO,p.MULTIBANCO),P(H,f.ONEY,p.ONEY),P(H,f.REDSYS,p.REDSYS),P(H,f.GRATIS,p.GRATIS),P(H,f.RENTALL,p.RENTALL),H);!function(e){e.MURCIA="Tienda Murcia",e.MADRID="Tienda Madrid",e.BARCELONA="Tienda Barcelona",e.SALA="Venta en sala"}(F||(F={})),function(e){e.MURCIA="/recogeTusPedidosRtMurcia/selectSide.php",e.MADRID="/recogeTusPedidosRtMadrid/selectSide.php"}(K||(K={}));var q=(P(W={},m.MURCIA,K.MURCIA),P(W,m.BARCELONA,K.MURCIA),P(W,m.SALA,K.MURCIA),P(W,m.MADRID,K.MADRID),W)},33945:(e,t,n)=>{n.d(t,{$r:()=>H,$z:()=>P,A8:()=>Q,Ag:()=>ae,BT:()=>G,CZ:()=>te,E7:()=>se,E9:()=>B,Hu:()=>ee,Jl:()=>$,Kx:()=>Ie,Ld:()=>h,NL:()=>w,Of:()=>fe,Oq:()=>Ae,Qu:()=>ce,SL:()=>oe,UJ:()=>W,bO:()=>J,c5:()=>V,dV:()=>j,e$:()=>de,jF:()=>ie,kq:()=>b,nu:()=>K,pS:()=>le,r3:()=>re,uY:()=>L,um:()=>O,vA:()=>pe,vR:()=>U,vm:()=>ue,zv:()=>N});var r=n(84479),a=n(38483),i=n(26911),o=n(27484),c=n.n(o),d=n(3618),s=n(46057),l=n(3678),u=n(23031),p=n(91085),f=n(40093),A=n(50519),I=n(37148);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(a=null===(r=n.find((function(e){return"payinshop"!==e.slug})))||void 0===r?void 0:r.idPayment);return{othersMethods:n,selected:a}},P=function(e){return e.map((function(e){return function(e){if(e){var t,n,r,a,i,o,c,d,s,l,u,p,f=null!==(p=null===(t=e.buybox)||void 0===t||null===(n=t.offersProductBuyBox)||void 0===n?void 0:n.map((function(e){return{id:e.shopId.toString(),name:e.shopName,offer:{id:e.idOffer.toString(),uuid:e.uuidOffer},price:e.totalPrice.toFixed(2),delivery:e.deliveryDateStr}})))&&void 0!==p?p:[],A=null===(r=e.buybox)||void 0===r||null===(a=r.offersProductBuyBox)||void 0===a?void 0:a.find((function(e){return"PcComponentes"===e.shopName}));return{id:e.idArticle.toString(),is_in_liquidation:void 0,article_reference:e.articleReference.toString(),name:e.name,base_price:e.basePrice.toFixed(2),ean:e.ean,part_number:e.trademarkRef,brand:e.trademark,category:"".concat(e.superFamily,"/").concat(e.family),main_category:e.family,main_category_clean:e.family,variant:void 0,list_name:void 0,sold_by_pcc:A?"yes":"no",quantity:"".concat(e.qty),price:e.unitPrice.toFixed(2),position:void 0,stock_web:e.availabilityCode.toString(),parent_id:null===(i=e.articleReference)||void 0===i?void 0:i.toString(),type:(null===(o=e.buybox)||void 0===o?void 0:o.isWinnerPCC)?"normal":"marketplace",marketplace:null===(c=e.buybox)||void 0===c?void 0:c.offersProductBuyBox[0].shopName,main_category_id:void 0,promotion_ids:e.promotions&&e.promotions.map((function(e){return e.idPromotion.toString()})),is_on_sale:e.promotions&&e.promotions.length>0?"yes":"no",stock_shop:[{murcia:e.storeAvailability[1]?"yes":"no"},{madrid:e.storeAvailability[30]?"yes":"no"}],financing:void 0,yard_sale:"deal"===e.type?"yes":"no",reconditioned:"reaconditioned"===e.type?"yes":"no",marketplaces:f,other_vendors:f.length>1?"yes":"no",img_url:"https://img.pccomponentes.com/".concat(e.articleImage),img_url_thumb:"https://thumb.pccomponentes.com/w-300-300/".concat(e.articleImage),rating_avg:null===(d=e.valoration)||void 0===d||null===(s=d.valoration)||void 0===s?void 0:s.avg.toFixed(1),rating_count:null===(l=e.valoration)||void 0===l||null===(u=l.valoration)||void 0===u?void 0:u.count.toFixed(),super_family:e.superFamily,super_family_id:void 0,description:function(){var t=e.detail;if(t){var n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}return""}(),original_price:e.basePrice.toFixed(2),added_date:e.date,url:"".concat(document.location.origin,"/").concat(e.slug),total_discount:"0.00",total_discount_percent:"0"}}return{}}(e)}))},N=function(e,t){var n,r,a,o,c=e.cart,d=[];c.articles&&(d=Array.isArray(c.articles)?c.articles:Object.values(c.articles));var s=d.find((function(e){return 2===e.idArticle})),l=null===(r=null===(n=e.agencies)||void 0===n?void 0:n.availableAgencies.find((function(t){return t.agencyId===e.agencySelected})))||void 0===r?void 0:r.free,p=null===(a=d.find((function(e){return 20008===e.idArticle})))||void 0===a?void 0:a.totalPrice,f=d.filter((function(e){return e.idArticle===i.zc.TALON})),A=f.reduce((function(e,t){return e+=t.totalPrice}),0),I=c.totalInstallationPrice,y=c.totalPrice+(l?c.shippingCost:0)+-A+(c.totalDiscountInCart?c.totalDiscountInCart:0)+(c.totalGiftCardDiscountInCart?c.totalGiftCardDiscountInCart:0)+(p?-p:0)+(s?-s.totalPrice:0)+(I?-I:0)+(c.surcharge||0),_=L(e,t).flatMap((function(e){return e.products})),E=_.map((function(e){return e.id}));d.filter((function(e){return!O.includes(e.idArticle)&&!E.includes(e.idArticle.toString())})).forEach((function(e){return _.push(m(v({},w(e,!0,d,t)),{availabilityCode:i.wr.ZONE_NOT_AVAILABLE,deliveryStr:(0,u.t)("checkout.shoppingBasket.zoneNotAvailable")}))}));var h,T=null===e||void 0===e?void 0:e.awardedFinancing;return{showModalRecoverOrderOptions:void 0,canShowShippingPoints:e.canShowShippingPoints,balance:c.balance||0,balanceToSpend:c.balanceToSpend||0,birthdayDiscount:p,total:c.totalToPay||0,shippingCost:c.shippingCost,dropShippingShippingCost:c.dropShippingShippingCost,marketplaceShippingCost:c.marketPlaceShippingCost,price:y||0,articles:_,refundShipping:c.shippingCost>0&&void 0!==l&&l,talonPromotions:f.map((function(e){return{amount:e.totalPrice,text:e.name,removable:""!==e.couponDiscountTextValue}})),talonOneNotifications:null!==(h=null===(o=c.talonOneNotifications)||void 0===o?void 0:o.map((function(e){return{body:e.notificationBody,title:e.notificationTitle,type:ne(e.notificationType),fromCoupon:""!==e.couponDiscountTextValue}})))&&void 0!==h?h:[],neutralPaperCost:null===s||void 0===s?void 0:s.totalPrice,installation:I,totalPaid:c.totalPayed,totalDiscountInCart:c.totalDiscountInCart,totalGiftCardDiscountInCart:c.totalGiftCardDiscountInCart,awardedFinancing:T,relatableOffers:[]}},O=[i.pL.CANON,i.pL.SHIPPING_REFUND,i.pL.BIRTHDAY_GIFT,i.pL.PREMIUM,i.pL.TALON],L=function(e,t){var n=e.ordersAndDeliveries,o=e.agencySelected,d=e.deliveryTimeCollection,s=e.cart.cartShops,l=[],p=(null===n||void 0===n?void 0:n.flatMap((function(e){return e.deliveries.map((function(t){return t.type===a.l.PcComponentes?(l=t.articles.filter((function(e){return!O.includes(e.idArticle)&&e.articleReference>0})),m(v({},t),{articles:E(t.articles.filter((function(e){return 0===e.articleReference}))),idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})):m(v({},t),{idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})}))})))||[],f=n.flatMap((function(e){return e.deliveries.flatMap((function(e){return e.articles}))})),A=p.filter((function(e){return e.articles.find((function(e){return e.type===i.V7.DIGITAL}))})).map((function(e,n){return m(v({},e),{id:"".concat(n),isDigital:!0,defaultAgency:i.Xc.DIGITAL,idShop:e.idShop,shopName:e.shopName||"PcComponentes",type:e.type,isSameDay:e.deliveryDate.isSameDay,maxDeliveryDate:e.deliveryDate.maxDeliveryDate,minDeliveryDate:e.deliveryDate.minDeliveryDate,strDeliveryDate:(0,u.t)("checkout.delivery.today"),products:e.articles.filter((function(e){return!O.includes(e.idArticle)&&e.type===i.V7.DIGITAL})).map((function(n){return w(n,e.type===a.l.Marketplace,f,t)})),agencies:[{id:i.Xc.DIGITAL,name:(0,u.t)("checkout.delivery.digitalDownload"),moreInfoText:(0,u.t)("checkout.delivery.digitalDownloadMoreInfoText"),price:void 0,free:!1,isDigital:!0,value:i.Xc.DIGITAL,isSameDay:!1}]})})),I=p.map((function(n,l){var p="",A=n.deliveryDate.strDeliveryDate,I="";switch(a.l.PcComponentes===n.type&&(e.isCollectInShop||te())&&(I=function(){var e="",t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).sort(z);if(t.length>0){var n=new Date(t[0].maxDelivery),a=n.getTime();n.setHours(0,0,0,0);var i=new Date;if(i.setHours(0,0,0,0),(0,r.IT)(n,i)){if(te())return(0,u.t)("checkout.delivery.clientInShop");var o=3e5,d=new Date(Math.ceil(a/o)*o);e=(0,u.t)("checkout.delivery.availabilityInShop",{time:c()(d).format("HH:mm")})}else e=t[0].delivery}return e}(d)),n.type){case a.l.PcComponentes:I&&(A=I),o&&(p=o.toString());break;case a.l.Dropshipping:p="dropshipping";break;case a.l.Marketplace:var y,_,E,h=Array.isArray(s)&&(null===(y=s.find((function(e){return e.idShop.toString()===(null===n||void 0===n?void 0:n.idShop)})))||void 0===y||null===(_=y.deliveries)||void 0===_?void 0:_.find((function(e){return e.key===n.orderKey}))),T=null===(E=n.agencies)||void 0===E?void 0:E.find((function(e){return e.code===(null===h||void 0===h?void 0:h.selected)}));p=null===T||void 0===T?void 0:T.code}return m(v({},n),{id:"".concat(l),defaultAgency:p,idShop:n.idShop,orderKey:n.orderKey,isDigital:!1,shopName:n.shopName||"PcComponentes",type:n.type,isSameDay:n.deliveryDate.isSameDay,maxDeliveryDate:n.deliveryDate.maxDeliveryDate,minDeliveryDate:n.deliveryDate.minDeliveryDate,strDeliveryDate:A,products:n.articles.filter((function(e){return!O.includes(e.idArticle)&&e.type!==i.V7.DIGITAL&&e.totalPrice>0})).map((function(e){return w(e,n.type===a.l.Marketplace,f,t)})),agencies:g(n.agencies,n.type)})}));return l.length>0&&l.forEach((function(e){var n=0;I.forEach((function(r){r.articles.forEach((function(a){if(0===a.articleReference&&a.idArticle===e.articleReference&&n0}))},g=function(e,t){return e.map((function(e){switch(t){case"pccomponentes":return{id:e.agencyId&&"".concat(e.agencyId),name:e.name,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price)/100,free:e.free,availableDates:e.availableDates?e.availableDates:[],timesAvailable:e.timesAvailable?e.timesAvailable:[],rangeDays:e.rangeDays,value:e.value,isSameDay:e.isSameDay};case"marketplace":return{id:e.code,name:e.label,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price.calculatedPrice)/100,free:e.free||0===e.price.calculatedPrice,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay};case"dropshipping":return{id:"dropshipping",name:"Envío especial",price:void 0,free:e.free,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay}}}))},C=function(e,t){if(t){var n=t.idLine,r=t.qty,a=t.totalPrice;return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!0,idLine:null===n||void 0===n?void 0:n.toString(),qty:r,totalPrice:a}}return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!1,qty:0,totalPrice:0}},D=function(e,t){if(t){var n=t.idLine,r=t.qty,a=t.totalPrice;return{extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,idLine:null===n||void 0===n?void 0:n.toString(),qty:r,totalPrice:a,active:!0}}return v({extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,qty:0,totalPrice:0,active:!1},e.idLine?{idLine:e.idLine}:{},e.sellerId?{sellerId:e.sellerId}:{},e.condition?{condition:e.condition}:{})},R=function(e,t,n){if(n){var r=n.idLine,a=n.qty,i=n.totalPrice;return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!0,idLine:null===r||void 0===r?void 0:r.toString(),qty:a,totalPrice:i,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}}return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!1,qty:0,totalPrice:0,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}},M=["Portátiles","Mini PCs","Ordenadores Todo en uno","Tablets","Sobremesa","Portátiles SSD","Portáteis","portateis","Computadores Desktop","Desktops","desktops","Portáteis com SSD","portateis-com-ssd"],b=function(e){return{id:e.idArticle,price:e.price.price,valorationAvg:e.valoration.avg,valorationCount:e.valoration.total,name:e.name,image:e.image,idOffer:0}},w=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3?arguments[3]:void 0,o=r.map((function(e){var t;return null===(t=e.installationService)||void 0===t?void 0:t.installationServiceId})).filter(Boolean).map(Number),c=[];r.forEach((function(e){e.extendedInsurances.forEach((function(e){(null===e||void 0===e?void 0:e.insuranceId)&&c.push(e.insuranceId)}))}));var d,s=c.filter(Boolean).map(Number),l=r.filter((function(e){return o.includes(e.idArticle)})),p=0!==(null===(n=e.mpOffer)||void 0===n?void 0:n.shopName),f=[],I=[],y=r.filter((function(t){var n,r,a,i,o,c;return 0===(null===(n=e.mpOffer)||void 0===n?void 0:n.shopName)?(null===(r=t.insuranceSelected)||void 0===r?void 0:r.idArticle)===e.idArticle&&!(null===(a=t.insuranceSelected)||void 0===a?void 0:a.idOffer):(null===(i=t.insuranceSelected)||void 0===i?void 0:i.idArticle)===e.idArticle&&(null===(o=t.insuranceSelected)||void 0===o?void 0:o.idMpOffer)===(null===(c=e.mpOffer)||void 0===c?void 0:c.idOffer)})),_=r.filter((function(t){var n,r,i,o,c,d;return!(!(0,A.RU)(a)||!t.lineReference)||(0===(null===(n=e.mpOffer)||void 0===n?void 0:n.shopName)?(null===(r=t.extraServiceSelected)||void 0===r?void 0:r.idArticle)===e.idArticle&&!(null===(i=t.extraServiceSelected)||void 0===i?void 0:i.idOffer):(null===(o=t.extraServiceSelected)||void 0===o?void 0:o.idArticle)===e.idArticle&&(null===(c=t.extraServiceSelected)||void 0===c?void 0:c.idMpOffer)===(null===(d=e.mpOffer)||void 0===d?void 0:d.idOffer))}));if(e.extraServices&&Array.isArray(e.extraServices)&&e.extraServices.length>0&&(I=e.extraServices.map((function(t){return D(t,_.find((function(n){var r;return(0,A.RU)(a)?n.lineReference===e.idLine&&t.active:n.idArticle===t.extraServiceArticleId?!n.mpOfferReference||+n.mpOfferReference===(null===(r=e.mpOffer)||void 0===r?void 0:r.idOffer):void 0})))}))),e.extendedInsurances)if(Array.isArray(e.extendedInsurances))e.extendedInsurances.length>0&&(e.extendedInsurances.sort((function(e,t){return e.insuranceName.localeCompare(t.insuranceName)})),f=e.extendedInsurances.map((function(t){return C(t,y.find((function(n){var r;if(n.idArticle===t.insuranceId)return!n.mpOfferReference||+n.mpOfferReference===(null===(r=e.mpOffer)||void 0===r?void 0:r.idOffer)})))})));else{var v=Object.values(e.extendedInsurances);v.length>0&&(f=v.map((function(t){return C(t,y.find((function(n){var r;if(n.idArticle===t.insuranceId)return!n.mpOfferReference||+n.mpOfferReference===(null===(r=e.mpOffer)||void 0===r?void 0:r.idOffer)})))})))}if(e.installationService){var m,h=p?null===l||void 0===l?void 0:l.find((function(t){var n,r;return t.articleReference===e.idArticle&&t.mpOfferReference===(null===(n=e.mpOffer)||void 0===n||null===(r=n.idOffer)||void 0===r?void 0:r.toString())})):null===l||void 0===l?void 0:l.find((function(t){return t.articleReference===e.idArticle&&!t.mpOfferReference}));d=R(e.installationService,"".concat((null===(m=e.mpOffer)||void 0===m?void 0:m.idOffer)||0),h)}return{idLine:String(e.idLine),isService:0!==e.articleReference&&E(s).concat(E(o)).includes(e.idArticle),removable:0===e.articleReference||e.articleReference===e.idArticle,imgUrl:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),image:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),articleReference:e.articleReference,availabilityCode:null===e||void 0===e?void 0:e.availabilityCode,familyName:null===e||void 0===e?void 0:e.family,id:"".concat(null===e||void 0===e?void 0:e.idArticle),name:null===e||void 0===e?void 0:e.name,price:t?null===e||void 0===e?void 0:e.totalPrice:(null===e||void 0===e?void 0:e.totalPriceWithSpanishCanon)||(null===e||void 0===e?void 0:e.totalPrice),unitPrice:null===e||void 0===e?void 0:e.unitPrice,originalPrice:null===e||void 0===e?void 0:e.originalPrice,qty:null===e||void 0===e?void 0:e.qty,slug:null===e||void 0===e?void 0:e.slug,trademark:null===e||void 0===e?void 0:e.trademark,canAddGiftPaper:null===e||void 0===e?void 0:e.canAddGiftPaper,isDigital:e.type===i.V7.DIGITAL,isExtraServiceArticle:e.isExtraServiceArticle,type:e.type,deliveryStr:e.type!==i.V7.DIGITAL?e.deliveryDate.strDeliveryDate:(0,u.t)("checkout.delivery.digitalProductDeliveryDateText"),idOffer:e.mpOffer.idOffer,services:f,extraServices:I,installation:d,isComputerFamily:M.includes(e.family),vendor:p?{shopId:e.mpOffer.shopId,shopName:"".concat(e.mpOffer.shopName),shopSlug:e.mpOffer.shopSlug}:void 0,condition:e.mpOffer?e.mpOffer.condition:void 0,vendorType:p?i.O0.MARKETPLACE:i.O0.PCC}},U=function(e){var t=e.data,n=e.checkedShippingAddressId,r=e.checkedBillingAddressId,a=t.cart,i=Y({data:a,checkedBillingAddressId:r&&+r>0&&r});return{shippingAddresses:x({data:a,checkedShippingAddressId:n&&+n>0&&n}),billingAddresses:i}},Y=function(e){var t,n=e.data,r=e.checkedBillingAddressId,a=n.billingAddress,i=!!a&&!!(null===a||void 0===a?void 0:a.find((function(e){return e.defaultUser}))),o=a&&(t=Math).max.apply(t,E(a.map((function(e){return+e.idUser}))));return a?null===a||void 0===a?void 0:a.reduce((function(e,t){return E(e).concat([{addressData:{address:t.streetNumber?"".concat(t.address,", ").concat(t.streetNumber):t.address,billingType:k(t.billingType),city:t.city,country:t.country.name,cp:t.postalCode,id:"".concat(t.idUser),name:t.name,nif:t.nif,phone:t.cellPhone,province:t.province.name,surname:t.surname},isChecked:r?+r===t.idUser:t.defaultUser||!i&&+t.idUser===o,isDefault:t.defaultUser}])}),[]).sort((function(e,t){return X(e,t)})):[]},k=function(e){switch(e){case a.y.BUSINESS:return i.ck.COMPANY;case a.y.FREELANCE:return i.ck.FREELANCE;case a.y.INDIVIDUAL:default:return i.ck.INDIVIDUAL}},x=function(e){var t=e.data,n=e.checkedShippingAddressId,r=t.shippingAddress;if(!r)return[];var a=!!r&&!!r.find((function(e){return 1===e.default}));return r.map((function(e,t){return{addressData:v({address:e.streetNumber?"".concat(e.address,", ").concat(e.streetNumber):e.address,city:e.city,countryIsoCode:e.country.iso,country:e.country.name,cp:e.postalCode,id:"".concat(e.id),name:e.name,nif:e.nif,phone:e.phone,province:e.province.name,provinceIsoCode:String(e.province.id),surname:e.surname},e.optionalInformation?{optionalInformation:e.optionalInformation}:{}),isChecked:n?+n===e.id:a?1===e.default:r.length-1===t,isDefault:1===e.default}})).sort((function(e,t){return X(e,t)}))},B=function(e){return e.countries.map((function(e){return{iso:e.iso,name:e.name}}))},V=function(e){var t,n=e.talonCoupons;return null!==(t=null===n||void 0===n?void 0:n.map((function(e){var t=e.usageLimit,n=e.usageCounter,r=e.id,a=e.idGroup,i=e.creationDate,o=e.couponId,c=e.code,d=e.idCampaign,s=e.applicationId;return{activationCounter:e.activationCounter,applicationId:s,campaignId:d,code:c,couponId:o,creationDate:i,groupId:a,id:r,usageCounter:n,usageLimit:t}})))&&void 0!==t?t:[]},G=function(e){var t;return(null===(t=e.cart.availableShops)||void 0===t?void 0:t.map((function(e){return{name:Z(e),id:e?"".concat(e):""}})))||[]},H=function(e){var t,n,r,a,o,c=F(e.adyenBankstores);(null===(t=e.payPerUseInstallments)||void 0===t?void 0:t.length)>0?(n=null!==(a=e.payments)&&void 0!==a?a:[],r=null!==(o=e.paymentsNotAllowed)&&void 0!==o?o:[]):(n=e.payments?e.payments.filter((function(e){return e.idPayment!==i.XL.PAY_PER_USAGE})):[],r=e.paymentsNotAllowed?e.paymentsNotAllowed.filter((function(e){return e.idPayment!==i.XL.PAY_PER_USAGE})):[]);return{paymentCard:{storedPaymentCards:c?m(v({},c),{cards:c.cards.filter((function(e){return!e.expired}))}):void 0,expiredCards:c?m(v({},c),{cards:c.cards.filter((function(e){return e.expired}))}):void 0,newCard:e.cart.paymentIntention&&e.cart.paymentIntention.paymentMethod===l.XL.ADYEN_CARD&&e.cart.paymentIntention.paymentData?{cardBrand:e.cart.paymentIntention.paymentData.paymentMethod.brand,cardName:e.cart.paymentIntention.paymentData.paymentMethod.holderName,endDigits:e.cart.paymentIntention.paymentData.paymentMethod.endDigits,data:e.cart.paymentIntention.paymentData}:void 0,clientWithNoCards:!c,methods:n.filter((function(e){return"tarjeta"===e.groupType}))},multibanco:n.find((function(e){return e.idPayment===i.XL.MULTIBANCO})),financing:T(n),financingNotAllowed:{financingMethodsNotAllowed:r.filter((function(e){return"financiacion"===e.groupType})),selected:void 0},others:S(n),othersNotAllowed:{othersMethodsNotAllowed:r.filter((function(e){return"financiacion"!==e.groupType})),selected:void 0}}},F=function(e){var t;if(!e)return{cards:[]};var n=e.details;return n&&n.length<1?void 0:{cards:(null===(t=e.details)||void 0===t?void 0:t.reverse().map((function(e){var t=e.address,n=e.card,r=e.clientId,a=e.creationDate,i=e.paymentMethodVariant,o=e.recurringDetailReference,d=e.variant;return{expirationDate:{month:n.expiryMonth,year:n.expiryYear},name:n.holderName,lastFourDigits:n.number,brand:d,clientId:r,creationDate:a,paymentMethodVariant:i,recurringDetailReference:o,variant:d,address:t,expired:q(c()("".concat(n.expiryYear,"-").concat(+n.expiryMonth,"-01")).endOf("month"))}})))||[]}},K=function(e){var t=function(e){switch(e){case"info":default:return"info";case"warning":return"warning"}};return e.map((function(e){return{text:e.content,type:t(e.type)}}))},W=function(e){var t,n,r,a,i,o,c,d=!!(null===(t=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===t?void 0:t.cards.length),s=null===(n=e.deliveries)||void 0===n?void 0:n.find((function(e){return"pccomponentes"===e.type})),l=null===(r=e.deliveries)||void 0===r?void 0:r.filter((function(e){return"marketplace"===e.type}));return{conditionsAccepted:!1,shippingAddressSelected:null===(a=e.addresses.shippingAddresses.find((function(e){return e.isChecked})))||void 0===a?void 0:a.addressData.id,billingAddressSelected:null===(i=e.addresses.billingAddresses.find((function(e){return e.isChecked})))||void 0===i?void 0:i.addressData.id,pickingPointSelected:void 0,isNeutralOrder:!1,shopSelected:void 0,shippingMethod:1,paymentMethodSelected:e.defaultPaymentMethod,deliveryAgency:s?s.defaultAgency:void 0,agencyObservations:"",marketplaceAgencies:l.filter((function(e){return e.agencies.length>0})).map((function(e){return{id:e.idShop,orderKey:e.orderKey,offers:e.offers,value:e.defaultAgency}})),productsWithGiftPaper:[],selectedCoupon:void 0,whoPicksUp:{data:void 0,isValid:!1},adyen:d?{adyenData:void 0,adyenIdUserCard:null===(o=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===o?void 0:o.cards[0].clientId,adyenDataCard:null===(c=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===c?void 0:c.cards[0].recurringDetailReference}:void 0,giftCardCode:void 0}},X=function(e,t){return t.isChecked||t.isDefault&&!e.isChecked?1:-1},j=function(e,t){var n;return null===(n=e.find((function(e){return e.name===t})))||void 0===n?void 0:n.iso},Z=function(e){switch(e){case 1:return i.vo.MURCIA;case 30:return i.vo.MADRID;case 71:return i.vo.BARCELONA}return"Unknow Shop"},$=function(e,t){switch(e){case i.XL.APLAZAME:case l.XL.APLAZAME:return i.hb.APLAZAME;case i.XL.CETELEM:return i.hb.CETELEM;case i.XL.PAY_PER_USAGE:return i.hb.PAY_PER_USAGE;case i.XL.PAY_IN_SHOP:case i.XL.CASH_ON_DELIVERY:return"payinshop"===t?i.hb.PAY_IN_SHOP:i.hb.CASH_ON_DELIVERY;case i.XL.BANK_TRANSFER:return i.hb.BANK_TRANSFER;case i.XL.BIZUM:return i.hb.BIZUM;case i.XL.MULTIBANCO:return i.hb.MULTIBANCO;case i.XL.INESPAY:return i.hb.INESPAY;case i.XL.ADYEN:case i.XL.REDSYS:return i.hb.CREDIT_CARD;case i.XL.GRATIS:return i.hb.GRATIS}return i.hb.UNKNOWN},q=function(e){return c()().diff(e,"day")>0},z=function(e,t){if(!e)return 1;if(!t)return-1;var n=c()(e.maxDelivery);return n.isBefore(t.maxDelivery)?1:n.isAfter(t.maxDelivery)?-1:0},J=function(e){var t=Math.round(100*(e+Number.EPSILON))/100;return t%1!==0?t.toLocaleString(void 0,{maximumFractionDigits:2,minimumFractionDigits:2}):t.toLocaleString()},Q=function(e,t){return e.split("&").filter((function(e){return!e.includes(t)})).toString().split(",").join("&")},ee=function(e,t){var n=function(e,t){if(0===e.length)return t;var r=Q(t,e[0]);return n(e.splice(1),r)};return n(t,e)},te=function(){return"1"===(0,d.e)("cookieInShop")&&((0,d.e)("shopVersion")===i.gM.MURCIA||(0,d.e)("shopVersion")===i.gM.MADRID||(0,d.e)("shopVersion")===i.gM.BARCELONA)},ne=function(e){switch(e.toLocaleLowerCase()){case"info":default:return"info";case"error":return"danger";case"offer":return"success"}},re=function(e,t){var n;"success"===(null===(n=e.data)||void 0===n?void 0:n.status)&&(document.cookie="cartId=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",location.href="".concat(t).concat(e.data.redirect))},ae=function(){return c()().diff(c()(f.GC))>0},ie=function(){return c()().diff(c()(f.YK))>0},oe=function(){return c()().diff(c()(f.Gb))>0},ce=function(e,t,n){var r;if(!e.billingAddresses.length)return!0;var a=null===(r=e.billingAddresses.find((function(e){return e.addressData.id===t})))||void 0===r?void 0:r.addressData,o=!a||(0,s.u)(j(n,a.country),a.cp);return(null===a||void 0===a?void 0:a.billingType)===i.ck.INDIVIDUAL?a&&!Object.values(a).some((function(e){return!e}))&&o||0===e.billingAddresses.length:a&&!Object.entries(a).some((function(e){return!e[1]&&"surname"!==e[0]}))&&o||0===e.billingAddresses.length},de=function(e,t,n){var r;if(!e.shippingAddresses.length)return!0;var a=null===(r=e.shippingAddresses.find((function(e){return e.addressData.id===t})))||void 0===r?void 0:r.addressData,i=!a||(0,s.u)(j(n,a.country),a.cp);return a&&!Object.values(a).some((function(e){return!e}))&&i},se=function(e){return e===I.lI.pt_PT?i.Ow.PT:i.Ow.ES},le=function(e){return e===i.Sh.LAS_PALMAS||e===i.Sh.TENERIFE},ue=function(e){return"facilypay_".concat(e.toLowerCase().split("x")[0],"x")},pe=function(e){var t=e.map((function(e){return e.id})),n=new Set(t),r=!1;if(n.size!==t.length){var a=!0,i=!1,o=void 0;try{for(var c,d=function(){var t=c.value;if(e.find((function(e){return e.vendorType&&t.vendorType&&e.id===t.id&&e.vendorType===t.vendorType&&e.price!==t.price})))return r=!0,"break"},s=e[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){if("break"===d())break}}catch(e){i=!0,o=e}finally{try{a||null==s.return||s.return()}finally{if(i)throw o}}}return r},fe=function(e,t){return _({},i.nE.PCC_ARTICLE_SPLIT,{text:t||(0,u.t)("checkout.alerts.pccArticleSplit"),type:"warning",hasIcon:!0,alertSlug:i.pe.PCC_ARTICLE_SPLIT})[e]},Ae=function(e){var t=e.shopVersion,n=e.shopCounter,r=e.idBilling,a=e.neutralOrder,o=e.shippingMethod,c=e.idShipping,s=e.selectedPickingPoint,l=e.whoPicksUp,u=e.selectedShop,f=e.marketplaceAgencies,A=e.selectedAgencyId,I=e.paymentMethod,y=e.newCardData,_=e.selectedCard,m=e.selectedCoupon,E=e.giftCardCode,h=e.selectedDeliveryDate,T=e.selectedDeliveryTime,S=e.isSameDay,P=e.observations,N=e.shopLocalSale,O=e.solidaryAmountChecked,L=e.financingTerms,g="".concat(window.location.origin).concat(i.PO[I]||p.Z5.ORDER_OK),C="".concat(window.location.origin).concat(i.k0[I]||""),D="".concat(window.location.origin).concat(i.Jj[I]||p.Z5.ORDER_KO),R=(0,d.S)(),M={},b={idBillingAddress:r,adyenUserAgent:"".concat(R.userAgent),adyenAcceptHeader:"application/json, text/javascript, */*; q=0.01",idPayment:String(I),paymentSlug:I===i.XL.ADYEN?"adyen":void 0,defaultSuccessUrl:"".concat(window.location.origin).concat(p.Z5.ORDER_OK),defaultFailUrl:"".concat(window.location.origin).concat(p.Z5.ORDER_KO),successUrl:g,failUrl:D,notificationUrl:C,shopCounter:"0"};switch(n&&(b.shopCounter="1"),a&&(M.neutralOrder=a.toString()),h&&(M.customerSelectedDeliveryDate=h),T&&(M.customerSelectedDeliveryTime=T),m&&(M.couponSelected=m),E&&(M.giftCardCode=E),M.isSameDay=S?"1":"0",P&&(M.shippingComment=P),N&&(M.shopLocalSale="1"),O&&(M.solidaryAmount="1"),M.setShippingDefault="0",M.deliveryNote="0",te()&&(b.shopId=(0,d.e)("shopVersion"),"1"===(0,d.e)("cookieMostrador")&&(b.shopCounter="1")),(null===f||void 0===f?void 0:f.length)>0&&f.forEach((function(e){e.offers.forEach((function(t){M["marketPlaceAgencies[".concat(e.id,"][").concat(e.orderKey,"][").concat(t,"]")]=e.value}))})),A&&o===i.sx.SHIPPING_ADDRESS&&!isNaN(+A)&&(b.idAgency=A),o){case i.sx.SHIPPING_ADDRESS:c&&(M.idShippingAddress=c);break;case i.sx.PICKUP_POINT:s&&l&&(M.shippingPointId=s,M.shippingPointName=l.name,M.shippingPointSurname=l.lastName,M.shippingPointNif=l.nif,M.shippingPointPhone=l.phoneNumber);break;case i.sx.SHOP:u&&l&&(M.idShippingAddress=t&&u===i.gM.SALA?"".concat(-t):"".concat(-u),M.pickerName=l.name,M.pickerSurname=l.lastName,M.pickerNif=l.nif,M.pickerPhone=l.phoneNumber)}if(_&&(b.adyenDataCard=_.recurringDetailReference,b.adyenIdUserCard=_.clientId,b.cardType=_.brand),y){Object.entries(y.browserInfo).forEach((function(e){M["adyenData[browserInfo][".concat(e[0],"]")]=e[1].toString()}));var w=Object.entries(y.clientStateDataIndicator);if(w.length>0?w.forEach((function(e){M["adyenData[clientStateDataIndicator][".concat(e[0],"]")]=e[1].toString()})):M["adyenData[clientStateDataIndicator]"]=y.clientStateDataIndicator.toString(),M["adyenData[storePaymentMethod]"]=y.storePaymentMethod.toString(),Object.entries(y.paymentMethod).forEach((function(e){M["adyenData[paymentMethod][".concat(e[0],"]")]="".concat(e[1])})),y.riskData)Object.entries(y.riskData).forEach((function(e){M["adyenData[riskData][".concat(e[0],"]")]="".concat(e[1])}))}return Object.entries((0,d.S)()).forEach((function(e){return M["browserInfo[".concat(e[0],"]")]=e[1].toString()})),I===i.XL.ONEY&&L&&(M.financingTerms=ue(L)),v({},b,M)},Ie=function(e,t){return e.map((function(n){var r=t.find((function(e){return String(n.idArticle)===e.productId}));return null===r||void 0===r||r.relatableOffers.forEach((function(t){n.extraServices.push({extraServiceId:t.productId,extraServiceArticleId:+t.productId,name:t.productName,price:t.price.amountCents,allowInMarketplace:!0,active:e.reduce((function(e,r){return!!e||r.lineReference===n.idLine&&t.productId===String(r.idArticle)}),!1),idLine:n.idLine,sellerId:t.sellerId,condition:t.condition})})),n}))}}}]); //# sourceMappingURL=main-22e09d3c.js.map