1import{a as ie}from"./chunk-7LCJRTXS.js";import{a as ee}from"./chunk-RKUYTL4Q.js";import{a as ne}from"./chunk-CZAB63ZV.js";import{a as Jt}from"./chunk-FRNCVUAB.js";import{a as tt,b as L,c as Xt,d as N,e as et}from"./chunk-ZBKR6MTG.js";import{a as te}from"./chunk-JMSZ3USB.js";import{a as lt}from"./chunk-XRQ7IIIQ.js";import{a as Qt}from"./chunk-C2L6ZWHH.js";import"./chunk-TFR2AXXQ.js";import{a as F,b as v,c as ht}from"./chunk-GHLLGKEN.js";import{a as pt}from"./chunk-SX6IB64Z.js";import{g as X}from"./chunk-BO5XL62I.js";import{a as E}from"./chunk-3U6CY3RB.js";import{d as Kt}from"./chunk-R5DRUBWN.js";import{a as Gt}from"./chunk-FZYML2KV.js";import{a as zt}from"./chunk-5N4WX5KI.js";import{a as Yt}from"./chunk-AUFYYPT2.js";import{a as Wt}from"./chunk-7PAFGJ2M.js";import{l as Zt,s as jt}from"./chunk-Q2LIZUSJ.js";import{a as Ht}from"./chunk-OPXCG33S.js";import{Ea as Ut,aa as K,da as J,ga as qt,t as At,u as Q}from"./chunk-ESWOH4IW.js";import"./chunk-4IAMFFCU.js";import{d as Pt,g as Rt}from"./chunk-NWY46YXD.js";import{b as Ft,c as Nt,d as $t,e as Vt}from"./chunk-7ISFHUQ3.js";import"./chunk-ZLOVQKZF.js";import"./chunk-UUV44MCL.js";import{R as kt,U as Tt,_ as ct,ba as Mt,eb as Et,fc as Bt,ia as Ot,ja as Dt,n as wt,yb as Lt}from"./chunk-ULLOCMAI.js";import{b as Z,d as j,e as W}from"./chunk-XJCPN7HX.js";import{ba as Y,c as bt,l as yt,n as rt}from"./chunk-JF7TYXAT.js";import{$c as St,Aa as st,Ad as xt,Ba as gt,C as U,Da as _t,Db as mt,Ic as w,Kb as H,Ld as vt,M as ot,Md as A,Nc as x,Pc as c,Q as dt,Qb as Ct,Tc as ft,Uc as P,Ud as G,Vc as R,Zc as $,cd as d,dd as at,e as q,ed as m,fa as y,kd as z,nd as It,pc as h,qd as D,rc as p,rd as V,sa as _,tc as T,u as nt,uc as M,ud as g,vb as a,vc as O,vd as I,wc as u,wd as B,xc as r,ya as f,yc as l,za as S,zc as k}from"./chunk-A6O2UMHS.js";import"./chunk-DATWAOVS.js";var ce=["locationSearchInp"],le=["suggestionSearchInp"],he=["locationDropdown"],pe=["suggestionDropdown"],ue=["locationInputEle"],de=["suggestionInputEle"],ge=i=>({"px-4":i}),_e=(i,s)=>({"flex items-center md:hidden":i,hidden:s}),me=i=>({"md:w-full md:px-4 xl:w-full xl:px-4":i}),Ce=(i,s)=>({"hidden md:flex":i,flex:s}),fe=(i,s)=>({"hidden md:flex":i,hidden:s}),Se=i=>({"hide-border":i}),Ie=(i,s)=>({"bg-primary":i,"hospital-search__suggestion__btn--disabled":s}),oe=i=>({location:i}),ut=i=>({key:i}
1);function xe(i,s){i&1&&(r(0,"div",22),k(1,"hd-base-icon",33),l()),i&2&&(a(),u("iconType","hospital")("icon","icon-ic-pin-location-filled"))}function ve(i,s){i&1&&(r(0,"div",24),k(1,"magneto-hd-spinner"),l())}function be(i,s){if(i&1){let e=w();r(0,"li",34),x("click",function(){let o=f(e).$implicit,n=c(2);return S(n.selectLocation(o))}),k(1,"hd-base-icon",33),r(2,"span",35),d(3),l(),r(4,"span",36),d(5),g(6,"uppercase"),g(7,"translate"),l()()}if(i&2){let e=s.$implicit;u("dataTestId","search-bar-desktop-location-option-"+e.name+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-pin-location-filled"),a(2),m(" ",e.name," "),a(2),m(" ",I(7,7,I(6,5,e.type||""))," ")}}function ye(i,s){if(i&1){let e=w();r(0,"div",6)(1,"div",21),h(2,xe,2,2,"div",22),r(3,"input",23,3),g(7,"translate"),x("input",function(){f(e);let o=c();return S(o.onLocationInputClick())})("click",function(){f(e);let o=c();return S(o.onLocationInputClick())})("focus",function(){f(e);let o=c();return o.showMobileLocations=!0,S(o.showMobileSuggestion=!1)})("menuOpened",function(){f(e);let o=c();return S(o.onMatLocationMenuOpen())})("menuClosed",function(){f(e);let o=c();return S(o.onMatDropDownClosed())}),l(),h(8,ve,2,0,"div",24),r(9,"div",25)(10,"span",26)(11,"hd-base-icon",27),x("click",function(){f(e);let o=c();return S(o.selectNearLocation(!0))}),l()()(),r(12,"div",15)(13,"mat-menu",28,4)(15,"li",29),x("click",function(){f(e);let o=c();return S(o.selectNearLocation(!0))}),k(16,"img",30),r(17,"span",31),d(18," Terdekat dengan Saya "),l()(),M(19,be,8,9,"li",32,T),l()()()()}if(i&2){let e=$(14),t=c();u("ngClass",V(14,fe,!t.IsModalSearch()&&!(t.source()==="list"&&t.IsDoctorDiscoveryFlow()),t.source()==="list"&&t.IsDoctorDiscoveryFlow())),a(2),p(t.IsModalSearch()?-1:2),a(),u("placeholder",z(I(7,12,"SEARCH_LOCATION")))("matMenuTriggerFor",e)("maxLength",60)("formControl",t.locationSearch),a(5),p(t.locationLoading?8:-1),a(3),u("iconType","hospital")("icon","icon-ic-geo-location"),a(2),u("backdropClass","location-search-bar_backdrop")("ngClass",D(17,Se,t.locations&&t.locations.length===0)),a(6),O(t.locations)}}function we(i,s){if(i&1){let e=w();r(0,"input",37),g(1,"translate"),x("click",function(){f(e);let o=c(),n=$(27);return S(o.openModal(n))}),l(),r(2,"button",38),x("click",function(){f(e);let o=c(),n=$(27);return S(o.openModal(n))}),st(),r(3,"svg",39),k(4,"path",40),l()()}i&2&&u("placeholder",z(I(1,3,"TYPE_YOUR_SEARCH")))("maxLength",100)}function ke(i,s){i&1&&(r(0,"div",13),k(1,"magneto-hd-spinner"),l())}function Te(i,s){if(i&1){let e=w();r(0,"div",14)(1,"span")(2,"button",41),x("click",function(){f(e);let o=c();return S(o.submitSearch())}),st(),r(3,"svg",42),k(4,"path",43),l(),gt(),r(5,"span"),d(6),g(7,"translate"),l()()()()}if(i&2){let e=c();a(2),u("ngClass",V(7,Ie,e.checkSearchEnable(),!e.checkSearchEnable()))("disabled",!e.checkSearchEnable()),a(2),St("hospital-search__suggestion__btn__search-icon--disabled",!e.checkSearchEnable()),a(2),at(I(7,5,"SEARCH"))}}function Me(i,s){if(i&1){let e=w();r(0,"span",44),x("click",function(){f(e);let o=c();return S(o.searchForLocation())}),r(1,"span",45),d(2),g(3,"translate"),g(4,"translate"),l()()}if(i&2){let e=c();a(2),m(" ",e.userNearBySelected?I(3,1,e.IsDoctorDiscoveryFlow()?"SEE_ALL_NEAR_BY_DOCTORS":"SEE_ALL_NEAR_BY_HOSPITALS"):B(4,3,"SEE_ALL_HOSPITAL_FOR_LOCATION",D(6,oe,e.searchInput==null||e.searchInput.location==null?null:e.searchInput.location.name))," ")}}function Oe(i,s){if(i&1&&(r(0,"span",18)(1,"span",46),d(2),g(3,"translate"),l()()),i&2){let e=c();a(2),m(" ",B(3,1,"NO_SEARCH_RESULT_FOR_KEY",D(4,ut,e.searchSuggestion.value))," ")}}function De(i,s){if(i&1&&(r(0,"span"),d(1),l()),i&2){let e=c(2).$implicit,t=c(3);a(),m(" ",t.getPersonnelName(e.name||e.full_name)," ")}}function Ee(i,s){if(i&1&&d(0),i&2){let e=c(2).$implicit;m(" ",e.name," ")}}function Le(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(3);return S(n.selectSuggestion(o,o.type,"desktop"))}),r(1,"span",49),h(2,De,2,1,"span")(3,Ee,1,1),l(),r(4,"span",50),d(5),g(6,"uppercase"),g(7,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-desktop-doctor-suggestion-"+e.slug+"-btn"),a(2),p(e.type==="personnel"?2:3),a(3),m(" ",I(7,5,I(6,3,e.type))," ")}}
1function Be(i,s){if(i&1&&h(0,Le,8,7,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function Pe(i,s){if(i&1&&M(0,Be,1,1,null,null,T),i&2){let e=c(2);O(e.doctorSuggestions)}}function Re(i,s){if(i&1&&h(0,Pe,2,0),i&2){let e=c();p(e.doctorSuggestions&&e.doctorSuggestions.length>0?0:-1)}}function Fe(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(3);return S(n.selectSuggestion(o,"provider_locations","desktop"))}),r(1,"span",49),d(2),l(),r(3,"span",50),d(4),g(5,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-desktop-provider-location-suggestion-"+e.slug+"-btn"),a(2),m(" ",e.name," "),a(2),m(" ",I(5,3,"PROVIDER_LOCATION_TYPE")," ")}}function Ne(i,s){if(i&1&&h(0,Fe,6,5,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function $e(i,s){if(i&1&&M(0,Ne,1,1,null,null,T),i&2){let e=c(2);O(e.suggestions.provider_locations)}}function Ve(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(3);return S(n.selectSuggestion(o,"departments","desktop"))}),r(1,"span",49),d(2),l(),r(3,"span",50),d(4),g(5,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-desktop-department-suggestion-"+e.slug+"-btn"),a(2),m(" ",e.name," "),a(2),m(" ",I(5,3,"DEPARTMENT_TYPE")," ")}}function Ae(i,s){if(i&1&&h(0,Ve,6,5,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}
1function qe(i,s){if(i&1&&M(0,Ae,1,1,null,null,T),i&2){let e=c(2);O(e.suggestions.departments)}}function Ue(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(3);return S(n.selectSuggestion(o,"medical_procedures","desktop"))}),r(1,"span",49),d(2),l(),r(3,"span",50),d(4),g(5,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-desktop-medical-procedure-suggestion-"+e.slug+"-btn"),a(2),m(" ",e.name," "),a(2),m(" ",I(5,3,"MEDICAL_PROCEDURE_TYPE")," ")}}function He(i,s){if(i&1&&h(0,Ue,6,5,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function ze(i,s){if(i&1&&M(0,He,1,1,null,null,T),i&2){let e=c(2);O(e.suggestions.medical_procedures)}}function Ge(i,s){if(i&1&&(h(0,$e,2,0),h(1,qe,2,0),h(2,ze,2,0)),i&2){let e=c();p(e.suggestions&&e.suggestions.provider_locations&&e.suggestions.provider_locations.length>0?0:-1),a(),p(e.suggestions&&e.suggestions.departments&&e.suggestions.departments.length>0?1:-1),a(),p(e.suggestions&&e.suggestions.medical_procedures&&e.suggestions.medical_procedures.length>0?2:-1)}}function Ye(i,s){i&1&&(r(0,"div",19),d(1),g(2,"translate"),l()),i&2&&(a(),m(" ",I(2,1,"MOBILE_SEARCH_HINT")," "))}function Ze(i,s){if(i&1&&(r(0,"li",55)(1,"span",46),d(2),g(3,"translate"),l()()),i&2){let e=c(3);a(2),m(" ",B(3,1,"NO_SEARCH_RESULT_FOR_KEY",D(4,ut,e.locationSearch.value))," ")}}function je(i,s){if(i&1){let e=w();r(0,"li",57),x("click",function(){let o=f(e).$implicit,n=c(3);return S(n.selectLocation(o))}),k(1,"hd-base-icon",33),r(2,"span",35),d(3),l(),r(4,"span",58),d(5),g(6,"uppercase"),g(7,"translate"),l()()}if(i&2){let e=s.$implicit;u("dataTestId","search-bar-mobile-location-option-"+e.name+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-pin-location-filled"),a(2),m(" ",e.name," "),a(2),m(" ",I(7,7,I(6,5,e.type||""))," ")}}function We(i,s){if(i&1){let e=w();r(0,"div",51)(1,"ul",53)(2,"li",54),x("click",function(){f(e);let o=c(2);return S(o.selectNearLocation(!0))}),k(3,"img",30),r(4,"span",31),d(5," Terdekat dengan Saya "),l()(),h(6,Ze,4,6,"li",55),M(7,je,8,9,"li",56,T),l()()}if(i&2){let e=c(2);a(6),p(!e.locations||e.locations.length===0?6:-1),a(),O(e.locations)}}function Qe(i,s){if(i&1){let e=w();r(0,"li",61),x("click",function(){f(e);let o=c(3);return S(o.searchForLocation())}),r(1,"span",45),d(2),g(3,"translate"),g(4,"translate"),l()()}if(i&2){let e=c(3);a(2),m(" ",e.userNearBySelected?I(3,1,e.IsDoctorDiscoveryFlow()?"SEE_ALL_NEAR_BY_DOCTORS":"SEE_ALL_NEAR_BY_HOSPITALS"):B(4,3,"SEE_ALL_HOSPITAL_FOR_LOCATION",D(6,oe,e.searchInput==null||e.searchInput.location==null?null:e.searchInput.location.name))," ")}}function Ke(i,s){if(i&1&&(r(0,"li",55)(1,"span",46),d(2),g(3,"translate"),l()()),i&2){let e=c(3);a(2),m(" ",B(3,1,"NO_SEARCH_RESULT_FOR_KEY",D(4,ut,e.searchSuggestion.value))," ")}}function Je(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(5);return S(n.selectSuggestion(o,o.type,"mobile"))}),k(1,"hd-base-icon",62),r(2,"span",49),d(3),l(),r(4,"span",50),d(5),g(6,"uppercase"),g(7,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-mobile-doctor-suggestion-"+e.slug+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-right-blue"),a(2),m(" ",e.name||e.full_name," "),a(2),m(" ",I(7,7,I(6,5,e.type))," ")}}function Xe(i,s){if(i&1&&h(0,Je,8,9,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function ti(i,s){if(i&1&&M(0,Xe,1,1,null,null,T),i&2){let e=c(4);O(e.doctorSuggestions)}}function ei(i,s){if(i&1&&h(0,ti,2,0),i&2){let e=c(3);p(e.doctorSuggestions&&e.doctorSuggestions.length>0?0:-1)}}function ii(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(5);return S(n.selectSuggestion(o,"provider_locations","mobile"))}),k(1,"hd-base-icon",62),r(2,"span",49),d(3),l(),r(4,"span",50),d(5),g(6,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-mobile-provider-location-suggestion-"+e.slug+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-right-blue"),a(2),m(" ",e.name," "),a(2),m(" ",I(6,5,"PROVIDER_LOCATION_TYPE")," ")}}function ni(i,s){if(i&1&&h(0,ii,7,7,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function oi(i,s){if(i&1&&M(0,ni,1,1,null,null,T),i&2){let e=c(4);O(e.suggestions.provider_locations)}}function si(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(5);return S(n.selectSuggestion(o,"departments","mobile"))}),k(1,"hd-base-icon",62),r(2,"span",49),d(3),l(),r(4,"span",50),d(5),g(6,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-mobile-department-suggestion-"+e.slug+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-right-blue"),a(2),m(" ",e.name," "),a(2),m(" ",I(6,5,"DEPARTMENT_TYPE")," ")}}function ai(i,s){if(i&1&&h(0,si,7,7,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function ri(i,s){if(i&1&&M(0,ai,1,1,null,null,T),i&2){let e=c(4);O(e.suggestions.departments)}}function ci(i,s){if(i&1){let e=w();r(0,"li",48),x("click",function(){f(e);let o=c().$implicit,n=c(5);return S(n.selectSuggestion(o,"medical_procedures","mobile"))}),k(1,"hd-base-icon",62),r(2,"span",49),d(3),l(),r(4,"span",50),d(5),g(6,"translate"),l()()}if(i&2){let e=c().$implicit;u("dataTestId","search-bar-mobile-medical-procedure-suggestion-"+e.slug+"-btn"),a(),u("iconType","hospital")("icon","icon-ic-right-blue"),a(2),m(" ",e.name," "),a(2),m(" ",I(6,5,"MEDICAL_PROCEDURE_TYPE")," ")}}function li(i,s){if(i&1&&h(0,ci,7,7,"li",47),i&2){let e=s.$implicit;p(e!=null&&e.slug?0:-1)}}function hi(i,s){if(i&1&&M(0,li,1,1,null,null,T),i&2){let e=c(4);O(e.suggestions.medical_procedures)}}function pi(i,s){if(i&1&&(h(0,oi,2,0),h(1,ri,2,0),h(2,hi,2,0)),i&2){let e=c(3);p(e.suggestions&&e.suggestions.provider_locations&&e.suggestions.provider_locations.length>0?0:-1),a(),p(e.suggestions&&e.suggestions.departments&&e.suggestions.departments.length>0?1:-1),a(),p(e.suggestions&&e.suggestions.medical_procedures&&e.suggestions.medical_procedures.length>0?2:-1)}}function ui(i,s){if(i&1&&(r(0,"div",52)(1,"ul",59),h(2,Qe,5,8,"li",60),h(3,Ke,4,6,"li",55),h(4,ei,1,1)(5,pi,3,3),l()()),i&2){let e=c(2);a(2),p(!(e.searchInput==null||e.searchInput.location==null)&&e.searchInput.location.name||e.userNearBySelected?2:-1),a(),p(e.searchSuggestion&&e.searchSuggestion.value&&e.isSuggestionResultEmpty?3:-1),a(),p(e.IsDoctorDiscoveryFlow()?4:5)}}function di(i,s){if(i&1&&(r(0,"div",20),h(1,We,9,1,"div",51),h(2,ui,6,3,"div",52),l()),i&2){let e=c();a(),p(e.showMobileLocations?1:-1),a(),p(e.showMobileSuggestion?2:-1)}}function gi(i,s){if(i&1){let e=w();r(0,"div",63)(1,"h4",64),d(2),g(3,"translate"),l(),r(4,"button",65),x("click",function(){f(e);let o=c();return S(o.closePopup())}),r(5,"span",66),d(6,"\xD7"),l()()(),r(7,"div",67)(8,"magneto-search-bar",68),x("closeModal",function(){f(e);let o=c();return S(o.closePopup())}),l()()}if(i&2){let e=c();a(2),at(I(3,3,"SEARCH_HOSPITAL")),a(6),u("IsDoctorDiscoveryFlow",e.IsDoctorDiscoveryFlow())("IsModalSearch",!0)}}var se=(()=>{let s=class s{constructor(){this.dialog=_(Rt),this.utilitiesService=_(Gt),this.translate=_(Z),this.dataService=_(Q),this.hospitalService=_(te),this.router=_(Y),this.googleTracking=_(J),this.doctorService=_(X),this.breakpointObserver=_(wt),this.locationManager=_(Yt),this.alertService=_(jt),this.sessionStorageService=_(qt),this.utilityService=_(K),this._cdrZoneless=_(G),this.ngUnsubscribe$=new q,this.showSearchTextInput=!0,this.locations=[],this.defaultLocations=[],this.locationLoading=!1,this.suggestionLoading=!1,this.suggestionRequest=new ne,this.doctorSuggestionRequest=new ee(4),this.locationSearch=new ct,this.searchSuggestion=new ct,this.doctorSuggestions=[],this.defaultDoctorSuggestions=[],this.showMobileLocations=!1,this.showMobileSuggestion=!1,this.isSuggestionResultEmpty=!1,this.searchInput=null,this.isDesktop=!1,this.positionOptions={},this.userNearBySelected=!1,this.isShowUpSuggestion=!1,this.IsModalSearch=A(!1),this.IsDoctorDiscoveryFlow=A(!1),this.IsDoctorSpeciality=A(!1),this.source=A("home"),this.closeModal=vt()}ngOnInit(){this.userNearBySelected=this.router.url.includes("terdekat"),!this.utilityService.isServer()&&(this.userLocation=this.sessionStorageService.getItem("USER_LOCATION"),this.userNearBySelected?this.selectNearLocation(!1):this.source()==="list"&&(this.getLatLongWithUserIP(
1),this.getLocationDetails(!0)),this.configureTranslation(),this.breakpointObserver.observe(["(min-width: 768px)"]).pipe(y(this.ngUnsubscribe$)).subscribe(t=>{this.isDesktop=t&&t.matches,this._cdrZoneless.markForCheck()}),this.IsModalSearch()&&this.utilityService.isBrowser()&&U(10).pipe(y(this.ngUnsubscribe$)).subscribe(()=>{this.locationSearchInp&&this.locationSearchInp.nativeElement&&this.locationSearchInp.nativeElement.focus(),this._cdrZoneless.markForCheck()}),this.hospitalService.updateSearchInput(null),this.doctorService.updateSearchInput(null),this.showMobileLocations=!0,this.showMobileSuggestion=!1,this.utilitiesService.configsSubject().pipe(y(this.ngUnsubscribe$)).subscribe(t=>{t&&t.HOSPITAL_CONFIG&&t.HOSPITAL_CONFIG.LOCATIONS&&(this.locations=[...t.HOSPITAL_CONFIG.LOCATIONS],this.defaultLocations=[...this.locations],Ht.production?(this.defaultDoctorSuggestions=t.HOSPITAL_CONFIG.PRODUCTION.DOCTOR.DEFAULT_SUGGESTIONS,this.defaultSuggestions=t.HOSPITAL_CONFIG.PRODUCTION.DEFAULT_SUGGESTIONS):(this.defaultDoctorSuggestions=t.HOSPITAL_CONFIG.STAGE.DOCTOR.DEFAULT_SUGGESTIONS,this.defaultSuggestions=t.HOSPITAL_CONFIG.STAGE.DEFAULT_SUGGESTIONS),this.doctorSuggestions=this.defaultDoctorSuggestions,this.suggestions=this.defaultSuggestions),this._cdrZoneless.markForCheck()},()=>{console.log("Error fetching file"),this._cdrZoneless.markForCheck()}),this.hospitalService.hospitalSearchInput.pipe(y(this.ngUnsubscribe$)).subscribe(t=>{if(this.IsDoctorDiscoveryFlow())return;this.searchInput=t,this.updateLocationInfo();let o=t&&t.suggestion&&t.suggestion.name?t.suggestion.name:this.searchInput&&this.searchInput.searchText,n=t&&t.location&&t.location.name?t.location.name:"";!this.IsDoctorDiscoveryFlow()&&t&&(t.suggestion||t.location)?(this.searchSuggestion.setValue(o),this.locationSearch&&this.locationSearch.value!==n&&!this.userNearBySelected&&this.locationSearch.setValue(n)):(!this.IsDoctorDiscoveryFlow()&&this.searchSuggestion&&t&&!t.suggestion&&this.isDesktop&&this.searchSuggestion.setValue(""),!this.IsDoctorDiscoveryFlow()&&this.locationSearch&&t&&!t.location&&!this.userNearBySelected&&this.locationSearch.setValue("")),this._cdrZoneless.markForCheck()}),this.doctorService.doctorSearchInput.pipe(y(this.ngUnsubscribe$)).subscribe(t=>{if(!this.IsDoctorDiscoveryFlow())return;this.searchInput=t,this.updateLocationInfo();let o=t&&t.suggestion&&t.suggestion.name?t.suggestion.name:this.searchInput&&this.searchInput.searchText,n=t&&t.location&&t.location.name?t.location.name:"";this.IsDoctorDiscoveryFlow()&&t&&(t.suggestion||t.location)?(this.searchSuggestion.setValue(o),this.locationSearch&&this.locationSearch.value!==n&&!this.userNearBySelected&&this.locationSearch.setValue(n)):(this.IsDoctorDiscoveryFlow()&&this.searchSuggestion&&t&&!t.suggestion&&this.searchSuggestion.setValue(""),this.IsDoctorDiscoveryFlow()&&this.locationSearch&&t&&!t.location&&!this.userNearBySelected&&this.locationSearch.setValue("")),this._cdrZoneless.markForCheck()}),this.locationSearch.valueChanges.pipe(ot(300),dt(),nt(t=>{if(t&&t.length>2&&(!this.searchInput||!this.searchInput.location||!this.searchInput.location.name||this.searchInput.location&&this.searchInput.location.name!==t))this.userNearBySelected&&t.toLocaleLowerCase()!=="terdekat"&&(this.userNearBySelected=!1),this.userNearBySelected||(this.locationLoading=!0,this.getLocations(t));else if(!t||t.length<=2)this.searchInput||(this.searchInput=new E,this.searchInput.location=new F),this.searchInput&&!this.searchInput.location&&(this.searchInput.location=new F),this.locations=[...this.defaultLocations],this.getCurrentSuggestion(this.searchSuggestion.value);else{let o=new ht;o.search_text=t,this.userNearBySelected||this.hospitalService.getLocations(o).pipe(y(this.ngUnsubscribe$)).subscribe(n=>{this.locations=[...n.region,...n.city,...n.district],this._cdrZoneless.markForCheck()})}}),y(this.ngUnsubscribe$)).subscribe(()=>{}),this.searchSuggestion.valueChanges.pipe(ot(300),nt(t=>{(!this.searchInput||!this.searchInput.suggestion||!this.searchInput.suggestion.name||this.searchInput.suggestion&&this.searchInput.suggestion.name!==t)&&(this.suggestionLoading=!0,this.IsDoctorDiscoveryFlow()?this.getDoctorSuggestions(t):this.getSuggestions(t))}),y(this.ngUnsubscribe$)).subscribe(()=>{}))}onLocationInputClick(){var t;this.utilityService.isServer()||(this.IsModalSearch()&&this.locationDropdown&&this.locationDropdown.menuOpen&&this.locationDropdown.closeMenu(),this.IsModalSearch()||(t=this.locationDropdown)==null||t.openMenu())}onSuggestionInputClick(){var t;this.utilityService.isServer()||(this.IsModalSearch()&&this.suggestionDropdown&&this.suggestionDropdown.menuOpen&&this.suggestionDropdown.closeMenu(),this.IsModalSearch()||(t=this.suggestionDropdown)==null||t.openMenu())}onMatLocationMenuOpen(){this.utilityService.isBrowser()&&setTimeout(()=>{var t;(t=this.locationInputEle)==null||t.nativeElement.focus(),this.onMatDropDownOpened()},0)}onMatSuggestionMenuOpen(){this.utilityService.isBrowser()&&setTimeout(()=>{var t;(t=this.suggestionInputEle)==null||t.nativeElement.focus(),this.onMatDropDownOpened()},0)}onMatDropDownOpened(){if(this.utilityService.isBrowser()&&!this.utilityService.isMobileDevice()
1){let t=document.getElementsByClassName("page-header")[0];t&&(t.style.zIndex="2200");let o=document.getElementsByClassName("hospital-search__suggestion__btn")[0];o&&(o.style.zIndex="2000");let n=document.getElementsByClassName("hospital-search__append-icon")[0];n&&(n.style.zIndex="2000")}}onMatDropDownClosed(){if(this.utilityService.isBrowser()&&!this.utilityService.isMobileDevice()){let t=document.getElementsByClassName("page-header")[0];t&&(t.style.zIndex="9");let o=document.getElementsByClassName("hospital-search__suggestion__btn")[0];o&&(o.style.zIndex="2");let n=document.getElementsByClassName("hospital-search__append-icon")[0];n&&(n.style.zIndex="2")}}configureTranslation(){let t=this.dataService.currentUserLang;this.translate.use(t)}updateLocationInfo(){this.searchInput&&this.searchInput.location&&this.searchInput.location.type&&this.searchInput.location.name&&(this.suggestionRequest.latitude=void 0,this.suggestionRequest.longitude=void 0,this.doctorSuggestionRequest.latitude=void 0,this.doctorSuggestionRequest.longitude=void 0,this.searchInput.location.type===v.CITY?(this.suggestionRequest.city=this.searchInput.location.name,this.doctorSuggestionRequest.city=this.searchInput.location.name):this.searchInput.location.type===v.DISTRICT?(this.suggestionRequest.district=this.searchInput.location.name,this.doctorSuggestionRequest.region=this.searchInput.location.name):this.searchInput.location.type===v.REGION&&(this.suggestionRequest.region=this.searchInput.location.name,this.doctorSuggestionRequest.region=this.searchInput.location.name))}selectNearLocation(t){this.userNearBySelected=!0,this.isShowUpSuggestion=t,this.userLocation=this.sessionStorageService.getItem("USER_LOCATION"),this.locationSearch.setValue("Terdekat"),(!this.userLocation||!this.userLocation.latitude||!this.userLocation.longitude||this.userLocation&&this.userLocation.isUserIPUsed)&&this.showLocationInfoMsg(
1),!this.userLocation||!this.userLocation.latitude||!this.userLocation.longitude?(this.getLatLongWithUserIP(),this.getLocationDetails(!0)):this.updateUserLocation()}updateUserLocation(){this.suggestionRequest&&(this.suggestionRequest.latitude=this.userLocation&&this.userLocation.latitude?this.userLocation.latitude:void 0,this.suggestionRequest.longitude=this.userLocation&&this.userLocation.longitude?this.userLocation.longitude:void 0,this.suggestionRequest.region="",this.suggestionRequest.city="",this.suggestionRequest.district=""),this.doctorSuggestionRequest&&(this.doctorSuggestionRequest.latitude=this.userLocation&&this.userLocation.latitude?this.userLocation.latitude:void 0,this.doctorSuggestionRequest.longitude=this.userLocation&&this.userLocation.longitude?this.userLocation.longitude:void 0,this.doctorSuggestionRequest.region="",this.doctorSuggestionRequest.city="",this.doctorSuggestionRequest.district=""),this.getCurrentSuggestion(this.searchSuggestion&&this.searchSuggestion.value?this.searchSuggestion.value:""),this.focusSuggestionInput(this.isShowUpSuggestion)}
1showLocationInfoMsg(){this.alertService.setAlerts([new Zt("info","Akses lokasi dibutuhkan untuk memberikan informasi yang lebih akurat",3e3)])}getLocationDetails(t){this.utilityService.isServer()&&this.getLatLongWithUserIP(),this.utilityService.isServer()||(this.positionOptions.enableHighAccuracy=!0,this.locationManager.getLocation(this.positionOptions,t).pipe(y(this.ngUnsubscribe$)).subscribe(o=>{this.userLocation=o,this.sessionStorageService.setItem("USER_LOCATION",o),this.updateUserLocation(),this.hospitalService.locationChanges(!0),this._cdrZoneless.markForCheck()},o=>{o&&(o.error_code===401||o.error_code===415)?(this.showLocationInfoMsg(),this.getLocationDetails(!1)):(o.error_code===403&&this.showLocationInfoMsg(),this.getLatLongWithUserIP()),this._cdrZoneless.markForCheck()}))}getLatLongWithUserIP(){if(!this.userLocation||!this.userLocation.latitude||!this.userLocation.longitude){let t=Object.assign({},this.positionOptions);t.enableHighAccuracy=!1,this.locationManager.getLocation(t,!1).pipe(y(this.ngUnsubscribe$)).subscribe(o=>{this.userLocation=o,this.sessionStorageService.setItem("USER_LOCATION",o),this.updateUserLocation(),this._cdrZoneless.markForCheck()},o=>{console.log(o),this._cdrZoneless.markForCheck()})}}openModal(t){if(!t)return;this.showSearchTextInput=!1;let o=new Pt;o.panelClass="hospital-search-modal",this.modalRef=this.dialog.open(t,o),this.searchInput||(this.searchInput=new E),this.searchInput.suggestion=new L,this.IsDoctorDiscoveryFlow()?this.doctorService.updateSearchInput(this.searchInput):this.hospitalService.updateSearchInput(this.searchInput),this.showMobileLocations=!0,this.showMobileSuggestion=!1}getCurrentSuggestion(t){this.IsDoctorDiscoveryFlow()?this.getDoctorSuggestions(t||""):this.getSuggestions(t||"")}getDoctorSuggestions(t){this.doctorSuggestionRequest.search_text=t,this.searchInput||(this.searchInput=new E),this.searchInput.searchText=t;let o=this.locationSearch&&this.locationSearch.value?this.locationSearch.value:"";if((!t||t.length<3)&&o.length===0){this.doctorSuggestions=this.defaultDoctorSuggestions,this.suggestionLoading=!1,this.searchInput.suggestion=new L;return}this.searchInput&&this.searchInput.suggestion&&this.searchInput.searchText!==this.searchInput.suggestion.name&&(this.searchInput.suggestion=new L),this.doctorService.getSuggestions(this.doctorSuggestionRequest).pipe(y(this.ngUnsubscribe$)).subscribe(n=>{let C=[];n&&n.personnels&&n.personnels.length>0&&(n.personnels.forEach(b=>{let it=(b.pre_salutation&&b.pre_salutation!=="-"?b.pre_salutation+" ":"")+(b.full_name&&b.full_name!=="-"?b.full_name:"")+(b.post_salutation&&b.post_salutation!=="-"?" "+b.post_salutation:"");b.full_name=it,b.type=N.PERSONNEL}),C=C.concat(n.personnels)),n&&n.specialities&&n.specialities.length>0&&(n.specialities.forEach(b=>{b.type=N.SPECIALITY}),C=C.concat(n.specialities)),this.doctorSuggestions=C,this.searchInput||(this.searchInput=new E),this.searchInput.suggestion||(this.searchInput.suggestion=new L),this.suggestionLoading=!1,this.showMobileLocations=!1,this.showMobileSuggestion=!0,C.length===0?this.isSuggestionResultEmpty=!0:this.isSuggestionResultEmpty=!1,this._cdrZoneless.markForCheck()},()=>{this.suggestionLoading=!1,this.isSuggestionResultEmpty=!0,this.doctorSuggestions=[],this.searchInput&&(this.searchInput.searchText=t),this._cdrZoneless.markForCheck()})}getSuggestions(t){this.suggestionRequest.search_text=t,this.searchInput||(this.searchInput=new E),this.searchInput.searchText=t;let o=this.locationSearch&&this.locationSearch.value?this.locationSearch.value:"";if((!t||t.length<3)&&o.length===0){this.suggestions=this.defaultSuggestions,this.suggestionLoading=!1,this.searchInput.suggestion=new L;return}this.searchInput&&this.searchInput.suggestion&&this.searchInput.searchText!==this.searchInput.suggestion.name&&(this.searchInput.suggestion=new L),this.hospitalService.getSuggestions(this.suggestionRequest).pipe(y(this.ngUnsubscribe$)).subscribe(n=>{this.suggestions=n,this.searchInput||(this.searchInput=new E),this.searchInput.suggestion||(this.searchInput.suggestion=new L),this.suggestionLoading=!1,this.showMobileLocations=!1,this.showMobileSuggestion=!0,n&&n.departments&&n.departments.length===0&&n.medical_procedures&&n.medical_procedures.length===0&&n.provider_locations&&n.provider_locations.length===0?this.isSuggestionResultEmpty=!0:this.isSuggestionResultEmpty=!1,this._cdrZoneless.markForCheck()},()=>{this.suggestionLoading=!1,this.suggestions=new Xt,this.searchInput&&(this.searchInput.searchText=t),this._cdrZoneless.markForCheck()})}checkSearchEnable(){return this.searchInput&&this.searchInput.location&&this.searchInput.location.name||this.searchSuggestion.value}getLocations(t){if(this.userNearBySelected)return;let o=new ht;o.search_text=t,this.hospitalService.getLocations(o).pipe(y(this.ngUnsubscribe$)).subscribe(n=>{this.locations=[...n.region,...n.city,...n.district],this.IsModalSearch()||this.getCurrentSuggestion(this.searchSuggestion&&this.searchSuggestion.value?this.searchSuggestion.value:""),this.searchInput||(this.searchInput=new E,this.searchInput.location=new F),this.searchInput&&!this.searchInput.location&&(this.searchInput.location=new F),this.searchInput.location=new F,this.searchInput&&this.searchInput.location&&this.searchInput.location.name!==t&&t.length>0&&(this.searchInput.location.name=t,this.searchInput.location.type=v.CITY,this.searchInput.location.slug=t.replace(/ /g,"-").toLowerCase()),this.locationLoading=!1,this.IsModalSearch()&&(!this.suggestionRequest.city||!this.suggestionRequest.district)&&(this.showMobileLocations=!0,this.showMobileSuggestion=!1),this._cdrZoneless.markForCheck()},()=>{this.locationLoading=!1,this.locations=[...this.defaultLocations],this._cdrZoneless.markForCheck()})}selectLocation(t){this.userNearBySelected=!1,this.suggestionRequest.latitude=void 0,this.suggestionRequest.longitude=void 0,this.doctorSuggestionRequest.latitude=void 0,this.doctorSuggestionRequest.longitude=void 0,this.doctorSuggestionRequest.region="",this.doctorSuggestionRequest.city="",this.doctorSuggestionRequest.district="",this.suggestionRequest.region="",this.suggestionRequest.city="",this.suggestionRequest.district="",t&&t.name&&t.type===v.CITY?this.IsDoctorDiscoveryFlow()?this.doctorSuggestionRequest.city=t.name:this.suggestionRequest.city=t.name:t&&t.name&&t.type===v.DISTRICT?this.IsDoctorDiscoveryFlow()?this.doctorSuggestionRequest.district=t.name:this.suggestionRequest.district=t.name:t&&t.name&&t.type===v.REGION?this.IsDoctorDiscoveryFlow()?this.doctorSuggestionRequest.region=t.name:this.suggestionRequest.region=t.name:this.IsDoctorDiscoveryFlow()?this.doctorSuggestionRequest.city=this.doctorSuggestionRequest.district=this.doctorSuggestionRequest.region="":this.suggestionRequest.city=this.suggestionRequest.district=this.suggestionRequest.region="",(!this.searchInput||!this.searchInput.location)&&(this.searchInput||(this.searchInput=new E),this.searchInput.location=new F),this.searchInput.location=t,this.IsDoctorDiscoveryFlow()?this.doctorService.updateSearchInput(this.searchInput):this.hospitalService.updateSearchInput(this.searchInput),this.showMobileLocations=!1,this.showMobileSuggestion=!0,this.focusSuggestionInput()}focusSuggestionInput(t=!0){this.utilityService.isBrowser()&&U(10).pipe(y(this.ngUnsubscribe$)).subscribe(()=>{if(this.suggestionSearchInp&&this.suggestionSearchInp.nativeElement&&this.suggestionSearchInp.nativeElement.value.length===0)t&&(this.suggestionSearchInp.nativeElement.focus(),this.suggestionSearchInp.nativeElement.click());else{this.IsDoctorDiscoveryFlow()?this.searchDoctor():this.searchHospital();return}this._cdrZoneless.markForCheck()})}selectSuggestion(t,o,n="desktop"){if(this.searchSuggestion.setValue(t.name),t.type=o,this.searchInput||(this.searchInput=new E,this.searchInput.suggestion=new L),this.searchInput.suggestion=t,this.searchInput.searchText="",this.showMobileLocations=!1,this.showMobileSuggestion=!1,this.IsDoctorDiscoveryFlow()){if(t.type===et.PERSONNEL){n==="mobile"&&this.closeModal.emit(!0),this.searchDoctor();return}this.doctorService.updateSearchInput(this.searchInput)}else{if(t.type===N.PROVIDER_LOCATION){n==="mobile"&&this.closeModal.emit(!0),this.searchHospital();return}this.hospitalService.updateSearchInput(this.searchInput)}if(this.locationSearchInp&&this.locationSearchInp.nativeElement&&this.locationSearchInp.nativeElement.value.length===0&&!this.userNearBySelected)this.locationSearchInp.nativeElement.focus(),this.utilityService.isBrowser()&&U(10).pipe(y(this.ngUnsubscribe$)).subscribe(()=>{var C;(C=this.locationSearchInp)==null||C.nativeElement.click(),this._cdrZoneless.markForCheck()});else{this.IsDoctorDiscoveryFlow()?this.searchDoctor():this.searchHospital();return}if(n==="mobile"){this.closeModal.emit(!0),this.IsDoctorDiscoveryFlow()?this.searchDoctor():this.searchHospital();return}}
1closePopup(){var t;(t=this.modalRef)==null||t.close(),this.showSearchTextInput=!0}submitSearch(){this.IsDoctorDiscoveryFlow()?this.searchDoctor():this.searchHospital()}searchForLocation(){this.searchInput&&(this.searchInput.suggestion||this.searchInput.searchText)&&(this.searchInput.suggestion=void 0,this.searchInput.searchText="",this.IsDoctorDiscoveryFlow()?this.doctorService.updateSearchInput(this.searchInput):this.hospitalService.updateSearchInput(this.searchInput)),this.IsDoctorDiscoveryFlow()?this.searchDoctor():this.searchHospital()}searchDoctor(){if(this.searchInput&&this.searchInput.suggestion&&this.searchInput.suggestion.type)switch(this.searchInput.suggestion.type){case et.PERSONNEL:this.router.navigate([`/cari-dokter/nama/${this.searchInput.suggestion.slug}`]);break;case et.SPECIALITY:{this.userNearBySelected?this.router.navigate([`/cari-dokter/terdekat/spesialis/${this.searchInput.suggestion.slug}`]):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/cari-dokter/wilayah/${this.searchInput.location.slug}/spesialis/${this.searchInput.suggestion.slug}`]):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/cari-dokter"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/spesialis/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/cari-dokter/${this.searchInput.location.slug}/spesialis/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/cari-dokter/spesialis/${this.searchInput.suggestion.slug}`]);break}}else this.searchInput&&this.searchInput.searchText?this.userNearBySelected?this.router.navigate(["/cari-dokter/terdekat/search"],{queryParams:{q:this.searchInput.searchText}}):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/cari-dokter/wilayah/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/cari-dokter"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.router.navigate([`/cari-dokter/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.router.navigate(["/cari-dokter/search"],{queryParams:{q:this.searchInput.searchText}}):this.userNearBySelected?this.router.navigate(["/cari-dokter/terdekat"]):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/cari-dokter/wilayah/${this.searchInput.location.slug}/search`]):this.searchInput.location.type===v.CITY?this.router.navigate([`/cari-dokter/${this.searchInput.location.slug}/search`]):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/cari-dokter"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/search`]):this.router.navigate([`/cari-dokter/${this.searchInput.location.slug}/search`]):this.router.navigate(["/cari-dokter/search"]);this.closeModal.emit(!0)}searchHospital(){if(this.searchInput&&this.searchInput.suggestion&&this.searchInput.suggestion.type)switch(this.searchInput.suggestion.type){case N.PROVIDER_LOCATION:this.router.navigate([`/rumah-sakit/nama/${this.searchInput.suggestion.slug}`]);break;case N.DEPARTMENT:{this.userNearBySelected?this.router.navigate([`/rumah-sakit/terdekat/poliklinik/${this.searchInput.suggestion.slug}`]):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/rumah-sakit/wilayah/${this.searchInput.location.slug}/poliklinik/${this.searchInput.suggestion.slug}`]):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/rumah-sakit"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/poliklinik/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/rumah-sakit/${this.searchInput.location.slug}/poliklinik/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/rumah-sakit/poliklinik/${this.searchInput.suggestion.slug}`]);break}case N.MEDICAL_PROCEDURE:{this.userNearBySelected?this.router.navigate([`/rumah-sakit/terdekat/tindakan-medis/${this.searchInput.suggestion.slug}`]):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/rumah-sakit/wilayah/${this.searchInput.location.slug}/tindakan-medis/${this.searchInput.suggestion.slug}`]):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/rumah-sakit"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/tindakan-medis/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/rumah-sakit/${this.searchInput.location.slug}/tindakan-medis/${this.searchInput.suggestion.slug}`]):this.router.navigate([`/rumah-sakit/tindakan-medis/${this.searchInput.suggestion.slug}`]);break}}else this.searchInput&&this.searchInput.searchText?this.userNearBySelected?this.router.navigate(["/rumah-sakit/terdekat/search"],{queryParams:{q:this.searchInput.searchText}}):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/rumah-sakit/wilayah/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/rumah-sakit"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.router.navigate([`/rumah-sakit/${this.searchInput.location.slug}/search`],{queryParams:{q:this.searchInput.searchText}}):this.router.navigate(["/rumah-sakit/search"],{queryParams:{q:this.searchInput.searchText}}):this.userNearBySelected?this.router.navigate(["/rumah-sakit/terdekat"]):this.searchInput&&this.searchInput.location&&this.searchInput.location.slug?this.searchInput.location.type===v.REGION?this.router.navigate([`/rumah-sakit/wilayah/${this.searchInput.location.slug}/search`]):this.searchInput.location.type===v.CITY?this.router.navigate([`/rumah-sakit/${this.searchInput.location.slug}/search`]):this.searchInput.location.type===v.DISTRICT?this.router.navigate(["/rumah-sakit"+(this.searchInput.location.city&&this.searchInput.location.city.slug?`/${this.searchInput.location.city.slug}`:"")+`/kecamatan/${this.searchInput.location.slug}/search`]):this.router.navigate([`/rumah-sakit/${this.searchInput.location.slug}/search`]):this.router.navigate(["/rumah-sakit/search"]);this.closeModal.emit(!0)}getPersonnelName(t){return t?t.split("-").join("").trim():"-"}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=H({type:s,selectors:[["magneto-search-bar"]],viewQuery:function(o,n){if(o&1&&ft(ce,7)(le,7)(he,5)(pe,5)(ue,5)(de,5),o&2){let C;P(C=R())&&(n.locationSearchInp=C.first),P(C=R())&&(n.suggestionSearchInp=C.first),P(C=R())&&(n.locationDropdown=C.first),P(C=R())&&(n.suggestionDropdown=C.first),P(C=R())&&(n.locationInputEle=C.first),P(C=R())&&(n.suggestionInputEle=C.first)}},inputs:{IsModalSearch:[1,"IsModalSearch"],IsDoctorDiscoveryFlow:[1,"IsDoctorDiscoveryFlow"],IsDoctorSpeciality:[1,"IsDoctorSpeciality"],source:[1,"source"]},outputs:{closeModal:"closeModal"},decls:28,vars:38,consts:[["suggestionDropdown","matMenuTrigger","suggestionSearchInp","","suggestionInputEle",""],["suggestionMenu","matMenu"],["searchModal",""],["locationDropdown","matMenuTrigger","locationSearchInp","","locationInputEle",""],["locationMenu","matMenu"],[1,"hospital-search","flex","mx-0","flex-wrap",3,"ngClass"],[1,"w-full","max-w-[100%]","min-w-[100%]","md:px-4","md:max-w-[33.33%]","md:min-w-[33.33%]","xl:max-w-[33.33%]","xl:min-w-[33.33%]","hospital-search__location",3,"ngClass"],["dataTestId","search-bar-location-label-btn",1,"w-full","hospital-search__location-label","px-0",3,"click","ngClass"],["
1iconHeight","24px","iconWidth","24px",1,"icon",3,"iconType","icon"],[1,"value","px-1"],["iconHeight","13px","iconWidth","13px",1,"icon","ml-1",3,"iconType","icon"],[1,"w-full","max-w-[100%]","min-w-[100%]","flex","md:max-w-[66.67%]","md:min-w-[66.67%]","xl:max-w-[66.67%]","xl:min-w-[66.67%]","hospital-search__suggestion","items-center",3,"ngClass"],["id","suggestion-search-input","autocomplete","none","aria-controls","suggestion-dropdown",1,"form-control","hospital-search__suggestion--input",3,"input","click","focus","keyup.enter","menuOpened","menuClosed","matMenuTriggerFor","maxLength","formControl","placeholder","ngClass"],["role","status",1,"spinner-container","flex","justify-center","items-center"],[1,"hospital-search__suggestion__btn","hidden","md:block"],[1,"hidden","md:block"],["xPosition","after","id","suggestion-dropdown","role","menu","aria-labelledby","button-split",1,"hospital-search__suggestion--dropdown",3,"backdropClass"],["dataTestId","search-bar-desktop-see-all-location-btn","mat-menu-item","",1,"list-group-item","list-group-item-action","text-center","p-0"],["mat-menu-item","",1,"list-group-item","list-group-item-action"],[1,"w-full","px-4","hospital-search__suggestion--help","flex","md:hidden","my-2","sm:my-4"],[1,"hospital-search-mobile"],[1,"w-full","flex"],[1,"flex","hospital-search__prepend-icon"],["id","location-search-input","autocomplete","none","aria-controls","location-dropdown",1,"form-control","hospital-search__location--input",3,"input","click","focus","menuOpened","menuClosed","matMenuTriggerFor","maxLength","formControl","placeholder"],[1,"spinner-container","w-full","flex","justify-end","items-end","my-2"],[1,"-ml-px","flex"],[1,"flex","items-center","hospital-search__append-icon"],["id","geo-location-btn","iconHeight","24px","iconWidth","24px",1,"icon",3,"click","iconType","icon"],["id","location-dropdown",1,"hospital-search__location--dropdown",3,"backdropClass","ngClass"],["dataTestId","search-bar-desktop-near-location-btn","mat-menu-item","",1,"hospital-search__location--option","list-group-item","list-group-item-action","flex",3,"click"],["loading","lazy","src","/assets/svg/hospital/ic-location-transparent.svg","alt","Terdekat",1,"near-loc"],[1,"location-near"],["mat-menu-item","",1,"hospital-search__location--option","list-group-item","list-group-item-action","flex",3,"dataTestId"],["iconHeight","2em","iconWidth","2em",1,"icon",3,"iconType","icon"],["mat-menu-item","",1,"hospital-search__location--option","list-group-item","list-group-item-action","flex",3,"click","dataTestId"],[1,"location-name"],[1,"location-type","hospital-search__location--option--type"],["dataTestId","search-bar-input","type","text","aria-describedby","basic-addon2",1,"form-control","hospital-search__suggestion--input-sm","block","md:hidden",3,"click","maxLength","placeholder"],["dataTestId","search-bar-button","type","button",1,"text-base","border-[transparent]","bg-[transparent]","py-1.5","px-4","search-icon","flex","md:hidden",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16"],["fill","#E0004D","fill-rule","nonzero","d","M15.608 13.718l-3.475-3.476c-.019-.019-.04-.032-.06-.049a6.578 6.578 0 1 0-1.88 1.88c.017.02.03.041.048.06l3.476 3.475a1.337 1.337 0 0 0 1.891-1.89zm-9.03-2.842a4.298 4.298 0 1 1 0-8.596 4.298 4.298 0 0 1 0 8.596z"],["id","search-submit-btn","type","button",1,"py-2","flex","items-center","justify-center",3,"click","ngClass","disabled"],["xmlns","http://www.w3.org/2000/svg","width","16","height","18","viewBox","0 0 16 16",1,"hospital-search__suggestion__btn__search-icon"],["fill","#FFF","fill-rule","nonzero","d","M15.608 13.718l-3.475-3.476c-.019-.019-.04-.032-.06-.049a6.578 6.578 0 1 0-1.88 1.88c.017.02.03.041.048.06l3.476 3.475a1.337 1.337 0 0 0 1.891-1.89zm-9.03-2.842a4.298 4.298 0 1 1 0-8.596 4.298 4.298 0 0 1 0 8.596z"],["dataTestId","search-bar-desktop-see-all-location-btn","mat-menu-item","",1,"list-group-item","list-group-item-action","text-center","p-0",3,"click"],[1,"text-primary"],[1,"hospital-search__no-result"],[1,"list-group-item","list-group-item-action","flex",3,"dataTestId"],[1,"list-group-item","list-group-item-action","flex",3,"click","dataTestId"],[1,"suggestion-value"],[1,"suggestion-type"],[1,"block","md:hidden","w-full","list-group"],[1,"block","md:hidden","w-full"],[1,"list-group","hospital-search-mobile__location--dropdown"],["dataTestId","search-bar-mobile-near-location-btn",1,"list-group-item","list-group-item-action","hospital-search__location--option","flex",3,"click"],[1,"list-group-item","list-group-item-action"],[1,"list-group-item","list-group-item-action","hospital-search__location--option","flex",3,"dataTestId"],[1,"list-group-item","list-group-item-action","hospital-search__location--option","flex",3,"click","dataTestId"],[1,"location-type","hospital-search-mobile__location--option--type"],[1,"list-group","hospital-search__suggestion--dropdown"],["dataTestId","search-bar-mobile-see-all-location-btn",1,"list-group-item","list-group-item-action","text-center"],["dataTestId","search-bar-mobile-see-all-location-btn",1,"list-group-item","list-group-item-action","text-center",3,"click"],[1,"icon","mr-2",3,"iconType","icon"],[1,"flex","border-b","border-[#dee2e6]","justify-between","p-4"],[1,"modal-title","hospital-search__modal-title"],["id","close-search-modal-btn","type","button",1,"close","text-2xl",3,"click"],["aria-hidden","true"],[1,"modal-body","px-0","py-0"],[3,"closeModal","IsDoctorDiscoveryFlow","IsModalSearch"]],template:function(o,n){if(o&1){let C=w();r(0,"div",5),h(1,ye,21,19,"div",6),r(2,"div",7),x("click",function(){f(C);let it=$(27);return S(n.openModal(it))}
1),k(3,"hd-base-icon",8),r(4,"span",9),d(5),g(6,"translate"),l(),k(7,"hd-base-icon",10),l(),r(8,"div",11),h(9,we,5,5),r(10,"input",12,0),g(14,"translate"),x("input",function(){return n.onSuggestionInputClick()})("click",function(){return n.onSuggestionInputClick()})("focus",function(){return f(C),n.showMobileSuggestion=!0,S(n.showMobileLocations=!1)})("keyup.enter",function(){return n.submitSearch()})("menuOpened",function(){return n.onMatSuggestionMenuOpen()})("menuClosed",function(){return n.onMatDropDownClosed()}),l(),h(15,ke,2,0,"div",13),h(16,Te,8,10,"div",14),r(17,"div",15)(18,"mat-menu",16,1),h(20,Me,5,8,"span",17),h(21,Oe,4,6,"span",18),h(22,Re,1,1)(23,Ge,3,3),l()()(),h(24,Ye,3,3,"div",19),l(),h(25,di,3,2,"div",20),Ct(26,gi,9,5,"ng-template",null,2,xt)}if(o&2){let C=$(19);u("ngClass",D(28,ge,n.IsModalSearch())),a(),p(n.IsModalSearch()||n.isDesktop?1:-1),a(),u("ngClass",V(30,_e,!n.IsModalSearch(),n.IsModalSearch())),a(),u("iconType","hospital")("icon","icon-ic-pin-location-filled"),a(2),m(" ",(n.searchInput==null||n.searchInput.location==null?null:n.searchInput.location.name)||(n.userNearBySelected?"Terdekat":I(6,24,"SEARCH_LOCATION"))," "),a(2),u("iconType","hospital")("icon","icon-ic-down-blue"),a(),u("ngClass",D(33,me,n.source()==="list"&&n.IsDoctorDiscoveryFlow())),a(),p(!n.IsModalSearch()&&n.showSearchTextInput?9:-1),a(),u("placeholder",z(I(14,26,n.IsDoctorSpeciality()?"FIND_A_DOCTOR_SPECIALIST":n.isDesktop?"NAME_OF_HOSPITAL_DEPARTMENT":"TYPE_YOUR_SEARCH")))("matMenuTriggerFor",C)("maxLength",100)("formControl",n.searchSuggestion)("ngClass",V(35,Ce,!n.IsModalSearch(),n.IsModalSearch())),a(5),p(n.suggestionLoading?15:-1),a(),p(n.IsModalSearch()?-1:16),a(2),u("backdropClass","suggestion-search-bar_backdrop"),a(2),p(!(n.searchInput==null||n.searchInput.location==null)&&n.searchInput.location.name||n.userNearBySelected?20:-1),a(),p(n.searchSuggestion&&n.searchSuggestion.value&&n.isSuggestionResultEmpty?21:-1),a(),p(n.IsDoctorDiscoveryFlow()?22:23),a(2),p(n.IsModalSearch()?24:-1),a(),p(n.IsModalSearch()?25:-1)}},dependencies:[s,Et,Bt,At,W,Vt,Nt,Ft,$t,Ot,kt,Tt,Dt,Mt,Lt,bt,j,yt],styles:[".hospital-search[_ngcontent-%COMP%]{background-color:#fff;margin-top:1rem;font-weight:400;font-size:1rem;border:1px solid lightgray;border-radius:30px;padding:6px 10px}.hospital-search__location--input[_ngcontent-%COMP%]{border:none;font-size:18px;caret-color:#05c3de;color:#53565a;font-weight:700}@media(max-width:991px){.hospital-search__location--input[_ngcontent-%COMP%]{font-size:14px;margin-top:3px}}.hospital-search__location--input[_ngcontent-%COMP%]::placeholder{color:#999}.hospital-search__location--option[_ngcontent-%COMP%]{font-weight:400;font-size:14px;color:#53565a}.hospital-search__location--option--type[_ngcontent-%COMP%]{color:#999}@media(max-width:991px){.hospital-search__location--option[_ngcontent-%COMP%]{font-size:12px}}.hospital-search__location--option[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .hospital-search__location--option[_ngcontent-%COMP%] .near-loc[_ngcontent-%COMP%]{margin-right:10px}.hospital-search__location--option[_ngcontent-%COMP%] .location-name[_ngcontent-%COMP%]{margin-right:8px;color:#53565a}.hospital-search__location--option[_ngcontent-%COMP%] .location-near[_ngcontent-%COMP%]{color:#e0004d;font-weight:700}.hospital-search__location--option[_ngcontent-%COMP%] .location-type[_ngcontent-%COMP%]{flex:1 1 0%;justify-content:flex-end;display:flex;color:#999}.hospital-search__location--dropdown[_ngcontent-%COMP%]{height:auto;max-height:237px;overflow-y:scroll;padding:0!important;margin:15px 0 0!important;width:100%;border-radius:18px;box-shadow:0 0 5px #0003;background-color:#fff}.hospital-search__prepend-icon[_ngcontent-%COMP%]{align-items:center}.hospital-search__append-icon[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding-right:8px;border-right:solid 2px #e4e4e4;border-radius:0!important}.hospital-search__suggestion[_ngcontent-%COMP%]{padding-left:0;padding-right:0;background-color:#fff}.hospital-search__suggestion--input[_ngcontent-%COMP%]{border:none;height:auto!important;font-weight:700;font-size:18px;color:#53565a;caret-color:#05c3de}
1@media(max-width:991px){.hospital-search__suggestion--input[_ngcontent-%COMP%]{font-size:14px}}.hospital-search__suggestion--input[_ngcontent-%COMP%]::placeholder{color:#999}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%]{font-weight:400;font-size:14px;color:#53565a;overflow-y:scroll;padding:0!important;margin:15px 0 0!important;width:100%;border-radius:18px;box-shadow:0 0 5px #0003;background-color:#fff;z-index:1021}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .suggestion-value[_ngcontent-%COMP%]{margin-right:8px;color:#53565a}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .suggestion-type[_ngcontent-%COMP%]{color:#999;flex:1 1 0%;justify-content:flex-end;display:flex}.hospital-search__suggestion__btn[_ngcontent-%COMP%]{margin-left:2px;margin-top:1px}.hospital-search__suggestion__btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:30px;font-size:14px;text-align:center;color:#fff;min-width:100px;font-weight:700;border:1px transparent}.hospital-search__suggestion__btn--disabled[_ngcontent-%COMP%]{background-color:#f0f0f0;color:#999!important}.hospital-search__suggestion__btn__search-icon[_ngcontent-%COMP%]{margin-right:8px;padding-bottom:1px}.hospital-search__suggestion__btn__search-icon--disabled[_ngcontent-%COMP%]{fill:#999}.hospital-search__no-result[_ngcontent-%COMP%]{color:#999}.hospital-search[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{font-size:1rem}.list-group-item[_ngcontent-%COMP%]{cursor:pointer;min-height:48px;align-items:center;border:.5px solid rgba(0,0,0,.125);padding:.75rem 1.25rem;background-color:#fff}.list-group-item-action[_ngcontent-%COMP%]:focus{background-color:unset}@media(max-width:767px){.hospital-search-mobile__location--dropdown[_ngcontent-%COMP%]{height:auto;max-height:237px;overflow-y:scroll;-webkit-overflow-scrolling:touch;padding:0!important;margin:15px 0 0!important;width:100%;background-color:#fff}.hospital-search-mobile__location--dropdown[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{cursor:pointer;min-height:48px;align-items:center;font-weight:400}.hospital-search-mobile__location--option[_ngcontent-%COMP%]{font-size:12px;color:#53565a}.hospital-search-mobile__location--option--type[_ngcontent-%COMP%]{color:#999}.hospital-search-mobile__location--option[_ngcontent-%COMP%] .near-loc[_ngcontent-%COMP%]{margin-right:10px}.hospital-search-mobile__location--option[_ngcontent-%COMP%] .location-near[_ngcontent-%COMP%]{color:#e0004d;font-weight:700}.hospital-search-mobile__location--option[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-right:10px}.hospital-search-mobile__location--option[_ngcontent-%COMP%] .location-name[_ngcontent-%COMP%]{margin-right:8px;color:#53565a;font-weight:400}.hospital-search-mobile__location--option[_ngcontent-%COMP%] .location-type[_ngcontent-%COMP%]{flex:1 1 0%;justify-content:flex-end;display:flex;color:#999}.hospital-search[_ngcontent-%COMP%]{font-weight:400;font-size:1rem;border-radius:30px;padding:15px 0 4px;border:none;margin-top:0}.hospital-search__modal-title[_ngcontent-%COMP%]{color:#53565a;font-size:20px}.hospital-search__location-label[_ngcontent-%COMP%]{padding-right:0;cursor:pointer}.hospital-search__location-label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;color:#53565a}.hospital-search__location[_ngcontent-%COMP%]{border:1px solid lightgray;border-radius:30px;background-color:#fff;padding:4px 2px}.hospital-search__location--input[_ngcontent-%COMP%]{border:none;font-size:14px;color:#53565a;margin:3px;caret-color:#05c3de}.hospital-search__location--dropdown[_ngcontent-%COMP%]{height:auto;max-height:238px;overflow-y:scroll;padding:0!important;margin:15px 0 0!important;width:100%;background-color:#fff}.hospital-search__location--dropdown[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{cursor:pointer;min-height:48px;align-items:center}.hospital-search__location--option[_ngcontent-%COMP%]{font-size:12px;color:#53565a}.hospital-search__location--option--type[_ngcontent-%COMP%]{color:#999}.hospital-search__location--option[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%], .hospital-search__location--option[_ngcontent-%COMP%] .near-loc[_ngcontent-%COMP%]{margin-right:10px}.hospital-search__location--option[_ngcontent-%COMP%] .location-near[_ngcontent-%COMP%]{color:#e0004d;font-weight:700}.hospital-search__location--option[_ngcontent-%COMP%] .location-name[_ng
1content-%COMP%]{margin-right:8px;color:#53565a}.hospital-search__location--option[_ngcontent-%COMP%] .location-type[_ngcontent-%COMP%]{flex:1 1 0%;justify-content:flex-end;display:flex;color:#999}.hospital-search__append-icon[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;border-radius:0!important}.hospital-search__suggestion[_ngcontent-%COMP%]{border:1px solid lightgray;border-radius:30px;margin-top:15px;background-color:#fff;padding:6px 2px}.hospital-search__suggestion--input[_ngcontent-%COMP%]{border:none;font-size:14px;color:#53565a;margin:3px;caret-color:#05c3de}.hospital-search__suggestion--input-sm[_ngcontent-%COMP%]{border:none;font-size:14px;border-radius:30px;margin:3px}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%]{font-weight:400;font-size:14px;color:#53565a;max-height:238px;overflow-y:scroll;-webkit-overflow-scrolling:touch;padding:0!important;margin:15px 0 0!important;width:100%;border-radius:0;box-shadow:none;background-color:#fff}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{min-height:48px;align-items:center;cursor:pointer;font-size:12px;line-height:18px}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]:first-child{border-radius:0}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .suggestion-value[_ngcontent-%COMP%]{margin-right:8px;color:#53565a}.hospital-search__suggestion--dropdown[_ngcontent-%COMP%] .suggestion-type[_ngcontent-%COMP%]{font-size:10px;color:#999;flex:1 1 0%;justify-content:flex-end;display:flex}.hospital-search__suggestion--help[_ngcontent-%COMP%]{font-size:12px;line-height:1.5;color:#53565a}.hospital-search__suggestion__btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:10px 15px;border-radius:30px}.hospital-search__no-result[_ngcontent-%COMP%]{color:#999}}.hide-border[_ngcontent-%COMP%]{box-shadow:none;border:none}@media(max-width:767px){ .hospital-search-modal{margin:0;min-height:100%;display:flex;min-width:100vw} .hospital-search-modal .mat-mdc-dialog-surface{border-radius:0} .hospital-search-modal .mat-mdc-dialog-surface .modal-body{height:100vh}}@media(min-width:768px){ .hospital-search-modal{width:500px;margin:1.75rem auto;position:fixed!important;top:0} .hospital-search-modal .mat-mdc-dialog-surface{border-radius:8px}} .hospital-search-modal .mat-mdc-dialog-surface{padding:0}"]});let i=s;return i})();var _i=i=>({count:i}),hn=(()=>{let s=class s{constructor(){this.scrollingService=_(zt),this.translate=_(Z),this.dataService=_(Q),this.breadcrumbService=_(Wt),this.doctorService=_(X),this.metaService=_(lt),this._renderer2=_(mt),this.utilityService=_(K),this.jsonPipe=_(rt),this.router=_(Y),this.gtmService=_(J),this._document=_(_t),this._cdrZoneless=_(G),this.$destroy=new q,this.specialitySearchRequest=new ie(500),this.specialities=new Array(8),this.isLoading=!0,this.isDesktop=!1,this.canonLink=null,this.SCROLLABLE_DEPARTMENT_TYPE=Qt,this.breadcrumbList=[]}ngOnInit(){this.canonLink=this.metaService.createCanonical("/cari-dokter/spesialisasi"),this.metaService.allSpecialitiesMeta(),this.configureTranslation(),this.utilityService.isServer()&&this.updateStructuredData(),this.translate.get(["BREADCRUMB"]).pipe(y(this.$destroy)).subscribe(t=>{let o={specialityTitle:t.BREADCRUMB.SPECIALITIES};this.breadcrumbService.updateBreadcrumbLabels(o),this._cdrZoneless.markForCheck()}),this.doctorService.searchSpecialities(this.specialitySearchRequest).pipe(y(this.$destroy)).subscribe(t=>{this.specialities=t,this.isLoading=!1,this._cdrZoneless.markForCheck()},()=>{this.specialities=[],this._cdrZoneless.markForCheck()}),this.utilityService.deviceMode.pipe(y(this.$destroy)).subscribe(t=>{this.isDesktop=t.isDesktop,this._cdrZoneless.markForCheck()})}ngOnDestroy(){this.$destroy.next(),this.$destroy.complete(),this.metaService.removeCanonical(this.canonLink),this.metaService.defaultMeta(),this.removeStructuredData()}configureTranslation(){let t=this.dataService.currentUserLang;this.translate.use(t)}updateStructuredData(){this.orgScript=this._renderer2.createElement("script"),this.orgScript.type="application/ld+json",this.orgScript.text=pt.createOrganizationStructuredData("Halodoc - Beli Obat, Tanya Dokter, Cek Lab Terpercaya","https://www.halodoc.com","https://www.halodoc.com/assets/header-footer/halodoc-logo.svg"),this.breadcrumbList=[],this.breadcrumbList.push(new tt(1,"Halodoc","https://www.halodoc.com")),this.breadcrumbList.push(new tt(2,"Rumah Sakit","https://www.halodoc.com/cari-dokter")),this.breadcrumbList.push(new tt(3,"Semua Spesialisasi","https://www.halodoc.com/cari-dokter/spesialisasi")),this.breadcrumbScript=this._renderer2.createElement("script"),this.breadcrumbScript.type="application/ld+json",this.breadcrumbScript.text=pt.createBreadcrumbListStructuredData(this.jsonPipe.transform(this.breadcrumbList)),this._renderer2.appendChild(this._document.head,this.orgScript),this._renderer2.appendChild(this._document.head,this.breadcrumbScript)}removeStructuredData(){this.orgScript&&this._renderer2.removeChild(this._document.head,this.orgScript),this.breadcrumbScript&&this._renderer2.removeChild(this._document.head,this.breadcrumbScript)}navigateToDoctorDetail(t){this.router.navigate(["/cari-dokter/spesialis/"+((t==null?void 0:t.slug)||"")])}};s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=H({type:s,selectors:[["magneto-specialities"]],features:[It([lt,rt,Jt,Ut])],decls:10,vars:20,consts:[[1,"specialities-section","pb-12"],[1,"flex","specialities-section__search","py-4"],[1,"w-full","px-4"],[3,"IsDoctorDiscoveryFlow"],[1,"custom-container"],[3,"onCtaClick","title","subtitle","modalTitle","ctaLabel","services","isLoading","isDesktop","scrollingService"]],template:function(o,n){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),k(3,"magneto-search-bar",3),l()(),r(4,"div",4)(5,"hd-base-service-list-page",5),g(6,"translate"),g(7,"translate"),g(8,"translate"),g(9,"translate"),x("onCtaClick",function(b){return n.navigateToDoctorDetail(b)}),l()()()),o&2&&(a(3),u("IsDoctorDiscoveryFlow",!0),a(2),u("title",I(6,9,"ALL_SPECIALITIES"))("subtitle",B(7,11,"SPECIALITY_COUNT",D(18,_i,n.specialities.length)))("modalTitle",I(8,14,"SELECT_SPECIALITY"))("ctaLabel",I(9,16,"SEE_HOSPITAL"))("services",n.specialities)("isLoading",n.isLoading)("isDesktop",n.isDesktop)("scrollingService",n.scrollingService))},dependencies:[se,Kt,W,j],styles:["@keyframes _ngcontent-%COMP%_ghost-lines{0%{background-position:-100px}40%{background-position:40vw}to{background-position:60vw}}@keyframes _ngcontent-%COMP%_ghost-avatar{0%{background-position:-32px}40%,to{background-position:208px}}.specialities-section__search[_ngcontent-%COMP%]{padding:0 10%}@media(max-width:991px){.specialities-section__search[_ngcontent-%COMP%]{padding:0 2%}}"]});let i=s;return i})();export{hn as SpecialitiesComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.