<?php

/**
 * Debug Bar screen template.
 *
 * It uses Font Awesome by Dave Gandy - http://fontawesome.io
 *
 * This file is part of the Tracy (https://tracy.nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 *
 * @param  array $panels
 * @param  array $info
 * @param  array $liveData
 * @return void
 */

namespace Tracy;

use Tracy;

?>




<!-- Tracy Debug Bar -->

<?php ob_start() ?>
&nbsp;

<style id="tracy-debug-style" class="tracy-debug">#tracy-debug{display:none;direction:ltr}body#tracy-debug{margin:5px 5px 0;display:block}body #tracy-debug{position:absolute;bottom:0;right:0}#tracy-debug *{font:inherit;color:inherit;background:transparent;margin:0;padding:0;border:none;text-align:inherit;list-style:inherit;opacity:1;border-radius:0;box-shadow:none;text-shadow:none}#tracy-debug b,#tracy-debug strong{font-weight:bold}#tracy-debug i,#tracy-debug em{font-style:italic}#tracy-debug a{color:#125EAE;text-decoration:none}#tracy-debug .tracy-panel a{color:#125EAE;text-decoration:none}#tracy-debug a:hover,#tracy-debug a:active,#tracy-debug a:focus{background-color:#125EAE;color:white}#tracy-debug .tracy-panel h2,#tracy-debug .tracy-panel h3,#tracy-debug .tracy-panel p{margin:.4em 0}#tracy-debug .tracy-panel table{border-collapse:collapse;background:#FDF5CE}#tracy-debug .tracy-panel tr:nth-child(2n) td{background:#F7F0CB}#tracy-debug .tracy-panel td,#tracy-debug .tracy-panel th{border:1px solid #E6DFBF;padding:2px 5px;vertical-align:top;text-align:left}#tracy-debug .tracy-panel th{background:#F4F3F1;color:#655E5E;font-size:90%;font-weight:bold}#tracy-debug .tracy-panel pre,#tracy-debug .tracy-panel code{font:9pt/1.5 Consolas,monospace}#tracy-debug table .tracy-right{text-align:right}#tracy-debug-bar{font:normal normal 13px/1.55 Tahoma,sans-serif;color:#333;border:1px solid #c9c9c9;background:#EDEAE0 url('data:image/png;base64,R0lGODlhAQAUALMAAOzq4e/t5e7s4/Dt5vDu5e3r4vDu5uvp4O/t5AAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAABABQAAAQM0EgySEAYi1LA+UcEADs=') top;background-size:1em;position:fixed;right:0;bottom:0;min-width:50px;white-space:nowrap;z-index:30000;opacity:.9;transition:opacity 0.2s;border-radius:3px;box-shadow:1px 1px 10px rgba(0,0,0,.15)}#tracy-debug-bar:hover{opacity:1;transition:opacity 0.1s}#tracy-debug-bar ul{list-style:none none;clear:left}#tracy-debug-bar li{float:left}#tracy-debug-bar ul.tracy-previous li{opacity:.6;background:#F5F3EE}#tracy-debug-bar ul.tracy-previous li:first-child{width:4.1em;text-align:right}#tracy-debug-bar img{vertical-align:bottom;position:relative;top:-2px}#tracy-debug-bar svg{vertical-align:bottom;width:1.23em;height:1.55em}#tracy-debug-bar .tracy-label{margin-left:.2em}#tracy-debug-bar li>a,#tracy-debug-bar li>span{color:#000;display:block;padding:0 .4em}#tracy-debug-bar li>a:hover{color:black;background:#c3c1b8}#tracy-debug-logo{cursor:move}#tracy-debug-logo svg{width:3.4em;margin:0 .2em 0 .5em}#tracy-debug .tracy-panel{font:normal normal 12px/1.5 sans-serif;background:white;color:#333;text-align:left;z-index:20001}#tracy-debug h1{font:normal normal 23px/1.4 Tahoma,sans-serif;color:#575753;margin:-5px -5px 5px;padding:0 25px 5px 5px;max-width:700px;word-wrap:break-word}#tracy-debug .tracy-mode-peek .tracy-inner,#tracy-debug .tracy-mode-float .tracy-inner{max-width:700px;max-height:500px;overflow:auto}#tracy-debug .tracy-panel .tracy-icons{display:none}#tracy-debug .tracy-mode-peek{display:none;position:fixed;right:0;bottom:0;padding:10px;min-width:150px;min-height:50px;border-radius:5px;box-shadow:1px 1px 20px rgba(102,102,102,0.36);border:1px solid rgba(0,0,0,0.1)}#tracy-debug .tracy-mode-peek h1{cursor:move}#tracy-debug .tracy-mode-float{position:fixed;right:0;bottom:0;padding:10px;min-width:150px;min-height:50px;border-radius:5px;opacity:.95;transition:opacity 0.2s;box-shadow:1px 1px 30px rgba(102,102,102,0.36);border:1px solid rgba(0,0,0,0.1)}#tracy-debug .tracy-focused{opacity:1;transition:opacity 0.1s}#tracy-debug .tracy-mode-float h1{cursor:move}#tracy-debug .tracy-mode-float .tracy-icons{display:block;position:absolute;top:0;right:5px;font-size:18px}#tracy-debug .tracy-icons a{color:#575753}#tracy-debug .tracy-icons a:hover{color:white}#tracy-debug pre.tracy-dump div{padding-left:3ex}#tracy-debug pre.tracy-dump div div{border-left:1px solid rgba(0,0,0,.1);margin-left:.5ex}#tracy-debug pre.tracy-dump{background:#FDF5CE;padding:.4em .7em;border:1px dotted silver;overflow:auto}#tracy-debug table pre.tracy-dump{padding:0;margin:0;border:none}#tracy-debug .tracy-dump-array,#tracy-debug .tracy-dump-object{color:#C22}#tracy-debug .tracy-dump-string{color:#35D}#tracy-debug .tracy-dump-number{color:#090}#tracy-debug .tracy-dump-null,#tracy-debug .tracy-dump-bool{color:#850}#tracy-debug .tracy-dump-visibility,#tracy-debug .tracy-dump-hash{font-size:85%;color:#999}#tracy-debug .tracy-dump-indent{display:none}@media print{#tracy-debug *{display:none}}.tracy-collapsed{display:none}.tracy-toggle.tracy-collapsed{display:inline}.tracy-toggle{cursor:pointer}.tracy-toggle:after{content:" ▼";opacity:.4}.tracy-toggle.tracy-collapsed:after{content:" ►"}pre.tracy-dump{text-align:left;color:#444;background:white}pre.tracy-dump div{padding-left:3ex}pre.tracy-dump div div{border-left:1px solid rgba(0,0,0,.1);margin-left:.5ex}.tracy-dump-array,.tracy-dump-object{color:#C22}.tracy-dump-string{color:#35D}.tracy-dump-number{color:#090}.tracy-dump-null,.tracy-dump-bool{color:#850}.tracy-dump-visibility,.tracy-dump-hash{font-size:85%;color:#999}.tracy-dump-indent{display:none}span[data-tracy-href]{border-bottom:1px dotted rgba(0,0,0,.2)}</style>

