| (function(){var COMPILED = !0, goog = goog || {}; |
| goog.global = this; |
| goog.isDef = function(a) { |
| return void 0 !== a; |
| }; |
| goog.exportPath_ = function(a, b, c) { |
| a = a.split("."); |
| c = c || goog.global; |
| a[0] in c || !c.execScript || c.execScript("var " + a[0]); |
| for (var d;a.length && (d = a.shift());) { |
| !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {}; |
| } |
| }; |
| goog.define = function(a, b) { |
| var c = b; |
| COMPILED || (goog.global.CLOSURE_UNCOMPILED_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES, a) ? c = goog.global.CLOSURE_UNCOMPILED_DEFINES[a] : goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, a) && (c = goog.global.CLOSURE_DEFINES[a])); |
| goog.exportPath_(a, c); |
| }; |
| goog.DEBUG = !0; |
| goog.LOCALE = "en"; |
| goog.TRUSTED_SITE = !0; |
| goog.STRICT_MODE_COMPATIBLE = !1; |
| goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !goog.DEBUG; |
| goog.provide = function(a) { |
| 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.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/; |
| goog.module = function(a) { |
| if (!goog.isString(a) || !a || -1 == a.search(goog.VALID_MODULE_RE_)) { |
| throw Error("Invalid module identifier"); |
| } |
| if (!goog.isInModuleLoader_()) { |
| throw Error("Module " + a + " has been loaded incorrectly."); |
| } |
| 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) { |
| return goog.isProvided_(a) ? a in goog.loadedModules_ ? goog.loadedModules_[a] : goog.getObjectByName(a) : null; |
| } |
| }; |
| goog.moduleLoaderState_ = null; |
| goog.isInModuleLoader_ = function() { |
| return null != goog.moduleLoaderState_; |
| }; |
| goog.module.declareTestMethods = function() { |
| if (!goog.isInModuleLoader_()) { |
| throw Error("goog.module.declareTestMethods must be called from within a goog.module"); |
| } |
| goog.moduleLoaderState_.declareTestMethods = !0; |
| }; |
| goog.module.declareLegacyNamespace = function() { |
| if (!COMPILED && !goog.isInModuleLoader_()) { |
| 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.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] && goog.isDefAndNotNull(goog.getObjectByName(a)); |
| }, goog.implicitNamespaces_ = {"goog.module":!0}); |
| goog.getObjectByName = function(a, b) { |
| for (var c = a.split("."), d = b || goog.global, e;e = c.shift();) { |
| if (goog.isDefAndNotNull(d[e])) { |
| d = d[e]; |
| } else { |
| 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) { |
| if (goog.DEPENDENCIES_ENABLED) { |
| var e; |
| a = a.replace(/\\/g, "/"); |
| for (var f = goog.dependencies_, g = 0;e = b[g];g++) { |
| f.nameToPath[e] = a, f.pathIsModule[a] = !!d; |
| } |
| for (d = 0;b = c[d];d++) { |
| a in f.requires || (f.requires[a] = {}), f.requires[a][b] = !0; |
| } |
| } |
| }; |
| 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.IS_OLD_IE_ && goog.maybeProcessDeferredDep_(a); |
| if (goog.isProvided_(a)) { |
| return goog.isInModuleLoader_() ? goog.module.getInternal_(a) : null; |
| } |
| if (goog.ENABLE_DEBUG_LOADER) { |
| var b = goog.getPathFromDeps_(a); |
| if (b) { |
| return goog.included_[b] = !0, goog.writeScripts_(), null; |
| } |
| } |
| a = "goog.require could not find: " + a; |
| goog.logToConsole_(a); |
| throw Error(a); |
| } |
| }; |
| goog.basePath = ""; |
| goog.nullFunction = function() { |
| }; |
| goog.identityFunction = function(a, b) { |
| return a; |
| }; |
| goog.abstractMethod = function() { |
| throw Error("unimplemented abstract method"); |
| }; |
| goog.addSingletonGetter = function(a) { |
| 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.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsModule:{}, nameToPath:{}, requires:{}, visited:{}, written:{}, deferred:{}}, goog.inHtmlDocument_ = function() { |
| var a = goog.global.document; |
| return "undefined" != typeof a && "write" in a; |
| }, goog.findBasePath_ = function() { |
| if (goog.global.CLOSURE_BASE_PATH) { |
| goog.basePath = goog.global.CLOSURE_BASE_PATH; |
| } else { |
| if (goog.inHtmlDocument_()) { |
| for (var a = goog.global.document.getElementsByTagName("script"), 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.importScript_ = function(a, b) { |
| (goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_)(a, b) && (goog.dependencies_.written[a] = !0); |
| }, goog.IS_OLD_IE_ = !goog.global.atob && goog.global.document && goog.global.document.all, goog.importModule_ = function(a) { |
| goog.importScript_("", 'goog.retrieveAndExecModule_("' + a + '");') && (goog.dependencies_.written[a] = !0); |
| }, goog.queuedModules_ = [], goog.wrapModule_ = function(a, b) { |
| return goog.LOAD_MODULE_USING_EVAL && goog.isDef(goog.global.JSON) ? "goog.loadModule(" + goog.global.JSON.stringify(b + "\n//# sourceURL=" + a + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + b + "\n;return exports});\n//# sourceURL=" + a + "\n"; |
| }, goog.loadQueuedModules_ = function() { |
| var a = goog.queuedModules_.length; |
| if (0 < a) { |
| var b = goog.queuedModules_; |
| goog.queuedModules_ = []; |
| for (var c = 0;c < a;c++) { |
| goog.maybeProcessDeferredPath_(b[c]); |
| } |
| } |
| }, goog.maybeProcessDeferredDep_ = function(a) { |
| goog.isDeferredModule_(a) && goog.allDepsAreAvailable_(a) && (a = goog.getPathFromDeps_(a), goog.maybeProcessDeferredPath_(goog.basePath + a)); |
| }, goog.isDeferredModule_ = function(a) { |
| return (a = goog.getPathFromDeps_(a)) && goog.dependencies_.pathIsModule[a] ? goog.basePath + a in goog.dependencies_.deferred : !1; |
| }, goog.allDepsAreAvailable_ = function(a) { |
| if ((a = goog.getPathFromDeps_(a)) && a in goog.dependencies_.requires) { |
| for (var b in goog.dependencies_.requires[a]) { |
| if (!goog.isProvided_(b) && !goog.isDeferredModule_(b)) { |
| return !1; |
| } |
| } |
| } |
| return !0; |
| }, goog.maybeProcessDeferredPath_ = function(a) { |
| if (a in goog.dependencies_.deferred) { |
| var b = goog.dependencies_.deferred[a]; |
| delete goog.dependencies_.deferred[a]; |
| goog.globalEval(b); |
| } |
| }, goog.loadModule = function(a) { |
| var b = goog.moduleLoaderState_; |
| try { |
| goog.moduleLoaderState_ = {moduleName:void 0, declareTestMethods:!1}; |
| var c; |
| if (goog.isFunction(a)) { |
| c = a.call(goog.global, {}); |
| } else { |
| if (goog.isString(a)) { |
| c = goog.loadModuleFromSource_.call(goog.global, a); |
| } else { |
| throw Error("Invalid module definition"); |
| } |
| } |
| var d = goog.moduleLoaderState_.moduleName; |
| if (!goog.isString(d) || !d) { |
| throw Error('Invalid module name "' + d + '"'); |
| } |
| goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d, c) : goog.SEAL_MODULE_EXPORTS && Object.seal && Object.seal(c); |
| goog.loadedModules_[d] = c; |
| if (goog.moduleLoaderState_.declareTestMethods) { |
| for (var e in c) { |
| if (0 === e.indexOf("test", 0) || "tearDown" == e || "setUp" == e || "setUpPage" == e || "tearDownPage" == e) { |
| goog.global[e] = c[e]; |
| } |
| } |
| } |
| } finally { |
| goog.moduleLoaderState_ = b; |
| } |
| }, goog.loadModuleFromSource_ = function(a) { |
| eval(a); |
| return {}; |
| }, goog.writeScriptTag_ = function(a, b) { |
| if (goog.inHtmlDocument_()) { |
| var c = goog.global.document; |
| if ("complete" == c.readyState) { |
| if (/\bdeps.js$/.test(a)) { |
| return !1; |
| } |
| throw Error('Cannot write "' + a + '" after document load'); |
| } |
| var d = goog.IS_OLD_IE_; |
| void 0 === b ? d ? (d = " onreadystatechange='goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ", c.write('<script type="text/javascript" src="' + a + '"' + d + ">\x3c/script>")) : c.write('<script type="text/javascript" src="' + a + '">\x3c/script>') : c.write('<script type="text/javascript">' + b + "\x3c/script>"); |
| return !0; |
| } |
| return !1; |
| }, goog.lastNonModuleScriptIndex_ = 0, goog.onScriptLoad_ = function(a, b) { |
| "complete" == a.readyState && goog.lastNonModuleScriptIndex_ == b && goog.loadQueuedModules_(); |
| return !0; |
| }, goog.writeScripts_ = function() { |
| function a(e) { |
| if (!(e in d.written)) { |
| if (!(e in d.visited) && (d.visited[e] = !0, e in d.requires)) { |
| for (var f in d.requires[e]) { |
| if (!goog.isProvided_(f)) { |
| if (f in d.nameToPath) { |
| a(d.nameToPath[f]); |
| } else { |
| throw Error("Undefined nameToPath for " + f); |
| } |
| } |
| } |
| } |
| e in c || (c[e] = !0, b.push(e)); |
| } |
| } |
| var b = [], c = {}, d = goog.dependencies_, e; |
| for (e in goog.included_) { |
| d.written[e] || a(e); |
| } |
| for (var f = 0;f < b.length;f++) { |
| e = b[f], goog.dependencies_.written[e] = !0; |
| } |
| var g = goog.moduleLoaderState_; |
| goog.moduleLoaderState_ = null; |
| for (f = 0;f < b.length;f++) { |
| if (e = b[f]) { |
| d.pathIsModule[e] ? goog.importModule_(goog.basePath + e) : goog.importScript_(goog.basePath + e); |
| } else { |
| throw goog.moduleLoaderState_ = g, Error("Undefined script input"); |
| } |
| } |
| goog.moduleLoaderState_ = g; |
| }, goog.getPathFromDeps_ = function(a) { |
| return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null; |
| }, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js")); |
| 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.retrieveAndExecModule_ = function(a) { |
| if (!COMPILED) { |
| var b = a; |
| a = goog.normalizePath_(a); |
| var c = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_, d = null, e = new goog.global.XMLHttpRequest; |
| e.onload = function() { |
| d = this.responseText; |
| }; |
| e.open("get", a, !1); |
| e.send(); |
| d = e.responseText; |
| if (null != d) { |
| e = goog.wrapModule_(a, d), goog.IS_OLD_IE_ ? (goog.dependencies_.deferred[b] = e, goog.queuedModules_.push(b)) : c(a, e); |
| } else { |
| throw Error("load of " + a + "failed"); |
| } |
| } |
| }; |
| 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.isString = function(a) { |
| return "string" == typeof a; |
| }; |
| goog.isBoolean = function(a) { |
| return "boolean" == typeof a; |
| }; |
| goog.isNumber = function(a) { |
| return "number" == typeof a; |
| }; |
| 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) { |
| "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 (a.clone) { |
| return a.clone(); |
| } |
| var b = "array" == b ? [] : {}, c; |
| for (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_ && (goog.global.eval("var _et_ = 1;"), "undefined" != typeof goog.global._et_ ? (delete goog.global._et_, goog.evalWorksForGlobals_ = !0) : goog.evalWorksForGlobals_ = !1), 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.body.appendChild(c); |
| b.body.removeChild(c); |
| } |
| } else { |
| throw Error("goog.globalEval not available"); |
| } |
| } |
| }; |
| goog.evalWorksForGlobals_ = null; |
| goog.getCssName = function(a, b) { |
| 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; |
| }; |
| return b ? a + "-" + d(b) : d(a); |
| }; |
| 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) { |
| b && (a = a.replace(/\{\$([^}]+)}/g, function(a, d) { |
| return d in b ? b[d] : 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 g = Array(arguments.length - 2), h = 2;h < arguments.length;h++) { |
| g[h - 2] = arguments[h]; |
| } |
| return b.prototype[c].apply(a, g); |
| }; |
| }; |
| 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 (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); |
| } |
| e = Array(arguments.length - 2); |
| for (f = 2;f < arguments.length;f++) { |
| e[f - 2] = arguments[f]; |
| } |
| for (var f = !1, g = a.constructor;g;g = g.superClass_ && g.superClass_.constructor) { |
| if (g.prototype[b] === d) { |
| f = !0; |
| } else { |
| if (f) { |
| return g.prototype[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) { |
| 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 && Object.seal instanceof Function) { |
| if (b && b.prototype && b.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]) { |
| return a; |
| } |
| var c = function() { |
| var b = a.apply(this, arguments) || this; |
| b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_]; |
| this.constructor === c && Object.seal(b); |
| return b; |
| }; |
| return c; |
| } |
| return 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.tagUnsealableClass = function(a) { |
| !COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES && (a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = !0); |
| }; |
| goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable"; |
| var mob = {XhrHijack:function(a) { |
| this.xhr = a || new this.XMLHttpRequestConstructor_; |
| this.onreadystatechange = null; |
| this.readyState = 0; |
| this.statusText = this.responseText = ""; |
| this.xhr.onreadystatechange = this.readyCallback.bind(this); |
| this.xhr.onload = this.onloadCallback.bind(this); |
| }}; |
| mob.XhrHijack.queuedEvents_ = []; |
| mob.XhrHijack.listener_ = {}; |
| mob.XhrHijack.SEND_EVENT_CHAR_ = "s"; |
| mob.XhrHijack.listener_.xhrSendHook = function() { |
| mob.XhrHijack.queuedEvents_.push(mob.XhrHijack.SEND_EVENT_CHAR_); |
| }; |
| mob.XhrHijack.listener_.xhrResponseHook = function(a) { |
| mob.XhrHijack.queuedEvents_.push(a); |
| }; |
| mob.XhrHijack.setListener = function(a) { |
| mob.XhrHijack.listener_ = a; |
| for (a = 0;a < mob.XhrHijack.queuedEvents_.length;++a) { |
| var b = mob.XhrHijack.queuedEvents_[a]; |
| b == mob.XhrHijack.SEND_EVENT_CHAR_ ? mob.XhrHijack.listener_.xhrSendHook() : mob.XhrHijack.listener_.xhrResponseHook(b); |
| } |
| mob.XhrHijack.queuedEvents_ = null; |
| }; |
| window.pagespeedXhrHijackSetListener = mob.XhrHijack.setListener; |
| mob.XhrHijack.prototype.XMLHttpRequestConstructor_ = XMLHttpRequest; |
| mob.XhrHijack.prototype.onloadCallback = function() { |
| this.xhr.responseText && (this.responseText = this.xhr.responseText); |
| if (this.onload) { |
| this.onload(); |
| } |
| }; |
| mob.XhrHijack.prototype.readyCallback = function() { |
| this.readyState = this.xhr.readyState; |
| this.status = this.xhr.status; |
| this.responseText = this.xhr.responseText; |
| this.xhr.statusText && (this.statusText = this.xhr.statusText); |
| if (this.onreadystatechange) { |
| this.onreadystatechange(); |
| } |
| 4 == this.readyState && mob.XhrHijack.listener_.xhrResponseHook(this.status); |
| }; |
| mob.XhrHijack.prototype.abort = function() { |
| this.xhr.abort(); |
| }; |
| mob.XhrHijack.prototype.open = function(a, b, c, d, e) { |
| this.xhr.open(a, b, c, d, e); |
| }; |
| mob.XhrHijack.prototype.send = function(a) { |
| mob.XhrHijack.listener_.xhrSendHook(); |
| this.xhr.send(a); |
| }; |
| mob.XhrHijack.prototype.overrideMimeType = function(a) { |
| this.xhr.overrideMimeType(a); |
| }; |
| mob.XhrHijack.prototype.setRequestHeader = function(a, b) { |
| this.xhr.setRequestHeader(a, b); |
| }; |
| mob.XhrHijack.prototype.getAllResponseHeaders = function() { |
| return this.xhr.getAllResponseHeaders(); |
| }; |
| mob.XhrHijack.prototype.getResponseHeader = function(a) { |
| return this.xhr.getResponseHeader(a); |
| }; |
| window.XMLHttpRequest = mob.XhrHijack; |
| })(); |