{{!--
    Copyright 2014-2019 Google LLC

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
--}}
{{#unless bodyContentOnly}}
<!doctype html>
<html class="{{htmlTagClassName}}">
    {{#block 'head'}}
        <head>
            {{!-- Theme (light/dark) --}}
            {{#if defaultTheme}}
                <script type="text/javascript">
                    var defaultTheme = "{{defaultTheme}}";
                    var themeCookie = "{{themeCookie}}";
                    var theme;
                    if (themeCookie) {
                        try {
                            theme = document.cookie
                                .split('; ')
                                .find(row => row.startsWith(themeCookie))
                                .split('=')[1];
                        } catch(e) {}
                    }
                    if (!theme) {
                        theme = window.matchMedia('(prefers-color-scheme: dark)').matches
                            ? 'dark'
                            : defaultTheme;
                    }
                    if (theme !== defaultTheme) {
                        var otherTheme = theme === 'dark' ? 'light' : 'dark';
                        var root = document.documentElement;
                        root.classList.remove(otherTheme + '-theme');
                        root.classList.add(theme + '-theme');
                    }
                </script>
            {{/if}}
            {{#block 'meta'}}
                <meta name="generator" content="JSDoc {{jsdocVersion}}">
                <meta charset="{{config 'encoding'}}">
                {{!-- TODO: anything else to include by default? Maybe viewport scale? --}}
            {{/block}}
            {{#block 'title'}}
                <title>{{translatePageTitle pageTitlePrefix pageTitle pageCategory}}</title>
            {{/block}}
            {{#block 'css'}}
                {{!-- TODO: https://github.com/typekit/webfontloader --}}
                {{!-- TODO: add fonts to repo (with option to copy those or use webfontloader) --}}
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
                <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
                {{!-- TODO: use relative path to CSS file --}}
                <link href="css/baseline.css" rel="stylesheet">

                {{!-- Roboto font for iframe embed --}}
                <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500:700&display=swap" />

            {{/block}}
        </head>
    {{/block}}
{{/unless}}
    {{#block 'body'}}
        {{#unless bodyContentOnly}}
        {{!-- TODO: move onload to script file --}}
        <body onload="prettyPrint()">
            {{#block 'body-navbar'}}
                {{#embed 'navbar'}}{{/embed}}
            {{/block}}
        {{/unless}}
            {{#block 'body-container'}}
                <div id="jsdoc-body-container">
                    {{#block 'body-content'}}
                        <div id="jsdoc-content">
                            {{#block 'body-content-container'}}
                                <div id="jsdoc-content-container">
                                    {{#block 'body-banner'}}
                                        <div id="jsdoc-banner" role="banner">
                                            {{#block 'body-banner-content'}}
                                                {{!--
                                                    Override the `body-banner-content` block
                                                    to add content.
                                                --}}
                                            {{/block}}
                                        </div>
                                    {{/block}}
                                    {{#block 'body-main'}}
                                        <div id="jsdoc-main" role="main">
                                            {{#block 'body-main-content'}}
                                                {{!--
                                                    Override the `body-main-content` block
                                                    to add content.
                                                --}}
                                            {{/block}}
                                        </div>
                                    {{/block}}
                                </div>
                            {{/block}}
                            {{#unless bodyContentOnly}}
                                {{#block 'body-toc-navbar'}}
                                {{!-- content is inserted on page load --}}
                                <nav id="jsdoc-toc-nav" role="navigation"></nav>
                                {{/block}}
                            {{/unless}}
                        </div>
                    {{/block}}
                </div>
            {{/block}}
            {{#block 'body-footer'}}
                {{#if (config 'components.footer')}}
                    <footer id="jsdoc-footer" {{~cssClass '!jsdoc-footer'}}>
                        {{#block 'body-footer-container'}}
                            <div id="jsdoc-footer-container">
                                {{#block 'body-footer-content'}}
                                    <p>
                                      {{generatedBy}}
                                    </p>
                                {{/block}}
                            </div>
                        {{/block}}
                    </footer>
                {{/if}}
            {{/block}}
            {{#unless bodyContentOnly}}

            {{#block 'body-scripts'}}
                {{!-- TODO: combine JS for JSDoc-only files --}}
                {{!-- TODO: fix up path relative to current output directory --}}
                {{#unless excludeNav}}
                    <script src="scripts/jquery.min.js"></script>
                    <script src="scripts/jquery.cookie.js"></script>
                    <script src="scripts/tree.jquery.js"></script>
                {{/unless}}
                <script src="scripts/prettify.js"></script>
                {{#unless excludeNav}}
                    <script src="scripts/jsdoc-toc.js"></script>
                {{/unless}}
                <script src="scripts/linenumber.js"></script>
                <script src="scripts/scrollanchor.js"></script>
            {{/block}}
        </body>
        {{/unless}}
    {{/block}}
{{#unless bodyContentOnly}}
</html>
{{/unless}}
