1import{s as y,l as F,P as U,k as L,m as V,u as X,j as o,b as C,C as B,M as ee,d as ne,o as te,p as re,f as ae,h as oe,q as ie,t as W,a as T,A as x,v as K,w as le}from"./index-af67f71a.js";import{I as ce}from"./index.esm-a30609ac.js";var i=(e=>(e.LocaleStorageKey="lastAppBannerCancel",e.ShowOnlyOncePerSessionBanner="showOnlyOncePerSessionBanner",e.OneLinkUlr="https://rappi.onelink.me/squj",e.MediaSource="af_banner",e.DefaultMediaSource="web-organic",e.Campaign="af_banner_campaign",e.Channel="af_web_banner",e.UriSchemeKey="af_dp",e.UriScheme="gbrappi://com.grability.rappi",e[e.OneDay=86400]="OneDay",e.UtmMediaSource="utm_source",e.UtmCampaign="utm_campaign",e.UtmChanel="utm_medium",e.GoogleIdClick="gclid",e.FacebookIdClik="fbclid",e.TikTokClid="ttclid",e.DefaultFacebookIdClik="fbclid",e.UtmId="utm_id",e.UtmTerm="utm_term",e.UtmContent="utm_content",e.AfCid="af_c_id",e.AfKeyword="af_keyword",e))(i||{}),se="(https:\\/\\/)(([^\\.][^\\.]+).)(.*\\/)(.*)",de=5,ue="gclid",fe="keyword",ge="af_keywords",me=["pid","c","af_channel","af_ad","af_adset","deep_link_value","af_sub1","af_sub2","af_sub3","af_sub4","af_sub5"],pe=["pid","c","af_channel","af_ad","af_adset","deep_link_value"],he=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=Object.keys(t).reduce(function(r,l){return t[l]&&(r+="&".concat(l,"=").concat(t[l])),r},"");return console.debug("Generated OneLink parameters",n),n},v=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{keys:[],overrideValues:{},defaultValue:""};if(!(n!=null&&n.keys&&Array.isArray(n.keys)||n!=null&&n.defaultValue))return console.error("Parameter config structure is wrong",n),null;var r=n.keys,l=r===void 0?[]:r,c=n.overrideValues,a=c===void 0?{}:c,s=n.defaultValue,u=s===void 0?"":s,h=l.find(function(m){return!!t[m]});if(h){var f=t[h];return a[f]||f||u}return u},be=function(t){var n=decodeURIComponent(t).replace("?","").split("&").reduce(function(r,l){var c=l.split("=");return c[0]&&c[1]&&(r[[c[0]]]=c[1]),r},{});return console.debug("Generated current parameters object",n),n},ye=function(t){if(document.referrer){var n=decodeURIComponent(document.referrer.toLowerCase());if(n){var r=t.find(function(l){return n.includes(l.toLowerCase())});return r&&console.debug("Generate url is skipped. HTTP referrer contains key: ",r),!!r}}return!1},ke=function(t,n){var r=n[ue],l={};if(r){console.debug("This user comes from Google AdWords"),l[t]=r;var c=n[fe];c&&(console.debug("There is a keyword associated with the ad"),l[ge]=c)}else console.debug("This user comes from SRN or custom network");return l};(function(){var e=function(){var n,r,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{afParameters:{}},c=l.oneLinkURL,a=l.afParameters;a=a===void 0?{}:a;var s=a.mediaSource,u=a.campaign,h=a.channel,f=a.ad,m=a.adSet,b=a.deepLinkValue,g=a.afSub1,k=a.afSub2,R=a.afSub3,M=a.afSub4,A=a.afSub5,z=a.afCustom,O=a.googleClickIdKey,G=l.referrerSkipList,Y=G===void 0?[]:G,I=(n=c||"")===null||n===void 0?void 0:n.toString().match(se);if(!I||(I==null?void 0:I.length)<de)return console.error("oneLinkURL is missing or not in the correct format, can't generate URL",c),null;if((s==null||(r=s.keys)===null||r===void 0?void 0:r.length)===0&&!(s!=null&&s.defaultValue))return console.error("mediaSource is missing (default value was not supplied), can't generate URL",s),null;if(ye(Y))return null;var _={af_js_web:!0,af_ss_ver:window.AF_SMART_SCRIPT.version},D=be(window.location.search),J=Object.keys(D).length>0?D:null,S=J||JSON.parse(window.sessionStorage.getItem("rappi.attr_params"))||{};if(s){var j=v(S,s);if(!j)return console.error("mediaSource was not found in the URL and default value was not supplied, can't generate URL",s),null;_.pid=j}u&&(_.c=v(S,u)),h&&(_.af_channel=v(S,h)),f&&(_.af_ad=v(S,f)),m&&(_.af_adset=v(S,m)),b&&(_.deep_link_value=v(S,b));var Q=[g,k,R,M,A];
1if(Q.forEach(function(d,E){d&&(_["af_sub".concat(E+1)]=v(S,d))}),O)if(pe.find(function(d){return d===O}))console.debug("Google Click Id ParamKey can't override AF Parameters keys",O);else{var H=ke(O,S);Object.keys(H).forEach(function(d){_[d]=H[d]})}Array.isArray(z)&&z.forEach(function(d){d!=null&&d.paramKey&&((d==null?void 0:d.paramKey)===O||me.find(function(E){return E===(d==null?void 0:d.paramKey)})?console.debug("Custom parameter ParamKey can't override Google-Click-Id or AF Parameters keys",d):_[[d.paramKey]]=v(S,d))});var Z=he(_),N=c+Z.replace("&","?");return console.debug("Generated OneLink URL",N),{clickURL:N}};window.AF_SMART_SCRIPT={generateOneLinkURL:e,version:"2"}})();const _e="/mf-header/static/img/background-banner-rt-4294f215.webp",Se="/mf-header/static/img/banner-rt-text-c51f317f.webp",ve="/mf-header/static/img/ellipse-rt-8fd0db40.svg",Ce="/mf-header/static/img/rt-alone-5fe1c2b9.webp",$=650,Le=y.div` 2 position: fixed; 3 display: flex; 4 flex-direction: column; 5 bottom: 0px; 6 top: 0px; 7 width: 100%; 8 height: 100%; 9 z-index: 3000; 10 11 background-image: url(${_e}); 12 background-repeat: no-repeat; 13 background-size: cover; 14 align-items: center; 15`,we=y.div` 16 background-image: url(${Se}); 17 width: 100%; 18 height: 50vh; 19 background-repeat: no-repeat; 20 background-position: center top; 21 position: absolute; 22 background-size: contain; 23 z-index: 1; 24 margin-top: ${F.Spacing.Spacing4}; 25`,xe=y.div` 26 background-image: url(${ve}); 27 width: 100vw; 28 height: 274px; 29 background-repeat: no-repeat; 30 position: absolute; 31 background-position-x: center; 32 /* background-position-y: bottom; */ 33 background-size: 120%; 34 bottom: 0; 35 @media only screen and (max-height: ${$}px) { 36 width: 320px; 37 height: 200px; 38 } 39`,Re=y.div` 40 background-image: url(${Ce}); 41 width: 340px; 42 height: 355px; 43 background-repeat: no-repeat; 44 position: absolute; 45 background-size: cover; 46 bottom: 0; 47 48 @media only screen and (max-height: ${$}px) { 49 width: 297px; 50 height: 230px; 51 } 52`,Oe=y.button` 53 background-color: transparent; 54 border: none; 55 cursor: pointer; 56 padding: 0; 57 position: absolute; 58 right: 16px; 59 top: 16px; 60 z-index: 2; 61 62 > svg { 63 /* background-color: ${({theme:e})=>e.palette.white}; */ 64 border-radius: 50%; 65 } 66`,Ue=y.div` 67 display: flex; 68 flex-direction: column; 69 width: 100%; 70 align-items: center; 71 align-self: center; 72 justify-content: flex-end; 73 padding: 0 32px; 74 margin-top: auto; 75 margin-bottom: 24px; 76 gap: 12px; 77 z-index: 2; 78`,Ie=y.button` 79 align-items: center; 80 background-color: ${U.Graya100}; 81 border-radius: 8px; 82 border: none; 83 color: ${U.White}; 84 display: flex; 85 font-family: 'Nunito'; 86 font-weight: 800; 87 font-size: 16px; 88 height: 36px; 89 justify-content: center; 90 letter-spacing: normal; 91 outline: none; 92 padding: 10px 16px; 93 text-align: center; 94 white-space: nowrap; 95 width: 100%; 96 cursor: pointer; 97 98 @media ${({theme:e})=>e.mediaQueries.tabletL} { 99 padding: 10px; 100 } 101 102 @media only screen and (min-height: ${$}px) { 103 height: 48px; 104 } 105`,Te=y.button` 106 background-color: ${U.White}; 107 border: none; 108 color: ${U.Graya100}; 109 border-radius: 8px; 110 font-family: 'Nunito'; 111 font-weight: 400; 112 font-size: 16px; 113 height: 36px; 114 letter-spacing: normal; 115 line-height: 1.63; 116 outline: none; 117 padding: 0 16px; 118 text-align: center; 119 white-space: nowrap; 120 width: 100%; 121 cursor: pointer; 122 123 @media only screen and (min-height: ${$}px) { 124 height: 48px; 125 } 126`,Pe=y(L)` 127 margin-top: ${({theme:e})=>e.spacing.spacing5}; 128 font-size: ${({theme:e})=>e.typography.XL124}; 129 @media (max-height: 720px) { 130 margin-top: ${({theme:e})=>e.spacing.spacing2}; 131 font-size: ${({theme:e})=>e.typography.L120}; 132 } 133`,$e=y(L)` 134 font-size: ${({theme:e})=>e.typography.XL240.fontSize}; 135 font-weight: bold; 136 line-height: normal; 137 @media (max-height: 720px) { 138 font-size: ${({theme:e})=>e.typography.XL132.fontSize}; 139 } 140`,Me=y(V)` 141 width: 365px; 142 @media (max-width: ${F.Breakpoint.MobileS}) { 143 width: 280px; 144 } 145`,Ae=y(V)` 146 width: 175px; 147 @media (max-width: ${F.Breakpoint.MobileS}) { 148 width: 140px; 149 } 150`,p={PrimaryButtonRT:Ie,ContainerRT:Le,TextRT:we,AloneRT:Re,RTBackgroun
150d:xe,CloseButtonRT:Oe,ButtonsContainerRT:Ue,SecondaryButtonRT:Te,PreTitleContainer:Pe,TitleContainer:$e,PrymaryButton:Me,SecondaryButton:Ae},Ee=({onClose:e,primaryAction:t,secondaryAction:n,rightTabAction:r,leftTabAction:l,showSplashRTBanner:c,backgroundColor:a,termsConditionsText:s,termsConditionsUrl:u,preTitle:h,title:f,primaryButtonText:m,secondaryButtonText:b,rightTabLinkText:g,leftTabLinkText:k,image:R,backgroundImage:M=""})=>{const{t:A}=X();return c?o("div",{"data-qa":"splash-rt-banner",children:C(p.ContainerRT,{children:[o(p.CloseButtonRT,{type:"button","aria-label":"Close","data-qa":"close",onClick:e,children:o(B,{color:U.Secondary220})}),o(p.TextRT,{}),o(p.RTBackground,{}),o(p.AloneRT,{}),C(p.ButtonsContainerRT,{children:[o(p.PrimaryButtonRT,{"data-qa":"primary-button-rt",onClick:r,children:A("splash_banner_app.right_tab_link_text")}),o(p.SecondaryButtonRT,{"data-qa":"secondary-button-rt",onClick:n,children:"Ahora no"})]})]})}):o(ee,{size:"full",closeOnOverlayClick:!1,isOpen:!0,onClose:e,children:C(ne,{backgroundImage:M,backgroundColor:a||"secondary.220",children:[C(te,{pb:[5,null,null,0],pt:0,mt:[1,null,null,5],children:[o(p.PreTitleContainer,{as:"p",dangerouslySetInnerHTML:{__html:h}}),o(p.TitleContainer,{as:"h1",dangerouslySetInnerHTML:{__html:f}}),o(re,{mt:4,href:u,textDecorationColor:"white",color:"white",target:"_blank",children:o(L,{variant:"Tiny110",color:"gray.80",dangerouslySetInnerHTML:{__html:s}})})]}),o(ae,{}),o(oe,{m:0,p:0,children:R&&o(ce,{src:R,alt:"splashBanner"})}),C(ie,{backgroundColor:a||"secondary.220",position:"fixed",bottom:0,right:0,left:0,pt:0,flexDir:"column",justifyContent:"center",children:[C(W,{flexDir:"column",alignItems:"center",justifyContent:"center",alignContent:"center",children:[o(p.PrymaryButton,{bgColor:m?m.color:"#821FF5",mb:2,size:"lg",onClick:t,children:o(L,{dangerouslySetInnerHTML:{__html:m?m.text:""}})}),o(V,{variant:"link",mt:1,mb:0,color:b?b.color:"#5e00be",onClick:n,children:o(L,{dangerouslySetInnerHTML:{__html:b?b.text:""}})})]}),C(W,{mb:0,mt:2,flexDir:"row",children:[g&&o(p.SecondaryButton,{bgColor:g.color||"#ffffff",mr:3,onClick:r,children:o(L,{variant:"Tiny112",dangerouslySetInnerHTML:{__html:g.text||""}})}),k&&o(p.SecondaryButton,{bgColor:k.color||"#ffffff",onClick:l,children:o(L,{variant:"Tiny112",dangerouslySetInnerHTML:{__html:k.text||""}})})]})]})]})})},q="?utm_source=web+splash+banner&utm_medium=web&utm_campaign=FMF",P=()=>{const{pathname:e,search:t}=window.location,n=new URLSearchParams(t),r=e.includes("/p")&&n.has("retailer_id");return!(/\/login|\/checkout|\/\ubicacion/gi.test(e)||r)},w=(e,t,n)=>{if(t&&n){e?x.clickRtSplashBanner(t):x.clickSplashBanner(n);return}e?x.viewRtSplashBanner():x.viewSplashBanner()},Ke=e=>{const t=i.OneLinkUlr,n={keys:[i.UtmMediaSource],defaultValue:i.DefaultMediaSource},r={keys:[i.UtmCampaign],defaultValue:i.Campaign},l={keys:[i.UtmChanel],defaultValue:i.Channel},c={paramKey:i.UriSchemeKey,defaultValue:i.UriScheme},a=i.GoogleIdClick,s={keys:[i.GoogleIdClick]},u={keys:[i.FacebookIdClik]},h={keys:[i.TikTokClid]},f={paramKey:i.UtmContent,keys:[i.UtmContent]},m={paramKey:i.AfCid,keys:[i.UtmId]},b={paramKey:i.AfKeyword,keys:[i.UtmTerm]};if(window.AF_SMART_SCRIPT)try{const g=window.AF_SMART_SCRIPT.generateOneLinkURL({oneLinkURL:t,afParameters:{mediaSource:n,campaign:r,channel:l,googleClickIdKey:a,ad:f,afSub1:s,afSub2:u,afSub3:h,afCustom:[c,m,b]}});e(g.clickURL)}catch(g){le.error({message:"[AppsFlyer]: could not generateOneLinkURL",error:g instanceof Error?g.message:g,url:window.location.href})}},ze=({showSplashRTBanner:e=!1,splashBannerData:t})=>{const[n,r]=T.useState(!1),[l,c]=T.useState(""),a=t==null?void 0:t.id,s=t==null?void 0:t.showOnlyOncePerSession,u=e?i.LocaleStorageKey:`${i.LocaleStorageKey}-id-${a}`,{t:h}=X();T.useEffect(()=>(Ke(c),window.addEventListener("scroll",b),f),[]);const f=()=>{window.removeEventListener("scroll",b)};T.useEffect(()=>{!localStorage.getItem(u)&&!P()&&localStorage.setItem(u,new Date().getTime().toString())},[]);const m=()=>{!localStorage.getItem(`${i.ShowOnlyOncePerSessionBanner}-id-${a}`)&&P()&&(w(!1),r(!0),localStorage.setItem(`${i.ShowOnlyOncePerSessionBanner}-id-${a}`,"true")),f()},b=()=>{if(s&&!e){m();return}const k=localStorage.getItem(u);if(!k&&P()){r(!0),w(e),f();return}k&&((new Date().getTime()-parseInt(k,10))/1e3>
150=i.OneDay*((t==null?void 0:t.timeToSavePerSession)||1)&&P()&&(w(e),r(!0)),f())},g=()=>{r(!1),(e||!s)&&localStorage.setItem(u,new Date().getTime().toString())};return n?o(Ee,{showSplashRTBanner:e,primaryAction:()=>{x.clickSplashBanner("DOWNLOAD_APP"),K(l)},secondaryAction:()=>{w(e,"CONTINUE_WEB","CONTINUE_WEB"),g()},rightTabAction:()=>{w(e,"BECOME_RT","BECOME_RT"),K(`${h("splash_banner_app.right_tab_link")}${q}`)},leftTabAction:()=>{x.clickSplashBanner("BECOME_MERCHANT"),K(`${h("splash_banner_app.left_tab_link")}${q}`)},onClose:()=>{w(e,"CLOSE_MODAL","CLOSE_MODAL"),g()},...t}):null};export{ze as default};
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.