<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>pydeck</title>
{% if google_maps_key %}
    <script src="https://maps.googleapis.com/maps/api/js?key={{google_maps_key}}&libraries=places"></script>
{% endif %}
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
    {{deckgl_jupyter_widget_bundle}}
    <style>
    body {
      margin: 0;
      padding: 0;
      overflow: hidden;
    }

    #deck-map-container {
      width: 100%;
      height: 100%;
      background-color: black;
    }

    #map {
      pointer-events: none;
      height: 100%;
      width: 100%;
      position: absolute;
      z-index: 1;
    }

    #deckgl-overlay {
      z-index: 2;
      background: {{css_background_color or 'none'}};
    }

    #deck-map-wrapper {
      width: 100%;
      height: 100%;
    }

    #deck-container {
      width: 100vw;
      height: 100vh;
    }
    </style>
  </head>
  <body>
    <div id="deck-container">
    </div>
  </body>
  <script>
    const jsonInput = {{json_input}};
    const MAPBOX_API_KEY = '{{mapbox_key}}';
    const GOOGLE_MAPS_API_KEY = '{{google_maps_key}}';
    const tooltip = {{tooltip}};
    const customLibraries = {{ custom_libraries or 'null' }};

    const deck = createDeck({
      mapboxApiKey: MAPBOX_API_KEY,
      googleMapsKey: GOOGLE_MAPS_API_KEY,
      container: document.getElementById('deck-container'),
      jsonInput,
      tooltip,
      customLibraries
    });

  </script>
</html>
