@handtracking.io/yoha
Version:
Yoha is currently available for the web via JavaScript. More languages will be added in the future. If you want to port Yoha to another language and need help feel free reach out.
863 lines (855 loc) • 926 kB
JavaScript
/**
* @license
* Copyright 2021 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tfjsCore = require('@tensorflow/tfjs-core');
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try {
step(generator.next(value));
}
catch (e) {
reject(e);
} }
function rejected(value) { try {
step(generator["throw"](value));
}
catch (e) {
reject(e);
} }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function () { if (t[0] & 1)
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (_)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
}
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.arrayIteratorImpl = function (a) { var b = 0; return function () { return b < a.length ? { done: !1, value: a[b++] } : { done: !0 }; }; };
$jscomp.arrayIterator = function (a) { return { next: $jscomp.arrayIteratorImpl(a) }; };
$jscomp.ASSUME_ES5 = !1;
$jscomp.ASSUME_NO_NATIVE_MAP = !1;
$jscomp.ASSUME_NO_NATIVE_SET = !1;
$jscomp.SIMPLE_FROUND_POLYFILL = !1;
$jscomp.ISOLATE_POLYFILLS = !1;
$jscomp.FORCE_POLYFILL_PROMISE = !1;
$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION = !1;
$jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function (a, b, c) { if (a == Array.prototype || a == Object.prototype)
return a; a[b] = c.value; return a; };
$jscomp.getGlobal = function (a) { a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof commonjsGlobal && commonjsGlobal]; for (var b = 0; b < a.length; ++b) {
var c = a[b];
if (c && c.Math == Math)
return c;
} throw Error("Cannot find global object"); };
$jscomp.global = $jscomp.getGlobal(commonjsGlobal);
$jscomp.IS_SYMBOL_NATIVE = "function" === typeof Symbol && "symbol" === typeof Symbol("x");
$jscomp.TRUST_ES6_POLYFILLS = !$jscomp.ISOLATE_POLYFILLS || $jscomp.IS_SYMBOL_NATIVE;
$jscomp.polyfills = {};
$jscomp.propertyToPolyfillSymbol = {};
$jscomp.POLYFILL_PREFIX = "$jscp$";
$jscomp.polyfill = function (a, b, c, d) { b && ($jscomp.ISOLATE_POLYFILLS ? $jscomp.polyfillIsolated(a, b, c, d) : $jscomp.polyfillUnisolated(a, b, c, d)); };
$jscomp.polyfillUnisolated = function (a, b) { var c = $jscomp.global; a = a.split("."); for (var d = 0; d < a.length - 1; d++) {
var e = a[d];
if (!(e in c))
return;
c = c[e];
} a = a[a.length - 1]; d = c[a]; b = b(d); b != d && null != b && $jscomp.defineProperty(c, a, { configurable: !0, writable: !0, value: b }); };
$jscomp.polyfillIsolated = function (a, b, c) {
var d = a.split(".");
a = 1 === d.length;
var e = d[0];
e = !a && e in $jscomp.polyfills ? $jscomp.polyfills : $jscomp.global;
for (var f = 0; f < d.length - 1; f++) {
var g = d[f];
if (!(g in e))
return;
e = e[g];
}
d = d[d.length - 1];
c = $jscomp.IS_SYMBOL_NATIVE && "es6" === c ? e[d] : null;
b = b(c);
null != b && (a ? $jscomp.defineProperty($jscomp.polyfills, d, { configurable: !0, writable: !0, value: b }) : b !== c && (void 0 === $jscomp.propertyToPolyfillSymbol[d] && (a = 1E9 * Math.random() >>> 0, $jscomp.propertyToPolyfillSymbol[d] = $jscomp.IS_SYMBOL_NATIVE ?
$jscomp.global.Symbol(d) : $jscomp.POLYFILL_PREFIX + a + "$" + d), $jscomp.defineProperty(e, $jscomp.propertyToPolyfillSymbol[d], { configurable: !0, writable: !0, value: b })));
};
$jscomp.initSymbol = function () { };
$jscomp.polyfill("Symbol", function (a) { if (a)
return a; var b = function (f, g) { this.$jscomp$symbol$id_ = f; $jscomp.defineProperty(this, "description", { configurable: !0, writable: !0, value: g }); }; b.prototype.toString = function () { return this.$jscomp$symbol$id_; }; var c = "jscomp_symbol_" + (1E9 * Math.random() >>> 0) + "_", d = 0, e = function (f) { if (this instanceof e)
throw new TypeError("Symbol is not a constructor"); return new b(c + (f || "") + "_" + d++, f); }; return e; }, "es6", "es3");
$jscomp.polyfill("Symbol.iterator", function (a) { if (a)
return a; a = Symbol("Symbol.iterator"); for (var b = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b.length; c++) {
var d = $jscomp.global[b[c]];
"function" === typeof d && "function" != typeof d.prototype[a] && $jscomp.defineProperty(d.prototype, a, { configurable: !0, writable: !0, value: function () { return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this)); } });
} return a; }, "es6", "es3");
$jscomp.iteratorPrototype = function (a) { a = { next: a }; a[Symbol.iterator] = function () { return this; }; return a; };
$jscomp.createTemplateTagFirstArg = function (a) { return a.raw = a; };
$jscomp.createTemplateTagFirstArgWithRaw = function (a, b) { a.raw = b; return a; };
$jscomp.makeIterator = function (a) { var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator]; return b ? b.call(a) : $jscomp.arrayIterator(a); };
$jscomp.arrayFromIterator = function (a) { for (var b, c = []; !(b = a.next()).done;)
c.push(b.value); return c; };
$jscomp.arrayFromIterable = function (a) { return a instanceof Array ? a : $jscomp.arrayFromIterator($jscomp.makeIterator(a)); };
$jscomp.objectCreate = $jscomp.ASSUME_ES5 || "function" == typeof Object.create ? Object.create : function (a) { var b = function () { }; b.prototype = a; return new b; };
$jscomp.getConstructImplementation = function () {
function a() { function c() { } Reflect.construct(c, [], function () { }); return new c instanceof c; }
if ($jscomp.TRUST_ES6_POLYFILLS && "undefined" != typeof Reflect && Reflect.construct) {
if (a())
return Reflect.construct;
var b = Reflect.construct;
return function (c, d, e) { c = b(c, d); e && Reflect.setPrototypeOf(c, e.prototype); return c; };
}
return function (c, d, e) {
void 0 === e && (e = c);
e = $jscomp.objectCreate(e.prototype || Object.prototype);
return Function.prototype.apply.call(c, e, d) ||
e;
};
};
$jscomp.construct = { valueOf: $jscomp.getConstructImplementation }.valueOf();
$jscomp.underscoreProtoCanBeSet = function () { var a = { a: !0 }, b = {}; try {
return b.__proto__ = a, b.a;
}
catch (c) { } return !1; };
$jscomp.setPrototypeOf = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.setPrototypeOf ? Object.setPrototypeOf : $jscomp.underscoreProtoCanBeSet() ? function (a, b) { a.__proto__ = b; if (a.__proto__ !== b)
throw new TypeError(a + " is not extensible"); return a; } : null;
$jscomp.inherits = function (a, b) { a.prototype = $jscomp.objectCreate(b.prototype); a.prototype.constructor = a; if ($jscomp.setPrototypeOf) {
var c = $jscomp.setPrototypeOf;
c(a, b);
}
else
for (c in b)
if ("prototype" != c)
if (Object.defineProperties) {
var d = Object.getOwnPropertyDescriptor(b, c);
d && Object.defineProperty(a, c, d);
}
else
a[c] = b[c]; a.superClass_ = b.prototype; };
$jscomp.generator = {};
$jscomp.generator.ensureIteratorResultIsObject_ = function (a) { if (!(a instanceof Object))
throw new TypeError("Iterator result " + a + " is not an object"); };
$jscomp.generator.Context = function () { this.isRunning_ = !1; this.yieldAllIterator_ = null; this.yieldResult = void 0; this.nextAddress = 1; this.finallyAddress_ = this.catchAddress_ = 0; this.finallyContexts_ = this.abruptCompletion_ = null; };
$jscomp.generator.Context.prototype.start_ = function () { if (this.isRunning_)
throw new TypeError("Generator is already running"); this.isRunning_ = !0; };
$jscomp.generator.Context.prototype.stop_ = function () { this.isRunning_ = !1; };
$jscomp.generator.Context.prototype.jumpToErrorHandler_ = function () { this.nextAddress = this.catchAddress_ || this.finallyAddress_; };
$jscomp.generator.Context.prototype.next_ = function (a) { this.yieldResult = a; };
$jscomp.generator.Context.prototype.throw_ = function (a) { this.abruptCompletion_ = { exception: a, isException: !0 }; this.jumpToErrorHandler_(); };
$jscomp.generator.Context.prototype.return = function (a) { this.abruptCompletion_ = { return: a }; this.nextAddress = this.finallyAddress_; };
$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks = function (a) { this.abruptCompletion_ = { jumpTo: a }; this.nextAddress = this.finallyAddress_; };
$jscomp.generator.Context.prototype.yield = function (a, b) { this.nextAddress = b; return { value: a }; };
$jscomp.generator.Context.prototype.yieldAll = function (a, b) { a = $jscomp.makeIterator(a); var c = a.next(); $jscomp.generator.ensureIteratorResultIsObject_(c); if (c.done)
this.yieldResult = c.value, this.nextAddress = b;
else
return this.yieldAllIterator_ = a, this.yield(c.value, b); };
$jscomp.generator.Context.prototype.jumpTo = function (a) { this.nextAddress = a; };
$jscomp.generator.Context.prototype.jumpToEnd = function () { this.nextAddress = 0; };
$jscomp.generator.Context.prototype.setCatchFinallyBlocks = function (a, b) { this.catchAddress_ = a; void 0 != b && (this.finallyAddress_ = b); };
$jscomp.generator.Context.prototype.setFinallyBlock = function (a) { this.catchAddress_ = 0; this.finallyAddress_ = a || 0; };
$jscomp.generator.Context.prototype.leaveTryBlock = function (a, b) { this.nextAddress = a; this.catchAddress_ = b || 0; };
$jscomp.generator.Context.prototype.enterCatchBlock = function (a) { this.catchAddress_ = a || 0; a = this.abruptCompletion_.exception; this.abruptCompletion_ = null; return a; };
$jscomp.generator.Context.prototype.enterFinallyBlock = function (a, b, c) { c ? this.finallyContexts_[c] = this.abruptCompletion_ : this.finallyContexts_ = [this.abruptCompletion_]; this.catchAddress_ = a || 0; this.finallyAddress_ = b || 0; };
$jscomp.generator.Context.prototype.leaveFinallyBlock = function (a, b) { b = this.finallyContexts_.splice(b || 0)[0]; if (b = this.abruptCompletion_ = this.abruptCompletion_ || b) {
if (b.isException)
return this.jumpToErrorHandler_();
void 0 != b.jumpTo && this.finallyAddress_ < b.jumpTo ? (this.nextAddress = b.jumpTo, this.abruptCompletion_ = null) : this.nextAddress = this.finallyAddress_;
}
else
this.nextAddress = a; };
$jscomp.generator.Context.prototype.forIn = function (a) { return new $jscomp.generator.Context.PropertyIterator(a); };
$jscomp.generator.Context.PropertyIterator = function (a) { this.object_ = a; this.properties_ = []; for (var b in a)
this.properties_.push(b); this.properties_.reverse(); };
$jscomp.generator.Context.PropertyIterator.prototype.getNext = function () { for (; 0 < this.properties_.length;) {
var a = this.properties_.pop();
if (a in this.object_)
return a;
} return null; };
$jscomp.generator.Engine_ = function (a) { this.context_ = new $jscomp.generator.Context; this.program_ = a; };
$jscomp.generator.Engine_.prototype.next_ = function (a) { this.context_.start_(); if (this.context_.yieldAllIterator_)
return this.yieldAllStep_(this.context_.yieldAllIterator_.next, a, this.context_.next_); this.context_.next_(a); return this.nextStep_(); };
$jscomp.generator.Engine_.prototype.return_ = function (a) { this.context_.start_(); var b = this.context_.yieldAllIterator_; if (b)
return this.yieldAllStep_("return" in b ? b["return"] : function (c) { return { value: c, done: !0 }; }, a, this.context_.return); this.context_.return(a); return this.nextStep_(); };
$jscomp.generator.Engine_.prototype.throw_ = function (a) { this.context_.start_(); if (this.context_.yieldAllIterator_)
return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"], a, this.context_.next_); this.context_.throw_(a); return this.nextStep_(); };
$jscomp.generator.Engine_.prototype.yieldAllStep_ = function (a, b, c) { try {
var d = a.call(this.context_.yieldAllIterator_, b);
$jscomp.generator.ensureIteratorResultIsObject_(d);
if (!d.done)
return this.context_.stop_(), d;
var e = d.value;
}
catch (f) {
return this.context_.yieldAllIterator_ = null, this.context_.throw_(f), this.nextStep_();
} this.context_.yieldAllIterator_ = null; c.call(this.context_, e); return this.nextStep_(); };
$jscomp.generator.Engine_.prototype.nextStep_ = function () { for (; this.context_.nextAddress;)
try {
var a = this.program_(this.context_);
if (a)
return this.context_.stop_(), { value: a.value, done: !1 };
}
catch (b) {
this.context_.yieldResult = void 0, this.context_.throw_(b);
} this.context_.stop_(); if (this.context_.abruptCompletion_) {
a = this.context_.abruptCompletion_;
this.context_.abruptCompletion_ = null;
if (a.isException)
throw a.exception;
return { value: a.return, done: !0 };
} return { value: void 0, done: !0 }; };
$jscomp.generator.Generator_ = function (a) { this.next = function (b) { return a.next_(b); }; this.throw = function (b) { return a.throw_(b); }; this.return = function (b) { return a.return_(b); }; this[Symbol.iterator] = function () { return this; }; };
$jscomp.generator.createGenerator = function (a, b) { b = new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)); $jscomp.setPrototypeOf && a.prototype && $jscomp.setPrototypeOf(b, a.prototype); return b; };
$jscomp.asyncExecutePromiseGenerator = function (a) { function b(d) { return a.next(d); } function c(d) { return a.throw(d); } return new Promise(function (d, e) { function f(g) { g.done ? d(g.value) : Promise.resolve(g.value).then(b, c).then(f, e); } f(a.next()); }); };
$jscomp.asyncExecutePromiseGeneratorFunction = function (a) { return $jscomp.asyncExecutePromiseGenerator(a()); };
$jscomp.asyncExecutePromiseGeneratorProgram = function (a) { return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(a))); };
$jscomp.polyfill("Reflect", function (a) { return a ? a : {}; }, "es6", "es3");
$jscomp.polyfill("Reflect.construct", function () { return $jscomp.construct; }, "es6", "es3");
$jscomp.polyfill("Reflect.setPrototypeOf", function (a) { if (a)
return a; if ($jscomp.setPrototypeOf) {
var b = $jscomp.setPrototypeOf;
return function (c, d) { try {
return b(c, d), !0;
}
catch (e) {
return !1;
} };
} return null; }, "es6", "es5");
$jscomp.polyfill("Promise", function (a) {
function b() { this.batch_ = null; }
function c(k) { return k instanceof f ? k : new f(function (h) { h(k); }); }
if (a && (!($jscomp.FORCE_POLYFILL_PROMISE || $jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION && "undefined" === typeof $jscomp.global.PromiseRejectionEvent) || !$jscomp.global.Promise || -1 === $jscomp.global.Promise.toString().indexOf("[native code]")))
return a;
b.prototype.asyncExecute = function (k) { if (null == this.batch_) {
this.batch_ = [];
var h = this;
this.asyncExecuteFunction(function () { h.executeBatch_(); });
} this.batch_.push(k); };
var d = $jscomp.global.setTimeout;
b.prototype.asyncExecuteFunction = function (k) { d(k, 0); };
b.prototype.executeBatch_ = function () { for (; this.batch_ && this.batch_.length;) {
var k = this.batch_;
this.batch_ = [];
for (var h = 0; h < k.length; ++h) {
var l = k[h];
k[h] = null;
try {
l();
}
catch (m) {
this.asyncThrow_(m);
}
}
} this.batch_ = null; };
b.prototype.asyncThrow_ = function (k) { this.asyncExecuteFunction(function () { throw k; }); };
var e = { PENDING: 0, FULFILLED: 1, REJECTED: 2 }, f = function (k) {
this.state_ = e.PENDING;
this.result_ = void 0;
this.onSettledCallbacks_ =
[];
this.isRejectionHandled_ = !1;
var h = this.createResolveAndReject_();
try {
k(h.resolve, h.reject);
}
catch (l) {
h.reject(l);
}
};
f.prototype.createResolveAndReject_ = function () { function k(m) { return function (n) { l || (l = !0, m.call(h, n)); }; } var h = this, l = !1; return { resolve: k(this.resolveTo_), reject: k(this.reject_) }; };
f.prototype.resolveTo_ = function (k) {
if (k === this)
this.reject_(new TypeError("A Promise cannot resolve to itself"));
else if (k instanceof f)
this.settleSameAsPromise_(k);
else {
a: switch (typeof k) {
case "object":
var h = null != k;
break a;
case "function":
h = !0;
break a;
default: h = !1;
}
h ? this.resolveToNonPromiseObj_(k) : this.fulfill_(k);
}
};
f.prototype.resolveToNonPromiseObj_ = function (k) { var h = void 0; try {
h = k.then;
}
catch (l) {
this.reject_(l);
return;
} "function" == typeof h ? this.settleSameAsThenable_(h, k) : this.fulfill_(k); };
f.prototype.reject_ = function (k) { this.settle_(e.REJECTED, k); };
f.prototype.fulfill_ = function (k) { this.settle_(e.FULFILLED, k); };
f.prototype.settle_ = function (k, h) {
if (this.state_ != e.PENDING)
throw Error("Cannot settle(" + k +
", " + h + "): Promise already settled in state" + this.state_);
this.state_ = k;
this.result_ = h;
this.state_ === e.REJECTED && this.scheduleUnhandledRejectionCheck_();
this.executeOnSettledCallbacks_();
};
f.prototype.scheduleUnhandledRejectionCheck_ = function () { var k = this; d(function () { if (k.notifyUnhandledRejection_()) {
var h = $jscomp.global.console;
"undefined" !== typeof h && h.error(k.result_);
} }, 1); };
f.prototype.notifyUnhandledRejection_ = function () {
if (this.isRejectionHandled_)
return !1;
var k = $jscomp.global.CustomEvent, h = $jscomp.global.Event, l = $jscomp.global.dispatchEvent;
if ("undefined" === typeof l)
return !0;
"function" === typeof k ? k = new k("unhandledrejection", { cancelable: !0 }) : "function" === typeof h ? k = new h("unhandledrejection", { cancelable: !0 }) : (k = $jscomp.global.document.createEvent("CustomEvent"), k.initCustomEvent("unhandledrejection", !1, !0, k));
k.promise = this;
k.reason = this.result_;
return l(k);
};
f.prototype.executeOnSettledCallbacks_ = function () {
if (null != this.onSettledCallbacks_) {
for (var k = 0; k < this.onSettledCallbacks_.length; ++k)
g.asyncExecute(this.onSettledCallbacks_[k]);
this.onSettledCallbacks_ = null;
}
};
var g = new b;
f.prototype.settleSameAsPromise_ = function (k) { var h = this.createResolveAndReject_(); k.callWhenSettled_(h.resolve, h.reject); };
f.prototype.settleSameAsThenable_ = function (k, h) { var l = this.createResolveAndReject_(); try {
k.call(h, l.resolve, l.reject);
}
catch (m) {
l.reject(m);
} };
f.prototype.then = function (k, h) { function l(q, r) { return "function" == typeof q ? function (t) { try {
m(q(t));
}
catch (v) {
n(v);
} } : r; } var m, n, p = new f(function (q, r) { m = q; n = r; }); this.callWhenSettled_(l(k, m), l(h, n)); return p; };
f.prototype.catch = function (k) { return this.then(void 0, k); };
f.prototype.callWhenSettled_ = function (k, h) { function l() { switch (m.state_) {
case e.FULFILLED:
k(m.result_);
break;
case e.REJECTED:
h(m.result_);
break;
default: throw Error("Unexpected state: " + m.state_);
} } var m = this; null == this.onSettledCallbacks_ ? g.asyncExecute(l) : this.onSettledCallbacks_.push(l); this.isRejectionHandled_ = !0; };
f.resolve = c;
f.reject = function (k) { return new f(function (h, l) { l(k); }); };
f.race = function (k) {
return new f(function (h, l) {
for (var m = $jscomp.makeIterator(k), n = m.next(); !n.done; n = m.next())
c(n.value).callWhenSettled_(h, l);
});
};
f.all = function (k) { var h = $jscomp.makeIterator(k), l = h.next(); return l.done ? c([]) : new f(function (m, n) { function p(t) { return function (v) { q[t] = v; r--; 0 == r && m(q); }; } var q = [], r = 0; do
q.push(void 0), r++, c(l.value).callWhenSettled_(p(q.length - 1), n), l = h.next();
while (!l.done); }); };
return f;
}, "es6", "es3");
$jscomp.findInternal = function (a, b, c) { a instanceof String && (a = String(a)); for (var d = a.length, e = 0; e < d; e++) {
var f = a[e];
if (b.call(c, f, e, a))
return { i: e, v: f };
} return { i: -1, v: void 0 }; };
$jscomp.polyfill("Array.prototype.find", function (a) { return a ? a : function (b, c) { return $jscomp.findInternal(this, b, c).v; }; }, "es6", "es3");
$jscomp.checkEs6ConformanceViaProxy = function () { try {
var a = {}, b = Object.create(new $jscomp.global.Proxy(a, { get: function (c, d, e) { return c == a && "q" == d && e == b; } }));
return !0 === b.q;
}
catch (c) {
return !1;
} };
$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS = !1;
$jscomp.ES6_CONFORMANCE = $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS && $jscomp.checkEs6ConformanceViaProxy();
$jscomp.owns = function (a, b) { return Object.prototype.hasOwnProperty.call(a, b); };
$jscomp.polyfill("WeakMap", function (a) {
function b() { if (!a || !Object.seal)
return !1; try {
var l = Object.seal({}), m = Object.seal({}), n = new a([[l, 2], [m, 3]]);
if (2 != n.get(l) || 3 != n.get(m))
return !1;
n.delete(l);
n.set(m, 4);
return !n.has(l) && 4 == n.get(m);
}
catch (p) {
return !1;
} }
function c() { }
function d(l) { var m = typeof l; return "object" === m && null !== l || "function" === m; }
function e(l) { if (!$jscomp.owns(l, g)) {
var m = new c;
$jscomp.defineProperty(l, g, { value: m });
} }
function f(l) {
if (!$jscomp.ISOLATE_POLYFILLS) {
var m = Object[l];
m && (Object[l] =
function (n) { if (n instanceof c)
return n; Object.isExtensible(n) && e(n); return m(n); });
}
}
if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) {
if (a && $jscomp.ES6_CONFORMANCE)
return a;
}
else if (b())
return a;
var g = "$jscomp_hidden_" + Math.random();
f("freeze");
f("preventExtensions");
f("seal");
var k = 0, h = function (l) { this.id_ = (k += Math.random() + 1).toString(); if (l) {
l = $jscomp.makeIterator(l);
for (var m; !(m = l.next()).done;)
m = m.value, this.set(m[0], m[1]);
} };
h.prototype.set = function (l, m) {
if (!d(l))
throw Error("Invalid WeakMap key");
e(l);
if (!$jscomp.owns(l, g))
throw Error("WeakMap key fail: " + l);
l[g][this.id_] = m;
return this;
};
h.prototype.get = function (l) { return d(l) && $jscomp.owns(l, g) ? l[g][this.id_] : void 0; };
h.prototype.has = function (l) { return d(l) && $jscomp.owns(l, g) && $jscomp.owns(l[g], this.id_); };
h.prototype.delete = function (l) { return d(l) && $jscomp.owns(l, g) && $jscomp.owns(l[g], this.id_) ? delete l[g][this.id_] : !1; };
return h;
}, "es6", "es3");
$jscomp.MapEntry = function () { };
$jscomp.polyfill("Map", function (a) {
function b() { if ($jscomp.ASSUME_NO_NATIVE_MAP || !a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal)
return !1; try {
var h = Object.seal({ x: 4 }), l = new a($jscomp.makeIterator([[h, "s"]]));
if ("s" != l.get(h) || 1 != l.size || l.get({ x: 4 }) || l.set({ x: 4 }, "t") != l || 2 != l.size)
return !1;
var m = l.entries(), n = m.next();
if (n.done || n.value[0] != h || "s" != n.value[1])
return !1;
n = m.next();
return n.done || 4 != n.value[0].x || "t" != n.value[1] || !m.next().done ? !1 : !0;
}
catch (p) {
return !1;
} }
if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) {
if (a && $jscomp.ES6_CONFORMANCE)
return a;
}
else if (b())
return a;
var c = new WeakMap, d = function (h) { this.data_ = {}; this.head_ = g(); this.size = 0; if (h) {
h = $jscomp.makeIterator(h);
for (var l; !(l = h.next()).done;)
l = l.value, this.set(l[0], l[1]);
} };
d.prototype.set = function (h, l) {
h = 0 === h ? 0 : h;
var m = e(this, h);
m.list || (m.list = this.data_[m.id] = []);
m.entry ? m.entry.value = l : (m.entry = { next: this.head_, previous: this.head_.previous, head: this.head_, key: h, value: l }, m.list.push(m.entry),
this.head_.previous.next = m.entry, this.head_.previous = m.entry, this.size++);
return this;
};
d.prototype.delete = function (h) { h = e(this, h); return h.entry && h.list ? (h.list.splice(h.index, 1), h.list.length || delete this.data_[h.id], h.entry.previous.next = h.entry.next, h.entry.next.previous = h.entry.previous, h.entry.head = null, this.size--, !0) : !1; };
d.prototype.clear = function () { this.data_ = {}; this.head_ = this.head_.previous = g(); this.size = 0; };
d.prototype.has = function (h) { return !!e(this, h).entry; };
d.prototype.get = function (h) {
return (h =
e(this, h).entry) && h.value;
};
d.prototype.entries = function () { return f(this, function (h) { return [h.key, h.value]; }); };
d.prototype.keys = function () { return f(this, function (h) { return h.key; }); };
d.prototype.values = function () { return f(this, function (h) { return h.value; }); };
d.prototype.forEach = function (h, l) { for (var m = this.entries(), n; !(n = m.next()).done;)
n = n.value, h.call(l, n[1], n[0], this); };
d.prototype[Symbol.iterator] = d.prototype.entries;
var e = function (h, l) {
var m = l && typeof l;
"object" == m || "function" == m ? c.has(l) ? m = c.get(l) :
(m = "" + ++k, c.set(l, m)) : m = "p_" + l;
var n = h.data_[m];
if (n && $jscomp.owns(h.data_, m))
for (h = 0; h < n.length; h++) {
var p = n[h];
if (l !== l && p.key !== p.key || l === p.key)
return { id: m, list: n, index: h, entry: p };
}
return { id: m, list: n, index: -1, entry: void 0 };
}, f = function (h, l) { var m = h.head_; return $jscomp.iteratorPrototype(function () { if (m) {
for (; m.head != h.head_;)
m = m.previous;
for (; m.next != m.head;)
return m = m.next, { done: !1, value: l(m) };
m = null;
} return { done: !0, value: void 0 }; }); }, g = function () { var h = {}; return h.previous = h.next = h.head = h; }, k = 0;
return d;
}, "es6", "es3");
$jscomp.iteratorFromArray = function (a, b) { a instanceof String && (a += ""); var c = 0, d = !1, e = { next: function () { if (!d && c < a.length) {
var f = c++;
return { value: b(f, a[f]), done: !1 };
} d = !0; return { done: !0, value: void 0 }; } }; e[Symbol.iterator] = function () { return e; }; return e; };
$jscomp.polyfill("Array.prototype.entries", function (a) { return a ? a : function () { return $jscomp.iteratorFromArray(this, function (b, c) { return [b, c]; }); }; }, "es6", "es3");
$jscomp.checkStringArgs = function (a, b, c) { if (null == a)
throw new TypeError("The 'this' value for String.prototype." + c + " must not be null or undefined"); if (b instanceof RegExp)
throw new TypeError("First argument to String.prototype." + c + " must not be a regular expression"); return a + ""; };
$jscomp.polyfill("String.prototype.endsWith", function (a) { return a ? a : function (b, c) { var d = $jscomp.checkStringArgs(this, b, "endsWith"); b += ""; void 0 === c && (c = d.length); c = Math.max(0, Math.min(c | 0, d.length)); for (var e = b.length; 0 < e && 0 < c;)
if (d[--c] != b[--e])
return !1; return 0 >= e; }; }, "es6", "es3");
$jscomp.polyfill("String.prototype.startsWith", function (a) { return a ? a : function (b, c) { var d = $jscomp.checkStringArgs(this, b, "startsWith"); b += ""; var e = d.length, f = b.length; c = Math.max(0, Math.min(c | 0, d.length)); for (var g = 0; g < f && c < e;)
if (d[c++] != b[g++])
return !1; return g >= f; }; }, "es6", "es3");
$jscomp.polyfill("Number.isFinite", function (a) { return a ? a : function (b) { return "number" !== typeof b ? !1 : !isNaN(b) && Infinity !== b && -Infinity !== b; }; }, "es6", "es3");
$jscomp.polyfill("String.prototype.repeat", function (a) { return a ? a : function (b) { var c = $jscomp.checkStringArgs(this, null, "repeat"); if (0 > b || 1342177279 < b)
throw new RangeError("Invalid count value"); b |= 0; for (var d = ""; b;)
if (b & 1 && (d += c), b >>>= 1)
c += c; return d; }; }, "es6", "es3");
$jscomp.polyfill("Object.setPrototypeOf", function (a) { return a || $jscomp.setPrototypeOf; }, "es6", "es5");
$jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function (a, b) { for (var c = 1; c < arguments.length; c++) {
var d = arguments[c];
if (d)
for (var e in d)
$jscomp.owns(d, e) && (a[e] = d[e]);
} return a; };
$jscomp.polyfill("Object.assign", function (a) { return a || $jscomp.assign; }, "es6", "es3");
var goog = goog || {};
goog.global = commonjsGlobal || self;
goog.exportPath_ = function (a, b, c, d) { a = a.split("."); d = d || goog.global; a[0] in d || "undefined" == typeof d.execScript || d.execScript("var " + a[0]); for (var e; a.length && (e = a.shift());)
if (a.length || void 0 === b)
d = d[e] && d[e] !== Object.prototype[e] ? d[e] : d[e] = {};
else if (!c && goog.isObject(b) && goog.isObject(d[e]))
for (var f in b)
b.hasOwnProperty(f) && (d[e][f] = b[f]);
else
d[e] = b; };
goog.define = function (a, b) { return b; };
goog.FEATURESET_YEAR = 2012;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.getLocale = function () { return goog.LOCALE; };
goog.TRUSTED_SITE = !0;
goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG;
goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
goog.provide = function (a) { if (goog.isInModuleLoader_())
throw Error("goog.provide cannot be used within a module."); goog.constructNamespace_(a); };
goog.constructNamespace_ = function (a, b, c) { goog.exportPath_(a, b, c); };
goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/;
goog.getScriptNonce_ = function (a) { a = (a || goog.global).document; return (a = a.querySelector && a.querySelector("script[nonce]")) && (a = a.nonce || a.getAttribute("nonce")) && goog.NONCE_PATTERN_.test(a) ? a : ""; };
goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
goog.module = function (a) {
if ("string" !== typeof a || !a || -1 == a.search(goog.VALID_MODULE_RE_))
throw Error("Invalid module identifier");
if (!goog.isInGoogModuleLoader_())
throw Error("Module " + a + " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
if (goog.moduleLoaderState_.moduleName)
throw Error("goog.module may only be called once per module.");
goog.moduleLoaderState_.moduleName = a;
};
goog.module.get = function (a) { return goog.module.getInternal_(a); };
goog.module.getInternal_ = function () { return null; };
goog.ModuleType = { ES6: "es6", GOOG: "goog" };
goog.moduleLoaderState_ = null;
goog.isInModuleLoader_ = function () { return goog.isInGoogModuleLoader_() || goog.isInEs6ModuleLoader_(); };
goog.isInGoogModuleLoader_ = function () { return !!goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.GOOG; };
goog.isInEs6ModuleLoader_ = function () { if (goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.ES6)
return !0; var a = goog.global.$jscomp; return a ? "function" != typeof a.getCurrentModulePath ? !1 : !!a.getCurrentModulePath() : !1; };
goog.module.declareLegacyNamespace = function () { goog.moduleLoaderState_.declareLegacyNamespace = !0; };
goog.declareModuleId = function (a) { if (goog.moduleLoaderState_)
goog.moduleLoaderState_.moduleName = a;
else {
var b = goog.global.$jscomp;
if (!b || "function" != typeof b.getCurrentModulePath)
throw Error('Module with namespace "' + a + '" has been loaded incorrectly.');
b = b.require(b.getCurrentModulePath());
goog.loadedModules_[a] = { exports: b, type: goog.ModuleType.ES6, moduleId: a };
} };
goog.setTestOnly = function (a) { if (goog.DISALLOW_TEST_ONLY_CODE)
throw a = a || "", Error("Importing test-only code into non-debug environment" + (a ? ": " + a : ".")); };
goog.forwardDeclare = function () { };
goog.getObjectByName = function (a, b) { a = a.split("."); b = b || goog.global; for (var c = 0; c < a.length; c++)
if (b = b[a[c]], null == b)
return null; return b; };
goog.addDependency = function () { };
goog.ENABLE_DEBUG_LOADER = !0;
goog.logToConsole_ = function (a) { goog.global.console && goog.global.console.error(a); };
goog.require = function () { };
goog.requireType = function () { return {}; };
goog.basePath = "";
goog.nullFunction = function () { };
goog.abstractMethod = function () { throw Error("unimplemented abstract method"); };
goog.addSingletonGetter = function (a) { a.instance_ = void 0; a.getInstance = function () { if (a.instance_)
return a.instance_; goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a); return a.instance_ = new a; }; };
goog.instantiatedSingletons_ = [];
goog.LOAD_MODULE_USING_EVAL = !0;
goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
goog.loadedModules_ = {};
goog.DEPENDENCIES_ENABLED = !1;
goog.TRANSPILE = "detect";
goog.ASSUME_ES_MODULES_TRANSPILED = !1;
goog.TRANSPILE_TO_LANGUAGE = "";
goog.TRANSPILER = "transpile.js";
goog.TRUSTED_TYPES_POLICY_NAME = "goog";
goog.hasBadLetScoping = null;
goog.loadModule = function (a) {
var b = goog.moduleLoaderState_;
try {
goog.moduleLoaderState_ = { moduleName: "", declareLegacyNamespace: !1, type: goog.ModuleType.GOOG };
var c = {}, d = c;
if ("function" === typeof a)
d = a.call(void 0, d);
else if ("string" === typeof a)
d = goog.loadModuleFromSource_.call(void 0, d, a);
else
throw Error("Invalid module definition");
var e = goog.moduleLoaderState_.moduleName;
if ("string" === typeof e && e)
goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(e, d, c !== d) : goog.SEAL_MODULE_EXPORTS &&
Object.seal && "object" == typeof d && null != d && Object.seal(d), goog.loadedModules_[e] = { exports: d, type: goog.ModuleType.GOOG, moduleId: goog.moduleLoaderState_.moduleName };
else
throw Error('Invalid module name "' + e + '"');
}
finally {
goog.moduleLoaderState_ = b;
}
};
goog.loadModuleFromSource_ = function (a, b) { eval(goog.CLOSURE_EVAL_PREFILTER_.createScript(b)); return a; };
goog.normalizePath_ = function (a) { a = a.split("/"); for (var b = 0; b < a.length;)
"." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b - 1] ? a.splice(--b, 2) : b++; return a.join("/"); };
goog.loadFileSync_ = function (a) { if (goog.global.CLOSURE_LOAD_FILE_SYNC)
return goog.global.CLOSURE_LOAD_FILE_SYNC(a); try {
var b = new goog.global.XMLHttpRequest;
b.open("get", a, !1);
b.send();
return 0 == b.status || 200 == b.status ? b.responseText : null;
}
catch (c) {
return null;
} };
goog.transpile_ = function (a, b, c) {
var d = goog.global.$jscomp;
d || (goog.global.$jscomp = d = {});
var e = d.transpile;
if (!e) {
var f = goog.basePath + goog.TRANSPILER, g = goog.loadFileSync_(f);
if (g) {
(function () { (0, eval)(g + "\n//# sourceURL=" + f); }).call(goog.global);
if (goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp.transpile)
throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON.stringify(goog.global.$gwtExport));
goog.global.$jscomp.transpile =
goog.global.$gwtExport.$jscomp.transpile;
d = goog.global.$jscomp;
e = d.transpile;
}
}
if (!e) {
var k = " requires transpilation but no transpiler was found.";
k += ' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.';
e = d.transpile = function (h, l) { goog.logToConsole_(l + k); return h; };
}
return e(a, b, c);
};
goog.typeOf = function (a) { var b = typeof a; return "object" != b ? b : a ? Array.isArray(a) ? "array" : b : "null"; };
goog.isArrayLike = function (a) { var b = goog.typeOf(a); return "array" == b || "object" == b && "number" == typeof a.length; };
goog.isDateLike = function (a) { return goog.isObject(a) && "function" == typeof a.getFullYear; };
goog.isObject = function (a) { var b = typeof a; return "object" == b && null != a || "function" == b; };
goog.getUid = function (a) { return Object.prototype.hasOwnProperty.call(a, goog.UID_PROPERTY_) && a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_); };
goog.hasUid = function (a) { return !!a[goog.UID_PROPERTY_]; };
goog.removeUid = function (a) { null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_); try {
delete a[goog.UID_PROPERTY_];
}
catch (b) { } };
goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
goog.uidCounter_ = 0;
goog.cloneObject = function (a) { var b = goog.typeOf(a); if ("object" == b || "array" == b) {
if ("function" === typeof a.clone)
return a.clone();
if ("undefined" !== typeof Map && a instanceof Map)
return new Map(a);
if ("undefined" !== typeof Set && a instanceof Set)
return new Set(a);
b = "array" == b ? [] : {};
for (var c in a)
b[c] = goog.cloneObject(a[c]);
return b;
} return a; };
goog.bindNative_ = function (a, b, c) { return a.call.apply(a.bind, arguments); };
goog.bindJs_ = function (a, b, c) { if (!a)
throw Error(); if (2 < arguments.length) {
var d = Array.prototype.slice.call(arguments, 2);
return function () { var e = Array.prototype.slice.call(arguments); Array.prototype.unshift.apply(e, d); return a.apply(b, e); };
} return function () { return a.apply(b, arguments); }; };
goog.bind = function (a, b, c) { Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_; return goog.bind.apply(null, arguments); };
goog.partial = function (a, b) { var c = Array.prototype.slice.call(arguments, 1); return function () { var d = c.slice(); d.push.apply(d, arguments); return a.apply(this, d); }; };
goog.mixin = function (a, b) { for (var c in b)
a[c] = b[c]; };
goog.now = function () { return Date.now(); };
goog.globalEval = function (a) { (0, eval)(a); };
goog.getCssName = function (a, b) { if ("." == String(a).charAt(0))
throw Error('className passed in goog.getCssName must not start with ".". You passed: ' + a); var c = function (e) { return goog.cssNameMapping_[e] || e; }, d = function (e) { e = e.split("-"); for (var f = [], g = 0; g < e.length; g++)
f.push(c(e[g])); return f.join("-"); }; d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function (e) { return e; }; a = b ? a + "-" + d(b) : d(a); return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(a) : a; };
goog.setCssNameMapping = function (a, b) { goog.cssNameMapping_ = a; goog.cssNameMappingStyle_ = b; };
goog.getMsg = function (a, b, c) { c && c.html && (a = a.replace(/</g, "<")); c && c.unescapeHtmlEntities && (a = a.replace(/</g, "<").replace(/>/g, ">").replace(/'/g, "'").replace(/"/g, '"').replace(/&/g, "&")); b && (a = a.replace(/\{\$([^}]+)}/g, function (d, e) { return null != b && e in b ? b[e] : d; })); return a; };
goog.getMsgWithFallback = function (a) { return a; };
goog.exportSymbol = function (a, b, c) { goog.exportPath_(a, b, !0, c); };
goog.exportProperty = function (a, b, c) { a[b] = c; };
goog.inherits = function (a, b) { function c() { } c.prototype = b.prototype; a.superClass_ = b.prototype; a.prototype = new c; a.prototype.constructor = a; a.base = function (d, e, f) { for (var g = Array(arguments.length - 2), k = 2; k < arguments.length; k++)
g[k - 2] = arguments[k]; return b.prototype[e].apply(d, g); }; };
goog.scope = function (a) { if (goog.isInModuleLoader_())
throw Error("goog.scope is not supported within a module."); a.call(goog.global); };
goog.defineClass = function (a, b) { var c = b.constructor, d = b.statics; c && c != Object.prototype.constructor || (c = function () { throw Error("cannot instantiate an interface (no constructor defined)."); }); c = goog.defineClass.createSealingConstructor_(c, a); a && goog.inherits(c, a); delete b.constructor; delete b.statics; goog.defineClass.applyProperties_(c.prototype, b); null != d && (d instanceof Function ? d(c) : goog.defineClass.applyProperties_(c, d)); return c; };
goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG;
goog.defineClass.createSealingConstructor_ = function (a) { return goog.defineClass.SEAL_CLASS_INSTANCES ? function () { var b = a.apply(this, arguments) || this; b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_]; return b; } : a; };
goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
goog.defineClass.applyProperties_ = function (a, b) { for (var c in b)
Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]); for (var d = 0; d < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; d++)
c = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d], Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]); };
goog.identity_ = function (a) { return a; };
goog.createTrustedTypesPolicy = function (a) { var b = null, c = goog.global.trustedTypes; if (!c || !c.createPolicy)
return b; try {
b = c.createPolicy(a, { createHTML: goog.identity_, createScript: goog.identity_, createScriptURL: goog.identity_ });
}
catch (d) {
goog.logToConsole_(d.message);
} return b; };
var module$exports$jspb$BinaryConstants = { FieldType: { INVALID: -1, DOUBLE: 1, FLOAT: 2, INT64: 3, UINT64: 4, INT32: 5, FIXED64: 6, FIXED32: 7, BOOL: 8, STRING: 9, GROUP: 10, MESSAGE: 11, BYTES: 12, UINT32: 13, ENUM: 14, SFIXED32: 15, SFIXED64: 16, SINT32: 17, SINT64: 18 }, WireType: { INVALID: -1, VARINT: 0, FIXED64: 1, DELIMITED: 2, START_GROUP: 3, END_GROUP: 4, FIXED32: 5 } };
function module$contents$jspb$BinaryConstants_isValidWireType(a) { return 0 <= a && 5 >= a; }
function module$contents$jspb$BinaryConstants_FieldTypeToWireType(a) {
switch (a) {
case module$exports$jspb$BinaryConstants.FieldType.INT32:
case module$exports$jspb$BinaryConstants.FieldType.INT64:
case module$exports$jspb$BinaryConstants.FieldType.UINT32:
case module$exports$jspb$BinaryConstants.FieldType.UINT64:
case module$exports$jspb$BinaryConstants.FieldType.SINT32:
case module$exports$jspb$BinaryConstants.FieldType.SINT64:
case module$exports$jspb$Bin