UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge

1,296 lines • 650 kB
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.libphonenumber = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ var COMPILED = !0, goog = goog || {}; goog.global = this || self; goog.isDef = function(a) { return void 0 !== a; }; goog.isString = function(a) { return "string" == typeof a; }; goog.isBoolean = function(a) { return "boolean" == typeof a; }; goog.isNumber = function(a) { return "number" == typeof a; }; goog.exportPath_ = function(a, b, c) { a = a.split("."); c = c || goog.global; a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]); for (var d; a.length && (d = a.shift());) { a.length || void 0 === b ? c = c[d] && c[d] !== Object.prototype[d] ? c[d] : c[d] = {} : c[d] = b; } }; goog.define = function(a, b) { var c = b; if (!COMPILED) { var d = goog.global.CLOSURE_UNCOMPILED_DEFINES, e = goog.global.CLOSURE_DEFINES; d && void 0 === d.nodeType && Object.prototype.hasOwnProperty.call(d, a) ? c = d[a] : e && void 0 === e.nodeType && Object.prototype.hasOwnProperty.call(e, a) && (c = e[a]); } return c; }; goog.FEATURESET_YEAR = 2012; goog.DEBUG = !0; goog.LOCALE = "en"; goog.TRUSTED_SITE = !0; goog.STRICT_MODE_COMPATIBLE = !1; goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !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."); } if (!COMPILED && goog.isProvided_(a)) { throw Error('Namespace "' + a + '" already declared.'); } goog.constructNamespace_(a); }; goog.constructNamespace_ = function(a, b) { if (!COMPILED) { delete goog.implicitNamespaces_[a]; for (var c = a; (c = c.substring(0, c.lastIndexOf("."))) && !goog.getObjectByName(c);) { goog.implicitNamespaces_[c] = !0; } } goog.exportPath_(a, b); }; goog.getScriptNonce = function(a) { if (a && a != goog.global) { return goog.getScriptNonce_(a.document); } null === goog.cspNonce_ && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document)); return goog.cspNonce_; }; goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/; goog.cspNonce_ = null; goog.getScriptNonce_ = function(a) { 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; if (!COMPILED) { if (goog.isProvided_(a)) { throw Error('Namespace "' + a + '" already declared.'); } delete goog.implicitNamespaces_[a]; } }; goog.module.get = function(a) { return goog.module.getInternal_(a); }; goog.module.getInternal_ = function(a) { if (!COMPILED) { if (a in goog.loadedModules_) { return goog.loadedModules_[a].exports; } if (!goog.implicitNamespaces_[a]) { return a = goog.getObjectByName(a), null != a ? a : null; } } 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() { if (!COMPILED && !goog.isInGoogModuleLoader_()) { throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module"); } if (!COMPILED && !goog.moduleLoaderState_.moduleName) { throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace."); } goog.moduleLoaderState_.declareLegacyNamespace = !0; }; goog.declareModuleId = function(a) { if (!COMPILED) { if (!goog.isInEs6ModuleLoader_()) { throw Error("goog.declareModuleId may only be called from within an ES6 module"); } if (goog.moduleLoaderState_ && goog.moduleLoaderState_.moduleName) { throw Error("goog.declareModuleId may only be called once per module."); } if (a in goog.loadedModules_) { throw Error('Module with namespace "' + a + '" already exists.'); } } 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(a) { }; COMPILED || (goog.isProvided_ = function(a) { return a in goog.loadedModules_ || !goog.implicitNamespaces_[a] && null != goog.getObjectByName(a); }, goog.implicitNamespaces_ = {"goog.module":!0}); goog.getObjectByName = function(a, b) { for (var c = a.split("."), d = b || goog.global, e = 0; e < c.length; e++) { if (d = d[c[e]], null == d) { return null; } } return d; }; goog.globalize = function(a, b) { var c = b || goog.global, d; for (d in a) { c[d] = a[d]; } }; goog.addDependency = function(a, b, c, d) { !COMPILED && goog.DEPENDENCIES_ENABLED && goog.debugLoader_.addDependency(a, b, c, d); }; goog.ENABLE_DEBUG_LOADER = !0; goog.logToConsole_ = function(a) { goog.global.console && goog.global.console.error(a); }; goog.require = function(a) { if (!COMPILED) { goog.ENABLE_DEBUG_LOADER && goog.debugLoader_.requested(a); if (goog.isProvided_(a)) { if (goog.isInModuleLoader_()) { return goog.module.getInternal_(a); } } else { if (goog.ENABLE_DEBUG_LOADER) { var b = goog.moduleLoaderState_; goog.moduleLoaderState_ = null; try { goog.debugLoader_.load_(a); } finally { goog.moduleLoaderState_ = b; } } } return null; } }; goog.requireType = function(a) { 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 = !COMPILED && goog.ENABLE_DEBUG_LOADER; goog.TRANSPILE = "detect"; goog.ASSUME_ES_MODULES_TRANSPILED = !1; goog.TRANSPILE_TO_LANGUAGE = ""; goog.TRANSPILER = "transpile.js"; goog.hasBadLetScoping = null; goog.useSafari10Workaround = function() { if (null == goog.hasBadLetScoping) { try { var a = !eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";'); } catch (b) { a = !1; } goog.hasBadLetScoping = a; } return goog.hasBadLetScoping; }; goog.workaroundSafari10EvalBug = function(a) { return "(function(){" + a + "\n;})();\n"; }; goog.loadModule = function(a) { var b = goog.moduleLoaderState_; try { goog.moduleLoaderState_ = {moduleName:"", declareLegacyNamespace:!1, type:goog.ModuleType.GOOG}; if (goog.isFunction(a)) { var c = a.call(void 0, {}); } else { if ("string" === typeof a) { goog.useSafari10Workaround() && (a = goog.workaroundSafari10EvalBug(a)), c = goog.loadModuleFromSource_.call(void 0, a); } else { throw Error("Invalid module definition"); } } var d = goog.moduleLoaderState_.moduleName; if ("string" === typeof d && d) { goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d, c) : goog.SEAL_MODULE_EXPORTS && Object.seal && "object" == typeof c && null != c && Object.seal(c), goog.loadedModules_[d] = {exports:c, type:goog.ModuleType.GOOG, moduleId:goog.moduleLoaderState_.moduleName}; } else { throw Error('Invalid module name "' + d + '"'); } } finally { goog.moduleLoaderState_ = b; } }; goog.loadModuleFromSource_ = function(a) { eval(a); return {}; }; 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; } } e || (e = d.transpile = function(a, b) { goog.logToConsole_(b + " requires transpilation but no transpiler was found."); return a; }); return e(a, b, c); }; goog.typeOf = function(a) { var b = typeof a; if ("object" == b) { if (a) { if (a instanceof Array) { return "array"; } if (a instanceof Object) { return b; } var c = Object.prototype.toString.call(a); if ("[object Window]" == c) { return "object"; } if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) { return "array"; } if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) { return "function"; } } else { return "null"; } } else { if ("function" == b && "undefined" == typeof a.call) { return "object"; } } return b; }; goog.isNull = function(a) { return null === a; }; goog.isDefAndNotNull = function(a) { return null != a; }; goog.isArray = function(a) { return "array" == goog.typeOf(a); }; 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.isFunction = function(a) { return "function" == goog.typeOf(a); }; goog.isObject = function(a) { var b = typeof a; return "object" == b && null != a || "function" == b; }; goog.getUid = function(a) { return 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.getHashCode = goog.getUid; goog.removeHashCode = goog.removeUid; goog.cloneObject = function(a) { var b = goog.typeOf(a); if ("object" == b || "array" == b) { if ("function" === typeof a.clone) { return a.clone(); } 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 c = Array.prototype.slice.call(arguments); Array.prototype.unshift.apply(c, d); return a.apply(b, c); }; } 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 b = c.slice(); b.push.apply(b, arguments); return a.apply(this, b); }; }; goog.mixin = function(a, b) { for (var c in b) { a[c] = b[c]; } }; goog.now = goog.TRUSTED_SITE && Date.now || function() { return +new Date; }; goog.globalEval = function(a) { if (goog.global.execScript) { goog.global.execScript(a, "JavaScript"); } else { if (goog.global.eval) { if (null == goog.evalWorksForGlobals_) { try { goog.global.eval("var _evalTest_ = 1;"); } catch (d) { } if ("undefined" != typeof goog.global._evalTest_) { try { delete goog.global._evalTest_; } catch (d) { } goog.evalWorksForGlobals_ = !0; } else { goog.evalWorksForGlobals_ = !1; } } if (goog.evalWorksForGlobals_) { goog.global.eval(a); } else { var b = goog.global.document, c = b.createElement("script"); c.type = "text/javascript"; c.defer = !1; c.appendChild(b.createTextNode(a)); b.head.appendChild(c); b.head.removeChild(c); } } else { throw Error("goog.globalEval not available"); } } }; goog.evalWorksForGlobals_ = null; 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(a) { return goog.cssNameMapping_[a] || a; }, d = function(a) { a = a.split("-"); for (var b = [], d = 0; d < a.length; d++) { b.push(c(a[d])); } return b.join("-"); }; d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function(a) { return a; }; d = b ? a + "-" + d(b) : d(a); return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(d) : d; }; goog.setCssNameMapping = function(a, b) { goog.cssNameMapping_ = a; goog.cssNameMappingStyle_ = b; }; !COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING); goog.getMsg = function(a, b, c) { c && c.html && (a = a.replace(/</g, "&lt;")); b && (a = a.replace(/\{\$([^}]+)}/g, function(a, c) { return null != b && c in b ? b[c] : a; })); return a; }; goog.getMsgWithFallback = function(a, b) { return a; }; goog.exportSymbol = function(a, b, c) { goog.exportPath_(a, b, 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(a, c, f) { for (var d = Array(arguments.length - 2), e = 2; e < arguments.length; e++) { d[e - 2] = arguments[e]; } return b.prototype[c].apply(a, d); }; }; goog.base = function(a, b, c) { var d = arguments.callee.caller; if (goog.STRICT_MODE_COMPATIBLE || goog.DEBUG && !d) { throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C"); } if ("undefined" !== typeof d.superClass_) { for (var e = Array(arguments.length - 1), f = 1; f < arguments.length; f++) { e[f - 1] = arguments[f]; } return d.superClass_.constructor.apply(a, e); } if ("string" != typeof b && "symbol" != typeof b) { throw Error("method names provided to goog.base must be a string or a symbol"); } e = Array(arguments.length - 2); for (f = 2; f < arguments.length; f++) { e[f - 2] = arguments[f]; } f = !1; for (var g = a.constructor.prototype; g; g = Object.getPrototypeOf(g)) { if (g[b] === d) { f = !0; } else { if (f) { return g[b].apply(a, e); } } } if (a[b] === d) { return a.constructor.prototype[b].apply(a, e); } throw Error("goog.base called from a method of one name to a method of a different name"); }; goog.scope = function(a) { if (goog.isInModuleLoader_()) { throw Error("goog.scope is not supported within a module."); } a.call(goog.global); }; COMPILED || (goog.global.COMPILED = COMPILED); 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, b) { if (!goog.defineClass.SEAL_CLASS_INSTANCES) { return a; } var c = !goog.defineClass.isUnsealable_(b), d = function() { var b = a.apply(this, arguments) || this; b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_]; this.constructor === d && c && Object.seal instanceof Function && Object.seal(b); return b; }; return d; }; goog.defineClass.isUnsealable_ = function(a) { return a && a.prototype && a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]; }; 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.tagUnsealableClass = function(a) { !COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES && (a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = !0); }; goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable"; !COMPILED && goog.DEPENDENCIES_ENABLED && (goog.inHtmlDocument_ = function() { var a = goog.global.document; return null != a && "write" in a; }, goog.isDocumentLoading_ = function() { var a = goog.global.document; return a.attachEvent ? "complete" != a.readyState : "loading" == a.readyState; }, goog.findBasePath_ = function() { if (void 0 != goog.global.CLOSURE_BASE_PATH && "string" === typeof goog.global.CLOSURE_BASE_PATH) { goog.basePath = goog.global.CLOSURE_BASE_PATH; } else { if (goog.inHtmlDocument_()) { var a = goog.global.document, b = a.currentScript; a = b ? [b] : a.getElementsByTagName("SCRIPT"); for (b = a.length - 1; 0 <= b; --b) { var c = a[b].src, d = c.lastIndexOf("?"); d = -1 == d ? c.length : d; if ("base.js" == c.substr(d - 7, 7)) { goog.basePath = c.substr(0, d - 7); break; } } } } }, goog.findBasePath_(), goog.Transpiler = function() { this.requiresTranspilation_ = null; this.transpilationTarget_ = goog.TRANSPILE_TO_LANGUAGE; }, goog.Transpiler.prototype.createRequiresTranspilation_ = function() { function a(a, b) { e ? d[a] = !0 : b() ? (c = a, d[a] = !1) : e = d[a] = !0; } function b(a) { try { return !!eval(a); } catch (h) { return !1; } } var c = "es3", d = {es3:!1}, e = !1, f = goog.global.navigator && goog.global.navigator.userAgent ? goog.global.navigator.userAgent : ""; a("es5", function() { return b("[1,].length==1"); }); a("es6", function() { return f.match(/Edge\/(\d+)(\.\d)*/i) ? !1 : b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()'); }); a("es7", function() { return b("2 ** 2 == 4"); }); a("es8", function() { return b("async () => 1, true"); }); a("es9", function() { return b("({...rest} = {}), true"); }); a("es_next", function() { return !1; }); return {target:c, map:d}; }, goog.Transpiler.prototype.needsTranspile = function(a, b) { if ("always" == goog.TRANSPILE) { return !0; } if ("never" == goog.TRANSPILE) { return !1; } if (!this.requiresTranspilation_) { var c = this.createRequiresTranspilation_(); this.requiresTranspilation_ = c.map; this.transpilationTarget_ = this.transpilationTarget_ || c.target; } if (a in this.requiresTranspilation_) { return this.requiresTranspilation_[a] ? !0 : !goog.inHtmlDocument_() || "es6" != b || "noModule" in goog.global.document.createElement("script") ? !1 : !0; } throw Error("Unknown language mode: " + a); }, goog.Transpiler.prototype.transpile = function(a, b) { return goog.transpile_(a, b, this.transpilationTarget_); }, goog.transpiler_ = new goog.Transpiler, goog.protectScriptTag_ = function(a) { return a.replace(/<\/(SCRIPT)/ig, "\\x3c/$1"); }, goog.DebugLoader_ = function() { this.dependencies_ = {}; this.idToPath_ = {}; this.written_ = {}; this.loadingDeps_ = []; this.depsToLoad_ = []; this.paused_ = !1; this.factory_ = new goog.DependencyFactory(goog.transpiler_); this.deferredCallbacks_ = {}; this.deferredQueue_ = []; }, goog.DebugLoader_.prototype.bootstrap = function(a, b) { function c() { d && (goog.global.setTimeout(d, 0), d = null); } var d = b; if (a.length) { for (var e = [], f = 0; f < a.length; f++) { var g = this.getPathFromDeps_(a[f]); if (!g) { throw Error("Unregonized namespace: " + a[f]); } e.push(this.dependencies_[g]); } g = goog.require; var h = 0; for (f = 0; f < a.length; f++) { g(a[f]), e[f].onLoad(function() { ++h == a.length && c(); }); } } else { c(); } }, goog.DebugLoader_.prototype.loadClosureDeps = function() { this.depsToLoad_.push(this.factory_.createDependency(goog.normalizePath_(goog.basePath + "deps.js"), "deps.js", [], [], {}, !1)); this.loadDeps_(); }, goog.DebugLoader_.prototype.requested = function(a, b) { var c = this.getPathFromDeps_(a); if (c && (b || this.areDepsLoaded_(this.dependencies_[c].requires))) { var d = this.deferredCallbacks_[c]; d && (delete this.deferredCallbacks_[c], d()); } }, goog.DebugLoader_.prototype.setDependencyFactory = function(a) { this.factory_ = a; }, goog.DebugLoader_.prototype.load_ = function(a) { if (this.getPathFromDeps_(a)) { var b = this, c = [], d = function(a) { var e = b.getPathFromDeps_(a); if (!e) { throw Error("Bad dependency path or symbol: " + a); } if (!b.written_[e]) { b.written_[e] = !0; a = b.dependencies_[e]; for (e = 0; e < a.requires.length; e++) { goog.isProvided_(a.requires[e]) || d(a.requires[e]); } c.push(a); } }; d(a); a = !!this.depsToLoad_.length; this.depsToLoad_ = this.depsToLoad_.concat(c); this.paused_ || a || this.loadDeps_(); } else { throw a = "goog.require could not find: " + a, goog.logToConsole_(a), Error(a); } }, goog.DebugLoader_.prototype.loadDeps_ = function() { for (var a = this, b = this.paused_; this.depsToLoad_.length && !b;) { (function() { var c = !1, d = a.depsToLoad_.shift(), e = !1; a.loading_(d); var f = {pause:function() { if (c) { throw Error("Cannot call pause after the call to load."); } b = !0; }, resume:function() { c ? a.resume_() : b = !1; }, loaded:function() { if (e) { throw Error("Double call to loaded."); } e = !0; a.loaded_(d); }, pending:function() { for (var b = [], c = 0; c < a.loadingDeps_.length; c++) { b.push(a.loadingDeps_[c]); } return b; }, setModuleState:function(a) { goog.moduleLoaderState_ = {type:a, moduleName:"", declareLegacyNamespace:!1}; }, registerEs6ModuleExports:function(a, b, c) { c && (goog.loadedModules_[c] = {exports:b, type:goog.ModuleType.ES6, moduleId:c || ""}); }, registerGoogModuleExports:function(a, b) { goog.loadedModules_[a] = {exports:b, type:goog.ModuleType.GOOG, moduleId:a}; }, clearModuleState:function() { goog.moduleLoaderState_ = null; }, defer:function(b) { if (c) { throw Error("Cannot register with defer after the call to load."); } a.defer_(d, b); }, areDepsLoaded:function() { return a.areDepsLoaded_(d.requires); }}; try { d.load(f); } finally { c = !0; } })(); } b && this.pause_(); }, goog.DebugLoader_.prototype.pause_ = function() { this.paused_ = !0; }, goog.DebugLoader_.prototype.resume_ = function() { this.paused_ && (this.paused_ = !1, this.loadDeps_()); }, goog.DebugLoader_.prototype.loading_ = function(a) { this.loadingDeps_.push(a); }, goog.DebugLoader_.prototype.loaded_ = function(a) { for (var b = 0; b < this.loadingDeps_.length; b++) { if (this.loadingDeps_[b] == a) { this.loadingDeps_.splice(b, 1); break; } } for (b = 0; b < this.deferredQueue_.length; b++) { if (this.deferredQueue_[b] == a.path) { this.deferredQueue_.splice(b, 1); break; } } if (this.loadingDeps_.length == this.deferredQueue_.length && !this.depsToLoad_.length) { for (; this.deferredQueue_.length;) { this.requested(this.deferredQueue_.shift(), !0); } } a.loaded(); }, goog.DebugLoader_.prototype.areDepsLoaded_ = function(a) { for (var b = 0; b < a.length; b++) { var c = this.getPathFromDeps_(a[b]); if (!c || !(c in this.deferredCallbacks_ || goog.isProvided_(a[b]))) { return !1; } } return !0; }, goog.DebugLoader_.prototype.getPathFromDeps_ = function(a) { return a in this.idToPath_ ? this.idToPath_[a] : a in this.dependencies_ ? a : null; }, goog.DebugLoader_.prototype.defer_ = function(a, b) { this.deferredCallbacks_[a.path] = b; this.deferredQueue_.push(a.path); }, goog.LoadController = function() { }, goog.LoadController.prototype.pause = function() { }, goog.LoadController.prototype.resume = function() { }, goog.LoadController.prototype.loaded = function() { }, goog.LoadController.prototype.pending = function() { }, goog.LoadController.prototype.registerEs6ModuleExports = function(a, b, c) { }, goog.LoadController.prototype.setModuleState = function(a) { }, goog.LoadController.prototype.clearModuleState = function() { }, goog.LoadController.prototype.defer = function(a) { }, goog.LoadController.prototype.areDepsLoaded = function() { }, goog.Dependency = function(a, b, c, d, e) { this.path = a; this.relativePath = b; this.provides = c; this.requires = d; this.loadFlags = e; this.loaded_ = !1; this.loadCallbacks_ = []; }, goog.Dependency.prototype.getPathName = function() { var a = this.path, b = a.indexOf("://"); 0 <= b && (a = a.substring(b + 3), b = a.indexOf("/"), 0 <= b && (a = a.substring(b + 1))); return a; }, goog.Dependency.prototype.onLoad = function(a) { this.loaded_ ? a() : this.loadCallbacks_.push(a); }, goog.Dependency.prototype.loaded = function() { this.loaded_ = !0; var a = this.loadCallbacks_; this.loadCallbacks_ = []; for (var b = 0; b < a.length; b++) { a[b](); } }, goog.Dependency.defer_ = !1, goog.Dependency.callbackMap_ = {}, goog.Dependency.registerCallback_ = function(a) { var b = Math.random().toString(32); goog.Dependency.callbackMap_[b] = a; return b; }, goog.Dependency.unregisterCallback_ = function(a) { delete goog.Dependency.callbackMap_[a]; }, goog.Dependency.callback_ = function(a, b) { if (a in goog.Dependency.callbackMap_) { for (var c = goog.Dependency.callbackMap_[a], d = [], e = 1; e < arguments.length; e++) { d.push(arguments[e]); } c.apply(void 0, d); } else { throw Error("Callback key " + a + " does not exist (was base.js loaded more than once?)."); } }, goog.Dependency.prototype.load = function(a) { if (goog.global.CLOSURE_IMPORT_SCRIPT) { goog.global.CLOSURE_IMPORT_SCRIPT(this.path) ? a.loaded() : a.pause(); } else { if (goog.inHtmlDocument_()) { var b = goog.global.document; if ("complete" == b.readyState && !goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) { if (/\bdeps.js$/.test(this.path)) { a.loaded(); return; } throw Error('Cannot write "' + this.path + '" after document load'); } if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && goog.isDocumentLoading_()) { var c = goog.Dependency.registerCallback_(function(b) { goog.DebugLoader_.IS_OLD_IE_ && "complete" != b.readyState || (goog.Dependency.unregisterCallback_(c), a.loaded()); }), d = !goog.DebugLoader_.IS_OLD_IE_ && goog.getScriptNonce() ? ' nonce="' + goog.getScriptNonce() + '"' : ""; d = '<script src="' + this.path + '" ' + (goog.DebugLoader_.IS_OLD_IE_ ? "onreadystatechange" : "onload") + "=\"goog.Dependency.callback_('" + c + '\', this)" type="text/javascript" ' + (goog.Dependency.defer_ ? "defer" : "") + d + ">\x3c/script>"; b.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(d) : d); } else { var e = b.createElement("script"); e.defer = goog.Dependency.defer_; e.async = !1; e.type = "text/javascript"; (d = goog.getScriptNonce()) && e.setAttribute("nonce", d); goog.DebugLoader_.IS_OLD_IE_ ? (a.pause(), e.onreadystatechange = function() { if ("loaded" == e.readyState || "complete" == e.readyState) { a.loaded(), a.resume(); } }) : e.onload = function() { e.onload = null; a.loaded(); }; e.src = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path) : this.path; b.head.appendChild(e); } } else { goog.logToConsole_("Cannot use default debug loader outside of HTML documents."), "deps.js" == this.relativePath ? (goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."), a.loaded()) : a.pause(); } } }, goog.Es6ModuleDependency = function(a, b, c, d, e) { goog.Dependency.call(this, a, b, c, d, e); }, goog.inherits(goog.Es6ModuleDependency, goog.Dependency), goog.Es6ModuleDependency.prototype.load = function(a) { function b(a, b) { var c = b ? '<script type="module" crossorigin>' + b + "\x3c/script>" : '<script type="module" crossorigin src="' + a + '">\x3c/script>'; d.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(c) : c); } function c(a, b) { var c = d.createElement("script"); c.defer = !0; c.async = !1; c.type = "module"; c.setAttribute("crossorigin", !0); var e = goog.getScriptNonce(); e && c.setAttribute("nonce", e); b ? c.textContent = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScript(b) : b : c.src = goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createScriptURL(a) : a; d.head.appendChild(c); } if (goog.global.CLOSURE_IMPORT_SCRIPT) { goog.global.CLOSURE_IMPORT_SCRIPT(this.path) ? a.loaded() : a.pause(); } else { if (goog.inHtmlDocument_()) { var d = goog.global.document, e = this; if (goog.isDocumentLoading_()) { var f = b; goog.Dependency.defer_ = !0; } else { f = c; } var g = goog.Dependency.registerCallback_(function() { goog.Dependency.unregisterCallback_(g); a.setModuleState(goog.ModuleType.ES6); }); f(void 0, 'goog.Dependency.callback_("' + g + '")'); f(this.path, void 0); var h = goog.Dependency.registerCallback_(function(b) { goog.Dependency.unregisterCallback_(h); a.registerEs6ModuleExports(e.path, b, goog.moduleLoaderState_.moduleName); }); f(void 0, 'import * as m from "' + this.path + '"; goog.Dependency.callback_("' + h + '", m)'); var k = goog.Dependency.registerCallback_(function() { goog.Dependency.unregisterCallback_(k); a.clearModuleState(); a.loaded(); }); f(void 0, 'goog.Dependency.callback_("' + k + '")'); } else { goog.logToConsole_("Cannot use default debug loader outside of HTML documents."), a.pause(); } } }, goog.TransformedDependency = function(a, b, c, d, e) { goog.Dependency.call(this, a, b, c, d, e); this.contents_ = null; this.lazyFetch_ = !goog.inHtmlDocument_() || !("noModule" in goog.global.document.createElement("script")); }, goog.inherits(goog.TransformedDependency, goog.Dependency), goog.TransformedDependency.prototype.load = function(a) { function b() { e.contents_ = goog.loadFileSync_(e.path); e.contents_ && (e.contents_ = e.transform(e.contents_), e.contents_ && (e.contents_ += "\n//# sourceURL=" + e.path)); } function c() { e.lazyFetch_ && b(); if (e.contents_) { f && a.setModuleState(goog.ModuleType.ES6); try { var c = e.contents_; e.contents_ = null; goog.globalEval(c); if (f) { var d = goog.moduleLoaderState_.moduleName; } } finally { f && a.clearModuleState(); } f && goog.global.$jscomp.require.ensure([e.getPathName()], function() { a.registerEs6ModuleExports(e.path, goog.global.$jscomp.require(e.getPathName()), d); }); a.loaded(); } } function d() { var a = goog.global.document, b = goog.Dependency.registerCallback_(function() { goog.Dependency.unregisterCallback_(b); c(); }), d = '<script type="text/javascript">' + goog.protectScriptTag_('goog.Dependency.callback_("' + b + '");') + "\x3c/script>"; a.write(goog.TRUSTED_TYPES_POLICY_ ? goog.TRUSTED_TYPES_POLICY_.createHTML(d) : d); } var e = this; if (goog.global.CLOSURE_IMPORT_SCRIPT) { b(), this.contents_ && goog.global.CLOSURE_IMPORT_SCRIPT("", this.contents_) ? (this.contents_ = null, a.loaded()) : a.pause(); } else { var f = this.loadFlags.module == goog.ModuleType.ES6; this.lazyFetch_ || b(); var g = 1 < a.pending().length, h = g && goog.DebugLoader_.IS_OLD_IE_; g = goog.Dependency.defer_ && (g || goog.isDocumentLoading_()); if (h || g) { a.defer(function() { c(); }); } else { var k = goog.global.document; h = goog.inHtmlDocument_() && "ActiveXObject" in goog.global; if (f && goog.inHtmlDocument_() && goog.isDocumentLoading_() && !h) { goog.Dependency.defer_ = !0; a.pause(); var l = k.onreadystatechange; k.onreadystatechange = function() { "interactive" == k.readyState && (k.onreadystatechange = l, c(), a.resume()); goog.isFunction(l) && l.apply(void 0, arguments); }; } else { !goog.DebugLoader_.IS_OLD_IE_ && goog.inHtmlDocument_() && goog.isDocumentLoading_() ? d() : c(); } } } }, goog.TransformedDependency.prototype.transform = function(a) { }, goog.TranspiledDependency = function(a, b, c, d, e, f) { goog.TransformedDependency.call(this, a, b, c, d, e); this.transpiler = f; }, goog.inherits(goog.TranspiledDependency, goog.TransformedDependency), goog.TranspiledDependency.prototype.transform = function(a) { return this.transpiler.transpile(a, this.getPathName()); }, goog.PreTranspiledEs6ModuleDependency = function(a, b, c, d, e) { goog.TransformedDependency.call(this, a, b, c, d, e); }, goog.inherits(goog.PreTranspiledEs6ModuleDependency, goog.TransformedDependency), goog.PreTranspiledEs6ModuleDependency.prototype.transform = function(a) { return a; }, goog.GoogModuleDependency = function(a, b, c, d, e, f, g) { goog.TransformedDependency.call(this, a, b, c, d, e); this.needsTranspile_ = f; this.transpiler_ = g; }, goog.inherits(goog.GoogModuleDependency, goog.TransformedDependency), goog.GoogModuleDependency.prototype.transform = function(a) { this.needsTranspile_ && (a = this.transpiler_.transpile(a, this.getPathName())); return goog.LOAD_MODULE_USING_EVAL && void 0 !== goog.global.JSON ? "goog.loadModule(" + goog.global.JSON.stringify(a + "\n//# sourceURL=" + this.path + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + a + "\n;return exports});\n//# sourceURL=" + this.path + "\n"; }, goog.DebugLoader_.IS_OLD_IE_ = !(goog.global.atob || !goog.global.document || !goog.global.document.all), goog.DebugLoader_.prototype.addDependency = function(a, b, c, d) { b = b || []; a = a.replace(/\\/g, "/"); var e = goog.normalizePath_(goog.basePath + a); d && "boolean" !== typeof d || (d = d ? {module:goog.ModuleType.GOOG} : {}); c = this.factory_.createDependency(e, a, b, c, d, goog.transpiler_.needsTranspile(d.lang || "es3", d.module)); this.dependencies_[e] = c; for (c = 0; c < b.length; c++) { this.idToPath_[b[c]] = e; } this.idToPath_[a] = e; }, goog.DependencyFactory = function(a) { this.transpiler = a; }, goog.DependencyFactory.prototype.createDependency = function(a, b, c, d, e, f) { return e.module == goog.ModuleType.GOOG ? new goog.GoogModuleDependency(a, b, c, d, e, f, this.transpiler) : f ? new goog.TranspiledDependency(a, b, c, d, e, this.transpiler) : e.module == goog.ModuleType.ES6 ? "never" == goog.TRANSPILE && goog.ASSUME_ES_MODULES_TRANSPILED ? new goog.PreTranspiledEs6ModuleDependency(a, b, c, d, e) : new goog.Es6ModuleDependency(a, b, c, d, e) : new goog.Dependency(a, b, c, d, e); }, goog.debugLoader_ = new goog.DebugLoader_, goog.loadClosureDeps = function() { goog.debugLoader_.loadClosureDeps(); }, goog.setDependencyFactory = function(a) { goog.debugLoader_.setDependencyFactory(a); }, goog.global.CLOSURE_NO_DEPS || goog.debugLoader_.loadClosureDeps(), goog.bootstrap = function(a, b) { goog.debugLoader_.bootstrap(a, b); }); goog.TRUSTED_TYPES_POLICY_NAME = ""; goog.identity_ = function(a) { return a; }; goog.createTrustedTypesPolicy = function(a) { var b = null, c = goog.global.trustedTypes || goog.global.TrustedTypes; if (!c || !c.createPolicy) { return b; } try { b = c.createPolicy(a, {createHTML:goog.identity_, createScript:goog.identity_, createScriptURL:goog.identity_, createURL:goog.identity_}); } catch (d) { goog.logToConsole_(d.message); } return b; }; goog.TRUSTED_TYPES_POLICY_ = goog.TRUSTED_TYPES_POLICY_NAME ? goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + "#base") : null; goog.string = {}; goog.string.StringBuffer = function(a, b) { null != a && this.append.apply(this, arguments); }; goog.string.StringBuffer.prototype.buffer_ = ""; goog.string.StringBuffer.prototype.set = function(a) { this.buffer_ = "" + a; }; goog.string.StringBuffer.prototype.append = function(a, b, c) { this.buffer_ += String(a); if (null != b) { for (var d = 1; d < arguments.length; d++) { this.buffer_ += arguments[d]; } } return this; }; goog.string.StringBuffer.prototype.clear = function() { this.buffer_ = ""; }; goog.string.StringBuffer.prototype.getLength = function() { return this.buffer_.length; }; goog.string.StringBuffer.prototype.toString = function() { return this.buffer_; }; goog.debug = {}; goog.debug.Error = function(a) { if (Error.captureStackTrace) { Error.captureStackTrace(this, goog.debug.Error); } else { var b = Error().stack; b && (this.stack = b); } a && (this.message = String(a)); this.reportErrorToServer = !0; }; goog.inherits(goog.debug.Error, Error); goog.debug.Error.prototype.name = "CustomError"; goog.dom = {}; goog.dom.NodeType = {ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, ENTITY_REFERENCE:5, ENTITY:6, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9, DOCUMENT_TYPE:10, DOCUMENT_FRAGMENT:11, NOTATION:12}; goog.asserts = {}; goog.asserts.ENABLE_ASSERTS = goog.DEBUG; goog.asserts.AssertionError = function(a, b) { goog.debug.Error.call(this, goog.asserts.subs_(a, b)); this.messagePattern = a; }; goog.inherits(goog.asserts.AssertionError, goog.debug.Error); goog.asserts.AssertionError.prototype.name = "AssertionError"; goog.asserts.DEFAULT_ERROR_HANDLER = function(a) { throw a; }; goog.asserts.errorHandler_ = goog.asserts.DEFAULT_ERROR_HANDLER; goog.asserts.subs_ = function(a, b) { for (var c = a.split("%s"), d = "", e = c.length - 1, f = 0; f < e; f++) { d += c[f] + (f < b.length ? b[f] : "%s"); } return d + c[e]; }; goog.asserts.doAssertFailure_ = function(a, b, c, d) { var e = "Assertion failed"; if (c) { e += ": " + c; var f = d; } else { a && (e += ": " + a, f = b); } a = new goog.asserts.AssertionError("" + e, f || []); goog.asserts.errorHandler_(a); }; goog.asserts.setErrorHandler = function(a) { goog.asserts.ENABLE_ASSERTS && (goog.asserts.errorHandler_ = a); }; goog.asserts.assert = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertExists = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && null == a && goog.asserts.doAssertFailure_("Expected to exist: %s.", [a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.fail = function(a, b) { goog.asserts.ENABLE_ASSERTS && goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1))); }; goog.asserts.assertNumber = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && "number" !== typeof a && goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertString = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && "string" !== typeof a && goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertFunction = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertObject = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertArray = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && !goog.isArray(a) && goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertBoolean = function(a, b, c) { goog.asserts.ENABLE_ASSERTS && "boolean" !== typeof a && goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertElement = function(a, b, c) { !goog.asserts.ENABLE_ASSERTS || goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT || goog.asserts.doAssertFailure_("Expected Element but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertInstanceof = function(a, b, c, d) { !goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.", [goog.asserts.getType_(b), goog.asserts.getType_(a)], c, Array.prototype.slice.call(arguments, 3)); return a; }; goog.asserts.assertFinite = function(a, b, c) { !goog.asserts.ENABLE_ASSERTS || "number" == typeof a && isFinite(a) || goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.", [a], b, Array.prototype.slice.call(arguments, 2)); return a; }; goog.asserts.assertObjectPrototypeIsIntact = function() { for (var a in Object.prototype) { goog.asserts.fail(a + " should not be enumerable in Object.prototype."); } }; goog.asserts.getType_ = function(a) { return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a; }; goog.array = {}; goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE; goog.array.ASSUME_NATIVE_FUNCTIONS = 2012 < goog.FEATURESET_YEAR; goog.array.peek = function(a) { return a[a.length - 1]; }; goog.array.last = goog.array.peek; goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ? function(a, b, c) { goog.asserts.assert(null != a.length); return Array.prototype.indexOf.call(a, b, c); } : function(a, b, c) { c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c; if ("string" === typeof a) { return "string" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, c); } for (; c < a.length; c++) { if (c in a && a[c] === b) { return c; } } return -1; }; goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ? function(a, b, c) { goog.asserts.assert(null != a.length); return Array.prototype.lastIndexOf.call(a, b, null == c ? a.length - 1 : c); } : function(a, b, c) { c = null == c ? a.length - 1 : c; 0 > c && (c = Math.max(0, a.length + c)); if ("string" === typeof a) { return "string" !== typeof b || 1 != b.length ? -1 : a.lastIndexOf(b, c); } for (; 0 <= c; c--) { if (c in a && a[c] === b) { return c; } } return -1; }; goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ? function(a, b, c) { goog.asserts.assert(null != a.length); Array.prototype.forEach.call(a, b, c); } : function(a, b, c) { for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) { f in e && b.call(c, e[f], f, a); } }; goog.array.forEachRight = function(a, b, c) { var d = a.length, e = "string" === typeof a ? a.split("") : a; for (--d; 0 <= d; --d) { d in e && b.call(c, e[d], d, a); } }; goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ? function(a, b, c) { goog.asserts.assert(null != a.length); return Array.prototype.filter.call(a, b, c); } : function(a, b, c) { for (var d = a.length, e = [], f = 0, g = "string" === typeof a ? a.split("") : a, h = 0; h < d; h++) { if (h in g) { var k = g[h]; b.call(c, k, h, a) && (e[f++] = k); } } return e; }; goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function(a, b, c) { goog.asserts.assert(null != a.length); return Array.prototype.map.call(a, b, c); } : function(a, b, c) { for (var d = a.length, e = Array(d), f = "string" === typeof a ? a.split("") : a, g = 0; g < d; g++) { g in f && (e[g] = b.call(c, f[g], g, a)); } return e; }; goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Arra