HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/7255.ae49c5b3f613434e.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[7255,1519,3900,6757,9138,5553,767,7934,315],{55553:(x,D,i)=>{i.d(D,{h:()=>d});var t=i(77897),l=i(56610),M=i(41683),E=i(13721),T=i(22882),f=i(37222),I=i(36594),p=i(2978);let d=(()=>{class e{static#t=this.\u0275fac=function(c){return new(c||e)};static#e=this.\u0275mod=p.$C({type:e});static#i=this.\u0275inj=p.G2t({imports:[l.MD,t.bv,E.h,M.Y,T.h.forChild(),f.YN,I.rJ]})}return e})()},22038:(x,D,i)=>{i.r(D),i.d(D,{AddressPageModule:()=>y});var t=i(56610),l=i(77897),M=i(37222),E=i(22882),T=i(36075),f=i(73308),I=i(22126);const p=(0,I.F3)("Geolocation",{web:()=>i.e(3243).then(i.bind(i,33243)).then(g=>new g.GeolocationWeb)}),d=(0,I.F3)("NativeGeocoder",{web:()=>i.e(6868).then(i.bind(i,36868)).then(g=>new g.NativeGeocoderWeb)});var e=i(2978),P=i(86962),s=i(57291),c=i(29885),m=i(54171),h=i(26811);function a(g,U){1&g&&(e.j41(0,"ion-buttons",9),e.nrm(1,"ion-back-button",10),e.k0s())}const o=[{path:"",component:(()=>{class g{constructor(r,n,_,A,O,b,S,L,B){this.navCtrl=r,this.translateService=n,this.addressProvider=_,this.alertCtrl=A,this.storage=O,this.userProvider=b,this.utilsService=S,this.route=L,this.locationService=B,this.allCities=[],this.selectOptionsDepartament={},this.selectOptionsCity={},this.statusInvalidTypeTrack=!1,this.statusInvalidTagName=!1,this.statusInvalidNeighborhood=!1,this.statusInvalidDepartment=!1,this.statusInvalidCity=!1,this.statusCityService=!1,this.addressString="",this.statusCallGetPositionUser=!1,this.statusSendCreateAddress=!1,this.inPoint=!1,this.backButton=!1,this.coverage_id=null,this.getPositionUser(),this.pageOrigin=this.route.snapshot.paramMap.get("pageOrigin"),this.backButton=this.route.snapshot.paramMap.get("backButton"),this.translateService.get(["LABEL_DEPARTAMENT"]).subscribe(R=>{this.selectOptionsDepartament={title:R.LABEL_DEPARTAMENT,mode:"md"}}),this.translateService.get(["LABEL_CITY"]).subscribe(R=>{this.selectOptionsCity={title:R.LABEL_CITY,mode:"md"}}),n.get(["CITY_OUT_OF_COVERAGE","ADDRESS_OUT_OF_COVERAGE","ALREADY_ADDRESS","HIGH_ACCURACY","LOCATION_NOT_FUNCTION"]).subscribe(R=>{this.messageText={cityOutCoverage:R.CITY_OUT_OF_COVERAGE,addressOutCoverage:R.ADDRESS_OUT_OF_COVERAGE,alreadyAddress:R.ALREADY_ADDRESS,high_accuracy:R.HIGH_ACCURACY,locationNotFunction:R.LOCATION_NOT_FUNCTION,sendCoveragePending:R.SEND_COVERAGE_PENDING}})}ngOnInit(){}ionViewDidLoad(){}ionViewWillEnter(){this.addressProvider.getAllDepartments(),this.addressProvider.getAllCitiesService()}getPositionUser(){var r=this;return(0,f.A)(function*(){r.coords=yield p.getCurrentPosition(),d.reverseGeocode({useLocale:!0,maxResults:5,latitude:r.coords.latitude,longitude:r.coords.longitude,apiKey:"AIzaSyDv579f74i_47NZHBfdxAxprOsZ526iHVI"}).then(_=>{setTimeout(()=>{let A=r.addressProvider._allDepartments.find(O=>O.name===_[0].administrativeArea);A&&(r.departmentUser=A.id,r.cityLocationUser=_[0].subAdministrativeArea,r.getAllCities(r.departmentUser,!0))},500)}).catch(_=>{console.log("error nativeGeocoder: ",_)})})()}getAllCities(r,n){var _=this;return(0,f.A)(function*(){n&&_.utilsService.presentLoading(_.translateService.instant("all.loading")),(yield _.addressProvider.getAllCities(r)).subscribe(A=>{"success"==A.status&&(_.allCities=A.cities,setTimeout(()=>{if(_.allCities&&_.cityLocationUser){let O=_.allCities.find(b=>b.name===_.cityLocationUser);O&&(_.cityUser=O.id)}},500),n&&_.utilsService.dismissLoading())},A=>{console.log("error signup: ",A),n&&_.utilsService.dismissLoading()})})()}showWarning(r){this.utilsService.presentToast(3e3,"warning","top",this.translateService.instant(r))}validatedAddress(r){this.location.address?this.createAddress(r):this.showWarning("ADDRESS_REQUIRED")}alertNotCoverage(r){var n=this;return(0,f.A)(function*(){yield(yield n.alertCtrl.create({message:n.messageText.cityOutCoverage,buttons:[{text:"Cancelar",handler:()=>{}},{text:"Notificarme",handler:()=>{n.storage.get("infoUser").then(A=>{A&&n.storage.get("token").then(O=>{O&&n.utilsService.presentLoading(n.translateService.instant("all.sending")).then((0,f.A)(function*(){let b={email:A.email,lat:n.coords.latitude?n.coords.latitude:"",lng:n.coords.longitude?n.coords.longitude:"",city_id:r.controls.city.value};(yield n.addressProvider.saveCoveragePending(b,O.access_token)).subscribe(S=>{n.utilsService.dismissLoading(),"success"==S.status&&n.utilsService.presentToast(3e3,"success","top",n.translateService.instant("SEND_COVERAGE_PENDING"))},S=>n.utilsService.dismissLoading())})).catch(b=>n.utilsService.dismissLoading())})})}}]})).present()})()}alertGetLocation(){var r=this;return(0,f.A)(function*(){yield(yield r.alertCtrl.create({header:r.messageText.locationNotFunction,buttons:[{text:"Obtener ubicaci\xf3n",handler:()=>{r.getPositionUser()}}]})).present()})()}alertAddressOutCoverage(){var r=this;return(0,f.A)(function*(){yield(yield r.alertCtrl.create({header:r.messageText.addressOutCoverage,buttons:["OK"]})).present()})()}alertAddressExist(){var r=this;return(0,f.A)(function*(){yield(yield r.alertCtrl.create({header:r.messageText.alreadyAddress,buttons:["OK"]})).present()})()}createAddress(r){var n=this;return(0,f.A)(function*(){r.value.latitude=n.location.lat,r.value.longitude=n.location.lng,r.value.coverage_id=n.coverage_id,r.value.address=n.location.address,(yield n.addressProvider.addAddressUser(r.value,yield n.utilsService.getAccessToken())).subscribe(_=>{n.storage.set("addressUser",_.address),n.utilsService.dismissLoading(),n.statusSendCreateAddress=!1,"success"==_.status?n.storage.get("infoUser").then(A=>{let O=A;O.addresses=_.address,O.user_info.is_initial=0,n.storage.set("infoUser",O),n.utilsService.presentToast(3e3,"success","top",n.translateService.instant("SUCCESS_SAVE_LOCATION")),n.locationService.back()}):"already_address"==_.status&&n.alertAddressExist()},_=>{console.log("error signup: ",_),n.utilsService.dismissLoading(),n.statusSendCreateAddress=!1})})()}setLocation(r){this.location=r}static#t=this.\u0275fac=function(n){return new(n||g)(e.rXU(l.q9),e.rXU(E.c$),e.rXU(P.E),e.rXU(l.hG),e.rXU(s.n),e.rXU(c.D),e.rXU(m.T),e.rXU(T.nX),e.rXU(t.aZ))};static#e=this.\u0275cmp=e.VBU({type:g,selectors:[["page-address"]],decls:16,vars:12,consts:[[1,"ion-no-border"],["slot","start",4,"ngIf"],[1,"ion-text-center"],[1,"ion-padding"],[3,"ngSubmit"],["formAddress","ngForm"],["position","stacked",1,"ion-no-padding","ion-margin-top"],[2,"height","30vh","display","block",3,"showSearchField","location"],["type","submit","color","primary","shape","round","expand","block","fill","solid",1,"marginTop10",3,"disabled"],["slot","start"],["defaultHref","/app/tabs/settings","slot","start"]],template:function(n,_){if(1&n){const A=e.RV6();e.j41(0,"ion-header",0)(1,"ion-toolbar"),e.DNE(2,a,2,0,"ion-buttons",1),e.j41(3,"ion-title",2),e.EFF(4),e.nI1(5,"translate"),e.k0s()()(),e.j41(6,"ion-content",3)(7,"form",4,5),e.bIt("ngSubmit",function(){e.eBV(A);const b=e.sdS(8);return e.Njj(_.validatedAddress(b))}),e.j41(9,"ion-label",6),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"app-map",7),e.bIt("location",function(b){return _.setLocation(b)}),e.k0s(),e.j41(13,"ion-button",8),e.EFF(14),e.nI1(15,"translate"),e.k0s()()()}2&n&&(e.R7$(2),e.Y8G("ngIf",_.backButton),e.R7$(2),e.JRh(e.bMT(5,6,"LABEL_TITLE_ADDRESS")),e.R7$(6),e.SpI(" ",e.bMT(11,8,"ADDRESS")," "),e.R7$(2),e.Y8G("showSearchField",!0),e.R7$(1),e.Y8G("disabled",_.statusSendCreateAddress),e.R7$(1),e.SpI(" ",e.bMT(15,10,"BUTTON_VALIDATE_ADDRESS")," "))},dependencies:[t.bT,l.el,l.Jm,l.QW,l.W9,l.eU,l.he,l.BC,l.ai,l.tY,M.qT,M.cb,M.cV,h.i,E.D9],styles:[".scroll-content[_ngcontent-%COMP%]{background-color:#fff}.imageAddress[_ngcontent-%COMP%]{display:block!important;margin:10px auto!important;width:auto;height:60px}.textTittleAddress[_ngcontent-%COMP%]{font-size:18px;color:var(--color-title);margin-top:20px;margin-bottom:25px}.select-text[_ngcontent-%COMP%]   .typeTrackEdit[_ngcontent-%COMP%]{margin-right:10px!important;margin-left:-15px!important}.typeTrackEdit.select-ios[_ngcontent-%COMP%]{padding:11px 8px 16px 16px!important}.typeTrackEdit[_ngcontent-%COMP%]{width:auto!important;min-width:100%!important;border:1px solid var(--color-border-input-select)!important;border-radius:5px!important;height:46px!important}.ion-select[_ngcontent-%COMP%]   .typeTrackEdit[_ngcontent-%COMP%]{max-width:100%!important}.itemEditTypeTrack[_ngcontent-%COMP%]   .item-inner[_ngcontent-%COMP%]{border-bottom:none!important;max-width:100px!important}.marginLeft2[_ngcontent-%COMP%]{margin-left:2%}.widthCol20[_ngcontent-%COMP%]{width:20%!important;max-width:20%!important}.separatorsNumber[_ngcontent-%COMP%], .separatorsLined[_ngcontent-%COMP%]{padding:0 5px;margin-top:10px;font-size:20px}ion-input[_ngcontent-%COMP%]{background-color:#fff}.placeholder-select[_ngcontent-%COMP%]{border:1px solid #dedede;width:-webkit-fill-available;border-radius:5px;background-color:#fff}"]})}return g})()}];let C=(()=>{class g{static#t=this.\u0275fac=function(n){return new(n||g)};static#e=this.\u0275mod=e.$C({type:g});static#i=this.\u0275inj=e.G2t({imports:[T.iI.forChild(o),T.iI]})}return g})();var u=i(55553);let y=(()=>{class g{static#t=this.\u0275fac=function(n){return new(n||g)};static#e=this.\u0275mod=e.$C({type:g});static#i=this.\u0275inj=e.G2t({imports:[t.MD,l.bv,M.YN,E.h.forChild(),C,u.h]})}return g})()},68053:(x,D,i)=>{i.d(D,{T:()=>p});var t=i(2978),l=i(77897),M=i(7125),E=i(56610),T=i(22882);function f(d,e){if(1&d&&t.nrm(0,"img",5),2&d){const P=t.XpG();t.FCK("src","",P.image,"?_dc=",P.time,"",t.B4B)}}function I(d,e){if(1&d&&t.nrm(0,"img",6),2&d){const P=t.XpG();t.yjJ("src","",P.cityProvider._urlGallery,"popups/",P.image,"?_dc=",P.time,"",t.B4B)}}let p=(()=>{class d{constructor(P,s){this.modalCtrl=P,this.cityProvider=s}ngOnInit(){this.time=(new Date).getTime()}cancel(){this.modalCtrl.dismiss()}static#t=this.\u0275fac=function(s){return new(s||d)(t.rXU(l.W3),t.rXU(M.h))};static#e=this.\u0275cmp=t.VBU({type:d,selectors:[["app-modal-inapp"]],decls:9,vars:5,consts:[[1,"content"],["onerror","this.style.display='none';","class","image_popup","alt","popup",3,"src",4,"ngIf"],["class","image_popup","alt","popup",3,"src",4,"ngIf"],[1,"ion-text-center"],["size","default",3,"click"],["onerror","this.style.display='none';","alt","popup",1,"image_popup",3,"src"],["alt","popup",1,"image_popup",3,"src"]],template:function(s,c){1&s&&(t.j41(0,"ion-content",0),t.DNE(1,f,1,2,"img",1),t.DNE(2,I,1,3,"img",2),t.k0s(),t.j41(3,"ion-footer")(4,"ion-item")(5,"ion-label",3)(6,"ion-button",4),t.bIt("click",function(){return c.cancel()}),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()()),2&s&&(t.R7$(1),t.Y8G("ngIf",c.image.includes("http")),t.R7$(1),t.Y8G("ngIf",!c.image.includes("http")),t.R7$(5),t.JRh(t.bMT(8,3,"all.close")))},dependencies:[E.bT,l.Jm,l.W9,l.M0,l.uz,l.he,T.D9],styles:["ion-content[_ngcontent-%COMP%]{scrollbar-width:none!important}.content[_ngcontent-%COMP%]::-webkit-scrollbar{display:none;overflow:hidden}.image_popup[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-flow:column;margin:auto}"]})}return d})()},87445:(x,D,i)=>{i.d(D,{$:()=>h});var t=i(2978),l=i(77897),M=i(7125),E=i(26173),T=i(83254),f=i(56610),I=i(22882);function p(a,v){if(1&a&&(t.j41(0,"ion-title"),t.EFF(1),t.k0s()),2&a){const o=t.XpG();t.R7$(1),t.JRh(o.popup.title)}}function d(a,v){if(1&a){const o=t.RV6();t.j41(0,"img",12),t.bIt("click",function(){t.eBV(o);const u=t.XpG();return t.Njj(u.openAction(u.popup))}),t.k0s()}if(2&a){const o=t.XpG();t.FCK("src","",o.popup.image,"?_dc=",o.time,"",t.B4B)}}function e(a,v){if(1&a){const o=t.RV6();t.j41(0,"img",13),t.bIt("click",function(){t.eBV(o);const u=t.XpG();return t.Njj(u.openAction(u.popup))}),t.k0s()}if(2&a){const o=t.XpG();t.yjJ("src","",o.cityProvider._urlGallery,"popups/",o.popup.image,"?_dc=",o.time,"",t.B4B)}}function P(a,v){if(1&a&&(t.j41(0,"ion-text",14)(1,"h5",15),t.EFF(2),t.k0s()()),2&a){const o=t.XpG();t.R7$(2),t.JRh(o.popup.msj)}}function s(a,v){if(1&a){const o=t.RV6();t.j41(0,"ion-button",16),t.bIt("click",function(){t.eBV(o);const u=t.XpG();return t.Njj(u.openAction(u.popup))}),t.EFF(1),t.k0s()}if(2&a){const o=t.XpG();t.R7$(1),t.SpI(" ",o.popup.text_button_ok," ")}}function c(a,v){if(1&a){const o=t.RV6();t.j41(0,"ion-button",16),t.bIt("click",function(){t.eBV(o);const u=t.XpG();return t.Njj(u.openAction(u.popup))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"all.open")," "))}function m(a,v){if(1&a){const o=t.RV6();t.j41(0,"ion-button",17),t.bIt("click",function(){t.eBV(o);const u=t.XpG();return t.Njj(u.cancel())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"all.close")," "))}let h=(()=>{class a{constructor(o,C,u,y){this.modalCtrl=o,this.cityProvider=C,this.homeProvider=u,this.analyticsService=y}ngOnInit(){this.time=(new Date).getTime(),document.body.classList.add("modal-open")}cancel(o=!0){o&&this.analyticsService.logEvent("Popup Close: "+this.popup.title,"Popup","close",this.popup);let C=document.body.getElementsByClassName("modal-popup");(!C||1==C.length)&&document.body.classList.remove("modal-open"),this.modalCtrl.dismiss()}openAction(o){!o||!o.type_action_id||(this.analyticsService.logEvent("Popup Click: "+o.title,"Popup","click",o),this.homeProvider.openAction(o.type_action_id,o.value,o.target),this.cancel(!1))}static#t=this.\u0275fac=function(C){return new(C||a)(t.rXU(l.W3),t.rXU(M.h),t.rXU(E.X),t.rXU(T.c))};static#e=this.\u0275cmp=t.VBU({type:a,selectors:[["app-modal-popup"]],inputs:{popup:"popup"},decls:16,vars:7,consts:[[1,"ion-text-center"],[4,"ngIf"],["slot","end"],["expand","block","size","large","color","light",3,"click"],["name","close-circle-outline"],[1,"content"],[1,"container"],["onerror","this.style.display='none';","class","image-popup","alt","popup",3,"src","click",4,"ngIf"],["class","image-popup","alt","popup",3,"src","click",4,"ngIf"],["color","dark","class","ion-text-center",4,"ngIf"],["expand","block","size","default","class","press-effect",3,"click",4,"ngIf"],["expand","block","size","default",3,"click",4,"ngIf"],["onerror","this.style.display='none';","alt","popup",1,"image-popup",3,"src","click"],["alt","popup",1,"image-popup",3,"src","click"],["color","dark",1,"ion-text-center"],[1,"not-margin"],["expand","block","size","default",1,"press-effect",3,"click"],["expand","block","size","default",3,"click"]],template:function(C,u){1&C&&(t.j41(0,"ion-toolbar",0),t.DNE(1,p,2,1,"ion-title",1),t.j41(2,"ion-buttons",2)(3,"ion-button",3),t.bIt("click",function(){return u.cancel()}),t.nrm(4,"ion-icon",4),t.k0s()()(),t.j41(5,"ion-content",5)(6,"div",6),t.DNE(7,d,1,2,"img",7),t.DNE(8,e,1,3,"img",8),t.DNE(9,P,3,1,"ion-text",9),t.k0s()(),t.j41(10,"ion-footer")(11,"ion-item")(12,"ion-label",0),t.DNE(13,s,2,1,"ion-button",10),t.DNE(14,c,3,3,"ion-button",10),t.DNE(15,m,3,3,"ion-button",11),t.k0s()()()),2&C&&(t.R7$(1),t.Y8G("ngIf",!u.popup.hide_name),t.R7$(6),t.Y8G("ngIf",u.popup.image.includes("http")),t.R7$(1),t.Y8G("ngIf",!u.popup.image.includes("http")),t.R7$(1),t.Y8G("ngIf",u.popup.msj),t.R7$(4),t.Y8G("ngIf",u.popup.type_action_id&&u.popup.text_button_ok),t.R7$(1),t.Y8G("ngIf",u.popup.type_action_id&&!u.popup.text_button_ok),t.R7$(1),t.Y8G("ngIf",!u.popup.type_action_id))},dependencies:[f.bT,l.Jm,l.QW,l.W9,l.M0,l.iq,l.uz,l.he,l.IO,l.BC,l.ai,I.D9],styles:["ion-content[_ngcontent-%COMP%]{scrollbar-width:none!important}.content[_ngcontent-%COMP%]::-webkit-scrollbar{display:none;overflow:hidden}.container[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:center;align-items:center;height:100%;width:100%}.image-popup[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column;margin:auto}"]})}return a})()},86962:(x,D,i)=>{i.d(D,{E:()=>T});var t=i(73308),l=i(2978),M=i(3366),E=i(54171);let T=(()=>{class f{constructor(p,d){this.api=p,this.utilsService=d,this._allCitiesService=[],this._allDepartments=[]}getAllCitiesService(){var p=this;return(0,t.A)(function*(){(yield p.api.getFree("address/allCitiesService")).subscribe(e=>{"success"==e.status&&(p._allCitiesService=e.citiesService,p._pointCoverage=e.pointCoverage.point_coverage)},e=>{console.error("Error provider address getAllCitiesService",e)})})()}getAllDepartments(){var p=this;return(0,t.A)(function*(){return new Promise(function(){var d=(0,t.A)(function*(e,P){(yield p.api.getFree("address/allDepartments")).subscribe(s=>{"success"==s.status&&(p._allDepartments=s.departments),e(s)},s=>{console.error("Error provider address getAllDepartments",s),P(s)})});return function(e,P){return d.apply(this,arguments)}}())})()}getAllCities(p){return this.api.getFree("address/allCities/"+p)}getAllCitiesAdvisor(p){return this.api.getFree("address/allCities/"+p)}addAddressUser(p,d){return this.api.post("address/add",p,d)}deleteAddress(p,d){return this.api.post("address/delete",{address_id:p},d)}updateLocationAddress(p,d,e){return this.api.put("address/updateLocation",{address_id:p,lat:d.lat,lng:d.lng},e)}saveCoveragePending(p,d){return this.api.post("address/saveCoveragePending",p,d)}addresToLatLong(p,d){return this.api.get("address/geocode/"+encodeURIComponent(p),d)}static#t=this.\u0275fac=function(d){return new(d||f)(l.KVO(M.G),l.KVO(E.T))};static#e=this.\u0275prov=l.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}return f})()},1519:(x,D,i)=>{i.d(D,{p:()=>d});var t=i(73308),l=i(87445),M=i(68053),E=i(2978),T=i(3366),f=i(57291),I=i(54171),p=i(77897);let d=(()=>{class e{constructor(s,c,m,h){this.api=s,this.storage=c,this.utilsService=m,this.modalController=h}getBookcase(s){return this.api.get("comms/bookcase_embed",s)}presentModal(s){var c=this;return(0,t.A)(function*(){return yield(yield c.modalController.create({component:l.$,cssClass:"modal-popup",showBackdrop:!1,swipeToClose:!1,backdropDismiss:!1,componentProps:{popup:s}})).present()})()}presentInapp(s){var c=this;return(0,t.A)(function*(){var m=c;m.closePopup(m.popup),m.modalController.create({component:M.T,cssClass:"modal-popup",showBackdrop:!1,swipeToClose:!1,backdropDismiss:!1,componentProps:{image:s.image}}).then(h=>{h.present(),h.addEventListener("ionModalDidPresent",a=>{a.target&&a.target.addEventListener("focusout",v=>{v.sourceCapabilities&&m.popup&&m.closePopup(m.popup)})}),m.popup=h})})()}presentPopup(s,c){var m=this;return(0,t.A)(function*(){var h=m;h.closePopup(h.popup),h.modalController.create({component:s,cssClass:"modal-popup",showBackdrop:!1,swipeToClose:!0,backdropDismiss:!0,componentProps:{object:c}}).then(a=>{a.present(),a.addEventListener("ionModalDidPresent",v=>{v.target&&v.target.addEventListener("focusout",o=>{o.sourceCapabilities&&h.popup&&h.closePopup(h.popup)})}),h.popup=a})})()}closePopup(s){s&&s.dismiss()}getRadio(s){return this.api.get("comms/radio_embed",s)}getSocialNetworkAccounts(s){return this.api.get("comms/social_network_accounts",s)}getTiktok(s){return this.api.get("comms/video_tiktok",s)}getYoutube(s,c){return this.api.get("comms/video_youtube"+(c?"/"+c:""),s)}getYoutubeData(){var s=this;return(0,t.A)(function*(){return new Promise(function(){var c=(0,t.A)(function*(m,h){(yield s.api.get("comms/video_youtube",yield s.utilsService.getAccessToken())).subscribe(v=>{m(v)},v=>{h(v)})});return function(m,h){return c.apply(this,arguments)}}())})()}getInstagram(s,c){return this.api.get("comms/photo_instagram"+(c?"/"+c:""),s)}getTwitter(s){return this.api.get("comms/official_twitter",s)}getFacebook(s){return this.api.get("comms/official_facebook",s)}getBanners(s){var c=this;return(0,t.A)(function*(){return new Promise(function(){var m=(0,t.A)(function*(h,a){(yield c.api.get("comms/getBanners/"+s,yield c.utilsService.getAccessToken())).subscribe({next:o=>{h(o)},error:o=>{a(o)},complete:()=>{}})});return function(h,a){return m.apply(this,arguments)}}())})()}getPopups(s){var c=this;return(0,t.A)(function*(){c.storage.get("popups").then(m=>new Promise(function(){var h=(0,t.A)(function*(a,v){let o=m||[];(yield c.api.get("comms/getPopups/"+s,yield c.utilsService.getAccessToken())).subscribe({next:u=>{u.forEach(y=>{if(0===y.frequency)c.openPopup(y);else{let g=o.find(U=>U.id===y.id);if(g&&g.views===g.frequency)return;g?g.views+=1:(y.views=1,o.push(y)),c.openPopup(y)}}),c.storage.set("popups",o),a(u)},error:u=>{v(u)},complete:()=>{}})});return function(a,v){return h.apply(this,arguments)}}()))})()}openPopup(s){this.presentModal(s)}static#t=this.\u0275fac=function(c){return new(c||e)(E.KVO(T.G),E.KVO(f.n),E.KVO(I.T),E.KVO(p.W3))};static#e=this.\u0275prov=E.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()}}]);