PageSourceSearch

https://maestropizza.com/9899.dd104ad79362b41f.js

js maestropizza.com collected 2026-10-05 02:31:13 UTC 174,323 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9899],{9899:(jo,X,m)=>{m.d(X,{e:()=>Ro});var g=m(467),B=m(177),e=m(4438),P=m(5933),j=m(8018),f=m(5312),S=m(1161),Y=m(6017),C=m(3322),z=m(5053),Z=m(9287),$=m(1188),W=m(5964),F=m(4555),J=m(906),L=m(6639),I=m(4843),K=m(8941),k=m(2722),U=m(4453),Q=m(6344),q=m(4300),ee=m(9242),te=m(3067),oe=m(9833),ne=m(4704),se=m(5396),ie=m(6140),re=m(5673),ae=m(5221),de=m(2672),le=m(9117),ce=m(2982),_e=m(4325),pe=m(5403),ge=m(9787);const me=["mainHereMap"],he=["selectedHereMap"],ue=["mainGoogleMap"],fe=["selectedGoogleMap"],ve=["deliveryFooter"],ye=["addressListEl"],Me=["topDeliveryContainerEl"],Ae=["searchContainerEl"],Ce=["confirmContainerEl"],be=["addressDetailsForm"],De=["buildingForm"],ke=["additionalNotesForm"],Se=["additionalNotesFormInList"],xe=["descriptionForm"],Pe=["locationAddress"],w=()=>({"border-radius":"25px",border:"2px solid #005142"}),H=s=>({"ion-padding-horizontal":s}),Oe=s=>({"ion-margin-bottom":s}),Ee=s=>({marginBottomAndScrollList:!0,"with-notes":s}),Fe=(s,d,t,o)=>({"ion-padding-vertical":s,confirmAddressContainer:d,selectOtherBranchContainer:t,"has-addresses":o});function Te(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-here-map",32,3),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.tapMarketEvt(n))}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("mapHeight",175)("mapStyles",e.lJ4(3,w))("wkngMethod",t.mapMode)}}function Be(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-googlemaps",32,4),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.tapMarketEvt(n))}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("mapHeight",175)("mapStyles",e.lJ4(3,w))("wkngMethod",t.mapMode)}}function Le(s,d){if(1&s&&(e.j41(0,"ion-col",29)(1,"div",30),e.DNE(2,Te,2,4,"app-here-map",31)(3,Be,2,4,"app-googlemaps",31),e.k0s()()),2&s){const t=e.XpG(4);e.R7$(2),e.Y8G("ngIf",t.useHereMapsComponent),e.R7$(),e.Y8G("ngIf",!t.useHereMapsComponent)}}function Ie(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-row",22,2)(2,"ion-row",23)(3,"ion-col",24)(4,"p",25),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"ion-col",26)(8,"ion-button",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.searchLocation())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()(),e.DNE(11,Le,4,2,"ion-col",28),e.k0s()}if(2&s){const t=e.XpG(3);e.R7$(5),e.JRh(e.bMT(6,3,"LANG_SELECT_DELIVERY_ADDRESS")),e.R7$(4),e.JRh(e.bMT(10,5,"LANG_ADD_NEW_ADDRESS")),e.R7$(2),e.Y8G("ngIf",t.showMap&&t.customerLocation&&!t.isUsingDefaultLocation)}}function we(s,d){1&s&&e.eu8(0)}function Re(s,d){if(1&s&&(e.qex(0),e.DNE(1,Ie,12,7,"ion-row",20)(2,we,1,0,"ng-container",21),e.bVm()),2&s){e.XpG();const t=e.sdS(5),o=e.XpG();e.R7$(),e.Y8G("ngIf",o.isDeliveryMode),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Ge(s,d){if(1&s){const t=e.RV6();e.j41(0,"ng-ionic-form",39,5),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.discoverAddress(n))})("onIconInputClick",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.onIconInputClicked())}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("metadata",t.formMetadata)}}function Ne(s,d){if(1&s){const t=e.RV6();e.j41(0,"ng-ionic-form",39,5),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.discoverAddress(n))})("onIconInputClick",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.onIconInputClicked())}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("metadata",t.formMetadata)}}function je(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.E5c("",null==t.address?null:t.address.street," ",null==t.address?null:t.address.district," ",null==t.address?null:t.address.city,"")}}function $e(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.LHq("",null==t?null:t.title," ",null==t||null==t.address?null:t.address.street," ",null==t||null==t.address?null:t.address.district," ",null==t||null==t.address?null:t.address.city," ")}}function Ue(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.LHq(" ",null==t||null==t.address?null:t.address.street," ",null==t||null==t.address?null:t.address.houseNumber," ",null==t||null==t.address?null:t.address.district," ",null==t||null==t.address?null:t.address.city," ")}}function He(s,d){if(1&s&&(e.j41(0,"a",46)(1,"b",47),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.main_text,""),e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.secondary_text,"")}}function Ve(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",42),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectAnAddressList(n))}),e.j41(1,"ion-avatar",43),e.nrm(2,"img",44),e.k0s(),e.DNE(3,je,2,3,"a",45)(4,$e,2,4,"a",45)(5,Ue,2,4,"a",45)(6,He,5,2,"a",45),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.R7$(2),e.Y8G("src",o.assets+"images/custom-location.svg",e.B4B),e.R7$(),e.Y8G("ngIf","street"==t.resultType||"locality"==t.resultType&&t.title),e.R7$(),e.Y8G("ngIf","place"==t.resultType),e.R7$(),e.Y8G("ngIf","houseNumber"==t.resultType),e.R7$(),e.Y8G("ngIf",t.place_id)}}function Xe(s,d){if(1&s&&(e.j41(0,"div",40),e.DNE(1,Ve,7,5,"ion-item",41),e.k0s()),2&s){const t=e.XpG(5);e.R7$(),e.Y8G("ngForOf",t.discover.discovered)}}function Ye(s,d){if(1&s&&(e.j41(0,"a",46)(1,"b",47),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.main_text,""),e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.secondary_text,"")}}function ze(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",42),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectAnAddressList(n))}),e.j41(1,"ion-avatar",43),e.nrm(2,"img",44),e.k0s(),e.DNE(3,Ye,5,2,"a",45),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.R7$(2),e.Y8G("src",o.assets+"images/custom-location.svg",e.B4B),e.R7$(),e.Y8G("ngIf",t.place_id)}}function Ze(s,d){if(1&s&&(e.j41(0,"div",40),e.DNE(1,ze,4,2,"ion-item",41),e.k0s()),2&s){const t=e.XpG(5);e.R7$(),e.Y8G("ngForOf",t.discover.discovered)}}function We(s,d){if(1&s&&(e.j41(0,"ion-row")(1,"ion-col",36),e.DNE(2,Ge,2,1,"ng-ionic-form",37)(3,Ne,2,1,"ng-ionic-form",37)(4,Xe,2,1,"div",38)(5,Ze,2,1,"div",38),e.k0s()()),2&s){const t=e.XpG(4);e.R7$(2),e.Y8G("ngIf",t.isDeliveryMode),e.R7$(),e.Y8G("ngIf",t.isPickupMode),e.R7$(),e.Y8G("ngIf",t.isDeliveryMode&&t.discover.discovered&&t.discover.discovered.length>0),e.R7$(),e.Y8G("ngIf",t.isPickupMode&&t.discover.discovered&&t.discover.discovered.length>0)}}function Je(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-here-map",54,6),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.tapMarketEvt(n))}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("fullscreen",!0)("wkngMethod",t.isPickupMode?"pickup":"delivery")}}function Ke(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-googlemaps",55,7),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.tapMarketEvt(n))})("centerChanged",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.onMapCenterChanged(n))})("onLocateClick",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.handleLocateFromMap())}),e.k0s()}if(2&s){const t=e.XpG(5);e.Y8G("fullscreen",!0)("showCenterMarker",t.isDeliveryMode)("showMarker",t.showCurrentLocationTooltip&&t.isDeliveryMode)("footerHeight",t.deliveryFooterHeight)("initialZoom",t.mapInitialZoom)("deliveryMarkerIcon","userLocationPin_snd.svg")("wkngMethod",t.isPickupMode?"pickup":"delivery")}}function Qe(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",56)(1,"div",57),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.searchLocation())}),e.j41(2,"span",58),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"ion-icon",59),e.k0s()()}2&s&&(e.R7$(3),e.JRh(e.bMT(4,1,"LANG_SEARCH_FOR_LOCATION")))}function qe(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",56)(1,"div",57),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.goBackToSearch())}),e.j41(2,"span",58),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"ion-icon",59),e.k0s()()}2&s&&(e.R7$(3),e.JRh(e.bMT(4,1,"LANG_SEARCH_FOR_LANDMARK")))}function et(s,d){if(1&s&&(e.j41(0,"p",65)(1,"b",66),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG(6);e.R7$(2),e.SpI(" ",t.addressSelected.structured_formatting.main_text," "),e.R7$(2),e.SpI(" ",t.addressSelected.structured_formatting.secondary_text," ")}}function tt(s,d){if(1&s&&(e.j41(0,"p",65)(1,"b",66),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG(6);e.R7$(2),e.SpI(" ",t.addressSelected.description," "),e.R7$(2),e.SpI(" ",t.addressSelected.resolvedAddress," ")}}function ot(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",60,8)(2,"div",61)(3,"p",62),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.DNE(6,et,5,2,"p",63)(7,tt,5,2,"p",63),e.k0s(),e.j41(8,"ion-button",64),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.confirmSelectedAddress())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()}if(2&s){const t=e.XpG(5);e.R7$(4),e.JRh(e.bMT(5,4,"LANG_DELIVERY_LOCATION")),e.R7$(2),e.Y8G("ngIf",t.addressSelected.structured_formatting),e.R7$(),e.Y8G("ngIf",!t.addressSelected.structured_formatting),e.R7$(2),e.SpI(" ",e.bMT(10,6,"LANG_THIS_LOCATION")," ")}}function nt(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function st(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",72),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranchFromNearbyList(n))}),e.j41(1,"ion-avatar",43),e.nrm(2,"img",44),e.k0s(),e.j41(3,"ion-label",73)(4,"ion-text",47)(5,"p",74),e.EFF(6),e.k0s()(),e.j41(7,"p",46),e.EFF(8),e.k0s()(),e.DNE(9,nt,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.R7$(2),e.Y8G("src",o.assets+"images/icon-branch-pickup.svg",e.B4B),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance)}}function it(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",67,8)(2,"div",61)(3,"p",68),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"ion-list",69),e.DNE(7,st,10,5,"ion-item",70),e.k0s(),e.j41(8,"ion-button",71),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.selectDifferentBranch())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()}if(2&s){const t=e.XpG(5);e.R7$(4),e.JRh(e.bMT(5,3,"LANG_NEARBY_STORES")),e.R7$(3),e.Y8G("ngForOf",t.top3NearbyForAddress),e.R7$(2),e.SpI(" ",e.bMT(10,5,"LANG_SELECT_DIFFERENT_BRANCH")," ")}}function rt(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",60,8)(2,"div",61)(3,"p",62),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p",65)(7,"b",66),e.EFF(8),e.k0s(),e.nrm(9,"br"),e.EFF(10),e.nrm(11,"br"),e.j41(12,"b",78),e.EFF(13),e.k0s()()(),e.j41(14,"ion-button",64),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.confirmSelectedBranch())}),e.EFF(15),e.nI1(16,"translate"),e.k0s()()}if(2&s){const t=e.XpG(5);e.R7$(4),e.JRh(e.bMT(5,6,"LANG_PICKUP_LOCATION")),e.R7$(4),e.JRh(t.selectedBranch.name),e.R7$(2),e.Lme(" ",t.selectedBranch.streetName,", ",t.selectedBranch.city," "),e.R7$(3),e.JRh(t.getBranchScheduleText(t.selectedBranch)),e.R7$(2),e.SpI(" ",e.bMT(16,8,"LANG_PICKUP_HERE")," ")}}function at(s,d){if(1&s&&(e.j41(0,"ion-row")(1,"ion-col",48),e.DNE(2,Je,2,2,"app-here-map",49)(3,Ke,2,7,"app-googlemaps",50)(4,Qe,6,3,"div",51)(5,qe,6,3,"div",51),e.k0s(),e.j41(6,"ion-col",29),e.DNE(7,ot,11,8,"div",52)(8,it,11,7,"div",53)(9,rt,17,10,"div",52),e.k0s()()),2&s){const t=e.XpG(4);e.R7$(2),e.Y8G("ngIf",t.useHereMapsComponent),e.R7$(),e.Y8G("ngIf",!t.useHereMapsComponent),e.R7$(),e.Y8G("ngIf",t.isDeliveryMode),e.R7$(),e.Y8G("ngIf",t.isPickupMode),e.R7$(2),e.Y8G("ngIf",t.isDeliveryMode&&t.addressSelected&&!0!==t.addressSelected),e.R7$(),e.Y8G("ngIf",t.isPickupMode&&t.addressSelected&&!t.selectedBranch&&t.top3NearbyForAddress.length>0),e.R7$(),e.Y8G("ngIf",t.isPickupMode&&t.selectedBranch)}}function dt(s,d){if(1&s){const t=e.RV6();e.qex(0),e.j41(1,"ion-row",33)(2,"ion-col",29)(3,"img",34),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.handleBackNavigation())}),e.k0s(),e.j41(4,"p",35),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.DNE(7,We,6,4,"ion-row",17)(8,at,10,7,"ion-row",17),e.bVm()}if(2&s){const t=e.XpG(3);e.R7$(3),e.Y8G("src",t.assets+"images/back.svg",e.B4B),e.R7$(2),e.JRh(e.bMT(6,4,t.isPickupMode?"LANG_SELECT_PICKUP_BRANCH":"LANG_SELECT_DELIVERY_ADDRESS")),e.R7$(2),e.Y8G("ngIf",!t.addressSelected),e.R7$(),e.Y8G("ngIf",t.addressSelected)}}function lt(s,d){1&s&&e.eu8(0)}function ct(s,d){if(1&s){const t=e.RV6();
1e.j41(0,"div",87)(1,"ion-row",88)(2,"ion-col",29)(3,"ion-button",89),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.goBackToMenu())}),e.nrm(4,"img",90),e.j41(5,"span",91),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()(),e.j41(8,"ion-row",92)(9,"ion-col",93)(10,"p",94),e.EFF(11),e.nI1(12,"translate"),e.k0s()(),e.j41(13,"ion-col",24)(14,"ion-button",95),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.searchLocation())}),e.EFF(15),e.nI1(16,"translate"),e.k0s()()(),e.DNE(17,lt,1,0,"ng-container",21),e.k0s()}if(2&s){e.XpG(3);const t=e.sdS(5),o=e.XpG();e.R7$(4),e.Y8G("src",o.assets+"images/back.svg",e.B4B),e.R7$(2),e.JRh(e.bMT(7,5,"LANG_DELIVERY_CART")),e.R7$(5),e.JRh(e.bMT(12,7,"LANG_SELECT_DELIVERY_ADDRESS")),e.R7$(4),e.JRh(e.bMT(16,9,"LANG_ADD_NEW_ADDRESS")),e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function _t(s,d){if(1&s&&(e.j41(0,"a",46)(1,"b",47),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.main_text,""),e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.secondary_text,"")}}function pt(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",42),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(7);return e.Njj(i.selectAddressForPickupDesktop(n))}),e.j41(1,"ion-avatar",43),e.nrm(2,"img",44),e.k0s(),e.DNE(3,_t,5,2,"a",45),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(7);e.R7$(2),e.Y8G("src",o.assets+"images/custom-location.svg",e.B4B),e.R7$(),e.Y8G("ngIf",t.place_id)}}function gt(s,d){if(1&s&&(e.j41(0,"div",40),e.DNE(1,pt,4,2,"ion-item",41),e.k0s()),2&s){const t=e.XpG(6);e.R7$(),e.Y8G("ngForOf",t.discover.discovered)}}function mt(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",61)(1,"ng-ionic-form",39,5),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.discoverAddress(n))})("onIconInputClick",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.onIconInputClicked())}),e.k0s(),e.DNE(3,gt,2,1,"div",38),e.k0s()}if(2&s){const t=e.XpG(5);e.R7$(),e.Y8G("metadata",t.formMetadata),e.R7$(2),e.Y8G("ngIf",t.discover.discovered&&t.discover.discovered.length>0)}}function ht(s,d){if(1&s&&e.nrm(0,"img",107),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function ut(s,d){if(1&s&&e.nrm(0,"img",108),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-branch-pickup.svg",e.B4B)}}function ft(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function vt(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranchDesktop(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,ht,1,1,"img",103)(3,ut,1,1,"img",104),e.k0s(),e.j41(4,"ion-label",73)(5,"ion-text",105)(6,"p",74),e.EFF(7),e.k0s()(),e.j41(8,"p",106),e.EFF(9),e.k0s()(),e.DNE(10,ft,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.AVh("selected",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(2),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)!==t.id),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance)}}function yt(s,d){if(1&s&&(e.j41(0,"div",61)(1,"p",99),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100),e.DNE(5,vt,11,8,"ion-item",101),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,2,"LANG_NEARBY_STORES")),e.R7$(3),e.Y8G("ngForOf",t.top3NearbyForAddress)}}function Mt(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG(6);e.R7$(2),e.JRh(t.formatDistance(t.selectedBranch.distance))}}function At(s,d){if(1&s&&(e.j41(0,"div",61)(1,"p",99),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100)(5,"ion-item",109)(6,"ion-avatar",43),e.nrm(7,"img",107),e.k0s(),e.j41(8,"ion-label",73)(9,"ion-text",105)(10,"p",74),e.EFF(11),e.k0s()(),e.j41(12,"p",106),e.EFF(13),e.k0s(),e.j41(14,"p",78),e.EFF(15),e.k0s()(),e.DNE(16,Mt,3,1,"div",75),e.k0s()()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,7,"LANG_SELECTED_STORE")),e.R7$(5),e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B),e.R7$(4),e.JRh(t.selectedBranch.name),e.R7$(2),e.Lme("",t.selectedBranch.streetName,", ",t.selectedBranch.city,""),e.R7$(2),e.JRh(t.getBranchScheduleText(t.selectedBranch)),e.R7$(),e.Y8G("ngIf",t.selectedBranch.distance)}}function Ct(s,d){if(1&s&&e.nrm(0,"img",107),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function bt(s,d){if(1&s&&e.nrm(0,"img",108),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-branch-pickup.svg",e.B4B)}}function Dt(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function kt(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranchDesktop(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,Ct,1,1,"img",103)(3,bt,1,1,"img",104),e.k0s(),e.j41(4,"ion-label",73)(5,"ion-text",105)(6,"p",74),e.EFF(7),e.k0s()(),e.j41(8,"p",106),e.EFF(9),e.k0s()(),e.DNE(10,Dt,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.AVh("selected",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(2),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)!==t.id),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance&&!o.isUsingDefaultLocation)}}function St(s,d){if(1&s&&(e.j41(0,"div",61)(1,"p",99),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100),e.DNE(5,kt,11,8,"ion-item",101),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,2,"LANG_PREFERRED_STORES")),e.R7$(3),e.Y8G("ngForOf",t.preferredBranches
1)}}function xt(s,d){if(1&s&&e.nrm(0,"img",107),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function Pt(s,d){if(1&s&&e.nrm(0,"img",108),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-branch-pickup.svg",e.B4B)}}function Ot(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function Et(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranchDesktop(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,xt,1,1,"img",103)(3,Pt,1,1,"img",104),e.k0s(),e.j41(4,"ion-label",73)(5,"ion-text",105)(6,"p",74),e.EFF(7),e.k0s()(),e.j41(8,"p",106),e.EFF(9),e.k0s()(),e.DNE(10,Ot,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.AVh("selected",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(2),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)!==t.id),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance)}}function Ft(s,d){if(1&s&&(e.j41(0,"div")(1,"p",99),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100),e.DNE(5,Et,11,8,"ion-item",101),e.nI1(6,"slice"),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,2,"LANG_NEARBY_STORES")),e.R7$(3),e.Y8G("ngForOf",e.brH(6,4,t.nearbyBranches,0,3))}}function Tt(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",87)(1,"ion-row",88)(2,"ion-col",29)(3,"ion-button",89),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.goBackToMenu())}),e.nrm(4,"img",90),e.j41(5,"span",91),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()(),e.j41(8,"ion-row",92)(9,"ion-col",93)(10,"p",94),e.EFF(11),e.nI1(12,"translate"),e.k0s()(),e.j41(13,"ion-col",24)(14,"ion-button",95),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.toggleDesktopPickupSearch())}),e.EFF(15),e.nI1(16,"translate"),e.k0s()()(),e.DNE(17,mt,4,2,"div",96)(18,yt,6,4,"div",96)(19,At,17,9,"div",96)(20,St,6,4,"div",96)(21,Ft,7,8,"div",17),e.j41(22,"div",97)(23,"ion-button",98),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.confirmSelectedBranch())}),e.EFF(24),e.nI1(25,"translate"),e.k0s()()()}if(2&s){const t=e.XpG(4);e.R7$(4),e.Y8G("src",t.assets+"images/back.svg",e.B4B),e.R7$(2),e.JRh(e.bMT(7,11,"LANG_PICKUP_CART")),e.R7$(5),e.JRh(e.bMT(12,13,"LANG_SELECT_PICKUP_BRANCH")),e.R7$(4),e.SpI(" ",e.bMT(16,15,"LANG_SEARCH_STORE")," "),e.R7$(2),e.Y8G("ngIf",t.showDesktopPickupSearch),e.R7$(),e.Y8G("ngIf",t.top3NearbyForAddress&&t.top3NearbyForAddress.length>0),e.R7$(),e.Y8G("ngIf",t.selectedBranch&&!t.isBranchInLists(t.selectedBranch)),e.R7$(),e.Y8G("ngIf",t.preferredBranches&&t.preferredBranches.length>0),e.R7$(),e.Y8G("ngIf",t.nearbyBranches&&t.nearbyBranches.length>0),e.R7$(2),e.Y8G("disabled",!t.selectedBranch),e.R7$(),e.SpI(" ",e.bMT(25,17,t.isChangeBranchOnlyMode?"LANG_SELECT_BRANCH":"LANG_PICKUP_HERE")," ")}}function Bt(s,d){if(1&s&&(e.j41(0,"p",74),e.EFF(1),e.k0s()),2&s){const t=e.XpG(6);e.R7$(),e.JRh(t.addressSelected.description)}}function Lt(s,d){1&s&&(e.j41(0,"p",74),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"LANG_SELECTED_LOCATION")))}function It(s,d){if(1&s&&(e.j41(0,"p",129),e.EFF(1),e.k0s()),2&s){const t=e.XpG(6);e.R7$(),e.JRh(t.addressSelected.resolvedAddress)}}function wt(s,d){if(1&s&&(e.j41(0,"p",129),e.EFF(1),e.k0s()),2&s){const t=e.XpG(6);e.R7$(),e.Lme("",null==t.addressSelected.structured_formatting?null:t.addressSelected.structured_formatting.main_text," ",null==t.addressSelected.structured_formatting?null:t.addressSelected.structured_formatting.secondary_text,"")}}function Rt(s,d){if(1&s&&(e.j41(0,"ion-item",125)(1,"ion-avatar",43),e.nrm(2,"img",126),e.k0s(),e.j41(3,"ion-label",73)(4,"ion-text",105),e.DNE(5,Bt,2,1,"p",127)(6,Lt,3,3,"p",127),e.k0s(),e.DNE(7,It,2,1,"p",128)(8,wt,2,2,"p",128),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B),e.R7$(3),e.Y8G("ngIf",t.addressSelected.description),e.R7$(),e.Y8G("ngIf",!t.addressSelected.description),e.R7$(),e.Y8G("ngIf",t.addressSelected.resolvedAddress),e.R7$(),e.Y8G("ngIf",!t.addressSelected.resolvedAddress&&t.addressSelected.structured_formatting)}}
1function Gt(s,d){if(1&s&&(e.j41(0,"ion-item",125)(1,"ion-avatar",43),e.nrm(2,"img",126),e.k0s(),e.j41(3,"ion-label",73)(4,"ion-text",105)(5,"p",74),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"p",129),e.EFF(9),e.k0s()()()),2&s){const t=e.XpG(5);e.R7$(2),e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B),e.R7$(4),e.JRh(e.bMT(7,3,"LANG_CURRENT_LOCATION")),e.R7$(3),e.JRh(t.currentPositionAddress)}}function Nt(s,d){if(1&s&&(e.j41(0,"ion-item",125)(1,"ion-avatar",43),e.nrm(2,"img",126),e.k0s(),e.j41(3,"ion-label",73)(4,"ion-text",105)(5,"p",74),e.EFF(6),e.k0s()(),e.j41(7,"p",129),e.EFF(8),e.k0s()()()),2&s){const t=e.XpG(5);e.R7$(2),e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B),e.R7$(4),e.JRh(t.selectedAddress.description),e.R7$(2),e.JRh(t.selectedAddress.resolvedAddress)}}function jt(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-chip",130),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(5);return e.Njj(i.selectAddressType(n.id))}),e.j41(1,"ion-avatar"),e.nrm(2,"img",131),e.k0s(),e.j41(3,"ion-label"),e.EFF(4),e.k0s()()}if(2&s){const t=d.$implicit,o=e.XpG(5);e.AVh("selected",o.selectedAddressType===t.id)("disabled",o.isAddressTypeDisabled(t.id)),e.R7$(2),e.Y8G("src",o.assets+"images/"+o.getChipIcon(t),e.B4B)("alt",t.label),e.R7$(2),e.JRh(t.label)}}function $t(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",132)(1,"ng-ionic-form",113,12),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.handleDescriptionChange(n))}),e.k0s()()}if(2&s){const t=e.XpG(5);e.R7$(),e.Y8G("metadata",t.descriptionFormMetadata)}}function Ut(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",133),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.openModalAddPhotoAddress())}),e.j41(1,"p",134),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"img",135),e.k0s()}2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"LANG_ADD_PHOTO_BUILDING_ENTRANCE")," "))}function Ht(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",136)(1,"div",137)(2,"img",138),e.bIt("error",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.onAddressPhotoError(n))}),e.k0s()(),e.j41(3,"div",139)(4,"p",46),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",140)(8,"ion-button",141),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.openModalAddPhotoAddress())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()}if(2&s){const t=e.XpG(5);e.R7$(2),e.Y8G("src",t.getSelectedAddressPhotoUrl(t.selectedAddress),e.B4B),e.R7$(3),e.SpI(" ",e.bMT(6,3,"LANG_PHOTO_OF_ENTRANCE_DELIVERY_ADDRESS")," "),e.R7$(4),e.SpI(" ",e.bMT(10,5,"LANG_EDIT")," ")}}function Vt(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",110)(1,"ion-row",88)(2,"ion-col",29)(3,"ion-button",89),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.goBackDesktop())}),e.nrm(4,"img",90),e.j41(5,"span",91),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()(),e.j41(8,"div",61)(9,"p",62),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.DNE(12,Rt,9,5,"ion-item",111)(13,Gt,10,5,"ion-item",111)(14,Nt,9,3,"ion-item",111),e.k0s(),e.j41(15,"div")(16,"p",112),e.EFF(17),e.nI1(18,"translate"),e.k0s(),e.j41(19,"ng-ionic-form",113,9),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.handleAddressDetailsChange(n))}),e.k0s()(),e.j41(21,"div")(22,"p",112),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.j41(25,"ng-ionic-form",113,10),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.handleBuildingChange(n))}),e.k0s()(),e.j41(27,"div",114)(28,"div",115),e.DNE(29,jt,5,7,"ion-chip",116),e.k0s()(),e.DNE(30,$t,3,1,"div",117),e.j41(31,"div",118)(32,"p",112),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.j41(35,"div",119)(36,"ng-ionic-form",113,11),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onAdditionalNotesChange(n))}),e.k0s()(),e.DNE(38,Ut,5,3,"div",120)(39,Ht,11,7,"div",121),e.k0s(),e.j41(40,"div",122)(41,"ion-button",123),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.isEditAddressOnly||n.isCreateAddressOnly?n.cancelAddressOnlyFlow():n.goBackDesktop())}),e.EFF(42),e.nI1(43,"translate"),e.k0s(),e.j41(44,"ion-button",124),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.isEditAddressOnly?n.saveEditedAddressOnly():n.saveAndContinue())}),e.EFF(45),e.nI1(46,"translate"),e.k0s()()()}if(2&s){const t=e.XpG(4);e.R7$(4),e.Y8G("src",t.assets+"images/back.svg",e.B4B),e.R7$(2),e.JRh(e.bMT(7,19,"LANG_DELIVERY_CART")),e.R7$(4),e.JRh(e.bMT(11,21,"LANG_DELIVERY_LOCATION")),e.R7$(2),e.Y8G("ngIf",t.addressSelected),e.R7$(),e.Y8G("ngIf",!t.addressSelected&&"current"===t.selectedAddress),e.R7$(),e.Y8G("ngIf",!t.addressSelected&&t.selectedAddress&&"current"!==t.selectedAddress),e.R7$(3),e.JRh(e.bMT(18,23,"LANG_ADDRESS_DETAILS")),e.R7$(2),e.Y8G("metadata",t.addressDetail
1sFormMetadata),e.R7$(4),e.JRh(e.bMT(24,25,"LANG_BUILDING_DETAILS")),e.R7$(2),e.Y8G("metadata",t.buildingFormMetadata),e.R7$(4),e.Y8G("ngForOf",t.addressTypes),e.R7$(),e.Y8G("ngIf","C"===t.selectedAddressType),e.R7$(3),e.JRh(e.bMT(34,27,"LANG_ADDITIONAL_NOTES")),e.R7$(3),e.Y8G("metadata",t.additionalNotesFormMetadata),e.R7$(2),e.Y8G("ngIf",!t.getSelectedAddressPhotoUrl(t.selectedAddress)),e.R7$(),e.Y8G("ngIf",t.getSelectedAddressPhotoUrl(t.selectedAddress)),e.R7$(3),e.SpI(" ",e.bMT(43,29,"LANG_CANCEL")," "),e.R7$(2),e.Y8G("disabled",!t.addressDetailsData||"C"===t.selectedAddressType&&!(null!=t.descriptionForm&&t.descriptionForm.getValue("description"))),e.R7$(),e.SpI(" ",e.bMT(46,31,t.isEditAddressOnly?"LANG_SAVE_CHANGES":"LANG_CONFIRM_ADDRESS")," ")}}function Xt(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-here-map",142,3),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.tapMarketEvt(n))}),e.k0s()}if(2&s){const t=e.XpG(4);e.Y8G("mapStyles",e.lJ4(2,w))("wkngMethod",t.isPickupMode?"pickup":"delivery")}}function Yt(s,d){if(1&s){const t=e.RV6();e.j41(0,"app-googlemaps",143,4),e.bIt("tapMarker",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.tapMarketEvt(n))})("centerChanged",function(n){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onMapCenterChanged(n))})("onLocateClick",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.selectCurrentLocation())}),e.k0s()}if(2&s){const t=e.XpG(4);e.Y8G("mapStyles",e.lJ4(5,w))("wkngMethod",t.isPickupMode?"pickup":"delivery")("showMarker",t.isDeliveryMode&&!t.showDesktopAddressDetails&&t.showCurrentLocationTooltip)("showCenterMarker",t.isDeliveryMode&&t.showDesktopAddressDetails)("deliveryMarkerIcon","userLocationPin_snd.svg")}}function zt(s,d){if(1&s&&(e.qex(0),e.j41(1,"ion-row",79)(2,"ion-col",80),e.DNE(3,ct,18,11,"div",81)(4,Tt,26,19,"div",81)(5,Vt,47,33,"div",82),e.k0s(),e.j41(6,"ion-col",83)(7,"div",84),e.DNE(8,Xt,2,3,"app-here-map",85)(9,Yt,2,6,"app-googlemaps",86),e.k0s()()(),e.bVm()),2&s){const t=e.XpG(3);e.R7$(3),e.Y8G("ngIf",t.isDeliveryMode&&!t.showDesktopAddressDetails),e.R7$(),e.Y8G("ngIf",t.isPickupMode),e.R7$(),e.Y8G("ngIf",t.isDeliveryMode&&t.showDesktopAddressDetails),e.R7$(3),e.Y8G("ngIf",t.useHereMapsComponent),e.R7$(),e.Y8G("ngIf",!t.useHereMapsComponent)}}function Zt(s,d){if(1&s&&e.DNE(0,dt,9,6,"ng-container",17)(1,zt,10,5,"ng-container",17),2&s){const t=e.XpG(2);e.Y8G("ngIf",t.isMobile&&t.searchingLocation),e.R7$(),e.Y8G("ngIf",!t.isMobile)}}function Wt(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-row",146,13)(2,"ion-col")(3,"div",57),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.searchLocation())}),e.j41(4,"span",58),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.nrm(7,"ion-icon",59),e.k0s()()()}2&s&&(e.R7$(5),e.JRh(e.bMT(6,1,"LANG_SEARCH_FOR_LOCATION")))}function Jt(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.E5c("",null==t.address?null:t.address.street," ",null==t.address?null:t.address.district," ",null==t.address?null:t.address.city,"")}}function Kt(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.LHq("",null==t?null:t.title," ",null==t||null==t.address?null:t.address.street," ",null==t||null==t.address?null:t.address.district," ",null==t||null==t.address?null:t.address.city," ")}}function Qt(s,d){if(1&s&&(e.j41(0,"a",46),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.LHq(" ",null==t||null==t.address?null:t.address.street," ",null==t||null==t.address?null:t.address.houseNumber," ",null==t||null==t.address?null:t.address.district," ",null==t||null==t.address?null:t.address.city," ")}}function qt(s,d){if(1&s&&(e.j41(0,"a",46)(1,"b",47),e.EFF(2),e.k0s(),e.nrm(3,"br"),e.EFF(4),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.main_text,""),e.R7$(2),e.SpI(" ",null==t?null:t.structured_formatting.secondary_text,"")}}function eo(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",149),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(5);return e.Njj(i.selectAnAddressList(n))}),e.j41(1,"ion-avatar",43),e.nrm(2,"img",44),e.k0s(),e.DNE(3,Jt,2,3,"a",45)(4,Kt,2,4,"a",45)(5,Qt,2,4,"a",45)(6,qt,5,2,"a",45),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(5);e.R7$(2),e.Y8G("src",o.assets+"images/custom-location.svg",e.B4B),e.R7$(),e.Y8G("ngIf","street"==t.resultType||"locality"==t.resultType&&t.title),e.R7$(),e.Y8G("ngIf","place"==t.resultType),e.R7$(),e.Y8G("ngIf","houseNumber"==t.resultType),e.R7$(),e.Y8G("ngIf",t.place_id)}}function to(s,d){if(1&s&&(e.j41(0,"div",40),e.DNE(1,eo,7,5,"ion-item",148),e.k0s()),2&s){const t=e.XpG(4);e.R7$(),e.Y8G("ngForOf",t.discover.discovered)}}function oo(s,d){if(1&s){const t=e.RV6();
1e.j41(0,"ion-row",147)(1,"ion-col",61)(2,"ng-ionic-form",39,5),e.bIt("onFormChange",function(n){e.eBV(t);const i=e.XpG(3);return e.Njj(i.discoverAddress(n))})("onIconInputClick",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.onIconInputClicked())}),e.k0s(),e.DNE(4,to,2,1,"div",38),e.k0s()()}if(2&s){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(3,H,t.isMobile)),e.R7$(2),e.Y8G("metadata",t.formMetadata),e.R7$(2),e.Y8G("ngIf",t.discover.discovered&&t.discover.discovered.length>0)}}function no(s,d){if(1&s&&e.nrm(0,"img",126),2&s){const t=e.XpG(5);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function so(s,d){if(1&s&&e.nrm(0,"img",157),2&s){const t=e.XpG(5);e.Y8G("src",t.assets+"images/custom-location.svg",e.B4B)}}function io(s,d){1&s&&(e.j41(0,"p",129),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"LANG_USE_YOUR_DEVICE_LOCATION")," "))}function ro(s,d){if(1&s&&(e.j41(0,"p",129),e.EFF(1),e.k0s()),2&s){const t=e.XpG(5);e.R7$(),e.SpI(" ",t.currentPositionAddress," ")}}function ao(s,d){if(1&s&&e.nrm(0,"img",126),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function lo(s,d){if(1&s&&e.nrm(0,"img",164),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/hangout.svg",e.B4B)}}function co(s,d){if(1&s&&e.nrm(0,"img",157),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/other.svg",e.B4B)}}function _o(s,d){if(1&s&&e.nrm(0,"img",165),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/house.svg",e.B4B)}}function po(s,d){if(1&s&&e.nrm(0,"img",166),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/office.svg",e.B4B)}}function go(s,d){if(1&s&&e.nrm(0,"img",167),2&s){const t=e.XpG(6);e.Y8G("src",t.assets+"images/noTypeAddress.svg",e.B4B)}}function mo(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(5);return e.Njj(i.selectSavedAddress(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,ao,1,1,"img",155)(3,lo,1,1,"img",158)(4,co,1,1,"img",156)(5,_o,1,1,"img",159)(6,po,1,1,"img",160)(7,go,1,1,"img",161),e.k0s(),e.j41(8,"ion-label",73)(9,"ion-text",105)(10,"p",74),e.EFF(11),e.k0s()(),e.j41(12,"p",129),e.EFF(13),e.k0s()(),e.j41(14,"div",162),e.bIt("click",function(n){const i=e.eBV(t).$implicit,r=e.XpG(5);return e.Njj(r.edit(i,n))}),e.j41(15,"ion-text",163),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()}if(2&s){const t=d.$implicit,o=e.XpG(5);e.AVh("selected",o.selectedAddress===t),e.R7$(2),e.Y8G("ngIf",o.selectedAddress===t),e.R7$(),e.Y8G("ngIf","F"==t.addressType&&o.selectedAddress!==t),e.R7$(),e.Y8G("ngIf","C"==t.addressType&&o.selectedAddress!==t),e.R7$(),e.Y8G("ngIf","H"==t.addressType&&o.selectedAddress!==t),e.R7$(),e.Y8G("ngIf","O"==t.addressType&&o.selectedAddress!==t),e.R7$(),e.Y8G("ngIf","F"!=t.addressType&&"C"!=t.addressType&&"H"!=t.addressType&&"O"!=t.addressType&&o.selectedAddress!==t),e.R7$(4),e.JRh(t.description),e.R7$(2),e.JRh(t.resolvedAddress),e.R7$(3),e.JRh(e.bMT(17,11,"LANG_EDIT"))}}function ho(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-list",153,14)(2,"ion-item",154),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.selectCurrentLocation())}),e.j41(3,"ion-avatar",43),e.DNE(4,no,1,1,"img",155)(5,so,1,1,"img",156),e.k0s(),e.j41(6,"ion-label",73)(7,"ion-text",105)(8,"p",74),e.EFF(9),e.nI1(10,"translate"),e.k0s()(),e.DNE(11,io,3,3,"p",128)(12,ro,2,1,"p",128),e.k0s()(),e.DNE(13,mo,18,13,"ion-item",101),e.k0s()}if(2&s){const t=e.XpG(4);e.xc7("max-height",t.isMobile?t.mobileListMaxHeight:null),e.Y8G("ngClass",e.eq3(13,Ee,t.selectedAddress&&"current"!==t.selectedAddress&&t.selectedAddress.isFromSavedList)),e.R7$(2),e.AVh("selected","current"===t.selectedAddress),e.R7$(2),e.Y8G("ngIf","current"===t.selectedAddress),e.R7$(),e.Y8G("ngIf","current"!==t.selectedAddress),e.R7$(4),e.JRh(e.bMT(10,11,"LANG_CURRENT_LOCATION")),e.R7$(2),e.Y8G("ngIf",!t.currentPositionAddress),e.R7$(),e.Y8G("ngIf",t.currentPositionAddress),e.R7$(),e.Y8G("ngForOf",t.addresses)}}function uo(s,d){if(1&s&&e.nrm(0,"img",107),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function fo(s,d){if(1&s&&e.nrm(0,"img",108),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-branch-pickup.svg",e.B4B)}}function vo(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function yo(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranch(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,uo,1,1,"img",103)(3,fo,1,1,"img",104),e.k0s(),e.j41(4,"ion-label",73)(5,"ion-text",105)(6,"p",74),e.EFF(7),e.k0s()(),e.j41(8,"p",106),e.EFF(9),e.k0s()(),e.DNE(10,vo,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.AVh("selected",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(2),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)!==t.id),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance&&!o.isUsingDefaultLocation)}}function Mo(s,d){if(1&s&&(e.j41(0,"div")(1,"p",169),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100),e.DNE(5,yo,11,8,"ion-item",101),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,2,"LANG_PREFERRED_STORES")),e.R7$(3),e.Y8G("ngForOf",t.preferredBranches
1)}}function Ao(s,d){if(1&s&&e.nrm(0,"img",107),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-address-selected.svg",e.B4B)}}function Co(s,d){if(1&s&&e.nrm(0,"img",108),2&s){const t=e.XpG(7);e.Y8G("src",t.assets+"images/icon-branch-pickup.svg",e.B4B)}}function bo(s,d){if(1&s&&(e.j41(0,"div",76)(1,"ion-text",77),e.EFF(2),e.k0s()()),2&s){const t=e.XpG().$implicit,o=e.XpG(6);e.R7$(2),e.JRh(o.formatDistance(t.distance))}}function Do(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-item",102),e.bIt("click",function(){const n=e.eBV(t).$implicit,i=e.XpG(6);return e.Njj(i.selectBranch(n))}),e.j41(1,"ion-avatar",43),e.DNE(2,Ao,1,1,"img",103)(3,Co,1,1,"img",104),e.k0s(),e.j41(4,"ion-label",73)(5,"ion-text",105)(6,"p",74),e.EFF(7),e.k0s()(),e.j41(8,"p",106),e.EFF(9),e.k0s()(),e.DNE(10,bo,3,1,"div",75),e.k0s()}if(2&s){const t=d.$implicit,o=e.XpG(6);e.AVh("selected",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(2),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)===t.id),e.R7$(),e.Y8G("ngIf",(null==o.selectedBranch?null:o.selectedBranch.id)!==t.id),e.R7$(4),e.JRh(t.name),e.R7$(2),e.Lme("",t.streetName,", ",t.city,""),e.R7$(),e.Y8G("ngIf",t.distance)}}function ko(s,d){if(1&s&&(e.j41(0,"div")(1,"p",169),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ion-list",100),e.DNE(5,Do,11,8,"ion-item",101),e.k0s()()),2&s){const t=e.XpG(5);e.R7$(2),e.JRh(e.bMT(3,2,"LANG_NEARBY_STORES")),e.R7$(3),e.Y8G("ngForOf",t.nearbyBranches)}}function So(s,d){if(1&s&&(e.j41(0,"div",168),e.DNE(1,Mo,6,4,"div",17)(2,ko,6,4,"div",17),e.k0s()),2&s){const t=e.XpG(4);e.R7$(),e.Y8G("ngIf",t.preferredBranches&&t.preferredBranches.length>0),e.R7$(),e.Y8G("ngIf",t.nearbyBranches&&t.nearbyBranches.length>0)}}function xo(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",133),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.openModalAddPhotoAddress())}),e.j41(1,"p",134),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"img",135),e.k0s()}2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"LANG_ADD_PHOTO_BUILDING_ENTRANCE")," "))}function Po(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",136)(1,"div",137)(2,"img",138),e.bIt("error",function(n){e.eBV(t);const i=e.XpG(5);return e.Njj(i.onAddressPhotoError(n))}),e.k0s()(),e.j41(3,"div",139)(4,"p",46),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",140)(8,"ion-button",141),e.bIt("click",function(){e.eBV(t);const n=e.XpG(5);return e.Njj(n.openModalAddPhotoAddress())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()}if(2&s){const t=e.XpG(5);e.R7$(2),e.Y8G("src",t.getSelectedAddressPhotoUrl(t.selectedAddress),e.B4B),e.R7$(3),e.SpI(" ",e.bMT(6,3,"LANG_PHOTO_OF_ENTRANCE_DELIVERY_ADDRESS")," "),e.R7$(4),e.SpI(" ",e.bMT(10,5,"LANG_EDIT")," ")}}function Oo(s,d){if(1&s&&(e.j41(0,"div",118)(1,"p",112),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",119),e.nrm(5,"ng-ionic-form",170,15),e.k0s(),e.DNE(7,xo,5,3,"div",120)(8,Po,11,7,"div",121),e.k0s()),2&s){const t=e.XpG(4);e.R7$(2),e.JRh(e.bMT(3,4,"LANG_ADDITIONAL_NOTES")),e.R7$(3),e.Y8G("metadata",t.additionalNotesFormMetadata),e.R7$(2),e.Y8G("ngIf",!t.getSelectedAddressPhotoUrl(t.selectedAddress)),e.R7$(),e.Y8G("ngIf",t.getSelectedAddressPhotoUrl(t.selectedAddress))}}function Eo(s,d){if(1&s&&(e.j41(0,"ion-row",147)(1,"ion-col",147),e.DNE(2,ho,14,15,"ion-list",150)(3,So,3,2,"div",151)(4,Oo,9,6,"div",152),e.k0s()()),2&s){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(5,H,t.isMobile&&t.isDeliveryMode)),e.R7$(),e.Y8G("ngClass",e.eq3(7,Oe,!t.hasListInternalScroll)),e.R7$(),e.Y8G("ngIf",t.isDeliveryMode),e.R7$(),e.Y8G("ngIf",t.isPickupMode),e.R7$(),e.Y8G("ngIf",t.selectedAddress&&"current"!==t.selectedAddress&&t.selectedAddress.isFromSavedList&&!t.isMobile)}}function Fo(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-button",98),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.confirmAddress())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&s){const t=e.XpG(4);e.Y8G("disabled",!t.selectedAddress||"current"===t.selectedAddress&&t.isUsingDefaultLocation),e.R7$(),e.SpI(" ",e.bMT(2,2,"LANG_CONFIRM_ADDRESS")," ")}}function To(s,d){if(1&s){const t=e.RV6();e.j41(0,"ion-button",173),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.selectDifferentBranch())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"LANG_SELECT_DIFFERENT_BRANCH")," "))}function Bo(s,d){if(1&s&&(e.j41(0,"div",147,16),e.DNE(2,Fo,3,4,"ion-button",171)(3,To,3,3,"ion-button",172),e.k0s()),2&s){const t=e.XpG(3);e.Y8G("ngClass",e.ziG(3,Fe,!t.isIos,t.isDeliveryMode,t.isPickupMode,t.isDeliveryMode&&t.addresses&&t.addresses.length>0||t.isPickupMode&&(t.preferredBranches.length>0||t.nearbyBranches.length>0))),e.R7$(2),e.Y8G("ngIf",t.isDeliveryMode),e.R7$(),e.Y8G("ngIf",t.isPickupMode&&!t.loadingBranches)}}function Lo(s,d){if(1&s&&e.DNE(0,Wt,8,3,"ion-row",144)(1,oo,5,5,"ion-row",145)(2,Eo,5,9,"ion-row",145)(3,Bo,4,8,"div",145),2&s){const t=e.XpG(2);e.Y8G("ngIf",t.isMobile&&t.isDeliveryMode),e.R7$(),e.Y8G("ngIf",!t.isMobile&&t.isDeliveryMode&&0==t.addresses.length&&!t.currentPositionAddress),e.R7$(),e.Y8G("ngIf",t.isDeliveryMode&&(t.addresses&&t.addresses.length>0||t.currentPositionAddress)||t.isPickupMode&&(t.preferredBranches.length>0||t.nearbyBranches.length>0)),e.R7$(),e.Y8G("ngIf",!(t.isPickupMode&&t.loadingBranches))}}function Io(s,d){if(1&s){const t=e.RV6();e.j41(0,"div",174)(1,"div",175)(2,"span",176),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"a",177),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.openLocationHelp())}),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"button",178),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.hideLocationPermissionPopup())}),e.EFF(9," \u2715 "),e.k0s()()}if(2&s){const t=e.XpG(2);e.AVh("show",t.showLocationPermissionPopup),e.R7$(3),e.JRh(e.bMT(4,4,"LANG_GOOGLE_MAPS_PERMISSION")),e.R7$(3),e.JRh(e.bMT(7,6,"LANG_LEARN_MORE"))}}function wo(s,d){if(1&s&&(e.qex(0),e.DNE(1,Re,3,2,"ng-container",18)(2,Zt,2,2,"ng-template",null,0,e.C5r)(4,Lo,4,4,"ng-template",null,1,e.C5r)(6,Io,10,8,"div",19),e.bVm()),2&s){const t=e.sdS(3),o=e.XpG();e.R7$(),e.Y8G("ngIf",o.isMobile&&!o.searchingLocation)("ngIfElse",t),e.R7$(5),e.Y8G("ngIf",!o.isMobile)}}let Ro=(()=>{class s{set orderType(t){this._orderType="pickup"===t?F.kt.Recoger:F.kt.Domicilio,console.log("\u{1f504} Order type set to:",this._orderType,"(received:",t,")")}get orderType(){return this._orderType}get isPickupMode(){return this.orderType===F.kt.Recoger}get isDeliveryMode(){return this.orderType===F.kt.Domicilio}get isChangeBranchOnlyMode(){return this.deliveryService.getChangeBranchOnly()}get shouldShowModalContent(){return!!(!this.isMobile||this.isPickupMode||this.addresses&&this.addresses.length>0)||this.searchingLocation}constructor(t,o,n,i,r,a,c,l,_,p,v,u,h,y,M,A,b,x,D,E){this._api=t,this.platformService=o,this.hereS=n,this.geoLocationService=i,this.router=r,this.modalService=a,this.deliveryService=c,this.ngZone=l,this.cdr=_,this.modalController=p,this.langService=v,this.branchesService=u,this.utils=h,this.rxJsService=y,this.dataService=M,this.storageService=A,this.userDataService=b,this.photoUploaderService=x,this.loaderService=D,this.useinsider=E,this._orderType=F.kt.Domicilio,this.expandModal=(0,e.CGW)(),this.noExpandModal=(0,e.CGW)(),this.setModalBreakp
1oint=(0,e.CGW)(),this.nearbyBranchesLoaded=(0,e.CGW)(),this.deliveryAddressesLoaded=(0,e.CGW)(),this.assets=f.c.assetsUrl,this.addresses=[],this.selectedAddress=null,this.allBranches=[],this.preferredBranches=[],this.nearbyBranches=[],this.selectedBranch=null,this.loadingBranches=!1,this.showPickupSearch=!1,this.showPickupNearbyList=!1,this.filteredBranches=[],this.top5NearbyBranches=[],this.top3NearbyForAddress=[],this.mapInitialZoom=16,this.isFromSelectDifferentBranch=!1,this.showDesktopPickupSearch=!1,this.initialModalBreakpoint=null,this.initialModalBreakpoints=null,this.isMobile=!1,this.windowWidth=0,this.discover={selected:{},discovered:[]},this.temporizador=null,this.mapUpdateTimeout=null,this.appResumeListenerHandle=null,this.isRetryingLocation=!1,this.isRegisteringLocationListener=!1,this.nextAllowedLocationRetryAt=0,this.lastMapCenter=null,this.isUpdatingMapMarkers=!1,this.mapMode="pickup",this.showMap=!1,this.searchingLocation=!1,this.addressSelected=!1,this.customerLocation=null,this.mobileListMaxHeight="500px",this.hasListInternalScroll=!1,this.currentPositionAddress="",this.geocoder=new google.maps.Geocoder,this.selectedAddressType="",this.showDesktopAddressDetails=!1,this.showCurrentLocationTooltip=!0,this.selectedPhotoUrl=null,this.selectedPhotoFile=null,this.failedAddressPhotoUrls=new Set,this.addressPhotoVersionStorageKey="addressPhotoVersions",this.addressPhotoVersions={},this.isDestroyed=!1,this.showLocationPermissionPopup=!1,this.isUsingDefaultLocation=!1,this.customerCode=null,this.isNavigatingBack=!1,this.pendingScheduleOrder=!1,this.validatingZone=!1,this.zoneValidated=!1,this.deliveryZone=null,this.mapCenterCoordinates=null,this.mapCenterMoved=!1,this.deliveryFooterHeight=0,this.isEditAddressOnly=!1,this.addressToEditOnly=null,this.isCreateAddressOnly=!1,this.addressTypes=k.Ld,this.addressDetailsData="",this.buildingData="",this.additionalNotesData="",this.useHereMapsComponent=C.dE,this.routerEventsSubscription=this.router.events.pipe((0,W.p)(O=>O instanceof $.wF)).subscribe(O=>{const T=this.deliveryService.getAddressToEditOnly();O.url.includes("delivery-or-pickup")&&!T&&(console.log("\u{1f504} Navigation detected - resetting to current location"),this.resetToCurrentLocation())})}handleBackNavigation(){if(!this.isEditAddressOnly&&!this.isCreateAddressOnly)return this.isPickupMode&&this.searchingLocation?0===this.preferredBranches.length?(console.log("\u{1f519} Sin preferred branches: cerrando modal directamente"),void this.modalController.getTop().then(t=>{t&&t.dismiss({cancelled:!0})})):(console.log("\u{1f519} Volviendo a lista de tiendas desde mapa/b\xfasqueda pickup"),void this.returnToPickupBranchesList()):void this.goBack();this.cancelAddressOnlyFlow()}returnToPickupBranchesList(){var t=this;return(0,g.A)(function*(){if(console.log("\u{1f4cb} Restaurando lista de tiendas preferidas y cercanas"),t.customerLocation&&!t.isUsingDefaultLocation&&0===t.nearbyBranches.length){console.log("\u{1f4cd} Ubicaci\xf3n disponible pero sin nearby stores \u2192 recargando...");const r=t.langService.getLangConfig().lang;yield t.loadNearbyBranches(r),console.log(`\u2705 Tiendas cercanas recargadas: ${t.nearbyBranches.length}`)}if(t.isMobile)try{const r=yield t.modalController.getTop();if("startOrderNewFlowModal"===r?.id){r.mode="ios";const a=new Set([0]);for(let c=.25;c<=1;c+=.05)a.add(Math.round(20*c)/20);a.add(1),r.breakpoints=Array.from(a).sort((c,l)=>c-l),r.classList.remove("fullscreen-modal"),r.backdropDismiss=!0}}catch(r){console.error("\u274c Error restaurando modo del modal:",r)}t.isFromSelectDifferentBranch=!1,t.showPickupSearch=!1,t.showPickupNearbyList=!1,t.searchingLocation=!1,t.addressSelected=!1,t.selectedBranch=null,t.mapInitialZoom=16,t.filteredBranches=[],t.discover.discovered=[];try{t.locationAddressForm&&(t.locationAddressForm.updateForm("address",""),t.locationAddressForm.updateForm("locationAddress",""))}catch{}if(t.cdr.detectChanges(),t.isMobile)try{yield new Promise(a=>setTimeout(a,250)),t.cdr.detectChanges();const r=document.querySelector("ion-modal#startOrderNewFlowModal");if(r){const a=(()=>{try{const r=document.querySelector("ion-modal#startOrderNewFlowModal");if(!r)return.5;const a=r.querySelectorAll("ion-list"),c=[];let l=0,_=0,p=0;a.forEach((G,N)=>{G.querySelectorAll("ion-item").forEach((V,Vo)=>{V.offsetHeight>0&&(c.push(V.offsetHeight),l++,0===N?_++:p++)})});const v=c.length>0?Math.round(c.reduce((G,N)=>G+N,0)/c.length):71,u=window.innerHeight,h=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--ion-safe-area-top")||"0"),y=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--ion-safe-area-bottom")||"0");let O=1;t.customerLocation&&p>0?O=2:0===l&&(O=1);let R=Math.min(.95,Math.max(.25,(10+47*O+v*l+80+10)/(u-h-y)));return R=Math.ceil(20*R)/20,R}catch(r){return console.warn("\u274c Error en computePickupBreakpoint:",r),.5}})();
1yield r.setCurrentBreakpoint(a),t.initialModalBreakpoint=a,console.log("\u2705 Modal ajustado a",a,"midiendo DOM real (preferred:",t.preferredBranches.length,", nearby:",t.nearbyBranches.length,")")}}catch(r){console.error("\u274c Error ajustando breakpoint del modal:",r)}t.cdr.detectChanges()})()}searchLocation(){this.isMobile?(this.searchingLocation=!0,this.showMap=!1,this.addressSelected=!1,this.expandModal.emit(),setTimeout(()=>{this.locationAddressForm?.setFocus()},0)):this.openAddNewAddressModal()}openAddNewAddressModal(){var t=this;return(0,g.A)(function*(){try{console.log("[openAddNewAddressModal] Opening modal...");const o=yield t.modalService.openModalAddNewAddress({formMetadata:t.formMetadata,addressDetailsFormMetadata:t.addressDetailsFormMetadata,additionalNotesFormMetadata:t.additionalNotesFormMetadata,descriptionFormMetadata:t.descriptionFormMetadata,addressTypes:t.addressTypes,addresses:t.addresses,useHereMapsComponent:t.useHereMapsComponent});if(console.log("[openAddNewAddressModal] Modal closed with data:",o),o?.data&&o.data.selectedAddress)console.log("Nueva direcci\xf3n elegida:",o.data),t.deliveryService.validateZoneAndExecute({lat:o.data.selectedAddress.position.lat,lng:o.data.selectedAddress.position.lng},function(){var i=(0,g.A)(function*(r){if(console.log("\u2705 Zone validated with data:",r),t.deliveryZone=r,!t.deliveryService.getAddressOnly()&&!(yield t.checkBranchBeforeProceeding(r.branch,t.orderType,!0)))return;const a={streetID:0,stNumber:0,building:o.data.building||"",stairNbr:"",flatNbr:o.data.addressDetails||"",doorNbr:"",lat:o.data.selectedAddress.position.lat,lng:o.data.selectedAddress.position.lng,resolvedAddress:o.data.selectedAddress.structured_formatting.main_text+", "+o.data.selectedAddress.structured_formatting.secondary_text,description:o.data.description||t.langService.getInstantTranslation("LANG_SAVED_ADDRESS"),addressType:o.data.addressType,additionalIndications:o.data.additionalNotes||"",areaID:r?.zone.areaID||0,stDirectoryID:r?.zone.stDirectoryID||0,zoneID:r?.zone?.id||0};console.log("\u{1f3e0} New address object with zone data:",a),t._api.updateAddress("n",a,!1,"openAddNewAddressModal").subscribe(function(){var c=(0,g.A)(function*(l){if(console.log("\u2705 Address created successfully:",l),l?.addressID){a.addressID=l.addressID;const p=o.data.photoFile||null;p&&(yield t.uploadAddressPhotoTemporary(p,l.addressID))}t.deliveryService.setZoneDelivery(t.deliveryZone),t.deliveryService.newAddressSelected(a),t.reloadUserAddresses(),t.deliveryService.getCreateAddressOnly()?(console.log("\u{1f4cd} Create address only flow (from modal) - redirecting to account"),t.clearLocalState(),t.router.navigate(["/account"])):(console.log("\u{1f4cd} Using navigateAfterAddressSave for new address from modal"),t.navigateAfterAddressSave(t.deliveryZone,a),t.clearLocalState())});return function(l){return c.apply(this,arguments)}}(),c=>{console.error("\u274c Error creating address:",c),t.clearLocalState()})});return function(r){return i.apply(this,arguments)}}());else{console.log("\u{1f4cd} Modal closed without data (backdrop or X button)");const n=t.deliveryService.getCreateAddressOnly();console.log("\u{1f4cd} isCreateAddressOnly:",n),t.clearLocalState(),n?(console.log("\u{1f4cd} Backdrop dismiss in create-only flow - redirecting to account"),t.router.navigate(["/account"])):console.log("\u{1f4cd} Backdrop dismiss in normal flow - modal just closed, staying on current page")}}catch(o){console.log("Flow new address not finished",o)}})()}logCurrentStates(t){console.log(`\u{1f4ca} [${t}] Current states:`,{validatingZone:this.validatingZone,zoneValidated:this.zoneValidated,deliveryZone:!!this.deliveryZone,selectedAddress:!!this.selectedAddress,addressSelected:!!this.addressSelected,searchingLocation:this.searchingLocation})}goBack(){var t=this;return(0,g.A)(function*(){if(t.logCurrentStates("BEFORE goBack"),t.addresses&&t.addresses.length>0&&t.addresses.forEach(o=>{o.isFromEdit&&delete o.isFromEdit}),t.validatingZone=!1,t.zoneValidated=!1,t.deliveryZone=null,t.searchingLocation=!1,t.selectedAddress=null,t.addressSelected=!1,t.discover.discovered=[],t.deliveryFooterHeight=0,t.addressDetail
1sForm?.updateForm("addressDetails",""),t.buildingForm?.updateForm("building",""),t.additionalNotesForm?.updateForm("additionalNotes",""),t.descriptionForm?.updateForm("description",""),t.addressDetailsData="",t.buildingData="",t.additionalNotesData="",console.log("\u{1f527} Recreating metadata with fresh fields in goBack..."),t.addressDetailsFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uZ)(),formName:"addressDetailsForm",groups:[],isReadOnly:!1}),t.buildingFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.c3)(),formName:"buildingForm",groups:[],isReadOnly:!1}),t.buildingFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.c3)(),formName:"buildingForm",groups:[],isReadOnly:!1}),t.additionalNotesFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uk)(),formName:"additionalNotesForm",groups:[],isReadOnly:!1}),t.descriptionFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.WS)(),formName:"descriptionForm",groups:[],isReadOnly:!1}),t.isMobile&&(t.selectedGoogleMap&&t.selectedGoogleMap.resetLocateMode(),t.customerLocation&&!t.isUsingDefaultLocation&&(t.showMap=!0,t.cdr.detectChanges(),console.log("\u{1f504} Restaurando marcador de current location en el mapa..."),setTimeout(()=>{t.loadMap(t.customerLocation,"main"),console.log("\u2705 Marcador restaurado en:",t.customerLocation)},100))),t.isMobile)try{const o=yield t.modalController.getTop();if("startOrderNewFlowModal"===o?.id){console.log("\u{1f4f1} Adjusting modal breakpoint after goBack...");const n=t.addresses&&t.addresses.length>0,i=n?t.initialModalBreakpoint||.65:1;n?(o.mode="ios",t.initialModalBreakpoints&&t.initialModalBreakpoints.length>0&&(o.breakpoints=[...t.initialModalBreakpoints]),o.classList.remove("fullscreen-modal"),o.backdropDismiss=!0,console.log("\u2705 Fullscreen class removed and backdrop dismiss reactivated"),yield o.setCurrentBreakpoint(i),console.log(`\u2705 Modal adjusted to ${100*i}% after goBack`)):yield o.dismiss({cancelled:!0})}}catch(o){console.error("\u274c Error adjusting modal after goBack:",o)}t.logCurrentStates("AFTER goBack")})()}ngOnInit(){var t=this;this.isIos=this.platformService.isIos(),this.loadAddressPhotoVersions(),this.windowWidth=window.innerWidth,this.isMobile=this.windowWidth<=767,this.isMobile&&setTimeout((0,g.A)(function*(){const n=yield t.modalController.getTop();if("startOrderNewFlowModal"===n?.id){const i=yield n.getCurrentBreakpoint();t.initialModalBreakpoint=i||n.initialBreakpoint||null,t.initialModalBreakpoints=n.breakpoints?[...n.breakpoints]:null,console.log("\u{1f4d0} Modal initial breakpoint captured:",t.initialModalBreakpoint),console.log("\u{1f4d0} Modal breakpoints array captured:",t.initialModalBreakpoints),console.log("\u{1f4d0} Modal breakpoints array:",n.breakpoints),console.log("\u{1f4d0} Modal initialBreakpoint:",n.initialBreakpoint),console.log("\u{1f4d0} Modal currentBreakpoint:",i)}}),500),this.addressToEditOnly=this.deliveryService.getAddressToEditOnly(),this.addressToEditOnly&&(console.log("\u{1f4cd} Edit address only mode detected:",this.addressToEditOnly),this.isEditAddressOnly=!0,this.selectedAddress={...this.addressToEditOnly,isFromEdit:!0,isFromSavedList:!0},this.addressSelected={position:{lat:this.addressToEditOnly.lat,lng:this.addressToEditOnly.lng},description:this.addressToEditOnly.description,resolvedAddress:this.addressToEditOnly.resolvedAddress},this.selectedAddressType=this.addressToEditOnly.addressType||"",this.isMobile?(this.searchingLocation=!0,console.log("\u{1f4f1} Mobile mode - showing search form")):(this.showDesktopAddressDetails=!0,this.showCurrentLocationTooltip=!1,console.log("\u{1f5a5}\ufe0f Desktop mode - showing address details. showDesktopAddressDetails =",this.showDesktopAddressDetails))),this.deliveryService.getCreateAddressOnly()&&(console.log("\u{1f4cd} Create address only mode detected"),this.isCreateAddressOnly=!0,setTimeout(()=>{this.searchLocation()},100)),this.formMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!0,fields:k.jM,formName:"deliveryForm1",groups:[],isReadOnly:!1}
1),this.addressDetailsFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uZ)(),formName:"addressDetailsForm",groups:[],isReadOnly:!1}),this.buildingFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.c3)(),formName:"buildingForm",groups:[],isReadOnly:!1}),this.additionalNotesFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uk)(),formName:"additionalNotesForm",groups:[],isReadOnly:!1}),this.descriptionFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.WS)(),formName:"descriptionForm",groups:[],isReadOnly:!1}),this.isPickupMode?console.log("\u{1f3ea} Modo PICKUP detectado"):console.log("\u{1f69a} Modo DELIVERY detectado - cargando direcciones")}onAddressDetailsChange(t){console.log("Address details changed:",t.value.addressDetails)}onAdditionalNotesChange(t){let o=t;t?.value&&(o=t.value,void 0!==o?.additionalNotes&&(o=o.additionalNotes)),this.additionalNotesData=o,console.log("Stored Additional Notes:",this.additionalNotesData)}handleDescriptionChange(t){console.log("Description changed:",t.value.description)}handleAddressDetailsChange(t){console.log("Address Details Event:",t);let o=t;t?.value&&(o=t.value,void 0!==o?.addressDetails&&(o=o.addressDetails)),this.addressDetailsData=o,console.log("Stored Address Details:",this.addressDetailsData)}handleBuildingChange(t){console.log("Building Event:",t);let o=t;t?.value&&(o=t.value,void 0!==o?.building&&(o=o.building)),this.buildingData=o,console.log("Stored Building:",this.buildingData)}checkModals(){var t=this;return(0,g.A)(function*(){try{t.userDataService.getUser().subscribe(function(){var o=(0,g.A)(function*(n){if(!n)return void console.log("\u2139\ufe0f Usuario no logueado - no se muestran modales de loyalty");const i=yield t.dataService.getStatusOfCacheClientOrServer(!1);if(!i)return void console.log("\u26a0\ufe0f No se pudo obtener status del cliente");const r=i.status?.toLowerCase();if(console.log(`\u2139\ufe0f Loyalty status del usuario: ${r}`),"silver"!==r||t.isPickupMode)if("platinum"===r){const a="modalPlatinumAdvantagesShowed";if("true"===sessionStorage.getItem(a))return void console.log("\u2139\ufe0f Modal Platinum Advantages ya fue mostrado en esta sesi\xf3n");sessionStorage.setItem(a,"true"),yield t.modalService.openModalPlatinumAdvantages(!0)}else if("gold"===r){const a="modalGoldAdvantagesShowed";if("true"===sessionStorage.getItem(a))return void console.log("\u2139\ufe0f Modal Gold Advantages ya fue mostrado en esta sesi\xf3n");sessionStorage.setItem(a,"true"),yield t.modalService.openModalGoldAdvantages(!0)}else console.log(`\u2139\ufe0f Usuario con loyalty "${r}" - no se muestran modales`);else{const a=yield t.storageService.getItem(C.rC.order).toPromise();if(!a)return void console.log("\u26a0\ufe0f No hay pedido actual");const c=yield t.storageService.getItem(C.rC.menu).toPromise(),l=yield t.storageService.getItem(C.rC.promos).toPromise();if(!c||!l)return void console.log("\u26a0\ufe0f No hay men\xfa o promociones disponibles");const v=new L.Le(c,l).getPromotions().filter(b=>b.crossType===F.HB.Subscription);if(!v||0===v.length)return void console.log("\u2139\ufe0f No hay promociones de suscripci\xf3n disponibles");const u=new L.kX(a,c,l),h=u.getSubscriptionLine();if(h&&!0===h.status)return void console.log("\u2139\ufe0f Cliente ya tiene suscripci\xf3n en el pedido - no se muestra modal");const y="goldSubscriptionModalShown";if("true"===sessionStorage.getItem(y))return void console.log("\u2139\ufe0f Modal Gold ya fue mostrado en esta sesi\xf3n");console.log("\u2705 Mostrando modal de suscripci\xf3n Gold");const{data:A}=yield t.modalService.openModalGoldSubscription(v,!0);sessionStorage.setItem(y,"true"),A?.confirmed?(console.log("\u2705 Usuario confirm\xf3 suscripci\xf3n - actualizando pedido"),u.updateSubscriptionLine({id:v[0].id,salePrice:v[0].salePrice,status:!0}),yield t.storageService.setItem(C.rC.order,u.getOrder()).toPromise(),console.log("\u2705 Suscripci\xf3n agregada al pedido")):console.log("\u2139\ufe0f Usuario rechaz\xf3 suscripci\xf3n")}
1});return function(n){return o.apply(this,arguments)}}())}catch(o){console.error("\u274c Error al verificar/mostrar modales de loyalty:",o)}})()}initPickupFlow(){var t=this;return(0,g.A)(function*(){console.log("\u{1f3ea} Iniciando flujo de pickup"),t.loadingBranches=!0;try{const o=t.langService.getLangConfig().lang;let n;yield t.loadAllBranches(o),console.log("\u2705 All branches loaded, now loading preferred branches");try{n=yield(0,I._)(t.userDataService.getUser())}catch{n=null}n?(yield t.loadPreferredBranches(o),console.log("\u2705 Preferred branches loaded, now loading nearby branches")):(t.preferredBranches=[],console.log("\u2139\ufe0f Usuario no logueado - no se consultan tiendas preferidas")),t.customerLocation&&!t.isUsingDefaultLocation?(console.log("\u{1f4cd} Ubicaci\xf3n disponible, cargando tiendas cercanas"),yield t.loadNearbyBranches(o)):(console.log("\u26a1 OPTIMIZACI\xd3N: Sin ubicaci\xf3n, saltando loadNearbyBranches"),t.nearbyBranches=[]),yield t.detectBranchesRendered(),t.nearbyBranchesLoaded.emit(),yield t.modalService.notifyNearbyBranchesLoaded(),yield t.checkPickupSpecialCases()}catch(o){console.error("\u274c Error cargando tiendas:",o)}finally{t.loadingBranches=!1,t.cdr.detectChanges()}})()}detectBranchesRendered(){return this.isMobile?(this.cdr.detectChanges(),new Promise(t=>{requestAnimationFrame(()=>{const o=document.querySelector(".pickupBranchesContainer");if(!o&&0===this.preferredBranches.length&&0===this.nearbyBranches.length)return void t();if(!o)return setTimeout(()=>this.detectBranchesRendered().then(t),50),void console.log("\u23f3 pickupBranchesContainer no encontrado, reintentando...");let n=!1;console.log("\u{1f4cf} Esperando renderizado de tiendas...");const i=new ResizeObserver(()=>{const r=o.offsetHeight;r>0&&!n&&(n=!0,i.disconnect(),console.log(`\u{1f4f2} [PICKUP] Tiendas renderizadas (h: 0\u2192${r}px)`),t())});if(i.observe(o),o.offsetHeight>0)return n=!0,i.disconnect(),void t();setTimeout(()=>{n||(n=!0,i.disconnect(),console.log(`\u{1f4f2} [PICKUP] Tiendas renderizadas (timeout fallback 2500ms, h=${o.offsetHeight}px)`),t())},2500)})})):Promise.resolve()}loadAllBranches(t){return new Promise((o,n)=>{this._api.getAllBranches(F.kt.Recoger,t).subscribe(i=>{this.allBranches=i||[],console.log(`\u2705 Cargadas ${this.allBranches.length} tiendas totales`),o()},i=>{console.error("\u274c Error cargando tiendas:",i),n(i)})})}loadPreferredBranches(t){return new Promise(o=>{this._api.getCustomerOrders(5,F.kt.Recoger).subscribe(n=>{if(n&&n.length>0){const i=[...new Set(n.map(r=>r.branchID))];this.preferredBranches=i.map(r=>this.allBranches.find(a=>a.id===r)).filter(r=>!!r),this.customerLocation&&this.preferredBranches.forEach(r=>{let a=this.utils.linealDistance({lat:this.customerLocation.lat,lng:this.customerLocation.lng},r);r.distance=Math.round(1e3*a),console.log(r)}),console.log(`\u2705 Cargadas ${this.preferredBranches.length} tiendas preferidas`)}else this.preferredBranches=[],console.log("\u2139\ufe0f No hay tiendas preferidas (sin pedidos previos)");o()},n=>{console.error("\u274c Error cargando pedidos para tiendas preferidas:",n),this.preferredBranches=[],o()})})}loadNearbyBranches(t){var o=this;return(0,g.A)(function*(){try{if(o.customerLocation&&!o.isUsingDefaultLocation)return new Promise(n=>{const i=`${o.customerLocation.lat},${o.customerLocation.lng}`;o._api.getNearestBranches(i,t,3).subscribe(r=>{const a=r||[];a.length>0&&o.storageService.setItem(C.rC.nearestBranchId,a[0].id).subscribe();const c=o.preferredBranches.map(_=>_.id),l=a.filter(_=>c.includes(_.id)).length;if(console.log(`\u{1f4ca} Found ${l} duplicates with preferred branches`),l>0){const _=3+l;console.log(`\u{1f504} Loading ${_} branches to compensate for duplicates`),o._api.getNearestBranches(i,t,_).subscribe(p=>{o.nearbyBranches=(p||[]).filter(v=>!c.includes(v.id)),o.nearbyBranches.forEach(v=>{v.distance&&(v.distance=Math.round(1e3*v.distance))}),console.log(`\u2705 Cargadas ${o.nearbyBranches.length} tiendas cercanas (despu\xe9s de filtrar duplicados)`),n()},p=>{console.error("\u274c Error cargando tiendas adicionales:",p),o.nearbyBranches=[],n()})}
1else o.nearbyBranches=a,o.nearbyBranches.forEach(_=>{_.distance&&(_.distance=Math.round(1e3*_.distance))}),console.log(`\u2705 Cargadas ${o.nearbyBranches.length} tiendas cercanas (sin duplicados)`),n()},r=>{console.error("\u274c Error cargando tiendas cercanas:",r),o.nearbyBranches=[],n()})});console.log("\u2139\ufe0f No hay ubicaci\xf3n disponible para tiendas cercanas"),o.nearbyBranches=[]}catch(n){console.error("\u274c Error obteniendo ubicaci\xf3n:",n),o.nearbyBranches=[]}})()}selectBranch(t){console.log("\u{1f3ea} Tienda seleccionada:",t),this.selectedBranch=t,this.selectedAddress=`branch_${t.id}`;const o=this.preferredBranches.some(i=>i.id===t.id),n=this.deliveryService.getChangeBranchOnly();if(o||n)return console.log(o?"\u2b50 Tienda PREFERRED seleccionada - confirmando directamente":"\u{1f504} Modo changeBranchOnly - confirmando tienda NEARBY directamente sin mapa"),void this.confirmSelectedBranch();console.log("\u{1f4cd} Tienda NEARBY seleccionada - mostrando en mapa para confirmaci\xf3n"),this.showNearbyBranchInMap(t)}selectBranchDesktop(t){console.log("\u{1f5a5}\ufe0f Tienda seleccionada en desktop:",t.name),this.selectedBranch=t,this.selectedAddress=`branch_${t.id}`;const n=[...this.preferredBranches,...this.nearbyBranches.slice(0,3)].filter((r,a,c)=>a===c.findIndex(l=>l.id===r.id));this.useHereMapsComponent&&this.mainHereMap?(this.mainHereMap.drawMarkersFromPickup(!this.isUsingDefaultLocation&&this.customerLocation,n,t,!1,!0),this.mainHereMap.moveToPosition(t)):this.mainGoogleMap&&this.mainGoogleMap.moveToPosition(t),this.cdr.detectChanges()}showNearbyBranchInMap(t){var o=this;return(0,g.A)(function*(){console.log("\u{1f5fa}\ufe0f Mostrando nearby branch en mapa:",t.name),o.addressSelected=!0,o.showPickupSearch=!1,o.showPickupNearbyList=!1,o.mapInitialZoom=16,o.isMobile&&(o.searchingLocation=!0,o.expandModal.emit()),o.cdr.detectChanges(),yield o.waitForSelectedMapComponents();const n={lat:t.lat,lng:t.lng},i=!(o.isUsingDefaultLocation||!o.customerLocation)&&o.customerLocation;!o.useHereMapsComponent&&o.selectedGoogleMap?o.selectedGoogleMap.map?(console.log("\u{1f4cd} Mapa ya inicializado con cluster \u2014 centrando y destacando marker"),o.selectedGoogleMap.moveToPosition(t)):(o.loadMap(n,"selected",!0),yield new Promise(r=>setTimeout(r,500)),console.log("\u{1f4cd} Mapa nuevo \u2014 dibujando todas las tiendas con cluster"),o.selectedGoogleMap.drawMarkersFromPickupWithCityCluster(i,o.allBranches,t,!0),o.selectedGoogleMap.moveToPosition(t)):(o.loadMap(n,"selected"),setTimeout(()=>{o.selectedHereMap&&(o.selectedHereMap.drawMarkersFromPickup(!1,[t],t,!1,!0),o.selectedHereMap.overrideIconMarker?.(t.id))},300)),o.cdr.detectChanges()})()}confirmSelectedBranch(){var t=this;return(0,g.A)(function*(){if(!t.selectedBranch)return void console.warn("\u26a0\ufe0f No hay tienda seleccionada");const o=t.deliveryService.getChangeBranchOnly();if(!o&&!(yield t.checkBranchBeforeProceeding(t.selectedBranch,F.kt.Recoger,!1)))return;const n=t.selectedBranch;console.log("\u2705 Confirmando tienda:",n,"| isChangeBranchOnly:",o),t.isFromSelectDifferentBranch=!1;const i=yield t.storageService.getItem(C.rC.order).toPromise();if(!i)return void console.log("\u26a0\ufe0f No hay pedido actual");const r=yield t.storageService.getItem(C.rC.menu).toPromise(),a=yield t.storageService.getItem(C.rC.promos).toPromise(),c=new L.kX(i,r,a);c.updateBranchCode(null,n.id),yield t.storageService.setItem(C.rC.branchPickup,n).toPromise(),yield t.storageService.setItem(C.rC.userSelectBranch,!0).toPromise(),yield t.storageService.setItem(C.rC.order,c.getOrder()).toPromise(),yield t.useinsider.updateInsiderBranch(n);try{const[l,_]=yield Promise.all([t.dataService.getMenu(n.id,!0),t.dataService.getPromotions(n.id,!0)]);t.dataService.updatePgMenu(l,_)}catch{}o||t._api.setData("OnUpdateData"),console.log("\u{1f4cd} select-delivery-address: llamando setCurrentSelectedBranch con:",n),t.deliveryService.setCurrentSelectedBranch(n),t.deliveryService.setPickupLocationAvailable(!t.isUsingDefaultLocation);try{const l=yield t.modalController.getTop();l&&(yield l.dismiss({success:!0,branch:n}))}catch(l){console.error("\u274c Error cerrando modal:",l)}o?(console.log("\u{1f504} changeBranchOnly: modal cerrado, promotions.page.ts actualizar\xe1 la tienda"),t.deliveryService.clearChangeBranchOnly(),t.deliveryService.overrideBranchPickup(n),t._api.setPickupBranchPromotions(n),t.isMobile||(yield t.router.navigate(["/promotions"]),t._api.setData("OnUpdateData"))):t.router.navigate(["/checkout"])})()}selectDifferentBranch(){var t=this;return(0,g.A)(function*(){if(console.log("\u{1f50d}\u{1f50d}\u{1f50d} ENTRANDO EN selectDifferentBranch()"),console.log("\u{1f4cd} Zoom ANTES de cambiar:",t.mapInitialZoom),t.isFromSelectDifferentBranch=!0,t.showPickupSearch=!0,t.showPickupNearbyList=!1,t.top3NearbyForAddress=[],t.mapInitialZoom=5,console.log("\u{1f4cd}\u{1f4cd}\u{1f4cd} Zoom DESPU\xc9S de cambiar a 9:",t.mapInitialZoom),t.isMobile&&(t.searchingLocation=!0,t.addressSelected=!0,t.expandModal.emit()),t.cdr.detectChanges(),t.isUsingDefaultLocation)try{const _=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:_.latitude,lng:_.longitude},t.isUsingDefaultLocation=!1,console.log("\u2705 Location obtained on selectDifferentBranch:",t.customerLocation)}
1catch(_){console.log("\u274c Location denied on selectDifferentBranch, showing modal"),yield t.geoLocationService.showModal(_?.code||1,"R"),yield new Promise(p=>setTimeout(p,400)),t.setupLocationRetryOnResume();try{const p=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:p.latitude,lng:p.longitude},t.isUsingDefaultLocation=!1,console.log("\u2705 Location obtained after modal retry:",t.customerLocation)}catch{console.log("\u26a0\ufe0f Still no location after modal - continuing with default")}}yield t.waitForSelectedMapComponents();const o=t.customerLocation||f.c.hereMaps.centerMap;console.log("\u{1f4cd} Ubicaci\xf3n base para mostrar tiendas:",o),t.lastMapCenter={...o},console.log("\u{1f5fa}\ufe0f\u{1f5fa}\ufe0f\u{1f5fa}\ufe0f ANTES de loadMap - mapInitialZoom:",t.mapInitialZoom),t.loadMap(o,"selected",!0),console.log("\u{1f5fa}\ufe0f\u{1f5fa}\ufe0f\u{1f5fa}\ufe0f DESPU\xc9S de loadMap - mapInitialZoom:",t.mapInitialZoom);const n=t.allBranches.map(_=>{const p=t.utils.linealDistance(o,_);return{..._,distance:p}});n.sort((_,p)=>_.distance-p.distance);const r=t.getMaxBranchesForZoom(t.useHereMapsComponent?t.selectedHereMap:t.selectedGoogleMap),a=n.slice(0,r);console.log("\u{1f3ea} Mostrando",a.length,"tiendas m\xe1s cercanas en el mapa (zoom-based)"),console.log("\u{1f50d} VALIDANDO UBICACI\xd3N:"),console.log("  - customerLocation:",t.customerLocation),console.log("  - environment.hereMaps.centerMap:",f.c.hereMaps.centerMap),console.log("  - isUsingDefaultLocation (propiedad):",t.isUsingDefaultLocation);const c=t.isUsingDefaultLocation||t.customerLocation&&t.customerLocation.lat===f.c.hereMaps.centerMap.lat&&t.customerLocation.lng===f.c.hereMaps.centerMap.lng;console.log("  - isDefaultLocation (calculado):",c);const l=!(!t.customerLocation||c)&&t.customerLocation;console.log("\u{1f4cd} Resultado final - userLocationForMap:",l),console.log("\u{1f4cd} \xbfSe mostrar\xe1 marker de usuario?",!!l),l?(console.log("\u2705 Cliente CON ubicaci\xf3n - dibujando markers inmediatamente"),setTimeout(()=>{t.useHereMapsComponent&&t.selectedHereMap?(t.selectedHereMap.map_&&t.selectedHereMap.map_.map&&(t.selectedHereMap.map_.map.setCenter(o),t.selectedHereMap.map_.map.setZoom(t.mapInitialZoom),console.log("\u{1f3af} HERE Map centrado manualmente con zoom:",t.mapInitialZoom)),t.selectedHereMap.drawMarkersFromPickup(l,a,a[0],!1,!0)):t.selectedGoogleMap&&t.selectedGoogleMap.drawMarkersFromPickupWithCityCluster(l,t.allBranches,null)},500)):(console.log("\u26a0\ufe0f Cliente SIN ubicaci\xf3n - pintando TODAS las tiendas para mostrar el pa\xeds."),setTimeout(()=>{const _=t.selectedHereMap||t.mainHereMap,p=t.selectedGoogleMap||t.mainGoogleMap;t.useHereMapsComponent&&_?_.drawMarkersFromPickup(!1,t.allBranches,null,!1,!1):p&&p.drawMarkersFromPickupWithCityCluster(!1,t.allBranches,null)},500))})()}updateNearbyBranchesOnMap(t){if(!this.isPickupMode){if(this.lastMapCenter&&this.utils.linealDistance(this.lastMapCenter,t)<.1)return void console.log("\u23ed\ufe0f Cambio insignificante en el mapa (<100m), ignorando actualizaci\xf3n");this.mapUpdateTimeout&&clearTimeout(this.mapUpdateTimeout),this.mapUpdateTimeout=setTimeout(()=>{console.log("\u{1f504} Actualizando markers (despu\xe9s de debounce)"),this.isUpdatingMapMarkers=!0,this.lastMapCenter={...t};const o=this.allBranches.map(_=>{const p=this.utils.linealDistance(t,_);return{..._,distance:p}});o.sort((_,p)=>_.distance-p.distance);const i=this.getMaxBranchesForZoom(this.useHereMapsComponent?this.selectedHereMap:this.selectedGoogleMap),r=o.slice(0,i);this.selectedBranch&&!r.find(_=>_.id===this.selectedBranch.id)&&r.push(this.selectedBranch);const c=!(!this.customerLocation||this.isUsingDefaultLocation||this.customerLocation&&this.customerLocation.lat===f.c.hereMaps.centerMap.lat&&this.customerLocation.lng===f.c.hereMaps.centerMap.lng)&&this.customerLocation;console.log("\u{1f504} Redibujando markers - Usuario:",!!c,"Tiendas:",r.length);const l=this.useHereMapsComponent?this.selectedHereMap:this.selectedGoogleMap;l&&(this.useHereMapsComponent?l.drawMarkersFromPickup(c,r,r[0],!1,!0):l.drawMarkersFromPickup(c,r,r[0],!1,!1,
1!0),this.selectedBranch&&l&&l.overrideIconMarker(this.selectedBranch.id)),setTimeout(()=>{this.isUpdatingMapMarkers=!1,console.log("\u2705 Actualizaci\xf3n de markers completada")},500)},400)}}updateNearbyBranchesOnMapDesktop(t){this.lastMapCenter&&this.utils.linealDistance(this.lastMapCenter,t)<.1||(this.mapUpdateTimeout&&clearTimeout(this.mapUpdateTimeout),this.mapUpdateTimeout=setTimeout(()=>{this.isUpdatingMapMarkers=!0,this.lastMapCenter={...t};const o=this.allBranches.filter(a=>a.lat&&a.lng).map(a=>{const c=this.utils.linealDistance(t,{lat:a.lat,lng:a.lng});return{...a,distance:Math.round(1e3*c)}}).sort((a,c)=>a.distance-c.distance),n=this.getMaxBranchesForZoom(this.mainGoogleMap),i=o.slice(0,n);this.selectedBranch&&!i.find(a=>a.id===this.selectedBranch.id)&&i.push(this.selectedBranch);const r=this.mainGoogleMap;r&&(r.drawMarkersFromPickup(!(this.isUsingDefaultLocation||!this.customerLocation)&&this.customerLocation,i,this.selectedBranch||i[0],!1,!1,!0),this.selectedBranch&&r.overrideIconMarker(this.selectedBranch.id)),setTimeout(()=>{this.isUpdatingMapMarkers=!1},500)},400))}initDesktopMapWithBranches(t,o){var n=this;return(0,g.A)(function*(){if(n.isMobile||0===t.length)return void console.log("\u26a0\ufe0f initDesktopMapWithBranches: skipping (isMobile o branches vac\xedo)");console.log(`\u{1f5a5}\ufe0f initDesktopMapWithBranches: dibujando ${t.length} tiendas en el mapa`),!n.mainGoogleMap&&!n.mainHereMap&&(yield n.waitForMapComponents());const i=!(!o||n.isUsingDefaultLocation)&&o,r=i||f.c.hereMaps.centerMap,a=t[0];n.useHereMapsComponent&&n.mainHereMap?(n.mainHereMap.map_?.map&&(n.mainHereMap.map_.map.setCenter(r),n.mainHereMap.map_.map.setZoom(n.mapInitialZoom)),n.mainHereMap.drawMarkersFromPickup(i,t,a,!1,!1)):n.mainGoogleMap&&n.mainGoogleMap.drawMarkersFromPickupWithCityCluster(i,t,a),console.log("\u2705 initDesktopMapWithBranches: markers dibujados"),n.cdr.detectChanges()})()}initDesktopMapWithAllBranches(){var t=this;return(0,g.A)(function*(){if(t.isMobile||0===t.allBranches.length)return void console.log("\u26a0\ufe0f initDesktopMapWithAllBranches: skipping (isMobile o allBranches vac\xedo)");console.log(`\u{1f5a5}\ufe0f initDesktopMapWithAllBranches: dibujando ${t.allBranches.length} tiendas en el mapa`),!t.mainGoogleMap&&!t.mainHereMap&&(yield t.waitForMapComponents());const o=f.c.hereMaps.centerMap;t.useHereMapsComponent&&t.mainHereMap?(t.mainHereMap.map_?.map&&(t.mainHereMap.map_.map.setCenter(o),t.mainHereMap.map_.map.setZoom(6)),t.mainHereMap.drawMarkersFromPickup(!1,t.allBranches,t.allBranches[0],!1,!0)):t.mainGoogleMap&&(t.mainGoogleMap.map&&(t.mainGoogleMap.map.setCenter(o),t.mainGoogleMap.map.setZoom(6)),t.mainGoogleMap.drawMarkersFromPickupWithCityCluster(!1,t.allBranches,t.allBranches[0])),console.log("\u2705 initDesktopMapWithAllBranches: markers dibujados"),t.cdr.detectChanges()})()}checkPickupSpecialCases(){var t=this;return(0,g.A)(function*(){if(console.log("\u{1f50d} Verificando casos especiales de pickup..."),console.log("\u{1f4cd} customerLocation:",!!t.customerLocation),console.log("\u2b50 preferredBranches:",t.preferredBranches.length),console.log("\u{1f4cd} nearbyBranches:",t.nearbyBranches.length),(!t.customerLocation||t.isUsingDefaultLocation)&&0===t.preferredBranches.length)return console.log("\u{1f50d} CASO 1: Sin ubicaci\xf3n ni preferred branches \u2192 Activando buscador de tiendas"),t.showPickupSearch=!0,t.showPickupNearbyList=!1,t.mapInitialZoom=11,void(t.isMobile?(t.searchingLocation=!0,t.addressSelected=!0,yield t.selectDifferentBranch()):(console.log("\u{1f5a5}\ufe0f CASO 1 Desktop: Mostrando buscador y dibujando todas las tiendas en el mapa"),t.showDesktopPickupSearch=!0,t.showLocationPermissionPopup=!0,yield t.initDesktopMapWithAllBranches()));if((!t.customerLocation||t.isUsingDefaultLocation)&&t.preferredBranches.length>0)return console.log("\u{1f50d} CASO 3: Sin ubicaci\xf3n pero con preferred branches \u2192 Mostrando lista de preferred"),t.showPickupSearch=!1,t.showPickupNearbyList=!1,t.mapInitialZoom=16,t.isMobile&&(t.searchingLocation=!1,t.addressSelected=!1),t.isMobile||(console.log("\u{1f5a5}\ufe0f CASO 3 Desktop: Dibujando todas las tiendas en el mapa"),t.showLocationPermissionPopup=!0,yield t.initDesktopMapWithAllBranches()),void t.setModalBreakp
1oint.emit(.95);if(t.customerLocation&&!t.isUsingDefaultLocation&&t.nearbyBranches.length>0&&0===t.preferredBranches.length)if(console.log("\u{1f4cd} CASO 2: Con ubicaci\xf3n pero sin preferred \u2192 Mostrando top 8 cercanas"),t.showPickupSearch=!1,t.showPickupNearbyList=!0,t.top5NearbyBranches=t.nearbyBranches.slice(0,8),t.mapInitialZoom=16,t.isMobile){const o=t.nearbyBranches.slice(0,3);t.top3NearbyForAddress=o,t.searchingLocation=!0,t.addressSelected=!0,t.expandModal.emit(),t.cdr.detectChanges(),yield t.waitForSelectedMapComponents(),t.loadMap(t.customerLocation,"selected",!0),yield new Promise(n=>setTimeout(n,500)),t.useHereMapsComponent&&t.selectedHereMap?t.selectedHereMap.drawMarkersFromPickup(t.customerLocation,o,o[0],!1,!1):t.selectedGoogleMap&&t.selectedGoogleMap.drawMarkersFromPickupWithCityCluster(t.customerLocation,t.allBranches,null)}else console.log("\u{1f5a5}\ufe0f CASO 2 Desktop: Dibujando todas las tiendas con clustering en el mapa"),yield t.initDesktopMapWithBranches(t.allBranches,t.customerLocation);else console.log("\u2705 CASO NORMAL: Flujo est\xe1ndar de pickup con preferred branches"),t.showPickupSearch=!1,t.showPickupNearbyList=!1,t.mapInitialZoom=16,t.isMobile||(console.log("\u{1f5a5}\ufe0f CASO NORMAL Desktop: Dibujando todas las tiendas con clustering en el mapa"),yield t.initDesktopMapWithBranches(t.allBranches,t.customerLocation))})()}searchBranches(t){const o=(t?.value?.address||t?.value?.locationAddress||"").toLowerCase().trim();console.log("\u{1f50d} Buscando tiendas:",o),!o||o.length<2?this.filteredBranches=[]:(this.filteredBranches=this.allBranches.filter(n=>{const i=n.name?.toLowerCase()||"",r=n.streetName?.toLowerCase()||"",a=n.city?.toLowerCase()||"";return i.includes(o)||r.includes(o)||a.includes(o)}).slice(0,8),console.log("\u2705 Tiendas encontradas:",this.filteredBranches.length),this.cdr.detectChanges())}selectBranchFromSearch(t){console.log("\u{1f3ea} Tienda seleccionada desde b\xfasqueda:",t.name),this.selectedBranch=t,this.filteredBranches=[],this.locationAddressForm&&this.locationAddressForm.updateForm("address",""),this.isMobile&&(this.addressSelected=!0),this.cdr.detectChanges()}selectBranchFromTop5(t){console.log("\u{1f3ea} Tienda seleccionada desde top 8:",t.name),this.selectedBranch=t,this.cdr.detectChanges()}openBranchSearch(){console.log("\u{1f50d} Abriendo pantalla de b\xfasqueda de tiendas"),this.isMobile&&(this.addressSelected=!1,this.searchingLocation=!0),this.cdr.detectChanges()}onMapCenterChanged(t){if(console.log("\u{1f4cd} Map center changed to:",t),this.isNavigatingBack)console.log("\u23ea Ignoring centerChanged - navigating back");else{if(!this.isUpdatingMapMarkers)return this.mapCenterCoordinates=t,this.isPickupMode&&this.searchingLocation&&this.showPickupSearch&&this.allBranches.length>0?(console.log("\u{1f504} Actualizando tiendas cercanas al nuevo centro del mapa"),void this.updateNearbyBranchesOnMap(t)):void(this.isPickupMode&&!this.isMobile&&this.allBranches.length>0||(!this.isMobile&&this.isUsingDefaultLocation&&!this.showDesktopAddressDetails&&(!this.addresses||0===this.addresses.length)&&(this.showDesktopAddressDetails=!0,this.showCurrentLocationTooltip=!1,this.selectedAddress={},this.cdr.detectChanges(),setTimeout(()=>{this.mainGoogleMap&&this.mainGoogleMap.bMarkers&&(this.mainGoogleMap.bMarkers.forEach(o=>{o.setMap(null)}),this.mainGoogleMap.bMarkers=[]),this.cdr.detectChanges()},0)),(this.showDesktopAddressDetails||this.isMobile&&this.searchingLocation&&this.addressSelected)&&this.reverseGeocodeMapCenter(t)));console.log("\u23ed\ufe0f Ignorando centerChanged durante actualizaci\xf3n de markers")}}reverseGeocodeMapCenter(t){(new google.maps.Geocoder).geocode({location:t},(n,i)=>{if("OK"===i&&n&&n[0]){console.log("\u{1f4cd} Geocoded address:",n[0].formatted_address);const r=n[0].address_components;let a="",c="";const l=r.find(h=>h.types.includes("street_number"))?.long_name||"";a=[r.find(h=>h.types.includes("route"))?.long_name||"",l].filter(Boolean).join(" ");const p=r.find(h=>h.types.includes("locality"))?.long_name||"",v=r.find(h=>h.types.includes("administrative_area_level_1"))?.long_name||"",u=r.find(h=>h.types.includes("country"))?.long_name||"";
1c=[p,v,u].filter(Boolean).join(", "),a||(a=n[0].formatted_address.split(",")[0],c=n[0].formatted_address.split(",").slice(1).join(",").trim()),this.ngZone.run(()=>{this.addressSelected={position:{lat:t.lat,lng:t.lng},structured_formatting:{main_text:a,secondary_text:c},formatted_address:n[0].formatted_address,resolvedAddress:n[0].formatted_address},this.selectedAddress&&"object"==typeof this.selectedAddress&&(this.selectedAddress.lat=t.lat,this.selectedAddress.lng=t.lng,this.selectedAddress.resolvedAddress=n[0].formatted_address),this.mapCenterMoved=!0,this.cdr.detectChanges()})}})}onResize(t){try{this.windowWidth=window.innerWidth,this.isMobile=this.windowWidth<=767,console.log("Is isMobile:",this.isMobile),this.updateMobileListMaxHeight()}catch{console.error("Error onResize")}}resetToCurrentLocation(){this.showDesktopAddressDetails=!1,this.selectedAddress=null,this.addressSelected=!1,this.selectedAddressType="",this.selectedPhotoUrl=null,this.selectedPhotoFile=null,this.mapCenterCoordinates=null,this.showCurrentLocationTooltip=!0,this.validatingZone=!1,this.zoneValidated=!1,this.deliveryZone=null,this.customerLocation&&this.showMap&&setTimeout(()=>{this.loadMap(this.customerLocation,"main"),console.log("\u2705 Map reloaded with current location:",this.customerLocation)},100)}ngAfterViewInit(){var t=this;return(0,g.A)(function*(){try{const o=yield(0,I._)(t.userDataService.getUser()),n="string"==typeof o?JSON.parse(o):o;t.customerCode=n?.id??null}catch(o){console.error("Error loading customer code for photo URLs:",o)}if(t.isPickupMode){(t.platformService.isIos()||t.platformService.isAndroid())&&U.vy.tagScreenName("branches");const o=t.deliveryService.getAndClearPendingLocationPromise();if(o){console.log("\u{1f3ea} Esperando promesa de ubicaci\xf3n pendiente del caller...");try{const n=yield o;n?(t.customerLocation=n,t.isUsingDefaultLocation=!1,console.log("\u2705 Location obtained from pending promise:",t.customerLocation)):(t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0,console.log("\u26a0\ufe0f Pending promise resolved without location, using default"))}catch{t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0}t.checkModals()}else{const n=t.deliveryService.getPreModalLocationInfo(),i=n?.hasExistingData??!1,r=n?.hasLocation??!1;if(t.deliveryService.clearPreModalLocationInfo(),console.log("\u{1f3ea} Modo PICKUP - preModalInfo:",{hasExistingData:i,hasLocationFromCart:r}),r||!t.isMobile){try{const a=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:a.latitude,lng:a.longitude},t.isUsingDefaultLocation=!1,console.log("\u2705 Silent location obtained for pickup:",t.customerLocation)}catch(a){console.warn("\u26a0\ufe0f Location failed silently:",a),t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0}t.checkModals()}else console.log("\u{1f3ea} No location from cart - using default silently (hasExistingData:",i,")"),t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0,t.checkModals()}yield t.initPickupFlow()}else{const o=()=>{const n=t.deliveryService.getAddressOnly();t.isEditAddressOnly||t.addressToEditOnly||t.isCreateAddressOnly||n?console.log("\u2139\ufe0f Skipping loyalty modals - edit/create address flow"):t.checkModals()};try{(t.platformService.isIos()||t.platformService.isAndroid())&&U.vy.tagScreenName("delivery");const n=t.deliveryService.getPreModalLocationInfo(),i=n?.hasExistingData??!1,r=n?.hasLocation??!1;t.deliveryService.clearPreModalLocationInfo(),console.log("\u{1f69a} Modo DELIVERY - preModalInfo:",{hasExistingData:i,hasLocationFromCart:r});try{const a=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:a.latitude,lng:a.longitude},t.isUsingDefaultLocation=!1,console.log("\u2705 Silent location obtained for delivery:",t.customerLocation),t.hereS.reveseGeoCode(t.customerLocation.lat+","+t.customerLocation.lng).subscribe(l=>{l.items.length>0&&(t.currentPositionAddress=l.items[0].title)},l=>{console.log(l)}
1)}catch{console.log("\u26a0\ufe0f Location unavailable for delivery, using default silently"),t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0}o()}catch(n){console.error("Unexpected error in delivery geo flow",n),t.customerLocation||(t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0),o()}if(t.isEditAddressOnly&&t.addressToEditOnly){console.log("\u{1f4cd} Edit address only mode - loading map with address coordinates"),t.showMap=!0,yield t.waitForMapComponents();const n={lat:parseFloat(t.addressToEditOnly.lat),lng:parseFloat(t.addressToEditOnly.lng)};return t._api.getCustomerAddresses().subscribe(i=>{t.addresses=[],i.forEach(r=>{null!==r.description&&""!==r.description&&t.addresses.push(r)})}),t.loadMap(n,t.isMobile?"selected":"main"),void setTimeout(()=>{t.addressDetailsForm&&t.addressDetailsForm.updateForm("addressDetails",t.addressToEditOnly.flatNbr||""),t.buildingForm&&t.buildingForm.updateForm("building",t.addressToEditOnly.building||""),t.additionalNotesForm&&t.additionalNotesForm.updateForm("additionalNotes",t.addressToEditOnly.additionalIndications||""),t.descriptionForm&&"C"===t.addressToEditOnly.addressType&&t.descriptionForm.updateForm("description",t.addressToEditOnly.description||"")},300)}console.log("\u{1f534} Edit mode NOT detected - resetting to current location"),t.resetToCurrentLocation(),console.log("\u{1f504} Component initialized - resetting to current location view"),t.isMobile||(t.customerLocation={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng},t.isUsingDefaultLocation=!0);try{const i=(yield(0,I._)(t._api.getCustomerAddresses())).filter(r=>null!==r.description&&""!==r.description);if(0===i.length)t.addresses=[],t.checkSpecialFlowForNoAddresses();else try{const r=yield(0,I._)(t._api.getLastOrder(1));if(r&&r.length>0&&r[0].addressID){const a=r[0].addressID,c=i.findIndex(l=>l.addressID===a);if(c>-1){const[l]=i.splice(c,1);t.addresses=[l,...i]}else t.addresses=i}else t.addresses=i}catch{t.addresses=i}}catch(n){console.error("\u274c Error cargando direcciones guardadas:",n),t.addresses=[]}t.customerLocation&&(console.log("\u{1f5fa}\ufe0f Using location:",t.customerLocation),console.log("\u{1f5fa}\ufe0f showMap:",t.showMap),console.log("\u{1f5fa}\ufe0f isUsingDefaultLocation:",t.isUsingDefaultLocation),console.log("\u{1f5fa}\ufe0f Map should show:",t.showMap&&t.customerLocation&&!t.isUsingDefaultLocation),t.showMap=!0,yield t.waitForMapComponents(),t.loadMap(t.customerLocation,"main"),yield t.adjustModalBreakpointToContent(),t.updateMobileListMaxHeight()),t.deliveryAddressesLoaded.emit(),yield t.modalService.notifyDeliveryAddressesLoaded()}})()}waitForMapComponents(){var t=this;return(0,g.A)(function*(){for(let n=0;n<40;n++){const i=t.useHereMapsComponent?t.mainHereMap:t.mainGoogleMap;if(i&&(t.useHereMapsComponent?i.map_?.map:i.map))return;yield new Promise(r=>setTimeout(r,50))}})()}selectSavedAddress(t){if(this.ngZone.run(()=>{this.selectedAddress=t,this.showCurrentLocationTooltip=!1,this.selectedAddress.isFromSavedList=!0}),t.lat&&t.lng){const o={lat:parseFloat(t.lat),lng:parseFloat(t.lng)};this.loadMap(o,"main")}this.cdr.detectChanges(),this.loadAddressNotes(t)}loadAddressNotes(t){const o=t.additionalIndications||"";this.additionalNotesFormInList?this.additionalNotesFormInList.updateForm("additionalNotes",o):requestAnimationFrame(()=>{this.additionalNotesFormInList?this.additionalNotesFormInList.updateForm("additionalNotes",o):console.warn("\u26a0\ufe0f additionalNotesFormInList still not available")})}selectCurrentLocation(){var t=this;return(0,g.A)(function*(){if(!t.customerLocation||t.customerLocation&&t.customerLocation.lat===f.c.hereMaps.centerMap.lat&&t.customerLocation.lng===f.c.hereMaps.centerMap.lng)try{const n=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:n.latitude,lng:n.longitude},t.isUsingDefaultLocation=!1,console.log("Real user location obtained in selectCurrentLocation:",t.customerLocation),t.hereS.reveseGeoCode(t.customerLocation.lat+","+t.customerLocation.lng).subscribe(r=>{console.log(r),r.items.length>0&&(t.currentPositionAddress=r.items[0].title)},r=>{console.log(r)})}catch(n){if(console.error("Error getting location permission:",n),t.isMobile){yield t.geoLocationService.showModal(n?.code||1,t._orderType),yield new Promise(i=>setTimeout(i,400)),t.setupLocationRetryOnResume();try{const i=yield t.geoLocationService.getCurrentPosition().toPromise();t.ngZone.run((0,g.A)(function*(){t.customerLocation={lat:i.latitude,lng:i.longitude},t.isUsingDefaultLocation=!1,t.showMap=!0,t.cdr.detectChanges(),t.hereS.reveseGeoCode(t.customerLocation.lat+","+t.customerLocation.lng).subscribe(a=>{a?.items?.length>0&&(t.currentPositionAddress=a.items[0].title,t.cdr.detectChanges())}),0===t.addresses.length?t.checkSpecialFlowForNoAddresses():(yield t.waitForMapComponents(),t.loadMap(t.customerLocation,"main"),yield t.adjustModalBreakp
1ointToContent())}))}catch{}return}return void(t.showLocationPermissionPopup=!0)}t.customerLocation&&(t.ngZone.run(()=>{t.selectedAddress="current",t.showCurrentLocationTooltip=!t.isMobile}),t.isPickupMode&&!t.useHereMapsComponent&&t.mainGoogleMap?.map?(t.mainGoogleMap.updateUserLocationMarker(t.customerLocation),t.mainGoogleMap.map.setCenter(t.customerLocation),t.mainGoogleMap.map.setZoom(16),console.log("\u2705 Pickup locate (desktop/mobile): user marker updated, cluster preserved, map centered on user")):(!t.useHereMapsComponent&&t.mainGoogleMap?.map&&(t.mainGoogleMap.map.setCenter(t.customerLocation),t.mainGoogleMap.map.setZoom(16)),t.loadMap(t.customerLocation,"main")))})()}edit(t,o){var n=this;return(0,g.A)(function*(){if(n.logCurrentStates("BEFORE edit"),o.stopPropagation(),n.validatingZone=!1,n.zoneValidated=!1,n.deliveryZone=null,n.showCurrentLocationTooltip=!1,n.addressDetailsFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uZ)(),formName:"addressDetailsForm",groups:[],isReadOnly:!1}),n.buildingFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.c3)(),formName:"buildingForm",groups:[],isReadOnly:!1}),n.additionalNotesFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.uk)(),formName:"additionalNotesForm",groups:[],isReadOnly:!1}),n.descriptionFormMetadata=new S.Q({buttons:[],commitMode:"change",focusOnFirstElement:!1,fields:(0,k.WS)(),formName:"descriptionForm",groups:[],isReadOnly:!1}),n.addressDetailsForm?.updateForm("addressDetails",""),n.buildingForm?.updateForm("building",""),n.additionalNotesForm?.updateForm("additionalNotes",""),n.descriptionForm?.updateForm("description",""),n.addressDetailsData="",n.buildingData="",n.additionalNotesData="",n.selectedAddressType="",n.selectedPhotoUrl=null,n.selectedPhotoFile=null,n.ngZone.run(()=>{n.selectedAddress=t,n.selectedAddress.isFromEdit=!0,n.selectedAddressType=t.addressType||""}),n.isMobile)n.confirmAddress(),Promise.resolve().then(()=>{n.confirmSelectedAddress()});else{n.showDesktopAddressDetails=!0;const i={lat:parseFloat(t.lat),lng:parseFloat(t.lng)};n.mapCenterCoordinates=i,Promise.resolve().then(()=>{requestAnimationFrame(()=>{n.fillDesktopForms(t),requestAnimationFrame(()=>{n.loadMap(i,"main")})})})}n.logCurrentStates("AFTER edit")})()}fillDesktopForms(t){this.addressDetailsForm&&t.flatNbr&&(this.addressDetailsForm.updateForm("addressDetails",t.flatNbr),this.addressDetailsData=t.flatNbr),this.buildingForm&&t.building&&(this.buildingForm.updateForm("building",t.building),this.buildingData=t.building),this.additionalNotesForm&&t.additionalIndications&&this.additionalNotesForm.updateForm("additionalNotes",t.additionalIndications),this.descriptionForm&&t.description&&this.descriptionForm.updateForm("description",t.description),this.cdr.detectChanges()}discoverAddress(t){clearTimeout(this.temporizador),this.temporizador=setTimeout(()=>{this.discoverAddresses(t)},2e3)}filterDiscovered(t){let o=["administrativeArea","intersection"],n=[];return t.forEach(i=>{-1==o.indexOf(i.resultType)&&n.push(i)}),n}discoverAddresses(t){let o=t.value.address;""!=o&&(o.length>1?(console.log(o),this.hereS.discover(o).subscribe(n=>{this.discover.discovered=this.filterDiscovered(n.items),console.log(this.discover.discovered)},n=>{console.log(n)})):this.discover.discovered=[])}selectAnAddressList(t){var o=this;return(0,g.A)(function*(){o.isPickupMode&&o.isFromSelectDifferentBranch&&console.log('\u{1f4dd} B\xfasqueda manual de direcci\xf3n - limpiando flag de "Select different branch"'),o.locationAddressForm?.updateForm("address",""),o.formMetadata&&(o.formMetadata.focusOnFirstElement=!1),Promise.resolve().then(()=>{document.activeElement instanceof HTMLElement&&(document.activeElement.blur(),console.log("\u{1f4f1} Focus removed from input"))}),o.discover.discovered=[],t.place_id&&o.geocoder.geocode({placeId:t.place_id},n=>{if(n&&n.length>0){const i=n[0].geometry.location.lat(),r=n[0].geometry.location.lng();if(o.addressSelected={position:{lat:i,lng:r},structured_formatting:t.structured_formatting,place_id:t.place_id},console.log("addressSelected from Google:",o.addressSelected),o.updateFooterHeight(),o.isPickupMode)return void o.handlePickupAddressSelected(o.addressSelected.position);o.isMobile?(o.showCurrentLocationTooltip=!0,setTimeout(()=>{o.loadMap(o.addressSelected.position,"selected",!1,()=>{o.useHereMapsComponent?o.selectedHereMap?.map_?.map&&o.selectedHereMap.map_.map.setZoom(16):o.selectedGoogleMap?.map&&o.selectedGoogleMap.map.setZoom(16)})}
1,100)):(o.showDesktopAddressDetails=!0,setTimeout(()=>{o.showCurrentLocationTooltip=!1,o.cdr.detectChanges(),o.loadMap(o.addressSelected.position,"main",!0)},100))}else console.error("Geocode failed:",status)})})()}handlePickupAddressSelected(t){var o=this;return(0,g.A)(function*(){if(console.log("\u{1f3ea} PICKUP: Procesando direcci\xf3n seleccionada",t),o.selectedBranch=null,o.top3NearbyForAddress=[],0===o.allBranches.length){const r=o.langService.getLangConfig().lang;yield o.loadAllBranches(r)}const n=o.allBranches.filter(r=>r.lat&&r.lng).map(r=>{const a=o.utils.linealDistance(t,{lat:r.lat,lng:r.lng});return{...r,distance:Math.round(1e3*a)}}).sort((r,a)=>(r.distance||0)-(a.distance||0));o.isMobile||o.isUsingDefaultLocation||!o.customerLocation?(o.top3NearbyForAddress=n.slice(0,3),console.log("\u{1f4cd} Top 3 tiendas cercanas:",o.top3NearbyForAddress.map(r=>r.name))):(o.nearbyBranches=n.slice(0,3),o.top3NearbyForAddress=[],console.log("\u{1f4cd} Nearby branches actualizado desde b\xfasqueda desktop:",o.nearbyBranches.map(r=>r.name))),o.cdr.detectChanges(),setTimeout(()=>{const r=o.isMobile?o.selectedGoogleMap:o.mainGoogleMap;if(!r)return;const a=!(o.isUsingDefaultLocation||!o.customerLocation)&&o.customerLocation,c=n[0]||null,l=()=>{r.drawMarkersFromPickupWithCityCluster(a,o.allBranches,c,!0);const _=n.slice(0,3);r.fitBoundsForBranches(_,300),o.selectedBranch&&setTimeout(()=>{r.moveToPosition(o.selectedBranch)},o.isMobile?350:150)};r.map?l():r.loadGoogleMaps(t,!1).subscribe({next:()=>l(),error:_=>console.error("Error loading map:",_)})},100)})()}selectBranchFromNearbyList(t){console.log("\u{1f3ea} Tienda seleccionada:",t.name),this.selectedBranch=t,this.top3NearbyForAddress=[];const o=this.isMobile?this.selectedGoogleMap:this.mainGoogleMap;o&&t.lat&&t.lng&&o.moveToPosition(t),this.cdr.detectChanges()}toggleDesktopPickupSearch(){this.showDesktopPickupSearch=!0,setTimeout(()=>{this.locationAddressForm?.setFocus()},100),this.cdr.detectChanges()}selectAddressForPickupDesktop(t){console.log("\u{1f5a5}\ufe0f Desktop pickup - direcci\xf3n seleccionada:",t),this.discover.discovered=[],this.locationAddressForm&&this.locationAddressForm.updateForm("address",""),t.place_id&&this.geocoder.geocode({placeId:t.place_id},o=>{if(o&&o.length>0){const r={lat:o[0].geometry.location.lat(),lng:o[0].geometry.location.lng()};console.log("\u{1f4cd} Desktop pickup - geocoded position:",r),this.selectedBranch=null,this.handlePickupAddressSelected(r)}})}goBackToSearch(){this.addressSelected=!1,this.selectedBranch=null,this.top3NearbyForAddress=[],this.discover.discovered=[],this.mapUpdateTimeout&&(clearTimeout(this.mapUpdateTimeout),this.mapUpdateTimeout=null),this.lastMapCenter=null,this.isUpdatingMapMarkers=!1,this.cdr.detectChanges(),setTimeout(()=>{this.locationAddressForm?.setFocus()},100)}loadMap(t,o="main",n=!1,i){let r,a;"selected"===o?(r=this.selectedHereMap,a=this.selectedGoogleMap):(r=this.mainHereMap,a=this.mainGoogleMap);const c=!0;this.useHereMapsComponent&&r?r.loadHereMaps(t||f.c.hereMaps.centerMap,c).subscribe({next:()=>{t&&r&&!n&&r.drawMarkersFromDelivery(t||f.c.hereMaps.centerMap),i&&i()},error:l=>console.error("Error loading HERE maps:",l)}):a&&a.loadGoogleMaps(t||f.c.hereMaps.centerMap,c).subscribe({next:()=>{t&&a&&!n&&a.drawMarkersFromDelivery(t||f.c.hereMaps.centerMap),i&&i()},error:l=>console.error("Error loading Google maps:",l)})}confirmSelectedAddress(){var t=this;return(0,g.A)(function*(){if(!t.addressSelected)return void console.error("No address selected for confirmation");const o=t.mapCenterCoordinates||{lat:t.addressSelected.position.lat,lng:t.addressSelected.position.lng};if(console.log("\u{1f4cd} Using coordinates:",o,"from",t.mapCenterCoordinates?"center marker":"addressSelected"),t.mapCenterCoordinates&&(t.addressSelected.position={lat:t.mapCenterCoordinates.lat,lng:t.mapCenterCoordinates.lng},console.log("\u2705 Updated addressSelected with center marker coordinates")),!t.canProceedWithAddress)return console.log("\u{1f50d} Validating delivery zone before opening address details modal..."),void t.deliveryService.validateZoneAndExecute(o,()=>{setTimeout(()=>
1{t.openAddressDetailsModal()},300)});t.openAddressDetailsModal()})()}openAddressDetailsModal(){var t=this;return(0,g.A)(function*(){try{const o=yield t.modalService.openModalAddressDetails({addressSelected:t.addressSelected,selectedAddressForEdit:t.selectedAddress?.isFromEdit?t.selectedAddress:null,addressDetailsFormMetadata:t.addressDetailsFormMetadata,additionalNotesFormMetadata:t.additionalNotesFormMetadata,descriptionFormMetadata:t.descriptionFormMetadata,addressTypes:t.addressTypes,addresses:t.addresses,initialPhotoUrl:t.getSelectedAddressPhotoUrl(t.selectedAddress),selectedAddressType:t.selectedAddressType,isEditAddressOnly:t.isEditAddressOnly});console.log("Modal closed with result:",o),o.data?(console.log("Address details result:",o.data),t.handleAddressDetailsResult(o.data)):console.log("Modal closed without data")}catch(o){console.error("Error opening address details modal:",o)}})()}handleAddressDetailsResult(t){console.log("Handling modal result:",t),console.log("\u{1f4dd} Is edit mode from modal:",t.isEditMode),console.log("\u{1f4dd} Is edit address only:",t.isEditAddressOnly),t.isEditAddressOnly?this.handleEditAddressOnlyResult(t):this.processAddressData(t)}handleEditAddressOnlyResult(t){var o=this;console.log("\u{1f4be} Processing edit address only result:",t);const n=t.addressDetails||"",i=t.additionalNotes||"",a=t.addressType,c=t.building||"";let l="";if("C"===a)l=t.description||this.addressToEditOnly.description;else if(a){const M=this.addressTypes.find(A=>A.id===a);l=M?M.label:this.addressToEditOnly.description}else l=this.addressToEditOnly.description;const _=t.selectedAddress?.lat||this.addressToEditOnly.lat,p=t.selectedAddress?.lng||this.addressToEditOnly.lng,u={lat:_,lng:p,resolvedAddress:t.selectedAddress?.resolvedAddress||this.addressToEditOnly.resolvedAddress,building:c,flatNbr:n,description:l,addressType:a||this.addressToEditOnly.addressType,addressID:this.addressToEditOnly.addressID,additionalIndications:i,areaID:0,stDirectoryID:0,zoneID:0},h=t.photoFile||this.selectedPhotoFile;
1console.log("\u{1f4dd} Validating zone before updating address:",u);const y={lat:parseFloat(_),lng:parseFloat(p)};this.deliveryService.validateZoneAndExecute(y,M=>{console.log("\u2705 Zone validated:",M),u.areaID=M?.zone.areaID||0,u.stDirectoryID=M?.zone.stDirectoryID||0,u.zoneID=M?.zone?.id||0,console.log("\u2705 Zone validated for edit address only:",M),this._api.updateAddress("u",u,!1,"handleEditAddressOnlyResult").subscribe(function(){var A=(0,g.A)(function*(b){const x=b?.addressID||u.addressID;yield o.uploadAddressPhotoTemporary(h,x),o.deliveryService.clearAddressToEditOnly(),o.reloadUserAddresses(),o.clearEditAddressOnlyState(),o.isMobile?o.modalController.getTop().then(D=>{D&&D.dismiss({success:!0})}):o.router.navigate(["/account"])});return function(b){return A.apply(this,arguments)}}(),A=>{console.error("\u274c Error updating address:",A)})})}processAddressData(t){var o=this;console.log("\u{1f504} Processing address data from modal/desktop:",t),console.log("\u{1f4cd} Current selectedAddress:",this.selectedAddress),console.log("\u270f\ufe0f Is editing?",t.isEditMode||this.selectedAddress?.isFromEdit);const n=t.addressDetails?.addressDetails||t.addressDetails||"",i=t.additionalNotes?.additionalNotes||t.additionalNotes||"",r=t.description?.description||t.description||"",a=t.addressType,c=t.isEditMode||this.selectedAddress?.isFromEdit;if(t.addressDetails&&this.addressDetailsForm&&this.addressDetailsForm.updateForm("addressDetails",n),t.additionalNotes&&this.additionalNotesForm&&this.additionalNotesForm.updateForm("additionalNotes",i),this.selectedAddressType=a,c){const l=this.validateAddressTypeCode(a);let _="";if("C"===l)_=r;else if(l){const h=this.addressTypes.find(y=>y.id===l);_=h?h.label:this.selectedAddress.description}else _=this.langService.getInstantTranslation("LANG_SAVED_ADDRESS");console.log(this.selectedAddress),console.log(t);let p={lat:t.selectedAddress.lat,lng:t.selectedAddress.lng,resolvedAddress:t.selectedAddress.resolvedAddress,building:t.building||"",flatNbr:n,description:_,addressType:l||"",addressID:this.selectedAddress.addressID,additionalIndications:i,areaID:0,stDirectoryID:0,zoneID:0};const v=t.photoFile||this.selectedPhotoFile;let u={lat:t.selectedAddress.lat,lng:t.selectedAddress.lng};this.hereS.setLocation(u),this.deliveryService.validateZoneAndExecute(u,function(){var h=(0,g.A)(function*(y){if(y.zone){if(console.log("\u2705 Zone validated for edited address:",y),o.deliveryZone=y,!o.deliveryService.getAddressOnly()&&!(yield o.checkBranchBeforeProceeding(y.branch,o.orderType,!0)))return;p.areaID=y?.zone.areaID||0,p.stDirectoryID=y?.zone.stDirectoryID||0,p.zoneID=y?.zone?.id||0,o._api.updateAddress("u",p,!1,"processAddressData").subscribe(function(){var M=(0,g.A)(function*(A){const b=A?.addressID||p.addressID;yield o.uploadAddressPhotoTemporary(v,b),o.deliveryService.setZoneDelivery(o.deliveryZone),o.deliveryService.newAddressSelected(p),o.reloadUserAddresses(),o.navigateAfterAddressSave(o.deliveryZone,p),o.clearLocalState()});return function(A){return M.apply(this,arguments)}}(),M=>{console.error("Error updating address:",M),o.clearLocalState()})}});return function(y){return h.apply(this,arguments)}}())}else this.finishNewAddressFlow(t)}finishNewAddressFlow(t){var o=this;let n,i;if(console.log("Finishing new address flow with:",t),"current"===this.selectedAddress){if(!this.customerLocation)return void console.error("\u274c Customer location not available");n={lat:this.customerLocation.lat,lng:this.customerLocation.lng},i=this.currentPositionAddress||"Current Location",console.log("\u{1f4cd} Using current location:",n),console.log("\u{1f3e0} Using current position address:",i)}else t.selectedAddress.lat&&t.selectedAddress.lng?(n={lat:t.selectedAddress.lat,lng:t.selectedAddress.lng},i=t.selectedAddress.resolvedAddress||"Selected Location",console.log("\u{1f4cd} Using selectedAddress coordinates directly:",n),console.log("\u{1f3e0} Using resolvedAddress:",i)):(n={lat:t.selectedAddress.position.lat,lng:t.selectedAddress.position.lng},i=t.selectedAddress.structured_formatting.main_text+", "+t.selectedAddress.structured_formatting.secondary_text,console.log("\u{1f4cd} Using selected address position:",n),console.log("\u{1f3e0} Using structured formatting:",i));this.deliveryService.validateZoneAndExecute(n,function(){var r=(0,g.A)(function*(a){if(console.log("\u2705 Zone validated with data:",a),o.deliveryZone=a,!o.deliveryService.getAddressOnly()&&!(yield o.checkBranchBeforeProceeding(a.branch,o.orderType,!0)))return;const c=a?.zone.areaID||0,l=a?.zone.stDirectoryID||0,_=a?.zone.id||0;console.log("\u{1f4cd} Extracted zone data:",{areaID:c,stDirectoryID:l,zoneID:_});
1const p=t.addressDetails?.addressDetails||t.addressDetails||"",v=t.additionalNotes?.additionalNotes||t.additionalNotes||"",u=t.description?.description||t.description||"",h=t.addressType,y=o.validateAddressTypeCode(t.addressType);let M="";if("C"===y)M=u||"";else if(y){const x=o.addressTypes.find(D=>D.id===y);M=x?x.label:o.selectedAddress?.description||o.langService.getInstantTranslation("LANG_SAVED_ADDRESS")}else M=o.selectedAddress?.description||o.langService.getInstantTranslation("LANG_SAVED_ADDRESS");const A={streetID:0,stDirectoryID:l,stNumber:0,building:t.building||"",stairNbr:"",flatNbr:p,doorNbr:"",lat:n.lat,lng:n.lng,resolvedAddress:i,description:M,addressType:h||"",additionalIndications:v,areaID:c,zoneID:_},b=t.photoFile||o.selectedPhotoFile;console.log("\u{1f3e0} New address object with zone data:",A),o._api.updateAddress("n",A,!1,"finishNewAddressFlow").subscribe(function(){var x=(0,g.A)(function*(D){console.log("\u2705 Address created successfully:",D),D?.addressID&&(A.addressID=D?.addressID,yield o.uploadAddressPhotoTemporary(b,D.addressID)),console.log(A),o.hereS.setLocation(n),o.deliveryService.setZoneDelivery(o.deliveryZone),o.deliveryService.newAddressSelected(A),o.reloadUserAddresses();const E=o.deliveryService.getCreateAddressOnly(),O=o.deliveryService.getAddressOnly();console.log("\u{1f50d} Navigation flags - isCreateAddressOnly:",E,"isAddressOnly:",O),E?(console.log("\u{1f4cd} Create address only flow - redirecting to account"),o.clearLocalState(),o.isMobile?o.modalController.getTop().then(T=>{T&&T.dismiss({success:!0})}):o.router.navigate(["/account"])):O?(console.log("\u{1f4cd} Address only flow (from promotions) - using navigateAfterAddressSave"),console.log("\u{1f50d} BEFORE navigateAfterAddressSave - isAddressOnly:",O),console.log("\u{1f50d} BEFORE navigateAfterAddressSave - getAddressOnly():",o.deliveryService.getAddressOnly()),console.log("\u{1f50d} BEFORE navigateAfterAddressSave - zone:",o.deliveryZone),console.log("\u{1f50d} BEFORE navigateAfterAddressSave - newAddress:",A),o.navigateAfterAddressSave(o.deliveryZone,A),o.clearLocalState()):(console.log("\u{1f4cd} Normal flow - using navigateAfterAddressSave for delivery"),console.log("\u26a0\ufe0f FALLING TO ELSE - isAddressOnly:",O),console.log("\u26a0\ufe0f FALLING TO ELSE - getAddressOnly():",o.deliveryService.getAddressOnly()),o.navigateAfterAddressSave(o.deliveryZone,A),o.clearLocalState())});return function(D){return x.apply(this,arguments)}}(),x=>{console.error("\u274c Error creating address:",x)})});return function(a){return r.apply(this,arguments)}}())}selectAddressType(t){if(this.selectedAddressType===t)this.selectedAddressType="";else if(this.selectedAddressType=t,"C"!==t){const o=this.addressTypes.find(n=>n.id===t);if(o&&this.descriptionFormMetadata&&this.descriptionFormMetadata.fields.length>0){const n=this.descriptionFormMetadata.fields.find(i=>"description"===i.id);n&&(n.value=o.label)}}else if(this.descriptionFormMetadata&&this.descriptionFormMetadata.fields.length>0){const o=this.descriptionFormMetadata.fields.find(n=>"description"===n.id);o&&(o.value="")}}saveAndContinue(){console.log("Desktop saveAndContinue called");const t=this.addressDetailsForm?.getValue("addressDetails")||"",o=this.additionalNotesFormInList?.getValue("additionalNotes")||this.additionalNotesForm?.getValue("additionalNotes")||"",n=this.descriptionForm?.getValue("description")||this.langService.getInstantTranslation("LANG_SAVED_ADDRESS");if(console.log("\u{1f4dd} Description value from form:",n),console.log("\u{1f3f7}\ufe0f Selected address type:",this.selectedAddressType),this.mapCenterCoordinates&&this.selectedAddress&&"current"!==this.selectedAddress&&this.addressSelected)if(console.log("\u{1f4cd} Updating selectedAddress with new coordinates and address from center marker:",this.mapCenterCoordinates),this.selectedAddress.lat=this.mapCenterCoordinates.lat,this.selectedAddress.lng=this.mapCenterCoordinates.lng,this.addressSelected.structured_formatting){const r=this.addressSelected.structured_formatting.main_text+", "+this.addressSelected.structured_formatting.secondary_text;this.selectedAddress.resolvedAddress=r,console.log("\u{1f4cd}
1 Updated resolvedAddress:",r)}else this.addressSelected.formatted_address&&(this.selectedAddress.resolvedAddress=this.addressSelected.formatted_address,console.log("\u{1f4cd} Updated resolvedAddress from formatted_address:",this.addressSelected.formatted_address));const i={addressDetails:t,building:this.buildingForm?.getValue("building")||this.buildingData||"",additionalNotes:o,description:n,addressType:this.selectedAddressType,selectedAddress:this.selectedAddress,photoUrl:this.selectedPhotoUrl,photoFile:this.selectedPhotoFile};this.processAddressData(i)}reloadUserAddresses(){console.log("\u{1f504} Reloading user addresses after edit..."),this._api.getCustomerAddresses().subscribe(t=>{console.log("\u2705 Addresses reloaded:",t);const o=t.filter(n=>null!==n.description&&""!==n.description);this._api.getLastOrder(1).subscribe(n=>{if(n&&n.length>0&&n[0].addressID){const i=n[0].addressID,r=o.findIndex(a=>a.addressID===i);if(r>-1){const[a]=o.splice(r,1);this.addresses=[a,...o]}else this.addresses=o}else this.addresses=o;console.log("\u{1f4cd} Updated addresses array:",this.addresses)},()=>{this.addresses=o,console.log("\u{1f4cd} Updated addresses array:",this.addresses)})},t=>{console.error("\u274c Error reloading addresses:",t)})}clearLocalState(){this.addresses&&this.addresses.length>0&&this.addresses.forEach(t=>{t.isFromEdit&&delete t.isFromEdit}),this.addressSelected=!1,this.selectedAddress=null,this.selectedAddressType="",this.selectedPhotoUrl=null,this.selectedPhotoFile=null,this.showDesktopAddressDetails=!1,this.searchingLocation=!1,this.mapCenterMoved=!1,this.validatingZone=!1,this.zoneValidated=!1,this.deliveryZone=null,this.deliveryService.getCreateAddressOnly()&&this.deliveryService.clearCreateAddressOnly(),this.addressDetailsForm?.updateForm("addressDetails",""),this.buildingForm?.updateForm("building",""),this.additionalNotesForm?.updateForm("additionalNotes",""),this.descriptionForm?.updateForm("description",""),this.addressDetailsData="",this.buildingData="",this.additionalNotesData="",this.noExpandModal.emit()}goBackDesktop(){this.isNavigatingBack=!0,this.addresses&&this.addresses.length>0&&this.addresses.forEach(t=>{t.isFromEdit&&delete t.isFromEdit}),this.showDesktopAddressDetails=!1,this.selectedAddress=null,this.addressSelected=!1,this.selectedAddressType="",this.selectedPhotoUrl=null,this.selectedPhotoFile=null,this.mapCenterCoordinates=null,this.mapCenterMoved=!1,this.showCurrentLocationTooltip=!0,this.addressDetailsForm?.updateForm("addressDetails",""),this.buildingForm?.updateForm("building",""),this.additionalNotesForm?.updateForm("additionalNotes",""),this.additionalNotesFormInList?.updateForm("additionalNotes",""),this.descriptionForm?.updateForm("description",""),this.addressDetailsData="",this.buildingData="",this.additionalNotesData="",this.mainGoogleMap&&this.mainGoogleMap.resetLocateMode(),this.customerLocation?setTimeout(()=>{this.loadMap(this.customerLocation,"main"),console.log("\u2705 Map restored to current location:",this.customerLocation),setTimeout(()=>{this.isNavigatingBack=!1,console.log("\u2705 Navigation flag cleared")},500)},100):setTimeout(()=>{this.isNavigatingBack=!1,console.log("\u2705 Navigation flag cleared (no customer location)")},300)}goBackToMenu(){this.goBackDesktop(),this.router.navigate(["/menu"])}saveEditedAddressOnly(){var t=this;if(console.log("\u{1f4be} Saving edited address only (without placing order)"),!this.addressToEditOnly||!this.selectedAddress)return void console.error("\u274c No address to edit or no selected address");const o=this.addressDetailsForm?.getValue("addressDetails")||this.addressToEditOnly.flatNbr||"",n=this.additionalNotesFormInList?.getValue("additionalNotes")||this.additionalNotesForm?.getValue("additionalNotes")||this.addressToEditOnly.additionalIndications||"",i=this.descriptionForm?.getValue("description")||"",r=this.validateAddressTypeCode(this.selectedAddressType);let a="";if("C"===r)a=i||this.addressToEditOnly.description;else if(r){const u=this.addressTypes.find(h=>h.id===r);a=u?u.label:this.addressToEditOnly.description}else a=this.addressToEditOnly.description;const c=this.mapCenterCoordinates?.lat||this.selectedAddress.lat||this.addressToEditOnly.lat,l=this.mapCenterCoordinates?.lng||this.selectedAddress.lng||this.addressToEditOnly.lng;let _=this.addressToEditOnly.resolvedAddress;this.addressSelected&&this.addressSelected.formatted_address?_=this.addressSelected.formatted_address:this.addressSelected&&this.addressSelected.structured_formatting&&(_=this.addressSelected.structured_formatting.main_text+", "+this.addressSelected.structured_formatting.secondary_text);const p={lat:c,lng:l,resolvedAddress:_,building:this.buildingData,flatNbr:o,description:a,addressType:r||this.addressToEditOnly.addressType,addressID:this.addressToEditOnly.addressID,additionalIndications:n,areaID:0,stDirectoryID:0,zoneID:0};console.log("\u{1f4dd} Validating zone before updating address:",p);const v={lat:parseFloat(c),lng:parseFloat(l)};this.deliveryService.validateZoneAndExecute(v,u=>{console.log("\u2705 Zone validated for edit address only:",u),p.areaID=u?.zone.areaID||0,p.stDirectoryID=u?.zone.stDirectoryID||0,p.zoneID=u?.zone?.i
1d||0,this._api.updateAddress("u",p,!1,"saveEditedAddressOnly").subscribe(function(){var h=(0,g.A)(function*(y){const M=t.selectedPhotoFile,A=y?.addressID||p.addressID;yield t.uploadAddressPhotoTemporary(M,A),t.deliveryService.clearAddressToEditOnly(),t.reloadUserAddresses(),t.clearEditAddressOnlyState(),t.isMobile?t.modalController.getTop().then(b=>{b&&b.dismiss({success:!0})}):t.router.navigate(["/account"])});return function(y){return h.apply(this,arguments)}}(),h=>{console.error("\u274c Error updating address:",h)})})}cancelAddressOnlyFlow(){console.log("\u274c Cancelling address-only flow (edit or create)"),this.isEditAddressOnly&&this.deliveryService.clearAddressToEditOnly(),this.isCreateAddressOnly&&this.deliveryService.clearCreateAddressOnly(),this.clearAddressOnlyState(),this.isMobile?this.modalController.getTop().then(t=>{t&&t.dismiss({cancelled:!0})}):this.router.navigate(["/account"])}cancelEditAddressOnly(){this.cancelAddressOnlyFlow()}clearAddressOnlyState(){this.isEditAddressOnly=!1,this.addressToEditOnly=null,this.isCreateAddressOnly=!1}clearEditAddressOnlyState(){this.clearAddressOnlyState(),this.addressSelected=!1,this.selectedAddress=null,this.selectedAddressType="",this.showDesktopAddressDetails=!1,this.searchingLocation=!1}isAddressTypeDisabled(t){return!(!this.addresses||0===this.addresses.length||t===this.selectedAddress.addressType||"H"!==t&&"O"!==t&&"F"!==t)&&this.addresses.some(o=>o.addressType===t)}getChipIcon(t){return this.isAddressTypeDisabled(t.id)?t.icon:`${t.icon.replace(".svg","")}_white.svg`}openModalAddPhotoAddress(){var t=this;return(0,g.A)(function*(){try{const o=t.selectedPhotoUrl||t.getSelectedAddressPhotoUrl(t.selectedAddress),n=o?{existingPhoto:{url:o,src:o}}:{},i=yield t.modalService.openModalAddPhotoAddress(n);if(i.data&&i.data.photoUrl){console.log("Photo selected:",i.data.photoUrl),t.selectedPhotoUrl=i.data.photoUrl,t.selectedPhotoFile=i.data.photoFile||null,t.failedAddressPhotoUrls.clear();const r=t.addressToEditOnly?.addressID||(t.selectedAddress&&"current"!==t.selectedAddress&&t.selectedAddress.addressID>0?t.selectedAddress.addressID:null);r&&(yield t.uploadAddressPhotoTemporary(t.selectedPhotoFile,r))}}catch(o){console.error("Error opening photo modal:",o)}})()}onAddressPhotoError(t){const o=t.target;o?.src&&this.failedAddressPhotoUrls.add(o.src)}getSelectedAddressPhotoUrl(t){const o=this.selectedPhotoUrl||this.getAddressPhotoUrl(t);return o?this.failedAddressPhotoUrls.has(o)?null:o:null}isJpegFile(t){return!!t&&(typeof Blob<"u"&&t instanceof Blob||typeof File<"u"&&t instanceof File)&&("image/jpeg"===t.type||"image/jpg"===t.type||t.name?.toLowerCase().endsWith(".jpg")||t.name?.toLowerCase().endsWith(".jpeg"))}uploadAddressPhotoTemporary(t,o){var n=this;return(0,g.A)(function*(){if(n.isJpegFile(t))if(t.size>1048576)console.warn("\u26a0\ufe0f Selected photo exceeds 1MB. Upload skipped.");else{yield n.loaderService.showLoader("photo-upload");try{const i=yield n.photoUploaderService.uploadAddressPhoto(t,o),r=String(o),a=Date.now();n.addressPhotoVersions[r]=a,n.saveAddressPhotoVersions(),n.failedAddressPhotoUrls.clear(),i?.url&&(n.selectedPhotoUrl=`${i.url}?v=${a}`)}catch(i){console.error("\u274c Temporary address photo upload failed:",i)}finally{yield n.loaderService.hideLoader("photo-upload").catch(()=>{})}}else t&&console.warn("\u26a0\ufe0f Selected photo is not JPEG. Upload skipped.")})()}tapMarketEvt(t){if(console.log("Marker tapped:",t),this.isPickupMode&&t?.data?.isBranch&&t?.data?.data){const o=t.data.data;console.log("\u{1f3ea} Branch marker tapped:",o.name),this.isMobile?this.selectBranchFromNearbyList(o):(this.selectedBranch=o,this.selectedAddress=`branch_${o.id}`,this.mainGoogleMap?.map&&(this.mainGoogleMap.map.setCenter({lat:o.lat,lng:o.lng}),this.mainGoogleMap.map.setZoom(16)),this.mainGoogleMap&&this.mainGoogleMap.overrideIconMarker(o.id),this.cdr.detectChanges())}}onIconInputClicked(){console.log("Icon input clicked")}confirmAddress(){console.log("confirmAddress - selectedAddress:",this.selectedAddress),this.showLocationPermissionPopup=!1,this.validateAndProceed()}validateAndProceed(){var t=this;let o=null;if(this.selectedAddress?.isFromSavedList&&!this.selectedAddress?.isFromEdit){console.log("\u{1f4cd}
1 Direcci\xf3n guardada seleccionada:",this.selectedAddress),o={lat:parseFloat(this.selectedAddress.lat),lng:parseFloat(this.selectedAddress.lng)},this.hereS.setLocation(o);const n=this.additionalNotesFormInList?.getValue("additionalNotes")||this.selectedAddress.additionalIndications,i=this.selectedAddress.additionalIndications||"";return console.log("\u{1f4dd} Comparing notes - Original:",i,"Form:",n),void this.deliveryService.validateZoneAndExecute(o,function(){var r=(0,g.A)(function*(a){t.deliveryZone=a,(t.deliveryService.getAddressOnly()||(yield t.checkBranchBeforeProceeding(a.branch,t.orderType,!0)))&&(n!==i?(console.log("\u{1f4dd} Additional notes changed - updating address..."),t._api.updateAddress("u",{lat:t.selectedAddress.lat,lng:t.selectedAddress.lng,resolvedAddress:t.selectedAddress.resolvedAddress,building:t.selectedAddress.building||"",flatNbr:t.selectedAddress.flatNbr||"",description:t.selectedAddress.description,addressType:t.selectedAddress.addressType,addressID:t.selectedAddress.addressID,additionalIndications:n,areaID:a.zone?.areaID||0,stDirectoryID:a.zone?.stDirectoryID||0,zoneID:a.zone?.id||0},!1,"validateAndProceed").subscribe(l=>{console.log("\u2705 Address notes updated successfully:",l),t.selectedAddress.additionalIndications=n,t.deliveryService.setZoneDelivery(t.deliveryZone),t.deliveryService.newAddressSelected(t.selectedAddress),t.reloadUserAddresses(),t.navigateAfterAddressSave(t.deliveryZone,t.selectedAddress),t.clearLocalState()},l=>{console.error("\u274c Error updating address notes:",l),t.deliveryService.setZoneDelivery(t.deliveryZone),t.deliveryService.newAddressSelected(t.selectedAddress),t.reloadUserAddresses(),t.navigateAfterAddressSave(t.deliveryZone,t.selectedAddress),t.clearLocalState()})):(console.log("\u{1f4dd} Additional notes unchanged - proceeding without update"),t.deliveryService.setZoneDelivery(t.deliveryZone),t.deliveryService.newAddressSelected(t.selectedAddress),t.reloadUserAddresses(),t.navigateAfterAddressSave(t.deliveryZone,t.selectedAddress),t.clearLocalState()))});return function(a){return r.apply(this,arguments)}}())}if(this.isMobile||"current"!==this.selectedAddress)if("current"==this.selectedAddress)console.log("Current position address:",this.currentPositionAddress),this.customerLocation&&this.deliveryService.validateZoneAndExecute(this.customerLocation,n=>{if(this.deliveryService.getAddressOnly())return this.deliveryZone=n,this.deliveryService.clearCurrentSelectedAddress(),void this.navigateAfterAddressSave(n,null);this.searchingLocation=!0,this.expandModal.emit(),this.hereS.discover(this.currentPositionAddress).subscribe(i=>{console.log("Discover result for current position:",i.items[0]),this.selectAnAddressList(i.items[0])},i=>{console.error("Error discovering current position:",i)})});else{const n={lat:parseFloat(this.selectedAddress.lat),lng:parseFloat(this.selectedAddress.lng)};this.deliveryService.validateZoneAndExecute(n,()=>{this.searchingLocation=!0,this.expandModal.emit(),this.addressSelected=this.selectedAddress.isFromEdit?{position:{lat:this.selectedAddress.lat,lng:this.selectedAddress.lng},description:this.selectedAddress.description,resolvedAddress:this.selectedAddress.resolvedAddress}:{position:{lat:this.selectedAddress.lat,lng:this.selectedAddress.lng},structured_formatting:{main_text:this.selectedAddress.description,secondary_text:this.selectedAddress.resolvedAddress}},setTimeout(()=>{this.loadMap(this.addressSelected.position,"selected")},100)})}else this.customerLocation&&this.deliveryService.validateZoneAndExecute(this.customerLocation,n=>{if(this.deliveryService.getAddressOnly())return this.deliveryZone=n,this.deliveryService.clearCurrentSelectedAddress(),void this.navigateAfterAddressSave(n,null);this.showDesktopAddressDetails=!0,setTimeout(()=>{this.loadMap(this.customerLocation,"main")},100)})}handleLocateFromMap(){var t=this;return(0,g.A)(function*(){console.log("\u{1f4cd} Locate button clicked in mobile map");try{const o=yield t.geoLocationService.getCurrentPosition().toPromise(),n={lat:o.latitude,lng:o.longitude};console.log("\u2705 User location obtained in mobile:",n),t.geocoder.geocode({location:n},(i,r)=>{if("OK"===r&&i&&i.length>0){const a=i[0],c=a.formatted_address;console.log("\u{1f4cd} Address from current location:",c),t.locationAddressForm&&t.locationAddressForm.updateForm("address",c),t.addressSelected={position:n,description:t.extractMainText(a),resolvedAddress:t.extractSecondaryText(a)},t.selectedGoogleMap&&t.selectedGoogleMap.map&&(t.isPickupMode?(t.selectedGoogleMap.updateUserLocationMarker(n),t.selectedGoogleMap.map.setCenter(n),t.selectedGoogleMap.map.setZoom(16),console.log("\u2705 Pickup locate: user marker updated, cluster preserved, map centered on user")):(t.selectedGoogleMap.map.setCenter(n),t.selectedGoogleMap.map.setZoom(16),console.log("\u2705 Delivery locate: map centered on user location with fixed marker"))),t.cdr.detectChanges(),t.updateFooterHeight()}})}catch(o){console.error("\u274c Error getting location:",o),t.geoLocationService.getErrorMessage(o.code,!0)}})()}extractMainText(t){const o=t.address_components;if(o&&o.length>0){const i=o.find(a=>a.types.includes("street_number")),r=o.find(a=>a.types.includes("route"));if(i&&r)return`${r.long_name} ${i.long_name}`;if(r)return r.long_name}return t.formatted_address.split(",")[0]||t.formatted_address}extractSecondaryText(t){const o=t.address_components;if(o&&o.length>0){const i=o.find(a=>a.types.includes("locality")),r=o.find(a=>a.types.includes("country"));if(i&&r)return`${i.long_name}, ${r.long_name}`;if(i)return i.long_name}return t.formatted_address.split(",").slice(1).join(",").trim()}hideLocationPermissionPopup(){this.showLocationPermissionPopup=!1}openLocationHelp(){window.open("https://support.google.com/chrome/answer/142065","_blank")}validateAddressTypeCode(t){return t&&["H","O","F","C"].includes(t)?t:null}get canProceedWithAddress(){return this.zoneValidated&&this.deliveryZone&&!this.validatingZone}showDeliveryErrorModal(){var t=this;return(0,g.A)(function*(){try{yield t.modalService.openModalWithCustomMsg("No delivery service available to this location. Please select a different address.",null,!0)}catch(o){console.error("Error showing delivery error modal:",o)}})()}checkSpecialFlowForNoAddresses(){var t=this;if(this.addresses.length>0)console.log("Skipping special flow - has addresses:",this.addresses.length);else if(this.isMobile){if(console.log("No addresses found - checking location availability:",{currentPositionAddress:this.currentPositionAddress,customerLocation:this.customerLocation,isUsingDefaultLocation:this.isUsingDefaultLocation}),this.searchingLocation=!0,this.customerLocation&&!this.isUsingDefaultLocation)console.log("User has real location - waiting for address resolution..."),this.waitForCurrentPositionAddress().then(o=>{console.log("Address resolved:",o),this.addressSelected={structured_formatting:{main_text:"Current Location",secondary_text:o||"Your current location"},position:{lat:this.customerLocation.lat,lng:this.customerLocation.lng}},setTimeout((0,g.A)(function*(){yield t.waitForSelectedMapComponents(),t.loadMap(t.customerLocation,"selected")}),200)});else if(this.customerLocation&&this.isUsingDefaultLocation)console.log("User using default location - showing address selection screen with map"),this.addressSelected=!0,this.mapInitialZoom=7,setTimeout((0,g.A)(function*(){yield t.waitForSelectedMapComponents(),t.loadMap(t.customerLocation,"selected")}),200),this.expandModal.emit();else{console.log("User has no location at all - showing address selection screen with default map"),this.addressSelected=!0,this.mapInitialZoom=6;const o={lat:f.c.hereMaps.centerMap.lat,lng:f.c.hereMaps.centerMap.lng};setTimeout((0,g.A)(function*(){yield t.waitForSelectedMapComponents(),t.loadMap(o,"selected")}),200),this.expandModal.emit()}this.isUsingDefaultLocation&&this.geoLocationService.showModal(1,this._orderType).then((0,g.A)(function*(){yield new Promise(o=>setTimeout(o,400)),t.setupLocationRetryOnResume();try{const o=yield t.geoLocationService.getCurrentPosition().toPromise();t.customerLocation={lat:o.latitude,lng:o.longitude},t.isUsingDefaultLocation=!1,t.checkSpecialFlowForNoAddresses()}catch{}}))}else this.isUsingDefaultLocation&&(console.log("Desktop - no addresses and no real location, showing permission popup"),this.showLocationPermissionPopup=!0)}waitForCurrentPositionAddress(){var t=this;return(0,g.A)(function*(){return new Promise(o=>{if(t.currentPositionAddress&&""!==t.currentPositionAddress.trim())return void o(t.currentPositionAddress);let n=0;const r=()=>{n++,t.currentPositionAddress&&""!==t.currentPositionAddress.trim()?(console.log(`Address found after ${100*n}ms:`,t.currentPositionAddress),o(t.currentPositionAddress)):n>=50?(console.log("Timeout waiting for address, using fallback"),o("Your current location")):setTimeout(r,100)};r()})})()}waitForSelectedMapComponents(){var t=this;return(0,g.A)(function*(){yield new Promise(i=>setTimeout(i,0));let o=0;for(;o<10;){if(t.useHereMapsComponent?t.selectedHereMap:t.selectedGoogleMap){console.log("Selected map component found after",o,"attempts");break}yield new Promise(i=>setTimeout(i,50)),o++}o>=10&&console.warn("Selected map component not found after maximum attempts")})()}updateMobileListMaxHeight(){if(!this.isMobile||!this.isDeliveryMode)return;
1const t=this.initialModalBreakpoint||.87,n=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--ion-safe-area-bottom")||"0",10)||0,i=Math.round(window.innerHeight*t)-24-n,r=this.topDeliveryContainerEl?.nativeElement?.getBoundingClientRect().height??0,a=this.searchContainerEl?.nativeElement?.getBoundingClientRect().height??0,c=this.confirmContainerEl?.nativeElement?.getBoundingClientRect().height??0,_=i-r-a-c-4+"px";this.mobileListMaxHeight!==_&&(r>0||a>0||c>0)&&(this.mobileListMaxHeight=_,this.cdr.markForCheck())}updateFooterHeight(){this.isMobile&&this.deliveryFooter?.nativeElement?setTimeout(()=>{const t=this.deliveryFooter?.nativeElement?.offsetHeight||0;t!==this.deliveryFooterHeight&&(this.deliveryFooterHeight=t,this.cdr.detectChanges(),console.log("\u{1f4cf} Footer height updated:",t))},100):this.isMobile||(this.deliveryFooterHeight=0)}adjustModalBreakpointToContent(){var t=this;return(0,g.A)(function*(){if(!t.isMobile)return;yield new Promise(r=>setTimeout(r,250)),t.cdr.detectChanges();const i=(()=>{try{const r=document.querySelector("ion-modal#startOrderNewFlowModal");if(!r)return.65;const a=window.innerHeight,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--ion-safe-area-bottom")||"0",10)||0,l=r.querySelector(".topDeliveryContainer"),_=r.querySelector(".searchContainer"),p=r.querySelector(".confirmAddressContainer"),v=r.querySelector(".marginBottomAndScrollList"),u=l?.getBoundingClientRect().height??55,h=_?.getBoundingClientRect().height??72,y=p?.getBoundingClientRect().height??76;let E=Math.min(.95,Math.max(.4,(24+c+u+h+(v?.scrollHeight??0)+y+4)/a));return E=Math.ceil(20*E)/20,E}catch(r){return console.warn("\u274c Error en computeDeliveryBreakpoint:",r),.95}})();try{const r=document.querySelector("ion-modal#startOrderNewFlowModal");if(r){if(!(r.breakpoints||[]).some(_=>Math.abs(_-i)<.001))return;const l=yield r.getCurrentBreakpoint();l&&Math.abs(l-i)>.04&&(yield r.setCurrentBreakpoint(i),t.initialModalBreakpoint=i)}}catch{}})()}ngAfterViewChecked(){this.updateMobileListMaxHeight(),this.updateListScrollState(),this.isMobile&&this.deliveryFooter?.nativeElement?setTimeout(()=>{if(this.deliveryFooter?.nativeElement){const t=this.deliveryFooter.nativeElement.offsetHeight;t!==this.deliveryFooterHeight&&t>0&&(this.deliveryFooterHeight=t,this.cdr.detectChanges(),console.log("\u{1f4cf} Footer height auto-detected:",t))}},0):this.isMobile&&!this.deliveryFooter?.nativeElement&&0!==this.deliveryFooterHeight&&(this.deliveryFooterHeight=0,this.cdr.detectChanges(),console.log("\u{1f4cf} Footer disappeared, height reset to 0"))}ngOnDestroy(){this.isDestroyed=!0,this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.appResumeListenerHandle&&(this.appResumeListenerHandle.remove(),this.appResumeListenerHandle=null),this.mapUpdateTimeout&&(clearTimeout(this.mapUpdateTimeout),this.mapUpdateTimeout=null),this.isUpdatingMapMarkers=!1,this.lastMapCenter=null,this.deliveryService.clearAddressToEditOnly(),this.deliveryService.clearCreateAddressOnly(),this.deliveryService.clearAddressOnly()}tryRetryLocation(){var t=this;return(0,g.A)(function*(){if(!(!t.isUsingDefaultLocation||t.isRetryingLocation||t.isAddPhotoModalOpen()||Date.now()<t.nextAllowedLocationRetryAt)){t.isRetryingLocation=!0;try{const n=yield t.geoLocationService.getCurrentPosition().toPromise();yield new Promise(i=>{t.ngZone.run((0,g.A)(function*(){if(t.customerLocation={lat:n.latitude,lng:n.longitude},t.isUsingDefaultLocation=!1,console.log("\u2705 Ubicaci\xf3n obtenida en tryRetryLocation:",t.customerLocation),t.isPickupMode){const r=t.langService.getLangConfig().lang;if(yield t.loadNearbyBranches(r),console.log(`\u2705 nearbyBranches recargadas: ${t.nearbyBranches.length} tiendas`),yield t.checkPickupSpecialCases(),t.cdr.detectChanges(),t.nearbyBranches.length>0)try{t.isMobile||(yield new Promise(c=>setTimeout(c,350)));const a=document.querySelector("ion-modal#startOrderNewFlowModal");if(a){const c=t.isMobile?t.searchingLocation?1:t.initialModalBreakpoint||.65:Math.max(t.initialModalBreakpoint||.65,.9);yield a.setCurrentBreakpoint(c),console.log("\u2705 Modal restaurado a breakpoint",c,"tras detectar ubicaci\xf3n (isMobile:",t.isMobile,", searchingLocation:",t.searchingLocation,")")}}catch(a){console.error("\u274c Error ajustando breakpoint del modal tras retry:",a)}}else if(t.showMap=!0,t.cdr.detectChanges(),t.hereS.reveseGeoCode(t.customerLocation.lat+","+t.customerLocation.lng).subscribe(a=>{a?.items?.length>0&&(t.currentPositionAddress=a.items[0].title,t.cdr.detectChanges())}),t.isMobile&&0===t.addresses.length)t.checkSpecialFlowForNoAddresses();else{try{yield t.waitForMapComponents(),t.loadMap(t.customerLocation,"main")}catch(a){console.error("\u274c Error cargando mapa tras delivery retry:",a)}
1yield t.adjustModalBreakpointToContent()}i()}))}),t.nextAllowedLocationRetryAt=0,t.appResumeListenerHandle&&(yield t.appResumeListenerHandle.remove(),t.appResumeListenerHandle=null)}catch{t.nextAllowedLocationRetryAt=Date.now()+8e3}finally{t.isRetryingLocation=!1}}})()}setupLocationRetryOnResume(){var t=this;return(0,g.A)(function*(){if(!(t.appResumeListenerHandle||t.isRegisteringLocationListener||t.isDestroyed)){t.isRegisteringLocationListener=!0;try{const o=yield K.q.addListener("appStateChange",function(){var n=(0,g.A)(function*(i){if(i?.isActive&&t.isUsingDefaultLocation&&!t.isAddPhotoModalOpen()&&!t.isDestroyed&&!t.isRetryingLocation){if(t.appResumeListenerHandle){try{yield t.appResumeListenerHandle.remove()}catch(r){console.warn("\u26a0\ufe0f Failed to remove app resume listener:",r)}t.appResumeListenerHandle=null}t.nextAllowedLocationRetryAt=0,console.log("\u{1f4cd} App resumed - reintentando geolocalizaci\xf3n..."),yield t.tryRetryLocation()}});return function(i){return n.apply(this,arguments)}}());t.isDestroyed?o.remove():t.appResumeListenerHandle=o}finally{t.isRegisteringLocationListener=!1}}})()}isAddPhotoModalOpen(){return!!document.querySelector("ion-modal#addPhotoAddress")}formatTime(t){if(!t)return"";const o=t.getHours(),i=o>=12?"PM":"AM";return`${o%12||12}:${t.getMinutes().toString().padStart(2,"0")} ${i}`}getBranchScheduleText(t){if(!t)return"";try{const o=this.branchesService.getSchedeule(t);if(!o.openToday)return this.langService.getInstantTranslation("LANG_CLOSED_TODAY")||"Cerrado hoy";if(o.split){const n=this.formatTime24h(o.first.open),i=this.formatTime24h(o.first.close);return`${n} - ${i}, ${this.formatTime24h(o.second.open)} - ${this.formatTime24h(o.second.close)}`}return`${this.formatTime24h(o.continued.open)} - ${this.formatTime24h(o.continued.close)}`}catch(o){return console.error("Error formatting branch schedule:",o),""}}formatTime24h(t){return t?`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`:""}getMaxBranchesForZoom(t){const o=t?.map;if(!o||"function"!=typeof o.getZoom)return 8;const n=o.getZoom();return n<=8?30:n<=10?25:n<=12?20:n<=14?15:n<=16?10:3}formatDistance(t){return t?t>5e3?`${Math.round(t/1e3)}km`:`${t}m`:""}isBranchInLists(t){if(!t)return!1;const o=this.preferredBranches.some(i=>i.id===t.id),n=(this.nearbyBranches||[]).slice(0,3).some(i=>i.id===t.id);return o||n}getAddressPhotoUrl(t){if(!t||!t.addressID||!this.customerCode)return null;const i=`https://mponlineassets.obs.me-east-1.myhuaweicloud.com/assets/addresses-photos/488-${this.customerCode}-${t.addressID}.jpg`,r=this.addressPhotoVersions[String(t.addressID)];return r?`${i}?v=${r}`:i}loadAddressPhotoVersions(){try{const t=localStorage.getItem(this.addressPhotoVersionStorageKey);this.addressPhotoVersions=t?JSON.parse(t):{}}catch{this.addressPhotoVersions={}}}saveAddressPhotoVersions(){try{localStorage.setItem(this.addressPhotoVersionStorageKey,JSON.stringify(this.addressPhotoVersions))}catch{}}checkBranchBeforeProceeding(t,o,n){var i=this;return(0,g.A)(function*(){i.pendingScheduleOrder="true"===sessionStorage.getItem(C.rC.scheduleOrder),i.pendingScheduleOrder&&sessionStorage.removeItem(C.rC.scheduleOrder);try{yield new Promise((c,l)=>{i.branchesService.checkBranch(t,o,!1).subscribe(()=>c(),_=>l(_))});const r=i.branchesService.getSchedeule(t);if(i.branchesService.checkSchedule(r,t).before){const{data:c}=yield i.modalService.openModalBranchClosed("LANG_BEFORE_OPENING_HOURS",!0,!1,n);return"schedule"===c?.result?(i.pendingScheduleOrder=!1,!0):n||"selectOther"!==c?.result?(i.pendingScheduleOrder&&(sessionStorage.setItem(C.rC.scheduleOrder,"true"),i.pendingScheduleOrder=!1),!1):(i.preferredBranches.length>0?i.returnToPickupBranchesList():yield i.selectDifferentBranch(),i.pendingScheduleOrder&&(sessionStorage.setItem(C.rC.scheduleOrder,"true"),i.pendingScheduleOrder=!1),!1)}return i.pendingScheduleOrder=!1,!0}catch(r){console.log("\u{1f6ab} Tienda no disponible, c\xf3digo:",r,t?.name);const{messageKey:a,canSchedule:c}=i.branchesService.getTextErrorCode(r),{data:l}=yield i.modalService.openModalBranchClosed(a,c,!1,n);return!(!c||"schedule"!==l?.result)||(n||"selectOther"!==l?.result?(i.pendingScheduleOrder&&(sessionStorage.setItem(C.rC.scheduleOrder,"true"),i.pendingScheduleOrder=!1),!1):(console.log("\u{1f519} Usuario quiere seleccionar otra tienda"),i.preferredBranches.length>0?i.returnToPickupBranchesList():yield i.selectDifferentBranch(),i.pe
1ndingScheduleOrder&&(sessionStorage.setItem(C.rC.scheduleOrder,"true"),i.pendingScheduleOrder=!1),!1))}})()}navigateAfterAddressSave(t,o){var n=this;return(0,g.A)(function*(){const i=n.deliveryService.getAddressOnly();if(console.log("\u{1f6a6} navigateAfterAddressSave called"),console.log("\u{1f6a6} isAddressOnly:",i),console.log("\u{1f6a6} isMobile:",n.isMobile),console.log("\u{1f6a6} zone:",t),console.log("\u{1f6a6} address:",o),i){console.log("\u{1f389} Address only flow - updating promotions and navigating back");const r={zone:t,address:o};console.log("Data for promotions update:",r),n._api.setDeliveryBranchPromotions(r.zone.branch,r.address),n.storageService.setItem(C.rC.branchDelivery,r.zone.branch),n.useinsider.updateInsiderBranch(r.zone.branch),n.rxJsService.createObservableFromMultipleRequests([n.rxJsService.createObservableFromPromise(n.dataService.getMenu(r.zone.branch.id,!0)),n.rxJsService.createObservableFromPromise(n.dataService.getOrder()),n.rxJsService.createObservableFromPromise(n.dataService.getPromotions(r.zone.branch.id,!0))]).subscribe(function(){var a=(0,g.A)(function*(c){const l=c[0],p=c[2],v=new L.kX(c[1],l,p);v.updateBranchCode(r.zone.branch.id,null),yield n.storageService.setItem(C.rC.order,v.getOrder()),n.dataService.updatePgMenu(l,p),n._api.setData("OnUpdateData"),n.deliveryService.clearAddressOnly(),console.log("\u{1f3c1} About to navigate to /promotions"),console.log("\u{1f3c1} isMobile:",n.isMobile),n.isMobile?n.modalController.getTop().then(u=>{u?u.dismiss({success:!0}).then(()=>{console.log("\u{1f3c1} Navigating to /promotions (mobile after dismiss)"),n.router.navigate(["/promotions"])}):(console.log("\u{1f3c1} Navigating to /promotions (mobile no modal)"),n.router.navigate(["/promotions"]))}):(console.log("\u{1f3c1} Navigating to /promotions (desktop)"),n.router.navigate(["/promotions"]))});return function(c){return a.apply(this,arguments)}}())}else{if(console.log("\u26a0\ufe0f Normal flow (NOT address only) - going to /checkout"),t?.branch?.id)try{const[r,a]=yield Promise.all([n.dataService.getMenu(t.branch.id,!0),n.dataService.getPromotions(t.branch.id,!0)]);n.dataService.updatePgMenu(r,a)}catch{}n.isMobile?n.modalController.getTop().then(r=>{r?r.dismiss().then(()=>{console.log("\u{1f3c1} Navigating to /checkout (mobile)"),n.router.navigate(["/checkout"])}):(console.log("\u{1f3c1} Navigating to /checkout (mobile no modal)"),n.router.navigate(["/checkout"]))}):(console.log("\u{1f3c1} Navigating to /checkout (desktop)"),n.router.navigate(["/checkout"]))}})()}updateListScrollState(){const t=this.addressListEl?.nativeElement;if(!t)return void(this.hasListInternalScroll&&(this.hasListInternalScroll=!1,this.cdr.detectChanges()));if(0===t.clientHeight)return;const o=t.scrollHeight>t.clientHeight+1;o!==this.hasListInternalScroll&&(this.hasListInternalScroll=o,this.cdr.detectChanges(),this.isMobile&&this.adjustModalBreakpointToContent())}static{this.\u0275fac=function(o){return new(o||s)(e.rXU(Q.G),e.rXU(q.f),e.rXU(ee.O),e.rXU(te.O),e.rXU($.Ix),e.rXU(oe.B),e.rXU(ne.DeliveryService),e.rXU(e.SKi),e.rXU(e.gRc),e.rXU(P.W3),e.rXU(se.m),e.rXU(ie.Q),e.rXU(re.T),e.rXU(ae.b),e.rXU(de.u),e.rXU(le.n),e.rXU(ce.J),e.rXU(_e.K),e.rXU(pe.Z),e.rXU(ge.v))}}static{this.\u0275cmp=e.VBU({type:s,selectors:[["app-select-delivery-address"]],viewQuery:function(o,n){if(1&o&&(e.GBs(me,5),e.GBs(he,5),e.GBs(ue,5),e.GBs(fe,5),e.GBs(ve,5,e.aKT),e.GBs(ye,5,e.aKT),e.GBs(Me,5,e.aKT),e.GBs(Ae,5,e.aKT),e.GBs(Ce,5,e.aKT),e.GBs(be,5),e.GBs(De,5),e.GBs(ke,5),e.GBs(Se,5),e.GBs(xe,5),e.GBs(Pe,5)),2&o){let i;e.mGM(i=e.lsd())&&(n.mainHereMap=i.first),e.mGM(i=e.lsd())&&(n.selectedHereMap=i.first),e.mGM(i=e.lsd())&&(n.mainGoogleMap=i.first),e.mGM(i=e.lsd())&&(n.selectedGoogleMap=i.first),e.mGM(i=e.lsd())&&(n.deliveryFooter=i.first),e.mGM(i=e.lsd())&&(n.addressListEl=i.first),e.mGM(i=e.lsd())&&(n.topDeliveryContainerEl=i.first),e.mGM(i=e.lsd())&&(n.searchContainerEl=i.first),e.mGM(i=e.lsd())&&(n.confirmContainerEl=i.first),e.mGM(i=e.lsd())&&(n.addressDetailsForm=i.first),e.mGM(i=e.lsd())&&(n.buildingForm=i.first),e.mGM(i=e.lsd())&&(n.additionalNotesForm=i.first),e.mGM(i=e.lsd())&&(n.additionalNotesFormInList=i.first),e.mGM(i=e.lsd())&&(n.descriptionForm=i.first),e.mGM(i=e.lsd())&&(n.locationAddressForm=i.first)}},hostBindings:function(o,n){1&o&&e.bIt("resize",function(r){return n.onResize(r)},!1,e.tSv)},inputs:{orderType:"orderType"},outputs:{expandModal:"expandModal",noExpandModal:"noExpandModal",setModalBreakp
vendor: 4,968 bytes, line 1
1oint:"setModalBreakpoint",nearbyBranchesLoaded:"nearbyBranchesLoaded",deliveryAddressesLoaded:"deliveryAddressesLoaded"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["checkSearchOrDesktop",""],["addressContent",""],["topDeliveryContainerEl",""],["mainHereMap",""],["mainGoogleMap",""],["locationAddress",""],["selectedHereMap",""],["selectedGoogleMap",""],["deliveryFooter",""],["addressDetailsForm",""],["buildingForm",""],["additionalNotesForm",""],["descriptionForm",""],["searchContainerEl",""],["addressListEl",""],["additionalNotesFormInList",""],["confirmContainerEl",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["class","location-permission-popup",3,"show",4,"ngIf"],["class","ion-padding-horizontal topDeliveryContainer",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"ion-padding-horizontal","topDeliveryContainer"],[1,"ion-align-items-center","ion-justify-content-between","sticky-header",2,"width","100%"],["size","auto"],[1,"font16","bold"],["size","auto",1,"no-padding"],["shape","round","size","small",1,"compact-button",3,"click"],["size","12",4,"ngIf"],["size","12"],[1,"ion-margin-vertical"],[3,"mapHeight","mapStyles","wkngMethod","tapMarker",4,"ngIf"],[3,"tapMarker","mapHeight","mapStyles","wkngMethod"],[1,"mobile-search-header"],["appLazyload","","alt","back",1,"back","pointer",3,"click","src"],[1,"font14","bold","ion-text-center"],["size","12",1,"ion-text-center","ion-padding-horizontal"],[3,"metadata","onFormChange","onIconInputClick",4,"ngIf"],["class","containerDiscoverAddress",4,"ngIf"],[3,"onFormChange","onIconInputClick","metadata"],[1,"containerDiscoverAddress"],["button","","class","dicoveredAddress","lines","none","mode","md",3,"click",4,"ngFor","ngForOf"],["button","","lines","none","mode","md",1,"dicoveredAddress",3,"click"],["slot","start"],["appLazyload","","color","primary",1,"icon",3,"src"],["class","font12",4,"ngIf"],[1,"font12"],[1,"font14"],["size","12",1,"ion-text-center","map-container"],[3,"fullscreen","wkngMethod","tapMarker",4,"ngIf"],[3,"fullscreen","showCenterMarker","showMarker","footerHeight","initialZoom","deliveryMarkerIcon","wkngMethod","tapMarker","centerChanged","onLocateClick",4,"ngIf"],["class","floating-search-form",4,"ngIf"],["class","delivery-location-footer",4,"ngIf"],["class","delivery-location-footer-list",4,"ngIf"],[3,"tapMarker","fullscreen","wkngMethod"],[3,"tapMarker","centerChanged","onLocateClick","fullscreen","showCenterMarker","showMarker","footerHeight","initialZoom","deliveryMarkerIcon","wkngMethod"],[1,"floating-search-form"],[1,"fake-input",3,"click"],[1,"input-placeholder"],["name","search-outline",1,"search-icon"],[1,"delivery-location-footer"],[1,"ion-margin-bottom"],[1,"font16"],["class","font12 locationTitle",4,"ngIf"],["expand","block","color","secondary",1,"use-location-button","ion-margin-bottom","font16",3,"click"],[1,"font12","locationTitle"],[1,"font22"],[1,"delivery-location-footer-list"],[1,"font16","bold","ion-margin-start"],["lines","none",1,"nearby-branches-list"],["class","pointer","style","--background: transparent;",3,"click",4,"ngFor","ngForOf"],["shape","round","expand","block","color","secondary",1,"bold","font14","ion-margin-top","selectDifferentBranch",3,"click"],[1,"pointer",2,"--background","transparent",3,"click"],[1,"ion-text-wrap"],[1,"bold"],["slot","end","class","distance-container",4,"ngIf"],["slot","end",1,"distance-container"],[1,"font13","ion-text-end","bold","distance-text"],[1,"scheduleBranch"],[1,"ion-padding-horizontal"],["size","12","size-md","6",1,"ion-padding"],["class","desktop-address-list",4,"ngIf"],["class","desktop-address-details",4,"ngIf"],["size","12","size-md","6"],[1,"ion-margin-vertical","map-top-spacing"],["mapHeight","630",3,"mapStyles","wkngMethod","tapMarker",4,"ngIf"],["mapHeight","630",3,"mapStyles","wkngMethod","showMarker","showCenterMarker","deliveryMarkerIcon","tapMarker","centerChanged","onLocateClick",4,"ngIf"],[1,"desktop-address-list"],[1,"ion-align-items-center"],["fill","clear","size","small",1,"back-button",3,"click"],["appLazyload","","alt","back",1,"iconBack",3,"src"],[1,"textDelivery"],[1,"ion-align-items-center","ion-justify-content-between"],["size","auto",1,"ion-no-padding"],[1,"textSelectDeliveryAddress"],["shape","round",1,"compact-button",3,"click"],["class","ion-margin-bottom",4,"ngIf"],[1,"ion-padding-vertical","confirmAddressContainer"],["shape","round","expand","block",1,"bold","font14",3,"click","disabled"],[1,"font16","bold","ion-margin-bottom"],["lines","none"],["class","pointer",3,"selected","click",4,"ngFor","ngForOf"],[1,"pointer",3,"click"],["appLazyload","","alt","Selected branch","class","icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","Branch","class","icon","color","primary",3,"src",4,"ngIf"],[1,"font13"],[1,"font12","branchAddress"],["appLazyload","","alt","Selected branch","color","primary",1,"icon",3,"src"],["appLazyload","","alt","Branch","color","primary",1,"icon",3,"src"],[1,"selected"],[1,"desktop-address-detail
1s"],["class","selected","lines","none",4,"ngIf"],[1,"font14","bold","ion-margin-bottom"],[3,"onFormChange","metadata"],[1,"address-type-section"],[1,"address-type-chips"],["class","address-chip font12",3,"selected","disabled","click",4,"ngFor","ngForOf"],["class","ion-margin-top",4,"ngIf"],[1,"additional-notes-section","ion-margin-bottom"],[1,"notes-form"],["class","photo-help-section",3,"click",4,"ngIf"],["class","selected-photo-section",4,"ngIf"],[1,"save-button-container"],["fill","outline","color","primary",1,"cancel-button","font16",3,"click"],["color","secondary",1,"confirm-button","font16",3,"click","disabled"],["lines","none",1,"selected"],["appLazyload","","alt","Selected address","color","primary",1,"icon",3,"src"],["class","bold",4,"ngIf"],["class","font12 resolvedAddress",4,"ngIf"],[1,"font12","resolvedAddress"],[1,"address-chip","font12",3,"click"],[3,"src","alt"],[1,"ion-margin-top"],[1,"photo-help-section",3,"click"],[1,"photo-help-text"],["src","https://objects.maestropizza.com/ksa/assets/rebranding/images/camera.svg","alt","Add photo",1,"camera-icon"],[1,"selected-photo-section"],[1,"photo-thumbnail"],["alt","Selected photo",3,"error","src"],[1,"photo-description"],[1,"photo-edit-button"],["color","primary","size","small","shape","round",3,"click"],["mapHeight","630",3,"tapMarker","mapStyles","wkngMethod"],["mapHeight","630",3,"tapMarker","centerChanged","onLocateClick","mapStyles","wkngMethod","showMarker","showCenterMarker","deliveryMarkerIcon"],["class","ion-padding-horizontal searchContainer",4,"ngIf"],[3,"ngClass",4,"ngIf"],[1,"ion-padding-horizontal","searchContainer"],[3,"ngClass"],["button","","class","dicoveredAddress","mode","md","lines","none",3,"click",4,"ngFor","ngForOf"],["button","","mode","md","lines","none",1,"dicoveredAddress",3,"click"],["lines","none",3,"ngClass","maxHeight",4,"ngIf"],["class","pickupBranchesContainer",4,"ngIf"],["class","additional-notes-section ion-margin-bottom",4,"ngIf"],["lines","none",3,"ngClass"],[3,"click"],["appLazyload","","alt","Selected address","class","icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","Custom location","class","icon","id","custom-location-icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","Custom location","id","custom-location-icon","color","primary",1,"icon",3,"src"],["appLazyload","","alt","Hangout","class","icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","House","class","icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","Office","class","icon","color","primary",3,"src",4,"ngIf"],["appLazyload","","alt","No type address","class","icon","color","primary",3,"src",4,"ngIf"],["slot","end",1,"edit-button-container",3,"click"],[1,"font13","ion-text-end","bold","edit-text"],["appLazyload","","alt","Hangout","color","primary",1,"icon",3,"src"],["appLazyload","","alt","House","color","primary",1,"icon",3,"src"],["appLazyload","","alt","Office","color","primary",1,"icon",3,"src"],["appLazyload","","alt","No type address","color","primary",1,"icon",3,"src"],[1,"pickupBranchesContainer"],[1,"font14","bold","ion-margin-bottom","ion-padding-start"],[3,"metadata"],["class","bold font14","shape","round","expand","block",3,"disabled","click",4,"ngIf"],["class","bold font14","shape","round","expand","block",3,"click",4,"ngIf"],["shape","round","expand","block",1,"bold","font14",3,"click"],[1,"location-permission-popup"],[1,"popup-content"],[1,"message"],[1,"learn-more",3,"click"],[1,"close-button",3,"click"]],template:function(o,n){1&o&&e.DNE(0,wo,7,3,"ng-container",17),2&o&&e.Y8G("ngIf",n.shouldShowModalContent)},dependencies:[P.bv,P.mC,P.Jm,P.ZB,P.hU,P.iq,P.uz,P.he,P.nf,P.ln,P.IO,B.YU,B.bT,j.h,j.D9,B.pM,B.T3,B.P9,Y.s,z.c,Z.E,J.Y],styles:[".sticky-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1001;background:var(--ion-background-color, #fff);height:55px}@media (min-width: 768px){.sticky-header[_ngcontent-%COMP%]{position:static}}.mobile-search-header[_ngcontent-%COMP%]{position:relative}html.ios[_nghost-%COMP%]   .mobile-search-header[_ngcontent-%COMP%], html.ios   [_nghost-%COMP%]   .mobile-search-header[_ngcontent-%COMP%]{padding-top:env(safe-area-inset-top,0px)}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:100%}.compact-button[_ngcontent-%COMP%]{--padding-start: 12px;--padding-end: 12px;min-width:auto;height:32px}html[dir=rtl][_nghost-%COMP%]   .back-button[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .back-button[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{order:1}html[dir=rtl][_nghost-%COMP%]   .ion-text-right[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .ion-text-right[_ngcontent-%COMP%]{text-align:left!important}html[dir=rtl][_nghost-%COMP%]   img.back[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   img.back[_ngcontent-%COMP%]{transform:scale
1X(-1);left:auto;right:20px}html[dir=rtl][_nghost-%COMP%]   .iconBack[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .iconBack[_ngcontent-%COMP%]{transform:scaleX(-1);order:1;margin-right:-6px}html[dir=rtl][_nghost-%COMP%]   .textDelivery[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .textDelivery[_ngcontent-%COMP%]{margin-right:14px}html[dir=ltr][_nghost-%COMP%]   .ion-text-right[_ngcontent-%COMP%], html[dir=ltr]   [_nghost-%COMP%]   .ion-text-right[_ngcontent-%COMP%]{text-align:right!important}.confirmAddressContainer[_ngcontent-%COMP%]{z-index:10}@media (max-width: 767px){.confirmAddressContainer[_ngcontent-%COMP%]{bottom:0}}@media (min-width: 768px){.confirmAddressContainer[_ngcontent-%COMP%]{bottom:0;padding-bottom:0}.confirmAddressContainer.has-addresses[_ngcontent-%COMP%]{margin-top:auto}}html.ios[_nghost-%COMP%]   .confirmAddressContainer[_ngcontent-%COMP%], html.ios   [_nghost-%COMP%]   .confirmAddressContainer[_ngcontent-%COMP%]{position:sticky;left:0;right:0;z-index:10}@media (max-width: 767px){html.plt-android[_nghost-%COMP%]   .confirmAddressContainer[_ngcontent-%COMP%], html.plt-android   [_nghost-%COMP%]   .confirmAddressContainer[_ngcontent-%COMP%]{height:calc(76px + var(--ion-safe-area-bottom, 0px));padding-bottom:env(safe-area-inset-bottom,0px)}}.confirmAddressContainer[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%], .selectOtherBranchContainer[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);--color: var(--ion-color-primary);margin:2px 10px;--background-activated: var(--ion-color-secondary);--background-focused: var(--ion-color-secondary);--background-hover: var(--ion-color-secondary);height:48px;--box-shadow: none}.iconBack[_ngcontent-%COMP%]{width:12px;height:22px}.textDelivery[_ngcontent-%COMP%]{font-size:22px;font-weight:700;margin-left:14px}.textSelectDeliveryAddress[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.marginBottomAndScrollList[_ngcontent-%COMP%]{margin-bottom:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ion-color-primary) #e9e9df}@media (min-width: 768px){.marginBottomAndScrollList[_ngcontent-%COMP%]{max-height:500px}}.marginBottomAndScrollList[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.marginBottomAndScrollList[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#e8f5e8;border-radius:10px;margin:15px 0}.marginBottomAndScrollList[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--ion-color-primary);border-radius:10px;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.marginBottomAndScrollList[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--ion-color-primary-shade)}@media (min-width: 768px){.marginBottomAndScrollList.with-notes[_ngcontent-%COMP%]{max-height:350px}}@media (min-width: 767px){.marginBottomAndScrollList[_ngcontent-%COMP%]{margin-bottom:10px}}.branch-section[_ngcontent-%COMP%]{margin-bottom:20px}.branch-section[_ngcontent-%COMP%]   .section-title[_ngcontent-%COMP%]{padding:0 16px;margin-bottom:12px}.branch-section[_ngcontent-%COMP%]   ion-list[_ngcontent-%COMP%]{margin-bottom:0}.branch-section[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]{--padding-start: 16px;--inner-padding-end: 16px}.branch-section[_ngcontent-%COMP%]   ion-item.selected[_ngcontent-%COMP%]{--background: rgba(0, 81, 66, .05)}.branch-section[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]   img.icon[_ngcontent-%COMP%]{width:32px;height:32px}.confirmAddressContainer[_ngcontent-%COMP%]   ion-button[disabled][_ngcontent-%COMP%], .selectOtherBranchContainer[_ngcontent-%COMP%]   ion-button[disabled][_ngcontent-%COMP%]{--background: var(--ion-color-medium);--color: var(--ion-color-primary);opacity:.9}ion-avatar[_ngcontent-%COMP%]{margin-inline-end:0px;display:flex;align-items:center}img.back[_ngcontent-%COMP%]{top:16px;left:20px;position:absolute}html.ios[_nghost-%COMP%]   img.back[_ngcontent-%COMP%], html.ios   [_nghost-%COMP%]   img.back[_ngcontent-%COMP%]{top:calc(env(safe-area-inset-top,0px) + 16px)}img.icon[_ngcontent-%COMP%]{--border-radius: 0px !important;border-radius:0!important;top:8px;position:absolute}
1ion-avatar[_ngcontent-%COMP%] > img.icon[_ngcontent-%COMP%]{position:static;top:auto;left:auto;margin:0;display:block}.icon[_ngcontent-%COMP%]{width:auto;height:auto;max-width:24px;max-height:24px;padding:1px}#custom-location-icon[_ngcontent-%COMP%]{width:20.5px;height:23px}p.resolvedAddress[_ngcontent-%COMP%]{color:var(--ion-color-primary)!important;font-style:normal;font-weight:400;letter-spacing:.24px}p.branchAddress[_ngcontent-%COMP%]{color:var(--ion-color-primary)!important;font-style:normal;font-weight:400;letter-spacing:.24px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;line-height:1.4}.edit-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;padding:0 4px;cursor:pointer}.edit-text[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none}.distance-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;padding:0 4px}.distance-text[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--ion-color-primary)}@media (min-width: 767px){ion-item[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary);border-radius:16px;margin-bottom:8px}ion-item.selected[_ngcontent-%COMP%]{--background: #ECF3E6;background-color:#ecf3e6}}.fake-input[_ngcontent-%COMP%]{display:flex;align-items:center;background:#fff;border-radius:12px;border:1px solid rgba(0,81,65,.3019607843);padding:10px 14px;margin:12px 0;min-height:48px}.search-icon[_ngcontent-%COMP%]{font-size:24px;position:absolute;inset-inline-end:6px;margin-inline-end:16px}.input-placeholder[_ngcontent-%COMP%]{font-size:14px;margin-right:20px}.containerDiscoverAddress[_ngcontent-%COMP%]{padding:0;margin-left:2px;margin-right:2px;margin-bottom:10px}@media (min-width: 768px){.containerDiscoverAddress[_ngcontent-%COMP%]{background-color:#f7f6e1;border:1px solid var(--ion-color-primary);border-radius:11px;max-height:200px;overflow-y:auto}.containerDiscoverAddress[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]{--background: #f7f6e1;border:0px}.containerDiscoverAddress[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]:hover{--background: #0051411A}.containerDiscoverAddress[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]:first-child{border-radius:11px 11px 0 0;overflow:hidden}.containerDiscoverAddress[_ngcontent-%COMP%]   ion-item[_ngcontent-%COMP%]:last-child{border-radius:0 0 11px 11px;overflow:hidden}.containerDiscoverAddress[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]{display:none}}.delivery-location-footer[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;background:var(--ion-background-color);border-radius:25px 25px 0 0;padding:20px;border:1px solid var(--ion-color-primary);z-index:1002;max-height:70vh;overflow-y:auto;box-shadow:0 -4px 20px #0000001a}.delivery-location-footer[_ngcontent-%COMP%]   .location-info[_ngcontent-%COMP%]{margin-bottom:16px}.delivery-location-footer[_ngcontent-%COMP%]   .location-info[_ngcontent-%COMP%]   .locationTitle[_ngcontent-%COMP%]{line-height:22px;color:#666;margin-top:4px;margin-bottom:10px}.delivery-location-footer[_ngcontent-%COMP%]   .use-location-button[_ngcontent-%COMP%]{--border-radius: 40px;border-radius:40px;height:48px;font-weight:600;--box-shadow: none;--background: var(--ion-color-secondary);--color: var(--ion-color-primary);margin-top:12px}.delivery-location-footer[_ngcontent-%COMP%]   .selectDifferentBranch[_ngcontent-%COMP%]{--border-radius: 40px;border-radius:40px;height:46px;font-weight:600;--box-shadow: none;--background: var(--ion-color-secondary);--color: var(--ion-color-primary);--border-color: var(--ion-color-primary)}.delivery-location-footer-list[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;background:var(--ion-background-color);border-radius:25px 25px 0 0;padding:10px;border:1px solid var(--ion-color-primary);z-index:1002;max-height:70vh;overflow-y:auto;box-shadow:0 -4px 20px #0000001a}.delivery-location-footer-list[_ngcontent-%COMP%]   .location-info[_ngcontent-%COMP%]{margin-bottom:16px}.delivery-location-footer-list[_ngcontent-%COMP%]   .location-info[_ngcontent-%COMP%]   .locationTitle[_ngcontent-%COMP%]{line-height:22px;color:#666;margin-top:4px;margin-bottom:10px}.delivery-location-footer-list[_ngcontent-%COMP%]   .use-location-button[_ngcontent-%COMP%]{--border-radius: 40px;border-radius:40px;height:48px;font-weight:600;
1--box-shadow: none;--background: var(--ion-color-secondary);--color: var(--ion-color-primary);margin-top:12px}.delivery-location-footer-list[_ngcontent-%COMP%]   .selectDifferentBranch[_ngcontent-%COMP%]{--border-radius: 40px;border-radius:40px;height:46px;font-weight:600;--box-shadow: none;--background: var(--ion-color-secondary);--color: var(--ion-color-primary);--border-color: var(--ion-color-primary)}.nearby-branches-list[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ion-color-primary);line-height:14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.floatingInput[_ngcontent-%COMP%]{position:absolute;top:27px;padding-inline-end:25px}.desktop-address-list[_ngcontent-%COMP%], .desktop-address-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.desktop-address-details[_ngcontent-%COMP%]   .locationTitle[_ngcontent-%COMP%]{line-height:22px}.desktop-address-details[_ngcontent-%COMP%]   .desktop-address-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:10px}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip[_ngcontent-%COMP%]{flex:1;--background: var(--ion-color-primary);--color: white;border:1px solid var(--ion-color-primary);border-radius:25px;height:34px;margin:0 3px;padding:8px;cursor:pointer;transition:all .2s ease;min-width:0;display:flex;align-items:center;justify-content:center}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]{width:20px;height:20px;margin-inline-start:1px;margin-inline-end:2px}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:0}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip[_ngcontent-%COMP%]:hover:not(.disabled){--background: var(--ion-color-primary-shade);--color: white;border-color:var(--ion-color-primary-shade)}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip.selected[_ngcontent-%COMP%]{--background: var(--ion-color-tertiary) !important;--color: white !important;border-color:var(--ion-color-tertiary)!important;box-shadow:0 2px 8px #0003;transform:scale(1.02)}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip.disabled[_ngcontent-%COMP%]{--background: var(--ion-color-light) !important;--color: #00514199 !important;border-color:var(--ion-color-primary)!important;cursor:not-allowed;pointer-events:none}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip.disabled[_ngcontent-%COMP%]   ion-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{opacity:.6}.desktop-address-details[_ngcontent-%COMP%]   .address-type-section[_ngcontent-%COMP%]   .address-type-chips[_ngcontent-%COMP%]   .address-chip.disabled[_ngcontent-%COMP%]:hover{--background: var(--ion-color-light) !important;--color: #00514199 !important;border-color:var(--ion-color-primary)!important}.desktop-address-details[_ngcontent-%COMP%]   .save-button-container[_ngcontent-%COMP%]{margin-top:auto;padding-top:20px;display:flex;gap:12px}.desktop-address-details[_ngcontent-%COMP%]   .save-button-container[_ngcontent-%COMP%]   .cancel-button[_ngcontent-%COMP%]{--border-radius: 40px;height:48px;font-weight:600;flex:0 0 25%}
1.desktop-address-details[_ngcontent-%COMP%]   .save-button-container[_ngcontent-%COMP%]   .confirm-button[_ngcontent-%COMP%]{--border-radius: 40px;height:48px;font-weight:600;flex:1;--box-shadow: none}.additional-notes-section[_ngcontent-%COMP%]   .additional-notes-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.additional-notes-section[_ngcontent-%COMP%]   .additional-notes-header[_ngcontent-%COMP%]   .add-note-button[_ngcontent-%COMP%]{--padding-start: 0;--padding-end: 0;height:32px;width:32px}.additional-notes-section[_ngcontent-%COMP%]   .additional-notes-header[_ngcontent-%COMP%]   .add-note-button[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{font-size:24px}.additional-notes-section[_ngcontent-%COMP%]   .notes-form[_ngcontent-%COMP%]{margin-bottom:12px}.additional-notes-section[_ngcontent-%COMP%]   .photo-help-section[_ngcontent-%COMP%]{background-color:#f7f6e1;border-radius:10px;padding:16px;cursor:pointer;display:flex;align-items:center;justify-content:space-between}.additional-notes-section[_ngcontent-%COMP%]   .photo-help-section[_ngcontent-%COMP%]:hover{background-color:#f5f4df}.additional-notes-section[_ngcontent-%COMP%]   .photo-help-section[_ngcontent-%COMP%]   .photo-help-text[_ngcontent-%COMP%]{margin:0 16px 0 0;font-size:.875rem;line-height:1.4;color:var(--ion-color-primary);flex:1}.additional-notes-section[_ngcontent-%COMP%]   .photo-help-section[_ngcontent-%COMP%]   .camera-icon[_ngcontent-%COMP%]{width:24px;height:24px;flex-shrink:0}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;background-color:#f7f6e1;border-radius:10px;padding:12px;margin-bottom:15px}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-thumbnail[_ngcontent-%COMP%]{flex:0 0 auto;width:auto}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-thumbnail[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:auto;height:60px;max-height:60px;border-radius:8px;object-fit:cover}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-description[_ngcontent-%COMP%]{flex:1}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-description[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;color:var(--ion-color-primary);line-height:1.4}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-edit-button[_ngcontent-%COMP%]{flex:0 0 auto;display:flex}.additional-notes-section[_ngcontent-%COMP%]   .selected-photo-section[_ngcontent-%COMP%]   .photo-edit-button[_ngcontent-%COMP%]   ion-button[_ngcontent-%COMP%]{--color: white;font-weight:600;--border-radius: 20px;width:55px;height:35px}.location-permission-popup[_ngcontent-%COMP%]{position:fixed;bottom:0;left:50%;transform:translate(-50%);background:#000;border-radius:0;box-shadow:0 4px 20px #0000004d;z-index:10000;opacity:0;visibility:hidden;transition:all .3s ease;width:50%;max-width:60vw;min-width:300px}.location-permission-popup.show[_ngcontent-%COMP%]{opacity:1;visibility:visible}@media (max-width: 768px){.location-permission-popup[_ngcontent-%COMP%]{width:90%;max-width:90vw}}.popup-content[_ngcontent-%COMP%]{padding:20px 50px 30px 24px;display:flex;flex-wrap:nowrap;gap:12px;position:relative}.message[_ngcontent-%COMP%]{font-size:14px;color:#fff;line-height:1.5;flex:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.learn-more[_ngcontent-%COMP%]{color:#a8c7f9;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;text-transform:uppercase;white-space:nowrap;flex-shrink:0;margin-inline-end:20px;margin-top:3px}.learn-more[_ngcontent-%COMP%]:hover{color:#66b3ff;text-decoration:underline}.close-button[_ngcontent-%COMP%]{position:absolute;top:17px;right:8px;background:none;border:none;font-size:20px;color:#fff;cursor:pointer;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.close-button[_ngcontent-%COMP%]:hover{color:#ccc}.map-container[_ngcontent-%COMP%]{margin:0;padding:0}.map-top-spacing[_ngcontent-%COMP%]{margin-top:70px!important}html[dir=rtl][_nghost-%COMP%]   .close-button[_ngcontent-%COMP%], html[dir=rtl]   [_nghost-%COMP%]   .close-button[_ngcontent-%COMP%]{right:auto;left:8px}.floating-search-form[_ngcontent-%COMP%]{position:absolute;top:2px;left:5px;right:5px;z-index:1000;border-radius:12px;padding:8px}.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]{max-height:185px;overflow-y:auto;border-radius:8px;background-color:#fff;border:1px solid var(--ion-color-primary)}@media (min-width: 768px){.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]{background-color:#f7f6e1;border:1px solid var(--ion-color-primary)}}.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#e8f5e8;border-radius:10px;margin:15px 0}.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--ion-color-primary);border-radius:10px;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.floating-search-form[_ngcontent-%COMP%]   .containerDiscoverAddress[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--ion-color-primary-shade)}.scheduleBranch[_ngcontent-%COMP%]{font-size:13px;font-weight:700;top:7px;position:relative;color:var(--ion-color-primary)}"]})}}return s})()}}]);

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.