1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2936],{69922:function(n,t,e){e.d(t,{Z:function(){return P}});var r=e(26042),o=e(828),i=e(85893),a=e(34292),c=e(93717),u=e(22074),l=e(25585),s=e(87602),d=e(5152),p=e.n(d),f=e(67294),v=e(7297),h=e(46376),m=e.n(h),g=e(48483),_=e.n(g),w=e(50066);function y(){var n=(0,v.Z)(["\n touch-action: pan-y;\n "]);return y=function(){return n},n}function b(){var n=(0,v.Z)(["\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n\n ","\n\n ::-webkit-scrollbar {\n width: 0;\n height: 0;\n background: transparent;\n }\n"]);return b=function(){return n},n}function C(){var n=(0,v.Z)(["\n cursor: pointer;\n width: 25px;\n padding: ",";\n z-index: 3;\n position: absolute;\n background: ",";\n border: 1px solid ",";\n\n path {\n fill: ",";\n }\n\n :hover {\n transform: scale(1.05);\n }\n"]);return C=function(){return n},n}function x(){var n=(0,v.Z)(["\n ","\n top: ",";\n height: ",";\n"]);return x=function(){return n},n}function Z(){var n=(0,v.Z)(["\n ","\n right: 0;\n top: ",";\n height: ",";\n"]);return Z=function(){return n},n}var I=w.default.div.withConfig({componentId:"sc-ad7e82de-0"})(b(),function(n){return n.disableTouch&&(0,w.css)(y())}),k=(0,w.css)(C(),function(n){return n.theme.spacing.spacing1},function(n){return n.theme.palette.white},function(n){return n.theme.palette.graya20},function(n){return n.theme.palette.graya100}),R=(0,w.default)(m()).attrs({"data-testid":"slider-back-button"}).withConfig({componentId:"sc-ad7e82de-1"})(x(),k,function(n){return n.top},function(n){return n.height}),S=(0,w.default)(_()).attrs({"data-testid":"slider-next-button"}).withConfig({componentId:"sc-ad7e82de-2"})(Z(),k,function(n){return n.top},function(n){return n.height}),O={CarouselContainer:I,CarouselBackButton:R,CarouselNextButton:S},E=p()(function(){return e.e(4995).then(e.bind(e,34995))},{loadableGenerated:{webpack:function(){return[34995]}}}),N=(0,s.Y)({forceWheelAxis:"x"}),A={dragFree:!0,draggable:!0,align:"start",containScroll:"trimSnaps",slidesToScroll:3},T={delay:8e3,rootNode:function(n){return n.parentElement}},P=function(n){var t=n.children,e=n.className,s=n.dataQa,d=n.controlsHeight,p=void 0===d?40:d,v=n.controlsTop,h=void 0===v?22:v,m=n.withArrows,g=void 0===m||m,_=n.carouselOptions,w=n.withAutoplay,y=n.withDotButtons,b=n.itemsSpacing,C=void 0!==w&&w?[(0,u.Z)(T)]:[N],x=(0,r.Z)({},A,void 0===_?{}:_),Z=(0,o.Z)((0,l.default)(x,C),2),I=Z[0],k=Z[1],R=(0,f.useState)(!1),S=R[0],P=R[1],B=(0,f.useState)(!1),j=B[0],L=B[1],D=(0,f.useState)([]),U=D[0],F=D[1],q=(0,f.useState)(0),z=q[0],G=q[1],H=(0,f.useRef)(),M=f.Children.map(f.Children.toArray(t),function(n){if(!f.isValidElement(n))return n;var t=function(t,e){(null==k?void 0:k.clickAllowed())&&n.props.onClick&&n.props.onClick(t,e)};return f.cloneElement(n,{onClick:t})});(0,f.useEffect)(function(){null==k||k.reInit(),V()},[null==M?void 0:M.length]);var V=function(){k&&(P(k.canScrollPrev()),L(k.canScrollNext()),G(k.selectedScrollSnap()))},X=(0,f.useCallback)(function(n){k&&(k.reInit(x),k.scrollTo(n),clearTimeout(H.current),H.current=setTimeout(function(){k.reInit(x,C)},5e3))},[k]);return(0,f.useEffect)(function(){if(k)return V(),k.on("select",V),k.on("resize",V),F(k.scrollSnapList()),function(){k.off("select",V),k.off("resize",V)}},[k]),(0,i.jsxs)("div",{style:{position:"relative"},className:e,"data-qa":s,"data-testid":s,children:[S&&g&&k&&(0,i.jsx)(O.CarouselBackButton,{"aria-label":"Prev",top:"".concat(h,"px"),height:"".concat(p,"px"),onClick:function(){return k.scrollPrev()}}),j&&g&&k&&(0,i.jsx)(O.CarouselNextButton,{top:"".concat(h,"px"),height:"".concat(p,"px"),onClick:function(){return k.scrollNext()},"aria-label":"Next"}),(0,i.jsx)(O.CarouselContainer,{disableTouch:!x.draggable,ref:I,children:(0,i.jsx)(a.U,{spacing:b,className:"Carousel__items_container","data-qa":"carousel-list","data-testid":"carousel-list",children:M})}),void 0!==y&&y&&(0,i.jsx)(c.k,{background:"white",justifyContent:"center",children:U.map(function(n,t){return(0,i.jsx)(E,{testid:"dot-button-".concat(n),selected:t===z,onClick:function(){return X(t)}},n)})})]})}},32827:function(n,t,e){e.d(t,{Z:function(){return H}});var r=e(47568),o=e(26042),i=e(69396),a=e(97582),c=e(85893),u=e(67294),l=e(64987),s=e(9669),d=e.n(s),p=e(13763),f=e(71918),v=e.n(f),h=e(93589),m=e.n(h),g=e(95298),_=e(11163),w=e(68328),y=e(96),b=e(49017),C=e(31611),x=e(68860),Z=e(7297),I=e(50066);function k(){var n=(0,Z.Z)(["\n background-color: ",";\n"]);return k=function(){return n},n}function R(){var n=(0,Z.Z)(["\n display: inline-block;\n cursor: pointer;\n"]);return R=function(){return n},n}function S(){var n=(0,Z.Z)(["\n width: 330px;\n height: 150px;\n position: relative;\n display: flex;\n flex-direction: column;\n text-align: center;\n overflow: hidden;\n transition: transform 0.5s;\n margin: ",";\n\n :hover {\n transform: scale(1.05);\n }\n\n img {\n border-radius: 8px;\n }\n"]);return S=function(){return n},n}var O,E,N=I.default.div.withConfig({componentId:"sc-d7268746-0"})(k(),function(n){return n.theme.palette.white}),A=I.default.div.withConfig({componentId:"sc-d7268746-1"})(R()),T=I.default.div.withConfig({componentId:"sc-d7268746-2"})(S(),function(n){var t=n.theme;return"".concat(t.spacing.spacing1," 0")}),P={ContainerBanners:N,BannerCardContainer:A,BannerCardImage:T},B=e(67502),j=e(41486),L=e(32907),D=function(n,t){if(!n||!Array.isArray(null==n?void 0:n.components)||!(null==n?void 0:null===(e=n.components)||void 0===e?void 0:e.length))return{context:B.Z.aisles_tree,store_type:"",limit:100,offset:0,headers:[],components:[],footers:[],context_info:null};var e,r=n.components.map(function(n){var e,r=n.resource;if((null==r?void 0:r.aisle_icons)&&Array.isArray(null==r?void 0:r.aisle_icons)){var a=null==r?void 0:r.aisle_icons.map(function(n){var t;return(0,i.Z)((0,o.Z)({},n),{friendly_url:(0,L.N0)(null==n?void 0:null===(t=n.name)||void 0===t?void 0:t.replace(/_/g," "))})});return(0,i.Z)((0,o.Z)({},n),{state:(0,i.Z)((0,o.Z)({},n.state),{parent_store_type:t}),resource:(0,i.Z)((0,o.Z)({},r),{aisle_icons:a})})}return(null==r?void 0:r.name)?(0,i.Z)((0,o.Z)({},n),{state:(0,i.Z)((0,o.Z)({},n.state),{parent_store_type:t}),resource:(0,i.Z)((0,o.Z)({},r),{friendly_url:(0,L.N0)(null==r?void 0:null===(e=r.name)||void 0===e?void 0:e.replace(/_/g," "))})}):n});return(0,i.Z)((0,o.Z)({}
1,n),{components:r})},U=(O=(0,r.Z)(function(n,t,e){var r,o,i,c,u;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if(!n)throw Error("Store information not exist");return c={state:{lat:"".concat(t.lat),lng:"".concat(t.lng),store_type:null==n?void 0:null===(r=n.store_type)||void 0===r?void 0:null===(o=r.store_type_group)||void 0===o?void 0:o.store_type,parent_store_type:null==n?void 0:null===(i=n.store_type)||void 0===i?void 0:i.parent_id},stores:[n.store_id],context:B.Z.aisles_tree,limit:100,offset:0},[4,(0,j.R)(c,e)];case 1:return[2,D(a.sent().data,null==n?void 0:n.store_type.parent_id)]}})}),function(n,t,e){return O.apply(this,arguments)}),F=function(n,t){for(var e=null==n?void 0:n.components.map(function(n){return n.resource}),r="",o=0,i=e.length;o<i;o+=1){var a,c=e[o],u=null===(a=c.categories)||void 0===a?void 0:a.find(function(n){return n.id===t});if(u){r="".concat(c.friendly_url,"/").concat((0,L.N0)(u.name));break}}return r},q=function(n){return Number(n.split("/").pop())},z=(E=(0,r.Z)(function(n,t,e){var r,o;return(0,a.__generator)(this,function(i){switch(i.label){case 0:r={store_id:e.store_id,store_type:{store_type_group:{id:0,store_type:e.store_type},parent_id:e.parent_id}},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,U(r,n,t)];case 2:return[2,i.sent()];case 3:throw o=i.sent(),Error("Error getting aisle tree ".concat(o));case 4:return[2]}})}),function(n,t,e){return E.apply(this,arguments)}),G=function(n){var t=n.name,e=n.image,r=n.onClick,o=n.index,i=n.preloadAvailable;return(0,c.jsx)(P.BannerCardContainer,{onClick:r,"data-qa":"promotion-banners-item-".concat(t),children:(0,c.jsx)(P.BannerCardImage,{children:(0,c.jsx)(l.Z,{imgUrl:e,blurredImage:p.A2,alt:t,width:375,height:172,objectFit:"fill",priority:i&&o<2})})})},H=function(n){var t=n.storeBanners,e=n.title;(0,u.useEffect)(function(){try{localStorage.setItem("source","PROMOTION_BANNER")}catch(n){C.k.error({message:"Error trying to set an item in localStorage",errorMessage:(0,b.v)(n)})}},[]);var l=(0,g.$G)("common").t,s=(0,_.useRouter)();if(0===t.length)return null;var p,Z,I=(0,x.Ob)(),k=I.lat,R=I.lng,S=["FIXED_URL_STORE","FIXED_URL_LOCAL_SEARCH","REDIRECT_TO_RAPPI_PAY","REDIRECT_TO_HUB"],O=["REDIRECT_TO_RAPPI_PAY","LIST_OF_PRODUCTS"],E=!(null==s?void 0:s.asPath.includes("/p/")),N=(p=(0,r.Z)(function(n){var t,e,r,o;return(0,a.__generator)(this,function(e){switch(e.label){case 0:return t=q(n.url),[4,z({lat:k,lng:R},d(),null==n?void 0:n.store)];case 1:var i,a;return i=e.sent(),a=t,r=(null==i?void 0:i.components.map(function(n){return n.resource})).find(function(n){return n.id===a}),o=n.url.replace("/".concat(t),""),r?o+="/".concat(null==r?void 0:r.friendly_url):o+="/ofertas",s.push("".concat(o)),[2]}})}),function(n){return p.apply(this,arguments)}),A=(Z=(0,r.Z)(function(n){var t,e,r,o;return(0,a.__generator)(this,function(e){switch(e.label){case 0:return t=q(n.url),[4,z({lat:k,lng:R},d(),null==n?void 0:n.store)];case 1:return r=F(e.sent(),t),o=n.url.replace("/".concat(t),""),r?o+="/".concat(r):o+="/ofertas",s.push("".concat(o)),[2]}})}),function(n){return Z.apply(this,arguments)}),T=function(n,t){var e,r,o,i,a,c,u;y.AnalyticsActions.selectPromotion({bannerId:null==n?void 0:null===(e=n.id)||void 0===e?void 0:e.toString(),bannerIndex:null==n?void 0:null===(r=n.index)||void 0===r?void 0:r.toString(),bannerName:null==n?void 0:n.name,source:"HOME",cpgsComponentIndex:t,cpgsComponentResolver:"",aaid:void 0}),O.includes(n.type)||(0,w.sc)({store:{storeId:Number(null===(o=n.store)||void 0===o?void 0:o.store_id),storeType:null===(i=n.store)||void 0===i?void 0:i.store_type,verticalGroup:null===(a=n.store)||void 0===a?void 0:a.group,verticalSubGroup:null===(c=n.store)||void 0===c?void 0:c.sub_group,storeName:null===(u=n.store)||void 0===u?void 0:u.name},source:"PROMOTION_BANNER",bannerId:Number(n.id)}),S.includes(n.type)?s.push("".concat(n.url)):"FIXED_URL_CORRIDOR"===n.type?N(n):"FIXED_URL_SUB_CORRIDOR"===n.type&&A(n)},B=(0,c.jsx)(m(),{variant:h.Variants.L220,children:e||l("banner.default_title")});return(0,c.jsx)(P.ContainerBanners,{children:(0,c.jsx)(v(),{dataQaPrefix:"promotion-banners",sliderVariant:f.SliderVariants.SliderDesktop,gap:5,title:B,children:t.map(function(n,t){return(0,u.createElement)(G,(0,i.Z)((0,o.Z)({},n),{key:n.id,index:t,onClick:function(){return T(n,t)},preloadAvailable:E}))})})})}},41486:function(n,t,e){e.d(t,{R:function(){return c}});var r,o=e(47568),i=e(97582),a=e(95760),c=(r=(0,o.Z)(function(n,t){var e,r;return(0,i.__generator)(this,function(r){switch(r.label){case 0:return e={headers:{"a
1pp-version":"web_".concat(a.O.version),"x-application-id":"web_".concat(a.O.version),language:a.O.infoCountry.locale.split("-")[0],include_context_info:"true"}},[4,t.post("/api/web-gateway/web/dynamic/context/content/",n,e)];case 1:return[2,r.sent().data]}})}),function(n,t){return r.apply(this,arguments)})},59507:function(n,t,e){e.d(t,{tz:function(){return g},ke:function(){return b},rW:function(){return h},vt:function(){return w},iS:function(){return f},YT:function(){return y},xz:function(){return m},a2:function(){return _},Qd:function(){return v}});var r,o,i=e(26042),a=e(69396),c=e(32543),u=[{locale:"es-ar",url:"https://www.rappi.com.ar/"},{locale:"es-cl",url:"https://www.rappi.cl/"},{locale:"pt-br",url:"https://www.rappi.com.br/"},{locale:"es-cr",url:"https://www.rappi.co.cr/"},{locale:"es-co",url:"https://www.rappi.com.co/"},{locale:"es-ec",url:"https://www.rappi.com.ec/"},{locale:"es-mx",url:"https://www.rappi.com.mx/"},{locale:"es-pe",url:"https://www.rappi.com.pe/"},{locale:"es-uy",url:"https://www.rappi.com.uy/"},],l=e(47041),s=e(95760),d=e(38842);(o=r||(r={})).soat="soat_webview",o.travel="viajes";var p=e(32907),f=function(){var n=u.findIndex(function(n){return n.locale===s.O.infoCountry.locale.toLowerCase()}),t=u[n];return u.splice(n,1),u.unshift(t),u},v=function(){var n=(0,d.getCookiesOpts)({seconds:c._,allowSubdomainAccess:!1});(0,l.setCookie)("rappi.acceptedCookies",1,n)},h=function(n,t){return n.map(function(n){var e="?auth_token=".concat(t.trim());return n.id===r.soat||n.id===r.travel?(0,a.Z)((0,i.Z)({},n),{url:"".concat(n.url).concat(e)}):n})};function m(n){return JSON.stringify({"@context":"https://schema.org/","@type":"Organization",url:"".concat(n),logo:"https://images.rappi.com/web/rappi_favicon.png",name:"Rappi"})}function g(n){return JSON.stringify({"@context":"https://schema.org/","@type":"ItemList",itemListElement:n.map(function(n,t){return{"@type":"ListItem",position:t+1,name:n.title,url:n.url.includes("https://")?n.url:"".concat(s.O.infoCountry.base_domain).concat(n.url)}})})}function _(){return JSON.stringify({"@context":"https://schema.org/","@type":"WebSite",name:"Rappi",url:"".concat(s.O.infoCountry.base_domain),potentialAction:{"@type":"SearchAction",target:"".concat(s.O.infoCountry.base_domain,"/search?store_type=all&query={search_term_string}"),"query-input":"required name=search_term_string"}})}var w=function(n){return n<=3?1:n<=8?2:3},y=function(n,t,e,r){return t||(e&&r?"".concat(n("eta.".concat(e)),", ").concat((0,p.Gl)(r)):"")},b=function(n){var t=n.stores,e=n.masterProductIdsToKeep,r=void 0===e?[]:e,o=n.masterProductIdsToRemove,i=void 0===o?[]:o;return 0===r.length&&0===i.length?t:t.filter(function(n){var t=n.products;return r.length>0&&(t=n.products.filter(function(n){return r.includes(n.masterProductId)})),i.length>0&&(t=n.products.filter(function(n){return!i.includes(n.masterProductId)})),n.products=t,n.products.length>0})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.