<!DOCTYPE html>
<html>

<head>
  <title>CoSApp Lab</title>
  <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
  <link rel="icon" href="{{static_prefix}}/static/cosapp.svg">
  <link rel="stylesheet" href="{{static_prefix}}/static/style.css">
  <link rel="stylesheet" href="{{static_prefix}}/static/splash.css">
  <script src="{{static_prefix}}/static/url.js"></script>
  <script id="cosapp-lab-config-data" type="application/json">
    {% raw cosapp_lab_config %}
  </script>


</head>

<body style="margin: 0; font-family: 'Open Sans'">
  <div id="cosapp_splash_screen" class="jp-cosapp-splash">
    <div class="jp-cosapp-splash-header">
      <img style="max-width:100%;
      max-height: 80%;
      display: block;
      margin: auto;" src="{{static_prefix}}/static/cosapp.gif" alt="">
      <p id="cosapp_loading_status" class="loading_animation">Starting CoSApp lab</p>
    </div>
    <div class="jp-cosapp-splash-footer">
      <p>Copyright &copy; Safran 2018-2021 </p>
    </div>
  </div>
  <div style="height: 100vh;width: 100vw;">
    <div id="top_bar" style="visibility: hidden;display: flex;
    justify-content: space-between;" class='app_bar'>
      <div id="app_logo" style="margin-left: 25px;">
        <a href="/">
          <img style="height: 35px;" src="{{static_prefix}}/static/cosapp.svg" alt="">
        </a>
      </div>
      <div>
        <span style="margin-right: 5px;" id="app_title">CoSApp application</span>
        <img id="app_kernel_status_on" style="height: 10px;" src="{{static_prefix}}/static/green.svg" alt=""
          title="Kernel connected">
        <img id="app_kernel_status_off" style="height: 10px;" src="{{static_prefix}}/static/red.svg" alt=""
          title="Kernel disconnected">
      </div>
    </div>
    <div id="main" style="height: calc(100vh - 35px); position: relative">
    </div>
</body>

<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"
  integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" crossorigin="anonymous">
  </script>

<script>
  window.addEventListener('load', () => {
    const { BASEURL, COSAPP_MODULE } = CoSAppGetUrl();
    console.log('BASEURL', BASEURL, 'COSAPP_MODULE', COSAPP_MODULE);
    window.requirejs.config({
      baseUrl: `${BASEURL}static/dist`,
      waitSeconds: 0,
      // urlArgs: 'bust=' + new Date().getTime(),
    });

    define('@jupyter-widgets/base', ['index'], (lib) => {
      return lib.base;
    });
    define('@jupyter-widgets/controls', ['index'], (lib) => {
      return lib.controls;
    });
    define('font-awesome/css/font-awesome.css', ['index'], (lib) => {
      return null;
    });
    require(['index']);
  });
</script>

</html>
