import { merge , switchMap } from "rxjs" ; import { getComponentElements , mountIconSearch , mountSponsorship } from "./components" ; import { setupAnalytics } from "./integrations" ; setupAnalytics ( ) ; const component$ = document$ . pipe ( switchMap ( ( ) => merge ( ... getComponentElements ( "iconsearch" ) . map ( el => mountIconSearch ( el ) ) , ... getComponentElements ( "sponsorship" ) . map ( el => mountSponsorship ( el ) ) ) ) ) ; component$ . subscribe ( ) ;