Fix error in running update.py

The new JS compiler web service is pickier about global.
This was built using a private install of yuicompressor-2.4.7.
Verified that systrace still generates valid .html.

Bug: 6825749
Change-Id: I3023bb7950d90636ad1906f2b8ac497aa4d22d84
diff --git a/script.js b/script.js
index 2f1fc67..5f0128c 100644
--- a/script.js
+++ b/script.js
@@ -1,16 +1,16 @@
 function onLoad(){reload()}function reload(){if(linuxPerfData){var g=new tracing.TimelineModel;g.importEvents("[]",!0,[linuxPerfData]);var e=document.querySelector(".view");cr.ui.decorate(e,tracing.TimelineView);e.model=g;e.tabIndex=1;e.timeline.focusElement=e}}document.addEventListener("DOMContentLoaded",onLoad);var global=this;
 this.cr=function(){function g(a,b,c,f){var e=new cr.Event(b+"Change");e.propertyName=b;e.newValue=c;e.oldValue=f;a.dispatchEvent(e)}function e(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function c(b,c){switch(c){case a.JS:var f=b+"_";return function(){return this[f]};case a.ATTR:var h=e(b);return function(){return this.getAttribute(h)};case a.BOOL_ATTR:return h=e(b),function(){return this.hasAttribute(h)}}}function f(b,c,f){switch(c){case a.JS:var h=b+"_";return function(a){var c=this[h];
-a!==c&&(this[h]=a,f&&f.call(this,a,c),g(this,b,a,c))};case a.ATTR:var k=e(b);return function(a){var c=this[k];a!==c&&(void 0==a?this.removeAttribute(k):this.setAttribute(k,a),f&&f.call(this,a,c),g(this,b,a,c))};case a.BOOL_ATTR:return k=e(b),function(a){var c=this[k];a!==c&&(a?this.setAttribute(k,b):this.removeAttribute(k),f&&f.call(this,a,c),g(this,b,a,c))}}}function h(a,b,c){var f=cr.doc.createEvent("Event");f.initEvent(a,!!b,!!c);f.__proto__=global.Event.prototype;return f}var a={JS:"js",ATTR:"attr",
+a!==c&&(this[h]=a,f&&f.call(this,a,c),g(this,b,a,c))};case a.ATTR:var i=e(b);return function(a){var c=this[i];a!==c&&(void 0==a?this.removeAttribute(i):this.setAttribute(i,a),f&&f.call(this,a,c),g(this,b,a,c))};case a.BOOL_ATTR:return i=e(b),function(a){var c=this[i];a!==c&&(a?this.setAttribute(i,b):this.removeAttribute(i),f&&f.call(this,a,c),g(this,b,a,c))}}}function h(a,b,c){var f=cr.doc.createEvent("Event");f.initEvent(a,!!b,!!c);f.__proto__=global.Event.prototype;return f}var a={JS:"js",ATTR:"attr",
 BOOL_ATTR:"boolAttr"},b=1;return{addSingletonGetter:function(a){a.getInstance=function(){return a.instance_||(a.instance_=new a)}},createUid:function(){return b++},define:function(a,b){var c;c=a.split(".");for(var f=global,e;c.length&&(e=c.shift());)f=e in f?f[e]:f[e]={};c=f;var f=b(),h;for(h in f)(e=Object.getOwnPropertyDescriptor(f,h))&&Object.defineProperty(c,h,e)},defineProperty:function(b,e,h,g){"function"==typeof b&&(b=b.prototype);h=h||a.JS;b.__lookupGetter__(e)||b.__defineGetter__(e,c(e,h));
 b.__lookupSetter__(e)||b.__defineSetter__(e,f(e,h,g))},dispatchPropertyChange:g,dispatchSimpleEvent:function(a,b,c,f){b=new cr.Event(b,c,f);return a.dispatchEvent(b)},Event:h,getUid:function(a){return a.hasOwnProperty("uid")?a.uid:a.uid=b++},initialize:function(){if(global.document)h.prototype={__proto__:global.Event.prototype},cr.isMac=/Mac/.test(navigator.platform),cr.isWindows=/Win/.test(navigator.platform),cr.isChromeOS=/CrOS/.test(navigator.userAgent),cr.isLinux=/Linux/.test(navigator.userAgent),
 cr.isGTK=/GTK/.test(chrome.toolkit),cr.isViews=/views/.test(chrome.toolkit),cr.isTouchOptimized=!!chrome.touchOptimized,cr.isTouchOptimized&&doc.documentElement.setAttribute("touch-optimized","");else{var a=cr;Object.defineProperty(global,"cr",{get:function(){Object.defineProperty(global,"cr",{value:a});a.initialize();return a},configurable:!0})}},PropertyKind:a,get doc(){return document}}}();cr.initialize();cr.define("cr",function(){function g(){}g.prototype={addEventListener:function(e,c){this.listeners_||(this.listeners_=Object.create(null));if(e in this.listeners_){var f=this.listeners_[e];0>f.indexOf(c)&&f.push(c)}else this.listeners_[e]=[c]},removeEventListener:function(e,c){if(this.listeners_&&e in this.listeners_){var f=this.listeners_[e],h=f.indexOf(c);0<=h&&(1==f.length?delete this.listeners_[e]:f.splice(h,1))}},dispatchEvent:function(e){if(!this.listeners_)return!0;var c=this;e.__defineGetter__("target",
 function(){return c});e.preventDefault=function(){this.returnValue=!1};var f=e.type,h=0;if(f in this.listeners_)for(var f=this.listeners_[f].concat(),a=0,b;b=f[a];a++)h=b.handleEvent?h|!1===b.handleEvent.call(b,e):h|!1===b.call(this,e);return!h&&e.returnValue}};return{EventTarget:g}});cr.define("cr.ui",function(){function g(e,c){return(c&&c.ownerDocument?c.ownerDocument:cr.doc).createElement(e)}return{decorate:function(e,c){var f;f="string"==typeof e?cr.doc.querySelectorAll(e):[e];for(var h=0,a;a=f[h];h++)a instanceof c||c.decorate(a)},define:function(e){function c(a){var b=f(h,a);c.decorate(b);for(var d in a)b[d]=a[d];return b}var f,h;"function"==typeof e?(f=e,h=""):(f=g,h=e);c.decorate=function(a){a.__proto__=c.prototype;a.decorate()};return c},limitInputWidth:function(e,c,f){function h(){if(e.scrollWidth>
-g)e.style.width=g+"px";else{e.style.width=0;var a=e.scrollWidth;e.style.width=a<f?f+"px":a+"px"}}e.style.width="10px";var a=e.ownerDocument.defaultView,b=a.getComputedStyle(e),a=a.getComputedStyle(c),d="rtl"==b.direction,m=e.getBoundingClientRect(),i=c.getBoundingClientRect(),m=d?i.right-m.right:m.left-i.left,b=parseInt(b.borderLeftWidth,10)+parseInt(b.paddingLeft,10)+parseInt(b.paddingRight,10)+parseInt(b.borderRightWidth,10),a=d?parseInt(a.paddingLeft,10):parseInt(a.paddingRight,10),g=c.clientWidth-
-m-b-a;e.addEventListener("input",h);h()}}});cr.define("cr.ui",function(){function g(c){this.classList_=c.documentElement.classList;var f=this;c.addEventListener("keydown",function(c){9==c.keyCode&&(f.visible=!0)},!0);c.addEventListener("mousedown",function(){f.visible=!1},!0)}g.prototype={set visible(c){c?this.classList_.add("focus-outline-visible"):this.classList_.remove("focus-outline-visible")},get visible(){this.classList_.contains("focus-outline-visible")}};var e=[];g.forDocument=function(c){for(var f=0;f<e.length;f++)if(c==e[f][0])return e[f][1];
-f=new g(c);e.push([c,f]);return f};return{FocusOutlineManager:g}});cr.define("cr.ui",function(){function g(){for(var b={TABBOX:e,TABS:c,TAB:f,TABPANELS:h,TABPANEL:a},d,m=0;d=this.children[m];m++){var i=b[d.tagName];i&&cr.ui.decorate(d,i)}}var e=cr.ui.define("tabbox");e.prototype={__proto__:HTMLElement.prototype,decorate:function(){g.call(this);this.addEventListener("selectedChange",this.handleSelectedChange_,!0);this.selectedIndex=0},handleSelectedChange_:function(a){var d=a.target;a.newValue&&(d.parentElement&&d.parentElement.parentElement)==this&&(this.selectedIndex=
+g)e.style.width=g+"px";else{e.style.width=0;var a=e.scrollWidth;e.style.width=a<f?f+"px":a+"px"}}e.style.width="10px";var a=e.ownerDocument.defaultView,b=a.getComputedStyle(e),a=a.getComputedStyle(c),d="rtl"==b.direction,l=e.getBoundingClientRect(),j=c.getBoundingClientRect(),l=d?j.right-l.right:l.left-j.left,b=parseInt(b.borderLeftWidth,10)+parseInt(b.paddingLeft,10)+parseInt(b.paddingRight,10)+parseInt(b.borderRightWidth,10),a=d?parseInt(a.paddingLeft,10):parseInt(a.paddingRight,10),g=c.clientWidth-
+l-b-a;e.addEventListener("input",h);h()}}});cr.define("cr.ui",function(){function g(c){this.classList_=c.documentElement.classList;var f=this;c.addEventListener("keydown",function(c){9==c.keyCode&&(f.visible=!0)},!0);c.addEventListener("mousedown",function(){f.visible=!1},!0)}g.prototype={set visible(c){c?this.classList_.add("focus-outline-visible"):this.classList_.remove("focus-outline-visible")},get visible(){this.classList_.contains("focus-outline-visible")}};var e=[];g.forDocument=function(c){for(var f=0;f<e.length;f++)if(c==e[f][0])return e[f][1];
+f=new g(c);e.push([c,f]);return f};return{FocusOutlineManager:g}});cr.define("cr.ui",function(){function g(){for(var b={TABBOX:e,TABS:c,TAB:f,TABPANELS:h,TABPANEL:a},d,l=0;d=this.children[l];l++){var j=b[d.tagName];j&&cr.ui.decorate(d,j)}}var e=cr.ui.define("tabbox");e.prototype={__proto__:HTMLElement.prototype,decorate:function(){g.call(this);this.addEventListener("selectedChange",this.handleSelectedChange_,!0);this.selectedIndex=0},handleSelectedChange_:function(a){var d=a.target;a.newValue&&(d.parentElement&&d.parentElement.parentElement)==this&&(this.selectedIndex=
 Array.prototype.indexOf.call(d.parentElement.children,d))},selectedIndex_:-1};cr.defineProperty(e,"selectedIndex",cr.PropertyKind.JS_PROP,function(a){for(var d,c,f=0;d=this.children[f];f++)for(var e=0;c=d.children[e];e++)c.selected=e==a});var c=cr.ui.define("tabs");c.prototype={__proto__:HTMLElement.prototype,decorate:function(){g.call(this);this.tabIndex=0;this.addEventListener("keydown",this.handleKeyDown_.bind(this));this.focusOutlineManager_=cr.ui.FocusOutlineManager.forDocument(this.ownerDocument)},
 handleKeyDown_:function(a){var d=0;switch(a.keyIdentifier){case "Left":case "Up":d=-1;break;case "Right":case "Down":d=1}d&&("rtl"==this.ownerDocument.defaultView.getComputedStyle(this).direction&&(d*=-1),a=this.children.length,this.parentElement.selectedIndex=(this.parentElement.selectedIndex+d+a)%a,this.focusOutlineManager_.visible=!0)}};var f=cr.ui.define("tab");f.prototype={__proto__:HTMLElement.prototype,decorate:function(){var a=this;this.addEventListener(cr.isMac?"click":"mousedown",function(){a.selected=
-!0})}};cr.defineProperty(f,"selected",cr.PropertyKind.BOOL_ATTR);var h=cr.ui.define("tabpanels");h.prototype={__proto__:HTMLElement.prototype,decorate:g};var a=cr.ui.define("tabpanel");a.prototype={__proto__:HTMLElement.prototype,decorate:function(){}};cr.defineProperty(a,"selected",cr.PropertyKind.BOOL_ATTR);return{TabBox:e,Tabs:c,Tab:f,TabPanels:h,TabPanel:a}});global=this;function $(g){return document.getElementById(g)}function chromeSend(g,e,c,f){var h=global[c];global[c]=function(){global[c]=h;var a=Array.prototype.slice.call(arguments);return f.apply(global,a)};chrome.send(g,e)}function url(g){g=g.replace(/(\(|\)|\,|\s|\'|\"|\\)/g,"\\$1");/\\\\$/.test(g)&&(g+=" ");return'url("'+g+'")'}function parseQueryParams(g){for(var e={},g=unescape(g.search.substring(1)).split("&"),c=0;c<g.length;c++){var f=g[c].split("=");e[f[0]]=f[1]}return e}
+!0})}};cr.defineProperty(f,"selected",cr.PropertyKind.BOOL_ATTR);var h=cr.ui.define("tabpanels");h.prototype={__proto__:HTMLElement.prototype,decorate:g};var a=cr.ui.define("tabpanel");a.prototype={__proto__:HTMLElement.prototype,decorate:function(){}};cr.defineProperty(a,"selected",cr.PropertyKind.BOOL_ATTR);return{TabBox:e,Tabs:c,Tab:f,TabPanels:h,TabPanel:a}});function $(g){return document.getElementById(g)}function chromeSend(g,e,c,f){var h=global[c];global[c]=function(){global[c]=h;var a=Array.prototype.slice.call(arguments);return f.apply(global,a)};chrome.send(g,e)}function url(g){g=g.replace(/(\(|\)|\,|\s|\'|\"|\\)/g,"\\$1");/\\\\$/.test(g)&&(g+=" ");return'url("'+g+'")'}function parseQueryParams(g){for(var e={},g=unescape(g.search.substring(1)).split("&"),c=0;c<g.length;c++){var f=g[c].split("=");e[f[0]]=f[1]}return e}
 function findAncestorByClass(g,e){return findAncestor(g,function(c){return c.classList?c.classList.contains(e):null})}function findAncestor(g,e){for(var c=!1;null!=g&&!(c=e(g));)g=g.parentNode;return c?g:null}function swapDomNodes(g,e){var c=g.nextSibling;if(c==e)swapDomNodes(e,g);else{var f=g.parentNode;e.parentNode.replaceChild(g,e);f.insertBefore(e,c)}}
 function disableTextSelectAndDrag(){document.onselectstart=function(g){g.preventDefault()};document.ondragstart=function(g){g.preventDefault()}}function isRTL(){return"rtl"==document.documentElement.dir}function assert(g,e){if(!g){var c="Assertion failed";e&&(c=c+": "+e);throw Error(c);}}function getRequiredElement(g){var e=$(g);assert(e,"Missing required element: "+g);return e}
 document.addEventListener("click",function(g){if(g.returnValue){var e=g.target;if(e.nodeType==Node.ELEMENT_NODE&&e.webkitMatchesSelector("A, A *")){for(;"A"!=e.tagName;)e=e.parentElement;if(("file:"==e.protocol||"about:"==e.protocol)&&(0==g.button||1==g.button))chrome.send("navigateToUrl",[e.href,e.target,g.button,g.altKey,g.ctrlKey,g.metaKey,g.shiftKey]),g.preventDefault()}}});function appendParam(g,e,c){e=encodeURIComponent(e)+"="+encodeURIComponent(c);return-1==g.indexOf("?")?g+"?"+e:g+"&"+e};cr.define("tracing",function(){var g=cr.ui.define("div");g.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("overlay-root");this.visible=!1;this.contentHost=this.ownerDocument.createElement("div");this.contentHost.classList.add("content-host");this.tabCatcher=this.ownerDocument.createElement("span");this.tabCatcher.tabIndex=0;this.appendChild(this.contentHost);this.onKeydownBoundToThis_=this.onKeydown_.bind(this);this.onFocusInBoundToThis_=this.onFocusIn_.bind(this);
@@ -26,8 +26,8 @@
 this.traceEvents_;this.dispatchEvent(e)},onSystemTraceDataCollected:function(e){console.log("onSystemTraceDataCollected with "+e.length+" chars of data.");this.systemTraceEvents_=e},get systemTraceEvents(){return this.systemTraceEvents_},beginLoadTraceFile:function(){chrome.send("loadTraceFile")},onLoadTraceFileComplete:function(e){e.traceEvents?this.traceEvents_=e.traceEvents:e.length?this.traceEvents_=e:console.log("Expected an array when loading the trace file");e.systemTraceEvents?this.systemTraceEvents_=
 e.systemTraceEvents:e.length?this.systemTraceEvents_=e:console.log("Expected an array when loading the trace file");e=new cr.Event("loadTraceFileComplete");e.events=this.traceEvents_;this.dispatchEvent(e)},onLoadTraceFileCanceled:function(){cr.dispatchSimpleEvent(this,"loadTraceFileCanceled")},beginSaveTraceFile:function(){chrome.send("saveTraceFile",[JSON.stringify({traceEvents:this.traceEvents_,systemTraceEvents:this.systemTraceEvents_,clientInfo:this.clientInfo_,gpuInfo:this.gpuInfo_})])},onSaveTraceFileComplete:function(){cr.dispatchSimpleEvent(this,
 "saveTraceFileComplete")},onSaveTraceFileCanceled:function(){cr.dispatchSimpleEvent(this,"saveTraceFileCanceled")},selfTest:function(){this.beginTracing();window.setTimeout(this.endTracing.bind(This),500)}};return{TracingController:g}});cr.define("tracing",function(){function g(a,b,d,c,f){this.title=a;this.start=d;this.colorId=b;this.args=c;this.didNotFinish=!1;void 0!==f&&(this.duration=f)}function e(a,b,d,c,f){g.call(this,a,b,d,c,f);this.subSlices=[]}function c(a,b,d,c){g.call(this,a,b,d,c)}function f(a,b){if(!a)throw"Parent must be provided.";this.parent=a;this.tid=b;this.subRows=[[]];this.asyncSlices=new d(this.ptid)}function h(a,b,d){this.parent=a;this.id=b;this.name=d;this.seriesNames=[];this.seriesColors=[];this.timestamps=
-[];this.samples=[]}function a(a){this.pid=a;this.threads={};this.counters={}}function b(a){this.cpuNumber=a;this.slices=[];this.counters={}}function d(a){this.name=a;this.slices=[]}function m(a){for(var b=0,d=0;d<a.length;++d)b=(b+37*b+11*a.charCodeAt(d))%4294967295;return b}function i(a,b){this.cpus={};this.processes={};this.importErrors=[];this.asyncSliceGroups={};a&&this.importEvents(a,b)}function j(){}function k(a){this.text_=a}g.prototype={selected:!1,duration:void 0,get end(){return this.start+
-this.duration}};e.prototype={__proto__:g.prototype};c.prototype={__proto__:g.prototype,id:void 0,startThread:void 0,endThread:void 0,subSlices:void 0};var l={};f.getPTIDFromPidAndTid=function(a,b){l[a]||(l[a]={});l[a][b]||(l[a][b]=a+":"+b);return l[a][b]};f.prototype={name:void 0,get ptid(){return f.getPTIDFromPidAndTid(this.tid,this.parent.pid)},getSubrow:function(a){for(;a>=this.subRows.length;)this.subRows.push([]);return this.subRows[a]},shiftSubRow_:function(a,b){for(var d=0;d<a.length;d++){var c=
+[];this.samples=[]}function a(a){this.pid=a;this.threads={};this.counters={}}function b(a){this.cpuNumber=a;this.slices=[];this.counters={}}function d(a){this.name=a;this.slices=[]}function l(a){for(var b=0,d=0;d<a.length;++d)b=(b+37*b+11*a.charCodeAt(d))%4294967295;return b}function j(a,b){this.cpus={};this.processes={};this.importErrors=[];this.asyncSliceGroups={};a&&this.importEvents(a,b)}function k(){}function i(a){this.text_=a}g.prototype={selected:!1,duration:void 0,get end(){return this.start+
+this.duration}};e.prototype={__proto__:g.prototype};c.prototype={__proto__:g.prototype,id:void 0,startThread:void 0,endThread:void 0,subSlices:void 0};var o={};f.getPTIDFromPidAndTid=function(a,b){o[a]||(o[a]={});o[a][b]||(o[a][b]=a+":"+b);return o[a][b]};f.prototype={name:void 0,get ptid(){return f.getPTIDFromPidAndTid(this.tid,this.parent.pid)},getSubrow:function(a){for(;a>=this.subRows.length;)this.subRows.push([]);return this.subRows[a]},shiftSubRow_:function(a,b){for(var d=0;d<a.length;d++){var c=
 a[d];c.start+=b}},shiftTimestampsForward:function(a){this.cpuSlices&&this.shiftSubRow_(this.cpuSlices,a);for(var b=0;b<this.subRows.length;b++)this.shiftSubRow_(this.subRows[b],a);this.asyncSlices.shiftTimestampsForward(a)},updateBounds:function(){var a=[],b;0!=this.subRows[0].length&&(b=this.subRows[0],a.push(b[0].start),a.push(b[b.length-1].end));this.asyncSlices.slices.length&&(this.asyncSlices.updateBounds(),a.push(this.asyncSlices.minTimestamp),a.push(this.asyncSlices.maxTimestamp));a.length?
 (this.minTimestamp=Math.min.apply(Math,a),this.maxTimestamp=Math.max.apply(Math,a)):this.maxTimestamp=this.minTimestamp=void 0},get userFriendlyName(){return this.parent.pid+": "+(this.name||this.tid)},get userFriendlyDetails(){return"pid: "+this.parent.pid+", tid: "+this.tid+(this.name?", name: "+this.name:"")}};f.compare=function(b,d){if(b.parent.pid!=d.parent.pid)return a.compare(b.parent,d.parent.pid);if(b.name&&d.name){var c=b.name.localeCompare(d.name);return 0==c?b.tid-d.tid:c}return b.name?
 -1:d.name?1:b.tid-d.tid};h.prototype={__proto__:Object.prototype,get numSeries(){return this.seriesNames.length},get numSamples(){return this.timestamps.length},shiftTimestampsForward:function(a){for(var b=0;b<this.timestamps.length;b++)this.timestamps[b]+=a},updateBounds:function(){if(this.seriesNames.length!=this.seriesColors.length)throw"seriesNames.length must match seriesColors.length";if(this.numSeries*this.numSamples!=this.samples.length)throw"samples.length must be a multiple of numSamples.";
@@ -37,28 +37,28 @@
 this.minTimestamp=void 0}};b.compare=function(a,b){return a.cpuNumber-b.cpuNumber};d.prototype={__proto__:Object.prototype,push:function(a){this.slices.push(a)},get length(){return this.slices.length},subRows_:void 0,sortSlices_:function(){this.slices.sort(function(a,b){return a.start-b.start})},shiftTimestampsForward:function(a){for(var b=0;b<this.slices.length;b++){var d=this.slices[b];d.start+=a;for(var c=0;c<d.subSlices.length;c++)d.subSlices[c].start+=a}},updateBounds:function(){this.sortSlices_();
 this.slices.length?(this.minTimestamp=this.slices[0].start,this.maxTimestamp=this.slices[this.slices.length-1].end):this.maxTimestamp=this.minTimestamp=void 0;this.subRows_=void 0},get subRows(){this.subRows_||this.rebuildSubRows_();return this.subRows_},rebuildSubRows_:function(){this.sortSlices_();for(var a=[],b=0;b<this.slices.length;b++){for(var d=this.slices[b],c=!1,f=0;f<a.length;f++){var e=a[f];if(d.start>=e[e.length-1].end){c=!0;if(void 0===d.subSlices||1>d.subSlices.length)throw"TimelineAsyncEvent missing subSlices: "+
 d.name;for(f=0;f<d.subSlices.length;f++)e.push(d.subSlices[f]);break}}if(!c&&(e=[],void 0!==d.subSlices)){for(f=0;f<d.subSlices.length;f++)e.push(d.subSlices[f]);a.push(e)}}this.subRows_=a},computeSubGroups:function(){for(var a={},b=0;b<this.slices.length;++b){var c=this.slices[b],f=c.startThread.ptid;a[f]||(a[f]=new d(this.name));a[f].slices.push(c)}var b=[],e;for(e in a)c=a[e],c.updateBounds(),b.push(c);return b}};h.compare=function(b,d){if(b.parent.pid!=d.parent.pid)return a.compare(b.parent,d.parent.pid);
-var c=b.name.localeCompare(d.name);return 0==c?b.tid-d.tid:c};var o=[{r:138,g:113,b:152},{r:175,g:112,b:133},{r:127,g:135,b:225},{r:93,g:81,b:137},{r:116,g:143,b:119},{r:178,g:214,b:122},{r:87,g:109,b:147},{r:119,g:155,b:95},{r:114,g:180,b:160},{r:132,g:85,b:103},{r:157,g:210,b:150},{r:148,g:94,b:86},{r:164,g:108,b:138},{r:139,g:191,b:150},{r:110,g:99,b:145},{r:80,g:129,b:109},{r:125,g:140,b:149},{r:93,g:124,b:132},{r:140,g:85,b:140},{r:104,g:163,b:162},{r:132,g:141,b:178},{r:131,g:105,b:147},{r:135,
-g:183,b:98},{r:152,g:134,b:177},{r:141,g:188,b:141},{r:133,g:160,b:210},{r:126,g:186,b:148},{r:112,g:198,b:205},{r:180,g:122,b:195},{r:203,g:144,b:152},{r:182,g:125,b:143},{r:126,g:200,b:148},{r:133,g:160,b:210},{r:240,g:240,b:240}],q=o.length-4,u=o.length,v=o.concat(o.map(function(a){var b;b=240<=a.r&&240<=a.g&&240<=a.b?-0.2:0.45;return{r:Math.min(255,a.r+Math.floor(a.r*b)),g:Math.min(255,a.g+Math.floor(a.g*b)),b:Math.min(255,a.b+Math.floor(a.b*b))}})).map(function(a){return"rgb("+a.r+","+a.g+","+
-a.b+")"}),t={},y=[];i.registerImporter=function(a){y.push(a)};j.canImport=function(a){return a instanceof Array&&0==a.length?!0:"string"===typeof a||a instanceof String?0==a.length:!1};j.prototype={__proto__:Object.prototype,importEvents:function(){},finalizeImport:function(){}};i.registerImporter(j);i.prototype={__proto__:cr.EventTarget.prototype,get numProcesses(){var a=0,b;for(b in this.processes)a++;return a},getOrCreateCpu:function(a){this.cpus[a]||(this.cpus[a]=new b(a));return this.cpus[a]},
+var c=b.name.localeCompare(d.name);return 0==c?b.tid-d.tid:c};var m=[{r:138,g:113,b:152},{r:175,g:112,b:133},{r:127,g:135,b:225},{r:93,g:81,b:137},{r:116,g:143,b:119},{r:178,g:214,b:122},{r:87,g:109,b:147},{r:119,g:155,b:95},{r:114,g:180,b:160},{r:132,g:85,b:103},{r:157,g:210,b:150},{r:148,g:94,b:86},{r:164,g:108,b:138},{r:139,g:191,b:150},{r:110,g:99,b:145},{r:80,g:129,b:109},{r:125,g:140,b:149},{r:93,g:124,b:132},{r:140,g:85,b:140},{r:104,g:163,b:162},{r:132,g:141,b:178},{r:131,g:105,b:147},{r:135,
+g:183,b:98},{r:152,g:134,b:177},{r:141,g:188,b:141},{r:133,g:160,b:210},{r:126,g:186,b:148},{r:112,g:198,b:205},{r:180,g:122,b:195},{r:203,g:144,b:152},{r:182,g:125,b:143},{r:126,g:200,b:148},{r:133,g:160,b:210},{r:240,g:240,b:240}],q=m.length-4,u=m.length,t=m.concat(m.map(function(a){var b;b=240<=a.r&&240<=a.g&&240<=a.b?-0.2:0.45;return{r:Math.min(255,a.r+Math.floor(a.r*b)),g:Math.min(255,a.g+Math.floor(a.g*b)),b:Math.min(255,a.b+Math.floor(a.b*b))}})).map(function(a){return"rgb("+a.r+","+a.g+","+
+a.b+")"}),z={},x=[];j.registerImporter=function(a){x.push(a)};k.canImport=function(a){return a instanceof Array&&0==a.length?!0:"string"===typeof a||a instanceof String?0==a.length:!1};k.prototype={__proto__:Object.prototype,importEvents:function(){},finalizeImport:function(){}};j.registerImporter(k);j.prototype={__proto__:cr.EventTarget.prototype,get numProcesses(){var a=0,b;for(b in this.processes)a++;return a},getOrCreateCpu:function(a){this.cpus[a]||(this.cpus[a]=new b(a));return this.cpus[a]},
 getOrCreateProcess:function(b){this.processes[b]||(this.processes[b]=new a(b));return this.processes[b]},pruneEmptyThreads:function(){for(var a in this.processes){var b=this.processes[a],d={},c;for(c in b.threads){for(var f=b.threads[c],e=!1,q=0;q<f.subRows.length;q++)e|=0<f.subRows[q].length;if(e||0<f.asyncSlices.length)d[c]=f}b.threads=d}},updateBounds:function(){for(var a=Infinity,b=-a,d=!1,c=this.getAllThreads(),f=0;f<c.length;f++){var e=c[f];e.updateBounds();void 0!=e.minTimestamp&&void 0!=e.maxTimestamp&&
 (a=Math.min(a,e.minTimestamp),b=Math.max(b,e.maxTimestamp),d=!0)}c=this.getAllCounters();for(f=0;f<c.length;f++)e=c[f],e.updateBounds(),void 0!=e.minTimestamp&&void 0!=e.maxTimestamp&&(d=!0,a=Math.min(a,e.minTimestamp),b=Math.max(b,e.maxTimestamp));for(var q in this.cpus)f=this.cpus[q],f.updateBounds(),void 0!=f.minTimestamp&&void 0!=f.maxTimestamp&&(d=!0,a=Math.min(a,f.minTimestamp),b=Math.max(b,f.maxTimestamp));d?(this.minTimestamp=a,this.maxTimestamp=b):this.minTimestamp=this.maxTimestamp=void 0},
 shiftWorldToZero:function(){if(void 0!==this.minTimestamp){var a=this.minTimestamp,b;for(b in this.processes)this.processes[b].shiftTimestampsForward(-a);for(var d in this.cpus)this.cpus[d].shiftTimestampsForward(-a);this.updateBounds()}},getAllThreads:function(){var a=[],b;for(b in this.processes){var d=this.processes[b],c;for(c in d.threads)a.push(d.threads[c])}return a},getAllCpus:function(){var a=[],b;for(b in this.cpus)a.push(this.cpus[b]);return a},getAllProcesses:function(){var a=[],b;for(b in this.processes)a.push(this.processes[b]);
-return a},getAllCounters:function(){var a=[],b;for(b in this.processes){var d=this.processes[b],c;for(c in d.counters)a.push(d.counters[c])}for(var f in this.cpus){b=this.cpus[f];for(var e in b.counters)a.push(b.counters[e])}return a},importOneTrace_:function(a,b){for(var d,c=0;c<y.length;++c)if(y[c].canImport(a)){d=y[c];break}if(!d)throw"Could not find an importer for the provided eventData.";d=new d(this,a,b);d.importEvents();return d},importEvents:function(a,b,d){void 0===b&&(b=!0);var c=[],a=
-this.importOneTrace_(a,!1);c.push(a);if(d)for(var f=0;f<d.length;++f)a=this.importOneTrace_(d[f],!0),c.push(a);for(f=0;f<c.length;++f)c[f].finalizeImport();for(f=0;f<c.length;++f)this.pruneEmptyThreads();this.updateBounds();b&&this.shiftWorldToZero();b&&(void 0!==this.minTimestamp&&void 0!==this.maxTimestamp)&&(b=0.15*(this.maxTimestamp-this.minTimestamp),this.minTimestamp-=b,this.maxTimestamp+=b)}};k.prototype={__proto__:Object.prototype,matchSlice:function(a){return 0==this.text_.length?!1:-1!=
-a.title.indexOf(this.text_)}};return{getPallette:function(){return v},getPalletteHighlightIdBoost:function(){return u},getColorIdByName:function(a){if("iowait"==a)return q;if("running"==a)return q+1;if("runnable"==a)return q+2;if("sleeping"==a)return q+3;throw"Unrecognized color "+a;},getStringHash:m,getStringColorId:function(a){if(void 0===t[a]){var b=m(a);t[a]=b%q}return t[a]},TimelineSlice:g,TimelineThreadSlice:e,TimelineAsyncSlice:c,TimelineThread:f,TimelineCounter:h,TimelineProcess:a,TimelineCpu:b,
-TimelineAsyncSliceGroup:d,TimelineModel:i,TimelineFilter:k}});cr.define("tracing",function(){function g(a){this.cpu=a}function e(){this.openSlices=[]}function c(a,b,d){this.isAdditionalImport_=d;this.model_=a;this.events_=b;this.clockSyncRecords_=[];this.cpuStates_={};this.kernelThreadStates_={};this.buildMapFromLinuxPidsToTimelineThreads();this.lineNumber=-1;this.threadStateByKPID_={}}g.prototype={__proto__:Object.prototype,switchRunningLinuxPid:function(a,b,d,c,f,e){if(void 0!==this.lastActivePid&&0!=this.lastActivePid){var h=d-this.lastActiveTs;name=(a=a.threadsByLinuxPid[this.lastActivePid])?
-a.userFriendlyName:this.lastActiveComm;this.cpu.slices.push(new tracing.TimelineSlice(name,tracing.getStringColorId(name),this.lastActiveTs,{comm:this.lastActiveComm,tid:this.lastActivePid,prio:this.lastActivePrio,stateWhenDescheduled:b},h))}this.lastActiveTs=d;this.lastActivePid=c;this.lastActiveComm=f;this.lastActivePrio=e}};TestExports={};var f=/^\s*(.+?)\s+\[(\d+)\]\s*([d.][N.][sh.][\d.])?\s*(\d+\.\d+):\s+(\S+):\s(.*)$/;TestExports.lineRE=f;var h=/trace_event_clock_sync: parent_ts=(\d+\.?\d*)/;
+return a},getAllCounters:function(){var a=[],b;for(b in this.processes){var d=this.processes[b],c;for(c in d.counters)a.push(d.counters[c])}for(var f in this.cpus){b=this.cpus[f];for(var e in b.counters)a.push(b.counters[e])}return a},importOneTrace_:function(a,b){for(var d,c=0;c<x.length;++c)if(x[c].canImport(a)){d=x[c];break}if(!d)throw"Could not find an importer for the provided eventData.";d=new d(this,a,b);d.importEvents();return d},importEvents:function(a,b,d){void 0===b&&(b=!0);var c=[],a=
+this.importOneTrace_(a,!1);c.push(a);if(d)for(var f=0;f<d.length;++f)a=this.importOneTrace_(d[f],!0),c.push(a);for(f=0;f<c.length;++f)c[f].finalizeImport();for(f=0;f<c.length;++f)this.pruneEmptyThreads();this.updateBounds();b&&this.shiftWorldToZero();b&&(void 0!==this.minTimestamp&&void 0!==this.maxTimestamp)&&(b=0.15*(this.maxTimestamp-this.minTimestamp),this.minTimestamp-=b,this.maxTimestamp+=b)}};i.prototype={__proto__:Object.prototype,matchSlice:function(a){return 0==this.text_.length?!1:-1!=
+a.title.indexOf(this.text_)}};return{getPallette:function(){return t},getPalletteHighlightIdBoost:function(){return u},getColorIdByName:function(a){if("iowait"==a)return q;if("running"==a)return q+1;if("runnable"==a)return q+2;if("sleeping"==a)return q+3;throw"Unrecognized color "+a;},getStringHash:l,getStringColorId:function(a){if(void 0===z[a]){var b=l(a);z[a]=b%q}return z[a]},TimelineSlice:g,TimelineThreadSlice:e,TimelineAsyncSlice:c,TimelineThread:f,TimelineCounter:h,TimelineProcess:a,TimelineCpu:b,
+TimelineAsyncSliceGroup:d,TimelineModel:j,TimelineFilter:i}});cr.define("tracing",function(){function g(a){this.cpu=a}function e(){this.openSlices=[]}function c(a,b,d){this.isAdditionalImport_=d;this.model_=a;this.events_=b;this.clockSyncRecords_=[];this.cpuStates_={};this.kernelThreadStates_={};this.buildMapFromLinuxPidsToTimelineThreads();this.lineNumber=-1;this.threadStateByKPID_={}}g.prototype={__proto__:Object.prototype,switchRunningLinuxPid:function(a,b,d,c,f,e){if(void 0!==this.lastActivePid&&0!=this.lastActivePid){var h=d-this.lastActiveTs;name=(a=a.threadsByLinuxPid[this.lastActivePid])?
+a.userFriendlyName:this.lastActiveComm;b=new tracing.TimelineSlice(name,tracing.getStringColorId(name),this.lastActiveTs,{comm:this.lastActiveComm,tid:this.lastActivePid,prio:this.lastActivePrio,stateWhenDescheduled:b},h);this.cpu.slices.push(b)}this.lastActiveTs=d;this.lastActivePid=c;this.lastActiveComm=f;this.lastActivePrio=e}};TestExports={};var f=/^\s*(.+?)\s+\[(\d+)\]\s*([d.][N.][sh.][\d.])?\s*(\d+\.\d+):\s+(\S+):\s(.*)$/;TestExports.lineRE=f;var h=/trace_event_clock_sync: parent_ts=(\d+\.?\d*)/;
 TestExports.traceEventClockSyncRE=h;c.canImport=function(a){if(!("string"===typeof a||a instanceof String))return!1;if(/^# tracer:/.exec(a))return!0;var b=/^(.+)\n/.exec(a);b&&(a=b[1]);return f.exec(a)?!0:!1};c.prototype={__proto__:Object.prototype,buildMapFromLinuxPidsToTimelineThreads:function(){this.threadsByLinuxPid={};this.model_.getAllThreads().forEach(function(a){this.threadsByLinuxPid[a.tid]=a}.bind(this))},getOrCreateCpuState:function(a){if(!this.cpuStates_[a]){var b=this.model_.getOrCreateCpu(a);
 this.cpuStates_[a]=new g(b)}return this.cpuStates_[a]},parsePid:function(a){a=/.+-(\d+)/.exec(a)[1];return a=parseInt(a)},parseThreadName:function(a){return/(.+)-\d+/.exec(a)[1]},getOrCreateKernelThread:function(a,b,d){this.kernelThreadStates_[a]||(void 0==b&&(b=this.parsePid(a)),void 0==d&&(d=b),d=this.model_.getOrCreateProcess(b).getOrCreateThread(d),d.name=a,this.kernelThreadStates_[a]={pid:b,thread:d,openSlice:void 0,openSliceTS:void 0,asyncSlices:{}},this.threadsByLinuxPid[b]=d);return this.kernelThreadStates_[a]},
 importEvents:function(){this.importCpuData();this.alignClocks()&&this.buildPerThreadCpuSlicesFromCpuState()},finalizeImport:function(){},buildPerThreadCpuSlicesFromCpuState:function(){for(var a in this.cpuStates_)for(var b=this.cpuStates_[a].cpu,d=0;d<b.slices.length;d++){var c=b.slices[d],f=this.threadsByLinuxPid[c.args.tid];f&&(f.tempCpuSlices||(f.tempCpuSlices=[]),c.index=d,f.tempCpuSlices.push(c))}var e=tracing.getColorIdByName("running"),h=tracing.getColorIdByName("runnable"),g=tracing.getColorIdByName("sleeping"),
-o=tracing.getColorIdByName("iowait");this.model_.getAllThreads().forEach(function(a){if(a.tempCpuSlices){var b=a.tempCpuSlices;delete a.tempCpuSlices;b.sort(function(a,b){var d=a.start-b.start;return 0==d?a.index-b.index:d});var d=[];if(b.length){var c=b[0];d.push(new tracing.TimelineSlice("Running",e,c.start,{},c.duration))}for(c=1;c<b.length;c++){var f=b[c-1],m=b[c],i=m.start-f.end;if("S"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Sleeping",g,f.end,{},i));else if("R"==f.args.stateWhenDescheduled||
-"R+"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Runnable",h,f.end,{},i));else if("D"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Uninterruptible Sleep",o,f.end,{},i));else if("T"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("__TASK_STOPPED",o,f.end,{},i));else if("t"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("debug",o,f.end,{},i));else if("Z"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Zombie",o,f.end,{},
-i));else if("X"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Exit Dead",o,f.end,{},i));else if("x"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Task Dead",o,f.end,{},i));else if("W"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("WakeKill",o,f.end,{},i));else if("D|W"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Uninterruptible Sleep | WakeKill",o,f.end,{},i));else throw"Unrecognized state: "+f.args.stateWhenDescheduled;d.push(new tracing.TimelineSlice("Running",
-e,m.start,{},m.duration))}a.cpuSlices=d}})},alignClocks:function(){if(0==this.clockSyncRecords_.length){if(!this.isAdditionalImport_)return;this.abortImport();return!1}var a=this.clockSyncRecords_[0];if(0==a.parentTS||a.parentTS==a.perfTS)return!0;var a=a.parentTS-a.perfTS,b;for(b in this.cpuStates_){for(var d=this.cpuStates_[b].cpu,c=0;c<d.slices.length;c++){var f=d.slices[c];f.start+=a;f.duration=f.duration}for(var e in d.counters){c=d.counters[e];for(f=0;f<c.timestamps.length;f++)c.timestamps[f]+=
+m=tracing.getColorIdByName("iowait");this.model_.getAllThreads().forEach(function(a){if(a.tempCpuSlices){var b=a.tempCpuSlices;delete a.tempCpuSlices;b.sort(function(a,b){var d=a.start-b.start;return 0==d?a.index-b.index:d});var d=[];if(b.length){var c=b[0];d.push(new tracing.TimelineSlice("Running",e,c.start,{},c.duration))}for(c=1;c<b.length;c++){var f=b[c-1],l=b[c],j=l.start-f.end;if("S"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Sleeping",g,f.end,{},j));else if("R"==f.args.stateWhenDescheduled||
+"R+"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Runnable",h,f.end,{},j));else if("D"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Uninterruptible Sleep",m,f.end,{},j));else if("T"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("__TASK_STOPPED",m,f.end,{},j));else if("t"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("debug",m,f.end,{},j));else if("Z"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Zombie",m,f.end,{},
+j));else if("X"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Exit Dead",m,f.end,{},j));else if("x"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Task Dead",m,f.end,{},j));else if("W"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("WakeKill",m,f.end,{},j));else if("D|W"==f.args.stateWhenDescheduled)d.push(new tracing.TimelineSlice("Uninterruptible Sleep | WakeKill",m,f.end,{},j));else throw"Unrecognized state: "+f.args.stateWhenDescheduled;d.push(new tracing.TimelineSlice("Running",
+e,l.start,{},l.duration))}a.cpuSlices=d}})},alignClocks:function(){if(0==this.clockSyncRecords_.length){if(!this.isAdditionalImport_)return;this.abortImport();return!1}var a=this.clockSyncRecords_[0];if(0==a.parentTS||a.parentTS==a.perfTS)return!0;var a=a.parentTS-a.perfTS,b;for(b in this.cpuStates_){for(var d=this.cpuStates_[b].cpu,c=0;c<d.slices.length;c++){var f=d.slices[c];f.start+=a;f.duration=f.duration}for(var e in d.counters){c=d.counters[e];for(f=0;f<c.timestamps.length;f++)c.timestamps[f]+=
 a}}for(var h in this.kernelThreadStates_){b=this.kernelThreadStates_[h].thread;for(c=0;c<b.subRows[0].length;c++)b.subRows[0][c].start+=a}return!0},abortImport:function(){if(this.pushedEventsToThreads)throw"Cannot abort, have alrady pushedCpuDataToThreads.";for(var a in this.cpuStates_)delete this.model_.cpus[a];for(var b in this.kernelThreadStates_){a=this.kernelThreadStates_[b].thread;var d=a.parent;delete d.threads[a.tid];delete this.model_.processes[d.pid]}this.model_.importErrors.push("Cannot import kernel trace without a clock sync.")},
 markPidRunnable:function(){},importError:function(a){this.model_.importErrors.push("Line "+(this.lineNumber+1)+": "+a)},malformedEvent:function(a){this.importError("Malformed "+a+" event")},openSlice:function(a,b,d){a.openSliceTS=d;a.openSlice=b},closeSlice:function(a,b,d){a.openSlice&&(b=new tracing.TimelineSlice(a.openSlice,tracing.getStringColorId(a.openSlice),a.openSliceTS,d,b-a.openSliceTS),a.thread.subRows[0].push(b),a.openSlice=void 0)},openAsyncSlice:function(a,b,d,c){d=new tracing.TimelineAsyncSlice(c,
-tracing.getStringColorId(c),d);d.startThread=a.thread;a.asyncSlices[b]=d},closeAsyncSlice:function(a,b,d,c){var f=a.asyncSlices[b];f&&(f.duration=d-f.start,f.args=c,f.endThread=a.thread,f.subSlices=[new tracing.TimelineSlice(f.title,f.colorId,f.start,f.args,f.duration)],a.thread.asyncSlices.push(f),delete a.asyncSlices[b])},getThreadState:function(a){return this.threadStateByKPID_[this.parsePid(a)]},getOrCreateThreadState:function(a,b){var d=this.parsePid(a),c=this.threadStateByKPID_[d];c||(c=new e,
-c.threadName=this.parseThreadName(a),c.tid=d,c.pid=b,c.thread=this.model_.getOrCreateProcess(b).getOrCreateThread(d),this.threadsByLinuxPid[d]=c.thread,c.thread.name||(c.thread.name=c.threadName),this.threadStateByKPID_[d]=c);return c},processBegin:function(a,b,d,c){a=this.getOrCreateThreadState(a,c);c=tracing.getStringColorId(b);b=new tracing.TimelineThreadSlice(b,c,d,null);a.openSlices.push(b)},processEnd:function(a,b){var d=this.getThreadState(a);if(d&&0!=d.openSlices.length){var c=d.openSlices.pop();
+tracing.getStringColorId(c),d);d.startThread=a.thread;a.asyncSlices[b]=d},closeAsyncSlice:function(a,b,d,c){var f=a.asyncSlices[b];f&&(f.duration=d-f.start,f.args=c,f.endThread=a.thread,f.subSlices=[new tracing.TimelineSlice(f.title,f.colorId,f.start,f.args,f.duration)],a.thread.asyncSlices.push(f),delete a.asyncSlices[b])},getThreadState:function(a){a=this.parsePid(a);return this.threadStateByKPID_[a]},getOrCreateThreadState:function(a,b){var d=this.parsePid(a),c=this.threadStateByKPID_[d];c||(c=
+new e,c.threadName=this.parseThreadName(a),c.tid=d,c.pid=b,c.thread=this.model_.getOrCreateProcess(b).getOrCreateThread(d),this.threadsByLinuxPid[d]=c.thread,c.thread.name||(c.thread.name=c.threadName),this.threadStateByKPID_[d]=c);return c},processBegin:function(a,b,d,c){a=this.getOrCreateThreadState(a,c);c=tracing.getStringColorId(b);b=new tracing.TimelineThreadSlice(b,c,d,null);a.openSlices.push(b)},processEnd:function(a,b){var d=this.getThreadState(a);if(d&&0!=d.openSlices.length){var c=d.openSlices.pop();
 c.duration=b-c.start;d.thread.getSubrow(d.openSlices.length).push(c);d.openSlices.length&&d.openSlices[d.openSlices.length-1].subSlices.push(c)}},autoCloseOpenSlices:function(){this.model_.updateBounds();var a=[],b;for(b in this.threadStateByKPID_)for(var d=this.threadStateByKPID_[b],c=0;c<d.openSlices.length;c++){var f=d.openSlices[c];a.push(f.start);for(var e=0;e<f.subSlices.length;e++){var h=f.subSlices[e];a.push(h.start);h.duration&&a.push(h.end)}}a=this.model_.maxTimestamp?Math.max(this.model_.maxTimestamp,
 Math.max.apply(Math,a)):Math.max.apply(Math,a);for(b in this.threadStateByKPID_)for(d=this.threadStateByKPID_[b];0<d.openSlices.length;)f=d.openSlices.pop(),f.duration=a-f.start,f.didNotFinish=!0,d.thread.getSubrow(d.openSlices.length).push(f),d.openSlices.length&&d.openSlices[d.openSlices.length-1].subSlices.push(f)},processCounter:function(a,b,d,c){a=this.model_.getOrCreateProcess(c).getOrCreateCounter("",a);0==a.numSeries&&(a.seriesNames.push("state"),a.seriesColors.push(tracing.getStringColorId(a.name+
 ".state")));a.timestamps.push(b);a.samples.push(d)},importCpuData:function(){this.lines_=this.events_.split("\n");for(this.lineNumber=0;this.lineNumber<this.lines_.length;++this.lineNumber){var a=this.lines_[this.lineNumber];if(!(/^#/.exec(a)||0==a.length)){var b=f.exec(a);if(b){var a=b[1],d=b[2],c=b[4],e=b[5],b=b[6],h=this.eventDefinitions[e];if(h){var g;if(h.format){if(g=h.format.exec(b),!g){this.malformedEvent(e);continue}}else g={};g.timestamp=1E3*parseFloat(c);g.name=e;g.info=b;g.taskId=a;g.cpuState=
@@ -80,8 +80,8 @@
 a=tracing.TimelineThread.getPTIDFromPidAndTid(e.pid,e.tid);a in this.threadStateByPTID_||(this.threadStateByPTID_[a]=new g);var b=this.threadStateByPTID_[a];"B"==e.ph?this.processBeginEvent(f,b,e):"E"==e.ph?this.processEndEvent(b,e):"S"==e.ph?this.processAsyncEvent(f,b,e):"F"==e.ph?this.processAsyncEvent(f,b,e):"T"==e.ph?this.processAsyncEvent(f,b,e):"I"==e.ph?(this.processBeginEvent(f,b,e),this.processEndEvent(b,e)):"C"==e.ph?this.processCounterEvent(e):"M"==e.ph?"thread_name"==e.name?this.model_.getOrCreateProcess(e.pid).getOrCreateThread(e.tid).name=
 e.args.name:this.model_.importErrors.push("Unrecognized metadata name: "+e.name):this.model_.importErrors.push("Unrecognized event phase: "+e.ph+"("+e.name+")")}c=!1;for(a in this.threadStateByPTID_)b=this.threadStateByPTID_[a],c|=0<b.openSlices.length;c&&this.autoCloseOpenSlices()},finalizeImport:function(){if(0!=this.allAsyncEvents_.length){this.allAsyncEvents_.sort(function(a,b){return a.event.ts-b.event.ts});for(var c={},f=this.allAsyncEvents_,e=0;e<f.length;e++){var a=f[e],b=a.event,d=b.name;
 if(void 0===d)this.model_.importErrors.push("Async events (ph: S, T or F) require an name parameter.");else{var g=b.id;if(void 0===g)this.model_.importErrors.push("Async events (ph: S, T or F) require an id parameter.");else if("S"==b.ph)void 0===c[d]&&(c[d]={}),c[d][g]?this.model_.importErrors.push("At "+b.ts+", an slice of the same id "+g+" was alrady open."):(c[d][g]=[],c[d][g].push(a));else if(void 0===c[d])this.model_.importErrors.push("At "+b.ts+", no slice named "+d+" was open.");else if(void 0===
-c[d][g])this.model_.importErrors.push("At "+b.ts+", no slice named "+d+" with id="+g+" was open.");else{var i=c[d][g];i.push(a);if("F"==b.ph){var j=new tracing.TimelineAsyncSlice(d,tracing.getStringColorId(d),i[0].event.ts/1E3);j.duration=b.ts/1E3-i[0].event.ts/1E3;j.startThread=i[0].thread;j.endThread=a.thread;j.id=g;j.args=i[0].event.args;j.subSlices=[];for(a=1;a<i.length;++a){var k=d;"T"==i[a-1].event.ph&&(k=d+":"+i[a-1].event.args.step);k=new tracing.TimelineAsyncSlice(k,tracing.getStringColorId(d+
-a),i[a-1].event.ts/1E3);k.duration=i[a].event.ts/1E3-i[a-1].event.ts/1E3;k.startThread=i[a-1].thread;k.endThread=i[a].thread;k.id=g;k.args=i[a-1].event.args;j.subSlices.push(k)}var i=j.subSlices[j.subSlices.length-1],l;for(l in b.args)i.args[l]=b.args[l];j.startThread.asyncSlices.push(j);delete c[d][g]}}}}}}};tracing.TimelineModel.registerImporter(e);return{TraceEventImporter:e}});cr.define("tracing",function(){function g(c,f,e){if(0==c.length)return 1;for(var a=0,b=c.length-1,d,g,i=-1;a<=b;)d=Math.floor((a+b)/2),g=f(c[d])-e,0>g?a=d+1:(0<g||(i=d),b=d-1);return-1!=i?i:a}function e(c,f,e,a,b,d){if(!(a>b)){var m=g(c,f,a);if(-1!=m&&(0<m&&f(c[m-1])+e(c[m-1])>=a&&d(c[m-1]),m!=c.length))for(e=c.length;m<e&&!(f(c[m])>=b);m++)d(c[m])}}return{findLowIndexInSortedArray:g,findLowIndexInSortedIntervals:function(c,f,e,a){var b=g(c,f,a);return 0==b?a>=f(c[0])&&a<f(c[0]+e(c[0]))?0:-1:b<=c.length&&
+c[d][g])this.model_.importErrors.push("At "+b.ts+", no slice named "+d+" with id="+g+" was open.");else{var j=c[d][g];j.push(a);if("F"==b.ph){var k=new tracing.TimelineAsyncSlice(d,tracing.getStringColorId(d),j[0].event.ts/1E3);k.duration=b.ts/1E3-j[0].event.ts/1E3;k.startThread=j[0].thread;k.endThread=a.thread;k.id=g;k.args=j[0].event.args;k.subSlices=[];for(a=1;a<j.length;++a){var i=d;"T"==j[a-1].event.ph&&(i=d+":"+j[a-1].event.args.step);i=new tracing.TimelineAsyncSlice(i,tracing.getStringColorId(d+
+a),j[a-1].event.ts/1E3);i.duration=j[a].event.ts/1E3-j[a-1].event.ts/1E3;i.startThread=j[a-1].thread;i.endThread=j[a].thread;i.id=g;i.args=j[a-1].event.args;k.subSlices.push(i)}var j=k.subSlices[k.subSlices.length-1],o;for(o in b.args)j.args[o]=b.args[o];k.startThread.asyncSlices.push(k);delete c[d][g]}}}}}}};tracing.TimelineModel.registerImporter(e);return{TraceEventImporter:e}});cr.define("tracing",function(){function g(c,f,e){if(0==c.length)return 1;for(var a=0,b=c.length-1,d,g,j=-1;a<=b;)d=Math.floor((a+b)/2),g=f(c[d])-e,0>g?a=d+1:(0<g||(j=d),b=d-1);return-1!=j?j:a}function e(c,f,e,a,b,d){if(!(a>b)){var l=g(c,f,a);if(-1!=l&&(0<l&&f(c[l-1])+e(c[l-1])>=a&&d(c[l-1]),l!=c.length))for(e=c.length;l<e&&!(f(c[l])>=b);l++)d(c[l])}}return{findLowIndexInSortedArray:g,findLowIndexInSortedIntervals:function(c,f,e,a){var b=g(c,f,a);return 0==b?a>=f(c[0])&&a<f(c[0]+e(c[0]))?0:-1:b<=c.length&&
 a>=f(c[b-1])&&a<f(c[b-1])+e(c[b-1])?b-1:c.length},iterateOverIntersectingIntervals:e,getIntersectingIntervals:function(c,f,g,a,b){var d=[];e(c,f,g,a,b,function(a){d.push(a)});return d}}});cr.define("tracing",function(){function g(){var e=document.createElement("iframe");e.style.cssText="width:100%;height:0;border:0;visibility:hidden";document.body.appendChild(e);this._doc=e.contentDocument;this._window=e.contentWindow;this._doc.body.style.cssText="padding:0;margin:0;overflow:hidden";for(var e=document.querySelectorAll("link[rel=stylesheet]"),c=0;c<e.length;c++){var f=e[c],g=this._doc.createElement("link");g.rel="stylesheet";g.href=f.href;this._doc.head.appendChild(g)}}g.prototype=
 {__proto__:Object.prototype,measure:function(e){this._doc.body.appendChild(e);var c=this._window.getComputedStyle(e),f=parseInt(c.width,10),c=parseInt(c.height,10);this._doc.body.removeChild(e);return{width:f,height:c}}};return{MeasuringStick:g}});cr.define("tracing",function(){function g(a){this.parentEl_=a;this.scaleX_=1;this.gridTimebase_=this.panX_=0;this.gridStep_=1E3/60;this.hasCalledSetupFunction_=this.gridEnabled_=!1;this.onResizeBoundToThis_=this.onResize_.bind(this);this.checkForAttachInterval_=setInterval(this.checkForAttach_.bind(this),250)}function e(a,b){this.track=a;this.slice=b}function c(a,b,d){this.track=a;this.counter=b;this.sampleIndex=d}function f(){this.range_dirty_=!0;this.range_={};this.length_=0}g.prototype={__proto__:cr.EventTarget.prototype,
 setWhenPossible:function(a){this.pendingSetFunction_=a},get isAttachedToDocument_(){for(var a=this.parentEl_;a.parentNode;)a=a.parentNode;return a==this.parentEl_.ownerDocument},onResize_:function(){this.dispatchChangeEvent()},checkForAttach_:function(){if(this.isAttachedToDocument_&&0!=this.clientWidth){this.iframe_||(this.iframe_=document.createElement("iframe"),this.iframe_.style.cssText="position:absolute;width:100%;height:0;border:0;visibility:hidden;",this.parentEl_.appendChild(this.iframe_),
@@ -104,41 +104,41 @@
 this.selection.getShiftedSelection(-1))this.setSelectionAndMakeVisible(b),a.preventDefault();break;case 39:if(b=this.selection.getShiftedSelection(1))this.setSelectionAndMakeVisible(b),a.preventDefault();break;case 9:-1==this.focusElement.tabIndex&&(a.shiftKey?this.selectPrevious_(a):this.selectNext_(a),a.preventDefault())}}},zoomBy_:function(a){if(this.firstCanvas){var b=this.viewport_,d=this.firstCanvas.clientWidth,c=this.lastMouseViewPos_.x,f=b.xViewToWorld(c);b.scaleX*=a;b.xPanWorldPosToViewPos(f,
 c,d)}},get keyHelp(){var a="Keyboard shortcuts:\n w/s     : Zoom in/out    (with shift: go faster)\n a/d     : Pan left/right\n e       : Center on mouse\n g/G     : Shows grid at the start/end of the selected task\n",a=this.focusElement.tabIndex?a+" <-      : Select previous event on current timeline\n ->      : Select next event on current timeline\n":a+" <-,^TAB : Select previous event on current timeline\n ->, TAB : Select next event on current timeline\n";return a+"\nDbl-click to zoom in; Shift dbl-click to zoom out\n"},
 get selection(){return this.selection_},set selection(a){if(!(a instanceof f))throw"Expected TimelineSelection";var b;for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!1;this.selection_=a;cr.dispatchSimpleEvent(this,"selectionChange");for(b=0;b<this.selection_.length;b++)this.selection_[b].selected=!0;this.viewport_.dispatchChangeEvent()},setSelectionAndMakeVisible:function(a,b){if(!(a instanceof f))throw"Expected TimelineSelection";this.selection=a;var d=this.selection.range,c=this.viewport_.xWorldVectorToView(d.max-
-d.min);b&&50>c?(c=d.min+0.5*(d.max-d.min),d=5*(d.max-d.min),this.viewport_.xSetWorldRange(c-0.5*d,c+0.5*d,this.firstCanvas.width)):this.viewport_.xPanWorldRangeIntoView(d.min,d.max,this.firstCanvas.width)},get firstCanvas(){return this.tracks_.firstChild?this.tracks_.firstChild.firstCanvas:void 0},hideDragBox_:function(){this.dragBox_.style.left="-1000px";this.dragBox_.style.top="-1000px";this.dragBox_.style.width=0;this.dragBox_.style.height=0},setDragBoxPosition_:function(a,b){var d=Math.min(a.clientX,
-b.clientX),c=Math.max(a.clientX,b.clientX),f=Math.min(a.clientY,b.clientY),e=Math.max(a.clientY,b.clientY);this.dragBox_.style.left=d+"px";this.dragBox_.style.top=f+"px";this.dragBox_.style.width=c-d+"px";this.dragBox_.style.height=e-f+"px";f=this.firstCanvas;d=this.viewport_.xViewToWorld(d-f.offsetLeft);c=this.viewport_.xViewToWorld(c-f.offsetLeft);this.dragBox_.textContent=Math.round(100*(c-d))/100+"ms";f=new cr.Event("selectionChanging");f.loWX=d;f.hiWX=c;this.dispatchEvent(f)},onGridToggle_:function(a){var a=
-a?this.selection_.range.min:this.selection_.range.max,b=Math.ceil((a-this.model_.minTimestamp)/this.viewport_.gridStep_);this.viewport_.gridTimebase=a-(b+1)*this.viewport_.gridStep_;this.viewport_.gridEnabled=!0},onMouseDown_:function(a){var b=this.firstCanvas,d=this.tracks_.getClientRects()[0];d&&(a.clientX>=d.left&&a.clientX<d.right&&a.clientY>=d.top&&a.clientY<d.bottom&&a.x>=b.offsetLeft)&&(this.viewport_.xViewToWorld(a.clientX-b.offsetLeft),this.dragBeginEvent_=a,a.preventDefault(),0<=this.focusElement.tabIndex&&
-this.focusElement.focus())},onMouseMove_:function(a){if(this.firstCanvas){var b=this.firstCanvas;this.lastMouseViewPos_={x:a.clientX-b.offsetLeft,y:a.clientY-b.offsetTop};this.dragBeginEvent_&&this.setDragBoxPosition_(this.dragBeginEvent_,a)}},onMouseUp_:function(a){var b;if(this.dragBeginEvent_){this.hideDragBox_();var d=this.dragBeginEvent_;this.dragBeginEvent_=null;var c=Math.min(d.clientX,a.clientX);b=Math.max(d.clientX,a.clientX);var e=Math.min(d.clientY,a.clientY),a=Math.max(d.clientY,a.clientY),
-d=this.firstCanvas,c=this.viewport_.xViewToWorld(c-d.offsetLeft),d=this.viewport_.xViewToWorld(b-d.offsetLeft),g=new f;for(b=0;b<this.tracks_.children.length;b++){var h=this.tracks_.children[b],l=h.getBoundingClientRect(),o=Math.max(e,l.top),l=Math.min(a,l.bottom);o<=l&&h.addIntersectingItemsInRangeToSelection(c,d,e,a,g)}this.selection=g}},onDblClick_:function(a){if(!(a.x<this.firstCanvas.offsetLeft)){var b=4;a.shiftKey&&(b=1/b);this.zoomBy_(b);a.preventDefault()}}};cr.defineProperty(h,"model",cr.PropertyKind.JS);
-return{Timeline:h,TimelineSelectionSliceHit:e,TimelineSelectionCounterSampleHit:c,TimelineSelection:f,TimelineViewport:g}});cr.define("tracing",function(){function g(a){return Math.round(1E3*a)/1E3}function e(a,d){d=d||0;"string"!=typeof a&&(a=""+a);if(a.length>=d)return"";for(var c="",f=0;f<d-a.length;f++)c+=" ";return c}function c(a,d){return a+e(a,d)}function f(a,d){return e(a,d)+a}function h(a){var d="",e=a.getSliceHits(),h=a.getCounterSampleHits();if(1==e.length){var a=14,j=e[0].slice,d="Selected item:\n"+(c("Title",a)+": "+j.title+"\n"),d=d+(c("Start",a)+": "+g(j.start)+" ms\n"),d=d+(c("Duration",a)+": "+g(j.duration)+
-" ms\n");j.durationInUserTime&&(d+=c("Duration (U)",a)+": "+g(j.durationInUserTime)+" ms\n");var k=0,l;for(l in j.args)k+=1;if(0<k)for(l in d+=c("Args",a)+":\n",j.args)k=j.args[l],d+=c(" "+l,a)+": "+k+"\n"}else if(1<e.length){var a=55,d="Slices:\n",o=e.range.min,q=e.range.max;e.map(function(a){return a.slice.title});var u={};for(l=0;l<e.length;l++)j=e[l].slice,u[j.title]||(u[j.title]={slices:[]}),u[j.title].slices.push(j);j=0;for(k in u){var v=u[k],t=0;for(l=0;l<v.slices.length;l++)t+=v.slices[l].duration;
-j+=t;d+=" "+c(k,a)+": "+f(g(t)+"ms",12)+"   "+f(""+v.slices.length,5)+" occurrences\n"}d+=c("*Totals",a)+" : "+f(g(j)+"ms",12)+"   "+f(""+e.length,5)+" occurrences\n";d=d+"\n"+(c("Selection start",a)+" : "+f(g(o)+"ms",12)+"\n");d+=c("Selection extent",a)+" : "+f(g(q-o)+"ms",12)+"\n"}if(1==h.length){d="Selected counter:\n";a=55;h=h[0];e=h.counter;h=h.sampleIndex;k=[];for(l=0;l<e.numSeries;++l)k.push(e.samples[e.numSeries*h+l]);d+=c("Title",a)+": "+e.name+"\n";d+=c("Timestamp",a)+": "+g(e.timestamps[h])+
-" ms\n";d=1<e.numSeries?d+(c("Values",a)+": "+k.join("\n")+"\n"):d+(c("Value",a)+": "+k.join("\n")+"\n")}else 1<h.length&&0==e.length&&(d+="Analysis of multiple counters not yet implemented. Pick a single counter.");return d}var a=cr.ui.define("div");a.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="timeline-analysis"},set selection(a){this.textContent=h(a)}};return{TimelineAnalysisView:a}});cr.define("tracing",function(){function g(a,b){var d=document.createElement("div");d.classList.add("timeline-track-button");d.classList.add("timeline-track-close-button");d.textContent=String.fromCharCode(215);d.addEventListener("click",function(){a.style.display="None"});a.appendChild(d);if(b){var c=document.createElement("div");c.classList.add("timeline-track-button");c.classList.add("timeline-track-collapse-button");c.textContent="\u2212";var f=!1;c.addEventListener("click",function(){f=!f;a.collapsedDidChange(f);
-c.textContent=f?"+":"\u2212"});a.appendChild(c)}}function e(a,b){this.string=a;this.width=b}function c(){}var f=tracing.getPallette(),h=tracing.getPalletteHighlightIdBoost(),a={},b={},d=cr.ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.tracks_=[]},detach:function(){for(var a=0;a<this.tracks_.length;a++)this.tracks_[a].detach()},get viewport(){return this.viewport_},set viewport(a){this.viewport_=a;for(var b=0;b<this.tracks_.length;b++)this.tracks_[b].viewport=
-a;this.updateChildTracks_()},get firstCanvas(){if(this.tracks_.length)return this.tracks_[0].firstCanvas},addIntersectingItemsToSelection:function(a,b,d){for(var c=0;c<this.tracks_.length;c++){var f=this.tracks_[c].getBoundingClientRect();b>=f.top&&b<f.bottom&&this.tracks_[c].addIntersectingItemsToSelection(a,b,d)}return!1},addIntersectingItemsInRangeToSelection:function(a,b,c,d,f){for(var e=0;e<this.tracks_.length;e++){var g=this.tracks_[e].getBoundingClientRect(),h=Math.max(c,g.top),g=Math.min(d,
-g.bottom);h<=g&&this.tracks_[e].addIntersectingItemsInRangeToSelection(a,b,c,d,f)}},addAllObjectsMatchingFilterToSelection:function(a,b){for(var c=0;c<this.tracks_.length;c++)this.tracks_[c].addAllObjectsMatchingFilterToSelection(a,b)}};var m=cr.ui.define(d);m.prototype={__proto__:d.prototype,decorate:function(){this.classList.add("timeline-thread-track")},get thread(){return this.thread_},set thread(a){this.thread_=a;this.updateChildTracks_()},get tooltip(){return this.tooltip_},set tooltip(a){this.tooltip_=
-a;this.updateChildTracks_()},get heading(){return this.heading_},set heading(a){this.heading_=a;this.updateChildTracks_()},get headingWidth(){return this.headingWidth_},set headingWidth(a){this.headingWidth_=a;this.updateChildTracks_()},addTrack_:function(a){var b=new j;b.heading="";b.slices=a;b.headingWidth=this.headingWidth_;b.viewport=this.viewport_;this.tracks_.push(b);this.appendChild(b);return b},updateChildTracks_:function(){this.detach();this.textContent="";this.tracks_=[];if(this.thread_){if(this.thread_.cpuSlices){var a=
+d.min);b&&50>c?(c=d.min+0.5*(d.max-d.min),d=5*(d.max-d.min),this.viewport_.xSetWorldRange(c-0.5*d,c+0.5*d,this.firstCanvas.width)):this.viewport_.xPanWorldRangeIntoView(d.min,d.max,this.firstCanvas.width)},get firstCanvas(){return this.tracks_.firstChild?this.tracks_.firstChild.firstCanvas:void 0},hideDragBox_:function(){this.dragBox_.style.left="-1000px";this.dragBox_.style.top="-1000px";this.dragBox_.style.width=0;this.dragBox_.style.height=0},setDragBoxPosition_:function(a,b){var c=Math.min(a.clientX,
+b.clientX),f=Math.max(a.clientX,b.clientX),e=Math.min(a.clientY,b.clientY),g=Math.max(a.clientY,b.clientY);this.dragBox_.style.left=c+"px";this.dragBox_.style.top=e+"px";this.dragBox_.style.width=f-c+"px";this.dragBox_.style.height=g-e+"px";e=this.firstCanvas;c=this.viewport_.xViewToWorld(c-e.offsetLeft);f=this.viewport_.xViewToWorld(f-e.offsetLeft);e=Math.round(100*(f-c))/100;this.dragBox_.textContent=e+"ms";e=new cr.Event("selectionChanging");e.loWX=c;e.hiWX=f;this.dispatchEvent(e)},onGridToggle_:function(a){var a=
+a?this.selection_.range.min:this.selection_.range.max,b=Math.ceil((a-this.model_.minTimestamp)/this.viewport_.gridStep_);this.viewport_.gridTimebase=a-(b+1)*this.viewport_.gridStep_;this.viewport_.gridEnabled=!0},onMouseDown_:function(a){var b=this.firstCanvas,c=this.tracks_.getClientRects()[0];c&&(a.clientX>=c.left&&a.clientX<c.right&&a.clientY>=c.top&&a.clientY<c.bottom&&a.x>=b.offsetLeft)&&(this.viewport_.xViewToWorld(a.clientX-b.offsetLeft),this.dragBeginEvent_=a,a.preventDefault(),0<=this.focusElement.tabIndex&&
+this.focusElement.focus())},onMouseMove_:function(a){if(this.firstCanvas){var b=this.firstCanvas;this.lastMouseViewPos_={x:a.clientX-b.offsetLeft,y:a.clientY-b.offsetTop};this.dragBeginEvent_&&this.setDragBoxPosition_(this.dragBeginEvent_,a)}},onMouseUp_:function(a){var b;if(this.dragBeginEvent_){this.hideDragBox_();var c=this.dragBeginEvent_;this.dragBeginEvent_=null;var e=Math.min(c.clientX,a.clientX);b=Math.max(c.clientX,a.clientX);var g=Math.min(c.clientY,a.clientY),a=Math.max(c.clientY,a.clientY),
+c=this.firstCanvas,e=this.viewport_.xViewToWorld(e-c.offsetLeft),c=this.viewport_.xViewToWorld(b-c.offsetLeft),h=new f;for(b=0;b<this.tracks_.children.length;b++){var i=this.tracks_.children[b],o=i.getBoundingClientRect(),m=Math.max(g,o.top),o=Math.min(a,o.bottom);m<=o&&i.addIntersectingItemsInRangeToSelection(e,c,g,a,h)}this.selection=h}},onDblClick_:function(a){if(!(a.x<this.firstCanvas.offsetLeft)){var b=4;a.shiftKey&&(b=1/b);this.zoomBy_(b);a.preventDefault()}}};cr.defineProperty(h,"model",cr.PropertyKind.JS);
+return{Timeline:h,TimelineSelectionSliceHit:e,TimelineSelectionCounterSampleHit:c,TimelineSelection:f,TimelineViewport:g}});cr.define("tracing",function(){function g(a){return Math.round(1E3*a)/1E3}function e(a,b){b=b||0;"string"!=typeof a&&(a=String(a));if(a.length>=b)return"";for(var c="",f=0;f<b-a.length;f++)c+=" ";return c}function c(a,b){return a+e(a,b)}function f(a,b){return e(a,b)+a}var h=cr.ui.define("div");h.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="timeline-analysis"},set selection(a){var b="",d=a.getSliceHits(),e=a.getCounterSampleHits();if(1==d.length){var a=14,h=d[0].slice,
+b="Selected item:\n"+(c("Title",a)+": "+h.title+"\n"),b=b+(c("Start",a)+": "+g(h.start)+" ms\n"),b=b+(c("Duration",a)+": "+g(h.duration)+" ms\n");h.durationInUserTime&&(b+=c("Duration (U)",a)+": "+g(h.durationInUserTime)+" ms\n");var k=0,i;for(i in h.args)k+=1;if(0<k)for(i in b+=c("Args",a)+":\n",h.args)k=h.args[i],b+=c(" "+i,a)+": "+k+"\n"}else if(1<d.length){var a=55,b="Slices:\n",o=d.range.min,m=d.range.max;d.map(function(a){return a.slice.title});var q={};for(i=0;i<d.length;i++)h=d[i].slice,q[h.title]||
+(q[h.title]={slices:[]}),q[h.title].slices.push(h);h=0;for(k in q){var u=q[k],t=0;for(i=0;i<u.slices.length;i++)t+=u.slices[i].duration;h+=t;b+=" "+c(k,a)+": "+f(g(t)+"ms",12)+"   "+f(String(u.slices.length),5)+" occurrences\n"}b+=c("*Totals",a)+" : "+f(g(h)+"ms",12)+"   "+f(String(d.length),5)+" occurrences\n";b=b+"\n"+(c("Selection start",a)+" : "+f(g(o)+"ms",12)+"\n");b+=c("Selection extent",a)+" : "+f(g(m-o)+"ms",12)+"\n"}if(1==e.length){b="Selected counter:\n";a=55;e=e[0];d=e.counter;e=e.sampleIndex;
+k=[];for(i=0;i<d.numSeries;++i)k.push(d.samples[d.numSeries*e+i]);b+=c("Title",a)+": "+d.name+"\n";b+=c("Timestamp",a)+": "+g(d.timestamps[e])+" ms\n";b=1<d.numSeries?b+(c("Values",a)+": "+k.join("\n")+"\n"):b+(c("Value",a)+": "+k.join("\n")+"\n")}else 1<e.length&&0==d.length&&(b+="Analysis of multiple counters not yet implemented. Pick a single counter.");this.textContent=b}};return{TimelineAnalysisView:h}});cr.define("tracing",function(){function g(a,b){var c=document.createElement("div");c.classList.add("timeline-track-button");c.classList.add("timeline-track-close-button");c.textContent=String.fromCharCode(215);c.addEventListener("click",function(){a.style.display="None"});a.appendChild(c);if(b){var d=document.createElement("div");d.classList.add("timeline-track-button");d.classList.add("timeline-track-collapse-button");d.textContent="\u2212";var f=!1;d.addEventListener("click",function(){f=!f;a.collapsedDidChange(f);
+d.textContent=f?"+":"\u2212"});a.appendChild(d)}}function e(a,b){this.string=a;this.width=b}function c(){}var f=tracing.getPallette(),h=tracing.getPalletteHighlightIdBoost(),a={},b={},d=cr.ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.tracks_=[]},detach:function(){for(var a=0;a<this.tracks_.length;a++)this.tracks_[a].detach()},get viewport(){return this.viewport_},set viewport(a){this.viewport_=a;for(var b=0;b<this.tracks_.length;b++)this.tracks_[b].viewport=
+a;this.updateChildTracks_()},get firstCanvas(){if(this.tracks_.length)return this.tracks_[0].firstCanvas},addIntersectingItemsToSelection:function(a,b,c){for(var d=0;d<this.tracks_.length;d++){var f=this.tracks_[d].getBoundingClientRect();b>=f.top&&b<f.bottom&&this.tracks_[d].addIntersectingItemsToSelection(a,b,c)}return!1},addIntersectingItemsInRangeToSelection:function(a,b,c,d,f){for(var e=0;e<this.tracks_.length;e++){var g=this.tracks_[e].getBoundingClientRect(),h=Math.max(c,g.top),g=Math.min(d,
+g.bottom);h<=g&&this.tracks_[e].addIntersectingItemsInRangeToSelection(a,b,c,d,f)}},addAllObjectsMatchingFilterToSelection:function(a,b){for(var c=0;c<this.tracks_.length;c++)this.tracks_[c].addAllObjectsMatchingFilterToSelection(a,b)}};var l=cr.ui.define(d);l.prototype={__proto__:d.prototype,decorate:function(){this.classList.add("timeline-thread-track")},get thread(){return this.thread_},set thread(a){this.thread_=a;this.updateChildTracks_()},get tooltip(){return this.tooltip_},set tooltip(a){this.tooltip_=
+a;this.updateChildTracks_()},get heading(){return this.heading_},set heading(a){this.heading_=a;this.updateChildTracks_()},get headingWidth(){return this.headingWidth_},set headingWidth(a){this.headingWidth_=a;this.updateChildTracks_()},addTrack_:function(a){var b=new k;b.heading="";b.slices=a;b.headingWidth=this.headingWidth_;b.viewport=this.viewport_;this.tracks_.push(b);this.appendChild(b);return b},updateChildTracks_:function(){this.detach();this.textContent="";this.tracks_=[];if(this.thread_){if(this.thread_.cpuSlices){var a=
 this.addTrack_(this.thread_.cpuSlices);a.height="4px";a.decorateHit=function(a){a.thread=this.thread_}}if(this.thread_.asyncSlices.length)for(var b=this.thread_.asyncSlices.subRows,c=0;c<b.length;c++)a=this.addTrack_(b[c]),a.decorateHit=function(){},a.asyncStyle=!0;for(c=0;c<this.thread_.subRows.length;c++)a=this.addTrack_(this.thread_.subRows[c]),a.decorateHit=function(a){a.thread=this.thread_};0<this.tracks_.length&&(this.thread_.cpuSlices?(this.tracks_[1].heading=this.heading_,this.tracks_[1].tooltip=
-this.tooltip_):(this.tracks_[0].heading=this.heading_,this.tracks_[0].tooltip=this.tooltip_))}g(this,4<=this.tracks_.length)},collapsedDidChange:function(a){if(a)for(var a=parseInt(this.tracks_[0].height),b=0;b<this.tracks_.length;++b)2<a?this.tracks_[b].height=Math.floor(a)+"px":this.tracks_[b].style.display="None",a*=0.5;else for(b=0;b<this.tracks_.length;++b)this.tracks_[b].height=this.tracks_[0].height,this.tracks_[b].style.display=""}};var i=cr.ui.define(d);i.prototype={__proto__:d.prototype,
+this.tooltip_):(this.tracks_[0].heading=this.heading_,this.tracks_[0].tooltip=this.tooltip_))}g(this,4<=this.tracks_.length)},collapsedDidChange:function(a){if(a)for(var a=parseInt(this.tracks_[0].height),b=0;b<this.tracks_.length;++b)2<a?this.tracks_[b].height=Math.floor(a)+"px":this.tracks_[b].style.display="None",a*=0.5;else for(b=0;b<this.tracks_.length;++b)this.tracks_[b].height=this.tracks_[0].height,this.tracks_[b].style.display=""}};var j=cr.ui.define(d);j.prototype={__proto__:d.prototype,
 decorate:function(){this.classList.add("timeline-thread-track")},get cpu(){return this.cpu_},set cpu(a){this.cpu_=a;this.updateChildTracks_()},get tooltip(){return this.tooltip_},set tooltip(a){this.tooltip_=a;this.updateChildTracks_()},get heading(){return this.heading_},set heading(a){this.heading_=a;this.updateChildTracks_()},get headingWidth(){return this.headingWidth_},set headingWidth(a){this.headingWidth_=a;this.updateChildTracks_()},updateChildTracks_:function(){this.detach();this.textContent=
-"";this.tracks_=[];if(this.cpu_){var a=new j;a.slices=this.cpu_.slices;a.headingWidth=this.headingWidth_;a.viewport=this.viewport_;this.tracks_.push(a);this.appendChild(a);this.tracks_[0].heading=this.heading_;this.tracks_[0].tooltip=this.tooltip_}g(this,!1)}};d=cr.ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="timeline-canvas-based-track";this.slices_=null;this.headingDiv_=document.createElement("div");this.headingDiv_.className="timeline-canvas-based-track-title";
+"";this.tracks_=[];if(this.cpu_){var a=new k;a.slices=this.cpu_.slices;a.headingWidth=this.headingWidth_;a.viewport=this.viewport_;this.tracks_.push(a);this.appendChild(a);this.tracks_[0].heading=this.heading_;this.tracks_[0].tooltip=this.tooltip_}g(this,!1)}};d=cr.ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="timeline-canvas-based-track";this.slices_=null;this.headingDiv_=document.createElement("div");this.headingDiv_.className="timeline-canvas-based-track-title";
 this.headingDiv_.onselectstart=function(){return!1};this.appendChild(this.headingDiv_);this.canvasContainer_=document.createElement("div");this.canvasContainer_.className="timeline-canvas-based-track-canvas-container";this.appendChild(this.canvasContainer_);this.canvas_=document.createElement("canvas");this.canvas_.className="timeline-canvas-based-track-canvas";this.canvasContainer_.appendChild(this.canvas_);this.ctx_=this.canvas_.getContext("2d")},detach:function(){this.viewport_&&this.viewport_.removeEventListener("change",
 this.viewportChangeBoundToThis_)},set headingWidth(a){this.headingDiv_.style.width=a},get heading(){return this.headingDiv_.textContent},set heading(a){this.headingDiv_.textContent=a},set tooltip(a){this.headingDiv_.title=a},get viewport(){return this.viewport_},set viewport(a){(this.viewport_=a)&&this.viewport_.removeEventListener("change",this.viewportChangeBoundToThis_);if(this.viewport_=a)this.viewportChangeBoundToThis_=this.viewportChange_.bind(this),this.viewport_.addEventListener("change",
 this.viewportChangeBoundToThis_);this.invalidate()},viewportChange_:function(){this.invalidate()},invalidate:function(){this.rafPending_||(webkitRequestAnimationFrame(function(){this.rafPending_=!1;if(this.viewport_){var a=window.getComputedStyle(this.canvasContainer_),b=parseInt(a.width),a=parseInt(a.height);this.canvas_.width!=b&&(this.canvas_.width=b);this.canvas_.height!=a&&(this.canvas_.height=a);this.redraw()}}.bind(this),this),this.rafPending_=!0)},get firstCanvas(){return this.canvas_}};c.prototype=
