<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Ares2 IDE</title>
		<link rel="shortcut icon" href="assets/favicon.ico"/>
		<!-- -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<!-- css -->
		<link href="build/enyo.css" rel="stylesheet"/>
		<link href="build/app.css" rel="stylesheet"/>
		<!-- un-re-minify-able js -->
		<script src="lib/foss/state-machine-2.2.0.min.js" charset="utf-8"></script>
		<script src="lib/foss/ace-builds/src-min/ace.js" charset="utf-8"></script>
		<!-- js -->
		<script src="build/enyo.js" charset="utf-8"></script>
		<script src="build/app.js" charset="utf-8"></script>
	</head>
	<body class="enyo-unselectable">
		<script>
			var loc = window.location.pathname.split("/");

			if (loc[1] === "ide") {
				if (!window.Ares) {
					alert('No minified Ares found, redirecting to debug.html.');
					location = document.URL.replace(/\/(index.html)?($|\?)/,"/debug.html$2");
				}
				new Ares().renderInto(document.body);
			} else {
				if (!window.Preview) {
					alert('No minified Ares found, redirecting to debug.html.');
					location = document.URL.replace(/\/(index.html)?($|\?)/,"/debug.html$2");
				}
				new Preview().renderInto(document.body);
			}
		</script>
	</body>
</html>