mirror of
https://github.com/golang/go
synced 2024-11-25 05:38:01 -07:00
2869 lines
475 KiB
HTML
2869 lines
475 KiB
HTML
|
<!DOCTYPE HTML>
|
||
|
<html>
|
||
|
<head i18n-values="dir:textdirection;">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
.labeled-checkbox {
|
||
|
display: flex;
|
||
|
white-space: nowrap;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<template id="overlay-template">
|
||
|
<style>
|
||
|
overlay-mask {
|
||
|
left: 0;
|
||
|
padding: 8px;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
z-index: 1000;
|
||
|
font-family: sans-serif;
|
||
|
-webkit-justify-content: center;
|
||
|
background: rgba(0, 0, 0, 0.8);
|
||
|
display: -webkit-flex;
|
||
|
height: 100%;
|
||
|
left: 0;
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
width: 100%;
|
||
|
}
|
||
|
overlay-mask:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
overlay-vertical-centering-container {
|
||
|
-webkit-justify-content: center;
|
||
|
-webkit-flex-direction: column;
|
||
|
display: -webkit-flex;
|
||
|
}
|
||
|
overlay-frame {
|
||
|
z-index: 1100;
|
||
|
background: rgb(255, 255, 255);
|
||
|
border: 1px solid #ccc;
|
||
|
margin: 75px;
|
||
|
display: -webkit-flex;
|
||
|
-webkit-flex-direction: column;
|
||
|
}
|
||
|
title-bar {
|
||
|
-webkit-align-items: center;
|
||
|
-webkit-flex-direction: row;
|
||
|
border-bottom: 1px solid #ccc;
|
||
|
background-color: #ddd;
|
||
|
display: -webkit-flex;
|
||
|
padding: 5px;
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
}
|
||
|
title {
|
||
|
display: inline;
|
||
|
font-weight: bold;
|
||
|
-webkit-box-flex: 1;
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
}
|
||
|
close-button {
|
||
|
-webkit-align-self: flex-end;
|
||
|
border: 1px solid #eee;
|
||
|
background-color: #999;
|
||
|
font-size: 10pt;
|
||
|
font-weight: bold;
|
||
|
padding: 2px;
|
||
|
text-align: center;
|
||
|
width: 16px;
|
||
|
}
|
||
|
close-button:hover {
|
||
|
background-color: #ddd;
|
||
|
border-color: black;
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
overlay-content {
|
||
|
display: -webkit-flex;
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
-webkit-flex-direction: column;
|
||
|
overflow-y: auto;
|
||
|
padding: 10px;
|
||
|
min-width: 300px;
|
||
|
}
|
||
|
button-bar {
|
||
|
-webkit-align-items: baseline;
|
||
|
border-top: 1px solid #ccc;
|
||
|
display: -webkit-flex;
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
-webkit-flex-direction: row-reverse;
|
||
|
padding: 4px;
|
||
|
}
|
||
|
</style>
|
||
|
<overlay-mask>
|
||
|
<overlay-vertical-centering-container>
|
||
|
<overlay-frame>
|
||
|
<title-bar>
|
||
|
<title></title>
|
||
|
<close-button>✕</close-button>
|
||
|
</title-bar>
|
||
|
<overlay-content>
|
||
|
<content></content>
|
||
|
</overlay-content>
|
||
|
<button-bar></button-bar>
|
||
|
</overlay-frame>
|
||
|
</overlay-vertical-centering-container>
|
||
|
</overlay-mask>
|
||
|
</template>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
x-drag-handle {
|
||
|
-webkit-user-select: none;
|
||
|
box-sizing: border-box;
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
x-drag-handle.horizontal-drag-handle {
|
||
|
background-image: -webkit-gradient(linear,
|
||
|
0 0, 0 100%,
|
||
|
from(#E5E5E5),
|
||
|
to(#D1D1D1));
|
||
|
border-bottom: 1px solid #8e8e8e;
|
||
|
border-top: 1px solid white;
|
||
|
cursor: ns-resize;
|
||
|
height: 7px;
|
||
|
position: relative;
|
||
|
z-index: 10;
|
||
|
}
|
||
|
|
||
|
x-drag-handle.vertical-drag-handle {
|
||
|
background-image: -webkit-gradient(linear,
|
||
|
0 0, 100% 0,
|
||
|
from(#E5E5E5),
|
||
|
to(#D1D1D1));
|
||
|
border-left: 1px solid white;
|
||
|
border-right: 1px solid #8e8e8e;
|
||
|
cursor: ew-resize;
|
||
|
position: relative;
|
||
|
width: 7px;
|
||
|
z-index: 10;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tracing-analysis-tab-view" constructor="TracingAnalysisTabView">
|
||
|
<template>
|
||
|
<style>
|
||
|
:host {
|
||
|
display: flex;
|
||
|
flex-flow: column nowrap;
|
||
|
overflow: hidden;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
tab-strip[tabs-hidden] {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
tab-strip {
|
||
|
background-color: rgb(236, 236, 236);
|
||
|
border-bottom: 1px solid #8e8e8e;
|
||
|
display: flex;
|
||
|
flex: 0 0 auto;
|
||
|
flex-flow: row;
|
||
|
overflow-x: auto;
|
||
|
padding: 0 10px 0 10px;
|
||
|
font-size: 12px;
|
||
|
}
|
||
|
|
||
|
tab-button {
|
||
|
display: block;
|
||
|
flex: 0 0 auto;
|
||
|
padding: 4px 15px 1px 15px;
|
||
|
margin-top: 2px;
|
||
|
}
|
||
|
|
||
|
tab-button[selected=true] {
|
||
|
background-color: white;
|
||
|
border: 1px solid rgb(163, 163, 163);
|
||
|
border-bottom: none;
|
||
|
padding: 3px 14px 1px 14px;
|
||
|
}
|
||
|
|
||
|
tabs-content-container {
|
||
|
display: flex;
|
||
|
flex: 1 1 auto;
|
||
|
overflow: auto;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
::content > * {
|
||
|
flex: 1 1 auto;
|
||
|
}
|
||
|
|
||
|
::content > *:not([selected]) {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
button-label {
|
||
|
display: inline;
|
||
|
}
|
||
|
</style>
|
||
|
<tab-strip>
|
||
|
<template repeat="{{tab in tabs_}}">
|
||
|
<tab-button button-id="{{ tab.id }}" on-click="{{ tabButtonSelectHandler_ }}" selected="{{ selectedTab_.id === tab.id }}">
|
||
|
<button-label>{{ tab.label ? tab.label : 'No Label'}}</button-label>
|
||
|
</tab-button>
|
||
|
</template>
|
||
|
</tab-strip>
|
||
|
<tabs-content-container id="content-container">
|
||
|
<content></content>
|
||
|
</tabs-content-container>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tracing-analysis-sub-view" constructor="TracingAnalysisSubView">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.analysis-link {
|
||
|
color: -webkit-link;
|
||
|
cursor: pointer;
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
|
||
|
.analysis-link:hover {
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
x-generic-object-view {
|
||
|
display: block;
|
||
|
font-family: monospace;
|
||
|
}
|
||
|
|
||
|
x-generic-object-view-with-label {
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.analysis-header {
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
.analysis-results {
|
||
|
font-family: monospace;
|
||
|
white-space: pre;
|
||
|
}
|
||
|
|
||
|
.analysis-results * {
|
||
|
-webkit-user-select: text !important;
|
||
|
cursor: text;
|
||
|
}
|
||
|
|
||
|
.analysis-table {
|
||
|
border-collapse: collapse;
|
||
|
border-width: 0;
|
||
|
margin-bottom: 25px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
.analysis-table tr > td:first-child {
|
||
|
padding-left: 2px;
|
||
|
}
|
||
|
|
||
|
.analysis-table tr > td {
|
||
|
padding: 2px 4px 2px 4px;
|
||
|
vertical-align: text-top;
|
||
|
width: 150px;
|
||
|
}
|
||
|
|
||
|
/* Shrink back nested cells (used to display Args) */
|
||
|
.analysis-table td td {
|
||
|
padding: 0 0 0 0;
|
||
|
width: auto;
|
||
|
}
|
||
|
|
||
|
.analysis-table-header {
|
||
|
text-align: left;
|
||
|
}
|
||
|
|
||
|
.analysis-table-row {
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
|
||
|
.analysis-table-row:nth-child(2n+0) {
|
||
|
background-color: #e2e2e2;
|
||
|
}
|
||
|
|
||
|
.analysis-table-row-inverted:nth-child(2n+1) {
|
||
|
background-color: #e2e2e2;
|
||
|
}
|
||
|
|
||
|
.selection-changing-link {
|
||
|
color: -webkit-link;
|
||
|
cursor: pointer;
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
|
||
|
.analysis-table thead {
|
||
|
background-color: #e2e2e2;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
.analysis-table tfoot {
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.sortable-table > thead > tr > td {
|
||
|
cursor: pointer !important;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-slice-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-multi-slice-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-thread-time-slice-sub-view" extends="tracing-analysis-sub-view">
|
||
|
<template>
|
||
|
<style>
|
||
|
table {
|
||
|
border-collapse: collapse;
|
||
|
border-width: 0;
|
||
|
margin-bottom: 25px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
table tr > td:first-child {
|
||
|
padding-left: 2px;
|
||
|
}
|
||
|
|
||
|
table tr > td {
|
||
|
padding: 2px 4px 2px 4px;
|
||
|
vertical-align: text-top;
|
||
|
width: 150px;
|
||
|
}
|
||
|
|
||
|
table td td {
|
||
|
padding: 0 0 0 0;
|
||
|
width: auto;
|
||
|
}
|
||
|
tr {
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
|
||
|
tr:nth-child(2n+0) {
|
||
|
background-color: #e2e2e2;
|
||
|
}
|
||
|
</style>
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td>Running process:</td><td id="process-name"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Running thread:</td><td id="thread-name"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>State:</td>
|
||
|
<td><b><span id="state"></span></b></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Start:</td><td id="start"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Duration:</td><td id="duration"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>On CPU:</td><td id="on-cpu"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Running instead:</td><td id="running-instead"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Args:</td><td id="args"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-cpu-slice-sub-view" extends="tracing-analysis-sub-view">
|
||
|
<template>
|
||
|
<style>
|
||
|
table {
|
||
|
border-collapse: collapse;
|
||
|
border-width: 0;
|
||
|
margin-bottom: 25px;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
table tr > td:first-child {
|
||
|
padding-left: 2px;
|
||
|
}
|
||
|
|
||
|
table tr > td {
|
||
|
padding: 2px 4px 2px 4px;
|
||
|
vertical-align: text-top;
|
||
|
width: 150px;
|
||
|
}
|
||
|
|
||
|
table td td {
|
||
|
padding: 0 0 0 0;
|
||
|
width: auto;
|
||
|
}
|
||
|
tr {
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
|
||
|
tr:nth-child(2n+0) {
|
||
|
background-color: #e2e2e2;
|
||
|
}
|
||
|
</style>
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td>Running process:</td><td id="process-name"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Running thread:</td><td id="thread-name"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Start:</td><td id="start"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Duration:</td><td id="duration"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Active slices:</td><td id="running-thread"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-instant-event-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-multi-instant-event-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-counter-sample-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-flow-event-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-multi-flow-event-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-object-instance-sub-view" extends="tracing-analysis-sub-view">
|
||
|
<template>
|
||
|
<style>
|
||
|
#snapshots > * {
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
:host {
|
||
|
overflow: auto;
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
* {
|
||
|
-webkit-user-select: text;
|
||
|
}
|
||
|
|
||
|
.title {
|
||
|
border-bottom: 1px solid rgb(128, 128, 128);
|
||
|
font-size: 110%;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
td, th {
|
||
|
font-family: monospace;
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
</style>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-object-snapshot-sub-view" extends="tracing-analysis-sub-view">
|
||
|
<template>
|
||
|
<style>
|
||
|
#args {
|
||
|
white-space: pre;
|
||
|
}
|
||
|
|
||
|
:host {
|
||
|
overflow: auto;
|
||
|
display: flex;
|
||
|
}
|
||
|
|
||
|
* {
|
||
|
-webkit-user-select: text;
|
||
|
}
|
||
|
|
||
|
.title {
|
||
|
border-bottom: 1px solid rgb(128, 128, 128);
|
||
|
font-size: 110%;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
td, th {
|
||
|
font-family: monospace;
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
</style>
|
||
|
<content></content>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-multi-object-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-single-sample-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
<polymer-element name="tv-c-multi-sample-sub-view" extends="tracing-analysis-sub-view">
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tracing-analysis-view" constructor="TracingAnalysisView">
|
||
|
<template>
|
||
|
<style>
|
||
|
:host {
|
||
|
background-color: white;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
height: 275px;
|
||
|
overflow: auto;
|
||
|
}
|
||
|
|
||
|
:host(.tall-mode) {
|
||
|
height: 525px;
|
||
|
}
|
||
|
|
||
|
::content > * {
|
||
|
flex: 1 0 auto;
|
||
|
}
|
||
|
</style>
|
||
|
<content></content>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.mouse-mode-selector {
|
||
|
|
||
|
-webkit-user-drag: element;
|
||
|
-webkit-user-select: none;
|
||
|
|
||
|
background: #DDD;
|
||
|
border: 1px solid #BBB;
|
||
|
border-radius: 4px;
|
||
|
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||
|
left: calc(100% - 120px);
|
||
|
position: absolute;
|
||
|
top: 100px;
|
||
|
user-select: none;
|
||
|
width: 29px;
|
||
|
z-index: 20;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-icon {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .drag-handle {
|
||
|
background: url(data:image/png;base64,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
|
||
|
background-repeat: no-repeat;
|
||
|
border-bottom: 1px solid #BCBCBC;
|
||
|
cursor: move;
|
||
|
display: block;
|
||
|
height: 13px;
|
||
|
width: 27px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .pan-scan-mode-button {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
background-position: 0 -10px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .pan-scan-mode-button.active {
|
||
|
background-position: -30px -10px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .selection-mode-button {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
background-position: 0 -40px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .selection-mode-button.active {
|
||
|
background-position: -30px -40px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .zoom-mode-button {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
background-position: 0 -70px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .zoom-mode-button.active {
|
||
|
background-position: -30px -70px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .timing-mode-button {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
background-position: 0 -100px;
|
||
|
border-bottom: none;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .timing-mode-button.active {
|
||
|
background-position: -30px -100px;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .rotate-mode-button {
|
||
|
background-image: url(data:image/png;base64,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
|
||
|
background-position: 0 -130px;
|
||
|
border-bottom: none;
|
||
|
}
|
||
|
|
||
|
.mouse-mode-selector .rotate-mode-button.active {
|
||
|
background-position: -30px -130px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.tool-button {
|
||
|
background-position: center center;
|
||
|
background-repeat: no-repeat;
|
||
|
border-bottom: 1px solid #BCBCBC;
|
||
|
border-top: 1px solid #F1F1F1;
|
||
|
cursor: pointer;
|
||
|
height: 30px;
|
||
|
}
|
||
|
|
||
|
.tool-button.active {
|
||
|
cursor: auto;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
<template id="mouse-mode-selector-template">
|
||
|
<div class="drag-handle"></div>
|
||
|
<div class="buttons">
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.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;
|
||
|
}
|
||
|
|
||
|
.track-button:hover {
|
||
|
background-color: rgba(255, 255, 255, 1.0);
|
||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||
|
box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
|
||
|
color: rgba(0, 0, 0, 1);
|
||
|
}
|
||
|
|
||
|
.track-close-button {
|
||
|
left: 2px;
|
||
|
position: absolute;
|
||
|
top: 2px;
|
||
|
}
|
||
|
|
||
|
.track-collapse-button {
|
||
|
left: 3px;
|
||
|
position: absolute;
|
||
|
top: 2px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.drawing-container {
|
||
|
-webkit-box-flex: 1;
|
||
|
display: inline;
|
||
|
overflow: auto;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.drawing-container-canvas {
|
||
|
-webkit-box-flex: 1;
|
||
|
display: block;
|
||
|
pointer-events: none;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.heading-track {
|
||
|
-webkit-box-align: stretch;
|
||
|
-webkit-box-orient: horizontal;
|
||
|
display: -webkit-box;
|
||
|
margin: 0;
|
||
|
padding: 0 5px 0 0;
|
||
|
}
|
||
|
|
||
|
.heading-track > heading {
|
||
|
-webkit-box-sizing: border-box;
|
||
|
background-color: rgb(243, 245, 247);
|
||
|
border-right: 1px solid #8e8e8e;
|
||
|
box-sizing: border-box;
|
||
|
display: -webkit-flex;
|
||
|
-webkit-flex-direction: row;
|
||
|
align-items: center;
|
||
|
overflow-x: hidden;
|
||
|
padding-right: 5px;
|
||
|
text-align: left;
|
||
|
text-overflow: ellipsis;
|
||
|
white-space: nowrap;
|
||
|
}
|
||
|
|
||
|
.heading-track > heading > .heading-arrow {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
margin-left: 5px;
|
||
|
margin-right: 5px;
|
||
|
width: 8px;
|
||
|
font-family: sans-serif;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.counter-track {
|
||
|
height: 30px;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.object-instance-track {
|
||
|
height: 18px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
.spacing-track {
|
||
|
height: 4px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.rect-track {
|
||
|
height: 18px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.thread-track {
|
||
|
-webkit-box-orient: vertical;
|
||
|
display: -webkit-box;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.process-track-header {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
background-image: -webkit-gradient(linear,
|
||
|
0 0, 100% 0,
|
||
|
from(#E5E5E5),
|
||
|
to(#D1D1D1));
|
||
|
border-bottom: 1px solid #8e8e8e;
|
||
|
border-top: 1px solid white;
|
||
|
font-size: 75%;
|
||
|
}
|
||
|
|
||
|
.process-track-base:not(.expanded) > .track {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.process-track-name:before {
|
||
|
content: '\25B8'; /* Right triangle */
|
||
|
padding: 0 5px;
|
||
|
}
|
||
|
|
||
|
.process-track-base.expanded .process-track-name:before {
|
||
|
content: '\25BE'; /* Down triangle */
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
.model-track {
|
||
|
-webkit-box-flex: 1;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.ruler-track {
|
||
|
height: 12px;
|
||
|
}
|
||
|
|
||
|
.ruler-track.tall-mode {
|
||
|
height: 30px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
/* Global TVCM CSS values, applied application-wide */
|
||
|
|
||
|
body * {
|
||
|
-webkit-user-select: none;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
.timeline-track-view * {
|
||
|
-webkit-user-select: none;
|
||
|
cursor: default;
|
||
|
}
|
||
|
|
||
|
.timeline-track-view .tool-button {
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
|
||
|
.timeline-track-view {
|
||
|
-webkit-box-orient: vertical;
|
||
|
display: -webkit-box;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.model-track-container {
|
||
|
-webkit-box-flex: 1;
|
||
|
overflow: auto;
|
||
|
}
|
||
|
|
||
|
.drag-box {
|
||
|
background-color: rgba(0, 0, 255, 0.25);
|
||
|
border: 1px solid rgb(0, 0, 96);
|
||
|
font-size: 75%;
|
||
|
position: fixed;
|
||
|
}
|
||
|
|
||
|
.timeline-track-view > .hint-text {
|
||
|
position: absolute;
|
||
|
bottom: 6px;
|
||
|
right: 6px;
|
||
|
font-size: 8pt;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<polymer-element name="tracing-find-control" constructor="TracingFindControl">
|
||
|
<template>
|
||
|
<style>
|
||
|
div.root {
|
||
|
-webkit-user-select: none;
|
||
|
display: -webkit-flex;
|
||
|
position: relative;
|
||
|
}
|
||
|
input {
|
||
|
-webkit-user-select: auto;
|
||
|
background-color: #f8f8f8;
|
||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||
|
box-sizing: border-box;
|
||
|
height: 19px;
|
||
|
margin-bottom: 1px;
|
||
|
margin-left: 0;
|
||
|
margin-right: 0;
|
||
|
margin-top: 1px;
|
||
|
padding: 0;
|
||
|
width: 170px;
|
||
|
}
|
||
|
input:focus {
|
||
|
background-color: white;
|
||
|
}
|
||
|
.button {
|
||
|
background-color: #f8f8f8;
|
||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||
|
border-left: none;
|
||
|
font-size: 14px;
|
||
|
height: 17px;
|
||
|
margin-left: 0;
|
||
|
margin-top: 1px;
|
||
|
}
|
||
|
.button :first-of-type {
|
||
|
margin-right: 0;
|
||
|
}
|
||
|
#hitCount {
|
||
|
height: 19px;
|
||
|
left: 0;
|
||
|
opacity: 0.25;
|
||
|
pointer-events: none;
|
||
|
position: absolute;
|
||
|
text-align: right;
|
||
|
top: 2px;
|
||
|
width: 170px;
|
||
|
z-index: 1;
|
||
|
}
|
||
|
#spinner {
|
||
|
visibility: hidden;
|
||
|
width: 8px;
|
||
|
height: 8px;
|
||
|
left: 154px;
|
||
|
pointer-events: none;
|
||
|
position: absolute;
|
||
|
top: 4px;
|
||
|
z-index: 1;
|
||
|
|
||
|
border: 2px solid transparent;
|
||
|
border-bottom: 2px solid rgba(0, 0, 0, 0.5);
|
||
|
border-right: 2px solid rgba(0, 0, 0, 0.5);
|
||
|
border-radius: 50%;
|
||
|
|
||
|
animation: spin 1s linear infinite;
|
||
|
}
|
||
|
@keyframes spin { 100% { transform: rotate(360deg); } }
|
||
|
</style>
|
||
|
<div class="root">
|
||
|
<input type="text" id="filter" on-input="{{ filterTextChanged }}" on-keypress="{{ filterKeyPress }}" on-keydown="{{ filterKeyDown }}" on-blur="{{ filterBlur }}" on-focus="{{ filterFocus }}" on-mouseup="{{ filterMouseUp }}" />
|
||
|
<div id="spinner"></div>
|
||
|
<div class="button" on-click="{{ findPrevious }}">←</div>
|
||
|
<div class="button" on-click="{{ findNext }}">→</div>
|
||
|
<div id="hitCount">0 of 0</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
</polymer-element>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
x-side-panel-container {
|
||
|
align-items: stretch;
|
||
|
display: -webkit-flex;
|
||
|
}
|
||
|
|
||
|
x-side-panel-container[expanded] > active-panel-container {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
border-left: 1px solid black;
|
||
|
display: -webkit-flex;
|
||
|
}
|
||
|
|
||
|
x-side-panel-container:not([expanded]) > active-panel-container {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
x-side-panel-container > tab-strip {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
-webkit-flex-direction: column;
|
||
|
-webkit-user-select: none;
|
||
|
background-color: rgb(236, 236, 236);
|
||
|
border-left: 1px solid black;
|
||
|
cursor: default;
|
||
|
display: -webkit-flex;
|
||
|
min-width: 18px; /* workaround for flexbox and writing-mode mixing bug */
|
||
|
padding: 10px 0 10px 0;
|
||
|
font-size: 12px;
|
||
|
}
|
||
|
|
||
|
x-side-panel-container > tab-strip > tab-strip-label {
|
||
|
-webkit-writing-mode: vertical-rl;
|
||
|
display: inline;
|
||
|
margin-right: 1px;
|
||
|
min-height: 20px;
|
||
|
padding: 15px 3px 15px 1px;
|
||
|
}
|
||
|
|
||
|
x-side-panel-container > tab-strip >
|
||
|
tab-strip-label:not([enabled]) {
|
||
|
color: rgb(128, 128, 128);
|
||
|
}
|
||
|
|
||
|
x-side-panel-container > tab-strip > tab-strip-label[selected] {
|
||
|
background-color: white;
|
||
|
border: 1px solid rgb(163, 163, 163);
|
||
|
border-left: none;
|
||
|
padding: 14px 2px 14px 1px;
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<style>
|
||
|
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||
|
* Use of this source code is governed by a BSD-style license that can be
|
||
|
* found in the LICENSE file.
|
||
|
*/
|
||
|
|
||
|
x-timeline-view {
|
||
|
-webkit-flex-direction: column;
|
||
|
cursor: default;
|
||
|
display: -webkit-flex;
|
||
|
font-family: sans-serif;
|
||
|
padding: 0;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > .title {
|
||
|
font-size: 14px;
|
||
|
height: 22px;
|
||
|
padding-left: 2px;
|
||
|
padding-right: 8px;
|
||
|
padding-top: 2px;
|
||
|
flex: 1 0 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control {
|
||
|
flex: 0 0 auto;
|
||
|
background-color: #e6e6e6;
|
||
|
background-image: -webkit-gradient(linear,
|
||
|
0 0,
|
||
|
0 100%,
|
||
|
from(#E5E5E5),
|
||
|
to(#D1D1D1));
|
||
|
border-bottom: 1px solid #8e8e8e;
|
||
|
display: flex;
|
||
|
padding-top: 1px;
|
||
|
overflow-x: auto;
|
||
|
}
|
||
|
x-timeline-view > .control::-webkit-scrollbar{
|
||
|
height: 0px;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > #right-controls {
|
||
|
margin-left: auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > .controls {
|
||
|
display: -webkit-flex;
|
||
|
flex: 0 0 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > span {
|
||
|
padding-left: 5px;
|
||
|
padding-right: 10px;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > .controls button,
|
||
|
x-timeline-view > .control > .controls label {
|
||
|
font-size: 14px;
|
||
|
height: 22px;
|
||
|
margin: 1px 2px 1px 2px;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > .control > .spacer {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > middle-container {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
-webkit-flex-direction: row;
|
||
|
border-bottom: 1px solid #8e8e8e;
|
||
|
display: -webkit-flex;
|
||
|
min-height: 0;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > middle-container > track-view-container {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
display: -webkit-flex;
|
||
|
min-height: 0;
|
||
|
min-width: 0;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > middle-container > track-view-container > * {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > middle-container > x-timeline-view-side-panel-container {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > x-drag-handle {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view > tracing-analysis-view {
|
||
|
-webkit-flex: 0 0 auto;
|
||
|
}
|
||
|
|
||
|
x-timeline-view .selection {
|
||
|
margin: 2px;
|
||
|
}
|
||
|
|
||
|
x-timeline-view .selection ul {
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
.button {
|
||
|
background-color: #f8f8f8;
|
||
|
border: 1px solid rgba(0, 0, 0, 0.5);
|
||
|
color: rgba(0,0,0,0.8);
|
||
|
font-size: 14px;
|
||
|
height: 19px;
|
||
|
margin: 1px;
|
||
|
min-width: 23px;
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
.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);
|
||
|
}
|
||
|
|
||
|
.view-info-button {
|
||
|
padding-left: 4px;
|
||
|
padding-right: 4px;
|
||
|
width: auto;
|
||
|
}
|
||
|
|
||
|
.view-info-button:hover {
|
||
|
border: solid 1px;
|
||
|
}
|
||
|
|
||
|
.metadata-dialog-text {
|
||
|
font-family: monospace;
|
||
|
overflow: auto;
|
||
|
white-space: pre;
|
||
|
}
|
||
|
|
||
|
.view-help-text {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
-webkit-flex-direction: row;
|
||
|
display: -webkit-flex;
|
||
|
width: 700px;
|
||
|
}
|
||
|
.view-help-text .column {
|
||
|
width: 50%;
|
||
|
}
|
||
|
.view-help-text h2 {
|
||
|
font-size: 1.2em;
|
||
|
margin: 0;
|
||
|
margin-top: 5px;
|
||
|
text-align: center;
|
||
|
}
|
||
|
.view-help-text h3 {
|
||
|
margin: 0;
|
||
|
margin-left: 126px;
|
||
|
margin-top: 10px;
|
||
|
}
|
||
|
.view-help-text .pair {
|
||
|
-webkit-flex: 1 1 auto;
|
||
|
-webkit-flex-direction: row;
|
||
|
display: -webkit-flex;
|
||
|
}
|
||
|
.view-help-text .command {
|
||
|
font-family: monospace;
|
||
|
margin-right: 5px;
|
||
|
text-align: right;
|
||
|
width: 150px;
|
||
|
}
|
||
|
.view-help-text .action {
|
||
|
font-size: 0.9em;
|
||
|
text-align: left;
|
||
|
width: 200px;
|
||
|
}
|
||
|
.view-help-text .mouse-mode-icon {
|
||
|
border: 1px solid #888;
|
||
|
border-radius: 3px;
|
||
|
box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
|
||
|
display: inline-block;
|
||
|
height: 26px;
|
||
|
margin-right: 1px;
|
||
|
position: relative;
|
||
|
top: 4px;
|
||
|
width: 27px;
|
||
|
zoom: 0.75;
|
||
|
}
|
||
|
.view-help-text .mouse-mode-icon.pan-mode {
|
||
|
background-position: -1px -11px;
|
||
|
}
|
||
|
.view-help-text .mouse-mode-icon.select-mode {
|
||
|
background-position: -1px -41px;
|
||
|
}
|
||
|
.view-help-text .mouse-mode-icon.zoom-mode {
|
||
|
background-position: -1px -71px;
|
||
|
}
|
||
|
.view-help-text .mouse-mode-icon.timing-mode {
|
||
|
background-position: -1px -101px;
|
||
|
}
|
||
|
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<template id="timeline-view-template">
|
||
|
<div class="control">
|
||
|
<div id="left-controls" class="controls"></div>
|
||
|
<div class="title">^_^</div>
|
||
|
<div id="right-controls" class="controls"></div>
|
||
|
</div>
|
||
|
<middle-container>
|
||
|
<track-view-container></track-view-container>
|
||
|
<x-side-panel-container></x-side-panel-container>
|
||
|
</middle-container>
|
||
|
<x-drag-handle></x-drag-handle>
|
||
|
<tracing-analysis-view id="analysis"></tracing-analysis-view>
|
||
|
</template>
|
||
|
<template id="help-btn-template">
|
||
|
<div class="button view-help-button">?</div>
|
||
|
<div class="view-help-text">
|
||
|
<div class="column left">
|
||
|
<h2>Navigation</h2>
|
||
|
<div class="pair">
|
||
|
<div class="command">w/s</div>
|
||
|
<div class="action">Zoom in/out (+shift: faster)</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">a/d</div>
|
||
|
<div class="action">Pan left/right (+shift: faster)</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">→/shift-TAB</div>
|
||
|
<div class="action">Select previous event</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">←/TAB</div>
|
||
|
<div class="action">Select next event</div>
|
||
|
</div>
|
||
|
<h2>Mouse Controls</h2>
|
||
|
<div class="pair">
|
||
|
<div class="command">click</div>
|
||
|
<div class="action">Select event</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">alt-mousewheel</div>
|
||
|
<div class="action">Zoom in/out</div>
|
||
|
</div>
|
||
|
<h3>
|
||
|
<span class="mouse-mode-icon select-mode"></span>
|
||
|
Select mode
|
||
|
</h3>
|
||
|
<div class="pair">
|
||
|
<div class="command">drag</div>
|
||
|
<div class="action">Box select</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">double click</div>
|
||
|
<div class="action">Select all events with same title</div>
|
||
|
</div>
|
||
|
<h3>
|
||
|
<span class="mouse-mode-icon pan-mode"></span>
|
||
|
Pan mode
|
||
|
</h3>
|
||
|
<div class="pair">
|
||
|
<div class="command">drag</div>
|
||
|
<div class="action">Pan the view</div>
|
||
|
</div>
|
||
|
<h3>
|
||
|
<span class="mouse-mode-icon zoom-mode"></span>
|
||
|
Zoom mode
|
||
|
</h3>
|
||
|
<div class="pair">
|
||
|
<div class="command">drag</div>
|
||
|
<div class="action">Zoom in/out by dragging up/down</div>
|
||
|
</div>
|
||
|
<h3>
|
||
|
<span class="mouse-mode-icon timing-mode"></span>
|
||
|
Timing mode
|
||
|
</h3>
|
||
|
<div class="pair">
|
||
|
<div class="command">drag</div>
|
||
|
<div class="action">Create or move markers</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">double click</div>
|
||
|
<div class="action">Set marker range to slice</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="column right">
|
||
|
<h2>General</h2>
|
||
|
<div class="pair">
|
||
|
<div class="command">1-4</div>
|
||
|
<div class="action">Switch mouse mode</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">shift</div>
|
||
|
<div class="action">Hold for temporary select</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">space</div>
|
||
|
<div class="action">Hold for temporary pan</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command"><span class="mod"></span></div>
|
||
|
<div class="action">Hold for temporary zoom</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">/</div>
|
||
|
<div class="action">Search</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">enter</div>
|
||
|
<div class="action">Step through search results</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">f</div>
|
||
|
<div class="action">Zoom into selection</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">z/0</div>
|
||
|
<div class="action">Reset zoom and pan</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">g/G</div>
|
||
|
<div class="action">Toggle 60hz grid</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">v</div>
|
||
|
<div class="action">Highlight VSync</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">h</div>
|
||
|
<div class="action">Toggle low/high details</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">m</div>
|
||
|
<div class="action">Mark current selection</div>
|
||
|
</div>
|
||
|
<div class="pair">
|
||
|
<div class="command">?</div>
|
||
|
<div class="action">Show help</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
<template id="metadata-btn-template">
|
||
|
<div class="button view-metadata-button view-info-button">Metadata</div>
|
||
|
<div class="info-button-text metadata-dialog-text"></div>
|
||
|
</template>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script>
|
||
|
|
||
|
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style license that can be
|
||
|
// found in the LICENSE file.
|
||
|
|
||
|
/* WARNING: This file is auto generated.
|
||
|
*
|
||
|
* Do not edit directly.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||
|
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||
|
* Code distributed by Google as part of the polymer project is also
|
||
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||
|
*/
|
||
|
// @version: 0.4.1
|
||
|
window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){var d,e;return a?(d=a.elementFromPoint(b,c),d?e=this.targetingShadow(d):a!==document&&(e=this.olderShadow(a)),this.searchRoot(e,b,c)||d):void 0},owner:function(a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document),b},findTarget:function(a){if(b&&a.path&&a.path.length)return a.path[0];var c=a.clientX,d=a.clientY,e=this.owner(a.target);return e.elementFromPoint(c,d)||(e=document),this.searchRoot(e,c,d)},findTouchAction:function(a){var c;if(b&&a.path&&a.path.length){for(var d=a.path,e=0;e<d.length;e++)if(c=d[e],c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action")}else for(c=a.target;c;){if(c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action");c=c.parentNode||c.host}return"auto"},LCA:function(a,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return document;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b;var c=this.depth(a),d=this.depth(b),e=c-d;for(e>=0?a=this.walk(a,e):b=this.walk(b,-e);a&&b&&a!==b;)a=a.parentNode||a.host,b=b.parentNode||b.host;return a},walk:function(a,b){for(var c=0;a&&b>c;c++)a=a.parentNode||a.host;return a},depth:function(a){for(var b=0;a;)b++,a=a.parentNode||a.host;return b},deepContains:function(a,b){var c=this.LCA(a,b);return c===a},insideNode:function(a,b,c){var d=a.getBoundingClientRect();return d.left<=b&&b<=d.right&&d.top<=c&&c<=d.bottom},path:function(a){var c;if(b&&a.path&&a.path.length)c=a.path;else{c=[];for(var d=this.findTarget(a);d;)c.push(d),d=d.parentNode||d.host}return c}};a.targetFinding=g,a.findTarget=g.findTarget.bind(g),a.deepContains=g.deepContains.bind(g),a.insideNode=g.insideNode}(window.PolymerGestures),function(){function a(a){return"html /deep/ "+b(a)}function b(a){return'[touch-action="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+";}"}var d=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]},"manipulation"],e="",f="string"==typeof document.head.style.touchAction,g=!window.ShadowDOMPolyfill&&document.head.createShadowRoot;if(f){d.forEach(function(d){String(d)===d?(e+=b(d)+c(d)+"\n",g&&(e+=a(d)+c(d)+"\n")):(e+=d.selectors.map(b)+c(d.rule)+"\n",g&&(e+=d.selectors.map(a)+c(d.rule)+"\n"))});var h=document.createElement("style");h.textContent=e,document.head.appendChild(h)}}(),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],d=function(){return function(){}},e={preventTap:d,makeBaseEvent:function(a,b){var c=document.createEvent("Event");return c.initEvent(a,b.bubbles||!1,b.cancelable||!1),c.preventTap=e.preventTap(c),c},makeGestureEvent:function(a,b){b=b||Object.create(null);for(var c,d=this.makeBaseEvent(a,b),e=0,f=Object.keys(b);e<f.length;e++)c=f[e],d[c]=b[c];return d},makePointerEvent:function(a,d){d=d||Object.create(null);for(var e,f=this.makeBaseEvent(a,d),g=0;g<b.length;g++)e=b[g],f[e]=d[e]||c[g];f.buttons=d.buttons||0;var h
|
||
|
a.push(this.property instanceof e?this.property.name:this.property.value),this.fullPath_=Path.get(a)}return this.fullPath_},valueFn:function(){if(!this.valueFn_){var a=this.object;if(this.simplePath){var b=this.fullPath;this.valueFn_=function(a,c){return c&&c.addPath(a,b),b.getValueFrom(a)}}else if(this.computed){var c=this.property;this.valueFn_=function(b,d,e){var f=a(b,d,e),g=c(b,d,e);return d&&d.addPath(f,[g]),f?f[g]:void 0}}else{var b=Path.get(this.property.name);this.valueFn_=function(c,d,e){var f=a(c,d,e);return d&&d.addPath(f,b),b.getValueFrom(f)}}}return this.valueFn_},setValue:function(a,b){if(this.simplePath)return this.fullPath.setValueFrom(a,b),b;var c=this.object(a),d=this.property instanceof e?this.property.name:this.property(a);return c[d]=b}},g.prototype={transform:function(a,b,c,d,e){var f=c[this.name],g=a;if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find function or filter: "+this.name);if(d?f=f.toModel:"function"==typeof f.toDOM&&(f=f.toDOM),"function"!=typeof f)return void console.error("Cannot find function or filter: "+this.name);for(var h=e||[],j=0;j<this.args.length;j++)h.push(i(this.args[j])(a,b,c));return f.apply(g,h)}};var r={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},s={"+":function(a,b){return a+b},"-":function(a,b){return a-b},"*":function(a,b){return a*b},"/":function(a,b){return a/b},"%":function(a,b){return a%b},"<":function(a,b){return b>a},">":function(a,b){return a>b},"<=":function(a,b){return b>=a},">=":function(a,b){return a>=b},"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"===":function(a,b){return a===b},"!==":function(a,b){return a!==b},"&&":function(a,b){return a&&b},"||":function(a,b){return a||b}};j.prototype={createUnaryExpression:function(a,b){if(!r[a])throw Error("Disallowed operator: "+a);return b=i(b),function(c,d,e){return r[a](b(c,d,e))}},createBinaryExpression:function(a,b,c){if(!s[a])throw Error("Disallowed operator: "+a);switch(b=i(b),c=i(c),a){case"||":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)||c(a,d,e)};case"&&":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)&&c(a,d,e)}}return function(d,e,f){return s[a](b(d,e,f),c(d,e,f))}},createConditionalExpression:function(a,b,c){return a=i(a),b=i(b),c=i(c),this.dynamicDeps=!0,function(d,e,f){return a(d,e,f)?b(d,e,f):c(d,e,f)}},createIdentifier:function(a){var b=new e(a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){var d=new f(b,c,a);return d.dynamicDeps&&(this.dynamicDeps=!0),d},createCallExpression:function(a,b){if(!(a instanceof e))throw Error("Only identifier function invocations are allowed");var c=new g(a.name,b);return function(a,b,d){return c.transform(a,b,d,!1)}},createLiteral:function(a){return new d(a.value)},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=i(a[b]);return function(b,c,d){for(var e=[],f=0;f<a.length;f++)e.push(a[f](b,c,d));return e}},createProperty:function(a,b,c){return{key:b instanceof e?b.name:b.value,value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].value=i(a[b].value);return function(b,c,d){for(var e={},f=0;f<a.length;f++)e[a[f].key]=a[f].value(b,c,d);return e}},createFilter:function(a,b){this.filters.push(new g(a,b))},createAsExpression:function(a,b){this.expression=a,this.scopeIdent=b},createInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexIdent=b},createTopLevel:function(a){this.expression=a},createThisExpression:h},k.prototype={open:function(){return this.value_},discardChanges:function(){return this.value_},deliver:function(){},close:function(){}},l.prototype={getBinding:function(a,b,c){function d(){if(h)return h=!1,g;i.dynamicDeps&&f.startReset();var c=i.getValue(a,i.dynamicDeps?f:void 0,b);return i.dynamicDeps&&f.finishReset(),c}function e(c){return i.setValue(a,c,b),c}if(c)return this.getValue(a,void 0,b);var f=new CompoundObserver,g=this.getValue(a,f,b),h=!0,i=this;return new ObserverTransform(f,d,e,!0)},getValue:function(a,b,c){for(var d=i(this.expression)(a,b,c),e=0;e<this.filters.
|
||
|
var b=z(a,a.delegate_&&a.delegate_.prepareBinding);w(a,b,a.model_)}),a.setModelFnScheduled_||(a.setModelFnScheduled_=!0,Observer.runEOM_(a.setModelFn_))}function s(a,b,c,d){if(a&&a.length){for(var e,f=a.length,g=0,h=0,i=0,j=!0;f>h;){var g=a.indexOf("{{",h),k=a.indexOf("[[",h),l=!1,m="}}";if(k>=0&&(0>g||g>k)&&(g=k,l=!0,m="]]"),i=0>g?-1:a.indexOf(m,g+2),0>i){if(!e)return;e.push(a.slice(h));break}e=e||[],e.push(a.slice(h,g));var n=a.slice(g+2,i).trim();e.push(l),j=j&&l;var o=d&&d(n,b,c);e.push(null==o?Path.get(n):null),e.push(o),h=i+2}return h===f&&e.push(""),e.hasOnePath=5===e.length,e.isSimplePath=e.hasOnePath&&""==e[0]&&""==e[4],e.onlyOneTime=j,e.combinator=function(a){for(var b=e[0],c=1;c<e.length;c+=4){var d=e.hasOnePath?a:a[(c-1)/4];void 0!==d&&(b+=d),b+=e[c+3]}return b},e}}function t(a,b,c,d){if(b.hasOnePath){var e=b[3],f=e?e(d,c,!0):b[2].getValueFrom(d);return b.isSimplePath?f:b.combinator(f)}for(var g=[],h=1;h<b.length;h+=4){var e=b[h+2];g[(h-1)/4]=e?e(d,c):b[h+1].getValueFrom(d)}return b.combinator(g)}function u(a,b,c,d){var e=b[3],f=e?e(d,c,!1):new PathObserver(d,b[2]);return b.isSimplePath?f:new ObserverTransform(f,b.combinator)}function v(a,b,c,d){if(b.onlyOneTime)return t(a,b,c,d);if(b.hasOnePath)return u(a,b,c,d);for(var e=new CompoundObserver,f=1;f<b.length;f+=4){var g=b[f],h=b[f+2];if(h){var i=h(d,c,g);g?e.addPath(i):e.addObserver(i)}else{var j=b[f+1];g?e.addPath(j.getValueFrom(d)):e.addPath(d,j)}}return new ObserverTransform(e,b.combinator)}function w(a,b,c,d){for(var e=0;e<b.length;e+=2){var f=b[e],g=b[e+1],h=v(f,g,a,c),i=a.bind(f,h,g.onlyOneTime);i&&d&&d.push(i)}if(a.bindFinished(),b.isTemplate){a.model_=c;var j=a.processBindingDirectives_(b);d&&j&&d.push(j)}}function x(a,b,c){var d=a.getAttribute(b);return s(""==d?"{{}}":d,b,a,c)}function y(a,c){b(a);for(var d=[],e=0;e<a.attributes.length;e++){for(var f=a.attributes[e],g=f.name,i=f.value;"_"===g[0];)g=g.substring(1);if(!h(a)||g!==J&&g!==H&&g!==I){var j=s(i,g,a,c);j&&d.push(g,j)}}return h(a)&&(d.isTemplate=!0,d.if=x(a,J,c),d.bind=x(a,H,c),d.repeat=x(a,I,c),!d.if||d.bind||d.repeat||(d.bind=s("{{}}",H,a,c))),d}function z(a,b){if(a.nodeType===Node.ELEMENT_NODE)return y(a,b);if(a.nodeType===Node.TEXT_NODE){var c=s(a.data,"textContent",a,b);if(c)return["textContent",c]}return[]}function A(a,b,c,d,e,f,g){for(var h=b.appendChild(c.importNode(a,!1)),i=0,j=a.firstChild;j;j=j.nextSibling)A(j,h,c,d.children[i++],e,f,g);return d.isTemplate&&(HTMLTemplateElement.decorate(h,a),f&&h.setDelegate_(f)),w(h,d,e,g),h}function B(a,b){var c=z(a,b);c.children={};for(var d=0,e=a.firstChild;e;e=e.nextSibling)c.children[d++]=B(e,b);return c}function C(a){var b=a.id_;return b||(b=a.id_=S++),b}function D(a,b){var c=C(a);if(b){var d=b.bindingMaps[c];return d||(d=b.bindingMaps[c]=B(a,b.prepareBinding)||[]),d}var d=a.bindingMap_;return d||(d=a.bindingMap_=B(a,void 0)||[]),d}function E(a){this.closed=!1,this.templateElement_=a,this.instances=[],this.deps=void 0,this.iteratedValue=[],this.presentValue=void 0,this.arrayObserver=void 0}var F,G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.Map&&"function"==typeof a.Map.prototype.forEach?F=a.Map:(F=function(){this.keys=[],this.values=[]},F.prototype={set:function(a,b){var c=this.keys.indexOf(a);0>c?(this.keys.push(a),this.values.push(b)):this.values[c]=b},get:function(a){var b=this.keys.indexOf(a);if(!(0>b))return this.values[b]},"delete":function(a){var b=this.keys.indexOf(a);return 0>b?!1:(this.keys.splice(b,1),this.values.splice(b,1),!0)},forEach:function(a,b){for(var c=0;c<this.keys.length;c++)a.call(b||this,this.values[c],this.keys[c],this)}});"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var H="bind",I="repeat",J="if",K={template:!0,repeat:!0,bind:!0,ref:!0},L={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},M="undefined"!=typeof HTMLTemplateElement;M&&!function(){var a=document.createElement("template"),b=a.content.ownerDocument,c=b.appendChild(b.createElement("h
|
||
|
return c[b]},styleCacheForScope:function(a){if(d){var b=a.host?a.host.localName:a.localName;return h[b]||(h[b]={})}return a._scopeStyles=a._scopeStyles||{}}},h={};a.api.instance.styles=g}(Polymer),function(a){function b(a,b){if("string"!=typeof a){var c=b||document._currentScript;if(b=a,a=c&&c.parentNode&&c.parentNode.getAttribute?c.parentNode.getAttribute("name"):"",!a)throw"Element name could not be inferred."}if(f[a])throw"Already registered (Polymer) prototype for element "+a;e(a,b),d(a)}function c(a,b){i[a]=b}function d(a){i[a]&&(i[a].registerWhenReady(),delete i[a])}function e(a,b){return j[a]=b||{}}function f(a){return j[a]}function g(a,b){if("string"!=typeof b)return!1;var c=HTMLElement.getPrototypeForTag(b),d=c&&c.constructor;return d?CustomElements.instanceof?CustomElements.instanceof(a,d):a instanceof d:!1}var h=a.extend,i=(a.api,{}),j={};a.getRegisteredPrototype=f,a.waitingForPrototype=c,a.instanceOfType=g,window.Polymer=b,h(Polymer,a),Platform.consumeDeclarations&&Platform.consumeDeclarations(function(a){if(a)for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)b.apply(null,c)})}(Polymer),function(a){var b={resolveElementPaths:function(a){Polymer.urlResolver.resolveDom(a)},addResolvePathApi:function(){var a=this.getAttribute("assetpath")||"",b=new URL(a,this.ownerDocument.baseURI);this.prototype.resolvePath=function(a,c){var d=new URL(a,c||b);return d.href}}};a.api.declaration.path=b}(Polymer),function(a){function b(a,b){var c=new URL(a.getAttribute("href"),b).href;return"@import '"+c+"';"}function c(a,b){if(a){b===document&&(b=document.head),i&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttribute(h,e);var f=b.firstElementChild;if(b===document.head){var g="style["+h+"]",j=document.head.querySelectorAll(g);j.length&&(f=j[j.length-1].nextElementSibling)}b.insertBefore(c,f)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerDocument;var c=b.createElement("style");return c.textContent=a,c}function e(a){return a&&a.__resource||""}function f(a,b){return q?q.call(a,b):void 0}var g=(window.logFlags||{},a.api.instance.styles),h=g.STYLE_SCOPE_ATTRIBUTE,i=window.ShadowDOMPolyfill,j="style",k="@import",l="link[rel=stylesheet]",m="global",n="polymer-scope",o={loadStyles:function(a){var b=this.fetchTemplate(),c=b&&this.templateContent();if(c){this.convertSheetsToStyles(c);var d=this.findLoadableStyles(c);if(d.length){var e=b.ownerDocument.baseURI;return Polymer.styleResolver.loadStyles(d,e,a)}}a&&a()},convertSheetsToStyles:function(a){for(var c,e,f=a.querySelectorAll(l),g=0,h=f.length;h>g&&(c=f[g]);g++)e=d(b(c,this.ownerDocument.baseURI),this.ownerDocument),this.copySheetAttributes(e,c),c.parentNode.replaceChild(e,c)},copySheetAttributes:function(a,b){for(var c,d=0,e=b.attributes,f=e.length;(c=e[d])&&f>d;d++)"rel"!==c.name&&"href"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:function(a){var b=[];if(a)for(var c,d=a.querySelectorAll(j),e=0,f=d.length;f>e&&(c=d[e]);e++)c.textContent.match(k)&&b.push(c);return b},installSheets:function(){this.cacheSheets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:function(){this.sheets=this.findNodes(l),this.sheets.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function(){this.styles=this.findNodes(j+"["+n+"]"),this.styles.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},installLocalSheets:function(){var a=this.sheets.filter(function(a){return!a.hasAttribute(n)}),b=this.templateContent();if(b){var c="";if(a.forEach(function(a){c+=e(a)+"\n"}),c){var f=d(c,this.ownerDocument);b.insertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.querySelectorAll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a).array();c=c.concat(e)}return b?c.filter(b):c},installGlobalStyles:function(){var a=this.styleForScope(m);c(a,document.head)},cssTextForScope:function(a){var b="",c="["+n+"="+a+"]",d=function(a){return f(a,c)},g=this.sheets.filter(d);g.forEach(function(a){b+=e(a)+"\n\n"});var h=this.styles.filter(d);return h.forEach(function(a){b+=a.textConten
|
||
|
//# sourceMappingURL=polymer.js.map
|
||
|
window._TV_IS_COMPILED = true;
|
||
|
var global=this;
|
||
|
this.tv=function(){function d(){if(!b){var a=document.createElement("div");a.style.backgroundColor="white";a.style.border="3px solid red";a.style.boxSizing="border-box";a.style.color="black";a.style.display="-webkit-flex";a.style.height="100%";a.style.left=0;a.style.padding="8px";a.style.position="fixed";a.style.top=0;a.style.webkitFlexDirection="column";a.style.width="100%";b=document.createElement("div");b.style.webkitFlex="1 1 auto";b.style.overflow="auto";a.appendChild(b);document.body?document.body.appendChild(a):
|
||
|
setTimeout(function(){document.body.appendChild(a)},150)}}function c(f,e){e instanceof Error&&(e=e.stack);d();var c=document.createElement("div");c.innerHTML='<h2 id="message"></h2><pre id="details"></pre>';c.querySelector("#message").textContent=f;c.querySelector("#details").textContent=e;b.appendChild(c);a.push({title:f,details:e})}if(window.tv)return console.warn("Base was multiply initialized. First init wins."),window.tv;var b=void 0,a=[];return{initialize:function(){if(!window._TRACE_VIEWER_IS_COMPILED){var a=
|
||
|
parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1],10),e=window.navigator.appVersion.match("77.34.5");36>a&&!e&&c("Invalid Chrome version","A Chrome version of 36 or higher is required for trace-viewer development. Please upgrade your version of Chrome and try again.")}tv.doc=document;tv.isMac=/Mac/.test(navigator.platform);tv.isWindows=/Win/.test(navigator.platform);tv.isChromeOS=/CrOS/.test(navigator.userAgent);tv.isLinux=/Linux/.test(navigator.userAgent)},exportTo:function(a,e){var b;
|
||
|
b=a.split(".");for(var c=global,d;b.length&&(d=b.shift());)c=d in c?c[d]:c[d]={};b=c;var c=e(),l;for(l in c)(d=Object.getOwnPropertyDescriptor(c,l))&&Object.defineProperty(b,l,d)},isDefined:function(a,e){for(var b=a.split("."),c=e||global,d=0;d<b.length;d++)if(c=c[b[d]],void 0===c)return!1;return!0},showPanic:c,hasPanic:function(){return 0!==a.length},getPanicText:function(){return a.map(function(a){return a.title}).join(", ")}}}();tv.initialize();"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){return{decorate:function(d,c){var b;b="string"==typeof d?tv.doc.querySelectorAll(d):[d];for(var a=0,f;f=b[a];a++)f instanceof c||c.decorate(f)},define:function(d,c,b){function a(){if(c&&a.prototype.__proto__!=c.prototype)throw Error(d+" prototye's __proto__ field is messed up. It MUST be the prototype of "+c.tagName);var b;b=void 0===e?tv.doc.createElement(f):tv.doc.createElementNS(e,f);a.decorate.call(this,b,arguments);return b}if("function"==typeof d)throw Error("Passing functions as className is deprecated. Please use (className, opt_parentConstructor) to subclass");
|
||
|
d=d.toLowerCase();if(c&&!c.tagName)throw Error("opt_parentConstructor was not created by tv.b.ui.define");var f=d,e=void 0;if(c){if(b)throw Error("Must not specify tagNS if parentConstructor is given");for(b=c;b&&b.tagName;)f=b.tagName,e=b.tagNS,b=b.parentConstructor}else e=b;a.decorate=function(e,f){e.__proto__=a.prototype;e.decorate.apply(e,f);e.constructor=a};a.className=d;a.tagName=f;a.tagNS=e;a.parentConstructor=c?c:void 0;a.toString=function(){return a.parentConstructor?a.parentConstructor.toString()+
|
||
|
"::"+a.className:a.tagName};return a},elementIsChildOf:function(d,c){if(d==c)return!1;for(var b=d;b.parentNode;){if(b==c)return!0;b=b.parentNode}return!1}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(a,f){if(a instanceof Object)if(a instanceof Array)for(var e=0;e<a.length;e++)f(a,e,a[e]),d(a[e],f);else for(e in a){var b=a[e];f(a,e,b);d(b,f)}}function c(a){return a}function b(a,b,e){b=b||c;for(var g=0;g<a.length;g++)if(b.call(e,a[g],g))return g;return-1}return{asArray:function(a){for(var b=[],e=0;e<a.length;e++)b.push(a[e]);return b},concatenateArrays:function(){for(var a=[],b=0;b<arguments.length;b++){if(!(arguments[b]instanceof Array))throw Error("Arguments "+
|
||
|
b+"is not an array");a.push.apply(a,arguments[b])}return a},concatenateObjects:function(){for(var a={},b=0;b<arguments.length;b++){var e=arguments[b],c;for(c in e)a[c]=e[c]}return a},compareArrays:function(a,b,e){for(var c=Math.min(a.length,b.length),h=0;h<c;h++){var d=e(a[h],b[h]);if(d)return d}return a.length==b.length?0:void 0===a[h]?-1:1},comparePossiblyUndefinedValues:function(a,b,e){return void 0!==a&&void 0!==b?e(a,b):void 0!==a?-1:void 0!==b?1:0},dictionaryLength:function(a){var b=0,e;for(e in a)b++;
|
||
|
return b},dictionaryKeys:function(a){var b=[],e;for(e in a)b.push(e);return b},dictionaryValues:function(a){var b=[],e;for(e in a)b.push(a[e]);return b},iterItems:function(a,b,e){e=e||this;for(var c in a)b.call(e,c,a[c])},iterObjectFieldsRecursively:d,findFirstIndexInArray:b,findFirstInArray:function(a,f,e){f=b(a,f,f);return-1===f?void 0:a[f]}}});
|
||
|
(function(){var d;"undefined"==typeof exports?"function"==typeof define&&"object"==typeof define.amd&&define.amd?(d={},define(function(){return d})):d=window:d=exports;(function(c){if(!b)var b=1E-6;if(!a)var a="undefined"!=typeof Float32Array?Float32Array:Array;var f={setMatrixArrayType:function(l){a=l}};"undefined"!=typeof c&&(c.glMatrix=f);var e={create:function(){var l=new a(2);return l[0]=0,l[1]=0,l},clone:function(l){var b=new a(2);return b[0]=l[0],b[1]=l[1],b},fromValues:function(l,b){var e=
|
||
|
new a(2);return e[0]=l,e[1]=b,e},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a},set:function(a,b,e){return a[0]=b,a[1]=e,a},add:function(a,b,e){return a[0]=b[0]+e[0],a[1]=b[1]+e[1],a},subtract:function(a,b,e){return a[0]=b[0]-e[0],a[1]=b[1]-e[1],a}};e.sub=e.subtract;e.multiply=function(a,b,e){return a[0]=b[0]*e[0],a[1]=b[1]*e[1],a};e.mul=e.multiply;e.divide=function(a,b,e){return a[0]=b[0]/e[0],a[1]=b[1]/e[1],a};e.div=e.divide;e.min=function(a,b,e){return a[0]=Math.min(b[0],e[0]),a[1]=Math.min(b[1],
|
||
|
e[1]),a};e.max=function(a,b,e){return a[0]=Math.max(b[0],e[0]),a[1]=Math.max(b[1],e[1]),a};e.scale=function(a,b,e){return a[0]=b[0]*e,a[1]=b[1]*e,a};e.distance=function(a,b){var e=b[0]-a[0],f=b[1]-a[1];return Math.sqrt(e*e+f*f)};e.dist=e.distance;e.squaredDistance=function(a,b){var e=b[0]-a[0],f=b[1]-a[1];return e*e+f*f};e.sqrDist=e.squaredDistance;e.length=function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)};e.len=e.length;e.squaredLength=function(a){var b=a[0];a=a[1];return b*b+a*a};e.sqrLen=
|
||
|
e.squaredLength;e.negate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a};e.normalize=function(a,b){var e=b[0],f=b[1],e=e*e+f*f;return 0<e&&(e=1/Math.sqrt(e),a[0]=b[0]*e,a[1]=b[1]*e),a};e.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]};e.cross=function(a,b,e){b=b[0]*e[1]-b[1]*e[0];return a[0]=a[1]=0,a[2]=b,a};e.lerp=function(a,b,e,f){var c=b[0];b=b[1];return a[0]=c+f*(e[0]-c),a[1]=b+f*(e[1]-b),a};e.transformMat2=function(a,b,e){var f=b[0];b=b[1];return a[0]=e[0]*f+e[2]*b,a[1]=e[1]*f+e[3]*b,a};e.transformMat2d=
|
||
|
function(a,b,e){var f=b[0];b=b[1];return a[0]=e[0]*f+e[2]*b+e[4],a[1]=e[1]*f+e[3]*b+e[5],a};e.transformMat3=function(a,b,e){var f=b[0];b=b[1];return a[0]=e[0]*f+e[3]*b+e[6],a[1]=e[1]*f+e[4]*b+e[7],a};e.transformMat4=function(a,b,e){var f=b[0];b=b[1];return a[0]=e[0]*f+e[4]*b+e[12],a[1]=e[1]*f+e[5]*b+e[13],a};e.forEach=function(){var a=e.create();return function(b,e,f,c,g,d){var h;e||(e=2);f||(f=0);for(c?h=Math.min(c*e+f,b.length):h=b.length;f<h;f+=e)a[0]=b[f],a[1]=b[f+1],g(a,a,d),b[f]=a[0],b[f+1]=
|
||
|
a[1];return b}}();e.str=function(a){return"vec2("+a[0]+", "+a[1]+")"};"undefined"!=typeof c&&(c.vec2=e);var g={create:function(){var b=new a(3);return b[0]=0,b[1]=0,b[2]=0,b},clone:function(b){var e=new a(3);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e},fromValues:function(b,e,f){var c=new a(3);return c[0]=b,c[1]=e,c[2]=f,c},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a},set:function(a,b,e,f){return a[0]=b,a[1]=e,a[2]=f,a},add:function(a,b,e){return a[0]=b[0]+e[0],a[1]=b[1]+e[1],a[2]=b[2]+e[2],
|
||
|
a},subtract:function(a,b,e){return a[0]=b[0]-e[0],a[1]=b[1]-e[1],a[2]=b[2]-e[2],a}};g.sub=g.subtract;g.multiply=function(a,b,e){return a[0]=b[0]*e[0],a[1]=b[1]*e[1],a[2]=b[2]*e[2],a};g.mul=g.multiply;g.divide=function(a,b,e){return a[0]=b[0]/e[0],a[1]=b[1]/e[1],a[2]=b[2]/e[2],a};g.div=g.divide;g.min=function(a,b,e){return a[0]=Math.min(b[0],e[0]),a[1]=Math.min(b[1],e[1]),a[2]=Math.min(b[2],e[2]),a};g.max=function(a,b,e){return a[0]=Math.max(b[0],e[0]),a[1]=Math.max(b[1],e[1]),a[2]=Math.max(b[2],e[2]),
|
||
|
a};g.scale=function(a,b,e){return a[0]=b[0]*e,a[1]=b[1]*e,a[2]=b[2]*e,a};g.distance=function(a,b){var e=b[0]-a[0],f=b[1]-a[1],c=b[2]-a[2];return Math.sqrt(e*e+f*f+c*c)};g.dist=g.distance;g.squaredDistance=function(a,b){var e=b[0]-a[0],f=b[1]-a[1],c=b[2]-a[2];return e*e+f*f+c*c};g.sqrDist=g.squaredDistance;g.length=function(a){var b=a[0],e=a[1];a=a[2];return Math.sqrt(b*b+e*e+a*a)};g.len=g.length;g.squaredLength=function(a){var b=a[0],e=a[1];a=a[2];return b*b+e*e+a*a};g.sqrLen=g.squaredLength;g.negate=
|
||
|
function(a,b){return a[0]=-b[0],a[1]=-b[1],a[2]=-b[2],a};g.normalize=function(a,b){var e=b[0],f=b[1],c=b[2],e=e*e+f*f+c*c;return 0<e&&(e=1/Math.sqrt(e),a[0]=b[0]*e,a[1]=b[1]*e,a[2]=b[2]*e),a};g.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]};g.cross=function(a,b,e){var f=b[0],c=b[1];b=b[2];var g=e[0],d=e[1];e=e[2];return a[0]=c*e-b*d,a[1]=b*g-f*e,a[2]=f*d-c*g,a};g.lerp=function(a,b,e,f){var c=b[0],g=b[1];b=b[2];return a[0]=c+f*(e[0]-c),a[1]=g+f*(e[1]-g),a[2]=b+f*(e[2]-b),a};g.transformMat4=
|
||
|
function(a,b,e){var f=b[0],c=b[1];b=b[2];return a[0]=e[0]*f+e[4]*c+e[8]*b+e[12],a[1]=e[1]*f+e[5]*c+e[9]*b+e[13],a[2]=e[2]*f+e[6]*c+e[10]*b+e[14],a};g.transformQuat=function(a,b,e){var f=b[0],c=b[1],g=b[2];b=e[0];var d=e[1],h=e[2];e=e[3];var k=e*f+d*g-h*c,p=e*c+h*f-b*g,r=e*g+b*c-d*f,f=-b*f-d*c-h*g;return a[0]=k*e+f*-b+p*-h-r*-d,a[1]=p*e+f*-d+r*-b-k*-h,a[2]=r*e+f*-h+k*-d-p*-b,a};g.forEach=function(){var a=g.create();return function(b,e,f,c,g,d){var h;e||(e=3);f||(f=0);for(c?h=Math.min(c*e+f,b.length):
|
||
|
h=b.length;f<h;f+=e)a[0]=b[f],a[1]=b[f+1],a[2]=b[f+2],g(a,a,d),b[f]=a[0],b[f+1]=a[1],b[f+2]=a[2];return b}}();g.str=function(a){return"vec3("+a[0]+", "+a[1]+", "+a[2]+")"};"undefined"!=typeof c&&(c.vec3=g);var h={create:function(){var b=new a(4);return b[0]=0,b[1]=0,b[2]=0,b[3]=0,b},clone:function(b){var e=new a(4);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e},fromValues:function(b,e,f,c){var g=new a(4);return g[0]=b,g[1]=e,g[2]=f,g[3]=c,g},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],
|
||
|
a[3]=b[3],a},set:function(a,b,e,f,c){return a[0]=b,a[1]=e,a[2]=f,a[3]=c,a},add:function(a,b,e){return a[0]=b[0]+e[0],a[1]=b[1]+e[1],a[2]=b[2]+e[2],a[3]=b[3]+e[3],a},subtract:function(a,b,e){return a[0]=b[0]-e[0],a[1]=b[1]-e[1],a[2]=b[2]-e[2],a[3]=b[3]-e[3],a}};h.sub=h.subtract;h.multiply=function(a,b,e){return a[0]=b[0]*e[0],a[1]=b[1]*e[1],a[2]=b[2]*e[2],a[3]=b[3]*e[3],a};h.mul=h.multiply;h.divide=function(a,b,e){return a[0]=b[0]/e[0],a[1]=b[1]/e[1],a[2]=b[2]/e[2],a[3]=b[3]/e[3],a};h.div=h.divide;
|
||
|
h.min=function(a,b,e){return a[0]=Math.min(b[0],e[0]),a[1]=Math.min(b[1],e[1]),a[2]=Math.min(b[2],e[2]),a[3]=Math.min(b[3],e[3]),a};h.max=function(a,b,e){return a[0]=Math.max(b[0],e[0]),a[1]=Math.max(b[1],e[1]),a[2]=Math.max(b[2],e[2]),a[3]=Math.max(b[3],e[3]),a};h.scale=function(a,b,e){return a[0]=b[0]*e,a[1]=b[1]*e,a[2]=b[2]*e,a[3]=b[3]*e,a};h.distance=function(a,b){var e=b[0]-a[0],f=b[1]-a[1],c=b[2]-a[2],g=b[3]-a[3];return Math.sqrt(e*e+f*f+c*c+g*g)};h.dist=h.distance;h.squaredDistance=function(a,
|
||
|
b){var e=b[0]-a[0],f=b[1]-a[1],c=b[2]-a[2],g=b[3]-a[3];return e*e+f*f+c*c+g*g};h.sqrDist=h.squaredDistance;h.length=function(a){var b=a[0],e=a[1],f=a[2];a=a[3];return Math.sqrt(b*b+e*e+f*f+a*a)};h.len=h.length;h.squaredLength=function(a){var b=a[0],e=a[1],f=a[2];a=a[3];return b*b+e*e+f*f+a*a};h.sqrLen=h.squaredLength;h.negate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a[2]=-b[2],a[3]=-b[3],a};h.normalize=function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],e=e*e+f*f+c*c+g*g;return 0<e&&(e=1/Math.sqrt(e),
|
||
|
a[0]=b[0]*e,a[1]=b[1]*e,a[2]=b[2]*e,a[3]=b[3]*e),a};h.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};h.lerp=function(a,b,e,f){var c=b[0],g=b[1],d=b[2];b=b[3];return a[0]=c+f*(e[0]-c),a[1]=g+f*(e[1]-g),a[2]=d+f*(e[2]-d),a[3]=b+f*(e[3]-b),a};h.transformMat4=function(a,b,e){var f=b[0],c=b[1],g=b[2];b=b[3];return a[0]=e[0]*f+e[4]*c+e[8]*g+e[12]*b,a[1]=e[1]*f+e[5]*c+e[9]*g+e[13]*b,a[2]=e[2]*f+e[6]*c+e[10]*g+e[14]*b,a[3]=e[3]*f+e[7]*c+e[11]*g+e[15]*b,a};h.transformQuat=function(a,b,e){var f=
|
||
|
b[0],c=b[1],g=b[2];b=e[0];var d=e[1],h=e[2];e=e[3];var k=e*f+d*g-h*c,p=e*c+h*f-b*g,r=e*g+b*c-d*f,f=-b*f-d*c-h*g;return a[0]=k*e+f*-b+p*-h-r*-d,a[1]=p*e+f*-d+r*-b-k*-h,a[2]=r*e+f*-h+k*-d-p*-b,a};h.forEach=function(){var a=h.create();return function(b,e,f,c,g,d){var h;e||(e=4);f||(f=0);for(c?h=Math.min(c*e+f,b.length):h=b.length;f<h;f+=e)a[0]=b[f],a[1]=b[f+1],a[2]=b[f+2],a[3]=b[f+3],g(a,a,d),b[f]=a[0],b[f+1]=a[1],b[f+2]=a[2],b[f+3]=a[3];return b}}();h.str=function(a){return"vec4("+a[0]+", "+a[1]+", "+
|
||
|
a[2]+", "+a[3]+")"};"undefined"!=typeof c&&(c.vec4=h);f={create:function(){var b=new a(4);return b[0]=1,b[1]=0,b[2]=0,b[3]=1,b},clone:function(b){var e=new a(4);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a},identity:function(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=1,a},transpose:function(a,b){if(a===b){var e=b[1];a[1]=b[2];a[2]=e}else a[0]=b[0],a[1]=b[2],a[2]=b[1],a[3]=b[3];return a},invert:function(a,b){var e=b[0],f=b[1],c=b[2],
|
||
|
g=b[3],d=e*g-c*f;return d?(d=1/d,a[0]=g*d,a[1]=-f*d,a[2]=-c*d,a[3]=e*d,a):null},adjoint:function(a,b){var e=b[0];return a[0]=b[3],a[1]=-b[1],a[2]=-b[2],a[3]=e,a},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},multiply:function(a,b,e){var f=b[0],c=b[1],g=b[2];b=b[3];var d=e[0],h=e[1],k=e[2];e=e[3];return a[0]=f*d+c*k,a[1]=f*h+c*e,a[2]=g*d+b*k,a[3]=g*h+b*e,a}};f.mul=f.multiply;f.rotate=function(a,b,e){var f=b[0],c=b[1],g=b[2];b=b[3];var d=Math.sin(e);e=Math.cos(e);return a[0]=f*e+c*d,a[1]=f*-d+
|
||
|
c*e,a[2]=g*e+b*d,a[3]=g*-d+b*e,a};f.scale=function(a,b,e){var f=b[1],c=b[2],g=b[3],d=e[0];e=e[1];return a[0]=b[0]*d,a[1]=f*e,a[2]=c*d,a[3]=g*e,a};f.str=function(a){return"mat2("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"};"undefined"!=typeof c&&(c.mat2=f);f={create:function(){var b=new a(6);return b[0]=1,b[1]=0,b[2]=0,b[3]=1,b[4]=0,b[5]=0,b},clone:function(b){var e=new a(6);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e[4]=b[4],e[5]=b[5],e},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=
|
||
|
b[3],a[4]=b[4],a[5]=b[5],a},identity:function(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=1,a[4]=0,a[5]=0,a},invert:function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=b[4],h=b[5],k=e*g-f*c;return k?(k=1/k,a[0]=g*k,a[1]=-f*k,a[2]=-c*k,a[3]=e*k,a[4]=(c*h-g*d)*k,a[5]=(f*d-e*h)*k,a):null},determinant:function(a){return a[0]*a[3]-a[1]*a[2]},multiply:function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4];b=b[5];var k=e[0],p=e[1],r=e[2],t=e[3],w=e[4];e=e[5];return a[0]=f*k+c*r,a[1]=f*p+c*t,a[2]=g*k+d*r,a[3]=g*p+d*
|
||
|
t,a[4]=k*h+r*b+w,a[5]=p*h+t*b+e,a}};f.mul=f.multiply;f.rotate=function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4];b=b[5];var k=Math.sin(e);e=Math.cos(e);return a[0]=f*e+c*k,a[1]=-f*k+c*e,a[2]=g*e+d*k,a[3]=-g*k+e*d,a[4]=e*h+k*b,a[5]=e*b-k*h,a};f.scale=function(a,b,e){var f=e[0];e=e[1];return a[0]=b[0]*f,a[1]=b[1]*e,a[2]=b[2]*f,a[3]=b[3]*e,a[4]=b[4]*f,a[5]=b[5]*e,a};f.translate=function(a,b,e){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4]+e[0],a[5]=b[5]+e[1],a};f.str=function(a){return"mat2d("+
|
||
|
a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"};"undefined"!=typeof c&&(c.mat2d=f);f={create:function(){var b=new a(9);return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=1,b[5]=0,b[6]=0,b[7]=0,b[8]=1,b},fromMat4:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[4],a[4]=b[5],a[5]=b[6],a[6]=b[8],a[7]=b[9],a[8]=b[10],a},clone:function(b){var e=new a(9);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e[4]=b[4],e[5]=b[5],e[6]=b[6],e[7]=b[7],e[8]=b[8],e},copy:function(a,b){return a[0]=b[0],a[1]=
|
||
|
b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4],a[5]=b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8],a},identity:function(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},transpose:function(a,b){if(a===b){var e=b[1],f=b[2],c=b[5];a[1]=b[3];a[2]=b[6];a[3]=e;a[5]=b[7];a[6]=f;a[7]=c}else a[0]=b[0],a[1]=b[3],a[2]=b[6],a[3]=b[1],a[4]=b[4],a[5]=b[7],a[6]=b[2],a[7]=b[5],a[8]=b[8];return a},invert:function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=b[4],h=b[5],k=b[6],p=b[7],r=b[8],t=r*d-h*p,w=-r*g+h*k,x=p*g-
|
||
|
d*k,A=e*t+f*w+c*x;return A?(A=1/A,a[0]=t*A,a[1]=(-r*f+c*p)*A,a[2]=(h*f-c*d)*A,a[3]=w*A,a[4]=(r*e-c*k)*A,a[5]=(-h*e+c*g)*A,a[6]=x*A,a[7]=(-p*e+f*k)*A,a[8]=(d*e-f*g)*A,a):null},adjoint:function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=b[4],h=b[5],k=b[6],p=b[7],r=b[8];return a[0]=d*r-h*p,a[1]=c*p-f*r,a[2]=f*h-c*d,a[3]=h*k-g*r,a[4]=e*r-c*k,a[5]=c*g-e*h,a[6]=g*p-d*k,a[7]=f*k-e*p,a[8]=e*d-f*g,a},determinant:function(a){var b=a[3],e=a[4],f=a[5],c=a[6],g=a[7],d=a[8];return a[0]*(d*e-f*g)+a[1]*(-d*b+f*c)+a[2]*
|
||
|
(g*b-e*c)},multiply:function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4],k=b[5],p=b[6],r=b[7];b=b[8];var t=e[0],w=e[1],x=e[2],A=e[3],z=e[4],B=e[5],D=e[6],F=e[7];e=e[8];return a[0]=t*f+w*d+x*p,a[1]=t*c+w*h+x*r,a[2]=t*g+w*k+x*b,a[3]=A*f+z*d+B*p,a[4]=A*c+z*h+B*r,a[5]=A*g+z*k+B*b,a[6]=D*f+F*d+e*p,a[7]=D*c+F*h+e*r,a[8]=D*g+F*k+e*b,a}};f.mul=f.multiply;f.translate=function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4],k=b[5],p=b[6],r=b[7];b=b[8];var t=e[0];e=e[1];return a[0]=f,a[1]=c,a[2]=g,a[3]=d,a[4]=
|
||
|
h,a[5]=k,a[6]=t*f+e*d+p,a[7]=t*c+e*h+r,a[8]=t*g+e*k+b,a};f.rotate=function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4],k=b[5],p=b[6],r=b[7];b=b[8];var t=Math.sin(e);e=Math.cos(e);return a[0]=e*f+t*d,a[1]=e*c+t*h,a[2]=e*g+t*k,a[3]=e*d-t*f,a[4]=e*h-t*c,a[5]=e*k-t*g,a[6]=p,a[7]=r,a[8]=b,a};f.scale=function(a,b,e){var f=e[0];e=e[2];return a[0]=f*b[0],a[1]=f*b[1],a[2]=f*b[2],a[3]=e*b[3],a[4]=e*b[4],a[5]=e*b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8],a};f.fromMat2d=function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=
|
||
|
0,a[3]=b[2],a[4]=b[3],a[5]=0,a[6]=b[4],a[7]=b[5],a[8]=1,a};f.fromQuat=function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=e+e,h=f+f,k=c+c,p=e*d,r=e*h,e=e*k,t=f*h,f=f*k,c=c*k,d=g*d,h=g*h,g=g*k;return a[0]=1-(t+c),a[1]=r+g,a[2]=e-h,a[3]=r-g,a[4]=1-(p+c),a[5]=f+d,a[6]=e+h,a[7]=f-d,a[8]=1-(p+t),a};f.str=function(a){return"mat3("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+")"};"undefined"!=typeof c&&(c.mat3=f);var d={create:function(){var b=new a(16);return b[0]=1,
|
||
|
b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b},clone:function(b){var e=new a(16);return e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3],e[4]=b[4],e[5]=b[5],e[6]=b[6],e[7]=b[7],e[8]=b[8],e[9]=b[9],e[10]=b[10],e[11]=b[11],e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15],e},copy:function(a,b){return a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4],a[5]=b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8],a[9]=b[9],a[10]=b[10],a[11]=b[11],a[12]=b[12],a[13]=b[13],
|
||
|
a[14]=b[14],a[15]=b[15],a},identity:function(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a},transpose:function(a,b){if(a===b){var e=b[1],f=b[2],c=b[3],g=b[6],d=b[7],h=b[11];a[1]=b[4];a[2]=b[8];a[3]=b[12];a[4]=e;a[6]=b[9];a[7]=b[13];a[8]=f;a[9]=g;a[11]=b[14];a[12]=c;a[13]=d;a[14]=h}else a[0]=b[0],a[1]=b[4],a[2]=b[8],a[3]=b[12],a[4]=b[1],a[5]=b[5],a[6]=b[9],a[7]=b[13],a[8]=b[2],a[9]=b[6],a[10]=b[10],a[11]=b[14],a[12]=
|
||
|
b[3],a[13]=b[7],a[14]=b[11],a[15]=b[15];return a},invert:function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=b[4],h=b[5],k=b[6],p=b[7],r=b[8],t=b[9],w=b[10],x=b[11],A=b[12],z=b[13],B=b[14],D=b[15],F=e*h-f*d,G=e*k-c*d,H=e*p-g*d,I=f*k-c*h,L=f*p-g*h,M=c*p-g*k,N=r*z-t*A,K=r*B-w*A,O=r*D-x*A,P=t*B-w*z,Q=t*D-x*z,R=w*D-x*B,J=F*R-G*Q+H*P+I*O-L*K+M*N;return J?(J=1/J,a[0]=(h*R-k*Q+p*P)*J,a[1]=(c*Q-f*R-g*P)*J,a[2]=(z*M-B*L+D*I)*J,a[3]=(w*L-t*M-x*I)*J,a[4]=(k*O-d*R-p*K)*J,a[5]=(e*R-c*O+g*K)*J,a[6]=(B*H-A*M-D*G)*J,
|
||
|
a[7]=(r*M-w*H+x*G)*J,a[8]=(d*Q-h*O+p*N)*J,a[9]=(f*O-e*Q-g*N)*J,a[10]=(A*L-z*H+D*F)*J,a[11]=(t*H-r*L-x*F)*J,a[12]=(h*K-d*P-k*N)*J,a[13]=(e*P-f*K+c*N)*J,a[14]=(z*G-A*I-B*F)*J,a[15]=(r*I-t*G+w*F)*J,a):null},adjoint:function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=b[4],h=b[5],k=b[6],p=b[7],r=b[8],t=b[9],w=b[10],x=b[11],A=b[12],z=b[13],B=b[14],D=b[15];return a[0]=h*(w*D-x*B)-t*(k*D-p*B)+z*(k*x-p*w),a[1]=-(f*(w*D-x*B)-t*(c*D-g*B)+z*(c*x-g*w)),a[2]=f*(k*D-p*B)-h*(c*D-g*B)+z*(c*p-g*k),a[3]=-(f*(k*x-p*w)-h*
|
||
|
(c*x-g*w)+t*(c*p-g*k)),a[4]=-(d*(w*D-x*B)-r*(k*D-p*B)+A*(k*x-p*w)),a[5]=e*(w*D-x*B)-r*(c*D-g*B)+A*(c*x-g*w),a[6]=-(e*(k*D-p*B)-d*(c*D-g*B)+A*(c*p-g*k)),a[7]=e*(k*x-p*w)-d*(c*x-g*w)+r*(c*p-g*k),a[8]=d*(t*D-x*z)-r*(h*D-p*z)+A*(h*x-p*t),a[9]=-(e*(t*D-x*z)-r*(f*D-g*z)+A*(f*x-g*t)),a[10]=e*(h*D-p*z)-d*(f*D-g*z)+A*(f*p-g*h),a[11]=-(e*(h*x-p*t)-d*(f*x-g*t)+r*(f*p-g*h)),a[12]=-(d*(t*B-w*z)-r*(h*B-k*z)+A*(h*w-k*t)),a[13]=e*(t*B-w*z)-r*(f*B-c*z)+A*(f*w-c*t),a[14]=-(e*(h*B-k*z)-d*(f*B-c*z)+A*(f*k-c*h)),a[15]=
|
||
|
e*(h*w-k*t)-d*(f*w-c*t)+r*(f*k-c*h),a},determinant:function(a){var b=a[0],e=a[1],f=a[2],c=a[3],g=a[4],d=a[5],h=a[6],k=a[7],p=a[8],r=a[9],t=a[10],w=a[11],x=a[12],A=a[13],z=a[14];a=a[15];return(b*d-e*g)*(t*a-w*z)-(b*h-f*g)*(r*a-w*A)+(b*k-c*g)*(r*z-t*A)+(e*h-f*d)*(p*a-w*x)-(e*k-c*d)*(p*z-t*x)+(f*k-c*h)*(p*A-r*x)},multiply:function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=b[4],k=b[5],p=b[6],r=b[7],t=b[8],w=b[9],x=b[10],A=b[11],z=b[12],B=b[13],D=b[14];b=b[15];var F=e[0],G=e[1],H=e[2],I=e[3];return a[0]=
|
||
|
F*f+G*h+H*t+I*z,a[1]=F*c+G*k+H*w+I*B,a[2]=F*g+G*p+H*x+I*D,a[3]=F*d+G*r+H*A+I*b,F=e[4],G=e[5],H=e[6],I=e[7],a[4]=F*f+G*h+H*t+I*z,a[5]=F*c+G*k+H*w+I*B,a[6]=F*g+G*p+H*x+I*D,a[7]=F*d+G*r+H*A+I*b,F=e[8],G=e[9],H=e[10],I=e[11],a[8]=F*f+G*h+H*t+I*z,a[9]=F*c+G*k+H*w+I*B,a[10]=F*g+G*p+H*x+I*D,a[11]=F*d+G*r+H*A+I*b,F=e[12],G=e[13],H=e[14],I=e[15],a[12]=F*f+G*h+H*t+I*z,a[13]=F*c+G*k+H*w+I*B,a[14]=F*g+G*p+H*x+I*D,a[15]=F*d+G*r+H*A+I*b,a}};d.mul=d.multiply;d.translate=function(a,b,e){var f=e[0],c=e[1];e=e[2];
|
||
|
var g,d,h,k,p,r,t,w,x,A,z,B;return b===a?(a[12]=b[0]*f+b[4]*c+b[8]*e+b[12],a[13]=b[1]*f+b[5]*c+b[9]*e+b[13],a[14]=b[2]*f+b[6]*c+b[10]*e+b[14],a[15]=b[3]*f+b[7]*c+b[11]*e+b[15]):(g=b[0],d=b[1],h=b[2],k=b[3],p=b[4],r=b[5],t=b[6],w=b[7],x=b[8],A=b[9],z=b[10],B=b[11],a[0]=g,a[1]=d,a[2]=h,a[3]=k,a[4]=p,a[5]=r,a[6]=t,a[7]=w,a[8]=x,a[9]=A,a[10]=z,a[11]=B,a[12]=g*f+p*c+x*e+b[12],a[13]=d*f+r*c+A*e+b[13],a[14]=h*f+t*c+z*e+b[14],a[15]=k*f+w*c+B*e+b[15]),a};d.scale=function(a,b,e){var f=e[0],c=e[1];e=e[2];return a[0]=
|
||
|
b[0]*f,a[1]=b[1]*f,a[2]=b[2]*f,a[3]=b[3]*f,a[4]=b[4]*c,a[5]=b[5]*c,a[6]=b[6]*c,a[7]=b[7]*c,a[8]=b[8]*e,a[9]=b[9]*e,a[10]=b[10]*e,a[11]=b[11]*e,a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15],a};d.rotate=function(a,e,f,c){var g=c[0],d=c[1];c=c[2];var h=Math.sqrt(g*g+d*d+c*c),k,C,p,r,t,w,x,A,z,B,D,F,G,H,I,L,M,N,K,O,P,Q,R,J;return Math.abs(h)<b?null:(h=1/h,g*=h,d*=h,c*=h,k=Math.sin(f),C=Math.cos(f),p=1-C,r=e[0],t=e[1],w=e[2],x=e[3],A=e[4],z=e[5],B=e[6],D=e[7],F=e[8],G=e[9],H=e[10],I=e[11],L=g*g*p+C,
|
||
|
M=d*g*p+c*k,N=c*g*p-d*k,K=g*d*p-c*k,O=d*d*p+C,P=c*d*p+g*k,Q=g*c*p+d*k,R=d*c*p-g*k,J=c*c*p+C,a[0]=r*L+A*M+F*N,a[1]=t*L+z*M+G*N,a[2]=w*L+B*M+H*N,a[3]=x*L+D*M+I*N,a[4]=r*K+A*O+F*P,a[5]=t*K+z*O+G*P,a[6]=w*K+B*O+H*P,a[7]=x*K+D*O+I*P,a[8]=r*Q+A*R+F*J,a[9]=t*Q+z*R+G*J,a[10]=w*Q+B*R+H*J,a[11]=x*Q+D*R+I*J,e!==a&&(a[12]=e[12],a[13]=e[13],a[14]=e[14],a[15]=e[15]),a)};d.rotateX=function(a,b,e){var f=Math.sin(e);e=Math.cos(e);var c=b[4],g=b[5],d=b[6],h=b[7],k=b[8],p=b[9],r=b[10],t=b[11];return b!==a&&(a[0]=b[0],
|
||
|
a[1]=b[1],a[2]=b[2],a[3]=b[3],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]),a[4]=c*e+k*f,a[5]=g*e+p*f,a[6]=d*e+r*f,a[7]=h*e+t*f,a[8]=k*e-c*f,a[9]=p*e-g*f,a[10]=r*e-d*f,a[11]=t*e-h*f,a};d.rotateY=function(a,b,e){var f=Math.sin(e);e=Math.cos(e);var c=b[0],g=b[1],d=b[2],h=b[3],k=b[8],p=b[9],r=b[10],t=b[11];return b!==a&&(a[4]=b[4],a[5]=b[5],a[6]=b[6],a[7]=b[7],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]),a[0]=c*e-k*f,a[1]=g*e-p*f,a[2]=d*e-r*f,a[3]=h*e-t*f,a[8]=c*f+k*e,a[9]=g*f+p*e,a[10]=d*f+r*
|
||
|
e,a[11]=h*f+t*e,a};d.rotateZ=function(a,b,e){var f=Math.sin(e);e=Math.cos(e);var c=b[0],g=b[1],d=b[2],h=b[3],k=b[4],p=b[5],r=b[6],t=b[7];return b!==a&&(a[8]=b[8],a[9]=b[9],a[10]=b[10],a[11]=b[11],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]),a[0]=c*e+k*f,a[1]=g*e+p*f,a[2]=d*e+r*f,a[3]=h*e+t*f,a[4]=k*e-c*f,a[5]=p*e-g*f,a[6]=r*e-d*f,a[7]=t*e-h*f,a};d.fromRotationTranslation=function(a,b,e){var f=b[0],c=b[1],g=b[2],d=b[3],h=f+f,k=c+c,p=g+g;b=f*h;var r=f*k,f=f*p,t=c*k,c=c*p,g=g*p,h=d*h,k=d*k,d=d*p;
|
||
|
return a[0]=1-(t+g),a[1]=r+d,a[2]=f-k,a[3]=0,a[4]=r-d,a[5]=1-(b+g),a[6]=c+h,a[7]=0,a[8]=f+k,a[9]=c-h,a[10]=1-(b+t),a[11]=0,a[12]=e[0],a[13]=e[1],a[14]=e[2],a[15]=1,a};d.fromQuat=function(a,b){var e=b[0],f=b[1],c=b[2],g=b[3],d=e+e,h=f+f,k=c+c,p=e*d,r=e*h,e=e*k,t=f*h,f=f*k,c=c*k,d=g*d,h=g*h,g=g*k;return a[0]=1-(t+c),a[1]=r+g,a[2]=e-h,a[3]=0,a[4]=r-g,a[5]=1-(p+c),a[6]=f+d,a[7]=0,a[8]=e+h,a[9]=f-d,a[10]=1-(p+t),a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a};d.frustum=function(a,b,e,f,c,g,d){var h=1/(e-b),
|
||
|
k=1/(c-f),p=1/(g-d);return a[0]=2*g*h,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*g*k,a[6]=0,a[7]=0,a[8]=(e+b)*h,a[9]=(c+f)*k,a[10]=(d+g)*p,a[11]=-1,a[12]=0,a[13]=0,a[14]=d*g*2*p,a[15]=0,a};d.perspective=function(a,b,e,f,c){b=1/Math.tan(b/2);var g=1/(f-c);return a[0]=b/e,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=b,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=(c+f)*g,a[11]=-1,a[12]=0,a[13]=0,a[14]=2*c*f*g,a[15]=0,a};d.ortho=function(a,b,e,f,c,g,d){var h=1/(b-e),k=1/(f-c),p=1/(g-d);return a[0]=-2*h,a[1]=0,a[2]=0,a[3]=0,a[4]=0,
|
||
|
a[5]=-2*k,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*p,a[11]=0,a[12]=(b+e)*h,a[13]=(c+f)*k,a[14]=(d+g)*p,a[15]=1,a};d.lookAt=function(a,e,f,c){var g,h,y,E,C,p,r,t,w,x,A=e[0],z=e[1];e=e[2];var B=c[0],D=c[1];c=c[2];var F=f[0],G=f[1];f=f[2];return Math.abs(A-F)<b&&Math.abs(z-G)<b&&Math.abs(e-f)<b?d.identity(a):(r=A-F,t=z-G,w=e-f,x=1/Math.sqrt(r*r+t*t+w*w),r*=x,t*=x,w*=x,g=D*w-c*t,h=c*r-B*w,y=B*t-D*r,x=Math.sqrt(g*g+h*h+y*y),x?(x=1/x,g*=x,h*=x,y*=x):(g=0,h=0,y=0),E=t*y-w*h,C=w*g-r*y,p=r*h-t*g,x=Math.sqrt(E*
|
||
|
E+C*C+p*p),x?(x=1/x,E*=x,C*=x,p*=x):(E=0,C=0,p=0),a[0]=g,a[1]=E,a[2]=r,a[3]=0,a[4]=h,a[5]=C,a[6]=t,a[7]=0,a[8]=y,a[9]=p,a[10]=w,a[11]=0,a[12]=-(g*A+h*z+y*e),a[13]=-(E*A+C*z+p*e),a[14]=-(r*A+t*z+w*e),a[15]=1,a)};d.str=function(a){return"mat4("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+")"};"undefined"!=typeof c&&(c.mat4=d);f={create:function(){var b=new a(4);return b[0]=0,b[1]=0,b[2]=
|
||
|
0,b[3]=1,b}};f.clone=h.clone;f.fromValues=h.fromValues;f.copy=h.copy;f.set=h.set;f.identity=function(a){return a[0]=0,a[1]=0,a[2]=0,a[3]=1,a};f.setAxisAngle=function(a,b,e){e*=.5;var f=Math.sin(e);return a[0]=f*b[0],a[1]=f*b[1],a[2]=f*b[2],a[3]=Math.cos(e),a};f.add=h.add;f.multiply=function(a,b,e){var f=b[0],c=b[1],g=b[2];b=b[3];var d=e[0],h=e[1],k=e[2];e=e[3];return a[0]=f*e+b*d+c*k-g*h,a[1]=c*e+b*h+g*d-f*k,a[2]=g*e+b*k+f*h-c*d,a[3]=b*e-f*d-c*h-g*k,a};f.mul=f.multiply;f.scale=h.scale;f.rotateX=function(a,
|
||
|
b,e){e*=.5;var f=b[0],c=b[1],g=b[2];b=b[3];var d=Math.sin(e);e=Math.cos(e);return a[0]=f*e+b*d,a[1]=c*e+g*d,a[2]=g*e-c*d,a[3]=b*e-f*d,a};f.rotateY=function(a,b,e){e*=.5;var f=b[0],c=b[1],g=b[2];b=b[3];var d=Math.sin(e);e=Math.cos(e);return a[0]=f*e-g*d,a[1]=c*e+b*d,a[2]=g*e+f*d,a[3]=b*e-c*d,a};f.rotateZ=function(a,b,e){e*=.5;var f=b[0],c=b[1],g=b[2];b=b[3];var d=Math.sin(e);e=Math.cos(e);return a[0]=f*e+c*d,a[1]=c*e-f*d,a[2]=g*e+b*d,a[3]=b*e-g*d,a};f.calculateW=function(a,b){var e=b[0],f=b[1],c=b[2];
|
||
|
return a[0]=e,a[1]=f,a[2]=c,a[3]=-Math.sqrt(Math.abs(1-e*e-f*f-c*c)),a};f.dot=h.dot;f.lerp=h.lerp;f.slerp=function(a,b,e,f){var c=b[0],g=b[1],d=b[2],h=b[3],k=e[0],p=e[1],r=e[2];e=e[3];var t=c*k+g*p+d*r+h*e,w,x,A,z;return 1<=Math.abs(t)?(a!==b&&(a[0]=c,a[1]=g,a[2]=d,a[3]=h),a):(w=Math.acos(t),x=Math.sqrt(1-t*t),.001>Math.abs(x)?(a[0]=.5*c+.5*k,a[1]=.5*g+.5*p,a[2]=.5*d+.5*r,a[3]=.5*h+.5*e,a):(A=Math.sin((1-f)*w)/x,z=Math.sin(f*w)/x,a[0]=c*A+k*z,a[1]=g*A+p*z,a[2]=d*A+r*z,a[3]=h*A+e*z,a))};f.invert=function(a,
|
||
|
b){var e=b[0],f=b[1],c=b[2],g=b[3],d=e*e+f*f+c*c+g*g,d=d?1/d:0;return a[0]=-e*d,a[1]=-f*d,a[2]=-c*d,a[3]=g*d,a};f.conjugate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a[2]=-b[2],a[3]=b[3],a};f.length=h.length;f.len=f.length;f.squaredLength=h.squaredLength;f.sqrLen=f.squaredLength;f.normalize=h.normalize;f.fromMat3=function(){var a=[1,2,0];return function(b,e){var f=e[0]+e[4]+e[8];if(0<f)f=Math.sqrt(f+1),b[3]=.5*f,f=.5/f,b[0]=(e[7]-e[5])*f,b[1]=(e[2]-e[6])*f,b[2]=(e[3]-e[1])*f;else{var c=0;e[4]>e[0]&&
|
||
|
(c=1);e[8]>e[3*c+c]&&(c=2);var g=a[c],d=a[g],f=Math.sqrt(e[3*c+c]-e[3*g+g]-e[3*d+d]+1);b[c]=.5*f;f=.5/f;b[3]=(e[3*d+g]-e[3*g+d])*f;b[g]=(e[3*g+c]+e[3*c+g])*f;b[d]=(e[3*d+c]+e[3*c+d])*f}return b}}();f.str=function(a){return"quat("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"};"undefined"!=typeof c&&(c.quat=f)})(d)})();"use strict";
|
||
|
tv.exportTo("tv.b",function(){var d=vec2.create(),c=vec2.create(),b=vec4.create();mat2d.create();vec2.createFromArray=function(a){if(2!=a.length)throw Error("Should be length 2");var b=vec2.create();vec2.set(b,a[0],a[1]);return b};vec2.createXY=function(a,b){var e=vec2.create();vec2.set(e,a,b);return e};vec2.toString=function(a){return"["+a[0]+", "+a[1]+"]"};vec2.addTwoScaledUnitVectors=function(a,b,e,g,h){vec2.scale(d,b,e);vec2.scale(c,g,h);vec2.add(a,d,c)};vec3.createXYZ=function(a,b,e){var c=vec3.create();
|
||
|
vec3.set(c,a,b,e);return c};vec3.toString=function(a){return"vec3("+a[0]+", "+a[1]+", "+a[2]+")"};mat2d.translateXY=function(a,b,e){vec2.set(d,b,e);mat2d.translate(a,a,d)};mat2d.scaleXY=function(a,b,e){vec2.set(d,b,e);mat2d.scale(a,a,d)};vec4.unitize=function(a,b){a[0]=b[0]/b[3];a[1]=b[1]/b[3];a[2]=b[2]/b[3];a[3]=1;return a};vec2.copyFromVec4=function(a,f){vec4.unitize(b,f);vec2.copy(a,b)};return{}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){this.height=this.width=this.y=this.x=0}d.fromXYWH=function(c,b,a,f){var e=new d;e.x=c;e.y=b;e.width=a;e.height=f;return e};d.fromArray=function(c){if(4!=c.length)throw Error("ary.length must be 4");var b=new d;b.x=c[0];b.y=c[1];b.width=c[2];b.height=c[3];return b};d.prototype={__proto__:Object.prototype,get left(){return this.x},get top(){return this.y},get right(){return this.x+this.width},get bottom(){return this.y+this.height},toString:function(){return"Rect("+
|
||
|
this.x+", "+this.y+", "+this.width+", "+this.height+")"},toArray:function(){return[this.x,this.y,this.width,this.height]},clone:function(){var c=new d;c.x=this.x;c.y=this.y;c.width=this.width;c.height=this.height;return c},enlarge:function(c){var b=new d;this.enlargeFast(b,c);return b},enlargeFast:function(c,b){c.x=this.x-b;c.y=this.y-b;c.width=this.width+2*b;c.height=this.height+2*b;return c},size:function(){return{width:this.width,height:this.height}},scale:function(c){var b=new d;this.scaleFast(b,
|
||
|
c);return b},scaleSize:function(c){return d.fromXYWH(this.x,this.y,this.width*c,this.height*c)},scaleFast:function(c,b){c.x=this.x*b;c.y=this.y*b;c.width=this.width*b;c.height=this.height*b;return c},translate:function(c){var b=new d;this.translateFast(b,c);return b},translateFast:function(c,b){c.x=this.x+b[0];c.y=this.x+b[1];c.width=this.width;c.height=this.height;return c},asUVRectInside:function(c){var b=new d;b.x=(this.x-c.x)/c.width;b.y=(this.y-c.y)/c.height;b.width=this.width/c.width;b.height=
|
||
|
this.height/c.height;return b},intersects:function(c){var b;b=1&this.x<c.right;b&=this.right>c.x;b&=this.y<c.bottom;return b&=this.bottom>c.y},equalTo:function(c){return c&&this.x===c.x&&this.y===c.y&&this.width===c.width&&this.height===c.height}};return{Rect:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){return{addSingletonGetter:function(d){d.getInstance=function(){return d.instance_||(d.instance_=new d)}},tracedFunction:function(d,c,b){return function(){console.time(c);try{d.apply(b,arguments)}finally{console.timeEnd(c)}}},normalizeException:function(d){return"string"==typeof d?{message:d,stack:["<unknown>"]}:{message:d.message,stack:d.stack?d.stack:["<unknown>"]}},instantiateTemplate:function(d,c){c=c||document;var b=c.querySelector(d);if(!b)throw Error("Element not found");
|
||
|
return b.createInstance()},stackTrace:function(){var d=Error().stack+"",d=d.split("\n");return d.slice(2)},windowRectForElement:function(d){var c=[d.offsetLeft,d.offsetTop],b=[d.offsetWidth,d.offsetHeight];for(d=d.offsetParent;d;)c[0]+=d.offsetLeft,c[1]+=d.offsetTop,d=d.offsetParent;return tv.b.Rect.fromXYWH(c[0],c[1],b[0],b[1])},scrollIntoViewIfNeeded:function(d){var c=d.parentElement.getBoundingClientRect(),b=d.getBoundingClientRect();b.top<c.top?d.scrollIntoView(!0):b.bottom>c.bottom&&d.scrollIntoView(!1)},
|
||
|
clamp:function(d,c,b){return Math.min(Math.max(d,c),b)},lerp:function(d,c,b){return c+d*(b-c)},deg2rad:function(d){return Math.PI*d/180},getUsingPath:function(d,c){for(var b=d.split("."),a=c,f;b.length&&(f=b.shift());)if(b.length)if(f in a)a=a[f];else break;else return a[f]}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){return d}function c(){return c}function b(a,b){a.storage_=b;a.get=function(b,f,c){b=a.namespace_(b,c);var d=a.storage_.getItem(b);if(null===d||void 0===d)return f;try{return JSON.parse(d).value}catch(l){return a.storage_.removeItem(a.namespace_(b,c)),f}};a.set=function(b,f,c){if(void 0===f)throw Error("Settings.set: value must not be undefined");f=JSON.stringify({value:f});a.storage_.setItem(a.namespace_(b,c),f)};a.keys=function(b){var f=[];b=b||"";for(var c=
|
||
|
0;c<a.storage_.length;c++){var d=a.storage_.key(c);a.isnamespaced_(d,b)&&f.push(a.unnamespace_(d,b))}return f};a.isnamespaced_=function(b,f){return 0==b.indexOf(a.normalize_(f))};a.namespace_=function(b,f){return a.normalize_(f)+b};a.unnamespace_=function(b,f){return b.replace(a.normalize_(f),"")};a.normalize_=function(b){return a.NAMESPACE+(b?b+".":"")};a.setAlternativeStorageInstance=function(b){a.storage_=b};a.getAlternativeStorageInstance=function(){return a.storage_===localStorage?void 0:a.storage_};
|
||
|
a.NAMESPACE="trace-viewer"}document.head.addEventListener("tv-unittest-will-run",function(){d.setAlternativeStorageInstance(global.sessionStorage)});b(d,localStorage);b(c,sessionStorage);return{Settings:d,SessionSettings:c}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(a){var b=document.createElement("span");a&&(a.className&&(b.className=a.className),a.textContent&&(b.textContent=a.textContent),a.parent&&a.parent.appendChild(b),a.bold&&(b.style.fontWeight="bold"));return b}function c(a,b){return a instanceof Array&&b instanceof Array?a.length===b.length&&JSON.stringify(a)===JSON.stringify(b):a===b}function b(a,b){var c=d({className:"edit-categories"});c.textContent="Edit categories";c.classList.add("labeled-option");c.addEventListener("click",
|
||
|
function(){b.onClickEditCategories()});return c}var a=1;return{createSpan:d,createDiv:function(a){var b=document.createElement("div");a&&(a.className&&(b.className=a.className),a.parent&&a.parent.appendChild(b));return b},createScopedStyle:function(a){var b=document.createElement("style");b.scoped=!0;b.innerHTML=a;return b},createSelector:function(a,b,g,d,k,l){function m(c){c=v.selectedOptions[0].targetPropertyValue;tv.b.Settings.set(g,c,l);a[b]=c}for(var n,q=0;q<k.length;q++){var u=k[q];if(c(u.value,
|
||
|
d)){n=q;break}}if(void 0===n)throw Error("defaultValue must be in the items list");var v=document.createElement("select");v.addEventListener("change",m);for(q=0;q<k.length;q++){var u=k[q],y=document.createElement("option");y.textContent=u.label;y.targetPropertyValue=u.value;v.appendChild(y)}a.__lookupSetter__("selectedIndex");v.__defineGetter__("selectedValue",function(a){return v.children[v.selectedIndex].targetPropertyValue});v.__defineSetter__("selectedValue",function(a){for(var b=0;b<v.children.length;b++)if(c(v.children[b].targetPropertyValue,
|
||
|
a)){v.selectedIndex!=b&&(v.selectedIndex=b,m());return}throw Error("Not a valid value");});k=tv.b.Settings.get(g,d,l);u=!1;for(q=0;q<v.children.length;q++)if(c(v.children[q].targetPropertyValue,k)){u=!0;a[b]=k;v.selectedIndex=q;break}u||(v.selectedIndex=n,a[b]=d);return v},createOptionGroup:function(a,e,g,h,k){function l(){var b=[];this.value.length&&(b=this.value.split(","));tv.b.Settings.set(g,b);a[e]=b}var m=d({className:"labeled-option-group"});h=tv.b.Settings.get(g,h);for(var n=0;n<k.length;++n){var q=
|
||
|
k[n],u="category-preset-"+q.label.replace(/ /g,"-"),v=document.createElement("input");v.type="radio";v.setAttribute("id",u);v.setAttribute("name","category-presets-group");v.setAttribute("value",q.value);v.addEventListener("change",l.bind(v,a,e,g));c(h,q.value)&&(v.checked=!0);var y=document.createElement("label");y.textContent=q.label;y.setAttribute("for",u);q=d({className:"labeled-option"});q.appendChild(v);q.appendChild(y);q.__defineSetter__("checked",function(a){v.checked!==!!a&&(v.checked=!!a,
|
||
|
l())});q.__defineGetter__("checked",function(){return v.checked});m.appendChild(q)}m.appendChild(b(m,a));h.length||m.classList.add("categories-expanded");a[e]=h;return m},createCheckBox:function(b,e,c,h,k){function l(){tv.b.Settings.set(c,m.checked);b&&(b[e]=m.checked)}var m=document.createElement("input");m.type="checkbox";h=tv.b.Settings.get(c,h);m.checked=!!h;b&&(b[e]=h);m.addEventListener("change",l);h="#checkbox-"+a++;var n=d({className:"labeled-checkbox"});m.setAttribute("id",h);var q=document.createElement("label");
|
||
|
q.textContent=k;q.setAttribute("for",h);n.appendChild(m);n.appendChild(q);n.__defineSetter__("checked",function(a){m.checked!==!!a&&(m.checked=!!a,l())});n.__defineGetter__("checked",function(){return m.checked});return n},isElementAttachedToDocument:function(a){for(var b=a;b.parentNode;)b=b.parentNode;return b==a.ownerDocument}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){}d.decorate=function(b){for(var a in d.prototype)if("decorate"!=a){var f=d.prototype[a];"function"===typeof f&&(b[a]=f)}};d.prototype={addEventListener:function(b,a){this.listeners_||(this.listeners_=Object.create(null));if(b in this.listeners_){var f=this.listeners_[b];0>f.indexOf(a)&&f.push(a)}else this.listeners_[b]=[a]},removeEventListener:function(b,a){if(this.listeners_&&b in this.listeners_){var f=this.listeners_[b],e=f.indexOf(a);0<=e&&(1==f.length?
|
||
|
delete this.listeners_[b]:f.splice(e,1))}},dispatchEvent:function(b){if(!this.listeners_)return!0;var a=this;b.__defineGetter__("target",function(){return a});var f=b.preventDefault;b.preventDefault=function(){f.call(this);this.rawReturnValue=!1};var e=b.type,c=0;if(e in this.listeners_)for(var e=this.listeners_[e].concat(),d=0,k;k=e[d];d++)c=k.handleEvent?c|!1===k.handleEvent.call(k,b):c|!1===k.call(this,b);return!c&&b.rawReturnValue},hasEventListener:function(b){return void 0!==this.listeners_[b]}};
|
||
|
var c={decorate:function(b){for(var a in c)if("decorate"!=a){var f=c[a];"function"===typeof f&&(b[a]=f)}b.listenerCounts_={}},addEventListener:function(b,a,f){this.__proto__.addEventListener.call(this,b,a,f);void 0===this.listenerCounts_[b]&&(this.listenerCounts_[b]=0);this.listenerCounts_[b]++},removeEventListener:function(b,a,f){this.__proto__.removeEventListener.call(this,b,a,f);this.listenerCounts_[b]--},hasEventListener:function(b){return 0<this.listenerCounts_[b]}};return{EventTarget:d,EventTargetHelper:c}});
|
||
|
"use strict";tv.exportTo("tv.b",function(){function d(c,b,a){var f=tv.doc.createEvent("Event");f.initEvent(c,!!b,!!a);f.__proto__=global.Event.prototype;return f}d.prototype={__proto__:global.Event.prototype};return{Event:d,dispatchSimpleEvent:function(c,b,a,f){b=new d(b,a,f);return c.dispatchEvent(b)}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(a,b,f,c,d,m){d=new tv.b.Event(b+"Change",d,m);d.propertyName=b;d.newValue=f;d.oldValue=c;var n;d.throwError=function(a){n=a};a.dispatchEvent(d);if(n)throw n;}function c(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()}function b(a,b){switch(b){case f.JS:var d=a+"_tv_";return function(){return this[d]};case f.ATTR:var k=c(a);return function(){return this.getAttribute(k)};case f.BOOL_ATTR:return k=c(a),function(){return this.hasAttribute(k)}}}function a(a,
|
||
|
b,h,k,l){switch(b){case f.JS:var m=a+"_tv_";return function(b){var f=this[m];b!==f&&(this[m]=b,h&&h.call(this,b,f),d(this,a,b,f,k,l))};case f.ATTR:var n=c(a);return function(b){var f=this.getAttribute(n);b!==f&&(void 0==b?this.removeAttribute(n):this.setAttribute(n,b),h&&h.call(this,b,f),d(this,a,b,f,k,l))};case f.BOOL_ATTR:return n=c(a),function(b){var f=this.getAttribute(n)===a;b!==f&&(b?this.setAttribute(n,a):this.removeAttribute(n),h&&h.call(this,b,f),d(this,a,b,f,k,l))}}}var f={JS:"js",ATTR:"attr",
|
||
|
BOOL_ATTR:"boolAttr"};return{PropertyKind:f,defineProperty:function(e,c,d,k,l,m){console.error("Don't use tv.b.defineProperty");"function"==typeof e&&(e=e.prototype);d=d||f.JS;e.__lookupGetter__(c)||e.__defineGetter__(c,b(c,d));e.__lookupSetter__(c)||e.__defineSetter__(c,a(c,d,k,l,m))},dispatchPropertyChange:d,setPropertyAndDispatchChange:function(a,b,f){var c=a[b];a[b+"_"]=f;c!==f&&tv.b.dispatchPropertyChange(a,b,f,c,!0,!1)}}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){var d=document.currentScript.ownerDocument,c=tv.b.ui.define("overlay");c.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add("overlay");this.parentEl_=this.ownerDocument.body;this.visible_=!1;this.userCanClose_=!0;this.onKeyDown_=this.onKeyDown_.bind(this);this.onClick_=this.onClick_.bind(this);this.onFocusIn_=this.onFocusIn_.bind(this);this.onDocumentClick_=this.onDocumentClick_.bind(this);this.onClose_=this.onClose_.bind(this);this.addEventListener("visibleChange",
|
||
|
tv.b.ui.Overlay.prototype.onVisibleChange_.bind(this),!0);this.shadow_=(this.createShadowRoot||this.webkitCreateShadowRoot).call(this);this.shadow_.appendChild(tv.b.instantiateTemplate("#overlay-template",d));this.closeBtn_=this.shadow_.querySelector("close-button");this.closeBtn_.addEventListener("click",this.onClose_);this.shadow_.querySelector("overlay-frame").addEventListener("click",this.onClick_);this.observer_=new WebKitMutationObserver(this.didButtonBarMutate_.bind(this));this.observer_.observe(this.shadow_.querySelector("button-bar"),
|
||
|
{childList:!0});Object.defineProperty(this,"title",{get:function(){return this.shadow_.querySelector("title").textContent},set:function(b){this.shadow_.querySelector("title").textContent=b}})},set userCanClose(b){this.userCanClose_=b;this.closeBtn_.style.display=b?"block":"none"},get buttons(){return this.shadow_.querySelector("button-bar")},get visible(){return this.visible_},set visible(b){this.visible_!==b&&tv.b.setPropertyAndDispatchChange(this,"visible",b)},onVisibleChange_:function(){this.visible_?
|
||
|
this.show_():this.hide_()},show_:function(){this.parentEl_.appendChild(this);this.userCanClose_&&(this.addEventListener("keydown",this.onKeyDown_.bind(this)),this.addEventListener("click",this.onDocumentClick_.bind(this)));this.parentEl_.addEventListener("focusin",this.onFocusIn_);this.tabIndex=0;var b=void 0,a=this.querySelectorAll("button, input, list, select, a");0<a.length&&(a[0]===this.closeBtn_?1<a.length&&(b=a[1]):b=a[0]);void 0===b&&(b=this);b.focus()},hide_:function(){this.parentEl_.removeChild(this);
|
||
|
this.parentEl_.removeEventListener("focusin",this.onFocusIn_);this.closeBtn_&&this.closeBtn_.removeEventListener(this.onClose_);document.removeEventListener("keydown",this.onKeyDown_);document.removeEventListener("click",this.onDocumentClick_)},onClose_:function(b){this.visible=!1;("keydown"!=b.type||"keydown"===b.type&&27===b.keyCode)&&b.stopPropagation();b.preventDefault();tv.b.dispatchSimpleEvent(this,"closeclick")},onFocusIn_:function(b){b.target!==this&&(window.setTimeout(function(){this.focus()},
|
||
|
0),b.preventDefault(),b.stopPropagation())},didButtonBarMutate_:function(b){0<this.buttons.children.length?this.shadow_.querySelector("button-bar").style.display=void 0:this.shadow_.querySelector("button-bar").style.display="none"},onKeyDown_:function(b){if(9===b.keyCode&&b.shiftKey&&b.target===this)b.preventDefault();else if(27===b.keyCode)this.onClose_(b)},onClick_:function(b){b.stopPropagation()},onDocumentClick_:function(b){if(this.userCanClose_)this.onClose_(b)}};c.showError=function(b,a){var f=
|
||
|
new c;f.title="Error";f.textContent=b;if(a){var e=tv.b.normalizeException(a),g=document.createElement("pre");g.textContent=e.stack;g.style.paddingLeft="8px";g.style.margin=0;f.appendChild(g)}e=document.createElement("button");e.textContent="OK";e.addEventListener("click",function(){f.visible=!1});f.buttons.appendChild(e);f.visible=!0;return f};return{Overlay:c}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){var d=tv.b.ui.define("x-drag-handle");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.lastMousePos_=0;this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.addEventListener("mousedown",this.onMouseDown_);this.target_=void 0;this.horizontal=!0;this.observer_=new WebKitMutationObserver(this.didTargetMutate_.bind(this));this.targetSizesByModeKey_={}},get modeKey_(){return""==this.target_.className?".":
|
||
|
this.target_.className},get target(){return this.target_},set target(c){this.observer_.disconnect();(this.target_=c)&&this.observer_.observe(this.target_,{attributes:!0,attributeFilter:["class"]})},get horizontal(){return this.horizontal_},set horizontal(c){this.className=(this.horizontal_=c)?"horizontal-drag-handle":"vertical-drag-handle"},get vertical(){return!this.horizontal_},set vertical(c){this.horizontal=!c},forceMutationObserverFlush_:function(){var c=this.observer_.takeRecords();c.length&&
|
||
|
this.didTargetMutate_(c)},didTargetMutate_:function(c){c=this.targetSizesByModeKey_[this.modeKey_];void 0!==c?this.setTargetSize_(c):this.target_.style[this.targetStyleKey_]=""},get targetStyleKey_(){return this.horizontal_?"height":"width"},getTargetSize_:function(){var c=this.targetStyleKey_;this.target_.style[c]||(this.target_.style[c]=window.getComputedStyle(this.target_)[c]);c=parseInt(this.target_.style[c]);return this.targetSizesByModeKey_[this.modeKey_]=c},setTargetSize_:function(c){this.target_.style[this.targetStyleKey_]=
|
||
|
c+"px";this.targetSizesByModeKey_[this.modeKey_]=c},applyDelta_:function(c){var b=this.getTargetSize_();this.setTargetSize_(this.target_===this.nextElementSibling?b+c:b-c)},onMouseMove_:function(c){var b=this.horizontal_?c.clientY:c.clientX;this.applyDelta_(this.lastMousePos_-b);this.lastMousePos_=b;c.preventDefault();return!0},onMouseDown_:function(c){if(this.target_)return this.forceMutationObserverFlush_(),this.lastMousePos_=this.horizontal_?c.clientY:c.clientX,document.addEventListener("mousemove",
|
||
|
this.onMouseMove_),document.addEventListener("mouseup",this.onMouseUp_),c.preventDefault(),!0},onMouseUp_:function(c){document.removeEventListener("mousemove",this.onMouseMove_);document.removeEventListener("mouseup",this.onMouseUp_);c.preventDefault()}};return{DragHandle:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){if(void 0===f||void 0===a)a={},f={},Polymer.elements.forEach(function(b){if(a[b.name])throw Error("Something is strange: dupe polymer element names");a[b.name]=b;b.extends&&(void 0===f[b.extends]&&(f[b.extends]=[]),f[b.extends].push(b.name))})}function c(b){d();return a[b]}function b(a){if(Polymer.waitingFor().length)throw Error("There are unresolved polymer elements. Wait until Polymer.whenReady");d();element=c(a);if(!element)throw Error(a+" is not a polymer element");
|
||
|
opt_includeSelf=!!opt_includeSelf;void 0===e[a]&&(immediateSubElements=f[polymerElement],immediateSubElements.length?immediateSubElements.forEach(function(a){(void 0).push.apply(void 0,b(a.name))}):e[a]=immediateSubElements,e[a]=void 0);return e[a]}Object.observe(Polymer.elements,function(){a={};f=void 0;e={}});var a=void 0,f=void 0,e=void 0;return{getPolymerElementNamed:c,getPolymerElementsThatSubclass:b,getPolymerSubclassingDepthFrom:function(a,b){if(Polymer.waitingFor().length)throw Error("There are unresolved polymer elements. Wait until Polymer.whenReady");
|
||
|
if(!Polymer.elements[b])throw Error(b+" is not a polymer element");if(!Polymer.elements[a])throw Error(a+" is not a polymer element");for(var e=0,f=a;f!=b;)if(e+=1,f=Polymer.elements[f].extends,!f)throw Error(a+" does not subclass "+b);return e}}});"use strict";
|
||
|
Polymer("tracing-analysis-tab-view",{get selectedTab(){if(this.selectedTab_)return this.selectedTab_.content},set selectedTab(d){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(void 0===d||null===d)this.changeSelectedTabById_(void 0);else{for(var c=void 0,b=0;b<this.tabs_.length;b++)if(this.tabs_[b].content===d){c=this.tabs_[b].id;break}void 0===c?console.warn("Tab not in tabs list. Ignoring changed selection."):this.changeSelectedTabById_(c)}},get tabsHidden(){return this.shadowRoot.querySelector("tab-strip").hasAttribute("tabs-hidden")},
|
||
|
set tabsHidden(d){d=!!d;var c=this.shadowRoot.querySelector("tab-strip");d?c.setAttribute("tabs-hidden",!0):c.removeAttribute("tabs-hidden")},ready:function(){this.tabs_=[];this.selectedTab_=void 0;for(var d=0;d<this.children.length;d++)this.processAddedChild_(this.children[d]);this.childrenObserver_=new MutationObserver(this.childrenUpdated_.bind(this));this.childrenObserver_.observe(this,{childList:"true"})},processAddedChild_:function(d){var c=new MutationObserver(this.childAttributesChanged_.bind(this)),
|
||
|
b=new MutationObserver(this.childAttributesChanged_.bind(this)),a={id:this.tabs_.length,content:d,label:d.getAttribute("tab-label"),observers:{forAttributeSelected:c,forAttributeTabLabel:b},savedScrollTop:0,savedScrollLeft:0};this.tabs_.push(a);d.hasAttribute("selected")&&(this.selectedTab_?d.removeAttribute("selected"):this.setSelectedTabById_(a.id));var f=d.selected,e=this;Object.defineProperty(d,"selected",{configurable:!0,set:function(b){b?e.changeSelectedTabById_(a.id):e.selectedTab_===a&&e.changeSelectedTabById_(void 0)},
|
||
|
get:function(){return this.hasAttribute("selected")}});f&&(d.selected=f);c.observe(d,{attributeFilter:["selected"]});b.observe(d,{attributeFilter:["tab-label"]})},processRemovedChild_:function(d){for(var c=0;c<this.tabs_.length;c++)this.tabs_[c].id=c,this.tabs_[c].content===d&&(this.tabs_[c].observers.forAttributeSelected.disconnect(),this.tabs_[c].observers.forAttributeTabLabel.disconnect(),this.tabs_[c]===this.selectedTab_&&this.clearSelectedTab_(),d.removeAttribute("selected"),delete d.selected,
|
||
|
this.tabs_.splice(c,1),c--)},childAttributesChanged_:function(d,c){for(var b=void 0,a=0;a<this.tabs_.length;a++){var f=this.tabs_[a].observers;if(f.forAttributeSelected===c||f.forAttributeTabLabel===c){b=this.tabs_[a];break}}if(b)for(a=0;a<d.length;a++)f=b.content,"tab-label"===d[a].attributeName&&(b.label=f.getAttribute("tab-label")),"selected"===d[a].attributeName&&(f.hasAttribute("selected")?this.changeSelectedTabById_(b.id):this.changeSelectedTabById_(void 0))},childrenUpdated_:function(d,c){d.forEach(function(b){for(var a=
|
||
|
0;a<b.removedNodes.length;a++)this.processRemovedChild_(b.removedNodes[a]);for(a=0;a<b.addedNodes.length;a++)this.processAddedChild_(b.addedNodes[a])},this)},tabButtonSelectHandler_:function(d,c,b){this.changeSelectedTabById_(b.getAttribute("button-id"))},changeSelectedTabById_:function(d){var c=this.selectedTab_!==(void 0!==d?this.tabs_[d]:void 0);this.saveCurrentTabScrollPosition_();this.clearSelectedTab_();void 0!==d&&(this.setSelectedTabById_(d),this.restoreCurrentTabScrollPosition_());c&&this.fire("selected-tab-change")},
|
||
|
setSelectedTabById_:function(d){this.selectedTab_=this.tabs_[d];this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.setAttribute("selected","selected");this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:["selected"]})},saveCurrentTabScrollPosition_:function(){this.selectedTab_&&(this.selectedTab_.savedScrollTop=this.$["content-container"].scrollTop,this.selectedTab_.savedScrollLeft=this.$["content-container"].scrollLeft)},
|
||
|
restoreCurrentTabScrollPosition_:function(){this.selectedTab_&&(this.$["content-container"].scrollTop=this.selectedTab_.savedScrollTop,this.$["content-container"].scrollLeft=this.selectedTab_.savedScrollLeft)},clearSelectedTab_:function(){this.selectedTab_&&(this.selectedTab_.observers.forAttributeSelected.disconnect(),this.selectedTab_.content.removeAttribute("selected"),this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:["selected"]}),this.selectedTab_=
|
||
|
void 0)}});"use strict";Polymer("tracing-analysis-sub-view",{set tabLabel(d){return this.setAttribute("tab-label",d)},get tabLabel(){return this.getAttribute("tab-label")},get requiresTallView(){return!1},set selection(d){throw Error("Not implemented!");},get selection(){throw Error("Not implemented!");}});"use strict";tv.exportTo("tv.c.analysis",function(){return{tsRound:function(d){return Math.round(1E3*d)/1E3}}});"use strict";tv.exportTo("tv.b",function(){var d=1;return{GUID:{allocate:function(){return d++}}}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){this.isEmpty_=!0;this.max_=this.min_=void 0}d.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=!0;this.max_=this.min_=void 0},get isEmpty(){return this.isEmpty_},addRange:function(c){c.isEmpty||(this.addValue(c.min),this.addValue(c.max))},addValue:function(c){this.isEmpty_?(this.min_=this.max_=c,this.isEmpty_=!1):(this.max_=Math.max(this.max_,c),this.min_=Math.min(this.min_,c))},set min(c){this.isEmpty_=!1;this.min_=c},get min(){return this.isEmpty_?void 0:
|
||
|
this.min_},get max(){return this.isEmpty_?void 0:this.max_},set max(c){this.isEmpty_=!1;this.max_=c},get range(){return this.isEmpty_?void 0:this.max_-this.min_},get center(){return.5*(this.min_+this.max_)},equals:function(c){return this.isEmpty&&c.isEmpty?!0:this.isEmpty!=c.isEmpty?!1:this.min===c.min&&this.max===c.max},containsRange:function(c){return this.isEmpty||c.isEmpty?!1:this.min<=c.min&&this.max>=c.max},containsExplicitRange:function(c,b){return this.isEmpty?!1:this.min<=c&&this.max>=b},
|
||
|
intersectsRange:function(c){return this.isEmpty||c.isEmpty?!1:!(c.max<this.min||c.min>this.max)},intersectsExplicitRange:function(c,b){return this.isEmpty?!1:!(b<this.min||c>this.max)}};d.compareByMinTimes=function(c,b){return c.isEmpty||b.isEmpty?c.isEmpty&&!b.isEmpty?-1:!c.isEmpty&&b.isEmpty?1:0:c.min_-b.min_};return{Range:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(a,b){return void 0===a?b:void 0===b?a:Math.max(a,b)}function c(a,b){this.beginPositionCb_=a;this.endPositionCb_=b;this.root_=void 0;this.size_=0}function b(b,e,c,d){this.lowValue_=c;this.data_=[{start:b,end:e,high:d,low:c}];this.colour_=a.RED;this.maxHighRight_=this.maxHighLeft_=this.rightNode_=this.leftNode_=this.parentNode_=void 0}c.prototype={insert:function(f,e){var c=this.beginPositionCb_(f),d=this.endPositionCb_(e||f),c=new b(f,e||f,c,d);this.size_++;
|
||
|
this.root_=this.insertNode_(this.root_,c);this.root_.colour=a.BLACK},insertNode_:function(a,b){if(void 0===a)return b;a.leftNode&&a.leftNode.isRed&&a.rightNode&&a.rightNode.isRed&&this.flipNodeColour_(a);b.key<a.key?a.leftNode=this.insertNode_(a.leftNode,b):b.key===a.key?a.merge(b):a.rightNode=this.insertNode_(a.rightNode,b);!a.rightNode||!a.rightNode.isRed||void 0!==a.leftNode&&a.leftNode.isRed||(a=this.rotateLeft_(a));a.leftNode&&a.leftNode.isRed&&a.leftNode.leftNode&&a.leftNode.leftNode.isRed&&
|
||
|
(a=this.rotateRight_(a));return a},rotateRight_:function(b){var e=b.leftNode;b.leftNode=e.rightNode;e.rightNode=b;e.colour=b.colour;b.colour=a.RED;return e},rotateLeft_:function(b){var e=b.rightNode;b.rightNode=e.leftNode;e.leftNode=b;e.colour=b.colour;b.colour=a.RED;return e},flipNodeColour_:function(a){a.colour=this.flipColour_(a.colour);a.leftNode.colour=this.flipColour_(a.leftNode.colour);a.rightNode.colour=this.flipColour_(a.rightNode.colour)},flipColour_:function(b){return b===a.RED?a.BLACK:
|
||
|
a.RED},updateHighValues:function(){this.updateHighValues_(this.root_)},updateHighValues_:function(a){if(void 0!==a)return a.maxHighLeft=this.updateHighValues_(a.leftNode),a.maxHighRight=this.updateHighValues_(a.rightNode),d(d(a.maxHighLeft,a.highValue),a.maxHighRight)},findIntersection:function(a,b){if(void 0===a||void 0===b)throw Error("lowValue and highValue must be defined");if("number"!==typeof a||"number"!==typeof b)throw Error("lowValue and highValue must be numbers");return void 0===this.root_?
|
||
|
[]:this.findIntersection_(this.root_,a,b)},findIntersection_:function(a,b,c){var d=[];if(a.lowValue>=c)return a.hasLeftNode?this.findIntersection_(a.leftNode,b,c):[];a.maxHighLeft>b&&(d=d.concat(this.findIntersection_(a.leftNode,b,c)));if(a.highValue>b)for(var k=a.data.length-1;0<=k&&!(a.data[k].high<b);--k)d.unshift([a.data[k].start,a.data[k].end]);a.hasRightNode&&(d=d.concat(this.findIntersection_(a.rightNode,b,c)));return d},get size(){return this.size_},get root(){return this.root_},dump_:function(){return void 0===
|
||
|
this.root_?[]:this.dumpNode_(this.root_)},dumpNode_:function(a){var b={};a.hasLeftNode&&(b.left=this.dumpNode_(a.leftNode));b.node=a.dump();a.hasRightNode&&(b.right=this.dumpNode_(a.rightNode));return b}};var a={RED:"red",BLACK:"black"};b.prototype={get colour(){return this.colour_},set colour(a){this.colour_=a},get key(){return this.lowValue_},get lowValue(){return this.lowValue_},get highValue(){return this.data_[this.data_.length-1].high},set leftNode(a){this.leftNode_=a},get leftNode(){return this.leftNode_},
|
||
|
get hasLeftNode(){return void 0!==this.leftNode_},set rightNode(a){this.rightNode_=a},get rightNode(){return this.rightNode_},get hasRightNode(){return void 0!==this.rightNode_},set parentNode(a){this.parentNode_=a},get parentNode(){return this.parentNode_},get isRootNode(){return void 0===this.parentNode_},set maxHighLeft(a){this.maxHighLeft_=a},get maxHighLeft(){return this.maxHighLeft_},set maxHighRight(a){this.maxHighRight_=a},get maxHighRight(){return this.maxHighRight_},get data(){return this.data_},
|
||
|
get isRed(){return this.colour_===a.RED},merge:function(a){this.data_=this.data_.concat(a.data);this.data_.sort(function(a,b){return a.high-b.high})},dump:function(){return 1===this.data_.length?[this.data_[0].low,this.data[0].high]:this.data_.map(function(a){return[a.low,a.high]})}};return{IntervalTree:c}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(){if(!k)if(k=!0,window.requestAnimationFrame)window.requestAnimationFrame(b);else{var a=Date.now()-window.performance.now();window.webkitRequestAnimationFrame(function(e){b(e-a)})}}function c(a,b){try{a.callback.call(a.context,b)}catch(e){tv.b.onAnimationFrameError(e,a.stack)}}function b(a){var b=a+10;k=!1;var n=f;h=e;f=[];e=[];for(var q=n.length||h.length,u=0;u<n.length;u++)c(n[u],a);for(;0<h.length;)c(h.shift(),a);h=void 0;if(!q)for(;0<g.length&&!(c(g.shift()),
|
||
|
window.performance.now()>=b););0<g.length&&d()}function a(a,b){e.push({callback:a,context:b||window,stack:""});d()}var f=[],e=[],g=[],h=void 0,k=!1;return{onAnimationFrameError:function(a,b){b&&console.log(b);a.message?console.error(a.message,a.stack):console.error(a)},requestPreAnimationFrame:function(a,b){f.push({callback:a,context:b||window,stack:""});d()},requestAnimationFrame:a,requestAnimationFrameInThisFrameIfPossible:function(b,e){h?h.push({callback:b,context:e||window,stack:""}):a(b,e)},
|
||
|
requestIdleCallback:function(a,b){g.push({callback:a,context:b||window,stack:""});d()},forcePendingRAFTasksToRun:function(a){k&&b(a)}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(c,b){if(void 0!==c&&void 0===b)throw Error("Almost certainly, you meant to pass a thisArg.");this.runCb_=c;this.thisArg_=b;this.afterTask_=void 0;this.subTasks_=[]}d.prototype={subTask:function(c,b){c instanceof d?this.subTasks_.push(c):this.subTasks_.push(new d(c,b));return this.subTasks_[this.subTasks_.length-1]},run:function(){void 0!==this.runCb_&&this.runCb_.call(this.thisArg_,this);var c=this.subTasks_;this.subTasks_=void 0;if(!c.length)return this.afterTask_;
|
||
|
for(var b=1;b<c.length;b++)c[b-1].afterTask_=c[b];c[c.length-1].afterTask_=this.afterTask_;return c[0]},after:function(c,b){if(this.afterTask_)throw Error("Has an after task already");return this.afterTask_=c instanceof d?c:new d(c,b)}};d.RunSynchronously=function(c){for(;c;)c=c.run()};d.RunWhenIdle=function(c){return new Promise(function(b,a){function f(){try{e=e.run()}catch(c){a(c);console.error(c.stack);return}e?tv.b.requestIdleCallback(f):b()}var e=c;tv.b.requestIdleCallback(f)})};return{Task:d}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(){}function c(a){this.text_=a.toLowerCase();if(!a.length)throw Error("Filter text is empty.");}function b(a){this.text_=a;if(!a.length)throw Error("Filter text is empty.");}d.prototype={__proto__:Object.prototype,matchCounter:function(a){return!0},matchCpu:function(a){return!0},matchProcess:function(a){return!0},matchSlice:function(a){return!0},matchThread:function(a){return!0}};c.prototype={__proto__:d.prototype,matchSlice:function(a){return void 0===a.title?
|
||
|
!1:-1!==a.title.toLowerCase().indexOf(this.text_)}};b.prototype={__proto__:d.prototype,matchSlice:function(a){return a.title===this.text_}};return{TitleFilter:c,ExactTitleFilter:b}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(a,b){this.constructor=a;this.metadata=b}function c(a){if(void 0===a)throw Error("Mode is required");if(!b[a])throw Error("Not a mode.");this.mode_=a;this.defaultMetadata_={};this.defaultTypeInfo_=this.mandatoryBaseClass_=this.defaultConstructor_=void 0;this.frozen_=!1}var b={BASIC_REGISTRY_MODE:!0,TYPE_BASED_REGISTRY_MODE:!0};c.prototype={freeze:function(){if(this.frozen_)throw Error("Frozen");this.frozen_=!0},get mode(){return this.mode_},get defaultMetadata(){return this.defaultMetadata_},
|
||
|
set defaultMetadata(a){if(this.frozen_)throw Error("Frozen");this.defaultMetadata_=a;this.defaultTypeInfo_=void 0},get defaultConstructor(){return this.defaultConstructor_},set defaultConstructor(a){if(this.frozen_)throw Error("Frozen");this.defaultConstructor_=a;this.defaultTypeInfo_=void 0},get defaultTypeInfo(){void 0===this.defaultTypeInfo_&&this.defaultConstructor_&&(this.defaultTypeInfo_=new d(this.defaultConstructor,this.defaultMetadata));return this.defaultTypeInfo_},validateConstructor:function(a){if(this.mandatoryBaseClass){for(var b=
|
||
|
a.prototype.__proto__,e=!1;b;){if(b===this.mandatoryBaseClass.prototype){e=!0;break}b=b.__proto__}if(!e)throw Error(a+"must be subclass of "+registry);}}};return{BASIC_REGISTRY_MODE:"BASIC_REGISTRY_MODE",TYPE_BASED_REGISTRY_MODE:"TYPE_BASED_REGISTRY_MODE",ExtensionRegistryOptions:c,RegisteredTypeInfo:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){var d=tv.b.RegisteredTypeInfo;return{_decorateBasicExtensionRegistry:function(c,b){var a=[];c.registeredTypeInfos_=[];c.register=function(a,e){if(void 0!==c.findIndexOfRegisteredConstructor(a))throw Error("Handler already registered for "+a);b.validateConstructor(a);var g={},h;for(h in b.defaultMetadata)g[h]=b.defaultMetadata[h];if(e)for(h in e)g[h]=e[h];g=new d(a,g);h=new Event("will-register");h.typeInfo=g;c.dispatchEvent(h);c.registeredTypeInfos_.push(g);h=new Event("registry-changed");
|
||
|
c.dispatchEvent(h)};c.pushCleanStateBeforeTest=function(){a.push(c.registeredTypeInfos_);c.registeredTypeInfos_=[];var b=new Event("registry-changed");c.dispatchEvent(b)};c.popCleanStateAfterTest=function(){c.registeredTypeInfos_=a[0];a.splice(0,1);var b=new Event("registry-changed");c.dispatchEvent(b)};c.findIndexOfRegisteredConstructor=function(a){for(var b=0;b<c.registeredTypeInfos_.length;b++)if(c.registeredTypeInfos_[b].constructor==a)return b};c.unregister=function(a){var b=c.findIndexOfRegisteredConstructor(a);
|
||
|
if(void 0===b)throw Error(a+" not registered");c.registeredTypeInfos_.splice(b,1);a=new Event("registry-changed");c.dispatchEvent(a)};c.getAllRegisteredTypeInfos=function(){return c.registeredTypeInfos_};c.findTypeInfo=function(a){a=this.findIndexOfRegisteredConstructor(a);if(void 0!==a)return this.registeredTypeInfos_[a]};c.findTypeInfoMatching=function(a,e){e=e?e:void 0;for(var g=0;g<c.registeredTypeInfos_.length;++g){var d=c.registeredTypeInfos_[g];if(a.call(e,d))return d}return b.defaultTypeInfo}}}});
|
||
|
"use strict";tv.exportTo("tv.b",function(){var d={};return{getCategoryParts:function(c){var b=d[c];if(void 0!==b)return b;b=c.split(",");return d[c]=b}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){var d=tv.b.getCategoryParts,c=tv.b.RegisteredTypeInfo;return{_decorateTypeBasedExtensionRegistry:function(b,a){var f=[];b.registeredTypeInfos_=[];b.categoryPartToTypeInfoMap_={};b.typeNameToTypeInfoMap_={};b.register=function(e,f){a.validateConstructor(e);var d=new c(e,f||a.defaultMetadata);d.typeNames=[];d.categoryParts=[];f&&f.typeName&&d.typeNames.push(f.typeName);f&&f.typeNames&&d.typeNames.push.apply(d.typeNames,f.typeNames);f&&f.categoryParts&&d.categoryParts.push.apply(d.categoryParts,
|
||
|
f.categoryParts);if(0===d.typeNames.length&&0===d.categoryParts.length)throw Error("typeName or typeNames must be provided");d.typeNames.forEach(function(a){if(b.typeNameToTypeInfoMap_[a])throw Error("typeName "+a+" already registered");});d.categoryParts.forEach(function(a){if(b.categoryPartToTypeInfoMap_[a])throw Error("categoryPart "+a+" already registered");});var k=new Event("will-register");k.typeInfo=d;b.dispatchEvent(k);d.typeNames.forEach(function(a){b.typeNameToTypeInfoMap_[a]=d});d.categoryParts.forEach(function(a){b.categoryPartToTypeInfoMap_[a]=
|
||
|
d});b.registeredTypeInfos_.push(d);k=new Event("registry-changed");b.dispatchEvent(k)};b.pushCleanStateBeforeTest=function(){f.push({registeredTypeInfos:b.registeredTypeInfos_,typeNameToTypeInfoMap:b.typeNameToTypeInfoMap_,categoryPartToTypeInfoMap:b.categoryPartToTypeInfoMap_});b.registeredTypeInfos_=[];b.typeNameToTypeInfoMap_={};b.categoryPartToTypeInfoMap_={};var a=new Event("registry-changed");b.dispatchEvent(a)};b.popCleanStateAfterTest=function(){var a=f[0];f.splice(0,1);b.registeredTypeInfos_=
|
||
|
a.registeredTypeInfos;b.typeNameToTypeInfoMap_=a.typeNameToTypeInfoMap;b.categoryPartToTypeInfoMap_=a.categoryPartToTypeInfoMap;a=new Event("registry-changed");b.dispatchEvent(a)};b.unregister=function(a){for(var c=-1,f=0;f<b.registeredTypeInfos_.length;f++)if(b.registeredTypeInfos_[f].constructor==a){c=f;break}if(-1===c)throw Error(a+" not registered");a=b.registeredTypeInfos_[c];b.registeredTypeInfos_.splice(c,1);a.typeNames.forEach(function(a){delete b.typeNameToTypeInfoMap_[a]});a.categoryParts.forEach(function(a){delete b.categoryPartToTypeInfoMap_[a]});
|
||
|
c=new Event("registry-changed");b.dispatchEvent(c)};b.getTypeInfo=function(e,c){if(e)for(var f=d(e),k=0;k<f.length;k++){var l=f[k];if(b.categoryPartToTypeInfoMap_[l])return b.categoryPartToTypeInfoMap_[l]}return b.typeNameToTypeInfoMap_[c]?b.typeNameToTypeInfoMap_[c]:a.defaultTypeInfo};b.getConstructor=function(a,c){var f=b.getTypeInfo(a,c);if(f)return f.constructor}}}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){return{decorateExtensionRegistry:function(d,c){if(d.register)throw Error("Already has registry");c.freeze();if(c.mode==tv.b.BASIC_REGISTRY_MODE)tv.b._decorateBasicExtensionRegistry(d,c);else if(c.mode==tv.b.TYPE_BASED_REGISTRY_MODE)tv.b._decorateTypeBasedExtensionRegistry(d,c);else throw Error("Unrecognized mode");void 0===d.addEventListener&&tv.b.EventTarget.decorate(d)}}});"use strict";
|
||
|
tv.exportTo("tv.c.importer",function(){function d(){}d.prototype={__proto__:Object.prototype,isTraceDataContainer:function(){return!1},extractSubtraces:function(){return[]},importEvents:function(){},importSampleData:function(){},finalizeImport:function(){},joinRefs:function(){}};var c=new tv.b.ExtensionRegistryOptions(tv.b.BASIC_REGISTRY_MODE);c.defaultMetadata={};c.mandatoryBaseClass=d;tv.b.decorateExtensionRegistry(d,c);d.findImporterFor=function(b){var a=d.findTypeInfoMatching(function(a){return a.constructor.canImport(b)});
|
||
|
if(a)return a.constructor};return{Importer:d}});"use strict";tv.exportTo("tv.c.importer",function(){function d(b){this.importPriority=0}var c=tv.c.importer.Importer;d.canImport=function(b){return b instanceof Array&&0==b.length?!0:"string"===typeof b||b instanceof String?0==b.length:!1};d.prototype={__proto__:c.prototype};c.register(d);return{EmptyImporter:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(){this.guid_=tv.b.GUID.allocate();this.selectionState=b.NONE}function c(){}var b={NONE:0,SELECTED:1,HIGHLIGHTED:2,DIMMED:3};d.prototype={get guid(){return this.guid_},get selected(){return this.selectionState===b.SELECTED}};var a=new tv.b.ExtensionRegistryOptions(tv.b.BASIC_REGISTRY_MODE);a.mandatoryBaseType=d;tv.b.decorateExtensionRegistry(c,a);c.addEventListener("will-register",function(a){var b=a.typeInfo.metadata;if(void 0===b.name)throw Error("Registered events must provide name metadata");
|
||
|
if(void 0!==tv.b.findFirstInArray(c.getAllRegisteredTypeInfos(),function(a){return a.metadata.name===b.name}))throw Error("Event type with that name already registered");if(void 0===b.pluralName)throw Error("Registered events must provide pluralName metadata");if(void 0===b.singleViewElementName)throw Error("Registered events must provide singleViewElementName metadata");if(void 0===b.multiViewElementName)throw Error("Registered events must provide multiViewElementName metadata");});var f=void 0;
|
||
|
c.getEventTypeInfoByTypeName=function(a){void 0===f&&(f={},c.getAllRegisteredTypeInfos().forEach(function(a){f[a.metadata.name]=a}));return f[a]};c.addEventListener("registry-changed",function(){f=void 0});return{Event:d,EventRegistry:c,SelectionState:b}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(b,a,c){if(0==b.length)return 1;for(var e=0,g=b.length-1,d,k,l=-1;e<=g;)d=Math.floor((e+g)/2),k=a(b[d])-c,0>k?e=d+1:(0<k||(l=d),g=d-1);return-1!=l?l:e}function c(b,a,c,e,g,h){if(0!=b.length&&!(e>g)){var k=d(b,a,e);if(-1!=k&&(0<k&&a(b[k-1])+c(b[k-1],k-1)>=e&&h(b[k-1]),k!=b.length))for(c=b.length;k<c&&!(a(b[k])>=g);k++)h(b[k])}}return{findLowIndexInSortedArray:d,findLowIndexInSortedIntervals:function(b,a,c,e){var g=d(b,a,e);return 0==g?e>=a(b[0])&&e<a(b[0])+c(b[0],
|
||
|
0)?0:-1:g<b.length?e>=a(b[g])&&e<a(b[g])+c(b[g],g)?g:e>=a(b[g-1])&&e<a(b[g-1])+c(b[g-1],g-1)?g-1:b.length:g==b.length?e>=a(b[g-1])&&e<a(b[g-1])+c(b[g-1],g-1)?g-1:b.length:b.length},iterateOverIntersectingIntervals:c,getIntersectingIntervals:function(b,a,f,e,g){var d=[];c(b,a,f,e,g,function(a){d.push(a)});return d},findClosestElementInSortedArray:function(b,a,c,e){if(0===b.length)return null;var g=d(b,a,c),h=0<g?g-1:0;g===b.length&&--g;var k=Math.abs(c-a(b[h]));a=Math.abs(c-a(b[g]));return k>e&&a>
|
||
|
e?null:b[k<a?h:g]},findClosestIntervalInSortedIntervals:function(b,a,c,e,g){if(0===b.length)return null;var h=d(b,a,e);0<h&&--h;var k=b[h],l=k;e>c(k)&&h+1<b.length&&(l=b[h+1]);b=Math.abs(e-a(l));c=Math.abs(e-c(k));return b>g&&c>g?null:b<c?l:k}}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a){tv.c.trace_model.Event.call(this);this.series_=c;this.timestamp_=b;this.value_=a}d.groupByTimestamp=function(c){for(var b={},a=0;a<c.length;a++){var f=c[a],e=f.timestamp;b[e]||(b[e]=[]);b[e].push(f)}c=tv.b.dictionaryKeys(b);c.sort();f=[];for(a=0;a<c.length;a++)e=c[a],e=b[e],e.sort(function(a,b){return a.series.seriesIndex-b.series.seriesIndex}),f.push(e);return f};d.prototype={__proto__:tv.c.trace_model.Event.prototype,get series(){return this.series_},
|
||
|
get timestamp(){return this.timestamp_},get value(){return this.value_},set timestamp(c){this.timestamp_=c},addBoundsToRange:function(c){c.addValue(this.timestamp)},toJSON:function(){for(var c={},b=Object.keys(this),a=0;a<b.length;a++){var f=b[a];"function"!=typeof this[f]&&(c[f]="series_"==f?this[f].guid:this[f])}return c},getSampleIndex:function(){return tv.b.findLowIndexInSortedArray(this.series.timestamps,function(c){return c},this.timestamp_)}};tv.c.trace_model.EventRegistry.register(d,{name:"counterSample",
|
||
|
pluralName:"counterSamples",singleViewElementName:"tv-c-counter-sample-sub-view",multiViewElementName:"tv-c-counter-sample-sub-view"});return{CounterSample:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a){this.guid_=tv.b.GUID.allocate();this.name_=b;this.color_=a;this.timestamps_=[];this.samples_=[];this.seriesIndex=this.counter=void 0}var c=tv.c.trace_model.CounterSample;d.prototype={__proto__:Object.prototype,toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&(b[e]="counter"==e?this[e].guid:this[e])}return b},get length(){return this.timestamps_.length},get name(){return this.name_},
|
||
|
get color(){return this.color_},get samples(){return this.samples_},get timestamps(){return this.timestamps_},getSample:function(b){return this.samples_[b]},getTimestamp:function(b){return this.timestamps_[b]},addCounterSample:function(b,a){this.timestamps_.push(b);var f=new c(this,b,a);this.samples_.push(f);return f},getStatistics:function(b){for(var a=0,c=Number.MAX_VALUE,e=-Number.MAX_VALUE,g=0;g<b.length;++g)var d=this.getSample(b[g]).value,a=a+d,c=Math.min(d,c),e=Math.max(d,e);return{min:c,max:e,
|
||
|
avg:a/b.length,start:this.getSample(b[0]).value,end:this.getSample(b.length-1).value}},shiftTimestampsForward:function(b){for(var a=0;a<this.timestamps_.length;++a)this.timestamps_[a]+=b,this.samples_[a].timestamp=this.timestamps_[a]},iterateAllEvents:function(b,a){this.samples_.forEach(b,a)}};return{CounterSeries:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f){this.guid_=tv.b.GUID.allocate();this.parent=c;this.id=b;this.category=a||"";this.name=f;this.series_=[];this.totals=[];this.bounds=new tv.b.Range}d.prototype={__proto__:Object.prototype,get guid(){return this.guid_},toJSON:function(){for(var c={},b=Object.keys(this),a=0;a<b.length;a++){var f=b[a];"function"!=typeof this[f]&&(c[f]="parent"==f?this[f].guid:this[f])}return c},set timestamps(c){throw Error("Bad counter API. No cookie.");},
|
||
|
set seriesNames(c){throw Error("Bad counter API. No cookie.");},set seriesColors(c){throw Error("Bad counter API. No cookie.");},set samples(c){throw Error("Bad counter API. No cookie.");},addSeries:function(c){c.counter=this;c.seriesIndex=this.series_.length;this.series_.push(c);return c},getSeries:function(c){return this.series_[c]},get series(){return this.series_},get numSeries(){return this.series_.length},get numSamples(){return 0===this.series_.length?0:this.series_[0].length},get timestamps(){return 0===
|
||
|
this.series_.length?[]:this.series_[0].timestamps},getSampleStatistics:function(c){c.sort();var b=[];this.series_.forEach(function(a){b.push(a.getStatistics(c))});return b},shiftTimestampsForward:function(c){for(var b=0;b<this.series_.length;++b)this.series_[b].shiftTimestampsForward(c)},updateBounds:function(){this.totals=[];this.maxTotal=0;this.bounds.reset();if(0!==this.series_.length){var c=this.series_[0],b=this.series_[this.series_.length-1];this.bounds.addValue(c.getTimestamp(0));this.bounds.addValue(b.getTimestamp(b.length-
|
||
|
1));this.maxTotal=-Infinity;for(var a=0;a<c.length;++a){var f=0;this.series_.forEach(function(b){f+=b.getSample(a).value;this.totals.push(f)}.bind(this));this.maxTotal=Math.max(f,this.maxTotal)}}},iterateAllEvents:function(c,b){for(var a=0;a<this.series_.length;a++)this.series_[a].iterateAllEvents(c,b)}};d.compare=function(c,b){var a=c.parent.compareTo(b);if(0!=a)return a;a=c.name.localeCompare(b.name);return 0==a?c.tid-b.tid:a};return{Counter:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c){tv.c.trace_model.Event.call(this);this.start=c;this.duration=0}d.prototype={__proto__:tv.c.trace_model.Event.prototype,get end(){return this.start+this.duration},addBoundsToRange:function(c){c.addValue(this.start);c.addValue(this.end)},bounds:function(c){var b=Math.round(1E3*this.end),a=Math.round(1E3*c.end);return this.start<=c.start&&b>=a}};return{TimedEvent:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f,e,g,d,k){tv.c.trace_model.TimedEvent.call(this,f);this.category=c||"";this.title=b;this.colorId=a;this.args=e;this.endStackFrame=this.startStackFrame=void 0;this.didNotFinish=!1;void 0!==g&&(this.duration=g);void 0!==d&&(this.cpuStart=d);void 0!==k&&(this.cpuDuration=k)}d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,get analysisTypeName(){return this.title}};tv.c.trace_model.EventRegistry.register(d,{name:"slice",pluralName:"slices",
|
||
|
singleViewElementName:"tv-c-single-slice-sub-view",multiViewElementName:"tv-c-multi-slice-sub-view"});return{Slice:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,f,e,g,d,k){c.call(this,a,f,e,g,d,k);this.thread=b;this.cpuOnWhichThreadWasRunning=void 0}var c=tv.c.trace_model.Slice;d.prototype={__proto__:c.prototype,get analysisTypeName(){return"tv.c.analysis.ThreadTimeSlice"},toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&("thread"==e||"cpuOnWhichThreadWasRunning"==e?this[e]&&(b[e]=this[e].guid):b[e]=this[e])}return b},getAssociatedCpuSlice:function(){if(this.cpuOnWhichThreadWasRunning)for(var b=
|
||
|
this.cpuOnWhichThreadWasRunning.slices,a=0;a<b.length;a++){var c=b[a];if(c.start===this.start&&c.duration===this.duration)return c}},getCpuSliceThatTookCpu:function(){if(!this.cpuOnWhichThreadWasRunning){for(var b=this.thread.indexOfTimeSlice(this),a;0<=b;){var c=this.thread.timeSlices[b];if(c.cpuOnWhichThreadWasRunning){a=c.getAssociatedCpuSlice();break}else b--}if(a&&(b=a.cpu,c=b.indexOf(a),(b=b.slices[c+1])&&1E-5>Math.abs(b.start-a.end)))return b}}};tv.c.trace_model.EventRegistry.register(d,{name:"threadTimeSlice",
|
||
|
pluralName:"threadTimeSlices",singleViewElementName:"tv-c-single-thread-time-slice-sub-view",multiViewElementName:"tv-c-multi-slice-sub-view"});return{ThreadTimeSlice:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,f,e,g,d){c.apply(this,arguments);this.cpu=this.threadThatWasRunning=void 0}var c=tv.c.trace_model.Slice;d.prototype={__proto__:c.prototype,get analysisTypeName(){return"tv.c.analysis.CpuSlice"},toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&("cpu"==e||"threadThatWasRunning"==e?this[e]&&(b[e]=this[e].guid):b[e]=this[e])}return b},getAssociatedTimeslice:function(){if(this.threadThatWasRunning)for(var b=
|
||
|
this.threadThatWasRunning.timeSlices,a=0;a<b.length;a++){var c=b[a];if(c.start===this.start&&c.duration===this.duration)return c}}};tv.c.trace_model.EventRegistry.register(d,{name:"cpuSlice",pluralName:"cpuSlices",singleViewElementName:"tv-c-single-cpu-slice-sub-view",multiViewElementName:"tv-c-multi-slice-sub-view"});return{CpuSlice:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a){if(void 0===b||void 0===a)throw Error("Missing arguments");this.kernel=b;this.cpuNumber=a;this.slices=[];this.counters={};this.bounds=new tv.b.Range;this.lastActiveArgs_=this.lastActiveName_=this.lastActiveThread_=this.lastActiveTimestamp_=this.samples_=void 0}var c=tv.c.trace_model.Counter;d.prototype={getOrCreateCounter:function(b,a){var f;f=b.length?b+"."+a:a;this.counters[f]||(this.counters[f]=new c(this,f,b,a));return this.counters[f]},
|
||
|
shiftTimestampsForward:function(b){for(var a=0;a<this.slices.length;a++)this.slices[a].start+=b;for(var c in this.counters)this.counters[c].shiftTimestampsForward(b)},updateBounds:function(){this.bounds.reset();this.slices.length&&(this.bounds.addValue(this.slices[0].start),this.bounds.addValue(this.slices[this.slices.length-1].end));for(var b in this.counters)this.counters[b].updateBounds(),this.bounds.addRange(this.counters[b].bounds);this.samples_&&this.samples_.length&&(this.bounds.addValue(this.samples_[0].start),
|
||
|
this.bounds.addValue(this.samples_[this.samples_.length-1].end))},createSubSlices:function(){this.samples_=this.kernel.model.samples.filter(function(b){return b.cpu==this},this)},addCategoriesToDict:function(b){for(var a=0;a<this.slices.length;a++)b[this.slices[a].category]=!0;for(var c in this.counters)b[this.counters[c].category]=!0;for(a=0;a<this.samples_.length;a++)b[this.samples_[a].category]=!0},get userFriendlyName(){return"CPU "+this.cpuNumber},toJSON:function(){for(var b={},a=Object.keys(this),
|
||
|
c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&"kernel"!=e&&(b[e]=this[e])}return b},indexOf:function(b){var a=tv.b.findLowIndexInSortedArray(this.slices,function(a){return a.start},b.start);return this.slices[a]!==b?void 0:a},iterateAllEvents:function(b,a){this.slices.forEach(b,a);for(var c in this.counters)this.counters[c].iterateAllEvents(b,a)},closeActiveThread:function(b,a){if(void 0!=this.lastActiveThread_&&0!=this.lastActiveThread_){if(b<this.lastActiveTimestamp_)throw Error("The end timestamp of a thread running on CPU "+
|
||
|
this.cpuNumber+" is before its start timestamp.");for(var c in a)this.lastActiveArgs_[c]=a[c];c=b-this.lastActiveTimestamp_;c=new tv.c.trace_model.CpuSlice("",this.lastActiveName_,tv.b.ui.getStringColorId(this.lastActiveName_),this.lastActiveTimestamp_,this.lastActiveArgs_,c);c.cpu=this;this.slices.push(c);this.lastActiveArgs_=this.lastActiveName_=this.lastActiveThread_=this.lastActiveTimestamp_=void 0}},switchActiveThread:function(b,a,c,e,g){this.closeActiveThread(b,a);this.lastActiveTimestamp_=
|
||
|
b;this.lastActiveThread_=c;this.lastActiveName_=e;this.lastActiveArgs_=g},get samples(){return this.samples_}};d.compare=function(b,a){return b.cpuNumber-a.cpuNumber};return{Cpu:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,c){tv.c.trace_model.Event.call(this);this.objectInstance=b;this.ts=a;this.args=c}d.prototype={__proto__:tv.c.trace_model.Event.prototype,preInitialize:function(){},initialize:function(){},addBoundsToRange:function(b){b.addValue(this.ts)}};tv.c.trace_model.EventRegistry.register(d,{name:"objectSnapshot",pluralName:"objectSnapshots",singleViewElementName:"tv-c-single-object-snapshot-sub-view",multiViewElementName:"tv-c-multi-object-sub-view"});
|
||
|
var c=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);c.mandatoryBaseClass=d;c.defaultConstructor=d;tv.b.decorateExtensionRegistry(d,c);return{ObjectSnapshot:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,c,e,g,d){tv.c.trace_model.Event.call(this);this.parent=b;this.id=a;this.category=c;this.baseTypeName=d?d:e;this.name=e;this.creationTs=g;this.creationTsWasExplicit=!1;this.deletionTs=Number.MAX_VALUE;this.deletionTsWasExplicit=!1;this.colorId=0;this.bounds=new tv.b.Range;this.snapshots=[];this.hasImplicitSnapshots=!1}d.prototype={__proto__:tv.c.trace_model.Event.prototype,get typeName(){return this.name},addBoundsToRange:function(b){b.addRange(this.bounds)},
|
||
|
addSnapshot:function(b,a,c,e){if(b<this.creationTs)throw Error("Snapshots must be >= instance.creationTs");if(b>=this.deletionTs)throw Error("Snapshots cannot be added after an objects deletion timestamp.");var g;if(0<this.snapshots.length){g=this.snapshots[this.snapshots.length-1];if(g.ts==b)throw Error("Snapshots already exists at this time!");if(b<g.ts)throw Error("Snapshots must be added in increasing timestamp order");}if(c&&this.name!=c){if(!e)throw Error("Must provide base type name for name update");
|
||
|
if(this.baseTypeName!=e)throw Error("Cannot update type name: base types dont match");this.name=c}b=new (tv.c.trace_model.ObjectSnapshot.getConstructor(this.category,this.name))(this,b,a);this.snapshots.push(b);return b},wasDeleted:function(b){var a;if(0<this.snapshots.length&&(a=this.snapshots[this.snapshots.length-1],a.ts>b))throw Error("Instance cannot be deleted at ts="+b+". A snapshot exists that is older.");this.deletionTs=b;this.deletionTsWasExplicit=!0},preInitialize:function(){for(var b=
|
||
|
0;b<this.snapshots.length;b++)this.snapshots[b].preInitialize()},initialize:function(){for(var b=0;b<this.snapshots.length;b++)this.snapshots[b].initialize()},getSnapshotAt:function(b){if(b<this.creationTs){if(this.creationTsWasExplicit)throw Error("ts must be within lifetime of this instance");return this.snapshots[0]}if(b>this.deletionTs)throw Error("ts must be within lifetime of this instance");var a=this.snapshots;b=tv.b.findLowIndexInSortedIntervals(a,function(a){return a.ts},function(b,e){return e==
|
||
|
a.length-1?a[e].objectInstance.deletionTs:a[e+1].ts-a[e].ts},b);return 0>b?this.snapshots[0]:b>=this.snapshots.length?this.snapshots[this.snapshots.length-1]:this.snapshots[b]},updateBounds:function(){this.bounds.reset();this.bounds.addValue(this.creationTs);this.deletionTs!=Number.MAX_VALUE?this.bounds.addValue(this.deletionTs):0<this.snapshots.length&&this.bounds.addValue(this.snapshots[this.snapshots.length-1].ts)},shiftTimestampsForward:function(b){this.creationTs+=b;this.deletionTs!=Number.MAX_VALUE&&
|
||
|
(this.deletionTs+=b);this.snapshots.forEach(function(a){a.ts+=b})}};tv.c.trace_model.EventRegistry.register(d,{name:"objectInstance",pluralName:"objectInstances",singleViewElementName:"tv-c-single-object-instance-sub-view",multiViewElementName:"tv-c-multi-object-sub-view"});var c=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);c.mandatoryBaseClass=d;c.defaultConstructor=d;tv.b.decorateExtensionRegistry(d,c);return{ObjectInstance:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a){this.createObjectInstanceFunction_=c;this.parent=b;this.id=a;this.instances=[]}d.prototype={idWasCreated:function(c,b,a){if(0==this.instances.length)return this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,c,b,a)),this.instances[0].creationTsWasExplicit=!0,this.instances[0];var f=this.instances[this.instances.length-1];if(a<f.deletionTs)throw Error("Mutation of the TimeToObjectInstanceMap must be done in ascending timestamp order.");
|
||
|
f=this.createObjectInstanceFunction_(this.parent,this.id,c,b,a);f.creationTsWasExplicit=!0;this.instances.push(f);return f},addSnapshot:function(c,b,a,f,e){0==this.instances.length&&this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,c,b,a,e));var g=tv.b.findLowIndexInSortedIntervals(this.instances,function(a){return a.creationTs},function(a){return a.deletionTs-a.creationTs},a);if(0>g){g=this.instances[0];if(a>g.deletionTs||g.creationTsWasExplicit)throw Error("At the provided timestamp, no instance was still alive");
|
||
|
if(0!=g.snapshots.length)throw Error("Cannot shift creationTs forward, snapshots have been added. First snap was at ts="+g.snapshots[0].ts+" and creationTs was "+g.creationTs);g.creationTs=a}else if(g>=this.instances.length)if(g=this.instances[this.instances.length-1],a>=g.deletionTs)g=this.createObjectInstanceFunction_(this.parent,this.id,c,b,a,e),this.instances.push(g);else{for(var d,g=this.instances.length-1;0<=g;g--){c=this.instances[g];if(a>=c.deletionTs)break;0==c.creationTsWasExplicit&&0==
|
||
|
c.snapshots.length&&(d=g)}if(void 0===d)throw Error("Cannot add snapshot. No instance was alive that was mutable.");g=this.instances[d];g.creationTs=a}else g=this.instances[g];return g.addSnapshot(a,f,b,e)},get lastInstance(){return 0==this.instances.length?void 0:this.instances[this.instances.length-1]},idWasDeleted:function(c,b,a){0==this.instances.length&&this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,c,b,a));var f=this.instances[this.instances.length-1];if(a<f.creationTs)throw Error("Cannot delete a id before it was crated");
|
||
|
if(f.deletionTs==Number.MAX_VALUE)return f.wasDeleted(a),f;if(a<f.deletionTs)throw Error("id was already deleted earlier.");f=this.createObjectInstanceFunction_(this.parent,this.id,c,b,a);this.instances.push(f);f.wasDeleted(a);return f},getInstanceAt:function(c){c=tv.b.findLowIndexInSortedIntervals(this.instances,function(b){return b.creationTs},function(b){return b.deletionTs-b.creationTs},c);return 0>c?this.instances[0].creationTsWasExplicit?void 0:this.instances[0]:c>=this.instances.length?void 0:
|
||
|
this.instances[c]},logToConsole:function(){for(var c=0;c<this.instances.length;c++){var b=this.instances[c],a="",f="";b.creationTsWasExplicit&&(a="(explicitC)");b.deletionTsWasExplicit&&(f="(explicit)");console.log(b.creationTs,a,b.deletionTs,f,b.category,b.name,b.snapshots.length+" snapshots")}}};return{TimeToObjectInstanceMap:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c){this.parent=c;this.bounds=new tv.b.Range;this.instanceMapsById_={};this.instancesByTypeName_={};this.createObjectInstance_=this.createObjectInstance_.bind(this)}d.prototype={__proto__:Object.prototype,createObjectInstance_:function(c,b,a,f,e,g){c=new (tv.c.trace_model.ObjectInstance.getConstructor(a,f))(c,b,a,f,e,g);b=c.typeName;a=this.instancesByTypeName_[b];a||(a=[],this.instancesByTypeName_[b]=a);a.push(c);return c},getOrCreateInstanceMap_:function(c){var b=
|
||
|
this.instanceMapsById_[c];if(b)return b;b=new tv.c.trace_model.TimeToObjectInstanceMap(this.createObjectInstance_,this.parent,c);return this.instanceMapsById_[c]=b},idWasCreated:function(c,b,a,f){return this.getOrCreateInstanceMap_(c).idWasCreated(b,a,f)},addSnapshot:function(c,b,a,f,e,g){c=this.getOrCreateInstanceMap_(c).addSnapshot(b,a,f,e,g);if(c.objectInstance.category!=b)throw Error("Added snapshot name="+a+" with cat="+b+" impossible. It instance was created/snapshotted with cat="+c.objectInstance.category+
|
||
|
" name="+c.objectInstance.name);if(g&&c.objectInstance.baseTypeName!=g)throw Error("Could not add snapshot with baseTypeName="+g+". It was previously created with name="+c.objectInstance.baseTypeName);if(c.objectInstance.name!=a)throw Error("Could not add snapshot with name="+a+". It was previously created with name="+c.objectInstance.name);return c},idWasDeleted:function(c,b,a,f){if(c=this.getOrCreateInstanceMap_(c).idWasDeleted(b,a,f)){if(c.category!=b)throw Error("Deleting object "+c.name+" with a different category than when it was created. It previous had cat="+
|
||
|
c.category+" but the delete command had cat="+b);if(c.baseTypeName!=a)throw Error("Deletion requested for name="+a+" could not proceed: An existing object with baseTypeName="+c.baseTypeName+" existed.");}},autoDeleteObjects:function(c){tv.b.iterItems(this.instanceMapsById_,function(b,a){var f=a.lastInstance;f.deletionTs==Number.MAX_VALUE&&(a.idWasDeleted(f.category,f.name,c),f.deletionTsWasExplicit=!1)})},getObjectInstanceAt:function(c,b){var a=this.instanceMapsById_[c];return a?a.getInstanceAt(b):
|
||
|
void 0},getSnapshotAt:function(c,b){var a=this.getObjectInstanceAt(c,b);return a?a.getSnapshotAt(b):void 0},iterObjectInstances:function(c,b){b=b||this;tv.b.iterItems(this.instanceMapsById_,function(a,f){f.instances.forEach(c,b)})},getAllObjectInstances:function(){var c=[];this.iterObjectInstances(function(b){c.push(b)});return c},getAllInstancesNamed:function(c){return this.instancesByTypeName_[c]},getAllInstancesByTypeName:function(){return this.instancesByTypeName_},preInitializeAllObjects:function(){this.iterObjectInstances(function(c){c.preInitialize()})},
|
||
|
initializeAllObjects:function(){this.iterObjectInstances(function(c){c.initialize()})},initializeInstances:function(){this.iterObjectInstances(function(c){c.initialize()})},updateBounds:function(){this.bounds.reset();this.iterObjectInstances(function(c){c.updateBounds();this.bounds.addRange(c.bounds)},this)},shiftTimestampsForward:function(c){this.iterObjectInstances(function(b){b.shiftTimestampsForward(c)})},addCategoriesToDict:function(c){this.iterObjectInstances(function(b){c[b.category]=!0})},
|
||
|
toJSON:function(){return{}},iterateAllEvents:function(c,b){this.iterObjectInstances(function(a){c.call(this,a);a.snapshots.forEach(c)},b)}};return{ObjectCollection:d}});"use strict";tv.exportTo("tv.c.trace_model",function(){function d(){}d.prototype={get stableId(){throw Error("Not implemented");}};return{EventContainer:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,f,e,g,d,k,l){c.call(this,b,a,f,e,g,d,k,l);this.subSlices=[]}var c=tv.c.trace_model.Slice;d.prototype={__proto__:c.prototype};return{ThreadSlice:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(a){return"rgb("+a.r+","+a.g+","+a.b+")"}function c(a){for(var b=0,e=0;e<a.length;++e)b=(b+37*b+11*a.charCodeAt(e))%4294967295;return b}var b=[{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},{r:199,g:155,b:125}],a=b.length-5,f=b.length,e=b.concat(b.map(function(a){var b;b=240<=a.r&&240<=a.g&&240<=a.b?-.2:.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))}})),g=e.map(d),h={};return{colorToRGBString:d,colorToRGBAString:function(a,b){return"rgba("+a.r+","+a.g+","+a.b+","+b+")"},getRawColorPalette:function(){return e},getColorPalette:function(){return g},paletteProperties:{numRegularColorIds:a,highlightIdBoost:f},getColorPaletteHighlightIdBoost:function(){return f},getColorIdByName:function(b){if("iowait"==b)return a;if("running"==b)return a+1;if("runnable"==b)return a+2;
|
||
|
if("sleeping"==b)return a+3;if("UNKNOWN"==b)return a+4;throw Error("Unrecognized color ")+b;},getStringHash:c,getStringColorId:function(b){if(void 0===h[b]){var e=c(b);h[b]=e%a}return h[b]}}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){var d=tv.b.ui.getRawColorPalette(),c=tv.b.ui.getColorPalette(),b=tv.c.trace_model.SelectionState;return{EventPresenter:{getAlpha_:function(a){return a.selectionState===b.DIMMED?.3:1},getColorIdOffset_:function(a){return a.selectionState===b.SELECTED?tv.b.ui.paletteProperties.highlightIdBoost:0},getTextColor:function(a){return a.selectionState===b.DIMMED?"rgb(60,60,60)":"rgb(0,0,0)"},getSliceColorId:function(a){return a.colorId+this.getColorIdOffset_(a)},getSliceAlpha:function(a,
|
||
|
b){var e=this.getAlpha_(a);b&&(e*=.3);return e},getInstantSliceColor:function(a){var b=a.colorId+this.getColorIdOffset_(a);return tv.b.ui.colorToRGBAString(d[b],this.getAlpha_(a))},getObjectInstanceColor:function(a){a=a.colorId+this.getColorIdOffset_(a);return tv.b.ui.colorToRGBAString(d[a],.25)},getObjectSnapshotColor:function(a){a=a.objectInstance.colorId+this.getColorIdOffset_(a);return c[a]},getCounterSeriesColor:function(a,b,e){b={selectionState:b};return tv.b.ui.colorToRGBAString(d[a+this.getColorIdOffset_(b)],
|
||
|
this.getAlpha_(b)*(void 0!==e?e:1))},getBarSnapshotColor:function(a,b){var e=(a.objectInstance.colorId+b)%tv.b.ui.paletteProperties.numRegularColorIds,e=e+this.getColorIdOffset_(a);return tv.b.ui.colorToRGBAString(d[e],this.getAlpha_(a))}}}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,f){this.guid_=tv.b.GUID.allocate();this.parentThread_=b;this.sliceConstructor=a||c;this.openPartialSlices_=[];this.slices=[];this.bounds=new tv.b.Range;this.topLevelSlices=[];this.name_=f}var c=tv.c.trace_model.Slice;d.prototype={__proto__:tv.c.trace_model.EventContainer.prototype,get guid(){return this.guid_},get parentThread(){return this.parentThread_},get model(){return this.parentThread_.parent.model},get stableId(){return this.parentThread_.stableId+
|
||
|
".SliceGroup"},getSettingsKey:function(){if(this.name_){var b=this.parentThread_.getSettingsKey();return b?b+"."+this.name:void 0}},get length(){return this.slices.length},pushSlice:function(b){this.slices.push(b);return b},pushSlices:function(b){this.slices.push.apply(this.slices,b)},beginSlice:function(b,a,c,e,g){if(this.openPartialSlices_.length&&c<this.openPartialSlices_[this.openPartialSlices_.length-1].start)throw Error("Slices must be added in increasing timestamp order");var d=tv.b.ui.getStringColorId(a);
|
||
|
b=new this.sliceConstructor(b,a,d,c,e?e:{},null,g);this.openPartialSlices_.push(b);b.didNotFinish=!0;this.pushSlice(b);return b},isTimestampValidForBeginOrEnd:function(b){return this.openPartialSlices_.length?b>=this.openPartialSlices_[this.openPartialSlices_.length-1].start:!0},get openSliceCount(){return this.openPartialSlices_.length},get mostRecentlyOpenedPartialSlice(){return this.openPartialSlices_.length?this.openPartialSlices_[this.openPartialSlices_.length-1]:void 0},endSlice:function(b,
|
||
|
a){if(!this.openSliceCount)throw Error("endSlice called without an open slice");var c=this.openPartialSlices_[this.openSliceCount-1];this.openPartialSlices_.splice(this.openSliceCount-1,1);if(b<c.start)throw Error("Slice "+c.title+" end time is before its start.");c.duration=b-c.start;c.didNotFinish=!1;a&&void 0!==c.cpuStart&&(c.cpuDuration=a-c.cpuStart);return c},pushCompleteSlice:function(b,a,c,e,g,d,k){var l=tv.b.ui.getStringColorId(a);b=new this.sliceConstructor(b,a,l,c,k?k:{},e,g,d);void 0===
|
||
|
e&&(b.didNotFinish=!0);this.pushSlice(b);return b},autoCloseOpenSlices:function(b){b||(this.updateBounds(),b=this.bounds.max);for(var a=0;a<this.slices.length;a++){var c=this.slices[a];c.didNotFinish&&(c.duration=b-c.start)}this.openPartialSlices_=[]},shiftTimestampsForward:function(b){for(var a=0;a<this.slices.length;a++){var c=this.slices[a];c.start+=b}},updateBounds:function(){this.bounds.reset();for(var b=0;b<this.slices.length;b++)this.bounds.addValue(this.slices[b].start),this.bounds.addValue(this.slices[b].end)},
|
||
|
copySlice:function(b){var a=new this.sliceConstructor(b.category,b.title,b.colorId,b.start,b.args,b.duration,b.cpuStart,b.cpuDuration);a.didNotFinish=b.didNotFinish;return a},iterateAllEvents:function(b,a){this.slices.forEach(b,a)},iterateAllEventContainers:function(b){b(this)},toJSON:function(){return{}},createSubSlices:function(){function b(a,e){if(a.bounds(e)){if(a.subSlices&&0<a.subSlices.length&&b(a.subSlices[a.subSlices.length-1],e))return!0;a.selfTime||(a.selfTime=a.duration);!a.cpuSelfTime&&
|
||
|
a.cpuDuration&&(a.cpuSelfTime=a.cpuDuration);e.parentSlice=a;a.subSlices||(a.subSlices=[]);a.subSlices.push(e);a.selfTime-=e.duration;e.cpuDuration&&(a.cpuSelfTime-=e.cpuDuration);return!0}return!1}if(this.slices.length){for(var a=[],c=0;c<this.slices.length;c++)this.slices[c].subSlices&&this.slices[c].subSlices.splice(0,this.slices[c].subSlices.length),a.push(c);var e=this.slices;a.sort(function(a,b){var c=e[a],f=e[b];return c.start!=f.start?c.start-f.start:a-b});var g=this.slices[a[0]];this.topLevelSlices=
|
||
|
[];this.topLevelSlices.push(g);for(c=1;c<a.length;c++){var d=this.slices[a[c]];b(g,d)||(g=d,this.topLevelSlices.push(g))}}}};d.merge=function(b,a){if(0<b.openPartialSlices_.length)throw Error("groupA has open partial slices");if(0<a.openPartialSlices_.length)throw Error("groupB has open partial slices");if(b.parentThread!=a.parentThread)throw Error("Different parent threads. Cannot merge");for(var c=new d(b.parentThread),e=b.slices,g=a.slices,h=0,k=0,l=[],m=[],n=function(a){for(var b=0;b<m.length;b++){var e=
|
||
|
m[b],g=e.end;if(a<e.start||g<a)throw Error("slice should not be split");var d=c.copySlice(e);d.start=a;d.duration=g-a;-1==d.title.indexOf(" (cont.)")&&(d.title+=" (cont.)");e.duration=a-e.start;m[b]=d;c.pushSlice(d)}},q=function(a){for(;0<l.length||0<m.length;){var b=l[l.length-1],e=m[m.length-1],b=b&&b.end,e=e&&e.end;if((void 0===b||b>a)&&(void 0===e||e>a))break;void 0===e||b<e?(n(b),l.pop()):m.pop()}};h<e.length||k<g.length;){var u=e[h],v=g[k];void 0===u||void 0!==v&&u.start>v.start?(u=c.copySlice(v),
|
||
|
v=!0,k++):(u=c.copySlice(u),v=!1,h++);q(u.start);c.pushSlice(u);v?m.push(u):(n(u.start),l.push(u))}q();return c};return{SliceGroup:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a,c,e,g){tv.c.trace_model.Slice.apply(this,arguments)}d.prototype={__proto__:tv.c.trace_model.Slice.prototype,toJSON:function(){for(var b={},a=Object.keys(this),c=0;c<a.length;c++){var e=a[c];"function"!=typeof this[e]&&(b[e]="startThread"==e||"endThread"==e?this[e].guid:this[e])}return b},id:void 0,startThread:void 0,endThread:void 0,subSlices:void 0,get viewSubGroupTitle(){return this.title}};tv.c.trace_model.EventRegistry.register(d,{name:"asyncSlice",
|
||
|
pluralName:"asyncSlices",singleViewElementName:"tv-c-single-slice-sub-view",multiViewElementName:"tv-c-multi-slice-sub-view"});var c=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);c.mandatoryBaseClass=d;c.defaultConstructor=d;tv.b.decorateExtensionRegistry(d,c);return{AsyncSlice:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b){this.parentThread_=c;this.guid_=tv.b.GUID.allocate();this.slices=[];this.bounds=new tv.b.Range;this.name_=b;this.viewSubGroups_=void 0}d.prototype={__proto__:tv.c.trace_model.EventContainer.prototype,get guid(){return this.guid_},get parentThread(){return this.parentThread_},get model(){return this.parentThread_.parent.model},get stableId(){return this.parentThread_.stableId+".AsyncSliceGroup"},getSettingsKey:function(){if(this.name_){var c=
|
||
|
this.parentThread_.getSettingsKey();return c?c+"."+this.name_:void 0}},push:function(c){this.slices.push(c)},get length(){return this.slices.length},shiftTimestampsForward:function(c){for(var b=0;b<this.slices.length;b++){var a=this.slices[b];a.start+=c;var f=function(a){if(void 0!==a&&0!==a.length)for(var b=0;b<a.length;b++)a[b].start+=c,f(a[b].subSlices)};f(a.subSlices)}},updateBounds:function(){this.bounds.reset();for(var c=0;c<this.slices.length;c++)this.bounds.addValue(this.slices[c].start),
|
||
|
this.bounds.addValue(this.slices[c].end)},get viewSubGroups(){if(void 0===this.viewSubGroups_){for(var c="",c=void 0!==this.name?this.name+".":"",b={},a=0;a<this.slices.length;++a){var f=this.slices[a],e=f.viewSubGroupTitle;b[e]||(b[e]=new d(this.parentThread_,c+e));b[e].slices.push(f)}this.viewSubGroups_=tv.b.dictionaryValues(b)}return this.viewSubGroups_},iterateAllEvents:function(c,b){for(var a=0;a<this.slices.length;a++){var f=this.slices[a];c.call(b,f);f.subSlices&&f.subSlices.forEach(c,b)}},
|
||
|
iterateAllEventContainers:function(c){c(this)},toJSON:function(){return{}}};return{AsyncSliceGroup:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(a,c,f,d,l,m,n,q){b.call(this,a,c,f,d,l,m,n,q);this.subSlices=[]}function c(b,c){function h(a,b,e,c,f,g,h,E){d.call(this,a,b,e,c,f,g,h,E);this.parentThread=k}this.guid_=tv.b.GUID.allocate();if(!b)throw Error("Parent must be provided.");this.parent=b;this.sortIndex=0;this.tid=c;this.samples_=this.name=void 0;var k=this;h.prototype={__proto__:d.prototype};this.sliceGroup=new a(this,h,"slices");this.timeSlices=void 0;this.kernelSliceGroup=new a(this,
|
||
|
void 0,"kernel-slices");this.asyncSliceGroup=new f(this,"async-slices");this.bounds=new tv.b.Range}var b=tv.c.trace_model.Slice,a=tv.c.trace_model.SliceGroup,f=tv.c.trace_model.AsyncSliceGroup,d=tv.c.trace_model.ThreadSlice;d.prototype={__proto__:b.prototype};c.prototype={__proto__:tv.c.trace_model.EventContainer.prototype,get guid(){return this.guid_},get stableId(){return this.parent.stableId+"."+this.tid},compareTo:function(a){return c.compare(this,a)},toJSON:function(){for(var a={},b=Object.keys(this),
|
||
|
c=0;c<b.length;c++){var f=b[c];"function"!=typeof this[f]&&(a[f]="parent"==f?this[f].guid:this[f])}return a},shiftTimestampsForward:function(a){this.sliceGroup.shiftTimestampsForward(a);if(this.timeSlices)for(var b=0;b<this.timeSlices.length;b++)this.timeSlices[b].start+=a;this.kernelSliceGroup.shiftTimestampsForward(a);this.asyncSliceGroup.shiftTimestampsForward(a)},get isEmpty(){return this.sliceGroup.length||this.sliceGroup.openSliceCount||this.timeSlices&&this.timeSlices.length||this.kernelSliceGroup.length||
|
||
|
this.asyncSliceGroup.length||this.samples_.length?!1:!0},updateBounds:function(){this.bounds.reset();this.sliceGroup.updateBounds();this.bounds.addRange(this.sliceGroup.bounds);this.kernelSliceGroup.updateBounds();this.bounds.addRange(this.kernelSliceGroup.bounds);this.asyncSliceGroup.updateBounds();this.bounds.addRange(this.asyncSliceGroup.bounds);this.timeSlices&&this.timeSlices.length&&(this.bounds.addValue(this.timeSlices[0].start),this.bounds.addValue(this.timeSlices[this.timeSlices.length-1].end));
|
||
|
this.samples_&&this.samples_.length&&(this.bounds.addValue(this.samples_[0].start),this.bounds.addValue(this.samples_[this.samples_.length-1].end))},addCategoriesToDict:function(a){for(var b=0;b<this.sliceGroup.length;b++)a[this.sliceGroup.slices[b].category]=!0;for(b=0;b<this.kernelSliceGroup.length;b++)a[this.kernelSliceGroup.slices[b].category]=!0;for(b=0;b<this.asyncSliceGroup.length;b++)a[this.asyncSliceGroup.slices[b].category]=!0;if(this.samples_)for(b=0;b<this.samples_.length;b++)a[this.samples_[b].category]=
|
||
|
!0},autoCloseOpenSlices:function(a){this.sliceGroup.autoCloseOpenSlices(a);this.kernelSliceGroup.autoCloseOpenSlices(a)},mergeKernelWithUserland:function(){if(0<this.kernelSliceGroup.length){var b=a.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=b.slices;this.kernelSliceGroup=new a(this);this.updateBounds()}},createSubSlices:function(){this.sliceGroup.createSubSlices();this.samples_=this.parent.model.samples.filter(function(a){return a.thread==this},this)},get userFriendlyName(){return this.name||
|
||
|
this.tid},get userFriendlyDetails(){return"tid: "+this.tid+(this.name?", name: "+this.name:"")},getSettingsKey:function(){if(this.name){var a=this.parent.getSettingsKey();return a?a+"."+this.name:void 0}},indexOfTimeSlice:function(a){var b=tv.b.findLowIndexInSortedArray(this.timeSlices,function(a){return a.start},a.start);return this.timeSlices[b]!==a?void 0:b},iterateAllEvents:function(a,b){this.sliceGroup.iterateAllEvents(a,b);this.kernelSliceGroup.iterateAllEvents(a,b);this.asyncSliceGroup.iterateAllEvents(a,
|
||
|
b);this.timeSlices&&this.timeSlices.length&&this.timeSlices.forEach(a,b)},iterateAllPersistableObjects:function(a){a(this);this.sliceGroup.length&&a(this.sliceGroup);this.asyncSliceGroup.viewSubGroups.forEach(a)},iterateAllEventContainers:function(a){a(this);this.sliceGroup.length&&this.sliceGroup.iterateAllEventContainers(a);this.kernelSliceGroup.length&&this.kernelSliceGroup.iterateAllEventContainers(a);this.asyncSliceGroup.length&&this.asyncSliceGroup.iterateAllEventContainers(a)},get samples(){return this.samples_}};
|
||
|
c.compare=function(a,b){var c=a.parent.compareTo(b.parent);return c||(c=a.sortIndex-b.sortIndex)?c:(c=tv.b.comparePossiblyUndefinedValues(a.name,b.name,function(a,b){return a.localeCompare(b)}))?c:a.tid-b.tid};return{Thread:c}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(b){this.model=b;this.objectsByKey_=[];this.nonuniqueKeys_=[];this.buildObjectsByKeyMap_();this.removeNonuniqueKeysFromSettings_();this.ephemeralSettingsByGUID_={}}var c=tv.b.Settings;d.prototype={buildObjectsByKeyMap_:function(){var b=[];this.model.iterateAllPersistableObjects(function(a){b.push(a)});for(var a={},c=0;c<b.length;c++){var e=b[c],g=e.getSettingsKey();g&&(a[g]=void 0===a[g]?e:"nonuniqueKey")}var d={};tv.b.dictionaryKeys(a).forEach(function(b){"nonuniqueKey"===
|
||
|
a[b]&&(delete a[b],d[b]=!0)});this.nonuniqueKeys=d;this.objectsByKey_=a},removeNonuniqueKeysFromSettings_:function(){var b=c.get("trace_model_settings",{}),a=!1;tv.b.dictionaryKeys(b).forEach(function(c){this.nonuniqueKeys[c]&&(a=!0,delete b[c])},this);a&&c.set("trace_model_settings",b)},hasUniqueSettingKey:function(b){return(b=b.getSettingsKey())?void 0!==this.objectsByKey_[b]:!1},getSettingFor:function(b,a,f){var e=b.getSettingsKey();if(!e||!this.objectsByKey_[e])return b=this.getEphemeralSettingsFor_(b),
|
||
|
a=b[a],void 0!==a?a:f;b=c.get("trace_model_settings",{});b[e]||(b[e]={});a=b[e][a];return void 0!==a?a:f},setSettingFor:function(b,a,f){var e=b.getSettingsKey();e&&this.objectsByKey_[e]?(b=c.get("trace_model_settings",{}),b[e]||(b[e]={}),b[e][a]!==f&&(b[e][a]=f,c.set("trace_model_settings",b))):this.getEphemeralSettingsFor_(b)[a]=f},getEphemeralSettingsFor_:function(b){if(void 0===b.guid)throw Error("Only objects with GUIDs can be persisted");void 0===this.ephemeralSettingsByGUID_[b.guid]&&(this.ephemeralSettingsByGUID_[b.guid]=
|
||
|
{});return this.ephemeralSettingsByGUID_[b.guid]}};return{TraceModelSettings:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(a){if(!a)throw Error("Must provide a model");this.guid_=tv.b.GUID.allocate();this.model=a;this.threads={};this.counters={};this.objects=new tv.c.trace_model.ObjectCollection(this);this.bounds=new tv.b.Range;this.sortIndex=0}var c=tv.c.trace_model.Thread,b=tv.c.trace_model.Counter;d.compare=function(a,b){return a.sortIndex-b.sortIndex};d.prototype={__proto__:tv.c.trace_model.EventContainer.prototype,get guid(){return this.guid_},get stableId(){throw Error("Not implemented");
|
||
|
},get numThreads(){var a=0,b;for(b in this.threads)a++;return a},toJSON:function(){for(var a={},b=Object.keys(this),e=0;e<b.length;e++){var c=b[e];"function"!=typeof this[c]&&"model"!=c&&(a[c]=this[c])}return a},shiftTimestampsForward:function(a){for(var b in this.threads)this.threads[b].shiftTimestampsForward(a);for(var e in this.counters)this.counters[e].shiftTimestampsForward(a);this.objects.shiftTimestampsForward(a)},autoCloseOpenSlices:function(a){for(var b in this.threads)this.threads[b].autoCloseOpenSlices(a)},
|
||
|
autoDeleteObjects:function(a){this.objects.autoDeleteObjects(a)},preInitializeObjects:function(){this.objects.preInitializeAllObjects()},initializeObjects:function(){this.objects.initializeAllObjects()},mergeKernelWithUserland:function(){for(var a in this.threads)this.threads[a].mergeKernelWithUserland()},updateBounds:function(){this.bounds.reset();for(var a in this.threads)this.threads[a].updateBounds(),this.bounds.addRange(this.threads[a].bounds);for(var b in this.counters)this.counters[b].updateBounds(),
|
||
|
this.bounds.addRange(this.counters[b].bounds);this.objects.updateBounds();this.bounds.addRange(this.objects.bounds)},addCategoriesToDict:function(a){for(var b in this.threads)this.threads[b].addCategoriesToDict(a);for(var e in this.counters)a[this.counters[e].category]=!0;this.objects.addCategoriesToDict(a)},findAllThreadsNamed:function(a){var b=[],e;for(e in this.threads){var c=this.threads[e];c.name==a&&b.push(c)}return b},pruneEmptyContainers:function(){var a={},b;for(b in this.threads){var e=
|
||
|
this.threads[b];e.isEmpty||(a[b]=e)}this.threads=a},getThread:function(a){return this.threads[a]},getOrCreateThread:function(a){this.threads[a]||(this.threads[a]=new c(this,a));return this.threads[a]},getOrCreateCounter:function(a,c){var e=a+"."+c;this.counters[e]||(this.counters[e]=new b(this,e,a,c));return this.counters[e]},getSettingsKey:function(){throw Error("Not implemented");},createSubSlices:function(){for(var a in this.threads)this.threads[a].createSubSlices()},iterateAllEvents:function(a,
|
||
|
b){for(var e in this.threads)this.threads[e].iterateAllEvents(a,b);for(var c in this.counters)this.counters[c].iterateAllEvents(a,b);this.objects.iterateAllEvents(a,b)},iterateAllPersistableObjects:function(a){a(this);for(var b in this.threads)this.threads[b].iterateAllPersistableObjects(a)}};return{ProcessBase:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(a){if(void 0===a)throw Error("model must be provided");b.call(this,a);this.cpus={};this.softwareMeasuredCpuCount_=void 0}var c=tv.c.trace_model.Cpu,b=tv.c.trace_model.ProcessBase;d.compare=function(a,b){return 0};d.prototype={__proto__:b.prototype,compareTo:function(a){return d.compare(this,a)},get userFriendlyName(){return"Kernel"},get userFriendlyDetails(){return"Kernel"},get stableId(){return"Kernel"},getOrCreateCpu:function(a){this.cpus[a]||
|
||
|
(this.cpus[a]=new c(this,a));return this.cpus[a]},get softwareMeasuredCpuCount(){return this.softwareMeasuredCpuCount_},set softwareMeasuredCpuCount(a){if(void 0!==this.softwareMeasuredCpuCount_&&this.softwareMeasuredCpuCount_!==a)throw Error("Cannot change the softwareMeasuredCpuCount once it is set");this.softwareMeasuredCpuCount_=a},get bestGuessAtCpuCount(){var a=tv.b.dictionaryLength(this.cpus);return 0!==a?a:this.softwareMeasuredCpuCount},shiftTimestampsForward:function(a){b.prototype.shiftTimestampsForward.call(this);
|
||
|
for(var c in this.cpus)this.cpus[c].shiftTimestampsForward(a)},updateBounds:function(){b.prototype.updateBounds.call(this);for(var a in this.cpus){var c=this.cpus[a];c.updateBounds();this.bounds.addRange(c.bounds)}},createSubSlices:function(){b.prototype.createSubSlices.call(this);for(var a in this.cpus)this.cpus[a].createSubSlices()},addCategoriesToDict:function(a){b.prototype.addCategoriesToDict.call(this,a);for(var c in this.cpus)this.cpus[c].addCategoriesToDict(a)},getSettingsKey:function(){return"kernel"},
|
||
|
iterateAllEvents:function(a,c){for(var e in this.cpus)this.cpus[e].iterateAllEvents(a,c);b.prototype.iterateAllEvents.call(this,a,c)},iterateAllEventContainers:function(a){a(this)}};return{Kernel:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(b,a){if(void 0===b)throw Error("model must be provided");if(void 0===a)throw Error("pid must be provided");tv.c.trace_model.ProcessBase.call(this,b);this.pid=a;this.name=void 0;this.labels=[];this.instantEvents=[];this.memoryDumps=[]}var c=tv.c.trace_model.ProcessBase;d.compare=function(b,a){var c=tv.c.trace_model.ProcessBase.compare(b,a);return c||(c=tv.b.comparePossiblyUndefinedValues(b.name,a.name,function(a,b){return a.localeCompare(b)}))?c:
|
||
|
(c=tv.b.compareArrays(b.labels,a.labels,function(a,b){return a.localeCompare(b)}))?c:b.pid-a.pid};d.prototype={__proto__:tv.c.trace_model.ProcessBase.prototype,get stableId(){return this.pid},compareTo:function(b){return d.compare(this,b)},pushInstantEvent:function(b){this.instantEvents.push(b)},addLabelIfNeeded:function(b){for(var a=0;a<this.labels.length;a++)if(this.labels[a]===b)return;this.labels.push(b)},get userFriendlyName(){var b;b=this.name?this.name+" (pid "+this.pid+")":"Process "+this.pid;
|
||
|
this.labels.length&&(b+=": "+this.labels.join(", "));return b},get userFriendlyDetails(){return this.name?this.name+" (pid "+this.pid+")":"pid: "+this.pid},getSettingsKey:function(){return this.name?this.labels.length?"processes."+this.name+"."+this.labels.join("."):"processes."+this.name:void 0},shiftTimestampsForward:function(b){for(var a in this.instantEvents)this.instantEvents[a].start+=b;for(a=0;a<this.memoryDumps.length;a++)this.memoryDumps[a].shiftTimestampsForward(b);tv.c.trace_model.ProcessBase.prototype.shiftTimestampsForward.apply(this,
|
||
|
arguments)},updateBounds:function(){tv.c.trace_model.ProcessBase.prototype.updateBounds.apply(this);for(var b=0;b<this.memoryDumps.length;b++)this.memoryDumps[b].addBoundsToRange(this.bounds)},iterateAllEvents:function(b,a){this.instantEvents.forEach(b,a);this.memoryDumps.forEach(b,a);c.prototype.iterateAllEvents.call(this,b,a)},iterateAllEventContainers:function(b){b(this);for(var a in this.threads)this.threads[a].iterateAllEventContainers(b)},sortMemoryDumps:function(){this.memoryDumps.sort(function(b,
|
||
|
a){return b.start-a.start})}};return{Process:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f,e,g,d){tv.c.trace_model.TimedEvent.call(this,f);this.title=a;this.cpu=c;this.thread=b;this.leafStackFrame=e;this.weight=g;this.args=d||{}}d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,get colorId(){return this.leafStackFrame.colorId},toJSON:function(){return{}},get stackTrace(){return this.leafStackFrame.stackTrace},getUserFriendlyStackTrace:function(){return this.leafStackFrame.getUserFriendlyStackTrace()}};tv.c.trace_model.EventRegistry.register(d,
|
||
|
{name:"sample",pluralName:"samples",singleViewElementName:"tv-c-single-sample-sub-view",multiViewElementName:"tv-c-multi-sample-sub-view"});return{Sample:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f,e){if(void 0===b)throw Error("id must be given");this.parentFrame_=c;this.id=b;this.category=a||"";this.title=f;this.colorId=e;this.children=[];this.parentFrame_&&this.parentFrame_.addChild(this)}d.prototype={get parentFrame(){return this.parentFrame_},set parentFrame(c){this.parentFrame_&&this.parentFrame_.removeChild(this);(this.parentFrame_=c)&&this.parentFrame_.addChild(this)},addChild:function(c){this.children.push(c)},removeChild:function(c){c=
|
||
|
this.children.indexOf(c.id);if(-1==c)throw Error("omg");this.children.splice(c,1)},removeAllChildren:function(){for(var c=0;c<this.children.length;c++)this.children[c].parentFrame_=void 0;this.children.splice(0,this.children.length)},toJSON:function(){return{}},get stackTrace(){for(var c=[],b=this;b;)c.push(b),b=b.parentFrame;c.reverse();return c},getUserFriendlyStackTrace:function(){return this.stackTrace.map(function(c){return c.category+": "+c.title})}};return{StackFrame:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(a,b,c,d,k){tv.c.trace_model.TimedEvent.call(this);this.category=a||"";this.title=b;this.colorId=c;this.start=d;this.args=k;this.type=void 0}function c(b,e,c,h,k){d.apply(this,arguments);this.type=a.GLOBAL}function b(b,e,c,h,k){d.apply(this,arguments);this.type=a.PROCESS}var a={GLOBAL:1,PROCESS:2};d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,selected:!1};c.prototype={__proto__:d.prototype};b.prototype={__proto__:d.prototype};tv.c.trace_model.EventRegistry.register(d,
|
||
|
{name:"instantEvent",pluralName:"instantEvents",singleViewElementName:"tv-c-single-instant-event-sub-view",multiViewElementName:"tv-c-multi-instant-event-sub-view"});return{GlobalInstantEvent:c,ProcessInstantEvent:b,InstantEventType:a,InstantEvent:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f,e,g){tv.c.trace_model.TimedEvent.call(this,e);this.category=c||"";this.title=a;this.colorId=f;this.start=e;this.args=g;this.id=b;this.previousFlowEvent_=this.nextFlowEvent_=void 0}d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,set nextFlowEvent(c){this.nextFlowEvent_=c},set previousFlowEvent(c){this.previousFlowEvent_=c},get nextFlowEvent(){return this.nextFlowEvent_},get previousFlowEvent(){return this.previousFlowEvent_}};
|
||
|
tv.c.trace_model.EventRegistry.register(d,{name:"flowEvent",pluralName:"flowEvents",singleViewElementName:"tv-c-single-flow-event-sub-view",multiViewElementName:"tv-c-multi-flow-event-sub-view"});return{FlowEvent:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a){tv.c.trace_model.TimedEvent.call(this,b);this.model=c;this.processMemoryDumps={};this.args=a}d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,shiftTimestampsForward:function(c){this.start+=c},toJSON:function(){for(var c={},b=Object.keys(this),a=0;a<b.length;a++){var f=b[a];"function"!=typeof this[f]&&"model"!=f&&"processMemoryDumps"!=f&&(c[f]=this[f])}return c}};tv.c.trace_model.EventRegistry.register(d,{name:"globalMemoryDump",
|
||
|
pluralName:"globalMemoryDumps",singleViewElementName:"tv-c-single-global-memory-dump-sub-view",multiViewElementName:"tv-c-multi-global-memory-dump-sub-view"});return{GlobalMemoryDump:d}});"use strict";
|
||
|
tv.exportTo("tv.c.trace_model",function(){function d(c,b,a,f){tv.c.trace_model.TimedEvent.call(this,a);this.process=b;this.globalMemoryDump=c;this.args=f}d.prototype={__proto__:tv.c.trace_model.TimedEvent.prototype,shiftTimestampsForward:function(c){this.start+=c},toJSON:function(){for(var c={},b=Object.keys(this),a=0;a<b.length;a++){var f=b[a];"function"!=typeof this[f]&&"process"!=f&&"globalMemoryDump"!=f&&(c[f]=this[f])}return c}};tv.c.trace_model.EventRegistry.register(d,{name:"processMemoryDump",
|
||
|
pluralName:"processMemoryDumps",singleViewElementName:"tv-c-single-process-memory-dump-sub-view",multiViewElementName:"tv-c-multi-process-memory-dump-sub-view"});return{ProcessMemoryDump:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(){this.pruneEmptyContainers=this.shiftWorldToZero=!0;this.customizeModelCallback=void 0}function c(b,e){this.kernel=new a(this);this.processes={};this.metadata=[];this.categories=[];this.bounds=new tv.b.Range;this.instantEvents=[];this.flowEvents=[];this.stackFrames={};this.samples=[];this.eventContainerByStableId_={};this.flowIntervalTree=new tv.b.IntervalTree(function(a){return a.start},function(a){return a.start});this.globalMemoryDumps=[];this.importWarnings_=
|
||
|
[];this.reportedImportWarnings_={};var c=d.fromArguments(arguments,1);b&&this.importTraces([b],c)}var b=tv.c.trace_model.Process,a=tv.c.trace_model.Kernel;d.fromArguments=function(a,b){var c=a[b+0];if("object"===typeof c){if(!(c instanceof d))throw Error("Unexpected");return c}c=new d;void 0!==a[b]&&(c.shiftWorldToZero=a[b]);void 0!==a[b+1]&&(c.pruneEmptyContainers=a[b+1]);a[b+2]&&(c.customizeModelCallback=a[b+2]);return c};c.prototype={__proto__:tv.b.EventTarget.prototype,get numProcesses(){var a=
|
||
|
0,b;for(b in this.processes)a++;return a},getProcess:function(a){return this.processes[a]},getOrCreateProcess:function(a){this.processes[a]||(this.processes[a]=new b(this,a));return this.processes[a]},getEventContainerByStableId:function(a){return this.eventContainerByStableId_[a]},pushInstantEvent:function(a){this.instantEvents.push(a)},addStackFrame:function(a){if(this.stackFrames[a.id])throw Error("Stack frame already exists");return this.stackFrames[a.id]=a},updateCategories_:function(){var a=
|
||
|
{};this.kernel.addCategoriesToDict(a);for(var b in this.processes)this.processes[b].addCategoriesToDict(a);this.categories=[];for(var c in a)""!=c&&this.categories.push(c)},updateBounds:function(){this.bounds.reset();this.kernel.updateBounds();this.bounds.addRange(this.kernel.bounds);for(var a in this.processes)this.processes[a].updateBounds(),this.bounds.addRange(this.processes[a].bounds);for(a=0;a<this.globalMemoryDumps.length;a++)this.globalMemoryDumps[a].addBoundsToRange(this.bounds)},shiftWorldToZero:function(){if(!this.bounds.isEmpty){var a=
|
||
|
this.bounds.min;this.kernel.shiftTimestampsForward(-a);for(var b in this.instantEvents)this.instantEvents[b].start-=a;for(var c in this.processes)this.processes[c].shiftTimestampsForward(-a);for(b=0;b<this.samples.length;b++)this.samples[b].start-=a;for(b=0;b<this.globalMemoryDumps.length;b++)this.globalMemoryDumps[b].shiftTimestampsForward(-a);this.updateBounds()}},getAllThreads:function(){var a=[],b;for(b in this.kernel.threads)a.push(d.threads[b]);for(var c in this.processes){var d=this.processes[c];
|
||
|
for(b in d.threads)a.push(d.threads[b])}return a},getAllProcesses:function(){var a=[],b;for(b in this.processes)a.push(this.processes[b]);return a},getAllCounters:function(){var a=[];a.push.apply(a,tv.b.dictionaryValues(this.kernel.counters));for(var b in this.processes){var c=this.processes[b],d;for(d in c.counters)a.push(c.counters[d])}return a},findAllThreadsNamed:function(a){var b=[];b.push.apply(b,this.kernel.findAllThreadsNamed(a));for(var c in this.processes)b.push.apply(b,this.processes[c].findAllThreadsNamed(a));
|
||
|
return b},createImporter_:function(a){var b=tv.c.importer.Importer.findImporterFor(a);if(!b)throw Error("Could not find an importer for the provided eventData.");return new b(this,a)},importTraces:function(a,b){var c=d.fromArguments(arguments,1),c=this.createImportTracesTask({update:function(a){}},a,c);tv.b.Task.RunSynchronously(c)},importTracesWithProgressDialog:function(a,b){var c=d.fromArguments(arguments,1),h=tv.b.ui.Overlay();h.title="Importing...";h.userCanClose=!1;h.msgEl=document.createElement("div");
|
||
|
h.appendChild(h.msgEl);h.msgEl.style.margin="20px";h.update=function(a){this.msgEl.textContent=a};h.visible=!0;c=this.createImportTracesTask(h,a,c);c=tv.b.Task.RunWhenIdle(c);c.then(function(){h.visible=!1},function(a){h.visible=!1});return c},hasEventDataDecoder_:function(a){if(0===a.length)return!1;for(var b=0;b<a.length;++b)if(!a[b].isTraceDataContainer())return!0;return!1},createImportTracesTask:function(a,b,c){var h=d.fromArguments(arguments,2);if(this.importing_)throw Error("Already importing.");
|
||
|
this.importing_=!0;var k=new tv.b.Task(function(){a.update("I will now import your traces for you...")},this),l,m=[];l=k.after(function(){b=b.slice(0);a.update("Creating importers...");for(var c=0;c<b.length;++c)m.push(this.createImporter_(b[c]));for(c=0;c<m.length;c++)for(var g=m[c].extractSubtraces(),d=0;d<g.length;d++)try{b.push(g[d]),m.push(this.createImporter_(g[d]))}catch(h){console.warn(h.name+": "+h.message)}if(b.length&&!this.hasEventDataDecoder_(m))throw Error("Could not find an importer for the provided eventData.");
|
||
|
m.sort(function(a,b){return a.importPriority-b.importPriority})},this);l=l.after(function(b){m.forEach(function(e,c){b.subTask(function(){a.update("Importing "+(c+1)+" of "+m.length);e.importEvents(0<c)},this)},this)},this);h.customizeModelCallback&&(l=l.after(function(a){h.customizeModelCallback(this)},this));l=l.after(function(b){m.forEach(function(b,c){a.update("Importing sample data "+(c+1)+"/"+m.length);b.importSampleData()},this)},this);l=l.after(function(){a.update("Autoclosing open slices...");
|
||
|
this.samples.sort(function(a,b){return a.start-b.start});this.updateBounds();this.kernel.autoCloseOpenSlices(this.bounds.max);for(var b in this.processes)this.processes[b].autoCloseOpenSlices(this.bounds.max);this.kernel.createSubSlices();for(b in this.processes)this.processes[b].createSubSlices()},this);l=l.after(function(b){m.forEach(function(b,c){a.update("Finalizing import "+(c+1)+"/"+m.length);b.finalizeImport()},this)},this);l=l.after(function(a){this.iterateAllEventContainers(function(a){this.eventContainerByStableId_[a.stableId]=
|
||
|
a}.bind(this))},this);l=l.after(function(){a.update("Initializing objects (step 1/2)...");for(var b in this.processes)this.processes[b].preInitializeObjects()},this);h.pruneEmptyContainers&&(l=l.after(function(){a.update("Pruning empty containers...");this.kernel.pruneEmptyContainers();for(var b in this.processes)this.processes[b].pruneEmptyContainers()},this));l=l.after(function(){a.update("Merging kernel with userland...");for(var b in this.processes)this.processes[b].mergeKernelWithUserland()},
|
||
|
this);l=l.after(function(){a.update("Computing final world bounds...");this.updateBounds();this.updateCategories_();h.shiftWorldToZero&&this.shiftWorldToZero()},this);l=l.after(function(){a.update("Building flow event map...");for(var b=0;b<this.flowEvents.length;++b){var c=this.flowEvents[b];this.flowIntervalTree.insert(c[0],c[1])}this.flowIntervalTree.updateHighValues()},this);l=l.after(function(){a.update("Joining object refs...");for(var b=0;b<m.length;b++)m[b].joinRefs()},this);l=l.after(function(){a.update("Cleaning up undeleted objects...");
|
||
|
for(var b in this.processes)this.processes[b].autoDeleteObjects(this.bounds.max)},this);l=l.after(function(){a.update("Sorting memory dumps...");this.globalMemoryDumps.sort(function(a,b){return a.start-b.start});for(var b in this.processes)this.processes[b].sortMemoryDumps()},this);l=l.after(function(){a.update("Initializing objects (step 2/2)...");for(var b in this.processes)this.processes[b].initializeObjects()},this);l.after(function(){this.importing_=!1},this);return k},importWarning:function(a){this.importWarnings_.push(a);
|
||
|
!0!==this.reportedImportWarnings_[a.type]&&(console.warn(a.message),this.reportedImportWarnings_[a.type]=!0)},get hasImportWarnings(){return 0<this.importWarnings_.length},get importWarnings(){return this.importWarnings_},iterateAllEvents:function(a,b){this.instantEvents.forEach(a,b);this.kernel.iterateAllEvents(a,b);for(var c in this.processes)this.processes[c].iterateAllEvents(a,b);this.samples.forEach(a,b);this.globalMemoryDumps.forEach(a,b)},iterateAllPersistableObjects:function(a){this.kernel.iterateAllPersistableObjects(a);
|
||
|
for(var b in this.processes)this.processes[b].iterateAllPersistableObjects(a)},iterateAllEventContainers:function(a){this.kernel.iterateAllEventContainers(a);for(var b in this.processes)this.processes[b].iterateAllEventContainers(a)}};return{ImportOptions:d,TraceModel:c}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(a){this.sunburst_zoom_level=void 0;this.bounds_dirty_=!0;this.bounds_=new tv.b.Range;this.length_=0;this.guid_=tv.b.GUID.allocate();this.pushed_guids_={};if(a)for(var b=0;b<a.length;b++)this.push(a[b])}var c=tv.c.trace_model.EventRegistry,b=tv.b.Event.bind(void 0,"requestSelectionChange",!0,!1);d.prototype={__proto__:Object.prototype,get bounds(){if(this.bounds_dirty_){this.bounds_.reset();for(var a=0;a<this.length_;a++)this[a].addBoundsToRange(this.bounds_);
|
||
|
this.bounds_dirty_=!1}return this.bounds_},get duration(){return this.bounds_.isEmpty?0:this.bounds_.max-this.bounds_.min},get length(){return this.length_},get guid(){return this.guid_},clear:function(){for(var a=0;a<this.length_;++a)delete this[a];this.length_=0;this.bounds_dirty_=!0},push:function(a){if(void 0==a.guid)throw Error("Event must have a GUID");if(this.pushed_guids_[a.guid])return a;this.pushed_guids_[a.guid]=!0;this[this.length_++]=a;this.bounds_dirty_=!0;return a},addSelection:function(a){for(var b=
|
||
|
0;b<a.length;b++)this.push(a[b])},subSelection:function(a,b){b=b||1;var c=new d;c.bounds_dirty_=!0;if(0>a||a+b>this.length_)throw Error("Index out of bounds");for(var g=a;g<a+b;g++)c.push(this[g]);return c},getEventsOrganizedByBaseType:function(a){var b={},e=c.getAllRegisteredTypeInfos();e.forEach(function(a){b[a.metadata.name]=new d;void 0!==this.sunburst_zoom_level&&(b[a.metadata.name].sunburst_zoom_level=this.sunburst_zoom_level)},this);this.forEach(function(a,c){var g=-1,d=void 0;e.forEach(function(b,
|
||
|
c){a instanceof b.constructor&&c>g&&(g=c,d=b)});if(-1==g)throw Error("Unrecgonized event type");b[d.metadata.name].push(a)});if(a){a={};for(var g in b)0<b[g].length&&(a[g]=b[g]);return a}return b},enumEventsOfType:function(a,b){for(var c=0;c<this.length_;c++)this[c]instanceof a&&b(this[c])},getShiftedSelection:function(a,b){for(var c=new d,g=0;g<this.length_;g++){var h=this[g];if(h instanceof tv.c.trace_model.FlowEvent)if(0<b&&h.nextFlowEvent){c.push(h.nextFlowEvent);continue}else if(0>b&&h.previousFlowEvent){c.push(h.previousFlowEvent);
|
||
|
continue}a.trackForEvent(h).addItemNearToProvidedEventToSelection(h,b,c)}return 0==c.length?void 0:c},forEach:function(a,b){for(var c=0;c<this.length;c++)a.call(b,this[c],c)},map:function(a,b){for(var c=[],g=0;g<this.length;g++)c.push(a.call(b,this[g],g));return c},every:function(a,b){for(var c=0;c<this.length;c++)if(!a.call(b,this[c],c))return!1;return!0},some:function(a,b){for(var c=0;c<this.length;c++)if(a.call(b,this[c],c))return!0;return!1}};return{Selection:d,RequestSelectionChangeEvent:b}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.c.analysis",function(){var d=tv.c.analysis.tsRound,c=tv.c.RequestSelectionChangeEvent,b=tv.b.ui.define("a");b.prototype={__proto__:HTMLAnchorElement.prototype,decorate:function(){this.classList.add("analysis-link");this.addEventListener("click",this.onClicked_.bind(this))},onClicked_:function(){var a=new c;a.selection=this.selectionGenerator();this.dispatchEvent(a)}};var a=tv.b.ui.define("object-snapshot-link",b);a.prototype={__proto__:b.prototype,decorate:function(){b.prototype.decorate.apply(this)},set objectSnapshot(a){this.textContent=
|
||
|
a.objectInstance.typeName+" "+a.objectInstance.id+" @ "+d(a.ts)+" ms";this.selectionGenerator=function(){var b=new tv.c.Selection;b.push(a);return b}.bind(this)}};var f=tv.b.ui.define("object-instance-link",b);f.prototype={__proto__:b.prototype,decorate:function(){b.prototype.decorate.apply(this)},set objectInstance(a){this.textContent=a.typeName+" "+a.id;this.selectionGenerator=function(){var b=new tv.c.Selection;b.push(a);return b}.bind(this)}};return{RequestSelectionChangeEvent:c,AnalysisLink:b,
|
||
|
ObjectSnapshotLink:a,ObjectInstanceLink:f}});"use strict";
|
||
|
tv.exportTo("tv.c.analysis",function(){var d=tv.b.ui.define("x-generic-object-view");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.object_=void 0},get object(){return this.object_},set object(b){this.object_=b;this.updateContents_()},updateContents_:function(){this.textContent="";this.appendElementsForType_("",this.object_,0,0,5,"")},appendElementsForType_:function(b,a,c,e,g,d){if(e>g)this.appendSimpleText_(b,c,"<recursion limit reached>",d);else if(void 0===a)this.appendSimpleText_(b,
|
||
|
c,"undefined",d);else if(null===a)this.appendSimpleText_(b,c,"null",d);else{if(!(a instanceof Object))if("string"==typeof a){var k=!1;if("{"==a[0]&&"}"==a[a.length-1]||"["==a[0]&&"]"==a[a.length-1])try{a=JSON.parse(a),k=!0}catch(l){}if(!k)return this.appendSimpleText_(b,c,'"'+a+'"',d)}else return this.appendSimpleText_(b,c,a,d);a instanceof tv.c.trace_model.ObjectSnapshot?(e=new tv.c.analysis.ObjectSnapshotLink(a),e.objectSnapshot=a,this.appendElementWithLabel_(b,c,e,d)):a instanceof tv.c.trace_model.ObjectInstance?
|
||
|
(e=new tv.c.analysis.ObjectInstanceLink(a),e.objectInstance=a,this.appendElementWithLabel_(b,c,e,d)):a instanceof tv.b.Rect?this.appendSimpleText_(b,c,a.toString(),d):a instanceof Array?this.appendElementsForArray_(b,a,c,e,g,d):this.appendElementsForObject_(b,a,c,e,g,d)}},appendElementsForArray_:function(b,a,c,e,d,h){if(0==a.length)this.appendSimpleText_(b,c,"[]",h);else{this.appendElementsForType_(b+"[",a[0],c,e+1,d,1<a.length?",":"]"+h);for(var k=1;k<a.length;k++)this.appendElementsForType_("",
|
||
|
a[k],c+b.length+1,e+1,d,k<a.length-1?",":"]"+h)}},appendElementsForObject_:function(b,a,c,e,d,h){var k=tv.b.dictionaryKeys(a);if(0==k.length)this.appendSimpleText_(b,c,"{}",h);else{this.appendElementsForType_(b+"{"+k[0]+": ",a[k[0]],c,e,d,1<k.length?",":"}"+h);for(var l=1;l<k.length;l++)this.appendElementsForType_(k[l]+": ",a[k[l]],c+b.length+1,e+1,d,l<k.length-1?",":"}"+h)}},appendElementWithLabel_:function(b,a,c,e){var d=document.createElement("div"),h=document.createElement("span");h.style.whiteSpace=
|
||
|
"pre";for(var k=0;k<a;k++)h.textContent+=" ";d.appendChild(h);a=document.createElement("span");a.textContent=b;d.appendChild(a);d.appendChild(c);b=document.createElement("span");b.textContent=e;d.appendChild(b);d.dataElement=c;this.appendChild(d)},appendSimpleText_:function(b,a,c,e){var d=this.ownerDocument.createElement("span");d.textContent=c;this.appendElementWithLabel_(b,a,d,e);return d}};var c=tv.b.ui.define("x-generic-object-view-with-label");c.prototype={__proto__:HTMLUnknownElement.prototype,
|
||
|
decorate:function(){this.labelEl_=document.createElement("div");this.genericObjectView_=new tv.c.analysis.GenericObjectView;this.appendChild(this.labelEl_);this.appendChild(this.genericObjectView_)},get label(){return this.labelEl_.textContent},set label(b){this.labelEl_.textContent=b},get object(){return this.genericObjectView_.object},set object(b){this.genericObjectView_.object=b}};return{GenericObjectView:d,GenericObjectViewWithLabel:c}});"use strict";
|
||
|
tv.exportTo("tv.c.analysis",function(){var d=tv.b.ui.define("div");d.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.className="analysis-results"},get requiresTallView(){return!0},clear:function(){this.textContent=""},createSelectionChangingLink:function(c,b,a){var f=this.ownerDocument.createElement("a");tv.c.analysis.AnalysisLink.decorate(f);f.textContent=c;f.selectionGenerator=b;a&&(f.title=a);return f},appendElement_:function(c,b,a){b=c.ownerDocument.createElement(b);c.appendChild(b);
|
||
|
void 0!=a&&(b.textContent=a);return b},appendText_:function(c,b){c.ownerDocument.createTextNode(b);c.appendChild(textNode);return textNode},appendTableCell_:function(c,b,a,f,e){b=this.appendElement_(b,"td",f);b.className=c.className+"-col-"+a;e&&(c=document.createElement("span"),c.textContent=" "+String.fromCharCode(9888),c.title=e,b.appendChild(c));return b},appendTableCell:function(c,b,a){return this.appendTableCell_(c,b,b.children.length,a)},appendTableCellWithTooltip_:function(c,b,a,f,e){return e?
|
||
|
(b=this.appendElement_(b,"td"),b.className=c.className+"-col-"+a,c=this.appendElement_(b,"span",f),c.className="tooltip",c.title=e,b):this.appendTableCell_(c,b,a,f)},appendHeader:function(c){c=this.appendElement_(this,"span",c);c.className="analysis-header";return c},appendInfo:function(c,b){var a=this.appendElement_(this,"div");a.label=this.appendElement_(a,"b",c);a.value=this.appendElement_(a,"span",b);return a},appendTable:function(c,b){var a=this.appendElement_(this,"table");a.className=c+" analysis-table";
|
||
|
a.numColumns=b;return a},appendHeadRow:function(c){if(c.headerRow)throw Error("Only one header row allowed.");if(c.tbody||c.tfoot)throw Error("Cannot add a header row after data rows have been added.");c.headerRow=this.appendElement_(this.appendElement_(c,"thead"),"tr");c.headerRow.className="analysis-table-header";return c.headerRow},appendBodyRow:function(c){if(c.tfoot)throw Error("Cannot add a tbody row after footer rows have been added.");c.tbody||(c.tbody=this.appendElement_(c,"tbody"));var b=
|
||
|
this.appendElement_(c.tbody,"tr");b.className=c.headerRow?"analysis-table-row":"analysis-table-row-inverted";return b},appendFootRow:function(c){c.tfoot||(c.tfoot=this.appendElement_(c,"tfoot"),c.tfoot.rowsClassName=((c.headerRow?1:0)+(c.tbody?c.tbody.rows.length:0))%2?"analysis-table-row":"analysis-table-row-inverted");var b=this.appendElement_(c.tfoot,"tr");b.className=c.tfoot.rowsClassName;return b},appendSpacingRow:function(c,b){for(var a=c.tfoot||b?this.appendFootRow(c):this.appendBodyRow(c),
|
||
|
f=0;f<c.numColumns;f++)this.appendTableCell_(c,a,f," ")},appendInfoRow:function(c,b,a,f){f=c.tfoot||f?this.appendFootRow(c):this.appendBodyRow(c);this.appendTableCell_(c,f,0,b);void 0!==a?(b=new tv.c.analysis.GenericObjectView,b.object=a,b.classList.add("analysis-table-col-1"),b.style.display="table-cell",f.appendChild(b)):this.appendTableCell_(c,f,1,"");for(a=2;a<c.numColumns;a++)this.appendTableCell_(c,f,a,"")},appendInfoRowTime:function(c,b,a,f,e){f=c.tfoot||f?this.appendFootRow(c):this.appendBodyRow(c);
|
||
|
this.appendTableCell_(c,f,0,b);this.appendTableCell_(c,f,1,tv.c.analysis.tsRound(a)+" ms",e)},appendDetailsRow:function(c,b,a,f,e,d,h){var k=this.appendBodyRow(c);if(d){var l=this.appendTableCell(c,k,tv.c.analysis.tsRound(b));l.textContent="";l.appendChild(this.createSelectionChangingLink(tv.c.analysis.tsRound(b),d,""))}else this.appendTableCell(c,k,tv.c.analysis.tsRound(b));null!==a&&this.appendTableCell(c,k,tv.c.analysis.tsRound(a));h&&this.appendTableCell(c,k,""!=h?tv.c.analysis.tsRound(h):"");
|
||
|
null!==f&&this.appendTableCell(c,k,tv.c.analysis.tsRound(f));c=this.appendTableCell(c,k,"");b=0;for(var m in e)b+=1;if(0<b)for(m in e)a=e[m],b=new tv.c.analysis.GenericObjectView,b.object=a,a=this.appendElement_(this.appendElement_(c,"table"),"tr"),this.appendElement_(a,"td",m+":"),this.appendElement_(a,"td").appendChild(b)},appendDataRow:function(c,b,a,f,e,d,h,k,l,m,n){var q=void 0;l&&(q="Min Duration:\t"+tv.c.analysis.tsRound(l.min)+" ms \rMax Duration:\t"+tv.c.analysis.tsRound(l.max)+" ms \rAvg Duration:\t"+
|
||
|
tv.c.analysis.tsRound(l.avg)+" ms (\u03c3 = "+tv.c.analysis.tsRound(l.avg_stddev)+")",l.start&&(q+="\rStart Time:\t"+tv.c.analysis.tsRound(l.start)+" ms"),l.end&&(q+="\rEnd Time:\t"+tv.c.analysis.tsRound(l.end)+" ms"),l.frequency&&l.frequency_stddev&&(q+="\rFrequency:\t"+tv.c.analysis.tsRound(l.frequency)+" occurrences/s (\u03c3 = "+tv.c.analysis.tsRound(l.frequency_stddev)+")"));l=c.tfoot||n?this.appendFootRow(c):this.appendBodyRow(c);n=0;if(m){var u=this.appendTableCellWithTooltip_(c,l,n,b,q);u&&
|
||
|
(u.textContent="",u.appendChild(this.createSelectionChangingLink(b,m,q)))}else this.appendTableCellWithTooltip_(c,l,n,b,q);n++;null!==a&&(a?a instanceof Array?this.appendTableCellWithTooltip_(c,l,n,"["+a.join(", ")+"]",q):this.appendTableCellWithTooltip_(c,l,n,tv.c.analysis.tsRound(a),q):this.appendTableCell_(c,l,n,""),n++);null!==f&&(""!=f?this.appendTableCellWithTooltip_(c,l,n,tv.c.analysis.tsRound(f),q):this.appendTableCell_(c,l,n,""),n++);null!==e&&(e?this.appendTableCellWithTooltip_(c,l,n,tv.c.analysis.tsRound(e),
|
||
|
q):this.appendTableCell_(c,l,n,""),n++);null!==d&&(d?this.appendTableCellWithTooltip_(c,l,n,tv.c.analysis.tsRound(d),q):this.appendTableCell_(c,l,n,""),n++);null!==k&&(k?this.appendTableCellWithTooltip_(c,l,n,k,q):this.appendTableCell_(c,l,n,""),n++);h?this.appendTableCellWithTooltip_(c,l,n,String(h),q):this.appendTableCell_(c,l,n,"")}};return{AnalysisResults:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(a,c){return b(a,c)}function c(a,c){return b(c,a)}function b(a,b){var c=parseFloat(a),d=parseFloat(b);return isNaN(c)&&isNaN(d)?a.toString().localeCompare(b.toString()):isNaN(c)?-1:isNaN(d)?1:c-d}var a=tv.b.ui.define("sortable-table");a.prototype={__proto__:HTMLTableElement.prototype,decorate:function(){this.classList.add("sortable-table");if(this.tHead){for(var a=this.tHead.rows[0],b=window.history.state,c=0;c<a.cells.length;c++)a.cells[c].addEventListener("click",
|
||
|
this.onItemClicked_,!0),a.cells[c].innerHTML+=" ▿";b&&b.tableSorting&&(a=this.sortingHashCode_(),b.tableSorting[a]&&this.sort(b.tableSorting[a].col,b.tableSorting[a].sortDirection))}},onItemClicked_:function(a){var b=this.parentNode;a=b.parentNode.parentNode;var b=Array.prototype.slice.call(b.cells).indexOf(this),c=a.sort(b),d=history.state;d.tableSorting||(d.tableSorting={});d.tableSorting[a.sortingHashCode_()]={col:b,sortDirection:c};window.history.pushState(d)},sort:function(a,b){var g=
|
||
|
this.tHead.rows[0],h=g.cells[a];if(h.hasAttribute("sort")){var k=g,g=h.getAttribute("sort");if(b!=g){g="upward"==g?"downward":"upward";h.setAttribute("sort",g);k=h.innerHTML;h.innerHTML=k.substr(0,k.length-2)+("downward"==g?"▾":"▴");for(var k=h.parentNode,h=k.parentNode.parentNode.tBodies[0],k=[],l=0;l<h.rows.length;l++)k[k.length]=h.rows[l];for(l=k.length-1;0<=l;l--)h.appendChild(k[l])}return g}k=b||"downward";for(l=0;l<g.cells.length;l++)if(g.cells[l].getAttribute("sort")){g.cells[l].removeAttribute("sort");
|
||
|
var m=g.cells[l].innerHTML;g.cells[l].innerHTML=m.substr(0,m.length-2)+"▿"}m=g.cells[a].innerHTML;h.innerHTML=m.substr(0,m.length-2)+("downward"==k?"▾":"▴");h.setAttribute("sort",k);m=g.parentNode.parentNode.tBodies[0].rows;h=[];for(l=0;l<m.length;l++)h.push([m[l].cells[a].innerText,m[l]]);h.sort("downward"==k?d:c);for(l=0;l<h.length;l++)g.parentNode.parentNode.tBodies[0].appendChild(h[l][1]);return k},sortingHashCode_:function(){if(this.sortingHashValue_)return this.sortingHashValue_;
|
||
|
for(var a=this.tHead.rows[0].innerText,b=0,c=0;c<a.length;c++)127>a.charCodeAt(c)&&(b+=a.charCodeAt(c));return this.sortingHashValue_=Array.prototype.slice.call(document.getElementsByClassName("sortable-table")).indexOf(this)+""+b}};return{SortableTable:a}});"use strict";
|
||
|
Polymer("tv-c-single-slice-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){if(1!==d.length)throw Error("Only supports single slices");if(!(d[0]instanceof tv.c.trace_model.Slice))throw Error("Only supports slices");this.setSelectionWithoutErrorChecks(d)},get selection(){return this.currentSelection_},setSelectionWithoutErrorChecks:function(d){this.currentSelection_=d;this.textContent="";var c=new tv.c.analysis.AnalysisResults;this.appendChild(c);this.analyzeSingleSlice_(c,
|
||
|
d[0])},analyzeSingleSlice_:function(d,c){var b=d.appendTable("analysis-slice-table",2);c.error&&d.appendInfoRow(b,"Error",c.error);c.title&&d.appendInfoRow(b,"Title",c.title);c.category&&d.appendInfoRow(b,"Category",c.category);d.appendInfoRowTime(b,"Start",c.start);d.appendInfoRowTime(b,"Wall Duration",c.duration);c.cpuDuration&&d.appendInfoRowTime(b,"CPU Duration",c.cpuDuration);c.selfTime&&d.appendInfoRowTime(b,"Self Time",c.selfTime);if(c.cpuSelfTime){var a;c.cpuSelfTime>c.selfTime&&(a="Note that CPU Self Time is larger than Self Time. This is a known limitation of this system, which occurs due to several subslices, rounding issues, and inprecise time at which we get cpu- and real-time.");
|
||
|
d.appendInfoRowTime(b,"CPU Self Time",c.cpuSelfTime,!1,a)}c.durationInUserTime&&d.appendInfoRowTime(b,"Duration (U)",c.durationInUserTime);c.startStackFrame&&c.endStackFrame?c.startStackFrame===c.endStackFrame?d.appendInfoRow(b,"Start+End Stack Trace",c.startStackFrame.getUserFriendlyStackTrace()):(d.appendInfoRow(b,"Start Stack Trace",c.startStackFrame.getUserFriendlyStackTrace()),d.appendInfoRow(b,"End Stack Trace",c.endStackFrame.getUserFriendlyStackTrace())):c.startStackFrame?d.appendInfoRow(b,
|
||
|
"Start Stack Trace",c.startStackFrame.getUserFriendlyStackTrace()):c.endStackFrame&&d.appendInfoRow(b,"End Stack Trace",c.endStackFrame.getUserFriendlyStackTrace());a=0;for(var f in c.args)a+=1;if(0<a)for(f in d.appendInfoRow(b,"Args"),c.args)d.appendInfoRow(b," "+f,c.args[f])}});"use strict";
|
||
|
Polymer("tv-c-multi-slice-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){if(1>=d.length)throw Error("Only supports multiple items");if(!d.every(function(c){return c instanceof tv.c.trace_model.Slice}))throw Error("Only supports slices");this.setSelectionWithoutErrorChecks(d)},get selection(){return this.currentSelection_},setSelectionWithoutErrorChecks:function(d){this.currentSelection_=d;this.textContent="";var c=new tv.c.analysis.AnalysisResults;this.appendChild(c);
|
||
|
this.analyzeMultipleSlices_(c,d)},analyzeSingleTypeSlices_:function(d,c,b){d.appendInfo("Title: ",c[0].title);d.appendInfo("Category: ",c[0].category);var a=d.appendTable("analysis-slice-table",4+b),f=d.appendHeadRow(a);d.appendTableCell(a,f,"Start");d.appendTableCell(a,f,"Wall Duration (ms)");b&&d.appendTableCell(a,f,"CPU Duration (ms)");d.appendTableCell(a,f,"Self Time (ms)");d.appendTableCell(a,f,"Args");var e=0;tv.b.iterItems(c,function(b,c){e++;d.appendDetailsRow(a,c.start,c.duration,c.selfTime?
|
||
|
c.selfTime:c.duration,c.args,function(){return new tv.c.Selection([c])},c.cpuDuration)});1<e&&tv.b.ui.SortableTable.decorate(a)},analyzeMultipleSlices_:function(d,c){for(var b=c.bounds.min,a=c.bounds.max,f=0,e={},g=!1,h=0;h<c.length;h++){var k=c[h];void 0===e[k.title]&&(e[k.title]=[],f++);k.cpuDuration&&(g=!0);e[k.title].push(c[h])}var l=d.appendTable("analysis-slice-table",4+g),h=d.appendHeadRow(l);d.appendTableCell(l,h,"Name");d.appendTableCell(l,h,"Wall Duration (ms)");g&&d.appendTableCell(l,h,
|
||
|
"CPU Duration (ms)");d.appendTableCell(l,h,"Self Time (ms)");g&&d.appendTableCell(l,h,"CPU Self Time (ms)");d.appendTableCell(l,h,"Occurrences");var m=this,n=0,q=0,u=0,v=0;tv.b.iterItems(e,function(a,b){for(var c=0,e=0,h=0,k=0,w=0,x=Number.MAX_VALUE,A=-Number.MAX_VALUE,z=Number.MAX_VALUE,B=-Number.MAX_VALUE,w=0;w<b.length;w++){var D=b[w],c=c+D.duration;D.cpuDuration&&(e+=D.cpuDuration,k+=D.cpuSelfTime?D.cpuSelfTime:D.cpuDuration);h+=D.selfTime?D.selfTime:D.duration;x=Math.min(D.start,x);A=Math.max(D.start,
|
||
|
A);z=Math.min(D.duration,z);B=Math.max(D.duration,B)}n+=c;q+=e;u+=h;v+=k;0==b.length&&(w=0);w=c/b.length;z={min:z,max:B,avg:w,avg_stddev:void 0,frequency:void 0,frequency_stddev:void 0};for(w=B=0;w<b.length;w++)D=z.avg-b[w].duration,B+=D*D;z.avg_stddev=Math.sqrt(B/(b.length-1));A-=x;if(2<b.length&&0<A){x=b.length-1;z.frequency=1E3*x/A;B=0;for(w=1;w<b.length;w++)D=z.frequency-1E3/(b[w].start-b[w-1].start),B+=D*D;z.frequency_stddev=Math.sqrt(B/(x-1))}d.appendDataRow(l,a,c,g?0<e?e:"":null,h,g?0<k?k:
|
||
|
"":null,b.length,null,z,function(){return new tv.c.Selection(b)});1===f&&m.analyzeSingleTypeSlices_(d,b,g)});1!==f&&(d.appendDataRow(l,"Totals",n,g?q:null,u,g?v:null,c.length,null,null,null,!0),d.appendSpacingRow(l,!0),tv.b.ui.SortableTable.decorate(l));d.appendInfoRowTime(l,"Selection start",b,!0);d.appendInfoRowTime(l,"Selection extent",a-b,!0)}});"use strict";
|
||
|
Polymer("tv-c-single-thread-time-slice-sub-view",{created:function(){this.currentSelection_=void 0},get selection(){return this.currentSelection_},set selection(d){if(1!==d.length)throw Error("Only supports single slices");if(!(d[0]instanceof tv.c.trace_model.ThreadTimeSlice))throw Error("Only supports thread time slices");this.currentSelection_=d;var c=d[0],b=c.thread;d=this.shadowRoot;d.querySelector("#state").textContent=c.title;var a=tv.b.ui.getColorPalette()[c.colorId];d.querySelector("#state").style.backgroundColor=
|
||
|
a;d.querySelector("#process-name").textContent=b.parent.userFriendlyName;d.querySelector("#thread-name").textContent=b.userFriendlyName;d.querySelector("#start").textContent=tv.c.analysis.tsRound(c.start)+"ms";d.querySelector("#duration").textContent=tv.c.analysis.tsRound(c.duration)+"ms";b=d.querySelector("#on-cpu");b.textContent="";a=d.querySelector("#running-instead");if(c.cpuOnWhichThreadWasRunning){a.parentElement.removeChild(a);var f=new tv.c.analysis.AnalysisLink;f.textContent=c.cpuOnWhichThreadWasRunning.userFriendlyName;
|
||
|
f.selectionGenerator=function(){var a=new tv.c.Selection;a.push(c.getAssociatedCpuSlice());return a}.bind(this);b.appendChild(f)}else{b.parentElement.removeChild(b);var e=c.getCpuSliceThatTookCpu();e?(f=new tv.c.analysis.AnalysisLink,f.textContent=e.thread?e.thread.userFriendlyName:e.title,f.selectionGenerator=function(){var a=new tv.c.Selection;a.push(e);return a}.bind(this),a.appendChild(f)):a.parentElement.removeChild(a)}d=d.querySelector("#args");0<tv.b.dictionaryKeys(c.args).length?(b=new tv.c.analysis.GenericObjectView,
|
||
|
b.object=c.args,d.parentElement.style.display="",d.textContent="",d.appendChild(b)):d.parentElement.style.display="none"}});"use strict";
|
||
|
Polymer("tv-c-single-cpu-slice-sub-view",{created:function(){this.currentSelection_=void 0},get selection(){return this.currentSelection_},set selection(d){if(1!==d.length)throw Error("Only supports single slices");if(!(d[0]instanceof tv.c.trace_model.CpuSlice))throw Error("Only supports thread time slices");this.currentSelection_=d;d=d[0];var c=d.threadThatWasRunning,b=this.shadowRoot;c?(b.querySelector("#process-name").textContent=c.parent.userFriendlyName,b.querySelector("#thread-name").textContent=
|
||
|
c.userFriendlyName):(b.querySelector("#process-name").parentElement.style.display="none",b.querySelector("#thread-name").textContent=d.title);b.querySelector("#start").textContent=tv.c.analysis.tsRound(d.start)+"ms";b.querySelector("#duration").textContent=tv.c.analysis.tsRound(d.duration)+"ms";var c=b.querySelector("#running-thread"),a=d.getAssociatedTimeslice();a?(d=new tv.c.analysis.AnalysisLink,d.textContent="Click to select",d.selectionGenerator=function(){var b=new tv.c.Selection;b.push(a);
|
||
|
return b}.bind(this),c.parentElement.style.display="",c.textContent="",c.appendChild(d)):c.parentElement.style.display="none"}});"use strict";Polymer("tv-c-single-instant-event-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){this.textContent="";var c=document.createElement("tv-c-single-slice-sub-view");this.appendChild(c);c.setSelectionWithoutErrorChecks(d);this.currentSelection_=d},get selection(){return this.currentSelection_}});"use strict";
|
||
|
Polymer("tv-c-multi-instant-event-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){this.textContent="";var c=document.createElement("tv-c-multi-slice-sub-view");this.appendChild(c);c.setSelectionWithoutErrorChecks(d);this.currentSelection_=d},get selection(){return this.currentSelection_}});"use strict";
|
||
|
(function(){var d=tv.c.trace_model.CounterSample;Polymer("tv-c-counter-sample-sub-view",{created:function(){this.currentSelection_=void 0},get selection(){return this.currentSelection_},set selection(c){var b=new tv.c.analysis.AnalysisResults;this.appendChild(b);this.analyzeCounterSamples_(b,c)},analyzeCounterSamples_:function(c,b){for(var a={},f=0;f<b.length;f++){var e=b[f].series.counter;a[e.guid]||(a[e.guid]=[]);a[e.guid].push(b[f])}for(var g in a)f=a[g],e=f[0].series.counter,f=d.groupByTimestamp(f),
|
||
|
1==f.length?this.analyzeSingleCounterTimestamp_(c,e,f[0]):this.analyzeMultipleCounterTimestamps_(c,e,f)},analyzeSingleCounterTimestamp_:function(c,b,a){c.appendHeader("Selected counter:");var f=c.appendTable("analysis-counter-table",2);c.appendInfoRow(f,"Title",b.name);c.appendInfoRowTime(f,"Timestamp",a[0].timestamp);for(b=0;b<a.length;b++){var e=a[b];c.appendInfoRow(f,e.series.name,e.value)}},analyzeMultipleCounterTimestamps_:function(c,b,a){c.appendHeader("Counter "+b.name);for(var f=c.appendTable("analysis-counter-table",
|
||
|
2),e=[],d=0;d<a.length;d++)e.push(a[d][0].getSampleIndex());a=b.getSampleStatistics(e);for(d=0;d<a.length;d++){for(var h=[],k=0;k<e.length;++k)h.push(b.getSeries(d).getSample(e[k]).value);c.appendDataRow(f,b.name+": series("+b.getSeries(d).name+")",h,null,null,null,h.length,null,a[d])}}})})();"use strict";
|
||
|
Polymer("tv-c-single-flow-event-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){this.textContent="";var c=document.createElement("tv-c-single-slice-sub-view");this.appendChild(c);c.setSelectionWithoutErrorChecks(d);this.currentSelection_=d},get selection(){return this.currentSelection_}});"use strict";
|
||
|
Polymer("tv-c-multi-flow-event-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){this.textContent="";var c=document.createElement("tv-c-multi-slice-sub-view");this.appendChild(c);c.setSelectionWithoutErrorChecks(d);this.currentSelection_=d},get selection(){return this.currentSelection_}});"use strict";
|
||
|
tv.exportTo("tv.c.analysis",function(){var d=tv.b.ui.define("object-instance-view");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectInstance_=void 0},get requiresTallView(){return!0},set modelEvent(b){this.objectInstance=b},get modelEvent(){return this.objectInstance},get objectInstance(){return this.objectInstance_},set objectInstance(b){this.objectInstance_=b;this.updateContents()},updateContents:function(){throw Error("Not implemented");}};var c=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);
|
||
|
c.mandatoryBaseClass=d;c.defaultMetadata={showInTrackView:!0};tv.b.decorateExtensionRegistry(d,c);return{ObjectInstanceView:d}});"use strict";
|
||
|
Polymer("tv-c-single-object-instance-sub-view",{created:function(){this.currentSelection_=void 0},get requiresTallView(){if(0===this.children.length)return!1;if(this.children[0]instanceof tv.c.analysis.ObjectInstanceView)return this.children[0].requiresTallView},get selection(){return this.currentSelection_},set selection(d){if(1!==d.length)throw Error("Only supports single item selections");if(!(d[0]instanceof tv.c.trace_model.ObjectInstance))throw Error("Only supports object instances");this.textContent=
|
||
|
"";this.currentSelection_=d;d=d[0];var c=tv.c.analysis.ObjectInstanceView.getTypeInfo(d.category,d.typeName);c?(c=new c.constructor,this.appendChild(c),c.modelEvent=d):this.appendGenericAnalysis_(d)},appendGenericAnalysis_:function(d){var c;c=""+('<div class="title">'+d.typeName+" "+d.id+"</div>\n");c+="<table><tr>";c+="<tr><td>creationTs:</td><td>"+d.creationTs+"</td></tr>\n";c=d.deletionTs!=Number.MAX_VALUE?c+("<tr><td>deletionTs:</td><td>"+d.deletionTs+"</td></tr>\n"):c+"<tr><td>deletionTs:</td><td>not deleted</td></tr>\n";
|
||
|
c+='<tr><td>snapshots:</td><td id="snapshots"></td></tr>\n';this.innerHTML=c+="</table>";var b=this.querySelector("#snapshots");d.snapshots.forEach(function(a){var c=new tv.c.analysis.ObjectSnapshotLink;c.objectSnapshot=a;b.appendChild(c)})}});"use strict";
|
||
|
Polymer("tv-c-single-object-snapshot-sub-view",{created:function(){this.currentSelection_=void 0},get requiresTallView(){if(0===this.children.length)return!1;if(this.children[0]instanceof tv.c.analysis.ObjectSnapshotView)return this.children[0].requiresTallView},get selection(){return this.currentSelection_},set selection(d){if(1!==d.length)throw Error("Only supports single item selections");if(!(d[0]instanceof tv.c.trace_model.ObjectSnapshot))throw Error("Only supports object instances");this.textContent=
|
||
|
"";this.currentSelection_=d;d=d[0];var c=tv.c.analysis.ObjectSnapshotView.getTypeInfo(d.objectInstance.category,d.objectInstance.typeName);c?(c=new c.constructor,this.appendChild(c),c.modelEvent=d):this.appendGenericAnalysis_(d)},appendGenericAnalysis_:function(d){var c=d.objectInstance,b;b=""+('<div class="title">Snapshot of <a id="instance-link"></a> @ '+tv.c.analysis.tsRound(d.ts)+"ms</div>\n");b+="<table><tr>";b+='<tr><td>args:</td><td id="args"></td></tr>\n';this.innerHTML=b+="</table>";b=new tv.c.analysis.ObjectInstanceLink;
|
||
|
b.objectInstance=c;c=this.querySelector("#instance-link");c.parentElement.replaceChild(b,c);c=this.querySelector("#args");c.textContent="";b=tv.c.analysis.GenericObjectView();b.object=d.args;c.appendChild(b)}});"use strict";
|
||
|
Polymer("tv-c-multi-object-sub-view",{created:function(){this.currentSelection_=void 0},get selection(){return this.currentSelection_},set selection(d){this.currentSelection_=d;this.textContent="";var c=new tv.c.analysis.AnalysisResults;this.appendChild(c);this.analyzeObjectEvents_(c,d)},analyzeObjectEvents_:function(d,c){c=tv.b.asArray(c).sort(tv.b.Range.compareByMinTimes);var b=d.appendTable("analysis-object-sample-table",2);c.forEach(function(a){var c=d.appendBodyRow(b),e,g,h;a instanceof tv.c.trace_model.ObjectSnapshot?
|
||
|
(e=tv.c.analysis.tsRound(a.ts),g=a.objectInstance.typeName+" "+a.objectInstance.id,h=function(){var b=new tv.c.Selection;b.push(a);return b}):(e=a.deletionTs==Number.MAX_VALUE?"":tv.c.analysis.tsRound(a.deletionTs),e=tv.c.analysis.tsRound(a.creationTs)+"-"+e,g=a.typeName+" "+a.id,h=function(){var b=new tv.c.Selection;b.push(a);return b});d.appendTableCell(b,c,e);d.appendTableCell(b,c,"").appendChild(d.createSelectionChangingLink(g,h))})}});"use strict";
|
||
|
Polymer("tv-c-single-sample-sub-view",{created:function(){this.currentSelection_=void 0},set selection(d){this.textContent="";this.currentSelection_=d;var c=new tv.c.analysis.AnalysisResults;this.appendChild(c);this.analyzeSingleSampleEvent_(c,d[0],"Sample Event")},get selection(){return this.currentSelection_},analyzeSingleSampleEvent_:function(d,c,b){d.appendHeader("Selected "+b+":");b=d.appendTable("analysis-slice-table",2);d.appendInfoRow(b,"Title",c.title);d.appendInfoRowTime(b,"Sample Time",
|
||
|
c.start);d.appendInfoRow(b,"Stack Trace",c.getUserFriendlyStackTrace())}});"use strict";Polymer("tv-c-multi-sample-sub-view",{created:function(){this.currentSelection_=void 0},get requiresTallView(){return!0},set selection(d){this.textContent="";this.currentSelection_=d;if(tv.isDefined("tv.e.analysis.SamplingSummaryPanel")){var c=new tv.e.analysis.SamplingSummaryPanel;this.appendChild(c);c.selection=d}else this.textContent="SamplingSummaryPanel not installed. :("},get selection(){return this.currentSelection_}});
|
||
|
"use strict";
|
||
|
(function(){var d=tv.c.trace_model.EventRegistry;Polymer("tracing-analysis-view",{ready:function(){this.tabView_=document.createElement("tracing-analysis-tab-view");this.tabView_.style.flex="1 1 auto";this.tabView_.addEventListener("selected-tab-change",this.onSelectedTabChange_.bind(this));this.appendChild(this.tabView_);this.currentSelection_=void 0},set tallMode(c){c?this.classList.add("tall-mode"):this.classList.remove("tall-mode")},get tallMode(){return this.classList.contains("tall-mode")},get tabView(){return this.tabView_},
|
||
|
get selection(){return this.currentSelection_},set selection(c){var b,a;this.tabView_.selectedTab&&(b=this.tabView_.selectedTab.tagName,a=this.tabView_.selectedTab._eventTypeName);this.tallMode=!1;this.tabView_.textContent="";c=c.getEventsOrganizedByBaseType(!0);tv.b.dictionaryLength(c);for(var f in c){var e=c[f],d=this.createSubViewForSelection_(f,e);d._eventTypeName=f;this.tabView_.appendChild(d);d.selection=e}var h;b&&(h=this.tabView_.querySelector(b));!h&&a&&(h=tv.b.findFirstInArray(this.tabView_.children,
|
||
|
function(b){return b._eventTypeName===a}));h||(h=this.tabView_.firstChild);this.tabView_.selectedTab=h},createSubViewForSelection_:function(c,b){var a=d.getEventTypeInfoByTypeName(c),f;f=1===b.length?a.metadata.singleViewElementName:a.metadata.multiViewElementName;if(!tv.b.getPolymerElementNamed(f))throw Error("Element not registered: "+f);f=document.createElement(f);a=(1===b.length?a.metadata.name:a.metadata.pluralName).replace(/[A-Z]/g," $&");a=a.charAt(0).toUpperCase()+a.slice(1);f.tabLabel=a;
|
||
|
return f},onSelectedTabChange_:function(){this.tallMode=this.tabView_.selectedTab?this.tabView_.selectedTab.requiresTallView:!1}})})();"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(){this.model_=this.timeline_=void 0;this.filterText_="";this.filterHits_=new tv.c.Selection;this.filterHitsDirty_=!0;this.currentHitIndex_=-1}var c=tv.b.Task;d.prototype={__proto__:Object.prototype,get timeline(){return this.timeline_},set timeline(b){this.timeline_=b;this.filterHitsDirty_=!0},get filterText(){return this.filterText_},set filterText(b){b!=this.filterText_&&(this.filterText_=b,this.filterHitsDirty_=!0)},updateFilterHits:function(){var b=Promise.resolve();
|
||
|
if(!this.filterHitsDirty_)return b;this.filterHits_=new tv.c.Selection;this.currentHitIndex_=-1;if(this.timeline_&&this.filterText.length){var b=new tv.c.TitleFilter(this.filterText),a=new tv.c.Selection,b=this.timeline.addAllObjectsMatchingFilterToSelectionAsTask(b,a),b=c.RunWhenIdle(b);b.then(function(){this.filterHitsDirty_=!1;this.filterHits_=a;this.timeline.setHighlightAndClearSelection(a)}.bind(this))}return b},get filterHits(){return this.filterHits_},get currentHitIndex(){return this.currentHitIndex_},
|
||
|
find_:function(b){-1===this.currentHitIndex_&&0>b&&(this.currentHitIndex_=0);var a=this.filterHits.length;this.currentHitIndex_=(this.currentHitIndex_+b+a)%a;this.timeline&&(this.timeline.selection=this.filterHits.subSelection(this.currentHitIndex_,1))},findNext:function(){this.find_(1)},findPrevious:function(){this.find_(-1)},reset:function(){this.filterText_="";this.filterHitsDirty_=!0}};return{FindController:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(c){this.document_=c||document;if(d.instance)throw Error("KeyEventManager is a singleton.");this.onEvent_=this.onEvent_.bind(this);this.document_.addEventListener("keydown",this.onEvent_);this.document_.addEventListener("keypress",this.onEvent_);this.document_.addEventListener("keyup",this.onEvent_);this.listeners_=[]}d.instance=void 0;document.head.addEventListener("tv-unittest-will-run",function(){d.instance&&(d.instance.destroy(),d.instance=void 0);d.instance=
|
||
|
new d});d.prototype={addListener:function(c,b,a){a.keyEventManagerGuid_||(a.keyEventManagerGuid_=tv.b.GUID.allocate(),a.keyEventManagerRefCount_=0);a.classList.add("key-event-manager-target");a.keyEventManagerRefCount_++;this.listeners_.push({guid:a.keyEventManagerGuid_,type:c,handler:b})},onEvent_:function(c){var b=void 0,a=!1,f=c.preventDefault;c.preventDefault=function(){b=!1;f.call(this)};var e=c.stopPropagation;c.stopPropagation=function(){a=!0;e.call(this)};c.stopImmediatePropagation=function(){throw Error("Not implemented");
|
||
|
};for(var d=this.document_.querySelectorAll(".key-event-manager-target"),h={},k=0;k<d.length;k++)h[d[k].keyEventManagerGuid_]=d[k];for(var d=this.listeners_.concat(),l=c.type,m=0,k=0;k<d.length;k++){var n=d[k];if(n.type===l){var q=h[n.guid];if(q&&(n=n.handler,m=n.handleEvent?m|!1===n.handleEvent.call(n,c):m|!1===n.call(q,c),a))break}}return!m&&b},removeListener:function(c,b,a){if(void 0===a.keyEventManagerGuid_)throw Error("Was not registered with KeyEventManager");if(0===a.keyEventManagerRefCount_)throw Error("No events were registered on the provided thisArg");
|
||
|
for(var f=0;f<this.listeners_.length;f++){var e=this.listeners_[f];if(e.type==c&&e.handler==b&&e.guid==a.keyEventManagerGuid_){a.keyEventManagerRefCount_--;0===a.keyEventManagerRefCount_&&a.classList.remove("key-event-manager-target");this.listeners_.splice(f,1);return}}throw Error("Listener not found");},destroy:function(){this.listeners_.splice(0);this.document_.removeEventListener("keydown",this.onEvent_);this.document_.removeEventListener("keypress",this.onEvent_);this.document_.removeEventListener("keyup",
|
||
|
this.onEvent_)},dispatchFakeEvent:function(c,b){var a=new KeyboardEvent(c,b);return d.instance.onEvent_.call(void 0,a)}};d.instance=new d;return{KeyEventManager:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(c){this.onMouseDown_=this.onMouseDown_.bind(this);this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.targetElement=c}d.prototype={get targetElement(){return this.targetElement_},set targetElement(c){this.targetElement_&&this.targetElement_.removeEventListener("mousedown",this.onMouseDown_);(this.targetElement_=c)&&this.targetElement_.addEventListener("mousedown",this.onMouseDown_)},onMouseDown_:function(c){if(0!==
|
||
|
c.button)return!0;c=this.remakeEvent_(c,"mouse-tracker-start");this.targetElement_.dispatchEvent(c);document.addEventListener("mousemove",this.onMouseMove_);document.addEventListener("mouseup",this.onMouseUp_);this.targetElement_.addEventListener("blur",this.onMouseUp_);this.savePreviousUserSelect_=document.body.style["-webkit-user-select"];document.body.style["-webkit-user-select"]="none";c.preventDefault();return!0},onMouseMove_:function(c){c=this.remakeEvent_(c,"mouse-tracker-move");this.targetElement_.dispatchEvent(c)},
|
||
|
onMouseUp_:function(c){document.removeEventListener("mousemove",this.onMouseMove_);document.removeEventListener("mouseup",this.onMouseUp_);this.targetElement_.removeEventListener("blur",this.onMouseUp_);document.body.style["-webkit-user-select"]=this.savePreviousUserSelect_;c=this.remakeEvent_(c,"mouse-tracker-end");this.targetElement_.dispatchEvent(c)},remakeEvent_:function(c,b){var a=new tv.b.Event(b,!0,!0);a.x=c.x;a.y=c.y;a.offsetX=c.offsetX;a.offsetY=c.offsetY;a.clientX=c.clientX;a.clientY=c.clientY;
|
||
|
return a}};return{MouseTracker:d,trackMouseMovesUntilMouseUp:function(c,b){function a(f){document.removeEventListener("mousemove",c);document.removeEventListener("mouseup",a);b&&b(f)}document.addEventListener("mousemove",c);document.addEventListener("mouseup",a)}}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){var d=document.currentScript.ownerDocument,c={SELECTION:1,PANSCAN:2,ZOOM:4,TIMING:8,ROTATE:16,ALL_MODES:31},b={};b[c.PANSCAN]={title:"pan",className:"pan-scan-mode-button",eventNames:{enter:"enterpan",begin:"beginpan",update:"updatepan",end:"endpan",exit:"exitpan"}};b[c.SELECTION]={title:"selection",className:"selection-mode-button",eventNames:{enter:"enterselection",begin:"beginselection",update:"updateselection",end:"endselection",exit:"exitselection"}};b[c.ZOOM]=
|
||
|
{title:"zoom",className:"zoom-mode-button",eventNames:{enter:"enterzoom",begin:"beginzoom",update:"updatezoom",end:"endzoom",exit:"exitzoom"}};b[c.TIMING]={title:"timing",className:"timing-mode-button",eventNames:{enter:"entertiming",begin:"begintiming",update:"updatetiming",end:"endtiming",exit:"exittiming"}};b[c.ROTATE]={title:"rotate",className:"rotate-mode-button",eventNames:{enter:"enterrotate",begin:"beginrotate",update:"updaterotate",end:"endrotate",exit:"exitrotate"}};var a={SHIFT:1,SPACE:2,
|
||
|
CMD_OR_CTRL:4},f=tv.b.ui.define("div");f.prototype={__proto__:HTMLDivElement.prototype,decorate:function(a){this.classList.add("mouse-mode-selector");var b=tv.b.instantiateTemplate("#mouse-mode-selector-template",d);this.appendChild(b);this.buttonsEl_=this.querySelector(".buttons");this.dragHandleEl_=this.querySelector(".drag-handle");this.supportedModeMask=c.ALL_MODES;this.initialRelativeMouseDownPos_={x:0,y:0};this.defaultMode_=c.PANSCAN;this.settingsKey_=void 0;this.mousePos_={x:0,y:0};this.mouseDownPos_=
|
||
|
{x:0,y:0};this.dragHandleEl_.addEventListener("mousedown",this.onDragHandleMouseDown_.bind(this));this.onMouseDown_=this.onMouseDown_.bind(this);this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.buttonsEl_.addEventListener("mouseup",this.onButtonMouseUp_);this.buttonsEl_.addEventListener("mousedown",this.onButtonMouseDown_);this.buttonsEl_.addEventListener("click",this.onButtonPress_.bind(this));tv.b.KeyEventManager.instance.addListener("keydown",this.onKeyDown_,
|
||
|
this);tv.b.KeyEventManager.instance.addListener("keyup",this.onKeyUp_,this);this.mode_=this.keyCodeCondition=void 0;this.modeToKeyCodeMap_={};this.modifierToModeMap_={};this.targetElement=a;this.spacePressed_=!1;this.modeBeforeAlternativeModeActivated_=null;this.isClick_=this.isInteracting_=!1},get targetElement(){return this.targetElement_},set targetElement(a){this.targetElement_&&this.targetElement_.removeEventListener("mousedown",this.onMouseDown_);(this.targetElement_=a)&&this.targetElement_.addEventListener("mousedown",
|
||
|
this.onMouseDown_)},get defaultMode(){return this.defaultMode_},set defaultMode(a){this.defaultMode_=a},get settingsKey(){return this.settingsKey_},set settingsKey(a){if(this.settingsKey_=a)if(a=tv.b.Settings.get(this.settingsKey_+".mode",void 0),void 0===b[a]&&(a=void 0),0===(a&this.supportedModeMask_)&&(a=void 0),a||(a=this.defaultMode_),this.mode=a,a=tv.b.Settings.get(this.settingsKey_+".pos",void 0))this.pos=a},get supportedModeMask(){return this.supportedModeMask_},set supportedModeMask(a){function f(a){var c=
|
||
|
document.createElement("div");c.mode=a;c.title=b[a].title;c.classList.add("tool-button");c.classList.add(b[a].className);return c}if(this.mode&&0===(a&this.mode))throw Error("supportedModeMask must include current mode.");this.supportedModeMask_=a;this.buttonsEl_.textContent="";for(var d in c)"ALL_MODES"!=d&&(a=c[d],0!==(this.supportedModeMask_&a)&&this.buttonsEl_.appendChild(f(a)))},get mode(){return this.currentMode_},set mode(a){if(void 0!==a){if("number"!==typeof a)throw Error("Mode must be a number");
|
||
|
if(0===(a&this.supportedModeMask_))throw Error("Cannot switch to this mode, it is not supported");if(void 0===b[a])throw Error("Unrecognized mode");}var c;if(this.currentMode_!==a){if(this.currentMode_){c=b[this.currentMode_];var f=this.buttonsEl_.querySelector("."+c.className);f&&f.classList.remove("active");this.isInteracting_&&(f=this.createEvent_(b[this.mode].eventNames.end),this.dispatchEvent(f));tv.b.dispatchSimpleEvent(this,c.eventNames.exit,!0)}if(this.currentMode_=a)c=b[this.currentMode_],
|
||
|
(f=this.buttonsEl_.querySelector("."+c.className))&&f.classList.add("active"),this.mouseDownPos_.x=this.mousePos_.x,this.mouseDownPos_.y=this.mousePos_.y,this.isInAlternativeMode_||tv.b.dispatchSimpleEvent(this,c.eventNames.enter,!0),this.isInteracting_&&(f=this.createEvent_(b[this.mode].eventNames.begin),this.dispatchEvent(f));this.settingsKey_&&!this.isInAlternativeMode_&&tv.b.Settings.set(this.settingsKey_+".mode",this.mode)}},setKeyCodeForMode:function(a,c){if(0===(a&this.supportedModeMask_))throw Error("Mode not supported");
|
||
|
this.modeToKeyCodeMap_[a]=c;if(this.buttonsEl_){var f=b[a],d=this.buttonsEl_.querySelector("."+f.className);d&&(d.title=f.title+" ("+String.fromCharCode(c)+")")}},setKeyCodeCondition:function(a){this.keyCodeCondition=a},setCurrentMousePosFromEvent_:function(a){this.mousePos_.x=a.clientX;this.mousePos_.y=a.clientY},createEvent_:function(a,b){var c=new tv.b.Event(a,!0);c.clientX=this.mousePos_.x;c.clientY=this.mousePos_.y;c.deltaX=this.mousePos_.x-this.mouseDownPos_.x;c.deltaY=this.mousePos_.y-this.mouseDownPos_.y;
|
||
|
c.mouseDownX=this.mouseDownPos_.x;c.mouseDownY=this.mouseDownPos_.y;c.didPreventDefault=!1;c.preventDefault=function(){c.didPreventDefault=!0;b&&b.preventDefault()};c.stopPropagation=function(){b.stopPropagation()};c.stopImmediatePropagation=function(){throw Error("Not implemented");};return c},onMouseDown_:function(a){0===a.button&&(this.setCurrentMousePosFromEvent_(a),a=this.createEvent_(b[this.mode].eventNames.begin,a),this.dispatchEvent(a),this.isClick_=this.isInteracting_=!0,tv.b.ui.trackMouseMovesUntilMouseUp(this.onMouseMove_,
|
||
|
this.onMouseUp_))},onMouseMove_:function(a){this.setCurrentMousePosFromEvent_(a);var c=this.createEvent_(b[this.mode].eventNames.update,a);this.dispatchEvent(c);this.isInteracting_&&this.checkIsClick_(a)},onMouseUp_:function(a){if(0===a.button){var c=this.createEvent_(b[this.mode].eventNames.end,a);c.isClick=this.isClick_;this.dispatchEvent(c);this.isClick_&&!c.didPreventDefault&&this.dispatchClickEvents_(a);this.isInteracting_=!1;this.updateAlternativeModeState_(a)}},onButtonMouseDown_:function(a){a.preventDefault();
|
||
|
a.stopImmediatePropagation()},onButtonMouseUp_:function(a){a.preventDefault();a.stopImmediatePropagation()},onButtonPress_:function(a){this.modeBeforeAlternativeModeActivated_=void 0;this.mode=a.target.mode;a.preventDefault()},onKeyDown_:function(a){32===a.keyCode&&(this.spacePressed_=!0);this.updateAlternativeModeState_(a)},onKeyUp_:function(a){32===a.keyCode&&(this.spacePressed_=!1);if(void 0==this.keyCodeCondition||this.keyCodeCondition()){var b=!1;tv.b.iterItems(this.modeToKeyCodeMap_,function(c,
|
||
|
f){a.keyCode===f&&(this.modeBeforeAlternativeModeActivated_=void 0,this.mode=parseInt(c),b=!0)},this);b?(a.preventDefault(),a.stopPropagation()):this.updateAlternativeModeState_(a)}},updateAlternativeModeState_:function(b){var c=this.spacePressed_,f=tv.isMac&&b.metaKey||!tv.isMac&&b.ctrlKey,d=this.supportedModeMask_,l=!1;b.shiftKey&&0!==(this.modifierToModeMap_[a.SHIFT]&d)?(b=this.modifierToModeMap_[a.SHIFT],l=!0):c&&0!==(this.modifierToModeMap_[a.SPACE]&d)?(b=this.modifierToModeMap_[a.SPACE],l=!0):
|
||
|
f&&0!==(this.modifierToModeMap_[a.CMD_OR_CTRL]&d)?(b=this.modifierToModeMap_[a.CMD_OR_CTRL],l=!0):this.isInAlternativeMode_?(b=this.modeBeforeAlternativeModeActivated_,l=!1):b=void 0;this.mode!==b&&void 0!==b&&(l&&(this.modeBeforeAlternativeModeActivated_=this.mode),this.mode=b)},get isInAlternativeMode_(){return!!this.modeBeforeAlternativeModeActivated_},setModifierForAlternateMode:function(a,b){this.modifierToModeMap_[b]=a},get pos(){return{x:parseInt(this.style.left),y:parseInt(this.style.top)}},
|
||
|
set pos(a){a=this.constrainPositionToBounds_(a);this.style.left=a.x+"px";this.style.top=a.y+"px";this.settingsKey_&&tv.b.Settings.set(this.settingsKey_+".pos",this.pos)},constrainPositionToBounds_:function(a){var b=tv.b.windowRectForElement(this.offsetParent||document.body),c=b.height-this.offsetHeight,b=b.width-this.offsetWidth,f={};f.x=Math.max(a.x,0);f.x=Math.min(f.x,b);f.y=Math.max(a.y,0);f.y=Math.min(f.y,c);return f},onDragHandleMouseDown_:function(a){a.preventDefault();a.stopImmediatePropagation();
|
||
|
var b=a.clientX-this.offsetLeft,c=a.clientY-this.offsetTop;tv.b.ui.trackMouseMovesUntilMouseUp(function(a){var e={};e.x=a.clientX-b;e.y=a.clientY-c;this.pos=e}.bind(this))},checkIsClick_:function(a){if(this.isInteracting_&&this.isClick_){a=this.mousePos_.x-this.mouseDownPos_.x;var b=this.mousePos_.y-this.mouseDownPos_.y;16<a*a+b*b&&(this.isClick_=!1)}},dispatchClickEvents_:function(a){if(this.isClick_){a=b[c.SELECTION].eventNames;var f=this.createEvent_(a.begin);this.dispatchEvent(f);f=this.createEvent_(a.end);
|
||
|
this.dispatchEvent(f)}}};return{MIN_MOUSE_SELECTION_DISTANCE:4,MouseModeSelector:f,MOUSE_SELECTOR_MODE:c,MODIFIER:a}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(){this.textWidthMap={}}function c(a,b){this.string=a;this.width=b}var b={};new d;d.prototype={get:function(a,f,e,d,h){var k=b[e];k||(k={},b[e]=k);d=k[f];d||(k[f]={},d=k[f]);k=d[h];if(void 0===k){for(k=!1;this.labelWidthWorld(a,e,f)>h&&!(1>.75*e.length);)e=e.substring(0,.75*e.length),k=!0;k&&3<e.length&&(e=e.substring(0,e.length-3)+"...");k=new c(e,this.labelWidth(a,e));d[h]=k}return k},quickMeasureText_:function(a,b){var c=this.textWidthMap[b];c||(c=a.measureText(b).width,
|
||
|
this.textWidthMap[b]=c);return c},labelWidth:function(a,b){return this.quickMeasureText_(a,b)+2},labelWidthWorld:function(a,b,c){return this.labelWidth(a,b)*c}};return{ElidedTitleCache:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(a,b,c,f,d){a.moveTo(b,c);a.lineTo(f,d)}function c(a,b,c,f,d,m,n){a.beginPath();a.moveTo(b,c);a.lineTo(f,d);a.lineTo(m,n);a.closePath()}var b=new tv.c.ElidedTitleCache,a=tv.b.ui.getColorPalette(),f=tv.c.EventPresenter;return{drawSlices:function(b,c,d,k,l,m,n){var q=window.devicePixelRatio||1,u=c.xViewVectorToWorld(1);l*=q;q*=4;l<q&&(q=0);var v=l-q;b.save();c.applyTransformToCanvas(b);c=new tv.c.FastRectRenderer(b,2*u,2*u,a);c.setYandH(0,l);for(d=tv.b.findLowIndexInSortedArray(m,
|
||
|
function(a){return a.start+a.duration},d);d<m.length;++d){var y=m[d],E=y.start;if(E>k)break;var C=u;0<y.duration&&(C=Math.max(y.duration,.001),C<u&&(C=u));var p=f.getSliceColorId(y),r=f.getSliceAlpha(y,n),t=.7*r;if(y.cpuDuration){var y=y.cpuDuration/y.duration*C,w=C-y;y<1*u&&(y=0,w=C);w<3*u&&(y=C,w=0);0<y&&c.fillRect(E,y,p,r);0<w&&(c.setYandH(0,v),c.fillRect(E+y-u,w+u,p,t),c.setYandH(v,q),c.fillRect(E+y-u,w+u,p,r),c.setYandH(0,l))}else c.fillRect(E,C,p,r)}c.flush();b.restore()},drawInstantSlicesAsLines:function(a,
|
||
|
b,c,d,l,m,n){var q=window.devicePixelRatio||1;l*=q;var u=b.xViewVectorToWorld(1);a.save();a.lineWidth=u*n*q;b.applyTransformToCanvas(a);a.beginPath();for(b=tv.b.findLowIndexInSortedArray(m,function(a){return a.start},c);b<m.length;++b){c=m[b];n=c.start;if(n>d)break;a.strokeStyle=f.getInstantSliceColor(c);a.moveTo(n,0);a.lineTo(n,l)}a.stroke();a.restore()},drawLabels:function(a,c,d,k,l,m,n,q){var u=window.devicePixelRatio||1,v=c.xViewVectorToWorld(1);a.save();a.textAlign="center";a.textBaseline="top";
|
||
|
a.font=n*u+"px sans-serif";m&&(a.font="italic "+a.font);m=q*u;n=tv.b.findLowIndexInSortedArray(l,function(a){return a.start+a.duration},d);for(d=20*v;n<l.length;++n){u=l[n];if(u.start>k)break;if(!(u.duration<=d)){q=u.title+(u.didNotFinish?" (Did Not Finish)":"");var y=b.labelWidth(a,q);b.labelWidthWorld(a,q,v)>u.duration&&(y=b.get(a,v,q,y,u.duration),q=y.string,y=y.width);y*v<u.duration&&(a.fillStyle=f.getTextColor(u),u=c.xWorldToView(u.start+.5*u.duration),a.fillText(q,u,m,y))}}a.restore()},drawLine:d,
|
||
|
drawTriangle:c,drawArrow:function(a,b,f,k,l,m,n){var q=k-b,u=l-f,v=Math.sqrt(q*q+u*u),y=(v-m)/v;m=b+y*q;y=f+y*u;u=u/v*n;n*=-(q/v);a.beginPath();d(a,b,f,k,l);a.stroke();c(a,m+u,y+n,k,l,m-u,y-n);a.fill()},elidedTitleCache_:b,THIN_SLICE_HEIGHT:4}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(c){this.viewport_=c;this.range_=new tv.b.Range;this.rightSelected_=this.leftSelected_=!1;this.rightSnapIndicator_=this.leftSnapIndicator_=void 0}d.prototype={get isEmpty(){return this.range_.isEmpty},reset:function(){this.range_.reset();this.rightSelected_=this.leftSelected_=!1;this.rightSnapIndicator_=this.leftSnapIndicator_=void 0;this.viewport_.dispatchChangeEvent()},get min(){return this.range_.min},set min(c){this.range_.min=c;this.viewport_.dispatchChangeEvent()},
|
||
|
get max(){return this.range_.max},set max(c){this.range_.max=c;this.viewport_.dispatchChangeEvent()},set:function(c){this.range_.reset();this.range_.addRange(c);this.viewport_.dispatchChangeEvent()},setMinAndMax:function(c,b){this.range_.min=c;this.range_.max=b;this.viewport_.dispatchChangeEvent()},get range(){return this.range_.range},asRangeObject:function(){var c=new tv.b.Range;c.addRange(this.range_);return c},get leftSelected(){return this.leftSelected_},set leftSelected(c){this.leftSelected_!=
|
||
|
c&&(this.leftSelected_=c,this.viewport_.dispatchChangeEvent())},get rightSelected(){return this.rightSelected_},set rightSelected(c){this.rightSelected_!=c&&(this.rightSelected_=c,this.viewport_.dispatchChangeEvent())},get leftSnapIndicator(){return this.leftSnapIndicator_},set leftSnapIndicator(c){this.leftSnapIndicator_=c;this.viewport_.dispatchChangeEvent()},get rightSnapIndicator(){return this.rightSnapIndicator_},set rightSnapIndicator(c){this.rightSnapIndicator_=c;this.viewport_.dispatchChangeEvent()},
|
||
|
draw:function(c,b,a){if(!this.range_.isEmpty){var f=this.viewport_.currentDisplayTransform,e=this.min,d=this.max,h=Math.round(f.xWorldToView(e)),k=Math.round(f.xWorldToView(d));c.fillStyle="rgba(0, 0, 0, 0.2)";e>b&&c.fillRect(f.xWorldToView(b),0,h,c.canvas.height);d<a&&c.fillRect(k,0,f.xWorldToView(a),c.canvas.height);c.lineWidth=Math.round(window.devicePixelRatio||1);0<this.range_.range?(this.drawLine_(c,b,a,c.canvas.height,this.min,this.leftSelected_),this.drawLine_(c,b,a,c.canvas.height,this.max,
|
||
|
this.rightSelected_)):this.drawLine_(c,b,a,c.canvas.height,this.min,this.leftSelected_||this.rightSelected_);c.lineWidth=1}},drawLine_:function(c,b,a,f,e,d){e<b||e>=a||(b=Math.round(this.viewport_.currentDisplayTransform.xWorldToView(e)),c.save(),c.translate(Math.round(c.lineWidth)%2/2,0),c.beginPath(),tv.c.drawLine(c,b,0,b,f),c.strokeStyle=d?"rgb(255, 0, 0)":"rgb(0, 0, 0)",c.stroke(),c.restore())},drawIndicators:function(c,b,a){this.leftSnapIndicator_&&this.drawIndicator_(c,b,a,this.range_.min,this.leftSnapIndicator_,
|
||
|
this.leftSelected_);this.rightSnapIndicator_&&this.drawIndicator_(c,b,a,this.range_.max,this.rightSnapIndicator_,this.rightSelected_)},drawIndicator_:function(c,b,a,f,e,d){b=Math.round(this.viewport_.currentDisplayTransform.xWorldToView(f));c.save();c.translate(Math.round(c.lineWidth)%2/2,0);a=e.y*devicePixelRatio;e=e.height*devicePixelRatio;f=4*(window.devicePixelRatio||1);c.fillStyle=d?"rgb(255, 0, 0)":"rgb(0, 0, 0)";tv.c.drawTriangle(c,b-.75*f,a,b+.75*f,a,b,a+f);c.fill();tv.c.drawTriangle(c,b-
|
||
|
.75*f,a+e,b+.75*f,a+e,b,a+e-f);c.fill();c.restore()}};return{SnapIndicator:function(c,b){this.y=c;this.height=b},TimelineInterestRange:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(c){c?this.set(c):(this.scaleX=1,this.panY=this.panX=0)}d.prototype={set:function(c){this.scaleX=c.scaleX;this.panX=c.panX;this.panY=c.panY},clone:function(){return new d(this)},equals:function(c){var b;if(void 0===c||null===c)return!1;b=1&this.panX===c.panX;b&=this.panY===c.panY;b&=this.scaleX===c.scaleX;return!!b},almostEquals:function(c){var b;if(void 0===c||null===c)return!1;b=1&.001>Math.abs(this.panX-c.panX);b&=.001>Math.abs(this.panY-c.panY);b&=.001>
|
||
|
Math.abs(this.scaleX-c.scaleX);return!!b},incrementPanXInViewUnits:function(c){this.panX+=this.xViewVectorToWorld(c)},xPanWorldPosToViewPos:function(c,b,a){if("string"==typeof b)if("left"===b)b=0;else if("center"===b)b=a/2;else if("right"===b)b=a-1;else throw Error("viewX must be left|center|right or number.");this.panX=b/this.scaleX-c},xPanWorldBoundsIntoView:function(c,b,a){0>this.xWorldToView(c)?this.xPanWorldPosToViewPos(c,"left",a):this.xWorldToView(b)>a&&this.xPanWorldPosToViewPos(b,"right",
|
||
|
a)},xSetWorldBounds:function(c,b,a){this.setPanAndScale(-c,a/(b-c))},setPanAndScale:function(c,b){this.scaleX=b;this.panX=c},xWorldToView:function(c){return(c+this.panX)*this.scaleX},xWorldVectorToView:function(c){return c*this.scaleX},xViewToWorld:function(c){return c/this.scaleX-this.panX},xViewVectorToWorld:function(c){return c/this.scaleX},applyTransformToCanvas:function(c){c.transform(this.scaleX,0,0,1,this.panX*this.scaleX,0)}};return{TimelineDisplayTransform:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(){}d.prototype={canTakeOverFor:function(c){throw Error("Not implemented");},takeOverFor:function(c,b,a){throw Error("Not implemented");},start:function(c,b){throw Error("Not implemented");},didStopEarly:function(c,b,a){},tick:function(c,b){throw Error("Not implemented");}};return{Animation:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){function d(){tv.b.EventTarget.call(this);this.activeAnimation_=this.target_=void 0;this.tickScheduled_=!1}d.prototype={__proto__:tv.b.EventTarget.prototype,get target(){return this.target_},set target(c){if(this.activeAnimation_)throw Error("Cannot change target while animation is running.");if(void 0===c.cloneAnimationState||"function"!==typeof c.cloneAnimationState)throw Error("target must have a cloneAnimationState function");this.target_=c},get activeAnimation(){return this.activeAnimation_},
|
||
|
get hasActiveAnimation(){return!!this.activeAnimation_},queueAnimation:function(c,b){if(void 0===this.target_)throw Error("Cannot queue animations without a target");var a;a=void 0!==b?b:window.performance.now();this.activeAnimation_&&this.activeAnimation_.tick(a,this.target_)&&(this.activeAnimation_=void 0);this.activeAnimation_&&(c.canTakeOverFor(this.activeAnimation_)?(this.activeAnimation_.didStopEarly(a,this.target_,!0),c.takeOverFor(this.activeAnimation_,a,this.target_)):this.activeAnimation_.didStopEarly(a,
|
||
|
this.target_,!1));this.activeAnimation_=c;this.activeAnimation_.start(a,this.target_);this.tickScheduled_||(this.tickScheduled_=!0,tv.b.requestAnimationFrame(this.tickActiveAnimation_,this))},cancelActiveAnimation:function(c){this.activeAnimation_&&(c=void 0!==c?c:window.performance.now(),this.activeAnimation_.didStopEarly(c,this.target_,!1),this.activeAnimation_=void 0)},tickActiveAnimation_:function(c){this.tickScheduled_=!1;if(this.activeAnimation_)if(void 0===this.target_)this.activeAnimation_.didStopEarly(c,
|
||
|
this.target_,!1);else{var b=this.target_.cloneAnimationState();this.activeAnimation_.tick(c,this.target_)&&(this.activeAnimation_=void 0);this.activeAnimation_&&(this.tickScheduled_=!0,tv.b.requestAnimationFrame(this.tickActiveAnimation_,this));b&&(c=new Event("didtick"),c.oldTargetState=b,this.dispatchEvent(c,!1,!1))}}};return{AnimationController:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(){this.stableIdToTrackMap_={}}function c(c){this.parentEl_=c;this.modelTrackContainer_=void 0;this.currentDisplayTransform_=new b;this.initAnimationController_();this.highDetails_=this.highlightVSync_=this.showFlowEvents_=!1;this.gridTimebase_=0;this.gridStep_=1E3/60;this.hasCalledSetupFunction_=this.gridEnabled_=!1;this.onResize_=this.onResize_.bind(this);this.onModelTrackControllerScroll_=this.onModelTrackControllerScroll_.bind(this);this.checkForAttachInterval_=
|
||
|
setInterval(this.checkForAttach_.bind(this),250);this.majorMarkPositions=[];this.interestRange_=new a(this);this.eventToTrackMap_={};this.containerToTrackObj=new d}var b=tv.c.TimelineDisplayTransform,a=tv.c.TimelineInterestRange;d.prototype={addContainer:function(a,b){if(!b)throw Error("Must provide a track.");this.stableIdToTrackMap_[a.stableId]=b},clearMap:function(){this.stableIdToTrackMap_={}},getTrackByStableId:function(a){return this.stableIdToTrackMap_[a]}};c.prototype={__proto__:tv.b.EventTarget.prototype,
|
||
|
setWhenPossible:function(a){this.pendingSetFunction_=a},get isAttachedToDocumentOrInTestMode(){if(void 0!==this.parentEl_)return tv.b.ui.isElementAttachedToDocument(this.parentEl_)},onResize_:function(){this.dispatchChangeEvent()},checkForAttach_:function(){if(this.isAttachedToDocumentOrInTestMode&&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_),
|
||
|
this.iframe_.contentWindow.addEventListener("resize",this.onResize_));var a=this.parentEl_.clientWidth+"x"+this.parentEl_.clientHeight;if(this.pendingSetFunction_){this.lastSize_=a;try{this.pendingSetFunction_()}catch(b){console.log("While running setWhenPossible:",b.message?b.message+"\n"+b.stack:b.stack)}this.pendingSetFunction_=void 0}window.clearInterval(this.checkForAttachInterval_);this.checkForAttachInterval_=void 0}},dispatchChangeEvent:function(){tv.b.dispatchSimpleEvent(this,"change")},
|
||
|
detach:function(){this.checkForAttachInterval_&&(window.clearInterval(this.checkForAttachInterval_),this.checkForAttachInterval_=void 0);this.iframe_&&(this.iframe_.removeEventListener("resize",this.onResize_),this.parentEl_.removeChild(this.iframe_))},initAnimationController_:function(){this.dtAnimationController_=new tv.b.ui.AnimationController;this.dtAnimationController_.addEventListener("didtick",function(a){this.onCurentDisplayTransformChange_(a.oldTargetState)}.bind(this));var a=this;this.dtAnimationController_.target=
|
||
|
{get panX(){return a.currentDisplayTransform_.panX},set panX(b){a.currentDisplayTransform_.panX=b},get panY(){return a.currentDisplayTransform_.panY},set panY(b){a.currentDisplayTransform_.panY=b},get scaleX(){return a.currentDisplayTransform_.scaleX},set scaleX(b){a.currentDisplayTransform_.scaleX=b},cloneAnimationState:function(){return a.currentDisplayTransform_.clone()},xPanWorldPosToViewPos:function(b,c){a.currentDisplayTransform_.xPanWorldPosToViewPos(b,c,a.modelTrackContainer_.canvas.clientWidth)}}},
|
||
|
get currentDisplayTransform(){return this.currentDisplayTransform_},setDisplayTransformImmediately:function(a){this.dtAnimationController_.cancelActiveAnimation();var b=this.dtAnimationController_.target.cloneAnimationState();this.currentDisplayTransform_.set(a);this.onCurentDisplayTransformChange_(b)},queueDisplayTransformAnimation:function(a){if(!(a instanceof tv.b.ui.Animation))throw Error("animation must be instanceof tv.b.ui.Animation");this.dtAnimationController_.queueAnimation(a)},onCurentDisplayTransformChange_:function(a){this.modelTrackContainer_&&
|
||
|
(this.currentDisplayTransform.panY=tv.b.clamp(this.currentDisplayTransform.panY,0,this.modelTrackContainer_.scrollHeight-this.modelTrackContainer_.clientHeight));var b=!this.currentDisplayTransform.equals(a);this.currentDisplayTransform.panY!==a.panY&&(this.modelTrackContainer_.scrollTop=this.currentDisplayTransform.panY);b&&this.dispatchChangeEvent()},onModelTrackControllerScroll_:function(a){this.dtAnimationController_.activeAnimation&&this.dtAnimationController_.activeAnimation.affectsPanY&&this.dtAnimationController_.cancelActiveAnimation();
|
||
|
this.currentDisplayTransform_.panY=this.modelTrackContainer_.scrollTop},get modelTrackContainer(){return this.modelTrackContainer_},set modelTrackContainer(a){this.modelTrackContainer_&&this.modelTrackContainer_.removeEventListener("scroll",this.onModelTrackControllerScroll_);this.modelTrackContainer_=a;this.modelTrackContainer_.addEventListener("scroll",this.onModelTrackControllerScroll_)},get showFlowEvents(){return this.showFlowEvents_},set showFlowEvents(a){this.showFlowEvents_=a;this.dispatchChangeEvent()},
|
||
|
get highlightVSync(){return this.highlightVSync_},set highlightVSync(a){this.highlightVSync_=a;this.dispatchChangeEvent()},get highDetails(){return this.highDetails_},set highDetails(a){this.highDetails_=a;this.dispatchChangeEvent()},get gridEnabled(){return this.gridEnabled_},set gridEnabled(a){this.gridEnabled_!=a&&(this.gridEnabled_=a&&!0,this.dispatchChangeEvent())},get gridTimebase(){return this.gridTimebase_},set gridTimebase(a){this.gridTimebase_!=a&&(this.gridTimebase_=a,this.dispatchChangeEvent())},
|
||
|
get gridStep(){return this.gridStep_},get interestRange(){return this.interestRange_},drawMajorMarkLines:function(a){a.save();a.translate(Math.round(a.lineWidth)%2/2,0);a.beginPath();for(var b in this.majorMarkPositions){var c=Math.floor(this.majorMarkPositions[b]);tv.c.drawLine(a,c,0,c,a.canvas.height)}a.strokeStyle="#ddd";a.stroke();a.restore()},drawGridLines:function(a,b,c){if(this.gridEnabled){var d=this.currentDisplayTransform,k=this.gridTimebase;a.save();a.translate(Math.round(a.lineWidth)%
|
||
|
2/2,0);for(a.beginPath();k<c;){if(k>=b){var l=Math.floor(d.xWorldToView(k));tv.c.drawLine(a,l,0,l,a.canvas.height)}k+=this.gridStep}a.strokeStyle="rgba(255, 0, 0, 0.25)";a.stroke();a.restore()}},rebuildEventToTrackMap:function(){this.eventToTrackMap_=void 0;var a={addEvent:function(a,b){if(!b)throw Error("Must provide a track.");this[a.guid]=b}};this.modelTrackContainer_.addEventsToTrackMap(a);this.eventToTrackMap_=a},rebuildContainerToTrackMap:function(){this.containerToTrackObj.clearMap();this.modelTrackContainer_.addContainersToTrackMap(this.containerToTrackObj)},
|
||
|
trackForEvent:function(a){return this.eventToTrackMap_[a.guid]}};return{ContainerToTrackObj:d,TimelineViewport:c}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(b,a,c){this.deltaX=b;this.deltaY=a;this.durationMs=void 0===c?100:c;this.startTimeMs=this.startPanY=this.startPanX=void 0}function c(b,a,c,e,d){this.goalFocalPointXWorld=b;this.goalFocalPointXView=a;this.goalFocalPointY=c;this.zoomInRatioX=e;this.durationMs=void 0===d?100:d;this.goalPanY=this.startPanY=this.goalScaleX=this.startScaleX=this.startTimeMs=void 0}d.prototype={__proto__:tv.b.ui.Animation.prototype,get affectsPanY(){return 0!==this.deltaY},canTakeOverFor:function(b){return b instanceof
|
||
|
d},takeOverFor:function(b,a,c){var e=b.goalPanX-c.panX;c=b.goalPanY-c.panY;b=a-(b.startTimeMs+b.durationMs);b=Math.max(b,0);this.deltaX+=e;this.deltaY+=c;this.durationMs+=b},start:function(b,a){this.startTimeMs=b;this.startPanX=a.panX;this.startPanY=a.panY},tick:function(b,a){var c=(b-this.startTimeMs)/this.durationMs,c=tv.b.clamp(c,0,1);a.panX=tv.b.lerp(c,this.startPanX,this.goalPanX);this.affectsPanY&&(a.panY=tv.b.lerp(c,this.startPanY,this.goalPanY));return b>=this.startTimeMs+this.durationMs},
|
||
|
get goalPanX(){return this.startPanX+this.deltaX},get goalPanY(){return this.startPanY+this.deltaY}};c.prototype={__proto__:tv.b.ui.Animation.prototype,get affectsPanY(){return this.startPanY!=this.goalPanY},canTakeOverFor:function(b){return!1},takeOverFor:function(b,a,c){this.goalScaleX=c.scaleX*this.zoomInRatioX},start:function(b,a){this.startTimeMs=b;this.startScaleX=a.scaleX;this.goalScaleX=this.zoomInRatioX*a.scaleX;this.startPanY=a.panY},tick:function(b,a){var c=(b-this.startTimeMs)/this.durationMs,
|
||
|
c=tv.b.clamp(c,0,1);a.scaleX=tv.b.lerp(c,this.startScaleX,this.goalScaleX);this.affectsPanY&&(a.panY=tv.b.lerp(c,this.startPanY,this.goalFocalPointY));a.xPanWorldPosToViewPos(this.goalFocalPointXWorld,this.goalFocalPointXView);return b>=this.startTimeMs+this.durationMs}};return{TimelineDisplayTransformPanAnimation:d,TimelineDisplayTransformZoomToAnimation:c}});"use strict";tv.exportTo("tv.c",function(){return{constants:{HEADING_WIDTH:250}}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(c,b){this.viewport_=c;this.onMouseMove_=this.onMouseMove_.bind(this);this.onDblClick_=this.onDblClick_.bind(this);this.targetElement_=b;this.isMovingLeftEdge_=!1}d.prototype={onEnterTiming:function(c){this.targetElement_.addEventListener("mousemove",this.onMouseMove_);this.targetElement_.addEventListener("dblclick",this.onDblClick_)},onBeginTiming:function(c){this.isTouchPointInsideTrackBounds_(c.clientX,c.clientY)&&(c=this.getSnappedToEventPosition_(c),this.mouseDownAt_(c.x,
|
||
|
c.y),this.updateSnapIndicators_(c))},updateSnapIndicators_:function(c){if(c.snapped){var b=this.viewport_.interestRange;b.min===c.x&&(b.leftSnapIndicator=new tv.c.SnapIndicator(c.y,c.height));b.max===c.x&&(b.rightSnapIndicator=new tv.c.SnapIndicator(c.y,c.height))}},onUpdateTiming:function(c){c=this.getSnappedToEventPosition_(c);this.mouseMoveAt_(c.x,c.y,!0);this.updateSnapIndicators_(c)},onEndTiming:function(c){this.mouseUp_()},onExitTiming:function(c){this.targetElement_.removeEventListener("mousemove",
|
||
|
this.onMouseMove_);this.targetElement_.removeEventListener("dblclick",this.onDblClick_)},onMouseMove_:function(c){if(!c.button){var b=this.getWorldXFromEvent_(c);this.mouseMoveAt_(b,c.clientY,!1)}},onDblClick_:function(c){console.error("not implemented")},isTouchPointInsideTrackBounds_:function(c,b){if(!this.viewport_||!this.viewport_.modelTrackContainer||!this.viewport_.modelTrackContainer.canvas)return!1;var a=this.viewport_.modelTrackContainer.canvas.getBoundingClientRect();return c>=a.left&&c<=
|
||
|
a.right&&b>=a.top&&b<=a.bottom?!0:!1},mouseDownAt_:function(c,b){var a=this.viewport_.interestRange,f=this.viewport_.currentDisplayTransform.xViewVectorToWorld(6*(window.devicePixelRatio||1));a.isEmpty?(a.setMinAndMax(c,c),a.rightSelected=!0,this.isMovingLeftEdge_=!1):Math.abs(c-a.min)<f?(a.leftSelected=!0,a.min=c,this.isMovingLeftEdge_=!0):(Math.abs(c-a.max)<f?(a.rightSelected=!0,a.max=c):(a.setMinAndMax(c,c),a.rightSelected=!0),this.isMovingLeftEdge_=!1)},mouseMoveAt_:function(c,b,a){b=this.viewport_.interestRange;
|
||
|
a?this.updateMovingEdge_(c):(b=this.viewport_.interestRange,a=this.viewport_.currentDisplayTransform.xViewVectorToWorld(6*(window.devicePixelRatio||1)),Math.abs(c-b.min)<a?(b.leftSelected=!0,b.rightSelected=!1):Math.abs(c-b.max)<a?(b.leftSelected=!1,b.rightSelected=!0):(b.leftSelected=!1,b.rightSelected=!1))},updateMovingEdge_:function(c){var b=this.viewport_.interestRange,a=b.min,f=b.max;this.isMovingLeftEdge_?a=c:f=c;a<=f?b.setMinAndMax(a,f):b.setMinAndMax(f,a);b.min==c?(this.isMovingLeftEdge_=
|
||
|
!0,b.leftSelected=!0,b.rightSelected=!1):(this.isMovingLeftEdge_=!1,b.leftSelected=!1,b.rightSelected=!0)},mouseUp_:function(){var c=this.viewport_.currentDisplayTransform,b=this.viewport_.interestRange;b.leftSelected=!1;b.rightSelected=!1;c=c.xViewVectorToWorld(2*(window.devicePixelRatio||1));b.range<c&&b.reset()},getWorldXFromEvent_:function(c){var b=window.devicePixelRatio||1,a=this.viewport_.modelTrackContainer.canvas.getBoundingClientRect().left;return this.viewport_.currentDisplayTransform.xViewToWorld((c.clientX-
|
||
|
a)*b)},getSnappedToEventPosition_:function(c){var b=16*(window.devicePixelRatio||1),a=this.viewport_.modelTrackContainer,f=a.getBoundingClientRect(),e=this.viewport_,d=e.currentDisplayTransform,h=d.xViewVectorToWorld(b),b=this.getWorldXFromEvent_(c);c=c.clientY;var k=new tv.c.Selection;a.addClosestEventToSelection(b,h,c,c,k);k.length||a.addClosestEventToSelection(b,h,f.top,f.bottom,k);for(var l=Infinity,d=d.xViewVectorToWorld(1),m={x:b,y:c-f.top,height:0,snapped:!1},n=new tv.b.Range,q=0;q<k.length;q++){var u=
|
||
|
k[q],v=e.trackForEvent(u).getBoundingClientRect();n.reset();u.addBoundsToRange(n);var u=Math.abs(n.min-b)<Math.abs(n.max-b)?n.min:n.max,y=u-b,E=v.top,v=v.height,C=Math.abs(E+v/2-c);(y<=h||Math.abs(y-h)<d)&&C<l&&(h=y,l=C,m.x=u,m.y=E+a.scrollTop-f.top,m.height=v,m.snapped=!0)}return m}};return{TimingTool:d}});"use strict";
|
||
|
tv.exportTo("tv.b.ui",function(){var d=tv.b.ui.define("div");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.observer_=new WebKitMutationObserver(this.didMutate_.bind(this));this.observer_.observe(this,{childList:!0});Object.defineProperty(this,"textContent",{get:void 0,set:this.onSetTextContent_})},appendChild:function(c){HTMLUnknownElement.prototype.appendChild.call(this,c);this.didMutate_(this.observer_.takeRecords())},insertBefore:function(c,b){HTMLUnknownElement.prototype.insertBefore.call(this,
|
||
|
c,b);this.didMutate_(this.observer_.takeRecords())},removeChild:function(c){HTMLUnknownElement.prototype.removeChild.call(this,c);this.didMutate_(this.observer_.takeRecords())},replaceChild:function(c,b){HTMLUnknownElement.prototype.replaceChild.call(this,c,b);this.didMutate_(this.observer_.takeRecords())},onSetTextContent_:function(c){if(""!=c)throw Error("textContent can only be set to ''.");this.clear()},clear:function(){for(;this.lastChild;)HTMLUnknownElement.prototype.removeChild.call(this,this.lastChild);
|
||
|
this.didMutate_(this.observer_.takeRecords())},didMutate_:function(c){this.beginDecorating_();for(var b=0;b<c.length;b++){var a=c[b].addedNodes;if(a)for(var f=0;f<a.length;f++)this.decorateChild_(a[f]);if(a=c[b].removedNodes)for(f=0;f<a.length;f++)this.undecorateChild_(a[f])}this.doneDecoratingForNow_()},decorateChild_:function(c){throw Error("Not implemented");},undecorateChild_:function(c){throw Error("Not implemented");},beginDecorating_:function(){},doneDecoratingForNow_:function(){}};return{ContainerThatDecoratesItsChildren:d}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("track",tv.b.ui.ContainerThatDecoratesItsChildren);d.prototype={__proto__:tv.b.ui.ContainerThatDecoratesItsChildren.prototype,decorate:function(c){tv.b.ui.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);if(void 0===c)throw Error("viewport is required when creating a Track.");this.viewport_=c;this.classList.add("track")},get viewport(){return this.viewport_},get drawingContainer(){for(var c=this;c;){if(c instanceof tv.c.tracks.DrawingContainer)return c;
|
||
|
c=c.parentElement}},get eventContainer(){},invalidateDrawingContainer:function(){var c=this.drawingContainer;c&&c.invalidate()},context:function(){if(this.parentNode){if(!this.parentNode.context)throw Error("Parent container does not support context() method.");return this.parentNode.context()}},decorateChild_:function(c){},undecorateChild_:function(c){c.detach&&c.detach()},updateContents_:function(){},drawTrack:function(c){var b=this.context(),a=window.devicePixelRatio||1,f=this.getBoundingClientRect(),
|
||
|
e=b.canvas.getBoundingClientRect();b.save();b.translate(0,a*(f.top-e.top));var d=this.viewport.currentDisplayTransform,e=d.xViewToWorld(0),a=d.xViewToWorld(f.width*a);this.draw(c,e,a);b.restore()},draw:function(c,b,a){},addEventsToTrackMap:function(c){},addContainersToTrackMap:function(c){},addIntersectingItemsInRangeToSelection:function(c,b,a,f,e){var d=window.devicePixelRatio||1,h=this.viewport.currentDisplayTransform,k=h.xViewVectorToWorld(1);c=h.xViewToWorld(c*d);b=h.xViewToWorld(b*d);d=this.getBoundingClientRect();
|
||
|
a=Math.max(a,d.top);f=Math.min(f,d.bottom);a>f||this.addIntersectingItemsInRangeToSelectionInWorldSpace(c,b,k,e)},addIntersectingItemsInRangeToSelectionInWorldSpace:function(c,b,a,f){},addClosestEventToSelection:function(c,b,a,f,e){},addClosestInstantEventToSelection:function(c,b,a,f){(c=tv.b.findClosestElementInSortedArray(c,function(a){return a.start},b,a))&&f.push(c)}};return{Track:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d={SLICE:1,INSTANT_EVENT:2,BACKGROUND:3,GRID:4,FLOW_ARROWS:5,MARKERS:6,HIGHLIGHTS:7},c=tv.b.ui.define("drawing-container",tv.c.tracks.Track);c.prototype={__proto__:tv.c.tracks.Track.prototype,decorate:function(b){tv.c.tracks.Track.prototype.decorate.call(this,b);this.classList.add("drawing-container");this.canvas_=document.createElement("canvas");this.canvas_.className="drawing-container-canvas";this.canvas_.style.left=tv.c.constants.HEADING_WIDTH+"px";this.appendChild(this.canvas_);
|
||
|
this.ctx_=this.canvas_.getContext("2d");this.viewportChange_=this.viewportChange_.bind(this);this.viewport.addEventListener("change",this.viewportChange_)},get canvas(){return this.canvas_},context:function(){return this.ctx_},viewportChange_:function(){this.invalidate()},invalidate:function(){this.rafPending_||(this.rafPending_=!0,tv.b.requestPreAnimationFrame(this.preDraw_,this))},preDraw_:function(){this.rafPending_=!1;this.updateCanvasSizeIfNeeded_();tv.b.requestAnimationFrameInThisFrameIfPossible(this.draw_,
|
||
|
this)},draw_:function(){this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);var b=[d.BACKGROUND,d.HIGHLIGHTS,d.GRID,d.INSTANT_EVENT,d.SLICE,d.MARKERS];this.viewport.showFlowEvents&&b.push(d.FLOW_ARROWS);for(var a in b)for(var c=0;c<this.children.length;++c)this.children[c]instanceof tv.c.tracks.Track&&this.children[c].drawTrack(b[a]);a=window.devicePixelRatio||1;var c=this.canvas_.getBoundingClientRect(),e=this.viewport.currentDisplayTransform,b=e.xViewToWorld(0);a=e.xViewToWorld(c.width*
|
||
|
a);this.viewport.drawGridLines(this.ctx_,b,a)},updateCanvasSizeIfNeeded_:function(){var b=tv.b.asArray(this.children).filter(this.visibleFilter_);this.getBoundingClientRect();var a=b[0].getBoundingClientRect(),c=b[b.length-1].getBoundingClientRect(),b=a.width-tv.c.constants.HEADING_WIDTH,a=c.bottom-a.top,c=window.devicePixelRatio||1;this.canvas_.width!=b*c&&(this.canvas_.width=b*c,this.canvas_.style.width=b+"px");this.canvas_.height!=a*c&&(this.canvas_.height=a*c,this.canvas_.style.height=a+"px")},
|
||
|
visibleFilter_:function(b){return b instanceof tv.c.tracks.Track?"none"!==window.getComputedStyle(b).display:!1},addClosestEventToSelection:function(b,a,c,e,d){for(var h=0;h<this.children.length;++h)if(this.children[h]instanceof tv.c.tracks.Track){var k=this.children[h].getBoundingClientRect(),l=Math.max(c,k.top),k=Math.min(e,k.bottom);l<=k&&this.children[h].addClosestEventToSelection(b,a,c,e,d)}tv.c.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments)},addEventsToTrackMap:function(b){for(var a=
|
||
|
0;a<this.children.length;++a)this.children[a]instanceof tv.c.tracks.Track&&this.children[a].addEventsToTrackMap(b)},addContainersToTrackMap:function(b){for(var a=0;a<this.children.length;++a)this.children[a]instanceof tv.c.tracks.Track&&this.children[a].addContainersToTrackMap(b)}};return{DrawingContainer:c,DrawType:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){function d(b){if(void 0===b)throw Error("viewport must be provided");this.viewport_=b}d.prototype={__proto__:Object.prototype,processModel:function(b){throw Error("processModel implementation missing");},drawHighlight:function(b,a,c,e,d){throw Error("drawHighlight implementation missing");}};var c=new tv.b.ExtensionRegistryOptions(tv.b.BASIC_REGISTRY_MODE);c.defaultMetadata={};c.mandatoryBaseClass=d;tv.b.decorateExtensionRegistry(d,c);return{Highlighter:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.Task,c=tv.b.ui.define("container-track",tv.c.tracks.Track);c.prototype={__proto__:tv.c.tracks.Track.prototype,decorate:function(b){tv.c.tracks.Track.prototype.decorate.call(this,b)},detach:function(){this.textContent=""},get tracks_(){for(var b=[],a=0;a<this.children.length;a++)this.children[a].classList.contains("track")&&b.push(this.children[a]);return b},drawTrack:function(b){for(var a=0;a<this.children.length;++a)this.children[a]instanceof tv.c.tracks.Track&&
|
||
|
this.children[a].drawTrack(b)},addIntersectingItemsInRangeToSelection:function(b,a,c,e,d){for(var h=0;h<this.tracks_.length;h++){var k=this.tracks_[h].getBoundingClientRect(),l=Math.max(c,k.top),k=Math.min(e,k.bottom);l<=k&&this.tracks_[h].addIntersectingItemsInRangeToSelection(b,a,c,e,d)}tv.c.tracks.Track.prototype.addIntersectingItemsInRangeToSelection.apply(this,arguments)},addEventsToTrackMap:function(b){for(var a=0;a<this.children.length;++a)this.children[a].addEventsToTrackMap(b)},addAllObjectsMatchingFilterToSelection:function(b,
|
||
|
a){for(var c=0;c<this.tracks_.length;c++)this.tracks_[c].addAllObjectsMatchingFilterToSelection(b,a)},addAllObjectsMatchingFilterToSelectionAsTask:function(b,a){for(var c=new d,e=0;e<this.tracks_.length;e++)c.subTask(function(c){return function(){this.tracks_[c].addAllObjectsMatchingFilterToSelection(b,a)}}(e),this);return c},addClosestEventToSelection:function(b,a,c,e,d){for(var h=0;h<this.tracks_.length;h++){var k=this.tracks_[h].getBoundingClientRect(),l=Math.max(c,k.top),k=Math.min(e,k.bottom);
|
||
|
l<=k&&this.tracks_[h].addClosestEventToSelection(b,a,c,e,d)}tv.c.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments)}};return{ContainerTrack:c}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=String.fromCharCode(9662),c=String.fromCharCode(9656),b=tv.b.ui.define("heading-track",tv.c.tracks.Track);b.prototype={__proto__:tv.c.tracks.Track.prototype,decorate:function(a){tv.c.tracks.Track.prototype.decorate.call(this,a);this.classList.add("heading-track");this.headingDiv_=document.createElement("heading");this.headingDiv_.style.width=tv.c.constants.HEADING_WIDTH+"px";this.headingDiv_.addEventListener("click",this.onHeadingDivClicked_.bind(this));
|
||
|
this.heading_="";this.selectionGenerator_=this.expanded_=void 0;this.updateContents_()},get heading(){return this.heading_},set heading(a){this.heading_=a;this.updateContents_()},set tooltip(a){this.headingDiv_.title=a},set selectionGenerator(a){this.selectionGenerator_=a;this.updateContents_()},get expanded(){return this.expanded_},set expanded(a){this.expanded_!=a&&(this.expanded_=a,this.expandedStateChanged_())},expandedStateChanged_:function(){this.updateHeadigDiv_()},onHeadingDivClicked_:function(){var a=
|
||
|
new Event("heading-clicked",!0,!1);this.dispatchEvent(a)},updateContents_:function(){this.updateHeadigDiv_()},updateHeadigDiv_:function(){this.headingDiv_.innerHTML="";var a=document.createElement("span");a.classList.add("heading-arrow");a.textContent=!0===this.expanded?d:!1===this.expanded?c:"";this.headingDiv_.appendChild(a);this.selectionGenerator_?(this.headingLink_=document.createElement("a"),tv.c.analysis.AnalysisLink.decorate(this.headingLink_),this.headingLink_.selectionGenerator=this.selectionGenerator_,
|
||
|
this.headingDiv_.appendChild(this.headingLink_),this.headingLink_.appendChild(document.createTextNode(this.heading_))):(a=document.createElement("span"),a.textContent=this.heading_,this.headingDiv_.appendChild(a));this.appendChild(this.headingDiv_)},draw:function(a,b,c){throw Error("draw implementation missing");}};return{HeadingTrack:b}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.trace_model.SelectionState,c=tv.c.EventPresenter,b=tv.b.ui.define("counter-track",tv.c.tracks.HeadingTrack);b.prototype={__proto__:tv.c.tracks.HeadingTrack.prototype,decorate:function(a){tv.c.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("counter-track")},get counter(){return this.counter_},set counter(a){this.counter_=a;this.heading=a.name+": "},draw:function(a,b,c){switch(a){case tv.c.tracks.DrawType.SLICE:this.drawSlices_(b,
|
||
|
c)}},drawSlices_:function(a,b){var e=this.viewport.highDetails,g=this.context(),h=window.devicePixelRatio||1,k=this.getBoundingClientRect().height*h,l=k-2*h,m=this.counter_,n=this.viewport.currentDisplayTransform;n.xViewVectorToWorld(1);for(var q=n.xViewVectorToWorld(1),u=m.numSeries,v=m.numSamples,y=tv.b.findLowIndexInSortedArray(m.timestamps,function(a){return a},a),E=m.timestamps,y=0<y-1?y-1:0,C=l/m.maxTotal,p=m.numSeries-1;0<=p;p--){var r=m.series[p];g.strokeStyle=c.getCounterSeriesColor(r.color,
|
||
|
d.NONE);var t=function(e){for(var d=-1,t=y-1,w=0<=t?E[t]-q:-1,x=k,A=!1;;){t++;if(t>=v)break;var z=E[t],B=l-C*m.totals[t*u+p];if(z>b){A&&(w=z=b,g.lineTo(n.xWorldToView(z),x));break}if(t+1<v){var K=E[t+1];if(K-w<=q&&K<b)continue;z<a&&(z=a)}z-w<q&&w<z&&(z=w+q);K=r.samples[t].selectionState;A&&(g.lineTo(n.xWorldToView(z),x),K!=d&&(e?(g.lineTo(n.xWorldToView(z),k),g.closePath(),g.fill()):(g.lineTo(n.xWorldToView(z),B),g.stroke())));K!=d&&(g.fillStyle=c.getCounterSeriesColor(r.color,K,.5),g.lineWidth=1*
|
||
|
h,g.beginPath(),e?g.moveTo(n.xWorldToView(z),k):g.moveTo(n.xWorldToView(z),A?x:B));g.lineTo(n.xWorldToView(z),B);A=!0;w=z;x=B;d=K}A&&(e?(g.lineTo(n.xWorldToView(w),k),g.closePath(),g.fill()):g.stroke())};t(!0);e&&t(!1);t=tv.b.findLowIndexInSortedArray(m.timestamps,function(a){return a},b);m.timestamps[t]==b&&t++;var w=y>=m.timestamps.length?a:m.timestamps[y],x=1>t?b:m.timestamps[t-1],t=(.1-tv.b.clamp((t-y)/(n.scaleX*(w>=x?b-a:x-w)),.05,.1))/.05;g.strokeStyle=c.getCounterSeriesColor(r.color,d.NONE);
|
||
|
w=void 0;for(x=y;E[x]<b;x++){var A=E[x],z=l-C*m.totals[x*u+p];if(r.samples[x].selected){var B=c.getCounterSeriesColor(r.color,r.samples[x].selectionState);B!==w&&(g.fillStyle=w=B);g.beginPath();g.arc(n.xWorldToView(A),z,2*h,0,2*Math.PI);g.fill();g.stroke()}else e&&(B=c.getCounterSeriesColor(r.color,r.samples[x].selectionState,t),B!==w&&(g.fillStyle=w=B),g.fillRect(n.xWorldToView(A)-1.5*h,z-1.5*h,3*h,3*h))}}},addEventsToTrackMap:function(a){for(var b=this.counter_.series,c=0;c<b.length;c++)for(var d=
|
||
|
b[c].samples,h=0;h<d.length;h++)a.addEvent(d[h],this)},addIntersectingItemsInRangeToSelectionInWorldSpace:function(a,b,c,d){function h(a,b){return b===k.timestamps.length-1?8*this.viewport.currentDisplayTransform.xViewVectorToWorld(1):k.timestamps[b+1]-k.timestamps[b]}var k=this.counter_;a=tv.b.findLowIndexInSortedIntervals(k.timestamps,function(a){return a},h.bind(this),a);for(b=tv.b.findLowIndexInSortedIntervals(k.timestamps,function(a){return a},h.bind(this),b);a<=b;a++)if(!(0>a||a>=k.timestamps.length))for(c=
|
||
|
0;c<this.counter.numSeries;c++)d.push(this.counter.series[c].samples[a])},addItemNearToProvidedEventToSelection:function(a,b,c){b=a.getSampleIndex()+b;if(0>b||b>=a.series.samples.length)return!1;c.push(a.series.samples[b]);return!0},addAllObjectsMatchingFilterToSelection:function(a,b){},addClosestEventToSelection:function(a,b,c,d,h){c=this.counter;if(c.numSeries)for(d=0;d<c.numSeries;d++){var k=tv.b.findClosestElementInSortedArray(c.series_[d].samples_,function(a){return a.timestamp},a,b);k&&h.push(k)}}};
|
||
|
return{CounterTrack:b}});"use strict";
|
||
|
tv.exportTo("tv.c.analysis",function(){var d=tv.b.ui.define("object-snapshot-view");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectSnapshot_=void 0},get requiresTallView(){return!0},set modelEvent(b){this.objectSnapshot=b},get modelEvent(){return this.objectSnapshot},get objectSnapshot(){return this.objectSnapshot_},set objectSnapshot(b){this.objectSnapshot_=b;this.updateContents()},updateContents:function(){throw Error("Not implemented");}};var c=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);
|
||
|
c.mandatoryBaseClass=d;c.defaultMetadata={showInstances:!0,showInTrackView:!0};tv.b.decorateExtensionRegistry(d,c);return{ObjectSnapshotView:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.TraceModelSettings,c=tv.b.ui.define("multi-row-track",tv.c.tracks.ContainerTrack);c.prototype={__proto__:tv.c.tracks.ContainerTrack.prototype,decorate:function(b){tv.c.tracks.ContainerTrack.prototype.decorate.call(this,b);this.heading_=this.tooltip_="";this.itemsToGroup_=this.groupingSource_=void 0;this.defaultToCollapsedWhenSubRowCountMoreThan=1;this.itemsGroupedOnLastUpdateContents_=void 0;this.currentSubRows_=[];this.expanded_=!0},get itemsToGroup(){return this.itemsToGroup_},
|
||
|
setItemsToGroup:function(b,a){this.itemsToGroup_=b;this.groupingSource_=a;this.updateContents_();this.updateExpandedStateFromGroupingSource_()},get heading(){return this.heading_},set heading(b){this.heading_=b;this.updateContents_()},get tooltip(){return this.tooltip_},set tooltip(b){this.tooltip_=b;this.updateContents_()},get subRows(){return this.currentSubRows_},get hasVisibleContent(){return 0<this.children.length},get expanded(){return this.expanded_},set expanded(b){this.expanded_!=b&&(this.expanded_=
|
||
|
b,this.expandedStateChanged_())},onHeadingClicked_:function(b){1>=this.subRows.length||(this.expanded=!this.expanded,this.groupingSource_&&(new d(this.groupingSource_.model)).setSettingFor(this.groupingSource_,"expanded",this.expanded),b.stopPropagation())},updateExpandedStateFromGroupingSource_:function(){if(this.groupingSource_){var b=this.subRows.length,a=new d(this.groupingSource_.model);this.expanded=1<b?a.getSettingFor(this.groupingSource_,"expanded",b>this.defaultToCollapsedWhenSubRowCountMoreThan?
|
||
|
!1:!0):void 0}},expandedStateChanged_:function(){for(var b=Math.max(2,Math.ceil(18/this.children.length)),b=(this.expanded_?18:b)+"px",a=0;a<this.children.length;a++)this.children[a].height=b;0<this.children.length&&(this.children[0].expanded=this.expanded)},updateContents_:function(){tv.c.tracks.ContainerTrack.prototype.updateContents_.call(this);if(this.itemsToGroup_)if(this.areArrayContentsSame_(this.itemsGroupedOnLastUpdateContents_,this.itemsToGroup_))this.updateHeadingAndTooltip_();else if(this.itemsGroupedOnLastUpdateContents_=
|
||
|
this.itemsToGroup_,this.detach(),this.itemsToGroup_.length){var b=this.buildSubRows_(this.itemsToGroup_);this.currentSubRows_=b;for(var a=0;a<b.length;a++){var c=b[a];c.length&&this.addSubTrack_(c).addEventListener("heading-clicked",this.onHeadingClicked_.bind(this))}this.updateHeadingAndTooltip_();this.expandedStateChanged_()}else this.currentSubRows_=[];else this.updateHeadingAndTooltip_(),this.currentSubRows_=[]},updateHeadingAndTooltip_:function(){this.firstChild&&(this.firstChild.heading=this.heading_,
|
||
|
this.firstChild.tooltip=this.tooltip_)},buildSubRows_:function(b){throw Error("Not implemented");},addSubTrack_:function(b){throw Error("Not implemented");},areArrayContentsSame_:function(b,a){if(!(b&&a&&b.length&&a.length)||b.length!=a.length)return!1;for(var c=0;c<b.length;++c)if(b[c]!=a[c])return!1;return!0}};return{MultiRowTrack:c}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.trace_model.SelectionState,c=tv.c.EventPresenter,b=tv.b.ui.define("object-instance-track",tv.c.tracks.HeadingTrack);b.prototype={__proto__:tv.c.tracks.HeadingTrack.prototype,decorate:function(a){tv.c.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("object-instance-track");this.objectInstances_=[];this.objectSnapshots_=[]},get objectInstances(){return this.objectInstances_},set objectInstances(a){a&&0!=a.length?(this.heading=a[0].typeName,
|
||
|
this.objectInstances_=a,this.objectSnapshots_=[],this.objectInstances_.forEach(function(a){this.objectSnapshots_.push.apply(this.objectSnapshots_,a.snapshots)},this),this.objectSnapshots_.sort(function(a,b){return a.ts-b.ts})):(this.heading="",this.objectInstances_=[],this.objectSnapshots_=[])},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a},get snapshotRadiusView(){return 7*(window.devicePixelRatio||1)},draw:function(a,b,c){switch(a){case tv.c.tracks.DrawType.SLICE:this.drawSlices_(b,
|
||
|
c)}},drawSlices_:function(a,b){var g=this.context(),h=window.devicePixelRatio||1,k=this.getBoundingClientRect(),l=k.height*h,m=.5*l,n=2*Math.PI,q=this.viewport.currentDisplayTransform,u=this.snapshotRadiusView,v=q.xViewVectorToWorld(l),y;g.save();q.applyTransformToCanvas(g);var E=this.objectInstances_;y=tv.b.findLowIndexInSortedArray(E,function(a){return a.deletionTs},a);for(g.strokeStyle="rgb(0,0,0)";y<E.length;++y){var C=E[y],p=C.creationTs;if(p>b)break;var r=C.deletionTs==Number.MAX_VALUE?b:C.deletionTs;
|
||
|
g.fillStyle=c.getObjectInstanceColor(C);g.fillRect(p,h,r-p,l-2*h)}g.restore();C=this.objectSnapshots_;for(y=tv.b.findLowIndexInSortedArray(C,function(a){return a.ts+v},a);y<C.length;++y){r=C[y];p=r.ts;if(p-v>b)break;p=q.xWorldToView(p);g.fillStyle=c.getObjectSnapshotColor(r);g.beginPath();g.arc(p,m,u,0,n);g.fill();r.selected?(g.lineWidth=5,g.strokeStyle="rgb(100,100,0)",g.stroke(),g.beginPath(),g.arc(p,m,u-1,0,n),g.lineWidth=2,g.strokeStyle="rgb(255,255,0)"):(g.lineWidth=1,g.strokeStyle="rgb(0,0,0)");
|
||
|
g.stroke()}g.lineWidth=1;m=d.NONE;E.length&&E[0].selectionState===d.DIMMED&&(m=d.DIMMED);m===d.DIMMED&&(h*=k.width,g.fillStyle="rgba(255,255,255,0.5)",g.fillRect(0,0,h,l),g.restore())},addEventsToTrackMap:function(a){void 0!==this.objectInstance_&&this.objectInstance_.forEach(function(b){a.addEvent(b,this)},this);void 0!==this.objectSnapshots_&&this.objectSnapshots_.forEach(function(b){a.addEvent(b,this)},this)},addIntersectingItemsInRangeToSelectionInWorldSpace:function(a,b,c,d){var k=!1,l=c*this.snapshotRadiusView;
|
||
|
tv.b.iterateOverIntersectingIntervals(this.objectSnapshots_,function(a){return a.ts-l},function(a){return 2*l},a,b,function(a){d.push(a);k=!0});k||tv.b.iterateOverIntersectingIntervals(this.objectInstances_,function(a){return a.creationTs},function(a){return a.deletionTs-a.creationTs},a,b,d.push.bind(d))},addItemNearToProvidedEventToSelection:function(a,b,c){var d;if(a instanceof tv.c.trace_model.ObjectSnapshot)d=this.objectSnapshots_;else if(a instanceof tv.c.trace_model.ObjectInstance)d=this.objectInstances_;
|
||
|
else throw Error("Unrecognized event");a=d.indexOf(a)+b;return 0<=a&&a<d.length?(c.push(d[a]),!0):!1},addAllObjectsMatchingFilterToSelection:function(a,b){},addClosestEventToSelection:function(a,b,c,d,k){(a=tv.b.findClosestElementInSortedArray(this.objectSnapshots_,function(a){return a.ts},a,b))&&k.push(a)}};var a=new tv.b.ExtensionRegistryOptions(tv.b.TYPE_BASED_REGISTRY_MODE);tv.b.decorateExtensionRegistry(b,a);return{ObjectInstanceTrack:b}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("object-instance-group-track",tv.c.tracks.MultiRowTrack);d.prototype={__proto__:tv.c.tracks.MultiRowTrack.prototype,decorate:function(c){tv.c.tracks.MultiRowTrack.prototype.decorate.call(this,c);this.classList.add("object-instance-group-track");this.objectInstances_=void 0},get objectInstances(){return this.itemsToGroup},set objectInstances(c){this.setItemsToGroup(c)},addSubTrack_:function(c){var b=new tv.c.tracks.ObjectInstanceTrack(this.viewport);
|
||
|
b.objectInstances=c;this.appendChild(b);return b},buildSubRows_:function(c){c.sort(function(a,b){return a.creationTs-b.creationTs});for(var b=[],a=0;a<c.length;a++){for(var d=c[a],e=!1,g=0;g<b.length;g++){var h=b[g];if(d.creationTs>=h[h.length-1].deletionTs){e=!0;h.push(d);break}}e||(h=[d],b.push(h))}return b},updateHeadingAndTooltip_:function(){}};return{ObjectInstanceGroupTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("spacing-track",tv.c.tracks.HeadingTrack);d.prototype={__proto__:tv.c.tracks.HeadingTrack.prototype,decorate:function(c){tv.c.tracks.HeadingTrack.prototype.decorate.call(this,c);this.classList.add("spacing-track")},draw:function(c,b,a){},addAllObjectsMatchingFilterToSelection:function(c,b){}};return{SpacingTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){function d(c,b,a,d){this.ctx_=c;this.minRectSize_=b;this.maxMergeDist_=a;this.pallette_=d}d.prototype={y_:0,h_:0,merging_:!1,mergeStartX_:0,mergeCurRight_:0,mergedColorId_:0,mergedAlpha_:0,setYandH:function(c,b){this.flush();this.y_=c;this.h_=b},fillRect:function(c,b,a,d){var e=c+b;if(b<this.minRectSize_)if(e-this.mergeStartX_>this.maxMergeDist_&&this.flush(),this.merging_){if(this.mergeCurRight_=e,this.mergedAlpha_<d||this.mergedAlpha_===d&&this.mergedColorId_<a)this.mergedAlpha_=
|
||
|
d,this.mergedColorId_=a}else this.merging_=!0,this.mergeStartX_=c,this.mergeCurRight_=e,this.mergedColorId_=a,this.mergedAlpha_=d;else this.merging_&&this.flush(),this.ctx_.fillStyle=this.pallette_[a],this.ctx_.globalAlpha=d,this.ctx_.fillRect(c,this.y_,b,this.h_)},flush:function(){this.merging_&&(this.ctx_.fillStyle=this.pallette_[this.mergedColorId_],this.ctx_.globalAlpha=this.mergedAlpha_,this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_),this.merging_=
|
||
|
!1)}};return{FastRectRenderer:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("rect-track",tv.c.tracks.HeadingTrack);d.prototype={__proto__:tv.c.tracks.HeadingTrack.prototype,decorate:function(c){tv.c.tracks.HeadingTrack.prototype.decorate.call(this,c);this.classList.add("rect-track");this.asyncStyle_=!1;this.rects_=null},get asyncStyle(){return this.asyncStyle_},set asyncStyle(c){this.asyncStyle_=!!c},get rects(){return this.rects_},set rects(c){this.rects_=c||[];this.invalidateDrawingContainer()},get height(){return window.getComputedStyle(this).height},
|
||
|
set height(c){this.style.height=c;this.invalidateDrawingContainer()},get hasVisibleContent(){return 0<this.rects_.length},addRectToSelection:function(c,b){throw Error("Not implemented.");},draw:function(c,b,a){switch(c){case tv.c.tracks.DrawType.SLICE:this.drawRects_(b,a)}},drawRects_:function(c,b){var a=this.context();a.save();var d=this.getBoundingClientRect();tv.c.drawSlices(a,this.viewport.currentDisplayTransform,c,b,d.height,this.rects_,this.asyncStyle_);a.restore();if(!(6>=d.height)){var e;
|
||
|
15>d.height?(d=6,e=1):(d=10,e=2.5);tv.c.drawLabels(a,this.viewport.currentDisplayTransform,c,b,this.rects_,this.asyncStyle_,d,e)}},addEventsToTrackMap:function(c){void 0!==this.rects_&&null!==this.rects_&&this.rects_.forEach(function(b){c.addEvent(b,this)},this)},addIntersectingItemsInRangeToSelectionInWorldSpace:function(c,b,a,d){function e(a){this.addRectToSelection(a,d)}e=e.bind(this);tv.b.iterateOverIntersectingIntervals(this.rects_,function(a){return a.start},function(a){return a.duration},c,
|
||
|
b,e)},indexOfRect_:function(c){for(var b=tv.b.findLowIndexInSortedArray(this.rects_,function(a){return a.start},c.start);b<this.rects_.length&&c.start==this.rects_[b].start&&c.colorId!=this.rects_[b].colorId;)b++;return b<this.rects_.length?b:void 0},addItemNearToProvidedEventToSelection:function(c,b,a){c=this.indexOfRect_(c);if(void 0===c)return!1;b=c+b;if(0>b||b>=this.rects_.length)return!1;this.addRectToSelection(this.rects_[b],a);return!0},addAllObjectsMatchingFilterToSelection:function(c,b){for(var a=
|
||
|
0;a<this.rects_.length;++a)c.matchSlice(this.rects_[a])&&this.addRectToSelection(this.rects_[a],b)},addClosestEventToSelection:function(c,b,a,d,e){(c=tv.b.findClosestIntervalInSortedIntervals(this.rects_,function(a){return a.start},function(a){return a.end},c,b))&&this.addRectToSelection(c,e)}};return{RectTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("sample-track",tv.c.tracks.RectTrack);d.prototype={__proto__:tv.c.tracks.RectTrack.prototype,decorate:function(c){tv.c.tracks.RectTrack.prototype.decorate.call(this,c)},get samples(){return this.rects},set samples(c){this.rects=c},addRectToSelection:function(c,b){b.push(c)}};return{SampleTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("slice-track",tv.c.tracks.RectTrack);d.prototype={__proto__:tv.c.tracks.RectTrack.prototype,decorate:function(c){tv.c.tracks.RectTrack.prototype.decorate.call(this,c)},get slices(){return this.rects},set slices(c){this.rects=c},addRectToSelection:function(c,b){b.push(c)}};return{SliceTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("slice-group-track",tv.c.tracks.MultiRowTrack);d.prototype={__proto__:tv.c.tracks.MultiRowTrack.prototype,decorate:function(c){tv.c.tracks.MultiRowTrack.prototype.decorate.call(this,c);this.classList.add("slice-group-track");this.group_=void 0;this.defaultToCollapsedWhenSubRowCountMoreThan=100},addSubTrack_:function(c){var b=new tv.c.tracks.SliceTrack(this.viewport);b.slices=c;this.appendChild(b);return b},get group(){return this.group_},set group(c){this.group_=
|
||
|
c;this.setItemsToGroup(this.group_.slices,this.group_)},get eventContainer(){return this.group},addContainersToTrackMap:function(c){c.addContainer(this.group,this)},buildSubRows_:function(c){if(!c.length)return[];for(var b=[],a=0;a<c.length;a++)c[a].subSlices&&c[a].subSlices.splice(0,c[a].subSlices.length),b.push(a);b.sort(function(a,b){var e=c[a],d=c[b];return e.start!=d.start?e.start-d.start:a-b});var d=[[]];this.badSlices_=[];for(a=0;a<b.length;a++){for(var e=c[b[a]],g=!1,h=d.length-1;0<=h;h--)if(0!=
|
||
|
d[h].length){var k=d[h][d[h].length-1];e.start<k.start&&(this.badSlices_.push(e),g=!0);if(k.bounds(e)){for(;d.length<=h+1;)d.push([]);d[h+1].push(e);k.subSlices&&k.subSlices.push(e);g=!0;break}}g||d[0].push(e)}return d}};return{SliceGroupTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("async-slice-group-track",tv.c.tracks.MultiRowTrack);d.prototype={__proto__:tv.c.tracks.MultiRowTrack.prototype,decorate:function(c){tv.c.tracks.MultiRowTrack.prototype.decorate.call(this,c);this.classList.add("async-slice-group-track");this.group_=void 0},addSubTrack_:function(c){var b=new tv.c.tracks.SliceTrack(this.viewport);b.slices=c;this.appendChild(b);b.asyncStyle=!0;return b},get group(){return this.group_},set group(c){this.group_=
|
||
|
c;this.setItemsToGroup(this.group_.slices,this.group_)},get eventContainer(){return this.group},addContainersToTrackMap:function(c){c.addContainer(this.group,this)},buildSubRows_:function(c){c.sort(function(a,b){return a.start-b.start});for(var b=function(a,c,e){if(e>=c.length)return!0;var d=c[e];if(a.start>=d[d.length-1].end){if(void 0===a.subSlices||0===a.subSlices.length)return!0;for(d=0;d<a.subSlices.length;d++)if(!b(a.subSlices[d],c,e+1))return!1;return!0}return!1},a=[],d=0;d<c.length;d++){var e=
|
||
|
c[d];e.isTopLevel=!0;for(var g=!1,h=a.length,k=0;k<a.length;k++)if(b(e,a,k)){g=!0;h=k;break}g||a.push([]);a[h].push(e);var l=function(a,b,c){if(void 0!==a&&0!==a.length){b===c.length&&c.push([]);for(var e=0;e<a.length;e++)c[b].push(a[e]),l(a[e].subSlices,b+1,c)}};l(e.subSlices,h+1,a)}return a}};return{AsyncSliceGroupTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("thread-track",tv.c.tracks.ContainerTrack);d.prototype={__proto__:tv.c.tracks.ContainerTrack.prototype,decorate:function(c){tv.c.tracks.ContainerTrack.prototype.decorate.call(this,c);this.classList.add("thread-track")},get thread(){return this.thread_},set thread(c){this.thread_=c;this.updateContents_()},get hasVisibleContent(){return 0<this.tracks_.length},get eventContainer(){return this.thread},addContainersToTrackMap:function(c){c.addContainer(this.thread,
|
||
|
this);for(var b=0;b<this.childNodes.length;++b)this.childNodes[b].addContainersToTrackMap(c)},updateContents_:function(){this.detach();if(this.thread_){this.heading=this.thread_.userFriendlyName+": ";this.tooltip=this.thread_.userFriendlyDetails;this.thread_.asyncSliceGroup.length&&this.appendAsyncSliceTracks_();this.appendThreadSamplesTracks_();if(this.thread_.timeSlices){var c=new tv.c.tracks.SliceTrack(this.viewport);c.heading="";c.height=tv.c.THIN_SLICE_HEIGHT+"px";c.slices=this.thread_.timeSlices;
|
||
|
c.hasVisibleContent&&this.appendChild(c)}this.thread_.sliceGroup.length&&(c=new tv.c.tracks.SliceGroupTrack(this.viewport),c.heading=this.thread_.userFriendlyName,c.tooltip=this.thread_.userFriendlyDetails,c.group=this.thread_.sliceGroup,c.hasVisibleContent&&this.appendChild(c))}},appendAsyncSliceTracks_:function(){this.thread_.asyncSliceGroup.viewSubGroups.forEach(function(c){var b=new tv.c.tracks.AsyncSliceGroupTrack(this.viewport),a=c.slices[0].viewSubGroupTitle;b.group=c;b.heading=a;b.hasVisibleContent&&
|
||
|
this.appendChild(b)},this)},appendThreadSamplesTracks_:function(){var c=this.thread_.samples;if(void 0!==c&&0!==c.length){var b={};c.forEach(function(a){void 0===b[a.title]&&(b[a.title]=[]);b[a.title].push(a)});c=tv.b.dictionaryKeys(b);c.sort();c.forEach(function(a){var c=b[a],e=new tv.c.tracks.SampleTrack(this.viewport);e.group=this.thread_;e.samples=c;e.heading=this.thread_.userFriendlyName+": "+a;e.tooltip=this.thread_.userFriendlyDetails;e.selectionGenerator=function(){for(var a=new tv.c.Selection,
|
||
|
b=0;b<e.samples.length;b++)a.push(e.samples[b]);return a};this.appendChild(e)},this)}},collapsedDidChange:function(c){if(c){c=parseInt(this.tracks[0].height);for(var b=0;b<this.tracks.length;++b)2<c?this.tracks[b].height=Math.floor(c)+"px":this.tracks[b].style.display="none",c*=.5}else for(b=0;b<this.tracks.length;++b)this.tracks[b].height=this.tracks[0].height,this.tracks[b].style.display=""}};return{ThreadTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.analysis.ObjectSnapshotView,c=tv.c.analysis.ObjectInstanceView,b=tv.c.TraceModelSettings,a=tv.c.tracks.SpacingTrack,f=tv.b.ui.define("process-track-base",tv.c.tracks.ContainerTrack);f.prototype={__proto__:tv.c.tracks.ContainerTrack.prototype,decorate:function(a){tv.c.tracks.ContainerTrack.prototype.decorate.call(this,a);this.processBase_=void 0;this.classList.add("process-track-base");this.classList.add("expanded");this.processNameEl_=tv.b.ui.createSpan();
|
||
|
this.processNameEl_.classList.add("process-track-name");this.headerEl_=tv.b.ui.createDiv({className:"process-track-header"});this.headerEl_.appendChild(this.processNameEl_);this.headerEl_.addEventListener("click",this.onHeaderClick_.bind(this));this.appendChild(this.headerEl_)},get processBase(){return this.processBase_},set processBase(a){if(this.processBase_=a)this.expanded=(new b(this.processBase_.model)).getSettingFor(this.processBase_,"expanded",void 0!==this.processBase_.labels&&1==this.processBase_.labels.length&&
|
||
|
"chrome://tracing"==this.processBase_.labels[0]?!1:!0);this.updateContents_()},get expanded(){return this.classList.contains("expanded")},set expanded(a){a=!!a;this.expanded!==a&&(this.classList.toggle("expanded"),this.viewport_.dispatchChangeEvent(),this.processBase_&&(new b(this.processBase_.model)).setSettingFor(this.processBase_,"expanded",a))},get hasVisibleContent(){return this.expanded?1<this.children.length:!0},onHeaderClick_:function(a){a.stopPropagation();a.preventDefault();this.expanded=
|
||
|
!this.expanded},updateContents_:function(){this.tracks_.forEach(function(a){this.removeChild(a)},this);this.processBase_&&(this.processNameEl_.textContent=this.processBase_.userFriendlyName,this.headerEl_.title=this.processBase_.userFriendlyDetails,this.willAppendTracks_(),this.appendObjectInstanceTracks_(),this.appendCounterTracks_(),this.appendThreadTracks_(),this.didAppendTracks_())},addEventsToTrackMap:function(a){this.tracks_.forEach(function(b){b.addEventsToTrackMap(a)})},willAppendTracks_:function(){},
|
||
|
didAppendTracks_:function(){},appendObjectInstanceTracks_:function(){var b=this.processBase_.objects.getAllInstancesByTypeName(),f=tv.b.dictionaryKeys(b);f.sort();var h=!1;f.forEach(function(a){var f=b[a],g=c.getTypeInfo(void 0,a),n=d.getTypeInfo(void 0,a);g&&!g.metadata.showInTrackView&&(g=void 0);n&&!n.metadata.showInTrackView&&(n=void 0);for(var n=g||n,g=[],q=0;q<f.length;q++){var u=f[q];0!==u.snapshots.length&&(u.hasImplicitSnapshots&&!n||g.push(u))}0!==g.length&&(f=tv.c.tracks.ObjectInstanceTrack.getConstructor(void 0,
|
||
|
a),f||(f=(n=d.getTypeInfo(void 0,a))&&n.metadata.showInstances?tv.c.tracks.ObjectInstanceGroupTrack:tv.c.tracks.ObjectInstanceTrack),a=new f(this.viewport),a.objectInstances=g,this.appendChild(a),h=!0)},this);h&&this.appendChild(new a(this.viewport))},appendCounterTracks_:function(){var b=tv.b.dictionaryValues(this.processBase.counters);b.sort(tv.c.trace_model.Counter.compare);b.forEach(function(b){var c=new tv.c.tracks.CounterTrack(this.viewport);c.counter=b;this.appendChild(c);this.appendChild(new a(this.viewport))}.bind(this))},
|
||
|
appendThreadTracks_:function(){var b=tv.b.dictionaryValues(this.processBase.threads);b.sort(tv.c.trace_model.Thread.compare);b.forEach(function(b){var c=new tv.c.tracks.ThreadTrack(this.viewport);c.thread=b;c.hasVisibleContent&&(this.appendChild(c),this.appendChild(new a(this.viewport)))}.bind(this))}};return{ProcessTrackBase:f}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("cpu-track",tv.c.tracks.ContainerTrack);d.prototype={__proto__:tv.c.tracks.ContainerTrack.prototype,decorate:function(c){tv.c.tracks.ContainerTrack.prototype.decorate.call(this,c);this.classList.add("cpu-track")},get cpu(){return this.cpu_},set cpu(c){this.cpu_=c;this.updateContents_()},get tooltip(){return this.tooltip_},set tooltip(c){this.tooltip_=c;this.updateContents_()},get hasVisibleContent(){return 0<this.children.length},updateContents_:function(){this.detach();
|
||
|
if(this.cpu_){var c=this.cpu_.slices;if(c.length){var b=new tv.c.tracks.SliceTrack(this.viewport);b.slices=c;b.heading=this.cpu_.userFriendlyName+":";this.appendChild(b)}this.appendSamplesTracks_();for(var a in this.cpu_.counters)c=this.cpu_.counters[a],b=new tv.c.tracks.CounterTrack(this.viewport),b.heading=this.cpu_.userFriendlyName+" "+c.name+":",b.counter=c,this.appendChild(b)}},appendSamplesTracks_:function(){var c=this.cpu_.samples;if(void 0!==c&&0!==c.length){var b={};c.forEach(function(a){void 0===
|
||
|
b[a.title]&&(b[a.title]=[]);b[a.title].push(a)});c=tv.b.dictionaryKeys(b);c.sort();c.forEach(function(a){var c=b[a],e=new tv.c.tracks.SliceTrack(this.viewport);e.group=this.cpu_;e.slices=c;e.heading=this.cpu_.userFriendlyName+": "+a;e.tooltip=this.cpu_.userFriendlyDetails;e.selectionGenerator=function(){for(var a=new tv.c.Selection,b=0;b<e.slices.length;b++)a.push(e.slices[b]);return a};this.appendChild(e)},this)}}};return{CpuTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.tracks.ProcessTrackBase,c=tv.c.tracks.SpacingTrack,b=tv.b.ui.define("kernel-track",d);b.prototype={__proto__:d.prototype,decorate:function(a){tv.c.tracks.ProcessTrackBase.prototype.decorate.call(this,a)},set kernel(a){this.processBase=a},get kernel(){return this.processBase},get eventContainer(){return this.kernel},addContainersToTrackMap:function(a){a.addContainer(this.kernel,this)},willAppendTracks_:function(){var a=tv.b.dictionaryValues(this.kernel.cpus);
|
||
|
a.sort(tv.c.trace_model.Cpu.compare);for(var b=!1,e=0;e<a.length;++e){var d=a[e],h=new tv.c.tracks.CpuTrack(this.viewport);h.cpu=d;h.hasVisibleContent&&(this.appendChild(h),b=!0)}b&&this.appendChild(new c(this.viewport))}};return{KernelTrack:b}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.c.tracks.ProcessTrackBase,c=tv.b.ui.define("process-track",d);c.prototype={__proto__:d.prototype,decorate:function(b){tv.c.tracks.ProcessTrackBase.prototype.decorate.call(this,b)},drawTrack:function(b){switch(b){case tv.c.tracks.DrawType.INSTANT_EVENT:if(!this.processBase.instantEvents||0===this.processBase.instantEvents.length)break;var a=this.context(),c=window.devicePixelRatio||1,e=this.getBoundingClientRect(),d=a.canvas.getBoundingClientRect();a.save();
|
||
|
a.translate(0,c*(e.top-d.top));var h=this.viewport.currentDisplayTransform,d=h.xViewToWorld(0),c=h.xViewToWorld(e.width*c);tv.c.drawInstantSlicesAsLines(a,this.viewport.currentDisplayTransform,d,c,e.height,this.processBase.instantEvents,2);a.restore();break;case tv.c.tracks.DrawType.BACKGROUND:this.drawBackground_();return}tv.c.tracks.ContainerTrack.prototype.drawTrack.call(this,b)},drawBackground_:function(){var b=this.context(),a=b.canvas.getBoundingClientRect(),c=window.devicePixelRatio||1,e=!1;
|
||
|
b.fillStyle="#eee";for(var d=0;d<this.children.length;++d)if(this.children[d]instanceof tv.c.tracks.Track&&!(this.children[d]instanceof tv.c.tracks.SpacingTrack)&&(e=!e)){var h=this.children[d].getBoundingClientRect();b.fillRect(0,c*(h.top-a.top),b.canvas.width,c*h.height)}},set process(b){this.processBase=b},get process(){return this.processBase},get eventContainer(){return this.process},addContainersToTrackMap:function(b){b.addContainer(this.process,this);this.tracks_.forEach(function(a){a.addContainersToTrackMap(b)})},
|
||
|
addIntersectingItemsInRangeToSelectionInWorldSpace:function(b,a,c,e){tv.b.iterateOverIntersectingIntervals(this.processBase.instantEvents,function(a){return a.start},function(a){return a.duration},b,a,function(a){e.push(a)}.bind(this));tv.c.tracks.ContainerTrack.prototype.addIntersectingItemsInRangeToSelectionInWorldSpace.apply(this,arguments)},addClosestEventToSelection:function(b,a,c,e,d){this.addClosestInstantEventToSelection(this.processBase.instantEvents,b,a,d);tv.c.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,
|
||
|
arguments)}};return{ProcessTrack:c}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("trace-model-track",tv.c.tracks.ContainerTrack);d.prototype={__proto__:tv.c.tracks.ContainerTrack.prototype,decorate:function(c){tv.c.tracks.ContainerTrack.prototype.decorate.call(this,c);this.classList.add("model-track");this.highlighters_=tv.c.tracks.Highlighter.getAllRegisteredTypeInfos().map(function(b){return new b.constructor(c)})},detach:function(){tv.c.tracks.ContainerTrack.prototype.detach.call(this)},get model(){return this.model_},
|
||
|
set model(c){this.model_=c;this.updateContents_()},get hasVisibleContent(){return 0<this.children.length},updateContents_:function(){this.textContent="";if(this.model_){this.appendKernelTrack_();var c=this.model_.getAllProcesses();c.sort(tv.c.trace_model.Process.compare);for(var b=0;b<c.length;++b){var a=c[b],d=new tv.c.tracks.ProcessTrack(this.viewport);d.process=a;d.hasVisibleContent&&this.appendChild(d)}this.viewport_.rebuildEventToTrackMap();this.viewport_.rebuildContainerToTrackMap();for(b=0;b<
|
||
|
this.highlighters_.length;b++)this.highlighters_[b].processModel(this.model_)}},addEventsToTrackMap:function(c){if(this.model_){for(var b=this.children,a=0;a<b.length;++a)b[a].addEventsToTrackMap(c);void 0!==this.instantEvents&&this.instantEvents.forEach(function(a){c.addEvent(a,this)}.bind(this))}},addContainersToTrackMap:function(c){for(var b=this.children,a=0;a<b.length;++a)b[a].addContainersToTrackMap(c)},appendKernelTrack_:function(){var c=new tv.c.tracks.KernelTrack(this.viewport);c.kernel=
|
||
|
this.model.kernel;c.hasVisibleContent&&this.appendChild(c)},drawTrack:function(c){var b=this.context(),a=window.devicePixelRatio||1,d=this.getBoundingClientRect(),e=b.canvas.getBoundingClientRect();b.save();b.translate(0,a*(d.top-e.top));var e=this.viewport.currentDisplayTransform,g=e.xViewToWorld(0),a=e.xViewToWorld(d.width*a);switch(c){case tv.c.tracks.DrawType.GRID:this.viewport.drawMajorMarkLines(b);b.restore();return;case tv.c.tracks.DrawType.FLOW_ARROWS:if(0===this.model_.flowIntervalTree.size){b.restore();
|
||
|
return}this.drawFlowArrows_(g,a);b.restore();return;case tv.c.tracks.DrawType.INSTANT_EVENT:if(!this.model_.instantEvents||0===this.model_.instantEvents.length)break;tv.c.drawInstantSlicesAsLines(b,this.viewport.currentDisplayTransform,g,a,d.height,this.model_.instantEvents,4);break;case tv.c.tracks.DrawType.MARKERS:this.viewport.interestRange.isEmpty||(this.viewport.interestRange.draw(b,g,a),this.viewport.interestRange.drawIndicators(b,g,a));b.restore();return;case tv.c.tracks.DrawType.HIGHLIGHTS:for(c=
|
||
|
0;c<this.highlighters_.length;c++)this.highlighters_[c].drawHighlight(b,e,g,a,d.height);b.restore();return}b.restore();tv.c.tracks.ContainerTrack.prototype.drawTrack.call(this,c)},drawFlowArrows_:function(c,b){var a=this.context(),d=this.viewport.currentDisplayTransform;d.applyTransformToCanvas(a);d=d.xViewVectorToWorld(1);a.strokeStyle="rgba(0, 0, 0, 0.4)";a.fillStyle="rgba(0, 0, 0, 0.4)";a.lineWidth=1<d?1:d;for(var e=this.model_.flowIntervalTree.findIntersection(c,b),g=2*d,h=a.canvas.getBoundingClientRect(),
|
||
|
k=0;k<e.length;++k){var l=e[k][0],m=e[k][1];m.start-l.start<=g||this.drawFlowArrowBetween_(a,l,m,h,d)}},drawFlowArrowBetween_:function(c,b,a,d,e){var g=window.devicePixelRatio||1,h=this.viewport.trackForEvent(b),k=this.viewport.trackForEvent(a),l=h.getBoundingClientRect(),m=k.getBoundingClientRect();if(b.selected||a.selected)c.shadowBlur=1,c.shadowColor="red",c.shadowOffsety=2,c.strokeStyle="red";var n=m.left+m.top+m.bottom+m.right;if(0!==l.left+l.top+l.bottom+l.right||0!==n){h=this.calculateTrackY_(h,
|
||
|
d);d=this.calculateTrackY_(k,d);k=g*h;d*=g;h=(a.start-b.start)/2;c.beginPath();c.moveTo(b.start,k);c.bezierCurveTo(b.start+h,k,b.start+h,d,a.start,d);c.stroke();if(b.selected||a.selected)c.shadowBlur=0,c.shadowOffsetX=0,c.strokeStyle="rgba(0, 0, 0, 0.4)";e=5*e*g;a.start-b.start<=2*e||(b=a.start,g*=m.height/4,tv.c.drawTriangle(c,b,d,b-e,d-g,b-e,d+g),c.fill())}},calculateTrackY_:function(c,b){var a=c.getBoundingClientRect();return 0===a.left+a.top+a.bottom+a.right?this.calculateTrackY_(c.parentNode,
|
||
|
b):a.top-b.top+a.height/2},addIntersectingItemsInRangeToSelectionInWorldSpace:function(c,b,a,d){tv.b.iterateOverIntersectingIntervals(this.model_.instantEvents,function(a){return a.start},function(a){return a.duration},c,b,function(a){d.push(a)}.bind(this));tv.c.tracks.ContainerTrack.prototype.addIntersectingItemsInRangeToSelectionInWorldSpace.apply(this,arguments)},addClosestEventToSelection:function(c,b,a,d,e){this.addClosestInstantEventToSelection(this.model_.instantEvents,c,b,e);tv.c.tracks.ContainerTrack.prototype.addClosestEventToSelection.apply(this,
|
||
|
arguments)}};return{TraceModelTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c.tracks",function(){var d=tv.b.ui.define("ruler-track",tv.c.tracks.HeadingTrack),c=Math.log(10);d.prototype={__proto__:tv.c.tracks.HeadingTrack.prototype,decorate:function(b){tv.c.tracks.HeadingTrack.prototype.decorate.call(this,b);this.classList.add("ruler-track");this.strings_secs_=[];this.strings_msecs_=[];this.viewportChange_=this.viewportChange_.bind(this);b.addEventListener("change",this.viewportChange_)},detach:function(){tv.c.tracks.HeadingTrack.prototype.detach.call(this);this.viewport.removeEventListener("change",
|
||
|
this.viewportChange_)},viewportChange_:function(){this.viewport.interestRange.isEmpty?this.classList.remove("tall-mode"):this.classList.add("tall-mode")},draw:function(b,a,c){switch(b){case tv.c.tracks.DrawType.SLICE:this.drawSlices_(a,c);break;case tv.c.tracks.DrawType.MARKERS:this.viewport.interestRange.isEmpty||this.viewport.interestRange.draw(this.context(),a,c)}},drawSlices_:function(b,a){for(var d=this.context(),e=window.devicePixelRatio||1,g=d.canvas.getBoundingClientRect(),h=g.width*e,k=g.height*
|
||
|
e,l=!this.viewport.interestRange.isEmpty,m=l?2*k/5:k,n=this.viewport,g=n.currentDisplayTransform,q=150*e,e=g.xViewVectorToWorld(q),u,e=Math.pow(10,Math.ceil(Math.log(e)/c)),v=[10,5,2,1],y=0;y<v.length;++y)if(!(g.xWorldVectorToView(e/v[y])<q)){u=e/v[y-1];break}var E=void 0;100>u?(q="ms",v=1,E=this.strings_msecs_):(q="s",v=1E3,E=this.strings_secs_);var C=g.xWorldVectorToView(u/5),y=Math.floor(b/u)*u,p=Math.floor(.25*m);d.save();e=window.devicePixelRatio||1;d.lineWidth=Math.round(e);var r=d.lineWidth%
|
||
|
2/2;d.translate(r,-r);d.fillStyle="rgb(0, 0, 0)";d.strokeStyle="rgb(0, 0, 0)";d.textAlign="left";d.textBaseline="top";d.font=9*e+"px sans-serif";n.majorMarkPositions=[];d.beginPath();for(r=y;r<a;r+=u){var t=Math.floor(g.xWorldToView(r)),y=Math.floor(r/v*1E5)/1E5;E[y]||(E[y]=y+" "+q);d.fillText(E[y],t+2*e,0);n.majorMarkPositions.push(t);tv.c.drawLine(d,t,0,t,m);for(y=1;5>y;++y){var w=Math.floor(t+C*y);tv.c.drawLine(d,w,m-p,w,m)}}d.strokeStyle="rgb(0, 0, 0)";tv.c.drawLine(d,0,k,h,k);d.stroke();l&&(tv.c.drawLine(d,
|
||
|
0,m,h,m),d.stroke(),u=10*e,m*=1.75,k=3*e,l=10*e,y=2*(k+u),d.textBaseline="middle",d.font=14*e+"px sans-serif",E=n.interestRange,0===E.range?(n=E.min,g=g.xWorldToView(n),v=Math.abs(Math.floor(n/v*1E3)/1E3),q=v+" "+q,v=g+4*e,C=d.measureText(q).width,v+C>h&&(v=g-4*e-C),d.fillStyle="rgb(0,0,0)",d.fillText(q,v,m)):(q=E.max,e=g.xWorldToView(E.min),n=g.xWorldToView(q),C=E.range,E=g.xWorldVectorToView(C),g=e+E/2,100>C?(q="ms",v=1):(q="s",v=1E3),q=Math.abs(Math.floor(C/v*1E3)/1E3)+" "+q,C=d.measureText(q).width,
|
||
|
r=C+y+u,v=g-C/2,p=v+C,r>E?(v=n+2*u,v+C>h&&(v=e-2*u-C),d.fillStyle="rgb(0,0,0)",d.fillText(q,v,m),d.strokeStyle="rgb(128,121,121)",d.beginPath(),tv.c.drawLine(d,e,m,n,m),d.stroke(),d.fillStyle="rgb(128,121,121)",tv.c.drawArrow(d,e-1.5*u,m,e,m,l,k),tv.c.drawArrow(d,n+1.5*u,m,n,m,l,k)):y<=E&&(r<=E?(d.fillStyle="rgb(0,0,0)",d.fillText(q,v,m),h=v-u,g=p+u):h=g,d.strokeStyle="rgb(128,121,121)",d.fillStyle="rgb(128,121,121)",tv.c.drawArrow(d,h,m,e,m,l,k),tv.c.drawArrow(d,g,m,n,m,l,k)),d.restore()))},addIntersectingItemsInRangeToSelection:function(b,
|
||
|
a,c,e,d){},addAllObjectsMatchingFilterToSelection:function(b,a){}};return{RulerTrack:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){var d=tv.c.Selection,c=tv.c.trace_model.SelectionState,b=tv.c.TimelineViewport,a=new tv.c.TimelineDisplayTransform,f=tv.b.ui.define("div");f.prototype={__proto__:HTMLDivElement.prototype,model_:null,decorate:function(){this.classList.add("timeline-track-view");this.viewport_=new b(this);this.viewportDisplayTransformAtMouseDown_=null;this.rulerTrackContainer_=new tv.c.tracks.DrawingContainer(this.viewport_);this.appendChild(this.rulerTrackContainer_);this.rulerTrackContainer_.invalidate();
|
||
|
this.rulerTrack_=new tv.c.tracks.RulerTrack(this.viewport_);this.rulerTrackContainer_.appendChild(this.rulerTrack_);this.modelTrackContainer_=new tv.c.tracks.DrawingContainer(this.viewport_);this.appendChild(this.modelTrackContainer_);this.modelTrackContainer_.style.display="block";this.modelTrackContainer_.invalidate();this.viewport_.modelTrackContainer=this.modelTrackContainer_;this.modelTrack_=new tv.c.tracks.TraceModelTrack(this.viewport_);this.modelTrackContainer_.appendChild(this.modelTrack_);
|
||
|
this.timingTool_=new tv.c.TimingTool(this.viewport_,this);this.initMouseModeSelector();this.dragBox_=this.ownerDocument.createElement("div");this.dragBox_.className="drag-box";this.appendChild(this.dragBox_);this.hideDragBox_();this.initHintText_();this.bindEventListener_(document,"keypress",this.onKeypress_,this);this.bindEventListener_(document,"keydown",this.onKeydown_,this);this.bindEventListener_(document,"keyup",this.onKeyup_,this);this.bindEventListener_(this,"dblclick",this.onDblClick_,this);
|
||
|
this.bindEventListener_(this,"mousewheel",this.onMouseWheel_,this);this.addEventListener("mousemove",this.onMouseMove_);this.addEventListener("touchstart",this.onTouchStart_);this.addEventListener("touchmove",this.onTouchMove_);this.addEventListener("touchend",this.onTouchEnd_);this.mouseViewPosAtMouseDown_={x:0,y:0};this.lastMouseViewPos_={x:0,y:0};this.lastTouchViewPositions_=[];this.selection_=new d;this.highlight_=new d;this.isZooming_=this.isPanningAndScanning_=!1},bindEventListener_:function(a,
|
||
|
b,c,d){this.boundListeners_||(this.boundListeners_=[]);c=c.bind(d);this.boundListeners_.push({object:a,event:b,boundFunc:c});a.addEventListener(b,c)},initMouseModeSelector:function(){this.mouseModeSelector_=new tv.b.ui.MouseModeSelector(this);this.appendChild(this.mouseModeSelector_);this.mouseModeSelector_.addEventListener("beginpan",this.onBeginPanScan_.bind(this));this.mouseModeSelector_.addEventListener("updatepan",this.onUpdatePanScan_.bind(this));this.mouseModeSelector_.addEventListener("endpan",
|
||
|
this.onEndPanScan_.bind(this));this.mouseModeSelector_.addEventListener("beginselection",this.onBeginSelection_.bind(this));this.mouseModeSelector_.addEventListener("updateselection",this.onUpdateSelection_.bind(this));this.mouseModeSelector_.addEventListener("endselection",this.onEndSelection_.bind(this));this.mouseModeSelector_.addEventListener("beginzoom",this.onBeginZoom_.bind(this));this.mouseModeSelector_.addEventListener("updatezoom",this.onUpdateZoom_.bind(this));this.mouseModeSelector_.addEventListener("endzoom",
|
||
|
this.onEndZoom_.bind(this));this.mouseModeSelector_.addEventListener("entertiming",this.timingTool_.onEnterTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener("begintiming",this.timingTool_.onBeginTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener("updatetiming",this.timingTool_.onUpdateTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener("endtiming",this.timingTool_.onEndTiming.bind(this.timingTool_));this.mouseModeSelector_.addEventListener("exittiming",
|
||
|
this.timingTool_.onExitTiming.bind(this.timingTool_));var a=tv.b.ui.MOUSE_SELECTOR_MODE;this.mouseModeSelector_.supportedModeMask=a.SELECTION|a.PANSCAN|a.ZOOM|a.TIMING;this.mouseModeSelector_.settingsKey="timelineTrackView.mouseModeSelector";this.mouseModeSelector_.setKeyCodeForMode(a.PANSCAN,50);this.mouseModeSelector_.setKeyCodeForMode(a.SELECTION,49);this.mouseModeSelector_.setKeyCodeForMode(a.ZOOM,51);this.mouseModeSelector_.setKeyCodeForMode(a.TIMING,52);this.mouseModeSelector_.setKeyCodeCondition(function(){return this.listenToKeys_}.bind(this));
|
||
|
this.mouseModeSelector_.setModifierForAlternateMode(a.SELECTION,tv.b.ui.MODIFIER.SHIFT);this.mouseModeSelector_.setModifierForAlternateMode(a.PANSCAN,tv.b.ui.MODIFIER.SPACE);this.mouseModeSelector_.setModifierForAlternateMode(a.ZOOM,tv.b.ui.MODIFIER.CMD_OR_CTRL)},detach:function(){this.modelTrack_.detach();for(var a=0;a<this.boundListeners_.length;a++){var b=this.boundListeners_[a];b.object.removeEventListener(b.event,b.boundFunc)}this.boundListeners_=void 0;this.viewport_.detach()},get viewport(){return this.viewport_},
|
||
|
get model(){return this.model_},set model(a){if(!a)throw Error("Model cannot be null");var b=this.model_!==a;this.model_=a;this.modelTrack_.model=a;b&&this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));tv.b.setPropertyAndDispatchChange(this,"model",a)},get hasVisibleContent(){return this.modelTrack_.hasVisibleContent},setInitialViewport_:function(){this.modelTrackContainer_.updateCanvasSizeIfNeeded_();var b=this.modelTrackContainer_.canvas.width,c,d;this.model_.bounds.isEmpty?(c=
|
||
|
0,d=1E3):0===this.model_.bounds.range?(c=this.model_.bounds.min,d=1E3):(c=this.model_.bounds.min,d=this.model_.bounds.range);var f=.15*d;a.set(this.viewport_.currentDisplayTransform);a.xSetWorldBounds(c-f,c+d+f,b);this.viewport_.setDisplayTransformImmediately(a)},addAllObjectsMatchingFilterToSelectionAsTask:function(a,b){return this.modelTrack_.addAllObjectsMatchingFilterToSelectionAsTask(a,b)},get focusElement(){return this.focusElement_?this.focusElement_:this.parentElement},set focusElement(a){this.focusElement_=
|
||
|
a},get listenToKeys_(){return!this.viewport_.isAttachedToDocumentOrInTestMode||document.activeElement instanceof TracingFindControl?!1:this.focusElement_?0<=this.focusElement.tabIndex?document.activeElement==this.focusElement?!0:tv.b.ui.elementIsChildOf(document.activeElement,this.focusElement):!0:!0},onMouseMove_:function(a){this.isZooming_||this.storeLastMousePos_(a)},onTouchStart_:function(a){this.storeLastTouchPositions_(a);this.focusElements_()},onTouchMove_:function(a){a.preventDefault();this.onUpdateTransformForTouch_(a)},
|
||
|
onTouchEnd_:function(a){this.storeLastTouchPositions_(a);this.focusElements_()},onKeypress_:function(a){if(this.listenToKeys_&&"INPUT"!=document.activeElement.nodeName){var b=this.modelTrackContainer_.canvas.clientWidth;switch(a.keyCode){case 119:case 44:this.zoomBy_(1.5,!0);break;case 115:case 111:this.zoomBy_(1/1.5,!0);break;case 103:this.onGridToggle_(!0);break;case 71:this.onGridToggle_(!1);break;case 87:case 60:this.zoomBy_(10,!0);break;case 83:case 79:this.zoomBy_(.1,!0);break;case 97:this.queueSmoothPan_(.3*
|
||
|
b,0);break;case 100:case 101:this.queueSmoothPan_(-.3*b,0);break;case 65:this.queueSmoothPan_(.5*b,0);break;case 68:this.queueSmoothPan_(-.5*b,0);break;case 48:this.setInitialViewport_();break;case 102:this.zoomToSelection();break;case 109:this.setCurrentSelectionAsInterestRange_();break;case 104:this.toggleHighDetails_()}}},onKeydown_:function(a){if(this.listenToKeys_){var b,c=this.modelTrackContainer_.canvas.clientWidth;switch(a.keyCode){case 37:(b=this.selection.getShiftedSelection(this.viewport,
|
||
|
-1))?(this.setSelectionAndClearHighlight(b),this.panToSelection(),a.preventDefault()):this.queueSmoothPan_(.3*c,0);break;case 39:(b=this.selection.getShiftedSelection(this.viewport,1))?(this.setSelectionAndClearHighlight(b),this.panToSelection(),a.preventDefault()):this.queueSmoothPan_(.3*-c,0);break;case 9:-1==this.focusElement.tabIndex&&(a.shiftKey?this.selectPrevious_(a):this.selectNext_(a),a.preventDefault())}}},onKeyup_:function(a){this.listenToKeys_&&(a.shiftKey||this.dragBeginEvent_&&this.setDragBoxPosition_(this.dragBoxXStart_,
|
||
|
this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_))},onDblClick_:function(a){if(this.mouseModeSelector_.mode===tv.b.ui.MOUSE_SELECTOR_MODE.SELECTION&&this.selection.length&&this.selection[0].title){a=new d;var b=new tv.c.ExactTitleFilter(this.selection[0].title);this.addAllObjectsMatchingFilterToSelection(b,a);this.setSelectionAndClearHighlight(a)}},onMouseWheel_:function(a){if(a.altKey){var b=Math.pow(1.5,a.wheelDelta/120);this.zoomBy_(b);a.preventDefault()}},queueSmoothPan_:function(a,b){var c=
|
||
|
this.viewport_.currentDisplayTransform.xViewVectorToWorld(a),c=new tv.c.TimelineDisplayTransformPanAnimation(c,b);this.viewport_.queueDisplayTransformAnimation(c)},zoomBy_:function(b,c){if(!(0>=b)){c=!!c;var d=this.viewport_,f=this.modelTrackContainer_.canvas.clientWidth,l=this.lastMouseViewPos_.x*(window.devicePixelRatio||1),m=d.currentDisplayTransform.xViewToWorld(l);c?(f=new tv.c.TimelineDisplayTransformZoomToAnimation(m,l,d.currentDisplayTransform.panY,b),d.queueDisplayTransformAnimation(f)):
|
||
|
(a.set(d.currentDisplayTransform),a.scaleX*=b,a.xPanWorldPosToViewPos(m,l,f),d.setDisplayTransformImmediately(a))}},zoomToSelection:function(){if(this.selectionOfInterest.length){var a=this.selectionOfInterest.bounds;a.range&&(a=new tv.c.TimelineDisplayTransformZoomToAnimation(a.center,this.modelTrackContainer_.canvas.width/2,this.viewport_.currentDisplayTransform.panY,this.modelTrackContainer_.canvas.width/(1.25*a.range)/this.viewport_.currentDisplayTransform.scaleX),this.viewport_.queueDisplayTransformAnimation(a))}},
|
||
|
panToSelection:function(){var b;if(this.selectionOfInterest.length){b=this.selectionOfInterest.bounds;var c=this.modelTrackContainer_.canvas.width,d=this.viewport_.currentDisplayTransform;a.set(d);a.xPanWorldBoundsIntoView(b.min,b.max,c);b=a.panX-d.panX;b=new tv.c.TimelineDisplayTransformPanAnimation(b,0);this.viewport_.queueDisplayTransformAnimation(b)}},setCurrentSelectionAsInterestRange_:function(){var a=this.selection.bounds;a.empty?this.viewport_.interestRange.reset():this.viewport_.interestRange.min==
|
||
|
a.min&&this.viewport_.interestRange.max==a.max?this.viewport_.interestRange.reset():this.viewport_.interestRange.set(a)},toggleHighDetails_:function(){this.viewport_.highDetails=!this.viewport_.highDetails},set selection(a){this.setSelectionAndHighlight(a,this.highlight_)},get selection(){return this.selection_},set highlight(a){this.setSelectionAndHighlight(this.selection_,a)},get highlight(){return this.highlight_},get selectionOfInterest(){return!this.selection_.length&&this.highlight_.length?
|
||
|
this.highlight_:this.selection_},setSelectionAndClearHighlight:function(a){this.setSelectionAndHighlight(a,null)},setHighlightAndClearSelection:function(a){this.setSelectionAndHighlight(null,a)},setSelectionAndHighlight:function(a,b){if(a!==this.selection_||b!==this.highlight_){if(null!==a&&!(a instanceof d)||null!==b&&!(b instanceof d))throw Error("Expected Selection");b&&b.length?(this.resetEventsTo_(c.DIMMED),b!==this.highlight_&&(this.highlight_=b),this.setSelectionState_(b,c.HIGHLIGHTED)):(this.resetEventsTo_(c.NONE),
|
||
|
this.highlight_=new d);a&&a.length?(a!==this.selection_&&(this.selection_=a),this.setSelectionState_(a,c.SELECTED)):this.selection_=new d;tv.b.dispatchSimpleEvent(this,"selectionChange");this.showHintText_("Press 'm' to mark current selection");if(this.selectionOfInterest.length){var f=this.viewport_.trackForEvent(this.selectionOfInterest[0]);f&&f.scrollIntoViewIfNeeded()}this.viewport_.dispatchChangeEvent()}},setSelectionState_:function(a,b){for(var c=0;c<a.length;c++)a[c].selectionState=b},resetEventsTo_:function(a){var b=
|
||
|
this.highlight_.length;b&&a!==c.DIMMED||!b&&a===c.DIMMED?this.model.iterateAllEvents(function(b){b.selectionState=a}):(this.setSelectionState_(this.selection_,a),this.setSelectionState_(this.highlight_,a))},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,c,d){var f=Math.min(b,d);d=Math.max(b,d);b=Math.min(a,c);a=Math.max(a,c);this.modelTrack_.getBoundingClientRect();
|
||
|
c=b+(a-b);d=f+(d-f);var m=this.modelTrackContainer_.getBoundingClientRect(),n=m.left,q=m.top,u=m.right,m=m.bottom,v=window.getComputedStyle(this.querySelector("heading")).width,v=parseInt(v),n=n+v;v={};b>u||c<n||f>m||d<q?f=!1:(v.left=Math.max(n,b),v.top=Math.max(q,f),v.right=Math.min(u,c),v.bottom=Math.min(m,d),v.width=v.right-v.left,v.height=v.bottom-v.top,f=v);this.dragBox_.style.left=f.left+"px";this.dragBox_.style.width=f.width+"px";this.dragBox_.style.top=f.top+"px";this.dragBox_.style.height=
|
||
|
f.height+"px";f=window.devicePixelRatio||1;c=this.modelTrackContainer_.canvas;d=this.viewport_.currentDisplayTransform;b=d.xViewToWorld((b-c.offsetLeft)*f);a=d.xViewToWorld((a-c.offsetLeft)*f);f=Math.round(100*(a-b))/100;this.dragBox_.textContent=f+"ms";f=new tv.b.Event("selectionChanging");f.loWX=b;f.hiWX=a;this.dispatchEvent(f)},onGridToggle_:function(a){var b=a?this.selection.bounds.min:this.selection.bounds.max;if(this.viewport_.gridEnabled&&this.viewport_.gridSide===a&&this.viewport_.gridInitialTimebase===
|
||
|
b)this.viewport_.gridside=void 0,this.viewport_.gridEnabled=!1,this.viewport_.gridInitialTimebase=void 0;else{var c=Math.ceil((b-this.model_.bounds.min)/this.viewport_.gridStep_);this.viewport_.gridEnabled=!0;this.viewport_.gridSide=a;this.viewport_.gridInitialTimebase=b;this.viewport_.gridTimebase=b-(c+1)*this.viewport_.gridStep_}},storeLastMousePos_:function(a){this.lastMouseViewPos_=this.extractRelativeMousePosition_(a)},storeLastTouchPositions_:function(a){this.lastTouchViewPositions_=this.extractRelativeTouchPositions_(a)},
|
||
|
extractRelativeMousePosition_:function(a){var b=this.modelTrackContainer_.canvas;return{x:a.clientX-b.offsetLeft,y:a.clientY-b.offsetTop}},extractRelativeTouchPositions_:function(a){for(var b=this.modelTrackContainer_.canvas,c=[],d=0;d<a.touches.length;++d)c.push({x:a.touches[d].clientX-b.offsetLeft,y:a.touches[d].clientY-b.offsetTop});return c},storeInitialMouseDownPos_:function(a){a=this.extractRelativeMousePosition_(a);this.mouseViewPosAtMouseDown_.x=a.x;this.mouseViewPosAtMouseDown_.y=a.y},focusElements_:function(){document.activeElement&&
|
||
|
document.activeElement.blur();0<=this.focusElement.tabIndex&&this.focusElement.focus()},storeInitialInteractionPositionsAndFocus_:function(a){this.storeInitialMouseDownPos_(a);this.storeLastMousePos_(a);this.focusElements_()},onBeginPanScan_:function(a){this.viewportDisplayTransformAtMouseDown_=this.viewport_.currentDisplayTransform.clone();this.isPanningAndScanning_=!0;this.storeInitialInteractionPositionsAndFocus_(a);a.preventDefault()},onUpdatePanScan_:function(b){if(this.isPanningAndScanning_){var c=
|
||
|
(window.devicePixelRatio||1)*(this.lastMouseViewPos_.x-this.mouseViewPosAtMouseDown_.x),d=this.lastMouseViewPos_.y-this.mouseViewPosAtMouseDown_.y;a.set(this.viewportDisplayTransformAtMouseDown_);a.incrementPanXInViewUnits(c);a.panY-=d;this.viewport_.setDisplayTransformImmediately(a);b.preventDefault();b.stopPropagation();this.storeLastMousePos_(b)}},onEndPanScan_:function(a){this.isPanningAndScanning_=!1;this.storeLastMousePos_(a);a.isClick||a.preventDefault()},onBeginSelection_:function(a){var b=
|
||
|
this.modelTrackContainer_.canvas,c=this.modelTrack_.getBoundingClientRect(),b=b.getBoundingClientRect();c&&a.clientX>=c.left&&a.clientX<c.right&&a.clientY>=c.top&&a.clientY<c.bottom&&a.clientX>=b.left&&a.clientX<b.right&&(this.dragBeginEvent_=a,this.storeInitialInteractionPositionsAndFocus_(a),a.preventDefault())},onUpdateSelection_:function(a){this.dragBeginEvent_&&(this.dragBoxXStart_=this.dragBeginEvent_.clientX,this.dragBoxXEnd_=a.clientX,this.dragBoxYStart_=this.dragBeginEvent_.clientY,this.dragBoxYEnd_=
|
||
|
a.clientY,this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_))},onEndSelection_:function(a){a.preventDefault();if(this.dragBeginEvent_){this.hideDragBox_();var b=this.dragBeginEvent_;this.dragBeginEvent_=null;var c=Math.min(b.clientY,a.clientY),f=Math.max(b.clientY,a.clientY),l=Math.min(b.clientX,a.clientX);a=Math.max(b.clientX,a.clientX);b=this.modelTrackContainer_.canvas.getBoundingClientRect().left;l-=b;b=a-b;a=new d;this.modelTrack_.addIntersectingItemsInRangeToSelection(l,
|
||
|
b,c,f,a);c=new tv.c.RequestSelectionChangeEvent;c.selection=a;this.dispatchEvent(c)}},onBeginZoom_:function(a){this.isZooming_=!0;this.storeInitialInteractionPositionsAndFocus_(a);a.preventDefault()},onUpdateZoom_:function(a){if(this.isZooming_){var b=this.extractRelativeMousePosition_(a);this.zoomBy_(1+.01*(this.lastMouseViewPos_.y-b.y),!1);this.storeLastMousePos_(a)}},onEndZoom_:function(a){this.isZooming_=!1;a.isClick||a.preventDefault()},computeTouchCenter_:function(a){for(var b=0,c=0,d=0;d<a.length;++d)b+=
|
||
|
a[d].x,c+=a[d].y;return{x:b/a.length,y:c/a.length}},computeTouchSpan_:function(a){for(var b=Number.MAX_VALUE,c=Number.MAX_VALUE,d=Number.MIN_VALUE,f=Number.MIN_VALUE,m=0;m<a.length;++m)b=Math.min(b,a[m].x),c=Math.min(c,a[m].y),d=Math.max(d,a[m].x),f=Math.max(f,a[m].y);return Math.sqrt((b-d)*(b-d)+(c-f)*(c-f))},onUpdateTransformForTouch_:function(b){var c=this.extractRelativeTouchPositions_(b),d=this.lastTouchViewPositions_,f=this.computeTouchCenter_(c),l=this.computeTouchCenter_(d),m=this.computeTouchSpan_(c),
|
||
|
n=this.computeTouchSpan_(d),d=this.viewport_,c=this.modelTrackContainer_.canvas.clientWidth,q=window.devicePixelRatio||1,u=q*(f.x-l.x),l=f.y-l.y,m=10<n?m/n:1,f=q*f.x,q=d.currentDisplayTransform.xViewToWorld(f);a.set(d.currentDisplayTransform);a.scaleX*=m;a.xPanWorldPosToViewPos(q,f,c);a.incrementPanXInViewUnits(u);a.panY-=l;d.setDisplayTransformImmediately(a);this.storeLastTouchPositions_(b)},initHintText_:function(){this.hintTextBox_=this.ownerDocument.createElement("div");this.hintTextBox_.className=
|
||
|
"hint-text";this.hintTextBox_.style.display="none";this.appendChild(this.hintTextBox_);this.pendingHintTextClearTimeout_=void 0},showHintText_:function(a){this.pendingHintTextClearTimeout_&&(window.clearTimeout(this.pendingHintTextClearTimeout_),this.pendingHintTextClearTimeout_=void 0);this.pendingHintTextClearTimeout_=setTimeout(this.hideHintText_.bind(this),1E3);this.hintTextBox_.textContent=a;this.hintTextBox_.style.display=""},hideHintText_:function(){this.pendingHintTextClearTimeout_=void 0;
|
||
|
this.hintTextBox_.style.display="none"}};return{TimelineTrackView:f}});"use strict";
|
||
|
Polymer("tracing-find-control",{filterKeyDown:function(d){d.stopPropagation();13===d.keyCode&&(d.shiftKey?this.findPrevious():this.findNext())},filterKeyPress:function(d){d.stopPropagation()},filterBlur:function(d){this.updateHitCountEl()},filterFocus:function(d){this.controller.reset();this.filterTextChanged();this.$.filter.select()},filterMouseUp:function(d){d.preventDefault()},get controller(){return this.controller_},set controller(d){this.controller_=d;this.updateHitCountEl()},focus:function(){this.$.filter.focus()},
|
||
|
hasFocus:function(){return this===document.activeElement},filterTextChanged:function(){this.controller.filterText=this.$.filter.value;this.$.hitCount.textContent="";this.$.spinner.style.visibility="visible";this.controller.updateFilterHits().then(function(){this.$.spinner.style.visibility="hidden";this.updateHitCountEl()}.bind(this))},findNext:function(){this.controller&&this.controller.findNext();this.updateHitCountEl()},findPrevious:function(){this.controller&&this.controller.findPrevious();this.updateHitCountEl()},
|
||
|
updateHitCountEl:function(){if(this.controller&&this.hasFocus()){var d=this.controller.filterHits.length;this.$.hitCount.textContent=(0===d?-1:this.controller.currentHitIndex)+1+" of "+d}else this.$.hitCount.textContent=""}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){var d=tv.b.ui.define("side-panel");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.objectInstance_=void 0},get rangeOfInterest(){throw Error("Not implemented");},set rangeOfInterest(b){throw Error("Not implemented");},get selection(){throw Error("Not implemented");},set selection(b){throw Error("Not implemented");},get model(){throw Error("Not implemented");},set model(b){throw Error("Not implemented");}};var c=new tv.b.ExtensionRegistryOptions(tv.b.BASIC_REGISTRY_MODE);
|
||
|
c.mandatoryBaseClass=tv.c.SidePanel;c.defaultMetadata={textLabel:"<Unknown>",supportsModel:function(b){return{supported:!0}}};tv.b.decorateExtensionRegistry(d,c);return{SidePanel:d}});"use strict";
|
||
|
tv.exportTo("tv.c",function(){var d=tv.b.ui.define("x-side-panel-container");d.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.activePanelContainer_=document.createElement("active-panel-container");this.tabStrip_=document.createElement("tab-strip");this.appendChild(this.activePanelContainer_);this.appendChild(this.tabStrip_);this.model_=void 0;this.rangeOfInterest_=new tv.b.Range},get model(){return this.model_},set model(c){this.model_=c;this.updateContents_()},get expanded(){this.hasAttribute("expanded")},
|
||
|
get activePanel(){return 0===this.activePanelContainer_.children.length?void 0:this.activePanelContainer_.children[0]},get activePanelConstructor(){return this.activePanelType?this.activePanelType.constructor:void 0},set activePanelConstructor(c){if(c){if(c=this.getPanelTypeForConstructor_(c),void 0===c)throw Error("Not registered");}else c=void 0;this.activePanelType=c},get activePanelType(){if(this.activePanel)return this.getPanelTypeForConstructor_(this.activePanel.constructor)},set activePanelType(c){if(void 0===
|
||
|
this.model_)throw Error("Cannot activate panel without a model");if(c&&!c.metadata.supportsModel(this.model_))throw Error("Cannot activate panel: it doesn't support this model");this.activePanelType&&this.getLabelElementForPanelType_(this.activePanelType).removeAttribute("selected");this.activePanelContainer_.textContent="";void 0===c?this.removeAttribute("expanded"):(this.getLabelElementForPanelType_(c).setAttribute("selected",!0),this.setAttribute("expanded",!0),c=new c.constructor,this.activePanelContainer_.appendChild(c),
|
||
|
c.rangeOfInterest=this.rangeOfInterest_,c.selection=this.selection_,c.model=this.model_)},getPanelTypeForConstructor_:function(c){for(var b=0;b<this.tabStrip_.children.length;b++)if(this.tabStrip_.children[b].panelType.constructor==c)return this.tabStrip_.children[b].panelType},getLabelElementForPanelType_:function(c){for(var b=0;b<this.tabStrip_.children.length;b++)if(this.tabStrip_.children[b].panelType==c)return this.tabStrip_.children[b]},updateContents_:function(){var c=this.activePanelType;
|
||
|
this.tabStrip_.textContent="";var b=[];tv.c.SidePanel.getAllRegisteredTypeInfos().forEach(function(a){var c=document.createElement("tab-strip-label");c.textContent=a.metadata.textLabel;c.panelType=a;var e=a.metadata.supportsModel(this.model_);this.model_&&e.supported?(b.push(a),c.setAttribute("enabled",!0),c.addEventListener("click",function(){this.activePanelType=this.activePanelType===a?void 0:a}.bind(this))):c.title="Not supported for the current trace: "+e.reason;this.tabStrip_.appendChild(c)},
|
||
|
this);c&&-1!=b.indexOf(c)?(this.activePanelType=c,this.setAttribute("expanded",!0)):(this.activePanelContainer_.textContent="",this.removeAttribute("expanded"))},get selection(){return this.selection_},set selection(c){this.selection_=c;this.activePanel&&(this.activePanel.selection=c)},get rangeOfInterest(){return this.rangeOfInterest_},set rangeOfInterest(c){if(void 0==c)throw Error("Must not be undefined");this.rangeOfInterest_=c;this.activePanel&&(this.activePanel.rangeOfInterest=c)}};return{SidePanelContainer:d}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.c",function(){var d=document.currentScript.ownerDocument,c=tv.b.ui.define("x-timeline-view");c.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){var b=tv.b.instantiateTemplate("#timeline-view-template",d);this.appendChild(b);this.titleEl_=this.querySelector(".title");this.leftControlsEl_=this.querySelector("#left-controls");this.rightControlsEl_=this.querySelector("#right-controls");this.sidePanelContainer_=this.querySelector("x-side-panel-container");this.trackViewContainer_=
|
||
|
this.querySelector("track-view-container");tv.b.ui.decorate(this.sidePanelContainer_,tv.c.SidePanelContainer);this.findCtl_=new TracingFindControl;this.findCtl_.controller=new tv.c.FindController;this.showFlowEvents_=!1;this.rightControls.appendChild(tv.b.ui.createCheckBox(this,"showFlowEvents","tv.c.TimelineView.showFlowEvents",!1,"Flow events"));this.highlightVSync_=!1;this.highlightVSyncCheckbox_=tv.b.ui.createCheckBox(this,"highlightVSync","tv.c.TimelineView.highlightVSync",!1,"Highlight VSync");
|
||
|
this.rightControls.appendChild(this.highlightVSyncCheckbox_);this.rightControls.appendChild(this.createMetadataButton_());this.rightControls.appendChild(this.findCtl_);this.rightControls.appendChild(this.createHelpButton_());this.dragEl_=this.querySelector("x-drag-handle");tv.b.ui.decorate(this.dragEl_,tv.b.ui.DragHandle);this.analysisEl_=this.querySelector("#analysis");this.addEventListener("requestSelectionChange",this.onRequestSelectionChange_.bind(this));this.onViewportChanged_=this.onViewportChanged_.bind(this);
|
||
|
this.onSelectionChanged_=this.onSelectionChanged_.bind(this);document.addEventListener("keydown",this.onKeyDown_.bind(this),!0);document.addEventListener("keypress",this.onKeypress_.bind(this),!0);this.dragEl_.target=this.analysisEl_;this.selections_={};window.addEventListener("popstate",this.onPopState_.bind(this))},get showFlowEvents(){return this.showFlowEvents_},set showFlowEvents(b){this.showFlowEvents_=b;this.trackView_&&(this.trackView_.viewport.showFlowEvents=b)},get highlightVSync(){return this.highlightVSync_},
|
||
|
set highlightVSync(b){this.highlightVSync_=b;this.trackView_&&(this.trackView_.viewport.highlightVSync=b)},createHelpButton_:function(){var b=tv.b.instantiateTemplate("#help-btn-template",d),a=b.querySelector(".view-help-button"),c=b.querySelector(".view-help-text"),e=new tv.b.ui.Overlay;e.title="chrome://tracing Help";e.classList.add("view-help-overlay");e.appendChild(b);a.addEventListener("click",function(a){e.visible=!e.visible;for(var b=tv.isMac?"cmd ":"ctrl",d=c.querySelectorAll("span.mod"),
|
||
|
l=0;l<d.length;l++)d[l].textContent=b;a.stopPropagation();return!1}.bind(this));return a},createMetadataButton_:function(){var b=tv.b.instantiateTemplate("#metadata-btn-template",d),a=b.querySelector(".view-metadata-button"),c=b.querySelector(".info-button-text"),e=new tv.b.ui.Overlay;e.title="Metadata for trace";e.classList.add("view-metadata-overlay");e.appendChild(b);a.addEventListener("click",function(a){e.visible=!0;var b=[],d=this.model,l;for(l in d.metadata){var m=d.metadata[l],n=JSON.stringify(m.name),
|
||
|
m=JSON.stringify(m.value,void 0," ");b.push(n+": "+m)}c.textContent=b.join("\n");a.stopPropagation();return!1}.bind(this));b=function(){a.style.display=this.model&&this.model.metadata.length?"":"none"}.bind(this);b();this.addEventListener("modelChange",b);return a},get leftControls(){return this.leftControlsEl_},get rightControls(){return this.rightControlsEl_},get viewTitle(){return this.titleEl_.textContent.substring(this.titleEl_.textContent.length-2)},set viewTitle(b){void 0===b?(this.titleEl_.textContent=
|
||
|
"",this.titleEl_.hidden=!0):(this.titleEl_.hidden=!1,this.titleEl_.textContent=b)},get model(){if(this.trackView_)return this.trackView_.model},set model(b){var a=b!=this.model,c=b&&!b.bounds.isEmpty;a&&(this.trackViewContainer_.textContent="",this.trackView_&&(this.trackView_.viewport.removeEventListener("change",this.onViewportChanged_),this.trackView_.removeEventListener("selectionChange",this.onSelectionChanged_),this.trackView_.detach(),this.trackView_=void 0,this.findCtl_.controller.trackView=
|
||
|
void 0),this.sidePanelContainer_.model=void 0);c&&!this.trackView_&&(this.trackView_=new tv.c.TimelineTrackView,this.trackView_.focusElement=this.focusElement_?this.focusElement_:this.parentElement,this.trackViewContainer_.appendChild(this.trackView_),this.findCtl_.controller.timeline=this.trackView_,this.trackView_.addEventListener("selectionChange",this.onSelectionChanged_),this.trackView_.viewport.addEventListener("change",this.onViewportChanged_));c&&(this.trackView_.model=b,this.sidePanelContainer_.model=
|
||
|
b,this.trackView_.viewport.showFlowEvents=this.showFlowEvents,this.trackView_.viewport.highlightVSync=this.highlightVSync,this.clearSelectionHistory_());tv.b.dispatchSimpleEvent(this,"modelChange");a&&(this.onSelectionChanged_(),this.onViewportChanged_())},get timeline(){return this.trackView_},get settings(){this.settings_||(this.settings_=new tv.b.Settings);return this.settings_},set focusElement(b){this.focusElement_=b;this.trackView_&&(this.trackView_.focusElement=b)},get focusElement(){return this.focusElement_?
|
||
|
this.focusElement_:this.parentElement},get listenToKeys_(){if(tv.b.ui.isElementAttachedToDocument(this))return this.focusElement_?0<=this.focusElement.tabIndex?document.activeElement==this.focusElement:!0:!0},onKeyDown_:function(b){this.listenToKeys_&&27===b.keyCode&&(this.focus(),b.preventDefault())},onKeypress_:function(b){if(this.listenToKeys_){switch(b.keyCode){case 47:this.findCtl_.hasFocus()?this.focus():this.findCtl_.focus();b.preventDefault();break;case 63:this.querySelector(".view-help-button").click(),
|
||
|
b.preventDefault()}if(!this.findCtl_.hasFocus())switch(b.keyCode){case 118:this.toggleHighlightVSync_(),b.preventDefault()}}},onSelectionChanged_:function(b){b=this.trackViewContainer_.scrollTop;var a=this.trackView_?this.trackView_.selectionOfInterest:new tv.c.Selection;this.analysisEl_.selection=a;this.trackViewContainer_.scrollTop=b;this.sidePanelContainer_.selection=a},onRequestSelectionChange_:function(b){this.selections_[b.selection.guid]=b.selection;window.history.pushState({selection_guid:b.selection.guid});
|
||
|
this.trackView_.selection=b.selection;b.stopPropagation()},onPopState_:function(b){if(null!==b.state){var a=this.selections_[b.state.selection_guid];a&&(this.trackView_.selection=a);b.stopPropagation()}},clearSelectionHistory_:function(){this.selections_={}},onViewportChanged_:function(b){b=this.sidePanelContainer_;if(this.trackView_){var a=this.trackView_.viewport.interestRange.asRangeObject();b.rangeOfInterest.equals(a)||(b.rangeOfInterest=a)}else b.rangeOfInterest.reset()},toggleHighlightVSync_:function(){this.highlightVSyncCheckbox_.checked=
|
||
|
!this.highlightVSyncCheckbox_.checked}};return{TimelineView:c}});"use strict";
|
||
|
tv.exportTo("tv",function(){var d=tv.b.ui.define("trace-viewer",tv.c.TimelineView);d.prototype={__proto__:tv.c.TimelineView.prototype,decorate:function(c){function b(){e.model=k;e.viewTitle=d;e.timeline&&(e.timeline.focusElement=e)}function a(){var a=new tv.b.ui.Overlay;a.textContent=tv.b.normalizeException(err).message;a.title="Import error";a.visible=!0}tv.c.TimelineView.prototype.decorate.call(this);if(void 0!==c){var d=c,e=this,g=new XMLHttpRequest,h=/[.]gz$/.test(d)||/[.]zip$/.test(d);g.overrideMimeType("text/plain; charset=x-user-defined");
|
||
|
g.open("GET",d,!0);h&&(g.responseType="arraybuffer");g.onreadystatechange=function(c){4==g.readyState&&window.setTimeout(function(){if(200==g.status){var c=h?g.response:g.responseText;k=new tv.c.TraceModel;k.importTracesWithProgressDialog([c],!0).then(b,a)}else{var c=g.status,e=new tv.b.ui.Overlay;e.textContent=c+": "+d+" could not be loaded";e.title="Failed to fetch data";e.visible=!0}},0)};g.send(null);var k}}};return{TraceViewer:d}});"use strict";
|
||
|
tv.exportTo("tv.b",function(){function d(a,b,c,e){vec2.scale(k,b,e);vec2.scale(l,c,1-e);vec2.add(a,k,l);vec2.normalize(a,a);return a}function c(){this.p1=vec2.create();this.p2=vec2.create();this.p3=vec2.create();this.p4=vec2.create()}function b(a,b,c){return(a[0]-c[0])*(b[1]-c[1])-(b[0]-c[0])*(a[1]-c[1])}function a(a,c,e,d){var f=0>b(a,c,e);e=0>b(a,e,d);a=0>b(a,d,c);return f==e&&e==a}function f(b,c,e,d,f){return a(b,c,e,d)||a(b,c,d,f)}for(var e=[],g=0;8>g;g++)e[g]=vec2.create();var h=vec4.create();
|
||
|
vec4.create();vec4.create();mat4.create();mat4.create();vec2.createXY(0,0);vec2.createXY(1,0);vec2.createXY(0,1);vec2.createXY(1,1);var k=vec2.create(),l=vec2.create();c.fromXYWH=function(a,b,e,d){var f=new c;vec2.set(f.p1,a,b);vec2.set(f.p2,a+e,b);vec2.set(f.p3,a+e,b+d);vec2.set(f.p4,a,b+d);return f};c.fromRect=function(a){return new c.fromXYWH(a.x,a.y,a.width,a.height)};c.from4Vecs=function(a,b,e,d){var f=new c;vec2.set(f.p1,a[0],a[1]);vec2.set(f.p2,b[0],b[1]);vec2.set(f.p3,e[0],e[1]);vec2.set(f.p4,
|
||
|
d[0],d[1]);return f};c.from8Array=function(a){if(8!=a.length)throw Error("Array must be 8 long");var b=new c;b.p1[0]=a[0];b.p1[1]=a[1];b.p2[0]=a[2];b.p2[1]=a[3];b.p3[0]=a[4];b.p3[1]=a[5];b.p4[0]=a[6];b.p4[1]=a[7];return b};c.prototype={pointInside:function(a){return f(a,this.p1,this.p2,this.p3,this.p4)},boundingRect:function(){var a=Math.min(this.p1[0],this.p2[0],this.p3[0],this.p4[0]),b=Math.min(this.p1[1],this.p2[1],this.p3[1],this.p4[1]),c=Math.max(this.p1[0],this.p2[0],this.p3[0],this.p4[0]),
|
||
|
e=Math.max(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);return new tv.b.Rect.fromXYWH(a,b,c-a,e-b)},clone:function(){var a=new c;vec2.copy(a.p1,this.p1);vec2.copy(a.p2,this.p2);vec2.copy(a.p3,this.p3);vec2.copy(a.p4,this.p4);return a},scale:function(a){var b=new c;this.scaleFast(b,a);return b},scaleFast:function(a,b){vec2.copy(a.p1,this.p1,b);vec2.copy(a.p2,this.p2,b);vec2.copy(a.p3,this.p3,b);vec2.copy(a.p3,this.p3,b)},isRectangle:function(){var a=this.boundingRect();return a.x==this.p1[0]&&a.y==
|
||
|
this.p1[1]&&a.width==this.p2[0]-this.p1[0]&&a.y==this.p2[1]&&a.width==this.p3[0]-this.p1[0]&&a.height==this.p3[1]-this.p2[1]&&a.x==this.p4[0]&&a.height==this.p4[1]-this.p2[1]},projectUnitRect:function(a){var b=new c;this.projectUnitRectFast(b,a);return b},projectUnitRectFast:function(a,b){var c=e[0],f=e[1],g=e[2],k=e[3],l,C,p,r;vec2.sub(c,this.p2,this.p1);l=vec2.length(c);vec2.scale(c,c,1/l);vec2.sub(f,this.p4,this.p1);C=vec2.length(f);vec2.scale(f,f,1/C);vec2.sub(g,this.p3,this.p2);p=vec2.length(g);
|
||
|
vec2.scale(g,g,1/p);vec2.sub(k,this.p3,this.p4);r=vec2.length(k);vec2.scale(k,k,1/r);var t=e[0],w=e[1],x=e[2],A=e[3];d(t,c,k,b.y);d(A,c,k,1-b.bottom);d(w,f,g,b.x);d(x,f,g,1-b.right);vec2.addTwoScaledUnitVectors(h,t,l*b.x,w,C*b.y);vec2.add(a.p1,this.p1,h);vec2.addTwoScaledUnitVectors(h,t,l*-(1-b.right),x,p*b.y);vec2.add(a.p2,this.p2,h);vec2.addTwoScaledUnitVectors(h,A,r*-(1-b.right),x,p*-(1-b.bottom));vec2.add(a.p3,this.p3,h);vec2.addTwoScaledUnitVectors(h,A,r*b.left,w,C*-(1-b.bottom));vec2.add(a.p4,
|
||
|
this.p4,h)},toString:function(){return"Quad("+vec2.toString(this.p1)+", "+vec2.toString(this.p2)+", "+vec2.toString(this.p3)+", "+vec2.toString(this.p4)+")"}};return{pointInTriangle2:a,pointInImplicitQuad:f,Quad:c}});"use strict";
|
||
|
tv.exportTo("tv.e.importer",function(){function d(a){if(!(a instanceof Object)){if(void 0===a||null===a)return a;if("string"==typeof a)return a.substring();if("boolean"==typeof a||"number"==typeof a)return a;throw Error("Unrecognized: "+typeof a);}if(a instanceof Array){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=d(a[c]);return b}if(a.__proto__!=Object.prototype)throw Error("Can only clone simple types");b={};for(c in a)b[c]=d(a[c]);return b}function c(a,b){this.importPriority=1;this.model_=
|
||
|
a;this.systemTraceEvents_=this.stackFrameEvents_=this.sampleEvents_=this.events_=void 0;this.eventsWereFromString_=!1;this.softwareMeasuredCpuCount_=void 0;this.allAsyncEvents_=[];this.allFlowEvents_=[];this.allObjectEvents_=[];this.allMemoryDumpEvents_={};"string"===typeof b||b instanceof String?(b=b.trim(),"["===b[0]&&(b=b.replace(/\s*,\s*$/,""),"]"!==b[b.length-1]&&(b+="]")),this.events_=JSON.parse(b),this.eventsWereFromString_=!0):this.events_=b;if(this.events_.traceEvents){var c=this.events_;
|
||
|
this.events_=this.events_.traceEvents;this.systemTraceEvents_=c.systemTraceEvents;this.sampleEvents_=c.samples;this.stackFrameEvents_=c.stackFrames;for(var d in c)"traceEvents"!==d&&"systemTraceEvents"!==d&&"samples"!==d&&"stackFrames"!==d&&this.model_.metadata.push({name:d,value:c[d]})}}var b=tv.c.importer.Importer;c.canImport=function(a){return"string"===typeof a||a instanceof String?(a=a.trim(),"{"==a[0]||"["==a[0]):a instanceof Array&&a.length&&a[0].ph||a.traceEvents&&a.traceEvents instanceof
|
||
|
Array&&(a.traceEvents.length&&a.traceEvents[0].ph||a.samples.length&&void 0!==a.stackFrames)?!0:!1};c.prototype={__proto__:b.prototype,extractSubtraces:function(){var a=this.systemTraceEvents_;this.systemTraceEvents_=void 0;return a?[a]:[]},deepCopyIfNeeded_:function(a){void 0===a&&(a={});return this.eventsWereFromString_?a:d(a)},processAsyncEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);this.allAsyncEvents_.push({sequenceNumber:this.allAsyncEvents_.length,
|
||
|
event:a,thread:b})},processFlowEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);this.allFlowEvents_.push({sequenceNumber:this.allFlowEvents_.length,event:a,thread:b})},processCounterEvent:function(a){var b;b=void 0!==a.id?a.name+"["+a.id+"]":a.name;b=this.model_.getOrCreateProcess(a.pid).getOrCreateCounter(a.cat,b);if(0===b.numSeries){for(var c in a.args)b.addSeries(new tv.c.trace_model.CounterSeries(c,tv.b.ui.getStringColorId(b.name+"."+c)));if(0===b.numSeries){this.model_.importWarning({type:"counter_parse_error",
|
||
|
message:"Expected counter "+a.name+" to have at least one argument to use as a value."});delete b.parent.counters[b.name];return}}var d=a.ts/1E3;b.series.forEach(function(b){b.addCounterSample(d,a.args[b.name]?a.args[b.name]:0)})},processObjectEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);this.allObjectEvents_.push({sequenceNumber:this.allObjectEvents_.length,event:a,thread:b})},processDurationEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid);
|
||
|
if(b.sliceGroup.isTimestampValidForBeginOrEnd(a.ts/1E3))if("B"==a.ph)b=b.sliceGroup.beginSlice(a.cat,a.name,a.ts/1E3,this.deepCopyIfNeeded_(a.args),a.tts/1E3),b.startStackFrame=this.getStackFrameForEvent_(a);else if("I"==a.ph||"i"==a.ph){if(void 0!==a.s&&"t"!==a.s)throw Error("This should never happen");b.sliceGroup.beginSlice(a.cat,a.name,a.ts/1E3,this.deepCopyIfNeeded_(a.args),a.tts/1E3);b=b.sliceGroup.endSlice(a.ts/1E3,a.tts/1E3);b.startStackFrame=this.getStackFrameForEvent_(a);b.endStackFrame=
|
||
|
void 0}else if(b.sliceGroup.openSliceCount){b=b.sliceGroup.endSlice(a.ts/1E3,a.tts/1E3);a.name&&b.title!=a.name&&this.model_.importWarning({type:"title_match_error",message:"Titles do not match. Title is "+b.title+" in openSlice, and is "+a.name+" in endSlice"});b.endStackFrame=this.getStackFrameForEvent_(a);for(var c in a.args)void 0!==b.args[c]&&this.model_.importWarning({type:"duration_parse_error",message:"Both the B and E phases of "+b.name+" provided values for argument "+c+". The value of the E phase event will be used."}),
|
||
|
b.args[c]=this.deepCopyIfNeeded_(a.args[c])}else this.model_.importWarning({type:"duration_parse_error",message:"E phase event without a matching B phase event."});else this.model_.importWarning({type:"duration_parse_error",message:"Timestamps are moving backward."})},processCompleteEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid).sliceGroup.pushCompleteSlice(a.cat,a.name,a.ts/1E3,void 0===a.dur?void 0:a.dur/1E3,void 0===a.tts?void 0:a.tts/1E3,void 0===a.tdur?
|
||
|
void 0:a.tdur/1E3,this.deepCopyIfNeeded_(a.args));b.startStackFrame=this.getStackFrameForEvent_(a);b.endStackFrame=this.getStackFrameForEvent_(a,!0)},processMetadataEvent:function(a){if("process_name"==a.name){var b=this.model_.getOrCreateProcess(a.pid);b.name=a.args.name}else if("process_labels"==a.name){b=this.model_.getOrCreateProcess(a.pid);a=a.args.labels.split(",");for(var c=0;c<a.length;c++)b.addLabelIfNeeded(a[c])}else"process_sort_index"==a.name?(b=this.model_.getOrCreateProcess(a.pid),b.sortIndex=
|
||
|
a.args.sort_index):"thread_name"==a.name?(b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid),b.name=a.args.name):"thread_sort_index"==a.name?(b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid),b.sortIndex=a.args.sort_index):"num_cpus"==a.name?(b=a.args.number,void 0!==this.softwareMeasuredCpuCount_&&(b=Math.max(b,this.softwareMeasuredCpuCount_)),this.softwareMeasuredCpuCount_=b):this.model_.importWarning({type:"metadata_parse_error",message:"Unrecognized metadata name: "+
|
||
|
a.name})},processInstantEvent:function(a){if("t"==a.s||void 0===a.s)this.processDurationEvent(a);else{var b;switch(a.s){case "g":b=tv.c.trace_model.GlobalInstantEvent;break;case "p":b=tv.c.trace_model.ProcessInstantEvent;break;default:this.model_.importWarning({type:"instant_parse_error",message:'I phase event with unknown "s" field value.'});return}var c=tv.b.ui.getStringColorId(a.name);b=new b(a.cat,a.name,c,a.ts/1E3,this.deepCopyIfNeeded_(a.args));switch(b.type){case tv.c.trace_model.InstantEventType.GLOBAL:this.model_.pushInstantEvent(b);
|
||
|
break;case tv.c.trace_model.InstantEventType.PROCESS:this.model_.getOrCreateProcess(a.pid).pushInstantEvent(b);break;default:throw Error("Unknown instant event type: "+a.s);}}},processTraceSampleEvent:function(a){var b=this.model_.getOrCreateProcess(a.pid).getOrCreateThread(a.tid),c=this.getStackFrameForEvent_(a);void 0===c&&(c="te-"+tv.b.GUID.allocate(),c=new tv.c.trace_model.StackFrame(void 0,c,a.cat,a.name,tv.b.ui.getStringColorId(a.name)),this.model_.addStackFrame(c));a=new tv.c.trace_model.Sample(void 0,
|
||
|
b,"TRACE_EVENT_SAMPLE",a.ts/1E3,c,1,this.deepCopyIfNeeded_(a.args));this.model_.samples.push(a)},getOrCreateMemoryDumpEvents_:function(a){void 0===this.allMemoryDumpEvents_[a]&&(this.allMemoryDumpEvents_[a]={global:void 0,process:[]});return this.allMemoryDumpEvents_[a]},processMemoryDumpEvent:function(a){if(void 0===a.id)this.model_.importWarning({type:"memory_dump_parse_error",message:a.ph+" phase event without a dump ID."});else{var b=this.getOrCreateMemoryDumpEvents_(a.id);if("u"===a.ph)b.process.push(a);
|
||
|
else if("U"===a.ph)void 0!==b.global?this.model_.importWarning({type:"memory_dump_parse_error",message:"Multiple U phase events with the same dump ID."}):b.global=a;else throw Error('Invalid memory dump event phase "'+a.ph+'".');}},importEvents:function(){this.stackFrameEvents_&&this.importStackFrames_();for(var a=this.events_,b=0;b<a.length;b++){var c=a[b];"B"===c.ph||"E"===c.ph?this.processDurationEvent(c):"X"===c.ph?this.processCompleteEvent(c):"b"===c.ph||"e"===c.ph||"n"===c.ph||"S"===c.ph||"F"===
|
||
|
c.ph||"T"===c.ph||"p"===c.ph?this.processAsyncEvent(c):"I"==c.ph||"i"==c.ph?this.processInstantEvent(c):"P"==c.ph?this.processTraceSampleEvent(c):"C"==c.ph?this.processCounterEvent(c):"M"==c.ph?this.processMetadataEvent(c):"N"===c.ph||"D"===c.ph||"O"===c.ph?this.processObjectEvent(c):"s"===c.ph||"t"===c.ph||"f"===c.ph?this.processFlowEvent(c):"u"===c.ph||"U"===c.ph?this.processMemoryDumpEvent(c):this.model_.importWarning({type:"parse_error",message:"Unrecognized event phase: "+c.ph+" ("+c.name+")"})}},
|
||
|
importStackFrames_:function(){var a=this.model_,b=this.stackFrameEvents_,c;for(c in b){var d=b[c],h=new tv.c.trace_model.StackFrame(void 0,"g"+c,d.category,d.name,tv.b.ui.getStringColorId(d.category?d.category:d.name));a.addStackFrame(h)}for(c in b)if(d=b[c],void 0!==d.parent){h=a.stackFrames["g"+c];if(void 0===h)throw Error("omg");if(void 0===d.parent)d=void 0;else if(d=a.stackFrames["g"+d.parent],void 0===d)throw Error("omg");h.parentFrame=d}},finalizeImport:function(){void 0!==this.softwareMeasuredCpuCount_&&
|
||
|
(this.model_.kernel.softwareMeasuredCpuCount=this.softwareMeasuredCpuCount_);this.createAsyncSlices_();this.createFlowSlices_();this.createExplicitObjects_();this.createImplicitObjects_();this.createMemoryDumps_()},getStackFrameForEvent_:function(a,b){var c,d;b?(c=a.esf,d=a.estack):(c=a.sf,d=a.stack);if(void 0!==d&&void 0!==c)this.model_.importWarning({type:"stack_frame_and_stack_error",message:"Event at "+a.ts+" cannot have both a stack and a stackframe."});else{if(void 0!==d)return this.model_.resolveStackToStackFrame_(a.pid,
|
||
|
d);if(void 0!==c)if(d=this.model_.stackFrames["g"+c],void 0===d)this.model_.importWarning({type:"sample_import_error",message:"No frame for "+c});else return d}},resolveStackToStackFrame_:function(a,b){},importSampleData:function(){if(this.sampleEvents_){var a=this.model_,b=this.sampleEvents_;if(0===this.events_.length)for(var c=0;c<b.length;c++){var d=b[c];a.getOrCreateProcess(d.tid).getOrCreateThread(d.tid)}var h={};a.getAllThreads().forEach(function(a){h[a.tid]=a});for(c=0;c<b.length;c++){var d=
|
||
|
b[c],k=h[d.tid];if(void 0===k)a.importWarning({type:"sample_import_error",message:"Thread "+b.tid+"not found"});else{var l;void 0!==d.cpu&&(l=a.kernel.getOrCreateCpu(d.cpu));var m=this.getStackFrameForEvent_(d),d=new tv.c.trace_model.Sample(l,k,d.name,d.ts/1E3,m,d.weight);a.samples.push(d)}}}},joinRefs:function(){this.joinObjectRefs_()},createAsyncSlices_:function(){if(0!==this.allAsyncEvents_.length){this.allAsyncEvents_.sort(function(a,b){var c=a.event.ts-b.event.ts;return 0!==c?c:a.sequenceNumber-
|
||
|
b.sequenceNumber});for(var a=[],b={},c=0;c<this.allAsyncEvents_.length;c++){var d=this.allAsyncEvents_[c],h=d.event;if("S"===h.ph||"F"===h.ph||"T"===h.ph||"p"===h.ph)a.push(d);else if(void 0===h.name)this.model_.importWarning({type:"async_slice_parse_error",message:"Nestable async events (ph: b, e, or n) require a name parameter."});else{var k=h.id;void 0===k?this.model_.importWarning({type:"async_slice_parse_error",message:"Nestable async events (ph: b, e, or n) require an id parameter."}):(void 0===
|
||
|
b[k]&&(b[k]=[]),b[k].push(d))}}this.createLegacyAsyncSlices_(a);for(k in b){a=b[k];h=[];for(c=0;c<a.length;++c){d=a[c];if("e"===d.event.ph){for(var l=-1,m=h.length-1;0<=m;--m)if(h[m].event.name===d.event.name){l=m;break}if(-1===l)d.finished=!1;else for(h[l].end=d;l<h.length;)h.pop()}0<h.length&&(d.parentEntry=h[h.length-1]);"b"===d.event.ph&&h.push(d)}h=[];for(c=0;c<a.length;++c)if(d=a[c],"e"!==d.event.ph||void 0!==d.finished){var n=m=l=void 0,q=void 0;"n"===d.event.ph?(m=l=d,n=d.event.args):"b"===
|
||
|
d.event.ph?(void 0===d.end?(d.end=a[a.length-1],q="Slice has no matching END. End time has been adjusted.",this.model_.importWarning({type:"async_slice_parse_error",message:"Nestable async BEGIN event at "+d.event.ts+" with name="+d.event.name+" and id="+d.event.id+" was unmatched."}),n=d.event.args):n=function(a,b){if(void 0===a.params||void 0===b.params)return tv.b.concatenateObjects(a,b);var c={};c.params=tv.b.concatenateObjects(a.params,b.params);return tv.b.concatenateObjects(a,b,c)}(d.event.args,
|
||
|
d.end.event.args),l=d,m=d.end):(q="Slice has no matching BEGIN. Start time has been adjusted.",this.model_.importWarning({type:"async_slice_parse_error",message:"Nestable async END event at "+d.event.ts+" with name="+d.event.name+" and id="+d.event.id+" was unmatched."}),l=a[0],m=d,n=d.event.args);n=new (tv.c.trace_model.AsyncSlice.getConstructor(d.event.cat,d.event.name))(d.event.cat,d.event.name,tv.b.ui.getStringColorId(d.event.name),l.event.ts/1E3,n,(m.event.ts-l.event.ts)/1E3);n.startThread=l.thread;
|
||
|
n.endThread=m.thread;n.id=k;void 0!==q&&(n.error=q);d.slice=n;void 0!==d.parentEntry&&void 0!==d.parentEntry.slice?(void 0===d.parentEntry.slice.subSlices&&(d.parentEntry.slice.subSlices=[]),d.parentEntry.slice.subSlices.push(n)):h.push(n)}for(c=0;c<h.length;c++)h[c].startThread.asyncSliceGroup.push(h[c])}}},createLegacyAsyncSlices_:function(a){if(0!==a.length){a.sort(function(a,b){var c=a.event.ts-b.event.ts;return 0!=c?c:a.sequenceNumber-b.sequenceNumber});for(var b={},c=0;c<a.length;c++){var d=
|
||
|
a[c],h=d.event,k=h.name;if(void 0===k)this.model_.importWarning({type:"async_slice_parse_error",message:"Async events (ph: S, T, p, or F) require a name parameter."});else{var l=h.id;if(void 0===l)this.model_.importWarning({type:"async_slice_parse_error",message:"Async events (ph: S, T, p, or F) require an id parameter."});else if("S"===h.ph)void 0===b[k]&&(b[k]={}),b[k][l]?this.model_.importWarning({type:"async_slice_parse_error",message:"At "+h.ts+", a slice of the same id "+l+" was alrady open."}):
|
||
|
(b[k][l]=[],b[k][l].push(d));else if(void 0===b[k])this.model_.importWarning({type:"async_slice_parse_error",message:"At "+h.ts+", no slice named "+k+" was open."});else if(void 0===b[k][l])this.model_.importWarning({type:"async_slice_parse_error",message:"At "+h.ts+", no slice named "+k+" with id="+l+" was open."});else{var m=b[k][l];m.push(d);if("F"===h.ph){var n=tv.c.trace_model.AsyncSlice.getConstructor(m[0].event.cat,k),q=new n(m[0].event.cat,k,tv.b.ui.getStringColorId(k),m[0].event.ts/1E3,tv.b.concatenateObjects(m[0].event.args,
|
||
|
m[m.length-1].event.args),(h.ts-m[0].event.ts)/1E3);q.startThread=m[0].thread;q.endThread=d.thread;q.id=l;q.subSlices=[];for(var d=m[1].event.ph,u=!0,v=1;v<m.length-1;++v){if("T"===m[v].event.ph||"p"===m[v].event.ph)if(u=this.assertStepTypeMatches_(d,m[v]),!u)break;if("S"===m[v].event.ph)this.model_.importWarning({type:"async_slice_parse_error",message:"At "+h.event.ts+", a slice named "+h.event.name+" with id="+h.event.id+" had a step before the start event."});else if("F"===m[v].event.ph)this.model_.importWarning({type:"async_slice_parse_error",
|
||
|
message:"At "+h.event.ts+", a slice named "+h.event.name+" with id="+h.event.id+" had a step after the finish event."});else{var y=v+("T"===d?0:-1),E=y+1,C=m[v].event.name;if("T"===m[v].event.ph||"p"===m[v].event.ph)C=C+":"+m[v].event.args.step;n=tv.c.trace_model.AsyncSlice.getConstructor(m[0].event.cat,C);n=new n(m[0].event.cat,C,tv.b.ui.getStringColorId(C+v),m[y].event.ts/1E3,this.deepCopyIfNeeded_(m[v].event.args),(m[E].event.ts-m[y].event.ts)/1E3);n.startThread=m[y].thread;n.endThread=m[E].thread;
|
||
|
n.id=l;q.subSlices.push(n)}}u&&q.startThread.asyncSliceGroup.push(q);delete b[k][l]}}}}}},assertStepTypeMatches_:function(a,b){return a!=b.event.ph?(this.model_.importWarning({type:"async_slice_parse_error",message:"At "+b.event.ts+", a slice named "+b.event.name+" with id="+b.event.id+" had both begin and end steps, which is not allowed."}),!1):!0},createFlowSlices_:function(){if(0!==this.allFlowEvents_.length){this.allFlowEvents_.sort(function(a,b){var c=a.event.ts-b.event.ts;return 0!=c?c:a.sequenceNumber-
|
||
|
b.sequenceNumber});for(var a={},b=0;b<this.allFlowEvents_.length;++b){var c=this.allFlowEvents_[b],d=c.event,h=c.thread;if(void 0===d.name)this.model_.importWarning({type:"flow_slice_parse_error",message:"Flow events (ph: s, t or f) require a name parameter."});else if(void 0===d.id)this.model_.importWarning({type:"flow_slice_parse_error",message:"Flow events (ph: s, t or f) require an id parameter."});else if(c=new tv.c.trace_model.FlowEvent(d.cat,d.id,d.name,tv.b.ui.getStringColorId(d.name),d.ts/
|
||
|
1E3,this.deepCopyIfNeeded_(d.args)),h.sliceGroup.pushSlice(c),"s"===d.ph)void 0!==a[d.id]&&this.model_.importWarning({type:"flow_slice_start_error",message:"event id "+d.id+" already seen when encountering start of flow event."}),a[d.id]=c;else if("t"===d.ph||"f"===d.ph)h=a[d.id],void 0===h?this.model_.importWarning({type:"flow_slice_ordering_error",message:"Found flow phase "+d.ph+" for id: "+d.id+" but no flow start found."}):(this.model_.flowEvents.push([h,c]),h&&(h.nextFlowEvent=c),c&&(c.previousFlowEvent=
|
||
|
h),a[d.id]="f"===d.ph?void 0:c)}}},createExplicitObjects_:function(){function a(a){var b=a.event;a=a.thread;void 0===b.name&&this.model_.importWarning({type:"object_parse_error",message:"While processing "+JSON.stringify(b)+": Object events require an name parameter."});void 0===b.id&&this.model_.importWarning({type:"object_parse_error",message:"While processing "+JSON.stringify(b)+": Object events require an id parameter."});var c=a.parent,d=b.ts/1E3,e;if("N"==b.ph)try{e=c.objects.idWasCreated(b.id,
|
||
|
b.cat,b.name,d)}catch(f){this.model_.importWarning({type:"object_parse_error",message:"While processing create of "+b.id+" at ts="+d+": "+f});return}else if("O"==b.ph){if(void 0===b.args.snapshot){this.model_.importWarning({type:"object_parse_error",message:"While processing "+b.id+" at ts="+d+": Snapshots must have args: {snapshot: ...}"});return}var g;try{var h=this.deepCopyIfNeeded_(b.args.snapshot),E;h.cat?(E=h.cat,delete h.cat):E=b.cat;var C;h.base_type?(C=h.base_type,delete h.base_type):C=void 0;
|
||
|
g=c.objects.addSnapshot(b.id,E,b.name,d,h,C);g.snapshottedOnThread=a}catch(p){this.model_.importWarning({type:"object_parse_error",message:"While processing snapshot of "+b.id+" at ts="+d+": "+p});return}e=g.objectInstance}else if("D"==b.ph)try{e=c.objects.idWasDeleted(b.id,b.cat,b.name,d)}catch(r){this.model_.importWarning({type:"object_parse_error",message:"While processing delete of "+b.id+" at ts="+d+": "+r});return}e&&(e.colorId=tv.b.ui.getStringColorId(e.typeName))}if(0!=this.allObjectEvents_.length){this.allObjectEvents_.sort(function(a,
|
||
|
b){var c=a.event.ts-b.event.ts;return 0!=c?c:a.sequenceNumber-b.sequenceNumber});for(var b=this.allObjectEvents_,c=0;c<b.length;c++){var d=b[c];try{a.call(this,d)}catch(h){this.model_.importWarning({type:"object_parse_error",message:h.message})}}}},createImplicitObjects_:function(){tv.b.iterItems(this.model_.processes,function(a,b){this.createImplicitObjectsForProcess_(b)},this)},createImplicitObjectsForProcess_:function(a){function b(c,d,e,f){if(e){if(e instanceof tv.c.trace_model.ObjectSnapshot)return null;
|
||
|
if(void 0!==e.id){var m=e.id,n=/(.+)\/(.+)/.exec(m);if(!n)throw Error("Implicit snapshots must have names.");delete e.id;var q=n[1],n=n[2],u,v;v=void 0!==e.cat?e.cat:f.objectInstance.category;var y;y=e.base_type?e.base_type:void 0;try{u=a.objects.addSnapshot(n,v,q,f.ts,e,y)}catch(E){this.model_.importWarning({type:"object_snapshot_parse_error",message:"While processing implicit snapshot of "+m+" at ts="+f.ts+": "+E});return}u.objectInstance.hasImplicitSnapshots=!0;u.containingSnapshot=f;u.snapshottedOnThread=
|
||
|
f.snapshottedOnThread;c[d]=u;if(!(u instanceof tv.c.trace_model.ObjectSnapshot))throw Error("Created object must be instanceof snapshot");return u.args}}}function c(a,b,d,f){if(a instanceof Object)if(a instanceof Array)for(var m=0;m<a.length;m++){var n=b.call(f,a,m,a[m],d);null!==n&&(n?c(n,b,d,f):c(a[m],b,d,f))}else for(m in a)n=b.call(f,a,m,a[m],d),null!==n&&(n?c(n,b,d,f):c(a[m],b,d,f))}a.objects.iterObjectInstances(function(a){a.snapshots.forEach(function(a){if(void 0!==a.args.id)throw Error("args cannot have an id field inside it");
|
||
|
c(a.args,b,a,this)},this)},this)},createMemoryDumps_:function(){tv.b.iterItems(this.allMemoryDumpEvents_,function(a,b){var c=new tv.b.Range;void 0!==b.global&&c.addValue(b.global.ts);for(var d=0;d<b.process.length;d++)c.addValue(b.process[d].ts);var h=new tv.c.trace_model.GlobalMemoryDump(this.model_,c.min,this.deepCopyIfNeeded_(b.global));h.duration=c.range;this.model_.globalMemoryDumps.push(h);0===b.process.length&&this.model_.importWarning({type:"memory_dump_parse_error",message:"No process memory dumps associated with global memory dump "+
|
||
|
a+"."});for(d=0;d<b.process.length;d++){var k=b.process[d],c=k.pid;if(c in h.processMemoryDumps)this.model_.importWarning({type:"memory_dump_parse_error",message:"Multiple process memory dumps with pid="+c+" for dump id "+a+"."});else{var l=this.model_.getOrCreateProcess(c),k=new tv.c.trace_model.ProcessMemoryDump(h,l,k.ts,this.deepCopyIfNeeded_(k.args));l.memoryDumps.push(k);h.processMemoryDumps[c]=k}}},this)},joinObjectRefs_:function(){tv.b.iterItems(this.model_.processes,function(a,b){this.joinObjectRefsForProcess_(b)},
|
||
|
this)},joinObjectRefsForProcess_:function(a){var b=[];tv.b.iterItems(a.threads,function(c,d){d.asyncSliceGroup.slices.forEach(function(c){this.searchItemForIDRefs_(b,a.objects,"start",c)},this);d.sliceGroup.slices.forEach(function(c){this.searchItemForIDRefs_(b,a.objects,"start",c)},this)},this);a.objects.iterObjectInstances(function(c){c.snapshots.forEach(function(c){this.searchItemForIDRefs_(b,a.objects,"ts",c)},this)},this);b.forEach(function(a){a.object[a.field]=a.value})},searchItemForIDRefs_:function(a,
|
||
|
b,c,d){function h(h,k,n){n&&(n.id_ref||n.idRef)&&(n=b.getSnapshotAt(n.id_ref||n.idRef,d[c]))&&a.push({object:h,field:k,value:n})}function k(a){if(a instanceof Object&&!(a instanceof tv.c.trace_model.ObjectSnapshot||a instanceof Float32Array||a instanceof tv.b.Quad))if(a instanceof Array)for(var b=0;b<a.length;b++)h(a,b,a[b]),k(a[b]);else for(b in a){var c=a[b];h(a,b,c);k(c)}}if(!d.args)throw Error("item is missing its args");k(d.args)}};tv.c.importer.Importer.register(c);return{TraceEventImporter:c}});
|
||
|
"use strict";
|
||
|
tv.exportTo("tv.e.highlighter",function(){function d(b){c.call(this,b);this.times_=[]}var c=tv.c.tracks.Highlighter;d.VSYNC_HIGHLIGHT_COLOR={r:0,g:0,b:255};d.VSYNC_HIGHLIGHT_ALPHA=.1;d.VSYNC_DENSITY_TRANSPARENT=.2;d.VSYNC_DENSITY_OPAQUE=.1;d.VSYNC_DENSITY_RANGE=d.VSYNC_DENSITY_TRANSPARENT-d.VSYNC_DENSITY_OPAQUE;d.VSYNC_COUNTER_PRECISIONS={"android.VSYNC":15};d.VSYNC_SLICE_PRECISIONS={"RenderWidgetHostViewAndroid::OnVSync":5,VSYNC:10,vblank:10,"DisplayLinkMac::GetVSyncParameters":5};d.findVSyncTimes=function(b){var a=
|
||
|
[],c=Number.NEGATIVE_INFINITY,e=void 0,g=function(b,d){if(b!=e){var g=d[b];if(void 0===g||g<=c)return g===c&&console.warn("Encountered two different VSync events ("+e+", "+b+") with the same precision, ignoring the newer one ("+b+")"),!1;c=g;e=b;a=[]}return!0},h;for(h in b.processes){var k=b.processes[h],l;for(l in k.counters)if(g(l,d.VSYNC_COUNTER_PRECISIONS))for(var m=k.counters[l],n=0;n<m.series.length;n++)Array.prototype.push.apply(a,m.series[n].timestamps);for(var q in k.threads)for(m=k.threads[q],
|
||
|
n=0;n<m.sliceGroup.slices.length;n++){var u=m.sliceGroup.slices[n];g(u.title,d.VSYNC_SLICE_PRECISIONS)&&a.push(u.start)}}a.sort(function(a,b){return a-b});return a};d.generateStripes=function(b,a,c){var d=[],g=tv.b.findLowIndexInSortedArray(b,function(a){return a},a);g>b.length&&(g=b.length);for(var h=g-1;b[h+1]<=c;)h++;for(var k=g-g%2;k<=h;k+=2)d.push([k<g?a:b[k],k+1>h?c:b[k+1]]);return d};d.prototype={__proto__:c.prototype,processModel:function(b){this.times_=d.findVSyncTimes(b)},drawHighlight:function(b,
|
||
|
a,c,e,g){if(this.viewport_.highlightVSync&&(c=d.generateStripes(this.times_,c,e),0!=c.length&&(e=tv.b.clamp(c.length/(a.scaleX*(c[c.length-1][1]-c[0][0])),d.VSYNC_DENSITY_OPAQUE,d.VSYNC_DENSITY_TRANSPARENT),e=(d.VSYNC_DENSITY_TRANSPARENT-e)/d.VSYNC_DENSITY_RANGE,0!=e)))for(g*=window.devicePixelRatio||1,b.fillStyle=tv.b.ui.colorToRGBAString(d.VSYNC_HIGHLIGHT_COLOR,d.VSYNC_HIGHLIGHT_ALPHA*e),e=0;e<c.length;e++){var h=a.xWorldToView(c[e][0]),k=a.xWorldToView(c[e][1]);b.fillRect(h,0,k-h,g)}}};tv.c.tracks.Highlighter.register(d);
|
||
|
return{VSyncHighlighter:d}});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
</body>
|
||
|
</html>
|