(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3467],{39866:(Ne,ae,m)=>{m.d(ae,{Uw:()=>Pe,fo:()=>de});var e=m(15861);typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"&&global;var X=(()=>{return(f=X||(X={})).Unimplemented="UNIMPLEMENTED",f.Unavailable="UNAVAILABLE",X;var f})();class j extends Error{constructor(c,g,y){super(c),this.message=c,this.code=g,this.data=y}}const ce=f=>{var c,g,y,w,E;const k=f.CapacitorCustomPlatform||null,b=f.Capacitor||{},U=b.Plugins=b.Plugins||{},V=f.CapacitorPlatforms,ie=(null===(c=V?.currentPlatform)||void 0===c?void 0:c.getPlatform)||(()=>null!==k?k.name:(f=>{var c,g;return f?.androidBridge?"android":null!==(g=null===(c=f?.webkit)||void 0===c?void 0:c.messageHandlers)&&void 0!==g&&g.bridge?"ios":"web"})(f)),we=(null===(g=V?.currentPlatform)||void 0===g?void 0:g.isNativePlatform)||(()=>"web"!==ie()),s=(null===(y=V?.currentPlatform)||void 0===y?void 0:y.isPluginAvailable)||(I=>!(!F.get(I)?.platforms.has(ie())&&!a(I))),a=(null===(w=V?.currentPlatform)||void 0===w?void 0:w.getPluginHeader)||(I=>{var p;return null===(p=b.PluginHeaders)||void 0===p?void 0:p.find(T=>T.name===I)}),F=new Map,W=(null===(E=V?.currentPlatform)||void 0===E?void 0:E.registerPlugin)||((I,p={})=>{const T=F.get(I);if(T)return console.warn(`Capacitor plugin "${I}" already registered. Cannot register plugins twice.`),T.proxy;const v=ie(),z=a(I);let te;const Ue=function(){var Z=(0,e.Z)(function*(){return!te&&v in p?te=te="function"==typeof p[v]?yield p[v]():p[v]:null!==k&&!te&&"web"in p&&(te=te="function"==typeof p.web?yield p.web():p.web),te});return function(){return Z.apply(this,arguments)}}(),Le=Z=>{let Y;const re=(..._e)=>{const ge=Ue().then(ne=>{const ue=((Z,Y)=>{var re,_e;if(!z){if(Z)return null===(_e=Z[Y])||void 0===_e?void 0:_e.bind(Z);throw new j(`"${I}" plugin is not implemented on ${v}`,X.Unimplemented)}{const ge=z?.methods.find(ne=>Y===ne.name);if(ge)return"promise"===ge.rtype?ne=>b.nativePromise(I,Y.toString(),ne):(ne,ue)=>b.nativeCallback(I,Y.toString(),ne,ue);if(Z)return null===(re=Z[Y])||void 0===re?void 0:re.bind(Z)}})(ne,Z);if(ue){const ye=ue(..._e);return Y=ye?.remove,ye}throw new j(`"${I}.${Z}()" is not implemented on ${v}`,X.Unimplemented)});return"addListener"===Z&&(ge.remove=(0,e.Z)(function*(){return Y()})),ge};return re.toString=()=>`${Z.toString()}() { [capacitor code] }`,Object.defineProperty(re,"name",{value:Z,writable:!1,configurable:!1}),re},Ve=Le("addListener"),Fe=Le("removeListener"),Be=(Z,Y)=>{const re=Ve({eventName:Z},Y),_e=function(){var ne=(0,e.Z)(function*(){const ue=yield re;Fe({eventName:Z,callbackId:ue},Y)});return function(){return ne.apply(this,arguments)}}(),ge=new Promise(ne=>re.then(()=>ne({remove:_e})));return ge.remove=(0,e.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield _e()}),ge},Ae=new Proxy({},{get(Z,Y){switch(Y){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return z?Be:Ve;case"removeListener":return Fe;default:return Le(Y)}}});return U[I]=Ae,F.set(I,{name:I,proxy:Ae,platforms:new Set([...Object.keys(p),...z?[v]:[]])}),Ae});return b.convertFileSrc||(b.convertFileSrc=I=>I),b.getPlatform=ie,b.handleError=I=>f.console.error(I),b.isNativePlatform=we,b.isPluginAvailable=s,b.pluginMethodNoop=(I,p,T)=>Promise.reject(`${T} does not have an implementation of "${p}".`),b.registerPlugin=W,b.Exception=j,b.DEBUG=!!b.DEBUG,b.isLoggingEnabled=!!b.isLoggingEnabled,b.platform=b.getPlatform(),b.isNative=b.isNativePlatform(),b},le=(f=>f.Capacitor=ce(f))(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),de=le.registerPlugin;class Pe{constructor(c){this.listeners={},this.windowListeners={},c&&(console.warn(`Capacitor WebPlugin "${c.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=c)}addListener(c,g){var y=this;this.listeners[c]||(this.listeners[c]=[]),this.listeners[c].push(g);const E=this.windowListeners[c];E&&!E.registered&&this.addWindowListener(E);const k=function(){var U=(0,e.Z)(function*(){return y.removeListener(c,g)});return function(){return U.apply(this,arguments)}}(),b=Promise.resolve({remove:k});return Object.defineProperty(b,"remove",{value:(U=(0,e.Z)(function*(){console.warn("Using addListener() without 'await' is deprecated."),yield k()}),function(){return U.apply(this,arguments)})}),b;var U}removeAllListeners(){var c=this;return(0,e.Z)(function*(){c.listeners={};for(const g in c.windowListeners)c.removeWindowListener(c.windowListeners[g]);c.windowListeners={}})()}notifyListeners(c,g){const y=this.listeners[c];y&&y.forEach(w=>w(g))}hasListeners(c){return!!this.listeners[c].length}registerWindowListener(c,g){this.windowListeners[g]={registered:!1,windowEventName:c,pluginEventName:g,handler:y=>{this.notifyListeners(g,y)}}}unimplemented(c="not implemented"){return new le.Exception(c,X.Unimplemented)}unavailable(c="not available"){return new le.Exception(c,X.Unavailable)}removeListener(c,g){var y=this;return(0,e.Z)(function*(){const w=y.listeners[c];if(!w)return;const E=w.indexOf(g);y.listeners[c].splice(E,1),y.listeners[c].length||y.removeWindowListener(y.windowListeners[c])})()}addWindowListener(c){window.addEventListener(c.windowEventName,c.handler),c.registered=!0}removeWindowListener(c){!c||(window.removeEventListener(c.windowEventName,c.handler),c.registered=!1)}}const Ee=f=>encodeURIComponent(f).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),pe=f=>f.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Te extends Pe{getCookies(){return(0,e.Z)(function*(){const c=document.cookie,g={};return c.split(";").forEach(y=>{if(y.length<=0)return;let[w,E]=y.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");w=pe(w).trim(),E=pe(E).trim(),g[w]=E}),g})()}setCookie(c){return(0,e.Z)(function*(){try{const g=Ee(c.key),y=Ee(c.value),w=`; expires=${(c.expires||"").replace("expires=","")}`,E=(c.path||"/").replace("path=",""),k=null!=c.url&&c.url.length>0?`domain=${c.url}`:"";document.cookie=`${g}=${y||""}${w}; path=${E}; ${k};`}catch(g){return Promise.reject(g)}})()}deleteCookie(c){return(0,e.Z)(function*(){try{document.cookie=`${c.key}=; Max-Age=0`}catch(g){return Promise.reject(g)}})()}clearCookies(){return(0,e.Z)(function*(){try{const c=document.cookie.split(";")||[];for(const g of c)document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(c){return Promise.reject(c)}})()}clearAllCookies(){var c=this;return(0,e.Z)(function*(){try{yield c.clearCookies()}catch(g){return Promise.reject(g)}})()}}de("CapacitorCookies",{web:()=>new Te});const $=function(){var f=(0,e.Z)(function*(c){return new Promise((g,y)=>{const w=new FileReader;w.onload=()=>{const E=w.result;g(E.indexOf(",")>=0?E.split(",")[1]:E)},w.onerror=E=>y(E),w.readAsDataURL(c)})});return function(g){return f.apply(this,arguments)}}();class Me extends Pe{request(c){return(0,e.Z)(function*(){const g=((f,c={})=>{const g=Object.assign({method:f.method||"GET",headers:f.headers},c),w=((f={})=>{const c=Object.keys(f);return Object.keys(f).map(w=>w.toLocaleLowerCase()).reduce((w,E,k)=>(w[E]=f[c[k]],w),{})})(f.headers)["content-type"]||"";if("string"==typeof f.data)g.body=f.data;else if(w.includes("application/x-www-form-urlencoded")){const E=new URLSearchParams;for(const[k,b]of Object.entries(f.data||{}))E.set(k,b);g.body=E.toString()}else if(w.includes("multipart/form-data")||f.data instanceof FormData){const E=new FormData;if(f.data instanceof FormData)f.data.forEach((b,U)=>{E.append(U,b)});else for(const b of Object.keys(f.data))E.append(b,f.data[b]);g.body=E;const k=new Headers(g.headers);k.delete("content-type"),g.headers=k}else(w.includes("application/json")||"object"==typeof f.data)&&(g.body=JSON.stringify(f.data));return g})(c,c.webFetchExtra),y=((f,c=!0)=>f?Object.entries(f).reduce((y,w)=>{const[E,k]=w;let b,U;return Array.isArray(k)?(U="",k.forEach(V=>{b=c?encodeURIComponent(V):V,U+=`${E}=${b}&`}),U.slice(0,-1)):(b=c?encodeURIComponent(k):k,U=`${E}=${b}`),`${y}&${U}`},"").substr(1):null)(c.params,c.shouldEncodeUrlParams),w=y?`${c.url}?${y}`:c.url,E=yield fetch(w,g),k=E.headers.get("content-type")||"";let U,V,{responseType:b="text"}=E.ok?c:{};switch(k.includes("application/json")&&(b="json"),b){case"arraybuffer":case"blob":V=yield E.blob(),U=yield $(V);break;case"json":U=yield E.json();break;default:U=yield E.text()}const fe={};return E.headers.forEach((ie,Oe)=>{fe[Oe]=ie}),{data:U,headers:fe,status:E.status,url:E.url}})()}get(c){var g=this;return(0,e.Z)(function*(){return g.request(Object.assign(Object.assign({},c),{method:"GET"}))})()}post(c){var g=this;return(0,e.Z)(function*(){return g.request(Object.assign(Object.assign({},c),{method:"POST"}))})()}put(c){var g=this;return(0,e.Z)(function*(){return g.request(Object.assign(Object.assign({},c),{method:"PUT"}))})()}patch(c){var g=this;return(0,e.Z)(function*(){return g.request(Object.assign(Object.assign({},c),{method:"PATCH"}))})()}delete(c){var g=this;return(0,e.Z)(function*(){return g.request(Object.assign(Object.assign({},c),{method:"DELETE"}))})()}}de("CapacitorHttp",{web:()=>new Me})},3467:(Ne,ae,m)=>{m.r(ae),m.d(ae,{HomePageModule:()=>j});var e=m(61380),B=m(98246),S=m(69270),Ce=m(82021),se=m(45449);const X=[{path:"",component:Ce.U}];let j=(()=>{class Q{}return Q.\u0275fac=function(ee){return new(ee||Q)},Q.\u0275mod=se.\u0275\u0275defineNgModule({type:Q}),Q.\u0275inj=se.\u0275\u0275defineInjector({imports:[S.I,B.F5,e.RouterModule.forChild(X)]}),Q})()},82021:(Ne,ae,m)=>{m.d(ae,{U:()=>ft});var e=m(15861),L=m(59584),B=m(24889),S=m(5254),Ce=m(21086),se=m(40537),J=m(72986),X=m(87545),j=m(22868),Q=m(27221),ce=m(35548),ee=m(47423),le=m(64633),de=m(72877),R=(()=>{return(o=R||(R={})).Accessibility="accessibility",o.Account="account",o.AirplaneMode="airplane_mode",o.Apn="apn",o.ApplicationDetails="application_details",o.ApplicationDevelopment="application_development",o.Application="application",o.AppNotification="app_notification",o.BatteryOptimization="battery_optimization",o.Bluetooth="bluetooth",o.Captioning="captioning",o.Cast="cast",o.DataRoaming="data_roaming",o.Date="date",o.Display="display",o.Dream="dream",o.Home="home",o.Keyboard="keyboard",o.KeyboardSubType="keyboard_subtype",o.Locale="locale",o.Location="location",o.ManageApplications="manage_applications",o.ManageAllApplications="manage_all_applications",o.MemoryCard="memory_card",o.Network="network",o.NfcSharing="nfcsharing",o.NfcPayment="nfc_payment",o.NfcSettings="nfc_settings",o.Print="print",o.Privacy="privacy",o.QuickLaunch="quick_launch",o.Search="search",o.Security="security",o.Settings="settings",o.ShowRegulatoryInfo="show_regulatory_info",o.Sound="sound",o.Storage="storage",o.Sync="sync",o.TextToSpeech="text_to_speech",o.Usage="usage",o.UserDictionary="user_dictionary",o.VoiceInput="voice_input",o.VPN="vpn",o.Wifi="wifi",o.WifiIp="wifi_ip",o.Wireless="wireless",o.ZenMode="zen_mode",o.ZenModePriority="zen_mode_priority",o.ZenModeBlockedEffects="zen_mode_blocked_effects",R;var o})(),oe=(()=>{return(o=oe||(oe={})).About="about",o.App="app",o.AppNotification="appNotification",o.AutoLock="autoLock",o.Bluetooth="bluetooth",o.DateTime="dateTime",o.FaceTime="facetime",o.General="general",o.Keyboard="keyboard",o.ICloud="iCloud",o.ICloudStorageBackup="iCloudStorageBackup",o.International="international",o.LocationServices="locationServices",o.Music="music",o.Notes="notes",o.Notifications="notifications",o.Phone="phone",o.Photos="photos",o.ManagedConfigurationList="managedConfigurationList",o.Reset="reset",o.Ringtone="ringtone",o.Sounds="sounds",o.SoftwareUpdate="softwareUpdate",o.Store="store",o.Tracking="tracking",o.VPN="vpn",o.Wallpaper="wallpaper",o.WiFi="wifi",o.Tethering="tethering",o.DoNotDisturb="doNotDisturb",o.TouchIdPasscode="touchIdPasscode",o.ScreenTime="screenTime",o.Accessibility="accessibility",oe;var o})();const Pe=(0,ee.fo)("NativeSettings",{web:()=>m.e(612).then(m.bind(m,50612)).then(o=>new o.NativeSettingsWeb)});var De=m(8782),Ee=m(71994);const pe=(0,ee.fo)("NotifyPersistent");var Te=m(53509),t=m(45449),$=m(90603),A=m(47898),xe=m(14453),be=m(80698),Me=m(61380),ke=m(37763);const c=(0,m(39866).fo)("CheckInvertColor",{web:()=>m.e(3621).then(m.bind(m,43621)).then(o=>new o.CheckInvertColorWeb)});let g=(()=>{class o{constructor(){}isEnabled(){return(0,e.Z)(function*(){let n=!1;try{const{invertedColorsEnabled:i}=yield c.checkInversionStatus();n=i}catch{return void(n=!1)}return n})()}}return o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac,providedIn:"root"}),o})(),y=(()=>{class o{constructor(n){this.platform=n}openSetting(n,i){this.platform.ready().then(()=>{Pe.open({optionAndroid:n,optionIOS:i})})}}return o.\u0275fac=function(n){return new(n||o)(t.\u0275\u0275inject($.Platform))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var w=m(10629),E=m(84432),k=m(1303),b=m(76733);let U=(()=>{class o{constructor(n,i,r,_,u){this.auth=n,this.fcmFirebase=i,this.platform=r,this.storageService=_,this.logService=u}sendDiagnosticLogTron(){var n=this;return(0,e.Z)(function*(){const i=yield n.statusCheck(),r=ee.dV.getPlatform(),_={...i,buildVesion:i.appInfo.build,appVersion:i.appInfo.version,platFormOs:r};n.logService.logEvent("event::diagnostic","Help Diagnostic app",JSON.stringify(_))})()}statusCheck(){var n=this;return(0,e.Z)(function*(){return new Promise((i,r)=>{n.platform.ready().then((0,e.Z)(function*(){n.storageService.startStorage().then((0,e.Z)(function*(){try{const _=yield Promise.all([n.auth.getLogOff(),n.auth.getToken(),n.auth.isExpiredToken(),n.auth.needsToRenewToken(),n.auth.getSabugoGeneratedAt(),n.auth.needsToRenewSabugo(),n.auth.isExpiredSabugo(),n.fcmFirebase.getTokenFcm(),{getTokenFcmStorage:n.fcmFirebase.getTokenStorage()},yield ce.g.getInfo(),yield n.auth.getRefId()]);return i({logOff:_[0],token:_[1],isExpiredToken:_[2],needsToRenewToken:_[3],getSabugoGeneratedAt:_[4],needsToRenewSabugo:_[5],isExpiredSabugo:_[6],getTokenFcm:_[7],getTokenFcmStorage:_[8].getTokenFcmStorage,appInfo:_[9],refId:_[10]})}catch(_){return r(_)}}))}))})})()}}return o.\u0275fac=function(n){return new(n||o)(t.\u0275\u0275inject(w.e),t.\u0275\u0275inject(E.Ei),t.\u0275\u0275inject($.Platform),t.\u0275\u0275inject(k.V),t.\u0275\u0275inject(b.$))},o.\u0275prov=t.\u0275\u0275defineInjectable({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var V=m(21284),fe=m(11481),ie=m(90944),Oe=m(36290),we=m(81838),Re=m(98246),s=m(69977),O=m(99826);function a(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",11),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(3);return t.\u0275\u0275resetView(r.openSettingTime())}),t.\u0275\u0275elementStart(1,"div",12)(2,"div",13),t.\u0275\u0275element(3,"ion-icon",14),t.\u0275\u0275elementEnd(),t.\u0275\u0275element(4,"div",15),t.\u0275\u0275pipe(5,"translate"),t.\u0275\u0275elementEnd()()}if(2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(1),t.\u0275\u0275property("className","home-snackbar__automatic-time__message "+(n.isSmallScreen||n.isMediumSmallScreen?"home-snackbar__automatic-time__message--small-screen":"")),t.\u0275\u0275advance(3),t.\u0275\u0275property("innerHTML",t.\u0275\u0275pipeBind1(5,2,"PG_HOME_BTN_NOT_AUTOMATIC_TIME"),t.\u0275\u0275sanitizeHtml)}}function d(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,a,6,4,"div",10),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.startError)}}function h(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",16)(2,"app-offline",17),t.\u0275\u0275listener("onReload",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(2);return t.\u0275\u0275resetView(r.onRestart())}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()}2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275property("smallMessage",!0)("isHome",!0)("showOffline",!0))}function F(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",8)(2,"div",9),t.\u0275\u0275template(3,d,2,1,"ng-container",2),t.\u0275\u0275template(4,h,3,3,"ng-container",2),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(3),t.\u0275\u0275property("ngIf",!n.isAutomaticTimeEnabled),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.isOffline)}}const D=function(o){return{height:o}},W=function(o){return{border:"none","min-height":o}};function I(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",18),t.\u0275\u0275element(2,"iframe",19),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngStyle",t.\u0275\u0275pureFunction1(3,D,n.hasBannerLogLoad?n.iframeHeight:"0px")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngStyle",t.\u0275\u0275pureFunction1(5,W,n.iframeHeight))("src",n.safeUrlIFrame,t.\u0275\u0275sanitizeResourceUrl)}}function p(o,P){1&o&&(t.\u0275\u0275elementStart(0,"div",29),t.\u0275\u0275element(1,"ion-skeleton-text",30),t.\u0275\u0275elementEnd())}function T(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",24)(1,"div",25),t.\u0275\u0275element(2,"ion-skeleton-text",26)(3,"ion-skeleton-text",27),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(4,p,2,0,"div",28),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",!n.isSmallScreen)}}function v(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",12),t.\u0275\u0275template(2,T,5,1,"div",23),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("className","hint "+(!n.isSmallScreen||n.thereAreProfiles||n.isUltraSmallScreen?"":"small_screen")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!(n.startError||n.isOffline||n.finishrequestStartVOProfiles||n.isExpiredSabugo))}}const z=function(o){return{"small-screen":o}};function te(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"ion-button",38),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(4);return t.\u0275\u0275resetView(r.onGoToCreateEvent())}),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275elementEnd()}if(2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(4,z,n.isSmallScreen||n.isMediumSmallScreen||n.isUltraSmallScreen&&n.hasBannerLogLoad)),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(2,2,"PG_HOME_BTN_INVITE")," ")}}function Ue(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"ion-button",39),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(4);return t.\u0275\u0275resetView(r.onGoToCreateEvent())}),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275elementEnd()}if(2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(5,z,n.isSmallScreen||n.isMediumSmallScreen||n.isUltraSmallScreen&&n.hasBannerLogLoad))("disabled",!0),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(2,3,"PG_HOME_BTN_LOADING")," ")}}function He(o,P){1&o&&(t.\u0275\u0275elementStart(0,"div",40)(1,"span"),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()()),2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,1,"PG_HOME_TEXT_WAIT_INTERNET")," "))}function Le(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",34),t.\u0275\u0275template(2,te,3,6,"ion-button",35),t.\u0275\u0275template(3,Ue,3,7,"ion-button",36),t.\u0275\u0275template(4,He,4,3,"div",37),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!n.inviteButtonDisable),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.inviteButtonDisable),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.inviteButtonDisable)}}function Ve(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",42)(1,"span"),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"button",43),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(4);return t.\u0275\u0275resetView(r.onGoToInsertCompanyInviteCode())}),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275elementEnd()()}2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,2,"PG_HOME_TEXT_IS_NOT_ASSOCIATED_COMPANY")," "),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(6,4,"PG_HOME_BTN_ASSOCIATE_COMPANY")," "))}function Fe(o,P){if(1&o&&t.\u0275\u0275template(0,Ve,7,6,"div",41),2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275property("ngIf",!n.isOffline&&n.finishrequestStartVOProfiles)}}const Be=function(o,P){return{toast_show_fcm:o,toast_show_fcm_small:P}};function Ae(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",31),t.\u0275\u0275template(1,Le,5,3,"ng-container",32),t.\u0275\u0275template(2,Fe,1,1,"ng-template",null,33,t.\u0275\u0275templateRefExtractor),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275reference(3),i=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("className","hint "+(i.isSmallScreen||i.isMediumSmallScreen&&!i.thereAreProfiles&&!i.isUltraSmallScreen?"small_screen":""))("ngClass",t.\u0275\u0275pureFunction2(4,Be,i.toastShowFcm&&!i.isSmallScreen&&!i.hasBannerLogLoad,i.toastShowFcm&&(i.isSmallScreen||i.isMediumSmallScreen||i.isUltraSmallScreen)&&!i.hasBannerLogLoad)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.finishrequestStartVOProfiles&&i.thereAreProfiles)("ngIfElse",n)}}function Z(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",44),t.\u0275\u0275element(1,"app-countdown",45),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(1),t.\u0275\u0275property("qrCodeValidityCountDown",n.qrCodeValidityCountDown)("duration",n.qrCodeValidityIntervalInSeconds)("paused",n.pausedCountdown)("hasBanner",n.hasBannerLogLoad)("displayCircularCountdown",n.displayCircularCountdown)}}function Y(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",20)(1,"div",21),t.\u0275\u0275template(2,v,3,2,"ng-container",2),t.\u0275\u0275template(3,Ae,4,7,"div",22),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(4,Z,2,5,"div",5),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!(n.hasBannerLogLoad||null!=n.httpErrorResonse&&n.httpErrorResonse.error||n.finishrequestStartVOProfiles)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.isOffline&&!(null!=n.httpErrorResonse&&n.httpErrorResonse.error)&&n.finishrequestStartVOProfiles),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.qrCode&&!n.isExpiredSabugo)}}function re(o,P){1&o&&(t.\u0275\u0275elementStart(0,"div",29),t.\u0275\u0275element(1,"ion-skeleton-text",30),t.\u0275\u0275elementEnd())}function _e(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",24)(1,"div",25),t.\u0275\u0275element(2,"ion-skeleton-text",26)(3,"ion-skeleton-text",27),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(4,re,2,0,"div",28),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",!n.isSmallScreen)}}function ge(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",12),t.\u0275\u0275template(2,_e,5,1,"div",23),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(1),t.\u0275\u0275property("className","hint "+(!n.isSmallScreen||n.thereAreProfiles||n.isUltraSmallScreen?"":"small_screen")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!(n.startError||n.isOffline||n.finishrequestStartVOProfiles||n.isExpiredSabugo))}}function ne(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"ion-button",49),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(5);return t.\u0275\u0275resetView(r.onGoToCreateEvent())}),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275elementEnd()}2&o&&(t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(2,1,"PG_HOME_BTN_INVITE")," "))}function ue(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"ion-button",39),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(5);return t.\u0275\u0275resetView(r.onGoToCreateEvent())}),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275elementEnd()}if(2&o){const n=t.\u0275\u0275nextContext(5);t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(5,z,n.isSmallScreen||n.isMediumSmallScreen||n.isUltraSmallScreen&&n.hasBannerLogLoad))("disabled",!0),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("",t.\u0275\u0275pipeBind1(2,3,"PG_HOME_BTN_LOADING")," ")}}function ye(o,P){1&o&&(t.\u0275\u0275elementStart(0,"div",40)(1,"span"),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()()),2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,1,"PG_HOME_TEXT_WAIT_INTERNET")," "))}function $e(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",34),t.\u0275\u0275template(2,ne,3,3,"ion-button",48),t.\u0275\u0275template(3,ue,3,7,"ion-button",36),t.\u0275\u0275template(4,ye,4,3,"div",37),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!n.inviteButtonDisable),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.inviteButtonDisable),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.inviteButtonDisable)}}function Ye(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",42)(1,"span"),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"button",43),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(5);return t.\u0275\u0275resetView(r.onGoToInsertCompanyInviteCode())}),t.\u0275\u0275text(5),t.\u0275\u0275pipe(6,"translate"),t.\u0275\u0275elementEnd()()}2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,2,"PG_HOME_TEXT_IS_NOT_ASSOCIATED_COMPANY")," "),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(6,4,"PG_HOME_BTN_ASSOCIATE_COMPANY")," "))}function Xe(o,P){if(1&o&&t.\u0275\u0275template(0,Ye,7,6,"div",41),2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275property("ngIf",!n.isOffline&&n.finishrequestStartVOProfiles)}}function Je(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",31),t.\u0275\u0275template(1,$e,5,3,"ng-container",32),t.\u0275\u0275template(2,Xe,1,1,"ng-template",null,33,t.\u0275\u0275templateRefExtractor),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275reference(3),i=t.\u0275\u0275nextContext(3);t.\u0275\u0275property("className","hint "+(i.isSmallScreen||i.isMediumSmallScreen&&!i.thereAreProfiles&&!i.isUltraSmallScreen?"small_screen":""))("ngClass",t.\u0275\u0275pureFunction2(4,Be,i.toastShowFcm&&!i.isSmallScreen&&!i.hasBannerLogLoad,i.toastShowFcm&&(i.isSmallScreen||i.isMediumSmallScreen||i.isUltraSmallScreen)&&!i.hasBannerLogLoad)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.finishrequestStartVOProfiles&&i.thereAreProfiles)("ngIfElse",n)}}const Qe=function(o,P){return{hasBanner:o,noBanner:P}};function qe(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",47),t.\u0275\u0275template(1,ge,3,2,"ng-container",2),t.\u0275\u0275template(2,Je,4,7,"div",22),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction2(3,Qe,n.hasBannerLogLoad,!n.hasBannerLogLoad)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!(n.hasBannerLogLoad||null!=n.httpErrorResonse&&n.httpErrorResonse.error||n.finishrequestStartVOProfiles)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.isOffline&&!(null!=n.httpErrorResonse&&n.httpErrorResonse.error)&&n.finishrequestStartVOProfiles)}}function et(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,qe,3,6,"div",46),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.isOffline)}}function tt(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",62)(1,"button",63),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(3);return t.\u0275\u0275resetView(r.onRestart())}),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()()}2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,1,"PG_HOME_BTN_RETRY_AGAIN")," "))}function nt(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",50)(2,"div",51)(3,"div",52)(4,"div",53)(5,"strong"),t.\u0275\u0275text(6),t.\u0275\u0275pipe(7,"translate"),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(8,"div",54)(9,"ion-text",55)(10,"p",56),t.\u0275\u0275element(11,"span",57),t.\u0275\u0275pipe(12,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(13,"p",58),t.\u0275\u0275element(14,"span",57),t.\u0275\u0275pipe(15,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(16,"p",59),t.\u0275\u0275element(17,"span",57),t.\u0275\u0275pipe(18,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(19,"p",60),t.\u0275\u0275element(20,"span",57),t.\u0275\u0275pipe(21,"translate"),t.\u0275\u0275elementEnd()()()(),t.\u0275\u0275template(22,tt,4,3,"div",61),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(6),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(7,6,"PG_HOME_TEXT_TOKEN_INVALID_TITLE")," "),t.\u0275\u0275advance(5),t.\u0275\u0275property("innerHTML",t.\u0275\u0275pipeBind1(12,8,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P1"),t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(3),t.\u0275\u0275property("innerHTML",t.\u0275\u0275pipeBind1(15,10,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P2"),t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(3),t.\u0275\u0275property("innerHTML",t.\u0275\u0275pipeBind1(18,12,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P3"),t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(3),t.\u0275\u0275property("innerHTML",t.\u0275\u0275pipeBind1(21,14,"PG_HOME_TEXT_TOKEN_INVALID_TEXT_P4"),t.\u0275\u0275sanitizeHtml),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!n.isOffline)}}function ot(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"span"),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(4);t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" (cod. ",null==n.httpErrorResonse?null:n.httpErrorResonse.status,") ")}}function it(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"ion-text",64)(2,"p"),t.\u0275\u0275text(3),t.\u0275\u0275pipe(4,"translate"),t.\u0275\u0275template(5,ot,2,1,"span",2),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(6,"p"),t.\u0275\u0275text(7),t.\u0275\u0275pipe(8,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(9,"span")(10,"a",65),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(3);return t.\u0275\u0275resetView(r.showToastModalErroCodeZero.openModalCodeZero())}),t.\u0275\u0275text(11),t.\u0275\u0275pipe(12,"translate"),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(13),t.\u0275\u0275pipe(14,"translate"),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()}if(2&o){const n=t.\u0275\u0275nextContext(3);t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(4,5,"TOAST_MESSAGE_CODE_ZERO_TITLE")," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",0===(null==n.httpErrorResonse?null:n.httpErrorResonse.status)),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(8,7,"TOAST_MESSAGE_CODE_ZERO")),t.\u0275\u0275advance(4),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(12,9,"TOAST_MESSAGE_CODE_ZERO_ACTION")," "),t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(14,11,"TOAST_MESSAGE_CODE_ZERO_MESSAGE"),". ")}}function rt(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"span"),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext(4);let i;t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" (cod. ",(null==n.httpErrorResonse?null:n.httpErrorResonse.status)||(null==(i=n.httpErrorResonse)?null:i.codeError),") ")}}function at(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275text(1),t.\u0275\u0275pipe(2,"translate"),t.\u0275\u0275template(3,rt,2,1,"span",2),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(3);let i;t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(2,2,"TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE")," "),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",(null==n.httpErrorResonse?null:n.httpErrorResonse.status)||(null==(i=n.httpErrorResonse)?null:i.codeError))}}function st(o,P){if(1&o){const n=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",62)(1,"button",63),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(n);const r=t.\u0275\u0275nextContext(3);return t.\u0275\u0275resetView(r.onRestart(!1))}),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()()}2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate1(" ",t.\u0275\u0275pipeBind1(3,1,"PG_HOME_BTN_RETRY_AGAIN")," "))}function ct(o,P){1&o&&(t.\u0275\u0275elementStart(0,"div",62)(1,"p"),t.\u0275\u0275text(2),t.\u0275\u0275pipe(3,"translate"),t.\u0275\u0275elementEnd()()),2&o&&(t.\u0275\u0275advance(2),t.\u0275\u0275textInterpolate(t.\u0275\u0275pipeBind1(3,1,"COMPONENT_OFFLINE_TEXT_NO_INTERNT_CONNECTION_SIMPLE")))}function lt(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",50)(2,"div",51)(3,"div",52),t.\u0275\u0275template(4,it,15,13,"ng-container",2),t.\u0275\u0275template(5,at,4,4,"ng-container",2),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(6,st,4,3,"div",61),t.\u0275\u0275template(7,ct,4,3,"div",61),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",n.httpErrorResonse&&0===(null==n.httpErrorResonse?null:n.httpErrorResonse.status)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.httpErrorResonse&&0!==(null==n.httpErrorResonse?null:n.httpErrorResonse.status)),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.isOffline),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.isOffline)}}function dt(o,P){if(1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275template(1,nt,23,16,"ng-container",2),t.\u0275\u0275template(2,lt,8,4,"ng-container",2),t.\u0275\u0275elementContainerEnd()),2&o){const n=t.\u0275\u0275nextContext();let i;t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",n.isExpiredSabugo&&n.isOffline),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!n.isOffline&&n.startError&&((null==n.httpErrorResonse?null:n.httpErrorResonse.error)||(null==(i=n.httpErrorResonse)?null:i.codeError)))}}function _t(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",44),t.\u0275\u0275element(1,"app-countdown",45),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("qrCodeValidityCountDown",n.qrCodeValidityCountDown)("duration",n.qrCodeValidityIntervalInSeconds)("paused",n.pausedCountdown)("hasBanner",n.hasBannerLogLoad)("displayCircularCountdown",n.displayCircularCountdown)}}function gt(o,P){if(1&o&&(t.\u0275\u0275elementStart(0,"div",66),t.\u0275\u0275element(1,"ngx-qrcode",67),t.\u0275\u0275elementEnd()),2&o){const n=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("margin",1)("value",n.qrCode)}}function mt(o,P){1&o&&(t.\u0275\u0275elementContainerStart(0),t.\u0275\u0275elementStart(1,"div",66)(2,"div",68),t.\u0275\u0275element(3,"ion-skeleton-text",69),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementContainerEnd())}const pt=function(o,P){return{filter:o,height:P}},ut=function(o){return{"small-qr":o}};let ft=(()=>{class o{constructor(n,i,r,_,u,M,N,q,H,he,Se,Ie,je,We,ze,Ke,ht,vt,Ct,Pt,Ot,St,Et,Mt,yt,It,Tt,xt,bt,wt,Rt,Lt,At,Nt,Dt,kt,Vt,Ft,Bt,Gt,Ut,Ht,jt){var l=this;this.menuController=n,this.insomniaService=i,this.storageService=r,this.screenBrightnessService=_,this.authService=u,this.apiService=M,this.qrCodeService=N,this.ngZoneService=q,this.loadingService=H,this.navController=he,this.notificatorService=Se,this.deviceInfo=Ie,this.navigationService=je,this.platform=We,this.resumeToPinService=ze,this.resumeToGenerateQRCode=Ke,this.profileManagerService=ht,this.modalController=vt,this.logService=Ct,this.toastController=Pt,this.geolocationService=Ot,this.modalPermissionsService=St,this.badgeStoreService=Et,this.networkService=Mt,this.loaderService=yt,this.timeSettingsService=It,this.resumeCreateEventInterruptedService=Tt,this.translateConfigService=xt,this.eventInstantService=bt,this.createEventService=wt,this.fcmService=Rt,this.sessionAddFlowService=Lt,this.activatedRoute=At,this.focusService=Nt,this.checkInverColorService=Dt,this.managerTokenUaamobile=kt,this.managerSabugo=Vt,this.nativeSettings=Ft,this.helpDevDiagnosticService=Bt,this.showToastModalErroCodeZero=Gt,this.router=Ut,this.stateService=Ht,this.domSanitizer=jt,this.displayCircularCountdown=!0,this.isOffline=!1,this.startError=null,this.isExpiredSabugo=!1,this.finishrequestStartVOProfiles=!1,this.voProfiles=[],this.lgProfiles=[],this.inviteButtonDisable=!1,this.isAutomaticTimeEnabled=!0,this.hasBannerLogLoad=!1,this.urlIFrame="",this.safeUrlIFrame=this.domSanitizer.bypassSecurityTrustResourceUrl(""),this.subscriptions=[],this.portais=De.n.portalParams.portais,this.creatinigEvent=!1,this.timeoutNotification=5e3,this.stopTimeout=!0,this.durationLong=15e3,this.resizeListener=null,this.CONFIG_KEY="notificationConfigApplied",this.retryTimeoutId=null,this.retryCount=0,this.MAX_RETRIES=8,this.onGoToCreateEvent=(0,e.Z)(function*(){if(l.sessionAddFlowService.clearSessionId(),l.creatinigEvent=!0,l.resumeCreateEvent())return;l.loadingService.show(l.translateConfigService.translate("LOADING_CHECKING_DATA"),"on-create-event"),l.inviteButtonDisable=!0;const C=yield l.authService.getToken();if(C){const K=l.apiService.getUserProfiles(l.portais,C).pipe((0,se.x)(()=>{l.loadingService.hide(0,"on-create-event")})).subscribe(l.processGetVOAndLGUserProfilesSuccessResponse,G=>(l.inviteButtonDisable=!1,l.processGetVOAndLGUserProfilesErrorResponse(G)));l.subscriptions.push(K)}else l.handleErroTokenOnCrateEventAction()}),this.onGoToInsertCompanyInviteCode=()=>{this.navigationService.forward(["/insert-company-invite-code"],{})},this.startQRCodeGenerateResumeService=()=>{this.resumeToGenerateQRCode.start(this.viewGuardCallback)},this.startViewGuardService=()=>{this.resumeToPinService.start()},this.viewGuardCallback=()=>{this.platform.ready().then(()=>{this.setBrightnessToMax(),this.dontFallAsleep(),this.restartEncryptionService()}).catch(()=>{}).finally(()=>{const x=this.profileManagerService.getProfileList();!this.isOffline&&!x?.length&&this.getVoAndLgProfiles()})},this.verifyIfSignUpProcedureRemainsCompanyInvitationData=(0,e.Z)(function*(){l.storageService.get("company-invitation-data").then(x=>{x&&x?.locator&&x?.invitationKey&&(l.goToAcceptCompanyInvitePage(x.locator,x.invitationKey),l.storageService.remove("company-invitation-data"))})}),this.goToAcceptCompanyInvitePage=(x,C)=>{this.navigationService.forward(["/deep"],{queryParams:{l:x,k:C,origin:"SIGNUP"}})},this.processGetVOUserProfilesSuccessResponse=x=>{this.voProfiles=x&&x?.length>0?x.filter(C=>"VO"===C?.portal):[],this.lgProfiles=x&&x?.length>0?x.filter(C=>"LG"===C?.portal):[],localStorage.setItem("firstRequestGetProfile",JSON.stringify(!0)),this.profileManagerService.setProfileList(this.voProfiles),this.profileManagerService.setProfileLogisticList(this.lgProfiles)},this.unregisterDevice=()=>{this.logService.logEvent("unregisterDevice::function"),this.authService.unregister().then(()=>this.navController.navigateRoot(["start"])).then(()=>{this.hideLoadingAll("Home::unregisterDevice"),this.logService.logEvent("unregisterDevice::goneToStartPage");const x=this.translateConfigService.translate("PG_HOME_TOAST_DEVICE_UNREGISTERED_TITLE"),C=this.translateConfigService.translate("PG_HOME_TOAST_DEVICE_UNREGISTERED_MESSAGE");this.showNotification(x,C,"error",1e4)}).catch(x=>{this.logService.logError("unregisterDevice::error","",x)}).finally(()=>{this.stopAllIntervals("Home::unregisterDevice"),localStorage.removeItem("store_current_config"),localStorage.removeItem("firstRequestGetProfile"),localStorage.removeItem("basePlatformUrl"),this.fcmService.deleteTokenFcm(),ce.g.removeAllListeners().then(()=>{})})},this.onStartError=function(){var x=(0,e.Z)(function*(C){l.loadingService.hide(0,"start"),l.finishrequestStartVOProfiles=!0;const K=yield l.authService.isExpiredSabugo(),G=yield l.authService.isExpiredToken(),ve=C?.codeError??null,me={...C,isExpiredSabugo:K,tokenIsExpired:G,timeOutRequest:ve};K&&(l.isExpiredSabugo=K,l.setStartError(!0),l.stopCountdown(),l.clearQRCodeData(),l.stopAllIntervals("Home::onStartError"),l.authService.clearSabugo()),C&&C?.status&&401===C?.status&&(l.logService.logEvent("onStartError::status_code_401",C.message?C.message:"",me),("error.account.not-found"===C?.error?.message||"error.account.not-activated"===C?.error?.message)&&(l.logService.logEvent("onStartError::unregisterDevice()",C.error.message?C.error.message:"",me),l.unregisterDevice())),l.isOffline||(C instanceof L.HttpErrorResponse||me)&&(l.stopCountdown(),l.clearQRCodeData(),l.ngZoneService.run(()=>{l.httpErrorResonse=C??me,l.isExpiredSabugo=K,l.setStartError(!0)})),l.logService.logError("onStartError::error","",me),l.stopServices()});return function(C){return x.apply(this,arguments)}}(),this.setStartError=x=>{this.ngZoneService.run(()=>{this.startError=x})},this.getSabugoError=function(){var x=(0,e.Z)(function*(C){l.logService.logError("getSabugoError::error","",C),C&&C instanceof L.HttpErrorResponse&&401===C?.status?l.managerTokenUaamobile.getNewToken().then(()=>l.start()):l.onStartError(C)});return function(C){return x.apply(this,arguments)}}(),this.setBrightnessToMax=()=>{this.screenBrightnessService.setMax()},this.restoreBrightness=()=>{this.screenBrightnessService.restoreBrightness()},this.dontFallAsleep=()=>{this.insomniaService.keepAwake().then(this.dontFallAsleepSuccessResponse).catch(this.dontFallAsleepErrorResponse)},this.allowItToRest=()=>{this.insomniaService.allowSleepAgain().then(this.allowItToRestSuccessResponse).catch(this.allowItToRestErrorResponse)},this.allowItToRestSuccessResponse=()=>{},this.allowItToRestErrorResponse=()=>{},this.dontFallAsleepSuccessResponse=()=>{},this.dontFallAsleepErrorResponse=x=>{this.logService.logError("insomnia::dontFallAsleepErrorResponse","",x)},this.restartEncryptionService=()=>{this.restartCountdown(),this.startEncryptionService()},this.startEncryptionService=(0,e.Z)(function*(){l.loadingService.hide(0,"start");try{const x=yield l.encrypt();if(x&&x?.success)return l.startCountdown()}catch(x){l.handleEncryptError(x)}}),this.stopCountdown=()=>{this.pauseCountdown(),this.countdownSetIntervalId&&(clearInterval(this.countdownSetIntervalId),this.countdownSetIntervalId=0)},this.handleEncryptError=x=>{this.logService.logError("handleEncryptError","Erro encrypt QR",{response:x}),this.stopCountdown(),this.clearQRCodeData()},this.restartCountdown=()=>{this.stopCountdown(),this.qrCodeValidityCountDown=this.qrCodeValidityIntervalInSeconds},this.stopSabugoWatcher=()=>{this.sabugoWatcherIntervalId&&(clearInterval(this.sabugoWatcherIntervalId),this.sabugoWatcherIntervalId=null)},this.clearQRCodeData=()=>{this.ngZoneService.run(()=>{this.qrCode=null})},this.unPauseCountdown=()=>{this.ngZoneService.run(()=>{this.pausedCountdown=!1})},this.pauseCountdown=()=>{this.ngZoneService.run(()=>{this.pausedCountdown=!0})},this.processGetVOAndLGUserProfilesSuccessResponse=function(){var x=(0,e.Z)(function*(C){l.profileManagerService.setProfileList(C),l.updateRequestProfileAtTimestamp(),l.loadingService.hide(0,"on-create-event"),l.voProfiles=C&&C?.length>0?C.filter(G=>"VO"===G?.portal):[],l.lgProfiles=C&&C?.length>0?C.filter(G=>"LG"===G?.portal):[],l.profileManagerService.setProfileList(l.voProfiles),l.profileManagerService.setProfileLogisticList(l.lgProfiles);const K=l.resumeCreateEventInterruptedService.getResumeCreationInterrupted();K?.logistic?.eventType||K?.vo?l.inviteButtonDisable=!1:l.OpenModaltoselectGoodProfiles()});return function(C){return x.apply(this,arguments)}}(),this.selectProfileModalVOOnProfileSelectCreateEventCallback=function(){var x=(0,e.Z)(function*(C){if(l.inviteButtonDisable=!0,l.setProfileCurrentCorrect(C),l.profileManagerService.setProfile(C),l.profileManagerService.isExpeditionProfile(C)){const G=["ENTRY","CLONE_EXIT","EXIT","CLONE_ENTRY"];(l.profileManagerService.isCollaboratorProfile(C)||l.profileManagerService.isLimited2Profile(C))&&G.push("CONVENTIONAL");const ve=yield l.modalController.create({component:Ee.Ut,componentProps:{availableTypes:G},backdropDismiss:!1});ve.onDidDismiss().then(me=>{l.inviteButtonDisable=!1,me.data&&("CONVENTIONAL"!==me.data.type&&l.openPermissionModal(C,me),"CONVENTIONAL"===me.data.type&&(l.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(C),l.showModalSelectEventInstantOrDefault().then(Ge=>{if(!Ge.close||Ge.typeEvent){if(Ge&&"instant"===Ge.typeEvent)return void l.eventInstantService.createEventVO().then(Ze=>Ze).catch().finally(()=>{l.sessionAddFlowService.clearSessionId(),l.inviteButtonDisable=!1});l.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}})}}),l.inviteButtonDisable=!1,l.creatinigEvent=!1))}),yield ve.present()}else l.profileManagerService.setProfile(C),l.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(C),l.loadingService.hide(0,"on-create-event"),l.creatinigEvent=!1,l.showModalSelectEventInstantOrDefault().then(G=>{if(l.inviteButtonDisable=!1,!G.close||G.typeEvent){if(G&&"instant"===G.typeEvent)return void l.eventInstantService.createEventVO().then(ve=>ve).catch().finally(()=>{l.sessionAddFlowService.clearSessionId(),l.inviteButtonDisable=!1});l.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}}),l.creatinigEvent=!1}}).catch(()=>{l.inviteButtonDisable=!1,l.navigationService.forward(["/create-event-event-name-step"],{state:{event:null,action:"create"}}),l.creatinigEvent=!1}).finally(()=>l.inviteButtonDisable=!1)});return function(C){return x.apply(this,arguments)}}(),this.selectProfileModalVOOnBackCreateEventCallback=()=>{},this.handleVerifyCoordinatesSuccessResponse=function(){var x=(0,e.Z)(function*(C,K){if(l.profileManagerService.getProfile(),C.authorized)"NEW_ENTRY"===K.data.type?l.navigationService.forward(["/logistic-events/create/event-name"],{state:{action:"create",eventType:"ENTRY",event:null}}):"CLONE_EXIT"===K.data.type?l.navigationService.forward(["/logistic-events/entrance"]):"NEW_EXIT"===K.data.type?l.navigationService.forward(["/logistic-events/create/event-name"],{state:{action:"create",eventType:"EXIT",event:null}}):"CLONE_ENTRY"===K.data.type&&l.navigationService.forward(["/logistic-events/exit"]),l.inviteButtonDisable=!1,l.creatinigEvent=!1;else{l.inviteButtonDisable=!1,l.creatinigEvent=!1;const G=yield l.modalController.create({component:B.NO});G.onDidDismiss().then(()=>{}),yield G.present()}});return function(C,K){return x.apply(this,arguments)}}(),this.handleVerifyCoordinatesErrorResponse=x=>{this.logService.logError("http::handleVerifyCoordinatesErrorResponse","",x);const C=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_CHECKING_LOCATION_TITLE"),K=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_CHECKING_LOCATION");this.showNotification(C,K,"error",this.timeoutNotification)},this.updateRequestProfileAtTimestamp=()=>this.storageService.set("requestProfileListMenu",Date.now()),this.isAndroid="android"===ee.dV.getPlatform(),this.qrCodeValidityIntervalInSeconds=40,this.qrCodeValidityCountDown=this.qrCodeValidityIntervalInSeconds,this.ngZoneService.run(()=>{this.pausedCountdown=!0}),this.isSmallScreen=this.deviceInfo.isSmallScreen(),this.isUltraSmallScreen=this.deviceInfo.isUltraSmallScreen(),this.isMediumSmallScreen=this.deviceInfo.isMediumSmallScreen(),this.updateCountdownDisplayMode(),this.key=new Uint8Array([247,52,131,225,116,25,132,135,230,221,27,98,127,174,130,2]),this.setStartError(null),this.onResumeActiveApp(),this.checkAutomaticTimeZone()}get deviceHeight(){return window?.innerHeight?`${window?.innerHeight}px`:"100vh"}clearTempStorage(){this.storageService.remove("checkinDataApp"),localStorage.removeItem("checkinData"),this.storageService.remove("wallet_qrcodes")}ionViewWillEnter(){var n=this;return(0,e.Z)(function*(){try{yield n.managerTokenUaamobile.initStartGetTokenUaaMobile()}catch(i){return void n.onStartError(i)}finally{n.start().then((0,e.Z)(function*(){yield n.authService.updateLastAccessAt(),n.startViewGuardService(),n.startQRCodeGenerateResumeService()})).finally((0,e.Z)(function*(){n.loaderService.hide(),n.platform.ready().then(()=>{setTimeout((0,e.Z)(function*(){n.setBrightnessToMax(),n.dontFallAsleep(),n.platformIsResume&&(n.start(),n.platformIsResume=!1),yield n.checkInvertedColor()}),500)})}))}})()}ionViewDidEnter(){var n=this;return(0,e.Z)(function*(){n.focusService.applyFocusQuerySelector("btnInviteHome",2e3),n.getDateParams()})()}ionViewWillLeave(){this.platformIsResume=!1,this.loaderService.hide(),this.stopCountdown(),this.cancelRetry(),this.allowItToRest(),this.restoreBrightness(),this.hideLoadingAll("ionViewWillLeave"),this.subscriptions.forEach(n=>n?.unsubscribe),this.toastController.getTop().then(n=>{n&&(n.dismiss(),this.toastShowFcm=!1)})}ngOnInit(){var n=this;return(0,e.Z)(function*(){n.menuController.enable(!0),"android"===ee.dV.getPlatform()&&Te.M.setBackgroundColor({color:"#6CB52D"}),n.iframeHeight=n.deviceInfo.getIframeHeightStyle(),console.log("iframeHeight",n.iframeHeight),n.updateCountdownDisplayMode(),n.addResizeListener();const i=n.translateConfigService.translate("PG_HOME_LOADING_GENERATINGQRCODE");n.loaderService.show(i);const r=n.stateService.getState().subscribe(function(){var _=(0,e.Z)(function*(u){n.ngZoneService.run(()=>{if(u.status===de.Q.Online){if(n.loaderService.hide(),n.isOffline){n.isOffline=!1,n.onRestart(),n.loaderService.hide();const M=n.logService.sendLogs().pipe((0,J.q)(1)).subscribe();n.subscriptions.push(M)}}else u.status===de.Q.Offline&&(n.loaderService.hide(),n.isOffline=!0)}),n.hasBannerLog()});return function(u){return _.apply(this,arguments)}}());n.subscriptions.push(r)})()}ngOnDestroy(){this.subscriptions.forEach(n=>n.unsubscribe()),this.stopAllIntervals("Home::OnDestroy"),this.cancelRetry(),this.subscribeToPauseEventAndHandleActivityIOs(),this.removeResizeListener()}stopAllIntervals(n){this.stopCountdown(),this.stopSabugoWatcher(),this.managerTokenUaamobile.stopTokenWatcher(),console.log("stopAllIntervals",n)}get thereAreProfiles(){return this.voProfiles.length>0||this.lgProfiles.length>0}openSettingTime(){this.platform.is("cordova")?this.timeSettingsService.open().then(n=>n).catch(n=>n):console.warn("Por favor, rode no emulador.")}onRestart(){var n=this;return(0,e.Z)(function*(i=!0){if(n.stopTimeout=!1,!(yield n.isAuthenticated()))return void n.stopServices();const _=n.translateConfigService.translate("PG_HOME_LOADING_UPDATING_DATA"),u=n.translateConfigService.translate("PG_HOME_LOADING_CHECKING_NEW_CONNECTION");n.loaderService.show(i?u:_,2e3);let M=yield n.authService.isExpiredSabugo();M&&(n.managerTokenUaamobile.stopTokenWatcher(),n.stopSabugoWatcher(),n.pauseCountdown(),n.stopCountdown(),n.restartCountdown(),n.clearQRCodeData()),n.loadingService.hide(0,"onrestart"),n.hideLoadingAll("wait-newtork"),n.ngZoneService.run((0,e.Z)(function*(){try{const N=yield n.managerTokenUaamobile.restartGetToken();N&&!N?.error&&(yield n.managerSabugo.getSabugo(),M=yield n.authService.isExpiredSabugo()),n.isExpiredSabugo=M,(n.httpErrorResonse?.error||n.httpErrorResonse?.codeError)&&n.start().then(()=>{n.httpErrorResonse=null,n.isExpiredSabugo=M,n.setStartError(null),n.stopCountdown(),n.qrCodeValidityCountDown=40,n.startCountdown(),n.hideLoadingAll("wait-newtork"),n.loadingService.hide(0,"onrestart")}).finally(()=>{n.loadingService.hide(0,"onrestart"),n.hideLoadingAll("wait-newtork"),n.loaderService.hide()})}catch(N){n.loadingService.hide(0,"onrestart"),n.loaderService.hide(),n.setStartError(!0),(N instanceof L.HttpErrorResponse||N.codeError)&&(n.ngZoneService.run(()=>{n.httpErrorResonse=N,n.isExpiredSabugo=M}),n.pooling(!0,1e4),n.loaderService.hide())}})).catch(()=>{n.loaderService.hide(),n.loadingService.hide(0,"onrestart"),n.hideLoadingAll("wait-newtork")}).finally(()=>{n.loaderService.hide(),n.hideLoadingAll("wait-newtork"),n.loadingService.hide(0,"onrestart")}),n.loadingService.hide(0,"onrestart"),n.loaderService.hide()}).apply(this,arguments)}start(){var n=this;return(0,e.Z)(function*(){if(yield n.authService.isAuthenticated()){n.qrCodeService.init(n.key);try{if(!(yield n.storageService.startStorage()))throw"storage not avaliable";return n.starInitSabugo()}catch(r){return void(n.isOffline||n.onStartError(r))}finally{n.loaderService.hide(),n.loadingService.hide(0,"start"),n.verifyIfSignUpProcedureRemainsCompanyInvitationData();const r=setTimeout(()=>{n.isOffline||ee.dV.isNativePlatform()&&(n.getUserNotificationPermission(),clearTimeout(r)),n.firstRequestGetProfiles(),n.pendingsReleasesExists(),n.loadConfigNotificationDefault()},1200)}}})()}starInitSabugo(){var n=this;return(0,e.Z)(function*(){if(yield n.authService.isExpiredToken())try{if(!n.isOffline){const _=yield n.managerTokenUaamobile.initStartGetTokenUaaMobile();if(_?.codeError||_ instanceof L.HttpErrorResponse)throw _}const r=yield n.managerSabugo.getSabugo();return n.sabugo=r,n.watchSabugo(),n.managerTokenUaamobile.watchToken(),r&&n.startEncryptionService(),r}catch(r){n.isOffline||n.onStartError(r)}else try{const r=yield n.managerSabugo.getSabugo();return n.sabugo=r,n.watchSabugo(),n.managerTokenUaamobile.watchToken(),r&&n.startEncryptionService(),r}catch(r){n.isOffline||n.onStartError(r)}})()}getVoAndLgProfiles(){var n=this;return(0,e.Z)(function*(){try{const i=yield n.apiService.getUserProfiles(n.portais,n.tokenLogin).toPromise();return n.processGetVOUserProfilesSuccessResponse(i)}catch(i){return n.processGetVOUserProfilesErrorResponse(i)}finally{n.finishrequestStartVOProfiles=!0,n.loaderService.hide(),n.loadingService.hide(0,"wait-newtork")}})()}processGetVOUserProfilesErrorResponse(n){return this.logService.logError("processGetVOUserProfilesErrorResponse","",{error:n}),n}getProfilesAbleToCreateEvent(n){return this.profileManagerService.getProfilesAbleToCreateEvent(n,!0)}startCountdown(){var n=this;this.restartCountdown(),this.countdownSetIntervalId=Number(setInterval(()=>{this.ngZoneService.run((0,e.Z)(function*(){if(n.qrCodeValidityCountDown--,!n.qrCodeValidityCountDown){n.stopCountdown();try{const r=yield n.encrypt();if(r&&r?.success)return n.startCountdown()}catch(r){return n.handleEncryptError(r)}}}))},1e3)),this.unPauseCountdown()}encrypt(){var n=this;return(0,e.Z)(function*(){const i={data:{message:"Encryption failed: QR code is null or undefined",error:!0}};try{const r=yield n.qrCodeService.encrypt(n.sabugo,n.qrCodeValidityIntervalInSeconds,n.authService.getPlatformAndAppTimeDifference());return n.ngZoneService.run(()=>{n.qrCode=btoa(String.fromCharCode.apply(null,r))}),n.qrCode?{error:null,success:!0}:{error:i,success:!1}}catch(r){return n.logService.logError("encrypt::error",`${i.data.message}`,{error:r}),{error:i,success:!1}}})()}watchSabugo(){var n=this;return(0,e.Z)(function*(){const i=yield n.isAuthenticated();if(!i)return void(n.sabugoWatcherIntervalId&&clearInterval(n.sabugoWatcherIntervalId));const _=1e3*(yield n.authService.getSabugoValitTimeInSeconds());return n.sabugoWatcherIntervalId=setInterval(()=>{n.stopSabugoWatcher(),n.stopCountdown(),n.restartCountdown(),n.clearQRCodeData(),i?n.updateSabugo().then(()=>{n.loadingService.hide(0,"watch-sabugo-update-sabugo"),n.startEncryptionService(),n.watchSabugo()}).catch(u=>{n.loadingService.hide(0,"watch-sabugo-update-sabugo"),n.managerTokenUaamobile.stopTokenWatcher(),n.getSabugoError(u)}):n.sabugoWatcherIntervalId&&clearInterval(n.sabugoWatcherIntervalId)},_),n.sabugoWatcherIntervalId})()}updateSabugo(){const n=this.translateConfigService.translate("PG_HOME_LOADING_UPDATING_DATA");return this.loaderService.show(n),this.managerSabugo.getSabugo().then(i=>(this.sabugo=i,this.authService.setSabugo(i))).finally(()=>{this.loaderService.hide()})}processGetVOAndLGUserProfilesErrorResponse(n){this.logService.logError("http::getVOAndLGUserProfiles","",n),this.inviteButtonDisable=!1,this.loadingService.hide(0,"on-create-event");const i=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_REQUEST_TITLE"),r=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_REQUEST");this.showNotification(i,r,"error",this.timeoutNotification)}getCompanyInstanceRelatedAccessToken(n,i="VO"){return new Promise((r,_)=>{this.authService.getToken().then(u=>{const M=this.apiService.getUserProfiles(i,u).subscribe(N=>{const H=N.find(he=>he?.company?.instanceName===n);if(H&&H?.login&&H?.portal){const he=this.apiService.getUserProfileLogin(H.login,H.portal,u).subscribe(Se=>{const Ie=Se?.access_token;Ie?(this.inviteButtonDisable=!1,r(Ie)):(_("Does not have desired profile"),this.logService.logError("getUserProfileLogin","Does not have desired profile",{accessToken:null}))},Se=>{_(Se)});this.subscriptions.push(he)}else _("Does not have desired profile"),this.logService.logError("getUserProfileLogin","Does not have desired profile",{foundProfile:null})},N=>{this.logService.logError("http::processGetCompanyInstanceRelatedLoginErrorResponse","",N),_(N)});this.subscriptions.push(M)})})}pendingsReleasesExists(){this.badgeStoreService.initialize()}OpenModaltoselectGoodProfiles(){var n=this;return(0,e.Z)(function*(){const i=[...n.voProfiles,...n.lgProfiles];let{limitedProfile:r,profiles:_}=n.getProfilesAbleToCreateEvent(i);if(_=_.filter((u,M,N)=>M===N.findIndex(q=>q?.company?.instanceName===u?.company?.instanceName)),r||(n.voProfiles.length>=1||n.lgProfiles.length>=1)&&0===_.length)n.loadingService.hide(0,"on-create-event").then(()=>{n.inviteButtonDisable=!1,n.cantCreateEvent()});else if(_&&_.length>1){const u=yield n.modalController.create({component:B.w9,backdropDismiss:!1,componentProps:{profiles:_}});u.onDidDismiss().then(M=>{n.inviteButtonDisable=!1,M.data?n.selectProfileModalVOOnProfileSelectCreateEventCallback(M.data):n.selectProfileModalVOOnBackCreateEventCallback()}),yield u.present()}else if(_[0])n.selectProfileModalVOOnProfileSelectCreateEventCallback(_[0]);else{n.loadingService.hide(0,"on-create-event"),n.inviteButtonDisable=!1;const u=n.translateConfigService.translate("PG_HOME_TOAST_NO_ACCESS_PROFILE_TITLE"),M=n.translateConfigService.translate("PG_HOME_TOAST_NO_ACCESS_PROFILE_MESSAGE");n.showNotification(u,M,"error",n.timeoutNotification)}})()}handleErroTokenOnCrateEventAction(){this.logService.logError("handleErroTokenOnCrateEventAction","erro get token profile")}firstRequestGetProfiles(){var n=this;return(0,e.Z)(function*(){n.tokenLogin=yield n.managerTokenUaamobile.initStartGetTokenUaaMobile();const r=localStorage.getItem("firstRequestGetProfile")||null,_=n.profileManagerService.getProfileList();n.setProfileOnlyOne(),!r||_.length<=0?(yield n.getVoAndLgProfiles(),n.inviteButtonDisable=!1):(n.voProfiles=_,n.finishrequestStartVOProfiles=!0)})()}onResumeActiveApp(){var n=this;return(0,e.Z)(function*(){!(yield n.authService.isAuthenticated())||ce.g.addListener("appStateChange",r=>{r.isActive?n.ngZoneService.run(()=>{n.handleResumeState(r)}):n.creatinigEvent||n.ngZoneService.run(()=>{n.handlePauseActivity()})})})()}checkAutomaticTimeZone(){this.platform.is("cordova")||this.platform.is("capacitor")?this.platform.ready().then(()=>{this.isAndroid?this.timeSettingsService.checkAutomaticTime().then(n=>{this.isAutomaticTimeEnabled="true"==n}).catch(n=>{n&&console.warn("Erro plugin checkAutomaticTime ",n)}):this.isAutomaticTimeEnabled=!0}):console.log("Run in browser")}resumeCreateEvent(n){let i=!1;const{logistic:r,vo:_,action:u,event:M}=this.resumeCreateEventInterruptedService.getResumeCreationInterrupted();let N=null;return""!==r.eventType||r.eventType.length>1?N="LOGISTIC":(""===r.eventType||!r.eventType)&&(N="VO"),this.resumeCreateEventInterruptedService.showModalResumeCreateEventInterrupted({target:N,eventType:n||"",canCreateEvent:!0,action:u,event:{id:M?.id?M.id:"",instanceName:M?.instanceName?M?.instanceName:""}}),this.inviteButtonDisable=!1,(""!==r.eventType||r.eventType.length>1||_)&&(i=!0),i}setProfileCurrentCorrect(n){n?.authorities.includes("ROLE_LOGI_EXP")?(this.profileManagerService.setProfileLogistic(n),this.profileManagerService.setProfile(n),this.resumeCreateEventInterruptedService.setProfileLogisticCreationInterrupte(n)):(this.profileManagerService.setProfile(n),this.resumeCreateEventInterruptedService.setProfileVoCreationInterrupte(n))}setProfileOnlyOne(){const n=this.profileManagerService.getProfileList();n&&n.length>0&&1===n.length&&this.setProfileCurrentCorrect(n[0])}showModalSelectEventInstantOrDefault(){var n=this;return(0,e.Z)(function*(){const i=yield n.modalController.create({component:le.US,cssClass:"event-instant-",componentProps:{}});yield i.present();try{const{data:r}=yield i.onDidDismiss();if(!r)return{close:!0,typeEvent:null};if(r&&r&&r.typeEvent)return"instant"===r.typeEvent&&{...r,close:!0}}catch{return!1}})()}showNotification(n,i,r,_=5e3){this.notificatorService.notify({title:n,message:i,type:r,timeout:_})}getGeoCoordinatesDevice(n,i){var r=this;return(0,e.Z)(function*(){const{lat:_,lng:u}=yield r.geoCoordinates(n,i);return{lat:_,lng:u}})()}geoCoordinates(n,i){var r=this;return(0,e.Z)(function*(){try{const _=yield r.geolocationService.getCurrentPositionAndRequestPermission();return{lat:_&&_.coords&&_.coords.latitude?_.coords.latitude:null,lng:_&&_.coords&&_.coords.longitude?_.coords.longitude:null}}catch(_){r.inviteButtonDisable=!1,r.loadingService.hide(0,i);const u=r.translateConfigService.translate("PG_HOME_TOAST_ERROR_GETTING_LOCATION_TITLE"),M=r.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GETTING_LOCATION");return r.showNotification(u,M,"error",r.timeoutNotification),r.logService.logError(n,"",_),_}})()}openPermissionModal(n,i){var r=this;return(0,e.Z)(function*(){const _=n.company.instanceName;try{const u=yield r.getAccessToken(_,n);try{const{authorized:M}=yield r.checkSoftLock(_,u);try{if(M||(yield r.modalPermissionsService.openModal({permission:"GPS"})))return r.inviteButtonDisable=!1,void(yield r.handlePermissionGranted(n,M,u,i));r.handlePermissionRejected()}catch{r.inviteButtonDisable=!1,r.handlePermissionRejected()}}catch(M){return r.logService.logError("http:error","checkSoftLock",{data:M}),r.handleVerifyCoordinatesErrorResponse(M)}}catch(u){r.handleAccessTokenError(u)}})()}handlePermissionGranted(n,i,r,_){var u=this;return(0,e.Z)(function*(){if(i)u.handleVerifyCoordinatesSuccessResponse({authorized:i},_);else try{yield u.geolocationService.getCurrentPositionAndRequestPermission();const{lat:M,lng:N}=yield u.getDeviceCoordinates();try{if(M&&N){u.createEventService.setGeoCoordinates({lat:M,lng:N,authorized:!1});const H=yield u.apiService.verifyCoordinates(n.company.instanceName,M,N,r).toPromise();H&&H.authorized&&u.createEventService.setGeoCoordinates(H),u.handleVerifyCoordinatesSuccessResponse(H,_)}}catch(q){return u.inviteButtonDisable=!1,u.creatinigEvent=!1,u.handleVerifyCoordinatesErrorResponse(q)}}catch(M){u.handleGeolocationError(M),u.inviteButtonDisable=!1,u.creatinigEvent=!1}})()}getAccessToken(n,i){var r=this;return(0,e.Z)(function*(){try{return yield r.getCompanyInstanceRelatedAccessToken(n,i.portal)}catch(_){r.logService.logError("http::getCompanyInstanceRelatedAccessToken","",_);const u=r.translateConfigService.translate("PG_HOME_TOAST_ERROR_GET_TOKEN_TITLE"),M=r.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GET_TOKEN");throw r.showNotification(u,M,"error",r.timeoutNotification),_}})()}getDeviceCoordinates(){var n=this;return(0,e.Z)(function*(){try{const{lat:i,lng:r}=yield n.getGeoCoordinatesDevice("geolocation::afterProfileSelection","on-create-event");return{lat:i,lng:r}}catch(i){throw i}})()}checkSoftLock(n,i){var r=this;return(0,e.Z)(function*(){try{const{authorized:_}=yield r.apiService.checkSoftLock(n,null,null,i).toPromise();return{authorized:_}}catch(_){throw _ instanceof L.HttpErrorResponse&&r.logService.logError("http::error","check Soft Lock Error Http",_),_}})()}handleGeolocationError(n){this.loadingService.hide(0,""),this.inviteButtonDisable=!1;let i="",r="";const _="denied"===n.coarseLocation||"denied"===n.location||"Location permission was denied"===n.message;_?(i=this.translateConfigService.translate("TOAST_LOCATION_PERMISSION_DENIED_TITLE"),r=this.translateConfigService.translate("TOAST_LOCATION_PERMISSION_DENIED_MESSAGE")):(i=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_GETTING_LOCATION_TITLE"),r=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GETTING_LOCATION")),this.showNotification(i,r,"error",_?1e4:this.timeoutNotification),this.logService.logError("device:getCurrentPositionAndRequestPermission",n)}handleAccessTokenError(n){this.logService.logError("http::getCompanyInstanceRelatedAccessToken","",n);const i=this.translateConfigService.translate("PG_HOME_TOAST_ERROR_GET_TOKEN_TITLE"),r=this.translateConfigService.translate("PG_HOME_TOAST_MESSAGE_ERROR_GET_TOKEN");this.showNotification(i,r,"error",this.timeoutNotification)}handlePermissionRejected(){this.inviteButtonDisable=!1,this.logService.logError("permissionModal::afterProfileSelectionPageHome","",{data:"modal-permission-rejected"})}getDateParams(){const n=this.activatedRoute?.queryParams.subscribe(i=>{i?.notResetSession||this.sessionAddFlowService.clearAndGenerateSessionId()});this.subscriptions.push(n)}cantCreateEvent(){var n=this;return(0,e.Z)(function*(){yield(yield n.modalController.create({component:le.AL,componentProps:{},cssClass:"can-create-modal"})).present()})()}checkInvertedColor(){var n=this;return(0,e.Z)(function*(){if(n.isAndroid)try{const i=yield n.checkInverColorService.isEnabled();n.invertColorIsEnabled=!!i}catch(i){n.invertColorIsEnabled=!1,n.logService.logError("error:invertColor","Erro in check device Is Colors Invert is Enable",i)}else n.invertColorIsEnabled=!1})()}isAuthenticated(){var n=this;return(0,e.Z)(function*(){const i=yield n.authService.getRefId();return(yield n.authService.isAuthenticated())&&i})()}stopServices(){var n=this;return(0,e.Z)(function*(){clearInterval(n.sabugoWatcherIntervalId),n.resumeToPinService.stop(),n.resumeToGenerateQRCode.stop(),n.managerTokenUaamobile.stopTokenWatcher(),n.stopSabugoWatcher(),n.stopTimeout=!1,n.pooling(!0,15e3),yield n.helpDevDiagnosticService.sendDiagnosticLogTron()})()}getUserNotificationPermission(){var n=this;return(0,e.Z)(function*(){const i=yield n.fcmService.checkPermissionsAndRequestPermission(),r="denied"===i?"userDenied":i;if("granted"!==r&&"prompt"!==r&&"prompt-with-rationale"!==r)return n.showToasNotificanPlugin(!0,r),n.fcmService.removeTokenStorage(),void n.logService.logError("checkPermissionsAndRequestPermission::error",`FCM status Permission ${r}`,"");"granted"===i&&(yield n.fcmService.getTokenFcm(),yield n.enabledPlugin())})()}showToasNotificanPlugin(n,i){var r=this;return(0,e.Z)(function*(){if(r.toastShowFcm)return;r.toastController.getTop().then(H=>{H&&H.dismiss()});let _="Permiss\xe3o necess\xe1ria!. Para remover as notifica\xe7\xf5es persistentes, \xe9 preciso liberar o acesso nas configura\xe7\xf5es.",u="Permitir";r.toastShowFcm=!0,n&&(r.fcmService.removeTokenStorage(),u=r.translateConfigService.translate("PG_HOME_TOAST_USER_DENIED_BTN_ADJUST"),"userDenied"===i?(_=r.translateConfigService.translate("PG_HOME_TOAST_USER_DENIED_MESSAGE"),r.logService.logEvent("grantPermission::permissionDenied")):_=r.translateConfigService.translate("PG_HOME_TOAST_ERROR_ENABLING_NOTIFICATIONS"));const M=yield r.toastController.create({header:"",message:_,position:"top",cssClass:"custom_toast_error_notification",color:"danger",duration:15e3,mode:"ios",buttons:[{text:u,handler:(H=(0,e.Z)(function*(){r.toastShowFcm=!1,n?(r.fcmService.deleteTokenFcm(),r.nativeSettings.openSetting(R.AppNotification,oe.Notifications)):yield r.requestPermissionActionNotificationListener()}),function(){return H.apply(this,arguments)})},{icon:"close-circle-sharp",role:"cancel",handler:()=>{M.dismiss(),r.toastShowFcm=!1}}]});var H;M.addEventListener("ionToastWillPresent",()=>r.applyStyles(M)),yield M.present();const{data:N,role:q}=yield M.onDidDismiss();(N||q)&&(r.toastShowFcm=!1)})()}applyStyles(n){const i=n?.shadowRoot?.querySelector(".toast-content");i&&(this.toastShowFcm=!0,i.style.padding="0.4em 1em")}pooling(n=!0,i=this.durationLong){this.stopTimeout||!this.httpErrorResonse||(clearTimeout(this.setTimeOut),n&&!this.stopTimeout&&(this.setTimeOut=setTimeout(()=>{this.onRestart(!1)},i)))}hideLoadingAll(n){this.loadingService.hide(0,"wait-newtork"),this.loadingService.hide(0,"onrestart"),this.loadingService.hide(0,"on-create-event"),this.loadingService.hide(0,"start"),this.loadingService.hide(0,"watch-sabugo-update-sabugo"),this.loadingService.hide(0,"watch-token-update-token")}subscribeToPauseEventAndHandleActivityIOs(){"ios"===ee.dV.getPlatform()&&this.platform.pause.subscribe(()=>{this.ngZoneService.run(()=>{this.handlePauseActivity()})})}handleResumeState(n){var i=this;this.httpErrorResonse=null,this.isExpiredSabugo=!1,this.qrCodeValidityCountDown=40,this.setStartError(null),this.stopCountdown(),this.startCountdown();const r=this.translateConfigService.translate("PG_HOME_LOADING_GENERATINGQRCODE");this.router.url.includes("/home")&&(this.viewGuardCallback(),this.loaderService.show(r)),this.setStartError(null),this.platformIsResume&&!this.creatinigEvent&&(this.platformIsResume=!1,this.start().then(u=>u).catch().finally((0,e.Z)(function*(){i.loaderService.hide(),i.isExpiredSabugo=yield i.authService.isExpiredSabugo(),setTimeout((0,e.Z)(function*(){i.networkService.initializeNetworkEvents(),i.loadingService.hide(0,"onrestart"),i.checkAutomaticTimeZone(),yield i.checkInvertedColor()}),900)})))}handlePauseActivity(){this.platformIsResume=!0,this.httpErrorResonse=null,this.setStartError(null),this.stopAllIntervals("Home::handlePauseActivity"),this.restartCountdown(),this.clearQRCodeData(),this.restoreBrightness(),this.allowItToRest(),this.isOffline||this.managerTokenUaamobile.initStartGetTokenUaaMobile().then(()=>{this.managerSabugo.getSabugo().then()})}enabledPlugin(){var n=this;return(0,e.Z)(function*(){try{yield pe.enablePlugin(),n.logService.logError("notification-plugin","Plugin habilitado com sucesso")}catch(i){n.logService.logError("notification-plugin","Falha ao habilitar o plugin de notifica\xe7\xf5es persistentes",i),n.showToasNotificanPlugin(!1,i)}finally{if("android"===ee.dV.getPlatform())try{if("granted"===(yield n.verfyPermissionListenerNotification())){n.logService.logEvent("notification-permission","Permiss\xe3o de notifica\xe7\xe3o persistente concedida");try{const r=yield pe.canUseFullScreenIntent();!r.canUse&&r.requiresPermission?n.logService.logWarning("full-screen-intent-permission","Permiss\xe3o de Full Screen Intent n\xe3o concedida (Android 12+)"):r.canUse&&n.logService.logEvent("full-screen-intent-permission","Permiss\xe3o de Full Screen Intent concedida")}catch(r){n.logService.logError("full-screen-intent-permission","Erro ao verificar permiss\xe3o de Full Screen Intent",r)}return}n.logService.logError("notification-permission","Permiss\xe3o de notifica\xe7\xe3o persistente negada"),n.showToasNotificanPlugin(!1,"denied")}catch(i){n.logService.logError("notification-permission","Erro ao verificar permiss\xe3o de notifica\xe7\xe3o persistente",i),n.showToasNotificanPlugin(!1,i)}}})()}verfyPermissionListenerNotification(){return(0,e.Z)(function*(){try{const{receive:n}=yield pe.checkPermissionActionNotificationListener();return n}catch(n){return console.log("error",n),n}})()}requestPermissionActionNotificationListener(){return(0,e.Z)(function*(){const{receive:n}=yield pe.requestPermissionActionNotificationListener();return n})()}loadConfigNotificationDefault(){var n=this;return(0,e.Z)(function*(){if("true"!==localStorage.getItem(n.CONFIG_KEY))try{const i=yield n.apiService.getNotificationsConfiguration().toPromise();if(!i?.defaultValue)return;n.trySetConfigNotificationDefault(i)}catch(i){n.logService.logError("http","get notification configuration home::"+i.message,i),n.retryUntilSuccess(5e3)}})()}trySetConfigNotificationDefault(n){n.activated=!0,n.persistent=!0,n.defaultValue=!1,this.apiService.updateNotificationsConfiguration(n).subscribe({next:i=>{console.log("\u2705 Configura\xe7\xe3o aplicada com sucesso:",i),localStorage.setItem(this.CONFIG_KEY,"true"),this.logService.logEvent("notification-configuration","Tentativa de aplicar configura\xe7\xe3o"),this.enabledPlugin()},error:i=>{this.logService.logError("http","update notification configuration home:: "+i.message,i),this.retryUntilSuccess(5e3)}})}cancelRetry(){null!==this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=null),this.retryCount=0}retryUntilSuccess(n){var i=this;this.retryTimeoutId=setTimeout((0,e.Z)(function*(){if(i.retryTimeoutId=null,"true"===localStorage.getItem(i.CONFIG_KEY))return;if(i.retryCount>=i.MAX_RETRIES)return void(i.retryCount=0);try{const u=yield i.apiService.getNotificationsConfiguration().toPromise();return u?.defaultValue?(i.trySetConfigNotificationDefault(u),void(i.retryCount=0)):void(i.retryCount=0)}catch(u){console.warn(`Tentativa falhou, tentando novamente em ${n/1e3}s...`,u)}i.retryCount++;const _=Math.min(2*n,3e5);i.retryUntilSuccess(_)}),n)}hasBannerLog(){(0,S.D)(this.authService.getRefId()).pipe((0,X.w)(n=>this.apiService.hasBannnerLog(n).pipe((0,j.b)(i=>{"LOG"===i.hasBanner&&i.bannerUrl&&this.ngZoneService.run(()=>{try{this.hasBannerLogLoad=!0,this.safeUrlIFrame=this.domSanitizer.bypassSecurityTrustResourceUrl(i.bannerUrl),this.updateCountdownDisplayMode()}catch(r){console.error("Erro ao sanitizar URL do iframe:",r),this.hasBannerLogLoad=!1}})}))),(0,J.q)(1),(0,Q.K)(n=>(0,Ce.of)(i=>{console.log("err",i)}))).subscribe()}updateIframeHeight(){this.iframeHeight=this.deviceInfo.getIframeHeightStyle(),this.updateCountdownDisplayMode()}updateCountdownDisplayMode(){if(this.isSmallScreen||this.isUltraSmallScreen)return void(this.displayCircularCountdown=!1);const r=this.deviceInfo.getAvailableHeight()+this.deviceInfo.getHeightToolbar();console.log("realAvailableHeight",r),this.displayCircularCountdown=this.hasBannerLogLoad?r>880:r>=700}addResizeListener(){this.resizeListener=()=>this.onWindowResize(),window.addEventListener("resize",this.resizeListener)}removeResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}onWindowResize(){this.deviceInfo.updateDeviceHeightFromWindow(),this.isSmallScreen=this.deviceInfo.isSmallScreen(),this.isUltraSmallScreen=this.deviceInfo.isUltraSmallScreen(),this.isMediumSmallScreen=this.deviceInfo.isMediumSmallScreen(),this.updateIframeHeight()}}return o.\u0275fac=function(n){return new(n||o)(t.\u0275\u0275directiveInject($.MenuController),t.\u0275\u0275directiveInject(A.gc),t.\u0275\u0275directiveInject(A.V1),t.\u0275\u0275directiveInject(A.ZP),t.\u0275\u0275directiveInject(A.e8),t.\u0275\u0275directiveInject(A.sM),t.\u0275\u0275directiveInject(A.gA),t.\u0275\u0275directiveInject(A.zf),t.\u0275\u0275directiveInject(A.bz),t.\u0275\u0275directiveInject($.NavController),t.\u0275\u0275directiveInject(A.V6),t.\u0275\u0275directiveInject(A.Hc),t.\u0275\u0275directiveInject(A.f5),t.\u0275\u0275directiveInject($.Platform),t.\u0275\u0275directiveInject(A.np),t.\u0275\u0275directiveInject(A.nu),t.\u0275\u0275directiveInject(A.v4),t.\u0275\u0275directiveInject($.ModalController),t.\u0275\u0275directiveInject(A.$V),t.\u0275\u0275directiveInject($.ToastController),t.\u0275\u0275directiveInject(A._1),t.\u0275\u0275directiveInject(A.JQ),t.\u0275\u0275directiveInject(A.h2),t.\u0275\u0275directiveInject(A.SL),t.\u0275\u0275directiveInject(A.D1),t.\u0275\u0275directiveInject(A.PV),t.\u0275\u0275directiveInject(A.NL),t.\u0275\u0275directiveInject(A.wK),t.\u0275\u0275directiveInject(A.xK),t.\u0275\u0275directiveInject(A.jc),t.\u0275\u0275directiveInject(xe.E),t.\u0275\u0275directiveInject(be.t),t.\u0275\u0275directiveInject(Me.ActivatedRoute),t.\u0275\u0275directiveInject(ke.i),t.\u0275\u0275directiveInject(g),t.\u0275\u0275directiveInject(A.FB),t.\u0275\u0275directiveInject(A._x),t.\u0275\u0275directiveInject(y),t.\u0275\u0275directiveInject(U),t.\u0275\u0275directiveInject(A.ME),t.\u0275\u0275directiveInject(Me.Router),t.\u0275\u0275directiveInject(V.b),t.\u0275\u0275directiveInject(fe.H7))},o.\u0275cmp=t.\u0275\u0275defineComponent({type:o,selectors:[["app-home"]],decls:12,vars:17,consts:[[3,"isHome","showBadge"],["forceOverscroll","false",3,"ngStyle"],[4,"ngIf"],[1,"home_content"],["class","home_content__invite_and_countdown",4,"ngIf"],["class","home_content__countdown",4,"ngIf"],[1,"home_content__qrcode",3,"ngClass"],["class","home_content__boxqr",4,"ngIf"],[1,"home-snackbar"],[1,"home-snackbar__container"],["class","home-snackbar__automatic-time",3,"click",4,"ngIf"],[1,"home-snackbar__automatic-time",3,"click"],[3,"className"],[1,"home-snackbar__automatic-time__message__icon"],["mode","ios","name","alert"],[1,"home-snackbar__automatic-time__message__text",3,"innerHTML"],[1,"home-snackbar__offline"],[3,"smallMessage","isHome","showOffline","onReload"],[1,"home_content__banner",3,"ngStyle"],["title","Banner Publicit\xe1rio","sandbox","allow-scripts allow-same-origin allow-popups allow-top-navigation-by-user-activation","loading","lazy","width","100%","frameborder","0",3,"ngStyle","src"],[1,"home_content__invite_and_countdown"],[1,"home_content__invite_section"],["id","btnInviteHome",3,"className","ngClass",4,"ngIf"],["class","home_content__invite_section__skeleton",4,"ngIf"],[1,"home_content__invite_section__skeleton"],[1,"home_content__invite_section__skeleton__texts"],["animated","",2,"width","100%"],["animated","",2,"width","70%"],["class","home_content__invite_section__skeleton__button",4,"ngIf"],[1,"home_content__invite_section__skeleton__button"],["animated",""],["id","btnInviteHome",3,"className","ngClass"],[4,"ngIf","ngIfElse"],["associateCompany",""],[1,"home_content__invite_section__button_holder"],["mode","ios","class","home_content__invite_section__button_holder__invite ","shape","round",3,"ngClass","disabled","click",4,"ngIf"],["class","home_content__invite_section__button_holder__invite","shape","round",3,"ngClass","disabled","click",4,"ngIf"],["class","home_content__invite_section__button_holder__message",4,"ngIf"],["mode","ios","shape","round",1,"home_content__invite_section__button_holder__invite",3,"ngClass","disabled","click"],["shape","round",1,"home_content__invite_section__button_holder__invite",3,"ngClass","disabled","click"],[1,"home_content__invite_section__button_holder__message"],["style","margin: 0","class","home_content__invite_section__associate_company",4,"ngIf"],[1,"home_content__invite_section__associate_company",2,"margin","0"],[3,"click"],[1,"home_content__countdown"],[3,"qrCodeValidityCountDown","duration","paused","hasBanner","displayCircularCountdown"],["class","home_content__invite_section",3,"ngClass",4,"ngIf"],[1,"home_content__invite_section",3,"ngClass"],["mode","ios","class","home_content__invite_section__button_holder__invite","shape","round",3,"disabled","click",4,"ngIf"],["mode","ios","shape","round",1,"home_content__invite_section__button_holder__invite",3,"disabled","click"],[1,"home_content__error"],[1,"home_content__error__container"],[1,"home_content__error__container__message"],[1,"home_content__error__container__message__title","ion-text-center"],[1,"home_content__error__container__message__description"],["color","medium"],[1,"ion-text-justify","P1"],[3,"innerHTML"],[1,"P2"],[1,"P3"],[1,"ion-text-justify","P4"],["class","home_content__error__container__restart_button",4,"ngIf"],[1,"home_content__error__container__restart_button"],["type","button",3,"click"],["color","danger"],[2,"text-decoration","none",3,"click"],[1,"home_content__boxqr"],["alt","QrCode",1,"home_content__qr-code-holder",3,"margin","value"],[1,"home_content__code_holder"],["animated","",2,"width","300px","height","300px"]],template:function(n,i){1&n&&(t.\u0275\u0275element(0,"app-header",0),t.\u0275\u0275elementStart(1,"ion-content",1),t.\u0275\u0275template(2,F,5,2,"ng-container",2),t.\u0275\u0275elementStart(3,"div",3),t.\u0275\u0275template(4,I,3,7,"ng-container",2),t.\u0275\u0275template(5,Y,5,3,"div",4),t.\u0275\u0275template(6,et,2,1,"ng-container",2),t.\u0275\u0275template(7,dt,3,2,"ng-container",2),t.\u0275\u0275template(8,_t,2,5,"div",5),t.\u0275\u0275elementStart(9,"div",6),t.\u0275\u0275template(10,gt,2,2,"div",7),t.\u0275\u0275template(11,mt,4,0,"ng-container",2),t.\u0275\u0275elementEnd()()()),2&n&&(t.\u0275\u0275property("isHome",!0)("showBadge",!0),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngStyle",t.\u0275\u0275pureFunction2(12,pt,i.invertColorIsEnabled?"invert(1)":"",i.availableHeight+"px")),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!i.isAutomaticTimeEnabled||i.isOffline),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",i.hasBannerLogLoad&&!i.isOffline&&i.safeUrlIFrame),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!i.hasBannerLogLoad&&!i.isOffline),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.hasBannerLogLoad),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.isExpiredSabugo||i.isOffline),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.qrCode&&!i.isExpiredSabugo&&i.hasBannerLogLoad&&!i.isMediumSmallScreen),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngClass",t.\u0275\u0275pureFunction1(15,ut,i.hasBannerLogLoad&&(i.isSmallScreen||i.isMediumSmallScreen))),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",i.qrCode&&!i.isExpiredSabugo),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!(i.qrCode||i.isOffline||i.isExpiredSabugo||null!=i.httpErrorResonse&&i.httpErrorResonse.error)))},dependencies:[ie.NgClass,ie.NgIf,ie.NgStyle,$.IonButton,$.IonContent,$.IonIcon,$.IonSkeletonText,$.IonText,Oe.G,we.c,Re.zF,s.M,O.X$],styles:["ion-content[_ngcontent-%COMP%]{--overflow: hidden !important;overflow:hidden!important}ion-content[_ngcontent-%COMP%] .home-snackbar[_ngcontent-%COMP%]{position:relative;top:0;left:0;right:0;width:100%;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__container[_ngcontent-%COMP%]{position:relative;width:100%;max-height:64px;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;background:#f2f2f2;position:relative;z-index:10}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message[_ngcontent-%COMP%]{color:#595959;font-size:.8rem;padding:.4em 8px .4em 0;text-align:justify;display:flex;align-items:center}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message--small-screen[_ngcontent-%COMP%]{font-size:11.8px;padding:2px 5px}ion-content[_ngcontent-%COMP%] .home-snackbar__automatic-time__message__icon[_ngcontent-%COMP%]{font-size:2em;padding-left:.6em;padding-right:.4em}ion-content[_ngcontent-%COMP%] .home-snackbar__offline[_ngcontent-%COMP%]{position:relative;width:100%;z-index:10}ion-content[_ngcontent-%COMP%] .home_content[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;position:relative;overflow:hidden;justify-content:space-evenly;padding-bottom:1.5rem;height:100%;flex:1 1 auto}ion-content[_ngcontent-%COMP%] .home_content__banner[_ngcontent-%COMP%]{width:100%;z-index:8;display:flex;align-items:center;justify-content:center;flex-direction:column;animation:fadeIn .5s ease-in-out;padding:0!important}ion-content[_ngcontent-%COMP%] .home_content__banner[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:100%;border:none;display:block}ion-content[_ngcontent-%COMP%] .home_content__invite_and_countdown[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;width:100%;z-index:5;flex-direction:column;box-sizing:border-box;flex:auto;height:100%}ion-content[_ngcontent-%COMP%] .home_content__invite_section[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:5;min-width:0;min-height:0;padding:.5rem 0}ion-content[_ngcontent-%COMP%] .home_content__invite_section.hasBanner[_ngcontent-%COMP%]{min-height:0}ion-content[_ngcontent-%COMP%] .home_content__invite_section.noBanner[_ngcontent-%COMP%]{flex:none!important;margin:5rem 0}ion-content[_ngcontent-%COMP%] .home_content__invite_section[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{margin:0;display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__error[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center;z-index:6;min-height:0;padding:0 1rem}ion-content[_ngcontent-%COMP%] .home_content__error[_ngcontent-%COMP%]:not(:empty){flex:1 1 auto}ion-content[_ngcontent-%COMP%] .home_content__countdown[_ngcontent-%COMP%]{position:relative;z-index:9;max-height:-webkit-max-content;max-height:-moz-max-content;max-height:max-content;width:100%;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__qrcode[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__boxqr[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__qr-code-holder[_ngcontent-%COMP%]{width:min(80vw,40vh,308px);display:flex;justify-content:center;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder__invite[_ngcontent-%COMP%]{align-self:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__button_holder__message[_ngcontent-%COMP%]{width:100%;text-align:center;padding:.5rem 1em}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{text-align:center;font-size:.85em;display:flex;justify-content:center;align-items:center;width:100%}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{transition:background-color .1s ease-out,transform .1s ease;--box-shadow: 0;text-transform:none;height:clamp(40px,8vh,2em);min-height:40px;font-size:clamp(.7rem,3vw,1.1rem);font-size:1em;min-width:18vw;max-width:30vw}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%] ion-button.small-screen[_ngcontent-%COMP%]{height:clamp(30px,8vh,2em);min-height:30px;font-size:clamp(.7rem,3vw,1.1rem);--padding-start: clamp(1em, 3vw, 1.25em);--padding-end: clamp(1em, 3vw, 1.25em);font-size:.9em;min-width:16vw;max-width:19vw}ion-content[_ngcontent-%COMP%] .hint--small-screen[_ngcontent-%COMP%]{font-size:.7em;padding:.6rem}ion-content[_ngcontent-%COMP%] .hint--small_screen[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint--small-screen[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.small_screen[_ngcontent-%COMP%]{padding-top:1em}ion-content[_ngcontent-%COMP%] .hint--toast_show_fcm[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.toast_show_fcm[_ngcontent-%COMP%]{padding-top:2rem}ion-content[_ngcontent-%COMP%] .hint--toast_show_fcm_small[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .hint.toast_show_fcm_small[_ngcontent-%COMP%]{padding-top:2.5rem}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:16px;font-size:clamp(.7rem,3vw,1.1rem);color:#fff;background-color:#0ec254;padding:clamp(.5em,2vw,.75em) clamp(1em,4vw,1.25em);border-radius:32px;transition:background-color .1s ease-out,transform .1s ease;height:clamp(30px,8vh,50px)}ion-content[_ngcontent-%COMP%] .hint__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:clamp(30px,8vh,50px);margin-top:0;font-size:clamp(.7rem,3vw,1.1rem);--color: #fff;--background: #0ec254;--padding-start: clamp(1em, 3vw, 1.25em);--padding-end: clamp(1em, 3vw, 1.25em);--border-radius: 32px;transition:background-color .1s ease-out,transform .1s ease;align-self:center}ion-content[_ngcontent-%COMP%] .hint__button_holder[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{transform:scale(.97)}ion-content[_ngcontent-%COMP%] .hint__button_holder__invite[_ngcontent-%COMP%]{align-self:center}ion-content[_ngcontent-%COMP%] .hint__button_holder__message[_ngcontent-%COMP%]{width:100%;text-align:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton[_ngcontent-%COMP%]{display:flex;position:relative;flex-direction:column;align-content:center;width:100%;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__texts[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;align-items:center}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__texts[_ngcontent-%COMP%] > ion-skeleton-text[_ngcontent-%COMP%]{border-radius:8px}ion-content[_ngcontent-%COMP%] .home_content__invite_section__skeleton__button[_ngcontent-%COMP%]{width:8em;height:36px;border-radius:30px}ion-content[_ngcontent-%COMP%] .home_content__error__container[_ngcontent-%COMP%]{position:relative;display:flex;-webkit-box-pack:center;align-items:center;flex-direction:column;height:calc(100% - 3em);padding:0 2em;color:#656768;justify-content:center}ion-content[_ngcontent-%COMP%] .home_content__error__container__message__title[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%] .home_content__error__container__message__description[_ngcontent-%COMP%]{margin:4px 0}ion-content[_ngcontent-%COMP%] .home_content__error__container__restart_button[_ngcontent-%COMP%]{margin-top:1em;font-size:1em;color:#fff;background-color:#0ec254;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out}ion-content[_ngcontent-%COMP%] .home_content__error__container__restart_button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:transparent;color:#fff}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:16px;font-size:clamp(.7rem,3vw,1.1rem);color:#fff;background-color:#0ec254;padding:clamp(.5em,2vw,.75em) clamp(1em,4vw,1.25em);border-radius:32px;transition:background-color .1s ease-out,transform .1s ease;height:clamp(30px,8vh,50px)}ion-content[_ngcontent-%COMP%] .home_content__invite_section__associate_company[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{transform:scale(.97)}@media (inverted-colors: inverted){.isInvertColorIsEnableRevert[_ngcontent-%COMP%]{filter:invert(1)}}"]}),o})()},71994:(Ne,ae,m)=>{m.d(ae,{sZ:()=>de,ue:()=>Ee,AQ:()=>A,Ut:()=>ke,oY:()=>k,YH:()=>ie,i9:()=>Re});var e=m(45449),L=m(47898),B=m(90944),S=m(90603),Ce=m(87871);function se(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",a.foundUser.document," ")}}function J(s,O){if(1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,se,2,1,"div",6),e.\u0275\u0275elementContainerEnd()),2&s){const a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==a.foundUser?null:a.foundUser.document)}}function X(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",7),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",a.foundUser.company," ")}}function j(s,O){if(1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,X,2,1,"div",6),e.\u0275\u0275elementContainerEnd()),2&s){const a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==a.foundUser?null:a.foundUser.company)}}function Q(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",1),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.userSelect.emit(h.foundUser))}),e.\u0275\u0275element(2,"app-avatar",2),e.\u0275\u0275elementStart(3,"div",3)(4,"div",4),e.\u0275\u0275text(5),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(6,J,2,1,"ng-container",0),e.\u0275\u0275template(7,j,2,1,"ng-container",0),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(8,"ion-ripple-effect",5),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&s){const a=e.\u0275\u0275nextContext();let d;e.\u0275\u0275advance(2),e.\u0275\u0275property("firstName",a.foundUser.firstName)("lastName",a.foundUser.lastName)("thumbnailImage",null!==(d=null!==(d=null==a.foundUser?null:a.foundUser.image)&&void 0!==d?d:null==a.foundUser?null:a.foundUser.thumbnailImage)&&void 0!==d?d:null)("size","md"),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.helperService.normalizeName(a.foundUser.firstName,a.foundUser.lastName)," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","driver"===a.typeofuser),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","assistant"===a.typeofuser)}}function ce(s,O){1&s&&(e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275element(1,"ion-skeleton-text",15),e.\u0275\u0275elementStart(2,"div",3)(3,"div",4),e.\u0275\u0275element(4,"ion-skeleton-text",16),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",7),e.\u0275\u0275element(6,"ion-skeleton-text",17),e.\u0275\u0275elementEnd()()())}const ee=function(){return[1,2,3,4,5,6,7,8,9,10]};function le(s,O){1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",8)(2,"div",9)(3,"div",10),e.\u0275\u0275element(4,"ion-skeleton-text",11)(5,"ion-skeleton-text",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(6,ce,7,0,"div",13),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&s&&(e.\u0275\u0275advance(6),e.\u0275\u0275property("ngForOf",e.\u0275\u0275pureFunction0(1,ee)))}let de=(()=>{class s{constructor(a){this.helperService=a,this.skeleton=!1,this.userSelect=new e.EventEmitter}ngOnInit(){}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(L.W_))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-card-founduser-lg"]],inputs:{foundUser:"foundUser",skeleton:"skeleton",typeofuser:"typeofuser"},outputs:{userSelect:"userSelect"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"result","ion-activatable",3,"click"],[3,"firstName","lastName","thumbnailImage","size"],[1,"user-info"],[1,"full-name"],["type","bounded"],["class","company",4,"ngIf"],[1,"company"],[1,"results"],[1,"sub-title"],[1,"ion-text-center",2,"display","flex","flex-direction","column","align-items","center"],["animated","",2,"width","100%"],["animated","",2,"width","60%"],["class","result",4,"ngFor","ngForOf"],[1,"result"],["animated","",1,"avatar-skeleton"],["animated","",2,"width","85%"],["animated","",2,"width","50%"]],template:function(a,d){1&a&&(e.\u0275\u0275template(0,Q,9,7,"ng-container",0),e.\u0275\u0275template(1,le,7,2,"ng-container",0)),2&a&&(e.\u0275\u0275property("ngIf",d.foundUser&&!d.skeleton),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",d.skeleton))},dependencies:[B.NgForOf,B.NgIf,S.IonRippleEffect,S.IonSkeletonText,Ce.A],styles:[".avatar-skeleton[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;flex-shrink:0}.result[_ngcontent-%COMP%]{position:relative;margin:10px 0;border:1px solid #eee;border-radius:4px;padding:6px 10px;display:flex;align-items:center;gap:10px}.result[_ngcontent-%COMP%] app-avatar[_ngcontent-%COMP%]{flex-shrink:0}.result[_ngcontent-%COMP%] .user-info[_ngcontent-%COMP%]{flex:1;min-width:0}.result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa;font-size:.8em}.results[_ngcontent-%COMP%]{padding:1em;overflow:scroll;height:100%}.results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:left}.results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}"]}),s})();var R=m(24006),oe=m(99826);function Pe(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",16),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&s){const a=O.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",a.message," ")}}function De(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275template(1,Pe,2,1,"div",15),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",a.getFieldInputValidationErrors("reason"))}}let Ee=(()=>{class s{constructor(a,d,h,F,D,W){this.ngZoneService=a,this.createLogisticEventService=d,this.formBuilder=h,this.modalController=F,this.notificatorService=D,this.translateConfigService=W,this.reasonFormErrors=[],this.onClose=()=>{this.modalController.dismiss({reason:null})},this.onSubmit=()=>{const I=this.reasonForm.controls.reason.value,T=this.validateInput({reason:I});if(T.length){this.setValidationErrors(T);const v={title:this.translateConfigService.translate("TOAST_INVALID_DATA_TITLE"),message:this.translateConfigService.translate("TOAST_INVALID_DATA_NESSAGE"),type:"error"};this.notificatorService.notify(v)}else this.modalController.dismiss({reason:I})},this.validateInput=I=>{const p=[],T=this.validateReasonInput(I);return T&&p.push(T),p},this.validateReasonInput=I=>!I.reason||I.reason.length<1?{message:this.translateConfigService.translate("MD_JUSTIFY_INVITE_WITOUT_LOCATOR_JUSTIFICATION_PROVIDED"),field:"reason"}:null,this.setValidationErrors=I=>{this.reasonFormErrors=I},this.thereIsFieldInputValidationErrors=I=>this.reasonFormErrors.find(p=>p.field===I),this.getFieldInputValidationErrors=I=>this.reasonFormErrors.filter(p=>p.field===I)}ngOnInit(){this.reasonForm=this.formBuilder.group({reason:[""]})}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(L.zf),e.\u0275\u0275directiveInject(L.V),e.\u0275\u0275directiveInject(R.UntypedFormBuilder),e.\u0275\u0275directiveInject(S.ModalController),e.\u0275\u0275directiveInject(L.V6),e.\u0275\u0275directiveInject(L.wK))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-justify-self-invite-without-locator"]],decls:25,vars:15,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[3,"formGroup","ngSubmit"],[1,"input-holder"],["maxlength","55","id","reason","formControlName","reason",3,"placeholder"],["class","errors",4,"ngIf"],[1,"modal-footer"],["type","submit",3,"click"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"]],template:function(a,d){1&a&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return d.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7)(12,"ion-row")(13,"ion-col")(14,"form",8),e.\u0275\u0275listener("ngSubmit",function(){return d.onSubmit()}),e.\u0275\u0275elementStart(15,"div",9)(16,"textarea",10),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275text(18," "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(19,De,2,1,"div",11),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(20,"div",12)(21,"div",4)(22,"button",13),e.\u0275\u0275listener("click",function(){return d.onSubmit()}),e.\u0275\u0275text(23),e.\u0275\u0275pipe(24,"translate"),e.\u0275\u0275elementEnd()()()()()()),2&a&&(e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,7,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(10,9,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",d.reasonForm),e.\u0275\u0275advance(2),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(17,11,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_INPUT")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",d.thereIsFieldInputValidationErrors("reason")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(24,13,"MD_JUSTIFY_INVITE_WITOUT_LOCATOR_BTN_CONFIRM_REFUSAL")," "))},dependencies:[B.NgClass,B.NgForOf,B.NgIf,S.IonCol,S.IonRow,R.\u0275NgNoValidate,R.DefaultValueAccessor,R.NgControlStatus,R.NgControlStatusGroup,R.MaxLengthValidator,R.FormGroupDirective,R.FormControlName,oe.X$],styles:[".selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #eee;border-radius:8px;color:#656768;width:100%;padding:8px;margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border:1px solid #656768;outline:none}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),s})();function pe(s,O){if(1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",16)(2,"div",17),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"div",18)(6,"div",19),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd()),2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,3,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_DESTINATION")," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate2("",null==a.data?null:a.data.firstName," ",null==a.data?null:a.data.lastName,"")}}function Te(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",22),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&s){const a=O.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",a.message," ")}}function t(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",20),e.\u0275\u0275template(1,Te,2,1,"div",21),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",a.getFieldInputValidationErrors("reason"))}}const $=function(s){return{"no-margim":s}};let A=(()=>{class s{constructor(a,d,h,F){this.formBuilder=a,this.modalController=d,this.notificatorService=h,this.translateConfigService=F,this.data=null,this.reasonFormErrors=[],this.onClose=()=>{this.modalController.dismiss({reason:null})},this.onSubmit=()=>{const D=this.reasonForm.controls.reason.value,I=this.validateInput({reason:D});if(I.length){this.setValidationErrors(I);const p={title:this.translateConfigService.translate("TOAST_INVALID_DATA_TITLE"),message:this.translateConfigService.translate("TOAST_INVALID_DATA_NESSAGE"),type:"error"};this.notificatorService.notify(p)}else this.modalController.dismiss({reason:D})},this.validateInput=D=>{const W=[],I=this.validateReasonInput(D);return I&&W.push(I),W},this.validateReasonInput=D=>!D.reason||D.reason.length<1?{message:this.translateConfigService.translate("MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_JUSTIFICATION_PROVIDED"),field:"reason"}:null,this.setValidationErrors=D=>{this.reasonFormErrors=D},this.thereIsFieldInputValidationErrors=D=>this.reasonFormErrors.find(W=>W.field===D),this.getFieldInputValidationErrors=D=>this.reasonFormErrors.filter(W=>W.field===D)}ngOnInit(){this.reasonForm=this.formBuilder.group({reason:[""]})}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(R.UntypedFormBuilder),e.\u0275\u0275directiveInject(S.ModalController),e.\u0275\u0275directiveInject(L.V6),e.\u0275\u0275directiveInject(L.wK))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-logistic-justify-self-invite-with-locator"]],inputs:{data:"data"},decls:28,vars:23,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[4,"ngIf"],[3,"formGroup","ngSubmit"],[1,"input-holder",3,"ngClass"],["maxlength","55","id","reason","formControlName","reason",3,"ngClass","placeholder"],[1,"count"],["class","errors",4,"ngIf"],[1,"modal-footer"],["type","submit",3,"click"],[1,"destination-holder",2,"margin-top","0","padding","0 2.5em"],[1,"destination-label"],[1,"destination-box"],[1,"name"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],[1,"error"]],template:function(a,d){if(1&a&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return d.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7),e.\u0275\u0275template(12,pe,8,5,"ng-container",8),e.\u0275\u0275elementStart(13,"ion-row")(14,"ion-col")(15,"form",9),e.\u0275\u0275listener("ngSubmit",function(){return d.onSubmit()}),e.\u0275\u0275elementStart(16,"div",10)(17,"textarea",11),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275text(19," "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"div",12),e.\u0275\u0275text(21),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(22,t,2,1,"div",13),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(23,"div",14)(24,"div",4)(25,"button",15),e.\u0275\u0275listener("click",function(){return d.onSubmit()}),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"translate"),e.\u0275\u0275elementEnd()()()()()()),2&a){let h;e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,11,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(10,13,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_TITLE")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",null==d.data?null:d.data.event),e.\u0275\u0275advance(3),e.\u0275\u0275property("formGroup",d.reasonForm),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(19,$,null!=d.data&&d.data.event?"no-margim":"")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(21,$,null!=d.data&&d.data.event?"no-margim":""))("placeholder",e.\u0275\u0275pipeBind1(18,15,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_INPUT")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1("",(null==d.reasonForm||null==(h=d.reasonForm.get("reason"))||null==h.value?null:h.value.length)||0,"/55"),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",d.thereIsFieldInputValidationErrors("reason")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(27,17,"MD_JUSTIFY_LG_INVITE_WITOUT_LOCATOR_BTN_CONFIRM_REFUSAL")," ")}},dependencies:[B.NgClass,B.NgForOf,B.NgIf,S.IonCol,S.IonRow,R.\u0275NgNoValidate,R.DefaultValueAccessor,R.NgControlStatus,R.NgControlStatusGroup,R.MaxLengthValidator,R.FormGroupDirective,R.FormControlName,oe.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:auto;max-height:100%}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:auto;max-height:100%;overflow-y:auto}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-label[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;width:100%;text-align:left;margin-bottom:6px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%]{background:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:auto}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] ion-avatar[_ngcontent-%COMP%]{width:48px;height:48px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] .initials.escort[_ngcontent-%COMP%]{width:48px!important;height:48px!important;min-width:48px!important;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:#eee}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{text-align:left;font-size:12px;color:#666;width:auto}@media (max-width: 480px){.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%]{padding:6px;gap:6px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-label[_ngcontent-%COMP%]{font-size:13px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] ion-avatar[_ngcontent-%COMP%], .selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .photo[_ngcontent-%COMP%] .initials.escort[_ngcontent-%COMP%]{width:44px;height:44px;min-width:44px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .destination-box[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:12px}}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{align-self:flex-start;font-size:11px;color:#bbb;margin-top:2px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea.no-margim[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #eee;border-radius:8px;color:#656768;width:100%;padding:8px;margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border:1px solid #656768;outline:none}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{margin-bottom:1em;display:flex;justify-content:center;padding:1em}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{text-align:center;margin:auto;width:100%;display:flex;justify-content:center}"]}),s})();function xe(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.createNewConventional())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&s&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_VISITOR")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_VISITOR_NEW_EVENT")," "))}function be(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.createNewEntry())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&s&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_CARGO_ARRIVAL")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_CARGO_ARRIVAL_NEW")," "))}function Me(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ion-card",12),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.createNewExit())}),e.\u0275\u0275elementStart(1,"ion-label")(2,"h6",13),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"p",14),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}2&s&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,2,"MD_EVENT_TYPE_CARGO_DEPARTURE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,4,"MD_EVENT_TYPE_CARGO_DEPARTURE_NEW")," "))}let ke=(()=>{class s{constructor(a){this.modalController=a,this.availableTypes=[],this.createNewConventional=()=>{this.modalController.dismiss({type:"CONVENTIONAL"})},this.createNewEntry=()=>{this.modalController.dismiss({type:"NEW_ENTRY"})},this.createEntryFromExit=()=>{this.modalController.dismiss({type:"CLONE_EXIT"})},this.createNewExit=()=>{this.modalController.dismiss({type:"NEW_EXIT"})},this.createExitFromEntry=()=>{this.modalController.dismiss({type:"CLONE_ENTRY"})},this.back=()=>{this.modalController.dismiss(null)}}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(S.ModalController))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-select-logistic-event-type-modal"]],inputs:{availableTypes:"availableTypes"},decls:18,vars:10,consts:[[3,"ngClass"],[1,"content"],[1,"background"],[1,"modal-container"],[1,"modal-title"],["tabindex","1"],[1,"modal-body"],[1,"types"],["lines","none",2,"padding","0 2px"],["button","","class","type ion-no-padding",3,"click",4,"ngIf"],[1,"modal-footer"],["mode","ios","fill","clear",1,"reject",3,"click"],["button","",1,"type","ion-no-padding",3,"click"],[1,"name"],[1,"description","ion-text-wrap"]],template:function(a,d){1&a&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1),e.\u0275\u0275element(2,"div",2),e.\u0275\u0275elementStart(3,"div",3)(4,"div",4)(5,"h6",5),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6)(9,"div",7)(10,"ion-list",8),e.\u0275\u0275template(11,xe,8,6,"ion-card",9),e.\u0275\u0275template(12,be,8,6,"ion-card",9),e.\u0275\u0275template(13,Me,8,6,"ion-card",9),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(14,"div",10)(15,"ion-button",11),e.\u0275\u0275listener("click",function(){return d.back()}),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd()()()()()),2&a&&(e.\u0275\u0275property("ngClass","select-logistic-event-type-modal"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,6,"MD_EVENT_TYPE_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",d.availableTypes.includes("CONVENTIONAL")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",d.availableTypes.includes("ENTRY")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",d.availableTypes.includes("EXIT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(17,8,"BTN_BACK")," "))},dependencies:[B.NgClass,B.NgIf,S.IonButton,S.IonCard,S.IonLabel,S.IonList,oe.X$],styles:[".select-logistic-event-type-modal[_ngcontent-%COMP%]{width:100vw;transition:height .5s ease-in-out;overflow:hidden;z-index:1000;height:100vh}.select-logistic-event-type-modal[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .select-logistic-event-type-modal[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{all:unset!important}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh;position:absolute;width:100vw;top:0;color:#383a3e}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .background[_ngcontent-%COMP%]{position:absolute;height:100vh;width:100vw;background-color:#333;opacity:.3;top:0;transition:opacity .5s ease-out}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{height:60vh;background-color:#fff;width:86vw;margin:auto;border-radius:8px;padding:24px;box-shadow:2px 2px rgba(0,0,0,.1);position:relative;margin-top:20vh;transition:margin-top 1s ease}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{text-align:center;font-weight:500;position:absolute;top:0;height:3.5em;line-height:3.5em;width:calc(100% - 48px);background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 7em);width:calc(100% - 48px);top:3.5em;overflow-y:scroll;text-align:justify;font-size:.9em;background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #eee;border-radius:4px;margin-bottom:8px}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:700}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#656768}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;height:3.5em;width:calc(100% - 48px);line-height:3.5em;display:flex;justify-content:center;align-items:center;overflow:hidden;background-color:#fff}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:1em;background-color:#fff;color:#656768;padding:.75em 1.25em;border-radius:32px;transition:background-color .1s ease-out;height:36px}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]:active{background-color:#eee;color:#656768;transition:background-color .1s ease-out}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button.accept[_ngcontent-%COMP%]{color:#0ec254}.select-logistic-event-type-modal[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] ion-button.accept[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}"]}),s})();var f=m(15861),c=m(24889);function g(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"app-card-founduser-lg",23),e.\u0275\u0275listener("userSelect",function(){const F=e.\u0275\u0275restoreView(a).$implicit,D=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(D.onUserSelect(F))}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&s){const a=O.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("foundUser",a)}}function y(s,O){if(1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,g,2,1,"ng-container",22),e.\u0275\u0275elementContainerEnd()),2&s){const a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",a.foundUsers)}}function w(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",20)(1,"div",7),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",21),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(7,y,2,1,"ng-container",16),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,"MD_ASSISTANT_USERS_FOUND")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(6,5,"MD_ASSISTANT_TAP_ITEM")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",a.isLoading)}}function E(s,O){1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"app-card-founduser-lg",24),e.\u0275\u0275elementContainerEnd()),2&s&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("skeleton",!0))}let k=(()=>{class s{constructor(a,d,h,F,D,W,I,p){var T=this;this.ngZoneService=a,this.createLogisticEventService=d,this.formBuilder=h,this.modalController=F,this.changeDetectorRef=D,this.helperService=W,this.logService=I,this.userPhotoService=p,this.page=0,this.size=15,this.onClose=v=>{this.modalController.dismiss(v)},this.onUserSelect=v=>{v.fullName=this.helperService.normalizeName(v.firstName,v.lastName),setTimeout(()=>{this.onClose(v)},750)},this.onCreateGuest=(0,f.Z)(function*(){const v=yield T.modalController.create({component:c._y});v.onDidDismiss().then(T.onModalDismissCallback),yield v.present()}),this.onModalDismissCallback=v=>{v&&v.data&&this.onUserSelect(v.data)},this.onUpdateContactInfoSuccessResponse=v=>{console.log("onUpdateContactInfoSuccessResponse"),console.log("contact:",v)},this.onUpdateContactInfoErrorResponse=v=>{console.log("onUpdateContactInfoErrorResponse"),console.log("error:",v)},this.onInputChange=v=>{const{value:z}=v.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{z.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(z)},750)},this.doSearch=v=>{const z={searchTerm:v=v.trim()};this.dataTerms=z,this.createLogisticEventService.getCompanyAssistants(z,this.page,this.size).then(this.handleGetGuestsSuccessResponse).catch(this.handleGetGuestsErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetGuestsSuccessResponse=v=>{console.log("handleGetGuestsSuccessResponse"),console.log("response:",v),this.setFoundUsers(v),this.userPhotoService.enrichUsersWithPhotos(v)},this.handleGetGuestsErrorResponse=v=>{this.logService.logError("http::handleGetGuestsErrorResponse","",v),console.log("handleGetGuestsErrorResponse"),console.log("error:",v)},this.setFoundUsers=v=>{this.foundUsers=v,this.changeDetectorRef.detectChanges(),scrollBy(0,1)}}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}loadData(a){this.page+=1,this.loadMore(this.page,a)}loadMore(a,d){this.createLogisticEventService.getCompanyDrivers(this.dataTerms,a,this.size,!!d).then(h=>{this.isLoading=!0,h.length>0?(this.handleGetGuestsSuccessResponse(this.foundUsers.concat(h)),this.size>0&&d.target.complete()):d.target.disabled=!0}).catch(h=>{this.handleGetGuestsErrorResponse(h),d.target.complete(),d.target.disabled=!0})}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(L.zf),e.\u0275\u0275directiveInject(L.V),e.\u0275\u0275directiveInject(R.UntypedFormBuilder),e.\u0275\u0275directiveInject(S.ModalController),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(L.W_),e.\u0275\u0275directiveInject(L.$V),e.\u0275\u0275directiveInject(L.IR))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-selector-for-assistants-to-add-to-event"]],viewQuery:function(a,d){if(1&a&&e.\u0275\u0275viewQuery(S.IonInfiniteScroll,5),2&a){let h;e.\u0275\u0275queryRefresh(h=e.\u0275\u0275loadQuery())&&(d.infiniteScroll=h.first)}},decls:35,vars:16,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],[1,"upper-options"],["id","name","type","text","formControlName","searchTerm",3,"placeholder","keyup"],[1,"new-holder"],["type","button",3,"click"],["class","results",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["threshold","15%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"sub-title"],[4,"ngFor","ngForOf"],["typeofuser","assistant",3,"foundUser","userSelect"],[3,"skeleton"]],template:function(a,d){1&a&&(e.\u0275\u0275elementStart(0,"ion-header",0)(1,"ion-toolbar"),e.\u0275\u0275element(2,"ion-title"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"ion-content",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),e.\u0275\u0275listener("click",function(){return d.onClose()}),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",7),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(14,"div",8)(15,"ion-row")(16,"ion-col")(17,"form",9)(18,"div",10)(19,"div",11)(20,"input",12),e.\u0275\u0275listener("keyup",function(F){return d.onInputChange(F)}),e.\u0275\u0275pipe(21,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"div",13)(23,"div",5)(24,"button",14),e.\u0275\u0275listener("click",function(){return d.onCreateGuest()}),e.\u0275\u0275text(25),e.\u0275\u0275pipe(26,"translate"),e.\u0275\u0275elementEnd()()()()()()()(),e.\u0275\u0275elementStart(27,"ion-row")(28,"ion-col"),e.\u0275\u0275template(29,w,8,7,"div",15),e.\u0275\u0275template(30,E,2,1,"ng-container",16),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275element(31,"div",17),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"ion-infinite-scroll",18,19),e.\u0275\u0275listener("ionInfinite",function(F){return d.loadData(F)}),e.\u0275\u0275element(34,"ion-infinite-scroll-content"),e.\u0275\u0275elementEnd()()),2&a&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,8,"MD_ASSISTANT_BTN_CLOSE")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(13,10,"MD_ASSISTANT_TITLE")),e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",d.userForm),e.\u0275\u0275advance(3),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(21,12,"MD_ASSISTANT_INPUT")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(26,14,"MD_ASSISTANT_BTN_NEW")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!!d.foundUsers.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!d.isLoading))},dependencies:[B.NgClass,B.NgForOf,B.NgIf,S.IonCol,S.IonContent,S.IonHeader,S.IonInfiniteScroll,S.IonInfiniteScrollContent,S.IonRow,S.IonTitle,S.IonToolbar,R.\u0275NgNoValidate,R.DefaultValueAccessor,R.NgControlStatus,R.NgControlStatusGroup,R.FormGroupDirective,R.FormControlName,de,oe.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}ion-content.selector.ios[_ngcontent-%COMP%] ion-fab.fab[_ngcontent-%COMP%]{position:fixed;margin-top:10px}ion-header.fix-header-modal-ios[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{height:0px!important;--background: #fff}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1.5em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{overflow:scroll;height:100%;padding:1em}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;width:80%;margin:0 10% 2px;font-weight:700;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{width:95%;margin:10px;border:1px solid #eee;border-radius:4px;padding:10px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa}"]}),s})();function b(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"app-card-founduser-lg",24),e.\u0275\u0275listener("userSelect",function(){const F=e.\u0275\u0275restoreView(a).$implicit,D=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(D.onUserSelect(F))}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()}if(2&s){const a=O.$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("foundUser",a)}}function U(s,O){if(1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,b,2,1,"ng-container",23),e.\u0275\u0275elementContainerEnd()),2&s){const a=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",a.foundUsers)}}function V(s,O){if(1&s&&(e.\u0275\u0275elementStart(0,"div",21)(1,"div",22),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,U,2,1,"ng-container",17),e.\u0275\u0275elementEnd()),2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"MD_DRIVER_SUBTITLE")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",a.isLoading)}}function fe(s,O){1&s&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275element(1,"app-card-founduser-lg",25),e.\u0275\u0275elementContainerEnd()),2&s&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("skeleton",!0))}let ie=(()=>{class s{constructor(a,d,h,F,D,W,I){var p=this;this.createLogisticEventService=a,this.formBuilder=d,this.modalController=h,this.changeDetectorRef=F,this.helperService=D,this.logService=W,this.userPhotoService=I,this.isLoading=!1,this.page=0,this.size=15,this.onClose=T=>{this.modalController.dismiss(T)},this.onUserSelect=T=>{T.fullName=this.helperService.normalizeName(T.firstName,T.lastName),setTimeout(()=>{this.onClose(T)},750)},this.onCreateDriver=(0,f.Z)(function*(){const T=yield p.modalController.create({component:c.v_});T.onDidDismiss().then(v=>{p.onModalDismissCallback(v)}),yield T.present()}),this.onInputChange=T=>{const{value:v}=T.target;this.infiniteScroll.disabled=!1,this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{v.length>1&&(this.foundUsers=[],this.page=0),this.doSearch(v)},750)},this.doSearch=T=>{const v={searchTerm:T=T.trim()};this.dataTerms=v,this.createLogisticEventService.getCompanyDrivers(v,this.page,this.size).then(this.handleGetCompanyDriversSuccessResponse).catch(this.handleGetgetCompanyDriversErrorResponse).finally(()=>this.isLoading=!0)},this.handleGetCompanyDriversSuccessResponse=T=>{console.log("handleGetCompanyDriversSuccessResponse"),console.log("response:",T),this.setFoundUsers(T),this.userPhotoService.enrichUsersWithPhotos(T)},this.handleGetgetCompanyDriversErrorResponse=T=>{console.log("handleGetgetCompanyDriversErrorResponse"),this.logService.logError("http::handleGetgetCompanyDriversErrorResponse","",T),console.log("error:",T)},this.setFoundUsers=T=>{this.foundUsers=T,console.log("foundUsers",T),this.changeDetectorRef.detectChanges(),scrollBy(0,1)}}ngOnInit(){this.foundUsers=[],this.searchTimeout=null,this.userForm=this.formBuilder.group({searchTerm:[""]})}ionViewWillEnter(){this.onInputChange({target:{value:""}})}onModalDismissCallback(a){a&&a.data&&this.onUserSelect(a.data)}loadData(a){this.page+=1,this.loadMore(this.page,a)}loadMore(a,d){this.createLogisticEventService.getCompanyDrivers(this.dataTerms,a,this.size,!!d).then(h=>{this.isLoading=!0,h.length>0?(this.handleGetCompanyDriversSuccessResponse(this.foundUsers.concat(h)),this.size>0&&d.target.complete()):d.target.disabled=!0}).catch(h=>{this.handleGetCompanyDriversSuccessResponse(h),d.target.complete(),d.target.disabled=!0})}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(L.V),e.\u0275\u0275directiveInject(R.UntypedFormBuilder),e.\u0275\u0275directiveInject(S.ModalController),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(L.W_),e.\u0275\u0275directiveInject(L.$V),e.\u0275\u0275directiveInject(L.IR))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-selector-for-driver-to-add-to-event"]],viewQuery:function(a,d){if(1&a&&e.\u0275\u0275viewQuery(S.IonInfiniteScroll,5),2&a){let h;e.\u0275\u0275queryRefresh(h=e.\u0275\u0275loadQuery())&&(d.infiniteScroll=h.first)}},decls:32,vars:10,consts:[[1,"fix-header-modal-ios","ion-no-border"],[3,"ngClass"],["horizontal","center","slot","fixed",1,"fab",3,"click"],["color","medium"],["name","close"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"modal-body"],[3,"formGroup"],[1,"input-holder"],[1,"upper-options"],["id","name","type","text","formControlName","searchTerm",2,"height","47px",3,"placeholder","keyup"],[1,"new-holder"],["type","button",3,"click"],["class","results",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["threshold","15%","position","bottom",3,"ionInfinite"],["IonInfiniteScroll",""],[1,"results"],[1,"sub-title"],[4,"ngFor","ngForOf"],["typeofuser","driver",3,"foundUser","userSelect"],[3,"skeleton"]],template:function(a,d){1&a&&(e.\u0275\u0275elementStart(0,"ion-header",0)(1,"ion-toolbar"),e.\u0275\u0275element(2,"ion-title"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(3,"ion-content",1)(4,"ion-fab",2),e.\u0275\u0275listener("click",function(){return d.onClose()}),e.\u0275\u0275elementStart(5,"ion-fab-button",3),e.\u0275\u0275element(6,"ion-icon",4),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",5)(8,"div",6)(9,"div",7),e.\u0275\u0275element(10,"div",8),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",9)(12,"ion-row")(13,"ion-col")(14,"form",10)(15,"div",11)(16,"div",12)(17,"input",13),e.\u0275\u0275listener("keyup",function(F){return d.onInputChange(F)}),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(19,"div",14)(20,"div",8)(21,"button",15),e.\u0275\u0275listener("click",function(){return d.onCreateDriver()}),e.\u0275\u0275text(22),e.\u0275\u0275pipe(23,"translate"),e.\u0275\u0275elementEnd()()()()()()()(),e.\u0275\u0275elementStart(24,"ion-row")(25,"ion-col"),e.\u0275\u0275template(26,V,5,4,"div",16),e.\u0275\u0275template(27,fe,2,1,"ng-container",17),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275element(28,"div",18),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(29,"ion-infinite-scroll",19,20),e.\u0275\u0275listener("ionInfinite",function(F){return d.loadData(F)}),e.\u0275\u0275element(31,"ion-infinite-scroll-content"),e.\u0275\u0275elementEnd()()),2&a&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(11),e.\u0275\u0275property("formGroup",d.userForm),e.\u0275\u0275advance(3),e.\u0275\u0275property("placeholder",e.\u0275\u0275pipeBind1(18,6,"MD_DRIVER_INPUT")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(23,8,"MD_DRIVER_BTN_NEW")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!!d.foundUsers.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!d.isLoading))},dependencies:[B.NgClass,B.NgForOf,B.NgIf,S.IonCol,S.IonContent,S.IonFab,S.IonFabButton,S.IonHeader,S.IonIcon,S.IonInfiniteScroll,S.IonInfiniteScrollContent,S.IonRow,S.IonTitle,S.IonToolbar,R.\u0275NgNoValidate,R.DefaultValueAccessor,R.NgControlStatus,R.NgControlStatusGroup,R.FormGroupDirective,R.FormControlName,de,oe.X$],styles:["ion-content.selector[_ngcontent-%COMP%]{--offset-top: 0px !important}ion-content.selector[_ngcontent-%COMP%] ion-fab.fab[_ngcontent-%COMP%]{position:fixed;margin-top:10px}ion-header.fix-header-modal-ios[_ngcontent-%COMP%] ion-toolbar[_ngcontent-%COMP%]{height:0px!important;--background: #fff}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:3.5em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px 32px 8px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{overflow:scroll;height:100%;padding:1em}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;width:80%;margin:0 10% 2px;font-weight:700;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px 0;font-size:.9em;background-color:#eee;border:1px solid #ccc;padding:8px;border-radius:2px;text-align:center}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{width:95%;margin:10px;border:1px solid #eee;border-radius:4px;padding:10px}.selector[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .company[_ngcontent-%COMP%]{color:#aaa}"]}),s})();function Oe(s,O){1&s&&(e.\u0275\u0275elementStart(0,"div",10),e.\u0275\u0275element(1,"ion-spinner",11),e.\u0275\u0275elementEnd())}function we(s,O){if(1&s){const a=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",12)(1,"ion-row")(2,"ion-col")(3,"div",13)(4,"div",14)(5,"button",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.deny())}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"button",15),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(a);const h=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(h.authorize())}),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(11,"ion-row")(12,"ion-col")(13,"div",16)(14,"div",17)(15,"div",18),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(18,"div",19),e.\u0275\u0275element(19,"div",20),e.\u0275\u0275elementStart(20,"div",21),e.\u0275\u0275text(21),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(22,"div",22)(23,"div",18),e.\u0275\u0275text(24),e.\u0275\u0275pipe(25,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",19),e.\u0275\u0275text(27),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(28,"div",23)(29,"div",18),e.\u0275\u0275text(30),e.\u0275\u0275pipe(31,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(32,"div",19),e.\u0275\u0275text(33),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(34,"div",24)(35,"div",18),e.\u0275\u0275text(36),e.\u0275\u0275pipe(37,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(38,"div",19),e.\u0275\u0275text(39),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(40,"div",25)(41,"div",18),e.\u0275\u0275text(42),e.\u0275\u0275pipe(43,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"div",19),e.\u0275\u0275text(45),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(46,"ion-row")(47,"ion-col")(48,"div",16)(49,"div",17)(50,"div",18),e.\u0275\u0275text(51),e.\u0275\u0275pipe(52,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(53,"div",19),e.\u0275\u0275element(54,"div",20),e.\u0275\u0275elementStart(55,"div",21),e.\u0275\u0275text(56),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(57,"div",22)(58,"div",18),e.\u0275\u0275text(59),e.\u0275\u0275pipe(60,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(61,"div",19),e.\u0275\u0275text(62),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(63,"div",23)(64,"div",18),e.\u0275\u0275text(65),e.\u0275\u0275pipe(66,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(67,"div",19),e.\u0275\u0275text(68),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(69,"div",24)(70,"div",18),e.\u0275\u0275text(71),e.\u0275\u0275pipe(72,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(73,"div",19),e.\u0275\u0275text(74),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(75,"div",25)(76,"div",18),e.\u0275\u0275text(77),e.\u0275\u0275pipe(78,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(79,"div",19),e.\u0275\u0275text(80),e.\u0275\u0275elementEnd()()()()()()}if(2&s){const a=e.\u0275\u0275nextContext();e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,22,"MD_DRIVER_CONFLICT_BTN_CONFIRM_REFUSAL")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,24,"MD_DRIVER_CONFLICT_BTN_ALLOW")," "),e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(17,26,"MD_DRIVER_CONFLICT_REGISTERED_DRIVER")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",a.registeredDriverInvite.driver.fullName," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(25,28,"MD_DRIVER_CONFLICT_LICENSEPLATONE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getLicensePlateOneToBeRendered(a.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(31,30,"MD_DRIVER_CONFLICT_LICENSEPLATTWO")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getLicensePlateTwoToBeRendered(a.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(37,32,"MD_DRIVER_CONFLICT_ON_FOOT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getOnFootToBeRendered(a.registeredDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(43,34,"MD_DRIVER_CONFLICT_VEHICLE_HAS_TRAILER")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getOnFootToBeRendered(a.getHasCartToBeRendered)," "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(52,36,"MD_DRIVER_CONFLICT_DRIVER_CHECKIN")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",a.candidateDriverInvite.driver.fullName," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(60,38,"MD_DRIVER_CONFLICT_LICENSEPLATONE")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getLicensePlateOneToBeRendered(a.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(66,40,"MD_DRIVER_CONFLICT_LICENSEPLATTWO")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getLicensePlateTwoToBeRendered(a.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(72,42,"MD_DRIVER_CONFLICT_ON_FOOT")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getOnFootToBeRendered(a.candidateDriverInvite)," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(78,44,"MD_DRIVER_CONFLICT_VEHICLE_HAS_TRAILER")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",a.getOnFootToBeRendered(a.getHasCartToBeRendered)," ")}}let Re=(()=>{class s{constructor(a,d,h,F,D,W,I){this.modalController=a,this.portalLoginManagerService=d,this.profileManagerService=h,this.logisticEventApiService=F,this.authService=D,this.loadingService=W,this.translateConfigService=I,this.loaded=!1,this.comparePendingApprovals=()=>{const p=this.profileManagerService.getProfileLogistic();return new Promise((T,v)=>{this.authService.getToken().then(z=>this.portalLoginManagerService.getAccessToken(p.login,p.portal,z)).then(z=>this.logisticEventApiService.comparePendingApprovals(this.instanceName,this.inviteId,z.access_token).subscribe(T,v)).catch(v)}).finally(()=>this.loaded=!0)},this.handleComparePendingApprovalsSuccessResponse=p=>{console.log("handleComparePendingApprovalsSuccessResponse:",p),this.loadingService.hide(null,"loading-drivers-data");const T=p.current;this.registeredDriverInvite=p.previous,this.candidateDriverInvite=T},this.handleComparePendingApprovalsErrorResponse=p=>{this.loadingService.hide(null,"loading-drivers-data"),console.log("handleComparePendingApprovalsErrorResponse:",p)},this.getLicensePlateOneToBeRendered=p=>{if(p&&p.driver&&p.driver.licensePlateOne)return p.driver.licensePlateOne},this.getLicensePlateTwoToBeRendered=p=>{if(p&&p.driver&&p.driver.licensePlateTwo)return p.driver.licensePlateTwo},this.getOnFootToBeRendered=p=>{if(p&&p.driver)return this.translateConfigService.translate(p.driver.onFoot?"TEXT_YES":"TEXT_NOT")},this.getHasCartToBeRendered=p=>{if(p&&p.driver)return this.translateConfigService.translate(p.driver.hasCart?"TEXT_YES":"TEXT_NOT")},this.deny=()=>{const p={action:"deny",invite:{companyInstance:this.candidateDriverInvite.company.instanceName,inviteId:this.candidateDriverInvite.driver.inviteId,eventId:this.candidateDriverInvite.driver.eventId,event:{eventId:this.candidateDriverInvite.driver.eventId,target:this.candidateDriverInvite.target},...this.candidateDriverInvite}};this.modalController.dismiss(p)},this.authorize=()=>{const p={action:"authorize",invite:{eventId:this.candidateDriverInvite.driver.eventId,companyInstance:this.candidateDriverInvite.company.instanceName,inviteId:this.candidateDriverInvite.driver.inviteId,event:{eventId:this.candidateDriverInvite.driver.eventId,target:this.candidateDriverInvite.target},...this.candidateDriverInvite}};this.modalController.dismiss(p)},this.onClose=()=>{this.modalController.dismiss()}}ngOnInit(){this.loadingService.show(this.translateConfigService.translate("LOADING_DATA"),"loading-drivers-data"),this.comparePendingApprovals().then(this.handleComparePendingApprovalsSuccessResponse).catch(this.handleComparePendingApprovalsErrorResponse)}}return s.\u0275fac=function(a){return new(a||s)(e.\u0275\u0275directiveInject(S.ModalController),e.\u0275\u0275directiveInject(L.dj),e.\u0275\u0275directiveInject(L.v4),e.\u0275\u0275directiveInject(L.cv),e.\u0275\u0275directiveInject(L.e8),e.\u0275\u0275directiveInject(L.bz),e.\u0275\u0275directiveInject(L.wK))},s.\u0275cmp=e.\u0275\u0275defineComponent({type:s,selectors:[["app-solve-driver-checkin-conflict"]],inputs:{inviteId:"inviteId",instanceName:"instanceName"},decls:14,vars:9,consts:[[3,"ngClass"],[1,"content"],[1,"modal-container"],[1,"modal-title"],[1,"button-holder"],[1,"back",3,"click"],[1,"title"],["class","spinner",4,"ngIf"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],[1,"spinner"],["mode","ios","name","crescent"],[1,"modal-body"],[1,"section","bottom"],[1,"actions","two-or-more"],["type","button",3,"click"],[1,"driver-holder"],[1,"item","driver-details"],[1,"label"],[1,"value"],[1,"photo"],[1,"name"],[1,"item","license-plate-one-details"],[1,"item","license-plate-two-details"],[1,"item","entrance-type-details"],[1,"item","has-cart-details"]],template:function(a,d){1&a&&(e.\u0275\u0275elementStart(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"button",5),e.\u0275\u0275listener("click",function(){return d.onClose()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"div",6),e.\u0275\u0275text(9),e.\u0275\u0275pipe(10,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(11,Oe,2,0,"div",7),e.\u0275\u0275template(12,we,81,46,"div",8),e.\u0275\u0275element(13,"div",9),e.\u0275\u0275elementEnd()()()),2&a&&(e.\u0275\u0275property("ngClass","selector"),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,5,"BTN_BACK")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(10,7,"MD_DRIVER_CONFLICT_TITLE")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!d.loaded),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",d.registeredDriverInvite&&d.candidateDriverInvite&&d.loaded))},dependencies:[B.NgClass,B.NgIf,S.IonCol,S.IonRow,S.IonSpinner,oe.X$],styles:["ion-content.selector.ios[_ngcontent-%COMP%]{--offset-top: 0px !important}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{height:100vh}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%]{box-shadow:0 -6px 3px rgba(0,0,0,.1);margin-top:0;transition:margin-top 1s ease;background-color:#fff;height:100%;overflow:scroll}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%]{display:flex;padding-top:1em;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center;margin:32px;margin-bottom:24px 32px 8px 32px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-title[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{justify-content:center;margin:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:center;align-items:center;flex-direction:column}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .upper-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%]{margin-top:18px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] .bottom-options[_ngcontent-%COMP%] .new-holder[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{margin-top:0;width:100%}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;margin:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions.two-or-more[_ngcontent-%COMP%]{justify-content:space-around}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions.only-one[_ngcontent-%COMP%]{justify-content:center}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1em;color:#0ec254;background-color:#fff;padding:.5em 1.25em;border-radius:32px;border:1px solid #0ec254;transition:background-color .1s ease-out}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#0ec254;color:#fff;transition:background-color .1s ease-out}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%]{padding:16px;border:1px solid #eee;border-radius:8px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{margin-bottom:12px}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:700}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .modal-container[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%] .driver-holder[_ngcontent-%COMP%] .driver-details[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#0ec254}.selector[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:50vh}"]}),s})()},37763:(Ne,ae,m)=>{m.d(ae,{i:()=>se});var e=m(61380),B=m(92198),S=m(45449);let se=(()=>{class J{constructor(j){this.router=j}focusInRouterNavigate(){this.router.events.pipe((0,B.h)(j=>j instanceof e.NavigationEnd)).subscribe(()=>{const j=document.querySelector("#focusHeader");j&&j?.focus()})}applyFocusQuerySelector(j,Q){setTimeout(()=>{document.querySelector(`#${j}`)?.focus()},Q)}}return J.\u0275fac=function(j){return new(j||J)(S.\u0275\u0275inject(e.Router))},J.\u0275prov=S.\u0275\u0275defineInjectable({token:J,factory:J.\u0275fac,providedIn:"root"}),J})()}}]);