  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="referrer" content="no-referrer" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link rel="manifest" href="{{ U('/jsapi/pwa/manifest.json?ts=', version_identifier()) }}">
  <link rel="stylesheet" href="{{ U('/static/css/default.css?ts=', version_identifier()) }}" />
  <link rel="stylesheet" href="{{ U('/static/css/print.css?ts=', version_identifier()) }}" media="print" />
  {% if state.command_url not in ("/auth/login/", "/auth/logout/") %}
  <link rel="stylesheet" href="{{ U('/jsapi/as.css?ts=', version_identifier(), '-', config.timestamp) }}" />
  {% endif %}

  <!-- Apple Icons -->
  <link rel="apple-touch-icon" sizes="57x57" href="{{ U('/static/img/apple-touch-icon.png') }}" />
  <link rel="apple-touch-icon" sizes="72x72" href="{{ U('/static/img/apple-touch-icon-72x72.png') }}" />
  <link rel="apple-touch-icon" sizes="114x114" href="{{ U('/static/img/apple-touch-icon-114x114.png') }}" />
  <!-- Disable Google Translate in Chrome so it doesn't leak our e-mail -->
  <meta name="google" value="notranslate">

  <!-- Favicon -->
  <link rel="shortcut icon" id="basic-favicon" href="{{ U('/static/img/favicon.png') }}" />
  <link rel="icon" id="basic-favicon" type="image/png" href="{{ U('/static/img/favicon.png') }}" />

  {%- if 0 and is_dev_version() %}{# Uglify dev versions ... #}
  <style type="text/css">
    .topbar { filter: blur(1px); -webkit-filter: blur(1px); }
    .topbar:hover { filter: none;; -webkit-filter: none; }
    form#form-search:after { content: "[DEV MODE] {{ random([
      'Oops, coder probably drunk.',
      'Are you sure that button works?',
      'Blurry, because development. :-)',
      'How old are those contact lenses?',
      'Thanks for testing Mailpile! =8-]',
      'Time and focus reduce bugs and blur.',
      'We know about the blur. Working on it.',
      'Shoftware prgoramming i sserius bisnus',
      'Why can`t this thing just work??',
      'Where did I leave my glasses?',
      'Tried turning it off and on again?',
      'I love lamp! :D',
      'git commit -a -m `please work this time`',
      'Can I crash on your couch?']) }}" }
  </style>
  {%- endif %}

  <!-- JS Global Libraries -->
  <script src="{{ U('/static/js/libraries.min.js?ts=', version_identifier()) }}"></script>
  {% if state.command_url not in ("/auth/login/", "/auth/logout/", "/setup/welcome/") %}
  <script src="{{ U('/api/0/jsapi/as.js?ts=', version_identifier(), '-', config.timestamp) }}"></script>

  <!-- JS - App Specific -->
  <script>
  $(document).ready(function() {
    // Print JSON for JS Use
    Mailpile.instance = {};
  });

  /* Plugins */
  $(document).ready(
    {{ui_elements_setup('.plugin-activity-%(name)s', get_ui_elements('activities', state, '/'))}}
  );
  </script>
  <script src="{{ U('/api/0/jsapi/app.js?ts=', version_identifier(), '-', config.timestamp) }}"></script>
  {% endif %}
