1import{a as ne}from"./chunk-GQWZYQN5.js";import{a as P}from"./chunk-ETTTDFJZ.js";import"./chunk-OATL7XYM.js";import"./chunk-BV2QQ555.js";import"./chunk-IWECOY4K.js";import"./chunk-2UUDP47Z.js";import{a as ie}from"./chunk-5US2G2QL.js";import{a as te}from"./chunk-IDLVT5K2.js";import{l as J}from"./chunk-7TDLRKJY.js";import"./chunk-G6TSCUPF.js";import"./chunk-23LGZAAN.js";import"./chunk-RHUCFSJQ.js";import{b as $}from"./chunk-NQMHQ5UR.js";import{a as Z}from"./chunk-7O4BN2JY.js";import"./chunk-HG5CHN5K.js";import{b as T,e as ee}from"./chunk-DJMZWT4N.js";import"./chunk-ZBNCHSP7.js";import"./chunk-BQJY3FMY.js";import{a as m}from"./chunk-DKTYVUZB.js";import"./chunk-ZYY6AL2Y.js";import"./chunk-QKLLASJU.js";import"./chunk-FKUC2CRB.js";import{a as O,e as K}from"./chunk-ZNZ7HPSY.js";import"./chunk-TOYGKSYR.js";import"./chunk-E2VIPH2W.js";import"./chunk-VPMZDGQ2.js";import{K as Q,w as X,y as q}from"./chunk-XNZMQTYM.js";import"./chunk-GI65VDHJ.js";import"./chunk-UE6TEYQD.js";import{c as z,d as G}from"./chunk-W5YNDQA3.js";import"./chunk-44UTOCO3.js";import"./chunk-6UPYPU4G.js";import"./chunk-EFVQNVGF.js";import"./chunk-IWSPSW5O.js";import{b as j}from"./chunk-LHG5GHGT.js";import{n as U,o as F,v as W,y as Y}from"./chunk-ERR6X27Y.js";import{$b as y,Ac as A,Bc as H,Cc as N,Ic as l,Jc as E,Kc as u,Nc as V,Oa as b,R as I,Xc as w,Yc as B,Zb as x,ad as d,b as M,bd as v,cd as _,eb as D,ec as c,fc as n,gc as r,hc as p,jb as t,qa as S,qc as L,ra as C,tb as s,uc as R,wc as h,zb as k}from"./chunk-5UMF6ZTD.js";import"./chunk-EQDQRRRY.js";var re=i=>({value:i}),me=(i,g)=>({from:i,to:g});function he(i,g){if(i&1&&(n(0,"span"),l(1),d(2,"date"),d(3,"date"),d(4,"translate"),r()),i&2){let e=h(3);t(),E(_(4,7,"EXTENDED_DELIVERY_TIME.OPEN_HOURS",B(10,me,_(2,1,e.closestRestaurantOpenHours.from,"H:mm"),_(3,4,e.closestRestaurantOpenHours.to,"H:mm"))))}}function ue(i,g){if(i&1&&(n(0,"div",28)(1,"div",29),p(2,"img",30),r(),n(3,"span",31),l(4),r()()),i&2){let e=h(3);t(2),c("ngSrc",e.cdnUrl+"assets/img/map/map-pin.png")("width",14)("height",16),t(2),u("",e.closestRestaurantWithDistance.distance," km")}}function ve(i,g){if(i&1&&(n(0,"div",19),p(1,"hr",20),n(2,"div",21)(3,"div",22)(4,"div",23)(5,"span",24),l(6),d(7,"translate"),d(8,"uppercase"),r()()(),n(9,"div",25)(10,"div",23)(11,"span",26),l(12),n(13,"span",27),l(14),r(),x(15,he,5,13,"span"),r()()(),x(16,ue,5,4,"div",28),r()()),i&2){let e=h(2);t(6),u("",v(8,10,v(7,8,"EXTENDED_DELIVERY_TIME.TAKEOUT_HEADER")),":"),t(6),V(" ",e.closestRestaurant.name,", ",e.closestRestaurant.addressCity,", ",e.closestRestaurant.addressStreet," ",e.closestRestaurant.addressStreetNo,", "),t(2),u("",e.closestRestaurant.phoneNo,","),t(),y(e.closestRestaurantOpenHours?15:-1),t(),y(e.closestRestaurantWithDistance&&e.closestRestaurantWithDistance.distance>=0?16:-1)}}function _e(i,g){if(i&1){let e=L();n(0,"popup-outlet",null,0)(2,"div",1)(3,"div",2)(4,"span"),l(5),d(6,"translate"),d(7,"uppercase"),r()(),n(8,"div",3),p(9,"span",4),d(10,"translate"),p(11,"span",4),d(12,"translate"),r(),n(13,"div",5)(14,"div",6)(15,"bms-card",7),R("click",function(){S(e);let o=h();return C(o.wait())}),n(16,"div",8),p(17,"img",9),r(),n(18,"label",10),l(19),d(20,"translate"),r()()(),n(21,"div",11)(22,"bms-card",7),R("click",function(){S(e);let o=h();return C(o.goToStl())}),n(23,"div",8),p(24,"img",12),n(25,"div",13)(26,"div",14),p(27,"img",15),n(28,"span",16),l(29),r()()()(),n(30,"label",10),l(31),d(32,"translate"),r(),n(33,"div",17)(34,"div",14),p(35,"img",18),n(36,"span",16),l(37),r()()()()()(),x(38,ve,17,12,"div",19),r()()}if(i&2){let e=h();t(5),E(v(7,24,v(6,22,"EXTENDED_DELIVERY_TIME.HEADER"))),t(4),c("innerHTML",_(10,26,"EXTENDED_DELIVERY_TIME.DESCRIPTION_1",w(36,re,e.deliveryRestaurant==null?null:e.deliveryRestaurant.prepareMealTime)),D),t(2),c("innerHTML",_(12,29,"EXTENDED_DELIVERY_TIME.DESCRIPTION_2",w(38,re,e.takeawayRestaurant==null?null:e.takeawayRestaurant.prepareMealTime)),D),t(4),c("active",!0),t(2),c("ngSrc",e.cdnUrl+"assets/img/delivery.svg")("width",33)("height",23),t(2),E(v(20,32,"EXTENDED_DELIVERY_TIME.WAIT_LITTLE_LONGER")),t(3),c("active",!0),t(2),c("ngSrc",e.cdnUrl+"assets/img/domains/pl/restaurant-stl-pickup.svg")("width",48)("height",49),t(3),c("ngSrc",e.cdnUrl+"assets/img/common/time-bg.svg")("width",38)("height",38),t(2),u("",e.takeawayRestaurant==null?null:e.takeawayRestaurant.prepareMealTime," min"),t(2),u(" ",v(32,34,"EXTENDED_DELIVERY_TIME.GO_TO_STL")," "),t(4),c("ngSrc",e.cdnUrl+"assets/img/common/time-bg.svg")("width",38)("height",38),t(2),u("",e.takeawayRestaurant==null?null:e.takeawayRestaurant.prepareMealTime," min"),t(),y(e.closestRestaurant?38:-1)}}var nt=(()=>{class i{constructor(e,a,o,f,ae,oe,se,de,le,ce,pe){this._deliveryService=e,this._restaurantService=a,this._orderService=o,this._analyticsService=f,this._route=ae,this._loadingBarService=oe,this._addressService=se,this._routingHelper=de,this._router=le,this._piwikService=ce,this._platformId=pe,this.closestRestaurantOpenHours={from:"",to:""},this.cdnUrl=j.cdnUrl,this._popupAnalyticalName=T.EXTENDED_DELIVERY_TIME,this._subscriptions=new M,this._isMenuLoaded=!!this._route.snapshot.queryParams.isMenuLoaded,this._localStorageDeliveryType=this._route.snapshot.queryParams.localStorageDelivType,this._productId=Number(this._route.snapshot.queryParams.productId),this._deliveryLocation=this._deliveryService.getDeliveryLocation()}ngOnInit(){W(this._platformId)&&(this._subscriptions.add(this._addressService.deliveryLocation$.subscribe(e=>this._handleDeliveryLocationChange(e))),this._subscriptions.add(this._restaurantService.restaurant$.subscribe(e=>this._handleRestaurantChange(e))),this._pushOnInitPiwikEvents())}ngOnDestroy(){this._subscriptions.unsubscribe()}wait(){this._orderService.setRestaurantAndAddress(this._deliveryLocation,this.deliveryRestaurant,m.Delivery).then(()=>{let e={};this._productId&&(e={pid:this._productId}),this._routingHelper.goToMenu(m.Delivery,{skipLocationChange:!1,queryParams:e}).then(()=>this._setMenuLoader()),this._setOrderStartAnalytics(),this._orderService.setStlEnabledValue(m.Delivery)}),this.popup.close(this._popupAnalyticalName)}goToStl(){this._piwikService.pushAddressFormView(!0),this._piwikService.pushViewPopup(T.ORDER_ADDRESS_TAKEAWAY),this._routingHelper.goToAddressPopup({stl:!0,showFullScreenMap:!0})}_handleDeliveryLocationChange(e){e&&typeof e=="object"&&e.lng&&e.lat&&(this._customerLng=e.lng,this._customerLat=e.lat,this._calcDistance())}_handleRestaurantChange(e){this.deliveryRestaurant=e,this._subscriptions.add(this._restaurantService.getRestaurantByCoords(e.lat,e.lng,m.DineIn).pipe(I()).subscribe({next:a=>{if(a){this.takeawayRestaurant=a.details,this.closestRestaurant=a.details,this._calcDistance();let o=this._restaurantService.getRestaurantOrderHours(this.closestRestaurant,m.DineIn);o&&(this.closestRestaurantOpenHours=!1,o.openHoursToday&&o.orderHoursToday.length&&(this.closestRestaurantOpenHours=o.openHoursToday[0]))}else this.wait()},error:()=>this.wait()}))}_calcDistance(){this._customerLat&&this._customerLng&&this.closestRestaurant&&(this.closestRestaurant.geoLat=this.closestRestaurant.lat,this.closestRestaurant.geoLng=this.closestRestaurant.lng,this.closestRestaurantWithDistance=this._restaurantService.getRestaurantWithDistance(this.closestRestaurant,this._customerLng,this._customerLat))}_setOrderStartAnalytics(){let e=this._analyticsService.getProductParentDetails();e?this._analyticsService.e_orderStart(e.source||O.HOME_PAGE_FINDER,m.Delivery):this._analyticsService.e_orderStart(O.HOME_PAGE_FINDER,m.Delivery)}_setMenuLoader(){(!this._isMenuLoaded||!this._localStorageDeliveryType||this._localStorageDeliveryType!==m.Delivery)&&this._loadingBarService.startProgress()}_pushOnInitPiwikEvents(){this._piwikService.pushVirtualPageView(this._router.url,this._popupAnalyticalName),this._piwikService.pushViewPopup(this._popupAnalyticalName)}static{this.\u0275fac=function(a){return new(a||i)(s(ie),s($),s(J),s(K),s(X),s(te),s(Z),s(Q),s(q),s(ee),s(b))}}static{this.\u0275cmp=k({type:i,selectors:[["extended-delivery-time"]],viewQuery:function(a,o){if(a&1&&A(P,5),a&2){let f;H(f=N())&&(o.popup=f.first)}},decls:1,vars:1,consts:[["popup","popupOutlet"],[1,"extended-delivery-time"],[1,"header","mb-4","text-font-18-line-22","font-weight-900","d-flex"],[1,"description","mb-4","text-font-14-line-18","d-flex"],[3,"innerHTML"],[1,"row"],[1,"col-12","col-md-6","margin-bottom"],[3,"click","active"],[1,"circle"],["alt","Delivery","id","extendedDelivery_canWait",1,"card-icon","stl-pickup-image",3,"ngSrc","width","height"],[1,"control-label","text-font-18-line-22","font-weight-400"],[1,"col-12","col-md-6"],["alt","Pickup in restaurant","id","extendedDelivery_takeOut",1,"card-icon","stl-pickup-image",3,"ngSrc","width","height"],[1,"time","d-none","d-md-block"],[1,"img-container"],["id","extendedDelivery_takeOut_clock","alt","take_out_clock",3,"ngSrc","width","height"],[1,"text-font-12","font-weight-500"],[1,"time","d-md-none"],["alt","take_out_clock",3,"ngSrc","width","height"],[1,"extended-delivery-takeout-container"],[1,"horizontal-break"],[1,"row","mx-0","delivering-restaurant-container"],[1,"col-12","d-flex","takeout-info"],[1,"delivering-restaurant-details"],[1,"takout-header","text-font-12","font-weight-700"],[1,"col-9","d-flex","takeout-info"],[1,"takeout-restaurant","text-font-12","font-weight-700"],[1,"call-center-phone-number"],[1,"col-3","d-flex","takeout-info","extended-delivery-distance"],[1,"map-pin"],["id","map-pin-img","alt","pin",1,"map-pin-img",3,"ngSrc","width","height"],[1,"info-distance","text-font-14-line-20"]],template:function(a,o){a&1&&x(0,_e,39,40,"popup-outlet"),a&2&&y(o.takeawayRestaurant&&o.deliveryRestaurant?0:-1)},dependencies:[P,ne,Y,G,U,F,z],styles:["[_nghost-%COMP%] .extended-delivery-time{padding:65px 100px;display:flex;flex-direction:column;width:100%;align-items:center}[_nghost-%COMP%] .extended-delivery-time .header{align-items:center;justify-content:center}[_nghost-%COMP%] .extended-delivery-time .description{flex-direction:column;color:#868686}[_nghost-%COMP%] .extended-delivery-time .description strong{color:#1c1210}[_nghost-%COMP%] .extended-delivery-time .img-container{position:relative;text-align:center}[_nghost-%COMP%] .extended-delivery-time .img-container span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[_nghost-%COMP%] .extended-delivery-time .takeout-restaurant{height:32px;text-transform:uppercase;text-align:left;color:#1c1210;display:block}[_nghost-%COMP%] .extended-delivery-time .delivering-restaurant-details{margin-bottom:5px}@media screen and (min-width:1169px){[_nghost-%COMP%] .extended-delivery-time .bms-card{cursor:pointer;height:100%}[_nghost-%COMP%] .extended-delivery-time .time{position:absolute;top:8px;right:calc((100% - 38px)/2 - 36px)}}[_nghost-%COMP%] .extended-delivery-time .bms-card-content{min-height:140px;text-align:center;display:flex;flex-direction:column;align-items:center}[_nghost-%COMP%] .extended-delivery-time .control-label{color:#1c1210;text-align:center;margin-top:24px}[_nghost-%COMP%] .extended-delivery-time .circle{width:72px;height:72px;border-radius:50%;background-color:#fce2e8;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .extended-delivery-time .card-icon{height:48px;width:48px;background-position:center;background-repeat:no-repeat;margin-left:auto;margin-right:auto}[_nghost-%COMP%] .extended-delivery-time .time{width:38px;height:38px}[_nghost-%COMP%] .extended-delivery-time .takout-header{color:#868686}[_nghost-%COMP%] .extended-delivery-time .extended-delivery-distance{vertical-align:central;justify-content:flex-end}[_nghost-%COMP%] .extended-delivery-time .extended-delivery-takeout-container{border-top:1px solid #ededed;border-bottom:none;align-items:center;padding:33px 0 0}[_nghost-%COMP%] .extended-delivery-time .delivering-restaurant-container{margin-top:28px}[_nghost-%COMP%] .extended-delivery-time .horizontal-break{position:absolute;
1left:0;right:0;line-height:24px;margin:5px 0 0}[_nghost-%COMP%] .extended-delivery-time .info-distance{margin-left:10px;padding-top:5px;color:#868686}[_nghost-%COMP%] .extended-delivery-time .map-pin-img{width:14px;height:16px}@media screen and (max-width:1169px){[_nghost-%COMP%] .extended-delivery-time .bms-card{border-bottom:1px solid #ededed}[_nghost-%COMP%] .extended-delivery-time .bms-card-body{padding:16px 14px}[_nghost-%COMP%] .extended-delivery-time .bms-card-content{display:inline-flex;flex-direction:row;width:100%;min-height:initial;align-items:center}[_nghost-%COMP%] .extended-delivery-time .description{display:block}[_nghost-%COMP%] .extended-delivery-time .takeout-info{padding-left:0;padding-right:0}[_nghost-%COMP%] .extended-delivery-time .info-distance{text-align:right}[_nghost-%COMP%] .extended-delivery-time .control-label{width:100%;text-align:left;margin:0!important}[_nghost-%COMP%] .extended-delivery-time .circle{width:51px;height:51px;min-width:51px;min-height:51px;margin-right:15px}[_nghost-%COMP%] .extended-delivery-time .card-icon{height:32px;width:32px;flex:none}[_nghost-%COMP%] .extended-delivery-time .margin-bottom{margin-bottom:24px}}@media screen and (max-width:1169px){[_nghost-%COMP%] .extended-delivery-time{padding:30px 24px}}"]})}}return i})();export{nt as ExtendedDeliveryTimeComponent};
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.