<script id="tracy-debug-script">/*<![CDATA[*/(function(){function l(a,b){for(;a;){if(a===b)return;a=a.parentNode}return!0}function n(a,b){var c=document.documentElement,h,d,e,q;b=b||{};var l=function(c){if(0===c.buttons)return n(c);h||(b.draggedClass&&a.classList.add(b.draggedClass),b.start&&b.start(c,a),h=!0);var p={};p[b.rightEdge?"right":"left"]=b.rightEdge?e-c.clientX:c.clientX+e;p[b.bottomEdge?"bottom":"top"]=b.bottomEdge?q-c.clientY:c.clientY+q;g(a,p);return!1},n=function(d){h&&(b.draggedClass&&a.classList.remove(b.draggedClass),b.stop&&
b.stop(d,a));f=null;c.removeEventListener("mousemove",l);c.removeEventListener("mouseup",n);return!1};(b.handle||a).addEventListener("mousedown",function(g){g.preventDefault();g.stopPropagation();if(f)return n(g);d=k(a);e=b.rightEdge?d.right+g.clientX:d.left-g.clientX;q=b.bottomEdge?d.bottom+g.clientY:d.top-g.clientY;f=!0;h=!1;c.addEventListener("mousemove",l);c.addEventListener("mouseup",n)});(b.handle||a).addEventListener("click",function(a){h&&a.stopImmediatePropagation()})}function e(a){for(var b=
{left:a.offsetLeft,top:a.offsetTop};a=a.offsetParent;)b.left+=a.offsetLeft,b.top+=a.offsetTop;return b}function g(a,b){a.Tracy&&a.Tracy.onMove&&a.Tracy.onMove.call(a,b);for(var c in b)a.style[c]=b[c]+"px"}function k(a){return{left:a.offsetLeft,top:a.offsetTop,right:a.style.right?parseInt(a.style.right,10):0,bottom:a.style.bottom?parseInt(a.style.bottom,10):0,width:a.offsetWidth,height:a.offsetHeight}}Tracy=window.Tracy||{};var d=Tracy.DebugPanel=function(a){this.id="tracy-debug-panel-"+a;this.elem=
document.getElementById(this.id);this.elem.Tracy=this.elem.Tracy||{}};d.PEEK="tracy-mode-peek";d.FLOAT="tracy-mode-float";d.WINDOW="tracy-mode-window";d.FOCUSED="tracy-focused";d.zIndex=2E4;d.prototype.init=function(){var a=this,b=this.elem;b.Tracy.onMove=function(b){a.moveConstrains(this,b)};n(b,{rightEdge:!0,bottomEdge:!0,handle:b.querySelector("h1"),stop:function(){a.toFloat()}});b.addEventListener("mouseover",function(b){l(b.relatedTarget,this)&&a.focus()});b.addEventListener("mouseout",function(b){l(b.relatedTarget,
this)&&a.blur()});b.addEventListener("click",function(){a.oldPosition=k(b)});document.documentElement.addEventListener("click",function(){if(a.oldPosition){var c=k(b);g(b,{right:c.right-c.width+a.oldPosition.width,bottom:c.bottom-c.height+a.oldPosition.height})}a.oldPosition=null});[].forEach.call(b.querySelectorAll(".tracy-icons a"),function(b){b.addEventListener("click",function(b){"close"===this.rel?a.toPeek():a.toWindow();b.preventDefault()})});this.restorePosition()};d.prototype.is=function(a){return this.elem.classList.contains(a)};
d.prototype.focus=function(a){var b=this.elem;this.is(d.WINDOW)?b.Tracy.window.focus():(clearTimeout(b.Tracy.displayTimeout),b.Tracy.displayTimeout=setTimeout(function(){b.classList.add(d.FOCUSED);b.style.display="block";b.style.zIndex=d.zIndex++;a&&a()},50))};d.prototype.blur=function(){var a=this.elem;a.classList.remove(d.FOCUSED);this.is(d.PEEK)&&(clearTimeout(a.Tracy.displayTimeout),a.Tracy.displayTimeout=setTimeout(function(){a.style.display="none"},50))};d.prototype.toFloat=function(){this.elem.classList.remove(d.WINDOW);
this.elem.classList.remove(d.PEEK);this.elem.classList.add(d.FLOAT);this.elem.style.display="block";this.reposition()};d.prototype.toPeek=function(){this.elem.classList.remove(d.WINDOW);this.elem.classList.remove(d.FLOAT);this.elem.classList.add(d.PEEK);this.elem.style.display="none";localStorage.removeItem(this.id)};d.prototype.toWindow=function(){var a=e(this.elem);a.left+="number"===typeof window.screenLeft?window.screenLeft:window.screenX+10;a.top+="number"===typeof window.screenTop?window.screenTop:
window.screenY+50;var b=window.open("",this.id.replace(/-/g,"_"),"left="+a.left+",top="+a.top+",width="+this.elem.offsetWidth+",height="+(this.elem.offsetHeight+15)+",resizable=yes,scrollbars=yes");if(b){a=b.document;a.write('<!DOCTYPE html><meta charset="utf-8"><style>'+document.getElementById("tracy-debug-style").innerHTML+"</style><script>"+document.getElementById("tracy-debug-script").innerHTML+'\x3c/script><body id="tracy-debug">');a.body.innerHTML='<div class="tracy-panel tracy-mode-window" id="'+
this.id+'">'+this.elem.innerHTML+"</div>";b.Tracy.Debug.getPanel(this.id);b.Tracy.Dumper.init();this.elem.querySelector("h1")&&(a.title=this.elem.querySelector("h1").innerHTML);var c=this;b.addEventListener("beforeunload",function(){c.toPeek();b.close()});a.addEventListener("keyup",function(a){27!==a.keyCode||(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)||b.close()});localStorage.setItem(this.id,JSON.stringify({window:!0}));this.elem.style.display="none";this.elem.classList.remove(d.FLOAT);this.elem.classList.remove(d.PEEK);
this.elem.classList.add(d.WINDOW);this.elem.Tracy.window=b}};d.prototype.reposition=function(){if(!this.is(d.WINDOW)){var a=k(this.elem);a.width&&(g(this.elem,{right:a.right,bottom:a.bottom}),localStorage.setItem(this.id,JSON.stringify({right:a.right,bottom:a.bottom})))}};d.prototype.moveConstrains=function(a,b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b.right=Math.min(Math.max(b.right,
-0.2*a.offsetWidth),c-0.8*a.offsetWidth);b.bottom=Math.min(Math.max(b.bottom,-0.2*a.offsetHeight),h-a.offsetHeight)};d.prototype.restorePosition=function(){var a=JSON.parse(localStorage.getItem(this.id));a?a.window?this.toWindow():this.elem.querySelector("*")&&(g(this.elem,a),this.toFloat()):this.elem.classList.add(d.PEEK)};var c=Tracy.DebugBar=function(){};c.prototype.id="tracy-debug-bar";c.prototype.init=function(){var a=document.getElementById(this.id),b=this;a.Tracy={};a.Tracy.onMove=function(a){b.moveConstrains(this,
a)};n(a,{rightEdge:!0,bottomEdge:!0,draggedClass:"tracy-dragged",stop:function(){b.savePosition()}});[].forEach.call(a.querySelectorAll("a"),function(c){c.addEventListener("click",function(a){if("close"===this.rel)b.close();else if(this.rel){var c=h.getPanel(this.rel);a.shiftKey?(c.toFloat(),c.toWindow()):c.is(d.FLOAT)?c.toPeek():(c.toFloat(),g(c.elem,{right:k(c.elem).right+Math.round(100*Math.random())+20,bottom:k(c.elem).bottom+Math.round(100*Math.random())+20}),c.reposition())}a.preventDefault()});
c.addEventListener("mouseover",function(b){if(l(b.relatedTarget,this)&&this.rel&&"close"!==this.rel&&!a.classList.contains("tracy-dragged")){var c=h.getPanel(this.rel),f=this;c.focus(function(){if(c.is(d.PEEK)){var b=k(c.elem);g(c.elem,{right:b.right-e(f).left+b.width-k(f).width-4+e(c.elem).left,bottom:b.bottom-e(a).top+b.height+4+e(c.elem).top})}})}});c.addEventListener("mouseout",function(b){l(b.relatedTarget,this)&&(this.rel&&"close"!==this.rel&&!a.classList.contains("tracy-dragged"))&&h.getPanel(this.rel).blur()})});
this.restorePosition()};c.prototype.close=function(){document.getElementById("tracy-debug").style.display="none"};c.prototype.moveConstrains=function(a,b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b.right=Math.min(Math.max(b.right,0),c-a.offsetWidth);b.bottom=Math.min(Math.max(b.bottom,0),h-a.offsetHeight)};c.prototype.savePosition=function(){var a=k(document.getElementById(this.id));
localStorage.setItem(this.id,JSON.stringify({right:a.right,bottom:a.bottom}))};c.prototype.restorePosition=function(){var a=JSON.parse(localStorage.getItem(this.id));a&&g(document.getElementById(this.id),a)};var h=Tracy.Debug={};h.init=function(){h.initResize();(new c).init();[].forEach.call(document.querySelectorAll(".tracy-panel"),function(a){h.getPanel(a.id).init()})};h.getPanel=function(a){return new d(a.replace("tracy-debug-panel-",""))};h.initResize=function(){window.addEventListener("resize",
function(){var a=document.getElementById(c.prototype.id);g(a,{right:k(a).right,bottom:k(a).bottom});[].forEach.call(document.querySelectorAll(".tracy-panel"),function(a){h.getPanel(a.id).reposition()})})};var f})();
(function(){Tracy=window.Tracy||{};Tracy.Dumper=Tracy.Dumper||{};Tracy.Dumper.init=function(c){c&&[].forEach.call(document.querySelectorAll(".tracy-dump[data-tracy-dump]"),function(h){try{h.appendChild(l(JSON.parse(h.getAttribute("data-tracy-dump")),c,h.classList.contains("tracy-collapsed"))),h.classList.remove("tracy-collapsed"),h.removeAttribute("data-tracy-dump")}catch(d){if(!(d instanceof k))throw d;}});this.inited||(this.inited=!0,document.body.addEventListener("click",function(c){var f;if(c.ctrlKey&&
(f=d(c.target,"[data-tracy-href]")))return location.href=f.getAttribute("data-tracy-href"),!1;if(!(c.shiftKey||c.altKey||c.ctrlKey||c.metaKey)&&(f=d(c.target,".tracy-toggle"))){var a=f.classList.contains("tracy-collapsed"),b=f.getAttribute("data-tracy-ref")||f.getAttribute("href",2),e=f;b&&"#"!==b?"#"===b.substr(0,1)&&(e=document):b="+";b=b.match(/(\^\s*([^+\s]*)\s*)?(\+\s*(\S*)\s*)?(.*)/);e=b[1]?d(e.parentNode,b[2]):e;e=b[3]?d(e.nextElementSibling,b[4],"nextElementSibling"):e;e=b[5]?e.querySelector(b[5]):
e;f.classList.toggle("tracy-collapsed",!a);e.classList.toggle("tracy-collapsed",!a);c.preventDefault()}}))};var l=function(c,d,f,a){var b=null===c?"null":typeof c,g="undefined"===typeof f?14:7;if("null"===b||"string"===b||"number"===b||"boolean"===b)return c="string"===b?'"'+c+'"':(c+"").toUpperCase(),e(null,null,[e("span",{"class":"tracy-dump-"+b.replace("ean","")},[c+"\n"])]);if(Array.isArray(c))return n([e("span",{"class":"tracy-dump-array"},["array"])," ("+(c[0]&&c.length||"")+")"]," [ ... ]",
null===c[0]?null:c,!0===f||c.length>=g,d,a);if("object"===b&&c.number)return e(null,null,[e("span",{"class":"tracy-dump-number"},[c.number+"\n"])]);if("object"===b&&c.type)return e(null,null,[e("span",null,[c.type+"\n"])]);if("object"===b){var b=c.object||c.resource,m=d[b];if(!m)throw new k;a=a||[];recursive=-1<a.indexOf(b);a.push(b);return n([e("span",{"class":c.object?"tracy-dump-object":"tracy-dump-resource",title:m.editor?"Declared in file "+m.editor.file+" on line "+m.editor.line:null,"data-tracy-href":m.editor?
m.editor.url:null},[m.name])," ",e("span",{"class":"tracy-dump-hash"},["#"+b])]," { ... }",m.items,!0===f||recursive||m.items&&m.items.length>=g,d,a)}},n=function(c,d,f,a,b,k){var m,l,n;if(!f||!f.length)return c.push(!f||f.length?d+"\n":"\n"),e(null,null,c);c=e(null,null,[m=e("span",{"class":a?"tracy-toggle tracy-collapsed":"tracy-toggle"},c),"\n",l=e("div",{"class":a?"tracy-collapsed":""})]);a?m.addEventListener("click",n=function(){m.removeEventListener("click",n);g(l,f,b,k)}):g(l,f,b,k);return c},
e=function(c,d,e){c instanceof Node||(c=c?document.createElement(c):document.createDocumentFragment());for(var a in d||{})null!==d[a]&&c.setAttribute(a,d[a]);e=e||[];for(a=0;a<e.length;a++)d=e[a],null!==d&&c.appendChild(d instanceof Node?d:document.createTextNode(d));return c},g=function(c,d,f,a){for(var b=0;b<d.length;b++){var g=d[b][2];e(c,null,[e("span",{"class":"tracy-dump-key"},[d[b][0]]),g?" ":null,g?e("span",{"class":"tracy-dump-visibility"},[1===g?"protected":"private"]):null," => ",l(d[b][1],
f,null,a)])}},k=function(){},d=function(c,d,e){for(var a=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;c&&d&&(1!==c.nodeType||!a.call(c,d));)c=c[e||"parentNode"];return c}})();/*]]>*/</script>