-{get:function(a,c,d,f,g){var h=b[d];h||(h={},b[d]=h);f=h[c];f||(h[c]={},f=h[c]);h=f[g];if(void 0===h){for(h=!1;a.labelWidthWorld(d,c)>g;)d=d.substring(0,0.75*d.length),h=!0;h&&3<d.length&&(d=d.substring(0,d.length-3)+"...");h=new e(d,a.labelWidth(d));f[g]=h}return h}};var j=cr.ui.define(d);j.prototype={__proto__:d.prototype,SHOULD_ELIDE_TEXT:!0,decorate:function(){this.classList.add("timeline-slice-track");this.elidedTitleCache=new c;this.asyncStyle_=!1},decorateHit:function(){},get asyncStyle(){return this.asyncStyle_},
+{get:function(a,c,d,f,g){var h=b[d];h||(h={},b[d]=h);f=h[c];f||(h[c]={},f=h[c]);h=f[g];if(void 0===h){for(h=!1;a.labelWidthWorld(d,c)>g;)d=d.substring(0,0.75*d.length),h=!0;h&&3<d.length&&(d=d.substring(0,d.length-3)+"...");h=new e(d,a.labelWidth(d));f[g]=h}return h}};var k=cr.ui.define(d);k.prototype={__proto__:d.prototype,SHOULD_ELIDE_TEXT:!0,decorate:function(){this.classList.add("timeline-slice-track");this.elidedTitleCache=new c;this.asyncStyle_=!1},decorateHit:function(){},get asyncStyle(){return this.asyncStyle_},
 set asyncStyle(a){this.asyncStyle_=!!a;this.invalidate()},get slices(){return this.slices_},set slices(a){this.slices_=a;this.invalidate()},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a;this.invalidate()},labelWidth:function(b){var c=a[b];c||(c=this.ctx_.measureText(b).width,a[b]=c);return c+2},labelWidthWorld:function(a,b){return this.labelWidth(a)*b},redraw:function(){var a=this.ctx_,b=this.canvas_.width,c=this.canvas_.height;a.clearRect(0,0,b,c);var d=
-this.viewport_,e=d.xViewVectorToWorld(1),g=d.xViewToWorld(0),b=d.xViewToWorld(b);if(d.gridEnabled){var i=d.gridTimebase;for(a.beginPath();i<b;){if(i>=g){var j=d.xWorldToView(i);a.moveTo(j,0);a.lineTo(j,c)}i+=d.gridStep}a.strokeStyle="rgba(255,0,0,0.25)";a.stroke()}a.save();d.applyTransformToCanavs(a);this.asyncStyle_&&(a.globalAlpha=0.25);var k=new tracing.FastRectRenderer(a,g,2*e,2*e,b,f);k.setYandH(0,c);g=this.slices_;for(b=0;b<g.length;++b){var j=g[b],i=j.start,l=Math.max(j.duration,0.001),m=j.selected?
-j.colorId+h:j.colorId;l<e&&(l=e);0<j.duration?k.fillRect(i,l,m):0.001<e?k.fillRect(i,e,m):(a.fillStyle=f[m],a.beginPath(),a.moveTo(i-4*e,c),a.lineTo(i,0),a.lineTo(i+4*e,c),a.closePath(),a.fill())}k.flush();a.restore();if(8<c){a.textAlign="center";a.textBaseline="top";a.font="10px sans-serif";a.strokeStyle="rgb(0,0,0)";a.fillStyle="rgb(0,0,0)";c=20*e;i=this.SHOULD_ELIDE_TEXT;for(b=0;b<g.length;++b)if(j=g[b],j.duration>c&&(k=j.title,j.didNotFinish&&(k+=" (Did Not Finish)"),l=this.labelWidth(k),i&&this.labelWidthWorld(k,
-e)>j.duration&&(l=this.elidedTitleCache.get(this,e,k,l,j.duration),k=l.string,l=l.width),l*e<j.duration))j=d.xWorldToView(j.start+0.5*j.duration),a.fillText(k,j,2.5,l)}},addIntersectingItemsToSelection:function(a,b,c){var d=this.getBoundingClientRect();if(b<d.top||b>=d.bottom)return!1;a=tracing.findLowIndexInSortedIntervals(this.slices_,function(a){return a.start},function(a){return a.duration},a);return 0<=a&&a<this.slices_.length?(this.decorateHit(c.addSlice(this,this.slices_[a])),!0):!1},addIntersectingItemsInRangeToSelection:function(a,
+this.viewport_,e=d.xViewVectorToWorld(1),g=d.xViewToWorld(0),b=d.xViewToWorld(b);if(d.gridEnabled){var j=d.gridTimebase;for(a.beginPath();j<b;){if(j>=g){var i=d.xWorldToView(j);a.moveTo(i,0);a.lineTo(i,c)}j+=d.gridStep}a.strokeStyle="rgba(255,0,0,0.25)";a.stroke()}a.save();d.applyTransformToCanavs(a);this.asyncStyle_&&(a.globalAlpha=0.25);var k=new tracing.FastRectRenderer(a,g,2*e,2*e,b,f);k.setYandH(0,c);g=this.slices_;for(b=0;b<g.length;++b){var i=g[b],j=i.start,l=Math.max(i.duration,0.001),m=i.selected?
+i.colorId+h:i.colorId;l<e&&(l=e);0<i.duration?k.fillRect(j,l,m):0.001<e?k.fillRect(j,e,m):(a.fillStyle=f[m],a.beginPath(),a.moveTo(j-4*e,c),a.lineTo(j,0),a.lineTo(j+4*e,c),a.closePath(),a.fill())}k.flush();a.restore();if(8<c){a.textAlign="center";a.textBaseline="top";a.font="10px sans-serif";a.strokeStyle="rgb(0,0,0)";a.fillStyle="rgb(0,0,0)";c=20*e;j=this.SHOULD_ELIDE_TEXT;for(b=0;b<g.length;++b)if(i=g[b],i.duration>c&&(k=i.title,i.didNotFinish&&(k+=" (Did Not Finish)"),l=this.labelWidth(k),j&&this.labelWidthWorld(k,
+e)>i.duration&&(l=this.elidedTitleCache.get(this,e,k,l,i.duration),k=l.string,l=l.width),l*e<i.duration))i=d.xWorldToView(i.start+0.5*i.duration),a.fillText(k,i,2.5,l)}},addIntersectingItemsToSelection:function(a,b,c){var d=this.getBoundingClientRect();if(b<d.top||b>=d.bottom)return!1;a=tracing.findLowIndexInSortedIntervals(this.slices_,function(a){return a.start},function(a){return a.duration},a);return 0<=a&&a<this.slices_.length?(c=c.addSlice(this,this.slices_[a]),this.decorateHit(c),!0):!1},addIntersectingItemsInRangeToSelection:function(a,
 b,c,d,f){function e(a){a=f.addSlice(h,a);h.decorateHit(a)}var g=this.getBoundingClientRect(),c=Math.max(c,g.top),d=Math.min(d,g.bottom);if(!(c>d)){var h=this;tracing.iterateOverIntersectingIntervals(this.slices_,function(a){return a.start},function(a){return a.duration},a,b,e)}},indexOfSlice_:function(a){for(var b=tracing.findLowIndexInSortedArray(this.slices_,function(a){return a.start},a.start);b<this.slices_.length&&a.start==this.slices_[b].start&&a.colorId!=this.slices_[b].colorId;)b++;return b<
-this.slices_.length?b:void 0},addItemNearToProvidedHitToSelection:function(a,b,c){if(!a.slice)return!1;a=this.indexOfSlice_(a.slice);if(void 0===a)return!1;b=a+b;if(0>b||b>=this.slices_.length)return!1;a=c.addSlice(this,this.slices_[b]);this.decorateHit(a);return!0},addAllObjectsMatchingFilterToSelection:function(a,b){for(var c=0;c<this.slices_.length;++c)a.matchSlice(this.slices_[c])&&this.decorateHit(b.addSlice(this,this.slices_[c]))}};var k=cr.ui.define(d),l=Math.log(10);k.prototype={__proto__:d.prototype,
-decorate:function(){this.classList.add("timeline-viewport-track");this.strings_secs_=[];this.strings_msecs_=[]},redraw:function(){var a=this.ctx_,b=this.canvas_.width,c=this.canvas_.height;a.clearRect(0,0,b,c);var d=this.viewport_;d.xViewVectorToWorld(1);for(var f=d.xViewToWorld(0),e=d.xViewToWorld(b),g=d.xViewVectorToWorld(150),h=Math.pow(10,Math.ceil(Math.log(g)/l)),i=[10,5,2,1],g=0;g<i.length;++g)if(!(150>d.xWorldVectorToView(h/i[g]))){majorMarkDistanceWorld=h/i[g-1];break}h=void 0;100>majorMarkDistanceWorld?
-(unit="ms",unitDivisor=1,h=this.strings_msecs_):(unit="s",unitDivisor=1E3,h=this.strings_secs_);i=d.xWorldVectorToView(majorMarkDistanceWorld/5);g=Math.floor(f/majorMarkDistanceWorld)*majorMarkDistanceWorld;f=Math.floor(0.25*c);a.fillStyle="rgb(0, 0, 0)";a.strokeStyle="rgb(0, 0, 0)";a.textAlign="left";a.textBaseline="top";a.font="9px sans-serif";for(var j=g;j<e;j+=majorMarkDistanceWorld){var k=Math.floor(d.xWorldToView(j)),g=Math.floor(1E5*(j/unitDivisor))/1E5;h[g]||(h[g]=g+" "+unit);a.fillText(h[g],
-k+2,0);a.beginPath();a.moveTo(k,0);a.lineTo(k,b);for(g=1;5>g;++g){var m=Math.floor(k+i*g);a.moveTo(m,c-f);a.lineTo(m,c)}a.stroke()}},addIntersectingItemsToSelection:function(){},addIntersectingItemsInRangeToSelection:function(){},addAllObjectsMatchingFilterToSelection:function(){}};var o=cr.ui.define(d);o.prototype={__proto__:d.prototype,decorate:function(){this.classList.add("timeline-counter-track");g(this,!1);this.selectedSamples_={}},decorateHit:function(){},get counter(){return this.counter_},
-set counter(a){this.counter_=a;this.invalidate()},get selectedSamples(){return this.selectedSamples_},redraw:function(){var a=this.counter_,b=this.ctx_,c=this.canvas_.width,d=this.canvas_.height;b.clearRect(0,0,c,d);var e=this.viewport_,g=e.xViewVectorToWorld(1),h=e.xViewToWorld(0),c=e.xViewToWorld(c),i=e.xViewVectorToWorld(1);b.save();e.applyTransformToCanavs(b);for(var e=a.numSeries,j=a.numSamples,k=tracing.findLowIndexInSortedArray(a.timestamps,function(){},h),l=d/a.maxTotal,m=a.numSeries-1;0<=
-m;m--){b.fillStyle=f[a.seriesColors[m]];b.beginPath();for(var o=k-1,w=0<=o?a.timestamps[o]-i:-1,x=d,A=!1;;){var r=o+1;if(r>=j){b.lineTo(w,x);b.lineTo(w+8*g,x);b.lineTo(w+8*g,d);break}var s=a.timestamps[r],o=a.totals[r*e+m],z=d-l*o;if(s>c){b.lineTo(s,x);b.lineTo(s,d);break}s-w<i?o=r:(A||(b.moveTo(h,d),A=!0),b.lineTo(s,x),b.lineTo(s,z),o=r,w=s,x=z)}b.closePath();b.fill()}b.fillStyle="rgba(255, 0, 0, 1)";for(r in this.selectedSamples_)if(this.selectedSamples_[r]){s=a.timestamps[r];for(m=a.numSeries-
-1;0<=m;m--)o=a.totals[r*e+m],z=d-l*o,b.fillRect(s-g,z-1,3*g,3)}b.restore()},addIntersectingItemsToSelection:function(a,b,c){var d=this.getBoundingClientRect();if(b<d.top||b>=d.bottom)return!1;b=this.counter_;if(a<this.counter_.timestamps[0])return!1;d=tracing.findLowIndexInSortedArray(b.timestamps,function(a){return a},a);if(0>d||d>=b.timestamps.length)return!1;0<d&&a>this.counter_.timestamps[d-1]&&d--;this.getBoundingClientRect();this.decorateHit(c.addCounterSample(this,this.counter,d));return!0},
-addIntersectingItemsInRangeToSelection:function(a,b,c,d,f){var e=this.getBoundingClientRect(),c=Math.max(c,e.top),d=Math.min(d,e.bottom);if(!(c>d)){d=this.counter_;c=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},a);e=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},b);0<c&&a>d.timestamps[c-1]&&c--;0<e&&b>d.timestamps[e-1]&&e--;for(a=c;a<=e;a++)a>=d.timestamps.length||this.decorateHit(f.addCounterSample(this,this.counter,a))}},addAllObjectsMatchingFilterToSelection:function(){}};
-return{TimelineCounterTrack:o,TimelineSliceTrack:j,TimelineThreadTrack:m,TimelineViewportTrack:k,TimelineCpuTrack:i}});cr.define("tracing",function(){function g(e,c,f,g,a,b){this.ctx_=e;this.vpLeft_=c;this.minRectSize_=f;this.maxMergeDist_=g;this.vpRight_=a;this.pallette_=b}g.prototype={y_:0,h_:0,merging_:!1,mergeStartX_:0,mergeCurRight_:0,setYandH:function(e,c){this.flush();this.y_=e;this.h_=c},fillRect:function(e,c,f){var g=e+c;g<this.vpLeft_||e>this.vpRight_||(c<this.minRectSize_?(g-this.mergeStartX_>this.maxMergeDist_&&this.flush(),this.merging_?(this.mergeCurRight_=g,this.mergedColorId=Math.max(this.mergedColorId,
+this.slices_.length?b:void 0},addItemNearToProvidedHitToSelection:function(a,b,c){if(!a.slice)return!1;a=this.indexOfSlice_(a.slice);if(void 0===a)return!1;b=a+b;if(0>b||b>=this.slices_.length)return!1;a=c.addSlice(this,this.slices_[b]);this.decorateHit(a);return!0},addAllObjectsMatchingFilterToSelection:function(a,b){for(var c=0;c<this.slices_.length;++c)if(a.matchSlice(this.slices_[c])){var d=b.addSlice(this,this.slices_[c]);this.decorateHit(d)}}};var i=cr.ui.define(d),o=Math.log(10);i.prototype=
+{__proto__:d.prototype,decorate:function(){this.classList.add("timeline-viewport-track");this.strings_secs_=[];this.strings_msecs_=[]},redraw:function(){var a=this.ctx_,b=this.canvas_.width,c=this.canvas_.height;a.clearRect(0,0,b,c);var d=this.viewport_;d.xViewVectorToWorld(1);for(var f=d.xViewToWorld(0),e=d.xViewToWorld(b),g=d.xViewVectorToWorld(150),h=Math.pow(10,Math.ceil(Math.log(g)/o)),i=[10,5,2,1],g=0;g<i.length;++g)if(!(150>d.xWorldVectorToView(h/i[g]))){majorMarkDistanceWorld=h/i[g-1];break}h=
+void 0;100>majorMarkDistanceWorld?(unit="ms",unitDivisor=1,h=this.strings_msecs_):(unit="s",unitDivisor=1E3,h=this.strings_secs_);i=d.xWorldVectorToView(majorMarkDistanceWorld/5);g=Math.floor(f/majorMarkDistanceWorld)*majorMarkDistanceWorld;f=Math.floor(0.25*c);a.fillStyle="rgb(0, 0, 0)";a.strokeStyle="rgb(0, 0, 0)";a.textAlign="left";a.textBaseline="top";a.font="9px sans-serif";for(var j=g;j<e;j+=majorMarkDistanceWorld){var k=Math.floor(d.xWorldToView(j)),g=Math.floor(1E5*(j/unitDivisor))/1E5;h[g]||
+(h[g]=g+" "+unit);a.fillText(h[g],k+2,0);a.beginPath();a.moveTo(k,0);a.lineTo(k,b);for(g=1;5>g;++g){var l=Math.floor(k+i*g);a.moveTo(l,c-f);a.lineTo(l,c)}a.stroke()}},addIntersectingItemsToSelection:function(){},addIntersectingItemsInRangeToSelection:function(){},addAllObjectsMatchingFilterToSelection:function(){}};var m=cr.ui.define(d);m.prototype={__proto__:d.prototype,decorate:function(){this.classList.add("timeline-counter-track");g(this,!1);this.selectedSamples_={}},decorateHit:function(){},
+get counter(){return this.counter_},set counter(a){this.counter_=a;this.invalidate()},get selectedSamples(){return this.selectedSamples_},redraw:function(){var a=this.counter_,b=this.ctx_,c=this.canvas_.width,d=this.canvas_.height;b.clearRect(0,0,c,d);var e=this.viewport_,g=e.xViewVectorToWorld(1),h=e.xViewToWorld(0),c=e.xViewToWorld(c),i=e.xViewVectorToWorld(1);b.save();e.applyTransformToCanavs(b);for(var e=a.numSeries,j=a.numSamples,k=tracing.findLowIndexInSortedArray(a.timestamps,function(){},
+h),l=d/a.maxTotal,m=a.numSeries-1;0<=m;m--){b.fillStyle=f[a.seriesColors[m]];b.beginPath();for(var o=k-1,v=0<=o?a.timestamps[o]-i:-1,w=d,A=!1;;){var r=o+1;if(r>=j){b.lineTo(v,w);b.lineTo(v+8*g,w);b.lineTo(v+8*g,d);break}var s=a.timestamps[r],o=a.totals[r*e+m],y=d-l*o;if(s>c){b.lineTo(s,w);b.lineTo(s,d);break}s-v<i?o=r:(A||(b.moveTo(h,d),A=!0),b.lineTo(s,w),b.lineTo(s,y),o=r,v=s,w=y)}b.closePath();b.fill()}b.fillStyle="rgba(255, 0, 0, 1)";for(r in this.selectedSamples_)if(this.selectedSamples_[r]){s=
+a.timestamps[r];for(m=a.numSeries-1;0<=m;m--)o=a.totals[r*e+m],y=d-l*o,b.fillRect(s-g,y-1,3*g,3)}b.restore()},addIntersectingItemsToSelection:function(a,b,c){var d=this.getBoundingClientRect();if(b<d.top||b>=d.bottom)return!1;b=this.counter_;if(a<this.counter_.timestamps[0])return!1;d=tracing.findLowIndexInSortedArray(b.timestamps,function(a){return a},a);if(0>d||d>=b.timestamps.length)return!1;0<d&&a>this.counter_.timestamps[d-1]&&d--;this.getBoundingClientRect();a=c.addCounterSample(this,this.counter,
+d);this.decorateHit(a);return!0},addIntersectingItemsInRangeToSelection:function(a,b,c,d,f){var e=this.getBoundingClientRect(),c=Math.max(c,e.top),d=Math.min(d,e.bottom);if(!(c>d)){d=this.counter_;c=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},a);e=tracing.findLowIndexInSortedArray(d.timestamps,function(a){return a},b);0<c&&a>d.timestamps[c-1]&&c--;0<e&&b>d.timestamps[e-1]&&e--;for(a=c;a<=e;a++)a>=d.timestamps.length||(b=f.addCounterSample(this,this.counter,a),this.decorateHit(b))}},
+addAllObjectsMatchingFilterToSelection:function(){}};return{TimelineCounterTrack:m,TimelineSliceTrack:k,TimelineThreadTrack:l,TimelineViewportTrack:i,TimelineCpuTrack:j}});cr.define("tracing",function(){function g(e,c,f,g,a,b){this.ctx_=e;this.vpLeft_=c;this.minRectSize_=f;this.maxMergeDist_=g;this.vpRight_=a;this.pallette_=b}g.prototype={y_:0,h_:0,merging_:!1,mergeStartX_:0,mergeCurRight_:0,setYandH:function(e,c){this.flush();this.y_=e;this.h_=c},fillRect:function(e,c,f){var g=e+c;g<this.vpLeft_||e>this.vpRight_||(c<this.minRectSize_?(g-this.mergeStartX_>this.maxMergeDist_&&this.flush(),this.merging_?(this.mergeCurRight_=g,this.mergedColorId=Math.max(this.mergedColorId,
 f)):(this.merging_=!0,this.mergeStartX_=e,this.mergeCurRight_=g,this.mergedColorId=f)):(this.merging_&&this.flush(),this.ctx_.fillStyle=this.pallette_[f],this.ctx_.fillRect(e,this.y_,c,this.h_)))},flush:function(){this.merging_&&(this.ctx_.fillStyle=this.pallette_[this.mergedColorId],this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_),this.merging_=!1)}};return{FastRectRenderer:g}});cr.define("tracing",function(){var g=cr.ui.define(cr.ui.TabPanel);g.prototype={__proto__:cr.ui.TabPanel.prototype,traceEvents_:[],systemTraceEvents_:[],decorate:function(){cr.ui.TabPanel.prototype.decorate.apply(this);this.classList.add("profiling-view");this.recordBn_=document.createElement("button");this.recordBn_.className="record";this.recordBn_.textContent="Record";this.recordBn_.addEventListener("click",this.onRecord_.bind(this));this.saveBn_=document.createElement("button");this.saveBn_.textContent=
 "Save";this.saveBn_.addEventListener("click",this.onSave_.bind(this));this.loadBn_=document.createElement("button");this.loadBn_.textContent="Load";this.loadBn_.addEventListener("click",this.onLoad_.bind(this));if(cr.isChromeOS){this.systemTracingBn_=document.createElement("input");this.systemTracingBn_.type="checkbox";this.systemTracingBn_.checked=!0;var e=document.createElement("div");e.className="label";e.textContent="System events";e.appendChild(this.systemTracingBn_)}this.timelineView_=new tracing.TimelineView;
 this.timelineView_.leftControls.appendChild(this.recordBn_);this.timelineView_.leftControls.appendChild(this.saveBn_);this.timelineView_.leftControls.appendChild(this.loadBn_);cr.isChromeOS&&this.timelineView_.leftControls.appendChild(this.systemTracingBn_);this.appendChild(this.timelineView_);document.addEventListener("keypress",this.onKeypress_.bind(this));this.refresh_()},didSetTracingController_:function(e,c){if(c)throw"Can only set tracing controller once.";this.tracingController_.addEventListener("traceEnded",
@@ -152,7 +152,7 @@
 this.appendChild(this.hitCountEl_);this.updateHitCountEl_()},get controller(){return this.controller_},set controller(c){this.controller_=c;this.updateHitCountEl_()},focus:function(){this.filterEl_.selectionStart=0;this.filterEl_.selectionEnd=this.filterEl_.value.length;this.filterEl_.focus()},updateHitCountEl_:function(){if(!this.controller||document.activeElement!=this.filterEl_)this.hitCountEl_.textContent="";else{var c=this.controller.currentHitIndex,e=this.controller.filterHits.length;this.hitCountEl_.textContent=
 0==e?"0 of 0":c+1+" of "+e}}};g.prototype={__proto__:Object.prototype,get timeline(){return this.timeline_},set timeline(c){this.timeline_=c;this.filterHitsDirty_=!0},get filterText(){return this.filterText_},set filterText(c){c!=this.filterText_&&(this.filterText_=c,this.filterHitsDirty_=!0,this.findNext())},get filterHits(){if(this.filterHitsDirty_)if(this.filterHitsDirty_=!1,this.timeline_){var c=new tracing.TimelineFilter(this.filterText);this.filterHits_.clear();this.timeline.addAllObjectsMatchingFilterToSelection(c,
 this.filterHits_);this.currentHitIndex_=this.filterHits_.length-1}else this.filterHits_.clear(),this.currentHitIndex_=0;return this.filterHits_},get currentHitIndex(){return this.currentHitIndex_},find_:function(c){if(this.timeline){var e=this.filterHits.length;this.currentHitIndex_+=c;0>this.currentHitIndex_&&(this.currentHitIndex_=e-1);this.currentHitIndex_>=e&&(this.currentHitIndex_=0);0>this.currentHitIndex_||this.currentHitIndex_>=e?this.timeline.selection=new tracing.TimelineSelection:(c=0==
-this.currentHitIndex_,this.timeline.setSelectionAndMakeVisible(this.filterHits.subSelection(this.currentHitIndex_),c))}},findNext:function(){this.find_(1)},findPrevious:function(){this.find_(-1)}};var c=cr.ui.define("div");c.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("timeline-view");this.titleEl_=document.createElement("div");this.titleEl_.textContent="Tracing: ";this.controlDiv_=document.createElement("div");this.controlDiv_.className="control";this.leftControlsEl_=
+this.currentHitIndex_,e=this.filterHits.subSelection(this.currentHitIndex_),this.timeline.setSelectionAndMakeVisible(e,c))}},findNext:function(){this.find_(1)},findPrevious:function(){this.find_(-1)}};var c=cr.ui.define("div");c.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("timeline-view");this.titleEl_=document.createElement("div");this.titleEl_.textContent="Tracing: ";this.controlDiv_=document.createElement("div");this.controlDiv_.className="control";this.leftControlsEl_=
 document.createElement("div");this.leftControlsEl_.className="controls";this.rightControlsEl_=document.createElement("div");this.rightControlsEl_.className="controls";var c=document.createElement("div");c.className="spacer";this.timelineContainer_=document.createElement("div");this.timelineContainer_.className="timeline-container";var h=document.createElement("div");h.className="analysis-container";this.analysisEl_=new tracing.TimelineAnalysisView;this.findCtl_=new e;this.findCtl_.controller=new g;
 this.rightControls.appendChild(this.findCtl_);this.controlDiv_.appendChild(this.titleEl_);this.controlDiv_.appendChild(this.leftControlsEl_);this.controlDiv_.appendChild(c);this.controlDiv_.appendChild(this.rightControlsEl_);this.appendChild(this.controlDiv_);this.appendChild(this.timelineContainer_);h.appendChild(this.analysisEl_);this.appendChild(h);this.rightControls.appendChild(this.createHelpButton_());this.onSelectionChangedBoundToThis_=this.onSelectionChanged_.bind(this);document.addEventListener("keypress",
 this.onKeypress_.bind(this),!0)},createHelpButton_:function(){function c(a){if(e.visible&&(27==a.keyCode||63==a.keyCode))a.preventDefault(),document.removeEventListener("keydown",c),e.visible=!1}var e=new tracing.Overlay;e.classList.add("timeline-view-help-overlay");var a=document.createElement("div");a.className="timeline-button timeline-view-help-button";a.textContent="?";var b=document.createElement("div");b.style.whiteSpace="pre";b.style.fontFamily="monospace";a.addEventListener("click",function(){e.visible=
diff --git a/src/shared/js/util.js b/src/shared/js/util.js
index c77fc34..f975ff8 100644
--- a/src/shared/js/util.js
+++ b/src/shared/js/util.js
@@ -7,7 +7,7 @@
  * @type {!Object}
  * @const
  */
-var global = this;
+//var global = this;
 
 /**
  * Alias for document.getElementById.
diff --git a/style.css b/style.css
index aa60ce7..6b34b1a 100644
--- a/style.css
+++ b/style.css
@@ -1 +1 @@
-tabbox{-webkit-box-orient:vertical;display:-webkit-box;}tabs{-webkit-padding-start:8px;background:-webkit-linear-gradient(white,#f3f3f3);border-bottom:1px solid #a0a0a0;display:-webkit-box;margin:0;}tabs>*{-webkit-margin-start:5px;-webkit-transition:border-color 150ms,background-color 150ms;background:rgba(160,160,160,.3);border:1px solid rgba(160,160,160,.3);border-bottom:0;border-top-left-radius:3px;border-top-right-radius:3px;cursor:default;display:block;min-width:4em;padding:2px 10px;text-align:center;}tabs>:not([selected]){background:rgba(238,238,238,.3);}tabs>:not([selected]):hover{background:rgba(247,247,247,.3);}tabs>[selected]{-webkit-transition:none;background:white;border-color:#a0a0a0;margin-bottom:-1px;position:relative;z-index:0;}tabs:focus{outline:none;}html.focus-outline-visible tabs:focus>[selected]{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}tabpanels{-webkit-box-flex:1;background:white;box-shadow:2px 2px 5px rgba(0,0,0,.2);display:-webkit-box;padding:5px 15px 0 15px;}tabpanels>*{-webkit-box-flex:1;display:none;}tabpanels>[selected]{display:block;}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button),select,input[type='checkbox'],input[type='radio']{-webkit-appearance:none;-webkit-user-select:none;background-image:-webkit-linear-gradient(#ededed,#ededed 38%,#dedede);border:1px solid rgba(0,0,0,0.25);border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,0.08),inset 0 1px 2px rgba(255,255,255,0.75);color:#444;font:inherit;margin:0 1px 0 0;text-shadow:0 1px 0 #f0f0f0;}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button),select{min-height:2em;min-width:4em;<if expr="pp_ifdef('chromeos')">padding-top:3px;</if><if expr="is_win">padding-bottom:1px;</if>;}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button){-webkit-padding-end:10px;-webkit-padding-start:10px;}select{-webkit-appearance:none;-webkit-padding-end:20px;-webkit-padding-start:6px;background-image:url('../images/select.png'),-webkit-linear-gradient(#ededed,#ededed 38%,#dedede);background-position:right center;background-repeat:no-repeat;}html[dir='rtl'] select{background-position:center left;}input[type='checkbox']{bottom:2px;height:13px;position:relative;vertical-align:middle;width:13px;}input[type='radio']{border-radius:100%;bottom:3px;height:15px;position:relative;vertical-align:middle;width:15px;}input[type='password'],input[type='search'],input[type='text'],input[type='url'],input:not([type]){border:1px solid #bfbfbf;border-radius:2px;box-sizing:border-box;color:#444;font:inherit;margin:0;min-height:2em;padding:3px;<if expr="is_win or is_macosx">padding-bottom:4px;</if><if expr="pp_ifdef('chromeos')">padding-bottom:2px;</if>;}input[type='search']{-webkit-appearance:textfield;min-width:160px;}input[type='checkbox']:checked::before{-webkit-user-select:none;background-image:url('../images/check.png');background-size:100% 100%;content:'';display:block;height:100%;width:100%;}html[dir='rtl'] input[type='checkbox']:checked::before{-webkit-transform:scaleX(-1);}input[type='radio']:checked::before{background-color:#666;border-radius:100%;bottom:25%;content:'';display:block;left:25%;position:absolute;right:25%;top:25%;}button:not(.custom-appearance):not(.link-button):enabled:hover,input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover,input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover,select:enabled:hover,input[type='checkbox']:enabled:hover,input[type='radio']:enabled:hover{background-image:-webkit-linear-gradient(#f0f0f0,#f0f0f0 38%,#e0e0e0);border-color:rgba(0,0,0,0.3);box-shadow:0 1px 0 rgba(0,0,0,0.12),inset 0 1px 2px rgba(255,255,255,0.95);color:black;}select:enabled:hover{background-image:url('../images/select.png'),-webkit-linear-gradient(#f0f0f0,#f0f0f0 38%,#e0e0e0);}button:not(.custom-appearance):not(.link-button):enabled:active,input[type='button']:not(.custom-appearance):not(.link-button):enabled:active,input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active,select:enabled:active,input[type='checkbox']:enabled:active,input[type='radio']:enabled:active{background-image:-webkit-linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7);box-shadow:none;text-shadow:none;}select:enabled:active{background-image:url('../images/select.png'),-webkit-linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7);}button:not(.custom-appearance):not(.link-button):disabled,input[type='button']:not(.custom-appearance):not(.link-button):disabled,input[type='submit']:not(.custom-appearance):not(.link-button):disabled,select:disabled{background-image:-webkit-linear-gradient(#f1f1f1,#f1f1f1 38%,#e6e6e6);border-color:rgba(80,80,80,0.2);box-shadow:0 1px 0 rgba(80,80,80,0.08),inset 0 1px 2px rgba(255,255,255,0.75);color:#aaa;}select:disabled{background-image:url('../images/disabled_select.png'),-webkit-linear-gradient(#f1f1f1,#f1f1f1 38%,#e6e6e6);}input[type='checkbox']:disabled,input[type='radio']:disabled{opacity:.75;}input[type='password']:disabled,input[type='search']:disabled,input[type='text']:disabled,input[type='url']:disabled,input:not([type]):disabled{color:#999;}button:not(.custom-appearance):not(.link-button):enabled:focus,input[type='button']:not(.custom-appearance):enabled:focus,input[type='checkbox']:enabled:focus,input[type='password']:enabled:focus,input[type='radio']:enabled:focus,input[type='search']:enabled:focus,input[type='submit']:not(.custom-appearance):enabled:focus,input[type='text']:enabled:focus,input[type='url']:enabled:focus,input:not([type]):enabled:focus,select:enabled:focus{-webkit-transition:border-color 200ms;border-color:#4d90fe;outline:none;}.link-button{-webkit-box-shadow:none;background:transparent none;border:none;color:#15c;cursor:pointer;font:inherit;margin:0;padding:0 4px;}.link-button:hover{text-decoration:underline;}.link-button:active{color:#052577;text-decoration:underline;}.link-button[disabled]{color:#999;cursor:default;text-decoration:none;}.checkbox,.radio{margin:.65em 0;}.checkbox label,.radio label{display:-webkit-inline-box;}.checkbox label input ~ span,.radio label input ~ span{-webkit-margin-start:.6em;display:block;}.checkbox label:hover,.radio label:hover{color:black;}label>input[type=checkbox]:disabled ~ span,label>input[type=radio]:disabled ~ span{color:#999;}.overlay-root{-webkit-box-align:stretch;-webkit-box-orient:horizontal;-webkit-box-pack:center;-webkit-user-select:none;background:rgba(0,0,0,0.8);display:-webkit-box;height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000;}.overlay-root:not([visible]),.overlay:not([visible]){display:none;}.overlay-root>.content-host{-webkit-box-align:stretch;-webkit-box-orient:vertical;-webkit-box-pack:center;-webkit-user-select:auto;display:-webkit-box;}.overlay-root>.content-host>*{background:#fff;}.profiling-view{-webkit-box-flex:1;-webkit-box-orient:vertical;display:-webkit-box;padding:0;}.profiling-view>.container{-webkit-box-flex:1;display:-webkit-box;}.profiling-overlay{-webkit-box-orient:vertical;display:-webkit-box;text-align:center;}.profiling-overlay .raw-text{-webkit-box-flex:1;overflow:auto;wrap:none;}.profiling-overlay .error{border:1px solid red;text-align:center;}.timeline-analysis{-webkit-user-select:text;font-family:monospace;white-space:pre;}.timeline-view{-webkit-box-flex:1;-webkit-box-orient:vertical;display:-webkit-box;padding:0;}.timeline-view>.control{display:-webkit-box;}.timeline-view>.control>.controls{display:-webkit-box;}.timeline-view>.control>span{padding-left:5px;padding-right:10px;}.timeline-view>.control>button{font-size:75%;height:20px;min-height:10px;}.timeline-view>.control>.spacer{-webkit-box-flex:1;}.timeline-view>.timeline-viewport-track{display:-webkit-box;margin-top:6px;border-bottom:1px solid #AAA;}.timeline-view>.timeline-container{-webkit-box-flex:1;display:-webkit-box;overflow:auto;}.timeline-view>.timeline-container>*{-webkit-box-flex:1;}.timeline-view>.analysis-container{border-top:1px solid black;max-height:250px;min-height:250px;overflow:auto;}.timeline-view .selection{margin:2px;}.timeline-view .selection ul{margin:0;}.timeline-find-control{-webkit-user-select:none;display:-webkit-box;position:relative;}.timeline-find-control .hit-count-label{left:0;opacity:.25;pointer-events:none;position:absolute;text-align:right;top:2px;width:170px;z-index:1;}.timeline-find-control input{-webkit-user-select:auto;border:1px solid rgba(0,0,0,0.4);box-sizing:border-box;height:19px;margin-bottom:1px;margin-left:0;margin-right:0;margin-top:1px;padding:0;width:170px;}.timeline-button.find-previous{border-left:none;margin-left:0;margin-right:0;}.timeline-button.find-next{border-bottom-right-radius:5px;border-left:none;margin-left:0;}.timeline-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.2);color:rgba(0,0,0,0.2);font-size:14px;height:17px;margin:1px;text-align:center;width:23px;}.timeline-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.8);box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1);}.timeline *{-webkit-user-select:none;cursor:default;}.timeline-drag-box{background-color:rgba(0,0,255,0.25);border:1px solid #000060;font-size:75%;position:fixed;}.timeline-thread-track{-webkit-box-orient:vertical;display:-webkit-box;padding:1px 0;position:relative;}.timeline-track-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.2);font-size:10px;height:12px;text-align:center;width:12px;}.timeline-track-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.5);border-radius:25%;box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1);}.timeline-track-close-button{left:0;position:absolute;top:0;}.timeline-track-collapse-button{left:15px;position:absolute;top:0;}.timeline-thread-track:not(:first-child){border-top:1px solid #D0D0D0;}.timeline-canvas-based-track{-webkit-box-align:stretch;-webkit-box-orient:horizontal;background-color:white;display:-webkit-box;margin:0;padding:0 5px 0 0;}.timeline-canvas-based-track-title{overflow:hidden;padding-right:5px;text-align:right;text-overflow:ellipsis;white-space:nowrap;}.timeline-canvas-based-track-canvas-container{-webkit-box-flex:1;width:100%;}.timeline-canvas-based-track-canvas{-webkit-box-flex:1;display:block;height:100%;width:100%;}.timeline-viewport-track{height:12px;}.timeline-slice-track{height:18px;}.timeline-counter-track{height:30px;position:relative;}.tracing-overlay{-webkit-box-align:center;-webkit-box-orient:vertical;-webkit-box-pack:center;display:-webkit-box;height:80px;text-align:center;width:200px;}.tracing-start-button{-webkit-margin-start:5px;background:#f00;background-clip:border-box;border:1px solid black;border-bottom:0;border-top-left-radius:8px;border-top-right-radius:8px;display:inline-block;margin-top:4px;padding:5px 10px 3px 10px;position:fixed;right:3px;text-align:center;text-decoration:none;top:-1px;}
\ No newline at end of file
+tabbox{-webkit-box-orient:vertical;display:-webkit-box}tabs{-webkit-padding-start:8px;background:-webkit-linear-gradient(white,#f3f3f3);border-bottom:1px solid #a0a0a0;display:-webkit-box;margin:0}tabs>*{-webkit-margin-start:5px;-webkit-transition:border-color 150ms,background-color 150ms;background:rgba(160,160,160,.3);border:1px solid rgba(160,160,160,.3);border-bottom:0;border-top-left-radius:3px;border-top-right-radius:3px;cursor:default;display:block;min-width:4em;padding:2px 10px;text-align:center}tabs>:not([selected]){background:rgba(238,238,238,.3)}tabs>:not([selected]):hover{background:rgba(247,247,247,.3)}tabs>[selected]{-webkit-transition:none;background:white;border-color:#a0a0a0;margin-bottom:-1px;position:relative;z-index:0}tabs:focus{outline:0}html.focus-outline-visible tabs:focus>[selected]{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}tabpanels{-webkit-box-flex:1;background:white;box-shadow:2px 2px 5px rgba(0,0,0,.2);display:-webkit-box;padding:5px 15px 0 15px}tabpanels>*{-webkit-box-flex:1;display:none}tabpanels>[selected]{display:block}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button),select,input[type='checkbox'],input[type='radio']{-webkit-appearance:none;-webkit-user-select:none;background-image:-webkit-linear-gradient(#ededed,#ededed 38%,#dedede);border:1px solid rgba(0,0,0,0.25);border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,0.08),inset 0 1px 2px rgba(255,255,255,0.75);color:#444;font:inherit;margin:0 1px 0 0;text-shadow:0 1px 0 #f0f0f0}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button),select{min-height:2em;min-width:4em;<if expr="pp_ifdef('chromeos')">padding-top:3px;</if><if expr="is_win">padding-bottom:1px;</if>}button:not(.custom-appearance):not(.link-button),input[type='button']:not(.custom-appearance):not(.link-button),input[type='submit']:not(.custom-appearance):not(.link-button){-webkit-padding-end:10px;-webkit-padding-start:10px}select{-webkit-appearance:none;-webkit-padding-end:20px;-webkit-padding-start:6px;background-image:url('../images/select.png'),-webkit-linear-gradient(#ededed,#ededed 38%,#dedede);background-position:right center;background-repeat:no-repeat}html[dir='rtl'] select{background-position:center left}input[type='checkbox']{bottom:2px;height:13px;position:relative;vertical-align:middle;width:13px}input[type='radio']{border-radius:100%;bottom:3px;height:15px;position:relative;vertical-align:middle;width:15px}input[type='password'],input[type='search'],input[type='text'],input[type='url'],input:not([type]){border:1px solid #bfbfbf;border-radius:2px;box-sizing:border-box;color:#444;font:inherit;margin:0;min-height:2em;padding:3px;<if expr="is_win or is_macosx">padding-bottom:4px;</if><if expr="pp_ifdef('chromeos')">padding-bottom:2px;</if>}input[type='search']{-webkit-appearance:textfield;min-width:160px}input[type='checkbox']:checked::before{-webkit-user-select:none;background-image:url('../images/check.png');background-size:100% 100%;content:'';display:block;height:100%;width:100%}html[dir='rtl'] input[type='checkbox']:checked::before{-webkit-transform:scaleX(-1)}input[type='radio']:checked::before{background-color:#666;border-radius:100%;bottom:25%;content:'';display:block;left:25%;position:absolute;right:25%;top:25%}button:not(.custom-appearance):not(.link-button):enabled:hover,input[type='button']:not(.custom-appearance):not(.link-button):enabled:hover,input[type='submit']:not(.custom-appearance):not(.link-button):enabled:hover,select:enabled:hover,input[type='checkbox']:enabled:hover,input[type='radio']:enabled:hover{background-image:-webkit-linear-gradient(#f0f0f0,#f0f0f0 38%,#e0e0e0);border-color:rgba(0,0,0,0.3);box-shadow:0 1px 0 rgba(0,0,0,0.12),inset 0 1px 2px rgba(255,255,255,0.95);color:black}select:enabled:hover{background-image:url('../images/select.png'),-webkit-linear-gradient(#f0f0f0,#f0f0f0 38%,#e0e0e0)}button:not(.custom-appearance):not(.link-button):enabled:active,input[type='button']:not(.custom-appearance):not(.link-button):enabled:active,input[type='submit']:not(.custom-appearance):not(.link-button):enabled:active,select:enabled:active,input[type='checkbox']:enabled:active,input[type='radio']:enabled:active{background-image:-webkit-linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7);box-shadow:none;text-shadow:none}select:enabled:active{background-image:url('../images/select.png'),-webkit-linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7)}button:not(.custom-appearance):not(.link-button):disabled,input[type='button']:not(.custom-appearance):not(.link-button):disabled,input[type='submit']:not(.custom-appearance):not(.link-button):disabled,select:disabled{background-image:-webkit-linear-gradient(#f1f1f1,#f1f1f1 38%,#e6e6e6);border-color:rgba(80,80,80,0.2);box-shadow:0 1px 0 rgba(80,80,80,0.08),inset 0 1px 2px rgba(255,255,255,0.75);color:#aaa}select:disabled{background-image:url('../images/disabled_select.png'),-webkit-linear-gradient(#f1f1f1,#f1f1f1 38%,#e6e6e6)}input[type='checkbox']:disabled,input[type='radio']:disabled{opacity:.75}input[type='password']:disabled,input[type='search']:disabled,input[type='text']:disabled,input[type='url']:disabled,input:not([type]):disabled{color:#999}button:not(.custom-appearance):not(.link-button):enabled:focus,input[type='button']:not(.custom-appearance):enabled:focus,input[type='checkbox']:enabled:focus,input[type='password']:enabled:focus,input[type='radio']:enabled:focus,input[type='search']:enabled:focus,input[type='submit']:not(.custom-appearance):enabled:focus,input[type='text']:enabled:focus,input[type='url']:enabled:focus,input:not([type]):enabled:focus,select:enabled:focus{-webkit-transition:border-color 200ms;border-color:#4d90fe;outline:0}.link-button{-webkit-box-shadow:none;background:transparent none;border:0;color:#15c;cursor:pointer;font:inherit;margin:0;padding:0 4px}.link-button:hover{text-decoration:underline}.link-button:active{color:#052577;text-decoration:underline}.link-button[disabled]{color:#999;cursor:default;text-decoration:none}.checkbox,.radio{margin:.65em 0}.checkbox label,.radio label{display:-webkit-inline-box}.checkbox label input ~ span,.radio label input ~ span{-webkit-margin-start:.6em;display:block}.checkbox label:hover,.radio label:hover{color:black}label>input[type=checkbox]:disabled ~ span,label>input[type=radio]:disabled ~ span{color:#999}.overlay-root{-webkit-box-align:stretch;-webkit-box-orient:horizontal;-webkit-box-pack:center;-webkit-user-select:none;background:rgba(0,0,0,0.8);display:-webkit-box;height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.overlay-root:not([visible]),.overlay:not([visible]){display:none}.overlay-root>.content-host{-webkit-box-align:stretch;-webkit-box-orient:vertical;-webkit-box-pack:center;-webkit-user-select:auto;display:-webkit-box}.overlay-root>.content-host>*{background:#fff}.profiling-view{-webkit-box-flex:1;-webkit-box-orient:vertical;display:-webkit-box;padding:0}.profiling-view>.container{-webkit-box-flex:1;display:-webkit-box}.profiling-overlay{-webkit-box-orient:vertical;display:-webkit-box;text-align:center}.profiling-overlay .raw-text{-webkit-box-flex:1;overflow:auto;wrap:none}.profiling-overlay .error{border:1px solid red;text-align:center}.timeline-analysis{-webkit-user-select:text;font-family:monospace;white-space:pre}.timeline-view{-webkit-box-flex:1;-webkit-box-orient:vertical;display:-webkit-box;padding:0}.timeline-view>.control{display:-webkit-box}.timeline-view>.control>.controls{display:-webkit-box}.timeline-view>.control>span{padding-left:5px;padding-right:10px}.timeline-view>.control>button{font-size:75%;height:20px;min-height:10px}.timeline-view>.control>.spacer{-webkit-box-flex:1}.timeline-view>.timeline-viewport-track{display:-webkit-box;margin-top:6px;border-bottom:1px solid #AAA}.timeline-view>.timeline-container{-webkit-box-flex:1;display:-webkit-box;overflow:auto}.timeline-view>.timeline-container>*{-webkit-box-flex:1}.timeline-view>.analysis-container{border-top:1px solid black;max-height:250px;min-height:250px;overflow:auto}.timeline-view .selection{margin:2px}.timeline-view .selection ul{margin:0}.timeline-find-control{-webkit-user-select:none;display:-webkit-box;position:relative}.timeline-find-control .hit-count-label{left:0;opacity:.25;pointer-events:none;position:absolute;text-align:right;top:2px;width:170px;z-index:1}.timeline-find-control input{-webkit-user-select:auto;border:1px solid rgba(0,0,0,0.4);box-sizing:border-box;height:19px;margin-bottom:1px;margin-left:0;margin-right:0;margin-top:1px;padding:0;width:170px}.timeline-button.find-previous{border-left:none;margin-left:0;margin-right:0}.timeline-button.find-next{border-bottom-right-radius:5px;border-left:none;margin-left:0}.timeline-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.2);color:rgba(0,0,0,0.2);font-size:14px;height:17px;margin:1px;text-align:center;width:23px}.timeline-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.8);box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1)}.timeline *{-webkit-user-select:none;cursor:default}.timeline-drag-box{background-color:rgba(0,0,255,0.25);border:1px solid #000060;font-size:75%;position:fixed}.timeline-thread-track{-webkit-box-orient:vertical;display:-webkit-box;padding:1px 0;position:relative}.timeline-track-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.2);font-size:10px;height:12px;text-align:center;width:12px}.timeline-track-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.5);border-radius:25%;box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1)}.timeline-track-close-button{left:0;position:absolute;top:0}.timeline-track-collapse-button{left:15px;position:absolute;top:0}.timeline-thread-track:not(:first-child){border-top:1px solid #d0d0d0}.timeline-canvas-based-track{-webkit-box-align:stretch;-webkit-box-orient:horizontal;background-color:white;display:-webkit-box;margin:0;padding:0 5px 0 0}.timeline-canvas-based-track-title{overflow:hidden;padding-right:5px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.timeline-canvas-based-track-canvas-container{-webkit-box-flex:1;width:100%}.timeline-canvas-based-track-canvas{-webkit-box-flex:1;display:block;height:100%;width:100%}.timeline-viewport-track{height:12px}.timeline-slice-track{height:18px}.timeline-counter-track{height:30px;position:relative}.tracing-overlay{-webkit-box-align:center;-webkit-box-orient:vertical;-webkit-box-pack:center;display:-webkit-box;height:80px;text-align:center;width:200px}.tracing-start-button{-webkit-margin-start:5px;background:#f00;background-clip:border-box;border:1px solid black;border-bottom:0;border-top-left-radius:8px;border-top-right-radius:8px;display:inline-block;margin-top:4px;padding:5px 10px 3px 10px;position:fixed;right:3px;text-align:center;text-decoration:none;top:-1px}
\ No newline at end of file