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,CAAC,CAAC;IACzC,CAAC;IAMD,MAAM,CAAC,YAAY,CAAC,GAAW;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACnF,CAAC;;AA9bM,qBAAQ,GAAsB,CAAC;QAClC,IAAI,EAAO,CAAC,sBAAc,CAAC,KAAK,CAAC;QACjC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,SAAS,CAAC;QACrC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,IAAI,CAAC;QAChC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,cAAc,CAAC;QACjE,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAG,gBAAgB;KAC9B,CAAC,CAAC;AAEI,uBAAU,GAAW,oBAAoB,CAAC;AA1BrD,oCAmcC","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\n\nimport { Theme } from '../theme';\nimport { Renderer } from '../renderer';\nimport { Reflection, ReflectionKind, ProjectReflection, ContainerReflection, DeclarationReflection } from '../../models/reflections/index';\nimport { ReflectionGroup } from '../../models/ReflectionGroup';\nimport { UrlMapping } from '../models/UrlMapping';\nimport { NavigationItem } from '../models/NavigationItem';\nimport { RendererEvent } from '../events';\n\n/**\n * Defines a mapping of a [[Models.Kind]] to a template file.\n *\n * Used by [[DefaultTheme]] to map reflections to output files.\n */\nexport interface TemplateMapping {\n /**\n * [[DeclarationReflection.kind]] this rule applies to.\n */\n kind: ReflectionKind[];\n\n /**\n * Can this mapping have children or should all further reflections be rendered\n * to the defined output page?\n */\n isLeaf: boolean;\n\n /**\n * The name of the directory the output files should be written to.\n */\n directory: string;\n\n /**\n * The name of the template that should be used to render the reflection.\n */\n template: string;\n}\n\n/**\n * Default theme implementation of TypeDoc. If a theme does not provide a custom\n * [[BaseTheme]] implementation, this theme class will be used.\n */\nexport class DefaultTheme extends Theme {\n /**\n * Mappings of reflections kinds to templates used by this theme.\n */\n static MAPPINGS: TemplateMapping[] = [{\n kind: [ReflectionKind.Class],\n isLeaf: false,\n directory: 'classes',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Interface],\n isLeaf: false,\n directory: 'interfaces',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Enum],\n isLeaf: false,\n directory: 'enums',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Module, ReflectionKind.ExternalModule],\n isLeaf: false,\n directory: 'modules',\n template: 'reflection.hbs'\n }];\n\n static URL_PREFIX: RegExp = /^(http|ftp)s?:\\/\\//;\n\n /**\n * Create a new DefaultTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer, basePath);\n this.listenTo(renderer, RendererEvent.BEGIN, this.onRendererBegin, 1024);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n */\n isOutputDirectory(path: string): boolean {\n if (!FS.existsSync(Path.join(path, 'index.html'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'js', 'main.js'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'images', 'icons.png'))) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n const urls: UrlMapping[] = [];\n const entryPoint = this.getEntryPoint(project);\n\n if (this.application.options.getValue('readme') === 'none') {\n entryPoint.url = 'index.html';\n urls.push(new UrlMapping('index.html', entryPoint, 'reflection.hbs'));\n } else {\n entryPoint.url = 'globals.html';\n urls.push(new UrlMapping('globals.html', entryPoint, 'reflection.hbs'));\n urls.push(new UrlMapping('index.html', project, 'index.hbs'));\n }\n\n if (entryPoint.children) {\n entryPoint.children.forEach((child: Reflection) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.buildUrls(child, urls);\n }\n });\n }\n\n return urls;\n }\n\n /**\n * Return the entry point of the documentation.\n *\n * @param project The current project.\n * @returns The reflection that should be used as the entry point.\n */\n getEntryPoint(project: ProjectReflection): ContainerReflection {\n const entryPoint = this.owner.entryPoint;\n if (entryPoint) {\n const reflection = project.getChildByName(entryPoint);\n if (reflection) {\n if (reflection instanceof ContainerReflection) {\n return reflection;\n } else {\n this.application.logger.warn('The given entry point `%s` is not a container.', entryPoint);\n }\n } else {\n this.application.logger.warn('The entry point `%s` could not be found.', entryPoint);\n }\n }\n\n return project;\n }\n\n /**\n * Create a navigation structure for the given project.\n *\n * @param project The project whose navigation should be generated.\n * @returns The root navigation item.\n */\n getNavigation(project: ProjectReflection): NavigationItem {\n /**\n * Test whether the given list of modules contains an external module.\n *\n * @param modules The list of modules to test.\n * @returns TRUE if any of the modules is marked as being external.\n */\n function containsExternals(modules: DeclarationReflection[]): boolean {\n for (let index = 0, length = modules.length; index < length; index++) {\n if (modules[index].flags.isExternal) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Sort the given list of modules by name, groups external modules at the bottom.\n *\n * @param modules The list of modules that should be sorted.\n */\n function sortReflections(modules: DeclarationReflection[]) {\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n if (a.flags.isExternal && !b.flags.isExternal) {\n return 1;\n }\n if (!a.flags.isExternal && b.flags.isExternal) {\n return -1;\n }\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n }\n\n /**\n * Find the urls of all children of the given reflection and store them as dedicated urls\n * of the given NavigationItem.\n *\n * @param reflection The reflection whose children urls should be included.\n * @param item The navigation node whose dedicated urls should be set.\n */\n function includeDedicatedUrls(reflection: DeclarationReflection, item: NavigationItem) {\n (function walk(reflection: DeclarationReflection) {\n for (const child of reflection.children || []) {\n if (child.hasOwnDocument && !child.kindOf(ReflectionKind.SomeModule)) {\n if (!item.dedicatedUrls) {\n item.dedicatedUrls = [];\n }\n item.dedicatedUrls.push(child.url!);\n walk(child);\n }\n }\n })(reflection);\n }\n\n /**\n * Create navigation nodes for all container children of the given reflection.\n *\n * @param reflection The reflection whose children modules should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n */\n function buildChildren(reflection: DeclarationReflection, parent: NavigationItem) {\n const modules = reflection.getChildrenByKind(ReflectionKind.SomeModule);\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n\n modules.forEach((reflection) => {\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n buildChildren(reflection, item);\n });\n }\n\n /**\n * Create navigation nodes for the given list of reflections. The resulting nodes will be grouped into\n * an \"internal\" and an \"external\" section when applicable.\n *\n * @param reflections The list of reflections which should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n * @param callback Optional callback invoked for each generated node.\n */\n function buildGroups(reflections: DeclarationReflection[], parent: NavigationItem,\n callback?: (reflection: DeclarationReflection, item: NavigationItem) => void) {\n let state = -1;\n const hasExternals = containsExternals(reflections);\n sortReflections(reflections);\n\n reflections.forEach((reflection) => {\n if (hasExternals && !reflection.flags.isExternal && state !== 1) {\n new NavigationItem('Internals', undefined, parent, 'tsd-is-external');\n state = 1;\n } else if (hasExternals && reflection.flags.isExternal && state !== 2) {\n new NavigationItem('Externals', undefined, parent, 'tsd-is-external');\n state = 2;\n }\n\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n if (callback) {\n callback(reflection, item);\n }\n });\n }\n\n /**\n * Build the navigation structure.\n *\n * @param hasSeparateGlobals Has the project a separated globals.html file?\n * @return The root node of the generated navigation structure.\n */\n function build(hasSeparateGlobals: boolean): NavigationItem {\n const root = new NavigationItem('Index', 'index.html');\n\n if (entryPoint === project) {\n const globals = new NavigationItem('Globals', hasSeparateGlobals ? 'globals.html' : 'index.html', root);\n globals.isGlobals = true;\n }\n\n const modules: DeclarationReflection[] = [];\n project.getReflectionsByKind(ReflectionKind.SomeModule).forEach((someModule) => {\n let target = someModule.parent;\n let inScope = (someModule === entryPoint);\n while (target) {\n if (target.kindOf(ReflectionKind.ExternalModule)) {\n return;\n }\n if (entryPoint === target) {\n inScope = true;\n }\n target = target.parent;\n }\n\n if (inScope && someModule instanceof DeclarationReflection) {\n modules.push(someModule);\n }\n });\n\n if (modules.length < 10) {\n buildGroups(modules, root);\n } else {\n buildGroups(entryPoint.getChildrenByKind(ReflectionKind.SomeModule), root, buildChildren);\n }\n\n return root;\n }\n\n const entryPoint = this.getEntryPoint(project);\n return build(this.application.options.getValue('readme') !== 'none');\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n if (event.project.groups) {\n event.project.groups.forEach(DefaultTheme.applyGroupClasses);\n }\n\n for (let id in event.project.reflections) {\n const reflection = event.project.reflections[id];\n if (reflection instanceof DeclarationReflection) {\n DefaultTheme.applyReflectionClasses(reflection);\n }\n\n if (reflection instanceof ContainerReflection && reflection.groups) {\n reflection.groups.forEach(DefaultTheme.applyGroupClasses);\n }\n }\n }\n\n /**\n * Return a url for the given reflection.\n *\n * @param reflection The reflection the url should be generated for.\n * @param relative The parent reflection the url generation should stop on.\n * @param separator The separator used to generate the url.\n * @returns The generated url.\n */\n static getUrl(reflection: Reflection, relative?: Reflection, separator: string = '.'): string {\n let url = reflection.getAlias();\n\n if (reflection.parent && reflection.parent !== relative &&\n !(reflection.parent instanceof ProjectReflection)) {\n url = DefaultTheme.getUrl(reflection.parent, relative, separator) + separator + url;\n }\n\n return url;\n }\n\n /**\n * Return the template mapping fore the given reflection.\n *\n * @param reflection The reflection whose mapping should be resolved.\n * @returns The found mapping or undefined if no mapping could be found.\n */\n static getMapping(reflection: DeclarationReflection): TemplateMapping | undefined {\n return DefaultTheme.MAPPINGS.find(mapping => reflection.kindOf(mapping.kind));\n }\n\n /**\n * Build the url for the the given reflection and all of its children.\n *\n * @param reflection The reflection the url should be created for.\n * @param urls The array the url should be appended to.\n * @returns The altered urls array.\n */\n static buildUrls(reflection: DeclarationReflection, urls: UrlMapping[]): UrlMapping[] {\n const mapping = DefaultTheme.getMapping(reflection);\n if (mapping) {\n if (!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) {\n const url = [mapping.directory, DefaultTheme.getUrl(reflection) + '.html'].join('/');\n urls.push(new UrlMapping(url, reflection, mapping.template));\n\n reflection.url = url;\n reflection.hasOwnDocument = true;\n }\n\n for (const child of reflection.children || []) {\n if (mapping.isLeaf) {\n DefaultTheme.applyAnchorUrl(child, reflection);\n } else {\n DefaultTheme.buildUrls(child, urls);\n }\n }\n } else if (reflection.parent) {\n DefaultTheme.applyAnchorUrl(reflection, reflection.parent);\n }\n\n return urls;\n }\n\n /**\n * Generate an anchor url for the given reflection and all of its children.\n *\n * @param reflection The reflection an anchor url should be created for.\n * @param container The nearest reflection having an own document.\n */\n static applyAnchorUrl(reflection: Reflection, container: Reflection) {\n if (!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) {\n let anchor = DefaultTheme.getUrl(reflection, container, '.');\n if (reflection['isStatic']) {\n anchor = 'static-' + anchor;\n }\n\n reflection.url = container.url + '#' + anchor;\n reflection.anchor = anchor;\n reflection.hasOwnDocument = false;\n }\n\n reflection.traverse((child) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.applyAnchorUrl(child, container);\n }\n });\n }\n\n /**\n * Generate the css classes for the given reflection and apply them to the\n * [[DeclarationReflection.cssClasses]] property.\n *\n * @param reflection The reflection whose cssClasses property should be generated.\n */\n static applyReflectionClasses(reflection: DeclarationReflection) {\n const classes: string[] = [];\n let kind: string;\n\n if (reflection.kind === ReflectionKind.Accessor) {\n if (!reflection.getSignature) {\n classes.push('tsd-kind-set-signature');\n } else if (!reflection.setSignature) {\n classes.push('tsd-kind-get-signature');\n } else {\n classes.push('tsd-kind-accessor');\n }\n } else {\n kind = ReflectionKind[reflection.kind];\n classes.push(DefaultTheme.toStyleClass('tsd-kind-' + kind));\n }\n\n if (reflection.parent && reflection.parent instanceof DeclarationReflection) {\n kind = ReflectionKind[reflection.parent.kind];\n classes.push(DefaultTheme.toStyleClass(`tsd-parent-kind-${kind}`));\n }\n\n let hasTypeParameters = !!reflection.typeParameters;\n reflection.getAllSignatures().forEach((signature) => {\n hasTypeParameters = hasTypeParameters || !!signature.typeParameters;\n });\n\n if (hasTypeParameters) { classes.push('tsd-has-type-parameter'); }\n if (reflection.overwrites) { classes.push('tsd-is-overwrite'); }\n if (reflection.inheritedFrom) { classes.push('tsd-is-inherited'); }\n if (reflection.flags.isPrivate) { classes.push('tsd-is-private'); }\n if (reflection.flags.isProtected) { classes.push('tsd-is-protected'); }\n if (reflection.flags.isStatic) { classes.push('tsd-is-static'); }\n if (reflection.flags.isExternal) { classes.push('tsd-is-external'); }\n if (!reflection.flags.isExported) { classes.push('tsd-is-not-exported'); }\n\n reflection.cssClasses = classes.join(' ');\n }\n\n /**\n * Generate the css classes for the given reflection group and apply them to the\n * [[ReflectionGroup.cssClasses]] property.\n *\n * @param group The reflection group whose cssClasses property should be generated.\n */\n static applyGroupClasses(group: ReflectionGroup) {\n const classes: string[] = [];\n if (group.allChildrenAreInherited) { classes.push('tsd-is-inherited'); }\n if (group.allChildrenArePrivate) { classes.push('tsd-is-private'); }\n if (group.allChildrenAreProtectedOrPrivate) { classes.push('tsd-is-private-protected'); }\n if (group.allChildrenAreExternal) { classes.push('tsd-is-external'); }\n if (!group.someChildrenAreExported) { classes.push('tsd-is-not-exported'); }\n\n group.cssClasses = classes.join(' ');\n }\n\n /**\n * Transform a space separated string into a string suitable to be used as a\n * css class, e.g. \"constructor method\" > \"Constructor-method\".\n */\n static toStyleClass(str: string) {\n return str.replace(/(\\w)([A-Z])/g, (m, m1, m2) => m1 + '-' + m2).toLowerCase();\n }\n}\n"]}
\No newline at end of file