const config = window . __config ; const catalogs = window . __catalogs ; import * as Generator from './generator' ; import { init } from './utils' ; import { Router } from './router' ; import { EventHub } from './event' ; const docker = async ( w , d ) : Promise < void > => { const eventHub = new EventHub ( ) ; const sidebar = d . getElementById ( 'side' ) ; const sides = await Generator . side ( catalogs , config ) ; sides . forEach ( el => sidebar . appendChild ( el ) ) ; await Generator . event ( config , eventHub ) ; new Router ( d . getElementById ( 'container' ) , config . docPath ) . listen ( eventHub ) ; } ; window . onload = ( ) : void => { init ( ) ; docker ( window , document ) . then ( ) ; console . log ( 'Generate source: [simpler-paper]\nWelcome to try: https://github.com/DhyanaChina/simpler-paper' ) ; } ;