<!doctype html>
<html>
  <head>
    <style type="text/css">
      div.additional-license-text-list {display:block}
      body {font-family: Helvetica, Arial, sans-serif;}
      pre {white-space: pre-wrap;}
    </style>
    <title>Open Source Software Information</title>
  </head>

  <body>
    <h1>OPEN SOURCE SOFTWARE INFORMATION</h1>
    <h2> {{ vartext['subtitle'] }} </h2>
    <div>
      <p>Licenses, acknowledgments and required copyright notices for 
      open source components:</p>
    </div>
    
        <div class="oss-table-of-contents">
            {% set index = namespace(value=0) %}
            {% for about_object in abouts %}
                {% set captured = {} %}
                {% if about_object.license_key.value %}
					{% if not captured[about_object.name.value] %}
						<p><a href="#component_{{ index.value }}">{{ about_object.name.value }}{% if about_object.version.value %} {{ about_object.version.value }}{% endif %}</a></p>
						{% set _ = captured.update({ about_object.name.value: true }) %}
						{% set index.value = index.value + 1 %}
					{% endif %}
                {% endif %}
            {% endfor %}
        </div>

    <hr/>

    {% set index = namespace(value=0) %}
    {% for about_object in abouts %}
        {% set captured = {} %}
        {% if about_object.license_key.value %}
			{% if not captured[about_object.name.value] %}
				<div class="oss-component" id="component_{{ index.value }}">
				<h3 class="component-name">{{ about_object.name.value }} {% if about_object.version.value %}{{ about_object.version.value }}{% endif %} </h3>
				{% set _ = captured.update({ about_object.name.value: true }) %}
				{% set index.value = index.value + 1 %}
			{% endif %}
            {% if about_object.copyright.value %}
                <pre>{{about_object.copyright.value}}</pre>
            {% endif %}


			{% for lic_key in about_object.license_key.value %}
				<p>This component is licensed under {{ lic_key }}</p>
				{% if lic_key in common_licenses %}
					<p>Full text of <a class="{{ lic_key }}" href="#component-license-{{ lic_key }}"> {{ lic_key }}</a> is available at the end of this document.</p>
				{% else %}
					{% for license in licenses_list %}
						{% if lic_key == license.key %}
							<h3 id="component-license-{{ license.key }}">{{ license.key }}</h3>
							<pre> {{ license.text | e }} </pre>
						{% endif %}
					{% endfor %}
				{% endif %}
			{% endfor %}
        {% endif %}
        </div>
    {% endfor %}

    <hr/>

    <h3>Common Licenses Used in This Product</h3>
    {% for license in licenses_list %}
        {% if license.key in common_licenses %}
			<h3 id="component-license-{{ license.key }}">{{ license.key }}</h3>
			<pre> {{ license.text | e }} </pre>
        {% endif %}
    {% endfor %}

    <h3><a id="End">End</a></h3>

    <i>This file was generated with AttributeCode version: {{ tkversion }} on: {{ utcnow }} (UTC)</i>
    </body>
</html>

