import {Component, OnInit} from '@angular/core';
import {HTTP_PROVIDERS, Http, Response} from '@angular/http';
import {Observable} from 'rxjs/observable';
import {VaadinGrid} from './vaadin-grid';
import { Injectable } from '@angular/core';
import {Headers, RequestOptions} from '@angular/http';
class Person {
firstName: string;
lastName: string;
email: string;
}
@Component({
selector: 'my-app',
template: `
<p>Vaadin grid</p>
<vaadin-grid [items]="people">
<table>
<colgroup>
<col name="firstName">
<col name="lastName">
<col name="email">
</colgroup>
</table>
</vaadin-grid>
`,
directives: [
VaadinGrid
],
providers: [
HTTP_PROVIDERS
],
styles: [`
vaadin-grid {
height: 500px;
}
`]
})
export class AppComponent implements OnInit {
people: Person[] = [];
constructor (private http: Http) {}
ngOnInit() {
this.getPeople();
}
getPeople() {
this._getJSON('https://demo.vaadin.com/demo-data/1.0/people');
}
_getJSON(url: string){
this.http.get(url).subscribe(
data => this.people=data.json().result,
err => console.log(err),
() => console.log('request Complete')
);
}
}
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
bootstrap(AppComponent);
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
/* Master Styles */
h1 {
color: #369;
font-family: Arial, Helvetica, sans-serif;
font-size: 250%;
}
h2, h3 {
color: #444;
font-family: Arial, Helvetica, sans-serif;
font-weight: lighter;
}
body {
margin: 2em;
}
body, input[text], button {
color: #888;
font-family: Cambria, Georgia;
}
a {
cursor: pointer;
cursor: hand;
}
button {
font-family: Arial;
background-color: #eee;
border: none;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
cursor: hand;
}
button:hover {
background-color: #cfd8dc;
}
button:disabled {
background-color: #eee;
color: #aaa;
cursor: auto;
}
/* Navigation link styles */
nav a {
padding: 5px 10px;
text-decoration: none;
margin-top: 10px;
display: inline-block;
background-color: #eee;
border-radius: 4px;
}
nav a:visited, a:link {
color: #607D8B;
}
nav a:hover {
color: #039be5;
background-color: #CFD8DC;
}
nav a.router-link-active {
color: #039be5;
}
/* items class */
.items {
margin: 0 0 2em 0;
list-style-type: none;
padding: 0;
width: 24em;
}
.items li {
cursor: pointer;
position: relative;
left: 0;
background-color: #EEE;
margin: .5em;
padding: .3em 0;
height: 1.6em;
border-radius: 4px;
}
.items li:hover {
color: #607D8B;
background-color: #DDD;
left: .1em;
}
.items li.selected:hover {
background-color: #BBD8DC;
color: white;
}
.items .text {
position: relative;
top: -3px;
}
.items {
margin: 0 0 2em 0;
list-style-type: none;
padding: 0;
width: 24em;
}
.items li {
cursor: pointer;
position: relative;
left: 0;
background-color: #EEE;
margin: .5em;
padding: .3em 0;
height: 1.6em;
border-radius: 4px;
}
.items li:hover {
color: #607D8B;
background-color: #DDD;
left: .1em;
}
.items li.selected {
background-color: #CFD8DC;
color: white;
}
.items li.selected:hover {
background-color: #BBD8DC;
}
.items .text {
position: relative;
top: -3px;
}
.items .badge {
display: inline-block;
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
line-height: 1em;
position: relative;
left: -1px;
top: -4px;
height: 1.8em;
margin-right: .8em;
border-radius: 4px 0 0 4px;
}
/* everywhere else */
* {
font-family: Arial, Helvetica, sans-serif;
}
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
<!DOCTYPE html>
<html>
<head>
<title>Angular 2 QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="https://npmcdn.com/es6-shim@0.35.0/es6-shim.min.js"></script>
<script src="https://npmcdn.com/zone.js@0.6.12?main=browser"></script>
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
<link rel="import" href="bower/vaadin-grid.html">
<script src="https://cdn.vaadin.com/vaadin-elements/latest/webcomponentsjs/webcomponents-lite.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
window.addEventListener('WebComponentsReady', function() {
System.import('app').catch(function(err){ console.error(err); });
});
</script>
</head>
<!-- 3. Display the application -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
/**
* PLUNKER VERSION (based on systemjs.config.js in angular.io)
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function(global) {
var ngVer = '@2.0.0-rc.1'; // lock in the angular package version; do not let it float to current!
//map tells the System loader where to look for things
var map = {
'app': 'app',
'@angular': 'https://npmcdn.com/@angular', // sufficient if we didn't pin the version
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api', // get latest
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',
'ts': 'https://npmcdn.com/plugin-typescript@4.0.10/lib/plugin.js',
'typescript': 'https://npmcdn.com/typescript@1.8.10/lib/typescript.js',
};
//packages tells the System loader how to load when no filename and/or no extension
var packages = {
'app': { main: 'main.ts', defaultExtension: 'ts' },
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { defaultExtension: 'js' },
};
var ngPackageNames = [
'common',
'compiler',
'core',
'http',
'platform-browser',
'platform-browser-dynamic',
'router',
'router-deprecated',
'upgrade',
];
// Add map entries for each angular package
// only because we're pinning the version with `ngVer`.
ngPackageNames.forEach(function(pkgName) {
map['@angular/'+pkgName] = 'https://npmcdn.com/@angular/' + pkgName + ngVer;
});
// Add package entries for angular packages
ngPackageNames.forEach(function(pkgName) {
// Bundled (~40 requests):
packages['@angular/'+pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
// Individual files (~300 requests):
//packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
});
var config = {
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
transpiler: 'typescript',
typescriptOptions: {
emitDecoratorMetadata: true
},
map: map,
packages: packages
}
System.config(config);
})(this);
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
import {Directive, ElementRef, Input, Output, EventEmitter} from '@angular/core';
const Polymer = (<any>window).Polymer;
@Directive({selector: 'vaadin-grid'})
export class VaadinGrid {
@Output('grid-ready') gridReady: EventEmitter<any> = new EventEmitter(false);
private grid: any;
constructor(el: ElementRef) {
if (!Polymer || !Polymer.isInstance(el.nativeElement)) {
console.error("vaadin-grid has not been registered yet, please remember to import vaadin-grid.html in your main HTML page.");
return;
}
this.grid = el.nativeElement;
}
ngAfterViewInit() {
// Configuration <table> might be placed in a wrong container.
// Let's move it in the light dom programmatically to fix that.
var localDomTable = this.grid.querySelector("table:not(.vaadin-grid)");
if (localDomTable) {
Polymer.dom(this.grid).appendChild(localDomTable);
}
this.grid.then(() => {
this.gridReady.emit(this.grid);
});
}
}
<!--
@license
Copyright (c) 2015 Vaadin Ltd.
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
-->
<link rel='import' href='./polymer.html'>
<script src="vaadin-grid.min.js"></script>
<style>
vaadin-grid > table {
display: none;
}
.vaadin-grid-sidebar-popup {
background-color: #ffffff;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 6px 0 rgba(0,0,0,.12);
border-radius: 2px;
font-family: arial;
font-size: 12px;
transition: opacity 0.1s ease-in;
}
.vaadin-grid-sidebar-content > div {
padding: 16px 0;
}
.vaadin-grid-sidebar-content span:before {
content: url(img/ic_check_black_24px.svg);
opacity: 0.6;
display: inline-block;
padding: 0 20px;
}
.vaadin-grid-sidebar-content span div {
display: inline-block;
}
.vaadin-grid-sidebar-content .v-off:before {
visibility: hidden;
}
.vaadin-grid-sidebar-content span div {
display: inline-block;
vertical-align: super;
padding-right: 20px;
}
.vaadin-grid-sidebar-content table {
border-collapse: collapse;
border-top: 1px solid #E6E6E6;
border-bottom: 1px solid #E6E6E6;
min-width: 150px;
}
.vaadin-grid-sidebar-content .column-hiding-toggle {
cursor: pointer;
}
.vaadin-grid-sidebar-content .gwt-MenuItem-selected {
background: #eeeeee;
}
</style>
<!--
High quality data grid for showing large amounts of tabular data.
Simple usage (static HTML data source):
```html
<vaadin-grid>
<table>
<colgroup>
<col name="firstName">
<col name="lastName">
<col name="email">
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Progress</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jonathan</td>
<td>Doe</td>
<td>jonathan.doe@example.com</td>
</tr>
<tr>
<td>Jane</td>
<td>Smith</td>
<td>jane.smith@example.com</td>
</tr>
</tbody>
</table>
</vaadin-grid>
```
### Styling
The grid uses `--primary-color` from [paper-styles](https://github.com/PolymerElements/paper-styles) as a highlight color. You can customize the color by defining your own primary default color.
```html
<style is="custom-style">
vaadin-grid {
--primary-color: red;
}
</style>
```
The following custom properties are available for styling:
Custom property | Description | Default
:----------------|:-------------|----------:
`--vaadin-grid-row-height` | Data row height | `48px`
`--vaadin-grid-header-row-height` | Header row height | `56px`
`--vaadin-grid-footer-row-height` | Footer row height | `56px`
`--vaadin-grid-selected-row-cell` | Mixin which applies to the cell elements of a selected row | {}
See the [demo](demo/index.html) for use case examples.
@element vaadin-grid
@demo demo/index.html
-->
<dom-module id="vaadin-grid">
<style>
/* Host styles */
:host {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
box-sizing: border-box;
font-family: inherit;
font-size: 13px;
font-weight: 400;
line-height: 1.1;
color: rgba(0, 0, 0, 0.87);
cursor: default;
transition: opacity 50ms;
white-space: nowrap;
position: relative;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
:host(.vaadin-grid-loading) {
height: 0;
opacity: 0;
transition: none;
}
:host > div {
height: 100%;
outline: none;
position: relative;
z-index: 0;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
}
/* Anim */
@keyframes vaadin-grid-spin-360 {
100% {
transform: rotate(360deg);
}
}
@-webkit-keyframes vaadin-grid-spin-360 {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/* Table wrapper */
.vaadin-grid-tablewrapper {
box-sizing: border-box;
overflow: hidden;
outline: none;
position: absolute;
z-index: 5;
}
.vaadin-grid-tablewrapper:before {
display: none;
}
.vaadin-grid-tablewrapper > table {
box-sizing: border-box;
display: block;
}
.vaadin-grid-loading-data .vaadin-grid-tablewrapper:before {
-webkit-animation: vaadin-grid-spin-360 400ms linear infinite;
animation: vaadin-grid-spin-360 400ms linear infinite;
border: 2px solid #03A9F4;
border-radius: 50%;
border-right-color: transparent;
border-top-color: transparent;
content: "";
display: block;
height: 16px;
left: 50%;
margin-left: -8px;
margin-top: -8px;
position: absolute;
top: 50%;
width: 16px;
}
/* Scroller styles */
.vaadin-grid-scroller {
box-sizing: border-box;
outline: none;
position: absolute;
z-index: 1;
}
.vaadin-grid-scroller-horizontal {
bottom: 0;
left: 0;
right: 0;
overflow-y: hidden;
-ms-overflow-y: hidden;
}
.vaadin-grid-scroller-vertical {
bottom: 0;
right: 0;
top: 0;
overflow-x: hidden;
-ms-overflow-x: hidden;
}
.vaadin-grid-horizontal-scrollbar-deco {
bottom: 0;
box-sizing: border-box;
left: 0;
position: absolute;
right: 0;
}
/* Grid body */
.vaadin-grid-body {
box-sizing: border-box;
display: block;
left: 0;
position: absolute;
top: 0;
z-index: 0;
}
:host(:not([selection-mode])) .vaadin-grid-body,
:host([selection-mode="single"]) .vaadin-grid-body {
cursor: pointer;
}
.vaadin-grid-body tr {
height: var(--vaadin-grid-row-height, 48px);
left: 0;
top: 0;
position: absolute;
}
:host ::content .vaadin-grid-spacer {
position: absolute;
border-bottom: 1px solid #e3e3e3;
z-index: 1;
}
:host ::content .vaadin-grid-spacer > td {
position: absolute;
padding: 0;
top: 0;
left: 0;
width: 100%;
}
.vaadin-grid-body td {
opacity: 0;
}
.vaadin-grid-row-has-data td {
border-bottom: 1px solid #e3e3e3;
opacity: 1;
}
.vaadin-grid-spacer td {
opacity: 1;
}
/* Row styles */
.vaadin-grid-row {
box-sizing: border-box;
display: block;
}
tbody:not(.touch):not(.scrolling) .vaadin-grid-row:hover td {
background-color: #eeeeee;
}
.vaadin-grid-row-selected td {
background-color: #f5f5f5;
@apply(--vaadin-grid-selected-row-cell);
}
/* Focus styles */
.vaadin-grid-row:after {
background-color: var(--primary-color, #03A9F4);
bottom: 0;
content: "";
height: 2px;
left: 0;
pointer-events: none;
position: absolute;
right: 0;
transition: all 0.16s ease-in-out;
-webkit-transform: scaleX(0.0);
transform: scaleX(0.0);
z-index: 1;
}
:focus .vaadin-grid-row-focused:after {
-webkit-transform: scaleX(1.0);
transform: scaleX(1.0);
}
:focus .vaadin-grid-row-focused {
-webkit-animation: v-grid-row-focused 820ms ease-in-out;
animation: v-grid-row-focused 820ms ease-in-out;
}
@-webkit-keyframes vaadin-grid-row-focused {
50% {
color: #03A9F4;
} 100% {
color: inherit;
}
}
@keyframes vaadin-grid-row-focused {
50% {
color: #03A9F4;
} 100% {
color: inherit;
}
}
/* Grid cell */
.vaadin-grid-cell {
-webkit-align-items: center;
align-items: center;
background-color: white;
box-sizing: border-box;
display: -webkit-inline-flex;
display: inline-flex;
height: inherit;
overflow: hidden;
transition: opacity 0.1s ease-in;
}
/* Grid header */
.vaadin-grid-header {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06),
0 2px 0 rgba(0, 0, 0, 0.075),
0 3px 0 rgba(0, 0, 0, 0.05),
0 4px 0 rgba(0, 0, 0, 0.015);
box-sizing: border-box;
display: block;
left: 0;
position: absolute;
top: 0;
z-index: 10;
padding-right: 2px;
}
.vaadin-grid-header tr {
color: rgba(0, 0, 0, 0.54);
font-size: 12px;
height: var(--vaadin-grid-header-row-height, 56px);
}
.vaadin-grid-header th {
font-weight: 500;
text-align: left;
}
.vaadin-grid-header-deco {
background-color: white;
border-left: 1px solid rgba(255, 255, 255, 0.3);
box-sizing: border-box;
position: absolute;
right: 0;
top: 0;
z-index: 1;
}
/* Sorting */
.vaadin-grid-header [class*="sort-"] {
font-weight: 500;
font-size: 12px;
color: rgba(0, 0, 0, 0.87);
position: relative;
}
.vaadin-grid-header [class*="sort-"]:after {
font-size: 8px;
padding-left: 8px;
width: 1em;
min-width: 12px;
display: inline-block;
}
.vaadin-grid-header .sort-asc:after {
content: url(img/arrow-up.svg) " " attr(sort-order);
}
.vaadin-grid-header .sort-desc:after {
content: url(img/arrow-down.svg) " " attr(sort-order);
}
/* Grid footer */
.vaadin-grid-footer {
bottom: 0;
box-sizing: border-box;
display: block;
left: 0;
position: absolute;
z-index: 10;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.vaadin-grid-footer td {
font-size: 12px;
font-weight: 500;
color: rgba(0, 0, 0, 0.56);
height: var(--vaadin-grid-footer-row-height, 56px);
}
.vaadin-grid-footer-deco {
bottom: 0;
box-sizing: border-box;
position: absolute;
right: 0;
z-index: 1;
}
.vaadin-grid-spacer-deco-container {
display: none;
}
/* Cell padding */
.vaadin-grid-header th,
.vaadin-grid-body td,
.vaadin-grid-footer td {
padding: 0 24px 0 24px;
}
.vaadin-grid-cell.last-frozen {
border-right: 1px solid #e3e3e3;
}
.vaadin-grid-cell.frozen {
position: relative;
z-index: 1;
}
/* Input styles */
input[type="checkbox"] {
position: absolute;
opacity: 0;
}
input[type="checkbox"] + label {
position: relative;
left: 0;
box-sizing: border-box;
display: block;
width: 18px;
height: 18px;
border: 2px solid #7a7a7a;
border-radius: 2px;
cursor: pointer;
transition: background-color 120ms, border-color 120ms;
}
input[type="checkbox"]:focus {
outline: none;
}
input[type="checkbox"] + label:after {
content: url(img/tick.svg);
position: absolute;
top: -1px;
left: -1px;
display: block;
width: 16px;
height: 17px;
transition: all 200ms;
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: 40% 80%;
transform-origin: 40% 80%;
}
input[type="checkbox"]:checked + label {
background-color: var(--primary-color, #03A9F4);
border-color: transparent;
}
input[type="checkbox"]:checked + label:after {
-webkit-transform: scale(1);
transform: scale(1);
}
input[type="checkbox"]:indeterminate + label:after {
content: "–";
font-family: arial;
font-weight: bold;
font-size: 14px;
line-height: 1;
text-align: center;
-webkit-transform: scale(1);
transform: scale(1);
transition: none;
}
/* Activation "splash" */
input[type="checkbox"] + label:before {
content: "";
position: absolute;
top: -13px;
left: -13px;
width: 41px;
height: 41px;
border-radius: 50%;
background-color: #666;
opacity: 0;
-webkit-transform: scale(0.8);
transform: scale(0.8);
transition: all 180ms cubic-bezier(0.75,.0,0.25,1);
}
input[type="checkbox"] + label:active:before {
transform: scale(1.1);
opacity: 0.15;
transition-duration: 80ms;
transition-property: all;
}
input[type="checkbox"]:checked + label:before {
background-color: var(--primary-color, #03A9F4);
}
#measureobject {
width: 100% !important;
height: 100%;
z-index: -1 !important;
pointer-events: none !important;
position: absolute !important;
left: -100% !important;
top: -100% !important;
opacity: 0 !important;
/* This is used to force a non-zero client height to the measure object. */
padding-bottom: 1px !important;
}
/* The following is a workaround to https://dev.vaadin.com/ticket/18376 */
.vaadin-grid-scroller[invisible]::-webkit-scrollbar {
border: none;
}
.vaadin-grid-scroller[invisible]::-webkit-scrollbar-thumb {
border-radius: 10px;
border: 4px solid transparent;
background: rgba(0,0,0,.3);
-webkit-background-clip: content-box;
background-clip: content-box;
}
.vaadin-grid-scroller-vertical[invisible]::-webkit-scrollbar-thumb {
min-height: 30px;
}
.vaadin-grid-scroller-horizontal[invisible]::-webkit-scrollbar-thumb {
min-width: 30px;
}
.vaadin-grid-sidebar {
z-index: 5;
position: absolute;
top: 2px;
pointer-events: none;
right: 0;
padding-right: 4px;
overflow: hidden;
width: 38px;
height: 38px;
}
.vaadin-grid-sidebar-button {
width: 56px;
height: 56px;
border: none;
background: none;
outline: none;
position: relative;
cursor: pointer;
pointer-events: all;
}
.vaadin-grid-sidebar-button::before {
content: "";
position: absolute;
left: 12px;
top: 10px;
width: 32px;
height: 32px;
border-radius: 50%;
background: #fff;
box-shadow: 0 0 10px 4px #fff;
}
.vaadin-grid-sidebar-button:after {
content: url(img/ic_view_column_black_24px.svg);
opacity: 0.4;
display: inline-block;
position:absolute;
top: 14px;
left: 16px;
width: 24px;
}
@keyframes vaadin-grid-sidebar-transition {
0% {
opacity: 0;
top: 48px;
}
100% {
opacity: 1;
top: 44px;
}
}
@-webkit-keyframes vaadin-grid-sidebar-transition {
0% {
opacity: 0;
top: 48px;
}
100% {
opacity: 1;
top: 44px;
}
}
</style>
<template>
<iframe id="measureobject" class="vaadin-grid"></iframe>
</template>
</dom-module>
<script>
Polymer({
is: 'vaadin-grid',
_grid: undefined,
properties: {
/**
* A function which is used for generating CSS class names for data cells.
*
* See the API documentation for the “cell” object for more details about
* the parameter of this function.
*
* #### Example:
* ```js
* grid.cellClassGenerator = function(cell) {
* if (cell.index == 2) {
* return "activity-" + cell.data.toLowerCase();
* }
* };
* ```
* @property {function} cellClassGenerator
* @type {function}
*/
cellClassGenerator: {
type: Function,
observer: '_cellClassGeneratorChanged'
},
/**
* Disables the grid.
*
* #### Declarative example:
* ```html
* <vaadin-grid disabled>...</vaadin-grid>
* ```
*
* @default false
* @type {boolean}
*/
disabled: {
type: Boolean,
observer: '_disabledChanged',
reflectToAttribute: true,
value: false
},
/**
* Object for controlling and accessing the header rows in the grid.
*
* See the API documentation for “header” for more details.
*
* @property {header} footer
* @type {header}
*/
header: {
type: Object,
readOnly: true,
value: function() {
var _this = this;
return {
getCell: function(rowIndex, columnId) {
return _this._grid.getStaticSection().getHeaderCell(rowIndex, columnId);
},
addRow: function(rowIndex, cellContent) {
_this._grid.getStaticSection().addHeader(rowIndex, cellContent);
},
removeRow: function(rowIndex) {
_this._grid.getStaticSection().removeHeader(rowIndex || 0);
},
setRowClassName: function(rowIndex, className) {
_this._grid.getStaticSection().setHeaderRowClassName(rowIndex, className);
},
get defaultRow() {
return _this._grid.getStaticSection().getDefaultHeader();
},
set defaultRow(rowIndex) {
_this._grid.getStaticSection().setDefaultHeader(rowIndex);
},
get hidden() {
return _this._grid.getStaticSection().isHeaderHidden();
},
set hidden(hidden) {
_this._grid.getStaticSection().setHeaderHidden(hidden);
},
get rowCount() {
return _this._grid.getStaticSection().getHeaderRowCount();
}
};
}
},
/**
* Object for controlling and accessing the footer rows in the grid.
*
* See the API documentation for “footer” for more details.
*
* @property {footer} footer
* @type {footer}
*/
footer: {
type: Object,
readOnly: true,
value: function() {
var _this = this;
return {
getCell: function(rowIndex, columnId) {
return _this._grid.getStaticSection().getFooterCell(rowIndex, columnId);
},
addRow: function(rowIndex, cellContent) {
_this._grid.getStaticSection().addFooter(rowIndex, cellContent);
},
removeRow: function(rowIndex) {
_this._grid.getStaticSection().removeFooter(rowIndex || 0);
},
setRowClassName: function(rowIndex, className) {
_this._grid.getStaticSection().setFooterRowClassName(rowIndex, className);
},
get hidden() {
return _this._grid.getStaticSection().isFooterHidden();
},
set hidden(hidden) {
_this._grid.getStaticSection().setFooterHidden(hidden);
},
get rowCount() {
return _this._grid.getStaticSection().getFooterRowCount();
}
};
}
},
/**
* The index of the last frozen columns in this grid. A frozen column will
* always stay visible in the grid viewport when the user scrolls the grid
* viewport horizontally.
*
* Setting the property to 0 means that no columns will be frozen,
* but the built-in selection checkbox column will still be frozen if
* it’s in use. Setting the count to -1 will unfreeze the selection
* column also.
*
* #### Declarative example:
* ```html
* <vaadin-grid frozen-columns="2">...</vaadin-grid>
* ```
*
* @default 0
* @type {number}
*/
frozenColumns: {
type: Number,
observer: '_applyFrozenColumns',
reflectToAttribute: true,
value: 0
},
/**
* An array or a function containing or returning items determining
* the row data in the grid (i.e. the data source).
*
* Implement the property as a function if you wish to provide data
* lazily to the grid, for example from a REST service, to get only the
* items that are necessary in the grid viewport.
*
* See the API documentation for "items function" for more details.
*
* For an in-memory list of items, use the `items` array property instead.
*
* In both options, at the end the grid expects to receive an array, which
* can contain either arrays, objects or primitive types.
*
* #### Examples:
* ```
* grid.items = [
* {
* firsName: "Jonathan",
* lastName: "Doe",
* email: "jonathan.doe@example.com"
* },
* {
* firstName: "Jane",
* lastName: "Smith",
* email: "jane.smith@example.com"
* }
* ];
* ```
* ```
* grid.items = function(params, callback) {
* callback(["foo", "bar"], 2);
* };
* ```
*
* @property {(Array<Object>|function)} items
* @type {(Array<Object>|function)}
*/
items: {
type: Object
},
/**
* The array of columns attached to the grid.
*
* See the API documentation for “column” for more details about the
* column objects.
*
* @property {Array<object>} columns
* @type {Array<object>}
*/
columns: {
type: Array,
notify: true
},
/**
* A function which is used for generating CSS class names for data rows.
*
* See the API documentation for the “row” object for more details about
* the parameter of this function.
*
* #### Example:
* ```js
* grid.rowClassGenerator = function(row) {
* var activity = row.data[2];
* return "activity-" + activity.toLowerCase();
* };
*```
*
* @property {function} rowClassGenerator
* @type {function}
*/
rowClassGenerator: {
type: Function,
observer: '_rowClassGeneratorChanged'
},
/**
* The row details generator is used for generating detail content for
* data rows. The details element is added directly under the row.
*
* #### Example:
* ```js
* grid.rowDetailsGenerator = function(rowIndex) {
* var detail = document.createElement("div");
* detail.textContent = "Row detail content for row " + rowIndex;
* return detail;
* };
*```
*
* @property {function} rowDetailsGenerator
* @type {function}
*/
rowDetailsGenerator: {
type: Function,
observer: '_rowDetailsGeneratorChanged'
},
/**
* Object for controlling and accessing the selected rows in the grid.
*
* See the API documentation for the “selection” object for more details.
*
* @property {selection} selection
* @type {selection}
* @default {}
*/
selection: {
type: Object,
readOnly: true,
value: function() {
var _this = this;
return {
select: function(index) {
_this._grid.getSelectionModel().select(index);
return _this;
},
deselect: function(index) {
_this._grid.getSelectionModel().deselect(index);
return _this;
},
clear: function() {
_this._grid.getSelectionModel().clear();
return _this;
},
selectAll: function() {
_this._grid.getSelectionModel().selectAll();
return _this;
},
selected: function(mapper, from, to) {
return _this._grid.getSelectionModel().selected(mapper, from, to);
},
deselected: function(mapper, from, to) {
return _this._grid.getSelectionModel().deselected(mapper, from, to);
},
get size() {
return _this._grid.getSelectionModel().size();
},
get mode() {
return _this._grid.getSelectionMode();
},
set mode(mode) {
_this._grid.setSelectionMode(mode);
}
};
}
},
/**
* An array defining the sorting of columns. The order of the objects in
* the array defines the order of sort (if the grid is sorted by
* multiple columns).
*
* See the API documentation for the “sort-order” object for more details.
*
* @property {Array<sort-order>}
* @type {Array<sort-order>}
*/
sortOrder: {
type: Array,
notify: true,
observer: '_sortOrderChanged'
},
/**
* Explicitly sets the number of records the `items` array/function
* provides for the grid to display.
*
* This may also be set indirectly by passing the value as the second
* parameter for data request callback function.
*
* @property {Number} size
* @type {Number}
*/
size: {
type: Number,
observer: '_sizeChanged'
},
/**
* Sets the height of the grid so that the specified amount of data rows
* is visible. Overrides any height specified in CSS.
*
* #### Declarative example:
* ```html
* <vaadin-grid visible-rows="5">...</vaadin-grid>
* ```
*
* @property {number} visibleRows
* @default 10
* @type {number}
*/
visibleRows: {
type: Number,
reflectToAttribute: true,
observer: '_visibleRowsChanged'
},
_currentItems: {
value: undefined
}
},
attributeChanged: function(name, type, value) {
if (name === 'selection-mode' && this.selection.mode != value) {
this.selection.mode = value;
}
},
listeners: {
/**
* A change in the sorting order.
*
* @event sort-order-changed
*/
/**
* A row is selected or deselected.
*
* @event selected-items-changed
*/
/**
* A change in the selection mode.
*
* @event selection-mode-changed
*/
'selection-mode-changed': '_onSelectionModeChange'
},
observers: [
'_columnsChanged(columns, columns.*)',
'_itemsChanged(items, items.*)',
],
_columnsChanged: function() {
this._grid.setColumns(this.columns);
this._applyFrozenColumns();
},
_itemsChanged: function(items) {
if (Array.isArray(items)) {
if (items != this._currentItems) {
this._currentItems = items;
this._grid.setDataSource(function(params, callback) {
var array = items.slice(params.index, params.index + params.count);
callback(array);
});
}
this.size = items.length;
this.refreshItems();
} else if (typeof items === 'function') {
this._grid.setDataSource(items);
} else {
throw new Error('Unknown items type: ' + items + '. Only arrays and functions are supported.');
}
},
_sizeChanged: function(size, oldSize) {
this._grid.sizeChanged(size, oldSize);
},
_onSelectionModeChange: function() {
this.serializeValueToAttribute(this.selection.mode, 'selection-mode');
},
_sortOrderChanged: function(sortOrder) {
this._grid.setSortOrder(sortOrder);
},
created: function() {
this._grid = new vaadin.elements.grid.GridElement();
},
ready: function() {
// hide until fully loaded
this.toggleClass('vaadin-grid-loading', true);
if (this.hasAttribute('selection-mode')) {
this.selection.mode = this.getAttribute('selection-mode');
}
if (this.colums) {
this._grid.setColumns(this.columns);
} else {
this.columns = this._grid.getColumns();
}
this._grid.init(this, Polymer.dom(this.root), this.$.measureobject);
Polymer.dom(this).observeNodes(function(info) {
info.addedNodes.forEach(function(node) {
if (node.tagName === 'TABLE') {
var size = this.size;
this._grid.setLightDomTable(node);
if (size) {
this.size = size;
}
this._columnsChanged();
}
}.bind(this));
});
},
_bindResizeListener: function() {
var _this = this;
this.$.measureobject.addEventListener('load', function() {
var defaultView = this.contentDocument.defaultView;
var prevW = -1;
var prevH = -1;
defaultView.addEventListener('resize', function(e) {
var newW = defaultView.innerWidth;
var newH = defaultView.innerHeight;
if (newW != prevW || newH != prevH) {
prevW = newW;
prevH = newH;
_this._grid.updateSize();
}
}.bind(this));
_this._grid.updateSize();
});
this.$.measureobject.src = 'about:blank';
},
attached: function() {
this._grid.setHeaderHeight(parseFloat(this.getComputedStyleValue('--vaadin-grid-header-row-height')) || 56);
this._grid.setFooterHeight(parseFloat(this.getComputedStyleValue('--vaadin-grid-footer-row-height')) || 56);
this._grid.setBodyHeight(parseFloat(this.getComputedStyleValue('--vaadin-grid-row-height')) || 48);
this._bindResizeListener();
this.then(function() {
this.toggleClass('vaadin-grid-loading', false);
}.bind(this));
},
/**
* Scrolls to a certain row, using user-specified scroll destination.
*
* Scrolling happens asynchronously, so this method returns a 'thenable'
* which can be used to be notified when the scrolling is finished.
*
* #### Example:
* ```js
* grid.scrollToRow(10, "end").then(function() {...});
* ```
*
* @param {number} index - Zero-based index of the row to scroll to.
* @param {string} scrollDestination - Desired destination placement of scrolled-to-row. Valid values are `any`, `start`, `middle` and `end`. Defaults to `any`.
* @return {vaadin-grid}
*/
scrollToRow: function(index, scrollDestination) {
this._grid.scrollToRow(index, scrollDestination);
return this;
},
/**
* Scrolls to the beginning of the grid.
*
* Scrolling happens asynchronously, so this method returns a 'thenable'
* which can be used to be notified when the scrolling is finished.
*
* #### Example:
* ```js
* grid.scrollToStart().then(function() {...});
* ```
*
* @return {vaadin-grid}
*/
scrollToStart: function() {
this._grid.scrollToStart();
return this;
},
/**
* Scrolls to the end of the grid.
*
* Scrolling happens asynchronously, so this method returns a 'thenable'
* which can be used to be notified when the scrolling is finished.
*
* #### Example:
* ```js
* grid.scrollToEnd().then(function() {...});
* ```
*
* @return {vaadin-grid}
*/
scrollToEnd: function() {
this._grid.scrollToEnd();
return this;
},
/**
* Adds a new column. Column is added at the end if `beforeColumn` is not defined.
*
* @param {column} column - Column object to be added.
* @param {string} beforeColumn - Index or id of the column before which the new column should be added.
*/
addColumn: function(column, beforeColumn) {
this._grid.addColumn(column, beforeColumn);
},
/**
* Removes a column with certain id
*
* @method removeColumn
* @param {string} id - Column to be removed.
*/
removeColumn: function(id) {
this._grid.removeColumn(id);
},
_rowClassGeneratorChanged: function(row) {
this._grid.setRowClassGenerator(row);
},
_cellClassGeneratorChanged: function(cell) {
this._grid.setCellClassGenerator(cell);
},
_disabledChanged: function(disabled) {
this._grid.setDisabled(disabled);
},
_applyFrozenColumns: function() {
if (this.columns && this.columns.length >= this.frozenColumns) {
this._grid.setFrozenColumns(this.frozenColumns);
}
},
_visibleRowsChanged: function(visibleRows) {
this._grid.setVisibleRows(visibleRows);
},
/**
* Executes a callback when the grid has finished any pending work.
*
* @method then
* @param {Function} callback
* @return {Promise}
*/
then: function(callback) {
return this._grid.then(callback);
},
_rowDetailsGeneratorChanged: function(rowDetailsGenerator) {
this._grid.setRowDetailsGenerator(rowDetailsGenerator);
},
/**
* Shows or hides row details for the row at the given index.
*
* @method setRowDetailsVisible
* @param {number} rowIndex
* @param {boolean} visible
*/
setRowDetailsVisible: function(rowIndex, visible) {
this._grid.setRowDetailsVisible(rowIndex, visible);
},
/**
* Clears the grid’s internal data cache, causing it to request the
* visible items in the grid viewport from the `items` property or the
* `datasource` function.
*
* Needs to be called whenever the data items are modified in some way
* (added, removed, updated, re-ordered etc.).
*
* @type {Function}
*/
refreshItems: function() {
this._grid.getDataSource().refreshItems();
},
/**
* Invokes the callback with row data of the provided row index as the
* parameter. If the row is not cached, it's fetched from the data source
* first.
*
* @method getItem
* @param {number} rowIndex - Index of the row.
* @param {Function} callback - Gets arguments (err, item) where item is the desired data item.
* @param {boolean} onlyCached - Only fetch cached rows (don't fall back to data source request).
*/
getItem: function(rowIndex, callback, onlyCached) {
this._grid.getItem(rowIndex, callback, onlyCached);
}
}); // End Polymer prototype
</script>
function VaadinGridImport(){var ub='',vb=0,wb='gwt.codesvr=',xb='gwt.hosted=',yb='gwt.hybrid',zb='VaadinGridImport',Ab='meta',Bb='name',Cb='gwt:property',Db='content',Eb='=',Fb=1,Gb='gwt:onPropertyErrorFn',Hb='Bad handler "',Ib='" for "gwt:onPropertyErrorFn"',Jb='gwt:onLoadErrorFn',Kb='" for "gwt:onLoadErrorFn"',Lb='user.agent',Mb='webkit',Nb='safari',Ob='msie',Pb=10,Qb=11,Rb='ie10',Sb=9,Tb='ie9',Ub=8,Vb='ie8',Wb='gecko',Xb='gecko1_8',Yb=2,Zb=3,$b=4,_b='Single-script hosted mode not yet implemented. See issue ',ac='http://code.google.com/p/google-web-toolkit/issues/detail?id=2079',bc='833D092803557BE5D6EF5989005448FB',cc=':1',dc=':',ec='DOMContentLoaded',fc=50;var j=ub,k=vb,l=wb,m=xb,n=yb,o=zb,p=Ab,q=Bb,r=Cb,s=Db,t=Eb,u=Fb,v=Gb,w=Hb,A=Ib,B=Jb,C=Kb,D=Lb,F=Mb,G=Nb,H=Ob,I=Pb,J=Qb,K=Rb,L=Sb,M=Tb,N=Ub,O=Vb,P=Wb,Q=Xb,R=Yb,S=Zb,T=$b,U=_b,V=ac,W=bc,X=cc,Y=dc,Z=ec,$=fc;var _=window,ab=document,bb,cb,db=j,eb={},fb=[],gb=[],hb=[],ib=k,jb,kb;if(!_.__gwt_stylesLoaded){_.__gwt_stylesLoaded={}}if(!_.__gwt_scriptsLoaded){_.__gwt_scriptsLoaded={}}function lb(){var b=false;try{var c=_.location.search;return (c.indexOf(l)!=-1||(c.indexOf(m)!=-1||_.external&&_.external.gwtOnLoad))&&c.indexOf(n)==-1}catch(a){}lb=function(){return b};return b}
function mb(){if(bb&&cb){bb(jb,o,db,ib)}}
function nb(){var b=document.getElementsByTagName(p);for(var c=k,d=b.length;c<d;++c){var e=b[c],f=e.getAttribute(q),g;if(f){if(f==r){g=e.getAttribute(s);if(g){var h,i=g.indexOf(t);if(i>=k){f=g.substring(k,i);h=g.substring(i+u)}else{f=g;h=j}eb[f]=h}}else if(f==v){g=e.getAttribute(s);if(g){try{kb=eval(g)}catch(a){alert(w+g+A)}}}else if(f==B){g=e.getAttribute(s);if(g){try{jb=eval(g)}catch(a){alert(w+g+C)}}}}}}
__gwt_isKnownPropertyValue=function(a,b){return b in fb[a]};__gwt_getMetaProperty=function(a){var b=eb[a];return b==null?null:b};function ob(a,b){var c=hb;for(var d=k,e=a.length-u;d<e;++d){c=c[a[d]]||(c[a[d]]=[])}c[a[e]]=b}
function pb(a){var b=gb[a](),c=fb[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(kb){kb(a,d,b)}throw null}
gb[D]=function(){var a=navigator.userAgent.toLowerCase();var b=ab.documentMode;if(function(){return a.indexOf(F)!=-1}())return G;if(function(){return a.indexOf(H)!=-1&&(b>=I&&b<J)}())return K;if(function(){return a.indexOf(H)!=-1&&(b>=L&&b<J)}())return M;if(function(){return a.indexOf(H)!=-1&&(b>=N&&b<J)}())return O;if(function(){return a.indexOf(P)!=-1||b>=J}())return Q;return j};fb[D]={'gecko1_8':k,'ie10':u,'ie8':R,'ie9':S,'safari':T};VaadinGridImport.onScriptLoad=function(a){VaadinGridImport=null;bb=a;mb()};if(lb()){alert(U+V);return}nb();try{var qb;ob([Q],W);ob([G],W+X);qb=hb[pb(D)];var rb=qb.indexOf(Y);if(rb!=-1){ib=Number(qb.substring(rb+u))}}catch(a){return}var sb;function tb(){if(!cb){cb=true;mb();if(ab.removeEventListener){ab.removeEventListener(Z,tb,false)}if(sb){clearInterval(sb)}}}
if(ab.addEventListener){ab.addEventListener(Z,function(){tb()},false)}var sb=setInterval(function(){if(/loaded|complete/.test(ab.readyState)){tb()}},$)}
VaadinGridImport();(function () {var $gwt_version = "0.0.0";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '833D092803557BE5D6EF5989005448FB';var h={3:1,4:1},aa={3:1,11:1},ba={3:1,13:1,11:1},ca={3:1,13:1,10:1,11:1},da={3:1,13:1,28:1,10:1,11:1},ea={3:1},fa={6:1,87:1,98:1},ga={105:1},ha={46:1,12:1,3:1,6:1,5:1},ia={14:1,12:1,3:1,6:1,5:1},ja={12:1,55:1,3:1,6:1,5:1},ka={12:1,56:1,3:1,6:1,5:1},la={12:1,57:1,3:1,6:1,5:1},ma={12:1,85:1,3:1,6:1,5:1},na={31:1,3:1,6:1,5:1},oa={12:1,86:1,3:1,6:1,5:1},pa={81:1,3:1,13:1,10:1,11:1},qa={16:1},ra={25:1},sa={84:1},ta={89:1,79:1},ua={184:1},va={104:1},wa={27:1,21:1,20:1,23:1,24:1,19:1,17:1},xa={27:1,21:1,
20:1,23:1,42:1,24:1,19:1,17:1},ya={27:1,21:1,20:1,113:1,23:1,24:1,19:1,17:1},Aa={90:1,15:1},Ba={27:1,21:1,20:1,23:1,137:1,24:1,19:1,17:1},Ca={27:1,21:1,20:1,112:1,23:1,42:1,24:1,19:1,17:1},Da={15:1,91:1},Ea={695:1,15:1},Fa={27:1,21:1,20:1,23:1,42:1,24:1,157:1,19:1,17:1},Ga={243:1,15:1},Ha={131:1,132:1},Ia={90:1,15:1,51:1,64:1},Ja={15:1,183:1},Ka={15:1,698:1},La={27:1,21:1,20:1,113:1,23:1,42:1,137:1,24:1,19:1,17:1,646:1},Ma={15:1,242:1,648:1,647:1},Na={62:1,3:1,6:1,5:1},Oa={243:1,27:1,15:1,21:1,20:1,
112:1,23:1,42:1,24:1,19:1,17:1},Pa={50:1,3:1,6:1,5:1},Qa={74:1,3:1,6:1,5:1},Ra={65:1},Sa={54:1},Ta={61:1},Ua={72:1,53:1},Va={3:1,61:1,245:1},Wa={3:1,65:1},Xa={3:1,54:1},Ya={3:1,6:1,5:1,60:1},_,Za,ab,bb=-1;function cb(){}function db(a,b){var c=$wnd;if(""===a)return c;var d=a.split(".");d[0]in c||!c.execScript||c.execScript("var "+d[0]);for(var e;d.length&&(e=d.shift());)c=c[e]=c[e]||!d.length&&b||{};return c}function eb(a){function b(){}b.prototype=a||{};return new b}
function fb(a,b){function c(){return a.apply(c,arguments)}if(c.__proto__)c.__proto__=b;else for(var d in b)c[d]=b[d];return c}function k(){}function q(a){var b=_,c;for(c in a)a[c].configurable=!0;Object.defineProperties(b,a)}function r(a,b,c){var d=Za,e,f=d[a],g=f instanceof Array?f[0]:null;f&&!g?_=f:(_=(e=b&&b.prototype,!e&&(e=Za[b]),eb(e)),_.Rf=c,_.constructor=_,!b&&(_.Sf=cb),d[a]=_);for(d=3;d<arguments.length;++d)arguments[d].prototype=_;g&&(_.Qf=g)}
function gb(){var a=Za[1],b=_,c;for(c in a)void 0===b[c]&&(b[c]=a[c])}Za={};!Array.isArray&&(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});function hb(a){return ib(jb(a))+"@"+(kb(a)>>>0).toString(16)}function lb(){}function mb(a,b){return nb(a)?a===b:ob(a)?(t(a),a===b):pb(a)?(t(a),a===b):qb(a)?a.bb(b):rb(a)?a===b:sb(a)===sb(b)}function jb(a){return nb(a)?tb:ob(a)?ub:pb(a)?vb:qb(a)?a.Qf:rb(a)?a.Qf:a.Qf||Array.isArray(a)&&v(wb,1)||wb}
function kb(a){return nb(a)?xb(a):ob(a)?w((t(a),a)):pb(a)?yb((t(a),a))?1231:1237:qb(a)?a.db():(rb(a),zb(a))}function Ab(a){return nb(a)?a:ob(a)?Bb((t(a),a)):pb(a)?Bb(yb((t(a),a))):qb(a)?a.eb():rb(a)?hb(a):Cb(a)}r(1,null,{},lb);_.bb=Db;_.cb=function(){return this.Qf};_.db=Eb;_.eb=function(){return hb(this)};_.toString=function(){return this.eb()};function Fb(){Fb=k;Gb=new lb}function Hb(a){a.i=Ib(Jb,h,703,0,0);a.backingJsObject=Gb}
function Kb(a){a.k&&(sb(a.backingJsObject)!==sb(Gb)&&a.qb(),a.i=null)}function Lb(a,b,c){var d,e,f,g;if(null==a.i){Mb();d=Ib(Jb,h,703,0,0);for(e=Nb(d.length,5)-1;0<=e;e--)if(null.Tf()||null.Tf()){d.length>=e+1&&d.splice(0,e+1);break}a.i=d}e=a.i;d=0;for(e=e.length;d<e;++d);e=(null==a.j&&(a.j=Ib(Ob,h,11,0,0)),a.j);f=0;for(g=e.length;f<g;++f)d=e[f],Lb(d,b,"\t"+c);(a=a.e)&&Lb(a,b,c)}function Pb(a,b){var c;c=ib(a.Qf);return null==b?c:c+": "+b}r(11,1,aa);_.ob=function(a){return Error(a)};_.pb=Qb;
_.qb=function(){var a,b;b=null==this.f?null:Rb(this.f).replace(new $wnd.RegExp("\n","g")," ");b=(a=ib(this.Qf),null==b?a:a+": "+b);a=this.ob(b);if(!("stack"in a))try{throw a;}catch(c){}this.backingJsObject=a;null!=a&&Sb(a,this);Mb()};_.eb=function(){return Pb(this,this.pb())};_.g=!1;_.k=!0;var Gb;r(13,11,ba);function Tb(){Hb(this);Kb(this);this.qb()}function Ub(a){Fb();Hb(this);this.f=a;Kb(this);this.qb()}r(10,13,ca,Ub);r(481,10,ca);r(482,481,ca);function Vb(){Vb=k;Fb();Wb=new lb}
function Xb(a){Vb();Hb(this);Kb(this);this.backingJsObject=a;null!=a&&Sb(a,this);this.f=(y(),null==a?"null":Ab(a));this.a="";this.b=a;this.a=""}r(100,482,{100:1,3:1,13:1,10:1,11:1},Xb);_.pb=function(){var a;null==this.c&&(a=sb(this.b)===sb(Wb)?null:this.b,this.d=null==a?"null":Yb(a)?null==a?null:a.name:nb(a)?"String":ib(jb(a)),this.a=this.a+": "+(Yb(a)?null==a?null:a.message:a+""),this.c="("+this.d+") "+this.a);return this.c};_.rb=function(){return sb(this.b)===sb(Wb)?null:this.b};var Wb;
function Cb(a){return a.toString?a.toString():"[JavaScriptObject]"}function Mb(){Mb=k;0<Error.stackTraceLimit&&(Error.stackTraceLimit=64)}r(675,1,{});r(483,675,{},function(){});function Zb(a){return v(a,1)}function Ib(a,b,c,d,e){a:{var f=Array(d),g;switch(e){case 14:case 15:g=0;break;case 16:g=!1;break;default:d=f;break a}for(var l=0;l<d;++l)f[l]=g;d=f}10!=e&&z(v(a,1),b,c,e,d);return d}function rb(a){return Array.isArray(a)&&a.Sf===cb}
function z(a,b,c,d,e){e.Qf=a;e.Rf=b;e.Sf=cb;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e}function $b(a,b){10!=(null==b.__elementTypeCategory$?10:b.__elementTypeCategory$)&&z(jb(b),b.Rf,b.__elementTypeId$,null==b.__elementTypeCategory$?10:b.__elementTypeCategory$,a);return a}function ac(a){null==a||Array.isArray(a);return a}function qb(a){return!Array.isArray(a)&&a.Sf===cb}function A(a,b){return null!=a&&(nb(a)?!!bc[b]:a.Rf?!!a.Rf[b]:ob(a)?!!cc[b]:pb(a)?!!dc[b]:!1)}
function pb(a){return"boolean"===typeof a}function ob(a){return"number"===typeof a}function Yb(a){return null!=a&&("object"===typeof a||"function"===typeof a)&&a.Sf!==cb}function nb(a){return"string"===typeof a}function sb(a){return null==a?null:a}function w(a){return Math.max(Math.min(a,2147483647),-2147483648)|0}var dc,cc,bc;function ec(a){var b;if(A(a,11))return a;b=a&&a.__java$exception;b||(b=new Xb(a),Mb());return b}r(193,13,ba);function fc(a){Fb();Hb(this);this.f=a;Kb(this);this.qb()}
r(345,193,ba,fc);function gc(){gc=k;hc=!1;ic=!0}function Bb(a){return y(),""+a}function yb(a){gc();return a}dc={3:1,375:1,6:1};var hc,ic;function jc(a){return kc(Rb((y(),$wnd.String.fromCharCode(a))).toLocaleUpperCase(),0)==a&&lc($wnd.String.fromCharCode(a),/[A-Z]/i)}function mc(a,b,c){if(!(0<=a&&1114111>=a))throw(new nc).backingJsObject;if(65536<=a)return b[c++]=55296+(a-65536>>10&1023)&65535,b[c]=56320+(a-65536&1023)&65535,2;b[c]=a&65535;return 1}
function oc(a){if(null==a.k)if(a.ef()){var b=a.c;b.ff()?a.k="["+b.j:b.ef()?a.k="["+b.cf():a.k="[L"+b.cf()+";";a.b=b.bf()+"[]";a.i=b.df()+"[]"}else{var b=a.f,c=a.d,c=c.split("/");a.k=pc(".",[b,pc("$",c)]);a.b=pc(".",[b,pc(".",c)]);a.i=c[c.length-1]}}function qc(a){oc(a);return a.b}function ib(a){oc(a);return a.k}function rc(a){oc(a);return a.i}function sc(){this.g=tc++;this.a=this.j=this.b=this.d=this.f=this.i=this.k=null}
function uc(a){var b;b=new sc;b.k="Class$"+(a?"S"+a:""+b.g);b.b=b.k;b.i=b.k;return b}function B(a){var b;b=uc(a);vc(a,b);return b}function D(a,b){var c;c=uc(a);vc(a,c);c.e=b?8:0;return c}function wc(){var a;a=uc(null);a.e=2;return a}function xc(a){var b;b=uc(a);b.j=a;b.e=1;return b}function v(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.af(b))}function pc(a,b){for(var c=0;!b[c]||""==b[c];)c++;for(var d=b[c++];c<b.length;c++)b[c]&&""!=b[c]&&(d+=a+b[c]);return d}
function vc(a,b){if(a){b.j=a;var c=b.ff()?null:Za[b.j];c?c.Qf=b:Za[a]=[b]}}r(194,1,{},sc);_.af=function(a){var b;b=new sc;b.e=4;1<a?b.c=v(this,a-1):b.c=this;return b};_.bf=function(){return qc(this)};_.cf=function(){return ib(this)};_.df=function(){return rc(this)};_.ef=function(){return 0!=(this.e&4)};_.ff=function(){return 0!=(this.e&1)};_.eb=function(){return(0!=(this.e&2)?"interface ":0!=(this.e&1)?"":"class ")+(oc(this),this.k)};_.e=0;_.g=0;var tc=1;
function yc(a){null==zc&&(zc=/^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/);if(!zc.test(a))throw(Fb(),new Ac('For input string: "'+a+'"')).backingJsObject;return parseFloat(a)}
function Bc(a){var b,c;if(null==a)throw(Fb(),new Ac("null")).backingJsObject;c=(y(),a).length;for(b=0<c&&(45==a.charCodeAt(0)||43==a.charCodeAt(0))?1:0;b<c;b++){var d=a.charCodeAt(b);if(-1==(48<=d&&58>d?d-48:97<=d&&97>d?d-97+10:65<=d&&65>d?d-65+10:-1))throw(Fb(),new Ac('For input string: "'+a+'"')).backingJsObject;}c=parseInt(a,10);b=-2147483648>c;if(isNaN(c))throw(Fb(),new Ac('For input string: "'+a+'"')).backingJsObject;if(b||2147483647<c)throw(Fb(),new Ac('For input string: "'+a+'"')).backingJsObject;
return c}function Cc(a){return ob(a)?(t(a),a):a.gf()}r(82,1,{3:1,82:1});var zc;cc={3:1,6:1,343:1,82:1};function nc(){Fb();Tb.call(this)}function E(a){Fb();Ub.call(this,a)}r(8,10,ca,nc,E);function Dc(){Fb();Tb.call(this)}function Ec(a){Fb();Ub.call(this,a)}r(28,10,da,Dc,Ec);function Fc(a){this.a=a}function F(a){var b,c;return-129<a&&128>a?(b=a+128,c=(Gc(),Hc)[b],!c&&(c=Hc[b]=new Fc(a)),c):new Fc(a)}r(97,82,{3:1,6:1,97:1,82:1},Fc);_.Mb=function(a){var b=this.a;a=a.a;return b<a?-1:b>a?1:0};_.gf=Ic;
_.bb=function(a){return A(a,97)&&a.a==this.a};_.db=Ic;_.eb=function(){return Bb(this.a)};_.a=0;function Jc(){Fb();Tb.call(this)}function Kc(a){Fb();Ub.call(this,a)}r(69,10,ca,Jc,Kc);_.ob=function(a){return new TypeError(a)};function Ac(a){Fb();E.call(this,a)}r(68,8,{3:1,13:1,68:1,10:1,11:1},Ac);function y(){y=k}function kc(a,b){return(y(),a).charCodeAt(b)}function Lc(a,b,c,d){y();a=d.Pf(a,b,c);return Mc(a,0,a.length)}function Nc(a,b){return a===b}function Oc(a,b){return(y(),a).indexOf(b)}
function lc(a,b){return b.test(a)}function Pc(a,b,c){c=Qc(c);return(y(),a).replace(new $wnd.RegExp(b,"g"),c)}function Rc(a,b,c){c=Qc(c);b=new $wnd.RegExp(b);return(y(),a).replace(b,c)}
function Sc(a,b){var c,d,e,f,g,l;c=new $wnd.RegExp(b,"g");g=Ib(tb,h,2,0,6);d=0;l=a;for(e=null;;)if(f=c.exec(l),null==f||""==l){g[d]=l;break}else g[d]=Tc(l,0,f.index),l=Tc(l,f.index+f[0].length,(y(),l).length),c.lastIndex=0,e==l&&(g[d]=l.substr(0,1),l=l.substr(1,l.length-1)),e=l,++d;if(0<(y(),a).length){for(c=g.length;0<c&&""==g[c-1];)--c;c<g.length&&(g.length=c)}return g}function Uc(a,b){return(y(),a).substr(b,a.length-b)}function Tc(a,b,c){return(y(),a).substr(b,c-b)}
function Vc(a){var b,c,d;c=(y(),a).length;for(d=0;d<c&&32>=a.charCodeAt(d);)++d;for(b=c;b>d&&32>=a.charCodeAt(b-1);)--b;return 0<d||b<c?a.substr(d,b-d):a}function Wc(a,b){y();return a==b?0:a<b?-1:1}function Xc(a,b){y();return null==b?!1:a==b?!0:a.length==b.length&&a.toLowerCase()==b.toLowerCase()}function Yc(a){y();var b;return 65536<=a?(b=56320+(a-65536&1023)&65535,$wnd.String.fromCharCode(55296+(a-65536>>10&1023)&65535)+(""+$wnd.String.fromCharCode(b))):$wnd.String.fromCharCode(a&65535)}
function Zc(a){try{return $c(a)}catch(b){b=ec(b);if(A(b,149))throw(new fc(a)).backingJsObject;throw b.backingJsObject;}}function Rb(a){y();return a}function Qc(a){var b;for(b=0;0<=(b=(y(),a).indexOf("\\",b));)36==a.charCodeAt(b+1)?a=a.substr(0,b)+"$"+Uc(a,++b):a=a.substr(0,b)+(""+Uc(a,++b));return a}
function Mc(a,b,c){var d,e;c=b+c;e=a.length;if(0>b)throw(new ad("fromIndex: "+b+" \x3c 0")).backingJsObject;if(c>e)throw(new ad("toIndex: "+c+" \x3e size "+e)).backingJsObject;if(c<b)throw(new ad("fromIndex: "+b+" \x3e toIndex: "+c)).backingJsObject;e="";for(d=b;d<c;)b=d+1E4<c?d+1E4:c,e+=$wnd.String.fromCharCode.apply(null,a.slice(d,b)),d=b;return e}bc={3:1,649:1,6:1,2:1};r(344,1,{},function(){});_.Ye=function(a,b){return Wc((y(),a).toLowerCase(),b.toLowerCase())};_.bb=Db;
function ad(a){Fb();Ec.call(this,a)}r(156,28,da,ad);function $c(a){bd(null!=a,"Null charset name");a=(y(),a).toLocaleUpperCase();if(Nc((cd(),dd).a,a))return dd;if(ed.a===a)return ed;if(fd.a===a)return fd;if(/^[A-Za-z0-9][\w-:\.\+]*$/.test(a))throw(new gd(a)).backingJsObject;throw(new hd(a)).backingJsObject;}r(87,1,{6:1,87:1});_.Mb=function(a){var b=this.a;a=a.a;return Wc((y(),b).toLowerCase(),a.toLowerCase())};_.bb=function(a){return a===this?!0:A(a,87)?this.a===a.a:!1};_.db=id;_.eb=Ic;
function hd(a){Fb();E.call(this,(y(),null==a?"null":a))}r(484,8,ca,hd);function gd(a){Fb();E.call(this,(y(),null==a?"null":a))}r(149,8,{3:1,13:1,10:1,11:1,149:1},gd);function jd(a,b,c,d,e){var f=0,g,l;sb(a)===sb(b)&&(a=a.slice(f,f+d),f=0);g=f;for(l=f+d;g<l;)f=g+1E4<l?g+1E4:l,d=f-g,g=a.slice(g,f),Array.prototype.splice.apply(b,[c,e?d:0].concat(g)),g=f,c+=d}function cd(){cd=k;fd=new kd;ed=new ld("ISO-LATIN-1");dd=new ld("ISO-8859-1")}r(98,87,fa);var dd,ed,fd;function ld(a){this.a=a}r(206,98,fa,ld);
_.Pf=function(a,b,c){var d,e;d=Ib(md,ea,182,c,15);for(e=0;e<c;++e)d[e]=a[b+e]&255;return d};function kd(){this.a="UTF-8"}r(426,98,fa,kd);
_.Pf=function(a,b,c){var d,e,f,g,l,m;for(f=d=0;f<c;){++d;e=a[b+f];if(128==(e&192))throw(new E("Invalid UTF8 sequence")).backingJsObject;if(0==(e&128))++f;else if(192==(e&224))f+=2;else if(224==(e&240))f+=3;else if(240==(e&248))f+=4;else throw(new E("Invalid UTF8 sequence")).backingJsObject;if(f>c)throw(new Ec("Invalid UTF8 sequence")).backingJsObject;}f=Ib(md,ea,182,d,15);for(l=g=m=0;l<c;){e=a[b+l++];0==(e&128)?(g=1,e&=127):192==(e&224)?(g=2,e&=31):224==(e&240)?(g=3,e&=15):240==(e&248)?(g=4,e&=7):
248==(e&252)&&(g=5,e&=3);for(;0<--g;){d=a[b+l++];if(128!=(d&192))throw(new E("Invalid UTF8 sequence at "+(b+l-1)+", byte\x3d"+(d>>>0).toString(16))).backingJsObject;e=e<<6|d&63}m+=mc(e,f,m)}return f};function zb(a){return a.$H||(a.$H=++nd)}var nd=0;function bd(a,b){if(!a)throw(new E((y(),b))).backingJsObject;}function od(a){if(!a)throw(new pd).backingJsObject;}function qd(a,b){if(0>a||a>=b)throw(new Ec("Index: "+a+", Size: "+b)).backingJsObject;}
function t(a){if(null==a)throw(new Jc).backingJsObject;}function rd(a,b){if(null==a)throw(new Kc((y(),b))).backingJsObject;}function sd(a,b){if(0>a||a>b)throw(new Ec("Index: "+a+", Size: "+b)).backingJsObject;}function td(a,b,c){if(0>a)throw(new Ec("fromIndex: "+a+" \x3c 0")).backingJsObject;if(b>c)throw(new Ec("toIndex: "+b+" \x3e size "+c)).backingJsObject;if(a>b)throw(new E("fromIndex: "+a+" \x3e toIndex: "+b)).backingJsObject;}function ud(a){if(!a)throw(new vd).backingJsObject;}
function G(a){t(a);return a}function wd(a,b){var c,d,e,f;a=(y(),null==a?"null":a);c=new xd;for(d=f=0;d<b.length;){e=a.indexOf("%s",f);if(-1==e)break;yd(c,a.substr(f,e-f));yd(c,b[d++]);f=e+2}yd(c,a.substr(f,a.length-f));if(d<b.length){c.a+=" [";for(yd(c,b[d++]);d<b.length;)c.a+=", ",yd(c,b[d++]);c.a+="]"}return c.a}function Sb(a,b){try{a.__java$exception=b}catch(c){}}function zd(){zd=k;Ad={};Bd={}}
function xb(a){zd();var b,c;b=":"+a;c=Bd[b];if(void 0!==c)return c;c=Ad[b];if(void 0===c){var d,e,f;c=0;e=(y(),a).length;f=e-4;for(d=0;d<f;)c=a.charCodeAt(d+3)+31*(a.charCodeAt(d+2)+31*(a.charCodeAt(d+1)+31*(a.charCodeAt(d)+31*c))),c|=0,d+=4;for(;d<e;)c=31*c+kc(a,d++);a=c|0}else a=c;256==Cd&&(Ad=Bd,Bd={},Cd=0);++Cd;return Bd[b]=a}var Ad,Cd=0,Bd,H=B(1),Ob=B(11);B(13);B(10);B(481);B(482);B(100);var wb=B(0);B(675);B(483);B(193);B(345);var vb=B(375);B(194);B(82);var ub=B(343);B(8);B(28);var Dd=B(97);
B(69);B(68);var tb=B(2);B(344);B(156);B(87);B(484);B(149);B(98);B(206);B(426);function Ed(a){a.o&&(a.u=a.p,a.n=null,a.o=!1,a.p=!1,a.q&&(a.q.lb(),a.q=null),a.u&&a.gb())}function Fd(a,b){var c=Gd();Ed(a);a.o=!0;a.p=!1;a.k=b;a.t=c;a.n=null;++a.r;Hd(a.j,Gd())}function Id(a,b){var c,d;c=a.r;d=b>=a.t+a.k;return a.p&&!d?(d=(b-a.t)/a.k,a.ib(a.fb(d)),a.o&&a.r==c):!a.p&&b>=a.t&&(a.p=!0,a.hb(),!a.o||a.r!=c)?!1:d?(a.o=!1,a.p=!1,a.gb(),!1):!0}
function Jd(){var a=(!Kd&&(Kd=Ld()?new Md:new Nd),Kd);this.j=new Od(this);this.s=a}r(115,1,{});_.fb=function(a){return(1+$wnd.Math.cos(3.141592653589793+3.141592653589793*a))/2};_.gb=function(){this.ib(this.fb(1))};_.hb=function(){this.ib(this.fb(0))};_.k=-1;_.o=!1;_.p=!1;_.r=-1;_.t=-1;_.u=!1;B(115);function Hd(a,b){Id(a.a,b)?a.a.q=a.a.s.kb(a.a.j,a.a.n):a.a.q=null}function Od(a){this.a=a}r(326,1,{},Od);_.jb=function(a){Hd(this,a)};B(326);r(692,1,{});var Kd;B(692);r(178,1,{178:1});B(178);
function Ld(){return!!$wnd.requestAnimationFrame&&!!$wnd.cancelAnimationFrame}function Md(){}function Pd(a,b){var c=Qd(function(){var b=Gd();a.jb(b)});return{id:$wnd.requestAnimationFrame(c,b)}}r(110,692,{},Md);_.kb=function(a,b){var c;c=Pd(a,b);return new Rd(c)};B(110);function Rd(a){this.a=a}r(640,178,{178:1},Rd);_.lb=function(){$wnd.cancelAnimationFrame(this.a.id)};B(640);function Nd(){this.a=new Sd;this.b=new Td(this)}r(111,692,{},Nd);
_.kb=function(a){a=new Ud(this,a);Vd(this.a,a);1==this.a.a.length&&Wd(this.b,16);return a};B(111);function Xd(a){a.f&&(++a.d,a.e?$wnd.clearInterval(a.f.a):$wnd.clearTimeout(a.f.a),a.f=null)}function Wd(a,b){if(0>b)throw(new E("must be non-negative")).backingJsObject;a.f&&Xd(a);a.e=!1;var c;c=Yd(a,a.d);c=$wnd.setTimeout(c,b);a.f=F(c)}function Yd(a,b){return Qd(function(){a.mb(b)})}r(49,1,{});_.mb=function(a){a==this.d&&(this.e||(this.f=null),this.nb())};_.d=0;_.e=!1;_.f=null;B(49);
function Td(a){this.a=a}r(641,49,{},Td);_.nb=function(){var a=this.a,b,c,d,e,f;b=Ib(Zd,{724:1,3:1,4:1},179,a.a.a.length,0);b=$d(a.a,b);c=new ae;e=0;for(f=b.length;e<f;++e)d=b[e],be(a.a,d),d.a.jb(c.a);0<a.a.a.length&&Wd(a.b,ce(5,16-(Gd()-c.a)))};B(641);function Ud(a,b){this.b=a;this.a=b}r(179,178,{178:1,179:1},Ud);_.lb=function(){var a=this.b;be(a.a,this);0==a.a.a.length&&Xd(a.b)};var Zd=B(179);r(7,1,{});B(7);function de(){this.a="alert"}r(560,7,{},de);B(560);function ee(){this.a="alertdialog"}
r(559,7,{},ee);B(559);function fe(){this.a="application"}r(561,7,{},fe);B(561);r(238,1,{});B(238);function ge(a){this.a=a}r(48,238,{},ge);B(48);function he(){this.a="article"}r(562,7,{},he);B(562);function ie(){this.a="banner"}r(563,7,{},ie);B(563);function je(){this.a="button"}r(564,7,{},je);B(564);function ke(){this.a="checkbox"}r(565,7,{},ke);B(565);function le(){this.a="columnheader"}r(566,7,{},le);B(566);function me(){this.a="combobox"}r(567,7,{},me);B(567);
function ne(){this.a="complementary"}r(568,7,{},ne);B(568);function oe(){this.a="contentinfo"}r(569,7,{},oe);B(569);function pe(){this.a="definition"}r(570,7,{},pe);B(570);function qe(){this.a="dialog"}r(571,7,{},qe);B(571);function re(){this.a="directory"}r(572,7,{},re);B(572);function se(){this.a="document"}r(573,7,{},se);B(573);function te(){this.a="form"}r(574,7,{},te);B(574);function ue(){this.a="grid"}r(576,7,{},ue);B(576);function ve(){this.a="gridcell"}r(575,7,{},ve);B(575);
function we(){this.a="group"}r(577,7,{},we);B(577);function xe(){this.a="heading"}r(578,7,{},xe);B(578);function ye(a){this.a=a.id}r(173,1,{720:1,173:1},ye);var ze=B(173);function Ae(){this.a="img"}r(579,7,{},Ae);B(579);function Be(){this.a="link"}r(580,7,{},Be);B(580);function Ce(){this.a="list"}r(583,7,{},Ce);B(583);function De(){this.a="listbox"}r(581,7,{},De);B(581);function Ee(){this.a="listitem"}r(582,7,{},Ee);B(582);function Fe(){this.a="log"}r(584,7,{},Fe);B(584);
function Ge(){this.a="main"}r(585,7,{},Ge);B(585);function He(){this.a="marquee"}r(586,7,{},He);B(586);function Ie(){this.a="math"}r(587,7,{},Ie);B(587);function Je(){this.a="menu"}r(592,7,{},Je);B(592);function Ke(){this.a="menubar"}r(588,7,{},Ke);B(588);function Le(){this.a="menuitem"}r(591,7,{},Le);B(591);function Me(){this.a="menuitemcheckbox"}r(589,7,{},Me);B(589);function Ne(){this.a="menuitemradio"}r(590,7,{},Ne);B(590);function Oe(){this.a="navigation"}r(593,7,{},Oe);B(593);
function Pe(){this.a="note"}r(594,7,{},Pe);B(594);function Qe(){this.a="option"}r(595,7,{},Qe);B(595);function Re(){this.a="presentation"}r(596,7,{},Re);B(596);r(44,238,{},function(a){this.a=a});B(44);function Se(){this.a="progressbar"}r(597,7,{},Se);B(597);function Te(){Te=k;Ue=new ge("aria-activedescendant")}var Ue;function Ve(){this.a="radio"}r(599,7,{},Ve);B(599);function We(){this.a="radiogroup"}r(598,7,{},We);B(598);function Xe(){this.a="region"}r(600,7,{},Xe);B(600);
function Ye(){Ye=k;Ze=new ee;$e=new de;af=new fe;bf=new he;cf=new ie;df=new je;ef=new ke;ff=new le;gf=new me;hf=new ne;jf=new oe;kf=new pe;lf=new qe;mf=new re;nf=new se;of=new te;pf=new ve;qf=new ue;rf=new we;sf=new xe;tf=new Ae;uf=new Be;vf=new De;wf=new Ee;xf=new Ce;yf=new Fe;zf=new Ge;Af=new He;Bf=new Ie;Cf=new Ke;Df=new Me;Ef=new Ne;Ff=new Le;Gf=new Je;Hf=new Oe;If=new Pe;Jf=new Qe;Kf=new Re;Lf=new Se;Mf=new We;Nf=new Ve;Of=new Xe;Pf=new Qf;Rf=new Sf;Tf=new Uf;Vf=new Wf;Xf=new Yf;Zf=new $f;ag=
new bg;cg=new dg;eg=new fg;gg=new hg;ig=new jg;kg=new lg;mg=new ng;og=new pg;qg=new rg;sg=new tg;ug=new vg;wg=new xg;yg=new zg;I=new Ag;J(I,"region",Of);J(I,"alert",$e);J(I,"dialog",lf);J(I,"alertdialog",Ze);J(I,"application",af);J(I,"document",nf);J(I,"article",bf);J(I,"banner",cf);J(I,"button",df);J(I,"checkbox",ef);J(I,"gridcell",pf);J(I,"columnheader",ff);J(I,"group",rf);J(I,"combobox",gf);J(I,"complementary",hf);J(I,"contentinfo",jf);J(I,"definition",kf);J(I,"list",xf);J(I,"directory",mf);J(I,
"form",of);J(I,"grid",qf);J(I,"heading",sf);J(I,"img",tf);J(I,"link",uf);J(I,"listbox",vf);J(I,"listitem",wf);J(I,"log",yf);J(I,"main",zf);J(I,"marquee",Af);J(I,"math",Bf);J(I,"menu",Gf);J(I,"menubar",Cf);J(I,"menuitem",Ff);J(I,"menuitemcheckbox",Df);J(I,"option",Jf);J(I,"radio",Nf);J(I,"menuitemradio",Ef);J(I,"navigation",Hf);J(I,"note",If);J(I,"presentation",Kf);J(I,"progressbar",Lf);J(I,"radiogroup",Mf);J(I,"row",Tf);J(I,"rowgroup",Pf);J(I,"rowheader",Rf);J(I,"search",Xf);J(I,"separator",Zf);J(I,
"scrollbar",Vf);J(I,"slider",ag);J(I,"spinbutton",cg);J(I,"status",eg);J(I,"tab",kg);J(I,"tablist",gg);J(I,"tabpanel",ig);J(I,"textbox",mg);J(I,"timer",og);J(I,"toolbar",qg);J(I,"tooltip",sg);J(I,"tree",yg);J(I,"treegrid",ug);J(I,"treeitem",wg)}var $e,Ze,af,bf,cf,df,ef,ff,gf,hf,jf,kf,lf,mf,nf,of,qf,pf,rf,sf,tf,uf,xf,vf,wf,yf,zf,Af,Bf,Gf,Cf,Ff,Df,Ef,Hf,If,Jf,Kf,Lf,Nf,Mf,Of,I,Tf,Pf,Rf,Vf,Xf,Zf,ag,cg,eg,kg,gg,ig,mg,og,qg,sg,yg,ug,wg;function Uf(){this.a="row"}r(603,7,{},Uf);B(603);
function Qf(){this.a="rowgroup"}r(601,7,{},Qf);B(601);function Sf(){this.a="rowheader"}r(602,7,{},Sf);B(602);function Wf(){this.a="scrollbar"}r(604,7,{},Wf);B(604);function Yf(){this.a="search"}r(605,7,{},Yf);B(605);function $f(){this.a="separator"}r(606,7,{},$f);B(606);function bg(){this.a="slider"}r(607,7,{},bg);B(607);function dg(){this.a="spinbutton"}r(608,7,{},dg);B(608);function fg(){this.a="status"}r(609,7,{},fg);B(609);function lg(){this.a="tab"}r(612,7,{},lg);B(612);
function hg(){this.a="tablist"}r(610,7,{},hg);B(610);function jg(){this.a="tabpanel"}r(611,7,{},jg);B(611);function ng(){this.a="textbox"}r(613,7,{},ng);B(613);function pg(){this.a="timer"}r(614,7,{},pg);B(614);function rg(){this.a="toolbar"}r(615,7,{},rg);B(615);function tg(){this.a="tooltip"}r(616,7,{},tg);B(616);function zg(){this.a="tree"}r(619,7,{},zg);B(619);function vg(){this.a="treegrid"}r(617,7,{},vg);B(617);function xg(){this.a="treeitem"}r(618,7,{},xg);B(618);
function ae(){this.a=Gd()}r(228,1,{},ae);_.a=0;B(228);function Gd(){return Date.now?Date.now():(new Date).getTime()}r(651,1,{});B(651);function Bg(){Bg=k;Cg=$wnd}var Cg;function Dg(){Dg=k;Mb()}function Eg(a){Dg();$wnd.setTimeout(function(){throw a;},0)}function Fg(){0!=Gg&&(Gg=0);Hg=-1}var Gg=0,Ig=0,Hg=-1;function Jg(){Jg=k;Kg=new Lg}function Mg(a,b){a.a=Ng(a.a,[b,!1]);a.i||(a.i=!0,!a.e&&(a.e=new Og(a)),Pg(a.e,1),!a.g&&(a.g=new Qg(a)),Pg(a.g,50))}function Rg(a,b){a.c=Ng(a.c,[b,!1])}
function Lg(){}function Sg(a){return a.sb()}function Ng(a,b){!a&&(a=[]);a[a.length]=b;return a}function Tg(a,b){var c,d,e;d=0;for(e=a.length;d<e;d++){c=a[d];try{c[1]?c[0].sb()&&(b=Ng(b,c)):c[0].tb()}catch(f){if(f=ec(f),A(f,11))c=f,Dg(),Eg(A(c,100)?c.rb():c);else throw f.backingJsObject;}}return b}function Pg(a,b){function c(){Qd(Sg)(a)&&$wnd.setTimeout(c,b)}Jg();$wnd.setTimeout(c,b)}function Ug(a){Jg();var b=$wnd.setInterval(function(){!Qd(Sg)(a)&&$wnd.clearInterval(b)},30)}r(489,651,{},Lg);_.d=!1;
_.i=!1;var Kg;B(489);function Og(a){this.a=a}r(490,1,{},Og);_.sb=function(){this.a.d=!0;var a=this.a,b;a.a&&(b=a.a,a.a=null,!a.f&&(a.f=[]),Tg(b,a.f));if(a.f){b=a.f;var c,d,e,f,g,l;g=b.length;if(0==g)b=null;else{c=!1;for(d=new ae;16>Gd()-d.a;){e=!1;for(f=0;f<g;f++)if(l=b[f])e=!0,l[0].sb()||(b[f]=null,c=!0);if(!e)break}if(c){c=[];for(f=0;f<g;f++)b[f]&&(c[c.length]=b[f]);b=0==c.length?null:c}}a.f=b}this.a.d=!1;a=this.a;return this.a.i=!!a.a||!!a.f};B(490);function Qg(a){this.a=a}r(491,1,{},Qg);
_.sb=function(){this.a.d&&Pg(this.a.e,1);return this.a.i};B(491);function Vg(a){return Wg((K(),a))}function Xg(a,b){return(K(),M).Ib(a,b)}function Yg(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function Zg(a){var b;(b=Wg((K(),a)))&&b.removeChild(a)}function $g(a,b){var c;b=ah(b);c=a.className||"";-1==bh(c,b)&&(0<(y(),c).length?a.className=c+" "+b||"":a.className=b||"")}function ch(a){return(K(),M).Db(a)+((a.offsetHeight||0)|0)}function dh(a){return(K(),M).Cb(a)}
function eh(a){return(K(),M).Db(a)}function fh(a){return gh((K(),a))}function hh(a,b){return parseInt(a[b])|0}function ih(a,b){return null==a[b]?null:String(a[b])}function jh(a){return(K(),M).Gb(a)}function kh(a){return(K(),M).Hb(a)}function lh(a,b){b=ah(b);return-1!=bh(a.className||"",b)}function mh(a,b){var c,d,e,f;b=ah(b);f=a.className||"";d=bh(f,b);-1!=d&&(c=Vc((y(),f).substr(0,d)),d=Vc(Uc(f,d+b.length)),0==c.length?e=d:0==d.length?e=c:e=c+" "+d,a.className=e||"")}
function nh(a,b){a.className=b||""}function oh(a,b){(K(),M).Jb(a,b)}function bh(a,b){var c,d,e;for(c=(y(),a).indexOf(b);-1!=c;){if(0==c||32==a.charCodeAt(c-1))if(d=c+b.length,e=a.length,d==e||d<e&&32==a.charCodeAt(d))break;c=a.indexOf(b,c+1)}return c}function ph(a){var b;try{b=!!a&&!!a.nodeType}catch(c){b=!1}return b?!!a&&1==a.nodeType:!1}function ah(a){return a=Vc(a)}function K(){K=k;M=0==bb?new qh:new rh}function gh(a){for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}
function sh(a){for(a=a.nextSibling;a&&1!=a.nodeType;)a=a.nextSibling;return a}function Wg(a){(a=a.parentNode)&&1==a.nodeType||(a=null);return a}function th(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a}function uh(a){K();return a|0}r(105,1,ga);_.ub=function(a,b){var c=a.createElement("BUTTON");c.type=b;return c};_.xb=function(a){return a.button|0};_.yb=function(a){return a.currentTarget};
_.Cb=function(a){for(var b=0,c=a;c.offsetParent;)b-=c.scrollLeft,c=c.parentNode;for(;a;)b+=a.offsetLeft,a=a.offsetParent;return uh(b)};_.Db=function(a){for(var b=0,c=a;c.offsetParent;)b-=c.scrollTop,c=c.parentNode;for(;a;)b+=a.offsetTop,a=a.offsetParent;return uh(b)};_.Eb=function(){return 0};_.Fb=function(){return 0};_.Gb=function(a){return uh(a.scrollLeft||0)};_.Hb=function(a){return a.tabIndex};_.Jb=function(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);null!=b&&a.appendChild(a.ownerDocument.createTextNode(b))};
_.Kb=function(a,b){a.scrollLeft=b};_.Lb=function(a){return a.outerHTML};var M;B(105);r(680,105,ga);_.vb=function(a,b){var c=a.createEvent("HTMLEvents");c.initEvent(b,!1,!0);return c};_.wb=function(a,b){a.dispatchEvent(b)};_.xb=function(a){a=a.button;return 1==a?4:2==a?2:1};_.zb=function(a){return a.relatedTarget};_.Ab=function(a){return a.target};_.Bb=function(a){a.preventDefault()};_.Ib=function(a,b){return a.contains(b)};_.Jb=function(a,b){a.textContent=b||""};B(680);function qh(){K()}
function vh(){var a=/rv:([0-9]+)\.([0-9]+)(\.([0-9]+))?.*?/.exec(navigator.userAgent.toLowerCase());return a&&3<=a.length?1E6*parseInt(a[1])+1E3*parseInt(a[2])+parseInt(5<=a.length&&!isNaN(a[4])?a[4]:0):-1}r(533,680,ga,qh);_.zb=function(a){return(a=a.relatedTarget)?a:null};
_.Cb=function(a){var b=wh(a.ownerDocument);Element.prototype.getBoundingClientRect?a=a.getBoundingClientRect().left+b.scrollLeft|0:(b=a.ownerDocument,a=b.getBoxObjectFor(a).screenX-b.getBoxObjectFor(b.documentElement).screenX);return a};_.Db=function(a){var b=wh(a.ownerDocument);Element.prototype.getBoundingClientRect?a=a.getBoundingClientRect().top+b.scrollTop|0:(b=a.ownerDocument,a=b.getBoxObjectFor(a).screenY-b.getBoxObjectFor(b.documentElement).screenY);return a};
_.Eb=function(a){a=$wnd.getComputedStyle(a.documentElement,null);return null==a?0:parseInt(a.marginLeft,10)+parseInt(a.borderLeftWidth,10)};_.Fb=function(a){a=$wnd.getComputedStyle(a.documentElement,null);return null==a?0:parseInt(a.marginTop,10)+parseInt(a.borderTopWidth,10)};_.Gb=function(a){var b;b=vh();return-1!=b&&1009E3<=b||"rtl"!=a.ownerDocument.defaultView.getComputedStyle(a,null).direction?uh(a.scrollLeft||0):uh(a.scrollLeft||0)-(((a.scrollWidth||0)|0)-(a.clientWidth|0))};
_.Ib=function(a,b){return a===b||!!(a.compareDocumentPosition(b)&16)};_.Kb=function(a,b){var c;c=vh();-1!=c&&1009E3<=c||"rtl"!=a.ownerDocument.defaultView.getComputedStyle(a,null).direction||(b+=((a.scrollWidth||0)|0)-(a.clientWidth|0));a.scrollLeft=b};_.Lb=function(a){var b=a.ownerDocument;a=a.cloneNode(!0);b=b.createElement("DIV");b.appendChild(a);outer=b.innerHTML;a.innerHTML="";return outer};B(533);r(681,680,ga);_.ub=function(a,b){var c=a.createElement("BUTTON");c.setAttribute("type",b);return c};
_.yb=function(a){return a.currentTarget||$wnd};
_.Cb=function(a){var b;if(b=a.getBoundingClientRect&&a.getBoundingClientRect())a=b.left+jh(a.ownerDocument.body);else if(null==a.offsetLeft)a=0;else{b=0;var c=a.ownerDocument,d=a.parentNode;if(d)for(;d.offsetParent;)b-=d.scrollLeft,"rtl"==c.defaultView.getComputedStyle(d,"").getPropertyValue("direction")&&(b+=d.scrollWidth-d.clientWidth),d=d.parentNode;for(;a;){b+=a.offsetLeft;if("fixed"==c.defaultView.getComputedStyle(a,"").position){b+=c.body.scrollLeft;break}(d=a.offsetParent)&&$wnd.devicePixelRatio&&
(b+=parseInt(c.defaultView.getComputedStyle(d,"").getPropertyValue("border-left-width")));if(d&&"BODY"==d.tagName&&"absolute"==a.style.position)break;a=d}a=b}return K(),a|0};
_.Db=function(a){var b;if(b=a.getBoundingClientRect&&a.getBoundingClientRect())a=b.top+((a.ownerDocument.body.scrollTop||0)|0);else if(null==a.offsetTop)a=0;else{b=0;var c=a.ownerDocument,d=a.parentNode;if(d)for(;d.offsetParent;)b-=d.scrollTop,d=d.parentNode;for(;a;){b+=a.offsetTop;if("fixed"==c.defaultView.getComputedStyle(a,"").position){b+=c.body.scrollTop;break}(d=a.offsetParent)&&$wnd.devicePixelRatio&&(b+=parseInt(c.defaultView.getComputedStyle(d,"").getPropertyValue("border-top-width")));if(d&&
"BODY"==d.tagName&&"absolute"==a.style.position)break;a=d}a=b}return K(),a|0};_.Gb=function(a){return Xc("body",(K(),a).tagName)||"rtl"!=a.ownerDocument.defaultView.getComputedStyle(a,"").direction?uh(a.scrollLeft||0):uh(a.scrollLeft||0)-(((a.scrollWidth||0)|0)-(a.clientWidth|0))};_.Hb=function(a){return"undefined"!=typeof a.tabIndex?a.tabIndex:-1};
_.Kb=function(a,b){!Xc("body",(K(),a).tagName)&&"rtl"==a.ownerDocument.defaultView.getComputedStyle(a,"").direction&&(b+=((a.scrollWidth||0)|0)-(a.clientWidth|0));a.scrollLeft=b};B(681);function rh(){K()}r(532,681,ga,rh);_.Ab=function(a){(a=a.target)&&3==a.nodeType&&(a=a.parentNode);return a};B(532);function xh(){var a=$doc;return(K(),a).createElement("div")}function yh(a){var b=$doc;return(K(),b).createElement(a)}function zh(){var a=$doc;return(K(),a).createElement("iframe")}
function Ah(){var a=$doc;return(K(),a).createElement("span")}function Bh(){var a=$doc;return(K(),a).createElement("tbody")}function Ch(){var a=$doc;return(K(),a).createElement("td")}function Dh(){var a=$doc;return(K(),a).createElement("thead")}function Eh(){var a=$doc;return(K(),a).createElement("tr")}function Fh(){var a=$doc;return(K(),a).createElement("table")}function Gh(){var a=$doc;!a.gwt_uid&&(a.gwt_uid=1);return"gwt-uid-"+a.gwt_uid++}function Hh(){var a=$doc;return(K(),M).Eb(a)}
function Ih(){var a=$doc;return(K(),M).Fb(a)}function wh(a){return"CSS1Compat"===a.compatMode?a.documentElement:a.body}function Jh(a){return(K(),M).Ab(a)}function Kh(a){return(K(),a).keyCode|0}function Lh(a){return(K(),a).touches}function Mh(a){return(K(),a).type}function Nh(a){(K(),M).Bb(a)}function Oh(a){return(K(),a).height}function Ph(a,b){return(K(),a)[b]}function Qh(a){return(K(),a).width}function Rh(a){return null!=a.f?a.f:""+a.g}function N(a,b){this.f=a;this.g=b}
function Sh(a,b){var c;t(b);c=a[":"+b];var d=z(v(H,1),h,1,5,[b]);if(!c)throw(new E(wd("Enum constant undefined: %s",d))).backingJsObject;return c}r(5,1,{3:1,6:1,5:1});_.Mb=function(a){return this.g-a.g};_.bb=Db;_.db=Eb;_.eb=function(){return null!=this.f?this.f:""+this.g};_.g=0;B(5);function Th(){Th=k;Uh=new Vh;Wh=new Yh;Zh=new $h;ai=new bi;ci=new di}r(46,5,ha);var Zh,Wh,ai,Uh,ci,ei=D(46,function(){Th();return z(v(ei,1),h,46,0,[Uh,Wh,Zh,ai,ci])});function Vh(){N.call(this,"NONE",0)}r(386,46,ha,Vh);
D(386,null);function Yh(){N.call(this,"DOTTED",1)}r(387,46,ha,Yh);D(387,null);function $h(){N.call(this,"DASHED",2)}r(388,46,ha,$h);D(388,null);function bi(){N.call(this,"HIDDEN",3)}r(389,46,ha,bi);D(389,null);function di(){N.call(this,"SOLID",4)}r(390,46,ha,di);D(390,null);function fi(){fi=k;gi=new hi;ii=new ji;ki=new li;mi=new ni;oi=new pi;qi=new ri;si=new ti;ui=new vi;wi=new xi;yi=new zi;Ai=new Bi;Ci=new Di;Ei=new Fi;Gi=new Hi;Ii=new Ji;Ki=new Li;Mi=new Ni;Oi=new Pi;Qi=new Ri}r(14,5,ia);
var ii,Oi,Mi,ki,mi,Qi,oi,qi,gi,si,ui,wi,Gi,Ii,yi,Ci,Ai,Ki,Ei,Si=D(14,function(){fi();return z(v(Si,1),h,14,0,[gi,ii,ki,mi,oi,qi,si,ui,wi,yi,Ai,Ci,Ei,Gi,Ii,Ki,Mi,Oi,Qi])});function hi(){N.call(this,"NONE",0)}r(391,14,ia,hi);D(391,null);function zi(){N.call(this,"TABLE_COLUMN_GROUP",9)}r(400,14,ia,zi);D(400,null);function Bi(){N.call(this,"TABLE_HEADER_GROUP",10)}r(401,14,ia,Bi);D(401,null);function Di(){N.call(this,"TABLE_FOOTER_GROUP",11)}r(402,14,ia,Di);D(402,null);
function Fi(){N.call(this,"TABLE_ROW_GROUP",12)}r(403,14,ia,Fi);D(403,null);function Hi(){N.call(this,"TABLE_CELL",13)}r(404,14,ia,Hi);D(404,null);function Ji(){N.call(this,"TABLE_COLUMN",14)}r(405,14,ia,Ji);D(405,null);function Li(){N.call(this,"TABLE_ROW",15)}r(406,14,ia,Li);D(406,null);function Ni(){N.call(this,"INITIAL",16)}r(407,14,ia,Ni);D(407,null);function Pi(){N.call(this,"FLEX",17)}r(408,14,ia,Pi);D(408,null);function Ri(){N.call(this,"INLINE_FLEX",18)}r(409,14,ia,Ri);D(409,null);
function ji(){N.call(this,"BLOCK",1)}r(392,14,ia,ji);D(392,null);function li(){N.call(this,"INLINE",2)}r(393,14,ia,li);D(393,null);function ni(){N.call(this,"INLINE_BLOCK",3)}r(394,14,ia,ni);D(394,null);function pi(){N.call(this,"INLINE_TABLE",4)}r(395,14,ia,pi);D(395,null);function ri(){N.call(this,"LIST_ITEM",5)}r(396,14,ia,ri);D(396,null);function ti(){N.call(this,"RUN_IN",6)}r(397,14,ia,ti);D(397,null);function vi(){N.call(this,"TABLE",7)}r(398,14,ia,vi);D(398,null);
function xi(){N.call(this,"TABLE_CAPTION",8)}r(399,14,ia,xi);D(399,null);function Ti(){Ti=k;Ui=new Vi;Wi=new Xi;Yi=new Zi;$i=new aj}r(55,5,ja);var $i,Wi,Yi,Ui,bj=D(55,function(){Ti();return z(v(bj,1),h,55,0,[Ui,Wi,Yi,$i])});function Vi(){N.call(this,"VISIBLE",0)}r(410,55,ja,Vi);D(410,null);function Xi(){N.call(this,"HIDDEN",1)}r(411,55,ja,Xi);D(411,null);function Zi(){N.call(this,"SCROLL",2)}r(412,55,ja,Zi);D(412,null);function aj(){N.call(this,"AUTO",3)}r(413,55,ja,aj);D(413,null);
function cj(){cj=k;dj=new ej;fj=new gj;hj=new ij;jj=new kj}r(56,5,ka);var hj,jj,fj,dj,lj=D(56,function(){cj();return z(v(lj,1),h,56,0,[dj,fj,hj,jj])});function ej(){N.call(this,"STATIC",0)}r(414,56,ka,ej);D(414,null);function gj(){N.call(this,"RELATIVE",1)}r(415,56,ka,gj);D(415,null);function ij(){N.call(this,"ABSOLUTE",2)}r(416,56,ka,ij);D(416,null);function kj(){N.call(this,"FIXED",3)}r(417,56,ka,kj);D(417,null);function mj(){mj=k;nj=new oj;pj=new qj;rj=new sj;tj=new uj}r(57,5,la);
var nj,pj,rj,tj,vj=D(57,function(){mj();return z(v(vj,1),h,57,0,[nj,pj,rj,tj])});function oj(){N.call(this,"CENTER",0)}r(418,57,la,oj);D(418,null);function qj(){N.call(this,"JUSTIFY",1)}r(419,57,la,qj);D(419,null);function sj(){N.call(this,"LEFT",2)}r(420,57,la,sj);D(420,null);function uj(){N.call(this,"RIGHT",3)}r(421,57,la,uj);D(421,null);function wj(){wj=k;xj=new yj;zj=new Aj}r(85,5,ma);var xj,zj,Bj=D(85,function(){wj();return z(v(Bj,1),h,85,0,[xj,zj])});function yj(){N.call(this,"CLIP",0)}
r(422,85,ma,yj);D(422,null);function Aj(){N.call(this,"ELLIPSIS",1)}r(423,85,ma,Aj);D(423,null);function Cj(){Cj=k;Dj=new Ej;Fj=new Gj;Hj=new Ij;Jj=new Kj;Lj=new Mj;Nj=new Oj;Pj=new Qj;Rj=new Sj;Tj=new Uj}r(31,5,na);var Rj,Hj,Jj,Pj,Tj,Nj,Fj,Lj,Dj,Vj=D(31,function(){Cj();return z(v(Vj,1),h,31,0,[Dj,Fj,Hj,Jj,Lj,Nj,Pj,Rj,Tj])});function Ej(){N.call(this,"PX",0)}r(377,31,na,Ej);D(377,null);function Gj(){N.call(this,"PCT",1)}r(378,31,na,Gj);D(378,null);function Ij(){N.call(this,"EM",2)}r(379,31,na,Ij);
D(379,null);function Kj(){N.call(this,"EX",3)}r(380,31,na,Kj);D(380,null);function Mj(){N.call(this,"PT",4)}r(381,31,na,Mj);D(381,null);function Oj(){N.call(this,"PC",5)}r(382,31,na,Oj);D(382,null);function Qj(){N.call(this,"IN",6)}r(383,31,na,Qj);D(383,null);function Sj(){N.call(this,"CM",7)}r(384,31,na,Sj);D(384,null);function Uj(){N.call(this,"MM",8)}r(385,31,na,Uj);D(385,null);function Wj(){Wj=k;Xj=new Yj;Zj=new ak}r(86,5,oa);var Zj,Xj,bk=D(86,function(){Wj();return z(v(bk,1),h,86,0,[Xj,Zj])});
function Yj(){N.call(this,"VISIBLE",0)}r(424,86,oa,Yj);D(424,null);function ak(){N.call(this,"HIDDEN",1)}r(425,86,oa,ak);D(425,null);function ck(a){return uh((K(),a).clientX||0)}function dk(a){return uh((K(),a).clientY||0)}function ek(a){return uh((K(),a).pageX||0)}function fk(a){return uh((K(),a).pageY||0)}r(665,1,{});_.eb=function(){return"An event type"};B(665);r(666,665,{});_.Pb=gk;_.Qb=function(){this.f=!1;this.g=null};_.f=!1;B(666);r(682,666,{});_.Ob=function(){return this.Rb()};var hk;B(682);
function ik(){ik=k;jk=new kk("blur",new lk)}function lk(){}r(635,682,{},lk);_.Nb=function(a){mk(a.a,null)};_.Rb=function(){return jk};var jk;B(635);r(684,682,{});B(684);r(685,684,{});B(685);function nk(){nk=k;ok=new kk("click",new pk)}function pk(){}r(555,685,{},pk);_.Nb=function(a){a.Sb(this)};_.Rb=function(){return ok};var ok;B(555);r(313,1,{});_.db=qk;_.eb=function(){return"Event type"};var rk=_.c=0;B(313);function sk(){this.c=++rk}r(34,313,{},sk);B(34);
function kk(a,b){var c;this.c=++rk;this.a=b;!hk&&(hk=new tk);c=hk.a[a];c||(c=new Sd,hk.a[a]=c);c.xf(this);this.b=a}r(63,34,{63:1},kk);B(63);r(683,682,{});B(683);r(689,683,{});B(689);function uk(){uk=k;vk=new kk("keydown",new wk)}function wk(){}r(549,689,{},wk);_.Nb=function(a){27==Kh(this.d)&&xk(a.a.f,!1)};_.Rb=function(){return vk};var vk;B(549);function yk(){yk=k;zk=new kk("mousedown",new Ak)}function Ak(){}r(643,685,{},Ak);_.Nb=function(a){var b=this.d;1==(K(),M).xb(b)&&Bk(a.b,this.d,O(a.a))};
_.Rb=function(){return zk};var zk;B(643);function tk(){this.a={}}r(621,1,{},tk);B(621);r(693,684,{});B(693);function Ck(){Ck=k;Dk=new kk("touchstart",new Ek)}function Ek(){}r(644,693,{},Ek);_.Nb=function(a){Bk(a.b,this.d,O(a.a))};_.Rb=function(){return Dk};var Dk;B(644);function Fk(){}function Gk(a){var b;Hk&&(b=new Fk,a.Vb(b))}r(620,666,{},Fk);_.Nb=function(a){a.Tb(this)};_.Ob=function(){return Hk};var Hk;B(620);function Ik(){}r(639,666,{},Ik);_.Nb=function(){Jk()};_.Ob=function(){return Kk};var Kk;
B(639);function Lk(a){this.a=a}function Mk(a,b){var c;Nk&&(c=new Lk(b),a.Vb(c))}r(512,666,{},Lk);_.Nb=function(a){a.Ub(this)};_.Ob=function(){return Nk};var Nk;B(512);function Ok(a,b,c){a=a.a;var d;if(!b)throw(new Kc("Cannot add a handler with a null type")).backingJsObject;if(!c)throw(new Kc("Cannot add a null handler")).backingJsObject;0<a.b?(d=new Pk(a,b,c),!a.a&&(a.a=new Sd),Vd(a.a,d)):(d=Qk(a,b,null),d.xf(c));return new Rk(new Sk(a,b,c))}
function Tk(a,b){var c,d;!b.f||b.Qb();d=b.Pb();b.g=a.b;try{var e=a.a,f,g,l,m,n,p;if(!b)throw(new Kc("Cannot fire null event")).backingJsObject;try{++e.b;n=(g=Uk(e,b.Ob(),null),g);f=null;for(p=e.c?n.Bf(n.ld()):n.Af();e.c?p.Gf():p.Vc();){m=e.c?p.Hf():p.Wc();try{b.Nb(m)}catch(C){if(C=ec(C),A(C,11))l=C,!f&&(f=new Vk),f.a.rf(l,f);else throw C.backingJsObject;}}if(f)throw(new Wk(f)).backingJsObject;}finally{if(--e.b,0==e.b){var u,x;if(e.a)try{for(x=new Xk(e.a);x.a<x.c.a.length;)u=Yk(x),u.tb()}finally{e.a=
null}}}}catch(C){C=ec(C);if(A(C,81))throw c=C,(new Zk(c.a)).backingJsObject;throw C.backingJsObject;}finally{null==d?(b.f=!0,b.g=null):b.g=d}}function $k(a){al.call(this,a,!1)}function al(a,b){this.a=new bl(b);this.b=a}r(58,1,{21:1},$k,al);_.Vb=function(a){Tk(this,a)};B(58);r(673,1,{});B(673);function cl(a,b,c,d){var e,f;e=Uk(a,b,c);e.Df(d)&&e.jf()&&(f=Q(a.d,b),f.sf(c),f.jf()&&dl(a.d,b))}function Qk(a,b,c){var d;d=Q(a.d,b);d||(d=new Ag,el(a.d,b,d));a=d.qf(c);a||(a=new Sd,d.rf(c,a));return a}
function Uk(a,b,c){a=Q(a.d,b);return a?(c=a.qf(c))?c:(fl(),fl(),gl):(fl(),fl(),gl)}r(468,673,{});_.b=0;_.c=!1;B(468);function bl(a){this.d=new Ag;this.c=a}r(469,468,{},bl);B(469);function Rk(a){this.a=a}r(526,1,{},Rk);B(526);
function Wk(a){Fb();var b,c;var d,e;c=a.ld();if(0==c)b=null;else{c=new hl(1==c?"Exception caught: ":c+" exceptions caught: ");b=!0;for(e=a.Kc();e.Vc();)d=e.Wc(),b?b=!1:c.a+="; ",yd(c,d.pb());b=c.a}c=a.jf()?null:a.Kc().Wc();Hb(this);this.e=c;this.f=b;Kb(this);this.qb();this.a=a;c=0;for(a=a.Kc();a.Vc();)b=a.Wc(),0!=c++&&(rd(b,"Cannot suppress a null exception."),bd(b!=this,"Exception can not suppress itself."),this.g||(null==this.j?this.j=z(Zb(Ob),h,11,0,[b]):this.j[this.j.length]=b))}r(81,10,pa,Wk);
B(81);function Zk(a){Fb();Wk.call(this,a)}r(191,81,pa,Zk);B(191);function il(a){a=ih(a,"dir");return Xc("rtl",a)?(jl(),kl):Xc("ltr",a)?(jl(),ll):(jl(),ml)}function jl(){jl=k;kl=new nl("RTL",0);ll=new nl("LTR",1);ml=new nl("DEFAULT",2)}function nl(a,b){N.call(this,a,b)}r(106,5,{106:1,3:1,6:1,5:1},nl);var ml,ll,kl,ol=D(106,function(){jl();return z(v(ol,1),h,106,0,[kl,ll,ml])});
function pl(a){var b,c,d,e,f,g;if(isNaN(a))return ql(),rl;if(-9223372036854775808>a)return ql(),sl;if(0x7fffffffffffffff<=a)return ql(),tl;d=!1;0>a&&(d=!0,a=-a);c=0;17592186044416<=a&&(c=w(a/17592186044416),a-=17592186044416*c);b=0;4194304<=a&&(b=w(a/4194304),a-=4194304*b);a={l:w(a),m:b,h:c};d&&(e=~a.l+1&4194303,f=~a.m+(0==e?1:0)&4194303,g=~a.h+(0==e&&0==f?1:0)&1048575,a.l=e,a.m=f,a.h=g);return a}function ql(){ql=k;tl={l:4194303,m:4194303,h:524287};sl={l:0,m:0,h:524288};rl={l:0,m:0,h:0}}
var tl,sl,rl;function ul(a){if(-17592186044416<a&&17592186044416>a)a=0>a?$wnd.Math.ceil(a):$wnd.Math.floor(a);else{a=pl(a);var b;b=a.h;a=0==b?a.l+4194304*a.m:1048575==b?a.l+4194304*a.m-17592186044416:a}return a}function vl(a){return"number"===typeof a?a|0:a.l|a.m<<22}function wl(){wl=k}r(248,1,{},function(){});B(248);function xl(){this.a=this.Wb();this.b=this.Xb();this.c=this.Yb();this.d=this.Zb();this.e=this.$b();this.f=this._b();this.ac();this.g=this.ac()}r(102,1,{102:1});_.a=!1;_.b=!1;_.c=!1;
_.d=!1;_.e=!1;_.f=!1;_.g=!1;B(102);function yl(){xl.call(this)}r(495,102,{102:1},yl);_.Wb=zl;_.Xb=zl;_.Yb=zl;_.Zb=Al;_.$b=zl;_._b=zl;_.ac=zl;_.eb=Bl;B(495);function Cl(){xl.call(this)}r(496,102,{102:1},Cl);_.Wb=zl;_.Xb=zl;_.Yb=zl;_.Zb=zl;_.$b=zl;_._b=zl;_.ac=Al;_.eb=Bl;B(496);function Dl(a,b){a.e=b;a.bc();return gc(),gc(),ic}function El(a){a=a.e;a=null!=a?0!=(jb(a).e&4)?a:z(Zb(H),h,1,5,[a]):Ib(H,h,1,0,5);a=0<a.length?a[0]:null;return null!=a?a:null}function Fl(){this.e=Ib(H,h,1,0,5)}r(16,1,qa);
_.bc=function(){throw(new Ub("You have to override the adequate method to handle this action, or you have to override 'public void f()' to avoid this error")).backingJsObject;};_.cc=function(a){return Dl(this,a)};var Gl=B(16),Hl;function Il(){Il=k;Jl=1==bb?new Cl:new yl;Kl=new Ll;Ml=$doc;Nl();Ol();Pl=/<([\w:-]+)/;Ql();Rl=(Bg(),Cg)}function Sl(a){a.c=Ib(wb,h,0,0,2);a.d=[]}
function Tl(a){var b;Il();var c,d;if(null!=a){if(nb(a))return Ul(a,Ml);if(A(a,25))return a;if(A(a,16))return new Vl(null.Tf());if(Wl(a))return new Vl(a);if(A(a,79))return new Vl(qb(a)?a.dc():a);if(A(a,24)){a=new Xl(z(v(H,1),h,1,5,[a]));b=[];for(c=new Yl(a);c.b<c.d.ld();)a=(od(c.b<c.d.ld()),c.d.yf(c.c=c.b++)),Yb(a)?Zl(b,a):A(a,24)&&Zl(b,O(a.zc()));return new $l(b)}if(Yb(a)){if(am(a))return b=new bm(a),Dl(b,b.e),new $l([]);if(!cm(a,"alert")&&!Wl(a)&&dm(a)){b=a;a=[];for(c=0;c<b.length;c++)(d=null!=b[c]?
Object(b[c]):null)&&Zl(a,d);return new $l(a)}if(b=Object.prototype.toString.call(a),"[object HTMLCollection]"==b||"[object NodeList]"==b||"object"==typeof a&&a.length&&a[0]&&a[0].tagName?!0:!1)return new em(a);cm(a,"currentTarget")&&(a=(K(),M).yb(a));return new Vl(a)}throw(new Ub("Error: GQuery.$(Object o) could not wrap the type : "+ib(jb(a))+" "+a)).backingJsObject;}return new $l([])}
function Ul(a,b){Il();var c;c=null;var d;if(null==a||0==Rb(c=Vc(a)).length)d=new $l([]);else if(Nc((y(),c).substr(0,1),"\x3c")){c=b&&Wl(b)?9==b.nodeType?b:b.ownerDocument:null;var e,f,g,l;if(e=Pl.exec(a)){e=e[1];fm||(f=new gm(1,"\x3ctable\x3e","\x3c/table\x3e"),g=new gm(1,'\x3cselect multiple\x3d"multiple"\x3e',"\x3c/select\x3e"),l=new gm(3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"),fm={},hm(fm,"option",g),hm(fm,"optgroup",g),g=new gm(1,"\x3cfieldset\x3e","\x3c/fieldset\x3e"),
hm(fm,"legend",g),hm(fm,"thead",f),hm(fm,"tbody",f),hm(fm,"tfoot",f),hm(fm,"colgroup",f),hm(fm,"caption",f),f=new gm(2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"),hm(fm,"tr",f),hm(fm,"td",l),hm(fm,"th",l),l=new gm(2,"\x3ctable\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"),hm(fm,"col",l),l=new gm(1,"\x3cmap\x3e","\x3c/map\x3e"),hm(fm,"area",l));e=(y(),e).toLowerCase();e=im(fm,e);!e&&(e=(jm(),km));c=(K(),c).createElement("div");l=e.b+(""+Vc(a))+
e.a;c.innerHTML=l||"";for(e=e.c;0!=e--;)c=c.lastChild;c=Tl(c.childNodes);var m;l=c.c;f=0;for(g=l.length;f<g;++f)e=l[f],(m=lm(e))?mm(m):(d=Wg((K(),e)),d&&d.removeChild(e));d=c}else d=Tl(c.createTextNode(a))}else d=new nm,c=om((!pm&&(pm=new qm),pm),a,b?b:Ml),d.b=a,d.a=b?b:Ml,d=rm(d,c);return d}function sm(a){var b=z(v(tb,1),h,2,6,["vaadin-grid","style-scope"]),c,d,e,f,g,l;f=a.c;g=0;for(l=f.length;g<l;++g)if((e=f[g])&&1==e.nodeType)for(c=0,d=b.length;c<d;++c)a=b[c],$g(e,a)}
function tm(a){var b,c,d,e;e=[];a=a.c;c=0;for(d=a.length;c<d;++c){b=a[c];b=gh((K(),b));for(var f=e;b;)b&&um(f,z(Zb(wb),h,0,2,[b])),b=sh((K(),b))}return new $l(vm(e))}function wm(a,b){return xm(tm(a),b)}function ym(a,b,c){var d,e,f,g;e=a.c;f=0;for(g=e.length;f<g;++f)d=e[f],zm((!Am&&(Am=(!pm&&(pm=new qm),Bm(),Cm)),d),b,c);return a}
function Dm(a,b,c){var d=z(v(wb,1),h,0,2,[]),e,f,g,l,m,n;m=[];0==d.length&&(d=a.c);e=0;for(g=d.length;e<g;e++)for(a=d[e],9==a.nodeType&&(a=a.body),f=0,n=b.c.length;f<n;f++){l=Em(b,f);0<e&&(l=l.cloneNode(!0));switch(c){case 3:Zl(m,a.insertBefore(l,a.firstChild));break;case 1:Zl(m,a.appendChild(l));break;case 0:Zl(m,a.parentNode.insertBefore(l,a.nextSibling));break;case 2:Zl(m,a.parentNode.insertBefore(l,a))}Fm()}Gm(m)>=b.c.length&&rm(b,m)}
function xm(a,b){var c,d;d="";for(c=0;c<b.length;c++)d+=0<c?", "+b[c]:b[c];c=d;d=(!pm&&(pm=new qm),pm);var e=a.d,f=d.a,g,l,m,n,p,u,x,C,L,P;P=[];if(0!=(y(),c).length){p=null;L=new Vk;m=new Vk;u=0;for(x=e.length;u<x;u++)g=e[u],g==(Il(),Rl)||g==Ml||null==g.nodeName||Xc("html",g.nodeName)||(m.a.rf(g,m),f?(C=Wg((K(),g)))?L.a.nf(C)||L.a.rf(C,L):(p||(p=xh(),L.a.rf(p,L)),C=p,C.appendChild(g)):0==L.a.ld()&&Hm(L,Ml));for(e=(l=(new Im(L.a)).a.pf().Kc(),new Jm(l));e.a.Vc();)for(g=(n=e.a.Wc(),n.If()),u=om(d,c,
g),g=0,f=u.length;g<f;g++)l=u[g],null!=m.a.sf(l)&&um(P,z(v(wb,1),h,0,2,[l]));p&&(p.innerHTML="")}return Km(a,P,c)}function Lm(a,b){var c,d,e,f,g,l,m,n,p,u,x;c=[];u=0;for(x=b.length;u<x;++u)for(p=b[u],l=a.c,m=0,n=l.length;m<n;++m)for(d=l[m],e=Ul(p,d).c,f=0,g=e.length;f<g;++f)d=e[f],um(c,z(v(wb,1),h,0,2,[d]));return Km(a,vm(c),b[0])}function Em(a,b){var c;c=a.c.length;return 0<=b&&b<c?a.c[b]:0>b&&0<=c+b?a.c[c+b]:null}function Mm(a){0==a.c.length?a="":(a=Em(a,0),a=(K(),a).innerHTML);return a}
function Nm(a){var b,c,d,e;e=[];a=a.c;c=0;for(d=a.length;c<d;++c)b=a[c],(b=Wg((K(),b)))&&um(e,z(v(wb,1),h,0,2,[b]));return new $l(vm(e))}function Om(a){var b,c,d,e,f;f=[];a=a.c;c=0;for(d=a.length;c<d;++c)for(b=a[c],e=0,b=b.parentNode;b&&b!=Ml;)um(f,z(v(wb,1),h,0,2,[b])),b=b.parentNode,++e;return new $l(vm(f))}function Km(a,b,c){b=new $l(b);b.b=c;b.a=a.a;return b}
function rm(a,b){var c,d;if(b){c=a.d;var e,f,g;e=[];for(d in c)c.hasOwnProperty(d)&&"__gwt_ObjectId"!=d&&"$H"!=d&&e.push(String(d));d=Ib(tb,h,2,e.length,6);for(f=0;f<e.length;f++)d[f]=e[f];f=0;for(g=d.length;f<g;++f)e=d[f],delete c[e];d=b.length;a.c=Ib(wb,h,0,d,2);for(c=0;c<d;c++)a.c[c]=b[c],um(a.d,z(v(wb,1),h,0,2,[b[c]]))}return a}function Pm(a,b,c){var d,e;e=[];d=a.c.length;for((-1==c||c>d)&&(c=d);b<c;b++)Zl(e,Em(a,b));return new $l(e)}
function Qm(a){var b,c,d,e,f;f="";b=a.c;c=0;for(d=b.length;c<d;++c)if(a=b[c],Rl!=a){try{e=a&&"HTML"!==(a&&Wl(a)?9==a.nodeType?a:a.ownerDocument:null).documentElement.nodeName?(new XMLSerializer).serializeToString(a):(K(),M).Lb(a)}catch(g){if(g=ec(g),A(g,13))e=g,e="\x3c "+(a?a.nodeName:"null")+"(gquery, error getting the element string representation: "+e.pb()+")/\x3e";else throw g.backingJsObject;}f+=""+e}return f}function nm(){Sl(this)}function Vl(a){em.call(this,a?[a]:[])}
function em(a){Sl(this);rm(this,a)}function Rm(a){Il();Sl(this);this.c=a.c;this.d=a.d;this.b=a.b;this.a=a.a}function $l(a){em.call(this,a)}function lm(a){var b;try{b=(R(),Sm(a));if(!b)return null;if(A(b,17))return b}catch(c){if(c=ec(c),A(c,13))a=c,Lb(a,(Tm(),Um),"");else throw c.backingJsObject;}return null}function Vm(a,b){Il();!Wm&&(Wm={});Xm(Wm,a,b);return a}r(25,1,ra,nm,Vl,em,$l);_.eb=function(){return Qm(this)};var Ym,Jl,Kl,Ml,pm,Wm,Am,Pl,Rl,fm,Zm=B(25);
function jm(){jm=k;km=new gm(0,"","")}function gm(a,b,c){jm();this.c=a;this.a=c;this.b=b}r(59,1,{59:1},gm);_.c=0;var km;B(59);r(84,1,sa);_.ec=$m;B(84);var an=wc();function bn(a,b,c){var d;for(d=0;d<b.length;d++){var e=d,f;f=im(a,F(d));var g=c;f=(!Hl&&(Hl=new cn),dn(en(g),f));b[e]=f}return b}
function dn(a,b){if(null!=b&&nb(b)){var c=dn,d;try{try{d=JSON.parse(b)}catch(e){throw(new E("Error parsing JSON: "+e+"\n"+b)).backingJsObject;}}catch(e){if(e=ec(e),A(e,13))d={};else throw e.backingJsObject;}return c(a,d)}null!=b&&(a.a=b);return a}r(78,1,ta);_.dc=Ic;_.eb=function(){return $wnd.JSON.stringify(this.a)};B(78);function fn(){this.a={}}r(623,78,ta,fn);B(623);
function en(a){if(a==an)return new fn;if(a==gn)return new hn;if(a==jn)return new kn;if(a==ln)return new mn;if(a==nn)return new on;if(a==pn)return new qn;if(a==rn)return new sn;var b=(Il(),Kl);a="GQ.create: not registered class :"+a;b.a.hc(tn(z(v(H,1),h,1,5,[a])));return null}function cn(){}r(172,1,{},cn);B(172);function un(){un=k;vn=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i}function wn(){un()}r(224,1,{},wn);var vn;
B(224);function xn(){}r(520,1,{},xn);_.fc=function(a){return null==a};_.gc=function(a,b,c){c=(y(),null==c?"null":Ab(c));a.setAttribute(b,c)};var yn;B(520);function zn(){}r(521,520,{},zn);_.fc=function(a){var b;(b=null==a)||(b=(gc(),hc),b=(t(b),b===a));return b};_.gc=function(a,b){cm(a,b)&&(a[b]=!0);var c=(y(),b).toLowerCase(),c=(y(),null==c?"null":Ab(c));a.setAttribute(b,c)};var An;B(521);function Bn(){Bn=k;Cn=/^(?:button|input)$/i}function Dn(){Bn()}r(522,520,{},Dn);
_.gc=function(a,b,c){var d;d=a.nodeName;var e;if(e=Cn.test(d)){e=Tl(a);var f=z(Zb(tb),h,2,6,["body"]);e=0<xm(Om(e),f).c.length}if(e)throw(new Ub("You cannot change type of button or input element if the element is already attached to the dom")).backingJsObject;Nc("input",(y(),d).toLowerCase())&&"radio"===c?(b=a.value,c=null==c?"null":Ab(c),a.setAttribute("type",c),a.value=b):(c=null==c?"null":Ab(c),a.setAttribute(b,c))};var En,Cn;B(522);
function tn(a){var b,c,d,e;e=[];c=0;for(d=a.length;c<d;++c)b=a[c],um(e,z(v(H,1),h,1,5,[b]));return e}function Ll(){this.a=(Il(),Jl).b?new Fn:Jl.c?new Gn:new Hn}r(497,1,{},Ll);B(497);function Hn(){}r(498,1,{},Hn);_.hc=function(a){$wnd.console.error.apply($wnd.console,a)};B(498);function Gn(){this.ic()}r(219,498,{},Gn);_.hc=function(a){this.a&&$wnd.console.error.apply($wnd.console,a)};
_.ic=function(){try{"log info warn error dir clear profile profileEnd".split(" ").forEach(function(a){$wnd.console[a]=this.call($wnd.console[a],$wnd.console)},Function.prototype.bind),this.a=!0}catch(a){}};_.a=!1;B(219);function Fn(){this.ic()}r(499,219,{},Fn);_.ic=function(){try{Function.prototype.call.call($wnd.console.log,$wnd.console,Array.prototype.slice.call(arguments)),this.a=!0}catch(a){}};B(499);
function In(){In=k;Jn=/^(fillOpacity|fontWeight|lineHeight|opacity|orphans|widows|zIndex|zoom)$/i;Kn=/^(client|offset|)(width|height)$/i}
function Ln(a,b,c,d){var e,f;if(!b)return"";c=Mn(c);f=Ph(b.style,c);if(d){d=null;if(Xc("html",b.nodeName)?0:!Xg((b&&Wl(b)?9==b.nodeType?b:b.ownerDocument:null).body,b))d=Om(Tl(b)),d=Tl(Em(d,d.c.length-1)),d=Em(d,0),!d&&(d=b),$doc.body.appendChild(d);if(Kn.test(c)){var g=c,l;Nn((Bm(),On),xb("visible")).ec(b,0)?a=Pn(a,b,g):(f=Ln(a,b,"display",!1),l=Ln(a,b,"position",!1),c=Ln(a,b,"visibility",!1),zm(b,"display","block"),zm(b,"position","absolute"),zm(b,"visibility","hidden"),a=Pn(a,b,g),zm(b,"display",
f),zm(b,"position",l),zm(b,"visibility",c));f=a+"px"}else if(Xc("opacity",c))y(),b=b.style,b=(K(),b).opacity,f=""+(b?Qn(b):1);else{a=c.replace(/([A-Z])/g,"-$1").toLowerCase();try{f=(l=$doc.defaultView.getComputedStyle(b,null))&&l.getPropertyValue?l.getPropertyValue(a):null}catch(m){f=null}}d&&(e=Wg((K(),d)),e&&e.removeChild(d))}return null==f?"":f}
function Rn(a,b){0==(b.clientHeight|0)&&0==(b.clientWidth|0)&&Nc("inline",Ln(a,b,"display",!0))&&(zm(b,"display","inline-block"),zm(b,"width","auto"),zm(b,"height","auto"))}function Mn(a){return Xc("float",a)?"cssFloat":Xc("for",a)?"htmlFor":Sn(a)}
function Pn(a,b,c){var d;d=0;"width"===c?d=(Rn(a,b),w((b.clientWidth|0)-Qn(Ln(a,b,"paddingLeft",!0))-Qn(Ln(a,b,"paddingRight",!0)))):"height"===c?d=(Rn(a,b),w((b.clientHeight|0)-Qn(Ln(a,b,"paddingTop",!0))-Qn(Ln(a,b,"paddingBottom",!0)))):"clientWidth"===c?d=b.clientWidth|0:"clientHeight"===c?d=b.clientHeight|0:"offsetWidth"===c?d=(b.offsetWidth||0)|0:"offsetHeight"===c&&(d=(b.offsetHeight||0)|0);return d}function Qn(a){return(a=Pc(Vc(a),"[^\\d\\.\\-]+.*$",""))?yc(a):0}
function zm(a,b,c){a&&null!=b&&(b=Mn(b),lc(b,new $wnd.RegExp("^(^[A-Z]+$)$"))&&(b=(y(),b).toLowerCase()),b=Sn(b),null==c||0==Rb(Vc(c)).length?a.style[b]="":(lc(c,new $wnd.RegExp("^(-?[\\d\\.]+)$"))&&!Jn.test(b)&&(c+="px"),a.style[b]=c))}function Tn(){In()}r(514,1,{},Tn);var Jn,Kn,Un=B(514);function Bm(){Bm=k;$doc.location.href.indexOf("_force_no_native");On={};Xm(On,"visible",new Vn);Xm(On,"hidden",new Wn);Xm(On,"selected",new Xn);Xm(On,"input",new Yn);Xm(On,"header",new Zn)}
function om(a,b,c){var d,e,f,g,l,m,n;if(a.c.test(b))for(;g=a.c.exec(b);)b=g[1]+":"+g[3],g[3]===g[2]||(b+=":"+g[2]),b+=""+g[4];if(a.b.test(b)){l=[];b=Sc(Vc(b),"\\s*,\\s*");g=0;for(n=b.length;g<n;++g){m=b[g];if(d=a.b.exec(m))if(m=0==(y(),d[1]).length?"*":d[1],f=d[2],d=Nn(On,xb(f.toLowerCase()))){e=om(a,m,c);var p=void 0,u=f=m=void 0,x=void 0,x=[];m=0;u=e.length;for(f=0;m<u;m++)if(p=e[m],d.ec(p,m)){var C=f++;hm(x,F(C),p)}e=x}else a.c.test(f)?e=om(a,m,c):e=om(a,m+"[type\x3d"+f+"]",c);else e=om(a,m,c);
C=l;d=e;var L=void 0;f=p=x=m=u=u=void 0;f=C?C:[];m={};for(u=0;C&&u<C.length;u++)L=C[u],hm(m,F(zb(L)),F(1));u=0;p=d.length;for(x=f.length;u<p;u++)L=d[u],m[F(zb(L))]||(C=d[u],L=x++,hm(f,F(L),C))}return l}a=b;try{l=(Bm(),c.querySelectorAll(a))}catch(P){if(P=ec(P),A(P,13))l=P,c=(Il(),Kl),a="GwtQuery: Selector '"+a+"' is unsupported in this SelectorEngineNativeMin engine. Do not use this syntax or configure your module to use a JS fallback. "+l.pb(),c.a.hc(tn(z(v(H,1),h,1,5,[a]))),l=null;else throw P.backingJsObject;
}return l}function qm(){Bm();this.b=/(.*):((visible|hidden|selected|input|header)|((button|checkbox|file|hidden|image|password|radio|reset|submit|text)\s*(,|$)))(.*)/i;this.c=/(.*):([\w]+):(disabled|checked|enabled|empty|focus)\s*([:,].*|$)/i;oc($n);Cm=new Tn;oc(Un)}r(160,1,{},qm);_.a=!0;var On,Cm;B(160);function Vn(){}r(515,84,sa,Vn);_.ec=function(a){return 0<((a.offsetWidth||0)|0)+((a.offsetHeight||0)|0)&&!Xc("none",Ln((Bm(),Cm),a,"display",!0))};B(515);function Wn(){}r(516,84,sa,Wn);
_.ec=function(a,b){return!Nn((Bm(),On),xb("visible")).ec(a,b)};B(516);function Xn(){}r(517,84,sa,Xn);_.ec=function(a){return!!a.selected};B(517);function Yn(){}r(518,84,sa,Yn);_.ec=function(a){return lc(Rb(a.nodeName).toLowerCase(),new $wnd.RegExp("^(input|select|textarea|button)$"))};B(518);function Zn(){}r(519,84,sa,Zn);_.ec=function(a){return lc(Rb(a.nodeName).toLowerCase(),new $wnd.RegExp("^(h\\d)$"))};B(519);var $n=B(null);function im(a,b){return ao([a&&a[b]])}
function bo(a){var b=(y(),"changes");a=a[b];return"[object Array]"==Object.prototype.toString.call(a)?a:null}function Gm(a){if("number"==typeof a.length)return a.length;var b,c=0;for(b in a)"__gwt_ObjectId"!=b&&c++;return c}function hm(a,b,c){pb(c)?c=yb((t(c),c)):A(c,82)&&(c=Cc(c));a[b]=c}function ao(a){if("object"==typeof a&&1==a.length){a=a[0];var b=typeof a;if("boolean"==b)return gc(),a?ic:hc;if("number"==b)return a}return a||null}function Nn(a,b){return im(a,F(b))}
function Xm(a,b,c){hm(a,F(kb(b)),c)}function Zl(a,b){um(a,z(v(wb,1),h,0,2,[b]))}function um(a,b){var c,d,e;d=0;for(e=b.length;d<e;++d)if(c=b[d],A(c,82)){var f=F(Gm(a));c=Cc(c);a[f]=c}else pb(c)?(f=F(Gm(a)),c=yb((t(c),c)),a[f]=c):hm(a,F(Gm(a)),c);return a}function Sn(a){return a.replace(/\-(\w)/g,function(a,c){return c.toUpperCase()})}function cm(a,b){var c=b.split("."),d;for(d in c){if(!(a&&c[d]in a))return!1;a=a[c[d]]}return!0}
function dm(a){return"[object Array]"==Object.prototype.toString.call(a)||"number"==typeof a.length}function Wl(a){return!!a&&"nodeType"in a&&"nodeName"in a}function am(a){return"[object Function]"==Object.prototype.toString.call(a)}function S(a,b){return a?im(a,b):null}function co(a,b,c){return eo(a,b,um([],c))}function eo(a,b,c){var d=a||$wnd;b=b.split(".");for(var e in b)if(a=d,d=d[b[e]],!d)return null;return am(d)&&ao([d.apply(a,c)])}function bm(a){Fl.call(this);am(a)&&(this.a=a)}
r(122,16,qa,bm);_.bb=function(a){return sb(this.a)===sb(a)};_.tb=fo;_.bc=fo;_.db=function(){return zb(this.a)};_.a=null;B(122);function vm(a){var b,c,d,e,f;f=[];b={};for(d=0;d<a.length;d++)c=a[d],e=zb(c),b[F(e)]||(e=F(e),b[e]=1,f[f.length]=c);return f}function go(){go=k;Il();Vm(ho,new io);oc(ho);oc(ho)}function jo(a){go();Rm.call(this,a)}r(158,25,ra,jo);var ho=B(158);function Nl(){Nl=k;go();Vm(ko,new lo)}function mo(a){Nl();jo.call(this,a)}r(500,158,ra,mo);var ko=B(500);function lo(){}
r(501,1,ua,lo);_.jc=function(a){return new mo(a)};B(501);function Ol(){Ol=k;Il();Vm(no,new oo)}function po(a){Ol();Rm.call(this,a)}r(198,25,ra,po);var no=B(198);function oo(){}r(364,1,ua,oo);_.jc=function(a){return new po(a)};B(364);function io(){}r(502,1,ua,io);_.jc=function(a){return new jo(a)};B(502);function Ql(){Ql=k;go();Vm(qo,new ro)}function so(a){Ql();jo.call(this,a)}r(503,158,ra,so);var qo=B(503);function ro(){}r(504,1,ua,ro);_.jc=function(a){return new so(a)};B(504);var gn=wc();
function hn(){this.a={}}r(624,78,ta,hn);B(624);function to(a,b){var c,d,e;d=0;for(e=b.length;d<e;++d)c=b[d],a.a||!a.f||!c||a.d&&-1!=uo(a.f,c)||Vd(a.f,c),a.b&&a.e&&vo(c,wo(a.e))}function xo(a){a.f=null;a.a=!0}function yo(a,b){var c,d;if(!a.a&&(a.a=a.c,a.b&&(a.e=new zo(new Xl(b))),a.f))for(d=new Xk(a.f);d.a<d.c.a.length&&(c=Yk(d),vo(c,b)||!a.g););}function vo(a,b){var c;null!=b&&1==b.length&&null!=b[0]&&0!=(jb(b[0]).e&4)&&(b=ac(b[0]));return A(a,16)?(c=a.cc(b),!pb(c)||yb((t(c),c))):!0}
function Ao(a){this.f=new Sd;this.c=-1!=(y(),a).indexOf("once");this.b=-1!=a.indexOf("memory");this.d=-1!=a.indexOf("unique");this.g=-1!=a.indexOf("stopOnFalse")}r(167,1,{},Ao);_.a=!1;_.b=!1;_.c=!1;_.d=!1;_.e=null;_.g=!1;B(167);function Bo(){this.a=new Ao("memory");this.c=new Ao("once memory");this.d=new Ao("once memory");to(this.d,z(v(Gl,1),h,16,0,[new Co(this)]));to(this.c,z(v(Gl,1),h,16,0,[new Do(this)]))}r(200,1,{},Bo);
_.eb=function(){var a="Deferred this\x3d"+zb(this)+" promise\x3d"+(!this.b&&(this.b=new Eo(this)),zb(this.b))+" state\x3d"+this.b.a.e+" restatus\x3d",b;b=this.d;b="stack\x3d"+(b.f?F(b.f.a.length):"null")+" "+b.a;return a+b};_.b=null;_.e="pending";B(200);function Co(a){this.a=a;Fl.call(this)}r(369,16,qa,Co);_.bc=function(){this.a.e="resolved";xo(this.a.d);var a=this.a.a;a.b||xo(a);a.f=null};B(369);function Do(a){this.a=a;Fl.call(this)}r(370,16,qa,Do);
_.bc=function(){this.a.e="rejected";xo(this.a.c);var a=this.a.a;a.b||xo(a);a.f=null};B(370);function Eo(a){new Fo(this);new Go(this);this.a=a}r(96,1,{716:1,96:1},Eo);_.eb=function(){return"Promise this\x3d"+zb(this)+" "+this.a};B(96);function Fo(a){this.a=a;Fl.call(this)}r(367,16,qa,Fo);_.bc=function(){var a=this.a.a;"pending"==a.e&&yo(a.d,this.e)};B(367);function Go(a){this.a=a;Fl.call(this)}r(368,16,qa,Go);_.bc=function(){var a=this.a.a;"pending"==a.e&&yo(a.c,this.e)};B(368);
function Ho(a,b,c){if(0==b){var d=a.b;"pending"==d.e&&yo(d.d,c)}1==b&&(d=a.b,"pending"==d.e&&yo(d.c,c));2==b&&(a=a.b,"pending"==a.e&&yo(a.a,c))}function Io(a,b,c){Fl.call(this);this.d=c;this.c=b.length>this.d?b[this.d]:null;this.b=a;this.a=!1}r(148,16,qa,Io);
_.bc=function(){var a,b;b=this.e;if(this.c)if(a=this.c,a.e=b,a=a.cc(b),A(a,96))b=a,2==this.d?(a=z(v(Gl,1),h,16,0,[new Jo(this)]),to(b.a.a,a)):(a=z(v(Gl,1),h,16,0,[new Ko(this,b)]),to(b.a.d,a),to(b.a.c,a));else{var c=(gc(),ic),d=a;a=(t(c),c===d)?b:null!=a&&0!=(jb(a).e&4)?ac(a):a;Ho(this,this.d,z(v(H,1),h,1,5,[a]))}else Ho(this,this.d,b)};_.a=!1;_.d=0;B(148);function Jo(a){this.a=a;Fl.call(this)}r(365,16,qa,Jo);_.bc=function(){Ho(this.a,2,this.e)};B(365);
function Ko(a,b){this.a=a;this.b=b;Fl.call(this)}r(366,16,qa,Ko);_.bc=function(){Ho(this.a,(0==this.a.d||1==this.a.d&&this.a.a)&&"resolved"===this.b.a.e?0:1,this.e)};B(366);function Fm(){Fm=k;Lo=new Ag;J(Lo,Mo,new No);J(Lo,Oo,new No)}var Mo="mouseenter",Oo="mouseleave",Lo;r(556,1,{});B(556);function No(){new Po;new Qo}r(236,556,{},No);B(236);function Qo(){Fl.call(this)}r(557,16,qa,Qo);B(557);function Po(){Fl.call(this)}r(558,16,qa,Po);B(558);
function Ro(){Ro=k;Ol();So=new Ag;To=new Ag;Uo=Vm(Vo,new Wo)}function Xo(a){Ro();po.call(this,a)}function Yo(a,b){function c(b){var c,f,g,l,m=jn,n={};hm(n,(y(),"changes"),b);b=(!Hl&&(Hl=new cn),en(m));dn(b,n);A(a,16)?a.cc(z(Zb(H),h,1,5,[(c=bo(b.a),f=c?c.length:0,new Xl(bn(c,Ib(ln,{721:1,3:1,4:1},699,f,0),ln)))])):A(a,147)&&(c=(g=bo(b.a),l=g?g.length:0,bn(g,Ib(nn,{722:1,3:1,4:1},700,l,0),nn),a),Zo(c),c.j.d.q.Ze())}return b?new $wnd.MutationObserver(c):c}r(199,198,{25:1,199:1},Xo);var Uo,So,To,Vo=B(199);
function Wo(){}r(363,1,ua,Wo);_.jc=function(a){return new Xo(a)};B(363);var jn=wc(),ln=wc(),nn=wc(),pn=wc(),rn=wc();function mn(){this.a={}}r(626,78,{89:1,79:1,699:1},mn);B(626);function kn(){this.a={}}r(625,78,{89:1,79:1,714:1},kn);B(625);function on(){this.a={}}r(627,78,{89:1,79:1,700:1},on);B(627);function qn(){this.a={}}r(628,78,{89:1,79:1,713:1},qn);B(628);function sn(){this.a={}}r(629,78,ta,sn);B(629);
function $o(a,b){if(a&&!a._)if(b)if(A(b,112))b.Rc(a);else if(A(b,42))try{b.Jc(a)}catch(n){if(n=ec(n),A(n,30))a.Hc(b);else throw n.backingJsObject;}else a.Hc(b);else{a:{var c,d,e;d=Vg((R(),a.ab));for(c=$doc.body;d&&c!=d;){if(Sm(d)){b:{e=0;for(var f=void 0,g=void 0,l=void 0,m=void 0,f=void 0,g=Tl(d).c,l=0,m=g.length;l<m;++l)if(f=g[l],f=lm(f)){if(0==e){e=f;break b}--e}e=null}if(e){b=e;break a}}d=Wg((K(),d))}b=null}b?$o(a,b):(ap(),Hm(bp,a),a.Dc())}}r(135,1,{723:1,135:1},function(a){this.a=a});
_.bb=function(a){return A(a,135)?this.a===a.a:!1};_.db=id;_.eb=function(){return'safe: "'+this.a+'"'};B(135);function cp(){cp=k}function dp(a,b){this.a=a;this.b=b}r(180,1,{180:1},dp);_.bb=function(a){return A(a,180)?this.a==a.a&&this.b==a.b:!1};_.db=function(){return w(this.a)^w(this.b)};_.eb=function(){return"Point("+this.a+","+this.b+")"};_.a=0;_.b=0;B(180);function R(){R=k;ep=1==bb?new fp:new gp}function hp(a){R();return yh(a)}
function ip(a,b,c){R();b==jp&&8192==kp((K(),a).type)&&(jp=null);c.lc(a)}function lp(a){R();return ep.mc(a,0)}function mp(a){R();return gh((K(),a))}function np(a){R();return Wg((K(),a))}function op(a){R();var b;var c=pp,d,e,f;qp&&c&&rp(c.a.d,qp)?(b=sp.a,d=sp.b,e=sp.c,f=sp.d,tp(sp),sp.d=a,Tk(c,sp),c=!(sp.a&&!sp.b),sp.a=b,sp.b=d,sp.c=e,sp.d=f,b=c):b=!0;!b&&a&&((K(),a).stopPropagation(),M.Bb(a));return b}function up(a){R();return a.__gwt_resolve?a.__gwt_resolve():a}function vp(a,b){R();ep.sc(a,b)}
function wp(a,b){R();ep.tc(a,b)}var ep,jp;function xp(a){return R(),kp((K(),a).type)}function yp(a){R();zp(ep);!qp&&(qp=new sk);pp||(pp=new al(null,!0),sp=new Ap);return Ok(pp,qp,a)}var pp;function tp(a){a.f=!1;a.g=null;a.a=!1;a.b=!1;a.c=!0;a.d=null}function Ap(){}r(327,666,{},Ap);_.Nb=function(a){a.kc(this);sp.c=!1};_.Ob=function(){return qp};_.Qb=function(){tp(this)};_.a=!1;_.b=!1;_.c=!1;var qp,sp;B(327);function Bp(){Bp=k;new Cp;Dp=new Ep;Fp=Gp()}
function Gp(){var a;a=(Hp(),Ip).uc();return null==a||0==(y(),a).length?"":$wnd.decodeURI((y(),a).substr(1,a.length-1).replace("%23","#"))}function Jp(){Bp();var a;a=Gp();a!==Fp&&(Fp=a,Mk(Dp,a))}var Dp,Fp;function Ep(){this.a=new $k(null)}r(637,1,{21:1},Ep);_.Vb=function(a){Tk(this.a,a)};B(637);function Cp(){var a;a=Qd(Jp);$wnd.addEventListener("hashchange",a,!1)}r(638,1,{},Cp);B(638);function Hp(){Hp=k;Ip=0==bb?new Kp:new Lp}function Mp(a,b){return Ok((!Np&&(Np=new Op),Np),a,b)}
function Pp(){Hp();var a;Qp&&(a=new Rp,Np&&Tk(Np,a));return null}var Qp=!1,Np,Ip,Sp=0,Tp=0,Up=!1;function Vp(){Vp=k;Wp=new sk}function Rp(){Vp()}r(467,666,{},Rp);_.Nb=Xp;_.Ob=function(){return Wp};var Wp;B(467);function Op(){al.call(this,null,!1)}r(154,58,{21:1},Op);B(154);
function kp(a){switch(a){case "blur":return 4096;case "change":return 1024;case "click":return 1;case "dblclick":return 2;case "focus":return 2048;case "keydown":return 128;case "keypress":return 256;case "keyup":return 512;case "load":return 32768;case "losecapture":return 8192;case "mousedown":return 4;case "mousemove":return 64;case "mouseout":return 32;case "mouseover":return 16;case "mouseup":return 8;case "scroll":return 16384;case "error":return 65536;case "DOMMouseScroll":case "mousewheel":return 131072;
case "contextmenu":return 262144;case "paste":return 524288;case "touchstart":return 1048576;case "touchmove":return 2097152;case "touchend":return 4194304;case "touchcancel":return 8388608;case "gesturestart":return 16777216;case "gesturechange":return 33554432;case "gestureend":return 67108864;default:return-1}}function zp(a){Yp||(a.oc(),Yp=!0)}function Sm(a){a=a.__listener;return!Yb(a)&&A(a,20)?a:null}r(104,1,va);var Yp=!1;B(104);
function Zp(){Zp=k;$p={_default_:aq,dragenter:bq,dragover:bq};cq={click:dq,dblclick:dq,mousedown:dq,mouseup:dq,mousemove:dq,mouseover:dq,mouseout:dq,mousewheel:dq,keydown:eq,keyup:eq,keypress:eq,touchstart:dq,touchend:dq,touchmove:dq,touchcancel:dq,gesturestart:dq,gestureend:dq,gesturechange:dq}}function fq(){gq=Qd(aq);hq=Qd(iq);var a=$p;jq(a,function(b,d){a[b]=Qd(d)});var b=cq;jq(b,function(a,d){b[a]=Qd(d)});jq(b,function(a,b){$wnd.addEventListener(a,b,!0)})}
function kq(a,b){var c=(a.__eventBits||0)^b;a.__eventBits=b;c&&(c&1&&(a.onclick=b&1?gq:null),c&2&&(a.ondblclick=b&2?gq:null),c&4&&(a.onmousedown=b&4?gq:null),c&8&&(a.onmouseup=b&8?gq:null),c&16&&(a.onmouseover=b&16?gq:null),c&32&&(a.onmouseout=b&32?gq:null),c&64&&(a.onmousemove=b&64?gq:null),c&128&&(a.onkeydown=b&128?gq:null),c&256&&(a.onkeypress=b&256?gq:null),c&512&&(a.onkeyup=b&512?gq:null),c&1024&&(a.onchange=b&1024?gq:null),c&2048&&(a.onfocus=b&2048?gq:null),c&4096&&(a.onblur=b&4096?gq:null),
c&8192&&(a.onlosecapture=b&8192?gq:null),c&16384&&(a.onscroll=b&16384?gq:null),c&32768&&(a.onload=b&32768?hq:null),c&65536&&(a.onerror=b&65536?gq:null),c&131072&&(a.onmousewheel=b&131072?gq:null),c&262144&&(a.oncontextmenu=b&262144?gq:null),c&524288&&(a.onpaste=b&524288?gq:null),c&1048576&&(a.ontouchstart=b&1048576?gq:null),c&2097152&&(a.ontouchmove=b&2097152?gq:null),c&4194304&&(a.ontouchend=b&4194304?gq:null),c&8388608&&(a.ontouchcancel=b&8388608?gq:null),c&16777216&&(a.ongesturestart=b&16777216?
gq:null),c&33554432&&(a.ongesturechange=b&33554432?gq:null),c&67108864&&(a.ongestureend=b&67108864?gq:null))}function eq(a){op(a)}function dq(a){Zp();if(op(a)&&lq){var b;b=lq;R();var c;(c=Sm(b))?(ip(a,b,c),b=!0):b=!1;b&&(K(),a).stopPropagation()}}function bq(a){(K(),M).Bb(a);aq(a)}function aq(a){var b;for(b=(K(),M).yb(a);b&&!Sm(b);)b=b.parentNode;b&&ip(a,1!=b.nodeType?null:b,Sm(b))}function iq(a){(K(),M).yb(a).__gwtLastUnhandledEvent=a.type;aq(a)}r(677,104,va);
_.mc=function(a,b){for(var c=0,d=a.firstChild;d;){if(1==d.nodeType){if(b==c)return d;++c}d=d.nextSibling}return null};_.nc=function(a){var b=0;for(a=a.firstChild;a;)1==a.nodeType&&++b,a=a.nextSibling;return b};_.oc=function(){fq()};_.pc=function(a,b,c){for(var d=0,e=a.firstChild,f=null;e;){if(1==e.nodeType){if(d==c){f=e;break}++d}e=e.nextSibling}a.insertBefore(b,f)};_.qc=function(a){zp(this);lq==a&&(lq=null)};_.rc=function(a){zp(this);lq=a};
_.sc=function(a,b){var c;zp(this);c=$p;a.addEventListener(b,c[b]||c._default_,!1)};_.tc=function(a,b){zp(this);kq(a,b)};var $p,lq,cq,gq,hq;B(677);function mq(){mq=k;Zp();cq.DOMMouseScroll=dq}
function nq(){$wnd.addEventListener("mouseout",Qd(function(a){var b=(Zp(),lq);if(b&&!a.relatedTarget&&"html"==a.target.tagName.toLowerCase()){var c=$doc.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,$wnd,0,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,null);b.dispatchEvent(c)}}),!0)}function gp(){mq()}r(527,677,va,gp);_.oc=function(){fq();nq()};_.tc=function(a,b){zp(this);kq(a,b);b&131072&&a.addEventListener("DOMMouseScroll",(Zp(),gq),!1)};
B(527);r(678,677,va);B(678);function fp(){Zp()}r(528,678,va,fp);B(528);function jq(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function oq(){var a=$wnd.onbeforeunload,b=$wnd.onunload;$wnd.onbeforeunload=function(b){var d;try{d=Qd(Pp)()}finally{b=a&&a(b)}if(null!=d)return d;if(null!=b)return b};$wnd.onunload=Qd(function(a){try{Hp(),Qp&&Gk((!Np&&(Np=new Op),Np))}finally{b&&b(a),$wnd.onresize=null,$wnd.onscroll=null,$wnd.onbeforeunload=null,$wnd.onunload=null}})}
function pq(){var a=$wnd.onresize;$wnd.onresize=Qd(function(b){try{Hp();var c,d;if(Up){var e=$doc;d=("CSS1Compat"===e.compatMode?e.documentElement:e.body).clientWidth|0;e=$doc;c=("CSS1Compat"===e.compatMode?e.documentElement:e.body).clientHeight|0;if(Tp!=d||Sp!=c){Tp=d;Sp=c;var f=(!Np&&(Np=new Op),Np),g;Kk&&(g=new Ik,Tk(f,g))}}}finally{a&&a(b)}})}function Lp(){}r(175,1,{175:1},Lp);_.uc=function(){return $wnd.location.hash};B(175);function Kp(){}r(622,175,{175:1},Kp);
_.uc=function(){var a=$wnd.location.href,b=a.indexOf("#");return 0<b?a.substring(b):""};B(622);function qq(){qq=k}function rq(a,b){sq(a.vc(),b,!0)}function O(a){return R(),a.ab}function tq(a,b){uq(a,vq((wq(),xq).bd(mp((R(),a.ab))))+"-"+b,!1)}function yq(a,b){sq(a.vc(),b,!1)}function zq(a,b){(R(),a.ab).style.height=b}function uq(a,b,c){sq(a.vc(),b,c)}function vq(a){qq();var b;a=a.className||"";b=Oc(a,Yc(32));return 0<=b?(y(),a).substr(0,b):a}
function sq(a,b,c){qq();if(!a)throw(new Ub("Null widget handle. If you are creating a composite, ensure that initWidget() has been called.")).backingJsObject;b=Vc(b);if(0==(y(),b).length)throw(new E("Style names cannot be empty")).backingJsObject;c?$g(a,b):mh(a,b)}
function Aq(a,b){qq();if(!a)throw(new Ub("Null widget handle. If you are creating a composite, ensure that initWidget() has been called.")).backingJsObject;b=Vc(b);if(0==(y(),b).length)throw(new E("Style names cannot be empty")).backingJsObject;var c=b,d=(a.className||"").split(/\s+/);if(d){var e=d[0],f=e.length;d[0]=c;for(var g=1,l=d.length;g<l;g++){var m=d[g];m.length>f&&"-"==m.charAt(f)&&0==m.indexOf(e)&&(d[g]=c+m.substring(f))}a.className=d.join(" ")}}r(19,1,{23:1,19:1});_.vc=function(){return O(this)};
_.wc=Bq;_.xc=function(a){zq(this,a)};_.yc=function(a){(R(),this.ab).style.width=a};_.eb=function(){var a;this.ab?(a=(R(),this.ab),a=(K(),M).Lb(a)):a="(null handle)";return a};B(19);function Cq(a,b,c){var d;d=c.b;d=kp((R(),d));-1==d?(d=c.b,vp((R(),a.ab),d)):a.Ic(d);Ok(a.$?a.$:a.$=new $k(a),c,b)}function Dq(a,b,c){return Ok(a.$?a.$:a.$=new $k(a),c,b)}function T(a,b){a.$&&Tk(a.$,b)}
function Eq(a){var b;if(a.Cc())throw(new Fq("Should only call onAttach when the widget is detached from the browser's document")).backingJsObject;a.Y=!0;R();a.ab.__listener=a;b=a.Z;a.Z=-1;0<b&&a.Ic(b);a.Ac();a.Fc()}function Gq(a,b){var c;switch(R(),kp((K(),b).type)){case 16:case 32:if((c=M.zb(b))&&Xg(a.ab,c))return}c=a.ab;var d,e,f,g;if(hk&&(d=(K(),b).type,d=hk.a[d]))for(g=d.Kc();g.Vc();)f=g.Wc(),d=f.a.d,e=f.a.e,f.a.d=b,f.a.e=c,T(a,f.a),f.a.d=d,f.a.e=e}
function Hq(a){if(!a.Cc())throw(new Fq("Should only call onDetach when the widget is attached to the browser's document")).backingJsObject;try{a.Gc()}finally{try{a.Bc()}finally{R(),a.ab.__listener=null,a.Y=!1}}}function mm(a){if(!a._){if(ap(),Iq(bp,a)){ap();try{a.Ec()}finally{bp.a.sf(a)}}}else if(A(a._,42))a._.Lc(a);else if(a._)throw(new Fq("This widget's parent does not implement HasWidgets")).backingJsObject;}
function Jq(a,b){var c;c=a._;if(b){if(c)throw(new Fq("Cannot set a new parent without first clearing the old parent")).backingJsObject;a._=b;b.Cc()&&a.Dc()}else try{c&&c.Cc()&&a.Ec()}finally{a._=null}}r(17,19,wa);_.zc=function(){return this};_.Ac=Kq;_.Bc=Kq;_.Vb=function(a){T(this,a)};_.Cc=function(){return this.Y};_.Dc=function(){Eq(this)};_.lc=function(a){Gq(this,a)};_.Ec=Lq;_.Fc=Kq;_.Gc=Kq;_.Hc=function(a){Jq(this,a)};_.Ic=Mq;_.Y=!1;_.Z=0;var Nq=B(17);r(662,17,xa);
_.Jc=function(){throw(new Oq("This panel does not support no-arg add()")).backingJsObject;};_.Ac=function(){Pq(this,(Qq(),Rq))};_.Bc=function(){Pq(this,(Qq(),Sq))};B(662);function Tq(a,b){var c;if(b._!=a)return!1;try{Jq(b,null)}finally{c=(R(),b.ab);Wg((K(),c)).removeChild(c);c=a.b;var d;d=Uq(c,b);if(-1==d)throw(new pd).backingJsObject;if(0>d||d>=c.c)throw(new Dc).backingJsObject;for(--c.c;d<c.c;++d)c.a[d]=c.a[d+1];c.a[c.c]=null}return!0}r(189,662,xa);_.Kc=function(){return new Vq(this.b)};
_.Lc=function(a){return Tq(this,a)};B(189);function Wq(a,b){var c=(R(),a.ab);mm(b);var d=a.b;Xq(d,b,d.c);R();d=up(b.ab);c.appendChild(d);Jq(b,a)}function Yq(a,b){var c;if(c=Tq(a,b)){var d=(R(),b.ab);d.style.left="";d.style.top="";d.style.position=""}return c}r(485,189,xa);_.Jc=function(a){Wq(this,a)};_.Lc=function(a){return Yq(this,a)};B(485);function Qq(){Qq=k;Fb();Rq=new Zq;Sq=new $q}function ar(a){Zk.call(this,a)}
function Pq(a,b){Qq();var c,d,e;c=null;for(e=a.Kc();e.Vc();){d=e.Wc();try{b.Mc(d)}catch(f){if(f=ec(f),A(f,11))d=f,!c&&(c=new Vk),c.a.rf(d,c);else throw f.backingJsObject;}}if(c)throw(new ar(c)).backingJsObject;}r(316,191,pa,ar);var Rq,Sq;B(316);function Zq(){}r(317,1,{},Zq);_.Mc=function(a){a.Dc()};B(317);function $q(){}r(318,1,{},$q);_.Mc=function(a){a.Ec()};B(318);function br(){br=k;qq();cr=(dr(),dr(),er)}r(372,17,ya);_.Nc=function(){return kh((R(),this.ab))};
_.Dc=function(){Eq(this);-1==this.Nc()&&this.Pc(0)};_.Oc=function(a){a?cr.$c((R(),this.ab)):cr.Yc((R(),this.ab))};_.Pc=function(a){(R(),this.ab).tabIndex=a};var cr;B(372);r(201,372,ya);B(201);function fr(){br();var a;a=$doc;a=(K(),M).ub(a,"button");this.ab=(R(),a);(R(),this.ab).className="gwt-Button"}r(163,201,ya,fr);B(163);function gr(a){return a.Y?(gc(),a.a.checked?ic:hc):(gc(),a.a.defaultChecked?ic:hc)}
function hr(a,b,c){var d;null==b&&(b=(gc(),hc));d=a.Y?(gc(),a.a.checked?ic:hc):(gc(),a.a.defaultChecked?ic:hc);var e=yb((t(b),b));a.a.checked=e;e=yb((t(b),b));a.a.defaultChecked=e;t(b);b!=d&&c&&Mk(a,b)}
function ir(){br();R();var a=$doc,b,a=(b=(K(),a).createElement("INPUT"),b.type="checkbox",b.value="on",b);b=(R(),Ah());this.ab=(R(),b);this.a=a;b=$doc;this.b=(K(),b).createElement("label");this.ab.appendChild(this.a);this.ab.appendChild(this.b);b=Gh();this.a.id=b;this.b.htmlFor=b;new jr(this.b);this.a&&(this.a.tabIndex=0);this.ab.className="gwt-CheckBox"}r(119,201,{27:1,21:1,20:1,119:1,113:1,23:1,24:1,19:1,17:1},ir);_.Nc=function(){return kh(this.a)};_.Fc=function(){R();this.a.__listener=this};
_.Gc=function(){R();this.a.__listener=null;hr(this,this.Y?(gc(),this.a.checked?ic:hc):(gc(),this.a.defaultChecked?ic:hc),!1)};_.Oc=function(a){a?this.a.focus():this.a.blur()};_.Pc=function(a){this.a&&(this.a.tabIndex=a)};_.Ic=function(a){if(-1==this.Z){var b=this.a,c;c=this.a;c=(R(),c.__eventBits||0);wp(b,a|c)}else-1==this.Z?wp((R(),this.ab),a|(this.ab.__eventBits||0)):this.Z|=a};_.c=!1;B(119);function kr(a){this.a=a}r(373,1,Aa,kr);_.Sb=function(){Mk(this.a,gr(this.a))};B(373);
function lr(a,b){var c;if(a.X)throw(new Fq("Composite.initWidget() may only be called once.")).backingJsObject;if(!b)throw(new Kc("widget cannot be null")).backingJsObject;mm(b);c=(R(),b.ab);a.ab=c;mr();var d;R();try{d=!!c&&!!c.__gwt_resolve}catch(e){d=!1}d&&(mr(),c.__gwt_resolve=nr(a));a.X=b;Jq(b,a)}function or(a){return a.X?a.X.Cc():!1}function pr(a){if(!a.X)throw(new Fq("initWidget() is not called yet")).backingJsObject;-1!=a.Z&&(a.X.Ic(a.Z),a.Z=-1);a.X.Dc();R();a.ab.__listener=a;a.Ac()}
function qr(a){try{a.Bc()}finally{a.X.Ec()}}r(663,17,Ba);_.Cc=function(){return or(this)};_.Dc=function(){pr(this)};_.lc=function(a){Gq(this,a);this.X.lc(a)};_.Ec=function(){qr(this)};_.wc=function(){var a=this.X.wc();this.ab=(R(),a);return R(),this.ab};B(663);function jr(a){this.a=a;this.c=this.b=il(a)}r(237,1,{},jr);B(237);function rr(){this.b=new sr(this);var a=yh("div");this.ab=(R(),a)}r(143,189,xa,rr);_.Jc=function(a){Wq(this,a)};B(143);
function tr(a,b){if(a.w)throw(new Fq("SimplePanel can only contain one child widget")).backingJsObject;a.Rc(b)}function ur(a,b){if(a.w!=b)return!1;try{Jq(b,null)}finally{var c=a.Qc(),d=(R(),b.ab);c.removeChild(d);a.w=null}return!0}function vr(a,b){if(b!=a.w&&(b&&mm(b),a.w&&ur(a,a.w),a.w=b)){R();var c=a.Qc(),d=up(O(a.w));c.appendChild(d);Jq(b,a)}}r(114,662,Ca);_.Jc=function(a){tr(this,a)};_.Qc=function(){return R(),this.ab};_.Kc=function(){return new wr(this)};_.Lc=function(a){return ur(this,a)};
_.Rc=function(a){vr(this,a)};B(114);function xr(){xr=k;qq();yr=(dr(),dr(),zr)}var yr;r(239,17,wa);B(239);r(642,239,wa);B(642);function Ar(a){qq();var b=xh(),b=(Xc("span",(K(),b).tagName),b);this.ab=(R(),b);this.a=new jr(this.ab);(R(),this.ab).className="gwt-HTML";b=this.a;b.a.innerHTML=a||"";if(b.c!=b.b)switch(b.c=b.b,a=b.a,b.b.g){case 0:a.dir="rtl";break;case 1:a.dir="ltr";break;case 2:il(a)!=(jl(),ml)&&(a.dir="")}}r(240,642,wa,Ar);B(240);
function Br(a,b,c){b.b&&(mk(a,b),c&&b.a&&(mk(a,null),(xr(),yr).Yc((R(),a.ab)),a=b.a,Rg((Jg(),Kg),new Cr(a))))}function Dr(a,b,c){if(!b||b.b)mk(a,b),c&&a.e&&(xr(),yr).$c((R(),a.ab)),b&&a.c&&Br(a,b,!1)}
function Er(a,b){var c;a:{c=(R(),(K(),M).Ab(b));var d,e;for(e=new Xk(a.f);e.a<e.c.a.length;)if(d=Yk(e),Xg((R(),d.ab),c)){c=d;break a}c=null}switch(kp(b.type)){case 1:(xr(),yr).$c(a.ab);c&&Br(a,c,!0);break;case 16:c&&Dr(a,c,!0);break;case 32:c&&Dr(a,null,!1);break;case 2048:Fr(a);break;case 128:switch(c=b.keyCode|0,c){case 37:Fr(a)||a.i||Gr(a);b.stopPropagation();M.Bb(b);break;case 39:Fr(a)||!a.i&&Hr(a);b.stopPropagation();M.Bb(b);break;case 38:Fr(a)||a.i&&Gr(a);b.stopPropagation();M.Bb(b);break;case 40:Fr(a)||
a.i&&Hr(a);b.stopPropagation();M.Bb(b);break;case 27:mk(a,null);b.stopPropagation();M.Bb(b);break;case 9:mk(a,null);break;case 13:Fr(a)||(Br(a,a.g,!0),b.stopPropagation(),M.Bb(b))}}Gq(a,b)}function Fr(a){var b,c;if(!a.g){for(c=new Xk(a.f);c.a<c.c.a.length;)if(b=Yk(c),b.b){mk(a,b);break}return!0}return!1}
function mk(a,b){var c;if(b!=a.g){a.g&&(c=a.g,uq(c,vq((R(),c.ab))+"-selected",!1),a.i&&(c=np(O(a.g)),R(),2==ep.nc(c)&&(c=ep.mc(c,1),sq(c,"subMenuIcon-selected",!1))));if(b){uq(b,vq((R(),b.ab))+"-selected",!0);a.i&&(c=np(b.ab),2==ep.nc(c)&&(c=ep.mc(c,1),sq(c,"subMenuIcon-selected",!0)));Ye();c=a.ab;var d=new ye(b.ab),e=(Te(),Ue),d=z(Zb(ze),h,173,0,[d]),f,g,l,m;f=new Ir;l=0;for(m=d.length;l<m;++l)g=d[l],yd(yd(f,g.a)," ");d=Vc(f.a);c.setAttribute(e.a,d)}a.g=b}}
function Hr(a){var b,c,d;if(a.g){for(b=c=uo(a.f,a.g);;)if(c+=1,c==a.f.a.length&&(c=0),c==b){d=Jr(a.f,b);break}else if(d=Jr(a.f,c),d.b)break;mk(a,d)}}function Gr(a){var b,c,d;if(a.g){for(b=c=uo(a.f,a.g);;)if(--c,0>c&&(c=a.f.a.length-1),c==b){d=Jr(a.f,b);break}else if(d=Jr(a.f,c),d.b)break;mk(a,d)}}r(190,17,wa);_.lc=function(a){Er(this,a)};_.Ec=Lq;_.c=!1;_.e=!0;_.i=!1;B(190);function Cr(a){this.a=a}r(319,1,{},Cr);_.tb=function(){Kr(this.a)};B(319);function Lr(a){this.a=a}r(320,1,{710:1,15:1},Lr);B(320);
function Mr(){Mr=k;cp()}function Nr(a,b){qq();this.ab=(R(),Ch());uq(this,vq(this.ab)+"-selected",!1);this.ab.innerHTML=a||"";this.ab.className="gwt-MenuItem";var c=Gh();this.ab.setAttribute("id",c);Ye();this.ab.setAttribute("role",Ff.a);this.a=b}r(128,19,{23:1,128:1,19:1},Nr);_.b=!0;B(128);function wq(){wq=k;qq();xq=1==bb?new Or:new Pr}function Qr(a){a.u&&(Rr(a.t,!1,!1),Gk(a))}function Sr(a){var b;if(b=a.w)null!=a.f&&b.xc(a.f),null!=a.g&&b.yc(a.g)}
function Tr(a,b){a.f=b;Sr(a);0==(y(),b).length&&(a.f=null)}function Ur(a,b,c){a.p=b;a.v=c;b-=Hh();c-=Ih();a=(R(),a.ab);a.style.left=b+(Cj(),"px");a.style.top=c+"px"}function Vr(a,b){a.g=b;Sr(a);0==(y(),b).length&&(a.g=null)}r(265,114,Ca);_.Qc=function(){return xq.ad(mp((R(),this.ab)))};_.vc=function(){return xq.bd(mp((R(),this.ab)))};_.Sc=function(){this.Tc(!1)};_.Tc=function(){Qr(this)};_.Gc=function(){this.u&&Rr(this.t,!1,!0)};_.xc=function(a){Tr(this,a)};_.Uc=function(a,b){Ur(this,a,b)};
_.Rc=function(a){vr(this,a);Sr(this)};_.yc=function(a){Vr(this,a)};_.d=!1;_.e=!1;_.n=!1;_.o=!1;_.p=0;_.q=!1;_.s=!1;_.u=!1;_.v=0;var xq;B(265);
function Jk(){var a,b,c,d;null.Tf();d=(Hp(),wh($doc).clientWidth|0);c=wh($doc).clientHeight|0;null.Tf((fi(),"none"));null.Tf((Cj(),"0.0px"));null.Tf("0.0px");b=$doc;b=(("CSS1Compat"===b.compatMode?b.documentElement:b.body).scrollWidth||0)|0;a=$doc;a=(("CSS1Compat"===a.compatMode?a.documentElement:a.body).scrollHeight||0)|0;null.Tf((b>d?b:d)+"px");null.Tf((a>c?a:c)+"px");null.Tf("block")}function Wr(){}r(323,1,{709:1,15:1},Wr);B(323);function Xr(a){this.a=a}r(324,1,Da,Xr);
_.kc=function(a){var b=this.a,c,d,e;if(a.a||!b.s&&a.b)b.q&&(a.a=!0);else if(!a.a)switch(d=a.d,c=(K(),M).Ab(d),(c=ph(c)?Xg((R(),b.ab),c):!1)&&(a.b=!0),b.q&&(a.a=!0),e=(R(),kp((K(),d).type)),e){case 4:case 1048576:if(jp){a.b=!0;break}!c&&b.d&&b.Tc(!0);break;case 8:case 64:case 1:case 2:case 4194304:jp&&(a.b=!0);break;case 2048:d=M.Ab(d),b.q&&!c&&d&&(d.blur&&d!=$doc.body&&d.blur(),a.a=!0)}};B(324);function Yr(a){this.a=a}r(325,1,Ea,Yr);_.Ub=function(){this.a.e&&this.a.Sc()};B(325);
function Zr(a){if(a.i){if(a.a.o){$doc.body.appendChild(a.a.i);var b;b=a.a.j;Hp();Qp||(oq(),Qp=!0);Up||(pq(),Up=!0);b=Mp((!Kk&&(Kk=new sk),Kk),b);a.f=b;Jk();a.b=!0}}else a.b&&($doc.body.removeChild(a.a.i),$r(a.f.a),a.f=null,a.b=!1)}function as(a){a.i||(Zr(a),a.c||Yq((ap(),bs()),a.a));(wq(),xq).cd(O(a.a),"rect(auto, auto, auto, auto)");O(a.a).style.overflow="visible"}
function cs(a,b){var c,d,e,f;a.i||(b=1-b);c=w(b*a.d);e=w(b*a.e);f=a.d-c>>1;d=a.e-e>>1;e=d+e;c=f+c;(wq(),xq).cd(O(a.a),"rect("+f+"px, "+e+"px, "+c+"px, "+d+"px)")}
function Rr(a,b,c){a.c=c;Ed(a);a.g&&(Xd(a.g),a.g=null,as(a));a.a.u=b;var d=a.a;d.r&&($r(d.r.a),d.r=null);d.k&&($r(d.k.a),d.k=null);if(d.u){d.r=yp(new Xr(d));var e;e=new Yr(d);Bp();e=Ok(Dp.a,(!Nk&&(Nk=new sk),Nk),e);d.k=e}c=!c&&a.a.n;a.i=b;c?b?(Zr(a),O(a.a).style.position="absolute",-1!=a.a.v&&a.a.Uc(a.a.p,a.a.v),(wq(),xq).cd(O(a.a),"rect(0px, 0px, 0px, 0px)"),Wq((ap(),bs()),a.a),a.g=new ds(a),Wd(a.g,1)):Fd(a,200):(Zr(a),a.i?(O(a.a).style.position="absolute",-1!=a.a.v&&a.a.Uc(a.a.p,a.a.v),Wq((ap(),
bs()),a.a)):a.c||Yq((ap(),bs()),a.a),O(a.a).style.overflow="visible")}function es(a){Jd.call(this);this.a=a}r(321,115,{},es);_.gb=function(){as(this)};_.hb=function(){var a=this.a;this.d=hh((R(),a.ab),"offsetHeight");a=this.a;this.e=hh((R(),a.ab),"offsetWidth");O(this.a).style.overflow="hidden";cs(this,(1+$wnd.Math.cos(3.141592653589793))/2)};_.ib=function(a){cs(this,a)};_.a=null;_.b=!1;_.c=!1;_.d=0;_.e=-1;_.i=!1;B(321);function ds(a){this.a=a}r(322,49,{},ds);
_.nb=function(){this.a.g=null;Fd(this.a,200)};B(322);function mr(){mr=k;fs()}function nr(a){return function(){this.__gwt_resolve=gs;return a.wc()}}function gs(){throw"A PotentialElement cannot be resolved twice.";}
function fs(){function a(){}a.prototype={className:"",clientHeight:0,clientWidth:0,dir:"",getAttribute:function(a){return this[a]},href:"",id:"",lang:"",nodeType:1,removeAttribute:function(a){this[a]=void 0},setAttribute:function(a,c){this[a]=c},src:"",style:{},title:""};$wnd.GwtPotentialElementShim=a}r(664,663,Ba);B(664);function ap(){ap=k;qq();hs=new is;js=new Ag;bp=new Vk}
function bs(){ap();var a;if(a=Q(js,null))return a;0==ks(js)&&(a=new ls,Hp(),Qp||(oq(),Qp=!0),Mp(Hk?Hk:Hk=new sk,a));a=new ms;el(js,null,a);Hm(bp,a);return a}r(157,485,Fa);var hs,js,bp;B(157);function is(){}r(487,1,{},is);_.Mc=function(a){a.Cc()&&a.Ec()};B(487);function ls(){}r(488,1,Ga,ls);_.Tb=function(){ap();try{Pq(bp,hs)}finally{bp.a.tf(),ns(js)}};B(488);function ms(){var a=(ap(),$doc.body);qq();this.b=new sr(this);this.ab=(R(),a);Eq(this)}r(486,157,Fa,ms);B(486);
function wr(a){this.c=a;this.a=!!this.c.w}r(260,1,{},wr);_.Wc=function(){if(!this.a||!this.c.w)throw(new pd).backingJsObject;this.a=!1;return this.b=this.c.w};_.Vc=Ic;_.Xc=function(){this.b&&ur(this.c,this.b)};_.a=!1;_.b=null;B(260);r(261,1,{},function(){});B(261);function Uq(a,b){var c;for(c=0;c<a.c;++c)if(a.a[c]==b)return c;return-1}
function Xq(a,b,c){var d,e;if(0>c||c>a.c)throw(new Dc).backingJsObject;if(a.c==a.a.length){e=Ib(Nq,h,17,2*a.a.length,0);for(d=0;d<a.a.length;++d)e[d]=a.a[d];a.a=e}++a.c;for(d=a.c-1;d>c;--d)a.a[d]=a.a[d-1];a.a[c]=b}function sr(a){this.b=a;this.a=Ib(Nq,h,17,4,0)}r(541,1,{},sr);_.Kc=function(){return new Vq(this)};_.c=0;B(541);function Vq(a){this.c=a}r(231,1,{},Vq);_.Wc=function(){if(this.b>=this.c.c)throw(new pd).backingJsObject;this.a=this.c.a[this.b];++this.b;return this.a};
_.Vc=function(){return this.b<this.c.c};_.Xc=function(){if(!this.a)throw(new vd).backingJsObject;this.c.b.Lc(this.a);--this.b;this.a=null};_.b=0;B(231);function os(){os=k;cp();Dg()}function ps(){ps=k;os()}function dr(){dr=k;zr=1==bb?new qs:new rs;er=A(zr,132)?new ss:zr}function ss(){}r(131,1,{131:1},ss);_.Yc=function(a){a.blur()};_.Zc=function(){var a;a=xh();a.tabIndex=0;return a};_.$c=function(a){a.focus()};var zr,er;B(131);
function ts(){return function(){var a=this.parentNode;a.onfocus&&$wnd.setTimeout(function(){a.focus()},0)}}function rs(){dr()}r(132,131,Ha,rs);_.Zc=function(){var a=us?us:us=ts(),b=$doc.createElement("div");b.tabIndex=0;var c=$doc.createElement("input");c.type="text";c.tabIndex=-1;c.setAttribute("role","presentation");var d=c.style;d.opacity=0;d.height="1px";d.width="1px";d.zIndex=-1;d.overflow="hidden";d.position="absolute";c.addEventListener("focus",a,!1);b.appendChild(c);return b};var us;B(132);
function qs(){dr()}r(630,132,Ha,qs);_.Yc=function(a){$wnd.setTimeout(function(){a.blur()},0)};_.$c=function(a){$wnd.setTimeout(function(){a.focus()},0)};B(630);function Or(){}r(177,1,{177:1},Or);_._c=function(){return xh()};_.ad=vs;_.bd=function(a){return Wg((K(),a))};_.cd=function(a,b){a.style.clip=b};B(177);
function ws(){ws=k;a:{var a=navigator.userAgent;if(-1!=a.indexOf("Macintosh")&&(a=/rv:([0-9]+)\.([0-9]+)/.exec(a))&&3==a.length&&1008>=1E3*parseInt(a[1])+parseInt(a[2])){xs=!0;break a}xs=!1}}function Pr(){ws()}r(631,177,{177:1},Pr);_._c=function(){var a;a=(R(),xh());xs&&(a.innerHTML="\x3cdiv\x3e\x3c/div\x3e",Mg((Jg(),Kg),new ys(a)));return a};_.ad=function(a){return xs?gh((K(),a)):a};_.bd=function(a){return xs?a:Wg((K(),a))};
_.cd=function(a,b){a.style.clip=b;a.style.display=(fi(),"none");a.style.display=""};var xs=!1;B(631);function ys(a){this.a=a}r(632,1,{},ys);_.tb=function(){this.a.style.overflow=(Ti(),"auto")};B(632);function zs(){var a,b;b=0==bb?new As:new Bs;a=b.dd();b=b.ed();if(a!==b)throw(new Cs(a,b)).backingJsObject;}r(138,11,aa);B(138);r(41,138,aa);B(41);
function Cs(a,b){Fb();var c=(y(),Ab("Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value ("+a+") does not match the runtime user.agent value ("+b+").\nExpect more errors.")),d=A("Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value ("+a+") does not match the runtime user.agent value ("+b+").\nExpect more errors.",11)?"Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value ("+a+") does not match the runtime user.agent value ("+
b+").\nExpect more errors.":null;Hb(this);this.e=d;this.f=c;Kb(this);this.qb()}r(247,41,aa,Cs);B(247);function As(){}r(545,1,{702:1},As);_.dd=function(){return"gecko1_8"};_.ed=function(){var a=navigator.userAgent.toLowerCase(),b=$doc.documentMode;return-1!=a.indexOf("webkit")?"safari":-1!=a.indexOf("msie")&&10<=b&&11>b?"ie10":-1!=a.indexOf("msie")&&9<=b&&11>b?"ie9":-1!=a.indexOf("msie")&&8<=b&&11>b?"ie8":-1!=a.indexOf("gecko")||11<=b?"gecko1_8":"unknown"};B(545);function Bs(){}r(544,1,{702:1},Bs);
_.dd=function(){return"safari"};_.ed=function(){var a=navigator.userAgent.toLowerCase(),b=$doc.documentMode;return-1!=a.indexOf("webkit")?"safari":-1!=a.indexOf("msie")&&10<=b&&11>b?"ie10":-1!=a.indexOf("msie")&&9<=b&&11>b?"ie9":-1!=a.indexOf("msie")&&8<=b&&11>b?"ie8":-1!=a.indexOf("gecko")||11<=b?"gecko1_8":"unknown"};B(544);function $r(a){var b=a.a,c=a.d,d=a.c;a=a.b;0<b.b?(c=new Ds(b,c,d,a),!b.a&&(b.a=new Sd),Vd(b.a,c)):cl(b,c,d,a)}function Sk(a,b,c){this.a=a;this.d=b;this.c=null;this.b=c}
r(470,1,{},Sk);B(470);function Pk(a,b,c){this.a=a;this.d=b;this.c=null;this.b=c}r(471,1,{701:1},Pk);_.tb=function(){var a=this.b;Qk(this.a,this.d,this.c).xf(a)};B(471);function Ds(a,b,c,d){this.a=a;this.d=b;this.c=c;this.b=d}r(472,1,{701:1},Ds);_.tb=function(){cl(this.a,this.d,this.c,this.b)};B(472);
function Es(){Es=k;a:{var a=document.createElement("fakeelement"),b={animationName:"animationend",OAnimationName:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},c;for(c in b)if(void 0!==a.style[c]){Fs=b[c];break a}Fs=void 0}a:for(a=document.createElement("fakeelement"),b=["animation","oAnimation","mozAnimation","webkitAnimation"],c=0;c<b.length;c++)if(void 0!==a.style[b[c]])break a}
function Gs(a,b){Es();var c=Qd(function(a){b.fd(a)});a.addEventListener(Fs,c,!1);!a._vaadin_animationend_callbacks&&(a._vaadin_animationend_callbacks=[]);a._vaadin_animationend_callbacks.push(c);return c}function Hs(a){Es();return a.webkitAnimationName?a.webkitAnimationName:a.animationName?a.animationName:a.mozAnimationName?a.mozAnimationName:a.oAnimationName?a.oAnimationName:""}
function Is(a){Es();a=a.a;return a.getPropertyValue?a.getPropertyValue("-webkit-animation-name")?a.getPropertyValue("-webkit-animation-name"):a.getPropertyValue("animation-name")?a.getPropertyValue("animation-name"):a.getPropertyValue("-moz-animation-name")?a.getPropertyValue("-moz-animation-name"):a.getPropertyValue("-o-animation-name")?a.getPropertyValue("-o-animation-name"):"":""}var Fs;function Js(){Js=k;var a;a=Ks((!U&&(U=new Ls),U));ap();rq(bs(),a)}
function Ks(a){var b,c,d,e;null==Ms&&(b=e=d=c="",a.a.e?(c="ff",d="ff"+a.a.a,e=d+a.a.b,b="gecko"):a.a.c?(c="sa",d="ch",b="webkit"):a.a.o?(c="sa",d="sa"+a.a.a,e=d+a.a.b,b="webkit"):a.a.g?(c="ie",d="ie"+a.a.a,e=d+a.a.b,b="trident"):a.a.d?(c="edge",d="edge"+a.a.a,e=d+a.a.b,b=""):a.a.k&&(c="op",d="op"+a.a.a,e=d+a.a.b,b="presto"),Ms="v-"+c,""===d||(Ms=Ms+" v-"+d),""===e||(Ms=Ms+" v-"+e),""===b||(Ms=Ms+" v-"+b),b=5==a.a.r?"v-android":4==a.a.r?"v-ios v-ios"+a.a.s:1==a.a.r?"v-win":3==a.a.r?"v-lin":2==a.a.r?
"v-mac":null,null!=b&&(Ms=Ms+" "+b),a.b&&(Ms+=" v-touch"));return Ms}function Ns(a){return 8==a.a.a?0<=a.a.b:8<a.a.a}function Os(a){return a.a.g&&8==a.a.a}function Ps(a){return a.a.g&&9==a.a.a}
function Ls(){Js();var a;this.a=new Qs(Rs());if(this.a.g&&(a=(a=$wnd.document.documentMode)?a:-1,-1!=a)){var b=this.a;b.a=a;b.b=0}if(this.a.c)this.b="ontouchstart"in window;else if(this.a.g)this.b=!!navigator.msMaxTouchPoints;else{if(a=!this.a.n)try{document.createEvent("TouchEvent"),a=!0}catch(c){a=!1}this.b=a}}function Rs(){Js();return $wnd.navigator.userAgent}r(29,1,{},Ls);_.b=!1;var Ms=null,U;B(29);
function Ss(a){var b;a:{b="height";var c=a.a;a=a.b;if(-1<b.indexOf("border")&&-1<b.indexOf("Width")){var d=b.substring(0,b.length-5)+"Style";if("none"==(c.getPropertyValue?c.getPropertyValue(d):c[d])){b="0px";break a}}if(c.getPropertyValue)b=b.replace(/([A-Z])/g,"-$1").toLowerCase(),d=c.getPropertyValue(b);else{var d=c[b],e=a.style;if(!/^\d+(px)?$/i.test(d)&&/^\d/.test(d)){var f=e.left,g=a.runtimeStyle.left;a.runtimeStyle.left=c.left;e.left=d||0;d=e.pixelLeft+"px";e.left=f;a.runtimeStyle.left=g}}-1<
b.indexOf("margin")&&"auto"==d?b="0px":("width"==b&&"auto"==d?d=a.clientWidth+"px":"height"==b&&"auto"==d&&(d=a.clientHeight+"px"),b=d)}return parseFloat(b)}function Ts(a){var b;b=1!=a.nodeType?{}:$wnd.document.defaultView&&$wnd.document.defaultView.getComputedStyle?$wnd.document.defaultView.getComputedStyle(a,null):a.currentStyle?a.currentStyle:void 0;this.a=b;this.b=a}r(176,1,{},Ts);B(176);function Us(){Us=k;R();xh()}
function Vs(a){Us();var b;if(a){for(b=null;!b&&a;)b=(R(),Sm(a)),!b&&(a=Wg((K(),a)));if(A(b,17))for(a=b;a;)return a}return null}
function Ws(a,b){Us();if("function"===typeof $wnd.getComputedStyle){var c=$wnd.getComputedStyle(a),d=0;for(i=0;i<b.length;i++)d+=parseFloat(c[b[i]]);return d}c=a.offsetParent;d=a.cloneNode(!1);d.style.boxSizing="content-box";c.appendChild(d);d.style.height="10px";var e=d.offsetHeight;for(i=0;i<b.length;i++)d.style[b[i]]="0";var f=d.offsetHeight;c.removeChild(d);return e-f}function Xs(){Us();return $wnd.document.activeElement?$wnd.document.activeElement:null}
function Ys(){Us();var a;0>Zs&&(a=(R(),xh()),a.style.width="50px",a.style.height="50px",a.style.overflow="scroll",a.style.position="absolute",a.style.marginLeft="-5000px",(ap(),$doc.body).appendChild(a),Zs=((a.offsetWidth||0)|0)-(parseInt(a.clientWidth)|0),$doc.body.removeChild(a));return Zs}function $s(a){Us();null!=a.getBoundingClientRect?(a=a.getBoundingClientRect(),a=a.bottom-a.top):a=a.offsetHeight;return a}
function at(a){Us();return a.getBoundingClientRect?(a=a.getBoundingClientRect(),a.right-a.left):a.offsetWidth}function bt(a){Us();return-1!=Oc((K(),a).type,"touch")?ck(a.changedTouches[0]):uh(a.clientX||0)}function ct(a){Us();return-1!=Oc((K(),a).type,"touch")?dk(a.changedTouches[0]):uh(a.clientY||0)}function dt(a,b){Us();return.49>=(0>=a-b?0-(a-b):a-b)}
function et(a,b){var c,d,e,f;Us();var g;if(Os((Js(),!U&&(U=new Ls),Js(),U)))return b?$wnd.Math.ceil(a):w(a);var l,m,n;if(-1==ft){g=xh();$doc.body.appendChild(g);g.style.height=(Cj(),"0.999999px");m=new Ts(g);l=Ss(m);if(.999999>l)ft=vl(ul($wnd.Math.round(1/(1-l))));else{for(n=1;0!=Ss(m);)l=Ss(m),n/=2,g.style.height=n+"px";ft=vl(ul($wnd.Math.round(1/l)))}(l=Wg((K(),g)))&&l.removeChild(g)}g=ft;return 0>g||0>a?a:b?(c=w(a),d=(a-c)*g,c+$wnd.Math.ceil(d)/g):(e=w(a),f=(a-e)*g,e+w(f)/g)}
function gt(a,b){Us();b?(a.ondrag=null,a.onselectstart=null,a.style.webkitUserSelect="text"):(a.ondrag=function(){return!1},a.onselectstart=function(){return!1},a.style.webkitUserSelect="none")}var Zs=-1,ft=-1;function ht(a){var b;b=it(a.e,jt(a));kt(a,b[0]);a.e=b[1];kt(a,b[2])}function kt(a,b){var c,d;for(c=b.b;c<b.a;c++)d=dl(a.k,F(c)),null!=d&&dl(a.n,a.hd(d))}function lt(a){a.f||(a.f=!0,Mg((Jg(),Kg),a.g))}function mt(a){var b;b=a.ld();-1==b&&(b=nt(a.q));return W(0,b)}
function ot(a,b){if(null==b)throw(new Kc("key may not be null (row: "+b+")")).backingJsObject;if(rp(a.p,b))return Q(a.p,b);if(rp(a.n,b))return new pt(a,b,b);throw(new Fq("The cache of this DataSource does not currently contain the row "+b)).backingJsObject;}function jt(a){var b;b=mt(a);var c=a.q;a=(c.a-c.b)*a.d.a;return qt(new rt(c.b-a,c.a+a),b)}function st(a,b){return Q(a.k,F(b))}function tt(a,b){b.b>=b.a||(a.i=new ut(a,b),a.jd(b.b,b.a-b.b,a.i))}function vt(a,b){return rp(a.n,b)?Q(a.n,b).a:-1}
function wt(a,b,c){var d;b=dl(a.k,F(b));rp(a.k,F(c))&&(d=dl(a.k,F(c)),null!=d&&dl(a.n,d));el(a.k,F(c),b);null!=b&&el(a.n,b,F(c))}function xt(a,b){var c,d;d=b.a;c=Q(a.o,d);c||(c=F(0),el(a.p,d,b));el(a.o,d,F(c.a+1))}
function yt(a,b){a.r=b;kt(a,a.e);a.e=W(0,0);if(a.j){var c=a.j,d,e,f,g,l;d=c.a.v.a;l=d.p;g=new zt(c.a.W);for(g=(f=(new Im(g.a)).a.pf().Kc(),new Jm(f));g.a.Vc();)f=(e=g.a.Wc(),e.If()).a,At(c.a,f,!1);b>l?(Bt(d,l,b-l),Ct(c.a.c,W(l,b-l))):b<l&&(Dt(d,b,l-b),Et(c.a.c,W(b,l-b)));0<b?(c.a.p=!0,d=Ft(c.a.v),c=c.b,c.q=W(d.b,d.a-d.b),lt(c)):(c.a.o=W(0,0),T(c.a,new Gt(c.a.o)))}}function Ht(a,b){(a.j=b)&&!It(a.e)&&(Jt(b.a.v.a,a.e.b,nt(a.e)),Kt(b,a.e.b,nt(a.e)))}
function Lt(a,b,c){var d,e,f,g;d=W(b,c.ld());a.i&&(Gd(),a.i=null);e=jt(a);e=it(d,e);f=e[1];if(f.b<f.a){for(d=f.b;d<f.a;d++)g=c.yf(d-b),el(a.k,F(d),g),el(a.n,a.hd(g),F(d));a.j&&Jt(a.j.a.v.a,f.b,f.a-f.b);It(a.e)?a.e=f:(ht(a),It(a.e)?a.e=f:a.e=Mt(a.e,f));a.j&&Kt(a.j,a.e.b,nt(a.e));for(d=c.Kc();d.Vc();)b=d.Wc(),f=a.hd(b),(f=Q(a.p,f))&&(f.b=b)}if(!It(e[0])||!It(e[2])){for(b=0;b<nt(e[0]);++b)c.yf(b);for(d=0;d<nt(e[2]);++d)c.yf(d)}lt(a)}
function Nt(a,b){var c,d;d=b.a;if(c=Q(a.o,d)){var e=F(1);A(e,97)&&e.a==c.a?(dl(a.p,d),dl(a.o,d)):el(a.o,d,F(c.a-1))}else throw(new Fq("Row "+b.b+" with key "+d+" was not pinned to begin with")).backingJsObject;}r(427,1,{});_.kd=function(a){yt(this,a)};_.ld=function(){return this.r};_.f=!1;_.r=-1;B(427);function Ot(a){this.a=a}r(358,1,{},Ot);
_.tb=function(){this.a.f=!1;var a=this.a,b;if(!a.i){b=mt(a);var c=a.q,d;d=(c.a-c.b)*a.d.b;b=qt(new rt(c.b-d,c.a+d),b);!Pt(b,a.e)||It(a.e)?(kt(a,a.e),a.e=new rt(0,0),tt(a,jt(a))):(ht(a),Qt(b,a.e)?a.j&&Kt(a.j,a.e.b,nt(a.e)):(b=it(jt(a),a.e),tt(a,b[0]),tt(a,b[2])))}};B(358);function ut(a,b){this.d=a;this.c=b;this.b=Gd()}r(145,1,{},ut);_.md=function(a,b){this.d.r!=b&&this.d.kd(b);Lt(this.d,this.c.b,a)};_.b=0;B(145);r(196,1,{196:1});_.bb=function(a){return Rt(this,a)};_.db=function(){return kb(this.a)};
B(196);function Rt(a,b){return A(b,146)?mb(a.a,b.a):!1}function pt(a,b,c){this.c=a;this.b=b;this.a=c}r(146,196,{146:1,196:1},pt);B(146);r(679,1,{});B(679);function St(){this.b=3;this.a=4}r(227,679,{},St);_.a=0;_.b=0;B(227);function Tt(a,b){var c,d,e;c=a.a.c;for(e=0;e<c.childNodes.length;e++)(d=c.childNodes[e])&&1==d.nodeType&&(b?d.style.visibility="":d.style.visibility=(Wj(),"hidden"))}r(51,1,{51:1});_.nd=Kq;_.od=function(){return fl(),fl(),gl};_.qd=$m;B(51);r(64,51,{51:1,64:1});_.pd=Ut;
_.rd=function(a,b){var c;c=a.a.c;var d;c=(d=Vs(gh((K(),c))),d);this.td(a,b,c)};B(64);r(674,64,Ia);_.Sb=Ut;B(674);function Vt(a){a.a.ud();a.a.vd();a.f.f||Wd(a.f,100)}function Wt(a){a.e&&($r(a.e.a),a.e=null)}function Xt(){this.f=new Yt(this);this.c=new Zt(this)}r(192,1,{},Xt);_.d=!1;B(192);function Yt(a){this.a=a}r(331,49,{},Yt);_.nb=function(){var a=(ap(),$doc.body);R();jp&&a==jp&&(jp=null);ep.qc(a);this.a.a&&(this.a.a.vd(),this.a.a=null);this.a.b&&($r(this.a.b.a),this.a.b=null);this.a.d=!1};B(331);
function Zt(a){this.a=a}r(332,1,Da,Zt);_.kc=function(a){var b;if(this.a.d)switch(b=xp(a.d),b){case 64:case 2097152:this.a.a.xd(a.d);break;case 128:b=Kh(a.d);27==b&&Vt(this.a);break;case 8388608:Vt(this.a);break;case 4194304:case 8:this.a.a.xd(a.d),this.a.a.yd(),b=this.a,b.f.f||Wd(b.f,100)}else b=this.a,b.f.f||Wd(b.f,100);b=a.d;(K(),b).stopPropagation();Nh(a.d);a.a=!0};B(332);function $t(a,b,c){this.c=a;this.e=b;this.d=c;this.a=(Us(),bt(this.e));this.b=ct(this.e)}r(333,1,Da,$t);
_.kc=function(a){var b,c;b=xp(a.d);if(-1!=b||-1==Oc(Rb(Mh(a.d)).toLowerCase(),"pointer"))switch(b){case 16:case 32:break;case 128:case 256:case 512:case 4096:case 2048:break;case 64:case 2097152:b=(Us(),bt(a.d));c=ct(a.d);if(3<au(this.a-b)||3<au(this.b-c))if(Wt(this.c),b=this.c,c=this.d,c.wd(this.e)){b.a=c;b.d=!0;var d=(ap(),$doc.body);R();jp=d;ep.rc(d);b.b=yp(b.c);c.xd(a.d)}b=a.d;(K(),b).stopPropagation();Nh(a.d);a.a=!0;break;default:Wt(this.c)}};_.a=0;_.b=0;B(333);
function bu(a,b){this.e=null;this.d=(R(),yh("div"));this.a=a;this.f=b;$g(this.d,this.a);this.b=new cu(this);this.c=new Xt;wp(this.d,1048580);this.d.__listener=new du(this)}r(328,1,{},bu);B(328);function cu(a){this.c=a}r(329,1,{},cu);_.ud=function(){mh(this.c.d,this.c.a+"-dragged");var a=this.c.f;a.a.Se(a.b);gt(O(a.d.c),!0)};_.vd=Kq;
_.wd=function(a){$g(this.c.d,this.c.a+"-dragged");this.a=(Us(),Us(),-1!=Oc((K(),a).type,"touch")?ck(a.changedTouches[0]):uh(a.clientX||0));this.b=-1!=Oc(a.type,"touch")?dk(a.changedTouches[0]):uh(a.clientY||0);a=this.c.f;var b,c;a.b=eu(a.a);b=fu(gu(new zo(a.d.c.n)),a.a);b=hu(a.d.c.v.c,b);a.c=b;for(c=new iu(gu(new zo(a.d.c.n)).b.Kc());c.b.Vc();)b=c.b.Wc(),a.d.c.R!=b&&0>b.t&&(b.Se(eu(b)),T(a.d.c,new ju));gt(O(a.d.c),!1);return!0};
_.xd=function(a){var b;b=(Us(),Us(),(-1!=Oc((K(),a).type,"touch")?ck(a.changedTouches[0]):uh(a.clientX||0))-this.a);-1!=Oc(a.type,"touch")?dk(a.changedTouches[0]):uh(a.clientY||0);a=this.c.f;a.a.Se($wnd.Math.max(a.c,a.b+b))};_.yd=function(){mh(this.c.d,this.c.a+"-dragged");var a=this.c.f;T(a.d.c,new ju);gt(O(a.d.c),!0)};_.a=0;_.b=0;B(329);function du(a){this.a=a}r(330,1,{20:1},du);_.lc=function(a){var b=this.a.c;b.e=yp(new $t(b,a,this.a.b));(K(),a).stopPropagation()};B(330);
function ku(a,b,c){this.c=a;this.a=b;this.b=c}r(109,1,{},ku);_.a=0;_.c=0;B(109);function lu(){lu=k;mu=new nu}var mu;function nu(){}r(315,1,{},nu);_.zd=ou;_.Ad=ou;_.Bd=ou;_.Cd=ou;_.Dd=ou;B(315);function pu(a,b){var c;a.b=b;b.b&&(c=a.d.c.cells[a.a],c.colSpan=1,0<=a.d.b[a.a]&&(c.style.width=a.d.b[a.a]+(Cj(),"px")),c.style.display="",a.c=c)}function qu(a,b){this.d=a;this.a=b}r(95,1,{95:1},qu);_.a=0;_.b=null;_.c=null;var ru=B(95);function su(a){return new tu(a,0,a.a.a.length)}
function uu(a,b,c,d){a.c=b;a.d=c;a.b=d}function vu(a,b){var c;for(c=b;c<a.a.a.length;c++)wu(a.a,c,new qu(a,c))}function xu(){this.a=new Sd}r(554,1,{},xu);_.b=null;_.d=0;B(554);function tu(a,b,c){this.a=a;this.c=b;this.b=c}r(174,1,{},tu);_.Kc=function(){return new yu(new zu(this.a.a,this.c,this.c+this.b),!0)};_.b=0;_.c=0;B(174);function Au(a,b,c){this.a=a;this.c=b;this.b=c}r(235,1,{},Au);_.Kc=function(){return new yu(new zu(this.a.a,this.c,this.c+this.b),!1)};_.b=0;_.c=0;B(235);
function Bu(a){var b;for(b=0;b<a.d;b++)Cu(a.a,a.c);a.d=0;b=Jr(a.a,a.c++);pu(b,a);return b}function Du(a,b){var c,d,e;e=new zu(a.a,Nb(a.c,a.a.a.length),Nb(a.c+b,a.a.a.length));for(d=new Yl(e);d.b<d.d.ld();)c=(od(d.b<d.d.ld()),d.d.yf(d.c=d.b++)),pu(c,a);return e}function yu(a,b){this.a=new zo(a);this.b=b}r(107,1,{},yu);_.Wc=function(){return Bu(this)};_.Vc=function(){return this.c+this.d<this.a.a.length};_.Xc=function(){throw(new Oq("Cannot remove cells via iterator")).backingJsObject;};_.b=!1;
_.c=0;_.d=0;B(107);function Eu(){}r(129,1,{129:1},Eu);_.Ed=function(a){a.style.left="";a.style.top=""};_.Fd=function(a,b,c){a.style.left=b+(Cj(),"px");a.style.top=c+"px"};B(129);function Fu(){}r(546,1,{},Fu);_.Ed=Gu;_.Fd=function(a,b,c){a.style.transform="translate3d("+b+"px, "+c+"px, 0)"};B(546);function Hu(){}r(547,1,{},Hu);_.Ed=Gu;_.Fd=function(a,b,c){a.style.transform="translate("+b+"px,"+c+"px)"};B(547);function Iu(){}r(548,1,{},Iu);_.Ed=function(a){a.style.webkitTransform=""};
_.Fd=function(a,b,c){a.style.webkitTransform="translate3d("+b+"px,"+c+"px,0)"};B(548);function Ju(){Ju=k;Ku=new sk}function Lu(a,b){Ju();this.a=W(a,b)}r(230,666,{},Lu);_.Nb=function(a){var b;a.a.q&&(b=S(a.a.q.c.c,"size"),0!=X((Y(),Z),b,F(0),F(0)).a)&&(a.a.p=!0,a=a.a.q,a.q=W(this.a.b,nt(this.a)),lt(a))};_.Ob=function(){return Ku};var Ku;B(230);function Mu(a,b){return Ok((!a.a&&(a.a=new $k(a)),a.a),(Nu(),Ou),b)}
function Pu(a){var b;b=a.j;a.j=.49<Qu(a.Od())-Qu(a.Md());b!=a.j&&(b=new Ru,Tk((!a.a&&(a.a=new $k(a)),a.a),b))}function Su(a,b){b?a.g.style.display="":a.g.style.display=(fi(),"none");a.Ld(b)}function Tu(a){return a.c?0:Qu(a.Pd())}function Uu(a){return!!a.o||!!a.f}function Vu(a){var b,c;c=Qu(a.Od());b=Qu(a.Md());a.e=$wnd.Math.max(0,c-b);Wu(a,a.k)}function Xu(a,b){var c;c=b>Qu(a.Od());.49<Qu(a.Od())-Qu(a.Md())&&c&&0!=a.k?(a.f=Mu(a,new Yu(a,b)),Wu(a,0)):Zu(a,b)}
function Zu(a,b){a.Qd($wnd.Math.max(0,b));Vu(a);Su(a,.49<Qu(a.Od())-Qu(a.Md()));Pu(a);a.f&&($r(a.f.a),a.f=null)}function Wu(a,b){var c;a.d||(c=a.k,a.k=$wnd.Math.max(0,$wnd.Math.min(a.e,0<b?$wnd.Math.floor(b):$wnd.Math.ceil(b))),dt(c,a.k)||(a.c&&$u(a.b),a.Rd(Math.round(a.k)|0)))}function av(a,b){0!=b&&Wu(a,a.k+b)}function bv(a,b){var c;c=b<=Qu(a.Md());.49<Qu(a.Od())-Qu(a.Md())&&c&&0!=a.k?(a.o=Mu(a,new cv(a,b)),Wu(a,0)):dv(a,b)}
function dv(a,b){a.Sd($wnd.Math.max(0,b));Vu(a);Su(a,.49<Qu(a.Od())-Qu(a.Md()));Pu(a);a.o&&($r(a.o.a),a.o=null)}function ev(a,b){a.c=0==b;a.c?(wp(a.g,16384),R(),a.g.__listener=new fv(a),a.g.style.visibility=(Wj(),"hidden")):(wp(a.g,0),R(),a.g.__listener=null,a.g.style.visibility="");a.Td($wnd.Math.max(1,b))}function gv(a){return.49<Qu(a.Od())-Qu(a.Md())}function hv(a){var b;b=a.Nd();a.d?a.k!=b&&a.Rd(Math.round(a.k)|0):(a.k=b,a=a.i,a.b||(Mg((Jg(),Kg),a.a),a.b=!0))}
function iv(){this.g=(R(),xh());this.n=xh();this.b=new jv(this);this.i=new kv(this);this.g.appendChild(this.n);this.g.style.display=(fi(),"none");this.g.tabIndex=-1}function Qu(a){return 0==(y(),a).length?0:yc(Tc(a,0,a.length-2))}r(214,1,{});_.Kd=gk;_.Ud=function(){hv(this)};_.c=!1;_.d=!1;_.e=0;_.j=!1;_.k=0;B(214);function Yu(a,b){this.a=a;this.b=b}r(456,1,Ja,Yu);_.Vd=function(){Zu(this.a,this.b)};_.b=0;B(456);function cv(a,b){this.a=a;this.b=b}r(457,1,Ja,cv);_.Vd=function(){dv(this.a,this.b)};
_.b=0;B(457);function fv(a){this.a=a}r(458,1,{20:1},fv);_.lc=function(){$u(this.a.b)};B(458);function lv(){lv=k;mv=new nv("VERTICAL",0);ov=new nv("HORIZONTAL",1)}function nv(a,b){N.call(this,a,b)}r(120,5,{120:1,3:1,6:1,5:1},nv);var ov,mv,pv=D(120,function(){lv();return z(v(pv,1),h,120,0,[mv,ov])});function qv(){iv.call(this)}r(452,214,{},qv);_.Ld=function(a){a?this.g.style.overflowX=(Ti(),"scroll"):this.g.style.overflowX=""};_.Md=function(){return Qh(this.g.style)};_.Nd=function(){return jh(this.g)};
_.Od=rv;_.Pd=sv;_.Qd=function(a){this.g.style.width=a+(Cj(),"px")};_.Rd=function(a){var b=this.g;(K(),M).Kb(b,a)};_.Sd=function(a){this.n.style.width=a+(Cj(),"px")};_.Td=function(a){this.g.style.paddingBottom=a+(Cj(),"px");this.g.style.height="0.0px";this.n.style.height=a+"px"};B(452);function kv(a){this.c=a;this.a=new tv(this)}r(448,1,{},kv);_.b=!1;B(448);function tv(a){this.a=a}r(453,1,{},tv);_.tb=function(){hv(this.a.c);var a=this.a.c;!a.a&&(a.a=new $k(a));Tk(a.a,new uv);this.a.b=!1};B(453);
function $u(a){a.a.Td(13);a.a.g.style.visibility=(Wj(),"visible");Wd(a.b,1E3)}function jv(a){this.a=a;this.b=new vv(this)}r(449,1,{},jv);B(449);function vv(a){this.a=a}r(454,49,{},vv);_.nb=function(){this.a.a.Td(1);this.a.a.g.style.visibility=(Wj(),"hidden")};B(454);function wv(){iv.call(this)}r(451,214,{},wv);_.Ld=function(a){a?this.g.style.overflowY=(Ti(),"scroll"):this.g.style.overflowY=""};_.Md=function(){return Oh(this.g.style)};_.Nd=function(){return(this.g.scrollTop||0)|0};_.Od=sv;_.Pd=rv;
_.Qd=function(a){this.g.style.height=a+(Cj(),"px")};_.Rd=function(a){this.g.scrollTop=a};_.Sd=function(a){this.n.style.height=a+(Cj(),"px")};_.Td=function(a){this.g.style.paddingRight=a+(Cj(),"px");this.g.style.width="0.0px";this.n.style.width=a+"px"};B(451);function xv(){xv=k;yv=new zv}function Ru(){xv()}r(450,666,{},Ru);_.Nb=function(a){a.a||(a.a=!0,Rg((Jg(),Kg),new Av(a)))};_.Ob=function(){return yv};var yv;B(450);function zv(){this.c=++rk}r(455,34,{},zv);_.eb=function(){return"VisibilityChangeEvent"};
B(455);function Bv(){Bv=k;Cv=new Dv}var Cv;function Dv(){}r(314,1,{},Dv);_.Wd=Ut;_.Xd=Ut;B(314);function Ev(a){var b,c;for(b=c=0;b<(0>a.e.B?0:a.e.S.ee()?a.e.B+1:a.e.B);b++)c+=eu(Fv(a.e,b));return c}function Gv(a){return(a=O(a.e).childNodes[2])?gh((K(),a)):null}function Hv(a){a.g&&($r(a.g.a),a.g=null)}function Iv(a){a.f&&($r(a.f.a),a.f=null);if(a.a){var b=a.a;b.i=!1;b.e&&(b.e.lb(),b.e=null);a.a=null}Hv(a)}function Jv(a){this.k=new Kv(this);this.e=a}r(334,1,{},Jv);_.c=-1;_.d=0;_.i=100;_.n=-1;B(334);
function Kv(a){this.a=a}r(337,1,Da,Kv);_.kc=function(a){var b,c;if(this.a.a)switch(b=a.d,xp(a.d)){case 64:case 2097152:a=(Us(),ct(b));c=bt(b);b=this.a.a;var d;b.p.j==(Lv(),Mv)?d=a:d=c;a=d;var e;-1==b.o?(b.o=Nb(b.c,a),b.a=ce(b.b,a)):(c=b.o,b.o<b.c&&(b.o=ce(b.o,Nb(b.c,a))),e=b.a,b.a>b.b&&(b.a=Nb(b.a,ce(b.b,a))),c=c==b.o,e=e==b.a,a=a!=b.n,b.j=c&&e&&a);Nv(b,d);b.n=d;break;case 8:case 4194304:case 8388608:Iv(this.a)}else Iv(this.a)};B(337);
function Nv(a,b){var c;b<a.o?(c=b-a.o,c=$wnd.Math.max(-1,c/a.d)):b>a.a?(c=b-a.a,c=$wnd.Math.min(1,c/a.d)):c=0;a.k=500*c}function Ov(a,b,c,d){this.p=a;this.c=b;this.b=c;this.d=d}r(336,1,{},Ov);
_.jb=function(a){var b,c,d;b=a-this.g;this.g=a;this.j&&(a=w($wnd.Math.ceil(.001*b)),this.o<this.c?(this.o+=a,this.o=Nb(this.o,this.c),Nv(this,this.n)):this.a>this.b&&(this.a-=a,this.a=ce(this.a,this.b),Nv(this,this.n)));this.f+=b/1E3*this.k;b=w(this.f);this.f-=b;if(0!=b){if(this.p.j==(Lv(),Mv)){d=this.p.e.v.B.k;a=this.p;var e;a=Qu(Oh(a.e.v.B.n.style))-(((e=Gv(a),e?e.tFoot:null).offsetHeight||0)|0)-(((c=Gv(a),c?c.tHead:null).offsetHeight||0)|0)}else d=this.p.e.v.o.k,c=this.p,a=Qu(Qh(c.e.v.o.n.style))-
(((Vg(Gv(c)).offsetWidth||0)|0)-Ev(c));if(0<b&&d<a||0>b&&0<d)c=d+b,this.p.j==Mv?Wu(this.p.e.v.B,c):Wu(this.p.e.v.o,c),e=this.p.b,e.a.a=b,Pv(e.a,null),0>=c?(b=this.p.b,b.a.a=0,Qv(b.a,b.a.c)):c>=a&&(b=this.p.b,b.a.a=0,Qv(b.a,b.a.c))}this.i&&10<=this.d&&(this.e=(!Kd&&(Kd=Ld()?new Md:new Nd),Kd).kb(this,O(this.p.e)))};_.a=-1;_.b=0;_.c=0;_.d=0;_.f=0;_.g=0;_.i=!1;_.j=!1;_.k=0;_.n=0;_.o=-1;B(336);function Lv(){Lv=k;Mv=new Rv("VERTICAL",0);Sv=new Rv("HORIZONTAL",1)}function Rv(a,b){N.call(this,a,b)}
r(116,5,{116:1,3:1,6:1,5:1},Rv);var Sv,Mv,Tv=D(116,function(){Lv();return z(v(Tv,1),h,116,0,[Mv,Sv])});function Uv(a){this.a=a}r(335,1,Da,Uv);_.kc=function(a){switch(xp(a.d)){case 1048576:1==Lh(a.d).length&&Iv(this.a);break;case 2097152:a.a=!0;break;case 4194304:case 8388608:Iv(this.a)}};B(335);function Vv(a,b,c,d){a.d=b;a.c=c;a.b=d}function Wv(a){this.e=a}r(144,1,{},Wv);_.Yd=function(){return this.e.a.cells[this.d]};_.c=0;_.d=0;B(144);function Xv(){Xv=k;Yv=new sk}function Gt(a){Xv();this.a=a}
r(126,666,{},Gt);_.Nb=function(a){a.Zd(this)};_.Ob=function(){return Yv};var Yv;B(126);function Zv(){Zv=k;$v=new aw}var $v;function aw(){}r(262,1,{},aw);_.$d=bw;B(262);function cw(a,b,c){var d,e,f,g,l,m;e=a.e.b;f=b.a;d=null;0<=f&&f<dw(e).b.ld()&&(d=dw(e).a.yf(f));g=b.c;c==(ew(),fw)&&0<=g&&g<(m=S(e.q.c.c,"size"),X((Y(),Z),m,F(0),F(0)).a)?l=st(e.q,g):l=null;c=a.e;c.d=g;c.c=l;c.a=null;e=fu(gu(new zo(e.n)),d);Vv(a,f,e,d);a.a=b.b}function gw(a){this.e=new hw(a)}r(535,144,{},gw);_.Yd=Ic;B(535);
function iw(a){this.e=a}r(354,144,{},iw);_.Yd=jw;B(354);function hw(a){this.b=a}r(202,1,{},hw);_.d=0;B(202);function kw(){kw=k;lw=new sk}function mw(){kw()}r(494,666,{},mw);_.Nb=Xp;_.Ob=function(){return lw};var lw;B(494);function nw(){nw=k;ow=new sk}function ju(){nw()}r(181,666,{},ju);_.Nb=Xp;_.Ob=function(){return ow};var ow;B(181);function pw(){pw=k;qw=new sk}function rw(){pw()}r(529,666,{},rw);_.Nb=Xp;_.Ob=function(){return qw};var qw;B(529);r(229,685,{});
_.Nb=function(a){var b,c;b=Jh(this.d);ph(b)&&!sw(this.b,b)&&(b=tw(this.b.v,b))&&(c=(ew(),uw),b==this.b.v.j?c=vw:b==this.b.v.a&&(c=fw),this.be(a,c))};_.Rb=Ic;B(229);function ww(a,b){this.a=new kk(this.ce(),this);this.b=a;this.c=b}r(539,229,{},ww);_.be=function(a,b){(b==(ew(),fw)&&A(a,162)||b==vw&&A(a,142))&&a.ae(this)};_.ce=function(){return"click"};B(539);function xw(a,b){this.a=new kk(this.ce(),this);this.b=a;this.c=b}r(540,229,{},xw);_.be=yw;_.ce=function(){return"dblclick"};B(540);
function zw(a,b){this.a=new kk(this.ce(),this);this.b=a;this.c=b}r(164,683,{});_.Nb=function(a){var b,c;b=Jh(this.d);ph(b)&&!sw(this.b,b)&&(c=(ew(),uw),b=this.b.c.c,b==this.b.v.j?c=vw:b==this.b.v.a&&(c=fw),this.de(a,c))};_.Rb=Ic;B(164);function Aw(a,b){zw.call(this,a,b)}r(536,164,{},Aw);_.de=function(a,b){if(b==(ew(),fw)&&a){var c;if(32==Kh(this.d)&&!a.b.c){Nh(this.d);a.b.c=!0;c=this.c.e.d;a.a&&($r(a.a.a),a.a=null);a.a=Bw(a.b.b,new Cw(a,c));var d=(Dw(),Ew);Fw(a.b.b,c,d,(Dw(),0))}}};_.ce=function(){return"keydown"};
B(536);function Gw(a,b){zw.call(this,a,b)}r(538,164,{},Gw);_.de=yw;_.ce=function(){return"keypress"};B(538);function Hw(a,b){zw.call(this,a,b)}r(537,164,{},Hw);_.de=function(a,b){(b==(ew(),fw)&&A(a,161)||b==vw&&A(a,647))&&a._d(this)};_.ce=function(){return"keyup"};B(537);function Nu(){Nu=k;Ou=new sk}function uv(){Nu()}r(165,666,{},uv);_.Nb=function(a){a.Vd(this)};_.Ob=function(){return Ou};var Ou;B(165);function Iw(){Iw=k;Jw=new sk}function Kw(){Iw()}r(371,666,{},Kw);
_.Nb=function(a){yb(G(gr(Lw(a))))?a.d.S.selectAll():a.d.S.clear()};_.Ob=function(){return Jw};var Jw;B(371);r(668,1,{});B(668);function Mw(a){this.c=a;this.a=Dq(a,new Nw(this),a.i.a)}r(525,1,{},Mw);_.b=!0;B(525);function Nw(a){this.a=a}r(162,1,{15:1,696:1,697:1,162:1},Nw);_.ae=function(a){a=a.c.e.c;this.a.c.S.fe(a)?this.a.b&&Ow(this.a.c,a):Pw(this.a.c,a)};B(162);
function Qw(a){var b;b=new ir;var c=vq(O(a.c))+"-selection-checkbox";Aq(b.vc(),c);a=new Rw(a,b);vp((R(),b.ab),"mousedown");vp(b.ab,"touchstart");vp(b.ab,"click");Cq(b,a,(yk(),yk(),zk));Cq(b,a,(Ck(),Ck(),Dk));Cq(b,a,(nk(),nk(),ok));return b}function Sw(a,b){var c,d;if(!b)return-1;d=(c=Tw(a),c?c.tBodies[0]:null);for(c=gh((K(),d));c;){if(M.Ib(c,b))return c=gh(c),c=gh(c),parseInt(c.vEscalatorLogicalRow)|0;c=sh(c)}return-1}function Tw(a){return(a=O(a.c).childNodes[2])?gh((K(),a)):null}
function Uw(a){a.d&&($r(a.d.a),a.d=null)}
function Bk(a,b,c){Uw(a);a.d=yp(new Vw(a));c=Sw(a,c);a=a.b;var d;d=a.f.c.S;A(d,244)&&d.pe();var e,f;d=a.f;d=eh(O(d.c))+(((f=Tw(d),f?f.tHead:null).offsetHeight||0)|0)+1;f=eh((e=Tw(a.f),e?e.tFoot:null))-1;a.g=d+100;a.b=f-100;a.c=100;50>a.b-a.g&&(e=50-(a.b-a.g),a.g-=e/2|0,a.b+=e/2|0,a.c-=e/2|0);a.d=yp(a.e);e=a.f;f=a.g;d=a.b;var g=a.c,l;l=a.f;var m=st(l.c.q,c);l=l.c.S.fe(m);a.a=new Ww(e,f,d,g,!l);a=a.a;a.p=!0;a.t.je(c,a.s);a.j=c;a.p&&10<=a.f&&(a.g=(!Kd&&(Kd=Ld()?new Md:new Nd),Kd).kb(a,O(a.t.c)));(K(),
M).Bb(b);b.stopPropagation()}function Xw(a){this.b=new Yw(this);this.c=a}r(216,674,Ia,Xw);_.sd=function(){return this.ie()};_.td=function(a,b,c){hr(c,b,!1);c.a.disabled=!1;uq(c,vq((R(),c.ab))+"-disabled",!1);c.ab.vEscalatorLogicalRow=a.e.d};_.ie=function(){return Qw(this)};_.nd=function(){this.d&&Uw(this)};_.od=function(){var a;a=new Vk;a.a.rf("mousedown",a);a.a.rf("touchstart",a);return a};
_.qd=function(a,b){if(Nc("touchstart",(K(),b).type)||"mousedown"===b.type&&1==M.xb(b))return Bk(this,b,M.Ab(b)),!0;throw(new Fq("received unexpected event: "+b.type)).backingJsObject;};_.je=function(a,b){var c;c=st(this.c.q,a);b?Pw(this.c,c):Ow(this.c,c)};B(216);function Zw(a){var b;a.d&&($r(a.d.a),a.d=null);a.a&&(b=a.a,b.p=!1,b.g&&(b.g.lb(),b.g=null),a.a=null);b=a.f.c.S;A(b,244)&&b.oe();Uw(a.f)}function Yw(a){this.f=a;this.e=new $w(this)}r(479,1,{},Yw);_.b=-1;_.c=0;_.g=-1;B(479);
function $w(a){this.a=a}r(480,1,Da,$w);_.kc=function(a){var b;if(this.a.a)switch(b=a.d,xp(a.d)){case 64:case 2097152:a=(Us(),ct(b));b=bt(b);var c=this.a.a,d,e,f;-1==c.u?(c.u=Nb(c.e,a),c.c=ce(c.d,a)):(e=c.u,c.u<c.e&&(c.u=ce(c.u,Nb(c.e,a))),d=c.c,c.c>c.d&&(c.c=Nb(c.c,ce(c.d,a))),e=e==c.u,d=d==c.c,f=a!=c.k,c.q=e&&d&&f);ax(c,a);c.k=a;-1==c.i&&(c.i=b);break;case 8:case 4194304:case 8388608:Zw(this.a)}else Zw(this.a)};B(480);
function ax(a,b){var c;b<a.u?(c=b-a.u,c=$wnd.Math.max(-1,c/a.f)):b>a.c?(c=b-a.c,c=$wnd.Math.min(1,c/a.f)):c=0;a.r=500*c}function Ww(a,b,c,d,e){var f,g;this.t=a;this.e=b;this.d=c;this.f=d;this.s=e;this.b=eh(O(a.c))+(((g=Tw(a),g?g.tHead:null).offsetHeight||0)|0)+1;this.a=eh((f=Tw(a),f?f.tFoot:null))-1}r(478,1,{},Ww);
_.jb=function(a){var b;b=a-this.o;this.o=a;this.q&&(a=w($wnd.Math.ceil(.001*b)),this.u<this.e?(this.u+=a,this.u=Nb(this.u,this.e),ax(this,this.k)):this.c>this.d&&(this.c-=a,this.c=ce(this.c,this.d),ax(this,this.k)));this.n+=b/1E3*this.r;b=w(this.n);this.n-=b;0!=b&&Wu(this.t.c.v.B,this.t.c.v.B.k+b);b=this.t;a=this.i;var c=ce(this.b,Nb(this.a,this.k));Us();var d=$wnd.document.elementFromPoint(a,c),d=$wnd.document.elementFromPoint(a,c);null!=d&&3==d.nodeType&&(d=d.parentNode);a=Sw(b,d);for(b=a>this.j?
1:-1;-1!=a&&this.j!=a;)this.j+=b,this.t.je(this.j,this.s);this.p&&10<=this.f&&(this.g=(!Kd&&(Kd=Ld()?new Md:new Nd),Kd).kb(this,O(this.t.c)))};_.a=0;_.b=0;_.c=-1;_.d=0;_.e=0;_.f=0;_.i=-1;_.j=-1;_.k=0;_.n=0;_.o=0;_.p=!1;_.q=!1;_.r=0;_.s=!1;_.u=-1;B(478);function Rw(a,b){this.b=a;this.a=b}r(476,1,{90:1,718:1,719:1,15:1},Rw);_.Sb=function(a){Nh(a.d);a=a.d;(K(),a).stopPropagation()};B(476);function Vw(a){this.a=a}r(477,1,Da,Vw);
_.kc=function(a){var b;switch(xp(a.d)){case 1048576:1==Lh(a.d).length&&Zw(this.a.b);break;case 2097152:a.a=!0;break;case 4194304:case 8388608:b=Jh(a.d);var c;var d;if(b)if((c=(d=Tw(this.a),d?d.tBodies[0]:null))&&(K(),M).Ib(c,b)){for(;Wg((K(),b))&&Vg(Wg(b))!=c;)b=Wg(b);c=gh(Wg(b))==b}else c=!1;else c=!1;c&&(Uw(this.a),a.a=!0)}};B(477);function bx(){bx=k;cx=new sk}function dx(a,b,c){bx();this.a=a;null!=b?fl():(fl(),fl());null!=c?fl():(fl(),fl())}
function ex(a,b,c){bx();this.a=a;b?new zo(b):(fl(),fl());c?new zo(c):(fl(),fl())}r(36,666,{},dx,ex);_.Nb=function(a){a.ke(this)};_.Pb=Ic;_.Ob=function(){return cx};var cx;B(36);function fx(a){var b,c,d;d=new gx(a.a.ld());for(a=(c=(new Im(a.a)).a.pf().Kc(),new Jm(c));a.a.Vc();)c=(b=a.a.Wc(),b.If()),Vd(d,c.b);return d}
function hx(a,b){if(a.j&&b)throw(new Fq("Selection model is already attached to a grid. Remove the selection model first from the grid and then add it.")).backingJsObject;a.j=b;if(a.j)a.p=new ix(b),a.k=new Xw(b);else{var c=a.p;$r(c.d.a);$r(c.e.a);a.p=null;a.k=null}}r(127,668,{136:1,244:1,127:1});
_.oe=function(){var a,b,c,d,e;if(this.g){this.g=!1;a=fx(this.o);this.o.a.tf();e=fx(this.i);for(d=(c=(new Im(this.i.a)).a.pf().Kc(),new Jm(c));d.a.Vc();)c=(b=d.a.Wc(),b.If()),Nt(c.c,c);this.i.a.tf();T(this.j,new ex(this.j,a,e))}};_.le=function(a){var b,c,d;b=new jx;for(d=new iu(a.b.Kc());d.b.Vc();)c=d.b.Wc(),a=ot(this.j.q,c),this.se(a)&&b.a.rf(c,b);0<b.a.ld()&&T(this.j,new ex(this.j,null,b))};
_.me=function(){var a,b;if(0<this.n.a.ld()){b=new kx(this.n);a=this.j;var c,d,e,f;f=new jx;for(e=(d=(new Im(this.n.a)).a.pf().Kc(),new Jm(d));e.a.Vc();)d=(c=e.a.Wc(),c.If()),Hm(f,d.b);c=(fl(),new lx(f));a=new ex(a,null,c);this.n.a.tf();this.g&&(this.o.a.tf(),this.i.a.tf(),mx(this.i,b));T(this.j,a);return!0}return!1};_.se=function(a){return null!=this.n.a.sf(a)?(this.g?(this.o.a.sf(a),Hm(this.i,a)):Nt(a.c,a),!0):!1};_.ee=nx;_.fe=function(a){a=ot(this.j.q,a);return Iq(this.n,a)};_.ge=function(){this.me()};
_.ne=function(a){var b,c,d;b=new jx;for(d=new iu(a.b.Kc());d.b.Vc();)c=d.b.Wc(),a=ot(this.j.q,c),this.te(a)&&b.a.rf(c,b);0<b.a.ld()&&T(this.j,new ex(this.j,b,null))};_.te=function(a){return Hm(this.n,a)?(xt(a.c,a),this.g&&(this.i.a.sf(a),Hm(this.o,a)),!0):!1};_.he=function(a){hx(this,a)};_.pe=function(){this.g=!0};_.g=!1;B(127);r(691,668,{});_.ee=ox;_.fe=px;_.ge=Kq;_.he=Ut;B(691);function qx(a,b){if(b&&Rt(b,a.g)){var c=a.g;Nt(c.c,c);a.g=null}}
function rx(a,b){if(a.f&&b)throw(new Fq("Selection model is already attached to a grid. Remove the selection model first from the grid and then add it.")).backingJsObject;a.f=b;if(a.f)a.i=new ix(b),a.d=new Mw(b),a.i&&(a.i.a=a.e),a.d&&(a.d.b=a.e);else{var c=a.i;$r(c.d.a);$r(c.e.a);$r(a.d.a.a);a.i=null;a.d=null}}function sx(){}r(204,668,{241:1},sx);_.qe=function(a){if(null==a)throw(new E("Row cannot be null")).backingJsObject;return this.fe(a)?(qx(this,this.g),T(this.f,new dx(this.f,null,a)),!0):!1};
_.ee=ox;_.fe=function(a){return!!this.g&&Rt(this.g,ot(this.f.q,a))};_.ge=function(){this.g&&this.qe(this.g?this.g.b:null)};_.re=function(a){var b;if(null==a)throw(new E("Row cannot be null")).backingJsObject;b=this.g?this.g.b:null;var c;(c=ot(this.f.q,a))&&!Rt(c,this.g)?(qx(this,this.g),c=this.g=c,xt(c.c,c),c=!0):c=!1;return c?(T(this.f,new dx(this.f,a,b)),!0):!1};_.he=function(a){rx(this,a)};_.e=!0;B(204);function ix(a){this.b=a;this.d=Dq(a,new tx(this),a.G.a);this.e=ux(a,new vx(this))}
r(225,1,{},ix);_.a=!0;_.c=!1;B(225);function vx(a){this.a=a}r(161,1,{15:1,242:1,648:1,161:1},vx);_._d=function(a){32==Kh(a.d)&&(this.a.c=!1)};B(161);function tx(a){this.b=a}r(523,1,{15:1,242:1,708:1},tx);_.a=null;B(523);function Cw(a,b){this.a=a;this.b=b}r(524,1,Ka,Cw);_.Zd=function(a){if(wx(a.a,this.b)){a=this.a;var b=this.a.b.b,c;c=st(b.q,this.b);b.S.fe(c)?a.b.a&&Ow(b,c):Pw(b,c);$r(this.a.a.a);this.a.a=null}};_.b=0;B(524);function xx(){xx=k;yx=new sk}
function zx(a,b,c){xx();this.a=a;this.b=b;this.c=c}r(197,666,{},zx);_.Nb=function(a){Ax(a,this)};_.Pb=Ic;_.Ob=function(){return yx};_.c=!1;var yx;B(197);function Bx(a){Cx.call(this,a,(Dx(),Ex))}function Cx(a,b){if(!a)throw(new E("Grid column reference can not be null!")).backingJsObject;if(!b)throw(new E("Direction value can not be null!")).backingJsObject;this.a=a;this.b=b}r(75,1,{75:1},Bx,Cx);B(75);function Fx(){Fx=k;qq();$wnd.Math.sqrt(3);$wnd.Math.tan(.6981317007977318)}
function tw(a,b){return a.j.o!=b&&Xg(a.j.o,b)?a.j:a.a.o!=b&&Xg(a.a.o,b)?a.a:a.f.o!=b&&Xg(a.f.o,b)?a.f:null}function Gx(a){var b,c;0==a.a.e.b?T(a,new Lu(0,0)):(c=Hx(a.a,Ix(a.a.e)),b=Hx(a.a,Jx(a.a.e))+1,T(a,new Lu(c,b-c)))}function Ft(a){return 0==a.a.e.b?W(0,0):W(a.a.d,a.a.e.b)}function Kx(a){return(0<a.j.p||0<a.a.p||0<a.f.p)&&0<a.c.a.a.length}function Lx(a){return a.i.hasChildNodes()||a.b.hasChildNodes()||a.e.hasChildNodes()}
function Mx(a){if(a.Y){a.C=$wnd.Math.max(0,at((R(),a.ab)));a.n=$wnd.Math.max(0,$s(a.ab));Nx(a.j);Nx(a.f);Ox(a.t);Px(a.a);var b=a.a.b,c,d;a=at(b.f.A)-b.b;for(b=(d=(new Qx(b.a)).a.pf().Kc(),new Rx(d));b.a.Vc();)d=(c=b.a.Wc(),c.Jf()),d.e.style.width=a+(Cj(),"px")}}function Sx(a){var b;Tx(a.j);Tx(a.a);Tx(a.f);for(b=0;b<a.c.a.a.length;b++){var c=Ux(a.c,b);Vx(a.c,Wx(F(b),c))}}function Xx(a,b){null!=b&&y();Yx(a,b)}
function Yx(a,b){var c;c=a.a.e.b;null!=b&&0!=(y(),b).length?(R(),a.ab).style.height=b:(R(),a.ab).style.height="400.0px";Mx(a);c!=a.a.e.b&&Gx(a)}function Zx(a,b,c){switch(b.g){case 1:a.o.d=c;break;case 0:a.B.d=c;break;default:throw(new Oq("Unexpected value: "+b)).backingJsObject;}}
function $x(a,b){Aq((R(),a.ab),b);var c=a.B;nh(c.g,b+"-scroller");$g(c.g,b+"-scroller-vertical");c=a.o;nh(c.g,b+"-scroller");$g(c.g,b+"-scroller-horizontal");Aq(a.A,b+"-tablewrapper");Aq(a.k,b+"-header-deco");Aq(a.g,b+"-footer-deco");Aq(a.p,b+"-horizontal-scrollbar-deco");Aq(a.u,b+"-spacer-deco-container");c=a.j;ay(c,b);Aq(c.o,b+"-header");c=a.a;ay(c,b);Aq(c.o,b+"-body");for(var d,e,c=(e=(new Qx(c.b.a)).a.pf().Kc(),new Rx(e));c.a.Vc();)e=(d=c.a.Wc(),d.Jf()),Aq(e.e,b+"-spacer"),Aq(e.a,b+"-spacer-deco");
d=a.f;ay(d,b);Aq(d.o,b+"-footer")}function by(a,b){null!=b&&0!=(y(),b).length?(R(),a.ab).style.width=b:(R(),a.ab).style.width="500.0px";Mx(a)}
function cy(){Fx();var a,b;this.d=new xu;this.i=(R(),Dh());this.b=Bh();b=$doc;this.e=(K(),b).createElement("tfoot");this.B=new wv;this.o=new qv;this.j=new dy(this,this.i);this.a=new ey(this,this.b);this.f=new fy(this,this.e);this.t=new gy(this);this.c=new hy(this);this.p=xh();this.k=xh();this.g=xh();this.u=xh();this.s=new iy(this);-1!=Oc($wnd.navigator.userAgent,"Firefox")?this.r=new Eu:(b=$doc.body.style,void 0!==b.transform?void 0!==b.transformStyle?this.r=new Fu:this.r=new Hu:void 0!==b.webkitTransform?
this.r=new Iu:this.r=new Eu);oc(jy);rc(jb(this.r));this.ab=b=xh();var c,d;a=new ky(this);c=Ys();(Js(),!U&&(U=new Ls),Js(),U).a.g&&(Ps((!U&&(U=new Ls),U))?c+=2:c+=1);b.appendChild(this.B.g);Mu(this.B,a);ev(this.B,c);Os((!U&&(U=new Ls),U))&&(d=this.B.g.style,d.right=Tu(this.B)-1+(Cj(),"px"));b.appendChild(this.o.g);Mu(this.o,a);ev(this.o,c);a=this.o;c=new ly;Ok((!a.a&&(a.a=new $k(a)),a.a),(xv(),yv),c);0==Ys()&&(this.B.g.style.zIndex="90",this.o.g.style.zIndex="90");this.A=xh();b.appendChild(this.A);
a=Fh();this.A.appendChild(a);a.appendChild(this.i);a.appendChild(this.b);a.appendChild(this.e);a=this.k.style;a.width=Tu(this.B)+(Cj(),"px");a.display=(fi(),"none");b.appendChild(this.k);a=this.g.style;a.width=Tu(this.B)+"px";a.display="none";b.appendChild(this.g);a=this.p.style;a.display="none";a.height=Tu(this.o)+"px";b.appendChild(this.p);$x(this,"v-escalator");this.u.setAttribute("aria-hidden","true");Yx(this,null);this.ab.style.width="500.0px";Mx(this)}
function my(a,b,c,d,e,f){Fx();var g;g=e-d;switch(a.g){case 0:return a=b-f,a<d?a:c+f>e?c+f-g:d;case 3:return c+f-g;case 2:return b+(c-b)/2-g/2;case 1:return b-f;default:throw(new E("Internal: ScrollDestination has been modified, but Escalator.getScrollPos has not been updated to match new values.")).backingJsObject;}}
function ny(a,b){Fx();if(!a)throw(new E("Destination cannot be null")).backingJsObject;if(a==(Dw(),oy)&&0!=b)throw(new E("You cannot have a padding with a MIDDLE destination")).backingJsObject;}r(428,17,wa,cy);_.ue=function(){Fx();oc(jy)};
_.Fc=function(){var a,b,c;py(this.j);py(this.a);py(this.f);qy(this.j,0,this.j.p);qy(this.f,0,this.f.p);Mg((Jg(),Kg),new ry(this));c=!1;for(b=new Xk(this.c.a);b.a<b.c.a.length;)a=Yk(b),a.c?(a.c=!1,sy(a,a.b),a=!0):a=!1,a&&(c=!0);c&&(ty(this.j),ty(this.a),ty(this.f));b=this.B;b.Rd(Math.round(b.k)|0);b=this.o;b.Rd(Math.round(b.k)|0);uy(this.t,this.B.g);uy(this.t,this.o.g);b=this.t;c=(R(),this.ab);c.addEventListener?c.addEventListener("onmousewheel"in c?"mousewheel":"wheel",b.c):c.attachEvent("onmousewheel",
b.c);b=this.t;c=this.ab;c.addEventListener&&(c.addEventListener("touchstart",b.i),c.addEventListener("touchmove",b.g),c.addEventListener("touchend",b.e),c.addEventListener("touchcancel",b.e))};
_.Gc=function(){var a,b,c,d;vy(this.t,this.B.g);vy(this.t,this.o.g);a=this.t;c=(R(),this.ab);c.addEventListener?c.removeEventListener(void 0===c.onwheel?"mousewheel":"wheel",a.c):c.detachEvent("onmousewheel",a.c);a=this.t;c=this.ab;c.removeEventListener&&(c.removeEventListener("touchstart",a.i),c.removeEventListener("touchmove",a.g),c.removeEventListener("touchend",a.e),c.removeEventListener("touchcancel",a.e));wy(this.j,0,this.j.p);wy(this.f,0,this.f.p);c=xy(this.a);for(a=0;a<c;a++)b=c-a-1,d=this.b.rows[b],
yy(this.a,d,b),b=this.s,dl(b.b,d),dl(b.a,d);zy(this.a.e);a=this.a;wl();a.d=0};_.xc=function(a){Xx(this,a)};_.yc=function(a){by(this,a)};_.n=0;_.q=!1;_.v=0;_.w=0;_.C=0;var jy=B(428);r(442,1,{},function(a){this.a=a});_.tb=function(){Mx(this.a);this.a.q=!1};B(442);function ky(a){this.a=a}r(443,1,Ja,ky);_.Vd=function(){Ay(this.a.t);T(this.a,new uv)};B(443);function ly(){}r(444,1,{15:1,717:1},ly);_.a=!1;B(444);function Av(a){this.a=a}r(445,1,{},Av);_.tb=function(){this.a.a=!1};B(445);
function ry(a){this.a=a}r(446,1,{},ry);_.tb=function(){Mx(this.a)};B(446);function By(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d}r(447,1,{},By);
_.tb=function(){var a,b,c,d;ny(this.b,this.c);if(-1!=this.d&&(a=this.d,0>a||a>=this.a.a.p))throw(new Ec("The given row index "+a+" does not exist.")).backingJsObject;-1!=this.d?(b=w($wnd.Math.floor(Cy(this.a.a,this.d))),a=w($wnd.Math.ceil(this.a.a.i)),a=W(b,a)):a=W(0,0);c=Dy(this.a.a.b.a,F(this.d));if(-1==this.d&&!c)throw(new E("Cannot scroll to row index -1, as there is no spacer open at that index.")).backingJsObject;c?(b=w($wnd.Math.floor(Ey(c.i.f.s,c.e))),c=w($wnd.Math.ceil(c.d)),b=W(b,c),b=Mt(a,
b)):b=a;a=b.b;b=b.a;d=this.a.B.k;c=d+Fy(this.a.a);a=my(this.b,a,b,d,c,this.c);Wu(this.a.B,a)};_.c=0;_.d=0;B(447);function Gy(a,b,c){if(1>c)throw(new E("Number of rows must be 1 or greater (was "+c+")")).backingJsObject;if(0>b||b+c>a.p)throw(new Ec("The given row range ("+b+".."+(b+c)+") was outside of the current number of rows ("+a.p+")")).backingJsObject;}function py(a){a.f||(a.f=!0,Rg((Jg(),Kg),new Hy(a)))}
function Tx(a){var b;a.j&&a.q.Y&&(a.k||(a.k=(R(),Eh()),nh(a.k,a.n+"-row"),a.g=hp(a.ve()),nh(a.g,a.n+"-cell"),oh(a.g,"Ij"),a.k.appendChild(a.g)),a.o.appendChild(a.k),b=$s(a.g),a.o.removeChild(a.k),1<=b&&(a.i=b,a.j=!1,a.o.hasChildNodes()&&a.Ce()))}function Iy(a,b){var c;c=hp(a.ve());c.style.height=a.i+(Cj(),"px");0<=b&&(c.style.width=b+"px");$g(c,a.n+"-cell");return c}
function Jy(a,b){var c,d,e,f;if(!b)throw(new E("Element cannot be null")).backingJsObject;if(a.o==b||Wg((K(),b))==a.o||!Xg(a.o,b))return null;for(c=b;Vg(Wg((K(),c)))!=a.o;)c=Wg(c);d=-1;for(e=c;e;e=th(e))++d;e=-1;for(f=Wg(c);f;f=th(f))++e;return new ku(e,d,c)}function Ky(a,b){return Ey(a.q.s,b)}function Ly(a,b,c){var d;c?(d=c?c.nextSibling:null,d?a.insertBefore(b,d):a.appendChild(b)):a.insertBefore(b,a.firstChild);return b}
function Bt(a,b,c){var d,e;if(0>b||b>a.p)throw(new Ec("The given index ("+b+") was outside of the current number of rows (0.."+a.p+")")).backingJsObject;if(1>c)throw(new E("Number of rows must be 1 or greater (was "+c+")")).backingJsObject;a.p+=c;if(a.q.Y&&(a.Ae(b,c),a.p==c)){c=new Ag;for(d=0;d<a.q.c.a.a.length;d++)e=Ux(a.q.c,d),b=F(d),My(c.d,b,e);Vx(a.q.c,c)}}
function Ny(a,b,c){var d,e,f,g,l,m,n;e=-1;f=a.o.rows;for(a=0;a<f.length;a++){if(g=d=f[a].cells[b]){g=1<d.colSpan;var p=(fi(),"none"),u;u=d.style;u=(K(),u).display;g=(l=p===u,!g&&!l)}g&&(g=d.cloneNode(c),g.style.height="",g.style.width="",Wg((K(),d)).insertBefore(g,d),d=(m=at(g),(Js(),!U&&(U=new Ls),Js(),U).a.g&&(m+=.01),n=Wg(g),!!n&&n.removeChild(g),m),e=$wnd.Math.max(e,d))}return e}
function Oy(a,b,c,d){var e,f,g;for(f=0;f<a.xe();f++){g=a.ze(f);e=a.ye(g);var l=a,m=b,n=c,p=void 0,u=void 0,x=u=void 0,C=void 0,L=x=void 0;uu(l.q.d,g,e,Py(l.q.c));C=new Au(l.q.d,m,n);for(u=new yu(new zu(C.a.a,C.c,C.c+C.b),!1);u.c+u.d<u.a.a.length;)p=Bu(u),x=Qy(Jr(l.q.c.a,p.a)),x=Iy(l,x),p.c=x;l.r.Bd(l.q.d,C);0!=m?L=g.childNodes[m-1]:L=null;for(u=new yu(new zu(C.a.a,C.c,C.c+C.b),!1);u.c+u.d<u.a.a.length;)p=Bu(u),L=Ly(g,p.c,L);l.r.zd(l.q.d,C);l.r.Dd(l.q.d,C)}Ry(a);if(d)for(d=b;d<b+c;d++)Sy(a,d,!0,"frozen"),
Ty(a,d,a.q.t.a)}
function qy(a,b,c){var d,e,f,g,l,m;d=new Sd;if(1>c)return d;0!=a.o.childNodes.length&&0!=b?g=a.o.childNodes[b-1]:g=null;for(l=b;l<b+c;l++){m=(R(),Eh());d.a[d.a.length]=m;$g(m,a.n+"-row");for(f=0;f<a.q.c.a.a.length;f++)e=Qy(Jr(a.q.c.a,f)),e=Iy(a,e),m.appendChild(e),f<a.q.c.b&&($g(e,"frozen"),a.q.r.Fd(e,a.q.t.a,0)),0<a.q.c.b&&f==a.q.c.b-1&&$g(e,"last-frozen");f=a;uu(f.q.d,m,l,Py(f.q.c));f.r.Bd(f.q.d,su(f.q.d));g=Ly(f.o,m,g);f.r.zd(f.q.d,su(f.q.d));f.r.Dd(f.q.d,su(f.q.d))}Ry(a);a.De();return d}
function Uy(a,b,c){var d,e,f;for(f=0;f<a.xe();f++){e=a.ze(f);uu(a.q.d,e,f,Py(a.q.c));d=new tu(a.q.d,b,c);a.r.Cd(a.q.d,d);for(d=0;d<c;d++)Zg(e.cells[b]);e=new Au(a.q.d,b,c);a.r.Ad(a.q.d,e)}}function yy(a,b,c){uu(a.q.d,b,c,Py(a.q.c));a.r.Cd(a.q.d,su(a.q.d));(c=Wg((K(),b)))&&c.removeChild(b);a.r.Ad(a.q.d,su(a.q.d))}
function ty(a){var b,c,d,e,f,g;for(d=fh(a.o);d;){a:{b=d;for(var l=e=c=void 0,m=void 0,m=(e=(new Qx(a.q.a.b.a)).a.pf().Kc(),new Rx(e));m.a.Vc();)if(l=(c=m.a.Wc(),c.Jf()),l.e==b){b=!0;break a}b=!1}if(!b)for(b=gh((K(),d)),c=0;b;)e=(f=parseInt(b.colSpan)|0,g=W(c,f),g.a>a.q.c.a.a.length&&(g=new rt(c,a.q.c.a.a.length)),Vy(a.q.c,g)),b.style.width=e+(Cj(),"px"),b=sh(b),++c;d=sh((K(),d))}Ry(a)}function Wy(a,b){var c;for(c=gh((K(),a));c;)c.style.height=b+(Cj(),"px"),c=sh(c)}
function Ry(a){var b;b=Xy(a.q.c);if(!(0>b))for(a=fh(a.o);a;)a.style.width=(Us(),et(b,!0)+(Cj(),"px")),a=sh((K(),a))}function Yy(a,b,c,d){uu(a.q.d,b,c,Py(a.q.c));a.r.Dd(a.q.d,new tu(a.q.d,d.b,d.a-d.b))}function Jt(a,b,c){c=W(b,c);b=W(0,a.q.c.a.a.length);a.Ee(c,b)}function Dt(a,b,c){Gy(a,b,c);a.p-=c;a.q.Y&&Lx(a.q)&&a.Be(b,c)}function Zy(a,b,c){Sy(a,b,c,"frozen");c&&Ty(a,b,a.q.t.a)}function $y(a,b){if(1>b)throw(new E("Height must be positive. "+b+" was given.")).backingJsObject;a.j=!1;a.i=b;a.Ce()}
function az(a,b){a.r=b;Kx(a.q)&&0<a.p&&Jt(a,0,a.p)}function ay(a,b){var c,d;c=a.n;if(null==c?null!=b:c!==b)for(a.n=b,d=a.o.rows[0];d;){Aq(d,b+"-row");for(c=d.cells[0];c;)Aq(c,b+"-cell"),c=sh((K(),c));d=sh((K(),d))}}function Sy(a,b,c,d){var e,f,g;f=a.o.rows;for(g=0;g<f.length;g++)e=f[g],a.Fe(e)&&(e=e.cells[b],c?$g(e,d):(mh(e,d),a.q.r.Ed(e)))}function Ty(a,b,c){var d,e,f;e=a.o.rows;for(f=0;f<e.length;f++)d=e[f],a.Fe(d)&&(d=d.cells[b],a.q.r.Fd(d,c,0))}
function bz(a,b){this.q=a;this.r=(lu(),mu);this.o=b}r(210,1,{});_.Gd=function(a){return Jy(this,a)};_.we=cz;_.ye=function(a){return a.sectionRowIndex};_.Hd=dz;_.Id=function(a){return this.ze(a)};_.Jd=function(a){Jt(this,a,1)};_.f=!1;_.i=20;_.j=!0;_.n=null;_.p=0;B(210);function Hy(a){this.a=a}r(440,1,{},Hy);_.tb=function(){this.a.q.Y&&(this.a.f=!1,Tx(this.a))};B(440);function ez(a,b){if(0<=b&&b<a.o.childNodes.length)return a.o.rows[b];throw(new Ec("No such visual index: "+b)).backingJsObject;}
function wy(a,b,c){var d,e;for(d=b;d<b+c;d++)e=a.o.rows[b],yy(a,e,b);Nx(a)}function Nx(a){var b;b=a.i*a.p;b!=a.b&&(a.b=b,a.Ge(),Xu(a.c.B,a.c.n-$wnd.Math.max(0,a.c.j.b)-$wnd.Math.max(0,a.c.f.b)),Px(a.c.a),fz(a.c.a.b))}r(211,210,{});_.xe=function(){return this.o.childNodes.length};_.ze=function(a){return ez(this,a)};_.Ae=function(a,b){qy(this,a,b)};_.Be=function(a,b){wy(this,a,b)};_.Ce=function(){var a;if(0!=this.o.childNodes.length){for(a=this.o.rows[0];a;)Wy(a,this.i),a=sh((K(),a));Nx(this)}};
_.De=function(){Nx(this)};_.Ee=function(a,b){var c,d;Gy(this,a.b,a.a-a.b);if(this.c.Y&&Kx(this.c))for(c=a.b;c<a.a;c++)d=ez(this,c),Yy(this,d,c,b)};_.Fe=function(){return!0};_.b=0;B(211);function gz(a,b){var c,d;if(b.b>=b.a)return b;if(0==a.e.b)return W(0,0);d=(c=w($wnd.Math.ceil(Fy(a)/a.i))+1,0>c?0:c);c=Hx(a,Ix(a.e));d=it(b,W(c,d))[1];return 0==-c?d:new rt(d.b+-c,d.a+-c)}
function hz(a,b,c){var d,e,f;d=(e=w($wnd.Math.ceil(Fy(a)/a.i))+1,(0>e?0:e)-(a.o.childNodes.length-(fl(),(new iz(new Qx(a.b.a))).b.ld())));c=c<d?c:d;if(0<c){c=qy(a,b,c);jz(a.e,b,c);e=b*a.i+kz(a.b,b);for(d=b;d<a.e.b;d++)d-b<c.a.length?f=(qd(d-b,c.a.length),c.a[d-b]):f=lz(a.e,d),mz(a.q.s,f,0,e),e+=a.i,e+=nz(a.b,d);return c}return gl}function xy(a){return a.o.childNodes.length-(fl(),(new iz(new Qx(a.b.a))).b.ld())}
function Fy(a){var b,c;c=(a.c.A.offsetHeight||0)|0;b=$wnd.Math.max(0,a.c.f.b);a=$wnd.Math.max(0,a.c.j.b);return $wnd.Math.max(0,c-b-a)}function Hx(a,b){var c;c=oz(a.e,b);return a.d+c}function pz(a,b){var c;if(0>b||b>=a.p)throw(new Ec("No such logical index: "+b)).backingJsObject;c=b-Hx(a,Ix(a.e));if(0<=c&&c<a.e.b)return qz(a,c);throw(new Fq("Row with logical index "+b+" is currently not available in the DOM")).backingJsObject;}function rz(a,b,c){var d;d=c-b;a=sz(a.b,b,(tz(),uz),c);return d-a}
function Cy(a,b){return kz(a.b,b)+b*a.i}function qz(a,b){if(0<=b&&b<a.e.b)return lz(a.e,b);throw(new Ec("No such visual index: "+b)).backingJsObject;}
function vz(a,b,c,d){var e,f,g,l,m;if(!(b.b>=b.a)){b.b<c?e=c-(b.a-b.b):e=c;if(b.b!=e){g=new gx(b.a-b.b);for(f=0;f<b.a-b.b;f++)c=wz(a.e,b.b),g.a[g.a.length]=c;jz(a.e,e,g)}g=xz(a.e,e);for(f=d;f<d+(b.a-b.b);f++)c=yz(g),Yy(a,c,f,W(0,a.q.c.a.a.length));l=(m=kz(a.b,d),m+d*a.i);g=xz(a.e,e);for(f=0;f<b.a-b.b;f++)c=yz(g),mz(a.q.s,c,0,l),l+=a.i,l+=nz(a.b,d+f)}}
function zz(a,b){var c,d,e,f,g;if(0!=b){d=a.c.w+b;Wu(a.c.B,d);c=a.i;e=b-b%c;c=w(b/c);Us();if(.49<(0>=e?0-e:e)){a:{var l=a.b;f=a.c.w;g=(tz(),uz);var m,n,p;n=new zo(new Qx(l.a));for(l=0;l<n.a.length;l++){m=(qd(l,n.a.length),n.a[l]);p=Ey(m.i.f.s,m.e);m=p+m.d;if(p>f){f=new zu(n,l,n.a.length);break a}if(m>f){f=g==(tz(),Az)?new zu(n,l+1,n.a.length):new zu(n,l,n.a.length);break a}}f=(fl(),fl(),Bz)}for(g=f.Kc();g.Vc();)f=g.Wc(),Cz(f,Dz(f.i.f.s,f.e),Ey(f.i.f.s,f.e)+e),Ez(f,f.f+c);for(f=xz(a.e,0);f.b!=f.d.c;)c=
yz(f),g=Ey(a.q.s,c)+e,mz(a.q.s,c,0,g)}Fz(a,a.c.v,d)}}function Fz(a,b,c){a.c.v=b;a.c.w=c;a.c.r.Fd(a.c.b,-a.c.v,-a.c.w);a.c.r.Fd(a.c.u,0,-a.c.w)}
function Gz(a){var b,c,d,e,f,g,l;c=null;if((f=Xs())&&Xg(a.o,f))for(;f&&f!=a.o;)f&&Xc("tr",(K(),f).tagName)&&(c=f),f=Wg((K(),f));f=new zo(a.e);l=new Hz(a.c.a.b.a);for(e=-1;e<a.e.b;e++)if(g=dl(l,F(a.d+e)))Iz(f,e+1,g.e),g.e.style.display="",g.a.style.display="";for(e=(d=(new Qx(l)).a.pf().Kc(),new Rx(d));e.a.Vc();)d=(b=e.a.Wc(),b.Jf()),d.e.style.display=(fi(),"none"),d.a.style.display="none";b=!c;for(d=new Jz(f,f.a.length);0<d.b;)e=(od(0<d.b),d.a.yf(d.c=--d.b)),e==c?b=!0:b?(f=a.o,f.insertBefore(e,f.firstChild)):
(f=a.o,g=void 0,(g=c?c.nextSibling:null)?f.insertBefore(e,g):f.appendChild(e))}
function Px(a){var b,c,d,e,f;if(a.c.Y){d=(e=w($wnd.Math.ceil(Fy(a)/a.i))+1,0>e?0:e);e=Nb(d,a.c.a.p);e-=a.e.b;if(0<e)d=a.e.b,0==a.e.b?c=0:c=Hx(a,Jx(a.e))+1,(b=c<a.p-e)?(b=hz(a,d,e),vz(a,W(d,b.ld()),d,c)):(c=a.c.B.k,Wu(a.c.B,0),Ay(a.c.t),hz(a,d,e),Wu(a.c.B,c),Ay(a.c.t));else if(0>e){d=xz(a.e,a.e.b);for(c=0;c<-e;c++)b=Kz(d),(f=Wg((K(),b)))&&f.removeChild(b),Lz(d);0!=a.e.b&&(d=Ky(a,Ix(a.e)),c=a.c.w-a.i,d<c&&(c=Hx(a,Jx(a.e))+1,vz(a,new rt(0,1),a.e.b,c)))}0!=e&&Gx(a.c)}}
function ey(a,b){this.c=a;bz.call(this,a,b);this.e=new Mz;this.a=new Nz(this);this.b=new Oz(this.c)}r(434,210,{},ey);_.Gd=function(a){var b,c;a=Jy(this,a);if(!a)return null;c=Vg(a.b);return new ku((b=oz(this.e,c),this.d+b),a.a,a.b)};_.ve=Pz;_.xe=function(){return xy(this)};_.ye=function(a){return Hx(this,a)};_.Id=function(a){return pz(this,a)};_.ze=function(a){return qz(this,a)};
_.Ae=function(a,b){var c,d,e,f,g,l,m,n;if(0!=b)if(Qz(this.b,a,b),c=hz(this,a,b),Ox(this.c.t),d=a*this.i<this.c.B.k,e=a*this.i>this.c.B.k+Fy(this),d)f=b*this.i,zz(this,f),f=this.d+b,wl(),this.d=f;else if(!e){d=a+c.ld();e=Hx(this,Ix(this.e));c=b-c.ld();if(0<c){l=gz(this,W(d,c));c=this.o.childNodes.length-(fl(),(new iz(new Qx(this.b.a))).b.ld());l=c-(l.a-l.b);n=d-e;vz(this,new rt(l,c),n,d);e=(d+(c-l))*this.i;try{for(f=xz(this.e,n+(c-l)),g=d;f.b!=f.d.c;)e+=nz(this.b,g++),m=yz(f),mz(this.q.s,m,0,e),e+=
this.i}catch(p){if(p=ec(p),A(p,13))f=p,oc(jy),Pb(f,f.pb());else throw p.backingJsObject;}}Gx(this.c);Gz(this)}};
_.Be=function(a,b){var c,d,e,f,g,l,m,n,p;if(0!=b){n=Ft(this.c);p=W(a,b);e=this.b;Rz(e,p);Qz(e,p.b,-(p.a-p.b));n=it(p,n);p=n[0];n=n[1];e=gz(this,n);f=e.b<e.a&&0==e.b;if(p.b<p.a||f)g=(p.a-p.b)*this.i,l=this.i,l=this.c.B.k-g<l,!(e.b>=e.a)||l&&f?l&&zz(this,-this.c.B.k):zz(this,-g);if(e.b<e.a){f=xy(this.c.a);g=this.p;if(g<f){g=f-g;for(m=0;m<g;m++)c=wz(this.e,e.b),yy(this,c,a),l=this.q.s,dl(l.b,c),dl(l.a,c);f-=g;Fz(this.c.a,this.c.v,0);e=n.b;for(n=(d=kz(this.b,e),d+e*this.i);e<f;e++)c=lz(this.e,e),mz(this.q.s,
c,0,n),n+=this.i,n+=nz(this.b,e);n=b-g;for(m=0>f-n?0:f-n;m<f;m++)c=lz(this.e,m),Yy(this,c,m,W(0,this.q.c.a.a.length))}else if(d=this.p*this.i,g=this.c.w+Fy(this),g<=d)for(c=this.e.b,f=Hx(this,Jx(this.e))-(e.a-e.b-1),vz(this,e,c,f),d=xz(this.e,e.b),g=Cy(this,n.b),f=e.b;f<c-(e.a-e.b);f++)l=yz(d),mz(this.q.s,l,0,g),g+=this.i,g+=(m=Dy(this.b.a,F(f+n.b)),m?m.d:0);else if(0>=e.b&&0<e.a&&b>=this.e.b)e=this.c.o.k,d-=this.e.b*this.i,Fz(this,e,d),c=W(0,this.e.b),e=this.p-(c.a-c.b),vz(this,c,0,e),n=this.d+-(n.a-
n.b),wl(),this.d=n;else if(d+b*this.i-g<this.i){f=Hx(this,Ix(this.e))-(e.a-e.b);vz(this,e,0,f);e=e.a;d=xz(this.e,e);m=Cy(this,n.b);for(f=0;d.b!=d.d.c;)g=yz(d),mz(this.q.s,g,0,m),m+=this.i,g=e+f++,g=Dy(this.b.a,F(g)),m+=(c=g,c?c.d:0);n=this.d+-(n.a-n.b);wl();this.d=n}else{l=Ky(this,lz(this.e,e.b));for(m=0;m<e.a-e.b;m++){c=wz(this.e,e.b);var u=this.e;Sz(u,c,u.c.b,u.c)}for(m=e.b;m<f;m++)c=lz(this.e,m),mz(this.q.s,c,0,w(l)),l+=this.i,l+=nz(this.b,m+n.b);n=d-Fy(this);Wu(this.c.B,n);Ay(this.c.t);vz(this,
new rt(f-1,f-1+1),0,Hx(this,Ix(this.e))-1);n=this.d+-1;wl();this.d=n;n=w($wnd.Math.ceil((g-d)/this.i));n=f-(e.a-e.b-n);c=new rt(n,f);e=Hx(this,Ix(this.e))+n;vz(this,c,n,e)}Gx(this.c);Gz(this)}p=this.d+-(p.a-p.b);wl();this.d=p;Ox(this.c.t)}};
_.Ce=function(){var a,b,c;if(0!=this.e.b){for(a=0;a<this.e.b;a++)c=lz(this.e,a),Wy(c,this.i),b=this.d+a,mz(this.q.s,c,0,b*this.i);a=this.c.B.k/Qu(Oh(this.c.B.n.style));Ox(this.c.t);Wu(this.c.B,w(this.i*this.p*a));Fz(this,this.c.o.k,this.c.B.k);Ay(this.c.t);Px(this);a=w(Ky(this,Ix(this.e))/this.i);wl();this.d=a}};_.De=Kq;_.Ee=function(a,b){var c,d,e;e=gz(this,a);if(e.b<e.a)for(c=Hx(this,Ix(this.e)),d=e.b;d<e.a;d++)Yy(this,lz(this.e,d),c+d,b)};_.Fe=function(a){return Tz(this.e,a,!1)};_.d=0;B(434);
function Nz(a){this.a=a}r(435,49,{},Nz);_.tb=function(){Gz(this.a);mh(this.a.c.b,"scrolling")};_.nb=function(){Rg((Jg(),Kg),this)};B(435);function Xy(a){return Vy(a,new rt(0,a.a.a.length))}function Uz(a,b){if(!wx(W(0,a.a.a.length),b))throw(new E("The given column index ("+b+") does not exist")).backingJsObject;}function Py(a){var b;if(null==a.d||a.d.length!=a.a.a.length)for(a.d=Ib(Vz,ea,182,a.a.a.length,15),b=0;b<a.a.a.length;b++)a.d[b]=Qy(Jr(a.a,b));return a.d}
function Vy(a,b){var c,d,e;e=0;for(d=b.b;d<b.a;d++)c=Qy(Jr(a.a,d)),e+=c;return e}function Ux(a,b){Uz(a,b);return Jr(a.a,b).b}function hu(a,b){var c,d,e;e=Ny(a.c.j,b,!1);c=Ny(a.c.a,b,!1);d=Ny(a.c.f,b,!1);return $wnd.Math.max(e,$wnd.Math.max(c,d))}
function Wz(a,b,c){var d,e,f;if(0>b||b>a.a.a.length)throw(new Ec("The given index("+b+") was outside of the current number of columns (0.."+a.a.a.length+")")).backingJsObject;if(1>c)throw(new E("Number of columns must be 1 or greater (was "+c)).backingJsObject;d=a.c.d;for(f=0;f<c;f++)e=b+f,Iz(d.a,e,new qu(d,e));vu(d,b+c);for(d=0;d<c;d++)Iz(a.a,b,new Xz(a));(d=b<a.b)&&(a.b+=c);f=Qu(Qh(a.c.o.g.style))<Qu(Qh(a.c.o.n.style));Ox(a.c.t);e=Qu(Qh(a.c.o.g.style))<Qu(Qh(a.c.o.n.style));!f&&e&&Px(a.c.a);Oy(a.c.j,
b,c,d);Oy(a.c.a,b,c,d);Oy(a.c.f,b,c,d);if(0<a.c.j.p||0<a.c.a.p||0<a.c.f.p){e=new Ag;for(f=b;f<b+c;f++)d=F(f),My(e.d,d,100);Vx(a.c.c,e)}d=Vy(a.c.c,W(0,b));a.c.t.a>d&&(b=Vy(a.c.c,W(b,c)),Wu(a.c.o,a.c.t.a+b))}
function Yz(a,b,c){if(1>c)throw(new E("Number of columns can't be less than 1 (was "+c+")")).backingJsObject;if(0>b||b+c>a.a.a.length)throw(new Ec("The given column range ("+b+".."+(b+c)+") was outside of the current number of columns ("+a.a.a.length+")")).backingJsObject;var d,e,f;Qu(Qh(a.c.o.g.style))>=Qu(Qh(a.c.o.n.style))||(d=Vy(a,new rt(0,b)),f=Vy(a,W(b,c)),e=a.c.o.k,e<=d||(d=$wnd.Math.max(d,e-f),Wu(a.c.o,d)));Uy(a.c.j,b,c);Uy(a.c.a,b,c);Uy(a.c.f,b,c);d=a.c.d;Zz(new zu(d.a,b,b+c));vu(d,b);Zz(new zu(a.a,
b,b+c));b<a.b&&(b+c<a.b?a.b-=c:a.b=b);Ox(a.c.t);Px(a.c.a);0<a.c.c.a.a.length&&(b=a.c.j,0<b.p&&Ry(b),b=a.c.a,0<b.p&&Ry(b),a=a.c.f,0<a.p&&Ry(a))}function Vx(a,b){var c,d,e;if(!b.jf()){for(d=b.pf().Kc();d.Vc();)c=d.Wc(),e=c.If().a,c=G(c.Jf()),Uz(a,e),c=(Us(),et(c,!1)),sy(Jr(a.a,e),c);a.d=null;ty(a.c.j);ty(a.c.a);ty(a.c.f);Mx(a.c)}}
function $z(a,b){var c,d,e,f;if(0>b||b>a.a.a.length)throw(new E("count must be between 0 and the current number of columns ("+a.a.a.length+")")).backingJsObject;f=a.b;if(b!=f){a.b=b;if(Lx(a.c))for((e=b>f)?(c=f,d=b):(c=b,d=f),0<f&&(Sy(a.c.j,f-1,!1,"last-frozen"),Sy(a.c.a,f-1,!1,"last-frozen"),Sy(a.c.f,f-1,!1,"last-frozen")),0<b&&(Sy(a.c.j,b-1,!0,"last-frozen"),Sy(a.c.a,b-1,!0,"last-frozen"),Sy(a.c.f,b-1,!0,"last-frozen"));c<d;c++)Zy(a.c.j,c,e),Zy(a.c.a,c,e),Zy(a.c.f,c,e);Ox(a.c.t)}}
function hy(a){this.c=a;this.a=new Sd}r(436,1,{},hy);_.b=0;_.d=null;B(436);function Qy(a){return a.c?-1:a.a}function sy(a,b){a.b=b;if(0>b)if(a.d.c.Y){var c,d=a.d,e=uo(a.d.a,a),f;f=Ny(d.c.j,e,!0);c=Ny(d.c.a,e,!0);d=Ny(d.c.f,e,!0);c=$wnd.Math.max(f,$wnd.Math.max(c,d));a.a=c}else a.c=!0;else a.a=b}function Xz(a){this.d=a}r(212,1,{212:1},Xz);_.a=100;_.b=-1;_.c=!1;B(212);
function Dz(a,b){var c;c=Q(a.a,b);if(null==c)throw(new E("Element "+b+" was not found in the position bookkeeping")).backingJsObject;return t(c),c}function Ey(a,b){var c;c=Q(a.b,b);if(null==c)throw(new E("Element "+b+" was not found in the position bookkeeping")).backingJsObject;return t(c),c}function mz(a,b,c,d){a.c.r.Fd(b,c,d);el(a.b,b,d);el(a.a,b,c)}function iy(a){this.c=a;this.b=new Ag;this.a=new Ag}r(438,1,{},iy);B(438);function fy(a,b){this.c=this.a=a;bz.call(this,a,b)}r(433,211,{},fy);
_.ve=Pz;_.Ge=function(){var a,b;b=$wnd.Math.max(0,this.a.j.b);a=$wnd.Math.max(0,this.a.f.b);a=w($wnd.Math.floor(this.a.n-b-a));Xy(this.a.c)>this.a.C&&(a=w(a-Tu(this.a.o)));this.a.g.style.height=$wnd.Math.max(0,this.a.f.b)+(Cj(),"px");Xu(this.a.B,a)};B(433);function dy(a,b){this.c=this.a=a;bz.call(this,a,b)}r(432,211,{},dy);_.ve=function(){return"th"};
_.Ge=function(){var a;a=$wnd.Math.max(0,this.b);this.a.b.style.marginTop=a+(Cj(),"px");this.a.u.style.marginTop=a+"px";this.a.B.g.style.top=a+"px";this.a.k.style.height=a+"px"};B(432);function aA(){aA=k;bA=(Hp(),wh($doc).clientHeight|0)}function cA(a){return Qd(function(b){a.He(b)})}function dA(a){return Qd(function(b){a.Ie(b)})}function eA(a){return Qd(function(b){a.Je(b)})}function fA(a){aA();this.b=new gA(this);this.c=a}r(429,1,{},fA);
_.He=function(a){var b;this.d&&(hA(this.e,a),hA(this.f,a),iA(this.e,this.f),iA(this.f,this.e),a=!this.e.f||this.f.f&&jA(this.f.b)>jA(this.e.b),b=jA((a?this.f:this.e).b),a=this.b,b=w(3*bA*(1-$wnd.Math.pow(2,-b/1E3))),a.a.e.f||a.a.f.f?Fd(a,b):(a.a.d=!1,Wd(a.a.c.a.a,20)))};_.Ie=function(a){this.d&&a.cancelable&&(kA(this.e,a),kA(this.f,a),iA(this.e,this.f),iA(this.f,this.e),this.e.f&&av(this.e.g,this.e.a),this.f.f&&av(this.f.g,this.f.a),(this.e.f||this.f.f)&&(K(),M).Bb(a))};
_.Je=function(a){var b=this.c,c;((c=(K(),M).Ab(a))&&Xc("table",c.tagName)||Xg(b.b,c))&&1==(K(),a).touches.length?(this.f||(this.f=new lA(this,!0),this.e=new lA(this,!1),$g(this.c.b,"touch")),this.b.o?(this.a=w(this.a+.7),(K(),M).Bb(a),Ed(this.b)):this.a=1,mA(this.e,a),mA(this.f,a),this.d=!0):(this.d=!1,Ed(this.b),this.a=1)};_.a=1;_.d=!1;var bA=0;B(429);function gA(a){this.a=a;Jd.call(this)}r(439,115,{},gA);_.fb=function(a){return $wnd.Math.sqrt(1-(a-1)*(a-1))};
_.gb=function(){this.a.d=!1;Wd(this.a.c.a.a,20)};_.ib=function(a){nA(this.a.e,a);nA(this.a.f,a);this.a.e.f||this.a.f.f||Ed(this)};B(439);function hA(a,b){var c,d;a.n=0;for(d=new Xk(a.j);d.a<d.c.a.length;)c=G(Yk(d)),a.n+=c/a.j.a.length;a.c=a.g.k;c=1500*a.n*a.k.a;d=a.n;d=.5-.5*$wnd.Math.cos(3.141592653589793*(0<d?1:0>d?-1:0)*$wnd.Math.min(0>=d?0-d:d,4)/4);a.b=c*d;a.f=oA(a.n);a.f&&(K(),M).Bb(b)}
function kA(a,b){var c,d,e;e=(c=(K(),b).touches,a.o?fk(c[0]):ek(c[0]));a.f=!1;1<a.i&&(a.a=a.d-e,d=Gd(),c=d-a.e,a.n=a.a/c,0<a.j.a.length&&!oA(G(Jr(a.j,0)))&&(a.j.a=Ib(H,h,1,0,5)),Iz(a.j,0,a.n),a.e=d,a.d=e,a.c=a.g.k)}function mA(a,b){var c;a.j.a=Ib(H,h,1,0,5);a.d=(c=(K(),b).touches,a.o?fk(c[0]):ek(c[0]));a.e=Gd();a.i=Qu(a.g.Od())-Qu(a.g.Md());a.a=0}function nA(a,b){var c;a.f&&(c=a.c+a.b*b,Wu(a.g,c),a.f=0<c&&c<a.i)}function oA(a){return.6<(0>=a?0-a:a)}
function iA(a,b){var c;if(c=0!=a.a)c=a.c+a.a,c=0<c&&c<a.i;a.f=c&&1>jA(b.a/a.a);a.f||(a.a=0)}function lA(a,b){this.k=a;this.j=new Sd;this.g=(this.o=b)?a.c.B:a.c.o}r(209,1,{},lA);_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.f=!1;_.i=0;_.n=0;_.o=!1;B(209);r(430,1,{});B(430);function uy(a,b){b.addEventListener?b.addEventListener("scroll",a.d):b.attachEvent("onscroll",a.d)}
function pA(a){return Qd(function(b){var c=b.deltaX?b.deltaX:-.5*b.wheelDeltaX,d=b.deltaY?b.deltaY:-.5*b.wheelDeltaY;1===b.deltaMode&&(d*=a.a.we());void 0!==b.deltaMode&&(2<=b.deltaMode||0>b.deltaMode)&&a.ue();isNaN(d)&&(d=-.5*b.wheelDelta);var e,f;if((e=(K(),M).Ab(b))&&Xc("table",e.tagName)||Xg(a.b,e))if(e=!isNaN(c),f=!isNaN(d),e||f)$g(a.b,"scrolling"),e&&av(a.o,c),f&&av(a.B,d),Wd(a.a.a,20),d=0!=d&&gv(a.B),c=0!=c&&gv(a.o),(d||c)&&M.Bb(b)})}
function qA(a){var b=a.B,c=b.Kd(),d=a.o,e=d.Kd();return Qd(function(a){a=a.target||a.srcElement;a===c?b.Ud():a===e?d.Ud():$wnd.console.error("unexpected scroll target: "+a)})}function vy(a,b){b.addEventListener?b.removeEventListener("scroll",a.d):b.detachEvent("onscroll",a.d)}
function Ay(a){var b,c,d;d=a.b.B.k;c=a.b.o.k;if(a.a!=c){for(b=0;b<a.b.c.b;b++)Ty(a.b.j,b,c),Ty(a.b.a,b,c),Ty(a.b.f,b,c);a.b.r.Fd(a.b.i,-c,0);A(a.b.r,129)?a.b.e.style.left=-c+(Cj(),"px"):a.b.r.Fd(a.b.e,-c,0);a.a=c}Fz(a.b.a,c,d);b=a.b.a;var e,f,g,l,m;0!=b.e.b&&(d=!1,(c=Dy(b.b.a,F(b.d-1)))?(l=Ey(c.i.f.s,c.e),g=c.d+b.i):(l=Ky(b,Ix(b.e)),g=b.i),c=b.c.w,m=l-c,0<m?(d=rz(b,c,l),d=w($wnd.Math.ceil(d/b.i)),l=Nb(d,b.e.b),d=b.e.b,l=d-l,f=(e=c-rA(b.b,c),w(e/b.i)),vz(b,new rt(l,d),0,f),wl(),b.d=f,d=!0):0>=m+g&&
(d=rz(b,l,c),d=w(d/b.i),l=Nb(d,b.e.b),l<b.e.b?f=Hx(b,Jx(b.e))+1:f=(e=c-rA(b.b,c),w(e/b.i)),c=b.e.b,e=!1,f+l>b.p&&(--l,e=!0),l=ce(0,Nb(l,b.p-f)),vz(b,new rt(0,l),c,f),e&&(f=new rt(0,1),e=b.p-b.e.b,vz(b,f,0,e)),e=b.d+d,f=b.p-b.e.b,wl(),b.d=e<f?e:f,d=!0),d&&(Gx(b.c),Wd(b.a,20)));fz(a.b.a.b)}
function Ox(a){var b,c,d,e,f,g;b=a.b.a;f=b.i*b.p+sA(new Qx(a.b.a.b.a));d=Xy(a.b.c);g=a.b.n;b=a.b.C;e=f>g+.49-$wnd.Math.max(0,a.b.j.b)-$wnd.Math.max(0,a.b.f.b);c=d>b+.49;e!=c&&(!e&&c?e=f>g+.49-$wnd.Math.max(0,a.b.j.b)-$wnd.Math.max(0,a.b.f.b)-Tu(a.b.o):c=d>b+.49-Tu(a.b.B));e&&(b-=Tu(a.b.B),b=$wnd.Math.max(0,b));c&&(g-=Tu(a.b.o),g=$wnd.Math.max(0,g));a.b.A.style.height=g+(Cj(),"px");a.b.A.style.width=b+"px";c=$wnd.Math.max(0,a.b.f.b);e=$wnd.Math.max(0,a.b.j.b);g=$wnd.Math.max(0,g-c-e);Xu(a.b.B,g);bv(a.b.B,
f);f=a.b.o.k;g=Vy(a.b.c,new rt(a.b.c.b,a.b.c.a.a.length));d-=g;Xu(a.b.o,b-d);bv(a.b.o,g);a.b.o.g.style.left=d+"px";Wu(a.b.o,f);gv(a.b.o)?a.b.p.style.display="":a.b.p.style.display=(fi(),"none");d=a.b.k.style;b=a.b.g.style;gv(a.b.B)?(d.display="",b.display="",gv(a.b.o)?(a=Tu(a.b.o),b.bottom=a+"px"):b.bottom=""):(d.display=(fi(),"none"),b.display="none")}function gy(a){this.b=a;this.d=qA(a);this.c=pA(a);this.f=new fA(a);this.i=eA(this.f);this.g=dA(this.f);this.e=cA(this.f)}r(431,430,{},gy);_.a=0;B(431);
function sA(a){var b,c,d;c=0;for(a=(d=a.a.pf().Kc(),new Rx(d));a.a.Vc();)d=(b=a.a.Wc(),b.Jf()),c+=d.d;return c}function nz(a,b){var c;return(c=Dy(a.a,F(b)))?c.d:0}
function sz(a,b,c,d){var e=uz,f,g,l,m,n,p,u,x,C,L,P;u=0;for(a=(x=(new Qx(a.a)).a.pf().Kc(),new Rx(x));a.a.Vc();)if(f=(n=a.a.Wc(),n.Jf()),x=Ey(f.i.f.s,f.e),p=f.d,f=x+p,C=x<b,P=b<=x&&x<=d,L=d<x,g=f<b,m=b<=f&&f<=d,l=d<f,!g)if(L)break;else if(C&&m)switch(c.g){case 1:u+=f-b;break;case 0:u+=p}else if(C&&l)switch(c.g){case 2:return 0;case 0:return p;case 1:return d-b;default:throw(new E("Unexpected inclusion state :"+c)).backingJsObject;}else if(P&&m)u+=p;else if(P&&l){switch(e.g){case 1:u+=d-x;break;case 0:u+=
p}break}return u}function kz(a,b){var c;c=F(b);c=new tA(a.a,(uA(),vA),null,!1,c);return sA(new Qx(c))}function rA(a,b){return sz(a,0,(tz(),uz),b)}
function Rz(a,b){var c,d,e,f;f=F(b.b);var g=F(b.a);f=new tA(a.a,(uA(),wA),f,!0,g);f.f.Nf()?f.a?d=xA(f.c,f.b,!0):d=xA(f.c,f.b,!1):d=yA(f.c);if(d&&zA(f,d.d)&&d){for(d=(e=(new Qx(f)).a.pf().Kc(),new Rx(e));d.a.Vc();)e=(c=d.a.Wc(),c.Jf()),a.e.Wd(e),AA(e,0),Zg(e.e),Zg(e.a);for(c=(new BA(f,f)).b.Lf();CA(c.a);)c.b=DA(c.a),EA(c);0==a.a.c&&($r(a.d.a),a.d=null)}}
function FA(a,b,c){if(-1>b||b>=a.f.a.p)throw(new E("invalid row index: "+b+", while the body only has "+a.f.a.p+" rows.")).backingJsObject;if(0<=c){var d=F(b);a.a.Mf(d)?AA(Dy(a.a,F(b)),c):(!a.d&&(a.d=Dq(a.f,a.c,(Nu(),Ou))),d=new GA(a,b),HA(a.a,F(b),d),mz(a.f.s,d.e,a.f.o.k,Cy(a.f.a,b)+a.f.a.i),b=d.e,b.style.width=Xy(a.f.c)+(Cj(),"px"),a.f.a.o.appendChild(b),d.e.style.width=at(d.i.f.A)+"px",AA(d,c),d.g.colSpan=d.i.f.c.a.a.length,b=vq(O(d.i.f)),Aq(d.e,b+"-spacer"),Aq(d.a,b+"-spacer-deco"),mz(a.f.s,d.a,
0,Ey(d.i.f.s,d.e)-d.i.f.a.i),a.f.u.appendChild(d.a),Vg(a.f.u)||(O(a.f).appendChild(a.f.u),a.b=at(d.a)),a.e.Xd(d),IA(d)?(d.e.style.display="",d.a.style.display=""):(d.e.style.display=(fi(),"none"),d.a.style.display="none"),Gz(a.f.a))}else c=F(b),a.a.Mf(c)&&Rz(a,new rt(b,b+1));fz(a)}
function JA(a,b){var c,d,e;for(e=(d=(new Qx(a.a)).a.pf().Kc(),new Rx(d));e.a.Vc();)d=(c=e.a.Wc(),c.Jf()),a.e.Wd(d);a.e=b;var f,g;for(c=(g=(new Qx(a.a)).a.pf().Kc(),new Rx(g));c.a.Vc();)g=(f=c.a.Wc(),f.Jf()),a.e.Xd(g),IA(g)?(g.e.style.display="",g.a.style.display=""):(g.e.style.display=(fi(),"none"),g.a.style.display="none")}function Qz(a,b,c){var d;d=c*a.f.a.i;for(b=new Xk(new zo(new Qx(KA(a.a,F(b),!0))));b.a<b.c.a.length;)a=Yk(b),Cz(a,Dz(a.i.f.s,a.e),Ey(a.i.f.s,a.e)+d),Ez(a,a.f+c)}
function fz(a){var b,c,d,e,f;f=Ft(a.f);b=F(f.b-1);f=F(f.a+1);b=new tA(a.a,(uA(),wA),b,!0,f);e=new Qx(b);if(0!=e.a.ld())for(f=eh(a.f.A)+$wnd.Math.max(0,a.f.j.b),b=ch(a.f.A)-$wnd.Math.max(0,a.f.f.b),e=(d=e.a.pf().Kc(),new Rx(d));e.a.Vc();){d=(c=e.a.Wc(),c.Jf());var g=f,l=b,m=a.b,n=void 0,p=n=n=void 0,u=void 0,u=void 0,u=eh(d.a),n=ch(d.a),p=n-u;u<g||n>l?(u=$wnd.Math.max(0,g-u),n=p-$wnd.Math.max(0,n-l),n=yd(LA(yd(LA(yd(LA(new hl("rect("),u),"px,"),m),"px,"),n),"px,0)").a,d.a.style.clip=n):d.a.style.clip=
"auto"}}function Oz(a){this.f=a;this.a=new MA;this.e=(Bv(),Cv);this.c=new NA(this)}r(437,1,{},Oz);_.b=0;B(437);function NA(a){this.b=a}r(441,1,Ja,NA);_.Vd=function(){var a,b,c;if(!dt(this.b.f.o.k,this.a))for(this.a=this.b.f.o.k,c=(b=(new Qx(this.b.a)).a.pf().Kc(),new Rx(b));c.a.Vc();)b=(a=c.a.Wc(),a.Jf()),Cz(b,this.a,Ey(b.i.f.s,b.e))};_.a=0;B(441);
function IA(a){var b,c;c=w($wnd.Math.ceil(Ey(a.i.f.s,a.e)));b=w($wnd.Math.floor(a.d));b=W(c,b);c=a.i.f;a=w($wnd.Math.floor(c.B.k));c=w(Fy(c.a));a=W(a,c);return Pt(a,b)}
function AA(a,b){var c,d,e,f,g,l;c=b-$wnd.Math.max(0,a.d);f=a.d;a.d=b;0>a.c&&(a.c=(Us(),Ws(fh(pz(a.i.f.a,Ft(a.i.f).b)),z(v(tb,1),h,2,6,["borderBottomWidth"]))));a.e.style.height=b+a.c+(Cj(),"px");for(d=(g=(new Qx(KA(a.i.a,F(a.f),!1))).a.pf().Kc(),new Rx(g));d.a.Vc();)g=(l=d.a.Wc(),l.Jf()),Cz(g,Dz(g.i.f.s,g.e),Ey(g.i.f.s,g.e)+c);(l=0<c)&&bv(a.i.f.B,Qu(Oh(a.i.f.B.n.style))+c);d=l&&-1==a.f&&0==a.i.f.a.d;if(a.f<a.i.f.a.d&&!d){for(g=xz(a.i.f.a.e,0);g.b!=g.d.c;){d=yz(g);var m=Ky(a.i.f.a,d)+c;mz(a.i.f.a.q.s,
d,0,m)}g=Ey(a.i.f.s,a.e);d=a.i.f.B.k;g<d&&d<g+f&&!l?e=$wnd.Math.max(c,g-d):e=c;Fz(a.i.f.a,a.i.f.v,a.i.f.w+e);av(a.i.f.B,e)}else for(e=a.i.f.a,f=a.f,m=Ft(e.c),d=f<m.b,g=f>=m.a-1,d?f=gu(e.e):g?f=(fl(),fl(),gl):(f=new zu(e.e,f-m.b+1,m.a-m.b),f=(fl(),new OA(f))),d=f.Kc();d.Vc();)f=d.Wc(),g=Ey(e.q.s,f)+c,mz(e.q.s,f,0,g);l||bv(a.i.f.B,Qu(Oh(a.i.f.B.n.style))+c);c=a.a.style;a.b=b+a.i.f.a.i;c.height=a.b+"px"}function Cz(a,b,c){mz(a.i.f.s,a.e,b,c);mz(a.i.f.s,a.a,0,c-a.i.f.a.i)}
function Ez(a,b){PA(a.i.a,F(a.f));a.f=b;a.e.vLogicalRow=b;HA(a.i.a,F(a.f),a)}function GA(a,b){this.i=a;this.f=b;this.e=(R(),Eh());this.g=Ch();this.e.appendChild(this.g);this.e.vLogicalRow=b;this.a=xh()}r(213,1,{213:1},GA);_.b=0;_.c=-1;_.d=-1;_.f=0;B(213);function tz(){tz=k;QA=new RA("COMPLETE",0);uz=new RA("PARTIAL",1);Az=new RA("NONE",2)}function RA(a,b){N.call(this,a,b)}r(99,5,{99:1,3:1,6:1,5:1},RA);var QA,Az,uz,SA=D(99,function(){tz();return z(v(SA,1),h,99,0,[QA,uz,Az])});
function ux(a,b){return Dq(a,b,a.H.a)}function TA(a,b,c){var d,e;Iz(a.n,c,b);d=a.D;UA(d,b);d.a&&b.Re(VA(d.a,b));UA(a.A,b);WA(b,a);if(!b.n){d=c;for(e=0;e<c;e++)Fv(a,e).n&&--d;Wz(a.v.c,d,1)}b.i&&XA(b.i.a);c=new Vk;e=b.e;d=new Vk;A(e,51)&&(e=e.od())&&mx(d,e);mx(c,d);b.k&&YA(a.j,b);ZA(a,c)}function Bw(a,b){Rg((Jg(),Kg),new $A(a,b));return Dq(a,b,(Xv(),Yv))}function Ow(a,b){if(A(a.S,241))a.S.qe(b);else if(A(a.S,136))a.S.le(aB(b));else throw(new Fq("Unsupported selection model")).backingJsObject;}
function bB(a){cB(a,null);Zg((R(),a.ab))}function Fv(a,b){if(0>b||b>=a.n.a.length)throw(new Fq("Column not found.")).backingJsObject;return Jr(a.n,b)}function dB(a){var b,c,d;c=Ft(a.v).b;d=ch(a.v.j.o);for(b=pz(a.v.a,c);(K(),M).Db(b)+((b.offsetHeight||0)|0)<d;)b=pz(a.v.a,++c);return c}function eB(a){var b,c,d;d=Ft(a.v).a;b=eh(a.v.f.o);do c=pz(a.v.a,--d);while((K(),M).Db(c)>b);return d}
function fB(a,b){var c;c=dw(a);if(0>b||b>=c.b.ld())throw(new Fq("Column not found.")).backingJsObject;return c.a.yf(b)}function dw(a){var b,c;c=new Sd;for(b=new Xk(a.n);b.a<b.c.a.length;)a=Yk(b),a.n||(c.a[c.a.length]=a);return fl(),new gB(c)}function hB(a){var b,c;c=a.B;for(b=0;b<a.B;b++)Fv(a,b).n&&--c;-1==c?c=0:a.R&&++c;return c}
function iB(a,b,c){if(c!=a.v.j||!jB(a.D,a.w.e.d).a||!a.w.b.s)return!1;Nc("mousedown",(K(),b).type)&&b.shiftKey&&M.Bb(b);if("touchstart"===b.type){if(1<b.touches.length)return!1;M.Bb(b);c=b.changedTouches[0];a.J=new dp(uh(c.clientX||0),uh(c.clientY||0));a=a.V;a.a=a.c.w.b;a.b=!0;Wd(a.d,500);return!0}if("touchmove"===b.type){if(1<b.touches.length)return!1;M.Bb(b);c=b.changedTouches[0];b=jA(uh(c.clientX||0)-a.J.a);c=jA(uh(c.clientY||0)-a.J.b);(3<b||3<c)&&Xd(a.V.d);return!0}if("touchend"===b.type){if(1<
b.touches.length)return!1;a.V.d.f&&(Xd(a.V.d),kB(a.V,a.w.b,!1));return!0}if("touchcancel"===b.type){if(1<b.touches.length)return!1;Xd(a.V.d);return!0}"click"===b.type&&kB(a.V,a.w.b,!!b.shiftKey);return!1}function sw(a,b){var c;c=Vs(b);if(c==a)return!1;for(;c&&c!=a;)c=c._;return!!c}
function lB(a,b){var c,d,e,f,g;if(a.u)if(f=(K(),b).type,"focus"===f||"blur"===f)Gq(a,b),a.X.lc(b);else{g=M.Ab(b);if(e=ph(g)){a:{for(e=g;e&&e!=(R(),a.ab);){if(c=!!e&&1==e.nodeType)if(c=e.className||"",-1!=Oc(c,vq((R(),a.ab))+"-spacer")){e=!0;break a}e=e.parentNode}e=!1}e=!e}if(e){if(e=tw(a.v,g))c=e.Gd(g),"mousedown"===f?a.e=c:!c&&"click"===f&&(c=a.e);else if("keydown"===f||"keyup"===f||"keypress"===f)c=mB(a.c),e=a.c.c;else if(a.t.f&&Xg(a.t.f,g)){e=a.v.a;f=a.t.o;a:{c=a.t;var l;d=c.i.childNodes.length;
if(Xg(c.i,g))for(l=0;l<d;++l)if(Xg(c.i.childNodes[l],g)){d=l;break a}if(Xg(c.d,g))for(l=0;l<c.d.childNodes.length;++l)if(Xg(c.d.childNodes[l],g)){d=l+d;break a}d=-1}if(0>d)return;c=e.Id(f).cells[d];c=new ku(f,d,c)}else{Xg(O(a.v),g)&&(cw(a.w,new ku(-1,-1,null),(ew(),fw)),Gq(a,b),a.X.lc(b));return}f=a.w;d=e;d=d==a.v.a?(ew(),fw):d==a.v.f?(ew(),uw):d==a.v.j?(ew(),vw):null;cw(f,c,d);Gq(a,b);a.X.lc(b);(g=sw(a,g))||(!a.k||e!=a.v.j||a.w.c<a.v.c.b?g=!1:(R(),4==kp((K(),b).type)&&1==M.xb(b)||1048576==kp(b.type)?
(g=a.s,g.e=yp(new $t(g,b,a.F)),M.Bb(b),b.stopPropagation(),g=!0):g=!1));if(!g&&!(g=iB(a,b,e)))a:{if(e==a.v.a&&(g=a.w.b,K(),A(g.e,51)&&(g=g.e,g.od().hf(b.type)&&g.qd(a.w,b)))){g=!0;break a}g=!1}if(!g&&(g=new Xl(z(v(tb,1),h,2,6,["keydown","click"])),-1!=oz(g,b.type)))a:{g=a.c;e=a.w;var m;if(Nc((K(),b).type,"click"))nB(g,e.e.d,e.d,tw(g.j.v,e.a)),O(g.j).focus();else if("keydown"===b.type){m=g.g;l=g.c;d=g.a.b;switch(b.keyCode|0){case 40:++m;break;case 38:--m;break;case 39:if(g.a.a>=dw(g.j).b.ld())break a;
d=g.a.a;break;case 37:if(0==d)break a;--d;break;case 9:b.shiftKey?l=oB(g,g.c):l=pB(g,g.c);if(l==g.c)break a;break;case 36:0<l.Hd()&&(m=0);break;case 35:0<l.Hd()&&(m=l.Hd()-1);break;case 34:case 33:0<l.Hd()&&(e=34==(b.keyCode|0),f=dB(g.j),c=eB(g.j),(m<f||m>c)&&(m=e?c:f),m+=(1>c-f-1?1:c-f-1)*(e?1:-1),m=ce(0,Nb(l.Hd()-1,m)));break;default:break a}l!=g.c?l==g.j.v.a?m=g.d:l==g.j.v.j?m=g.f:m=g.e:0>m?(l=oB(g,l),l==g.c?m=0:l==g.j.v.a?m=eB(g.j):m=l.Hd()-1):m>=g.c.Hd()&&(l=pB(g,l),l==g.c?m=g.c.Hd()-1:l==g.j.v.a?
m=dB(g.j):m=0);0!=l.Hd()&&(M.Bb(b),b.stopPropagation(),nB(g,m,d,l))}}}}}function qB(a){rB(a.v.f,a.A)}function sB(a){rB(a.v.j,a.D)}function rB(a,b){var c,d;c=(b.e?b.d.a.length:0)-a.p;0<c?(Bt(a,0,c),Mx(a.c)):0>c&&(d=a.c.B.k,Dt(a,0,-c),Mx(a.c),Wu(a.c.B,d));0<a.p&&Jt(a,0,a.p)}function tB(a,b){var c;c=uo(a.n,b);Yz(a.v.c,fu(dw(a),b),1);$z(a.v.c,hB(a));uB(a.D,b);uB(a.A,b);WA(b,null);Cu(a.n,c);b.k&&(c=a.j,vB(c.c.T.c,Q(c.a,b)))}
function Fw(a,b,c,d){var e;e=a.v.a.p-1;if(0>b)throw(new E("Row index ("+b+") is below zero!")).backingJsObject;if(b>e)throw(new E("Row index ("+b+") is above maximum ("+e+")!")).backingJsObject;a=a.v;Mg((Jg(),Kg),new By(a,c,d,b))}function Pw(a,b){if(A(a.S,241))a.S.re(b);else if(A(a.S,136))a.S.ne(aB(b));else throw(new Fq("Unsupported selection model")).backingJsObject;}
function wB(a,b){var c,d,e,f,g,l;e=a.Ke().c;Yz(e,0,e.a.a.length);l=new Sd;a.R&&Vd(l,a.R);d=g=0;for(f=b.length;d<f;++d)if(c=b[d],-1!=uo(a.n,c))l.a[l.a.length]=c,++g;else throw(new E("Given column at index "+g+" does not exist in Grid")).backingJsObject;if(a.n.a.length!=l.a.length){c=a.n;t(l);for(c=new Xk(c);c.a<c.c.a.length;)d=Yk(c),-1!=uo(l,d)&&xB(c);yB(l,a.n)}a.n=l;l=dw(a);Wz(e,0,l.b.ld());$z(a.v.c,hB(a));for(e=new Xk(a.n);e.a<e.c.a.length;)c=Yk(e),c.i&&XA(c.i.a);for(l=new Xk(a.D.d);l.a<l.c.a.length;)e=
Yk(l),zB(e);for(l=new Xk(a.A.d);l.a<l.c.a.length;)e=Yk(l),zB(e);AB(a.j);T(a,new mw)}function BB(a,b){var c;if(!b)throw(new E("dataSource can't be null.")).backingJsObject;a.S.ge();a.q&&Ht(a.q,null);a.q=b;Ht(b,new CB(a,b));c=a.v.a.p;0!=c&&Dt(a.v.a,0,c);DB(a)}function At(a,b,c){var d,e;(Zv(),$v)!=a.r&&(e=F(b),d=Iq(a.W,F(b)),c&&!d?(FA(a.v.a.b,b,50),Hm(a.W,e)):!c&&d&&(FA(a.v.a.b,b,-1),a.W.a.sf(e)))}
function DB(a){var b,c;c=(b=S(a.q.c.c,"size"),X((Y(),Z),b,F(0),F(0)).a);-1==c&&or(a)&&(b=a.Ke().a,b=w($wnd.Math.ceil(Fy(b)/b.i))+1,c=0>b?0:b);0<c&&Bt(a.v.a,0,c)}function EB(a,b){if(-1>b||b>a.n.a.length)throw(new E("count must be between -1 and the current number of columns ("+a.n.a.length+")")).backingJsObject;a.B=b;$z(a.v.c,hB(a))}
function FB(a,b){a.S&&a.S.he(null);a.S=b;b.he(a);var c=a.S.ee(),d;if(a.Q!=c){a.Q&&(a.Q&&(d=a.Q,d.d&&Uw(d)),d=a.R,a.R=null,tB(a,d),d=a.c,d.a=GB(d.a,-1));if(a.Q=c){d=a.c;d.a=GB(d.a,1);a.R=new HB(a,c);TA(a,a.R,0);c=a.R;IB(c,-1);if(c.a)throw(new Oq("can't set the selection column editable")).backingJsObject;c.f=!1;c.r&&(c.r=!1,c.i&&sB(c.i));c.a=!0}else a.R=null,Jt(a.v.a,0,a.v.a.p);$z(a.v.c,hB(a))}Jt(a.v.a,0,a.v.a.p)}
function JB(a,b){var c;Aq((R(),a.ab),b);$x(a.v,b);c=a.t;null!=c.r&&(mh(c.f,c.r),mh(c.d,c.r+"-cells"),mh(c.i,c.r+"-cells"),mh(c.k,c.r+"-footer"),mh(c.n,c.r+"-message"),mh(c.b,c.r+"-buttons"),yq(c.p,c.r+"-save"),yq(c.c,c.r+"-cancel"));c.r=b+"-editor";nh(c.f,c.r);nh(c.d,c.r+"-cells");nh(c.i,c.r+"-cells frozen");nh(c.k,c.r+"-footer");nh(c.n,c.r+"-message");nh(c.b,c.r+"-buttons");var d=c.p,e=c.r+"-save";nh((R(),d.ab),e);d=c.c;c=c.r+"-cancel";nh((R(),d.ab),c);c=a.T;d=b+"-sidebar";Aq((R(),c.ab),d);Aq(c.f.vc(),
d);e=d+"-content";Aq(c.a.vc(),e);d+="-button";Aq(c.d.vc(),d);c.f&&c.f.u?(sq(c.ab,"open",!0),rq(c.f,"open"),sq(c.ab,"closed",!1),yq(c.f,"closed")):(sq(c.ab,"open",!1),yq(c.f,"open"),sq(c.ab,"closed",!0),rq(c.f,"closed"));c=a.T;sq((R(),c.ab),"v-contextmenu",!0);rq(c.f,"v-contextmenu");c=vq(a.ab)+"-row";a.L=c+"-has-data";a.N=c+"-selected";a.O=c+"-stripe";a.d=vq(a.ab)+"-cell-focused";a.K=vq(a.ab)+"-row-focused";or(a)&&(rB(a.v.j,a.D),Jt(a.v.a,0,a.v.a.p),rB(a.v.f,a.A))}
function ZA(a,b){var c,d,e,f;c=0;for(f=b.Kc();f.Vc();)e=f.Wc(),d=kp((R(),e)),0>d?vp(a.ab,e):c|=d;0<c&&(-1==a.Z?wp((R(),a.ab),c|(a.ab.__eventBits||0)):a.Z|=c)}function KB(a,b){qq();var c;c=ih(a,"customStyle");if(null==c?null!=b:c!==b)null!=c&&0!=(y(),c).length&&mh(a,c),null!=b&&0!=(y(),b).length&&$g(a,b),a.customStyle=b}function cB(a,b){qq();a.Hc(b)}r(263,664,La);_.Jc=function(){throw(new Oq("Cannot add widgets to Grid with this method")).backingJsObject;};_.Ac=function(){this.T._==this&&this.T.Dc()};
_.Bc=function(){this.T._==this&&this.T.Ec()};_.gd=function(){(R(),this.ab).focus()};_.Ke=LB;_.Kc=function(){throw(new Oq("Cannot iterate through widgets in Grid this way")).backingJsObject;};_.Dc=function(){pr(this);0==this.Ke().a.p&&this.q&&DB(this);XA(this.a)};_.lc=function(a){lB(this,a)};_.Ec=function(){var a,b,c;a=new zt(this.W);for(a=(c=(new Im(a.a)).a.pf().Kc(),new Jm(c));a.a.Vc();)c=(b=a.a.Wc(),b.If()).a,At(this,c,!1);qr(this)};_.Le=function(){qB(this)};_.Me=function(){sB(this)};_.Lc=px;
_.Oc=function(a){a?(R(),this.ab).focus():(R(),this.ab).blur()};_.xc=function(a){Xx(this.v,a)};_.yc=function(a){by(this.v,a)};_.k=!1;_.p=!1;_.u=!0;_.B=0;_.Q=null;var MB=B(263);function NB(a,b){var c,d;return 0==a.p.w.e.d&&a.p.T._&&!OB(a.p.T)&&(c=b+dh(O(a.p)),d=dh(O(a.p.T)),c-=d,0<c)?b-c:1.7976931348623157E308}
function Pv(a,b){b&&(a.c=(Us(),Us(),-1!=Oc((K(),b).type,"touch")?ck(b.changedTouches[0]):uh(b.clientX||0)),a.a=0);var c,d,e,f;d=a.c-dh(a.n);c=PB(yA(a.k));e=a.k;if(e.b){for(f=e.b;e=f.a[1];)f=e;e=f}else e=null;e=PB(e);f=a.p.v.o.k;d+f<(t(c),c)?d=(t(c),c)-f+a.a:d+f>(t(e),e)&&(d=(t(e),e)-f+a.a);e=NB(a,d);c=at(a.p.v.A);e=$wnd.Math.min(e,c);c=w(Ev(a.p.b));d=$wnd.Math.max(c,$wnd.Math.min(d,e));d-=(a.e.clientWidth|0)/2|0;a.e.style.left=d+(Cj(),"px");Qv(a,a.c)}
function Qv(a,b){var c,d,e,f,g;g=a.p.v.o.k;e=b-dh(a.p.v.j.o);d=(d=xA(a.k,e,!0))?new QB(d):null;a:{var l;f=null;for(l=a.k.b;l;){c=RB(e,l.d);if(0==c){c=l;break a}0>=c?l=l.a[0]:(f=l,l=l.a[1])}c=f}c=c?new QB(c):null;f=d?G(d.d)-e:1.7976931348623157E308;e=c?e-G(c.d):1.7976931348623157E308;g=0-g;f>e?(a.j=c.e.a,g+=G(c.d)):(a.j=d.e.a,g+=G(d.d));g+=a.a;d=Ev(a.p.b);e=NB(a,g);c=dw(a.p).b.ld();a.j==c&&e<g&&g<=at(a.p.v.A)?g=e-a.g:(g<d||g>$wnd.Math.min(e,at(a.p.v.A))||0>g)&&(g=-1E7);a.f.style.left=g+(Cj(),"px")}
function SB(a){this.p=a;this.b=new TB(this);this.k=new MA}r(303,1,{},SB);_.ud=function(){!this.d&&(this.d=yp(new UB(this)));Iv(this.p.b)};_.vd=function(){Zg(this.n);Zg(this.e);mh(this.p.w.a,"dragged")};
_.wd=function(a){a:{var b,c,d,e,f,g,l,m,n,p,u,x,C,L,P;n=this.k;n.b=null;n.c=0;m=this.p.w.c;l=jB(this.p.D,this.p.w.e.d);n=m+VA(l,this.p.w.b).a;f=this.p.S.ee()?ce(0,this.p.B)+1:ce(0,this.p.B);g=new rt(m,n);n=-1;x=this.p.n.a.length+1;P=new Vk;c=new Sd;yB(c,this.p.D.d);yB(c,this.p.A.d);for(L=new Xk(c);L.a<L.c.a.length;)if(C=Yk(L),0!=ks(C.b))for(u=C==l,c=f;c<this.p.n.a.length;c++)if(b=VA(C,Fv(this.p,c)),e=b.a,!(1>=e))if(b=c+e,d=new rt(c,b),(p=g.b<d.a&&d.b<g.a)&&!u){if(!Qt(d,g)){if(!Qt(g,d))break a;c<=
m&&c>n&&(n=c);b<x&&(x=b)}c=b-1}else for(;1<e;)++c,--e,Hm(P,F(c));if(n!=x-1){l=Ev(this.p.b);for(m=f;m<this.p.n.a.length;m++)f=Fv(this.p,m),!Iq(P,F(m))&&!f.n&&(-1!=n?m>=n&&m<=x&&HA(this.k,l,F(m)):HA(this.k,l,F(m))),l+=eu(f);-1==n&&HA(this.k,l,F(this.p.n.a.length))}}if(0==this.k.c)return!1;this.n||(this.o=(R(),Dh()),this.f=xh(),this.o.appendChild(this.f),this.n=Fh(),this.n.appendChild(this.o),this.n.className="header-drag-table");nh(this.o,this.p.v.j.o.className||"");nh(this.f,vq(O(this.p))+"-drop-marker");
for(n=x=0;n<this.p.w.e.d;n++)x+=(fh(ez(this.p.v.j,n)).offsetHeight||0)|0;this.o.style.top=x+(Cj(),"px");O(this.p).appendChild(this.n);this.g=at(this.f)/2;this.e=(R(),this.p.w.a.cloneNode(!0));this.e.style.width="";this.f.style.height=Oh(this.e.style);this.o.appendChild(this.e);$g(this.p.w.a,"dragged");$g(this.e,"dragged-column-header");this.p.b.i=60;n=this.p.b;x=(Lv(),Sv);P=this.b;n.j=x;n.b=P;Hv(n);n.g=yp(new Uv(n));var V,za;x=n.j==(Lv(),Mv)?ch((za=Gv(n),za?za.tHead:null))+1:dh(Gv(n));n.j==Mv?za=
eh((V=Gv(n),V?V.tFoot:null))-1:(V=Gv(n),za=(K(),M).Cb(V)+((V.offsetWidth||0)|0));V=za;x+=Ev(n);n.n=x+n.i;n.c=V-n.i;n.d=n.i;50>n.c-n.n&&(V=50-(n.c-n.n),n.n-=V/2,n.c=w(n.c+V/2),n.d=w(n.d-V/2));n.f=yp(n.k);n.a=new Ov(n,w($wnd.Math.ceil(n.n)),n.c,n.d);V=n.a;V.i=!0;V.i&&10<=V.d&&(V.e=(!Kd&&(Kd=Ld()?new Md:new Nd),Kd).kb(V,O(V.p.e)));(K(),M).Bb(a);a.stopPropagation();return!0};_.xd=function(a){Pv(this,a)};
_.yd=function(){var a,b,c,d;d=this.p.w.c;b=VA(jB(this.p.D,this.p.w.e.d),this.p.w.b).a;this.j!=d&&this.j!=d+b&&(c=gu(new zo(this.p.n)),a=new Sd,d<this.j?(yB(a,new OA(c.a.Ff(0,d))),yB(a,VB(c,d+b,this.j)),yB(a,new OA(c.a.Ff(d,d+b))),yB(a,VB(c,this.j,c.b.ld()))):(yB(a,VB(c,0,this.j)),yB(a,new OA(c.a.Ff(d,d+b))),yB(a,VB(c,this.j,d)),yB(a,VB(c,d+b,c.b.ld()))),be(a,this.p.R),b=mB(this.p.c),this.i=fu(gu(new zo(this.p.n)),fB(this.p,b.a)),a=$d(a,Ib(WB,{645:1,3:1,4:1},80,a.a.length,0)),wB(this.p,a),d=mB(this.p.c),
c=d.a,a=d.c,b=this.p.w.c,d=tw(this.p.v,d.b),this.i==b?(b=this.j>b?this.j-1:this.j,b=fu(dw(this.p),Fv(this.p,b)),nB(this.p.c,a,b,d)):this.j<=this.i&&b>this.i?nB(this.p.c,a,c+1,d):this.j>this.i&&b<this.i&&nB(this.p.c,a,c-1,d))};_.a=0;_.c=0;_.g=0;_.i=0;_.j=0;B(303);function TB(a){this.a=a}r(304,1,{},TB);B(304);function UB(a){this.a=a}r(305,1,Da,UB);_.kc=function(a){1==xp(a.d)&&(a.a=!0,Nh(a.d),$r(this.a.d.a),this.a.d=null)};B(305);function XB(a){this.a=a}r(306,1,Ja,XB);_.Vd=function(){T(this.a,new uv)};
B(306);function YB(a){this.a=a}r(307,1,{15:1,712:1},YB);B(307);function ZB(a){this.a=a}r(308,1,{15:1,694:1},ZB);_.ke=function(){var a=this.a;Jt(a.v.a,0,a.v.a.p)};B(308);function $B(a){this.a=a}r(309,1,Ma,$B);_._d=function(a){if(13==Kh(a.d)&&jB(this.a.D,a.c.e.d).a){var b=this.a.V,c=a.c.b;a=a.d;a=!!(K(),a).shiftKey;kB(b,c,a)}};B(309);function aC(a){this.a=a}r(310,1,Ka,aC);_.Zd=function(){this.a.p=!1};B(310);function Kt(a,b,c){a.a.o=W(b,c);T(a.a,new Gt(a.a.o))}function CB(a,b){this.a=a;this.b=b}
r(311,1,{},CB);B(311);function $A(a,b){this.a=a;this.b=b}r(312,1,{},$A);_.tb=function(){this.a.p||this.b.Zd(new Gt(this.a.o))};B(312);function XA(a){!a.b&&or(a.d)&&(a.b=!0,Rg((Jg(),Kg),a.a))}function bC(a){this.d=a;this.a=new cC(this)}r(275,1,{},bC);_.b=!1;_.c=0;B(275);function cC(a){this.a=a}r(290,1,{},cC);
_.tb=function(){if(this.a.b)if(this.a.d.D.b||this.a.d.A.a)10>this.a.c?(Rg((Jg(),Kg),this),++this.a.c):(this.a.c=0,Mg((Jg(),Kg),this));else if(this.a.d.p)Mg((Jg(),Kg),this);else{var a=this.a;a.b=!1;a.c=0;var b,c,d;d=at(a.d.v.A);for(c=new iu(dw(a.d).b.Kc());c.b.Vc();)b=c.b.Wc(),0<=b.t?d-=b.t:0<=b.Pe()&&(d-=b.Pe());if(0>d){var e,f,g,l,m,n,p;l=new dC;g=dw(a.d);for(f=0;f<g.b.ld();f++)eC(l,F(f),g.a.yf(f).t);Vx(a.d.v.c,l);l=new dC;for(m=0;m<g.b.ld();m++)if(f=g.a.yf(m),e=0>f.t)e=eu(f),e<(p=f.Pe(),0<=p?p:
4.9E-324)?eC(l,F(m),f.Pe()):e>(n=f.Oe(),0<=n?n:1.7976931348623157E308)&&eC(l,F(m),f.Oe());Vx(a.d.v.c,l)}else{var u,x,C,L,P,V,za,$a,Xh,XD;P=!0;V=d=0;p=new Vk;L=new Sd;n=new Ag;b=dw(a.d);for(C=new iu(b.b.Kc());C.b.Vc();)c=C.b.Wc(),u=c.t,x=0<=u,u=$wnd.Math.max($wnd.Math.min(($a=c.Oe(),0<=$a?$a:1.7976931348623157E308),u),c.Pe()),P=P&&(-1==c.Ne()||c==a.d.R),x?(el(n,F(b.a.zf(c)),u),V+=u):(L.a[L.a.length]=c,el(n,F(b.a.zf(c)),-1));Vx(a.d.v.c,n);for(x=new Xk(L);x.a<x.c.a.length;){c=Yk(x);f=P?1:c.Ne();C=($a=
c.Oe(),0<=$a?$a:1.7976931348623157E308);L=$wnd.Math.min(C,eu(c));if(C=L<C&&0<f&&c!=a.d.R)d+=f,p.a.rf(c,p);V+=L;el(n,F(b.a.zf(c)),L)}L=at(a.d.v.A)-V;if(0>=L||0>=d)0>=L&&Vx(a.d.v.c,n);else{do for(u=!1,XD=L/d,za=(e=(new Im(p.a)).a.pf().Kc(),new Jm(e));za.a.Vc();)c=(g=za.a.Wc(),g.If()),V=(f=c.Ne(),0<f?f:0>f?1:0),P=b.a.zf(c),x=G(Q(n,F(P))),C=($a=c.Oe(),0<=$a?$a:1.7976931348623157E308),c=x+XD*V,C<=c&&(za.a.Xc(),d-=V,u=!0,L-=C-x,el(n,F(P),C));while(u);if(!(0>=d&&0==p.a.ld())){$a=0;Os((Js(),!U&&(U=new Ls),
Js(),U))||Ps((!U&&(U=new Ls),U))||-1!=Oc(Rs(),"PhantomJS")?(C=w(L/d),$a=w(L-C*d)):C=L/d;for(L=(Xh=(new Im(p.a)).a.pf().Kc(),new Jm(Xh));L.a.Vc();)c=(g=L.a.Wc(),g.If()),V=(f=c.Ne(),0<f?f:0>f?1:0),P=b.a.zf(c),x=G(Q(n,F(P))),c=x+C*V,0<$a&&(c+=1,--$a),el(n,F(P),c),d-=V;do{Xh=!1;$a=0;for(d=new iu(b.b.Kc());d.b.Vc();)c=d.b.Wc(),x=(l=c.Pe(),0<=l?l:4.9E-324),P=b.a.zf(c),V=G(Q(n,F(P))),(C=0>c.t)&&V<x&&(el(n,F(P),x),$a+=x-V,Xh=!0,p.a.sf(c));d=0;for(P=(e=(new Im(p.a)).a.pf().Kc(),new Jm(e));P.a.Vc();)c=(g=P.a.Wc(),
g.If()),d+=(f=c.Ne(),0<f?f:0>f?1:0);P=$a/d;for(d=(m=(new Im(p.a)).a.pf().Kc(),new Jm(m));d.a.Vc();)c=(g=d.a.Wc(),g.If()),$a=P*(f=c.Ne(),0<f?f:0>f?1:0),c=b.a.zf(c),el(n,F(c),G(Q(n,F(c)))-$a)}while(Xh)}Vx(a.d.v.c,n)}}at(a.d.v.A)}};B(290);function fC(a){this.a=a}r(280,1,{},fC);
_.zd=function(a,b){var c,d,e,f,g,l;for(d=b.Kc();d.Vc();)if(c=d.Wc(),f=(e=fB(this.a,c.a),e.e),A(f,64))try{l=f;g=l.sd();var m=(R(),g.ab);c.c.appendChild(m);cB(g,this.a)}catch(n){if(n=ec(n),A(n,10))qq(),oc(MB);else throw n.backingJsObject;}};
_.Ad=function(a,b){var c,d,e,f,g;d=this.a.M;c=a.c;d.d=a.d;d.c=null;d.a=c;for(d=b.Kc();d.Vc();)if(c=d.Wc(),g=(f=fB(this.a,c.a),f.e),A(g,51))try{e=fB(this.a,c.a);var l=this.a.I,m=fu(gu(new zo(this.a.n)),e);g=e;l.a=c;Vv(l,c.a,m,g)}catch(n){if(n=ec(n),A(n,10))qq(),oc(MB);else throw n.backingJsObject;}};
_.Bd=function(a,b){var c,d,e,f,g;d=a.d;g=this.a.M;c=st(this.a.q,d);var l=a.c;g.d=d;g.c=c;g.a=l;for(d=b.Kc();d.Vc();)if(c=d.Wc(),g=(f=fB(this.a,c.a),f.e),A(g,51))try{e=fB(this.a,c.a);var m=this.a.I,n=fu(gu(new zo(this.a.n)),e),l=e;m.a=c;Vv(m,c.a,n,l);g.pd(this.a.I)}catch(p){if(p=ec(p),A(p,10))qq(),oc(MB);else throw p.backingJsObject;}};
_.Cd=function(a,b){var c,d,e,f,g;for(d=new yu(new zu(b.a.a,b.c,b.c+b.b),!0);d.c+d.d<d.a.a.length;)if(c=Bu(d),f=(e=fB(this.a,c.a),e.e),A(f,64))try{if(g=Vs(fh(c.c))){cB(g,null);var l=(R(),g.ab);c.c.removeChild(l)}}catch(m){if(m=ec(m),A(m,10))qq(),oc(MB);else throw m.backingJsObject;}};
_.Dd=function(a,b){var c,d,e,f,g,l,m,n,p,u,x;d=a.d;c=a.c;p=st(this.a.q,d);m=null!=p;u=lh(c,this.a.L);u!=m&&sq(c,this.a.L,m);sq(c,this.a.O,0!=a.d%2);n=this.a.M;n.d=d;n.c=p;n.a=c;if(m)if(sq(c,this.a.N,this.a.S.fe(p)),this.a.P)try{var C=this.a.P;f=C.b(new gC(this.a.M,C.a.c));KB(c,f)}catch(za){if(za=ec(za),A(za,10))qq(),oc(MB);else throw za.backingJsObject;}else KB(c,null);else u&&(sq(c,this.a.N,!1),KB(c,null));c=this.a.c;if(c.g==a.d&&c.c==c.j.v.a)a.c!=c.i&&(c.i&&sq(c.i,c.j.K,!1),c.i=a.c,sq(c.i,c.j.K,
!0));else if(c.i==a.c||c.c!=c.j.v.a&&c.i)sq(c.i,c.j.K,!1),c.i=null;for(d=b.Kc();d.Vc();){c=d.Wc();f=fB(this.a,c.a);g=fu(gu(new zo(this.a.n)),f);hC(this.a.c,c,this.a.v.a);if(m&&this.a.g)try{Vv(this.a.f,c.a,g,f);var L=this.a.g;l=L.b(new iC(this.a.f,L.a.c));KB(c.c,l)}catch(za){if(za=ec(za),A(za,10))qq(),oc(MB);else throw za.backingJsObject;}else(m||u)&&KB(c.c,null);n=f.e;try{var P=this.a.I,C=c,V=f;P.a=C;Vv(P,C.a,g,V);A(n,51)?(e=n,m?(u||Tt(this.a.I,!0),x=f.Qe(p),e.rd(this.a.I,x)):Tt(this.a.I,!1)):m?(x=
f.Qe(p),n.rd(this.a.I,x)):Yg(c.c)}catch(za){if(za=ec(za),A(za,10))qq(),oc(MB);else throw za.backingJsObject;}}};B(280);function mB(a){return new ku(a.g,a.a.b,a.b)}function pB(a,b){if(b==a.j.v.j)b=a.j.v.a;else if(b==a.j.v.a)b=a.j.v.f;else return b;return 0==b.Hd()?pB(a,b):b}function oB(a,b){if(b==a.j.v.f)b=a.j.v.a;else if(b==a.j.v.a)b=a.j.v.j;else return b;return 0==b.Hd()?oB(a,b):b}function Ct(a,b){var c,d;c=a.c==a.j.v.a;d=b.b<=a.g;c&&d&&(a.g+=b.a-b.b,a.g=Nb(a.g,a.j.v.a.p-1),a.c.Jd(a.g))}
function Et(a,b){if(a.c==a.j.v.a){if(wx(b,a.g))a.c.Hd()>b.a?a.g=b.b:0<b.b?a.g=b.b-1:0<a.j.v.j.p?(a.g=Nb(a.f,a.j.v.j.p-1),a.c=a.j.v.j):0<a.j.v.f.p&&(a.g=Nb(a.e,a.j.v.f.p-1),a.c=a.j.v.f);else{if(b.b>a.g)return;a.g-=b.a-b.b}a.c.Jd(a.g)}}
function nB(a,b,c,d){var e,f,g,l;if(b!=a.g||!wx(a.a,c)||d!=a.c){l=a.g;a.g=b;b=a.a;if(d==a.j.v.a)Fw(a.j,a.g,(Dw(),Ew),0),a.a=W(c,1);else{g=0;e=fh(d.Id(a.g));do{f=parseInt(e.colSpan)|0;f=W(g,f);if(f.b<=c&&c<f.a){a.a=f;break}e=sh((K(),e));++g}while(e)}e=fu(gu(new zo(a.j.n)),fB(a.j,c));if(e>=a.j.v.c.b){g=a.j.v;e=(Dw(),Ew);ny(e,10);if(0>c||c>=g.c.a.a.length)throw(new Ec("The given column index "+c+" does not exist.")).backingJsObject;if(c<g.c.b)throw(new E("The given column index "+c+" is frozen.")).backingJsObject;
g=g.t;var m,n;m=Vy(g.b.c,W(0,g.b.c.b));f=Vy(g.b.c,W(0,c))-m;c=f+Qy(Jr(g.b.c.a,c));n=g.b.o.k;m=n+at(O(g.b))-m;gv(g.b.B)&&(m-=Ys());c=my(e,f,c,n,m,10);Wu(g.b.o,c)}a.c==d?jC(b,a.a)&&l!=a.g?a.c.Jd(l):(sB(a.j),qB(a.j)):(c=a.c,a.c=d,c==a.j.v.a?a.d=l:c==a.j.v.j?a.f=l:a.e=l,jC(b,a.a)?c.Jd(l):(sB(a.j),qB(a.j),c==a.j.v.a&&c.Jd(l)))}a.c.Jd(a.g)}
function hC(a,b,c){var d,e;d=b.d.d;e=Pt(W(b.a,hh(b.c,"colSpan")),a.a);c==a.c&&(d==a.g&&e?a.b!=b.c&&(a.b&&sq(a.b,a.j.d,!1),a.b=b.c,sq(a.b,a.j.d,!0)):a.b==b.c&&(sq(a.b,a.j.d,!1),a.b=null))}function kC(a){this.j=a;this.c=this.j.v.a;this.a=W(0,1);ZA(a,new Xl(z(v(tb,1),h,2,6,["keydown","click"])))}r(272,1,{},kC);_.b=null;_.d=0;_.e=0;_.f=0;_.g=0;_.i=null;B(272);function eu(a){if(a.n)a=0;else{var b=fu(dw(a.i),a);a=Qy(Jr(a.i.v.c.a,b))}return a}function lC(a,b){a.g!=b&&(a.g=b,a.i&&XA(a.i.a))}
function WA(a,b){if(a.i&&b)throw(new Fq("Column already is attached to a grid. Remove the column first from the grid and then add it. (in: "+mC(a)+")")).backingJsObject;a.i&&XA(a.i.a);a.i=b;a.i&&XA(a.i.a)}function nC(a,b){null==b&&(b="");if(a.j!==b&&(a.j=b,a.i)){var c;if(c=a.i.D.a)oC(VA(c,a),a.j),a.k&&pC(a.i.j,a)}}function qC(a,b){a.k!=b&&(a.k=b,YA(a.i.j,a))}
function rC(a,b){var c,d,e;a.n!=b&&(b?(Yz(a.i.v.c,fu(dw(a.i),a),1),a.n=!0):(a.n=!1,c=fu(dw(a.i),a),Wz(a.i.v.c,c,1),e=a.i.B,d=a.i.v.c.b,e>d&&d==c&&$z(a.i.v.c,++d)),pC(a.i.j,a),sC(a.i.D),sC(a.i.A),a.i&&XA(a.i.a),T(a.i,new rw))}
function tC(a,b){var c,d,e,f;if(!b)throw(new E("Renderer cannot be null.")).backingJsObject;b!=a.e&&(c=!1,f=0,d=null,e=0,a.i&&(A(a.e,64)||A(b,64))&&(e=fu(gu(new zo(a.i.n)),a),d=a.i.v.c,f=(Uz(d,e),Jr(d.a,e).b),Yz(d,e,1),c=!0),A(a.e,51)&&a.e.nd(),a.e=b,c&&(Wz(d,e,1),Vx(d,Wx(F(e),f))),a.i&&(c=a.i,Jt(c.v.a,0,c.v.a.p)))}function uC(a,b){a.s!=b&&(a.s=b,a.i&&sB(a.i))}function vC(a,b){dt(a.t,b)||(a.t=b,a.n||a.i&&XA(a.i.a));return a}
function mC(a){var b,c;b="";null!=a.j&&0!=Rb(a.j).length?b+='header:"'+a.j+'" ':b+="header:empty ";a.i?(c=fu(gu(new zo(a.i.n)),a),-1!=c?b+="attached:#"+c+" ":b+="attached:unindexed "):b+="detached ";b+="sortable:"+a.s+" ";return rc(a.Qf)+"["+Vc(b)+"]"}r(80,1,{80:1});_.Ne=gk;_.Oe=dz;_.Pe=function(){return this.q};_.Re=function(a){oC(a,this.j)};_.Se=function(a){return vC(this,a)};_.eb=function(){return mC(this)};_.f=!0;_.g=-1;_.j="";_.k=!1;_.n=!1;_.o=null;_.p=-1;_.q=10;_.r=!0;_.s=!1;_.t=-1;var WB=B(80);
function wC(a){this.a=a}r(279,1,{},wC);_.rd=function(a,b){var c;this.b||nb(b)||(qq(),oc(MB),mC(this.a),this.b=!0);null==b?c="":c=Ab(b);oh(a.a.c,c)};_.b=!1;B(279);function xC(a){var b,c;b=new yC;b.a+='\x3cspan class\x3d"';a.n?b.a+="v-off":b.a+="v-on";b.a+='"\x3e\x3cdiv\x3e';c=a.o;null==c&&(c=a.j);b.a+=""+c;b.a+="\x3c/div\x3e\x3c/span\x3e";return b.a}
function YA(a,b){var c,d;b.k?(c=Q(a.a,b),!c&&(c=(d=new Nr(xC(b),new zC(a,b)),sq((R(),d.ab),"column-hiding-toggle",!0),el(a.a,b,d),d)),uq(c,"hidden",b.n)):rp(a.a,b)&&vB(a.c.T.c,dl(a.a,b));AB(a)}function pC(a,b){var c;if(b.k){c=Q(a.a,b);var d=xC(b);(R(),c.ab).innerHTML=d||"";uq(c,"hidden",b.n)}}
function AB(a){var b,c,d;if(!a.b)for(d=0,c=new iu(gu(new zo(a.c.n)).b.Kc());c.b.Vc();)if(b=c.b.Wc(),b.k){b=Q(a.a,b);vB(a.c.T.c,b);var e=a.c.T.c,f=b;b=d++;if(!e._){var g=e.a.a,l=g,m=e,g=(R(),g.ab),n=0,p=l,u=m,x=void 0;if(0>n||n>p.b.c)throw(new Dc).backingJsObject;u._==p&&(x=Uq(p.b,u),x<n&&--n);mm(m);Xq(l.b,m,n);p=(R(),m.ab);R();ep.pc(g,up(p),n);Jq(m,l);AC(e.a)}m=l=void 0;if(0>b||b>e.b.a.length)throw(new Dc).backingJsObject;Iz(e.b,b,f);for(l=m=0;l<b;l++)A(Jr(e.b,l),128)&&++m;Iz(e.f,m,f);g=e;m=b;l=(R(),
f.ab);b=void 0;g.i?(b=(R(),Eh()),g=g.d,n=b,R(),ep.pc(g,up(n),m),l=up(l),b.appendChild(l)):(b=lp(g.d),R(),ep.pc(b,up(l),m));uq(f,vq(f.ab)+"-selected",!1);b=e;e=f;l=f=l=f=void 0;b.i&&(l=uo(b.b,e),-1!=l&&(f=b.i?b.d:lp(b.d),l=(R(),ep.mc(f,l)),f=ep.nc(l),2==f&&l.removeChild(ep.mc(l,1)),e.ab.colSpan=2))}}function BC(a){this.c=a;this.a=new Ag}r(278,1,{},BC);_.b=!1;B(278);function Kr(a){a.a.b=!0;rC(a.b,!a.b.n);a.a.b=!1}function zC(a,b){this.a=a;this.b=b}r(298,1,{},zC);_.tb=function(){Kr(this)};B(298);
function CC(){this.f=(R(),xh());this.d=xh();this.i=xh();this.k=xh();this.n=xh();this.b=xh();xh();this.e=new Ag;new Sd;this.q=new DC;this.a=new EC;new Vk;var a=this.p=new fr;oh((R(),a.ab),"Save");Cq(this.p,new FC,(nk(),nk(),ok));a=this.c=new fr;oh((R(),a.ab),"Cancel");Cq(this.c,new GC,ok)}r(271,1,{},CC);_.g=-1;_.o=-1;_.r=null;B(271);r(282,1,{},function(a){this.b=a});
_.tb=function(){var a;a=Xs();if(a==O(this.b.j)||a==$doc.body||2<this.a){a=this.b;var b=this.b.g;0>b||b>=dw(a.j).b.ld()||(b=fB(a.j,b),b=Q(a.e,b),A(b,646)?b.gd():A(b,113)?b.Oc(!0):(a=a.j,(R(),a.ab).focus()))}else++this.a,Mg((Jg(),Kg),this)};_.a=0;B(282);function DC(){}r(283,49,{},DC);_.nb=HC;B(283);function EC(){}r(284,49,{},EC);_.nb=HC;B(284);function FC(){}r(285,1,Aa,FC);_.Sb=function(){throw(new Fq("Cannot save: editor is not enabled")).backingJsObject;};B(285);function GC(){}r(286,1,Aa,GC);
_.Sb=function(){throw(new Fq("Cannot cancel edit: editor is not enabled")).backingJsObject;};B(286);function UA(a,b){var c,d;for(d=new Xk(a.d);d.a<d.c.a.length;)c=Yk(d),IC(c,b)}function JC(a,b){var c,d;d=a.Te();d.d=a;for(c=0;c<a.c.n.a.length;++c)IC(d,Fv(a.c,c));Iz(a.d,b,d);a.Ue();return d}function jB(a,b){try{return Jr(a.d,b)}catch(c){c=ec(c);if(A(c,28))throw(new E("Row with index "+b+" does not exist")).backingJsObject;throw c.backingJsObject;}}
function uB(a,b){var c,d;for(d=new Xk(a.d);d.a<d.c.a.length;)c=Yk(d),dl(c.c,b)}function KC(a,b){var c=Cu(a.d,b),d,e,f,g,l;e=new Vk;for(g=new iu(gu(new zo(c.d.c.n)).b.Kc());g.b.Vc();)f=g.b.Wc(),Hm(e,VA(c,f));for(c=(d=(new Im(e.a)).a.pf().Kc(),new Jm(d));c.a.Vc();)d=(l=c.a.Wc(),l.If()),A(d.b,17)&&bB(d.b);a.Ue()}function sC(a){var b;for(b=new Xk(a.d);b.a<b.c.a.length;)a=Yk(b),0!=ks(a.b)&&zB(a)}r(186,1,{});_.e=!0;B(186);function LC(){this.d=new Sd}r(269,186,{},LC);_.Te=function(){return new MC};
_.Ue=function(){this.a=!0;Rg((Jg(),Kg),new NC(this))};_.a=!1;B(269);function NC(a){this.a=a}r(281,1,{},NC);_.tb=function(){this.a.a&&(this.a.a=!1,qB(this.a.c))};B(281);function OC(a){if(a.e!=(PC(),QC))throw(new Fq("Cannot fetch HTML from a cell with type "+a.e)).backingJsObject;return a.b}function RC(a){if(a.e!=(PC(),SC))throw(new Fq("Cannot fetch Text from a cell with type "+a.e)).backingJsObject;return a.b}
function TC(a){if(a.e!=(PC(),UC))throw(new Fq("Cannot fetch Widget from a cell with type "+a.e)).backingJsObject;return a.b}function VC(a,b){if(1>b)throw(new E("Colspan cannot be less than 1")).backingJsObject;a.a=b;a.c.Ue()}function WC(a,b){a.b=b;a.e=(PC(),QC);a.c.Ue()}function oC(a,b){a.b=b;a.e=(PC(),SC);a.c.Ue()}function XC(a,b){sb(a.b)!==sb(b)&&(A(a.b,17)&&bB(a.b),a.b=b,a.e=(PC(),UC),a.c.Ue())}r(92,1,{92:1});_.a=1;_.b=null;_.d=null;B(92);function YC(){this.e=(PC(),SC)}r(270,92,{92:1},YC);B(270);
function IC(a,b){var c;c=a.Ve();c.c=a.d;el(a.c,b,c)}function zB(a){var b,c,d,e,f,g;for(c=(b=(new Qx(a.c)).a.pf().Kc(),new Rx(b));c.a.Vc();)b=(f=c.a.Wc(),f.Jf()),VC(b,1);for(c=(d=(new Im(a.b)).a.pf().Kc(),new Jm(d));c.a.Vc();)if(g=(f=c.a.Wc(),f.If()),ZC(a,g)){d=0;for(e=g.Kc();e.Vc();)b=e.Wc(),b.n||++d;VC(Q(a.b,g),1>d?1:d)}else VC(Q(a.b,g),1)}
function ZC(a,b){var c,d,e;c=new zo(gu(new zo(a.d.c.n)));if(!$C(c,b))return!1;for(d=0;d<c.a.length;++d)if(b.hf((qd(d,c.a.length),c.a[d]))){for(e=1;e<b.ld();++e)if(!b.hf((qd(d+e,c.a.length),c.a[d+e])))return!1;return!0}return!1}function VA(a,b){var c;a:{var d,e;for(e=(d=(new Im(a.b)).a.pf().Kc(),new Jm(d));e.a.Vc();)if(d=(c=e.a.Wc(),c.If()),d.hf(b)){c=d;break a}c=null}return c?Q(a.b,c):Q(a.c,b)}r(93,1,{93:1});_.e=null;B(93);function MC(){this.c=new Ag;this.b=new Ag}r(141,93,{141:1,93:1},MC);_.Ve=function(){return new YC};
B(141);function aD(a){this.b=a;this.a=new Ag}r(276,1,{},aD);_.Wd=function(a){var b;b=a.g;if(a=dl(this.a,gh((K(),b))))cB(a,null),Yg(b)};
_.Xd=function(a){var b,c,d;d=a.g;1==a.f%2?$g(Wg((K(),d)),"stripe"):mh(Wg((K(),d)),"stripe");d=a.f;b=null;try{b=this.b.r.$d(d)}catch(e){if(e=ec(e),A(e,11))qq(),oc(MB);else throw e.backingJsObject;}a=a.g;b?(c=(R(),b.ab),a.appendChild(c),cB(b,this.b),el(this.a,c,b),b=$s(c),a=(Us(),Ws(a,z(v(tb,1),h,2,6,["borderTopWidth","borderBottomWidth"]))),b+=a):(Yg(a),b=50);FA(this.b.v.a.b,d,b)};B(276);function bD(a,b){var c;c=jB(a,b);KC(a,b);c==a.a&&cD(a,null)}
function cD(a,b){if(b!=a.a){if(b&&-1==uo(a.d,b))throw(new E("Cannot set a default row that does not exist in the container")).backingJsObject;a.a&&dD(a.a,!1);b&&dD(b,!0);a.a=b;a.b=!0;Rg((Jg(),Kg),new eD(a))}}function fD(){this.d=new Sd}r(268,186,{},fD);_.Te=function(){return new gD};_.Ue=function(){this.b=!0;Rg((Jg(),Kg),new eD(this))};_.b=!1;B(268);function eD(a){this.a=a}r(188,1,{},eD);_.tb=function(){this.a.b&&(this.a.b=!1,sB(this.a.c))};B(188);function hD(){this.e=(PC(),SC)}
r(140,92,{140:1,92:1},hD);B(140);function dD(a,b){var c,d;if(a.a=b)for(d=new iu(gu(new zo(a.d.c.n)).b.Kc());d.b.Vc();)c=d.b.Wc(),c.Re(VA(a,c))}function gD(){this.c=new Ag;this.b=new Ag}r(94,93,{94:1,93:1},gD);_.Ve=function(){return new hD};_.a=!1;B(94);function IB(a,b){if(b!=a.t&&a.a)throw(new Oq("The selection column cannot be modified after init")).backingJsObject;vC(a,b);return a}function HB(a,b){this.d=a;tC(this,b);this.c=this.a=!1}r(273,80,{80:1},HB);
_.Qe=function(a){return gc(),this.d.S.fe(a)?ic:hc};_.Ne=iD;_.Oe=jD;_.Pe=jD;_.Re=function(a){var b,c;b=this.d.S;if(this.b)for(c=new Xk(this.d.D.d);c.a<c.c.a.length;)b=Yk(c),VA(b,this).e==(PC(),UC)&&oC(VA(b,this),"");else this.b=new ir,c=vq(O(this.d))+"-select-all-checkbox",Aq(this.b.vc(),c),c=this.b,b=new kD(this,b),c.c||(Cq(c,new kr(c),(nk(),nk(),ok)),c.c=!0),Dq(c,b,(!Nk&&(Nk=new sk),Nk)),hr(this.b,(gc(),this.c?ic:hc),!1),b=this.d,Dq(b,new lD(this),b.i.a),ux(this.d,new mD(this));XC(a,this.b)};
_.Se=function(a){return IB(this,a)};_.a=!1;_.c=!1;B(273);function kD(a,b){this.a=a;this.b=b}r(287,1,Ea,kD);_.Ub=function(a){yb(G(a.a))?(T(this.a.d,new Kw),this.a.c=!0):(this.b.me(),this.a.c=!1)};B(287);function lD(a){this.a=a}r(142,1,{15:1,696:1,697:1,142:1},lD);_.ae=function(a){var b;b=a.c;a=uo(this.a.d.D.d,this.a.d.D.a);0==b.c&&b.e.d==a&&hr(this.a.b,(gc(),yb(G(gr(this.a.b)))?hc:ic),!0)};B(142);function mD(a){this.a=a}r(288,1,Ma,mD);
_._d=function(a){var b;32==Kh(a.d)&&(b=jB(this.a.d.D,a.c.e.d),b.a&&a.c.b==this.a&&hr(this.a.b,(gc(),yb(G(gr(this.a.b)))?hc:ic),!0))};B(288);function nD(){nD=k;oD=new pD;qD=new rD;sD=new tD}r(62,5,Na);var qD,sD,oD,uD=D(62,function(){nD();return z(v(uD,1),h,62,0,[oD,qD,sD])});function pD(){N.call(this,"SINGLE",0)}r(299,62,Na,pD);D(299,null);function rD(){N.call(this,"MULTI",1)}r(300,62,Na,rD);D(300,null);function tD(){N.call(this,"NONE",2)}r(301,62,Na,tD);D(301,null);
function OB(a){return!!a.f&&a.f.u}
function vD(a){var b;b=a.b.v.j;if(0!=b.p&&ez(b,0).hasChildNodes()){b=fh(ez(b,0));b=$s(b);var c=(R(),a.ab);Us();var d,e,f,g;(Js(),!U&&(U=new Ls),Js(),U).a.g?(g=Ph(c.style,"width"),e=Ph(c.style,"height"),f=(c.offsetWidth||0)|0,d=(c.offsetHeight||0)|0,1>d&&(d=1),1>f&&(f=10),c.style.width=f+(Cj(),"px"),c.style.height=d+"px",d=((c.offsetHeight||0)|0)-(parseInt(c.clientHeight)|0),c.style.height=e,c.style.width=g):d=((c.offsetHeight||0)|0)-(parseInt(c.clientHeight)|0);zq(a.d,b-(d/2|0)+"px")}else qq(),oc(MB),
zq(a.d,b.i+"px")}function AC(a){var b,c;b=0<a.a.b.c;(c=!!a._)&&!b?(cB(a,null),Zg((R(),a.ab))):!c&&b&&(xk(a.f,!1),b=O(a.b),c=(R(),a.ab),b.appendChild(c),cB(a,a.b),vD(a))}
function wD(a){this.e=new xD(this);this.b=a;this.g=new rr;lr(this,this.g);this.d=new fr;Cq(this.d,this.e,(nk(),nk(),ok));Wq(this.g,this.d);this.a=new yD(this);this.f=new zD;this.f.d=!0;a=this.f;uq(a,vq((wq(),xq).bd(mp((R(),a.ab))))+"-popup",!0);tr(this.f,this.a);a=O(this.g);this.f.a=a;Dq(this.f,new AD(this),Hk?Hk:Hk=new sk);this.c=new BD(this);a=new CD(this);Cq(this.d,a,(uk(),uk(),vk));Cq(this.c,a,vk)}r(277,663,Ba,wD);_.Dc=function(){pr(this);Mg((Jg(),Kg),new DD(this))};B(277);
function xD(a){this.a=a}r(291,1,Aa,xD);
_.Sb=function(){if(OB(this.a))xk(this.a.f,!1);else{var a=this.a;if((!a.f||!a.f.u)&&a._){sq((R(),a.ab),"open",!0);rq(a.f,"open");sq(a.ab,"closed",!1);yq(a.f,"closed");var a=a.f,b=(R(),a.ab).style;(K(),b).opacity=0;ED=a;b=a.Y&&a.u;a.u||(a.Y&&mm(a),Rr(a.t,!0,!1));b||Os((Js(),!U&&(U=new Ls),Js(),U))||Ps((Js(),!U&&(U=new Ls),Js(),U))||((R(),a.ab).style.visibility="hidden",a.c&&(a.c.style.visibility="hidden"),uq(a,vq(xq.bd(mp(a.ab)))+"-animate-in",!0),b=new Ts(a.ab),b=Is(b),null==b&&(b=""),a.ab.style.visibility=
"visible",a.c&&(a.c.style.visibility="visible"),-1!=(y(),b).indexOf("animate-in")?(a.n=!1,a.b=Gs(a.ab,new FD(a))):uq(a,vq(xq.bd(mp(a.ab)))+"-animate-in",!1));a.n?Fd(new GD(a),200):HD(a,1);ED=null;var b=a.ab,c=a.a,d=b.getBoundingClientRect(),c=c.getBoundingClientRect();b.style.left=c.right-d.left-d.width+"px";b.style.top=c.top-d.top+c.height+"px";a=a.ab.style;(K(),a).opacity=1}}};B(291);function yD(a){this.a=a;rr.call(this)}r(292,143,xa,yD);_.Lc=function(a){(a=Tq(this,a))&&AC(this.a);return a};B(292);
function vB(a,b){a.g==b&&mk(a,null);var c;var d;d=uo(a.b,b);if(-1==d)c=!1;else{c=a.i?a.d:lp(a.d);var e=(R(),ep.mc(c,d));c.removeChild(e);Cu(a.b,d);c=!0}c&&((R(),b.ab).colSpan=1,be(a.f,b));0==a.f.a.length&&mm(a.a.c)}
function BD(a){this.a=a;this.b=new Sd;this.f=new Sd;a=(Mr(),ps(),!0);var b,c;c=(R(),Fh());this.d=Bh();b=up(this.d);c.appendChild(b);a||(b=Eh(),b=up(b),this.d.appendChild(b));this.i=a;b=(xr(),yr).Zc();c=up(c);b.appendChild(c);this.ab=b;Ye();this.ab.setAttribute("role",Cf.a);-1==this.Z?wp(this.ab,2225|(this.ab.__eventBits||0)):this.Z|=2225;this.ab.className="gwt-MenuBar";a?uq(this,vq(this.ab)+"-vertical",!0):uq(this,vq(this.ab)+"-horizontal",!0);this.ab.style.outline="0px";this.ab.setAttribute("hideFocus",
"true");Cq(this,new Lr(this),(ik(),ik(),jk))}r(293,190,wa,BD);_.lc=function(a){var b;R();128==kp((K(),a).type)&&13==(a.keyCode|0)?(b=this.g,Er(this,a),Mg((Jg(),Kg),new ID(this,b))):Er(this,a)};B(293);function ID(a,b){this.a=a;this.b=b}r(294,1,{},ID);_.tb=function(){mk(this.a,this.b);var a=this.a;(xr(),yr).$c((R(),a.ab))};B(294);function CD(a){this.a=a}r(295,1,{711:1,15:1},CD);B(295);function AD(a){this.a=a}r(296,1,Ga,AD);
_.Tb=function(){var a=this.a;sq((R(),a.ab),"open",!1);yq(a.f,"open");a=this.a;sq((R(),a.ab),"closed",!0);rq(a.f,"closed")};B(296);function DD(a){this.a=a}r(297,1,{},DD);_.tb=function(){vD(this.a)};B(297);function JD(a,b,c){var d,e,f,g;e=jB(a.b,b.d);b=dw(a.c);for(d=c.Kc();d.Vc();)if(c=d.Wc(),f=VA(e,b.a.yf(c.a)),(PC(),UC)==f.e&&(g=TC(f))&&!g.Cc()){g=a.b.c;f=TC(f);var l=(R(),f.ab);c.c.appendChild(l);cB(f,g)}}
function KD(a,b,c){var d;if(a.b.d.a.length>b.d)for(b=jB(a.b,b.d),a=dw(a.c),c=c.Kc();c.Vc();)d=c.Wc(),d=VA(b,a.a.yf(d.a)),(PC(),UC)==d.e&&TC(d)&&TC(d).Cc()&&bB(TC(d))}function LD(a,b,c){this.c=a;this.b=b;this.a=c}r(187,1,{},LD);_.zd=function(a,b){JD(this,a,b)};_.Ad=ou;_.Bd=ou;_.Cd=function(a,b){KD(this,a,b)};
_.Dd=function(a,b){var c,d,e,f,g,l,m;l=jB(this.b,a.d);f=dw(this.c);KB(a.c,l.e);for(d=b.Kc();d.Vc();){c=d.Wc();e=VA(l,f.a.yf(c.a));if(A(l,94)){var n=l,p=c,u=m=void 0,x=void 0,C=g=x=void 0,u=void 0;m=p.c;g=lh(m,"sort-asc")||lh(m,"sort-desc");u=p.c;u.removeAttribute("sort-order");mh(u,"sort-desc");mh(u,"sort-asc");mh(u,"sortable");if(n.a){u=fB(this.c,p.a);a:{n=u;x=p=void 0;for(x=new iu(gu(this.c.U).b.Kc());x.b.Vc();)if(p=x.b.Wc(),p.a==n){C=p;break a}C=null}(x=u.s)&&$g(m,"sortable");x&&C&&((Dx(),Ex)==
C.b?$g(m,"sort-asc"):$g(m,"sort-desc"),x=fu(gu(this.c.U),C),-1<x&&1<gu(this.c.U).b.ld()&&(n=(y(),""+(x+1)),m.setAttribute("sort-order",n)),g||(m=u,u=g=void 0,g=fu(gu(new zo(this.c.n)),m),u=hu(this.c.v.c,g),eu(m)<u&&(Vx(this.c.v.c,Wx(F(g),u)),T(this.c,new ju))))}}m=c;g=e.a;u=void 0;if(1>g)throw(new E("Number of cells should be more than 0")).backingJsObject;u=hh(m.c,"colSpan");if(1!=g||1!=u){m.c.colSpan=g;for(var n=m,L=C=x=p=void 0,p=Du(n.b,g-1).b,C=n.d.b[n.a],x=L=0;x<p;x++)L+=n.d.b[n.a+x+1];n.c.style.width=
C+L+(Cj(),"px");n=g;x=p=void 0;p=Du(m.b,(u>n?u:n)-1);if(u<n)for(x=0;x<p.b;x++)(qd(u+x-1,p.b),p.c.yf(p.a+(u+x-1))).c.style.display=(fi(),"none");else if(u>n)for(x=0;x<p.b;x++)(qd(n+x-1,p.b),p.c.yf(p.a+(n+x-1))).c.style.display="";m.b.d=g-1}m=c.c;Yg(m);KB(m,e.d);e.e!=(PC(),UC)?(g=(R(),xh()),A(l,94)?(nh(g,vq(O(this.c))+"-column-header-content"),l.a&&nh(g,(g.className||"")+" "+vq(O(this.c))+"-column-default-header-content")):A(l,141)?nh(g,vq(O(this.c))+"-column-footer-content"):(qq(),oc(MB),qc(l.Qf)),
m.appendChild(g)):g=m;switch(e.e.g){case 0:oh(g,RC(e));break;case 1:e=OC(e);g.innerHTML=e||"";break;case 2:KD(this,a,new Xl(z(v(ru,1),h,95,0,[c]))),g.innerHTML="",JD(this,a,new Xl(z(v(ru,1),h,95,0,[c])))}f.a.yf(c.a).r&&A(l,94)&&l.a&&(e=c.a,g=e=new bu(vq(O(this.c))+"-column-resize-handle",new MD(this,e)),g.e&&(g.e.removeChild(g.d),g.e=null),e.e=m,e.e.appendChild(e.d));hC(this.c.c,c,this.a)}};B(187);function MD(a,b){this.d=a;this.e=b;this.a=fB(this.d.c,this.e)}r(302,1,{},MD);_.b=0;_.c=0;_.e=0;B(302);
function kB(a,b,c){var d;if(-1==uo(a.c.n,b))throw(new E("Given column is not a column in this grid. "+mC(b))).backingJsObject;if(b.s){a:{var e;for(e=new iu(gu(a.c.U).b.Kc());e.b.Vc();)if(d=e.b.Wc(),d.a==b)break a;d=null}c?d?(b=uo(a.c.U,d),wu(a.c.U,b,new Cx(d.a,d.b._e()))):Vd(a.c.U,new Bx(b)):(c=a.c.U.a.length,a.c.U.a=Ib(H,h,1,0,5),d&&1==c?Vd(a.c.U,new Cx(d.a,d.b._e())):Vd(a.c.U,new Bx(b)));a=a.c;rB(a.v.j,a.D);T(a,new zx(a,gu(a.U),!0))}}function ND(a){this.c=a;this.d=new OD(this)}r(274,1,{},ND);
_.b=!1;B(274);function OD(a){this.a=a}r(289,49,{},OD);_.nb=function(){kB(this.a,this.a.a,this.a.b)};B(289);function xk(a,b){var c;Os((Js(),!U&&(U=new Ls),Js(),U))||Ps((!U&&(U=new Ls),U))?Qr(a):-1!=Oc(xq.bd(mp((R(),a.ab))).className||"","animate-in")?Gs(a.ab,new PD(a,b)):(uq(a,vq(xq.bd(mp(a.ab)))+"-animate-out",!0),c=new Ts(a.ab),c=Is(c),null==c&&(c=""),-1!=(y(),c).indexOf("animate-out")?(a.n=!1,Gs(a.ab,new QD(a,b)),a.s=!1):(uq(a,vq(xq.bd(mp(a.ab)))+"-animate-out",!1),Qr(a)))}
function HD(a,b){var c,d,e;if(a.Y){try{var f=(R(),a.ab).style;e=(K(),f).zIndex;Bc(e)}catch(n){if(n=ec(n),!A(n,13))throw n.backingJsObject;}(Js(),!U&&(U=new Ls),Js(),U).a.g&&R();e=(!U&&(U=new Ls),U);if(e.a.g&&Ns(e)&&(e=new RD((c=dh((R(),a.ab)),c-=Hh(),c-=(-1==SD&&(SD=TD("left")),SD),c),(d=eh(a.ab),d-=Ih(),d-=(-1==UD&&(UD=TD("top")),UD),d),hh(a.ab,"offsetWidth"),hh(a.ab,"offsetHeight")),e.b+=w(e.d*(1-b)/2),e.c+=w(e.a*(1-b)/2),e.d=w(e.d*b),e.a=w(e.a*b),c=Vg(a.ab),d=(!U&&(U=new Ls),U),d.a.g&&Ns(d))){var g;
!a.c&&(g=(Js(),!U&&(U=new Ls),Js(),U),g.a.g&&Ns(g))&&(a.c=zh(),a.c.style.position=(cj(),"absolute"),a.c.style.borderStyle=(Th(),"none"),a.c.tabIndex=-1,a.c.frameBorder=0,a.c.marginHeight=0);g=a.c;g.style.left=e.b+(Cj(),"px");g.style.top=e.c+"px";g.style.width=e.d+"px";g.style.height=e.a+"px";!Vg(a.c)&&c.insertBefore(a.c,a.ab)}(g=Ps((!U&&(U=new Ls),U)))||(g=(!U&&(U=new Ls),U),g=g.a.g&&10==g.a.a);if(g){g=(R(),a.ab);var l,m;Us();(Js(),!U&&(U=new Ls),Js(),U).a.g&&(l=g.style,m=(K(),l).zoom,l.zoom="1",
l.zoom=m)}}}function TD(a){try{var b=$wnd.document.body,c=b.currentStyle?b.currentStyle:getComputedStyle(b);if(c&&"relative"==c.position)return b.getBoundingClientRect()[a]}catch(d){}return 0}r(266,265,Oa);_.Sc=function(){xk(this,!1)};_.Tc=function(a){xk(this,a)};_.Dc=function(){var a;if(ED){a=O((ap(),bs()));var b=(R(),this.ab);a.appendChild(b)}Eq(this)};_.Tb=Ut;_.Ec=function(){Hq(this);this.c&&Zg(this.c)};_.xc=function(a){Tr(this,a);HD(this,1)};
_.Uc=function(a,b){var c;c=(R(),this.ab).style;c.marginLeft=(-1==SD&&(SD=TD("left")),-SD+(Cj(),"px"));c.marginTop=(-1==UD&&(UD=TD("top")),-UD+"px");Ur(this,a,b);HD(this,this.n?0:1)};_.yc=function(a){Vr(this,a);HD(this,1)};_.Ic=Mq;var VD=2E4,ED,SD=-1,UD=-1;B(266);function FD(a){this.a=a}r(340,1,{},FD);_.fd=function(a){a=Hs(a);if(-1!=(y(),a).indexOf("animate-in")){a=O(this.a);var b=this.a.b;Es();a.removeEventListener(Fs,b,!1);tq(this.a,"animate-in")}};B(340);function PD(a,b){this.a=a;this.b=b}
r(341,1,{},PD);_.fd=function(a){-1!=Oc(Hs(a),"animate-in")&&xk(this.a,this.b)};_.b=!1;B(341);function QD(a,b){this.a=a;this.b=b}r(342,1,{},QD);_.fd=function(a){a=Hs(a);if(-1!=(y(),a).indexOf("animate-out")){a=O(this.a);Es();if(a._vaadin_animationend_callbacks)for(var b=a._vaadin_animationend_callbacks,c=0;c<b.length;c++)a.removeEventListener(Fs,b[c],!1);tq(this.a,"animate-in");tq(this.a,"animate-out");Qr(this.a)}};_.b=!1;B(342);
function RD(a,b,c,d){this.b=a;this.c=b;a=c;0>a&&(a=0);this.d=a;0>d&&(d=0);this.a=d}r(338,1,{},RD);_.a=0;_.b=0;_.c=0;_.d=0;B(338);function GD(a){this.a=a;Jd.call(this)}r(339,115,{},GD);_.ib=function(a){HD(this.a,a)};B(339);function WD(a){var b=new Sd;b.a=a;return b}function YD(a){return void 0===a||null===a}function ZD(a){var b=$D,b=b.ff()?null:Za[b.j];a.__proto__&&a.__proto__!==b&&(a.__proto__=b,a.__reassignPending=!0);return a}
function aE(a){if(a.__reassignPending){delete a.__reassignPending;var b=a.__proto__,c;for(c in a)if(a.hasOwnProperty(c)&&b.hasOwnProperty(c)){var d=a[c];delete a[c];a[c]=d}}}function bE(a,b){var c;co(a,"splice",z(v(H,1),h,1,5,[F((c=G(co(a,"indexOf",z(v(H,1),h,1,5,[b]))),w(c))),F(1)]))}
function cE(){cE=k;dE=new eE("Direction",0,"sort direction",(Dx(),z(v(fE,1),h,74,0,[Ex,gE])),"asc",z(v(tb,1),h,2,6,["asc","desc"]));hE=new eE("Selection",1,"selection mode",(iE(),z(v(jE,1),h,50,0,[kE,lE,mE,nE])),"single",z(v(tb,1),h,2,6,[]))}function oE(a,b){var c,d;for(d=a.d.Kc();d.Vc();){c=d.Wc();var e=Rb(null!=b.f?b.f:""+b.g).toLowerCase(),f=(y(),c).toLowerCase();if(Nc((y(),e).substr(0,f.length),f))return c}return a.a}
function pE(a,b){var c,d,e,f;b=null==b||0==(y(),b).length?a.a:(y(),b).toLowerCase();if(!a.d.hf(b))throw(new Ub("Invalid "+a.c+", valid options are: "+a.d)).backingJsObject;if(null!=a.b)for(d=a.b,e=0,f=d.length;e<f;++e)if(c=d[e],Nc(oE(a,c),b))return c;return null}function eE(a,b,c,d,e,f){N.call(this,a,b);this.c=c;this.b=d;this.a=e;if(0==f.length){e=new Sd;b=0;for(c=d.length;b<c;++b)a=d[b],Vd(e,Rb(null!=a.f?a.f:""+a.g).toLowerCase());this.d=e}else this.d=new Xl(f)}r(125,5,{125:1,3:1,6:1,5:1},eE);
var dE,hE,qE=D(125,function(){cE();return z(v(qE,1),h,125,0,[dE,hE])});function rE(){var a=this.dfd=(Il(),new Bo);!a.b&&(a.b=new Eo(a));this.a=a.b;this["catch"]=this.fail}function sE(a){this.a=a;this["catch"]=this.fail}r(203,1,{},rE,sE);_.always=function(a){var b=this.a;a=z(v(Gl,1),h,16,0,[new bm(a)]);to(b.a.d,a);to(b.a.c,a);return this};_.done=function(a){a=z(v(Gl,1),h,16,0,[new bm(a)]);to(this.a.a.d,a);return this};_.fail=function(a){a=z(v(Gl,1),h,16,0,[new bm(a)]);to(this.a.a.c,a);return this};
_.state=function(){return this.a.a.e};_.then=function(a){var b;b=this.a;var c=z(v(Gl,1),h,16,0,[new tE(a)]);a=new Bo;var d=z(Zb(Gl),h,16,0,[new Io(a,c,0)]);to(b.a.d,d);d=z(Zb(Gl),h,16,0,[new Io(a,c,1)]);to(b.a.c,d);c=z(Zb(Gl),h,16,0,[new Io(a,c,2)]);to(b.a.a,c);b=(!a.b&&(a.b=new Eo(a)),a.b);return new sE(b)};B(203);function tE(a){this.a=a;Fl.call(this)}r(374,16,qa,tE);_.cc=function(){return this.a(El(this))};B(374);
function Y(){Y=k;uE=new vE("String",0,"string value","(.+)",tb,"","");wE=new vE("Pixel",1,"pixel value","([\\d\\.]+)(px)?$",ub,null,null);Z=new vE("Integer",2,"int value","([+-]?\\d+)",Dd,F(0),F(0));xE=new vE("Double",3,"double value","([+-]?[\\d\\.]+)",ub,0,0);yE=new vE("Boolean",4,"boolean value","(|true|false)",vb,(gc(),gc(),ic),hc)}function zE(a,b,c,d,e){var f;if(f=b)f=(K(),b).hasAttribute(c);b=f?(K(),b).getAttribute(c)||"":null;return AE(a,b,d,e)}
function BE(a,b,c){return zE(a,Em(b,0),c,a.a,a.b)}function X(a,b,c,d){b=YD(b)?null:(y(),null==b?"null":Ab(b));return AE(a,b,c,d)}
function AE(a,b,c,d){var e;if(null==b||YD(b))return d;if(0==Rb(Vc(b)).length)return c;c=a.d.exec(b);if(!c||null==(e=c[1]))throw(new Ub("Invalid "+a.c+"("+b+"), valid format is "+Cb(a.d))).backingJsObject;try{return a.e==tb?e:a.e==Dd?F(Bc(e)):a.e==ub?yc(e):a.e==vb?(gc(),Xc("true",e)?ic:hc):e}catch(f){f=ec(f);if(A(f,13))throw(new Ub("Invalid "+a.c+", valid format is "+Cb(a.d))).backingJsObject;throw f.backingJsObject;}}
function vE(a,b,c,d,e,f,g){N.call(this,a,b);this.c=c;this.d=new RegExp("^"+d+"$","i");this.e=e;this.a=f;this.b=g}r(70,5,{70:1,3:1,6:1,5:1},vE);var yE,xE,Z,wE,uE,CE=D(70,function(){Y();return z(v(CE,1),h,70,0,[uE,wE,Z,xE,yE])});function DE(a,b){var c,d;d=(y(),null==b?"null":Ab(b));if(lc(d,new $wnd.RegExp("^([+-]?\\d+)$"))){if(c=(Y(),Z),d=AE(c,d,c.a,c.b).a,0<=d&&d<=a.b.length)return d}else for(c=0;c<a.b.length;c++)if(Nc(d,S(a.b,F(c)).c))return c;throw(new E("Column not found.")).backingJsObject;}
function EE(a){var b;b=gu(new zo(a.d.n));A(a.d.S,136)&&(b=b.Ff(1,b.ld()));return b}function Lw(a){var b;b=null;A(a.d.S,136)&&(b=TC(VA(a.d.D.a,Fv(a.d,0))));return b}function FE(a){var b;if(!(b=!!a.d.q&&!!a.d.q.i)){b=a.d;var c=b.v;(c=!!c.a.a.f||Uu(c.B)||Uu(c.o)||c.q||b.p||b.a.b)||(b=b.t,c=!!b.q.f||!!b.a.f);b=c}if(!(b=b||!!a.j.f)){var d,c=EE(a).ld()!=a.b.length;if(!c)for(b=EE(a).Kc();b.Vc();)d=b.Wc(),d=G(co(a.b,"indexOf",z(Zb(H),h,1,5,[d.b]))),-1==w(d)&&(c=!0);b=c}return b}
function GE(a,b){return(new Promise(function(a){this.onReady(a)}.bind(a))).then(b)}function HE(a,b,c){0<a.d.v.a.p&&(null!=c?(a=a.d,c=(y(),c).toLocaleUpperCase(),Dw(),c=Sh((IE(),JE),c),Fw(a,b,c,(Dw(),0))):Fw(a.d,b,(Dw(),Ew),0))}
function KE(a,b){var c,d,e,f;a.b=b;c=new Sd;for(e=EE(a).Kc();e.Vc();)d=e.Wc(),Vd(c,d.b);for(d=WD(b).Kc();d.Vc();)if(e=d.Wc(),-1==uo(c,e)){f=ZD(e);e=new LE(f,a);var g=a.d,l=e,m=dw(a.d).b.ld();if(l==g.R)throw(new E("The selection column many not be added manually")).backingJsObject;if(g.R&&0==m)throw(new Fq("A column cannot be inserted before the selection column")).backingJsObject;TA(g,l,m);g=a;f.a=e;f.b=g;aE(f)}for(c=EE(a).Kc();c.Vc();)if(e=c.Wc(),d=G(co(b,"indexOf",z(v(H,1),h,1,5,[e.b]))),-1==w(d)){d=
a.d;f=e;g=e=void 0;e=d.B;g=d.n.a.length-1;A(d.S,127)&&--g;g<e&&EB(d,g);try{g=d;if(f&&f==g.R)throw(new E("The selection column may not be removed manually.")).backingJsObject;tB(g,f)}catch(x){if(x=ec(x),A(x,13))EB(d,e);else throw x.backingJsObject;}}c=EE(a).lf(Ib(ME,{645:1,704:1,3:1,4:1},139,0,0));d=c.length;e=new NE(b);var n,p,u;!e&&(e=(OE(),OE(),PE));f=d;g=z(v(H,1),h,1,5,[F(0),F(f)]);if(!(0<=f))throw(new E(wd("%s \x3e %s",g))).backingJsObject;g=c.length;f=f<g?f:g;td(0,f,g);f=(n=f-0,p=(u=Array(d-
0),$b(u,c)),jd(c,p,0,n,!0),p);QE(f,c,0,d,-0,e);0<c.length&&wB(a.d,c);a.d.q&&RE(a.d.q)}function SE(a,b){b?$g(O(a.d),"vaadin-grid-loading-data"):mh(O(a.d),"vaadin-grid-loading-data")}function Ax(a,b){var c,d;if(b.c){c=a.c;var e=b.b,f,g,l,m;g=[];g.length=0;f=EE(a);for(l=new iu(e.b.Kc());l.b.Vc();)e=l.b.Wc(),m={},m.column=f.zf(e.a),m.direction=oE((cE(),dE),e.b),co(g,"push",z(Zb(H),h,1,5,[m]));c&&hm(c,"sortOrder",g)}a.d.S.ge();(c=a.d.q)&&(d=c.e,c.jd(d.b,d.a-d.b,new TE(c,d)))}
function UE(a,b){var c;if((Il(),Jl).e||Jl.d&&-1!=Oc(Rb($wnd.navigator.userAgent).toLowerCase(),"trident")){c=new rE;var d=fb(VE.prototype.We,new VE(c,b));Ug((Jg(),new WE(a,d)));return c}return GE(a,b)}function XE(a,b){var c;if(a.c){c=$doc;c=(K(),M).vb(c,b);var d=a.c;(K(),M).wb(d,c)}}
function YE(a){var b,c;a.updating||(Xx(a.d.v,"100%"),0==(a.c.clientHeight|0)&&(0<a.n?ZE(a.d,a.n):(b=a.d.q)?ZE(a.d,Nb((c=S(b.c.c,"size"),X((Y(),Z),c,F(0),F(0)).a),10)):ZE(a.d,0)),a.e&&0<(a.e.clientHeight|0)?a.e.style.height="":a.e.style.height=(Cj(),"1.0px"))}
function $E(a){var b,c,d,e,f,g,l;if(b=Lw(a)){sm(tm(Tl(b)));a=a.d.S;var m=Lm(Tl(b),z(v(tb,1),h,2,6,["input"])),n=(gc(),0<(a.d?(d=S(a.b.q.c.c,"size"),X((Y(),Z),d,F(0),F(0)).a-a.c.length):a.c.length)&&(a.d?(e=S(a.b.q.c.c,"size"),X((Y(),Z),e,F(0),F(0)).a-a.c.length):a.c.length)!=(f=S(a.b.q.c.c,"size"),X((Y(),Z),f,F(0),F(0)).a)?ic:hc);e=m.c;f=0;for(m=e.length;f<m;++f)(d=e[f])&&hm(d,"indeterminate",n);hr(b,0<(a.d?(g=S(a.b.q.c.c,"size"),X((Y(),Z),g,F(0),F(0)).a-a.c.length):a.c.length)&&(a.d?(l=S(a.b.q.c.c,
"size"),X((Y(),Z),l,F(0),F(0)).a-a.c.length):a.c.length)==(c=S(a.b.q.c.c,"size"),X((Y(),Z),c,F(0),F(0)).a)?ic:hc,!1)}}function aF(a){by(a.d.v,"100%");Mg((Jg(),Kg),new bF(a))}function cF(){this.j=new dF(this);this.d=new eF;FB(this.d,new fF);Dq(this.d,this,(bx(),bx(),cx));Dq(this.d,this,(xx(),xx(),yx));Dq(this.d,this,(Iw(),Iw(),Jw));Dq(this.d,this,(gF(),hF));O(this.d).style.height=(Cj(),"0.0px");KE(this,[]);this.k=new iF(this);JB(this.d,"vaadin-grid style-scope vaadin-grid")}
r(661,1,{15:1,706:1,694:1,705:1,707:1},cF);_.addColumn=function(a,b){var c;c=this.b.length;null!=b&&(c=DE(this,b));c=z(Zb(H),h,1,5,[F(c),F(0),a]);eo(this.b,"splice",um([],c));KE(this,this.b);return a};_.getCellClassGenerator=Ic;_.getColumns=jF;_.getContainer=qk;_.getDataSource=function(){return this.d.q};_.getFrozenColumns=function(){return this.d.B};_.getGrid=kF;_.getGridElement=function(){return O(this.d)};_.getItem=function(a,b,c){lF(this.d.q,a,b,c)};_.getRowClassGenerator=gk;
_.getRowDetailsGenerator=cz;_.getScrollTop=function(){return this.d.v.B.k};_.getSelectionMode=function(){return Rb(Rh(this.d.S.getMode())).toLowerCase()};_.getSelectionModel=function(){return this.d.S};_.getStaticSection=nx;_.getVisibleRows=function(){return this.n};_.init=function(a,b,c){this.c||(this.c=a,this.e=c,a=O(this.d),b.appendChild(a),$o(this.d,null));this.updating=!1;Rg((Jg(),Kg),new mF(this))};_.isDisabled=function(){return!this.d.u};_.isWorkPending=function(){return FE(this)};
_.onReady=function(a){Ug((Jg(),new WE(this,a)))};_.ke=function(){$E(this);this.updating||XE(this,"selected-items-changed")};_.removeColumn=function(a){bE(this.b,S(this.b,F(DE(this,a))));KE(this,this.b)};_.scrollToEnd=function(){HE(this,this.d.v.a.p-1,"end")};_.scrollToRow=function(a,b){HE(this,a,b)};_.scrollToStart=function(){if(0<this.d.v.a.p){var a=(Dw(),Sh((IE(),JE),"START"));Fw(this.d,0,a,(Dw(),0))}};_.setBodyHeight=function(a){$y(this.d.v.a,a)};
_.setCellClassGenerator=function(a){var b=this.d;b.g=YD(a)?null:new nF(this,a);Jt(b.v.a,0,b.v.a.p);this.a=a};_.setColumns=function(a){KE(this,a)};_.setDataSource=function(a){if(A(this.d.q,152)){var b=this.d.q;b.b=a;a=b.e;oF(b,a.b,a.a-a.b,new TE(b,a));b.c.d.S.ge()}else BB(this.d,new pF(a,this));YE(this)};_.setDisabled=function(a){var b=this.d;a=!a;if(a!=b.u){b.u=a;(R(),b.ab).tabIndex=a?0:-1;var c=b.T;!a&&c.f&&c.f.u&&xk(c.f,!1);c=c.d;(R(),c.ab).disabled=!a;Zx(b.v,(lv(),mv),!a);Zx(b.v,ov,!a)}};
_.setFooterHeight=function(a){$y(this.d.v.f,a)};_.setFrozenColumns=function(a){EB(this.d,X((Y(),Z),F(a),F(0),F(0)).a)};_.setHeaderHeight=function(a){$y(this.d.v.j,a)};_.setHeight=function(a){Xx(this.d.v,a)};_.setLightDomTable=function(a){var b,c;new qF(a,this);c=this.d.q;!c&&(c=(b=new rF(a,this),b));c&&(BB(this.d,c),this.d.S.ge())};_.setRowClassGenerator=function(a){var b=this.d;b.P=YD(a)?null:new sF(this,a);Jt(b.v.a,0,b.v.a.p);this.g=a};
_.setRowDetailsGenerator=function(a){var b=this.d,c=YD(a)?(Zv(),$v):new tF(a),d,e,f;if(!c)throw(new E("Details generator may not be null")).backingJsObject;for(f=(e=(new Im(b.W.a)).a.pf().Kc(),new Jm(e));f.a.Vc();)e=(d=f.a.Wc(),d.If()),At(b,e.a,!1);b.r=c;JA(b.v.a.b,b.C);this.i=a};_.setRowDetailsVisible=function(a,b){UE(this,fb(uF.prototype.We,new uF(this,a,b)))};
_.setSelectionMode=function(a){a=pE((cE(),hE),a);this.d.S.getMode()!=a&&(this.d.S.supportsMode(a)?(this.d.S.setMode(a),this.d.S.ge()):(FB(this.d,a.$e()),by(this.d.v,"100%"),Mg((Jg(),Kg),new bF(this)),XE(this,"selection-mode-changed"),$E(this)))};
_.setSortOrder=function(a){var b,c,d,e,f;f=new Sd;b=EE(this);for(e=WD(a).Kc();e.Vc();)d=e.Wc(),a=b.yf(d.column),c=pE((cE(),dE),d.direction),d.direction=oE(dE,c),Vd(f,new Cx(a,c));b=this.d;f!=b.U&&(b.U.a=Ib(H,h,1,0,5),yB(b.U,f));rB(b.v.j,b.D);T(b,new zx(b,gu(b.U),!1))};_.setVisibleRows=function(a){this.n=X((Y(),Z),F(a),F(-1),F(-1)).a;YE(this)};
_.sizeChanged=function(a,b){var c;if(c=this.d.q)if(b<a){var d=a-b,e,f,g,l;c.r+=d;if(b<=c.e.b)for(g=c.e,c.e=GB(c.e,d),e=1;e<=nt(c.e);e++)l=g.a-e,f=c.e.a-e,wt(c,l,f);else if(wx(c.e,b))for(f=c.e.a,c.e=vF(c.e,b)[0],e=b;e<f;e++)g=dl(c.k,F(e)),dl(c.n,g);c.j&&(e=c.j,Bt(e.a.v.a,b,d),d=W(b,d),Ct(e.a.c,d));lt(c)}else if(b>a)for(d=b-a;0<d;){g=10>d?d:10;d-=g;e=c;f=a+d;var m=l=void 0,n=l=void 0,n=void 0;e.r-=g;n=W(f,g);kt(e,n);for(l=ce(f+g,e.e.b);l<e.e.a;l++)wt(e,l,l-g);Qt(e.e,n)?e.e=W(0,0):Pt(n,e.e)?(m=it(e.e,
n),l=m[0],n=GB(m[2],-(n.a-n.b)),e.e=Mt(l,n)):n.a<=e.e.b&&(e.e=GB(e.e,-(n.a-n.b)));e.j&&(l=e.j,n=void 0,Dt(l.a.v.a,f,g),n=W(f,g),Et(l.a.c,n));lt(e)}0==a?T(this.d,new Gt(null)):0==b&&c&&BB(this.d,c);YE(this)};_.sort=function(a){Ax(this,a)};_.then=function(a){return UE(this,a)};_.updateSize=function(){Wd(this.j,50)};_.f=!1;_.updating=!0;_.n=-1;B(661);function dF(a){this.a=a}r(249,49,{},dF);
_.nb=function(){var a;if(a=!this.a.f)a=this.a,a=!!a.e&&0<(a.e.clientHeight|0);a&&(Sx(this.a.d.v),UE(this.a,fb(wF.prototype.We,new wF(this))),this.a.f=!0);aF(this.a);YE(this.a)};B(249);function wF(a){this.a=a}r(250,$wnd.Function,{},wF);gb();_.We=function(){return Sx(this.a.a.d.v),null};B(250);function WE(a,b){this.a=a;this.b=b}r(255,1,{},WE);_.sb=function(){return FE(this.a)?!0:(this.b(null),!1)};B(255);function xF(a){qq();this.ab=(R(),a)}r(257,114,Ca,xF);B(257);function mF(a){this.a=a}
r(251,1,{},mF);_.tb=function(){YE(this.a)};B(251);function NE(a){this.a=a}r(252,1,{},NE);_.bb=Db;_.Ye=function(a,b){var c=this.a,d,e;return e=G(co(c,"indexOf",z(Zb(H),h,1,5,[a.b]))),w(e)>(d=G(co(c,"indexOf",z(Zb(H),h,1,5,[b.b]))),w(d))?1:-1};B(252);function sF(a,b){this.a=a;this.b=b}r(253,1,ea,sF);B(253);function nF(a,b){this.a=a;this.b=b}r(254,1,{},nF);B(254);function bF(a){this.a=a}r(185,1,{},bF);_.tb=function(){XA(this.a.d.a)};B(185);function VE(a,b){this.b=a;this.a=b}r(256,$wnd.Function,{},VE);
gb();_.We=function(){var a=this.b,b=this.a;try{var c=a.dfd,d=z(Zb(H),h,1,5,[b(null)]);"pending"==c.e&&yo(c.d,d)}catch(e){if(e=ec(e),A(e,100))b=e,a=a.dfd,b=z(Zb(H),h,1,5,[b.rb()]),"pending"==a.e&&yo(a.c,b);else throw e.backingJsObject;}return null};B(256);function tF(a){this.a=a}r(258,1,{},tF);_.$d=function(a){a=this.a(F(a));return YD(a)?null:new xF(a)};B(258);function uF(a,b,c){this.a=a;this.b=b;this.c=c}r(259,$wnd.Function,{},uF);gb();
_.We=function(){var a=this.a,b=this.b,c=this.c,b=X((Y(),Z),F(b),null,null),c=X(yE,c,(gc(),gc(),ic),ic);(Zv(),$v)!=a.d.r&&b&&At(a.d,b.a,yb((t(c),c)));return null};_.b=0;B(259);function yF(){}r(246,1,{},yF);_.tb=function(){ap();yq(bs(),Ks((Js(),!U&&(U=new Ls),Js(),U)))};B(246);function zF(a,b){A(b,140)?a.Me():a.Le()}function ZE(a,b){Xx(a.v,a.v.j.i*(a.D.e?a.D.d.a.length:0)+a.v.a.i*b+a.v.f.i*(a.A.e?a.A.d.a.length:0)+"px")}
function eF(){var a,b,c;qq();this.w=new gw(this);this.G=new Aw(this,this.w);this.H=new Hw(this,this.w);new Gw(this,this.w);this.i=new ww(this,this.w);new xw(this,this.w);this.v=new cy;this.D=new fD;this.A=new LC;this.T=new wD(this);this.n=new Sd;this.o=W(0,0);this.U=new Sd;this.V=new ND(this);this.t=new CC;this.a=new bC(this);this.r=(Zv(),$v);this.C=new aD(this);this.W=new Vk;this.j=new BC(this);this.s=new Xt;this.b=new Jv(this);this.F=new SB(this);this.M=new hw(this);this.f=new Wv(this.M);this.I=
new iw(this.M);lr(this,this.v);(R(),this.ab).tabIndex=0;this.c=new kC(this);JB(this,"v-grid");az(this.v.j,new LD(this,this.D,this.v.j));az(this.v.a,new fC(this));az(this.v.f,new LD(this,this.A,this.v.f));this.D.c=this;a=this.D;a=JC(a,a.d.a.length);cD(this.D,a);this.A.c=this;this.t.j=this;FB((nD(),this),new sx);JA(this.v.a.b,this.C);Dq(this.v,new XB(this),(Nu(),Ou));Dq(this.v,new YB(this),(Ju(),Ku));Dq(this,new ZB(this),(bx(),bx(),cx));ZA(this,new Xl(z(v(tb,1),h,2,6,["touchstart","touchmove","touchend",
"touchcancel","click"])));ZA(this,new Xl(z(v(tb,1),h,2,6,"keydown keyup keypress dblclick mousedown click".split(" "))));ux(this,new $B(this));Bw(this,new aC(this));(Js(),!U&&(U=new Ls),Js(),U).a.c&&(a=zh(),a.style.position="absolute",a.style.marginLeft="-5000px",(ap(),$doc.body).appendChild(a),b=a.contentWindow.document,c=(K(),b).createElement("div"),c.style.width="50px",c.style.height="50px",c.style.overflow="scroll",b.body.appendChild(c),b=((c.offsetWidth||0)|0)-(parseInt(c.clientWidth)|0),$doc.body.removeChild(a),
Us(),Zs=b);if(0==Ys())if((!U&&(U=new Ls),U).a.o){a=ym((Il(),Ul(".vaadin-grid-scroller",this.ab)),"position","relative");b=Ul("\x3cdiv style\x3d'position: absolute; z-index: 10' /\x3e",Ml);var d,e,f;c=a.c;e=0;for(f=c.length;e<f;++e){d=c[e];d=Tl(d);var g=b,l=void 0,m=void 0,n=void 0,p=void 0,l=void 0;if(0!=d.c.length){for(var u=l=p=n=m=void 0,m=void 0,u=[],n=g.c,p=0,l=n.length;p<l;++p)m=n[p],Zl(u,m.cloneNode(!0));m=new $l(u);m.a=g.a;m.b=g.b;if(Em(d,0).parentNode)for(g=Tl(Em(d,0)),u=l=p=n=void 0,p=m.c,
l=0,u=p.length;l<u;++l)n=p[l],Dm(g,Tl(n),2);m=m.c;n=0;for(p=m.length;n<p;++n){for(l=m[n];l.firstChild&&1==l.firstChild.nodeType;)l=l.firstChild;Dm(Tl(l),d,1)}}}ym(Nm(xm(a,z(v(tb,1),h,2,6,[".vaadin-grid-scroller-vertical"]))),"right","0");ym(Nm(xm(a,z(v(tb,1),h,2,6,[".vaadin-grid-scroller-horizontal"]))),"bottom","0")}else if((!U&&(U=new Ls),U).a.c)if(a=(Il(),Ul(".vaadin-grid-scroller",this.ab)),b=(!Ym&&(Ym=new wn),a),a=Xc("type","invisible")?(Bn(),!En&&(En=new Dn),Bn(),En):vn.test("invisible")?(!An&&
(An=new zn),An):(!yn&&(yn=new xn),yn),a.fc(""))for(b=(!(Il(),Ym)&&(Ym=new wn),b).c,c=0,e=b.length;c<e;++c)a=b[c],1==a.nodeType&&(cm(a,"invisible")&&(vn.test("invisible")?a.invisible=!1:a.invisible=null),a.removeAttribute("invisible"));else for(c=b.c,e=0,f=c.length;e<f;++e)b=c[e],d=b.nodeType,3!=d&&8!=d&&2!=d&&a.gc(b,"invisible","")}r(264,263,La,eF);_.Ke=LB;
_.lc=function(a){var b,c,d;b=(K(),M).Ab(a);ph(b)&&"label"===b.tagName&&lh(Wg(b),"gwt-CheckBox")&&(R(),this.ab).focus();b=(K(),M).Ab(a);b==Xs()&&(c=this.v.j.o,d=this.v.f.o,M.Ib(c,b)||M.Ib(d,b))||lB(this,a)};B(264);
function zD(){wq();var a=(R(),xh());this.ab=(R(),a);this.j=new Wr;this.n=!1;this.p=-1;this.t=new es(this);this.v=-1;a=xq._c();this.ab.appendChild(a);this.Uc(0,0);xq.bd(mp(this.ab)).className="gwt-PopupPanel";xq.ad(fh(this.ab)).className="popupContent";a=VD;(R(),this.ab).style.zIndex=a+""}r(267,266,Oa,zD);B(267);function iC(a,b){this.a=a;this.b=new AF(this.a,b);this.grid=b}r(215,1,{},iC);q({columnName:{get:function(){return this.a.b.b.c}}});q({data:{get:function(){return this.a.b.Qe(this.a.e.c)}}});
q({element:{get:function(){return this.a.Yd()}}});q({index:{get:jw}});q({row:{get:jF}});B(215);function BF(a,b){if(a.a.p!=b){var c=a.a,d=YD(b)?-1:b,e;e=c.q;if(0<=d&&d<e&&0<=e)throw(new E("New maximum width ("+d+") was less than minimum width ("+e+")")).backingJsObject;c.p!=d&&(c.p=d,c.i&&XA(c.i.a));aF(a.b)}}
function CF(a,b){if(a.a.q!=b){var c=a.a,d=YD(b)?10:b,e;e=c.p;if(0<=d&&d>e&&0<=e)throw(new E("New minimum width ("+d+") was greater than maximum width ("+e+")")).backingJsObject;c.q!=d&&(c.q=d,c.i&&XA(c.i.a));aF(a.b)}}function DF(a,b){a.a.t!=b&&(vC(a.a,YD(b)?-1:b),aF(a.b))}function EF(){}r(195,1,{195:1},EF);_.configure=function(a,b){this.a=b;this.b=a;aE(this)};q({flex:{get:function(){return this.a.g}}});q({hidable:{get:function(){return this.a.k}}});q({hidden:{get:function(){return this.a.n}}});q({hidingToggleText:{get:function(){return this.a.o}}});
q({maxWidth:{get:function(){return this.a.p}}});q({minWidth:{get:function(){return this.a.q}}});q({name:{get:qk}});q({readonly:{get:function(){return!this.a.f}}});q({renderer:{get:kF}});q({sortable:{get:function(){return this.a.s}}});q({width:{get:function(){return this.a.t}}});q({flex:{set:function(a){lC(this.a,a)}}});q({hidable:{set:function(a){qC(this.a,a)}}});q({hidden:{set:function(a){rC(this.a,a);aF(this.b)}}});
q({hidingToggleText:{set:function(a){var b=this.a;b.o=null==a?null:a;b.k&&pC(b.i.j,b)}}});q({maxWidth:{set:function(a){BF(this,a)}}});q({minWidth:{set:function(a){CF(this,a)}}});q({name:{set:function(a){this.c=a;FF(this.a)}}});q({readonly:{set:function(a){this.a.f=!a}}});q({renderer:{set:function(a){this.d=a;tC(this.a,new GF(this))}}});q({sortable:{set:function(a){uC(this.a,a)}}});q({width:{set:function(a){DF(this,a)}}});var $D=B(195);function GF(a){this.a=a}r(351,1,{},GF);
_.rd=function(a){var b=this.a;b.d(new iC(a,b.b.c))};B(351);function AF(a,b){this.b=null;this.a=a;this.grid=b}function gC(a,b){this.b=a;this.a=null;this.grid=b}r(217,1,{},AF,gC);q({data:{get:function(){return HF(this.a?this.a.e.c:this.b.c)}}});q({element:{get:function(){return this.a?Vg(this.a.Yd()):this.b.a}}});q({index:{get:function(){return this.a?this.a.e.d:this.b.d}}});B(217);function IF(a,b){VC(a.a,b);aF(a.c);zF(a.c.d,a.a)}
function JF(a,b){var c;a.b=b;var d,e,f;e=null;for(d=EE(a.c).Kc();d.Vc();)if(c=d.Wc(),f=c.a.k,KF(f,LF(f),c)==a){e=c;break}c=e;if(null==b){var g,l;if(c){g=c.b.c;g=Rc(null!=g?g:"",".*\\.","");g=Pc(g,"[_+,;:-]"," ");f=new Ir;for(e=0;e<(y(),g).length;e++)d=g.charCodeAt(e),kc(Rb($wnd.String.fromCharCode(d)).toLocaleUpperCase(),0)==d&&lc($wnd.String.fromCharCode(d),/[A-Z]/i)&&0!=e&&(!jc(g.charCodeAt(e-1))||e+1<g.length&&!jc(g.charCodeAt(e+1)))&&(f.a+=" "),f.a+=String.fromCharCode(d);g=Sc(f.a," ");for(d=
0;d<g.length;d++){e=g;f=d;var m=g[d];if(null==m)m=null;else if(1>=(y(),m).length)m=m.toLocaleUpperCase();else var n=m.substr(0,1),m=((MF(),NF)==(MF(),MF(),OF)?(y(),n).toLocaleUpperCase():(y(),n).toUpperCase())+(""+m.substr(1,m.length-1));e[f]=m}d=new Ir;for(e=0;e<g.length;e++)d.a+=""+g[e],d.a+=" ";g=Rb(d.a).length-(y()," ").length;g=Tc(d.a,0,g);nC(c,g);WC(a.a,(l=Pc(Pc(g,"\\\\","\\\\\\\\"),"\\$","\\\\$"),Pc("\x3cspan style\x3d'overflow: hidden;text-overflow: ellipsis;'\x3e%CONTENT%\x3c/span\x3e","%CONTENT%",
l)))}else WC(a.a,null)}else Object(b)!==b||A(b,82)?(l=(y(),null==b?"null":Ab(b)),c&&nC(c,l),WC(a.a,(g=Pc(Pc(l,"\\\\","\\\\\\\\"),"\\$","\\\\$"),Pc("\x3cspan style\x3d'overflow: hidden;text-overflow: ellipsis;'\x3e%CONTENT%\x3c/span\x3e","%CONTENT%",g)))):Wl(b)&&(c&&(l=c.b.c,null!=l?nC(c,l):nC(c,(y(),b?Cb(b):"null"))),XC(a.a,new PF(b)));aF(a.c);zF(a.c.d,a.a)}function QF(a,b){this.c=b;this.a=a;this.b=this.a.e==(PC(),QC)?OC(this.a):this.a.e==UC?O(TC(this.a)):Nc("",RC(this.a))?null:RC(this.a)}
r(83,1,{83:1},QF);q({className:{get:function(){return this.a.d}}});q({colspan:{get:function(){return this.a.a}}});q({content:{get:jF}});q({className:{set:function(a){var b=this.a;b.d=a;b.c.Ue();aF(this.c);zF(this.c.d,this.a)}}});q({colspan:{set:function(a){IF(this,a)}}});q({content:{set:function(a){JF(this,a)}}});B(83);function PF(a){qq();this.ab=(R(),a)}r(356,114,Ca,PF);B(356);function RF(a){this.a=a}r(153,1,{153:1},RF);B(153);
function lF(a,b,c,d){var e;b=X((Y(),Z),b,F(-1),F(-1));0<=b.a&&b.a<(e=S(a.c.c,"size"),X(Z,e,F(0),F(0)).a)?(e=st(a,b.a),null!=e?c(null,HF(e)):d?c(Error("Unable to retrieve row #"+b+", it has not been cached yet"||""),null):(d=b.a,d=new rt(d,d+1),a.jd(d.b,d.a-d.b,new SF(a,d,c)))):c(Error("Index value #"+b+" is out of range"||""),null)}function RE(a){var b;b=a.e;a.jd(b.b,b.a-b.b,new TE(a,b))}function TF(a,b){yt(a,b);a.c.d.S.dataSizeUpdated(b)}function UF(a,b){var c=a.c.c,d=F(b);c&&hm(c,"size",d)}
function VF(a){this.q=new rt(0,0);this.e=new rt(0,0);this.k=new Ag;this.n=new Ag;this.d=new St;this.g=new Ot(this);this.o=new Ag;this.p=new Ag;this.c=a}function HF(a){return A(a,153)?a.a:a}r(208,427,{},VF);_.getItem=function(a,b,c){lF(this,a,b,c)};_.getRowKey=vs;_.hd=function(a){return this.getRowKey(a)};_.Ze=function(){var a;TF(this,(a=S(this.c.c,"size"),X((Y(),Z),a,F(0),F(0)).a));this.c.d.S.ge()};_.refreshItems=function(){RE(this)};_.kd=function(a){TF(this,a)};
_.size=function(){var a;return a=S(this.c.c,"size"),X((Y(),Z),a,F(0),F(0)).a};_.ld=function(){return this.size()};B(208);function TE(a,b){ut.call(this,a,b)}r(118,145,{},TE);B(118);function SF(a,b,c){this.a=c;ut.call(this,a,b)}r(357,145,{},SF);_.md=function(a){this.a(null,a.yf(0))};B(357);function rF(a,b){VF.call(this,b);this.a=a;UF(this,((!this.b||0==this.b.c.length)&&(this.b=Lm(Tl(this.a),z(v(tb,1),h,2,6,["tbody tr:not([template])"]))),this.b).c.length)}r(150,208,{150:1},rF);
_.Ze=function(){var a;this.b=null;UF(this,((!this.b||0==this.b.c.length)&&(this.b=Lm(Tl(this.a),z(v(tb,1),h,2,6,["tbody tr:not([template])"]))),this.b).c.length);TF(this,(a=S(this.c.c,"size"),X((Y(),Z),a,F(0),F(0)).a));this.c.d.S.ge()};
_.jd=function(a,b){var c,d,e,f,g,l,m,n,p;g=new Sd;l=Pm(Pm(((!this.b||0==this.b.c.length)&&(this.b=Lm(Tl(this.a),z(v(tb,1),h,2,6,["tbody tr:not([template])"]))),this.b),a-1+1,-1),0,b).c;m=0;for(n=l.length;m<n;++m){d=l[m];p=[];d=Lm(Tl(d),z(v(tb,1),h,2,6,["td"])).c;e=0;for(f=d.length;e<f;++e)c=d[e],c=Mm(Tl(c)),p[p.length]=c;g.a[g.a.length]=p}Lt(this,a,g)};B(150);function oF(a,b,c,d){var e;e={};e.index=b;e.count=c;e.sortOrder=S(a.c.c,"sortOrder");SE(a.c,!0);a.b(e,fb(WF.prototype.Xe,new WF(a,d)))}
function pF(a,b){VF.call(this,b);this.b=a;Rg((Jg(),Kg),new XF(this))}r(152,208,{152:1},pF);_.jd=function(a,b,c){oF(this,a,b,c)};_.a=!1;B(152);function XF(a){this.a=a}r(461,1,{},XF);_.tb=function(){var a=this.a,b,c;c=S(a.c.c,"size");0==X((Y(),Z),c,F(0),F(0)).a&&(b=a.e,oF(a,b.b,b.a-b.b,new TE(a,b)))};B(461);function WF(a,b){this.a=a;this.b=b}r(462,$wnd.Function,{},WF);gb();
_.Xe=function(a,b){var c=this.a,d=this.b,e,f,g;f=WD(a);for(e=0;e<f.ld();e++){var l=f.yf(e);Object(l)!==l&&f.Ef(e,new RF(f.yf(e)))}null!=b&&UF(c,w((t(b),b)));d&&d.md(f,(g=S(c.c.c,"size"),X((Y(),Z),g,F(0),F(0)).a));SE(c.c,!1);c.a||f.jf()||(c.a=!0,aF(c.c))};B(462);function iE(){iE=k;kE=new YF;lE=new ZF;mE=new $F;nE=new aG}r(50,5,Pa);var mE,nE,lE,kE,jE=D(50,function(){iE();return z(v(jE,1),h,50,0,[kE,lE,mE,nE])});function YF(){N.call(this,"SINGLE",0)}r(463,50,Pa,YF);_.$e=function(){return new fF};
D(463,null);function ZF(){N.call(this,"MULTI",1)}r(464,50,Pa,ZF);_.$e=function(){return new bG(!1)};D(464,null);function $F(){N.call(this,"ALL",2)}r(465,50,Pa,$F);_.$e=function(){return new bG(!0)};D(465,null);function aG(){N.call(this,"DISABLED",3)}r(466,50,Pa,aG);_.$e=function(){return new cG};D(466,null);function cG(){}r(553,691,{650:1},cG);_.clear=Kq;_.dataSizeUpdated=Ut;_.deselect=$m;_.deselected=dG;_.getMode=function(){return iE(),nE};_.select=$m;_.selectAll=Kq;_.selected=dG;_.setMode=Ut;
_.size=iD;_.supportsMode=function(a){return a==(iE(),nE)};B(553);
function eG(a,b,c){var d,e,f,g,l,m;return 0<=b&&(!a.a||b<(e=S(a.b.q.c.c,"size"),X((Y(),Z),e,F(0),F(0)).a))&&(m=G(co(a.c,"indexOf",z(v(H,1),h,1,5,[b]))),-1==w(m))?(co(a.c,"push",z(v(H,1),h,1,5,[b])),(c=yb(G(X((Y(),yE),(gc(),c?ic:hc),hc,hc))))||T(a.b,new ex(a.b,null,null)),a.d&&0==(a.d?(f=S(a.b.q.c.c,"size"),X(Z,f,F(0),F(0)).a-a.c.length):a.c.length)?(fG(a,(iE(),lE)),a.c.length=0,T(a.b,new ex(a.b,null,null)),!1):!a.d&&0<(a.d?(g=S(a.b.q.c.c,"size"),X(Z,g,F(0),F(0)).a-a.c.length):a.c.length)&&(a.d?(l=
S(a.b.q.c.c,"size"),X(Z,l,F(0),F(0)).a-a.c.length):a.c.length)==(d=S(a.b.q.c.c,"size"),X(Z,d,F(0),F(0)).a)?(fG(a,(iE(),mE)),a.c.length=0,T(a.b,new ex(a.b,null,null)),!1):!0):!1}function gG(a,b,c){return a.d?eG(a,b,c):hG(a,b,c)}function iG(a,b,c,d){var e,f;f=[];c=X((Y(),Z),c,F(0),F(0)).a;c=Nb(c,a.c.length-1);e=a.c.length-1;d=X(Z,d,F(e),F(e)).a;for(d=Nb(d,a.c.length-1);c<=d;c++)e=S(a.c,F(c)),null!=e&&(e=null==b?e:b(F(w((t(e),e)))),null!=e&&co(f,"push",z(v(H,1),h,1,5,[e])));return f}
function hG(a,b,c){var d;d=G(co(a.c,"indexOf",z(v(H,1),h,1,5,[b])));return-1!=w(d)?(bE(a.c,b),(c=yb(G(X((Y(),yE),(gc(),c?ic:hc),hc,hc))))||T(a.b,new ex(a.b,null,null)),!0):!1}function jG(a,b,c){return a.d?hG(a,b,c):eG(a,b,c)}function fG(a,b){(a.d?(iE(),mE):(iE(),lE))!=b&&(a.d=b==(iE(),mE),T(a.b,new kG))}function bG(a){this.o=new jx;this.i=new jx;this.k=this.j=null;this.n=new jx;this.c=[];this.d=a}r(155,127,{136:1,244:1,127:1,650:1,155:1},bG);
_.clear=function(){fG(this,(iE(),lE));this.c.length=0;T(this.b,new ex(this.b,null,null))};_.oe=lG;_.dataSizeUpdated=function(a){var b,c;this.a=!0;b=!1;for(c=0;c<this.c.length;c++)G(S(this.c,F(c)))>=a&&(bE(this.c,S(this.c,F(c--))),b=!0);b&&T(this.b,new ex(this.b,null,null))};_.deselect=function(a,b){return gG(this,a,b)};_.me=function(){return fG(this,(iE(),lE)),this.c.length=0,T(this.b,new ex(this.b,null,null)),!0};_.se=function(a){return gG(this,mG(this.b,a),!0)};
_.deselected=function(a,b,c){return this.d?iG(this,a,b,c):[]};_.getMode=function(){return this.d?(iE(),mE):(iE(),lE)};_.ee=Qb;_.fe=function(a){var b,c;return this.d?(c=G(co(this.c,"indexOf",z(v(H,1),h,1,5,[vt(this.b.q,a)]))),-1==w(c)):(b=G(co(this.c,"indexOf",z(v(H,1),h,1,5,[vt(this.b.q,a)]))),-1!=w(b))};_.ge=function(){this.c.length=0;T(this.b,new ex(this.b,null,null))};_.select=function(a,b){return jG(this,a,b)};
_.selectAll=function(){fG(this,(iE(),mE));this.c.length=0;T(this.b,new ex(this.b,null,null))};_.te=function(a){return jG(this,mG(this.b,a),!0)};
_.selected=function(a,b,c){if(this.d){var d,e,f,g,l;l=[];d=this.d?(e=S(this.b.q.c.c,"size"),X((Y(),Z),e,F(0),F(0)).a-this.c.length):this.c.length;b=X((Y(),Z),b,F(0),F(0)).a;b=(0<b?b:0)<d-1?0<b?b:0:d-1;e=(this.d?(f=S(this.b.q.c.c,"size"),X(Z,f,F(0),F(0)).a-this.c.length):this.c.length)-1;c=X(Z,c,F(e),F(e)).a;c=((0<c?c:0)<d-1?0<c?c:0:d-1)-b+1;for(d=e=f=0;d<c;)g=G(co(this.c,"indexOf",z(Zb(H),h,1,5,[f]))),-1==w(g)&&e++>=b&&(++d,g=null==a?F(f):a(F(f)),null!=g&&co(l,"push",z(Zb(H),h,1,5,[g]))),++f;a=l}else a=
iG(this,a,b,c);return a};_.he=function(a){hx(this,a);this.b=a;this.f=new nG(this,a)};_.setMode=function(a){fG(this,a)};_.size=function(){var a;return this.d?(a=S(this.b.q.c.c,"size"),X((Y(),Z),a,F(0),F(0)).a-this.c.length):this.c.length};_.pe=lG;_.supportsMode=function(a){return a==(iE(),mE)||a==lE};_.a=!1;_.d=!1;_.e=-1;B(155);function nG(a,b){this.a=a;Xw.call(this,b)}r(475,216,Ia,nG);
_.ie=function(){var a;a=Qw(this);a.a&&(a.a.tabIndex=-1);sq((R(),a.ab),"vaadin-grid style-scope",!0);sm(tm(Tl(a)));return a};_.je=function(a,b){var c;-1==this.a.e&&(c=st(this.c.q,a),b?Pw(this.c,c):Ow(this.c,c),this.a.e=a)};B(475);function oG(a,b,c){return a.c==b?(a.c=-1,(c=yb(G(X((Y(),yE),(gc(),c?ic:hc),hc,hc))))||T(a.b,new ex(a.b,null,null)),!0):!1}
function pG(a,b,c){var d;return 0<=b&&(!a.a||b<(d=S(a.b.q.c.c,"size"),X((Y(),Z),d,F(0),F(0)).a))?(a.c=b,(c=yb(G(X((Y(),yE),(gc(),c?ic:hc),hc,hc))))||T(a.b,new ex(a.b,null,null)),!0):!1}function fF(){}r(205,204,{241:1,650:1},fF);_.clear=function(){oG(this,this.c,!1)};_.dataSizeUpdated=function(a){this.a=!0;this.c>=a&&(this.c=-1)};_.deselect=function(a,b){return oG(this,a,b)};_.qe=function(a){return oG(this,vt(this.b.q,a),!1)};_.deselected=dG;_.getMode=function(){return iE(),kE};
_.fe=function(a){return this.c==vt(this.b.q,a)};_.ge=function(){this.c=-1;T(this.b,new ex(this.b,null,null))};_.select=function(a,b){return pG(this,a,b)};_.re=function(a){return pG(this,vt(this.b.q,a),!1)};_.selectAll=Kq;_.selected=function(a){var b;b=[];-1!=this.c&&(a=null==a?F(this.c):a(F(this.c)),null!=a&&co(b,"push",z(v(H,1),h,1,5,[a])));return b};_.he=function(a){this.b=a;rx(this,a)};_.setMode=Ut;_.size=function(){return-1==this.c?0:1};_.supportsMode=function(a){return a==(iE(),kE)};_.a=!1;
_.c=-1;B(205);function gF(){gF=k;hF=new sk}function kG(){gF()}r(376,666,{},kG);_.Nb=function(a){XE(a,"selection-mode-changed");$E(a)};_.Ob=function(){return hF};var hF;B(376);function mG(a,b){var c;xt(b.c,b);c=vt(a.q,b.b);Nt(b.c,b);return c}function qG(a,b,c){var d;d=null;c.jf()?d=b:"object"===typeof b&&null!==b&&(d=qG(a,S(b,c.yf(0)),c.Ff(1,c.ld())));return d}function FF(a){var b;a=(b=a.a.k,KF(b,LF(b),a));Mg((Jg(),Kg),new rG(a))}
function LE(a,b){tC(this,new wC(this));this.b=a;this.a=b;tC(this,new sG(b))}r(139,80,{80:1,139:1},LE);_.Qe=function(a){var b,c,d;a=HF(a);b=null;Object(a)!==a?(d=G(co(this.a.b,"indexOf",z(v(H,1),h,1,5,[this.b]))),0==w(d)&&(b=a)):dm(a)?b=S(a,F((c=G(co(this.a.b,"indexOf",z(v(H,1),h,1,5,[this.b]))),w(c)))):b=qG(this,a,new Xl(Sc(this.b.c,"\\.")));return b};var ME=B(139);function sG(a){this.a=a}r(352,1,{},sG);
_.rd=function(a,b){var c=this.a,d,e;e=a.a.c;d=YD(b)?"":Ab(b);A(c.d.q,150)&&fh(O(new Ar(d)))?e.innerHTML=d||"":(c=gh((K(),e)),c&&c.iswrapper||(c=(R(),Ah()),c.style.overflow=(Ti(),"hidden"),c.style.textOverflow=(wj(),"ellipsis"),c.iswrapper=!0,Yg(e),e.appendChild(c)),M.Jb(c,d))};B(352);function rG(a){this.a=a}r(353,1,{},rG);_.tb=function(){var a=this.a;JF(a,a.b)};B(353);
function tG(a,b){var c,d,e,f,g,l,m,n,p,u,x;l=b?a.i.D.d.a.length:a.i.A.d.a.length;u=b?a.p:a.o;c=b?a.c:a.b;if(l!=u){for(e=u;e<l;e++)b?bD(a.i.D,e):KC(a.i.A,e);for(e=l;e<u;e++)b?JC(a.i.D,e):JC(a.i.A,e)}for(m=0;m<u;m++)for(x=b?jB(a.i.D,m):jB(a.i.A,m),l=EE(a.j),d=Tl(Em(c,m)),e=wm(d,z(v(tb,1),h,2,6,["th, td"])),f=BE((Y(),uE),d,"class"),0==(y(),f).length||(x.e=f,x.d.Ue()),g=n=0;n<e.c.length&&n<a.n;n++){d=Tl(Em(e,n));f=VA(x,l.yf(g));p=a.j.k;rp(p.a,f)||el(p.a,f,new QF(f,p.c));p=Q(p.a,f);f=BE(uE,d,"class");
if(0!=f.length){var C=p.a;C.d=f;C.c.Ue();aF(p.c);zF(p.c.d,p.a)}f=F(1);C=F(1);f=zE(Z,Em(d,0),"colspan",f,C).a;Wd(new uG(p,d,f),0);g+=f}b&&(c=a.j.k,u=jB(c.b.D,a.g),cD(c.b.D,u),c.b.Me())}
function Zo(a){var b;a.f=Lm(a.d,z(v(tb,1),h,2,6,["thead"]));a.e=Lm(a.d,z(v(tb,1),h,2,6,["tfoot"]));a.a=Lm(a.d,z(v(tb,1),h,2,6,["colgroup"]));b=Qm(a.f)+Qm(a.a)+Qm(a.e);if(b!==a.k){a.k=b;a.c=Lm(a.f,z(v(tb,1),h,2,6,["tr"]));a.b=Lm(a.e,z(v(tb,1),h,2,6,["tr"]));a.p=a.c.c.length;a.o=a.b.c.length;var c,d;for(d=c=0;c<a.p;c++)b=wm(Tl(Em(a.c,c)),z(Zb(tb),h,2,6,["th, td"])),d=ce(d,b.c.length),b.c.length!=d&&0==xm(b,z(Zb(tb),h,2,6,["[sortable]"])).c.length||(a.g=c);if(0!=a.a.c.length){b=wm(a.a,z(Zb(tb),h,2,6,
["col"]));var e,f,g,l,m;c=a.j.b;c.length=0;a.n=b.c.length;d=[];for(l=0;l<a.n;l++)co(c,"push",z(v(H,1),h,1,5,[new EF]));KE(a.j,c);for(l=0;l<a.n;l++){e=Tl(Em(b,l));f=S(c,F(l));g=yb(G(BE((Y(),yE),e,"sortable")));uC(f.a,g);Mg((Jg(),Kg),new vG(f,e));g=f;m=yb(G(BE(yE,e,"hidden")));rC(g.a,m);aF(g.b);g=f;m=F(1);var n=F(-1);m=zE(Z,Em(e,0),"flex",m,n);lC(g.a,m.a);g=BE(wE,e,"width");null!=g&&DF(f,(t(g),g));g=BE(wE,e,"min-width");null!=g&&CF(f,(t(g),g));g=BE(wE,e,"max-width");null!=g&&BF(f,(t(g),g));g=f;m=BE(uE,
e,"name");g.c=m;FF(g.a);g=BE(uE,e,"sort-direction");0!=(y(),g).length&&(m={},m.direction=g,m.column=l,co(d,"push",z(v(H,1),h,1,5,[m])));e=zE(uE,Em(e,0),"hiding-toggle-text",null,null);f=f.a;f.o=null==e?null:e;f.k&&pC(f.i.j,f)}KE(a.j,c);0==d.length||UE(a.j,fb(wG.prototype.We,new wG(a,d)))}0<a.n&&(0<a.p&&tG(a,!0),0<a.o&&tG(a,!1))}Wd(new xG(a),0);Wd(a.j.j,50)}
function qF(a,b){this.j=b;this.i=b.d;this.d=Tl(a);Zo(this);var c;a:{c=this.d;var d=(Ro(),Uo),e;if(d!=Zm){if(Wm&&(e=Nn(Wm,zb(d)))){c=e.jc(c);break a}throw(new Ub((oc(d),"No plugin registered for class "+d.k))).backingJsObject;}}d=c;c=(!Hl&&(Hl=new cn),en(pn));c.a.attributes=!0;c.a.childList=!0;c.a.subtree=!0;c=c.a;var f,g;if(cm((Il(),Rl),"MutationObserver"))for(d=d.c,e=0,g=d.length;e<g;++e){f=d[e];var l=c,m=void 0,n=void 0,p=void 0,p=Q(To,f);p||(p=new Sd,el(To,f,p));p.hf(this)||(p.xf(this),n=Wl(f),
m=void 0,m=Q(So,this),m||(m=Yo(this,n),el(So,this,m)),el(So,this,m),n?m.observe(f,l):co(S((Il(),Rl),dm(f)?"Array":"Object"),"observe",z(v(H,1),h,1,5,[f,m,l])),p.xf(this))}else c=tn(z(v(H,1),h,1,5,["ERROR: this browser does not support MutationObserver: "+$wnd.navigator.userAgent])),$wnd.console.log.apply($wnd.console,c)}r(147,1,{715:1,147:1},qF);_.g=0;_.k=null;_.n=0;_.o=0;_.p=0;B(147);function xG(a){this.a=a}r(359,49,{},xG);
_.nb=function(){if(0!=this.a.f.c.length){var a=!yb(G(BE((Y(),yE),this.a.f,"hidden"))),b=this.a.i.D;b.e=a;b.Ue()}0!=this.a.e.c.length&&(a=!yb(G(BE((Y(),yE),this.a.e,"hidden"))),b=this.a.i.A,b.e=a,b.Ue())};B(359);function uG(a,b,c){this.c=a;this.a=b;this.b=c}r(362,49,{},uG);_.nb=function(){JF(this.c,Mm(this.a));IF(this.c,this.b)};_.b=0;B(362);function vG(a,b){this.b=a;this.a=b}r(360,1,{},vG);_.tb=function(){var a=this.a,a=yb(G(BE((Y(),yE),a,"hidable")));qC(this.b.a,a)};B(360);
function wG(a,b){this.a=a;this.b=b}r(361,$wnd.Function,{},wG);gb();_.We=function(){var a=this.a.j.c;a&&hm(a,"sortOrder",this.b);return null};B(361);function LF(a){var b,c;for(c=b=0;c<a.b.D.d.a.length;c++)if(jB(a.b.D,c).a){b=c;break}return b}function KF(a,b,c){b=VA(jB(a.b.D,b),c);return rp(a.a,b)||el(a.a,b,new QF(b,a.c)),Q(a.a,b)}function yG(a,b){return null!=a?Bc((y(),null==a?"null":Ab(a))):b}
function zG(a,b,c){var d,e,f;e=EE(a.c);for(f=0;f<e.ld();f++)d=e.yf(f),f<c.length&&(d=VA(b,d),JF((rp(a.a,d)||el(a.a,d,new QF(d,a.c)),Q(a.a,d)),S(c,F(f))))}function iF(a){this.a=new Ag;this.c=a;this.b=a.d}r(355,1,{},iF);_.addFooter=function(a,b){var c;c=yG(a,this.b.A.d.a.length);c=JC(this.b.A,c);b&&zG(this,c,b);this.b.Le();YE(this.c)};_.addHeader=function(a,b){var c;c=yG(a,this.b.D.d.a.length);c=JC(this.b.D,c);b&&zG(this,c,b);this.b.Me();YE(this.c)};_.getDefaultHeader=function(){return LF(this)};
_.getFooterCell=function(a,b){var c;c=EE(this.c).yf(DE(this.c,b));c=VA(jB(this.b.A,a),c);return rp(this.a,c)||el(this.a,c,new QF(c,this.c)),Q(this.a,c)};_.getFooterRowCount=function(){return this.b.A.d.a.length};_.getHeaderCell=function(a,b){var c,d;d=EE(this.c).yf(DE(this.c,b));return c=VA(jB(this.b.D,a),d),rp(this.a,c)||el(this.a,c,new QF(c,this.c)),Q(this.a,c)};_.getHeaderRowCount=function(){return this.b.D.d.a.length};_.isFooterHidden=function(){return!this.b.A.e};_.isHeaderHidden=function(){return!this.b.D.e};
_.removeFooter=function(a){KC(this.b.A,a);this.b.Le();YE(this.c)};_.removeHeader=function(a){bD(this.b.D,a);this.b.Me();YE(this.c)};_.setDefaultHeader=function(a){a=jB(this.b.D,a);cD(this.b.D,a);this.b.Me()};_.setFooterHidden=function(a){var b=this.b.A;b.e=!a;b.Ue();this.b.Le();YE(this.c)};_.setFooterRowClassName=function(a,b){var c=jB(this.b.A,a);c.e=b;c.d.Ue();this.b.Le()};_.setHeaderHidden=function(a){var b=this.b.D;b.e=!a;b.Ue();this.b.Me();YE(this.c)};
_.setHeaderRowClassName=function(a,b){var c=jB(this.b.D,a);c.e=b;c.d.Ue();this.b.Me()};B(355);function AG(a,b){a.s=-1;a.t=-1;if(1<=b.length)try{a.s=Bc(b[0])}catch(c){if(c=ec(c),!A(c,13))throw c.backingJsObject;}if(2<=b.length){try{a.t=Bc(b[1])}catch(c){if(c=ec(c),!A(c,13))throw c.backingJsObject;}if(-1==a.t&&-1!=(y(),b[1]).indexOf("-"))try{a.t=Bc(Tc(b[1],0,Oc(b[1],Yc(45))))}catch(c){if(c=ec(c),!A(c,13))throw c.backingJsObject;}}}
function BG(a,b){var c,d;c=Oc(b,Yc(46));0>c&&(c=(y(),b).length);a.a=Bc(CG(b,0,c));d=Yc(46);var e=c+1;d=(y(),b).indexOf(d,e);0>d&&(d=(y(),b).length);try{a.b=Bc(Pc(CG(b,c+1,d),"[^0-9].*",""))}catch(f){if(f=ec(f),!A(f,68))throw f.backingJsObject;}}function CG(a,b,c){0>b&&(b=0);(0>c||c>(y(),a).length)&&(c=(y(),a).length);return(y(),a).substr(b,c-b)}
function Qs(a){var b,c,d,e,f;a=(y(),a).toLowerCase();this.f=-1!=a.indexOf("gecko")&&-1==a.indexOf("webkit")&&-1==a.indexOf("trident/");a.indexOf(" presto/");this.p=-1!=a.indexOf("trident/");this.q=!this.p&&-1!=a.indexOf("applewebkit");this.c=-1!=a.indexOf(" chrome/");this.k=-1!=a.indexOf("opera");this.g=(this.g=-1!=a.indexOf("msie")&&!this.k&&-1==a.indexOf("webtv"))||this.p;this.o=!this.c&&!this.g&&-1!=a.indexOf("safari");this.e=-1!=a.indexOf(" firefox/");this.n=-1!=a.indexOf("phantomjs/");-1!=a.indexOf(" edge/")&&
(this.d=!0,this.f=this.q=this.e=this.o=this.g=this.k=this.c=!1);a.indexOf("chromeframe");try{this.f?(d=a.indexOf("rv:"),0<=d&&(e=a.substr(d+3,a.length-(d+3)),e=Rc(e,"(\\.[0-9]+).+","$1"),yc(e))):this.q?(e=Uc(a,a.indexOf("webkit/")+7),e=Rc(e,"([0-9]+)[^0-9].+","$1"),yc(e)):this.g&&(f=a.indexOf("trident/"),0<=f&&(e=a.substr(f+8,a.length-(f+8)),e=Rc(e,"([0-9]+\\.[0-9]+).*","$1"),yc(e)))}catch(g){if(g=ec(g),A(g,13))Tm();else throw g.backingJsObject;}try{this.g?-1==a.indexOf("msie")?(d=a.indexOf("rv:"),
0<=d&&(e=a.substr(d+3,a.length-(d+3)),e=Rc(e,"(\\.[0-9]+).+","$1"),BG(this,e))):(c=Uc(a,a.indexOf("msie ")+5),c=CG(c,0,c.indexOf(";")),BG(this,c)):this.e?(b=a.indexOf(" firefox/")+9,BG(this,CG(a,b,b+5))):this.c?(b=a.indexOf(" chrome/")+8,BG(this,CG(a,b,b+5))):this.o?(b=a.indexOf(" version/")+9,BG(this,CG(a,b,b+5))):this.k?(b=a.indexOf(" version/"),-1!=b?b+=9:b=a.indexOf("opera/")+6,BG(this,CG(a,b,b+5))):this.d&&(b=a.indexOf(" edge/")+6,BG(this,CG(a,b,b+8)))}catch(g){if(g=ec(g),A(g,13))Tm();else throw g.backingJsObject;
}if(-1!=a.indexOf("windows "))this.r=1,a.indexOf("windows phone");else if(-1!=a.indexOf("android"))this.r=5,-1!=(y(),a).indexOf("android")&&(a=CG(a,a.indexOf("android ")+8,a.length),a=CG(a,0,a.indexOf(";")),a=Sc(a,"\\."),AG(this,a));else if(-1!=a.indexOf("linux"))this.r=3;else if(-1!=a.indexOf("macintosh")||-1!=a.indexOf("mac osx")||-1!=a.indexOf("mac os x"))this.i=-1!=a.indexOf("ipad"),this.j=-1!=a.indexOf("iphone"),this.i||-1!=a.indexOf("ipod")||this.j?(this.r=4,-1!=(y(),a).indexOf("os ")&&-1!=
a.indexOf(" like mac")&&(a=CG(a,a.indexOf("os ")+3,a.indexOf(" like mac")),a=Sc(a,"_"),AG(this,a))):this.r=2}r(513,1,ea,Qs);_.a=-1;_.b=-1;_.c=!1;_.d=!1;_.e=!1;_.f=!1;_.g=!1;_.i=!1;_.j=!1;_.k=!1;_.n=!1;_.o=!1;_.p=!1;_.q=!1;_.r=0;_.s=-1;_.t=-1;B(513);function Dx(){Dx=k;Ex=new DG;gE=new EG}r(74,5,Qa);var Ex,gE,fE=D(74,function(){Dx();return z(v(fE,1),h,74,0,[Ex,gE])});function DG(){N.call(this,"ASCENDING",0)}r(473,74,Qa,DG);_._e=function(){return gE};D(473,null);
function EG(){N.call(this,"DESCENDING",1)}r(474,74,Qa,EG);_._e=function(){return Ex};D(474,null);function ew(){ew=k;vw=new FG("HEADER",0);fw=new FG("BODY",1);uw=new FG("FOOTER",2)}function FG(a,b){N.call(this,a,b)}r(108,5,{108:1,3:1,6:1,5:1},FG);var fw,uw,vw,GG=D(108,function(){ew();return z(v(GG,1),h,108,0,[vw,fw,uw])});function PC(){PC=k;SC=new HG("TEXT",0);QC=new HG("HTML",1);UC=new HG("WIDGET",2)}function HG(a,b){N.call(this,a,b)}r(101,5,{101:1,3:1,6:1,5:1},HG);
var QC,SC,UC,IG=D(101,function(){PC();return z(v(IG,1),h,101,0,[SC,QC,UC])});function Mt(a,b){if(a.b>b.a||b.b>a.a)throw(new E("There is a gap between "+a+" and "+b)).backingJsObject;return new rt(Nb(a.b,b.b),ce(a.a,b.a))}function wx(a,b){return a.b<=b&&b<a.a}function jC(a,b){return a===b?!0:null==b||JG!=jb(b)||a.a!=b.a||a.b!=b.b?!1:!0}function Pt(a,b){return a.b<b.a&&b.b<a.a}function It(a){return a.b>=a.a}function Qt(a,b){return a.b>=a.a&&b.b>=b.a?!0:b.b<=a.b&&a.a<=b.a}
function nt(a){return a.a-a.b}function GB(a,b){return 0==b?a:new rt(a.b+b,a.a+b)}function it(a,b){var c,d,e;e=vF(a,b.b);d=e[0];c=vF(e[1],b.a);e=c[0];c=c[1];return z(v(JG,1),h,18,0,[d,e,c])}function qt(a,b){var c,d,e;e=wx(b,a.b);d=wx(b,a.a);c=a.b<b.b&&a.a>=b.a;return e?d?a:new rt(a.b,b.a):d?new rt(b.b,a.a):c?b:W(a.b,0)}function vF(a,b){return b<a.b?z(v(JG,1),h,18,0,[W(a.b,0),a]):b>=a.a?z(v(JG,1),h,18,0,[a,W(a.a,0)]):z(v(JG,1),h,18,0,[new rt(a.b,b),new rt(b,a.a)])}
function rt(a,b){if(a>b)throw(new E("start must not be greater than end")).backingJsObject;this.b=a;this.a=b}function W(a,b){if(0>b)throw(new E("length must not be negative")).backingJsObject;return new rt(a,a+b)}r(18,1,{18:1,3:1},rt);_.bb=function(a){return jC(this,a)};_.db=function(){var a;a=31+this.a;return a=31*a+this.b};_.eb=function(){return oc(JG),JG.i+" ["+this.b+".."+this.a+"["+(this.b>=this.a?" (empty)":"")};_.a=0;_.b=0;var JG=B(18);
function Dw(){Dw=k;Ew=new KG("ANY",0);LG=new KG("START",1);oy=new KG("MIDDLE",2);MG=new KG("END",3)}function KG(a,b){N.call(this,a,b)}r(71,5,{71:1,3:1,6:1,5:1},KG);var Ew,MG,oy,LG,NG=D(71,function(){Dw();return z(v(NG,1),h,71,0,[Ew,LG,oy,MG])});function IE(){IE=k;var a=(Dw(),z(Zb(NG),h,71,0,[Ew,LG,oy,MG])),b,c,d,e;b={};d=0;for(e=a.length;d<e;++d)c=a[d],b[":"+(null!=c.f?c.f:""+c.g)]=c;JE=b}var JE;r(687,1,{});B(687);r(688,687,{});B(688);function OG(){}r(232,688,{},OG);B(232);r(117,1,{});_.eb=Ic;B(117);
function vd(){Fb();Tb.call(this)}function Fq(a){Fb();Ub.call(this,a)}r(26,10,ca,vd,Fq);B(26);function Gc(){Gc=k;Hc=Ib(Dd,h,97,256,0)}var Hc;function jA(a){return 0>=a?0-a:a}function au(a){return 0>a?-a:a}function ce(a,b){return a>b?a:b}function Nb(a,b){return a<b?a:b}function yC(){this.a=""}r(346,117,{649:1},yC);_.eb=Ic;B(346);function LA(a,b){a.a+=b;return a}function yd(a,b){a.a+=""+b;return a}function Ir(){this.a=""}function xd(){this.a=""}function hl(a){this.a=a}r(67,117,{649:1},Ir,xd,hl);
_.eb=Ic;B(67);function Tm(){Tm=k;Um=new OG}var Um;function PG(){Fb();Tb.call(this)}function Oq(a){Fb();Ub.call(this,a)}r(30,10,{3:1,13:1,10:1,11:1,30:1},PG,Oq);B(30);function mx(a,b){var c,d,e,f;t(b);c=!1;for(e=b.Kc();e.Vc();)d=e.Wc(),c|=(f=a.a.rf(d,a),null==f)}function Tz(a,b,c){var d;for(d=a.Kc();d.Vc();)if(a=d.Wc(),sb(b)===sb(a)||null!=b&&mb(b,a))return c&&d.Xc(),!0;return!1}function $C(a,b){var c,d;t(b);for(d=b.Kc();d.Vc();)if(c=d.Wc(),!a.hf(c))return!1;return!0}
function QG(a,b){var c,d,e;e=a.ld();b.length<e&&(b=(c=Array(e),$b(c,b)));d=a.Kc();for(c=0;c<e;++c)b[c]=d.Wc();b.length>e&&(b[e]=null);return b}function RG(a){var b,c,d;d=new SG("[","]");for(c=a.Kc();c.Vc();)b=c.Wc(),TG(d,b===a?"(this Collection)":(y(),null==b?"null":Ab(b)));return d.a?0==Rb(d.e).length?d.a.a:d.a.a+(""+d.e):d.c}r(670,1,{});_.bb=Db;_.db=Eb;_.hf=UG;_.jf=VG;_.kf=WG;_.lf=XG;_.eb=function(){return RG(this)};B(670);
function YG(a,b){var c,d,e;c=b.If();e=b.Jf();d=a.qf(c);return!(sb(e)===sb(d)||null!=e&&mb(e,d))||null==d&&!a.nf(c)?!1:!0}function ZG(a,b){var c,d;if(b===a)return!0;if(!A(b,65)||a.ld()!=b.ld())return!1;for(d=b.pf().Kc();d.Vc();)if(c=d.Wc(),!a.mf(c))return!1;return!0}function $G(a,b,c){var d,e;for(d=a.pf().Kc();d.Vc();)if(a=d.Wc(),e=a.If(),sb(b)===sb(e)||null!=b&&mb(b,e))return c&&(a=new aH(a.If(),a.Jf()),d.Xc()),a;return null}
function bH(a){var b,c,d;d=new SG("{","}");for(c=a.pf().Kc();c.Vc();)b=c.Wc(),TG(d,cH(a,b.If())+"\x3d"+cH(a,b.Jf()));return d.a?0==Rb(d.e).length?d.a.a:d.a.a+(""+d.e):d.c}function cH(a,b){return b===a?"(this Map)":(y(),null==b?"null":Ab(b))}function dH(a){return a?a.Jf():null}r(669,1,Ra);_.mf=function(a){return YG(this,a)};_.nf=function(a){return!!$G(this,a,!1)};_.of=function(a){var b,c;for(c=this.pf().Kc();c.Vc();)if(b=c.Wc(),b=b.Jf(),sb(a)===sb(b)||null!=a&&mb(a,b))return!0;return!1};
_.bb=function(a){return ZG(this,a)};_.qf=function(a){return dH($G(this,a,!1))};_.db=function(){return eH(this.pf())};_.jf=VG;_.rf=function(){throw(new Oq("Put not supported on this map")).backingJsObject;};_.sf=function(a){return dH($G(this,a,!0))};_.ld=function(){return this.pf().ld()};_.eb=function(){return bH(this)};B(669);function rp(a,b){return nb(b)?null==b?!!fH(a.d,null):void 0!==a.e.a.get(b):!!fH(a.d,b)}
function gH(a,b,c){var d;for(d=c.Kc();d.Vc();)if(c=d.Wc(),a.uf(b,c.Jf()))return!0;return!1}function Q(a,b){return nb(b)?null==b?dH(fH(a.d,null)):a.e.a.get(b):dH(fH(a.d,b))}function el(a,b,c){return nb(b)?J(a,b,c):My(a.d,b,c)}function J(a,b,c){return null==b?My(a.d,null,c):hH(a.e,b,c)}function dl(a,b){return nb(b)?null==b?iH(a.d,null):jH(a.e,b):iH(a.d,b)}function ns(a){a.d=new kH(a);a.e=new lH(a);a._gwt_modCount=(a._gwt_modCount|0)+1}function ks(a){return a.d.c+a.e.c}r(121,669,Ra);_.tf=function(){ns(this)};
_.nf=function(a){return rp(this,a)};_.of=function(a){return gH(this,a,this.e)||gH(this,a,this.d)};_.pf=function(){return new mH(this)};_.qf=function(a){return Q(this,a)};_.rf=function(a,b){return el(this,a,b)};_.sf=function(a){return dl(this,a)};_.ld=function(){return ks(this)};B(121);r(671,670,Sa);_.hf=UG;_.jf=VG;_.kf=function(){return QG(this,Ib(H,h,1,this.ld(),5))};_.lf=XG;_.bb=function(a){return a===this?!0:A(a,54)&&a.ld()==this.ld()?$C(this,a):!1};_.db=function(){return eH(this)};B(671);
function mH(a){this.a=a}r(151,671,Sa,mH);_.hf=function(a){return A(a,53)?YG(this.a,a):!1};_.Kc=function(){return new nH(this.a)};_.ld=oH;B(151);function pH(a){if(a.a.Vc())return!0;if(a.a!=a.d)return!1;a.a=new qH(a.e.d);return a.a.Vc()}function nH(a){this.e=a;this.a=this.d=new rH(this.e.e);this.b=pH(this);this._gwt_modCount=a._gwt_modCount}r(459,1,{},nH);_.Wc=function(){var a;return sH(this.e,this),od(this.b),this.c=this.a,a=this.a.Wc(),this.b=pH(this),a};_.Vc=jF;
_.Xc=function(){ud(!!this.c);sH(this.e,this);this.c.Xc();this.c=null;this.b=pH(this);tH(this.e,this)};_.b=!1;B(459);function Zz(a){var b=a.b,c;c=new Jz(a,0);for(a=0;a<b;++a)od(c.b<c.d.ld()),c.d.yf(c.c=c.b++),uH(c)}function oz(a,b){var c,d;c=0;for(d=a.ld();c<d;++c)if(vH(b,a.yf(c)))return c;return-1}r(672,670,Ta);_.hf=UG;_.jf=VG;_.Df=function(a){return Tz(this,a,!0)};_.kf=WG;_.lf=XG;_.wf=function(){throw(new Oq("Add not supported on this list")).backingJsObject;};
_.xf=function(a){this.wf(this.ld(),a);return!0};_.bb=function(a){var b,c,d;if(a===this)return!0;if(!A(a,61)||this.ld()!=a.ld())return!1;d=a.Kc();for(b=this.Kc();b.Vc();)if(a=b.Wc(),c=d.Wc(),!(sb(a)===sb(c)||null!=a&&mb(a,c)))return!1;return!0};_.db=function(){fl();var a,b,c;c=1;for(b=this.Kc();b.Vc();)a=b.Wc(),c=31*c+(null!=a?kb(a):0),c|=0;return c};_.zf=function(a){return oz(this,a)};_.Kc=function(){return new Yl(this)};_.Af=function(){return this.Bf(0)};_.Bf=function(a){return new Jz(this,a)};
_.Cf=function(){throw(new Oq("Remove not supported on this list")).backingJsObject;};_.Ef=function(){throw(new Oq("Set not supported on this list")).backingJsObject;};_.Ff=function(a,b){return new zu(this,a,b)};B(672);function uH(a){ud(-1!=a.c);a.d.Cf(a.c);a.b=a.c;a.c=-1}function Yl(a){this.d=a}r(123,1,{},Yl);_.Vc=function(){return this.b<this.d.ld()};_.Wc=function(){return od(this.Vc()),this.d.yf(this.c=this.b++)};_.Xc=wH;_.b=0;_.c=-1;B(123);function CA(a){return a.b<a.d.ld()}
function DA(a){return od(a.b<a.d.ld()),a.d.yf(a.c=a.b++)}function Jz(a,b){this.d=this.a=a;sd(b,a.ld());this.b=b}r(124,123,{},Jz);_.Vc=function(){return CA(this)};_.Wc=function(){return DA(this)};_.Xc=wH;_.Gf=function(){return 0<this.b};_.Hf=function(){return od(0<this.b),this.a.yf(this.c=--this.b)};B(124);function zu(a,b,c){td(b,c,a.ld());this.c=a;this.a=b;this.b=c-b}r(45,672,Ta,zu);_.wf=function(a,b){sd(a,this.b);this.c.wf(this.a+a,b);++this.b};
_.yf=function(a){return qd(a,this.b),this.c.yf(this.a+a)};_.Cf=function(a){qd(a,this.b);a=this.c.Cf(this.a+a);--this.b;return a};_.Ef=function(a,b){qd(a,this.b);return this.c.Ef(this.a+a,b)};_.ld=jF;_.a=0;_.b=0;B(45);function Im(a){this.a=a}r(38,671,Sa,Im);_.hf=function(a){return this.a.nf(a)};_.Kc=function(){var a;return a=this.a.pf().Kc(),new Jm(a)};_.ld=oH;B(38);function Jm(a){this.a=a}r(39,1,{},Jm);_.Vc=xH;_.Wc=function(){var a;return a=this.a.Wc(),a.If()};_.Xc=yH;B(39);
function Qx(a){this.a=a}r(35,670,{},Qx);_.hf=function(a){return this.a.of(a)};_.Kc=function(){var a;return a=this.a.pf().Kc(),new Rx(a)};_.ld=oH;B(35);function Rx(a){this.a=a}r(43,1,{},Rx);_.Vc=xH;_.Wc=function(){var a;return a=this.a.Wc(),a.Jf()};_.Xc=yH;B(43);function zH(a,b){var c;c=a.e;a.e=b;return c}r(72,1,Ua);_.bb=function(a){return A(a,53)?vH(this.d,a.If())&&vH(this.e,a.Jf()):!1};_.If=kF;_.Jf=function(){return this.e};_.db=function(){return AH(this.d)^AH(this.e)};
_.Kf=function(a){return zH(this,a)};_.eb=function(){return this.d+"\x3d"+this.e};B(72);function aH(a,b){this.d=a;this.e=b}r(73,72,{72:1,73:1,53:1},aH);B(73);function QB(a){var b=a.e;this.d=a.d;this.e=b}r(460,72,Ua,QB);_.Kf=BH;B(460);r(676,1,{53:1});_.bb=function(a){return A(a,53)?vH(this.b.value[0],a.If())&&vH(CH(this),a.Jf()):!1};_.db=function(){return AH(this.b.value[0])^AH(CH(this))};_.eb=function(){return this.b.value[0]+"\x3d"+CH(this)};B(676);
function DH(a,b){var c;c=b.If();c=a.Mf(c);return!!c&&vH(c.e,b.Jf())}function Dy(a,b){return dH(a.Mf(b))}function PB(a){if(!a)throw(new pd).backingJsObject;return a.d}r(690,669,Ra);_.mf=function(a){return DH(this,a)};_.nf=function(a){return!!this.Mf(a)};_.pf=function(){return new EH(this)};_.qf=function(a){return Dy(this,a)};B(690);function EH(a){this.b=a}r(169,671,Sa,EH);_.hf=function(a){return A(a,53)&&DH(this.b,a)};_.Kc=function(){return this.b.Lf()};_.ld=FH;B(169);
function jz(a,b,c){t(c);a=xz(a,b);for(b=new Xk(c);b.a<b.c.a.length;)c=Yk(b),GH(a,c)}function lz(a,b){var c;c=xz(a,b);try{return yz(c)}catch(d){d=ec(d);if(A(d,52))throw(new Ec("Can't get element "+b)).backingJsObject;throw d.backingJsObject;}}function wz(a,b){var c,d;c=xz(a,b);try{return d=yz(c),Lz(c),d}catch(e){e=ec(e);if(A(e,52))throw(new Ec("Can't remove element "+b)).backingJsObject;throw e.backingJsObject;}}r(686,672,Ta);_.wf=function(a,b){var c;c=xz(this,a);GH(c,b)};
_.yf=function(a){return lz(this,a)};_.Kc=function(){return xz(this,0)};_.Cf=function(a){return wz(this,a)};_.Ef=function(a,b){var c,d;c=xz(this,a);try{return d=yz(c),ud(!!c.c),c.c.c=b,d}catch(e){e=ec(e);if(A(e,52))throw(new Ec("Can't set element "+a)).backingJsObject;throw e.backingJsObject;}};B(686);function HH(a){a.a=Ib(H,h,1,0,5)}function Iz(a,b,c){sd(b,a.a.length);a.a.splice(b,0,c)}function Vd(a,b){a.a[a.a.length]=b;return!0}
function yB(a,b){var c;c=b.kf();0!=c.length&&jd(c,a.a,a.a.length,c.length,!1)}function Jr(a,b){qd(b,a.a.length);return a.a[b]}function uo(a,b){for(var c=0;c<a.a.length;++c)if(vH(b,a.a[c]))return c;return-1}function Cu(a,b){var c;c=(qd(b,a.a.length),a.a[b]);a.a.splice(b,1);return c}function be(a,b){var c;c=uo(a,b);if(-1==c)return!1;qd(c,a.a.length);a.a.splice(c,1);return!0}function wu(a,b,c){var d;d=(qd(b,a.a.length),a.a[b]);a.a[b]=c;return d}
function wo(a){var b=a.a;a=b.slice(0,a.a.length);return $b(a,b)}function $d(a,b){var c,d;d=a.a.length;b.length<d&&(b=(c=Array(d),$b(c,b)));for(c=0;c<d;++c)b[c]=a.a[c];b.length>d&&(b[d]=null);return b}function Sd(){HH(this)}function gx(a){HH(this);bd(0<=a,"Initial capacity must not be negative")}function zo(a){HH(this);a=a.kf();jd(a,this.a,0,a.length,!1)}r(9,672,Va,Sd,gx,zo);_.wf=function(a,b){Iz(this,a,b)};_.xf=function(a){return Vd(this,a)};_.hf=function(a){return-1!=uo(this,a)};
_.yf=function(a){return Jr(this,a)};_.zf=function(a){return uo(this,a)};_.jf=function(){return 0==this.a.length};_.Kc=function(){return new Xk(this)};_.Cf=function(a){return Cu(this,a)};_.Df=function(a){return be(this,a)};_.Ef=function(a,b){return wu(this,a,b)};_.ld=IH;_.kf=function(){return wo(this)};_.lf=function(a){return $d(this,a)};B(9);function Yk(a){od(a.a<a.c.a.length);a.b=a.a++;return a.c.a[a.b]}function xB(a){ud(-1!=a.b);Cu(a.c,a.a=a.b);a.b=-1}function Xk(a){this.c=a}r(32,1,{},Xk);
_.Vc=function(){return this.a<this.c.a.length};_.Wc=function(){return Yk(this)};_.Xc=function(){xB(this)};_.a=0;_.b=-1;B(32);function QE(a,b,c,d,e,f){var g,l,m;if(7>d-c)for(a=c,g=a+1;g<d;++g)for(m=g;m>a&&0<f.Ye(b[m-1],b[m]);--m)c=b[m],b[m]=b[m-1],b[m-1]=c;else if(l=c+e,g=d+e,m=l+(g-l>>1),QE(b,a,l,m,-e,f),QE(b,a,m,g,-e,f),0>=f.Ye(a[m-1],a[m]))for(;c<d;)b[c++]=a[l++];else for(e=l,l=m;c<d;)l>=g||e<m&&0>=f.Ye(a[e],a[l])?b[c++]=a[e++]:b[c++]=a[l++]}function Xl(a){this.a=a}r(47,672,Va,Xl);
_.hf=function(a){return-1!=oz(this,a)};_.yf=function(a){return qd(a,this.a.length),this.a[a]};_.Ef=function(a,b){var c;c=(qd(a,this.a.length),this.a[a]);this.a[a]=b;return c};_.ld=IH;_.kf=function(){return $d(this,Ib(H,h,1,this.a.length,5))};_.lf=function(a){return $d(this,a)};B(47);function fl(){fl=k;gl=new JH;Bz=new KH}function eH(a){fl();var b,c;c=0;for(b=a.Kc();b.Vc();)a=b.Wc(),c+=null!=a?kb(a):0,c|=0;return c}function aB(a){fl();var b;b=new LH;b.a.rf(a,b);return new lx(b)}
function Wx(a,b){fl();var c;c=new MH(1);My(c.d,a,b);return new NH(c)}function gu(a){fl();return A(a,245)?new gB(a):new OA(a)}var gl,Bz;function JH(){}r(505,672,Va,JH);_.hf=px;_.yf=function(a){qd(a,0);return null};_.Kc=OH;_.Af=OH;_.ld=iD;B(505);function PH(){PH=k;QH=new RH}function RH(){}r(506,1,{},RH);_.Vc=zl;_.Gf=zl;_.Wc=SH;_.Hf=SH;_.Xc=function(){throw(new vd).backingJsObject;};var QH;B(506);r(508,669,Wa,function(){});_.nf=px;_.of=px;_.pf=function(){return fl(),Bz};_.qf=bw;_.ld=iD;B(508);
function KH(){}r(507,671,Xa,KH);_.hf=px;_.Kc=OH;_.ld=iD;B(507);r(220,672,{3:1,61:1},function(a){this.a=a});_.hf=function(a){return vH(this.a,a)};_.yf=function(a){qd(a,1);return this.a};_.ld=function(){return 1};B(220);function TH(){throw(new PG).backingJsObject;}function iz(a){this.b=a}r(103,1,{},iz);_.bb=Db;_.db=Eb;_.hf=UH;_.jf=VH;_.Kc=WH;_.ld=FH;_.kf=XH;_.lf=YH;_.eb=function(){return Ab(this.b)};B(103);function iu(a){this.b=a}r(40,1,{},iu);_.Vc=ZH;_.Wc=$H;_.Xc=aI;B(40);
function fu(a,b){return a.a.zf(b)}function VB(a,b,c){return new OA(a.a.Ff(b,c))}function OA(a){this.a=this.b=a}r(76,103,Ta,OA);_.xf=function(){return TH()};_.hf=UH;_.Kc=WH;_.Df=function(){return TH()};_.ld=FH;_.kf=XH;_.lf=YH;_.bb=bI;_.yf=function(a){return this.a.yf(a)};_.db=cI;_.zf=function(a){return fu(this,a)};_.jf=function(){return this.a.jf()};_.Af=function(){return new dI(this.a.Bf(0))};_.Bf=function(a){return new dI(this.a.Bf(a))};_.Ef=eI;_.Ff=function(a,b){return VB(this,a,b)};B(76);
function dI(a){this.a=this.b=a}r(223,40,{},dI);_.Vc=ZH;_.Wc=$H;_.Xc=aI;_.Gf=function(){return this.a.Gf()};_.Hf=function(){return this.a.Hf()};B(223);function NH(a){this.b=a}r(509,1,Ra,NH);_.pf=function(){!this.a&&(this.a=new fI(new mH(this.b)));return this.a};_.bb=function(a){return ZG(this.b,a)};_.qf=function(a){return Q(this.b,a)};_.db=function(){return eH(new mH(this.b))};_.jf=function(){return 0==ks(this.b)};_.rf=eI;_.sf=BH;_.ld=function(){return ks(this.b)};_.eb=function(){return bH(this.b)};
B(509);function lx(a){this.b=a}r(159,103,Sa,lx);_.hf=UH;_.jf=VH;_.Kc=WH;_.ld=FH;_.kf=XH;_.lf=YH;_.bb=function(a){return this.b.bb(a)};_.db=function(){return this.b.db()};B(159);function gI(a,b){var c;for(c=0;c<b;++c)a[c]=new hI(a[c])}function fI(a){this.b=a}r(510,159,Sa,fI);_.hf=UH;_.Kc=function(){var a;a=this.b.Kc();return new iI(a)};_.kf=function(){var a;a=this.b.kf();gI(a,a.length);return a};_.lf=function(a){a=this.b.lf(a);gI(a,this.b.ld());return a};B(510);function iI(a){this.a=a}r(511,1,{},iI);
_.Wc=function(){return new hI(this.a.Wc())};_.Vc=xH;_.Xc=Bq;B(511);function hI(a){this.a=a}r(221,1,{53:1},hI);_.bb=bI;_.If=function(){return this.a.If()};_.Jf=function(){return this.a.Jf()};_.db=cI;_.Kf=BH;_.eb=function(){return Ab(this.a)};B(221);function gB(a){OA.call(this,a)}r(222,76,Ta,gB);B(222);function OE(){OE=k;PE=new jI}var PE;
function RB(a,b){OE();var c=(t(a),a),d=(t(b),b);gc();nb(c)?d=Wc(c,d):ob(c)?(c=(t(c),c),d=(t(d),d),d=c<d?-1:c>d?1:c==d?0:isNaN(c)?isNaN(d)?0:1:-1):pb(c)?(c=yb((t(c),c)),d=yb((t(d),d)),gc(),d=c==d?0:c?1:-1):d=c.Mb(d);return d}function jI(){}r(531,1,{},jI);_.bb=Db;_.Ye=function(a,b){return RB(a,b)};B(531);function sH(a,b){if(b._gwt_modCount!=a._gwt_modCount)throw(new kI).backingJsObject;}function tH(a,b){b._gwt_modCount=a._gwt_modCount}function lI(a){a._gwt_modCount=(a._gwt_modCount|0)+1}
function kI(){Fb();Tb.call(this)}r(636,10,ca,kI);B(636);function Ag(){ns(this)}function MH(a){bd(0<=a,"Negative initial capacity");bd(!0,"Non-positive load factor");ns(this)}function Hz(a){ns(this);var b;t(a);for(b=(new mI(a)).b.Lf();CA(b.a);)a=b.b=DA(b.a),this.rf(a.If(),a.Jf())}r(22,121,Wa,Ag,MH,Hz);_.uf=function(a,b){return sb(a)===sb(b)||null!=a&&mb(a,b)};_.vf=function(a){return kb(a)|0};B(22);function Hm(a,b){return null==a.a.rf(b,a)}function Iq(a,b){return a.a.nf(b)}
function Vk(){this.a=new Ag}function LH(){this.a=new MH(1)}function zt(a){this.a=new MH(a.a.ld());mx(this,a)}r(37,671,Xa,Vk,LH,zt);_.hf=function(a){return Iq(this,a)};_.jf=function(){return 0==this.a.ld()};_.Kc=function(){var a;return a=(new Im(this.a)).a.pf().Kc(),new Jm(a)};_.ld=oH;_.eb=function(){return RG(new Im(this.a))};B(37);function nI(a,b,c){var d,e,f;e=0;for(f=c.length;e<f;++e)if(d=c[e],a.b.uf(b,d.If()))return d;return null}
function fH(a,b){var c=null==b?0:a.b.vf(b),c=a.a.get(c);return nI(a,b,null==c?[]:c)}function My(a,b,c){var d,e,f;f=null==b?0:a.b.vf(b);e=(d=a.a.get(f),null==d?[]:d);if(0==e.length)a.a.set(f,e);else if(d=nI(a,b,e))return d.Kf(c);e[e.length]=new aH(b,c);++a.c;lI(a.b);return null}
function iH(a,b){var c,d,e,f;e=null==b?0:a.b.vf(b);d=(c=a.a.get(e),null==c?[]:c);for(f=0;f<d.length;f++)if(c=d[f],a.b.uf(b,c.If()))return 1==d.length?(d.length=0,a.a["delete"](e)):d.splice(f,1),--a.c,lI(a.b),c.Jf();return null}function kH(a){this.a=oI();this.b=a}r(530,1,{},kH);_.Kc=function(){return new qH(this)};_.c=0;B(530);function qH(a){this.e=a;this.b=this.e.a.entries();this.a=[]}r(226,1,{},qH);_.Wc=function(){return this.d=this.a[this.c++],this.d};
_.Vc=function(){var a;if(this.c<this.a.length)return!0;a=this.b.next();return a.done?!1:(this.a=a.value[1],this.c=0,!0)};_.Xc=function(){iH(this.e,this.d.If());0!=this.c&&--this.c};_.c=0;_.d=null;B(226);function pI(){pI=k;var a;if(a="function"===typeof Map&&Map.prototype.entries)try{a=(new Map).entries().next().done}catch(b){a=!1}qI=a?Map:rI()}
function sI(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var a=Object.create(null);if(void 0!==a.__proto__||0!=Object.getOwnPropertyNames(a).length)return!1;a.__proto__=42;return 42!==a.__proto__||0==Object.getOwnPropertyNames(a).length?!1:!0}
function rI(){function a(){this.obj=this.createObject()}a.prototype.createObject=function(){return Object.create(null)};a.prototype.get=function(a){return this.obj[a]};a.prototype.set=function(a,c){this.obj[a]=c};a.prototype["delete"]=function(a){delete this.obj[a]};a.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)};a.prototype.entries=function(){var a=this.keys(),c=this,d=0;return{next:function(){if(d>=a.length)return{done:!0};var e=a[d++];return{value:[e,c.get(e)],done:!1}}}};
sI()||(a.prototype.createObject=function(){return{}},a.prototype.get=function(a){return this.obj[":"+a]},a.prototype.set=function(a,c){this.obj[":"+a]=c},a.prototype["delete"]=function(a){delete this.obj[":"+a]},a.prototype.keys=function(){var a=[],c;for(c in this.obj)58==c.charCodeAt(0)&&a.push(c.substring(1));return a});return a}function oI(){pI();return new qI}var qI;function hH(a,b,c){var d;d=a.a.get(b);a.a.set(b,void 0===c?null:c);void 0===d?(++a.c,lI(a.b)):++a.d;return d}
function jH(a,b){var c;c=a.a.get(b);void 0===c?++a.d:(a.a["delete"](b),--a.c,lI(a.b));return c}function lH(a){this.a=oI();this.b=a}r(492,1,{},lH);_.Kc=function(){return new rH(this)};_.c=0;_.d=0;B(492);function rH(a){this.d=a;this.b=this.d.a.entries();this.a=this.b.next()}r(218,1,{},rH);_.Wc=function(){return this.c=this.a,this.a=this.b.next(),new tI(this.d,this.c,this.d.d)};_.Vc=function(){return!this.a.done};_.Xc=function(){jH(this.d,this.c.value[0])};B(218);
function CH(a){return a.a.d!=a.c?a.a.a.get(a.b.value[0]):a.b.value[1]}function tI(a,b,c){this.a=a;this.b=b;this.c=c}r(493,676,{53:1},tI);_.If=function(){return this.b.value[0]};_.Jf=function(){return CH(this)};_.Kf=function(a){return hH(this.a,this.b.value[0],a)};_.c=0;B(493);function eC(a,b,c){var d;if(d=Q(a.c,b))return b=zH(d,c),a.a&&(uI(d),vI(d)),b;d=new wI(a,b,c);el(a.c,b,d);vI(d);return null}function dC(){ns(this);this.b=new xI(this);this.c=new Ag;this.b.b=this.b;this.b.a=this.b}
r(133,22,Wa,dC);_.tf=function(){ns(this.c);this.b.b=this.b;this.b.a=this.b};_.nf=function(a){return rp(this.c,a)};_.of=function(a){var b;for(b=this.b.a;b!=this.b;){if(vH(b.e,a))return!0;b=b.a}return!1};_.pf=function(){return new yI(this)};_.qf=function(a){return(a=Q(this.c,a))?(this.a&&(uI(a),vI(a)),a.e):null};_.rf=function(a,b){return eC(this,a,b)};_.sf=function(a){(a=dl(this.c,a))?(uI(a),a=a.e):a=null;return a};_.ld=function(){return ks(this.c)};_.a=!1;B(133);
function vI(a){var b;b=a.c.b.b;a.b=b;a.a=a.c.b;b.a=a.c.b.b=a}function uI(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null}function xI(a){wI.call(this,a,null,null)}function wI(a,b,c){this.c=a;this.d=b;this.e=c}r(134,73,{72:1,73:1,134:1,53:1},xI,wI);B(134);function yI(a){this.a=a}r(633,671,Sa,yI);_.hf=function(a){return A(a,53)?YG(this.a,a):!1};_.Kc=function(){return new zI(this)};_.ld=function(){return ks(this.a.c)};B(633);function zI(a){this.c=a;this.b=a.a.b.a;tH(a.a.c,this)}r(634,1,{},zI);
_.Wc=function(){return sH(this.c.a.c,this),od(this.b!=this.c.a.b),this.a=this.b,this.b=this.b.a,this.a};_.Vc=function(){return this.b!=this.c.a.b};_.Xc=function(){ud(!!this.a);sH(this.c.a.c,this);uI(this.a);dl(this.c.a.c,this.a.d);tH(this.c.a.c,this);this.a=null};B(634);function jx(){this.a=new dC}function kx(a){this.a=new dC;mx(this,a)}r(77,37,Xa,jx,kx);B(77);function Sz(a,b,c,d){var e;e=new AI;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b}function Ix(a){od(0!=a.b);return a.a.a.c}
function Jx(a){od(0!=a.b);return a.c.b.c}function xz(a,b){var c,d;sd(b,a.b);if(b>=a.b>>1)for(d=a.c,c=a.b;c>b;--c)d=d.b;else for(d=a.a.a,c=0;c<b;++c)d=d.a;return new BI(a,b,d)}function zy(a){a.a.a=a.c;a.c.b=a.a;a.a.b=a.c.a=null;a.b=0}function Mz(){this.a=new AI;this.c=new AI;zy(this)}r(542,686,{3:1,61:1},Mz);_.xf=function(a){Sz(this,a,this.c.b,this.c);return!0};_.Bf=function(a){return xz(this,a)};_.ld=jF;_.b=0;B(542);function GH(a,b){Sz(a.d,b,a.b.b,a.b);++a.a;a.c=null}
function yz(a){od(a.b!=a.d.c);a.c=a.b;a.b=a.b.a;++a.a;return a.c.c}function Kz(a){od(a.b.b!=a.d.a);a.c=a.b=a.b.b;--a.a;return a.c.c}function Lz(a){var b;ud(!!a.c);b=a.c.a;var c=a.d,d=a.c;d.a.b=d.b;d.b.a=d.a;d.a=d.b=null;d.c=null;--c.b;a.b==a.c?a.b=b:--a.a;a.c=null}function BI(a,b,c){this.d=a;this.b=c;this.a=b}r(543,1,{},BI);_.Vc=function(){return this.b!=this.d.c};_.Gf=function(){return this.b.b!=this.d.a};_.Wc=function(){return yz(this)};_.Hf=function(){return Kz(this)};_.Xc=function(){Lz(this)};
_.a=0;_.c=null;B(543);function AI(){}r(166,1,{},AI);B(166);function MF(){MF=k;NF=new CI;OF=new DI}r(667,1,{});var NF,OF;B(667);r(347,667,{},function(){});_.eb=function(){return""};B(347);function CI(){}r(348,667,{},CI);_.eb=function(){return"en"};B(348);r(349,667,{},function(){});_.eb=function(){return"en_US"};B(349);function DI(){}r(350,667,{},DI);_.eb=function(){return"unknown"};B(350);function pd(){Fb();Tb.call(this)}r(52,10,{3:1,13:1,10:1,11:1,52:1},pd);B(52);
function vH(a,b){return sb(a)===sb(b)||null!=a&&mb(a,b)}function AH(a){return null!=a?kb(a):0}function TG(a,b){a.a?yd(a.a,a.b):a.a=new hl(a.d);yd(a.a,b)}function SG(a,b){rd(", ","delimiter");rd(a,"prefix");rd(b,"suffix");this.b=", ";this.d=a;this.e=b;this.c=this.d+(""+this.e)}r(207,1,{},SG);_.eb=function(){return this.a?0==Rb(this.e).length?this.a.a:this.a.a+(""+this.e):this.c};B(207);function EI(a,b){var c,d;for(d=a.b;d;){c=RB(b,d.d);if(0==c)return d;c=0>c?0:1;d=d.a[c]}return null}
function yA(a){var b;if(!a.b)return null;for(b=a.b;a=b.a[0];)b=a;return b}function xA(a,b,c){var d,e;d=null;for(e=a.b;e;){a=RB(b,e.d);if(c&&0==a)return e;0<=a?e=e.a[1]:(d=e,e=e.a[0])}return d}function FI(a,b,c,d,e,f,g,l){var m;d&&((m=d.a[0])&&FI(a,b,c,m,e,f,g,l),GI(c,d.d,e,f,g,l)&&b.xf(d),(d=d.a[1])&&FI(a,b,c,d,e,f,g,l))}function GI(a,b,c,d,e,f){var g,l;return a.Nf()&&(l=RB(b,c),0>l||!d&&0==l)||a.Of()&&(g=RB(b,e),0<g||!f&&0==g)?!1:!0}
function HI(a,b,c,d){var e;if(b){e=RB(c.d,b.d);if(0==e)return d.d=zH(b,c.e),d.b=!0,b;e=0>e?0:1;b.a[e]=HI(a,b.a[e],c,d);II(b.a[e])&&(II(b.a[1-e])?(b.b=!0,b.a[0].b=!1,b.a[1].b=!1):II(b.a[e].a[e])?b=JI(b,1-e):II(b.a[e].a[1-e])&&(b=KI(b,1-e)))}else return c;return b}function II(a){return!!a&&a.b}function HA(a,b,c){b=new LI(b,c);c=new MI;a.b=HI(a,a.b,b,c);c.b||++a.c;a.b.b=!1;return c.d}function PA(a,b){var c;c=new MI;NI(a,b,c);return c.d}
function NI(a,b,c){var d,e,f,g,l,m,n,p,u;if(a.b){p=f=null;l=new LI(null,null);e=1;l.a[1]=a.b;for(n=l;n.a[e];)(m=e,g=p,p=n,n=n.a[e],d=RB(b,n.d),e=0>d?0:1,0!=d||c.c&&!vH(n.e,c.d)||(f=n),n&&n.b||II(n.a[e]))||(II(n.a[1-e])?p=p.a[m]=JI(n,e):!II(n.a[1-e])&&(u=p.a[1-m])&&(II(u.a[1-m])||II(u.a[m])?(d=g.a[1]==p?1:0,II(u.a[m])?g.a[d]=KI(p,m):II(u.a[1-m])&&(g.a[d]=JI(p,m)),n.b=g.a[d].b=!0,g.a[d].a[0].b=!1,g.a[d].a[1].b=!1):(p.b=!1,u.b=!0,n.b=!0)));if(f){c.b=!0;c.d=f.e;if(n!=f){b=new LI(n.d,n.e);c=f;g=l;for(e=
null==g.d||0<RB(c.d,g.d)?1:0;g.a[e]!=c;)g=g.a[e],e=0<RB(c.d,g.d)?1:0;g.a[e]=b;b.b=c.b;b.a[0]=c.a[0];b.a[1]=c.a[1];c.a[0]=null;c.a[1]=null;p==f&&(p=b)}p.a[p.a[1]==n?1:0]=n.a[n.a[0]?0:1];--a.c}a.b=l.a[1];a.b&&(a.b.b=!1)}}function KI(a,b){var c;c=1-b;a.a[c]=JI(a.a[c],c);return JI(a,b)}function JI(a,b){var c,d;c=1-b;d=a.a[c];a.a[c]=d.a[b];d.a[b]=a;a.b=!0;d.b=!1;return d}function KA(a,b,c){return new tA(a,(uA(),OI),b,c,null)}function MA(){var a=null;this.b=null;!a&&(a=(OE(),OE(),PE));this.a=a}
r(168,690,Wa,MA);_.Lf=function(){return new PI(this)};_.pf=function(){return new mI(this)};_.Mf=function(a){return EI(this,a)};_.rf=function(a,b){return HA(this,a,b)};_.sf=function(a){return PA(this,a)};_.ld=qk;_.c=0;B(168);function EA(a){uH(a.a);var b=a.c,c=a.b,d;d=new MI;d.c=!0;d.d=c.Jf();NI(b,c.If(),d);a.b=null}function PI(a){QI.call(this,a,(uA(),RI),null,!1,null,!1)}function QI(a,b,c,d,e,f){var g;this.c=a;g=new Sd;FI(a,g,b,a.b,c,d,e,f);this.a=new Jz(g,0)}r(130,1,{},PI,QI);
_.Wc=function(){return this.b=DA(this.a)};_.Vc=function(){return CA(this.a)};_.Xc=function(){EA(this)};B(130);function mI(a){this.b=a}r(233,169,Sa,mI);B(233);function LI(a,b){this.d=a;this.e=b;this.a=Ib(SI,h,88,2,0);this.b=!0}r(88,73,{72:1,73:1,53:1,88:1},LI);_.b=!1;var SI=B(88);function MI(){}r(170,1,{},MI);_.eb=function(){return"State: mv\x3d"+this.c+" value\x3d"+this.d+" done\x3d"+this.a+" found\x3d"+this.b};_.a=!1;_.b=!1;_.c=!1;B(170);function zA(a,b){return GI(a.f,b,a.b,a.a,a.e,a.d)}
function TI(a){var b;return a.f.Nf()?a.a?b=xA(a.c,a.b,!0):b=xA(a.c,a.b,!1):b=yA(a.c),!(b&&zA(a,b.d)&&b)}function tA(a,b,c,d,e){this.c=a;switch(b.g){case 2:if(0>RB(e,c))throw(new E("subMap: "+e+" less than "+c)).backingJsObject;break;case 1:RB(e,e);break;case 3:RB(c,c)}this.f=b;this.b=c;this.a=d;this.e=e;this.d=!1}r(171,690,Ra,tA);_.Lf=function(){return new QI(this.c,this.f,this.b,this.a,this.e,this.d)};_.pf=function(){return new BA(this,this)};
_.Mf=function(a){return(a=EI(this.c,a))&&zA(this,a.d)?a:null};_.jf=function(){return TI(this)};_.rf=function(a,b){if(!GI(this.f,a,this.b,this.a,this.e,this.d))throw(new E(a+" outside the range "+this.b+" to "+this.e)).backingJsObject;return HA(this.c,a,b)};_.sf=function(a){return GI(this.f,a,this.b,this.a,this.e,this.d)?PA(this.c,a):null};_.ld=function(){var a,b;a=0;for(b=new QI(this.c,this.f,this.b,this.a,this.e,this.d);CA(b.a);b.b=DA(b.a))++a;return a};_.a=!1;_.d=!1;B(171);
function BA(a,b){this.a=a;this.b=b}r(234,169,Sa,BA);_.jf=function(){return TI(this.a)};B(234);function uA(){uA=k;RI=new UI("All",0);vA=new VI;wA=new WI;OI=new XI}function UI(a,b){N.call(this,a,b)}r(60,5,Ya,UI);_.Nf=zl;_.Of=zl;var RI,vA,wA,OI,YI=D(60,function(){uA();return z(v(YI,1),h,60,0,[RI,vA,wA,OI])});function VI(){N.call(this,"Head",1)}r(550,60,Ya,VI);_.Of=Al;D(550,null);function WI(){N.call(this,"Range",2)}r(551,60,Ya,WI);_.Nf=Al;_.Of=Al;D(551,null);function XI(){N.call(this,"Tail",3)}
r(552,60,Ya,XI);_.Nf=Al;D(552,null);r(33,1,{},function(){});B(33);var Jb=B(null),ZI=wc(),Vz=xc("D"),md=xc("C");gc();_=db("java.lang.Boolean");_.$create__boolean=function(a){gc();return a};_.$create__java_lang_String=function(a){gc();return Xc("true",a)};_.$isInstance=function(a){gc();return"boolean"===typeof a};_=db("java.lang.Double");_.$create__double=function(a){return a};_.$create__java_lang_String=function(a){return yc(a)};_.$isInstance=function(a){return"number"===typeof a};_=db("java.lang.Number");
_.$isInstance=function(a){return"number"===typeof a||a instanceof Number};y();_=db("java.lang.String");_.$create=function(){y();return""};_.$create__arrayOf_byte=function(a){y();return Lc(a,0,a.length,(cd(),fd))};_.$create__arrayOf_byte__int__int=function(a,b,c){y();return Lc(a,b,c,(cd(),fd))};_.$create__arrayOf_byte__int__int__java_lang_String=function(a,b,c,d){y();return Lc(a,b,c,Zc(d))};_.$create__arrayOf_byte__int__int__java_nio_charset_Charset=Lc;
_.$create__arrayOf_byte__java_lang_String=function(a,b){y();return Lc(a,0,a.length,Zc(b))};_.$create__arrayOf_byte__java_nio_charset_Charset=function(a,b){y();return Lc(a,0,a.length,Zc(b.a))};_.$create__arrayOf_char=function(a){y();return Mc(a,0,a.length)};_.$create__arrayOf_char__int__int=function(a,b,c){y();return Mc(a,b,c)};_.$create__arrayOf_int__int__int=function(a,b,c){y();var d,e;e=Ib(md,ea,182,2*c,15);for(d=0;0<c--;)d+=mc(a[b++],e,d);return Mc(e,0,d)};
_.$create__java_lang_String=function(a){y();return a};_.$create__java_lang_StringBuffer=function(a){y();return a?a.a:"null"};_.$create__java_lang_StringBuilder=function(a){y();return a?a.a:"null"};_.$isInstance=function(a){y();return"string"===typeof a};_=db("vaadin.elements._api.GridDataSource",VF);_.extractDataItem=HF;_=db("vaadin.elements._api.GridStaticSection",iF);_=db("vaadin.elements._api.JSColumn",EF);_.promote=function(a){return ZD(a)};_=db("vaadin.elements.grid.GridElement",cF);
var Qd=(Dg(),function(a){Dg();return function(){var b;a:{var c=arguments,d;0!=Gg&&(d=Gd(),2E3<d-Ig&&(Ig=d,Hg=$wnd.setTimeout(Fg,10)));if(0==Gg++){d=(Jg(),Kg);var e,f;if(d.b){f=null;do e=d.b,d.b=null,f=Tg(e,f);while(d.b);d.b=f}d=!0}else d=!1;try{b=a.apply(this,c);break a}finally{if(c=d)if(d=(Jg(),Kg),d.c){f=null;do e=d.c,d.c=null,f=Tg(e,f);while(d.c);d.c=f}--Gg;c&&-1!=Hg&&($wnd.clearTimeout(Hg),Hg=-1)}b=void 0}return b}}),gwtOnLoad=gwtOnLoad=function(a,b,c,d){function e(){for(var a=0;a<f.length;a++)f[a]()}
null==ab&&(ab=[]);var f=ab;$moduleName=b;$moduleBase=c;bb=d;if(a)try{Qd(e)()}catch(g){a(b,g)}else Qd(e)()};(function(){null==ab&&(ab=[]);for(var a=ab,b=0;b<arguments.length;b++)a.push(arguments[b])})(function(){$wnd.setTimeout(Qd(zs));var a,b,c;b=$doc.compatMode;a=z(Zb(tb),h,2,6,["CSS1Compat"]);for(c=0;c<a.length&&a[c]!==b;c++);wl();Mg((Jg(),Kg),new yF);delete $wnd.vaadin.elements._api});var $I=[[["locale","default"],["user.agent","gecko1_8"]],[["locale","default"],["user.agent","safari"]]];
"object"===typeof window&&"object"===typeof window.$gwt&&(window.$gwt.permProps=$I);function Ic(){return this.a}function Db(a){return this===a}function Eb(){return zb(this)}function zl(){return!1}function Al(){return!0}function Bl(){return"Browser: webkit\x3d"+this.g+" mozilla\x3d"+this.d+" opera\x3d"+this.f+" msie\x3d"+this.e+" ie6\x3d"+this.a+" ie8\x3d"+this.b+" ie9\x3d"+this.c}function fo(){if(this.a){var a=v(H,1),b;b=El(this);b=ao([this.a(b)]);this.e=z(a,h,1,5,[b])}}
function id(){return xb(this.a)}function Kq(){}function Lq(){Hq(this)}function $m(){return!1}function Ut(){}function ou(){}function Gu(a){a.style.transform=""}function gk(){return this.g}function sv(){return Oh(this.n.style)}function rv(){return Qh(this.n.style)}function Xp(){null.Tf()}function yw(){ew()}function ox(){return null}function Pz(){return"td"}function px(){return!1}function dz(){return this.p}function HC(){qq();oc(MB);oc(ZI)}function jD(){return-1}
function Mq(a){-1==this.Z?wp((R(),this.ab),a|(this.ab.__eventBits||0)):this.Z|=a}function qk(){return this.c}function cz(){return this.i}function nx(){return this.k}function LB(){return this.v}function jw(){return this.a.c}function jF(){return this.b}function kF(){return this.d}function vs(a){return a}function dG(){return[]}function iD(){return 0}function Qb(){return this.f}function lG(){this.e=-1}function VG(){return 0==this.ld()}function UG(a){return Tz(this,a,!1)}
function XG(a){return QG(this,a)}function WG(){return this.lf(Ib(H,h,1,this.ld(),5))}function wH(){uH(this)}function oH(){return this.a.ld()}function xH(){return this.a.Vc()}function yH(){this.a.Xc()}function IH(){return this.a.length}function OH(){return fl(),PH(),QH}function SH(){throw(new pd).backingJsObject;}function bw(){return null}function FH(){return this.b.ld()}function UH(a){return this.b.hf(a)}function WH(){return new iu(this.b.Kc())}function XH(){return this.b.kf()}
function YH(a){return this.b.lf(a)}function ZH(){return this.b.Vc()}function $H(){return this.b.Wc()}function aI(){TH()}function eI(){throw(new PG).backingJsObject;}function BH(){throw(new PG).backingJsObject;}function VH(){return this.b.jf()}function Bq(){throw(new PG).backingJsObject;}function bI(a){return this.a.bb(a)}function cI(){return this.a.db()};window.gwtOnLoad=gwtOnLoad;if (VaadinGridImport) VaadinGridImport.onScriptLoad(gwtOnLoad);})();
// vaadin.elements.grid.hash = '94d43213f71a2d509b0953afb4dd1622c8c4686e';
<!--
@license
Copyright (c) 2015 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
--><!--
@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
--><link rel="import" href="polymer-mini.html">
<script>Polymer.nar = [];
Polymer.Annotations = {
parseAnnotations: function (template) {
var list = [];
var content = template._content || template.content;
this._parseNodeAnnotations(content, list, template.hasAttribute('strip-whitespace'));
return list;
},
_parseNodeAnnotations: function (node, list, stripWhiteSpace) {
return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list, stripWhiteSpace);
},
_bindingRegex: function () {
var IDENT = '(?:' + '[a-zA-Z_$][\\w.:$\\-*]*' + ')';
var NUMBER = '(?:' + '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')';
var SQUOTE_STRING = '(?:' + '\'(?:[^\'\\\\]|\\\\.)*\'' + ')';
var DQUOTE_STRING = '(?:' + '"(?:[^"\\\\]|\\\\.)*"' + ')';
var STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')';
var ARGUMENT = '(?:' + IDENT + '|' + NUMBER + '|' + STRING + '\\s*' + ')';
var ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\s*' + ARGUMENT + ')*' + ')';
var ARGUMENT_LIST = '(?:' + '\\(\\s*' + '(?:' + ARGUMENTS + '?' + ')' + '\\)\\s*' + ')';
var BINDING = '(' + IDENT + '\\s*' + ARGUMENT_LIST + '?' + ')';
var OPEN_BRACKET = '(\\[\\[|{{)' + '\\s*';
var CLOSE_BRACKET = '(?:]]|}})';
var NEGATE = '(?:(!)\\s*)?';
var EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET;
return new RegExp(EXPRESSION, 'g');
}(),
_parseBindings: function (text) {
var re = this._bindingRegex;
var parts = [];
var lastIndex = 0;
var m;
while ((m = re.exec(text)) !== null) {
if (m.index > lastIndex) {
parts.push({ literal: text.slice(lastIndex, m.index) });
}
var mode = m[1][0];
var negate = Boolean(m[2]);
var value = m[3].trim();
var customEvent, notifyEvent, colon;
if (mode == '{' && (colon = value.indexOf('::')) > 0) {
notifyEvent = value.substring(colon + 2);
value = value.substring(0, colon);
customEvent = true;
}
parts.push({
compoundIndex: parts.length,
value: value,
mode: mode,
negate: negate,
event: notifyEvent,
customEvent: customEvent
});
lastIndex = re.lastIndex;
}
if (lastIndex && lastIndex < text.length) {
var literal = text.substring(lastIndex);
if (literal) {
parts.push({ literal: literal });
}
}
if (parts.length) {
return parts;
}
},
_literalFromParts: function (parts) {
var s = '';
for (var i = 0; i < parts.length; i++) {
var literal = parts[i].literal;
s += literal || '';
}
return s;
},
_parseTextNodeAnnotation: function (node, list) {
var parts = this._parseBindings(node.textContent);
if (parts) {
node.textContent = this._literalFromParts(parts) || ' ';
var annote = {
bindings: [{
kind: 'text',
name: 'textContent',
parts: parts,
isCompound: parts.length !== 1
}]
};
list.push(annote);
return annote;
}
},
_parseElementAnnotations: function (element, list, stripWhiteSpace) {
var annote = {
bindings: [],
events: []
};
if (element.localName === 'content') {
list._hasContent = true;
}
this._parseChildNodesAnnotations(element, annote, list, stripWhiteSpace);
if (element.attributes) {
this._parseNodeAttributeAnnotations(element, annote, list);
if (this.prepElement) {
this.prepElement(element);
}
}
if (annote.bindings.length || annote.events.length || annote.id) {
list.push(annote);
}
return annote;
},
_parseChildNodesAnnotations: function (root, annote, list, stripWhiteSpace) {
if (root.firstChild) {
var node = root.firstChild;
var i = 0;
while (node) {
var next = node.nextSibling;
if (node.localName === 'template' && !node.hasAttribute('preserve-content')) {
this._parseTemplate(node, i, list, annote);
}
if (node.nodeType === Node.TEXT_NODE) {
var n = next;
while (n && n.nodeType === Node.TEXT_NODE) {
node.textContent += n.textContent;
next = n.nextSibling;
root.removeChild(n);
n = next;
}
if (stripWhiteSpace && !node.textContent.trim()) {
root.removeChild(node);
i--;
}
}
if (node.parentNode) {
var childAnnotation = this._parseNodeAnnotations(node, list, stripWhiteSpace);
if (childAnnotation) {
childAnnotation.parent = annote;
childAnnotation.index = i;
}
}
node = next;
i++;
}
}
},
_parseTemplate: function (node, index, list, parent) {
var content = document.createDocumentFragment();
content._notes = this.parseAnnotations(node);
content.appendChild(node.content);
list.push({
bindings: Polymer.nar,
events: Polymer.nar,
templateContent: content,
parent: parent,
index: index
});
},
_parseNodeAttributeAnnotations: function (node, annotation) {
var attrs = Array.prototype.slice.call(node.attributes);
for (var i = attrs.length - 1, a; a = attrs[i]; i--) {
var n = a.name;
var v = a.value;
var b;
if (n.slice(0, 3) === 'on-') {
node.removeAttribute(n);
annotation.events.push({
name: n.slice(3),
value: v
});
} else if (b = this._parseNodeAttributeAnnotation(node, n, v)) {
annotation.bindings.push(b);
} else if (n === 'id') {
annotation.id = v;
}
}
},
_parseNodeAttributeAnnotation: function (node, name, value) {
var parts = this._parseBindings(value);
if (parts) {
var origName = name;
var kind = 'property';
if (name[name.length - 1] == '$') {
name = name.slice(0, -1);
kind = 'attribute';
}
var literal = this._literalFromParts(parts);
if (literal && kind == 'attribute') {
node.setAttribute(name, literal);
}
if (node.localName === 'input' && origName === 'value') {
node.setAttribute(origName, '');
}
node.removeAttribute(origName);
var propertyName = Polymer.CaseMap.dashToCamelCase(name);
if (kind === 'property') {
name = propertyName;
}
return {
kind: kind,
name: name,
propertyName: propertyName,
parts: parts,
literal: literal,
isCompound: parts.length !== 1
};
}
},
findAnnotatedNode: function (root, annote) {
var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent);
if (parent) {
for (var n = parent.firstChild, i = 0; n; n = n.nextSibling) {
if (annote.index === i++) {
return n;
}
}
} else {
return root;
}
}
};
(function () {
function resolveCss(cssText, ownerDocument) {
return cssText.replace(CSS_URL_RX, function (m, pre, url, post) {
return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post;
});
}
function resolveAttrs(element, ownerDocument) {
for (var name in URL_ATTRS) {
var a$ = URL_ATTRS[name];
for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) {
if (name === '*' || element.localName === name) {
at = element.attributes[a];
v = at && at.value;
if (v && v.search(BINDING_RX) < 0) {
at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument);
}
}
}
}
}
function resolve(url, ownerDocument) {
if (url && url[0] === '#') {
return url;
}
var resolver = getUrlResolver(ownerDocument);
resolver.href = url;
return resolver.href || url;
}
var tempDoc;
var tempDocBase;
function resolveUrl(url, baseUri) {
if (!tempDoc) {
tempDoc = document.implementation.createHTMLDocument('temp');
tempDocBase = tempDoc.createElement('base');
tempDoc.head.appendChild(tempDocBase);
}
tempDocBase.href = baseUri;
return resolve(url, tempDoc);
}
function getUrlResolver(ownerDocument) {
return ownerDocument.__urlResolver || (ownerDocument.__urlResolver = ownerDocument.createElement('a'));
}
var CSS_URL_RX = /(url\()([^)]*)(\))/g;
var URL_ATTRS = {
'*': [
'href',
'src',
'style',
'url'
],
form: ['action']
};
var BINDING_RX = /\{\{|\[\[/;
Polymer.ResolveUrl = {
resolveCss: resolveCss,
resolveAttrs: resolveAttrs,
resolveUrl: resolveUrl
};
}());
Polymer.Base._addFeature({
_prepAnnotations: function () {
if (!this._template) {
this._notes = [];
} else {
var self = this;
Polymer.Annotations.prepElement = function (element) {
self._prepElement(element);
};
if (this._template._content && this._template._content._notes) {
this._notes = this._template._content._notes;
} else {
this._notes = Polymer.Annotations.parseAnnotations(this._template);
this._processAnnotations(this._notes);
}
Polymer.Annotations.prepElement = null;
}
},
_processAnnotations: function (notes) {
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
for (var j = 0; j < note.bindings.length; j++) {
var b = note.bindings[j];
for (var k = 0; k < b.parts.length; k++) {
var p = b.parts[k];
if (!p.literal) {
var signature = this._parseMethod(p.value);
if (signature) {
p.signature = signature;
} else {
p.model = this._modelForPath(p.value);
}
}
}
}
if (note.templateContent) {
this._processAnnotations(note.templateContent._notes);
var pp = note.templateContent._parentProps = this._discoverTemplateParentProps(note.templateContent._notes);
var bindings = [];
for (var prop in pp) {
bindings.push({
index: note.index,
kind: 'property',
name: '_parent_' + prop,
parts: [{
mode: '{',
model: prop,
value: prop
}]
});
}
note.bindings = note.bindings.concat(bindings);
}
}
},
_discoverTemplateParentProps: function (notes) {
var pp = {};
for (var i = 0, n; i < notes.length && (n = notes[i]); i++) {
for (var j = 0, b$ = n.bindings, b; j < b$.length && (b = b$[j]); j++) {
for (var k = 0, p$ = b.parts, p; k < p$.length && (p = p$[k]); k++) {
if (p.signature) {
var args = p.signature.args;
for (var kk = 0; kk < args.length; kk++) {
var model = args[kk].model;
if (model) {
pp[model] = true;
}
}
} else {
if (p.model) {
pp[p.model] = true;
}
}
}
}
if (n.templateContent) {
var tpp = n.templateContent._parentProps;
Polymer.Base.mixin(pp, tpp);
}
}
return pp;
},
_prepElement: function (element) {
Polymer.ResolveUrl.resolveAttrs(element, this._template.ownerDocument);
},
_findAnnotatedNode: Polymer.Annotations.findAnnotatedNode,
_marshalAnnotationReferences: function () {
if (this._template) {
this._marshalIdNodes();
this._marshalAnnotatedNodes();
this._marshalAnnotatedListeners();
}
},
_configureAnnotationReferences: function () {
var notes = this._notes;
var nodes = this._nodes;
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
var node = nodes[i];
this._configureTemplateContent(note, node);
this._configureCompoundBindings(note, node);
}
},
_configureTemplateContent: function (note, node) {
if (note.templateContent) {
node._content = note.templateContent;
}
},
_configureCompoundBindings: function (note, node) {
var bindings = note.bindings;
for (var i = 0; i < bindings.length; i++) {
var binding = bindings[i];
if (binding.isCompound) {
var storage = node.__compoundStorage__ || (node.__compoundStorage__ = {});
var parts = binding.parts;
var literals = new Array(parts.length);
for (var j = 0; j < parts.length; j++) {
literals[j] = parts[j].literal;
}
var name = binding.name;
storage[name] = literals;
if (binding.literal && binding.kind == 'property') {
if (node._configValue) {
node._configValue(name, binding.literal);
} else {
node[name] = binding.literal;
}
}
}
}
},
_marshalIdNodes: function () {
this.$ = {};
for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {
if (a.id) {
this.$[a.id] = this._findAnnotatedNode(this.root, a);
}
}
},
_marshalAnnotatedNodes: function () {
if (this._notes && this._notes.length) {
var r = new Array(this._notes.length);
for (var i = 0; i < this._notes.length; i++) {
r[i] = this._findAnnotatedNode(this.root, this._notes[i]);
}
this._nodes = r;
}
},
_marshalAnnotatedListeners: function () {
for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {
if (a.events && a.events.length) {
var node = this._findAnnotatedNode(this.root, a);
for (var j = 0, e$ = a.events, e; j < e$.length && (e = e$[j]); j++) {
this.listen(node, e.name, e.value);
}
}
}
}
});
Polymer.Base._addFeature({
listeners: {},
_listenListeners: function (listeners) {
var node, name, eventName;
for (eventName in listeners) {
if (eventName.indexOf('.') < 0) {
node = this;
name = eventName;
} else {
name = eventName.split('.');
node = this.$[name[0]];
name = name[1];
}
this.listen(node, name, listeners[eventName]);
}
},
listen: function (node, eventName, methodName) {
var handler = this._recallEventHandler(this, eventName, node, methodName);
if (!handler) {
handler = this._createEventHandler(node, eventName, methodName);
}
if (handler._listening) {
return;
}
this._listen(node, eventName, handler);
handler._listening = true;
},
_boundListenerKey: function (eventName, methodName) {
return eventName + ':' + methodName;
},
_recordEventHandler: function (host, eventName, target, methodName, handler) {
var hbl = host.__boundListeners;
if (!hbl) {
hbl = host.__boundListeners = new WeakMap();
}
var bl = hbl.get(target);
if (!bl) {
bl = {};
hbl.set(target, bl);
}
var key = this._boundListenerKey(eventName, methodName);
bl[key] = handler;
},
_recallEventHandler: function (host, eventName, target, methodName) {
var hbl = host.__boundListeners;
if (!hbl) {
return;
}
var bl = hbl.get(target);
if (!bl) {
return;
}
var key = this._boundListenerKey(eventName, methodName);
return bl[key];
},
_createEventHandler: function (node, eventName, methodName) {
var host = this;
var handler = function (e) {
if (host[methodName]) {
host[methodName](e, e.detail);
} else {
host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined'));
}
};
handler._listening = false;
this._recordEventHandler(host, eventName, node, methodName, handler);
return handler;
},
unlisten: function (node, eventName, methodName) {
var handler = this._recallEventHandler(this, eventName, node, methodName);
if (handler) {
this._unlisten(node, eventName, handler);
handler._listening = false;
}
},
_listen: function (node, eventName, handler) {
node.addEventListener(eventName, handler);
},
_unlisten: function (node, eventName, handler) {
node.removeEventListener(eventName, handler);
}
});
(function () {
'use strict';
var wrap = Polymer.DomApi.wrap;
var HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';
var GESTURE_KEY = '__polymerGestures';
var HANDLED_OBJ = '__polymerGesturesHandled';
var TOUCH_ACTION = '__polymerGesturesTouchAction';
var TAP_DISTANCE = 25;
var TRACK_DISTANCE = 5;
var TRACK_LENGTH = 2;
var MOUSE_TIMEOUT = 2500;
var MOUSE_EVENTS = [
'mousedown',
'mousemove',
'mouseup',
'click'
];
var MOUSE_WHICH_TO_BUTTONS = [
0,
1,
4,
2
];
var MOUSE_HAS_BUTTONS = function () {
try {
return new MouseEvent('test', { buttons: 1 }).buttons === 1;
} catch (e) {
return false;
}
}();
var IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);
var mouseCanceller = function (mouseEvent) {
mouseEvent[HANDLED_OBJ] = { skip: true };
if (mouseEvent.type === 'click') {
var path = Polymer.dom(mouseEvent).path;
for (var i = 0; i < path.length; i++) {
if (path[i] === POINTERSTATE.mouse.target) {
return;
}
}
mouseEvent.preventDefault();
mouseEvent.stopPropagation();
}
};
function setupTeardownMouseCanceller(setup) {
for (var i = 0, en; i < MOUSE_EVENTS.length; i++) {
en = MOUSE_EVENTS[i];
if (setup) {
document.addEventListener(en, mouseCanceller, true);
} else {
document.removeEventListener(en, mouseCanceller, true);
}
}
}
function ignoreMouse() {
if (IS_TOUCH_ONLY) {
return;
}
if (!POINTERSTATE.mouse.mouseIgnoreJob) {
setupTeardownMouseCanceller(true);
}
var unset = function () {
setupTeardownMouseCanceller();
POINTERSTATE.mouse.target = null;
POINTERSTATE.mouse.mouseIgnoreJob = null;
};
POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT);
}
function hasLeftMouseButton(ev) {
var type = ev.type;
if (MOUSE_EVENTS.indexOf(type) === -1) {
return false;
}
if (type === 'mousemove') {
var buttons = ev.buttons === undefined ? 1 : ev.buttons;
if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {
buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;
}
return Boolean(buttons & 1);
} else {
var button = ev.button === undefined ? 0 : ev.button;
return button === 0;
}
}
function isSyntheticClick(ev) {
if (ev.type === 'click') {
if (ev.detail === 0) {
return true;
}
var t = Gestures.findOriginalTarget(ev);
var bcr = t.getBoundingClientRect();
var x = ev.pageX, y = ev.pageY;
return !(x >= bcr.left && x <= bcr.right && (y >= bcr.top && y <= bcr.bottom));
}
return false;
}
var POINTERSTATE = {
mouse: {
target: null,
mouseIgnoreJob: null
},
touch: {
x: 0,
y: 0,
id: -1,
scrollDecided: false
}
};
function firstTouchAction(ev) {
var path = Polymer.dom(ev).path;
var ta = 'auto';
for (var i = 0, n; i < path.length; i++) {
n = path[i];
if (n[TOUCH_ACTION]) {
ta = n[TOUCH_ACTION];
break;
}
}
return ta;
}
function trackDocument(stateObj, movefn, upfn) {
stateObj.movefn = movefn;
stateObj.upfn = upfn;
document.addEventListener('mousemove', movefn);
document.addEventListener('mouseup', upfn);
}
function untrackDocument(stateObj) {
document.removeEventListener('mousemove', stateObj.movefn);
document.removeEventListener('mouseup', stateObj.upfn);
stateObj.movefn = null;
stateObj.upfn = null;
}
var Gestures = {
gestures: {},
recognizers: [],
deepTargetFind: function (x, y) {
var node = document.elementFromPoint(x, y);
var next = node;
while (next && next.shadowRoot) {
next = next.shadowRoot.elementFromPoint(x, y);
if (next) {
node = next;
}
}
return node;
},
findOriginalTarget: function (ev) {
if (ev.path) {
return ev.path[0];
}
return ev.target;
},
handleNative: function (ev) {
var handled;
var type = ev.type;
var node = wrap(ev.currentTarget);
var gobj = node[GESTURE_KEY];
if (!gobj) {
return;
}
var gs = gobj[type];
if (!gs) {
return;
}
if (!ev[HANDLED_OBJ]) {
ev[HANDLED_OBJ] = {};
if (type.slice(0, 5) === 'touch') {
var t = ev.changedTouches[0];
if (type === 'touchstart') {
if (ev.touches.length === 1) {
POINTERSTATE.touch.id = t.identifier;
}
}
if (POINTERSTATE.touch.id !== t.identifier) {
return;
}
if (!HAS_NATIVE_TA) {
if (type === 'touchstart' || type === 'touchmove') {
Gestures.handleTouchAction(ev);
}
}
if (type === 'touchend' && !ev.__polymerSimulatedTouch) {
POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget;
ignoreMouse(true);
}
}
}
handled = ev[HANDLED_OBJ];
if (handled.skip) {
return;
}
var recognizers = Gestures.recognizers;
for (var i = 0, r; i < recognizers.length; i++) {
r = recognizers[i];
if (gs[r.name] && !handled[r.name]) {
if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {
r.reset();
}
}
}
for (i = 0, r; i < recognizers.length; i++) {
r = recognizers[i];
if (gs[r.name] && !handled[r.name]) {
handled[r.name] = true;
r[type](ev);
}
}
},
handleTouchAction: function (ev) {
var t = ev.changedTouches[0];
var type = ev.type;
if (type === 'touchstart') {
POINTERSTATE.touch.x = t.clientX;
POINTERSTATE.touch.y = t.clientY;
POINTERSTATE.touch.scrollDecided = false;
} else if (type === 'touchmove') {
if (POINTERSTATE.touch.scrollDecided) {
return;
}
POINTERSTATE.touch.scrollDecided = true;
var ta = firstTouchAction(ev);
var prevent = false;
var dx = Math.abs(POINTERSTATE.touch.x - t.clientX);
var dy = Math.abs(POINTERSTATE.touch.y - t.clientY);
if (!ev.cancelable) {
} else if (ta === 'none') {
prevent = true;
} else if (ta === 'pan-x') {
prevent = dy > dx;
} else if (ta === 'pan-y') {
prevent = dx > dy;
}
if (prevent) {
ev.preventDefault();
} else {
Gestures.prevent('track');
}
}
},
add: function (node, evType, handler) {
node = wrap(node);
var recognizer = this.gestures[evType];
var deps = recognizer.deps;
var name = recognizer.name;
var gobj = node[GESTURE_KEY];
if (!gobj) {
node[GESTURE_KEY] = gobj = {};
}
for (var i = 0, dep, gd; i < deps.length; i++) {
dep = deps[i];
if (IS_TOUCH_ONLY && MOUSE_EVENTS.indexOf(dep) > -1) {
continue;
}
gd = gobj[dep];
if (!gd) {
gobj[dep] = gd = { _count: 0 };
}
if (gd._count === 0) {
node.addEventListener(dep, this.handleNative);
}
gd[name] = (gd[name] || 0) + 1;
gd._count = (gd._count || 0) + 1;
}
node.addEventListener(evType, handler);
if (recognizer.touchAction) {
this.setTouchAction(node, recognizer.touchAction);
}
},
remove: function (node, evType, handler) {
node = wrap(node);
var recognizer = this.gestures[evType];
var deps = recognizer.deps;
var name = recognizer.name;
var gobj = node[GESTURE_KEY];
if (gobj) {
for (var i = 0, dep, gd; i < deps.length; i++) {
dep = deps[i];
gd = gobj[dep];
if (gd && gd[name]) {
gd[name] = (gd[name] || 1) - 1;
gd._count = (gd._count || 1) - 1;
if (gd._count === 0) {
node.removeEventListener(dep, this.handleNative);
}
}
}
}
node.removeEventListener(evType, handler);
},
register: function (recog) {
this.recognizers.push(recog);
for (var i = 0; i < recog.emits.length; i++) {
this.gestures[recog.emits[i]] = recog;
}
},
findRecognizerByEvent: function (evName) {
for (var i = 0, r; i < this.recognizers.length; i++) {
r = this.recognizers[i];
for (var j = 0, n; j < r.emits.length; j++) {
n = r.emits[j];
if (n === evName) {
return r;
}
}
}
return null;
},
setTouchAction: function (node, value) {
if (HAS_NATIVE_TA) {
node.style.touchAction = value;
}
node[TOUCH_ACTION] = value;
},
fire: function (target, type, detail) {
var ev = Polymer.Base.fire(type, detail, {
node: target,
bubbles: true,
cancelable: true
});
if (ev.defaultPrevented) {
var se = detail.sourceEvent;
if (se && se.preventDefault) {
se.preventDefault();
}
}
},
prevent: function (evName) {
var recognizer = this.findRecognizerByEvent(evName);
if (recognizer.info) {
recognizer.info.prevent = true;
}
}
};
Gestures.register({
name: 'downup',
deps: [
'mousedown',
'touchstart',
'touchend'
],
flow: {
start: [
'mousedown',
'touchstart'
],
end: [
'mouseup',
'touchend'
]
},
emits: [
'down',
'up'
],
info: {
movefn: null,
upfn: null
},
reset: function () {
untrackDocument(this.info);
},
mousedown: function (e) {
if (!hasLeftMouseButton(e)) {
return;
}
var t = Gestures.findOriginalTarget(e);
var self = this;
var movefn = function movefn(e) {
if (!hasLeftMouseButton(e)) {
self.fire('up', t, e);
untrackDocument(self.info);
}
};
var upfn = function upfn(e) {
if (hasLeftMouseButton(e)) {
self.fire('up', t, e);
}
untrackDocument(self.info);
};
trackDocument(this.info, movefn, upfn);
this.fire('down', t, e);
},
touchstart: function (e) {
this.fire('down', Gestures.findOriginalTarget(e), e.changedTouches[0]);
},
touchend: function (e) {
this.fire('up', Gestures.findOriginalTarget(e), e.changedTouches[0]);
},
fire: function (type, target, event) {
Gestures.fire(target, type, {
x: event.clientX,
y: event.clientY,
sourceEvent: event,
prevent: function (e) {
return Gestures.prevent(e);
}
});
}
});
Gestures.register({
name: 'track',
touchAction: 'none',
deps: [
'mousedown',
'touchstart',
'touchmove',
'touchend'
],
flow: {
start: [
'mousedown',
'touchstart'
],
end: [
'mouseup',
'touchend'
]
},
emits: ['track'],
info: {
x: 0,
y: 0,
state: 'start',
started: false,
moves: [],
addMove: function (move) {
if (this.moves.length > TRACK_LENGTH) {
this.moves.shift();
}
this.moves.push(move);
},
movefn: null,
upfn: null,
prevent: false
},
reset: function () {
this.info.state = 'start';
this.info.started = false;
this.info.moves = [];
this.info.x = 0;
this.info.y = 0;
this.info.prevent = false;
untrackDocument(this.info);
},
hasMovedEnough: function (x, y) {
if (this.info.prevent) {
return false;
}
if (this.info.started) {
return true;
}
var dx = Math.abs(this.info.x - x);
var dy = Math.abs(this.info.y - y);
return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;
},
mousedown: function (e) {
if (!hasLeftMouseButton(e)) {
return;
}
var t = Gestures.findOriginalTarget(e);
var self = this;
var movefn = function movefn(e) {
var x = e.clientX, y = e.clientY;
if (self.hasMovedEnough(x, y)) {
self.info.state = self.info.started ? e.type === 'mouseup' ? 'end' : 'track' : 'start';
if (self.info.state === 'start') {
Gestures.prevent('tap');
}
self.info.addMove({
x: x,
y: y
});
if (!hasLeftMouseButton(e)) {
self.info.state = 'end';
untrackDocument(self.info);
}
self.fire(t, e);
self.info.started = true;
}
};
var upfn = function upfn(e) {
if (self.info.started) {
movefn(e);
}
untrackDocument(self.info);
};
trackDocument(this.info, movefn, upfn);
this.info.x = e.clientX;
this.info.y = e.clientY;
},
touchstart: function (e) {
var ct = e.changedTouches[0];
this.info.x = ct.clientX;
this.info.y = ct.clientY;
},
touchmove: function (e) {
var t = Gestures.findOriginalTarget(e);
var ct = e.changedTouches[0];
var x = ct.clientX, y = ct.clientY;
if (this.hasMovedEnough(x, y)) {
if (this.info.state === 'start') {
Gestures.prevent('tap');
}
this.info.addMove({
x: x,
y: y
});
this.fire(t, ct);
this.info.state = 'track';
this.info.started = true;
}
},
touchend: function (e) {
var t = Gestures.findOriginalTarget(e);
var ct = e.changedTouches[0];
if (this.info.started) {
this.info.state = 'end';
this.info.addMove({
x: ct.clientX,
y: ct.clientY
});
this.fire(t, ct);
}
},
fire: function (target, touch) {
var secondlast = this.info.moves[this.info.moves.length - 2];
var lastmove = this.info.moves[this.info.moves.length - 1];
var dx = lastmove.x - this.info.x;
var dy = lastmove.y - this.info.y;
var ddx, ddy = 0;
if (secondlast) {
ddx = lastmove.x - secondlast.x;
ddy = lastmove.y - secondlast.y;
}
return Gestures.fire(target, 'track', {
state: this.info.state,
x: touch.clientX,
y: touch.clientY,
dx: dx,
dy: dy,
ddx: ddx,
ddy: ddy,
sourceEvent: touch,
hover: function () {
return Gestures.deepTargetFind(touch.clientX, touch.clientY);
}
});
}
});
Gestures.register({
name: 'tap',
deps: [
'mousedown',
'click',
'touchstart',
'touchend'
],
flow: {
start: [
'mousedown',
'touchstart'
],
end: [
'click',
'touchend'
]
},
emits: ['tap'],
info: {
x: NaN,
y: NaN,
prevent: false
},
reset: function () {
this.info.x = NaN;
this.info.y = NaN;
this.info.prevent = false;
},
save: function (e) {
this.info.x = e.clientX;
this.info.y = e.clientY;
},
mousedown: function (e) {
if (hasLeftMouseButton(e)) {
this.save(e);
}
},
click: function (e) {
if (hasLeftMouseButton(e)) {
this.forward(e);
}
},
touchstart: function (e) {
this.save(e.changedTouches[0]);
},
touchend: function (e) {
this.forward(e.changedTouches[0]);
},
forward: function (e) {
var dx = Math.abs(e.clientX - this.info.x);
var dy = Math.abs(e.clientY - this.info.y);
var t = Gestures.findOriginalTarget(e);
if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE || isSyntheticClick(e)) {
if (!this.info.prevent) {
Gestures.fire(t, 'tap', {
x: e.clientX,
y: e.clientY,
sourceEvent: e
});
}
}
}
});
var DIRECTION_MAP = {
x: 'pan-x',
y: 'pan-y',
none: 'none',
all: 'auto'
};
Polymer.Base._addFeature({
_setupGestures: function () {
this.__polymerGestures = null;
},
_listen: function (node, eventName, handler) {
if (Gestures.gestures[eventName]) {
Gestures.add(node, eventName, handler);
} else {
node.addEventListener(eventName, handler);
}
},
_unlisten: function (node, eventName, handler) {
if (Gestures.gestures[eventName]) {
Gestures.remove(node, eventName, handler);
} else {
node.removeEventListener(eventName, handler);
}
},
setScrollDirection: function (direction, node) {
node = node || this;
Gestures.setTouchAction(node, DIRECTION_MAP[direction] || 'auto');
}
});
Polymer.Gestures = Gestures;
}());
Polymer.Base._addFeature({
$$: function (slctr) {
return Polymer.dom(this.root).querySelector(slctr);
},
toggleClass: function (name, bool, node) {
node = node || this;
if (arguments.length == 1) {
bool = !node.classList.contains(name);
}
if (bool) {
Polymer.dom(node).classList.add(name);
} else {
Polymer.dom(node).classList.remove(name);
}
},
toggleAttribute: function (name, bool, node) {
node = node || this;
if (arguments.length == 1) {
bool = !node.hasAttribute(name);
}
if (bool) {
Polymer.dom(node).setAttribute(name, '');
} else {
Polymer.dom(node).removeAttribute(name);
}
},
classFollows: function (name, toElement, fromElement) {
if (fromElement) {
Polymer.dom(fromElement).classList.remove(name);
}
if (toElement) {
Polymer.dom(toElement).classList.add(name);
}
},
attributeFollows: function (name, toElement, fromElement) {
if (fromElement) {
Polymer.dom(fromElement).removeAttribute(name);
}
if (toElement) {
Polymer.dom(toElement).setAttribute(name, '');
}
},
getEffectiveChildNodes: function () {
return Polymer.dom(this).getEffectiveChildNodes();
},
getEffectiveChildren: function () {
var list = Polymer.dom(this).getEffectiveChildNodes();
return list.filter(function (n) {
return n.nodeType === Node.ELEMENT_NODE;
});
},
getEffectiveTextContent: function () {
var cn = this.getEffectiveChildNodes();
var tc = [];
for (var i = 0, c; c = cn[i]; i++) {
if (c.nodeType !== Node.COMMENT_NODE) {
tc.push(Polymer.dom(c).textContent);
}
}
return tc.join('');
},
queryEffectiveChildren: function (slctr) {
var e$ = Polymer.dom(this).queryDistributedElements(slctr);
return e$ && e$[0];
},
queryAllEffectiveChildren: function (slctr) {
return Polymer.dom(this).queryDistributedElements(slctr);
},
getContentChildNodes: function (slctr) {
var content = Polymer.dom(this.root).querySelector(slctr || 'content');
return content ? Polymer.dom(content).getDistributedNodes() : [];
},
getContentChildren: function (slctr) {
return this.getContentChildNodes(slctr).filter(function (n) {
return n.nodeType === Node.ELEMENT_NODE;
});
},
fire: function (type, detail, options) {
options = options || Polymer.nob;
var node = options.node || this;
detail = detail === null || detail === undefined ? {} : detail;
var bubbles = options.bubbles === undefined ? true : options.bubbles;
var cancelable = Boolean(options.cancelable);
var useCache = options._useCache;
var event = this._getEvent(type, bubbles, cancelable, useCache);
event.detail = detail;
if (useCache) {
this.__eventCache[type] = null;
}
node.dispatchEvent(event);
if (useCache) {
this.__eventCache[type] = event;
}
return event;
},
__eventCache: {},
_getEvent: function (type, bubbles, cancelable, useCache) {
var event = useCache && this.__eventCache[type];
if (!event || (event.bubbles != bubbles || event.cancelable != cancelable)) {
event = new Event(type, {
bubbles: Boolean(bubbles),
cancelable: cancelable
});
}
return event;
},
async: function (callback, waitTime) {
var self = this;
return Polymer.Async.run(function () {
callback.call(self);
}, waitTime);
},
cancelAsync: function (handle) {
Polymer.Async.cancel(handle);
},
arrayDelete: function (path, item) {
var index;
if (Array.isArray(path)) {
index = path.indexOf(item);
if (index >= 0) {
return path.splice(index, 1);
}
} else {
var arr = this._get(path);
index = arr.indexOf(item);
if (index >= 0) {
return this.splice(path, index, 1);
}
}
},
transform: function (transform, node) {
node = node || this;
node.style.webkitTransform = transform;
node.style.transform = transform;
},
translate3d: function (x, y, z, node) {
node = node || this;
this.transform('translate3d(' + x + ',' + y + ',' + z + ')', node);
},
importHref: function (href, onload, onerror, optAsync) {
var l = document.createElement('link');
l.rel = 'import';
l.href = href;
optAsync = Boolean(optAsync);
if (optAsync) {
l.setAttribute('async', '');
}
var self = this;
if (onload) {
l.onload = function (e) {
return onload.call(self, e);
};
}
if (onerror) {
l.onerror = function (e) {
return onerror.call(self, e);
};
}
document.head.appendChild(l);
return l;
},
create: function (tag, props) {
var elt = document.createElement(tag);
if (props) {
for (var n in props) {
elt[n] = props[n];
}
}
return elt;
},
isLightDescendant: function (node) {
return this !== node && this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot();
},
isLocalDescendant: function (node) {
return this.root === Polymer.dom(node).getOwnerRoot();
}
});
Polymer.Bind = {
_dataEventCache: {},
prepareModel: function (model) {
Polymer.Base.mixin(model, this._modelApi);
},
_modelApi: {
_notifyChange: function (source, event, value) {
value = value === undefined ? this[source] : value;
event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';
this.fire(event, { value: value }, {
bubbles: false,
cancelable: false,
_useCache: true
});
},
_propertySetter: function (property, value, effects, fromAbove) {
var old = this.__data__[property];
if (old !== value && (old === old || value === value)) {
this.__data__[property] = value;
if (typeof value == 'object') {
this._clearPath(property);
}
if (this._propertyChanged) {
this._propertyChanged(property, value, old);
}
if (effects) {
this._effectEffects(property, value, effects, old, fromAbove);
}
}
return old;
},
__setProperty: function (property, value, quiet, node) {
node = node || this;
var effects = node._propertyEffects && node._propertyEffects[property];
if (effects) {
node._propertySetter(property, value, effects, quiet);
} else {
node[property] = value;
}
},
_effectEffects: function (property, value, effects, old, fromAbove) {
for (var i = 0, l = effects.length, fx; i < l && (fx = effects[i]); i++) {
fx.fn.call(this, property, value, fx.effect, old, fromAbove);
}
},
_clearPath: function (path) {
for (var prop in this.__data__) {
if (prop.indexOf(path + '.') === 0) {
this.__data__[prop] = undefined;
}
}
}
},
ensurePropertyEffects: function (model, property) {
if (!model._propertyEffects) {
model._propertyEffects = {};
}
var fx = model._propertyEffects[property];
if (!fx) {
fx = model._propertyEffects[property] = [];
}
return fx;
},
addPropertyEffect: function (model, property, kind, effect) {
var fx = this.ensurePropertyEffects(model, property);
var propEffect = {
kind: kind,
effect: effect,
fn: Polymer.Bind['_' + kind + 'Effect']
};
fx.push(propEffect);
return propEffect;
},
createBindings: function (model) {
var fx$ = model._propertyEffects;
if (fx$) {
for (var n in fx$) {
var fx = fx$[n];
fx.sort(this._sortPropertyEffects);
this._createAccessors(model, n, fx);
}
}
},
_sortPropertyEffects: function () {
var EFFECT_ORDER = {
'compute': 0,
'annotation': 1,
'annotatedComputation': 2,
'reflect': 3,
'notify': 4,
'observer': 5,
'complexObserver': 6,
'function': 7
};
return function (a, b) {
return EFFECT_ORDER[a.kind] - EFFECT_ORDER[b.kind];
};
}(),
_createAccessors: function (model, property, effects) {
var defun = {
get: function () {
return this.__data__[property];
}
};
var setter = function (value) {
this._propertySetter(property, value, effects);
};
var info = model.getPropertyInfo && model.getPropertyInfo(property);
if (info && info.readOnly) {
if (!info.computed) {
model['_set' + this.upper(property)] = setter;
}
} else {
defun.set = setter;
}
Object.defineProperty(model, property, defun);
},
upper: function (name) {
return name[0].toUpperCase() + name.substring(1);
},
_addAnnotatedListener: function (model, index, property, path, event, negated) {
if (!model._bindListeners) {
model._bindListeners = [];
}
var fn = this._notedListenerFactory(property, path, this._isStructured(path), negated);
var eventName = event || Polymer.CaseMap.camelToDashCase(property) + '-changed';
model._bindListeners.push({
index: index,
property: property,
path: path,
changedFn: fn,
event: eventName
});
},
_isStructured: function (path) {
return path.indexOf('.') > 0;
},
_isEventBogus: function (e, target) {
return e.path && e.path[0] !== target;
},
_notedListenerFactory: function (property, path, isStructured, negated) {
return function (target, value, targetPath) {
if (targetPath) {
this._notifyPath(this._fixPath(path, property, targetPath), value);
} else {
value = target[property];
if (negated) {
value = !value;
}
if (!isStructured) {
this[path] = value;
} else {
if (this.__data__[path] != value) {
this.set(path, value);
}
}
}
};
},
prepareInstance: function (inst) {
inst.__data__ = Object.create(null);
},
setupBindListeners: function (inst) {
var b$ = inst._bindListeners;
for (var i = 0, l = b$.length, info; i < l && (info = b$[i]); i++) {
var node = inst._nodes[info.index];
this._addNotifyListener(node, inst, info.event, info.changedFn);
}
},
_addNotifyListener: function (element, context, event, changedFn) {
element.addEventListener(event, function (e) {
return context._notifyListener(changedFn, e);
});
}
};
Polymer.Base.extend(Polymer.Bind, {
_shouldAddListener: function (effect) {
return effect.name && effect.kind != 'attribute' && effect.kind != 'text' && !effect.isCompound && effect.parts[0].mode === '{';
},
_annotationEffect: function (source, value, effect) {
if (source != effect.value) {
value = this._get(effect.value);
this.__data__[effect.value] = value;
}
var calc = effect.negate ? !value : value;
if (!effect.customEvent || this._nodes[effect.index][effect.name] !== calc) {
return this._applyEffectValue(effect, calc);
}
},
_reflectEffect: function (source, value, effect) {
this.reflectPropertyToAttribute(source, effect.attribute, value);
},
_notifyEffect: function (source, value, effect, old, fromAbove) {
if (!fromAbove) {
this._notifyChange(source, effect.event, value);
}
},
_functionEffect: function (source, value, fn, old, fromAbove) {
fn.call(this, source, value, old, fromAbove);
},
_observerEffect: function (source, value, effect, old) {
var fn = this[effect.method];
if (fn) {
fn.call(this, value, old);
} else {
this._warn(this._logf('_observerEffect', 'observer method `' + effect.method + '` not defined'));
}
},
_complexObserverEffect: function (source, value, effect) {
var fn = this[effect.method];
if (fn) {
var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
if (args) {
fn.apply(this, args);
}
} else if (effect.dynamicFn) {
} else {
this._warn(this._logf('_complexObserverEffect', 'observer method `' + effect.method + '` not defined'));
}
},
_computeEffect: function (source, value, effect) {
var fn = this[effect.method];
if (fn) {
var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
if (args) {
var computedvalue = fn.apply(this, args);
this.__setProperty(effect.name, computedvalue);
}
} else if (effect.dynamicFn) {
} else {
this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined'));
}
},
_annotatedComputationEffect: function (source, value, effect) {
var computedHost = this._rootDataHost || this;
var fn = computedHost[effect.method];
if (fn) {
var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
if (args) {
var computedvalue = fn.apply(computedHost, args);
if (effect.negate) {
computedvalue = !computedvalue;
}
this._applyEffectValue(effect, computedvalue);
}
} else if (effect.dynamicFn) {
} else {
computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined'));
}
},
_marshalArgs: function (model, effect, path, value) {
var values = [];
var args = effect.args;
var bailoutEarly = args.length > 1 || effect.dynamicFn;
for (var i = 0, l = args.length; i < l; i++) {
var arg = args[i];
var name = arg.name;
var v;
if (arg.literal) {
v = arg.value;
} else if (arg.structured) {
v = Polymer.Base._get(name, model);
} else {
v = model[name];
}
if (bailoutEarly && v === undefined) {
return;
}
if (arg.wildcard) {
var baseChanged = name.indexOf(path + '.') === 0;
var matches = effect.trigger.name.indexOf(name) === 0 && !baseChanged;
values[i] = {
path: matches ? path : name,
value: matches ? value : v,
base: v
};
} else {
values[i] = v;
}
}
return values;
}
});
Polymer.Base._addFeature({
_addPropertyEffect: function (property, kind, effect) {
var prop = Polymer.Bind.addPropertyEffect(this, property, kind, effect);
prop.pathFn = this['_' + prop.kind + 'PathEffect'];
},
_prepEffects: function () {
Polymer.Bind.prepareModel(this);
this._addAnnotationEffects(this._notes);
},
_prepBindings: function () {
Polymer.Bind.createBindings(this);
},
_addPropertyEffects: function (properties) {
if (properties) {
for (var p in properties) {
var prop = properties[p];
if (prop.observer) {
this._addObserverEffect(p, prop.observer);
}
if (prop.computed) {
prop.readOnly = true;
this._addComputedEffect(p, prop.computed);
}
if (prop.notify) {
this._addPropertyEffect(p, 'notify', { event: Polymer.CaseMap.camelToDashCase(p) + '-changed' });
}
if (prop.reflectToAttribute) {
var attr = Polymer.CaseMap.camelToDashCase(p);
if (attr[0] === '-') {
this._warn(this._logf('_addPropertyEffects', 'Property ' + p + ' cannot be reflected to attribute ' + attr + ' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'));
} else {
this._addPropertyEffect(p, 'reflect', { attribute: attr });
}
}
if (prop.readOnly) {
Polymer.Bind.ensurePropertyEffects(this, p);
}
}
}
},
_addComputedEffect: function (name, expression) {
var sig = this._parseMethod(expression);
var dynamicFn = sig.dynamicFn;
for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
this._addPropertyEffect(arg.model, 'compute', {
method: sig.method,
args: sig.args,
trigger: arg,
name: name,
dynamicFn: dynamicFn
});
}
if (dynamicFn) {
this._addPropertyEffect(sig.method, 'compute', {
method: sig.method,
args: sig.args,
trigger: null,
name: name,
dynamicFn: dynamicFn
});
}
},
_addObserverEffect: function (property, observer) {
this._addPropertyEffect(property, 'observer', {
method: observer,
property: property
});
},
_addComplexObserverEffects: function (observers) {
if (observers) {
for (var i = 0, o; i < observers.length && (o = observers[i]); i++) {
this._addComplexObserverEffect(o);
}
}
},
_addComplexObserverEffect: function (observer) {
var sig = this._parseMethod(observer);
if (!sig) {
throw new Error('Malformed observer expression \'' + observer + '\'');
}
var dynamicFn = sig.dynamicFn;
for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
this._addPropertyEffect(arg.model, 'complexObserver', {
method: sig.method,
args: sig.args,
trigger: arg,
dynamicFn: dynamicFn
});
}
if (dynamicFn) {
this._addPropertyEffect(sig.method, 'complexObserver', {
method: sig.method,
args: sig.args,
trigger: null,
dynamicFn: dynamicFn
});
}
},
_addAnnotationEffects: function (notes) {
for (var i = 0, note; i < notes.length && (note = notes[i]); i++) {
var b$ = note.bindings;
for (var j = 0, binding; j < b$.length && (binding = b$[j]); j++) {
this._addAnnotationEffect(binding, i);
}
}
},
_addAnnotationEffect: function (note, index) {
if (Polymer.Bind._shouldAddListener(note)) {
Polymer.Bind._addAnnotatedListener(this, index, note.name, note.parts[0].value, note.parts[0].event, note.parts[0].negate);
}
for (var i = 0; i < note.parts.length; i++) {
var part = note.parts[i];
if (part.signature) {
this._addAnnotatedComputationEffect(note, part, index);
} else if (!part.literal) {
if (note.kind === 'attribute' && note.name[0] === '-') {
this._warn(this._logf('_addAnnotationEffect', 'Cannot set attribute ' + note.name + ' because "-" is not a valid attribute starting character'));
} else {
this._addPropertyEffect(part.model, 'annotation', {
kind: note.kind,
index: index,
name: note.name,
propertyName: note.propertyName,
value: part.value,
isCompound: note.isCompound,
compoundIndex: part.compoundIndex,
event: part.event,
customEvent: part.customEvent,
negate: part.negate
});
}
}
}
},
_addAnnotatedComputationEffect: function (note, part, index) {
var sig = part.signature;
if (sig.static) {
this.__addAnnotatedComputationEffect('__static__', index, note, part, null);
} else {
for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
if (!arg.literal) {
this.__addAnnotatedComputationEffect(arg.model, index, note, part, arg);
}
}
if (sig.dynamicFn) {
this.__addAnnotatedComputationEffect(sig.method, index, note, part, null);
}
}
},
__addAnnotatedComputationEffect: function (property, index, note, part, trigger) {
this._addPropertyEffect(property, 'annotatedComputation', {
index: index,
isCompound: note.isCompound,
compoundIndex: part.compoundIndex,
kind: note.kind,
name: note.name,
negate: part.negate,
method: part.signature.method,
args: part.signature.args,
trigger: trigger,
dynamicFn: part.signature.dynamicFn
});
},
_parseMethod: function (expression) {
var m = expression.match(/([^\s]+?)\(([\s\S]*)\)/);
if (m) {
var sig = {
method: m[1],
static: true
};
if (this.getPropertyInfo(sig.method) !== Polymer.nob) {
sig.static = false;
sig.dynamicFn = true;
}
if (m[2].trim()) {
var args = m[2].replace(/\\,/g, ',').split(',');
return this._parseArgs(args, sig);
} else {
sig.args = Polymer.nar;
return sig;
}
}
},
_parseArgs: function (argList, sig) {
sig.args = argList.map(function (rawArg) {
var arg = this._parseArg(rawArg);
if (!arg.literal) {
sig.static = false;
}
return arg;
}, this);
return sig;
},
_parseArg: function (rawArg) {
var arg = rawArg.trim().replace(/,/g, ',').replace(/\\(.)/g, '$1');
var a = { name: arg };
var fc = arg[0];
if (fc === '-') {
fc = arg[1];
}
if (fc >= '0' && fc <= '9') {
fc = '#';
}
switch (fc) {
case '\'':
case '"':
a.value = arg.slice(1, -1);
a.literal = true;
break;
case '#':
a.value = Number(arg);
a.literal = true;
break;
}
if (!a.literal) {
a.model = this._modelForPath(arg);
a.structured = arg.indexOf('.') > 0;
if (a.structured) {
a.wildcard = arg.slice(-2) == '.*';
if (a.wildcard) {
a.name = arg.slice(0, -2);
}
}
}
return a;
},
_marshalInstanceEffects: function () {
Polymer.Bind.prepareInstance(this);
if (this._bindListeners) {
Polymer.Bind.setupBindListeners(this);
}
},
_applyEffectValue: function (info, value) {
var node = this._nodes[info.index];
var property = info.name;
if (info.isCompound) {
var storage = node.__compoundStorage__[property];
storage[info.compoundIndex] = value;
value = storage.join('');
}
if (info.kind == 'attribute') {
this.serializeValueToAttribute(value, property, node);
} else {
if (property === 'className') {
value = this._scopeElementClass(node, value);
}
if (property === 'textContent' || node.localName == 'input' && property == 'value') {
value = value == undefined ? '' : value;
}
var pinfo;
if (!node._propertyInfo || !(pinfo = node._propertyInfo[property]) || !pinfo.readOnly) {
this.__setProperty(property, value, false, node);
}
}
},
_executeStaticEffects: function () {
if (this._propertyEffects && this._propertyEffects.__static__) {
this._effectEffects('__static__', null, this._propertyEffects.__static__);
}
}
});
(function () {
var usePolyfillProto = Polymer.Settings.usePolyfillProto;
Polymer.Base._addFeature({
_setupConfigure: function (initialConfig) {
this._config = {};
this._handlers = [];
this._aboveConfig = null;
if (initialConfig) {
for (var i in initialConfig) {
if (initialConfig[i] !== undefined) {
this._config[i] = initialConfig[i];
}
}
}
},
_marshalAttributes: function () {
this._takeAttributesToModel(this._config);
},
_attributeChangedImpl: function (name) {
var model = this._clientsReadied ? this : this._config;
this._setAttributeToProperty(model, name);
},
_configValue: function (name, value) {
var info = this._propertyInfo[name];
if (!info || !info.readOnly) {
this._config[name] = value;
}
},
_beforeClientsReady: function () {
this._configure();
},
_configure: function () {
this._configureAnnotationReferences();
this._aboveConfig = this.mixin({}, this._config);
var config = {};
for (var i = 0; i < this.behaviors.length; i++) {
this._configureProperties(this.behaviors[i].properties, config);
}
this._configureProperties(this.properties, config);
this.mixin(config, this._aboveConfig);
this._config = config;
if (this._clients && this._clients.length) {
this._distributeConfig(this._config);
}
},
_configureProperties: function (properties, config) {
for (var i in properties) {
var c = properties[i];
if (!usePolyfillProto && this.hasOwnProperty(i) && this._propertyEffects && this._propertyEffects[i]) {
config[i] = this[i];
delete this[i];
} else if (c.value !== undefined) {
var value = c.value;
if (typeof value == 'function') {
value = value.call(this, this._config);
}
config[i] = value;
}
}
},
_distributeConfig: function (config) {
var fx$ = this._propertyEffects;
if (fx$) {
for (var p in config) {
var fx = fx$[p];
if (fx) {
for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) {
if (x.kind === 'annotation' && !x.isCompound) {
var node = this._nodes[x.effect.index];
var name = x.effect.propertyName;
var isAttr = x.effect.kind == 'attribute';
var hasEffect = node._propertyEffects && node._propertyEffects[name];
if (node._configValue && (hasEffect || !isAttr)) {
var value = p === x.effect.value ? config[p] : this._get(x.effect.value, config);
if (isAttr) {
value = node.deserialize(this.serialize(value), node._propertyInfo[name].type);
}
node._configValue(name, value);
}
}
}
}
}
}
},
_afterClientsReady: function () {
this._executeStaticEffects();
this._applyConfig(this._config, this._aboveConfig);
this._flushHandlers();
},
_applyConfig: function (config, aboveConfig) {
for (var n in config) {
if (this[n] === undefined) {
this.__setProperty(n, config[n], n in aboveConfig);
}
}
},
_notifyListener: function (fn, e) {
if (!Polymer.Bind._isEventBogus(e, e.target)) {
var value, path;
if (e.detail) {
value = e.detail.value;
path = e.detail.path;
}
if (!this._clientsReadied) {
this._queueHandler([
fn,
e.target,
value,
path
]);
} else {
return fn.call(this, e.target, value, path);
}
}
},
_queueHandler: function (args) {
this._handlers.push(args);
},
_flushHandlers: function () {
var h$ = this._handlers;
for (var i = 0, l = h$.length, h; i < l && (h = h$[i]); i++) {
h[0].call(this, h[1], h[2], h[3]);
}
this._handlers = [];
}
});
}());
(function () {
'use strict';
Polymer.Base._addFeature({
notifyPath: function (path, value, fromAbove) {
var info = {};
this._get(path, this, info);
if (info.path) {
this._notifyPath(info.path, value, fromAbove);
}
},
_notifyPath: function (path, value, fromAbove) {
var old = this._propertySetter(path, value);
if (old !== value && (old === old || value === value)) {
this._pathEffector(path, value);
if (!fromAbove) {
this._notifyPathUp(path, value);
}
return true;
}
},
_getPathParts: function (path) {
if (Array.isArray(path)) {
var parts = [];
for (var i = 0; i < path.length; i++) {
var args = path[i].toString().split('.');
for (var j = 0; j < args.length; j++) {
parts.push(args[j]);
}
}
return parts;
} else {
return path.toString().split('.');
}
},
set: function (path, value, root) {
var prop = root || this;
var parts = this._getPathParts(path);
var array;
var last = parts[parts.length - 1];
if (parts.length > 1) {
for (var i = 0; i < parts.length - 1; i++) {
var part = parts[i];
if (array && part[0] == '#') {
prop = Polymer.Collection.get(array).getItem(part);
} else {
prop = prop[part];
if (array && parseInt(part, 10) == part) {
parts[i] = Polymer.Collection.get(array).getKey(prop);
}
}
if (!prop) {
return;
}
array = Array.isArray(prop) ? prop : null;
}
if (array) {
var coll = Polymer.Collection.get(array);
var old, key;
if (last[0] == '#') {
key = last;
old = coll.getItem(key);
last = array.indexOf(old);
coll.setItem(key, value);
} else if (parseInt(last, 10) == last) {
old = prop[last];
key = coll.getKey(old);
parts[i] = key;
coll.setItem(key, value);
}
}
prop[last] = value;
if (!root) {
this._notifyPath(parts.join('.'), value);
}
} else {
prop[path] = value;
}
},
get: function (path, root) {
return this._get(path, root);
},
_get: function (path, root, info) {
var prop = root || this;
var parts = this._getPathParts(path);
var array;
for (var i = 0; i < parts.length; i++) {
if (!prop) {
return;
}
var part = parts[i];
if (array && part[0] == '#') {
prop = Polymer.Collection.get(array).getItem(part);
} else {
prop = prop[part];
if (info && array && parseInt(part, 10) == part) {
parts[i] = Polymer.Collection.get(array).getKey(prop);
}
}
array = Array.isArray(prop) ? prop : null;
}
if (info) {
info.path = parts.join('.');
}
return prop;
},
_pathEffector: function (path, value) {
var model = this._modelForPath(path);
var fx$ = this._propertyEffects && this._propertyEffects[model];
if (fx$) {
for (var i = 0, fx; i < fx$.length && (fx = fx$[i]); i++) {
var fxFn = fx.pathFn;
if (fxFn) {
fxFn.call(this, path, value, fx.effect);
}
}
}
if (this._boundPaths) {
this._notifyBoundPaths(path, value);
}
},
_annotationPathEffect: function (path, value, effect) {
if (effect.value === path || effect.value.indexOf(path + '.') === 0) {
Polymer.Bind._annotationEffect.call(this, path, value, effect);
} else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) {
var node = this._nodes[effect.index];
if (node && node._notifyPath) {
var p = this._fixPath(effect.name, effect.value, path);
node._notifyPath(p, value, true);
}
}
},
_complexObserverPathEffect: function (path, value, effect) {
if (this._pathMatchesEffect(path, effect)) {
Polymer.Bind._complexObserverEffect.call(this, path, value, effect);
}
},
_computePathEffect: function (path, value, effect) {
if (this._pathMatchesEffect(path, effect)) {
Polymer.Bind._computeEffect.call(this, path, value, effect);
}
},
_annotatedComputationPathEffect: function (path, value, effect) {
if (this._pathMatchesEffect(path, effect)) {
Polymer.Bind._annotatedComputationEffect.call(this, path, value, effect);
}
},
_pathMatchesEffect: function (path, effect) {
var effectArg = effect.trigger.name;
return effectArg == path || effectArg.indexOf(path + '.') === 0 || effect.trigger.wildcard && path.indexOf(effectArg) === 0;
},
linkPaths: function (to, from) {
this._boundPaths = this._boundPaths || {};
if (from) {
this._boundPaths[to] = from;
} else {
this.unlinkPaths(to);
}
},
unlinkPaths: function (path) {
if (this._boundPaths) {
delete this._boundPaths[path];
}
},
_notifyBoundPaths: function (path, value) {
for (var a in this._boundPaths) {
var b = this._boundPaths[a];
if (path.indexOf(a + '.') == 0) {
this._notifyPath(this._fixPath(b, a, path), value);
} else if (path.indexOf(b + '.') == 0) {
this._notifyPath(this._fixPath(a, b, path), value);
}
}
},
_fixPath: function (property, root, path) {
return property + path.slice(root.length);
},
_notifyPathUp: function (path, value) {
var rootName = this._modelForPath(path);
var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName);
var eventName = dashCaseName + this._EVENT_CHANGED;
this.fire(eventName, {
path: path,
value: value
}, {
bubbles: false,
_useCache: true
});
},
_modelForPath: function (path) {
var dot = path.indexOf('.');
return dot < 0 ? path : path.slice(0, dot);
},
_EVENT_CHANGED: '-changed',
notifySplices: function (path, splices) {
var info = {};
var array = this._get(path, this, info);
this._notifySplices(array, info.path, splices);
},
_notifySplices: function (array, path, splices) {
var change = {
keySplices: Polymer.Collection.applySplices(array, splices),
indexSplices: splices
};
if (!array.hasOwnProperty('splices')) {
Object.defineProperty(array, 'splices', {
configurable: true,
writable: true
});
}
array.splices = change;
this._notifyPath(path + '.splices', change);
this._notifyPath(path + '.length', array.length);
change.keySplices = null;
change.indexSplices = null;
},
_notifySplice: function (array, path, index, added, removed) {
this._notifySplices(array, path, [{
index: index,
addedCount: added,
removed: removed,
object: array,
type: 'splice'
}]);
},
push: function (path) {
var info = {};
var array = this._get(path, this, info);
var args = Array.prototype.slice.call(arguments, 1);
var len = array.length;
var ret = array.push.apply(array, args);
if (args.length) {
this._notifySplice(array, info.path, len, args.length, []);
}
return ret;
},
pop: function (path) {
var info = {};
var array = this._get(path, this, info);
var hadLength = Boolean(array.length);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.pop.apply(array, args);
if (hadLength) {
this._notifySplice(array, info.path, array.length, 0, [ret]);
}
return ret;
},
splice: function (path, start) {
var info = {};
var array = this._get(path, this, info);
if (start < 0) {
start = array.length - Math.floor(-start);
} else {
start = Math.floor(start);
}
if (!start) {
start = 0;
}
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.splice.apply(array, args);
var addedCount = Math.max(args.length - 2, 0);
if (addedCount || ret.length) {
this._notifySplice(array, info.path, start, addedCount, ret);
}
return ret;
},
shift: function (path) {
var info = {};
var array = this._get(path, this, info);
var hadLength = Boolean(array.length);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.shift.apply(array, args);
if (hadLength) {
this._notifySplice(array, info.path, 0, 0, [ret]);
}
return ret;
},
unshift: function (path) {
var info = {};
var array = this._get(path, this, info);
var args = Array.prototype.slice.call(arguments, 1);
var ret = array.unshift.apply(array, args);
if (args.length) {
this._notifySplice(array, info.path, 0, args.length, []);
}
return ret;
},
prepareModelNotifyPath: function (model) {
this.mixin(model, {
fire: Polymer.Base.fire,
_getEvent: Polymer.Base._getEvent,
__eventCache: Polymer.Base.__eventCache,
notifyPath: Polymer.Base.notifyPath,
_get: Polymer.Base._get,
_EVENT_CHANGED: Polymer.Base._EVENT_CHANGED,
_notifyPath: Polymer.Base._notifyPath,
_notifyPathUp: Polymer.Base._notifyPathUp,
_pathEffector: Polymer.Base._pathEffector,
_annotationPathEffect: Polymer.Base._annotationPathEffect,
_complexObserverPathEffect: Polymer.Base._complexObserverPathEffect,
_annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect,
_computePathEffect: Polymer.Base._computePathEffect,
_modelForPath: Polymer.Base._modelForPath,
_pathMatchesEffect: Polymer.Base._pathMatchesEffect,
_notifyBoundPaths: Polymer.Base._notifyBoundPaths,
_getPathParts: Polymer.Base._getPathParts
});
}
});
}());
Polymer.Base._addFeature({
resolveUrl: function (url) {
var module = Polymer.DomModule.import(this.is);
var root = '';
if (module) {
var assetPath = module.getAttribute('assetpath') || '';
root = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);
}
return Polymer.ResolveUrl.resolveUrl(url, root);
}
});
Polymer.CssParse = function () {
return {
parse: function (text) {
text = this._clean(text);
return this._parseCss(this._lex(text), text);
},
_clean: function (cssText) {
return cssText.replace(this._rx.comments, '').replace(this._rx.port, '');
},
_lex: function (text) {
var root = {
start: 0,
end: text.length
};
var n = root;
for (var i = 0, l = text.length; i < l; i++) {
switch (text[i]) {
case this.OPEN_BRACE:
if (!n.rules) {
n.rules = [];
}
var p = n;
var previous = p.rules[p.rules.length - 1];
n = {
start: i + 1,
parent: p,
previous: previous
};
p.rules.push(n);
break;
case this.CLOSE_BRACE:
n.end = i + 1;
n = n.parent || root;
break;
}
}
return root;
},
_parseCss: function (node, text) {
var t = text.substring(node.start, node.end - 1);
node.parsedCssText = node.cssText = t.trim();
if (node.parent) {
var ss = node.previous ? node.previous.end : node.parent.start;
t = text.substring(ss, node.start - 1);
t = this._expandUnicodeEscapes(t);
t = t.replace(this._rx.multipleSpaces, ' ');
t = t.substring(t.lastIndexOf(';') + 1);
var s = node.parsedSelector = node.selector = t.trim();
node.atRule = s.indexOf(this.AT_START) === 0;
if (node.atRule) {
if (s.indexOf(this.MEDIA_START) === 0) {
node.type = this.types.MEDIA_RULE;
} else if (s.match(this._rx.keyframesRule)) {
node.type = this.types.KEYFRAMES_RULE;
node.keyframesName = node.selector.split(this._rx.multipleSpaces).pop();
}
} else {
if (s.indexOf(this.VAR_START) === 0) {
node.type = this.types.MIXIN_RULE;
} else {
node.type = this.types.STYLE_RULE;
}
}
}
var r$ = node.rules;
if (r$) {
for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
this._parseCss(r, text);
}
}
return node;
},
_expandUnicodeEscapes: function (s) {
return s.replace(/\\([0-9a-f]{1,6})\s/gi, function () {
var code = arguments[1], repeat = 6 - code.length;
while (repeat--) {
code = '0' + code;
}
return '\\' + code;
});
},
stringify: function (node, preserveProperties, text) {
text = text || '';
var cssText = '';
if (node.cssText || node.rules) {
var r$ = node.rules;
if (r$ && (preserveProperties || !this._hasMixinRules(r$))) {
for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
cssText = this.stringify(r, preserveProperties, cssText);
}
} else {
cssText = preserveProperties ? node.cssText : this.removeCustomProps(node.cssText);
cssText = cssText.trim();
if (cssText) {
cssText = ' ' + cssText + '\n';
}
}
}
if (cssText) {
if (node.selector) {
text += node.selector + ' ' + this.OPEN_BRACE + '\n';
}
text += cssText;
if (node.selector) {
text += this.CLOSE_BRACE + '\n\n';
}
}
return text;
},
_hasMixinRules: function (rules) {
return rules[0].selector.indexOf(this.VAR_START) === 0;
},
removeCustomProps: function (cssText) {
cssText = this.removeCustomPropAssignment(cssText);
return this.removeCustomPropApply(cssText);
},
removeCustomPropAssignment: function (cssText) {
return cssText.replace(this._rx.customProp, '').replace(this._rx.mixinProp, '');
},
removeCustomPropApply: function (cssText) {
return cssText.replace(this._rx.mixinApply, '').replace(this._rx.varApply, '');
},
types: {
STYLE_RULE: 1,
KEYFRAMES_RULE: 7,
MEDIA_RULE: 4,
MIXIN_RULE: 1000
},
OPEN_BRACE: '{',
CLOSE_BRACE: '}',
_rx: {
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
port: /@import[^;]*;/gim,
customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,
mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,
mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim,
varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,
keyframesRule: /^@[^\s]*keyframes/,
multipleSpaces: /\s+/g
},
VAR_START: '--',
MEDIA_START: '@media',
AT_START: '@'
};
}();
Polymer.StyleUtil = function () {
return {
MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
INCLUDE_ATTR: 'include',
toCssText: function (rules, callback, preserveProperties) {
if (typeof rules === 'string') {
rules = this.parser.parse(rules);
}
if (callback) {
this.forEachRule(rules, callback);
}
return this.parser.stringify(rules, preserveProperties);
},
forRulesInStyles: function (styles, styleRuleCallback, keyframesRuleCallback) {
if (styles) {
for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
this.forEachRule(this.rulesForStyle(s), styleRuleCallback, keyframesRuleCallback);
}
}
},
rulesForStyle: function (style) {
if (!style.__cssRules && style.textContent) {
style.__cssRules = this.parser.parse(style.textContent);
}
return style.__cssRules;
},
isKeyframesSelector: function (rule) {
return rule.parent && rule.parent.type === this.ruleTypes.KEYFRAMES_RULE;
},
forEachRule: function (node, styleRuleCallback, keyframesRuleCallback) {
if (!node) {
return;
}
var skipRules = false;
if (node.type === this.ruleTypes.STYLE_RULE) {
styleRuleCallback(node);
} else if (keyframesRuleCallback && node.type === this.ruleTypes.KEYFRAMES_RULE) {
keyframesRuleCallback(node);
} else if (node.type === this.ruleTypes.MIXIN_RULE) {
skipRules = true;
}
var r$ = node.rules;
if (r$ && !skipRules) {
for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
this.forEachRule(r, styleRuleCallback, keyframesRuleCallback);
}
}
},
applyCss: function (cssText, moniker, target, contextNode) {
var style = this.createScopeStyle(cssText, moniker);
target = target || document.head;
var after = contextNode && contextNode.nextSibling || target.firstChild;
this.__lastHeadApplyNode = style;
return target.insertBefore(style, after);
},
createScopeStyle: function (cssText, moniker) {
var style = document.createElement('style');
if (moniker) {
style.setAttribute('scope', moniker);
}
style.textContent = cssText;
return style;
},
__lastHeadApplyNode: null,
applyStylePlaceHolder: function (moniker) {
var placeHolder = document.createComment(' Shady DOM styles for ' + moniker + ' ');
var after = this.__lastHeadApplyNode ? this.__lastHeadApplyNode.nextSibling : null;
var scope = document.head;
scope.insertBefore(placeHolder, after || scope.firstChild);
this.__lastHeadApplyNode = placeHolder;
return placeHolder;
},
cssFromModules: function (moduleIds, warnIfNotFound) {
var modules = moduleIds.trim().split(' ');
var cssText = '';
for (var i = 0; i < modules.length; i++) {
cssText += this.cssFromModule(modules[i], warnIfNotFound);
}
return cssText;
},
cssFromModule: function (moduleId, warnIfNotFound) {
var m = Polymer.DomModule.import(moduleId);
if (m && !m._cssText) {
m._cssText = this.cssFromElement(m);
}
if (!m && warnIfNotFound) {
console.warn('Could not find style data in module named', moduleId);
}
return m && m._cssText || '';
},
cssFromElement: function (element) {
var cssText = '';
var content = element.content || element;
var e$ = Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
for (var i = 0, e; i < e$.length; i++) {
e = e$[i];
if (e.localName === 'template') {
cssText += this.cssFromElement(e);
} else {
if (e.localName === 'style') {
var include = e.getAttribute(this.INCLUDE_ATTR);
if (include) {
cssText += this.cssFromModules(include, true);
}
e = e.__appliedElement || e;
e.parentNode.removeChild(e);
cssText += this.resolveCss(e.textContent, element.ownerDocument);
} else if (e.import && e.import.body) {
cssText += this.resolveCss(e.import.body.textContent, e.import);
}
}
}
return cssText;
},
resolveCss: Polymer.ResolveUrl.resolveCss,
parser: Polymer.CssParse,
ruleTypes: Polymer.CssParse.types
};
}();
Polymer.StyleTransformer = function () {
var nativeShadow = Polymer.Settings.useNativeShadow;
var styleUtil = Polymer.StyleUtil;
var api = {
dom: function (node, scope, useAttr, shouldRemoveScope) {
this._transformDom(node, scope || '', useAttr, shouldRemoveScope);
},
_transformDom: function (node, selector, useAttr, shouldRemoveScope) {
if (node.setAttribute) {
this.element(node, selector, useAttr, shouldRemoveScope);
}
var c$ = Polymer.dom(node).childNodes;
for (var i = 0; i < c$.length; i++) {
this._transformDom(c$[i], selector, useAttr, shouldRemoveScope);
}
},
element: function (element, scope, useAttr, shouldRemoveScope) {
if (useAttr) {
if (shouldRemoveScope) {
element.removeAttribute(SCOPE_NAME);
} else {
element.setAttribute(SCOPE_NAME, scope);
}
} else {
if (scope) {
if (element.classList) {
if (shouldRemoveScope) {
element.classList.remove(SCOPE_NAME);
element.classList.remove(scope);
} else {
element.classList.add(SCOPE_NAME);
element.classList.add(scope);
}
} else if (element.getAttribute) {
var c = element.getAttribute(CLASS);
if (shouldRemoveScope) {
if (c) {
element.setAttribute(CLASS, c.replace(SCOPE_NAME, '').replace(scope, ''));
}
} else {
element.setAttribute(CLASS, (c ? c + ' ' : '') + SCOPE_NAME + ' ' + scope);
}
}
}
}
},
elementStyles: function (element, callback) {
var styles = element._styles;
var cssText = '';
for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
var rules = styleUtil.rulesForStyle(s);
cssText += nativeShadow ? styleUtil.toCssText(rules, callback) : this.css(rules, element.is, element.extends, callback, element._scopeCssViaAttr) + '\n\n';
}
return cssText.trim();
},
css: function (rules, scope, ext, callback, useAttr) {
var hostScope = this._calcHostScope(scope, ext);
scope = this._calcElementScope(scope, useAttr);
var self = this;
return styleUtil.toCssText(rules, function (rule) {
if (!rule.isScoped) {
self.rule(rule, scope, hostScope);
rule.isScoped = true;
}
if (callback) {
callback(rule, scope, hostScope);
}
});
},
_calcElementScope: function (scope, useAttr) {
if (scope) {
return useAttr ? CSS_ATTR_PREFIX + scope + CSS_ATTR_SUFFIX : CSS_CLASS_PREFIX + scope;
} else {
return '';
}
},
_calcHostScope: function (scope, ext) {
return ext ? '[is=' + scope + ']' : scope;
},
rule: function (rule, scope, hostScope) {
this._transformRule(rule, this._transformComplexSelector, scope, hostScope);
},
_transformRule: function (rule, transformer, scope, hostScope) {
var p$ = rule.selector.split(COMPLEX_SELECTOR_SEP);
if (!styleUtil.isKeyframesSelector(rule)) {
for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
p$[i] = transformer.call(this, p, scope, hostScope);
}
}
rule.selector = rule.transformedSelector = p$.join(COMPLEX_SELECTOR_SEP);
},
_transformComplexSelector: function (selector, scope, hostScope) {
var stop = false;
var hostContext = false;
var self = this;
selector = selector.replace(CONTENT_START, HOST + ' $1');
selector = selector.replace(SIMPLE_SELECTOR_SEP, function (m, c, s) {
if (!stop) {
var info = self._transformCompoundSelector(s, c, scope, hostScope);
stop = stop || info.stop;
hostContext = hostContext || info.hostContext;
c = info.combinator;
s = info.value;
} else {
s = s.replace(SCOPE_JUMP, ' ');
}
return c + s;
});
if (hostContext) {
selector = selector.replace(HOST_CONTEXT_PAREN, function (m, pre, paren, post) {
return pre + paren + ' ' + hostScope + post + COMPLEX_SELECTOR_SEP + ' ' + pre + hostScope + paren + post;
});
}
return selector;
},
_transformCompoundSelector: function (selector, combinator, scope, hostScope) {
var jumpIndex = selector.search(SCOPE_JUMP);
var hostContext = false;
if (selector.indexOf(HOST_CONTEXT) >= 0) {
hostContext = true;
} else if (selector.indexOf(HOST) >= 0) {
selector = selector.replace(HOST_PAREN, function (m, host, paren) {
return hostScope + paren;
});
selector = selector.replace(HOST, hostScope);
} else if (jumpIndex !== 0) {
selector = scope ? this._transformSimpleSelector(selector, scope) : selector;
}
if (selector.indexOf(CONTENT) >= 0) {
combinator = '';
}
var stop;
if (jumpIndex >= 0) {
selector = selector.replace(SCOPE_JUMP, ' ');
stop = true;
}
return {
value: selector,
combinator: combinator,
stop: stop,
hostContext: hostContext
};
},
_transformSimpleSelector: function (selector, scope) {
var p$ = selector.split(PSEUDO_PREFIX);
p$[0] += scope;
return p$.join(PSEUDO_PREFIX);
},
documentRule: function (rule) {
rule.selector = rule.parsedSelector;
this.normalizeRootSelector(rule);
if (!nativeShadow) {
this._transformRule(rule, this._transformDocumentSelector);
}
},
normalizeRootSelector: function (rule) {
if (rule.selector === ROOT) {
rule.selector = 'body';
}
},
_transformDocumentSelector: function (selector) {
return selector.match(SCOPE_JUMP) ? this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) : this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);
},
SCOPE_NAME: 'style-scope'
};
var SCOPE_NAME = api.SCOPE_NAME;
var SCOPE_DOC_SELECTOR = ':not([' + SCOPE_NAME + '])' + ':not(.' + SCOPE_NAME + ')';
var COMPLEX_SELECTOR_SEP = ',';
var SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g;
var HOST = ':host';
var ROOT = ':root';
var HOST_PAREN = /(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;
var HOST_CONTEXT = ':host-context';
var HOST_CONTEXT_PAREN = /(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/;
var CONTENT = '::content';
var SCOPE_JUMP = /::content|::shadow|\/deep\//;
var CSS_CLASS_PREFIX = '.';
var CSS_ATTR_PREFIX = '[' + SCOPE_NAME + '~=';
var CSS_ATTR_SUFFIX = ']';
var PSEUDO_PREFIX = ':';
var CLASS = 'class';
var CONTENT_START = new RegExp('^(' + CONTENT + ')');
return api;
}();
Polymer.StyleExtends = function () {
var styleUtil = Polymer.StyleUtil;
return {
hasExtends: function (cssText) {
return Boolean(cssText.match(this.rx.EXTEND));
},
transform: function (style) {
var rules = styleUtil.rulesForStyle(style);
var self = this;
styleUtil.forEachRule(rules, function (rule) {
self._mapRuleOntoParent(rule);
if (rule.parent) {
var m;
while (m = self.rx.EXTEND.exec(rule.cssText)) {
var extend = m[1];
var extendor = self._findExtendor(extend, rule);
if (extendor) {
self._extendRule(rule, extendor);
}
}
}
rule.cssText = rule.cssText.replace(self.rx.EXTEND, '');
});
return styleUtil.toCssText(rules, function (rule) {
if (rule.selector.match(self.rx.STRIP)) {
rule.cssText = '';
}
}, true);
},
_mapRuleOntoParent: function (rule) {
if (rule.parent) {
var map = rule.parent.map || (rule.parent.map = {});
var parts = rule.selector.split(',');
for (var i = 0, p; i < parts.length; i++) {
p = parts[i];
map[p.trim()] = rule;
}
return map;
}
},
_findExtendor: function (extend, rule) {
return rule.parent && rule.parent.map && rule.parent.map[extend] || this._findExtendor(extend, rule.parent);
},
_extendRule: function (target, source) {
if (target.parent !== source.parent) {
this._cloneAndAddRuleToParent(source, target.parent);
}
target.extends = target.extends || [];
target.extends.push(source);
source.selector = source.selector.replace(this.rx.STRIP, '');
source.selector = (source.selector && source.selector + ',\n') + target.selector;
if (source.extends) {
source.extends.forEach(function (e) {
this._extendRule(target, e);
}, this);
}
},
_cloneAndAddRuleToParent: function (rule, parent) {
rule = Object.create(rule);
rule.parent = parent;
if (rule.extends) {
rule.extends = rule.extends.slice();
}
parent.rules.push(rule);
},
rx: {
EXTEND: /@extends\(([^)]*)\)\s*?;/gim,
STRIP: /%[^,]*$/
}
};
}();
(function () {
var prepElement = Polymer.Base._prepElement;
var nativeShadow = Polymer.Settings.useNativeShadow;
var styleUtil = Polymer.StyleUtil;
var styleTransformer = Polymer.StyleTransformer;
var styleExtends = Polymer.StyleExtends;
Polymer.Base._addFeature({
_prepElement: function (element) {
if (this._encapsulateStyle) {
styleTransformer.element(element, this.is, this._scopeCssViaAttr);
}
prepElement.call(this, element);
},
_prepStyles: function () {
if (!nativeShadow) {
this._scopeStyle = styleUtil.applyStylePlaceHolder(this.is);
}
},
_prepShimStyles: function () {
if (this._template) {
if (this._encapsulateStyle === undefined) {
this._encapsulateStyle = !nativeShadow;
}
this._styles = this._collectStyles();
var cssText = styleTransformer.elementStyles(this);
this._prepStyleProperties();
if (!this._needsStyleProperties() && this._styles.length) {
styleUtil.applyCss(cssText, this.is, nativeShadow ? this._template.content : null, this._scopeStyle);
}
} else {
this._styles = [];
}
},
_collectStyles: function () {
var styles = [];
var cssText = '', m$ = this.styleModules;
if (m$) {
for (var i = 0, l = m$.length, m; i < l && (m = m$[i]); i++) {
cssText += styleUtil.cssFromModule(m);
}
}
cssText += styleUtil.cssFromModule(this.is);
var p = this._template && this._template.parentNode;
if (this._template && (!p || p.id.toLowerCase() !== this.is)) {
cssText += styleUtil.cssFromElement(this._template);
}
if (cssText) {
var style = document.createElement('style');
style.textContent = cssText;
if (styleExtends.hasExtends(style.textContent)) {
cssText = styleExtends.transform(style);
}
styles.push(style);
}
return styles;
},
_elementAdd: function (node) {
if (this._encapsulateStyle) {
if (node.__styleScoped) {
node.__styleScoped = false;
} else {
styleTransformer.dom(node, this.is, this._scopeCssViaAttr);
}
}
},
_elementRemove: function (node) {
if (this._encapsulateStyle) {
styleTransformer.dom(node, this.is, this._scopeCssViaAttr, true);
}
},
scopeSubtree: function (container, shouldObserve) {
if (nativeShadow) {
return;
}
var self = this;
var scopify = function (node) {
if (node.nodeType === Node.ELEMENT_NODE) {
var className = node.getAttribute('class');
node.setAttribute('class', self._scopeElementClass(node, className));
var n$ = node.querySelectorAll('*');
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
className = n.getAttribute('class');
n.setAttribute('class', self._scopeElementClass(n, className));
}
}
};
scopify(container);
if (shouldObserve) {
var mo = new MutationObserver(function (mxns) {
for (var i = 0, m; i < mxns.length && (m = mxns[i]); i++) {
if (m.addedNodes) {
for (var j = 0; j < m.addedNodes.length; j++) {
scopify(m.addedNodes[j]);
}
}
}
});
mo.observe(container, {
childList: true,
subtree: true
});
return mo;
}
}
});
}());
Polymer.StyleProperties = function () {
'use strict';
var nativeShadow = Polymer.Settings.useNativeShadow;
var matchesSelector = Polymer.DomApi.matchesSelector;
var styleUtil = Polymer.StyleUtil;
var styleTransformer = Polymer.StyleTransformer;
return {
decorateStyles: function (styles) {
var self = this, props = {}, keyframes = [];
styleUtil.forRulesInStyles(styles, function (rule) {
self.decorateRule(rule);
self.collectPropertiesInCssText(rule.propertyInfo.cssText, props);
}, function onKeyframesRule(rule) {
keyframes.push(rule);
});
styles._keyframes = keyframes;
var names = [];
for (var i in props) {
names.push(i);
}
return names;
},
decorateRule: function (rule) {
if (rule.propertyInfo) {
return rule.propertyInfo;
}
var info = {}, properties = {};
var hasProperties = this.collectProperties(rule, properties);
if (hasProperties) {
info.properties = properties;
rule.rules = null;
}
info.cssText = this.collectCssText(rule);
rule.propertyInfo = info;
return info;
},
collectProperties: function (rule, properties) {
var info = rule.propertyInfo;
if (info) {
if (info.properties) {
Polymer.Base.mixin(properties, info.properties);
return true;
}
} else {
var m, rx = this.rx.VAR_ASSIGN;
var cssText = rule.parsedCssText;
var any;
while (m = rx.exec(cssText)) {
properties[m[1]] = (m[2] || m[3]).trim();
any = true;
}
return any;
}
},
collectCssText: function (rule) {
return this.collectConsumingCssText(rule.parsedCssText);
},
collectConsumingCssText: function (cssText) {
return cssText.replace(this.rx.BRACKETED, '').replace(this.rx.VAR_ASSIGN, '');
},
collectPropertiesInCssText: function (cssText, props) {
var m;
while (m = this.rx.VAR_CAPTURE.exec(cssText)) {
props[m[1]] = true;
var def = m[2];
if (def && def.match(this.rx.IS_VAR)) {
props[def] = true;
}
}
},
reify: function (props) {
var names = Object.getOwnPropertyNames(props);
for (var i = 0, n; i < names.length; i++) {
n = names[i];
props[n] = this.valueForProperty(props[n], props);
}
},
valueForProperty: function (property, props) {
if (property) {
if (property.indexOf(';') >= 0) {
property = this.valueForProperties(property, props);
} else {
var self = this;
var fn = function (all, prefix, value, fallback) {
var propertyValue = self.valueForProperty(props[value], props) || (props[fallback] ? self.valueForProperty(props[fallback], props) : fallback);
return prefix + (propertyValue || '');
};
property = property.replace(this.rx.VAR_MATCH, fn);
}
}
return property && property.trim() || '';
},
valueForProperties: function (property, props) {
var parts = property.split(';');
for (var i = 0, p, m; i < parts.length; i++) {
if (p = parts[i]) {
m = p.match(this.rx.MIXIN_MATCH);
if (m) {
p = this.valueForProperty(props[m[1]], props);
} else {
var colon = p.indexOf(':');
if (colon !== -1) {
var pp = p.substring(colon);
pp = pp.trim();
pp = this.valueForProperty(pp, props) || pp;
p = p.substring(0, colon) + pp;
}
}
parts[i] = p && p.lastIndexOf(';') === p.length - 1 ? p.slice(0, -1) : p || '';
}
}
return parts.join(';');
},
applyProperties: function (rule, props) {
var output = '';
if (!rule.propertyInfo) {
this.decorateRule(rule);
}
if (rule.propertyInfo.cssText) {
output = this.valueForProperties(rule.propertyInfo.cssText, props);
}
rule.cssText = output;
},
applyKeyframeTransforms: function (rule, keyframeTransforms) {
var input = rule.cssText;
var output = rule.cssText;
if (rule.hasAnimations == null) {
rule.hasAnimations = this.rx.ANIMATION_MATCH.test(input);
}
if (rule.hasAnimations) {
var transform;
if (rule.keyframeNamesToTransform == null) {
rule.keyframeNamesToTransform = [];
for (var keyframe in keyframeTransforms) {
transform = keyframeTransforms[keyframe];
output = transform(input);
if (input !== output) {
input = output;
rule.keyframeNamesToTransform.push(keyframe);
}
}
} else {
for (var i = 0; i < rule.keyframeNamesToTransform.length; ++i) {
transform = keyframeTransforms[rule.keyframeNamesToTransform[i]];
input = transform(input);
}
output = input;
}
}
rule.cssText = output;
},
propertyDataFromStyles: function (styles, element) {
var props = {}, self = this;
var o = [], i = 0;
styleUtil.forRulesInStyles(styles, function (rule) {
if (!rule.propertyInfo) {
self.decorateRule(rule);
}
if (element && rule.propertyInfo.properties && matchesSelector.call(element, rule.transformedSelector || rule.parsedSelector)) {
self.collectProperties(rule, props);
addToBitMask(i, o);
}
i++;
});
return {
properties: props,
key: o
};
},
scopePropertiesFromStyles: function (styles) {
if (!styles._scopeStyleProperties) {
styles._scopeStyleProperties = this.selectedPropertiesFromStyles(styles, this.SCOPE_SELECTORS);
}
return styles._scopeStyleProperties;
},
hostPropertiesFromStyles: function (styles) {
if (!styles._hostStyleProperties) {
styles._hostStyleProperties = this.selectedPropertiesFromStyles(styles, this.HOST_SELECTORS);
}
return styles._hostStyleProperties;
},
selectedPropertiesFromStyles: function (styles, selectors) {
var props = {}, self = this;
styleUtil.forRulesInStyles(styles, function (rule) {
if (!rule.propertyInfo) {
self.decorateRule(rule);
}
for (var i = 0; i < selectors.length; i++) {
if (rule.parsedSelector === selectors[i]) {
self.collectProperties(rule, props);
return;
}
}
});
return props;
},
transformStyles: function (element, properties, scopeSelector) {
var self = this;
var hostSelector = styleTransformer._calcHostScope(element.is, element.extends);
var rxHostSelector = element.extends ? '\\' + hostSelector.slice(0, -1) + '\\]' : hostSelector;
var hostRx = new RegExp(this.rx.HOST_PREFIX + rxHostSelector + this.rx.HOST_SUFFIX);
var keyframeTransforms = this._elementKeyframeTransforms(element, scopeSelector);
return styleTransformer.elementStyles(element, function (rule) {
self.applyProperties(rule, properties);
if (!nativeShadow && !Polymer.StyleUtil.isKeyframesSelector(rule) && rule.cssText) {
self.applyKeyframeTransforms(rule, keyframeTransforms);
self._scopeSelector(rule, hostRx, hostSelector, element._scopeCssViaAttr, scopeSelector);
}
});
},
_elementKeyframeTransforms: function (element, scopeSelector) {
var keyframesRules = element._styles._keyframes;
var keyframeTransforms = {};
if (!nativeShadow && keyframesRules) {
for (var i = 0, keyframesRule = keyframesRules[i]; i < keyframesRules.length; keyframesRule = keyframesRules[++i]) {
this._scopeKeyframes(keyframesRule, scopeSelector);
keyframeTransforms[keyframesRule.keyframesName] = this._keyframesRuleTransformer(keyframesRule);
}
}
return keyframeTransforms;
},
_keyframesRuleTransformer: function (keyframesRule) {
return function (cssText) {
return cssText.replace(keyframesRule.keyframesNameRx, keyframesRule.transformedKeyframesName);
};
},
_scopeKeyframes: function (rule, scopeId) {
rule.keyframesNameRx = new RegExp(rule.keyframesName, 'g');
rule.transformedKeyframesName = rule.keyframesName + '-' + scopeId;
rule.transformedSelector = rule.transformedSelector || rule.selector;
rule.selector = rule.transformedSelector.replace(rule.keyframesName, rule.transformedKeyframesName);
},
_scopeSelector: function (rule, hostRx, hostSelector, viaAttr, scopeId) {
rule.transformedSelector = rule.transformedSelector || rule.selector;
var selector = rule.transformedSelector;
var scope = viaAttr ? '[' + styleTransformer.SCOPE_NAME + '~=' + scopeId + ']' : '.' + scopeId;
var parts = selector.split(',');
for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {
parts[i] = p.match(hostRx) ? p.replace(hostSelector, scope) : scope + ' ' + p;
}
rule.selector = parts.join(',');
},
applyElementScopeSelector: function (element, selector, old, viaAttr) {
var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.getAttribute('class') || '';
var v = old ? c.replace(old, selector) : (c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector;
if (c !== v) {
if (viaAttr) {
element.setAttribute(styleTransformer.SCOPE_NAME, v);
} else {
element.setAttribute('class', v);
}
}
},
applyElementStyle: function (element, properties, selector, style) {
var cssText = style ? style.textContent || '' : this.transformStyles(element, properties, selector);
var s = element._customStyle;
if (s && !nativeShadow && s !== style) {
s._useCount--;
if (s._useCount <= 0 && s.parentNode) {
s.parentNode.removeChild(s);
}
}
if (nativeShadow || (!style || !style.parentNode)) {
if (nativeShadow && element._customStyle) {
element._customStyle.textContent = cssText;
style = element._customStyle;
} else if (cssText) {
style = styleUtil.applyCss(cssText, selector, nativeShadow ? element.root : null, element._scopeStyle);
}
}
if (style) {
style._useCount = style._useCount || 0;
if (element._customStyle != style) {
style._useCount++;
}
element._customStyle = style;
}
return style;
},
mixinCustomStyle: function (props, customStyle) {
var v;
for (var i in customStyle) {
v = customStyle[i];
if (v || v === 0) {
props[i] = v;
}
}
},
rx: {
VAR_ASSIGN: /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,
MIXIN_MATCH: /(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,
VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,()]*)|(?:[^;()]*\([^;)]*\)))[\s]*?\)/gi,
VAR_CAPTURE: /\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,
ANIMATION_MATCH: /(animation\s*:)|(animation-name\s*:)/,
IS_VAR: /^--/,
BRACKETED: /\{[^}]*\}/g,
HOST_PREFIX: '(?:^|[^.#[:])',
HOST_SUFFIX: '($|[.:[\\s>+~])'
},
HOST_SELECTORS: [':host'],
SCOPE_SELECTORS: [':root'],
XSCOPE_NAME: 'x-scope'
};
function addToBitMask(n, bits) {
var o = parseInt(n / 32);
var v = 1 << n % 32;
bits[o] = (bits[o] || 0) | v;
}
}();
(function () {
Polymer.StyleCache = function () {
this.cache = {};
};
Polymer.StyleCache.prototype = {
MAX: 100,
store: function (is, data, keyValues, keyStyles) {
data.keyValues = keyValues;
data.styles = keyStyles;
var s$ = this.cache[is] = this.cache[is] || [];
s$.push(data);
if (s$.length > this.MAX) {
s$.shift();
}
},
retrieve: function (is, keyValues, keyStyles) {
var cache = this.cache[is];
if (cache) {
for (var i = cache.length - 1, data; i >= 0; i--) {
data = cache[i];
if (keyStyles === data.styles && this._objectsEqual(keyValues, data.keyValues)) {
return data;
}
}
}
},
clear: function () {
this.cache = {};
},
_objectsEqual: function (target, source) {
var t, s;
for (var i in target) {
t = target[i], s = source[i];
if (!(typeof t === 'object' && t ? this._objectsStrictlyEqual(t, s) : t === s)) {
return false;
}
}
if (Array.isArray(target)) {
return target.length === source.length;
}
return true;
},
_objectsStrictlyEqual: function (target, source) {
return this._objectsEqual(target, source) && this._objectsEqual(source, target);
}
};
}());
Polymer.StyleDefaults = function () {
var styleProperties = Polymer.StyleProperties;
var StyleCache = Polymer.StyleCache;
var api = {
_styles: [],
_properties: null,
customStyle: {},
_styleCache: new StyleCache(),
addStyle: function (style) {
this._styles.push(style);
this._properties = null;
},
get _styleProperties() {
if (!this._properties) {
styleProperties.decorateStyles(this._styles);
this._styles._scopeStyleProperties = null;
this._properties = styleProperties.scopePropertiesFromStyles(this._styles);
styleProperties.mixinCustomStyle(this._properties, this.customStyle);
styleProperties.reify(this._properties);
}
return this._properties;
},
_needsStyleProperties: function () {
},
_computeStyleProperties: function () {
return this._styleProperties;
},
updateStyles: function (properties) {
this._properties = null;
if (properties) {
Polymer.Base.mixin(this.customStyle, properties);
}
this._styleCache.clear();
for (var i = 0, s; i < this._styles.length; i++) {
s = this._styles[i];
s = s.__importElement || s;
s._apply();
}
}
};
return api;
}();
(function () {
'use strict';
var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute;
var propertyUtils = Polymer.StyleProperties;
var styleTransformer = Polymer.StyleTransformer;
var styleDefaults = Polymer.StyleDefaults;
var nativeShadow = Polymer.Settings.useNativeShadow;
Polymer.Base._addFeature({
_prepStyleProperties: function () {
this._ownStylePropertyNames = this._styles && this._styles.length ? propertyUtils.decorateStyles(this._styles) : null;
},
customStyle: null,
getComputedStyleValue: function (property) {
return this._styleProperties && this._styleProperties[property] || getComputedStyle(this).getPropertyValue(property);
},
_setupStyleProperties: function () {
this.customStyle = {};
this._styleCache = null;
this._styleProperties = null;
this._scopeSelector = null;
this._ownStyleProperties = null;
this._customStyle = null;
},
_needsStyleProperties: function () {
return Boolean(this._ownStylePropertyNames && this._ownStylePropertyNames.length);
},
_beforeAttached: function () {
if (!this._scopeSelector && this._needsStyleProperties()) {
this._updateStyleProperties();
}
},
_findStyleHost: function () {
var e = this, root;
while (root = Polymer.dom(e).getOwnerRoot()) {
if (Polymer.isInstance(root.host)) {
return root.host;
}
e = root.host;
}
return styleDefaults;
},
_updateStyleProperties: function () {
var info, scope = this._findStyleHost();
if (!scope._styleCache) {
scope._styleCache = new Polymer.StyleCache();
}
var scopeData = propertyUtils.propertyDataFromStyles(scope._styles, this);
scopeData.key.customStyle = this.customStyle;
info = scope._styleCache.retrieve(this.is, scopeData.key, this._styles);
var scopeCached = Boolean(info);
if (scopeCached) {
this._styleProperties = info._styleProperties;
} else {
this._computeStyleProperties(scopeData.properties);
}
this._computeOwnStyleProperties();
if (!scopeCached) {
info = styleCache.retrieve(this.is, this._ownStyleProperties, this._styles);
}
var globalCached = Boolean(info) && !scopeCached;
var style = this._applyStyleProperties(info);
if (!scopeCached) {
style = style && nativeShadow ? style.cloneNode(true) : style;
info = {
style: style,
_scopeSelector: this._scopeSelector,
_styleProperties: this._styleProperties
};
scopeData.key.customStyle = {};
this.mixin(scopeData.key.customStyle, this.customStyle);
scope._styleCache.store(this.is, info, scopeData.key, this._styles);
if (!globalCached) {
styleCache.store(this.is, Object.create(info), this._ownStyleProperties, this._styles);
}
}
},
_computeStyleProperties: function (scopeProps) {
var scope = this._findStyleHost();
if (!scope._styleProperties) {
scope._computeStyleProperties();
}
var props = Object.create(scope._styleProperties);
this.mixin(props, propertyUtils.hostPropertiesFromStyles(this._styles));
scopeProps = scopeProps || propertyUtils.propertyDataFromStyles(scope._styles, this).properties;
this.mixin(props, scopeProps);
this.mixin(props, propertyUtils.scopePropertiesFromStyles(this._styles));
propertyUtils.mixinCustomStyle(props, this.customStyle);
propertyUtils.reify(props);
this._styleProperties = props;
},
_computeOwnStyleProperties: function () {
var props = {};
for (var i = 0, n; i < this._ownStylePropertyNames.length; i++) {
n = this._ownStylePropertyNames[i];
props[n] = this._styleProperties[n];
}
this._ownStyleProperties = props;
},
_scopeCount: 0,
_applyStyleProperties: function (info) {
var oldScopeSelector = this._scopeSelector;
this._scopeSelector = info ? info._scopeSelector : this.is + '-' + this.__proto__._scopeCount++;
var style = propertyUtils.applyElementStyle(this, this._styleProperties, this._scopeSelector, info && info.style);
if (!nativeShadow) {
propertyUtils.applyElementScopeSelector(this, this._scopeSelector, oldScopeSelector, this._scopeCssViaAttr);
}
return style;
},
serializeValueToAttribute: function (value, attribute, node) {
node = node || this;
if (attribute === 'class' && !nativeShadow) {
var host = node === this ? this.domHost || this.dataHost : this;
if (host) {
value = host._scopeElementClass(node, value);
}
}
node = this.shadyRoot && this.shadyRoot._hasDistributed ? Polymer.dom(node) : node;
serializeValueToAttribute.call(this, value, attribute, node);
},
_scopeElementClass: function (element, selector) {
if (!nativeShadow && !this._scopeCssViaAttr) {
selector = (selector ? selector + ' ' : '') + SCOPE_NAME + ' ' + this.is + (element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' + element._scopeSelector : '');
}
return selector;
},
updateStyles: function (properties) {
if (this.isAttached) {
if (properties) {
this.mixin(this.customStyle, properties);
}
if (this._needsStyleProperties()) {
this._updateStyleProperties();
} else {
this._styleProperties = null;
}
if (this._styleCache) {
this._styleCache.clear();
}
this._updateRootStyles();
}
},
_updateRootStyles: function (root) {
root = root || this.root;
var c$ = Polymer.dom(root)._query(function (e) {
return e.shadyRoot || e.shadowRoot;
});
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
if (c.updateStyles) {
c.updateStyles();
}
}
}
});
Polymer.updateStyles = function (properties) {
styleDefaults.updateStyles(properties);
Polymer.Base._updateRootStyles(document);
};
var styleCache = new Polymer.StyleCache();
Polymer.customStyleCache = styleCache;
var SCOPE_NAME = styleTransformer.SCOPE_NAME;
var XSCOPE_NAME = propertyUtils.XSCOPE_NAME;
}());
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepConstructor();
this._prepStyles();
},
_finishRegisterFeatures: function () {
this._prepTemplate();
this._prepShimStyles();
this._prepAnnotations();
this._prepEffects();
this._prepBehaviors();
this._prepPropertyInfo();
this._prepBindings();
this._prepShady();
},
_prepBehavior: function (b) {
this._addPropertyEffects(b.properties);
this._addComplexObserverEffects(b.observers);
this._addHostAttributes(b.hostAttributes);
},
_initFeatures: function () {
this._setupGestures();
this._setupConfigure();
this._setupStyleProperties();
this._setupDebouncers();
this._setupShady();
this._registerHost();
if (this._template) {
this._poolContent();
this._beginHosting();
this._stampTemplate();
this._endHosting();
this._marshalAnnotationReferences();
}
this._marshalInstanceEffects();
this._marshalBehaviors();
this._marshalHostAttributes();
this._marshalAttributes();
this._tryReady();
},
_marshalBehavior: function (b) {
if (b.listeners) {
this._listenListeners(b.listeners);
}
}
});
(function () {
var propertyUtils = Polymer.StyleProperties;
var styleUtil = Polymer.StyleUtil;
var cssParse = Polymer.CssParse;
var styleDefaults = Polymer.StyleDefaults;
var styleTransformer = Polymer.StyleTransformer;
Polymer({
is: 'custom-style',
extends: 'style',
_template: null,
properties: { include: String },
ready: function () {
this._tryApply();
},
attached: function () {
this._tryApply();
},
_tryApply: function () {
if (!this._appliesToDocument) {
if (this.parentNode && this.parentNode.localName !== 'dom-module') {
this._appliesToDocument = true;
var e = this.__appliedElement || this;
styleDefaults.addStyle(e);
if (e.textContent || this.include) {
this._apply(true);
} else {
var self = this;
var observer = new MutationObserver(function () {
observer.disconnect();
self._apply(true);
});
observer.observe(e, { childList: true });
}
}
}
},
_apply: function (deferProperties) {
var e = this.__appliedElement || this;
if (this.include) {
e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent;
}
if (e.textContent) {
styleUtil.forEachRule(styleUtil.rulesForStyle(e), function (rule) {
styleTransformer.documentRule(rule);
});
var self = this;
var fn = function fn() {
self._applyCustomProperties(e);
};
if (this._pendingApplyProperties) {
cancelAnimationFrame(this._pendingApplyProperties);
this._pendingApplyProperties = null;
}
if (deferProperties) {
this._pendingApplyProperties = requestAnimationFrame(fn);
} else {
fn();
}
}
},
_applyCustomProperties: function (element) {
this._computeStyleProperties();
var props = this._styleProperties;
var rules = styleUtil.rulesForStyle(element);
element.textContent = styleUtil.toCssText(rules, function (rule) {
var css = rule.cssText = rule.parsedCssText;
if (rule.propertyInfo && rule.propertyInfo.cssText) {
css = cssParse.removeCustomPropAssignment(css);
rule.cssText = propertyUtils.valueForProperties(css, props);
}
});
}
});
}());
Polymer.Templatizer = {
properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },
_instanceProps: Polymer.nob,
_parentPropPrefix: '_parent_',
templatize: function (template) {
this._templatized = template;
if (!template._content) {
template._content = template.content;
}
if (template._content._ctor) {
this.ctor = template._content._ctor;
this._prepParentProperties(this.ctor.prototype, template);
return;
}
var archetype = Object.create(Polymer.Base);
this._customPrepAnnotations(archetype, template);
this._prepParentProperties(archetype, template);
archetype._prepEffects();
this._customPrepEffects(archetype);
archetype._prepBehaviors();
archetype._prepPropertyInfo();
archetype._prepBindings();
archetype._notifyPathUp = this._notifyPathUpImpl;
archetype._scopeElementClass = this._scopeElementClassImpl;
archetype.listen = this._listenImpl;
archetype._showHideChildren = this._showHideChildrenImpl;
archetype.__setPropertyOrig = this.__setProperty;
archetype.__setProperty = this.__setPropertyImpl;
var _constructor = this._constructorImpl;
var ctor = function TemplateInstance(model, host) {
_constructor.call(this, model, host);
};
ctor.prototype = archetype;
archetype.constructor = ctor;
template._content._ctor = ctor;
this.ctor = ctor;
},
_getRootDataHost: function () {
return this.dataHost && this.dataHost._rootDataHost || this.dataHost;
},
_showHideChildrenImpl: function (hide) {
var c = this._children;
for (var i = 0; i < c.length; i++) {
var n = c[i];
if (Boolean(hide) != Boolean(n.__hideTemplateChildren__)) {
if (n.nodeType === Node.TEXT_NODE) {
if (hide) {
n.__polymerTextContent__ = n.textContent;
n.textContent = '';
} else {
n.textContent = n.__polymerTextContent__;
}
} else if (n.style) {
if (hide) {
n.__polymerDisplay__ = n.style.display;
n.style.display = 'none';
} else {
n.style.display = n.__polymerDisplay__;
}
}
}
n.__hideTemplateChildren__ = hide;
}
},
__setPropertyImpl: function (property, value, fromAbove, node) {
if (node && node.__hideTemplateChildren__ && property == 'textContent') {
property = '__polymerTextContent__';
}
this.__setPropertyOrig(property, value, fromAbove, node);
},
_debounceTemplate: function (fn) {
Polymer.dom.addDebouncer(this.debounce('_debounceTemplate', fn));
},
_flushTemplates: function () {
Polymer.dom.flush();
},
_customPrepEffects: function (archetype) {
var parentProps = archetype._parentProps;
for (var prop in parentProps) {
archetype._addPropertyEffect(prop, 'function', this._createHostPropEffector(prop));
}
for (prop in this._instanceProps) {
archetype._addPropertyEffect(prop, 'function', this._createInstancePropEffector(prop));
}
},
_customPrepAnnotations: function (archetype, template) {
archetype._template = template;
var c = template._content;
if (!c._notes) {
var rootDataHost = archetype._rootDataHost;
if (rootDataHost) {
Polymer.Annotations.prepElement = function () {
rootDataHost._prepElement();
};
}
c._notes = Polymer.Annotations.parseAnnotations(template);
Polymer.Annotations.prepElement = null;
this._processAnnotations(c._notes);
}
archetype._notes = c._notes;
archetype._parentProps = c._parentProps;
},
_prepParentProperties: function (archetype, template) {
var parentProps = this._parentProps = archetype._parentProps;
if (this._forwardParentProp && parentProps) {
var proto = archetype._parentPropProto;
var prop;
if (!proto) {
for (prop in this._instanceProps) {
delete parentProps[prop];
}
proto = archetype._parentPropProto = Object.create(null);
if (template != this) {
Polymer.Bind.prepareModel(proto);
Polymer.Base.prepareModelNotifyPath(proto);
}
for (prop in parentProps) {
var parentProp = this._parentPropPrefix + prop;
var effects = [
{
kind: 'function',
effect: this._createForwardPropEffector(prop),
fn: Polymer.Bind._functionEffect
},
{
kind: 'notify',
fn: Polymer.Bind._notifyEffect,
effect: { event: Polymer.CaseMap.camelToDashCase(parentProp) + '-changed' }
}
];
Polymer.Bind._createAccessors(proto, parentProp, effects);
}
}
var self = this;
if (template != this) {
Polymer.Bind.prepareInstance(template);
template._forwardParentProp = function (source, value) {
self._forwardParentProp(source, value);
};
}
this._extendTemplate(template, proto);
template._pathEffector = function (path, value, fromAbove) {
return self._pathEffectorImpl(path, value, fromAbove);
};
}
},
_createForwardPropEffector: function (prop) {
return function (source, value) {
this._forwardParentProp(prop, value);
};
},
_createHostPropEffector: function (prop) {
var prefix = this._parentPropPrefix;
return function (source, value) {
this.dataHost._templatized[prefix + prop] = value;
};
},
_createInstancePropEffector: function (prop) {
return function (source, value, old, fromAbove) {
if (!fromAbove) {
this.dataHost._forwardInstanceProp(this, prop, value);
}
};
},
_extendTemplate: function (template, proto) {
var n$ = Object.getOwnPropertyNames(proto);
if (proto._propertySetter) {
template._propertySetter = proto._propertySetter;
}
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
var val = template[n];
var pd = Object.getOwnPropertyDescriptor(proto, n);
Object.defineProperty(template, n, pd);
if (val !== undefined) {
template._propertySetter(n, val);
}
}
},
_showHideChildren: function (hidden) {
},
_forwardInstancePath: function (inst, path, value) {
},
_forwardInstanceProp: function (inst, prop, value) {
},
_notifyPathUpImpl: function (path, value) {
var dataHost = this.dataHost;
var dot = path.indexOf('.');
var root = dot < 0 ? path : path.slice(0, dot);
dataHost._forwardInstancePath.call(dataHost, this, path, value);
if (root in dataHost._parentProps) {
dataHost._templatized.notifyPath(dataHost._parentPropPrefix + path, value);
}
},
_pathEffectorImpl: function (path, value, fromAbove) {
if (this._forwardParentPath) {
if (path.indexOf(this._parentPropPrefix) === 0) {
var subPath = path.substring(this._parentPropPrefix.length);
var model = this._modelForPath(subPath);
if (model in this._parentProps) {
this._forwardParentPath(subPath, value);
}
}
}
Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove);
},
_constructorImpl: function (model, host) {
this._rootDataHost = host._getRootDataHost();
this._setupConfigure(model);
this._registerHost(host);
this._beginHosting();
this.root = this.instanceTemplate(this._template);
this.root.__noContent = !this._notes._hasContent;
this.root.__styleScoped = true;
this._endHosting();
this._marshalAnnotatedNodes();
this._marshalInstanceEffects();
this._marshalAnnotatedListeners();
var children = [];
for (var n = this.root.firstChild; n; n = n.nextSibling) {
children.push(n);
n._templateInstance = this;
}
this._children = children;
if (host.__hideTemplateChildren__) {
this._showHideChildren(true);
}
this._tryReady();
},
_listenImpl: function (node, eventName, methodName) {
var model = this;
var host = this._rootDataHost;
var handler = host._createEventHandler(node, eventName, methodName);
var decorated = function (e) {
e.model = model;
handler(e);
};
host._listen(node, eventName, decorated);
},
_scopeElementClassImpl: function (node, value) {
var host = this._rootDataHost;
if (host) {
return host._scopeElementClass(node, value);
}
},
stamp: function (model) {
model = model || {};
if (this._parentProps) {
var templatized = this._templatized;
for (var prop in this._parentProps) {
if (model[prop] === undefined) {
model[prop] = templatized[this._parentPropPrefix + prop];
}
}
}
return new this.ctor(model, this);
},
modelForElement: function (el) {
var model;
while (el) {
if (model = el._templateInstance) {
if (model.dataHost != this) {
el = model.dataHost;
} else {
return model;
}
} else {
el = el.parentNode;
}
}
}
};
Polymer({
is: 'dom-template',
extends: 'template',
_template: null,
behaviors: [Polymer.Templatizer],
ready: function () {
this.templatize(this);
}
});
Polymer._collections = new WeakMap();
Polymer.Collection = function (userArray) {
Polymer._collections.set(userArray, this);
this.userArray = userArray;
this.store = userArray.slice();
this.initMap();
};
Polymer.Collection.prototype = {
constructor: Polymer.Collection,
initMap: function () {
var omap = this.omap = new WeakMap();
var pmap = this.pmap = {};
var s = this.store;
for (var i = 0; i < s.length; i++) {
var item = s[i];
if (item && typeof item == 'object') {
omap.set(item, i);
} else {
pmap[item] = i;
}
}
},
add: function (item) {
var key = this.store.push(item) - 1;
if (item && typeof item == 'object') {
this.omap.set(item, key);
} else {
this.pmap[item] = key;
}
return '#' + key;
},
removeKey: function (key) {
if (key = this._parseKey(key)) {
this._removeFromMap(this.store[key]);
delete this.store[key];
}
},
_removeFromMap: function (item) {
if (item && typeof item == 'object') {
this.omap.delete(item);
} else {
delete this.pmap[item];
}
},
remove: function (item) {
var key = this.getKey(item);
this.removeKey(key);
return key;
},
getKey: function (item) {
var key;
if (item && typeof item == 'object') {
key = this.omap.get(item);
} else {
key = this.pmap[item];
}
if (key != undefined) {
return '#' + key;
}
},
getKeys: function () {
return Object.keys(this.store).map(function (key) {
return '#' + key;
});
},
_parseKey: function (key) {
if (key && key[0] == '#') {
return key.slice(1);
}
},
setItem: function (key, item) {
if (key = this._parseKey(key)) {
var old = this.store[key];
if (old) {
this._removeFromMap(old);
}
if (item && typeof item == 'object') {
this.omap.set(item, key);
} else {
this.pmap[item] = key;
}
this.store[key] = item;
}
},
getItem: function (key) {
if (key = this._parseKey(key)) {
return this.store[key];
}
},
getItems: function () {
var items = [], store = this.store;
for (var key in store) {
items.push(store[key]);
}
return items;
},
_applySplices: function (splices) {
var keyMap = {}, key;
for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
s.addedKeys = [];
for (var j = 0; j < s.removed.length; j++) {
key = this.getKey(s.removed[j]);
keyMap[key] = keyMap[key] ? null : -1;
}
for (j = 0; j < s.addedCount; j++) {
var item = this.userArray[s.index + j];
key = this.getKey(item);
key = key === undefined ? this.add(item) : key;
keyMap[key] = keyMap[key] ? null : 1;
s.addedKeys.push(key);
}
}
var removed = [];
var added = [];
for (key in keyMap) {
if (keyMap[key] < 0) {
this.removeKey(key);
removed.push(key);
}
if (keyMap[key] > 0) {
added.push(key);
}
}
return [{
removed: removed,
added: added
}];
}
};
Polymer.Collection.get = function (userArray) {
return Polymer._collections.get(userArray) || new Polymer.Collection(userArray);
};
Polymer.Collection.applySplices = function (userArray, splices) {
var coll = Polymer._collections.get(userArray);
return coll ? coll._applySplices(splices) : null;
};
Polymer({
is: 'dom-repeat',
extends: 'template',
_template: null,
properties: {
items: { type: Array },
as: {
type: String,
value: 'item'
},
indexAs: {
type: String,
value: 'index'
},
sort: {
type: Function,
observer: '_sortChanged'
},
filter: {
type: Function,
observer: '_filterChanged'
},
observe: {
type: String,
observer: '_observeChanged'
},
delay: Number,
renderedItemCount: {
type: Number,
notify: true,
readOnly: true
},
initialCount: {
type: Number,
observer: '_initializeChunking'
},
targetFramerate: {
type: Number,
value: 20
},
_targetFrameTime: {
type: Number,
computed: '_computeFrameTime(targetFramerate)'
}
},
behaviors: [Polymer.Templatizer],
observers: ['_itemsChanged(items.*)'],
created: function () {
this._instances = [];
this._pool = [];
this._limit = Infinity;
var self = this;
this._boundRenderChunk = function () {
self._renderChunk();
};
},
detached: function () {
this.__isDetached = true;
for (var i = 0; i < this._instances.length; i++) {
this._detachInstance(i);
}
},
attached: function () {
if (this.__isDetached) {
this.__isDetached = false;
var parent = Polymer.dom(Polymer.dom(this).parentNode);
for (var i = 0; i < this._instances.length; i++) {
this._attachInstance(i, parent);
}
}
},
ready: function () {
this._instanceProps = { __key__: true };
this._instanceProps[this.as] = true;
this._instanceProps[this.indexAs] = true;
if (!this.ctor) {
this.templatize(this);
}
},
_sortChanged: function (sort) {
var dataHost = this._getRootDataHost();
this._sortFn = sort && (typeof sort == 'function' ? sort : function () {
return dataHost[sort].apply(dataHost, arguments);
});
this._needFullRefresh = true;
if (this.items) {
this._debounceTemplate(this._render);
}
},
_filterChanged: function (filter) {
var dataHost = this._getRootDataHost();
this._filterFn = filter && (typeof filter == 'function' ? filter : function () {
return dataHost[filter].apply(dataHost, arguments);
});
this._needFullRefresh = true;
if (this.items) {
this._debounceTemplate(this._render);
}
},
_computeFrameTime: function (rate) {
return Math.ceil(1000 / rate);
},
_initializeChunking: function () {
if (this.initialCount) {
this._limit = this.initialCount;
this._chunkCount = this.initialCount;
this._lastChunkTime = performance.now();
}
},
_tryRenderChunk: function () {
if (this.items && this._limit < this.items.length) {
this.debounce('renderChunk', this._requestRenderChunk);
}
},
_requestRenderChunk: function () {
requestAnimationFrame(this._boundRenderChunk);
},
_renderChunk: function () {
var currChunkTime = performance.now();
var ratio = this._targetFrameTime / (currChunkTime - this._lastChunkTime);
this._chunkCount = Math.round(this._chunkCount * ratio) || 1;
this._limit += this._chunkCount;
this._lastChunkTime = currChunkTime;
this._debounceTemplate(this._render);
},
_observeChanged: function () {
this._observePaths = this.observe && this.observe.replace('.*', '.').split(' ');
},
_itemsChanged: function (change) {
if (change.path == 'items') {
if (Array.isArray(this.items)) {
this.collection = Polymer.Collection.get(this.items);
} else if (!this.items) {
this.collection = null;
} else {
this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
}
this._keySplices = [];
this._indexSplices = [];
this._needFullRefresh = true;
this._initializeChunking();
this._debounceTemplate(this._render);
} else if (change.path == 'items.splices') {
this._keySplices = this._keySplices.concat(change.value.keySplices);
this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
this._debounceTemplate(this._render);
} else {
var subpath = change.path.slice(6);
this._forwardItemPath(subpath, change.value);
this._checkObservedPaths(subpath);
}
},
_checkObservedPaths: function (path) {
if (this._observePaths) {
path = path.substring(path.indexOf('.') + 1);
var paths = this._observePaths;
for (var i = 0; i < paths.length; i++) {
if (path.indexOf(paths[i]) === 0) {
this._needFullRefresh = true;
if (this.delay) {
this.debounce('render', this._render, this.delay);
} else {
this._debounceTemplate(this._render);
}
return;
}
}
}
},
render: function () {
this._needFullRefresh = true;
this._debounceTemplate(this._render);
this._flushTemplates();
},
_render: function () {
if (this._needFullRefresh) {
this._applyFullRefresh();
this._needFullRefresh = false;
} else if (this._keySplices.length) {
if (this._sortFn) {
this._applySplicesUserSort(this._keySplices);
} else {
if (this._filterFn) {
this._applyFullRefresh();
} else {
this._applySplicesArrayOrder(this._indexSplices);
}
}
} else {
}
this._keySplices = [];
this._indexSplices = [];
var keyToIdx = this._keyToInstIdx = {};
for (var i = this._instances.length - 1; i >= 0; i--) {
var inst = this._instances[i];
if (inst.isPlaceholder && i < this._limit) {
inst = this._insertInstance(i, inst.__key__);
} else if (!inst.isPlaceholder && i >= this._limit) {
inst = this._downgradeInstance(i, inst.__key__);
}
keyToIdx[inst.__key__] = i;
if (!inst.isPlaceholder) {
inst.__setProperty(this.indexAs, i, true);
}
}
this._pool.length = 0;
this._setRenderedItemCount(this._instances.length);
this.fire('dom-change');
this._tryRenderChunk();
},
_applyFullRefresh: function () {
var c = this.collection;
var keys;
if (this._sortFn) {
keys = c ? c.getKeys() : [];
} else {
keys = [];
var items = this.items;
if (items) {
for (var i = 0; i < items.length; i++) {
keys.push(c.getKey(items[i]));
}
}
}
var self = this;
if (this._filterFn) {
keys = keys.filter(function (a) {
return self._filterFn(c.getItem(a));
});
}
if (this._sortFn) {
keys.sort(function (a, b) {
return self._sortFn(c.getItem(a), c.getItem(b));
});
}
for (i = 0; i < keys.length; i++) {
var key = keys[i];
var inst = this._instances[i];
if (inst) {
inst.__key__ = key;
if (!inst.isPlaceholder && i < this._limit) {
inst.__setProperty(this.as, c.getItem(key), true);
}
} else if (i < this._limit) {
this._insertInstance(i, key);
} else {
this._insertPlaceholder(i, key);
}
}
for (var j = this._instances.length - 1; j >= i; j--) {
this._detachAndRemoveInstance(j);
}
},
_numericSort: function (a, b) {
return a - b;
},
_applySplicesUserSort: function (splices) {
var c = this.collection;
var keyMap = {};
var key;
for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
for (var j = 0; j < s.removed.length; j++) {
key = s.removed[j];
keyMap[key] = keyMap[key] ? null : -1;
}
for (j = 0; j < s.added.length; j++) {
key = s.added[j];
keyMap[key] = keyMap[key] ? null : 1;
}
}
var removedIdxs = [];
var addedKeys = [];
for (key in keyMap) {
if (keyMap[key] === -1) {
removedIdxs.push(this._keyToInstIdx[key]);
}
if (keyMap[key] === 1) {
addedKeys.push(key);
}
}
if (removedIdxs.length) {
removedIdxs.sort(this._numericSort);
for (i = removedIdxs.length - 1; i >= 0; i--) {
var idx = removedIdxs[i];
if (idx !== undefined) {
this._detachAndRemoveInstance(idx);
}
}
}
var self = this;
if (addedKeys.length) {
if (this._filterFn) {
addedKeys = addedKeys.filter(function (a) {
return self._filterFn(c.getItem(a));
});
}
addedKeys.sort(function (a, b) {
return self._sortFn(c.getItem(a), c.getItem(b));
});
var start = 0;
for (i = 0; i < addedKeys.length; i++) {
start = this._insertRowUserSort(start, addedKeys[i]);
}
}
},
_insertRowUserSort: function (start, key) {
var c = this.collection;
var item = c.getItem(key);
var end = this._instances.length - 1;
var idx = -1;
while (start <= end) {
var mid = start + end >> 1;
var midKey = this._instances[mid].__key__;
var cmp = this._sortFn(c.getItem(midKey), item);
if (cmp < 0) {
start = mid + 1;
} else if (cmp > 0) {
end = mid - 1;
} else {
idx = mid;
break;
}
}
if (idx < 0) {
idx = end + 1;
}
this._insertPlaceholder(idx, key);
return idx;
},
_applySplicesArrayOrder: function (splices) {
for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
for (var j = 0; j < s.removed.length; j++) {
this._detachAndRemoveInstance(s.index);
}
for (j = 0; j < s.addedKeys.length; j++) {
this._insertPlaceholder(s.index + j, s.addedKeys[j]);
}
}
},
_detachInstance: function (idx) {
var inst = this._instances[idx];
if (!inst.isPlaceholder) {
for (var i = 0; i < inst._children.length; i++) {
var el = inst._children[i];
Polymer.dom(inst.root).appendChild(el);
}
return inst;
}
},
_attachInstance: function (idx, parent) {
var inst = this._instances[idx];
if (!inst.isPlaceholder) {
parent.insertBefore(inst.root, this);
}
},
_detachAndRemoveInstance: function (idx) {
var inst = this._detachInstance(idx);
if (inst) {
this._pool.push(inst);
}
this._instances.splice(idx, 1);
},
_insertPlaceholder: function (idx, key) {
this._instances.splice(idx, 0, {
isPlaceholder: true,
__key__: key
});
},
_stampInstance: function (idx, key) {
var model = { __key__: key };
model[this.as] = this.collection.getItem(key);
model[this.indexAs] = idx;
return this.stamp(model);
},
_insertInstance: function (idx, key) {
var inst = this._pool.pop();
if (inst) {
inst.__setProperty(this.as, this.collection.getItem(key), true);
inst.__setProperty('__key__', key, true);
} else {
inst = this._stampInstance(idx, key);
}
var beforeRow = this._instances[idx + 1];
var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this;
var parentNode = Polymer.dom(this).parentNode;
Polymer.dom(parentNode).insertBefore(inst.root, beforeNode);
this._instances[idx] = inst;
return inst;
},
_downgradeInstance: function (idx, key) {
var inst = this._detachInstance(idx);
if (inst) {
this._pool.push(inst);
}
inst = {
isPlaceholder: true,
__key__: key
};
this._instances[idx] = inst;
return inst;
},
_showHideChildren: function (hidden) {
for (var i = 0; i < this._instances.length; i++) {
this._instances[i]._showHideChildren(hidden);
}
},
_forwardInstanceProp: function (inst, prop, value) {
if (prop == this.as) {
var idx;
if (this._sortFn || this._filterFn) {
idx = this.items.indexOf(this.collection.getItem(inst.__key__));
} else {
idx = inst[this.indexAs];
}
this.set('items.' + idx, value);
}
},
_forwardInstancePath: function (inst, path, value) {
if (path.indexOf(this.as + '.') === 0) {
this._notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value);
}
},
_forwardParentProp: function (prop, value) {
var i$ = this._instances;
for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {
if (!inst.isPlaceholder) {
inst.__setProperty(prop, value, true);
}
}
},
_forwardParentPath: function (path, value) {
var i$ = this._instances;
for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {
if (!inst.isPlaceholder) {
inst._notifyPath(path, value, true);
}
}
},
_forwardItemPath: function (path, value) {
if (this._keyToInstIdx) {
var dot = path.indexOf('.');
var key = path.substring(0, dot < 0 ? path.length : dot);
var idx = this._keyToInstIdx[key];
var inst = this._instances[idx];
if (inst && !inst.isPlaceholder) {
if (dot >= 0) {
path = this.as + '.' + path.substring(dot + 1);
inst._notifyPath(path, value, true);
} else {
inst.__setProperty(this.as, value, true);
}
}
}
},
itemForElement: function (el) {
var instance = this.modelForElement(el);
return instance && instance[this.as];
},
keyForElement: function (el) {
var instance = this.modelForElement(el);
return instance && instance.__key__;
},
indexForElement: function (el) {
var instance = this.modelForElement(el);
return instance && instance[this.indexAs];
}
});
Polymer({
is: 'array-selector',
_template: null,
properties: {
items: {
type: Array,
observer: 'clearSelection'
},
multi: {
type: Boolean,
value: false,
observer: 'clearSelection'
},
selected: {
type: Object,
notify: true
},
selectedItem: {
type: Object,
notify: true
},
toggle: {
type: Boolean,
value: false
}
},
clearSelection: function () {
if (Array.isArray(this.selected)) {
for (var i = 0; i < this.selected.length; i++) {
this.unlinkPaths('selected.' + i);
}
} else {
this.unlinkPaths('selected');
this.unlinkPaths('selectedItem');
}
if (this.multi) {
if (!this.selected || this.selected.length) {
this.selected = [];
this._selectedColl = Polymer.Collection.get(this.selected);
}
} else {
this.selected = null;
this._selectedColl = null;
}
this.selectedItem = null;
},
isSelected: function (item) {
if (this.multi) {
return this._selectedColl.getKey(item) !== undefined;
} else {
return this.selected == item;
}
},
deselect: function (item) {
if (this.multi) {
if (this.isSelected(item)) {
var skey = this._selectedColl.getKey(item);
this.arrayDelete('selected', item);
this.unlinkPaths('selected.' + skey);
}
} else {
this.selected = null;
this.selectedItem = null;
this.unlinkPaths('selected');
this.unlinkPaths('selectedItem');
}
},
select: function (item) {
var icol = Polymer.Collection.get(this.items);
var key = icol.getKey(item);
if (this.multi) {
if (this.isSelected(item)) {
if (this.toggle) {
this.deselect(item);
}
} else {
this.push('selected', item);
var skey = this._selectedColl.getKey(item);
this.linkPaths('selected.' + skey, 'items.' + key);
}
} else {
if (this.toggle && item == this.selected) {
this.deselect();
} else {
this.selected = item;
this.selectedItem = item;
this.linkPaths('selected', 'items.' + key);
this.linkPaths('selectedItem', 'items.' + key);
}
}
}
});
Polymer({
is: 'dom-if',
extends: 'template',
_template: null,
properties: {
'if': {
type: Boolean,
value: false,
observer: '_queueRender'
},
restamp: {
type: Boolean,
value: false,
observer: '_queueRender'
}
},
behaviors: [Polymer.Templatizer],
_queueRender: function () {
this._debounceTemplate(this._render);
},
detached: function () {
if (!this.parentNode || this.parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(this.parentNode instanceof ShadowRoot))) {
this._teardownInstance();
}
},
attached: function () {
if (this.if && this.ctor) {
this.async(this._ensureInstance);
}
},
render: function () {
this._flushTemplates();
},
_render: function () {
if (this.if) {
if (!this.ctor) {
this.templatize(this);
}
this._ensureInstance();
this._showHideChildren();
} else if (this.restamp) {
this._teardownInstance();
}
if (!this.restamp && this._instance) {
this._showHideChildren();
}
if (this.if != this._lastIf) {
this.fire('dom-change');
this._lastIf = this.if;
}
},
_ensureInstance: function () {
var parentNode = Polymer.dom(this).parentNode;
if (parentNode) {
var parent = Polymer.dom(parentNode);
if (!this._instance) {
this._instance = this.stamp();
var root = this._instance.root;
parent.insertBefore(root, this);
} else {
var c$ = this._instance._children;
if (c$ && c$.length) {
var lastChild = Polymer.dom(this).previousSibling;
if (lastChild !== c$[c$.length - 1]) {
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
parent.insertBefore(n, this);
}
}
}
}
}
},
_teardownInstance: function () {
if (this._instance) {
var c$ = this._instance._children;
if (c$ && c$.length) {
var parent = Polymer.dom(Polymer.dom(c$[0]).parentNode);
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
parent.removeChild(n);
}
}
this._instance = null;
}
},
_showHideChildren: function () {
var hidden = this.__hideTemplateChildren__ || !this.if;
if (this._instance) {
this._instance._showHideChildren(hidden);
}
},
_forwardParentProp: function (prop, value) {
if (this._instance) {
this._instance[prop] = value;
}
},
_forwardParentPath: function (path, value) {
if (this._instance) {
this._instance._notifyPath(path, value, true);
}
}
});
Polymer({
is: 'dom-bind',
extends: 'template',
_template: null,
created: function () {
var self = this;
Polymer.RenderStatus.whenReady(function () {
if (document.readyState == 'loading') {
document.addEventListener('DOMContentLoaded', function () {
self._markImportsReady();
});
} else {
self._markImportsReady();
}
});
},
_ensureReady: function () {
if (!this._readied) {
this._readySelf();
}
},
_markImportsReady: function () {
this._importsReady = true;
this._ensureReady();
},
_registerFeatures: function () {
this._prepConstructor();
},
_insertChildren: function () {
var parentDom = Polymer.dom(Polymer.dom(this).parentNode);
parentDom.insertBefore(this.root, this);
},
_removeChildren: function () {
if (this._children) {
for (var i = 0; i < this._children.length; i++) {
this.root.appendChild(this._children[i]);
}
}
},
_initFeatures: function () {
},
_scopeElementClass: function (element, selector) {
if (this.dataHost) {
return this.dataHost._scopeElementClass(element, selector);
} else {
return selector;
}
},
_prepConfigure: function () {
var config = {};
for (var prop in this._propertyEffects) {
config[prop] = this[prop];
}
var setupConfigure = this._setupConfigure;
this._setupConfigure = function () {
setupConfigure.call(this, config);
};
},
attached: function () {
if (this._importsReady) {
this.render();
}
},
detached: function () {
this._removeChildren();
},
render: function () {
this._ensureReady();
if (!this._children) {
this._template = this;
this._prepAnnotations();
this._prepEffects();
this._prepBehaviors();
this._prepConfigure();
this._prepBindings();
this._prepPropertyInfo();
Polymer.Base._initFeatures.call(this);
this._children = Polymer.TreeApi.arrayCopyChildNodes(this.root);
}
this._insertChildren();
this.fire('dom-change');
}
});</script>
<!--
@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
--><link rel="import" href="polymer-micro.html">
<script>Polymer.Base._addFeature({
_prepTemplate: function () {
if (this._template === undefined) {
this._template = Polymer.DomModule.import(this.is, 'template');
}
if (this._template && this._template.hasAttribute('is')) {
this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));
}
if (this._template && !this._template.content && window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
HTMLTemplateElement.decorate(this._template);
}
},
_stampTemplate: function () {
if (this._template) {
this.root = this.instanceTemplate(this._template);
}
},
instanceTemplate: function (template) {
var dom = document.importNode(template._content || template.content, true);
return dom;
}
});
(function () {
var baseAttachedCallback = Polymer.Base.attachedCallback;
Polymer.Base._addFeature({
_hostStack: [],
ready: function () {
},
_registerHost: function (host) {
this.dataHost = host = host || Polymer.Base._hostStack[Polymer.Base._hostStack.length - 1];
if (host && host._clients) {
host._clients.push(this);
}
this._clients = null;
this._clientsReadied = false;
},
_beginHosting: function () {
Polymer.Base._hostStack.push(this);
if (!this._clients) {
this._clients = [];
}
},
_endHosting: function () {
Polymer.Base._hostStack.pop();
},
_tryReady: function () {
this._readied = false;
if (this._canReady()) {
this._ready();
}
},
_canReady: function () {
return !this.dataHost || this.dataHost._clientsReadied;
},
_ready: function () {
this._beforeClientsReady();
if (this._template) {
this._setupRoot();
this._readyClients();
}
this._clientsReadied = true;
this._clients = null;
this._afterClientsReady();
this._readySelf();
},
_readyClients: function () {
this._beginDistribute();
var c$ = this._clients;
if (c$) {
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
c._ready();
}
}
this._finishDistribute();
},
_readySelf: function () {
this._doBehavior('ready');
this._readied = true;
if (this._attachedPending) {
this._attachedPending = false;
this.attachedCallback();
}
},
_beforeClientsReady: function () {
},
_afterClientsReady: function () {
},
_beforeAttached: function () {
},
attachedCallback: function () {
if (this._readied) {
this._beforeAttached();
baseAttachedCallback.call(this);
} else {
this._attachedPending = true;
}
}
});
}());
Polymer.ArraySplice = function () {
function newSplice(index, removed, addedCount) {
return {
index: index,
removed: removed,
addedCount: addedCount
};
}
var EDIT_LEAVE = 0;
var EDIT_UPDATE = 1;
var EDIT_ADD = 2;
var EDIT_DELETE = 3;
function ArraySplice() {
}
ArraySplice.prototype = {
calcEditDistances: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
var rowCount = oldEnd - oldStart + 1;
var columnCount = currentEnd - currentStart + 1;
var distances = new Array(rowCount);
for (var i = 0; i < rowCount; i++) {
distances[i] = new Array(columnCount);
distances[i][0] = i;
}
for (var j = 0; j < columnCount; j++)
distances[0][j] = j;
for (i = 1; i < rowCount; i++) {
for (j = 1; j < columnCount; j++) {
if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))
distances[i][j] = distances[i - 1][j - 1];
else {
var north = distances[i - 1][j] + 1;
var west = distances[i][j - 1] + 1;
distances[i][j] = north < west ? north : west;
}
}
}
return distances;
},
spliceOperationsFromEditDistances: function (distances) {
var i = distances.length - 1;
var j = distances[0].length - 1;
var current = distances[i][j];
var edits = [];
while (i > 0 || j > 0) {
if (i == 0) {
edits.push(EDIT_ADD);
j--;
continue;
}
if (j == 0) {
edits.push(EDIT_DELETE);
i--;
continue;
}
var northWest = distances[i - 1][j - 1];
var west = distances[i - 1][j];
var north = distances[i][j - 1];
var min;
if (west < north)
min = west < northWest ? west : northWest;
else
min = north < northWest ? north : northWest;
if (min == northWest) {
if (northWest == current) {
edits.push(EDIT_LEAVE);
} else {
edits.push(EDIT_UPDATE);
current = northWest;
}
i--;
j--;
} else if (min == west) {
edits.push(EDIT_DELETE);
i--;
current = west;
} else {
edits.push(EDIT_ADD);
j--;
current = north;
}
}
edits.reverse();
return edits;
},
calcSplices: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
var prefixCount = 0;
var suffixCount = 0;
var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
if (currentStart == 0 && oldStart == 0)
prefixCount = this.sharedPrefix(current, old, minLength);
if (currentEnd == current.length && oldEnd == old.length)
suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
currentStart += prefixCount;
oldStart += prefixCount;
currentEnd -= suffixCount;
oldEnd -= suffixCount;
if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)
return [];
if (currentStart == currentEnd) {
var splice = newSplice(currentStart, [], 0);
while (oldStart < oldEnd)
splice.removed.push(old[oldStart++]);
return [splice];
} else if (oldStart == oldEnd)
return [newSplice(currentStart, [], currentEnd - currentStart)];
var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
splice = undefined;
var splices = [];
var index = currentStart;
var oldIndex = oldStart;
for (var i = 0; i < ops.length; i++) {
switch (ops[i]) {
case EDIT_LEAVE:
if (splice) {
splices.push(splice);
splice = undefined;
}
index++;
oldIndex++;
break;
case EDIT_UPDATE:
if (!splice)
splice = newSplice(index, [], 0);
splice.addedCount++;
index++;
splice.removed.push(old[oldIndex]);
oldIndex++;
break;
case EDIT_ADD:
if (!splice)
splice = newSplice(index, [], 0);
splice.addedCount++;
index++;
break;
case EDIT_DELETE:
if (!splice)
splice = newSplice(index, [], 0);
splice.removed.push(old[oldIndex]);
oldIndex++;
break;
}
}
if (splice) {
splices.push(splice);
}
return splices;
},
sharedPrefix: function (current, old, searchLength) {
for (var i = 0; i < searchLength; i++)
if (!this.equals(current[i], old[i]))
return i;
return searchLength;
},
sharedSuffix: function (current, old, searchLength) {
var index1 = current.length;
var index2 = old.length;
var count = 0;
while (count < searchLength && this.equals(current[--index1], old[--index2]))
count++;
return count;
},
calculateSplices: function (current, previous) {
return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
},
equals: function (currentValue, previousValue) {
return currentValue === previousValue;
}
};
return new ArraySplice();
}();
Polymer.domInnerHTML = function () {
var escapeAttrRegExp = /[&\u00A0"]/g;
var escapeDataRegExp = /[&\u00A0<>]/g;
function escapeReplace(c) {
switch (c) {
case '&':
return '&';
case '<':
return '<';
case '>':
return '>';
case '"':
return '"';
case '\xA0':
return ' ';
}
}
function escapeAttr(s) {
return s.replace(escapeAttrRegExp, escapeReplace);
}
function escapeData(s) {
return s.replace(escapeDataRegExp, escapeReplace);
}
function makeSet(arr) {
var set = {};
for (var i = 0; i < arr.length; i++) {
set[arr[i]] = true;
}
return set;
}
var voidElements = makeSet([
'area',
'base',
'br',
'col',
'command',
'embed',
'hr',
'img',
'input',
'keygen',
'link',
'meta',
'param',
'source',
'track',
'wbr'
]);
var plaintextParents = makeSet([
'style',
'script',
'xmp',
'iframe',
'noembed',
'noframes',
'plaintext',
'noscript'
]);
function getOuterHTML(node, parentNode, composed) {
switch (node.nodeType) {
case Node.ELEMENT_NODE:
var tagName = node.localName;
var s = '<' + tagName;
var attrs = node.attributes;
for (var i = 0, attr; attr = attrs[i]; i++) {
s += ' ' + attr.name + '="' + escapeAttr(attr.value) + '"';
}
s += '>';
if (voidElements[tagName]) {
return s;
}
return s + getInnerHTML(node, composed) + '</' + tagName + '>';
case Node.TEXT_NODE:
var data = node.data;
if (parentNode && plaintextParents[parentNode.localName]) {
return data;
}
return escapeData(data);
case Node.COMMENT_NODE:
return '<!--' + node.data + '-->';
default:
console.error(node);
throw new Error('not implemented');
}
}
function getInnerHTML(node, composed) {
if (node instanceof HTMLTemplateElement)
node = node.content;
var s = '';
var c$ = Polymer.dom(node).childNodes;
for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
s += getOuterHTML(child, node, composed);
}
return s;
}
return { getInnerHTML: getInnerHTML };
}();
(function () {
'use strict';
var nativeInsertBefore = Element.prototype.insertBefore;
var nativeAppendChild = Element.prototype.appendChild;
var nativeRemoveChild = Element.prototype.removeChild;
Polymer.TreeApi = {
arrayCopyChildNodes: function (parent) {
var copy = [], i = 0;
for (var n = parent.firstChild; n; n = n.nextSibling) {
copy[i++] = n;
}
return copy;
},
arrayCopyChildren: function (parent) {
var copy = [], i = 0;
for (var n = parent.firstElementChild; n; n = n.nextElementSibling) {
copy[i++] = n;
}
return copy;
},
arrayCopy: function (a$) {
var l = a$.length;
var copy = new Array(l);
for (var i = 0; i < l; i++) {
copy[i] = a$[i];
}
return copy;
}
};
Polymer.TreeApi.Logical = {
hasParentNode: function (node) {
return Boolean(node.__dom && node.__dom.parentNode);
},
hasChildNodes: function (node) {
return Boolean(node.__dom && node.__dom.childNodes !== undefined);
},
getChildNodes: function (node) {
return this.hasChildNodes(node) ? this._getChildNodes(node) : node.childNodes;
},
_getChildNodes: function (node) {
if (!node.__dom.childNodes) {
node.__dom.childNodes = [];
for (var n = node.__dom.firstChild; n; n = n.__dom.nextSibling) {
node.__dom.childNodes.push(n);
}
}
return node.__dom.childNodes;
},
getParentNode: function (node) {
return node.__dom && node.__dom.parentNode !== undefined ? node.__dom.parentNode : node.parentNode;
},
getFirstChild: function (node) {
return node.__dom && node.__dom.firstChild !== undefined ? node.__dom.firstChild : node.firstChild;
},
getLastChild: function (node) {
return node.__dom && node.__dom.lastChild !== undefined ? node.__dom.lastChild : node.lastChild;
},
getNextSibling: function (node) {
return node.__dom && node.__dom.nextSibling !== undefined ? node.__dom.nextSibling : node.nextSibling;
},
getPreviousSibling: function (node) {
return node.__dom && node.__dom.previousSibling !== undefined ? node.__dom.previousSibling : node.previousSibling;
},
getFirstElementChild: function (node) {
return node.__dom && node.__dom.firstChild !== undefined ? this._getFirstElementChild(node) : node.firstElementChild;
},
_getFirstElementChild: function (node) {
var n = node.__dom.firstChild;
while (n && n.nodeType !== Node.ELEMENT_NODE) {
n = n.__dom.nextSibling;
}
return n;
},
getLastElementChild: function (node) {
return node.__dom && node.__dom.lastChild !== undefined ? this._getLastElementChild(node) : node.lastElementChild;
},
_getLastElementChild: function (node) {
var n = node.__dom.lastChild;
while (n && n.nodeType !== Node.ELEMENT_NODE) {
n = n.__dom.previousSibling;
}
return n;
},
getNextElementSibling: function (node) {
return node.__dom && node.__dom.nextSibling !== undefined ? this._getNextElementSibling(node) : node.nextElementSibling;
},
_getNextElementSibling: function (node) {
var n = node.__dom.nextSibling;
while (n && n.nodeType !== Node.ELEMENT_NODE) {
n = n.__dom.nextSibling;
}
return n;
},
getPreviousElementSibling: function (node) {
return node.__dom && node.__dom.previousSibling !== undefined ? this._getPreviousElementSibling(node) : node.previousElementSibling;
},
_getPreviousElementSibling: function (node) {
var n = node.__dom.previousSibling;
while (n && n.nodeType !== Node.ELEMENT_NODE) {
n = n.__dom.previousSibling;
}
return n;
},
saveChildNodes: function (node) {
if (!this.hasChildNodes(node)) {
node.__dom = node.__dom || {};
node.__dom.firstChild = node.firstChild;
node.__dom.lastChild = node.lastChild;
node.__dom.childNodes = [];
for (var n = node.firstChild; n; n = n.nextSibling) {
n.__dom = n.__dom || {};
n.__dom.parentNode = node;
node.__dom.childNodes.push(n);
n.__dom.nextSibling = n.nextSibling;
n.__dom.previousSibling = n.previousSibling;
}
}
},
recordInsertBefore: function (node, container, ref_node) {
container.__dom.childNodes = null;
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
for (var n = node.firstChild; n; n = n.nextSibling) {
this._linkNode(n, container, ref_node);
}
} else {
this._linkNode(node, container, ref_node);
}
},
_linkNode: function (node, container, ref_node) {
node.__dom = node.__dom || {};
container.__dom = container.__dom || {};
if (ref_node) {
ref_node.__dom = ref_node.__dom || {};
}
node.__dom.previousSibling = ref_node ? ref_node.__dom.previousSibling : container.__dom.lastChild;
if (node.__dom.previousSibling) {
node.__dom.previousSibling.__dom.nextSibling = node;
}
node.__dom.nextSibling = ref_node;
if (node.__dom.nextSibling) {
node.__dom.nextSibling.__dom.previousSibling = node;
}
node.__dom.parentNode = container;
if (ref_node) {
if (ref_node === container.__dom.firstChild) {
container.__dom.firstChild = node;
}
} else {
container.__dom.lastChild = node;
if (!container.__dom.firstChild) {
container.__dom.firstChild = node;
}
}
container.__dom.childNodes = null;
},
recordRemoveChild: function (node, container) {
node.__dom = node.__dom || {};
container.__dom = container.__dom || {};
if (node === container.__dom.firstChild) {
container.__dom.firstChild = node.__dom.nextSibling;
}
if (node === container.__dom.lastChild) {
container.__dom.lastChild = node.__dom.previousSibling;
}
var p = node.__dom.previousSibling;
var n = node.__dom.nextSibling;
if (p) {
p.__dom.nextSibling = n;
}
if (n) {
n.__dom.previousSibling = p;
}
node.__dom.parentNode = node.__dom.previousSibling = node.__dom.nextSibling = undefined;
container.__dom.childNodes = null;
}
};
Polymer.TreeApi.Composed = {
getChildNodes: function (node) {
return Polymer.TreeApi.arrayCopyChildNodes(node);
},
getParentNode: function (node) {
return node.parentNode;
},
clearChildNodes: function (node) {
node.textContent = '';
},
insertBefore: function (parentNode, newChild, refChild) {
return nativeInsertBefore.call(parentNode, newChild, refChild || null);
},
appendChild: function (parentNode, newChild) {
return nativeAppendChild.call(parentNode, newChild);
},
removeChild: function (parentNode, node) {
return nativeRemoveChild.call(parentNode, node);
}
};
}());
Polymer.DomApi = function () {
'use strict';
var Settings = Polymer.Settings;
var TreeApi = Polymer.TreeApi;
var DomApi = function (node) {
this.node = needsToWrap ? DomApi.wrap(node) : node;
};
var needsToWrap = Settings.hasShadow && !Settings.nativeShadow;
DomApi.wrap = window.wrap ? window.wrap : function (node) {
return node;
};
DomApi.prototype = {
flush: function () {
Polymer.dom.flush();
},
deepContains: function (node) {
if (this.node.contains(node)) {
return true;
}
var n = node;
var doc = node.ownerDocument;
while (n && n !== doc && n !== this.node) {
n = Polymer.dom(n).parentNode || n.host;
}
return n === this.node;
},
queryDistributedElements: function (selector) {
var c$ = this.getEffectiveChildNodes();
var list = [];
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
if (c.nodeType === Node.ELEMENT_NODE && DomApi.matchesSelector.call(c, selector)) {
list.push(c);
}
}
return list;
},
getEffectiveChildNodes: function () {
var list = [];
var c$ = this.childNodes;
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
if (c.localName === CONTENT) {
var d$ = dom(c).getDistributedNodes();
for (var j = 0; j < d$.length; j++) {
list.push(d$[j]);
}
} else {
list.push(c);
}
}
return list;
},
observeNodes: function (callback) {
if (callback) {
if (!this.observer) {
this.observer = this.node.localName === CONTENT ? new DomApi.DistributedNodesObserver(this) : new DomApi.EffectiveNodesObserver(this);
}
return this.observer.addListener(callback);
}
},
unobserveNodes: function (handle) {
if (this.observer) {
this.observer.removeListener(handle);
}
},
notifyObserver: function () {
if (this.observer) {
this.observer.notify();
}
},
_query: function (matcher, node, halter) {
node = node || this.node;
var list = [];
this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);
return list;
},
_queryElements: function (elements, matcher, halter, list) {
for (var i = 0, l = elements.length, c; i < l && (c = elements[i]); i++) {
if (c.nodeType === Node.ELEMENT_NODE) {
if (this._queryElement(c, matcher, halter, list)) {
return true;
}
}
}
},
_queryElement: function (node, matcher, halter, list) {
var result = matcher(node);
if (result) {
list.push(node);
}
if (halter && halter(result)) {
return result;
}
this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);
}
};
var CONTENT = DomApi.CONTENT = 'content';
var dom = DomApi.factory = function (node) {
node = node || document;
if (!node.__domApi) {
node.__domApi = new DomApi.ctor(node);
}
return node.__domApi;
};
DomApi.hasApi = function (node) {
return Boolean(node.__domApi);
};
DomApi.ctor = DomApi;
Polymer.dom = function (obj, patch) {
if (obj instanceof Event) {
return Polymer.EventApi.factory(obj);
} else {
return DomApi.factory(obj, patch);
}
};
var p = Element.prototype;
DomApi.matchesSelector = p.matches || p.matchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;
return DomApi;
}();
(function () {
'use strict';
var Settings = Polymer.Settings;
var DomApi = Polymer.DomApi;
var dom = DomApi.factory;
var TreeApi = Polymer.TreeApi;
var getInnerHTML = Polymer.domInnerHTML.getInnerHTML;
var CONTENT = DomApi.CONTENT;
if (Settings.useShadow) {
return;
}
var nativeCloneNode = Element.prototype.cloneNode;
var nativeImportNode = Document.prototype.importNode;
Polymer.Base.extend(DomApi.prototype, {
_lazyDistribute: function (host) {
if (host.shadyRoot && host.shadyRoot._distributionClean) {
host.shadyRoot._distributionClean = false;
Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
}
},
appendChild: function (node) {
return this.insertBefore(node);
},
insertBefore: function (node, ref_node) {
if (ref_node && TreeApi.Logical.getParentNode(ref_node) !== this.node) {
throw Error('The ref_node to be inserted before is not a child ' + 'of this node');
}
if (node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
var parent = TreeApi.Logical.getParentNode(node);
if (parent) {
if (DomApi.hasApi(parent)) {
dom(parent).notifyObserver();
}
this._removeNode(node);
} else {
this._removeOwnerShadyRoot(node);
}
}
if (!this._addNode(node, ref_node)) {
if (ref_node) {
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
}
var container = this.node._isShadyRoot ? this.node.host : this.node;
if (ref_node) {
TreeApi.Composed.insertBefore(container, node, ref_node);
} else {
TreeApi.Composed.appendChild(container, node);
}
}
this.notifyObserver();
return node;
},
_addNode: function (node, ref_node) {
var root = this.getOwnerRoot();
if (root) {
var ipAdded = this._maybeAddInsertionPoint(node, this.node);
if (!root._invalidInsertionPoints) {
root._invalidInsertionPoints = ipAdded;
}
this._addNodeToHost(root.host, node);
}
if (TreeApi.Logical.hasChildNodes(this.node)) {
TreeApi.Logical.recordInsertBefore(node, this.node, ref_node);
}
var handled = this._maybeDistribute(node) || this.node.shadyRoot;
if (handled) {
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
while (node.firstChild) {
TreeApi.Composed.removeChild(node, node.firstChild);
}
} else {
var parent = TreeApi.Composed.getParentNode(node);
if (parent) {
TreeApi.Composed.removeChild(parent, node);
}
}
}
return handled;
},
removeChild: function (node) {
if (TreeApi.Logical.getParentNode(node) !== this.node) {
throw Error('The node to be removed is not a child of this node: ' + node);
}
if (!this._removeNode(node)) {
var container = this.node._isShadyRoot ? this.node.host : this.node;
var parent = TreeApi.Composed.getParentNode(node);
if (container === parent) {
TreeApi.Composed.removeChild(container, node);
}
}
this.notifyObserver();
return node;
},
_removeNode: function (node) {
var logicalParent = TreeApi.Logical.hasParentNode(node) && TreeApi.Logical.getParentNode(node);
var distributed;
var root = this._ownerShadyRootForNode(node);
if (logicalParent) {
distributed = dom(node)._maybeDistributeParent();
TreeApi.Logical.recordRemoveChild(node, logicalParent);
if (root && this._removeDistributedChildren(root, node)) {
root._invalidInsertionPoints = true;
this._lazyDistribute(root.host);
}
}
this._removeOwnerShadyRoot(node);
if (root) {
this._removeNodeFromHost(root.host, node);
}
return distributed;
},
replaceChild: function (node, ref_node) {
this.insertBefore(node, ref_node);
this.removeChild(ref_node);
return node;
},
_hasCachedOwnerRoot: function (node) {
return Boolean(node._ownerShadyRoot !== undefined);
},
getOwnerRoot: function () {
return this._ownerShadyRootForNode(this.node);
},
_ownerShadyRootForNode: function (node) {
if (!node) {
return;
}
var root = node._ownerShadyRoot;
if (root === undefined) {
if (node._isShadyRoot) {
root = node;
} else {
var parent = TreeApi.Logical.getParentNode(node);
if (parent) {
root = parent._isShadyRoot ? parent : this._ownerShadyRootForNode(parent);
} else {
root = null;
}
}
if (root || document.documentElement.contains(node)) {
node._ownerShadyRoot = root;
}
}
return root;
},
_maybeDistribute: function (node) {
var fragContent = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent && dom(node).querySelector(CONTENT);
var wrappedContent = fragContent && TreeApi.Logical.getParentNode(fragContent).nodeType !== Node.DOCUMENT_FRAGMENT_NODE;
var hasContent = fragContent || node.localName === CONTENT;
if (hasContent) {
var root = this.getOwnerRoot();
if (root) {
this._lazyDistribute(root.host);
}
}
var needsDist = this._nodeNeedsDistribution(this.node);
if (needsDist) {
this._lazyDistribute(this.node);
}
return needsDist || hasContent && !wrappedContent;
},
_maybeAddInsertionPoint: function (node, parent) {
var added;
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent) {
var c$ = dom(node).querySelectorAll(CONTENT);
for (var i = 0, n, np, na; i < c$.length && (n = c$[i]); i++) {
np = TreeApi.Logical.getParentNode(n);
if (np === node) {
np = parent;
}
na = this._maybeAddInsertionPoint(n, np);
added = added || na;
}
} else if (node.localName === CONTENT) {
TreeApi.Logical.saveChildNodes(parent);
TreeApi.Logical.saveChildNodes(node);
added = true;
}
return added;
},
_updateInsertionPoints: function (host) {
var i$ = host.shadyRoot._insertionPoints = dom(host.shadyRoot).querySelectorAll(CONTENT);
for (var i = 0, c; i < i$.length; i++) {
c = i$[i];
TreeApi.Logical.saveChildNodes(c);
TreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c));
}
},
_nodeNeedsDistribution: function (node) {
return node && node.shadyRoot && DomApi.hasInsertionPoint(node.shadyRoot);
},
_addNodeToHost: function (host, node) {
if (host._elementAdd) {
host._elementAdd(node);
}
},
_removeNodeFromHost: function (host, node) {
if (host._elementRemove) {
host._elementRemove(node);
}
},
_removeDistributedChildren: function (root, container) {
var hostNeedsDist;
var ip$ = root._insertionPoints;
for (var i = 0; i < ip$.length; i++) {
var content = ip$[i];
if (this._contains(container, content)) {
var dc$ = dom(content).getDistributedNodes();
for (var j = 0; j < dc$.length; j++) {
hostNeedsDist = true;
var node = dc$[j];
var parent = TreeApi.Composed.getParentNode(node);
if (parent) {
TreeApi.Composed.removeChild(parent, node);
}
}
}
}
return hostNeedsDist;
},
_contains: function (container, node) {
while (node) {
if (node == container) {
return true;
}
node = TreeApi.Logical.getParentNode(node);
}
},
_removeOwnerShadyRoot: function (node) {
if (this._hasCachedOwnerRoot(node)) {
var c$ = TreeApi.Logical.getChildNodes(node);
for (var i = 0, l = c$.length, n; i < l && (n = c$[i]); i++) {
this._removeOwnerShadyRoot(n);
}
}
node._ownerShadyRoot = undefined;
},
_firstComposedNode: function (content) {
var n$ = dom(content).getDistributedNodes();
for (var i = 0, l = n$.length, n, p$; i < l && (n = n$[i]); i++) {
p$ = dom(n).getDestinationInsertionPoints();
if (p$[p$.length - 1] === content) {
return n;
}
}
},
querySelector: function (selector) {
var result = this._query(function (n) {
return DomApi.matchesSelector.call(n, selector);
}, this.node, function (n) {
return Boolean(n);
})[0];
return result || null;
},
querySelectorAll: function (selector) {
return this._query(function (n) {
return DomApi.matchesSelector.call(n, selector);
}, this.node);
},
getDestinationInsertionPoints: function () {
return this.node._destinationInsertionPoints || [];
},
getDistributedNodes: function () {
return this.node._distributedNodes || [];
},
_clear: function () {
while (this.childNodes.length) {
this.removeChild(this.childNodes[0]);
}
},
setAttribute: function (name, value) {
this.node.setAttribute(name, value);
this._maybeDistributeParent();
},
removeAttribute: function (name) {
this.node.removeAttribute(name);
this._maybeDistributeParent();
},
_maybeDistributeParent: function () {
if (this._nodeNeedsDistribution(this.parentNode)) {
this._lazyDistribute(this.parentNode);
return true;
}
},
cloneNode: function (deep) {
var n = nativeCloneNode.call(this.node, false);
if (deep) {
var c$ = this.childNodes;
var d = dom(n);
for (var i = 0, nc; i < c$.length; i++) {
nc = dom(c$[i]).cloneNode(true);
d.appendChild(nc);
}
}
return n;
},
importNode: function (externalNode, deep) {
var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
var n = nativeImportNode.call(doc, externalNode, false);
if (deep) {
var c$ = TreeApi.Logical.getChildNodes(externalNode);
var d = dom(n);
for (var i = 0, nc; i < c$.length; i++) {
nc = dom(doc).importNode(c$[i], true);
d.appendChild(nc);
}
}
return n;
},
_getComposedInnerHTML: function () {
return getInnerHTML(this.node, true);
}
});
Object.defineProperties(DomApi.prototype, {
activeElement: {
get: function () {
var active = document.activeElement;
if (!active) {
return null;
}
var isShadyRoot = !!this.node._isShadyRoot;
if (this.node !== document) {
if (!isShadyRoot) {
return null;
}
if (this.node.host === active || !this.node.host.contains(active)) {
return null;
}
}
var activeRoot = dom(active).getOwnerRoot();
while (activeRoot && activeRoot !== this.node) {
active = activeRoot.host;
activeRoot = dom(active).getOwnerRoot();
}
if (this.node === document) {
return activeRoot ? null : active;
} else {
return activeRoot === this.node ? active : null;
}
},
configurable: true
},
childNodes: {
get: function () {
var c$ = TreeApi.Logical.getChildNodes(this.node);
return Array.isArray(c$) ? c$ : TreeApi.arrayCopyChildNodes(this.node);
},
configurable: true
},
children: {
get: function () {
if (TreeApi.Logical.hasChildNodes(this.node)) {
return Array.prototype.filter.call(this.childNodes, function (n) {
return n.nodeType === Node.ELEMENT_NODE;
});
} else {
return TreeApi.arrayCopyChildren(this.node);
}
},
configurable: true
},
parentNode: {
get: function () {
return TreeApi.Logical.getParentNode(this.node);
},
configurable: true
},
firstChild: {
get: function () {
return TreeApi.Logical.getFirstChild(this.node);
},
configurable: true
},
lastChild: {
get: function () {
return TreeApi.Logical.getLastChild(this.node);
},
configurable: true
},
nextSibling: {
get: function () {
return TreeApi.Logical.getNextSibling(this.node);
},
configurable: true
},
previousSibling: {
get: function () {
return TreeApi.Logical.getPreviousSibling(this.node);
},
configurable: true
},
firstElementChild: {
get: function () {
return TreeApi.Logical.getFirstElementChild(this.node);
},
configurable: true
},
lastElementChild: {
get: function () {
return TreeApi.Logical.getLastElementChild(this.node);
},
configurable: true
},
nextElementSibling: {
get: function () {
return TreeApi.Logical.getNextElementSibling(this.node);
},
configurable: true
},
previousElementSibling: {
get: function () {
return TreeApi.Logical.getPreviousElementSibling(this.node);
},
configurable: true
},
textContent: {
get: function () {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
return this.node.textContent;
} else {
var tc = [];
for (var i = 0, cn = this.childNodes, c; c = cn[i]; i++) {
if (c.nodeType !== Node.COMMENT_NODE) {
tc.push(c.textContent);
}
}
return tc.join('');
}
},
set: function (text) {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
this.node.textContent = text;
} else {
this._clear();
if (text) {
this.appendChild(document.createTextNode(text));
}
}
},
configurable: true
},
innerHTML: {
get: function () {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
return null;
} else {
return getInnerHTML(this.node);
}
},
set: function (text) {
var nt = this.node.nodeType;
if (nt !== Node.TEXT_NODE || nt !== Node.COMMENT_NODE) {
this._clear();
var d = document.createElement('div');
d.innerHTML = text;
var c$ = TreeApi.arrayCopyChildNodes(d);
for (var i = 0; i < c$.length; i++) {
this.appendChild(c$[i]);
}
}
},
configurable: true
}
});
DomApi.hasInsertionPoint = function (root) {
return Boolean(root && root._insertionPoints.length);
};
}());
(function () {
'use strict';
var Settings = Polymer.Settings;
var TreeApi = Polymer.TreeApi;
var DomApi = Polymer.DomApi;
if (!Settings.useShadow) {
return;
}
Polymer.Base.extend(DomApi.prototype, {
querySelectorAll: function (selector) {
return TreeApi.arrayCopy(this.node.querySelectorAll(selector));
},
getOwnerRoot: function () {
var n = this.node;
while (n) {
if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.host) {
return n;
}
n = n.parentNode;
}
},
importNode: function (externalNode, deep) {
var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
return doc.importNode(externalNode, deep);
},
getDestinationInsertionPoints: function () {
var n$ = this.node.getDestinationInsertionPoints && this.node.getDestinationInsertionPoints();
return n$ ? TreeApi.arrayCopy(n$) : [];
},
getDistributedNodes: function () {
var n$ = this.node.getDistributedNodes && this.node.getDistributedNodes();
return n$ ? TreeApi.arrayCopy(n$) : [];
}
});
Object.defineProperties(DomApi.prototype, {
activeElement: {
get: function () {
var node = DomApi.wrap(this.node);
var activeElement = node.activeElement;
return node.contains(activeElement) ? activeElement : null;
},
configurable: true
},
childNodes: {
get: function () {
return TreeApi.arrayCopyChildNodes(this.node);
},
configurable: true
},
children: {
get: function () {
return TreeApi.arrayCopyChildren(this.node);
},
configurable: true
},
textContent: {
get: function () {
return this.node.textContent;
},
set: function (value) {
return this.node.textContent = value;
},
configurable: true
},
innerHTML: {
get: function () {
return this.node.innerHTML;
},
set: function (value) {
return this.node.innerHTML = value;
},
configurable: true
}
});
var forwardMethods = function (m$) {
for (var i = 0; i < m$.length; i++) {
forwardMethod(m$[i]);
}
};
var forwardMethod = function (method) {
DomApi.prototype[method] = function () {
return this.node[method].apply(this.node, arguments);
};
};
forwardMethods([
'cloneNode',
'appendChild',
'insertBefore',
'removeChild',
'replaceChild',
'setAttribute',
'removeAttribute',
'querySelector'
]);
var forwardProperties = function (f$) {
for (var i = 0; i < f$.length; i++) {
forwardProperty(f$[i]);
}
};
var forwardProperty = function (name) {
Object.defineProperty(DomApi.prototype, name, {
get: function () {
return this.node[name];
},
configurable: true
});
};
forwardProperties([
'parentNode',
'firstChild',
'lastChild',
'nextSibling',
'previousSibling',
'firstElementChild',
'lastElementChild',
'nextElementSibling',
'previousElementSibling'
]);
}());
Polymer.Base.extend(Polymer.dom, {
_flushGuard: 0,
_FLUSH_MAX: 100,
_needsTakeRecords: !Polymer.Settings.useNativeCustomElements,
_debouncers: [],
_staticFlushList: [],
_finishDebouncer: null,
flush: function () {
this._flushGuard = 0;
this._prepareFlush();
while (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) {
while (this._debouncers.length) {
this._debouncers.shift().complete();
}
if (this._finishDebouncer) {
this._finishDebouncer.complete();
}
this._prepareFlush();
this._flushGuard++;
}
if (this._flushGuard >= this._FLUSH_MAX) {
console.warn('Polymer.dom.flush aborted. Flush may not be complete.');
}
},
_prepareFlush: function () {
if (this._needsTakeRecords) {
CustomElements.takeRecords();
}
for (var i = 0; i < this._staticFlushList.length; i++) {
this._staticFlushList[i]();
}
},
addStaticFlush: function (fn) {
this._staticFlushList.push(fn);
},
removeStaticFlush: function (fn) {
var i = this._staticFlushList.indexOf(fn);
if (i >= 0) {
this._staticFlushList.splice(i, 1);
}
},
addDebouncer: function (debouncer) {
this._debouncers.push(debouncer);
this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush);
},
_finishFlush: function () {
Polymer.dom._debouncers = [];
}
});
Polymer.EventApi = function () {
'use strict';
var DomApi = Polymer.DomApi.ctor;
var Settings = Polymer.Settings;
DomApi.Event = function (event) {
this.event = event;
};
if (Settings.useShadow) {
DomApi.Event.prototype = {
get rootTarget() {
return this.event.path[0];
},
get localTarget() {
return this.event.target;
},
get path() {
var path = this.event.path;
if (!Array.isArray(path)) {
path = Array.prototype.slice.call(path);
}
return path;
}
};
} else {
DomApi.Event.prototype = {
get rootTarget() {
return this.event.target;
},
get localTarget() {
var current = this.event.currentTarget;
var currentRoot = current && Polymer.dom(current).getOwnerRoot();
var p$ = this.path;
for (var i = 0; i < p$.length; i++) {
if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) {
return p$[i];
}
}
},
get path() {
if (!this.event._path) {
var path = [];
var current = this.rootTarget;
while (current) {
path.push(current);
var insertionPoints = Polymer.dom(current).getDestinationInsertionPoints();
if (insertionPoints.length) {
for (var i = 0; i < insertionPoints.length - 1; i++) {
path.push(insertionPoints[i]);
}
current = insertionPoints[insertionPoints.length - 1];
} else {
current = Polymer.dom(current).parentNode || current.host;
}
}
path.push(window);
this.event._path = path;
}
return this.event._path;
}
};
}
var factory = function (event) {
if (!event.__eventApi) {
event.__eventApi = new DomApi.Event(event);
}
return event.__eventApi;
};
return { factory: factory };
}();
(function () {
'use strict';
var DomApi = Polymer.DomApi.ctor;
var useShadow = Polymer.Settings.useShadow;
Object.defineProperty(DomApi.prototype, 'classList', {
get: function () {
if (!this._classList) {
this._classList = new DomApi.ClassList(this);
}
return this._classList;
},
configurable: true
});
DomApi.ClassList = function (host) {
this.domApi = host;
this.node = host.node;
};
DomApi.ClassList.prototype = {
add: function () {
this.node.classList.add.apply(this.node.classList, arguments);
this._distributeParent();
},
remove: function () {
this.node.classList.remove.apply(this.node.classList, arguments);
this._distributeParent();
},
toggle: function () {
this.node.classList.toggle.apply(this.node.classList, arguments);
this._distributeParent();
},
_distributeParent: function () {
if (!useShadow) {
this.domApi._maybeDistributeParent();
}
},
contains: function () {
return this.node.classList.contains.apply(this.node.classList, arguments);
}
};
}());
(function () {
'use strict';
var DomApi = Polymer.DomApi.ctor;
var Settings = Polymer.Settings;
DomApi.EffectiveNodesObserver = function (domApi) {
this.domApi = domApi;
this.node = this.domApi.node;
this._listeners = [];
};
DomApi.EffectiveNodesObserver.prototype = {
addListener: function (callback) {
if (!this._isSetup) {
this._setup();
this._isSetup = true;
}
var listener = {
fn: callback,
_nodes: []
};
this._listeners.push(listener);
this._scheduleNotify();
return listener;
},
removeListener: function (handle) {
var i = this._listeners.indexOf(handle);
if (i >= 0) {
this._listeners.splice(i, 1);
handle._nodes = [];
}
if (!this._hasListeners()) {
this._cleanup();
this._isSetup = false;
}
},
_setup: function () {
this._observeContentElements(this.domApi.childNodes);
},
_cleanup: function () {
this._unobserveContentElements(this.domApi.childNodes);
},
_hasListeners: function () {
return Boolean(this._listeners.length);
},
_scheduleNotify: function () {
if (this._debouncer) {
this._debouncer.stop();
}
this._debouncer = Polymer.Debounce(this._debouncer, this._notify);
this._debouncer.context = this;
Polymer.dom.addDebouncer(this._debouncer);
},
notify: function () {
if (this._hasListeners()) {
this._scheduleNotify();
}
},
_notify: function () {
this._beforeCallListeners();
this._callListeners();
},
_beforeCallListeners: function () {
this._updateContentElements();
},
_updateContentElements: function () {
this._observeContentElements(this.domApi.childNodes);
},
_observeContentElements: function (elements) {
for (var i = 0, n; i < elements.length && (n = elements[i]); i++) {
if (this._isContent(n)) {
n.__observeNodesMap = n.__observeNodesMap || new WeakMap();
if (!n.__observeNodesMap.has(this)) {
n.__observeNodesMap.set(this, this._observeContent(n));
}
}
}
},
_observeContent: function (content) {
var self = this;
var h = Polymer.dom(content).observeNodes(function () {
self._scheduleNotify();
});
h._avoidChangeCalculation = true;
return h;
},
_unobserveContentElements: function (elements) {
for (var i = 0, n, h; i < elements.length && (n = elements[i]); i++) {
if (this._isContent(n)) {
h = n.__observeNodesMap.get(this);
if (h) {
Polymer.dom(n).unobserveNodes(h);
n.__observeNodesMap.delete(this);
}
}
}
},
_isContent: function (node) {
return node.localName === 'content';
},
_callListeners: function () {
var o$ = this._listeners;
var nodes = this._getEffectiveNodes();
for (var i = 0, o; i < o$.length && (o = o$[i]); i++) {
var info = this._generateListenerInfo(o, nodes);
if (info || o._alwaysNotify) {
this._callListener(o, info);
}
}
},
_getEffectiveNodes: function () {
return this.domApi.getEffectiveChildNodes();
},
_generateListenerInfo: function (listener, newNodes) {
if (listener._avoidChangeCalculation) {
return true;
}
var oldNodes = listener._nodes;
var info = {
target: this.node,
addedNodes: [],
removedNodes: []
};
var splices = Polymer.ArraySplice.calculateSplices(newNodes, oldNodes);
for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {
info.removedNodes.push(n);
}
}
for (i = 0, s; i < splices.length && (s = splices[i]); i++) {
for (j = s.index; j < s.index + s.addedCount; j++) {
info.addedNodes.push(newNodes[j]);
}
}
listener._nodes = newNodes;
if (info.addedNodes.length || info.removedNodes.length) {
return info;
}
},
_callListener: function (listener, info) {
return listener.fn.call(this.node, info);
},
enableShadowAttributeTracking: function () {
}
};
if (Settings.useShadow) {
var baseSetup = DomApi.EffectiveNodesObserver.prototype._setup;
var baseCleanup = DomApi.EffectiveNodesObserver.prototype._cleanup;
Polymer.Base.extend(DomApi.EffectiveNodesObserver.prototype, {
_setup: function () {
if (!this._observer) {
var self = this;
this._mutationHandler = function (mxns) {
if (mxns && mxns.length) {
self._scheduleNotify();
}
};
this._observer = new MutationObserver(this._mutationHandler);
this._boundFlush = function () {
self._flush();
};
Polymer.dom.addStaticFlush(this._boundFlush);
this._observer.observe(this.node, { childList: true });
}
baseSetup.call(this);
},
_cleanup: function () {
this._observer.disconnect();
this._observer = null;
this._mutationHandler = null;
Polymer.dom.removeStaticFlush(this._boundFlush);
baseCleanup.call(this);
},
_flush: function () {
if (this._observer) {
this._mutationHandler(this._observer.takeRecords());
}
},
enableShadowAttributeTracking: function () {
if (this._observer) {
this._makeContentListenersAlwaysNotify();
this._observer.disconnect();
this._observer.observe(this.node, {
childList: true,
attributes: true,
subtree: true
});
var root = this.domApi.getOwnerRoot();
var host = root && root.host;
if (host && Polymer.dom(host).observer) {
Polymer.dom(host).observer.enableShadowAttributeTracking();
}
}
},
_makeContentListenersAlwaysNotify: function () {
for (var i = 0, h; i < this._listeners.length; i++) {
h = this._listeners[i];
h._alwaysNotify = h._isContentListener;
}
}
});
}
}());
(function () {
'use strict';
var DomApi = Polymer.DomApi.ctor;
var Settings = Polymer.Settings;
DomApi.DistributedNodesObserver = function (domApi) {
DomApi.EffectiveNodesObserver.call(this, domApi);
};
DomApi.DistributedNodesObserver.prototype = Object.create(DomApi.EffectiveNodesObserver.prototype);
Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, {
_setup: function () {
},
_cleanup: function () {
},
_beforeCallListeners: function () {
},
_getEffectiveNodes: function () {
return this.domApi.getDistributedNodes();
}
});
if (Settings.useShadow) {
Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, {
_setup: function () {
if (!this._observer) {
var root = this.domApi.getOwnerRoot();
var host = root && root.host;
if (host) {
var self = this;
this._observer = Polymer.dom(host).observeNodes(function () {
self._scheduleNotify();
});
this._observer._isContentListener = true;
if (this._hasAttrSelect()) {
Polymer.dom(host).observer.enableShadowAttributeTracking();
}
}
}
},
_hasAttrSelect: function () {
var select = this.node.getAttribute('select');
return select && select.match(/[[.]+/);
},
_cleanup: function () {
var root = this.domApi.getOwnerRoot();
var host = root && root.host;
if (host) {
Polymer.dom(host).unobserveNodes(this._observer);
}
this._observer = null;
}
});
}
}());
(function () {
var DomApi = Polymer.DomApi;
var TreeApi = Polymer.TreeApi;
Polymer.Base._addFeature({
_prepShady: function () {
this._useContent = this._useContent || Boolean(this._template);
},
_setupShady: function () {
this.shadyRoot = null;
if (!this.__domApi) {
this.__domApi = null;
}
if (!this.__dom) {
this.__dom = null;
}
if (!this._ownerShadyRoot) {
this._ownerShadyRoot = undefined;
}
},
_poolContent: function () {
if (this._useContent) {
TreeApi.Logical.saveChildNodes(this);
}
},
_setupRoot: function () {
if (this._useContent) {
this._createLocalRoot();
if (!this.dataHost) {
upgradeLogicalChildren(TreeApi.Logical.getChildNodes(this));
}
}
},
_createLocalRoot: function () {
this.shadyRoot = this.root;
this.shadyRoot._distributionClean = false;
this.shadyRoot._hasDistributed = false;
this.shadyRoot._isShadyRoot = true;
this.shadyRoot._dirtyRoots = [];
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
TreeApi.Logical.saveChildNodes(this.shadyRoot);
for (var i = 0, c; i < i$.length; i++) {
c = i$[i];
TreeApi.Logical.saveChildNodes(c);
TreeApi.Logical.saveChildNodes(c.parentNode);
}
this.shadyRoot.host = this;
},
get domHost() {
var root = Polymer.dom(this).getOwnerRoot();
return root && root.host;
},
distributeContent: function (updateInsertionPoints) {
if (this.shadyRoot) {
this.shadyRoot._invalidInsertionPoints = this.shadyRoot._invalidInsertionPoints || updateInsertionPoints;
var host = getTopDistributingHost(this);
Polymer.dom(this)._lazyDistribute(host);
}
},
_distributeContent: function () {
if (this._useContent && !this.shadyRoot._distributionClean) {
if (this.shadyRoot._invalidInsertionPoints) {
Polymer.dom(this)._updateInsertionPoints(this);
this.shadyRoot._invalidInsertionPoints = false;
}
this._beginDistribute();
this._distributeDirtyRoots();
this._finishDistribute();
}
},
_beginDistribute: function () {
if (this._useContent && DomApi.hasInsertionPoint(this.shadyRoot)) {
this._resetDistribution();
this._distributePool(this.shadyRoot, this._collectPool());
}
},
_distributeDirtyRoots: function () {
var c$ = this.shadyRoot._dirtyRoots;
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
c._distributeContent();
}
this.shadyRoot._dirtyRoots = [];
},
_finishDistribute: function () {
if (this._useContent) {
this.shadyRoot._distributionClean = true;
if (DomApi.hasInsertionPoint(this.shadyRoot)) {
this._composeTree();
notifyContentObservers(this.shadyRoot);
} else {
if (!this.shadyRoot._hasDistributed) {
TreeApi.Composed.clearChildNodes(this);
this.appendChild(this.shadyRoot);
} else {
var children = this._composeNode(this);
this._updateChildNodes(this, children);
}
}
if (!this.shadyRoot._hasDistributed) {
notifyInitialDistribution(this);
}
this.shadyRoot._hasDistributed = true;
}
},
elementMatches: function (selector, node) {
node = node || this;
return DomApi.matchesSelector.call(node, selector);
},
_resetDistribution: function () {
var children = TreeApi.Logical.getChildNodes(this);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child._destinationInsertionPoints) {
child._destinationInsertionPoints = undefined;
}
if (isInsertionPoint(child)) {
clearDistributedDestinationInsertionPoints(child);
}
}
var root = this.shadyRoot;
var p$ = root._insertionPoints;
for (var j = 0; j < p$.length; j++) {
p$[j]._distributedNodes = [];
}
},
_collectPool: function () {
var pool = [];
var children = TreeApi.Logical.getChildNodes(this);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (isInsertionPoint(child)) {
pool.push.apply(pool, child._distributedNodes);
} else {
pool.push(child);
}
}
return pool;
},
_distributePool: function (node, pool) {
var p$ = node._insertionPoints;
for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
this._distributeInsertionPoint(p, pool);
maybeRedistributeParent(p, this);
}
},
_distributeInsertionPoint: function (content, pool) {
var anyDistributed = false;
for (var i = 0, l = pool.length, node; i < l; i++) {
node = pool[i];
if (!node) {
continue;
}
if (this._matchesContentSelect(node, content)) {
distributeNodeInto(node, content);
pool[i] = undefined;
anyDistributed = true;
}
}
if (!anyDistributed) {
var children = TreeApi.Logical.getChildNodes(content);
for (var j = 0; j < children.length; j++) {
distributeNodeInto(children[j], content);
}
}
},
_composeTree: function () {
this._updateChildNodes(this, this._composeNode(this));
var p$ = this.shadyRoot._insertionPoints;
for (var i = 0, l = p$.length, p, parent; i < l && (p = p$[i]); i++) {
parent = TreeApi.Logical.getParentNode(p);
if (!parent._useContent && parent !== this && parent !== this.shadyRoot) {
this._updateChildNodes(parent, this._composeNode(parent));
}
}
},
_composeNode: function (node) {
var children = [];
var c$ = TreeApi.Logical.getChildNodes(node.shadyRoot || node);
for (var i = 0; i < c$.length; i++) {
var child = c$[i];
if (isInsertionPoint(child)) {
var distributedNodes = child._distributedNodes;
for (var j = 0; j < distributedNodes.length; j++) {
var distributedNode = distributedNodes[j];
if (isFinalDestination(child, distributedNode)) {
children.push(distributedNode);
}
}
} else {
children.push(child);
}
}
return children;
},
_updateChildNodes: function (container, children) {
var composed = TreeApi.Composed.getChildNodes(container);
var splices = Polymer.ArraySplice.calculateSplices(children, composed);
for (var i = 0, d = 0, s; i < splices.length && (s = splices[i]); i++) {
for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {
if (TreeApi.Composed.getParentNode(n) === container) {
TreeApi.Composed.removeChild(container, n);
}
composed.splice(s.index + d, 1);
}
d -= s.addedCount;
}
for (var i = 0, s, next; i < splices.length && (s = splices[i]); i++) {
next = composed[s.index];
for (j = s.index, n; j < s.index + s.addedCount; j++) {
n = children[j];
TreeApi.Composed.insertBefore(container, n, next);
composed.splice(j, 0, n);
}
}
},
_matchesContentSelect: function (node, contentElement) {
var select = contentElement.getAttribute('select');
if (!select) {
return true;
}
select = select.trim();
if (!select) {
return true;
}
if (!(node instanceof Element)) {
return false;
}
var validSelectors = /^(:not\()?[*.#[a-zA-Z_|]/;
if (!validSelectors.test(select)) {
return false;
}
return this.elementMatches(select, node);
},
_elementAdd: function () {
},
_elementRemove: function () {
}
});
function distributeNodeInto(child, insertionPoint) {
insertionPoint._distributedNodes.push(child);
var points = child._destinationInsertionPoints;
if (!points) {
child._destinationInsertionPoints = [insertionPoint];
} else {
points.push(insertionPoint);
}
}
function clearDistributedDestinationInsertionPoints(content) {
var e$ = content._distributedNodes;
if (e$) {
for (var i = 0; i < e$.length; i++) {
var d = e$[i]._destinationInsertionPoints;
if (d) {
d.splice(d.indexOf(content) + 1, d.length);
}
}
}
}
function maybeRedistributeParent(content, host) {
var parent = TreeApi.Logical.getParentNode(content);
if (parent && parent.shadyRoot && DomApi.hasInsertionPoint(parent.shadyRoot) && parent.shadyRoot._distributionClean) {
parent.shadyRoot._distributionClean = false;
host.shadyRoot._dirtyRoots.push(parent);
}
}
function isFinalDestination(insertionPoint, node) {
var points = node._destinationInsertionPoints;
return points && points[points.length - 1] === insertionPoint;
}
function isInsertionPoint(node) {
return node.localName == 'content';
}
function getTopDistributingHost(host) {
while (host && hostNeedsRedistribution(host)) {
host = host.domHost;
}
return host;
}
function hostNeedsRedistribution(host) {
var c$ = TreeApi.Logical.getChildNodes(host);
for (var i = 0, c; i < c$.length; i++) {
c = c$[i];
if (c.localName && c.localName === 'content') {
return host.domHost;
}
}
}
function notifyContentObservers(root) {
for (var i = 0, c; i < root._insertionPoints.length; i++) {
c = root._insertionPoints[i];
if (DomApi.hasApi(c)) {
Polymer.dom(c).notifyObserver();
}
}
}
function notifyInitialDistribution(host) {
if (DomApi.hasApi(host)) {
Polymer.dom(host).notifyObserver();
}
}
var needsUpgrade = window.CustomElements && !CustomElements.useNative;
function upgradeLogicalChildren(children) {
if (needsUpgrade && children) {
for (var i = 0; i < children.length; i++) {
CustomElements.upgrade(children[i]);
}
}
}
}());
if (Polymer.Settings.useShadow) {
Polymer.Base._addFeature({
_poolContent: function () {
},
_beginDistribute: function () {
},
distributeContent: function () {
},
_distributeContent: function () {
},
_finishDistribute: function () {
},
_createLocalRoot: function () {
this.createShadowRoot();
this.shadowRoot.appendChild(this.root);
this.root = this.shadowRoot;
}
});
}
Polymer.Async = {
_currVal: 0,
_lastVal: 0,
_callbacks: [],
_twiddleContent: 0,
_twiddle: document.createTextNode(''),
run: function (callback, waitTime) {
if (waitTime > 0) {
return ~setTimeout(callback, waitTime);
} else {
this._twiddle.textContent = this._twiddleContent++;
this._callbacks.push(callback);
return this._currVal++;
}
},
cancel: function (handle) {
if (handle < 0) {
clearTimeout(~handle);
} else {
var idx = handle - this._lastVal;
if (idx >= 0) {
if (!this._callbacks[idx]) {
throw 'invalid async handle: ' + handle;
}
this._callbacks[idx] = null;
}
}
},
_atEndOfMicrotask: function () {
var len = this._callbacks.length;
for (var i = 0; i < len; i++) {
var cb = this._callbacks[i];
if (cb) {
try {
cb();
} catch (e) {
i++;
this._callbacks.splice(0, i);
this._lastVal += i;
this._twiddle.textContent = this._twiddleContent++;
throw e;
}
}
}
this._callbacks.splice(0, len);
this._lastVal += len;
}
};
new window.MutationObserver(function () {
Polymer.Async._atEndOfMicrotask();
}).observe(Polymer.Async._twiddle, { characterData: true });
Polymer.Debounce = function () {
var Async = Polymer.Async;
var Debouncer = function (context) {
this.context = context;
var self = this;
this.boundComplete = function () {
self.complete();
};
};
Debouncer.prototype = {
go: function (callback, wait) {
var h;
this.finish = function () {
Async.cancel(h);
};
h = Async.run(this.boundComplete, wait);
this.callback = callback;
},
stop: function () {
if (this.finish) {
this.finish();
this.finish = null;
}
},
complete: function () {
if (this.finish) {
this.stop();
this.callback.call(this.context);
}
}
};
function debounce(debouncer, callback, wait) {
if (debouncer) {
debouncer.stop();
} else {
debouncer = new Debouncer(this);
}
debouncer.go(callback, wait);
return debouncer;
}
return debounce;
}();
Polymer.Base._addFeature({
_setupDebouncers: function () {
this._debouncers = {};
},
debounce: function (jobName, callback, wait) {
return this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
},
isDebouncerActive: function (jobName) {
var debouncer = this._debouncers[jobName];
return !!(debouncer && debouncer.finish);
},
flushDebouncer: function (jobName) {
var debouncer = this._debouncers[jobName];
if (debouncer) {
debouncer.complete();
}
},
cancelDebouncer: function (jobName) {
var debouncer = this._debouncers[jobName];
if (debouncer) {
debouncer.stop();
}
}
});
Polymer.DomModule = document.createElement('dom-module');
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepBehaviors();
this._prepConstructor();
this._prepTemplate();
this._prepShady();
this._prepPropertyInfo();
},
_prepBehavior: function (b) {
this._addHostAttributes(b.hostAttributes);
},
_initFeatures: function () {
this._registerHost();
if (this._template) {
this._poolContent();
this._beginHosting();
this._stampTemplate();
this._endHosting();
}
this._marshalHostAttributes();
this._setupDebouncers();
this._marshalBehaviors();
this._tryReady();
},
_marshalBehavior: function (b) {
}
});</script>
<!--
@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
-->
<script>(function () {
function resolve() {
document.body.removeAttribute('unresolved');
}
if (window.WebComponents) {
addEventListener('WebComponentsReady', resolve);
} else {
if (document.readyState === 'interactive' || document.readyState === 'complete') {
resolve();
} else {
addEventListener('DOMContentLoaded', resolve);
}
}
}());
window.Polymer = {
Settings: function () {
var settings = window.Polymer || {};
var parts = location.search.slice(1).split('&');
for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {
o = o.split('=');
o[0] && (settings[o[0]] = o[1] || true);
}
settings.wantShadow = settings.dom === 'shadow';
settings.hasShadow = Boolean(Element.prototype.createShadowRoot);
settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;
settings.useShadow = settings.wantShadow && settings.hasShadow;
settings.hasNativeImports = Boolean('import' in document.createElement('link'));
settings.useNativeImports = settings.hasNativeImports;
settings.useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
settings.useNativeShadow = settings.useShadow && settings.nativeShadow;
settings.usePolyfillProto = !settings.useNativeCustomElements && !Object.__proto__;
return settings;
}()
};
(function () {
var userPolymer = window.Polymer;
window.Polymer = function (prototype) {
if (typeof prototype === 'function') {
prototype = prototype.prototype;
}
if (!prototype) {
prototype = {};
}
var factory = desugar(prototype);
prototype = factory.prototype;
var options = { prototype: prototype };
if (prototype.extends) {
options.extends = prototype.extends;
}
Polymer.telemetry._registrate(prototype);
document.registerElement(prototype.is, options);
return factory;
};
var desugar = function (prototype) {
var base = Polymer.Base;
if (prototype.extends) {
base = Polymer.Base._getExtendedPrototype(prototype.extends);
}
prototype = Polymer.Base.chainObject(prototype, base);
prototype.registerCallback();
return prototype.constructor;
};
if (userPolymer) {
for (var i in userPolymer) {
Polymer[i] = userPolymer[i];
}
}
Polymer.Class = desugar;
}());
Polymer.telemetry = {
registrations: [],
_regLog: function (prototype) {
console.log('[' + prototype.is + ']: registered');
},
_registrate: function (prototype) {
this.registrations.push(prototype);
Polymer.log && this._regLog(prototype);
},
dumpRegistrations: function () {
this.registrations.forEach(this._regLog);
}
};
Object.defineProperty(window, 'currentImport', {
enumerable: true,
configurable: true,
get: function () {
return (document._currentScript || document.currentScript).ownerDocument;
}
});
Polymer.RenderStatus = {
_ready: false,
_callbacks: [],
whenReady: function (cb) {
if (this._ready) {
cb();
} else {
this._callbacks.push(cb);
}
},
_makeReady: function () {
this._ready = true;
for (var i = 0; i < this._callbacks.length; i++) {
this._callbacks[i]();
}
this._callbacks = [];
},
_catchFirstRender: function () {
requestAnimationFrame(function () {
Polymer.RenderStatus._makeReady();
});
},
_afterNextRenderQueue: [],
_waitingNextRender: false,
afterNextRender: function (element, fn, args) {
this._watchNextRender();
this._afterNextRenderQueue.push([
element,
fn,
args
]);
},
_watchNextRender: function () {
if (!this._waitingNextRender) {
this._waitingNextRender = true;
var fn = function () {
Polymer.RenderStatus._flushNextRender();
};
if (!this._ready) {
this.whenReady(fn);
} else {
requestAnimationFrame(fn);
}
}
},
_flushNextRender: function () {
var self = this;
setTimeout(function () {
self._flushRenderCallbacks(self._afterNextRenderQueue);
self._afterNextRenderQueue = [];
self._waitingNextRender = false;
});
},
_flushRenderCallbacks: function (callbacks) {
for (var i = 0, h; i < callbacks.length; i++) {
h = callbacks[i];
h[1].apply(h[0], h[2] || Polymer.nar);
}
}
};
if (window.HTMLImports) {
HTMLImports.whenReady(function () {
Polymer.RenderStatus._catchFirstRender();
});
} else {
Polymer.RenderStatus._catchFirstRender();
}
Polymer.ImportStatus = Polymer.RenderStatus;
Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;
(function () {
'use strict';
var settings = Polymer.Settings;
Polymer.Base = {
__isPolymerInstance__: true,
_addFeature: function (feature) {
this.extend(this, feature);
},
registerCallback: function () {
this._desugarBehaviors();
this._doBehavior('beforeRegister');
this._registerFeatures();
if (!settings.lazyRegister) {
this.ensureRegisterFinished();
}
},
createdCallback: function () {
if (!this.__hasRegisterFinished) {
this._ensureRegisterFinished(this.__proto__);
}
Polymer.telemetry.instanceCount++;
this.root = this;
this._doBehavior('created');
this._initFeatures();
},
ensureRegisterFinished: function () {
this._ensureRegisterFinished(this);
},
_ensureRegisterFinished: function (proto) {
if (proto.__hasRegisterFinished !== proto.is) {
proto.__hasRegisterFinished = proto.is;
if (proto._finishRegisterFeatures) {
proto._finishRegisterFeatures();
}
proto._doBehavior('registered');
}
},
attachedCallback: function () {
var self = this;
Polymer.RenderStatus.whenReady(function () {
self.isAttached = true;
self._doBehavior('attached');
});
},
detachedCallback: function () {
this.isAttached = false;
this._doBehavior('detached');
},
attributeChangedCallback: function (name, oldValue, newValue) {
this._attributeChangedImpl(name);
this._doBehavior('attributeChanged', [
name,
oldValue,
newValue
]);
},
_attributeChangedImpl: function (name) {
this._setAttributeToProperty(this, name);
},
extend: function (prototype, api) {
if (prototype && api) {
var n$ = Object.getOwnPropertyNames(api);
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
this.copyOwnProperty(n, api, prototype);
}
}
return prototype || api;
},
mixin: function (target, source) {
for (var i in source) {
target[i] = source[i];
}
return target;
},
copyOwnProperty: function (name, source, target) {
var pd = Object.getOwnPropertyDescriptor(source, name);
if (pd) {
Object.defineProperty(target, name, pd);
}
},
_log: console.log.apply.bind(console.log, console),
_warn: console.warn.apply.bind(console.warn, console),
_error: console.error.apply.bind(console.error, console),
_logf: function () {
return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
}
};
Polymer.Base._logPrefix = function () {
var color = window.chrome || /firefox/i.test(navigator.userAgent);
return color ? [
'%c[%s::%s]:',
'font-weight: bold; background-color:#EEEE00;'
] : ['[%s::%s]:'];
}();
Polymer.Base.chainObject = function (object, inherited) {
if (object && inherited && object !== inherited) {
if (!Object.__proto__) {
object = Polymer.Base.extend(Object.create(inherited), object);
}
object.__proto__ = inherited;
}
return object;
};
Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
if (window.CustomElements) {
Polymer.instanceof = CustomElements.instanceof;
} else {
Polymer.instanceof = function (obj, ctor) {
return obj instanceof ctor;
};
}
Polymer.isInstance = function (obj) {
return Boolean(obj && obj.__isPolymerInstance__);
};
Polymer.telemetry.instanceCount = 0;
}());
(function () {
var modules = {};
var lcModules = {};
var findModule = function (id) {
return modules[id] || lcModules[id.toLowerCase()];
};
var DomModule = function () {
return document.createElement('dom-module');
};
DomModule.prototype = Object.create(HTMLElement.prototype);
Polymer.Base.extend(DomModule.prototype, {
constructor: DomModule,
createdCallback: function () {
this.register();
},
register: function (id) {
id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
if (id) {
this.id = id;
modules[id] = this;
lcModules[id.toLowerCase()] = this;
}
},
import: function (id, selector) {
if (id) {
var m = findModule(id);
if (!m) {
forceDomModulesUpgrade();
m = findModule(id);
}
if (m && selector) {
m = m.querySelector(selector);
}
return m;
}
}
});
var cePolyfill = window.CustomElements && !CustomElements.useNative;
document.registerElement('dom-module', DomModule);
function forceDomModulesUpgrade() {
if (cePolyfill) {
var script = document._currentScript || document.currentScript;
var doc = script && script.ownerDocument || document;
var modules = doc.querySelectorAll('dom-module');
for (var i = modules.length - 1, m; i >= 0 && (m = modules[i]); i--) {
if (m.__upgraded__) {
return;
} else {
CustomElements.upgrade(m);
}
}
}
}
}());
Polymer.Base._addFeature({
_prepIs: function () {
if (!this.is) {
var module = (document._currentScript || document.currentScript).parentNode;
if (module.localName === 'dom-module') {
var id = module.id || module.getAttribute('name') || module.getAttribute('is');
this.is = id;
}
}
if (this.is) {
this.is = this.is.toLowerCase();
}
}
});
Polymer.Base._addFeature({
behaviors: [],
_desugarBehaviors: function () {
if (this.behaviors.length) {
this.behaviors = this._desugarSomeBehaviors(this.behaviors);
}
},
_desugarSomeBehaviors: function (behaviors) {
var behaviorSet = [];
behaviors = this._flattenBehaviorsList(behaviors);
for (var i = behaviors.length - 1; i >= 0; i--) {
var b = behaviors[i];
if (behaviorSet.indexOf(b) === -1) {
this._mixinBehavior(b);
behaviorSet.unshift(b);
}
}
return behaviorSet;
},
_flattenBehaviorsList: function (behaviors) {
var flat = [];
for (var i = 0; i < behaviors.length; i++) {
var b = behaviors[i];
if (b instanceof Array) {
flat = flat.concat(this._flattenBehaviorsList(b));
} else if (b) {
flat.push(b);
} else {
this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
}
}
return flat;
},
_mixinBehavior: function (b) {
var n$ = Object.getOwnPropertyNames(b);
for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
if (!Polymer.Base._behaviorProperties[n] && !this.hasOwnProperty(n)) {
this.copyOwnProperty(n, b, this);
}
}
},
_prepBehaviors: function () {
this._prepFlattenedBehaviors(this.behaviors);
},
_prepFlattenedBehaviors: function (behaviors) {
for (var i = 0, l = behaviors.length; i < l; i++) {
this._prepBehavior(behaviors[i]);
}
this._prepBehavior(this);
},
_doBehavior: function (name, args) {
for (var i = 0; i < this.behaviors.length; i++) {
this._invokeBehavior(this.behaviors[i], name, args);
}
this._invokeBehavior(this, name, args);
},
_invokeBehavior: function (b, name, args) {
var fn = b[name];
if (fn) {
fn.apply(this, args || Polymer.nar);
}
},
_marshalBehaviors: function () {
for (var i = 0; i < this.behaviors.length; i++) {
this._marshalBehavior(this.behaviors[i]);
}
this._marshalBehavior(this);
}
});
Polymer.Base._behaviorProperties = {
hostAttributes: true,
beforeRegister: true,
registered: true,
properties: true,
observers: true,
listeners: true,
created: true,
attached: true,
detached: true,
attributeChanged: true,
ready: true
};
Polymer.Base._addFeature({
_getExtendedPrototype: function (tag) {
return this._getExtendedNativePrototype(tag);
},
_nativePrototypes: {},
_getExtendedNativePrototype: function (tag) {
var p = this._nativePrototypes[tag];
if (!p) {
var np = this.getNativePrototype(tag);
p = this.extend(Object.create(np), Polymer.Base);
this._nativePrototypes[tag] = p;
}
return p;
},
getNativePrototype: function (tag) {
return Object.getPrototypeOf(document.createElement(tag));
}
});
Polymer.Base._addFeature({
_prepConstructor: function () {
this._factoryArgs = this.extends ? [
this.extends,
this.is
] : [this.is];
var ctor = function () {
return this._factory(arguments);
};
if (this.hasOwnProperty('extends')) {
ctor.extends = this.extends;
}
Object.defineProperty(this, 'constructor', {
value: ctor,
writable: true,
configurable: true
});
ctor.prototype = this;
},
_factory: function (args) {
var elt = document.createElement.apply(document, this._factoryArgs);
if (this.factoryImpl) {
this.factoryImpl.apply(elt, args);
}
return elt;
}
});
Polymer.nob = Object.create(null);
Polymer.Base._addFeature({
properties: {},
getPropertyInfo: function (property) {
var info = this._getPropertyInfo(property, this.properties);
if (!info) {
for (var i = 0; i < this.behaviors.length; i++) {
info = this._getPropertyInfo(property, this.behaviors[i].properties);
if (info) {
return info;
}
}
}
return info || Polymer.nob;
},
_getPropertyInfo: function (property, properties) {
var p = properties && properties[property];
if (typeof p === 'function') {
p = properties[property] = { type: p };
}
if (p) {
p.defined = true;
}
return p;
},
_prepPropertyInfo: function () {
this._propertyInfo = {};
for (var i = 0; i < this.behaviors.length; i++) {
this._addPropertyInfo(this._propertyInfo, this.behaviors[i].properties);
}
this._addPropertyInfo(this._propertyInfo, this.properties);
this._addPropertyInfo(this._propertyInfo, this._propertyEffects);
},
_addPropertyInfo: function (target, source) {
if (source) {
var t, s;
for (var i in source) {
t = target[i];
s = source[i];
if (i[0] === '_' && !s.readOnly) {
continue;
}
if (!target[i]) {
target[i] = {
type: typeof s === 'function' ? s : s.type,
readOnly: s.readOnly,
attribute: Polymer.CaseMap.camelToDashCase(i)
};
} else {
if (!t.type) {
t.type = s.type;
}
if (!t.readOnly) {
t.readOnly = s.readOnly;
}
}
}
}
}
});
Polymer.CaseMap = {
_caseMap: {},
_rx: {
dashToCamel: /-[a-z]/g,
camelToDash: /([A-Z])/g
},
dashToCamelCase: function (dash) {
return this._caseMap[dash] || (this._caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(this._rx.dashToCamel, function (m) {
return m[1].toUpperCase();
}));
},
camelToDashCase: function (camel) {
return this._caseMap[camel] || (this._caseMap[camel] = camel.replace(this._rx.camelToDash, '-$1').toLowerCase());
}
};
Polymer.Base._addFeature({
_addHostAttributes: function (attributes) {
if (!this._aggregatedAttributes) {
this._aggregatedAttributes = {};
}
if (attributes) {
this.mixin(this._aggregatedAttributes, attributes);
}
},
_marshalHostAttributes: function () {
if (this._aggregatedAttributes) {
this._applyAttributes(this, this._aggregatedAttributes);
}
},
_applyAttributes: function (node, attr$) {
for (var n in attr$) {
if (!this.hasAttribute(n) && n !== 'class') {
var v = attr$[n];
this.serializeValueToAttribute(v, n, this);
}
}
},
_marshalAttributes: function () {
this._takeAttributesToModel(this);
},
_takeAttributesToModel: function (model) {
if (this.hasAttributes()) {
for (var i in this._propertyInfo) {
var info = this._propertyInfo[i];
if (this.hasAttribute(info.attribute)) {
this._setAttributeToProperty(model, info.attribute, i, info);
}
}
}
},
_setAttributeToProperty: function (model, attribute, property, info) {
if (!this._serializing) {
property = property || Polymer.CaseMap.dashToCamelCase(attribute);
info = info || this._propertyInfo && this._propertyInfo[property];
if (info && !info.readOnly) {
var v = this.getAttribute(attribute);
model[property] = this.deserialize(v, info.type);
}
}
},
_serializing: false,
reflectPropertyToAttribute: function (property, attribute, value) {
this._serializing = true;
value = value === undefined ? this[property] : value;
this.serializeValueToAttribute(value, attribute || Polymer.CaseMap.camelToDashCase(property));
this._serializing = false;
},
serializeValueToAttribute: function (value, attribute, node) {
var str = this.serialize(value);
node = node || this;
if (str === undefined) {
node.removeAttribute(attribute);
} else {
node.setAttribute(attribute, str);
}
},
deserialize: function (value, type) {
switch (type) {
case Number:
value = Number(value);
break;
case Boolean:
value = value != null;
break;
case Object:
try {
value = JSON.parse(value);
} catch (x) {
}
break;
case Array:
try {
value = JSON.parse(value);
} catch (x) {
value = null;
console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
}
break;
case Date:
value = new Date(value);
break;
case String:
default:
break;
}
return value;
},
serialize: function (value) {
switch (typeof value) {
case 'boolean':
return value ? '' : undefined;
case 'object':
if (value instanceof Date) {
return value.toString();
} else if (value) {
try {
return JSON.stringify(value);
} catch (x) {
return '';
}
}
default:
return value != null ? value : undefined;
}
}
});
Polymer.version = '1.4.0';
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepBehaviors();
this._prepConstructor();
this._prepPropertyInfo();
},
_prepBehavior: function (b) {
this._addHostAttributes(b.hostAttributes);
},
_marshalBehavior: function (b) {
},
_initFeatures: function () {
this._marshalHostAttributes();
this._marshalBehaviors();
}
});</script>