<?php foreach ($panels as $panel): if (!empty($panel['previous'])) continue ?>
	<div class="tracy-panel" id="tracy-debug-panel-<?php echo $panel['id'] ?>">
		<?php if ($panel['panel']): echo $panel['panel'] ?>
		<div class="tracy-icons">
			<a href="#" title="open in window">&curren;</a>
			<a href="#" rel="close" title="close window">&times;</a>
		</div>
		<?php endif ?>
	</div>
<?php endforeach ?>

<div id="tracy-debug-bar">
	<ul>
		<li id="tracy-debug-logo" title="Tracy Debugger <?php echo Debugger::VERSION, " \nhttps://tracy.nette.org" ?>">
			<svg viewBox="0 -10 1561 333"><path fill="#585755" d="m176 327h-57v-269h-119v-57h291v57h-115v269zm208-191h114c50 0 47-78 0-78h-114v78zm106-135c17 0 33 2 46 7 75 30 75 144 1 175-13 6-29 8-47 8h-27l132 74v68l-211-128v122h-57v-326h163zm300 57c-5 0-9 3-11 9l-56 156h135l-55-155c-2-7-6-10-13-10zm-86 222l-17 47h-61l102-285c20-56 107-56 126 0l102 285h-61l-17-47h-174zm410 47c-98 0-148-55-148-163v-2c0-107 50-161 149-161h118v57h-133c-26 0-45 8-58 25-12 17-19 44-19 81 0 71 26 106 77 106h133v57h-119zm270-145l-121-181h68l81 130 81-130h68l-121 178v148h-56v-145z"/></svg>
		</li>
		<?php foreach ($panels as $panel): if (!$panel['tab']) continue; ?>
		<?php if (!empty($panel['previous'])) echo '</ul><ul class="tracy-previous">'; ?>
		<li><?php if ($panel['panel']): ?><a href="#" rel="<?php echo $panel['id'] ?>"><?php echo trim($panel['tab']) ?></a><?php else: echo '<span>', trim($panel['tab']), '</span>'; endif ?></li>
		<?php endforeach ?>
		<li><a href="#" rel="close" title="close debug bar">&times;</a></li>
	</ul>
</div>
<?php $output = ob_get_clean(); ?>


<script>
(function() {
	if (!document.documentElement.classList) {
		document.write('<div style="position:fixed;right:0;bottom:0;z-index:30000;font:normal normal 12px/21px sans-serif;color:#333;background:#EDEAE0;border:1px solid #ccc;padding:.2em">Warning: Tracy requires IE 10+<\/div>');
		return;
	}

	window.addEventListener('load', function() {
		var debug = document.body.appendChild(document.createElement('div'));
		debug.id = 'tracy-debug';
		debug.innerHTML = <?php echo json_encode(Helpers::fixEncoding($output)) ?>;
		for (var i = 0, scripts = debug.getElementsByTagName('script'); i < scripts.length; i++) {
			(window.execScript || function(data) {
				window['eval'].call(window, data);
			})(scripts[i].innerHTML);
		}
		Tracy.Dumper.init(<?php echo json_encode($liveData) ?>);
		Tracy.Debug.init();
		debug.style.display = 'block';
	});
})();
</script>

<!-- /Tracy Debug Bar -->
