(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98964,t=>{t.v({actionLabel:"styles-module-scss-module__I48tDW__actionLabel",banner:"styles-module-scss-module__I48tDW__banner",bannerDesktopContainer:"styles-module-scss-module__I48tDW__bannerDesktopContainer",container:"styles-module-scss-module__I48tDW__container",description:"styles-module-scss-module__I48tDW__description",desktop:"styles-module-scss-module__I48tDW__desktop",desktopTitle:"styles-module-scss-module__I48tDW__desktopTitle","font-bold":"styles-module-scss-module__I48tDW__font-bold","font-book":"styles-module-scss-module__I48tDW__font-book","font-book-italic":"styles-module-scss-module__I48tDW__font-book-italic","font-medium":"styles-module-scss-module__I48tDW__font-medium","font-medium-italic":"styles-module-scss-module__I48tDW__font-medium-italic",mobile:"styles-module-scss-module__I48tDW__mobile",mobileTitle:"styles-module-scss-module__I48tDW__mobileTitle",overlayElements:"styles-module-scss-module__I48tDW__overlayElements",preTitleLabel:"styles-module-scss-module__I48tDW__preTitleLabel","subtitle-book":"styles-module-scss-module__I48tDW__subtitle-book","text-bold":"styles-module-scss-module__I48tDW__text-bold","text-book":"styles-module-scss-module__I48tDW__text-book","text-book-subtitle":"styles-module-scss-module__I48tDW__text-book-subtitle","text-center":"styles-module-scss-module__I48tDW__text-center","text-cod-gray":"styles-module-scss-module__I48tDW__text-cod-gray","text-dove-gray":"styles-module-scss-module__I48tDW__text-dove-gray","text-medium":"styles-module-scss-module__I48tDW__text-medium","text-medium-italic":"styles-module-scss-module__I48tDW__text-medium-italic","text-medium-subtitle":"styles-module-scss-module__I48tDW__text-medium-subtitle","text-small":"styles-module-scss-module__I48tDW__text-small","title-big-bold":"styles-module-scss-module__I48tDW__title-big-bold","title-big-medium":"styles-module-scss-module__I48tDW__title-big-medium","title-big-medium-book":"styles-module-scss-module__I48tDW__title-big-medium-book","title-bigger-book":"styles-module-scss-module__I48tDW__title-bigger-book","title-bigger-medium":"styles-module-scss-module__I48tDW__title-bigger-medium","title-book":"styles-module-scss-module__I48tDW__title-book","title-extra-big-bold":"styles-module-scss-module__I48tDW__title-extra-big-bold","title-medium":"styles-module-scss-module__I48tDW__title-medium"})},2923,t=>{"use strict";var e=t.i(18566);t.i(70857);var r=t.i(26097),n=t.i(16126);t.i(94056);var o=t.i(14636),i=t.i(98964),l=t.i(43794),a=t.i(71645);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){var e=t.src;return t.isMobile?a.default.createElement("img",{src:e,alt:"Banner Campaña",className:(0,l.default)(i.default.banner,i.default.mobile)}):a.default.createElement("div",{className:i.default.bannerDesktopContainer},a.default.createElement("img",{src:e,alt:"Banner Campaña",className:(0,l.default)(i.default.banner,i.default.desktop)}))}function d(t){var e,r,n,o=t.image,l=t.hideOverlayLabels,d=void 0!==l&&l,f=function(t){if(Array.isArray(t))return t}(e=(0,a.useState)(!1))||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,l,a=[],s=!0,u=!1;try{i=(r=r.call(t)).next,!1;for(;!(s=(n=i.call(r)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}(e,2)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,2):void 0}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=f[0],y=f[1];(0,a.useEffect)(function(){var t=function(){y(window.innerWidth<=768)};return t(),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}},[]);var h=m?d?null==o?void 0:o.mobile:"object"===u(o)&&(null==o?void 0:o.mobile)!=null?o.mobile:o:d?null==o?void 0:o.desktop:"object"!==u(o)?o:null!=(r=null!=(n=null==o?void 0:o.desktop)?n:null==o?void 0:o.src)?r:o;return a.default.createElement("div",{className:i.default.container},a.default.createElement(c,{src:h,isMobile:m}))}var f=t.i(21419);t.i(83449);var m=t.i(37845),y=t.i(46850),h=t.i(73975),_=t.i(83314);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function b(){b=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(e,r,n,i){var l,a,s,u,c=Object.create((r&&r.prototype instanceof _?r:_).prototype);return o(c,"_invoke",{value:(l=e,a=n,s=new L(i||[]),u=f,function(e,r){if(u===m)throw Error("Generator is already running");if(u===y){if("throw"===e)throw r;return{value:t,done:!0}}for(s.method=e,s.arg=r;;){var n=s.delegate;if(n){var o=function e(r,n){var o=n.method,i=r.iterator[o];if(i===t)return n.delegate=null,"throw"===o&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+o+"' method")),h;var l=d(i,r.iterator,n.arg);if("throw"===l.type)return n.method="throw",n.arg=l.arg,n.delegate=null,h;var a=l.arg;return a?a.done?(n[r.resultName]=a.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,h)}(n,s);if(o){if(o===h)continue;return o}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(u===f)throw u=y,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);u=m;var i=d(l,a,s);if("normal"===i.type){if(u=s.done?y:"suspendedYield",i.arg===h)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(u=y,s.method="throw",s.arg=i.arg)}})}),c}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",m="executing",y="completed",h={};function _(){}function v(){}function g(){}var I={};u(I,l,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(O([])));E&&E!==r&&n.call(E,l)&&(I=E);var w=g.prototype=_.prototype=Object.create(I);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function D(t,e){var r;o(this,"_invoke",{value:function(o,i){function l(){return new e(function(r,l){!function r(o,i,l,a){var s=d(t[o],t,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==p(c)&&n.call(c,"__await")?e.resolve(c.__await).then(function(t){r("next",t,l,a)},function(t){r("throw",t,l,a)}):e.resolve(c).then(function(t){u.value=t,l(u)},function(t){return r("throw",t,l,a)})}a(s.arg)}(o,i,r,l)})}return r=r?r.then(l,l):l()}})}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function W(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw TypeError(p(e)+" is not iterable")}return v.prototype=g,o(w,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:v,configurable:!0}),v.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},S(D.prototype),u(D.prototype,a,function(){return this}),e.AsyncIterator=D,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var l=new D(c(t,r,n,o),i);return e.isGeneratorFunction(r)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(w),u(w,s,"Generator"),u(w,l,function(){return this}),u(w,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(W),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var l=this.tryEntries[i],a=l.completion;if("root"===l.tryLoc)return o("end");if(l.tryLoc<=this.prev){var s=n.call(l,"catchLoc"),u=n.call(l,"finallyLoc");if(s&&u){if(this.prev<l.catchLoc)return o(l.catchLoc,!0);if(this.prev<l.finallyLoc)return o(l.finallyLoc)}else if(s){if(this.prev<l.catchLoc)return o(l.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return o(l.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var l=i?i.completion:{};return l.type=t,l.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(l)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),W(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;W(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}function v(t,e,r,n,o,i,l){try{var a=t[i](l),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,o)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,l,a=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return I(t,e);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(t,e):void 0}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function x(){var t=(0,e.useSearchParams)(),i=null==t?void 0:t.get("id"),l=(0,n.useFetchWithTimeout)(f.ENDPOINTS.maintenance),s=l.isLoading,u=l.hasFailed,c=l.tries,p=l.response,I=l.handleRefetch,x=g((0,a.useState)(null),2),E=(x[0],x[1]),w=(0,r.useFetch)({url:"".concat(f.ENDPOINTS.campaign).concat(i||""),pageSize:f.PAGE_SIZE_DESKTOP}),S=w.isFetching,D=w.benefits,k=w.totalItems,W=w.handlePageChange,L=g((0,a.useState)(null),2),O=L[0],P=L[1],T=g((0,a.useState)(""),2),j=(T[0],T[1]);return(0,a.useEffect)(function(){var t,e,r=!0,n=function(t){if(!t)return null;var e=t.startsWith("http://")||t.startsWith("https://")?t:"".concat(f.ENDPOINTS.urlImages).concat(t);return{desktop:e,mobile:e}},o=(t=b().mark(function t(){var e,o,l,a,s,u,c,d,y,h,_,p;return b().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=1,Promise.all([fetch(f.ENDPOINTS.slides),fetch("".concat(f.ENDPOINTS.campaigns).concat(i||""))]);case 1:return o=(e=g(t.sent,2))[0],l=e[1],t.next=2,Promise.all([o.json(),l.json()]);case 2:if(s=(a=g(t.sent,2))[0],u=a[1],r){t.next=3;break}return t.abrupt("return");case 3:if(!(c=Array.isArray(null==u?void 0:u.data)?u.data[0]:null)){t.next=5;break}if(j(null!=(d=c.cabecera)?d:""),E(null!=(y=c.esCampaniaMadre)&&y),!(h=n(c.imagen))){t.next=4;break}return P(h),t.abrupt("return");case 4:t.next=6;break;case 5:E(!1);case 6:if(Array.isArray(_=null==s?void 0:s.slides)&&_.length&&i)try{p=(0,m.filterSliderImageById)(_,i),P(p)}catch(t){console.error("Failed to map slide image",t)}t.next=8;break;case 7:t.prev=7,console.error("Failed to fetch data",t.catch(0));case 8:case"end":return t.stop()}},t,null,[[0,7]])}),e=function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function l(t){v(i,n,o,l,a,"next",t)}function a(t){v(i,n,o,l,a,"throw",t)}l(void 0)})},function(){return e.apply(this,arguments)});return y.SessionStorageManager.setItem(h.SESSION_STORAGE_PREV_PAGE_KEY,h.sessionStoragePagesValues.CAMPAIGN),o(),function(){r=!1}},[i]),a.default.createElement(_.TimeoutScreenManager,{isLoading:s,hasFailed:u,data:!s,tries:c,handleRefetch:I,isWebsiteUnderMaintenance:p},a.default.createElement(a.default.Fragment,null,a.default.createElement(d,{hideOverlayLabels:!0,image:O}),a.default.createElement(o.BenefitsGrid,{isShared:!0,isFetching:S,benefits:D,totalItems:k,onPageChange:W,title:"¡Descubrí las promos que incluye!"})))}function E(){return a.default.createElement(a.Suspense,{fallback:a.default.createElement("div",null,"Loading...")},a.default.createElement(x,null))}t.s(["default",()=>E],2923)}]);