var a,k=k||{};k.scope={};k.checkStringArgs=function(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""};k.ASSUME_ES5=!1;k.ASSUME_NO_NATIVE_MAP=!1;k.ASSUME_NO_NATIVE_SET=!1;
k.defineProperty=k.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)};k.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};k.global=k.getGlobal(this);
k.polyfill=function(b,c){if(c){var d=k.global;b=b.split(".");for(var e=0;e<b.length-1;e++){var f=b[e];f in d||(d[f]={});d=d[f]}b=b[b.length-1];e=d[b];c=c(e);c!=e&&null!=c&&k.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}};k.findInternal=function(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{i:f,v:g}}return{i:-1,v:void 0}};var n=n||{};n.global=this;n.isDef=function(b){return void 0!==b};
n.isString=function(b){return"string"==typeof b};n.isBoolean=function(b){return"boolean"==typeof b};n.isNumber=function(b){return"number"==typeof b};n.exportPath_=function(b,c,d){b=b.split(".");d=d||n.global;b[0]in d||!d.execScript||d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&n.isDef(c)?d[e]=c:d=d[e]&&d[e]!==Object.prototype[e]?d[e]:d[e]={}};n.define=function(b,c){n.exportPath_(b,c)};n.DEBUG=!0;n.LOCALE="en";n.TRUSTED_SITE=!0;n.STRICT_MODE_COMPATIBLE=!1;
n.DISALLOW_TEST_ONLY_CODE=!n.DEBUG;n.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;n.provide=function(b){if(n.isInModuleLoader_())throw Error("goog.provide can not be used within a goog.module.");n.constructNamespace_(b)};n.constructNamespace_=function(b,c){n.exportPath_(b,c)};n.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
n.module=function(b){if(!n.isString(b)||!b||-1==b.search(n.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!n.isInModuleLoader_())throw Error("Module "+b+" 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(n.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");
n.moduleLoaderState_.moduleName=b};n.module.get=function(){return null};n.module.getInternal_=function(){return null};n.moduleLoaderState_=null;n.isInModuleLoader_=function(){return null!=n.moduleLoaderState_};n.module.declareLegacyNamespace=function(){n.moduleLoaderState_.declareLegacyNamespace=!0};n.setTestOnly=function(b){if(n.DISALLOW_TEST_ONLY_CODE)throw b=b||"",Error("Importing test-only code into non-debug environment"+(b?": "+b:"."));};n.forwardDeclare=function(){};
n.getObjectByName=function(b){b=b.split(".");for(var c=n.global,d=0;d<b.length;d++)if(c=c[b[d]],!n.isDefAndNotNull(c))return null;return c};n.globalize=function(b,c){c=c||n.global;for(var d in b)c[d]=b[d]};n.addDependency=function(b,c,d,e){if(n.DEPENDENCIES_ENABLED){var f;b=b.replace(/\\/g,"/");var g=n.dependencies_;e&&"boolean"!==typeof e||(e=e?{module:"goog"}:{});for(var h=0;f=c[h];h++)g.nameToPath[f]=b,g.loadFlags[b]=e;for(e=0;c=d[e];e++)b in g.requires||(g.requires[b]={}),g.requires[b][c]=!0}};
n.useStrictRequires=!1;n.ENABLE_DEBUG_LOADER=!0;n.logToConsole_=function(b){n.global.console&&n.global.console.error(b)};n.require=function(){};n.basePath="";n.nullFunction=function(){};n.abstractMethod=function(){throw Error("unimplemented abstract method");};n.addSingletonGetter=function(b){b.instance_=void 0;b.getInstance=function(){if(b.instance_)return b.instance_;n.DEBUG&&(n.instantiatedSingletons_[n.instantiatedSingletons_.length]=b);return b.instance_=new b}};n.instantiatedSingletons_=[];
n.LOAD_MODULE_USING_EVAL=!0;n.SEAL_MODULE_EXPORTS=n.DEBUG;n.loadedModules_={};n.DEPENDENCIES_ENABLED=!1;n.TRANSPILE="detect";n.TRANSPILER="transpile.js";
n.DEPENDENCIES_ENABLED&&(n.dependencies_={loadFlags:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},n.inHtmlDocument_=function(){var b=n.global.document;return null!=b&&"write"in b},n.findBasePath_=function(){if(n.isDef(n.global.CLOSURE_BASE_PATH)&&n.isString(n.global.CLOSURE_BASE_PATH))n.basePath=n.global.CLOSURE_BASE_PATH;else if(n.inHtmlDocument_()){var b=n.global.document,c=b.currentScript;b=c?[c]:b.getElementsByTagName("SCRIPT");for(c=b.length-1;0<=c;--c){var d=b[c].src,e=d.lastIndexOf("?");
e=-1==e?d.length:e;if("base.js"==d.substr(e-7,7)){n.basePath=d.substr(0,e-7);break}}}},n.importScript_=function(b,c){(n.global.CLOSURE_IMPORT_SCRIPT||n.writeScriptTag_)(b,c)&&(n.dependencies_.written[b]=!0)},n.IS_OLD_IE_=!(n.global.atob||!n.global.document||!n.global.document.all),n.oldIeWaiting_=!1,n.importProcessedScript_=function(b,c,d){n.importScript_("",'goog.retrieveAndExec_("'+b+'", '+c+", "+d+");")},n.queuedModules_=[],n.wrapModule_=function(b,c){return n.LOAD_MODULE_USING_EVAL&&n.isDef(n.global.JSON)?
"goog.loadModule("+n.global.JSON.stringify(c+"\n//# sourceURL="+b+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+c+"\n;return exports});\n//# sourceURL="+b+"\n"},n.loadQueuedModules_=function(){var b=n.queuedModules_.length;if(0<b){var c=n.queuedModules_;n.queuedModules_=[];for(var d=0;d<b;d++)n.maybeProcessDeferredPath_(c[d])}n.oldIeWaiting_=!1},n.maybeProcessDeferredDep_=function(b){n.isDeferredModule_(b)&&n.allDepsAreAvailable_(b)&&n.maybeProcessDeferredPath_(n.basePath+n.getPathFromDeps_(b))},
n.isDeferredModule_=function(b){var c=(b=n.getPathFromDeps_(b))&&n.dependencies_.loadFlags[b]||{},d=c.lang||"es3";return b&&("goog"==c.module||n.needsTranspile_(d))?n.basePath+b in n.dependencies_.deferred:!1},n.allDepsAreAvailable_=function(b){if((b=n.getPathFromDeps_(b))&&b in n.dependencies_.requires)for(var c in n.dependencies_.requires[b])if(!n.isProvided_(c)&&!n.isDeferredModule_(c))return!1;return!0},n.maybeProcessDeferredPath_=function(b){if(b in n.dependencies_.deferred){var c=n.dependencies_.deferred[b];
delete n.dependencies_.deferred[b];n.globalEval(c)}},n.loadModuleFromUrl=function(){},n.writeScriptSrcNode_=function(b){n.global.document.write('<script type="text/javascript" src="'+b+'">\x3c/script>')},n.appendScriptSrcNode_=function(b){var c=n.global.document,d=c.createElement("script");d.type="text/javascript";d.src=b;d.defer=!1;d.async=!1;c.head.appendChild(d)},n.writeScriptTag_=function(b,c){if(n.inHtmlDocument_()){var d=n.global.document;if(!n.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==
d.readyState){if(/\bdeps.js$/.test(b))return!1;throw Error('Cannot write "'+b+'" after document load');}void 0===c?n.IS_OLD_IE_?(n.oldIeWaiting_=!0,c=" onreadystatechange='goog.onScriptLoad_(this, "+ ++n.lastNonModuleScriptIndex_+")' ",d.write('<script type="text/javascript" src="'+b+'"'+c+">\x3c/script>")):n.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?n.appendScriptSrcNode_(b):n.writeScriptSrcNode_(b):d.write('<script type="text/javascript">'+n.protectScriptTag_(c)+"\x3c/script>");return!0}return!1},n.protectScriptTag_=
function(b){return b.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},n.needsTranspile_=function(b){if("always"==n.TRANSPILE)return!0;if("never"==n.TRANSPILE)return!1;n.requiresTranspilation_||(n.requiresTranspilation_=n.createRequiresTranspilation_());if(b in n.requiresTranspilation_)return n.requiresTranspilation_[b];throw Error("Unknown language mode: "+b);},n.requiresTranspilation_=null,n.lastNonModuleScriptIndex_=0,n.onScriptLoad_=function(b,c){"complete"==b.readyState&&n.lastNonModuleScriptIndex_==c&&n.loadQueuedModules_();
return!0},n.writeScripts_=function(b){function c(b){if(!(b in f.written||b in f.visited)){f.visited[b]=!0;if(b in f.requires)for(var g in f.requires[b])if(!n.isProvided_(g))if(g in f.nameToPath)c(f.nameToPath[g]);else throw Error("Undefined nameToPath for "+g);b in e||(e[b]=!0,d.push(b))}}var d=[],e={},f=n.dependencies_;c(b);for(b=0;b<d.length;b++){var g=d[b];n.dependencies_.written[g]=!0}var h=n.moduleLoaderState_;n.moduleLoaderState_=null;for(b=0;b<d.length;b++)if(g=d[b]){var l=f.loadFlags[g]||
{},m=n.needsTranspile_(l.lang||"es3");"goog"==l.module||m?n.importProcessedScript_(n.basePath+g,"goog"==l.module,m):n.importScript_(n.basePath+g)}else throw n.moduleLoaderState_=h,Error("Undefined script input");n.moduleLoaderState_=h},n.getPathFromDeps_=function(b){return b in n.dependencies_.nameToPath?n.dependencies_.nameToPath[b]:null},n.findBasePath_(),n.global.CLOSURE_NO_DEPS||n.importScript_(n.basePath+"deps.js"));n.hasBadLetScoping=null;
n.useSafari10Workaround=function(){if(null==n.hasBadLetScoping){try{var b=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(c){b=!1}n.hasBadLetScoping=b}return n.hasBadLetScoping};n.workaroundSafari10EvalBug=function(b){return"(function(){"+b+"\n;})();\n"};
n.loadModule=function(b){var c=n.moduleLoaderState_;try{n.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1};if(n.isFunction(b))var d=b.call(void 0,{});else if(n.isString(b))n.useSafari10Workaround()&&(b=n.workaroundSafari10EvalBug(b)),d=n.loadModuleFromSource_.call(void 0,b);else throw Error("Invalid module definition");var e=n.moduleLoaderState_.moduleName;if(!n.isString(e)||!e)throw Error('Invalid module name "'+e+'"');n.moduleLoaderState_.declareLegacyNamespace?n.constructNamespace_(e,
d):n.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof d&&null!=d&&Object.seal(d);n.loadedModules_[e]=d}finally{n.moduleLoaderState_=c}};n.loadModuleFromSource_=function(b){eval(b);return{}};n.normalizePath_=function(b){b=b.split("/");for(var c=0;c<b.length;)"."==b[c]?b.splice(c,1):c&&".."==b[c]&&b[c-1]&&".."!=b[c-1]?b.splice(--c,2):c++;return b.join("/")};
n.loadFileSync_=function(b){if(n.global.CLOSURE_LOAD_FILE_SYNC)return n.global.CLOSURE_LOAD_FILE_SYNC(b);try{var c=new n.global.XMLHttpRequest;c.open("get",b,!1);c.send();return 0==c.status||200==c.status?c.responseText:null}catch(d){return null}};n.retrieveAndExec_=function(){};
n.transpile_=function(b,c){var d=n.global.$jscomp;d||(n.global.$jscomp=d={});var e=d.transpile;if(!e){var f=n.basePath+n.TRANSPILER,g=n.loadFileSync_(f);if(g){eval(g+"\n//# sourceURL="+f);if(n.global.$gwtExport&&n.global.$gwtExport.$jscomp&&!n.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(n.global.$gwtExport));n.global.$jscomp.transpile=n.global.$gwtExport.$jscomp.transpile;d=n.global.$jscomp;e=d.transpile}}if(!e){var h=
" requires transpilation but no transpiler was found.";h+=' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.';e=d.transpile=function(b,c){n.logToConsole_(c+h);return b}}return e(b,c)};
n.typeOf=function(b){var c=typeof b;if("object"==c)if(b){if(b instanceof Array)return"array";if(b instanceof Object)return c;var d=Object.prototype.toString.call(b);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof b.length&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof b.call&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==c&&"undefined"==typeof b.call)return"object";return c};n.isNull=function(b){return null===b};n.isDefAndNotNull=function(b){return null!=b};n.isArray=function(b){return"array"==n.typeOf(b)};n.isArrayLike=function(b){var c=n.typeOf(b);return"array"==c||"object"==c&&"number"==typeof b.length};n.isDateLike=function(b){return n.isObject(b)&&"function"==typeof b.getFullYear};n.isFunction=function(b){return"function"==n.typeOf(b)};
n.isObject=function(b){var c=typeof b;return"object"==c&&null!=b||"function"==c};n.getUid=function(b){return b[n.UID_PROPERTY_]||(b[n.UID_PROPERTY_]=++n.uidCounter_)};n.hasUid=function(b){return!!b[n.UID_PROPERTY_]};n.removeUid=function(b){null!==b&&"removeAttribute"in b&&b.removeAttribute(n.UID_PROPERTY_);try{delete b[n.UID_PROPERTY_]}catch(c){}};n.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);n.uidCounter_=0;n.getHashCode=n.getUid;n.removeHashCode=n.removeUid;
n.cloneObject=function(b){var c=n.typeOf(b);if("object"==c||"array"==c){if(b.clone)return b.clone();c="array"==c?[]:{};for(var d in b)c[d]=n.cloneObject(b[d]);return c}return b};n.bindNative_=function(b,c,d){return b.call.apply(b.bind,arguments)};
n.bindJs_=function(b,c,d){if(!b)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return b.apply(c,d)}}return function(){return b.apply(c,arguments)}};n.bind=function(b,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?n.bind=n.bindNative_:n.bind=n.bindJs_;return n.bind.apply(null,arguments)};
n.partial=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return b.apply(this,c)}};n.mixin=function(b,c){for(var d in c)b[d]=c[d]};n.now=n.TRUSTED_SITE&&Date.now||function(){return+new Date};
n.globalEval=function(b){if(n.global.execScript)n.global.execScript(b,"JavaScript");else if(n.global.eval){if(null==n.evalWorksForGlobals_)if(n.global.eval("var _evalTest_ = 1;"),"undefined"!=typeof n.global._evalTest_){try{delete n.global._evalTest_}catch(e){}n.evalWorksForGlobals_=!0}else n.evalWorksForGlobals_=!1;if(n.evalWorksForGlobals_)n.global.eval(b);else{var c=n.global.document,d=c.createElement("SCRIPT");d.type="text/javascript";d.defer=!1;d.appendChild(c.createTextNode(b));c.body.appendChild(d);
c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};n.evalWorksForGlobals_=null;
n.getCssName=function(b,c){if("."==String(b).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+b);var d=function(b){return n.cssNameMapping_[b]||b},e=function(b){b=b.split("-");for(var c=[],e=0;e<b.length;e++)c.push(d(b[e]));return c.join("-")};e=n.cssNameMapping_?"BY_WHOLE"==n.cssNameMappingStyle_?d:e:function(b){return b};b=c?b+"-"+e(c):e(b);return n.global.CLOSURE_CSS_NAME_MAP_FN?n.global.CLOSURE_CSS_NAME_MAP_FN(b):b};
n.setCssNameMapping=function(b,c){n.cssNameMapping_=b;n.cssNameMappingStyle_=c};n.getMsg=function(b,c){c&&(b=b.replace(/\{\$([^}]+)}/g,function(b,e){return null!=c&&e in c?c[e]:b}));return b};n.getMsgWithFallback=function(b){return b};n.exportSymbol=function(b,c,d){n.exportPath_(b,c,d)};n.exportProperty=function(b,c,d){b[c]=d};
n.inherits=function(b,c){function d(){}d.prototype=c.prototype;b.superClass_=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.base=function(b,d,g){for(var e=Array(arguments.length-2),f=2;f<arguments.length;f++)e[f-2]=arguments[f];return c.prototype[d].apply(b,e)}};
n.base=function(b,c,d){var e=arguments.callee.caller;if(n.STRICT_MODE_COMPATIBLE||n.DEBUG&&!e)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(e.superClass_){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.superClass_.constructor.apply(b,f)}f=Array(arguments.length-2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];g=!1;for(var h=b.constructor;h;h=
h.superClass_&&h.superClass_.constructor)if(h.prototype[c]===e)g=!0;else if(g)return h.prototype[c].apply(b,f);if(b[c]===e)return b.constructor.prototype[c].apply(b,f);throw Error("goog.base called from a method of one name to a method of a different name");};n.scope=function(b){if(n.isInModuleLoader_())throw Error("goog.scope is not supported within a goog.module.");b.call(n.global)};
n.defineClass=function(b,c){var d=c.constructor,e=c.statics;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=n.defineClass.createSealingConstructor_(d,b);b&&n.inherits(d,b);delete c.constructor;delete c.statics;n.defineClass.applyProperties_(d.prototype,c);null!=e&&(e instanceof Function?e(d):n.defineClass.applyProperties_(d,e));return d};n.defineClass.SEAL_CLASS_INSTANCES=n.DEBUG;
n.defineClass.createSealingConstructor_=function(b,c){if(!n.defineClass.SEAL_CLASS_INSTANCES)return b;var d=!n.defineClass.isUnsealable_(c),e=function(){var c=b.apply(this,arguments)||this;c[n.UID_PROPERTY_]=c[n.UID_PROPERTY_];this.constructor===e&&d&&Object.seal instanceof Function&&Object.seal(c);return c};return e};n.defineClass.isUnsealable_=function(b){return b&&b.prototype&&b.prototype[n.UNSEALABLE_CONSTRUCTOR_PROPERTY_]};n.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
n.defineClass.applyProperties_=function(b,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d]);for(var e=0;e<n.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;e++)d=n.defineClass.OBJECT_PROTOTYPE_FIELDS_[e],Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d])};n.tagUnsealableClass=function(){};n.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
n.createRequiresTranspilation_=function(){function b(b,c){e?d[b]=!0:c()?d[b]=!1:e=d[b]=!0}function c(b){try{return!!eval(b)}catch(h){return!1}}var d={es3:!1},e=!1,f=n.global.navigator&&n.global.navigator.userAgent?n.global.navigator.userAgent:"";b("es5",function(){return c("[1,].length==1")});b("es6",function(){var b=f.match(/Edge\/(\d+)(\.\d)*/i);return b&&15>Number(b[1])?!1:c('(()=>{"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}})()')});
b("es6-impl",function(){return!0});b("es7",function(){return c("2 ** 2 == 4")});b("es8",function(){return c("async () => 1, true")});return d};n.craw={};n.craw.AppWindowDelegate=function(){};n.craw.AppWindowDelegate.defaultImpl_=n.craw.AppWindowDelegate;n.craw.AppWindowDelegate.setDefaultImpl=function(){n.craw.AppWindowDelegate.defaultImpl_=q.WindowDelegate};n.craw.AppWindowDelegate.createDefaultImpl=function(b){return new n.craw.AppWindowDelegate.defaultImpl_(b)};n.craw.AppWindowDelegate.prototype.onWindowReady=function(){};n.craw.AppWindowDelegate.prototype.pollOnlineStatus=function(){return null};
n.craw.AppWindowDelegate.prototype.finishedLaunch=function(){return!0};n.craw.AppWindowDelegate.prototype.getAppUnavailableMessage=function(){return chrome.i18n.getMessage("craw_app_unavailable")};n.debug={};n.debug.Error=function(b){if(Error.captureStackTrace)Error.captureStackTrace(this,n.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}b&&(this.message=String(b))};n.inherits(n.debug.Error,Error);n.debug.Error.prototype.name="CustomError";n.dom={};n.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};n.string={};n.string.DETECT_DOUBLE_ESCAPING=!1;n.string.FORCE_NON_DOM_HTML_UNESCAPING=!1;n.string.Unicode={NBSP:"\u00a0"};n.string.startsWith=function(b,c){return 0==b.lastIndexOf(c,0)};n.string.endsWith=function(b,c){var d=b.length-c.length;return 0<=d&&b.indexOf(c,d)==d};n.string.caseInsensitiveStartsWith=function(b){return 0==n.string.caseInsensitiveCompare("tel:",b.substr(0,4))};
n.string.caseInsensitiveEndsWith=function(b,c){return 0==n.string.caseInsensitiveCompare(c,b.substr(b.length-c.length,c.length))};n.string.caseInsensitiveEquals=function(b){return n.net.XhrIo.CONTENT_TYPE_HEADER.toLowerCase()==b.toLowerCase()};n.string.subs=function(b,c){for(var d=b.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")};
n.string.collapseWhitespace=function(b){return b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};n.string.isEmptyOrWhitespace=function(b){return/^[\s\xa0]*$/.test(b)};n.string.isEmptyString=function(b){return 0==b.length};n.string.isEmpty=n.string.isEmptyOrWhitespace;n.string.isEmptyOrWhitespaceSafe=function(b){return n.string.isEmptyOrWhitespace(n.string.makeSafe(b))};n.string.isEmptySafe=n.string.isEmptyOrWhitespaceSafe;n.string.isBreakingWhitespace=function(b){return!/[^\t\n\r ]/.test(b)};
n.string.isAlpha=function(b){return!/[^a-zA-Z]/.test(b)};n.string.isNumeric=function(b){return!/[^0-9]/.test(b)};n.string.isAlphaNumeric=function(b){return!/[^a-zA-Z0-9]/.test(b)};n.string.isSpace=function(b){return" "==b};n.string.isUnicodeChar=function(b){return 1==b.length&&" "<=b&&"~">=b||"\u0080"<=b&&"\ufffd">=b};n.string.stripNewlines=function(b){return b.replace(/(\r\n|\r|\n)+/g," ")};n.string.canonicalizeNewlines=function(b){return b.replace(/(\r\n|\r|\n)/g,"\n")};
n.string.normalizeWhitespace=function(b){return b.replace(/\xa0|\s/g," ")};n.string.normalizeSpaces=function(b){return b.replace(/\xa0|[ \t]+/g," ")};n.string.collapseBreakingSpaces=function(b){return b.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};n.string.trim=n.TRUSTED_SITE&&String.prototype.trim?function(b){return b.trim()}:function(b){return b.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};n.string.trimLeft=function(b){return b.replace(/^[\s\xa0]+/,"")};
n.string.trimRight=function(b){return b.replace(/[\s\xa0]+$/,"")};n.string.caseInsensitiveCompare=function(b,c){b=String(b).toLowerCase();c=String(c).toLowerCase();return b<c?-1:b==c?0:1};
n.string.numberAwareCompare_=function(b,c,d){if(b==c)return 0;if(!b)return-1;if(!c)return 1;for(var e=b.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var l=f[h];if(d!=l)return b=parseInt(d,10),!isNaN(b)&&(c=parseInt(l,10),!isNaN(c)&&b-c)?b-c:d<l?-1:1}return e.length!=f.length?e.length-f.length:b<c?-1:1};n.string.intAwareCompare=function(b,c){return n.string.numberAwareCompare_(b,c,/\d+|\D+/g)};
n.string.floatAwareCompare=function(b,c){return n.string.numberAwareCompare_(b,c,/\d+|\.\d+|\D+/g)};n.string.numerateCompare=n.string.floatAwareCompare;n.string.urlEncode=function(b){return encodeURIComponent(String(b))};n.string.urlDecode=function(b){return decodeURIComponent(b.replace(/\+/g," "))};n.string.newLineToBr=function(b,c){return b.replace(/(\r\n|\r|\n)/g,c?"<br />":"<br>")};
n.string.htmlEscape=function(b,c){if(c)b=b.replace(n.string.AMP_RE_,"&amp;").replace(n.string.LT_RE_,"&lt;").replace(n.string.GT_RE_,"&gt;").replace(n.string.QUOT_RE_,"&quot;").replace(n.string.SINGLE_QUOTE_RE_,"&#39;").replace(n.string.NULL_RE_,"&#0;"),n.string.DETECT_DOUBLE_ESCAPING&&(b=b.replace(n.string.E_RE_,"&#101;"));else{if(!n.string.ALL_RE_.test(b))return b;-1!=b.indexOf("&")&&(b=b.replace(n.string.AMP_RE_,"&amp;"));-1!=b.indexOf("<")&&(b=b.replace(n.string.LT_RE_,"&lt;"));-1!=b.indexOf(">")&&
(b=b.replace(n.string.GT_RE_,"&gt;"));-1!=b.indexOf('"')&&(b=b.replace(n.string.QUOT_RE_,"&quot;"));-1!=b.indexOf("'")&&(b=b.replace(n.string.SINGLE_QUOTE_RE_,"&#39;"));-1!=b.indexOf("\x00")&&(b=b.replace(n.string.NULL_RE_,"&#0;"));n.string.DETECT_DOUBLE_ESCAPING&&-1!=b.indexOf("e")&&(b=b.replace(n.string.E_RE_,"&#101;"))}return b};n.string.AMP_RE_=/&/g;n.string.LT_RE_=/</g;n.string.GT_RE_=/>/g;n.string.QUOT_RE_=/"/g;n.string.SINGLE_QUOTE_RE_=/'/g;n.string.NULL_RE_=/\x00/g;n.string.E_RE_=/e/g;
n.string.ALL_RE_=n.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/;n.string.unescapeEntities=function(b){return n.string.contains(b,"&")?!n.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in n.global?n.string.unescapeEntitiesUsingDom_(b):n.string.unescapePureXmlEntities_(b):b};n.string.unescapeEntitiesWithDocument=function(b,c){return n.string.contains(b,"&")?n.string.unescapeEntitiesUsingDom_(b,c):b};
n.string.unescapeEntitiesUsingDom_=function(b,c){var d={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var e=c?c.createElement("div"):n.global.document.createElement("div");return b.replace(n.string.HTML_ENTITY_PATTERN_,function(b,c){var f=d[b];if(f)return f;"#"==c.charAt(0)&&(c=Number("0"+c.substr(1)),isNaN(c)||(f=String.fromCharCode(c)));f||(e.innerHTML=b+" ",f=e.firstChild.nodeValue.slice(0,-1));return d[b]=f})};
n.string.unescapePureXmlEntities_=function(b){return b.replace(/&([^;]+);/g,function(b,d){switch(d){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=d.charAt(0)||(d=Number("0"+d.substr(1)),isNaN(d))?b:String.fromCharCode(d)}})};n.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;n.string.whitespaceEscape=function(b){return n.string.newLineToBr(b.replace(/  /g," &#160;"),void 0)};
n.string.preserveSpaces=function(b){return b.replace(/(^|[\n ]) /g,"$1"+n.string.Unicode.NBSP)};n.string.stripQuotes=function(b,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(b.charAt(0)==f&&b.charAt(b.length-1)==f)return b.substring(1,b.length-1)}return b};n.string.truncate=function(b,c,d){d&&(b=n.string.unescapeEntities(b));b.length>c&&(b=b.substring(0,c-3)+"...");d&&(b=n.string.htmlEscape(b));return b};
n.string.truncateMiddle=function(b,c,d,e){d&&(b=n.string.unescapeEntities(b));e&&b.length>c?(e>c&&(e=c),b=b.substring(0,c-e)+"..."+b.substring(b.length-e)):b.length>c&&(e=Math.floor(c/2),b=b.substring(0,e+c%2)+"..."+b.substring(b.length-e));d&&(b=n.string.htmlEscape(b));return b};n.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"};n.string.jsEscapeCache_={"'":"\\'"};
n.string.quote=function(b){b=String(b);for(var c=['"'],d=0;d<b.length;d++){var e=b.charAt(d),f=e.charCodeAt(0);c[d+1]=n.string.specialEscapeChars_[e]||(31<f&&127>f?e:n.string.escapeChar(e))}c.push('"');return c.join("")};n.string.escapeString=function(b){for(var c=[],d=0;d<b.length;d++)c[d]=n.string.escapeChar(b.charAt(d));return c.join("")};
n.string.escapeChar=function(b){if(b in n.string.jsEscapeCache_)return n.string.jsEscapeCache_[b];if(b in n.string.specialEscapeChars_)return n.string.jsEscapeCache_[b]=n.string.specialEscapeChars_[b];var c=b.charCodeAt(0);if(31<c&&127>c)var d=b;else{if(256>c){if(d="\\x",16>c||256<c)d+="0"}else d="\\u",4096>c&&(d+="0");d+=c.toString(16).toUpperCase()}return n.string.jsEscapeCache_[b]=d};n.string.contains=function(b,c){return-1!=b.indexOf(c)};
n.string.caseInsensitiveContains=function(b,c){return n.string.contains(b.toLowerCase(),c.toLowerCase())};n.string.countOf=function(b,c){return b&&c?b.split(c).length-1:0};n.string.removeAt=function(b,c,d){var e=b;0<=c&&c<b.length&&0<d&&(e=b.substr(0,c)+b.substr(c+d,b.length-c-d));return e};n.string.remove=function(b,c){return b.replace(c,"")};n.string.removeAll=function(b,c){c=new RegExp(n.string.regExpEscape(c),"g");return b.replace(c,"")};
n.string.replaceAll=function(b,c,d){c=new RegExp(n.string.regExpEscape(c),"g");return b.replace(c,d.replace(/\$/g,"$$$$"))};n.string.regExpEscape=function(b){return String(b).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};n.string.repeat=String.prototype.repeat?function(b,c){return b.repeat(c)}:function(b,c){return Array(c+1).join(b)};
n.string.padNumber=function(b,c,d){b=n.isDef(d)?b.toFixed(d):String(b);d=b.indexOf(".");-1==d&&(d=b.length);return n.string.repeat("0",Math.max(0,c-d))+b};n.string.makeSafe=function(b){return null==b?"":String(b)};n.string.buildString=function(b){return Array.prototype.join.call(arguments,"")};n.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^n.now()).toString(36)};
n.string.compareVersions=function(b,c){var d=0;b=n.string.trim(String(b)).split(".");c=n.string.trim(String(c)).split(".");for(var e=Math.max(b.length,c.length),f=0;0==d&&f<e;f++){var g=b[f]||"",h=c[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;d=n.string.compareElements_(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||n.string.compareElements_(0==g[2].length,0==h[2].length)||n.string.compareElements_(g[2],
h[2]);g=g[3];h=h[3]}while(0==d)}return d};n.string.compareElements_=function(b,c){return b<c?-1:b>c?1:0};n.string.hashCode=function(b){for(var c=0,d=0;d<b.length;++d)c=31*c+b.charCodeAt(d)>>>0;return c};n.string.uniqueStringCounter_=2147483648*Math.random()|0;n.string.createUniqueString=function(){return"goog_"+n.string.uniqueStringCounter_++};n.string.toNumber=function(b){var c=Number(b);return 0==c&&n.string.isEmptyOrWhitespace(b)?NaN:c};n.string.isLowerCamelCase=function(b){return/^[a-z]+([A-Z][a-z]*)*$/.test(b)};
n.string.isUpperCamelCase=function(b){return/^([A-Z][a-z]*)+$/.test(b)};n.string.toCamelCase=function(b){return String(b).replace(/\-([a-z])/g,function(b,d){return d.toUpperCase()})};n.string.toSelectorCase=function(b){return String(b).replace(/([A-Z])/g,"-$1").toLowerCase()};n.string.toTitleCase=function(b,c){c=n.isString(c)?n.string.regExpEscape(c):"\\s";return b.replace(new RegExp("(^"+(c?"|["+c+"]+":"")+")([a-z])","g"),function(b,c,f){return c+f.toUpperCase()})};
n.string.capitalize=function(b){return String(b.charAt(0)).toUpperCase()+String(b.substr(1)).toLowerCase()};n.string.parseInt=function(b){isFinite(b)&&(b=String(b));return n.isString(b)?/^\s*-?0x/i.test(b)?parseInt(b,16):parseInt(b,10):NaN};n.string.splitLimit=function(b,c,d){b=b.split(c);for(var e=[];0<d&&b.length;)e.push(b.shift()),d--;b.length&&e.push(b.join(c));return e};
n.string.lastComponent=function(b,c){if(c)"string"==typeof c&&(c=[c]);else return b;for(var d=-1,e=0;e<c.length;e++)if(""!=c[e]){var f=b.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?b:b.slice(d+1)};
n.string.editDistance=function(b,c){var d=[],e=[];if(b==c)return 0;if(!b.length||!c.length)return Math.max(b.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<b.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(b[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};n.asserts={};n.asserts.ENABLE_ASSERTS=n.DEBUG;n.asserts.AssertionError=function(b,c){c.unshift(b);n.debug.Error.call(this,n.string.subs.apply(null,c));c.shift()};n.inherits(n.asserts.AssertionError,n.debug.Error);n.asserts.AssertionError.prototype.name="AssertionError";n.asserts.DEFAULT_ERROR_HANDLER=function(b){throw b;};n.asserts.errorHandler_=n.asserts.DEFAULT_ERROR_HANDLER;
n.asserts.doAssertFailure_=function(b,c,d,e){var f="Assertion failed";if(d){f+=": "+d;var g=e}else b&&(f+=": "+b,g=c);b=new n.asserts.AssertionError(""+f,g||[]);n.asserts.errorHandler_(b)};n.asserts.setErrorHandler=function(b){n.asserts.ENABLE_ASSERTS&&(n.asserts.errorHandler_=b)};n.asserts.assert=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!b&&n.asserts.doAssertFailure_("",null,c,Array.prototype.slice.call(arguments,2));return b};
n.asserts.fail=function(b,c){n.asserts.ENABLE_ASSERTS&&n.asserts.errorHandler_(new n.asserts.AssertionError("Failure"+(b?": "+b:""),Array.prototype.slice.call(arguments,1)))};n.asserts.assertNumber=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isNumber(b)&&n.asserts.doAssertFailure_("Expected number but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};
n.asserts.assertString=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isString(b)&&n.asserts.doAssertFailure_("Expected string but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};n.asserts.assertFunction=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isFunction(b)&&n.asserts.doAssertFailure_("Expected function but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};
n.asserts.assertObject=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isObject(b)&&n.asserts.doAssertFailure_("Expected object but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};n.asserts.assertArray=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isArray(b)&&n.asserts.doAssertFailure_("Expected array but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2))};
n.asserts.assertBoolean=function(b,c,d){n.asserts.ENABLE_ASSERTS&&!n.isBoolean(b)&&n.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};n.asserts.assertElement=function(b,c,d){!n.asserts.ENABLE_ASSERTS||n.isObject(b)&&b.nodeType==n.dom.NodeType.ELEMENT||n.asserts.doAssertFailure_("Expected Element but got %s: %s.",[n.typeOf(b),b],c,Array.prototype.slice.call(arguments,2));return b};
n.asserts.assertInstanceof=function(b,c,d,e){!n.asserts.ENABLE_ASSERTS||b instanceof c||n.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[n.asserts.getType_(c),n.asserts.getType_(b)],d,Array.prototype.slice.call(arguments,3));return b};n.asserts.assertObjectPrototypeIsIntact=function(){for(var b in Object.prototype)n.asserts.fail(b+" should not be enumerable in Object.prototype.")};
n.asserts.getType_=function(b){return b instanceof Function?b.displayName||b.name||"unknown type name":b instanceof Object?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):null===b?"null":typeof b};n.array={};n.NATIVE_ARRAY_PROTOTYPES=n.TRUSTED_SITE;n.array.ASSUME_NATIVE_FUNCTIONS=!1;n.array.peek=function(b){return b[b.length-1]};n.array.last=n.array.peek;
n.array.indexOf=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.indexOf.call(b,c,d)}:function(b,c,d){d=null==d?0:0>d?Math.max(0,b.length+d):d;if(n.isString(b))return n.isString(c)&&1==c.length?b.indexOf(c,d):-1;for(;d<b.length;d++)if(d in b&&b[d]===c)return d;return-1};
n.array.lastIndexOf=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.lastIndexOf.call(b,c,null==d?b.length-1:d)}:function(b,c,d){d=null==d?b.length-1:d;0>d&&(d=Math.max(0,b.length+d));if(n.isString(b))return n.isString(c)&&1==c.length?b.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in b&&b[d]===c)return d;return-1};
n.array.forEach=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(b,c,d){n.asserts.assert(null!=b.length);Array.prototype.forEach.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=n.isString(b)?b.split(""):b,g=0;g<e;g++)g in f&&c.call(d,f[g],g,b)};n.array.forEachRight=function(b,c){var d=b.length,e=n.isString(b)?b.split(""):b;for(--d;0<=d;--d)d in e&&c.call(void 0,e[d],d,b)};
n.array.filter=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.filter.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=[],g=0,h=n.isString(b)?b.split(""):b,l=0;l<e;l++)if(l in h){var m=h[l];c.call(d,m,l,b)&&(f[g++]=m)}return f};
n.array.map=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.map.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=Array(e),g=n.isString(b)?b.split(""):b,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,b));return f};
n.array.reduce=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(b,c,d,e){n.asserts.assert(null!=b.length);e&&(c=n.bind(c,e));return Array.prototype.reduce.call(b,c,d)}:function(b,c,d,e){var f=d;n.array.forEach(b,function(d,h){f=c.call(e,f,d,h,b)});return f};
n.array.reduceRight=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(b,c,d,e){n.asserts.assert(null!=b.length);n.asserts.assert(null!=c);e&&(c=n.bind(c,e));return Array.prototype.reduceRight.call(b,c,d)}:function(b,c,d,e){var f=d;n.array.forEachRight(b,function(d,h){f=c.call(e,f,d,h,b)});return f};
n.array.some=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.some.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=n.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return!0;return!1};
n.array.every=n.NATIVE_ARRAY_PROTOTYPES&&(n.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(b,c,d){n.asserts.assert(null!=b.length);return Array.prototype.every.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=n.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,b))return!1;return!0};n.array.count=function(b,c,d){var e=0;n.array.forEach(b,function(b,g,h){c.call(d,b,g,h)&&++e},d);return e};
n.array.find=function(b,c,d){c=n.array.findIndex(b,c,d);return 0>c?null:n.isString(b)?b.charAt(c):b[c]};n.array.findIndex=function(b,c,d){for(var e=b.length,f=n.isString(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return g;return-1};n.array.findRight=function(b,c,d){c=n.array.findIndexRight(b,c,d);return 0>c?null:n.isString(b)?b.charAt(c):b[c]};
n.array.findIndexRight=function(b,c,d){var e=b.length,f=n.isString(b)?b.split(""):b;for(--e;0<=e;e--)if(e in f&&c.call(d,f[e],e,b))return e;return-1};n.array.contains=function(b,c){return 0<=n.array.indexOf(b,c)};n.array.isEmpty=function(b){return 0==b.length};n.array.clear=function(b){if(!n.isArray(b))for(var c=b.length-1;0<=c;c--)delete b[c];b.length=0};n.array.insert=function(b,c){n.array.contains(b,c)||b.push(c)};n.array.insertAt=function(b,c,d){n.array.splice(b,d,0,c)};
n.array.insertArrayAt=function(b,c,d){n.partial(n.array.splice,b,d,0).apply(null,c)};n.array.insertBefore=function(b,c,d){var e;2==arguments.length||0>(e=n.array.indexOf(b,d))?b.push(c):n.array.insertAt(b,c,e)};n.array.remove=function(b,c){c=n.array.indexOf(b,c);var d;(d=0<=c)&&n.array.removeAt(b,c);return d};n.array.removeLast=function(b,c){c=n.array.lastIndexOf(b,c);return 0<=c?(n.array.removeAt(b,c),!0):!1};
n.array.removeAt=function(b,c){n.asserts.assert(null!=b.length);return 1==Array.prototype.splice.call(b,c,1).length};n.array.removeIf=function(b,c,d){c=n.array.findIndex(b,c,d);return 0<=c?(n.array.removeAt(b,c),!0):!1};n.array.removeAllIf=function(b,c,d){var e=0;n.array.forEachRight(b,function(f,g){c.call(d,f,g,b)&&n.array.removeAt(b,g)&&e++});return e};n.array.concat=function(b){return Array.prototype.concat.apply([],arguments)};n.array.join=function(b){return Array.prototype.concat.apply([],arguments)};
n.array.toArray=function(b){var c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];return d}return[]};n.array.clone=n.array.toArray;n.array.extend=function(b,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(n.isArrayLike(e)){var f=b.length||0,g=e.length||0;b.length=f+g;for(var h=0;h<g;h++)b[f+h]=e[h]}else b.push(e)}};n.array.splice=function(b,c,d,e){n.asserts.assert(null!=b.length);return Array.prototype.splice.apply(b,n.array.slice(arguments,1))};
n.array.slice=function(b,c,d){n.asserts.assert(null!=b.length);return 2>=arguments.length?Array.prototype.slice.call(b,c):Array.prototype.slice.call(b,c,d)};n.array.removeDuplicates=function(b,c){c=c||b;for(var d={},e=0,f=0;f<b.length;){var g=b[f++];var h=g;h=n.isObject(h)?"o"+n.getUid(h):(typeof h).charAt(0)+h;Object.prototype.hasOwnProperty.call(d,h)||(d[h]=!0,c[e++]=g)}c.length=e};n.array.binarySearch=function(b,c,d){return n.array.binarySearch_(b,d||n.array.defaultCompare,!1,c)};
n.array.binarySelect=function(b,c,d){return n.array.binarySearch_(b,c,!0,void 0,d)};n.array.binarySearch_=function(b,c,d,e,f){for(var g=0,h=b.length,l;g<h;){var m=g+h>>1;var p=d?c.call(f,b[m],m,b):c(e,b[m]);0<p?g=m+1:(h=m,l=!p)}return l?g:~g};n.array.sort=function(b,c){b.sort(c||n.array.defaultCompare)};
n.array.stableSort=function(b,c){for(var d=Array(b.length),e=0;e<b.length;e++)d[e]={index:e,value:b[e]};var f=c||n.array.defaultCompare;n.array.sort(d,function(b,c){return f(b.value,c.value)||b.index-c.index});for(e=0;e<b.length;e++)b[e]=d[e].value};n.array.sortByKey=function(b,c,d){var e=d||n.array.defaultCompare;n.array.sort(b,function(b,d){return e(c(b),c(d))})};n.array.sortObjectsByKey=function(b,c,d){n.array.sortByKey(b,function(b){return b[c]},d)};
n.array.isSorted=function(b){for(var c=n.array.defaultCompare,d=1;d<b.length;d++)if(0<c(b[d-1],b[d]))return!1;return!0};n.array.equals=function(b,c,d){if(!n.isArrayLike(b)||!n.isArrayLike(c)||b.length!=c.length)return!1;var e=b.length;d=d||n.array.defaultCompareEquality;for(var f=0;f<e;f++)if(!d(b[f],c[f]))return!1;return!0};
n.array.compare3=function(b,c,d){d=d||n.array.defaultCompare;for(var e=Math.min(b.length,c.length),f=0;f<e;f++){var g=d(b[f],c[f]);if(0!=g)return g}return n.array.defaultCompare(b.length,c.length)};n.array.defaultCompare=function(b,c){return b>c?1:b<c?-1:0};n.array.inverseDefaultCompare=function(b,c){return-n.array.defaultCompare(b,c)};n.array.defaultCompareEquality=function(b,c){return b===c};
n.array.binaryInsert=function(b,c,d){d=n.array.binarySearch(b,c,d);return 0>d?(n.array.insertAt(b,c,-(d+1)),!0):!1};n.array.binaryRemove=function(b,c,d){c=n.array.binarySearch(b,c,d);return 0<=c?n.array.removeAt(b,c):!1};n.array.bucket=function(b,c,d){for(var e={},f=0;f<b.length;f++){var g=b[f],h=c.call(d,g,f,b);n.isDef(h)&&(e[h]||(e[h]=[])).push(g)}return e};n.array.toObject=function(b,c,d){var e={};n.array.forEach(b,function(f,g){e[c.call(d,f,g,b)]=f});return e};
n.array.range=function(b,c,d){var e=[],f=0,g=b;d=d||1;void 0!==c&&(f=b,g=c);if(0>d*(g-f))return[];if(0<d)for(b=f;b<g;b+=d)e.push(b);else for(b=f;b>g;b+=d)e.push(b);return e};n.array.repeat=function(b,c){for(var d=[],e=0;e<c;e++)d[e]=b;return d};n.array.flatten=function(b){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(n.isArray(e))for(var f=0;f<e.length;f+=8192){var g=n.array.slice(e,f,f+8192);g=n.array.flatten.apply(null,g);for(var h=0;h<g.length;h++)c.push(g[h])}else c.push(e)}return c};
n.array.rotate=function(b,c){n.asserts.assert(null!=b.length);b.length&&(c%=b.length,0<c?Array.prototype.unshift.apply(b,b.splice(-c,c)):0>c&&Array.prototype.push.apply(b,b.splice(0,-c)));return b};n.array.moveItem=function(b,c,d){n.asserts.assert(0<=c&&c<b.length);n.asserts.assert(0<=d&&d<b.length);c=Array.prototype.splice.call(b,c,1);Array.prototype.splice.call(b,d,0,c[0])};
n.array.zip=function(b){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};n.array.shuffle=function(b,c){c=c||Math.random;for(var d=b.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=b[d];b[d]=b[e];b[e]=f}};n.array.copyByIndex=function(b,c){var d=[];n.array.forEach(c,function(c){d.push(b[c])});return d};
n.array.concatMap=function(b,c,d){return n.array.concat.apply([],n.array.map(b,c,d))};n.debug.entryPointRegistry={};n.debug.EntryPointMonitor=function(){};n.debug.entryPointRegistry.refList_=[];n.debug.entryPointRegistry.monitors_=[];n.debug.entryPointRegistry.monitorsMayExist_=!1;n.debug.entryPointRegistry.register=function(b){n.debug.entryPointRegistry.refList_[n.debug.entryPointRegistry.refList_.length]=b;if(n.debug.entryPointRegistry.monitorsMayExist_)for(var c=n.debug.entryPointRegistry.monitors_,d=0;d<c.length;d++)b(n.bind(c[d].wrap,c[d]))};
n.debug.entryPointRegistry.monitorAll=function(b){n.debug.entryPointRegistry.monitorsMayExist_=!0;for(var c=n.bind(b.wrap,b),d=0;d<n.debug.entryPointRegistry.refList_.length;d++)n.debug.entryPointRegistry.refList_[d](c);n.debug.entryPointRegistry.monitors_.push(b)};
n.debug.entryPointRegistry.unmonitorAllIfPossible=function(b){var c=n.debug.entryPointRegistry.monitors_;n.asserts.assert(b==c[c.length-1],"Only the most recent monitor can be unwrapped.");b=n.bind(b.unwrap,b);for(var d=0;d<n.debug.entryPointRegistry.refList_.length;d++)n.debug.entryPointRegistry.refList_[d](b);c.length--};n.disposable={};n.disposable.IDisposable=function(){};n.Disposable=function(){n.Disposable.MONITORING_MODE!=n.Disposable.MonitoringMode.OFF&&(n.Disposable.instances_[n.getUid(this)]=this);this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};n.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2};n.Disposable.MONITORING_MODE=0;n.Disposable.INCLUDE_STACK_ON_CREATION=!0;n.Disposable.instances_={};
n.Disposable.getUndisposedObjects=function(){var b=[],c;for(c in n.Disposable.instances_)n.Disposable.instances_.hasOwnProperty(c)&&b.push(n.Disposable.instances_[Number(c)]);return b};n.Disposable.clearUndisposedObjects=function(){n.Disposable.instances_={}};n.Disposable.prototype.disposed_=!1;n.Disposable.prototype.isDisposed=function(){return this.disposed_};
n.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),n.Disposable.MONITORING_MODE!=n.Disposable.MonitoringMode.OFF)){var b=n.getUid(this);if(n.Disposable.MONITORING_MODE==n.Disposable.MonitoringMode.PERMANENT&&!n.Disposable.instances_.hasOwnProperty(b))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete n.Disposable.instances_[b]}};
n.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};n.Disposable.isDisposed=function(b){return b&&"function"==typeof b.isDisposed?b.isDisposed():!1};n.dispose=function(b){b&&"function"==typeof b.dispose&&b.dispose()};n.disposeAll=function(b){for(var c=0,d=arguments.length;c<d;++c){var e=arguments[c];n.isArrayLike(e)?n.disposeAll.apply(null,e):n.dispose(e)}};n.labs={};n.labs.userAgent={};n.labs.userAgent.util={};n.labs.userAgent.util.getNativeUserAgentString_=function(){var b=n.labs.userAgent.util.getNavigator_();return b&&(b=b.userAgent)?b:""};n.labs.userAgent.util.getNavigator_=function(){return n.global.navigator};n.labs.userAgent.util.userAgent_=n.labs.userAgent.util.getNativeUserAgentString_();n.labs.userAgent.util.setUserAgent=function(b){n.labs.userAgent.util.userAgent_=b||n.labs.userAgent.util.getNativeUserAgentString_()};
n.labs.userAgent.util.getUserAgent=function(){return n.labs.userAgent.util.userAgent_};n.labs.userAgent.util.matchUserAgent=function(b){return n.string.contains(n.labs.userAgent.util.getUserAgent(),b)};n.labs.userAgent.util.matchUserAgentIgnoreCase=function(){return n.string.caseInsensitiveContains(n.labs.userAgent.util.getUserAgent(),"WebKit")};
n.labs.userAgent.util.extractVersionTuples=function(b){for(var c=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,d=[],e;e=c.exec(b);)d.push([e[1],e[2],e[3]||void 0]);return d};n.object={};n.object.is=function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c};n.object.forEach=function(b,c,d){for(var e in b)c.call(d,b[e],e,b)};n.object.filter=function(b,c,d){var e={},f;for(f in b)c.call(d,b[f],f,b)&&(e[f]=b[f]);return e};n.object.map=function(b,c,d){var e={},f;for(f in b)e[f]=c.call(d,b[f],f,b);return e};n.object.some=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return!0;return!1};n.object.every=function(b,c,d){for(var e in b)if(!c.call(d,b[e],e,b))return!1;return!0};
n.object.getCount=function(b){var c=0,d;for(d in b)c++;return c};n.object.getAnyKey=function(b){for(var c in b)return c};n.object.getAnyValue=function(b){for(var c in b)return b[c]};n.object.contains=function(b,c){return n.object.containsValue(b,c)};n.object.getValues=function(b){var c=[],d=0,e;for(e in b)c[d++]=b[e];return c};n.object.getKeys=function(b){var c=[],d=0,e;for(e in b)c[d++]=e;return c};
n.object.getValueByKeys=function(b,c){var d=n.isArrayLike(c),e=d?c:arguments;for(d=d?0:1;d<e.length;d++){if(null==b)return;b=b[e[d]]}return b};n.object.containsKey=function(b,c){return null!==b&&c in b};n.object.containsValue=function(b,c){for(var d in b)if(b[d]==c)return!0;return!1};n.object.findKey=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return e};n.object.findValue=function(b,c,d){return(c=n.object.findKey(b,c,d))&&b[c]};n.object.isEmpty=function(b){for(var c in b)return!1;return!0};
n.object.clear=function(b){for(var c in b)delete b[c]};n.object.remove=function(b,c){var d;(d=c in b)&&delete b[c];return d};n.object.add=function(b,c,d){if(null!==b&&c in b)throw Error('The object already contains the key "'+c+'"');n.object.set(b,c,d)};n.object.get=function(b,c,d){return null!==b&&c in b?b[c]:d};n.object.set=function(b,c,d){b[c]=d};n.object.setIfUndefined=function(b,c,d){return c in b?b[c]:b[c]=d};
n.object.setWithReturnValueIfNotSet=function(b,c,d){if(c in b)return b[c];d=d();return b[c]=d};n.object.equals=function(b,c){for(var d in b)if(!(d in c)||b[d]!==c[d])return!1;for(d in c)if(!(d in b))return!1;return!0};n.object.clone=function(b){var c={},d;for(d in b)c[d]=b[d];return c};n.object.unsafeClone=function(b){var c=n.typeOf(b);if("object"==c||"array"==c){if(n.isFunction(b.clone))return b.clone();c="array"==c?[]:{};for(var d in b)c[d]=n.object.unsafeClone(b[d]);return c}return b};
n.object.transpose=function(b){var c={},d;for(d in b)c[b[d]]=d;return c};n.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");n.object.extend=function(b,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)b[d]=e[d];for(var g=0;g<n.object.PROTOTYPE_FIELDS_.length;g++)d=n.object.PROTOTYPE_FIELDS_[g],Object.prototype.hasOwnProperty.call(e,d)&&(b[d]=e[d])}};
n.object.create=function(b){var c=arguments.length;if(1==c&&n.isArray(arguments[0]))return n.object.create.apply(null,arguments[0]);if(c%2)throw Error("Uneven number of arguments");for(var d={},e=0;e<c;e+=2)d[arguments[e]]=arguments[e+1];return d};n.object.createSet=function(b){var c=arguments.length;if(1==c&&n.isArray(arguments[0]))return n.object.createSet.apply(null,arguments[0]);for(var d={},e=0;e<c;e++)d[arguments[e]]=!0;return d};
n.object.createImmutableView=function(b){var c=b;Object.isFrozen&&!Object.isFrozen(b)&&(c=Object.create(b),Object.freeze(c));return c};n.object.isImmutableView=function(b){return!!Object.isFrozen&&Object.isFrozen(b)};
n.object.getAllPropertyNames=function(b,c,d){if(!b)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return n.object.getKeys(b);for(var e={};b&&(b!==Object.prototype||c)&&(b!==Function.prototype||d);){for(var f=Object.getOwnPropertyNames(b),g=0;g<f.length;g++)e[f[g]]=!0;b=Object.getPrototypeOf(b)}return n.object.getKeys(e)};n.labs.userAgent.browser={};n.labs.userAgent.browser.matchOpera_=function(){return n.labs.userAgent.util.matchUserAgent("Opera")};n.labs.userAgent.browser.matchIE_=function(){return n.labs.userAgent.util.matchUserAgent("Trident")||n.labs.userAgent.util.matchUserAgent("MSIE")};n.labs.userAgent.browser.matchEdge_=function(){return n.labs.userAgent.util.matchUserAgent("Edge")};n.labs.userAgent.browser.matchFirefox_=function(){return n.labs.userAgent.util.matchUserAgent("Firefox")};
n.labs.userAgent.browser.matchSafari_=function(){return n.labs.userAgent.util.matchUserAgent("Safari")&&!(n.labs.userAgent.browser.matchChrome_()||n.labs.userAgent.browser.matchCoast_()||n.labs.userAgent.browser.matchOpera_()||n.labs.userAgent.browser.matchEdge_()||n.labs.userAgent.browser.isSilk()||n.labs.userAgent.util.matchUserAgent("Android"))};n.labs.userAgent.browser.matchCoast_=function(){return n.labs.userAgent.util.matchUserAgent("Coast")};
n.labs.userAgent.browser.matchIosWebview_=function(){return(n.labs.userAgent.util.matchUserAgent("iPad")||n.labs.userAgent.util.matchUserAgent("iPhone"))&&!n.labs.userAgent.browser.matchSafari_()&&!n.labs.userAgent.browser.matchChrome_()&&!n.labs.userAgent.browser.matchCoast_()&&n.labs.userAgent.util.matchUserAgent("AppleWebKit")};n.labs.userAgent.browser.matchChrome_=function(){return(n.labs.userAgent.util.matchUserAgent("Chrome")||n.labs.userAgent.util.matchUserAgent("CriOS"))&&!n.labs.userAgent.browser.matchEdge_()};
n.labs.userAgent.browser.matchAndroidBrowser_=function(){return n.labs.userAgent.util.matchUserAgent("Android")&&!(n.labs.userAgent.browser.isChrome()||n.labs.userAgent.browser.isFirefox()||n.labs.userAgent.browser.isOpera()||n.labs.userAgent.browser.isSilk())};n.labs.userAgent.browser.isOpera=n.labs.userAgent.browser.matchOpera_;n.labs.userAgent.browser.isIE=n.labs.userAgent.browser.matchIE_;n.labs.userAgent.browser.isEdge=n.labs.userAgent.browser.matchEdge_;n.labs.userAgent.browser.isFirefox=n.labs.userAgent.browser.matchFirefox_;
n.labs.userAgent.browser.isSafari=n.labs.userAgent.browser.matchSafari_;n.labs.userAgent.browser.isCoast=n.labs.userAgent.browser.matchCoast_;n.labs.userAgent.browser.isIosWebview=n.labs.userAgent.browser.matchIosWebview_;n.labs.userAgent.browser.isChrome=n.labs.userAgent.browser.matchChrome_;n.labs.userAgent.browser.isAndroidBrowser=n.labs.userAgent.browser.matchAndroidBrowser_;n.labs.userAgent.browser.isSilk=function(){return n.labs.userAgent.util.matchUserAgent("Silk")};
n.labs.userAgent.browser.getVersion=function(){function b(b){b=n.array.find(b,e);return d[b]||""}var c=n.labs.userAgent.util.getUserAgent();if(n.labs.userAgent.browser.isIE())return n.labs.userAgent.browser.getIEVersion_(c);c=n.labs.userAgent.util.extractVersionTuples(c);var d={};n.array.forEach(c,function(b){d[b[0]]=b[1]});var e=n.partial(n.object.containsKey,d);return n.labs.userAgent.browser.isOpera()?b(["Version","Opera"]):n.labs.userAgent.browser.isEdge()?b(["Edge"]):n.labs.userAgent.browser.isChrome()?
b(["Chrome","CriOS"]):(c=c[2])&&c[1]||""};n.labs.userAgent.browser.isVersionOrHigher=function(b){return 0<=n.string.compareVersions(n.labs.userAgent.browser.getVersion(),b)};
n.labs.userAgent.browser.getIEVersion_=function(b){var c=/rv: *([\d\.]*)/.exec(b);if(c&&c[1])return c[1];c="";var d=/MSIE +([\d\.]+)/.exec(b);if(d&&d[1])if(b=/Trident\/(\d.\d)/.exec(b),"7.0"==d[1])if(b&&b[1])switch(b[1]){case "4.0":c="8.0";break;case "5.0":c="9.0";break;case "6.0":c="10.0";break;case "7.0":c="11.0"}else c="7.0";else c=d[1];return c};n.labs.userAgent.engine={};n.labs.userAgent.engine.isPresto=function(){return n.labs.userAgent.util.matchUserAgent("Presto")};n.labs.userAgent.engine.isTrident=function(){return n.labs.userAgent.util.matchUserAgent("Trident")||n.labs.userAgent.util.matchUserAgent("MSIE")};n.labs.userAgent.engine.isEdge=function(){return n.labs.userAgent.util.matchUserAgent("Edge")};n.labs.userAgent.engine.isWebKit=function(){return n.labs.userAgent.util.matchUserAgentIgnoreCase()&&!n.labs.userAgent.engine.isEdge()};
n.labs.userAgent.engine.isGecko=function(){return n.labs.userAgent.util.matchUserAgent("Gecko")&&!n.labs.userAgent.engine.isWebKit()&&!n.labs.userAgent.engine.isTrident()&&!n.labs.userAgent.engine.isEdge()};
n.labs.userAgent.engine.getVersion=function(){var b=n.labs.userAgent.util.getUserAgent();if(b){b=n.labs.userAgent.util.extractVersionTuples(b);var c=n.labs.userAgent.engine.getEngineTuple_(b);if(c)return"Gecko"==c[0]?n.labs.userAgent.engine.getVersionForKey_(b):c[1];b=b[0];var d;if(b&&(d=b[2])&&(d=/Trident\/([^\s;]+)/.exec(d)))return d[1]}return""};
n.labs.userAgent.engine.getEngineTuple_=function(b){if(!n.labs.userAgent.engine.isEdge())return b[1];for(var c=0;c<b.length;c++){var d=b[c];if("Edge"==d[0])return d}};n.labs.userAgent.engine.isVersionOrHigher=function(b){return 0<=n.string.compareVersions(n.labs.userAgent.engine.getVersion(),b)};n.labs.userAgent.engine.getVersionForKey_=function(b){return(b=n.array.find(b,function(b){return"Firefox"==b[0]}))&&b[1]||""};n.labs.userAgent.platform={};n.labs.userAgent.platform.isAndroid=function(){return n.labs.userAgent.util.matchUserAgent("Android")};n.labs.userAgent.platform.isIpod=function(){return n.labs.userAgent.util.matchUserAgent("iPod")};n.labs.userAgent.platform.isIphone=function(){return n.labs.userAgent.util.matchUserAgent("iPhone")&&!n.labs.userAgent.util.matchUserAgent("iPod")&&!n.labs.userAgent.util.matchUserAgent("iPad")};n.labs.userAgent.platform.isIpad=function(){return n.labs.userAgent.util.matchUserAgent("iPad")};
n.labs.userAgent.platform.isIos=function(){return n.labs.userAgent.platform.isIphone()||n.labs.userAgent.platform.isIpad()||n.labs.userAgent.platform.isIpod()};n.labs.userAgent.platform.isMacintosh=function(){return n.labs.userAgent.util.matchUserAgent("Macintosh")};n.labs.userAgent.platform.isLinux=function(){return n.labs.userAgent.util.matchUserAgent("Linux")};n.labs.userAgent.platform.isWindows=function(){return n.labs.userAgent.util.matchUserAgent("Windows")};
n.labs.userAgent.platform.isChromeOS=function(){return n.labs.userAgent.util.matchUserAgent("CrOS")};
n.labs.userAgent.platform.getVersion=function(){var b=n.labs.userAgent.util.getUserAgent(),c="";n.labs.userAgent.platform.isWindows()?(c=/Windows (?:NT|Phone) ([0-9.]+)/,c=(b=c.exec(b))?b[1]:"0.0"):n.labs.userAgent.platform.isIos()?(c=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,c=(b=c.exec(b))&&b[1].replace(/_/g,".")):n.labs.userAgent.platform.isMacintosh()?(c=/Mac OS X ([0-9_.]+)/,c=(b=c.exec(b))?b[1].replace(/_/g,"."):"10"):n.labs.userAgent.platform.isAndroid()?(c=/Android\s+([^\);]+)(\)|;)/,c=(b=c.exec(b))&&
b[1]):n.labs.userAgent.platform.isChromeOS()&&(c=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,c=(b=c.exec(b))&&b[1]);return c||""};n.labs.userAgent.platform.isVersionOrHigher=function(b){return 0<=n.string.compareVersions(n.labs.userAgent.platform.getVersion(),b)};n.reflect={};n.reflect.object=function(b,c){return c};n.reflect.objectProperty=function(b){return b};n.reflect.sinkValue=function(b){n.reflect.sinkValue[" "](b);return b};n.reflect.sinkValue[" "]=n.nullFunction;n.reflect.canAccessProperty=function(b){try{return n.reflect.sinkValue(b.nodeName),!0}catch(c){}return!1};n.reflect.cache=function(b,c,d,e){e=e?e(c):c;return Object.prototype.hasOwnProperty.call(b,e)?b[e]:b[e]=d(c)};n.userAgent={};n.userAgent.ASSUME_IE=!1;n.userAgent.ASSUME_EDGE=!1;n.userAgent.ASSUME_GECKO=!1;n.userAgent.ASSUME_WEBKIT=!1;n.userAgent.ASSUME_MOBILE_WEBKIT=!1;n.userAgent.ASSUME_OPERA=!1;n.userAgent.ASSUME_ANY_VERSION=!1;n.userAgent.BROWSER_KNOWN_=n.userAgent.ASSUME_IE||n.userAgent.ASSUME_EDGE||n.userAgent.ASSUME_GECKO||n.userAgent.ASSUME_MOBILE_WEBKIT||n.userAgent.ASSUME_WEBKIT||n.userAgent.ASSUME_OPERA;n.userAgent.getUserAgentString=function(){return n.labs.userAgent.util.getUserAgent()};
n.userAgent.getNavigator=function(){return n.global.navigator||null};n.userAgent.OPERA=n.userAgent.BROWSER_KNOWN_?n.userAgent.ASSUME_OPERA:n.labs.userAgent.browser.isOpera();n.userAgent.IE=n.userAgent.BROWSER_KNOWN_?n.userAgent.ASSUME_IE:n.labs.userAgent.browser.isIE();n.userAgent.EDGE=n.userAgent.BROWSER_KNOWN_?n.userAgent.ASSUME_EDGE:n.labs.userAgent.engine.isEdge();n.userAgent.EDGE_OR_IE=n.userAgent.EDGE||n.userAgent.IE;n.userAgent.GECKO=n.userAgent.BROWSER_KNOWN_?n.userAgent.ASSUME_GECKO:n.labs.userAgent.engine.isGecko();
n.userAgent.WEBKIT=n.userAgent.BROWSER_KNOWN_?n.userAgent.ASSUME_WEBKIT||n.userAgent.ASSUME_MOBILE_WEBKIT:n.labs.userAgent.engine.isWebKit();n.userAgent.isMobile_=function(){return n.userAgent.WEBKIT&&n.labs.userAgent.util.matchUserAgent("Mobile")};n.userAgent.MOBILE=n.userAgent.ASSUME_MOBILE_WEBKIT||n.userAgent.isMobile_();n.userAgent.SAFARI=n.userAgent.WEBKIT;n.userAgent.determinePlatform_=function(){var b=n.userAgent.getNavigator();return b&&b.platform||""};n.userAgent.PLATFORM=n.userAgent.determinePlatform_();
n.userAgent.ASSUME_MAC=!1;n.userAgent.ASSUME_WINDOWS=!1;n.userAgent.ASSUME_LINUX=!1;n.userAgent.ASSUME_X11=!1;n.userAgent.ASSUME_ANDROID=!1;n.userAgent.ASSUME_IPHONE=!1;n.userAgent.ASSUME_IPAD=!1;n.userAgent.ASSUME_IPOD=!1;n.userAgent.PLATFORM_KNOWN_=n.userAgent.ASSUME_MAC||n.userAgent.ASSUME_WINDOWS||n.userAgent.ASSUME_LINUX||n.userAgent.ASSUME_X11||n.userAgent.ASSUME_ANDROID||n.userAgent.ASSUME_IPHONE||n.userAgent.ASSUME_IPAD||n.userAgent.ASSUME_IPOD;
n.userAgent.MAC=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_MAC:n.labs.userAgent.platform.isMacintosh();n.userAgent.WINDOWS=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_WINDOWS:n.labs.userAgent.platform.isWindows();n.userAgent.isLegacyLinux_=function(){return n.labs.userAgent.platform.isLinux()||n.labs.userAgent.platform.isChromeOS()};n.userAgent.LINUX=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_LINUX:n.userAgent.isLegacyLinux_();
n.userAgent.isX11_=function(){var b=n.userAgent.getNavigator();return!!b&&n.string.contains(b.appVersion||"","X11")};n.userAgent.X11=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_X11:n.userAgent.isX11_();n.userAgent.ANDROID=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_ANDROID:n.labs.userAgent.platform.isAndroid();n.userAgent.IPHONE=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_IPHONE:n.labs.userAgent.platform.isIphone();n.userAgent.IPAD=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_IPAD:n.labs.userAgent.platform.isIpad();
n.userAgent.IPOD=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_IPOD:n.labs.userAgent.platform.isIpod();n.userAgent.IOS=n.userAgent.PLATFORM_KNOWN_?n.userAgent.ASSUME_IPHONE||n.userAgent.ASSUME_IPAD||n.userAgent.ASSUME_IPOD:n.labs.userAgent.platform.isIos();n.userAgent.determineVersion_=function(){var b="",c=n.userAgent.getVersionRegexResult_();c&&(b=c?c[1]:"");return n.userAgent.IE&&(c=n.userAgent.getDocumentMode_(),null!=c&&c>parseFloat(b))?String(c):b};
n.userAgent.getVersionRegexResult_=function(){var b=n.userAgent.getUserAgentString();if(n.userAgent.GECKO)return/rv\:([^\);]+)(\)|;)/.exec(b);if(n.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(b);if(n.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b);if(n.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(b);if(n.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(b)};n.userAgent.getDocumentMode_=function(){var b=n.global.document;return b?b.documentMode:void 0};n.userAgent.VERSION=n.userAgent.determineVersion_();
n.userAgent.compare=function(b,c){return n.string.compareVersions(b,c)};n.userAgent.isVersionOrHigherCache_={};n.userAgent.isVersionOrHigher=function(b){return n.userAgent.ASSUME_ANY_VERSION||n.reflect.cache(n.userAgent.isVersionOrHigherCache_,b,function(){return 0<=n.string.compareVersions(n.userAgent.VERSION,b)})};n.userAgent.isVersion=n.userAgent.isVersionOrHigher;n.userAgent.isDocumentModeOrHigher=function(b){return Number(n.userAgent.DOCUMENT_MODE)>=b};n.userAgent.isDocumentMode=n.userAgent.isDocumentModeOrHigher;
var t;var u=n.global.document;t=u&&n.userAgent.IE?n.userAgent.getDocumentMode_()||("CSS1Compat"==u.compatMode?parseInt(n.userAgent.VERSION,10):5):void 0;n.userAgent.DOCUMENT_MODE=t;n.events={};k.scope.purify=function(b){return b()};
n.events.BrowserFeature={HAS_W3C_BUTTON:!n.userAgent.IE||n.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!n.userAgent.IE||n.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:n.userAgent.IE&&!n.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!n.userAgent.WEBKIT||n.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:n.userAgent.GECKO&&n.userAgent.isVersionOrHigher("1.9b")||n.userAgent.IE&&n.userAgent.isVersionOrHigher("8")||n.userAgent.OPERA&&
n.userAgent.isVersionOrHigher("9.5")||n.userAgent.WEBKIT&&n.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:n.userAgent.GECKO&&!n.userAgent.isVersionOrHigher("8")||n.userAgent.IE&&!n.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in n.global||!!(n.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!n.global.navigator||!n.global.navigator.msMaxTouchPoints),PASSIVE_EVENTS:(0,k.scope.purify)(function(){if(!n.global.addEventListener||
!Object.defineProperty)return!1;var b=!1,c=Object.defineProperty({},"passive",{get:function(){b=!0}});n.global.addEventListener("test",n.nullFunction,c);n.global.removeEventListener("test",n.nullFunction,c);return b})};n.events.EventId=function(b){this.id=b};n.events.EventId.prototype.toString=function(){return this.id};n.events.Event=function(b,c){this.type=b instanceof n.events.EventId?String(b):b;this.currentTarget=this.target=c;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};n.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};n.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};n.events.Event.stopPropagation=function(b){b.stopPropagation()};n.events.Event.preventDefault=function(b){b.preventDefault()};n.events.getVendorPrefixedName_=function(b){return n.userAgent.WEBKIT?"webkit"+b:n.userAgent.OPERA?"o"+b.toLowerCase():b.toLowerCase()};
n.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTIONCHANGE:"selectionchange",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:n.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:n.userAgent.IE?"focusout":"DOMFocusOut",
CHANGE:"change",RESET:"reset",SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DEVICEMOTION:"devicemotion",DEVICEORIENTATION:"deviceorientation",DOMCONTENTLOADED:"DOMContentLoaded",
ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",CANPLAY:"canplay",CANPLAYTHROUGH:"canplaythrough",DURATIONCHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",PAUSE:"pause",PLAY:"play",PLAYING:"playing",RATECHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIMEUPDATE:"timeupdate",
VOLUMECHANGE:"volumechange",WAITING:"waiting",SOURCEOPEN:"sourceopen",SOURCEENDED:"sourceended",SOURCECLOSED:"sourceclosed",ABORT:"abort",UPDATE:"update",UPDATESTART:"updatestart",UPDATEEND:"updateend",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",INSTALL:"install",ACTIVATE:"activate",
FETCH:"fetch",FOREIGNFETCH:"foreignfetch",MESSAGEERROR:"messageerror",STATECHANGE:"statechange",UPDATEFOUND:"updatefound",CONTROLLERCHANGE:"controllerchange",ANIMATIONSTART:n.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:n.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:n.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:n.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",
POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",
MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:n.userAgent.IE?"textinput":"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",BEFOREINPUT:"beforeinput",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",
LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};n.events.BrowserEvent=function(b,c){n.events.Event.call(this,b?b.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.event_=this.state=null;if(b){var d=this.type=b.type,e=b.changedTouches?b.changedTouches[0]:null;this.target=b.target||b.srcElement;this.currentTarget=c;(c=b.relatedTarget)?n.userAgent.GECKO&&
(n.reflect.canAccessProperty(c)||(c=null)):d==n.events.EventType.MOUSEOVER?c=b.fromElement:d==n.events.EventType.MOUSEOUT&&(c=b.toElement);this.relatedTarget=c;n.isNull(e)?(this.offsetX=n.userAgent.WEBKIT||void 0!==b.offsetX?b.offsetX:b.layerX,this.offsetY=n.userAgent.WEBKIT||void 0!==b.offsetY?b.offsetY:b.layerY,this.clientX=void 0!==b.clientX?b.clientX:b.pageX,this.clientY=void 0!==b.clientY?b.clientY:b.pageY,this.screenX=b.screenX||0,this.screenY=b.screenY||0):(this.clientX=void 0!==e.clientX?
e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0);this.button=b.button;this.keyCode=b.keyCode||0;this.key=b.key||"";this.charCode=b.charCode||("keypress"==d?b.keyCode:0);this.ctrlKey=b.ctrlKey;this.altKey=b.altKey;this.shiftKey=b.shiftKey;this.metaKey=b.metaKey;this.state=b.state;this.event_=b;b.defaultPrevented&&this.preventDefault()}};n.inherits(n.events.BrowserEvent,n.events.Event);
n.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};n.events.BrowserEvent.IEButtonMap=[1,4,2];n.events.BrowserEvent.prototype.stopPropagation=function(){n.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
n.events.BrowserEvent.prototype.preventDefault=function(){n.events.BrowserEvent.superClass_.preventDefault.call(this);var b=this.event_;if(b.preventDefault)b.preventDefault();else if(b.returnValue=!1,n.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(b.ctrlKey||112<=b.keyCode&&123>=b.keyCode)b.keyCode=-1}catch(c){}};n.events.Listenable=function(){};n.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);n.events.Listenable.addImplementation=function(b){b.prototype[n.events.Listenable.IMPLEMENTED_BY_PROP]=!0};n.events.Listenable.isImplementedBy=function(b){return!(!b||!b[n.events.Listenable.IMPLEMENTED_BY_PROP])};n.events.ListenableKey=function(){};n.events.ListenableKey.counter_=0;n.events.ListenableKey.reserveKey=function(){return++n.events.ListenableKey.counter_};n.events.Listener=function(b,c,d,e,f,g){this.listener=b;this.proxy=c;this.src=d;this.type=e;this.capture=!!f;this.handler=g;this.key=n.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};n.events.Listener.ENABLE_MONITORING=!1;var v=function(b){b.removed=!0;b.listener=null;b.proxy=null;b.src=null;b.handler=null};n.events.ListenerMap=function(b){this.src=b;this.listeners={};this.typeCount_=0};n.events.ListenerMap.prototype.add=function(b,c,d,e,f){var g=b.toString();b=this.listeners[g];b||(b=this.listeners[g]=[],this.typeCount_++);var h=n.events.ListenerMap.findListenerIndex_(b,c,e,f);-1<h?(c=b[h],d||(c.callOnce=!1)):(c=new n.events.Listener(c,null,this.src,g,!!e,f),c.callOnce=d,b.push(c));return c};
n.events.ListenerMap.prototype.remove=function(b,c,d,e){b=b.toString();if(!(b in this.listeners))return!1;var f=this.listeners[b];c=n.events.ListenerMap.findListenerIndex_(f,c,d,e);return-1<c?(v(f[c]),n.array.removeAt(f,c),0==f.length&&(delete this.listeners[b],this.typeCount_--),!0):!1};var w=function(b,c){var d=c.type;if(!(d in b.listeners))return!1;var e=n.array.remove(b.listeners[d],c);e&&(v(c),0==b.listeners[d].length&&(delete b.listeners[d],b.typeCount_--));return e};
n.events.ListenerMap.prototype.removeAll=function(b){b=b&&b.toString();var c=0,d;for(d in this.listeners)if(!b||d==b){for(var e=this.listeners[d],f=0;f<e.length;f++)++c,v(e[f]);delete this.listeners[d];this.typeCount_--}return c};n.events.ListenerMap.prototype.getListeners=function(b,c){b=this.listeners[b.toString()];var d=[];if(b)for(var e=0;e<b.length;++e){var f=b[e];f.capture==c&&d.push(f)}return d};
n.events.ListenerMap.prototype.getListener=function(b,c,d,e){b=this.listeners[b.toString()];var f=-1;b&&(f=n.events.ListenerMap.findListenerIndex_(b,c,d,e));return-1<f?b[f]:null};n.events.ListenerMap.prototype.hasListener=function(b,c){var d=n.isDef(b),e=d?b.toString():"",f=n.isDef(c);return n.object.some(this.listeners,function(b){for(var g=0;g<b.length;++g)if(!(d&&b[g].type!=e||f&&b[g].capture!=c))return!0;return!1})};
n.events.ListenerMap.findListenerIndex_=function(b,c,d,e){for(var f=0;f<b.length;++f){var g=b[f];if(!g.removed&&g.listener==c&&g.capture==!!d&&g.handler==e)return f}return-1};n.events.LISTENER_MAP_PROP_="closure_lm_"+(1E6*Math.random()|0);n.events.onString_="on";n.events.onStringMap_={};n.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2};n.events.CAPTURE_SIMULATION_MODE=2;n.events.listenerCountEstimate_=0;
n.events.listen=function(b,c,d,e,f){if(e&&e.once)return n.events.listenOnce(b,c,d,e,f);if(n.isArray(c)){for(var g=0;g<c.length;g++)n.events.listen(b,c[g],d,e,f);return null}d=n.events.wrapListener(d);return n.events.Listenable.isImplementedBy(b)?b.listen(c,d,n.isObject(e)?!!e.capture:!!e,f):n.events.listen_(b,c,d,!1,e,f)};
n.events.listen_=function(b,c,d,e,f,g){if(!c)throw Error("Invalid event type");var h=n.isObject(f)?!!f.capture:!!f;if(h&&!n.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(n.events.CAPTURE_SIMULATION_MODE==n.events.CaptureSimulationMode.OFF_AND_FAIL)return n.asserts.fail("Can not register capture listener in IE8-."),null;if(n.events.CAPTURE_SIMULATION_MODE==n.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var l=n.events.getListenerMap_(b);l||(b[n.events.LISTENER_MAP_PROP_]=l=new n.events.ListenerMap(b));
d=l.add(c,d,e,h,g);if(d.proxy)return d;e=n.events.getProxy();d.proxy=e;e.src=b;e.listener=d;if(b.addEventListener)n.events.BrowserFeature.PASSIVE_EVENTS||(f=h),void 0===f&&(f=!1),b.addEventListener(c.toString(),e,f);else if(b.attachEvent)b.attachEvent(n.events.getOnString_(c.toString()),e);else throw Error("addEventListener and attachEvent are unavailable.");n.events.listenerCountEstimate_++;return d};
n.events.getProxy=function(){var b=n.events.handleBrowserEvent_,c=n.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(d){return b.call(c.src,c.listener,d)}:function(d){d=b.call(c.src,c.listener,d);if(!d)return d};return c};
n.events.listenOnce=function(b,c,d,e,f){if(n.isArray(c)){for(var g=0;g<c.length;g++)n.events.listenOnce(b,c[g],d,e,f);return null}d=n.events.wrapListener(d);return n.events.Listenable.isImplementedBy(b)?b.listenOnce(c,d,n.isObject(e)?!!e.capture:!!e,f):n.events.listen_(b,c,d,!0,e,f)};n.events.listenWithWrapper=function(b,c,d,e,f){c.listen(b,d,e,f)};
n.events.unlisten=function(b,c,d,e,f){if(n.isArray(c)){for(var g=0;g<c.length;g++)n.events.unlisten(b,c[g],d,e,f);return null}e=n.isObject(e)?!!e.capture:!!e;d=n.events.wrapListener(d);if(n.events.Listenable.isImplementedBy(b))return b.unlisten(c,d,e,f);if(!b)return!1;if(b=n.events.getListenerMap_(b))if(c=b.getListener(c,d,e,f))return n.events.unlistenByKey(c);return!1};
n.events.unlistenByKey=function(b){if(n.isNumber(b)||!b||b.removed)return!1;var c=b.src;if(n.events.Listenable.isImplementedBy(c))return c.unlistenByKey(b);var d=b.type,e=b.proxy;c.removeEventListener?c.removeEventListener(d,e,b.capture):c.detachEvent&&c.detachEvent(n.events.getOnString_(d),e);n.events.listenerCountEstimate_--;(d=n.events.getListenerMap_(c))?(w(d,b),0==d.typeCount_&&(d.src=null,c[n.events.LISTENER_MAP_PROP_]=null)):v(b);return!0};
n.events.unlistenWithWrapper=function(b,c,d,e,f){c.unlisten(b,d,e,f)};n.events.removeAll=function(b,c){if(!b)return 0;if(n.events.Listenable.isImplementedBy(b))return b.eventTargetListeners_?b.eventTargetListeners_.removeAll(c):0;b=n.events.getListenerMap_(b);if(!b)return 0;var d=0;c=c&&c.toString();for(var e in b.listeners)if(!c||e==c)for(var f=b.listeners[e].concat(),g=0;g<f.length;++g)n.events.unlistenByKey(f[g])&&++d;return d};
n.events.getListeners=function(b,c,d){return n.events.Listenable.isImplementedBy(b)?b.getListeners(c,d):b?(b=n.events.getListenerMap_(b))?b.getListeners(c,d):[]:[]};n.events.getListener=function(b,c,d,e,f){d=n.events.wrapListener(d);e=!!e;return n.events.Listenable.isImplementedBy(b)?b.getListener(c,d,e,f):b?(b=n.events.getListenerMap_(b))?b.getListener(c,d,e,f):null:null};
n.events.hasListener=function(b,c,d){if(n.events.Listenable.isImplementedBy(b))return b.hasListener(c,d);b=n.events.getListenerMap_(b);return!!b&&b.hasListener(c,d)};n.events.expose=function(b){var c=[],d;for(d in b)b[d]&&b[d].id?c.push(d+" = "+b[d]+" ("+b[d].id+")"):c.push(d+" = "+b[d]);return c.join("\n")};n.events.getOnString_=function(b){return b in n.events.onStringMap_?n.events.onStringMap_[b]:n.events.onStringMap_[b]=n.events.onString_+b};
n.events.fireListeners=function(b,c,d,e){return n.events.Listenable.isImplementedBy(b)?b.fireListeners(c,d,e):n.events.fireListeners_(b,c,d,e)};n.events.fireListeners_=function(b,c,d,e){var f=!0;if(b=n.events.getListenerMap_(b))if(c=b.listeners[c.toString()])for(c=c.concat(),b=0;b<c.length;b++){var g=c[b];g&&g.capture==d&&!g.removed&&(g=n.events.fireListener(g,e),f=f&&!1!==g)}return f};
n.events.fireListener=function(b,c){var d=b.listener,e=b.handler||b.src;b.callOnce&&n.events.unlistenByKey(b);return d.call(e,c)};n.events.getTotalListenerCount=function(){return n.events.listenerCountEstimate_};n.events.dispatchEvent=function(b,c){n.asserts.assert(n.events.Listenable.isImplementedBy(b),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");return b.dispatchEvent(c)};n.events.protectBrowserEventEntryPoint=function(b){n.events.handleBrowserEvent_=b.protectEntryPoint(n.events.handleBrowserEvent_)};
n.events.handleBrowserEvent_=function(b,c){if(b.removed)return!0;if(!n.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var d=c||n.getObjectByName("window.event");c=new n.events.BrowserEvent(d,this);var e=!0;if(n.events.CAPTURE_SIMULATION_MODE==n.events.CaptureSimulationMode.ON){if(!n.events.isMarkedIeEvent_(d)){n.events.markIeEvent_(d);d=[];for(var f=c.currentTarget;f;f=f.parentNode)d.push(f);b=b.type;for(f=d.length-1;!c.propagationStopped_&&0<=f;f--){c.currentTarget=d[f];var g=n.events.fireListeners_(d[f],
b,!0,c);e=e&&g}for(f=0;!c.propagationStopped_&&f<d.length;f++)c.currentTarget=d[f],g=n.events.fireListeners_(d[f],b,!1,c),e=e&&g}}else e=n.events.fireListener(b,c);return e}return n.events.fireListener(b,new n.events.BrowserEvent(c,this))};n.events.markIeEvent_=function(b){var c=!1;if(0==b.keyCode)try{b.keyCode=-1;return}catch(d){c=!0}if(c||void 0==b.returnValue)b.returnValue=!0};n.events.isMarkedIeEvent_=function(b){return 0>b.keyCode||void 0!=b.returnValue};n.events.uniqueIdCounter_=0;
n.events.getUniqueId=function(b){return b+"_"+n.events.uniqueIdCounter_++};n.events.getListenerMap_=function(b){b=b[n.events.LISTENER_MAP_PROP_];return b instanceof n.events.ListenerMap?b:null};n.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);
n.events.wrapListener=function(b){n.asserts.assert(b,"Listener can not be null.");if(n.isFunction(b))return b;n.asserts.assert(b.handleEvent,"An object listener must have handleEvent method.");b[n.events.LISTENER_WRAPPER_PROP_]||(b[n.events.LISTENER_WRAPPER_PROP_]=function(c){return b.handleEvent(c)});return b[n.events.LISTENER_WRAPPER_PROP_]};n.debug.entryPointRegistry.register(function(b){n.events.handleBrowserEvent_=b(n.events.handleBrowserEvent_)});n.events.EventTarget=function(){n.Disposable.call(this);this.eventTargetListeners_=new n.events.ListenerMap(this);this.actualEventTarget_=this;this.parentEventTarget_=null};n.inherits(n.events.EventTarget,n.Disposable);n.events.Listenable.addImplementation(n.events.EventTarget);n.events.EventTarget.MAX_ANCESTORS_=1E3;a=n.events.EventTarget.prototype;a.addEventListener=function(b,c,d,e){n.events.listen(this,b,c,d,e)};a.removeEventListener=function(b,c,d,e){n.events.unlisten(this,b,c,d,e)};
a.dispatchEvent=function(b){x(this);var c=this.parentEventTarget_;if(c){var d=[];for(var e=1;c;c=c.parentEventTarget_)d.push(c),n.asserts.assert(++e<n.events.EventTarget.MAX_ANCESTORS_,"infinite loop")}return n.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_,b,d)};a.disposeInternal=function(){n.events.EventTarget.superClass_.disposeInternal.call(this);this.eventTargetListeners_&&this.eventTargetListeners_.removeAll(void 0);this.parentEventTarget_=null};
a.listen=function(b,c,d,e){x(this);return this.eventTargetListeners_.add(String(b),c,!1,d,e)};a.listenOnce=function(b,c,d,e){return this.eventTargetListeners_.add(String(b),c,!0,d,e)};a.unlisten=function(b,c,d,e){return this.eventTargetListeners_.remove(String(b),c,d,e)};a.unlistenByKey=function(b){return w(this.eventTargetListeners_,b)};
a.fireListeners=function(b,c,d){b=this.eventTargetListeners_.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.removed&&g.capture==c){var h=g.listener,l=g.handler||g.src;g.callOnce&&this.unlistenByKey(g);e=!1!==h.call(l,d)&&e}}return e&&0!=d.returnValue_};a.getListeners=function(b,c){return this.eventTargetListeners_.getListeners(String(b),c)};a.getListener=function(b,c,d,e){return this.eventTargetListeners_.getListener(String(b),c,d,e)};
a.hasListener=function(b,c){return this.eventTargetListeners_.hasListener(n.isDef(b)?String(b):void 0,c)};var x=function(b){n.asserts.assert(b.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};
n.events.EventTarget.dispatchEventInternal_=function(b,c,d){var e=c.type||c;if(n.isString(c))c=new n.events.Event(c,b);else if(c instanceof n.events.Event)c.target=c.target||b;else{var f=c;c=new n.events.Event(e,b);n.object.extend(c,f)}f=!0;if(d)for(var g=d.length-1;!c.propagationStopped_&&0<=g;g--){var h=c.currentTarget=d[g];f=h.fireListeners(e,!0,c)&&f}c.propagationStopped_||(h=c.currentTarget=b,f=h.fireListeners(e,!0,c)&&f,c.propagationStopped_||(f=h.fireListeners(e,!1,c)&&f));if(d)for(g=0;!c.propagationStopped_&&
g<d.length;g++)h=c.currentTarget=d[g],f=h.fireListeners(e,!1,c)&&f;return f};n.functions={};n.functions.constant=function(b){return function(){return b}};n.functions.FALSE=n.functions.constant(!1);n.functions.TRUE=n.functions.constant(!0);n.functions.NULL=n.functions.constant(null);n.functions.identity=function(b){return b};n.functions.error=function(b){return function(){throw Error(b);}};n.functions.fail=function(b){return function(){throw b;}};n.functions.lock=function(b,c){c=c||0;return function(){return b.apply(this,Array.prototype.slice.call(arguments,0,c))}};
n.functions.nth=function(b){return function(){return arguments[b]}};n.functions.partialRight=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=Array.prototype.slice.call(arguments);c.push.apply(c,d);return b.apply(this,c)}};n.functions.withReturnValue=function(b,c){return n.functions.sequence(b,n.functions.constant(c))};n.functions.equalTo=function(b,c){return function(d){return c?b==d:b===d}};
n.functions.compose=function(b,c){var d=arguments,e=d.length;return function(){var b;e&&(b=d[e-1].apply(this,arguments));for(var c=e-2;0<=c;c--)b=d[c].call(this,b);return b}};n.functions.sequence=function(b){var c=arguments,d=c.length;return function(){for(var b,f=0;f<d;f++)b=c[f].apply(this,arguments);return b}};n.functions.and=function(b){var c=arguments,d=c.length;return function(){for(var b=0;b<d;b++)if(!c[b].apply(this,arguments))return!1;return!0}};
n.functions.or=function(b){var c=arguments,d=c.length;return function(){for(var b=0;b<d;b++)if(c[b].apply(this,arguments))return!0;return!1}};n.functions.not=function(b){return function(){return!b.apply(this,arguments)}};n.functions.create=function(b,c){var d=function(){};d.prototype=b.prototype;d=new d;b.apply(d,Array.prototype.slice.call(arguments,1));return d};n.functions.CACHE_RETURN_VALUE=!0;
n.functions.cacheReturnValue=function(b){var c=!1,d;return function(){if(!n.functions.CACHE_RETURN_VALUE)return b();c||(d=b(),c=!0);return d}};n.functions.once=function(b){var c=b;return function(){if(c){var b=c;c=null;b()}}};n.functions.debounce=function(b,c,d){var e=0;return function(f){n.global.clearTimeout(e);var g=arguments;e=n.global.setTimeout(function(){b.apply(d,g)},c)}};
n.functions.throttle=function(b,c,d){var e=0,f=!1,g=[],h=function(){e=0;f&&(f=!1,l())},l=function(){e=n.global.setTimeout(h,c);b.apply(d,g)};return function(b){g=arguments;e?f=!0:l()}};n.functions.rateLimit=function(b,c,d){var e=0,f=function(){e=0};return function(g){e||(e=n.global.setTimeout(f,c),b.apply(d,arguments))}};n.math={};n.math.randomInt=function(){return Math.floor(Math.random()*n.craw.AppWindow.NETWORK_TEST_URLS_.length)};n.math.uniformRandom=function(b,c){return b+Math.random()*(c-b)};n.math.clamp=function(b,c,d){return Math.min(Math.max(b,c),d)};n.math.modulo=function(b,c){b%=c;return 0>b*c?b+c:b};n.math.lerp=function(b,c,d){return b+d*(c-b)};n.math.nearlyEquals=function(b,c,d){return Math.abs(b-c)<=(d||1E-6)};n.math.standardAngle=function(b){return n.math.modulo(b,360)};
n.math.standardAngleInRadians=function(b){return n.math.modulo(b,2*Math.PI)};n.math.toRadians=function(b){return b*Math.PI/180};n.math.toDegrees=function(b){return 180*b/Math.PI};n.math.angleDx=function(b,c){return c*Math.cos(n.math.toRadians(b))};n.math.angleDy=function(b,c){return c*Math.sin(n.math.toRadians(b))};n.math.angle=function(b,c,d,e){return n.math.standardAngle(n.math.toDegrees(Math.atan2(e-c,d-b)))};
n.math.angleDifference=function(b,c){b=n.math.standardAngle(c)-n.math.standardAngle(b);180<b?b-=360:-180>=b&&(b=360+b);return b};n.math.sign=function(b){return 0<b?1:0>b?-1:b};
n.math.longestCommonSubsequence=function(b,c,d,e){d=d||function(b,c){return b==c};e=e||function(c){return b[c]};for(var f=b.length,g=c.length,h=[],l=0;l<f+1;l++)h[l]=[],h[l][0]=0;for(var m=0;m<g+1;m++)h[0][m]=0;for(l=1;l<=f;l++)for(m=1;m<=g;m++)d(b[l-1],c[m-1])?h[l][m]=h[l-1][m-1]+1:h[l][m]=Math.max(h[l-1][m],h[l][m-1]);var p=[];l=f;for(m=g;0<l&&0<m;)d(b[l-1],c[m-1])?(p.unshift(e(l-1,m-1)),l--,m--):h[l-1][m]>h[l][m-1]?l--:m--;return p};
n.math.sum=function(b){return n.array.reduce(arguments,function(b,d){return b+d},0)};n.math.average=function(b){return n.math.sum.apply(null,arguments)/arguments.length};n.math.sampleVariance=function(b){var c=arguments.length;if(2>c)return 0;var d=n.math.average.apply(null,arguments);return n.math.sum.apply(null,n.array.map(arguments,function(b){return Math.pow(b-d,2)}))/(c-1)};n.math.standardDeviation=function(b){return Math.sqrt(n.math.sampleVariance.apply(null,arguments))};
n.math.isInt=function(b){return isFinite(b)&&0==b%1};n.math.isFiniteNumber=function(b){return isFinite(b)};n.math.isNegativeZero=function(b){return 0==b&&0>1/b};n.math.log10Floor=function(b){if(0<b){var c=Math.round(Math.log(b)*Math.LOG10E);return c-(parseFloat("1e"+c)>b?1:0)}return 0==b?-Infinity:NaN};n.math.safeFloor=function(b,c){n.asserts.assert(!n.isDef(c)||0<c);return Math.floor(b+(c||2E-15))};n.math.safeCeil=function(b,c){n.asserts.assert(!n.isDef(c)||0<c);return Math.ceil(b-(c||2E-15))};n.iter={};n.iter.StopIteration="StopIteration"in n.global?n.global.StopIteration:{message:"StopIteration",stack:""};n.iter.Iterator=function(){};n.iter.Iterator.prototype.next=function(){throw n.iter.StopIteration;};n.iter.Iterator.prototype.__iterator__=function(){return this};
n.iter.toIterator=function(b){if(b instanceof n.iter.Iterator)return b;if("function"==typeof b.__iterator__)return b.__iterator__(!1);if(n.isArrayLike(b)){var c=0,d=new n.iter.Iterator;d.next=function(){for(;;){if(c>=b.length)throw n.iter.StopIteration;if(c in b)return b[c++];c++}};return d}throw Error("Not implemented");};
n.iter.forEach=function(b,c,d){if(n.isArrayLike(b))try{n.array.forEach(b,c,d)}catch(e){if(e!==n.iter.StopIteration)throw e;}else{b=n.iter.toIterator(b);try{for(;;)c.call(d,b.next(),void 0,b)}catch(e){if(e!==n.iter.StopIteration)throw e;}}};n.iter.filter=function(b,c,d){var e=n.iter.toIterator(b);b=new n.iter.Iterator;b.next=function(){for(;;){var b=e.next();if(c.call(d,b,void 0,e))return b}};return b};n.iter.filterFalse=function(b,c,d){return n.iter.filter(b,n.functions.not(c),d)};
n.iter.range=function(b,c,d){var e=0,f=b,g=d||1;1<arguments.length&&(e=b,f=c);if(0==g)throw Error("Range step argument must not be zero");var h=new n.iter.Iterator;h.next=function(){if(0<g&&e>=f||0>g&&e<=f)throw n.iter.StopIteration;var b=e;e+=g;return b};return h};n.iter.join=function(b,c){return n.iter.toArray(b).join(c)};n.iter.map=function(b,c,d){var e=n.iter.toIterator(b);b=new n.iter.Iterator;b.next=function(){var b=e.next();return c.call(d,b,void 0,e)};return b};
n.iter.reduce=function(b,c,d,e){var f=d;n.iter.forEach(b,function(b){f=c.call(e,f,b)});return f};n.iter.some=function(b,c,d){b=n.iter.toIterator(b);try{for(;;)if(c.call(d,b.next(),void 0,b))return!0}catch(e){if(e!==n.iter.StopIteration)throw e;}return!1};n.iter.every=function(b,c,d){b=n.iter.toIterator(b);try{for(;;)if(!c.call(d,b.next(),void 0,b))return!1}catch(e){if(e!==n.iter.StopIteration)throw e;}return!0};n.iter.chain=function(b){return n.iter.chainFromIterable(arguments)};
n.iter.chainFromIterable=function(b){var c=n.iter.toIterator(b);b=new n.iter.Iterator;var d=null;b.next=function(){for(;;){if(null==d){var b=c.next();d=n.iter.toIterator(b)}try{return d.next()}catch(f){if(f!==n.iter.StopIteration)throw f;d=null}}};return b};n.iter.dropWhile=function(b,c,d){var e=n.iter.toIterator(b);b=new n.iter.Iterator;var f=!0;b.next=function(){for(;;){var b=e.next();if(!f||!c.call(d,b,void 0,e))return f=!1,b}};return b};
n.iter.takeWhile=function(b,c,d){var e=n.iter.toIterator(b);b=new n.iter.Iterator;b.next=function(){var b=e.next();if(c.call(d,b,void 0,e))return b;throw n.iter.StopIteration;};return b};n.iter.toArray=function(b){if(n.isArrayLike(b))return n.array.toArray(b);b=n.iter.toIterator(b);var c=[];n.iter.forEach(b,function(b){c.push(b)});return c};n.iter.equals=function(b,c,d){b=n.iter.zipLongest({},b,c);var e=d||n.array.defaultCompareEquality;return n.iter.every(b,function(b){return e(b[0],b[1])})};
n.iter.nextOrValue=function(b){try{n.iter.toIterator(b).next()}catch(c){if(c!=n.iter.StopIteration)throw c;}};
n.iter.product=function(b){if(n.array.some(arguments,function(b){return!b.length})||!arguments.length)return new n.iter.Iterator;var c=new n.iter.Iterator,d=arguments,e=n.array.repeat(0,d.length);c.next=function(){if(e){for(var b=n.array.map(e,function(b,c){return d[c][b]}),c=e.length-1;0<=c;c--){n.asserts.assert(e);if(e[c]<d[c].length-1){e[c]++;break}if(0==c){e=null;break}e[c]=0}return b}throw n.iter.StopIteration;};return c};
n.iter.cycle=function(b){var c=n.iter.toIterator(b),d=[],e=0;b=new n.iter.Iterator;var f=!1;b.next=function(){var b=null;if(!f)try{return b=c.next(),d.push(b),b}catch(h){if(h!=n.iter.StopIteration||n.array.isEmpty(d))throw h;f=!0}b=d[e];e=(e+1)%d.length;return b};return b};n.iter.count=function(b,c){var d=b||0,e=n.isDef(c)?c:1;b=new n.iter.Iterator;b.next=function(){var b=d;d+=e;return b};return b};n.iter.repeat=function(b){var c=new n.iter.Iterator;c.next=n.functions.constant(b);return c};
n.iter.accumulate=function(b){var c=n.iter.toIterator(b),d=0;b=new n.iter.Iterator;b.next=function(){return d+=c.next()};return b};n.iter.zip=function(b){var c=arguments,d=new n.iter.Iterator;if(0<c.length){var e=n.array.map(c,n.iter.toIterator);d.next=function(){return n.array.map(e,function(b){return b.next()})}}return d};
n.iter.zipLongest=function(b,c){var d=n.array.slice(arguments,1),e=new n.iter.Iterator;if(0<d.length){var f=n.array.map(d,n.iter.toIterator);e.next=function(){var c=!1,d=n.array.map(f,function(d){try{var e=d.next();c=!0}catch(p){if(p!==n.iter.StopIteration)throw p;e=b}return e});if(!c)throw n.iter.StopIteration;return d}}return e};n.iter.compress=function(b,c){var d=n.iter.toIterator(c);return n.iter.filter(b,function(){return!!d.next()})};
n.iter.GroupByIterator_=function(b,c){this.iterator=n.iter.toIterator(b);this.keyFunc=c||n.functions.identity};n.inherits(n.iter.GroupByIterator_,n.iter.Iterator);
n.iter.GroupByIterator_.prototype.next=function(){for(;this.currentKey==this.targetKey;)this.currentValue=this.iterator.next(),this.currentKey=this.keyFunc(this.currentValue);for(var b=this.targetKey=this.currentKey,c=this.targetKey,d=[];this.currentKey==c;){d.push(this.currentValue);try{this.currentValue=this.iterator.next()}catch(e){if(e!==n.iter.StopIteration)throw e;break}this.currentKey=this.keyFunc(this.currentValue)}return[b,d]};
n.iter.groupBy=function(b,c){return new n.iter.GroupByIterator_(b,c)};n.iter.starMap=function(b,c,d){var e=n.iter.toIterator(b);b=new n.iter.Iterator;b.next=function(){var b=n.iter.toArray(e.next());return c.apply(d,n.array.concat(b,void 0,e))};return b};
n.iter.tee=function(b,c){var d=n.iter.toIterator(b),e=n.array.map(n.array.range(n.isNumber(c)?c:2),function(){return[]}),f=function(){var b=d.next();n.array.forEach(e,function(c){c.push(b)})};return n.array.map(e,function(b){var c=new n.iter.Iterator;c.next=function(){n.array.isEmpty(b)&&f();n.asserts.assert(!n.array.isEmpty(b));return b.shift()};return c})};n.iter.enumerate=function(b,c){return n.iter.zip(n.iter.count(c),b)};
n.iter.limit=function(b,c){n.asserts.assert(n.math.isInt(c)&&0<=c);var d=n.iter.toIterator(b);b=new n.iter.Iterator;var e=c;b.next=function(){if(0<e--)return d.next();throw n.iter.StopIteration;};return b};n.iter.consume=function(b,c){n.asserts.assert(n.math.isInt(c)&&0<=c);for(b=n.iter.toIterator(b);0<c--;)n.iter.nextOrValue(b);return b};
n.iter.slice=function(b,c,d){n.asserts.assert(n.math.isInt(c)&&0<=c);b=n.iter.consume(b,c);n.isNumber(d)&&(n.asserts.assert(n.math.isInt(d)&&d>=c),b=n.iter.limit(b,d-c));return b};n.iter.hasDuplicates_=function(b){var c=[];n.array.removeDuplicates(b,c);return b.length!=c.length};n.iter.permutations=function(b,c){b=n.iter.toArray(b);c=n.array.repeat(b,n.isNumber(c)?c:b.length);c=n.iter.product.apply(void 0,c);return n.iter.filter(c,function(b){return!n.iter.hasDuplicates_(b)})};
n.iter.combinations=function(b,c){function d(b){return e[b]}var e=n.iter.toArray(b);b=n.iter.range(e.length);c=n.iter.permutations(b,c);var f=n.iter.filter(c,function(b){return n.array.isSorted(b)});c=new n.iter.Iterator;c.next=function(){return n.array.map(f.next(),d)};return c};
n.iter.combinationsWithReplacement=function(b,c){function d(b){return e[b]}var e=n.iter.toArray(b);b=n.array.range(e.length);c=n.array.repeat(b,c);c=n.iter.product.apply(void 0,c);var f=n.iter.filter(c,function(b){return n.array.isSorted(b)});c=new n.iter.Iterator;c.next=function(){return n.array.map(f.next(),d)};return c};n.structs={};n.structs.Map=function(b,c){this.map_={};this.keys_=[];this.version_=this.count_=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else b&&this.addAll(b)};a=n.structs.Map.prototype;a.getCount=function(){return this.count_};a.getValues=function(){y(this);for(var b=[],c=0;c<this.keys_.length;c++)b.push(this.map_[this.keys_[c]]);return b};a.getKeys=function(){y(this);return this.keys_.concat()};
a.containsKey=function(b){return n.structs.Map.hasKey_(this.map_,b)};a.containsValue=function(b){for(var c=0;c<this.keys_.length;c++){var d=this.keys_[c];if(n.structs.Map.hasKey_(this.map_,d)&&this.map_[d]==b)return!0}return!1};a.equals=function(b,c){if(this===b)return!0;if(this.count_!=b.getCount())return!1;c=c||n.structs.Map.defaultEquals;y(this);for(var d,e=0;d=this.keys_[e];e++)if(!c(this.get(d),b.get(d)))return!1;return!0};n.structs.Map.defaultEquals=function(b,c){return b===c};
n.structs.Map.prototype.isEmpty=function(){return 0==this.count_};n.structs.Map.prototype.clear=function(){this.map_={};this.version_=this.count_=this.keys_.length=0};n.structs.Map.prototype.remove=function(b){return n.structs.Map.hasKey_(this.map_,b)?(delete this.map_[b],this.count_--,this.version_++,this.keys_.length>2*this.count_&&y(this),!0):!1};
var y=function(b){if(b.count_!=b.keys_.length){for(var c=0,d=0;c<b.keys_.length;){var e=b.keys_[c];n.structs.Map.hasKey_(b.map_,e)&&(b.keys_[d++]=e);c++}b.keys_.length=d}if(b.count_!=b.keys_.length){var f={};for(d=c=0;c<b.keys_.length;)e=b.keys_[c],n.structs.Map.hasKey_(f,e)||(b.keys_[d++]=e,f[e]=1),c++;b.keys_.length=d}};a=n.structs.Map.prototype;a.get=function(b,c){return n.structs.Map.hasKey_(this.map_,b)?this.map_[b]:c};
a.set=function(b,c){n.structs.Map.hasKey_(this.map_,b)||(this.count_++,this.keys_.push(b),this.version_++);this.map_[b]=c};a.addAll=function(b){if(b instanceof n.structs.Map){var c=b.getKeys();b=b.getValues()}else c=n.object.getKeys(b),b=n.object.getValues(b);for(var d=0;d<c.length;d++)this.set(c[d],b[d])};a.forEach=function(b,c){for(var d=this.getKeys(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);b.call(c,g,f,this)}};a.clone=function(){return new n.structs.Map(this)};
a.transpose=function(){for(var b=new n.structs.Map,c=0;c<this.keys_.length;c++){var d=this.keys_[c];b.set(this.map_[d],d)}return b};a.toObject=function(){y(this);for(var b={},c=0;c<this.keys_.length;c++){var d=this.keys_[c];b[d]=this.map_[d]}return b};
a.__iterator__=function(b){y(this);var c=0,d=this.version_,e=this,f=new n.iter.Iterator;f.next=function(){if(d!=e.version_)throw Error("The map has changed since the iterator was created");if(c>=e.keys_.length)throw n.iter.StopIteration;var f=e.keys_[c++];return b?f:e.map_[f]};return f};n.structs.Map.hasKey_=function(b,c){return Object.prototype.hasOwnProperty.call(b,c)};n.structs.LinkedMap=function(b,c,d){this.maxCount_=b||null;this.cache_=!!c;this.evictionCallback_=d;this.map_=new n.structs.Map;this.head_=new n.structs.LinkedMap.Node_("",void 0);this.head_.next=this.head_.prev=this.head_};var B=function(b,c){(c=b.map_.get(c))&&b.cache_&&(c.remove(),A(b,c));return c};a=n.structs.LinkedMap.prototype;a.get=function(b,c){return(b=B(this,b))?b.value:c};a.set=function(b,c){var d=B(this,b);d?d.value=c:(d=new n.structs.LinkedMap.Node_(b,c),this.map_.set(b,d),A(this,d))};
a.peek=function(){return this.head_.next.value};a.shift=function(){return C(this,this.head_.next)};a.pop=function(){return C(this,this.head_.prev)};a.remove=function(b){return(b=this.map_.get(b))?(this.removeNode(b),!0):!1};a.removeNode=function(b){b.remove();this.map_.remove(b.key)};a.getCount=function(){return this.map_.getCount()};a.isEmpty=function(){return this.map_.isEmpty()};a.getKeys=function(){return this.map(function(b,c){return c})};a.getValues=function(){return this.map(function(b){return b})};
a.contains=function(b){return this.some(function(c){return c==b})};a.containsKey=function(b){return this.map_.containsKey(b)};a.clear=function(){D(this,0)};a.forEach=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)b.call(c,d.value,d.key,this)};a.map=function(b,c){for(var d=[],e=this.head_.next;e!=this.head_;e=e.next)d.push(b.call(c,e.value,e.key,this));return d};a.some=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)if(b.call(c,d.value,d.key,this))return!0;return!1};
a.every=function(b,c){for(var d=this.head_.next;d!=this.head_;d=d.next)if(!b.call(c,d.value,d.key,this))return!1;return!0};
var A=function(b,c){b.cache_?(c.next=b.head_.next,c.prev=b.head_,b.head_.next=c,c.next.prev=c):(c.prev=b.head_.prev,c.next=b.head_,b.head_.prev=c,c.prev.next=c);null!=b.maxCount_&&D(b,b.maxCount_)},D=function(b,c){for(;b.getCount()>c;){var d=b.cache_?b.head_.prev:b.head_.next;b.removeNode(d);b.evictionCallback_&&b.evictionCallback_(d.key,d.value)}},C=function(b,c){b.head_!=c&&b.removeNode(c);return c.value};n.structs.LinkedMap.Node_=function(b,c){this.key=b;this.value=c};
n.structs.LinkedMap.Node_.prototype.remove=function(){this.prev.next=this.next;this.next.prev=this.prev;delete this.prev;delete this.next};var q={LicensesCache:function(b,c){n.events.EventTarget.call(this);this.timeout_=b||36E5;this.cache_=new n.structs.LinkedMap(c||100,!0)}};n.inherits(q.LicensesCache,n.events.EventTarget);q.LicensesCache.Entry=function(b){this.timeStamp_=n.now();this.licenses_=b};q.LicensesCache.prototype.get=function(b){b=this.cache_.get(b);var c;if(c=b)c=this.timeout_,c=n.now()-b.timeStamp_<=c;return c?b.licenses_:null};q.LicensesCache.prototype.remove=function(b){this.cache_.remove(b)};n.structs.getCount=function(b){return b.getCount&&"function"==typeof b.getCount?b.getCount():n.isArrayLike(b)||n.isString(b)?b.length:n.object.getCount(b)};n.structs.getValues=function(b){if(b.getValues&&"function"==typeof b.getValues)return b.getValues();if(n.isString(b))return b.split("");if(n.isArrayLike(b)){for(var c=[],d=b.length,e=0;e<d;e++)c.push(b[e]);return c}return n.object.getValues(b)};
n.structs.getKeys=function(b){if(b.getKeys&&"function"==typeof b.getKeys)return b.getKeys();if(!b.getValues||"function"!=typeof b.getValues){if(n.isArrayLike(b)||n.isString(b)){var c=[];b=b.length;for(var d=0;d<b;d++)c.push(d);return c}return n.object.getKeys(b)}};
n.structs.contains=function(b,c){return b.contains&&"function"==typeof b.contains?b.contains(c):b.containsValue&&"function"==typeof b.containsValue?b.containsValue(c):n.isArrayLike(b)||n.isString(b)?n.array.contains(b,c):n.object.containsValue(b,c)};n.structs.isEmpty=function(b){return b.isEmpty&&"function"==typeof b.isEmpty?b.isEmpty():n.isArrayLike(b)||n.isString(b)?n.array.isEmpty(b):n.object.isEmpty(b)};
n.structs.clear=function(b){b.clear&&"function"==typeof b.clear?b.clear():n.isArrayLike(b)?n.array.clear(b):n.object.clear(b)};n.structs.forEach=function(b,c,d){if(b.forEach&&"function"==typeof b.forEach)b.forEach(c,d);else if(n.isArrayLike(b)||n.isString(b))n.array.forEach(b,c,d);else for(var e=n.structs.getKeys(b),f=n.structs.getValues(b),g=f.length,h=0;h<g;h++)c.call(d,f[h],e&&e[h],b)};
n.structs.filter=function(b,c,d){if("function"==typeof b.filter)return b.filter(c,d);if(n.isArrayLike(b)||n.isString(b))return n.array.filter(b,c,d);var e=n.structs.getKeys(b),f=n.structs.getValues(b),g=f.length;if(e){var h={};for(var l=0;l<g;l++)c.call(d,f[l],e[l],b)&&(h[e[l]]=f[l])}else for(h=[],l=0;l<g;l++)c.call(d,f[l],void 0,b)&&h.push(f[l]);return h};
n.structs.map=function(b,c,d){if("function"==typeof b.map)return b.map(c,d);if(n.isArrayLike(b)||n.isString(b))return n.array.map(b,c,d);var e=n.structs.getKeys(b),f=n.structs.getValues(b),g=f.length;if(e){var h={};for(var l=0;l<g;l++)h[e[l]]=c.call(d,f[l],e[l],b)}else for(h=[],l=0;l<g;l++)h[l]=c.call(d,f[l],void 0,b);return h};
n.structs.some=function(b,c,d){if("function"==typeof b.some)return b.some(c,d);if(n.isArrayLike(b)||n.isString(b))return n.array.some(b,c,d);for(var e=n.structs.getKeys(b),f=n.structs.getValues(b),g=f.length,h=0;h<g;h++)if(c.call(d,f[h],e&&e[h],b))return!0;return!1};
n.structs.every=function(b,c,d){if("function"==typeof b.every)return b.every(c,d);if(n.isArrayLike(b)||n.isString(b))return n.array.every(b,c,d);for(var e=n.structs.getKeys(b),f=n.structs.getValues(b),g=f.length,h=0;h<g;h++)if(!c.call(d,f[h],e&&e[h],b))return!1;return!0};n.uri={};n.uri.utils={};n.uri.utils.CharCode_={AMPERSAND:38,EQUAL:61,HASH:35,QUESTION:63};n.uri.utils.buildFromEncodedParts=function(b,c,d,e,f,g,h){var l="";b&&(l+=b+":");d&&(l+="//",c&&(l+=c+"@"),l+=d,e&&(l+=":"+e));f&&(l+=f);g&&(l+="?"+g);h&&(l+="#"+h);return l};n.uri.utils.splitRe_=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;n.uri.utils.ComponentIndex={SCHEME:1,USER_INFO:2,DOMAIN:3,PORT:4,PATH:5,QUERY_DATA:6,FRAGMENT:7};
n.uri.utils.split=function(b){return b.match(n.uri.utils.splitRe_)};n.uri.utils.decodeIfPossible_=function(b,c){return b?c?decodeURI(b):decodeURIComponent(b):b};n.uri.utils.getComponentByIndex_=function(b,c){return n.uri.utils.split(c)[b]||null};n.uri.utils.getScheme=function(b){return n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.SCHEME,b)};
n.uri.utils.getEffectiveScheme=function(b){b=n.uri.utils.getScheme(b);!b&&n.global.self&&n.global.self.location&&(b=n.global.self.location.protocol,b=b.substr(0,b.length-1));return b?b.toLowerCase():""};n.uri.utils.getUserInfoEncoded=function(b){return n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.USER_INFO,b)};n.uri.utils.getUserInfo=function(b){return n.uri.utils.decodeIfPossible_(n.uri.utils.getUserInfoEncoded(b))};
n.uri.utils.getDomainEncoded=function(b){return n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.DOMAIN,b)};n.uri.utils.getDomain=function(b){return n.uri.utils.decodeIfPossible_(n.uri.utils.getDomainEncoded(b),!0)};n.uri.utils.getPort=function(b){return Number(n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.PORT,b))||null};n.uri.utils.getPathEncoded=function(b){return n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.PATH,b)};
n.uri.utils.getPath=function(b){return n.uri.utils.decodeIfPossible_(n.uri.utils.getPathEncoded(b),!0)};n.uri.utils.getQueryData=function(b){return n.uri.utils.getComponentByIndex_(n.uri.utils.ComponentIndex.QUERY_DATA,b)};n.uri.utils.getFragmentEncoded=function(b){var c=b.indexOf("#");return 0>c?null:b.substr(c+1)};n.uri.utils.setFragmentEncoded=function(b,c){return n.uri.utils.removeFragment(b)+(c?"#"+c:"")};n.uri.utils.getFragment=function(b){return n.uri.utils.decodeIfPossible_(n.uri.utils.getFragmentEncoded(b))};
n.uri.utils.getHost=function(b){b=n.uri.utils.split(b);return n.uri.utils.buildFromEncodedParts(b[n.uri.utils.ComponentIndex.SCHEME],b[n.uri.utils.ComponentIndex.USER_INFO],b[n.uri.utils.ComponentIndex.DOMAIN],b[n.uri.utils.ComponentIndex.PORT])};n.uri.utils.getOrigin=function(b){b=n.uri.utils.split(b);return n.uri.utils.buildFromEncodedParts(b[n.uri.utils.ComponentIndex.SCHEME],null,b[n.uri.utils.ComponentIndex.DOMAIN],b[n.uri.utils.ComponentIndex.PORT])};
n.uri.utils.getPathAndAfter=function(b){b=n.uri.utils.split(b);return n.uri.utils.buildFromEncodedParts(null,null,null,null,b[n.uri.utils.ComponentIndex.PATH],b[n.uri.utils.ComponentIndex.QUERY_DATA],b[n.uri.utils.ComponentIndex.FRAGMENT])};n.uri.utils.removeFragment=function(b){var c=b.indexOf("#");return 0>c?b:b.substr(0,c)};
n.uri.utils.haveSameDomain=function(b,c){b=n.uri.utils.split(b);c=n.uri.utils.split(c);return b[n.uri.utils.ComponentIndex.DOMAIN]==c[n.uri.utils.ComponentIndex.DOMAIN]&&b[n.uri.utils.ComponentIndex.SCHEME]==c[n.uri.utils.ComponentIndex.SCHEME]&&b[n.uri.utils.ComponentIndex.PORT]==c[n.uri.utils.ComponentIndex.PORT]};n.uri.utils.assertNoFragmentsOrQueries_=function(b){n.asserts.assert(0>b.indexOf("#")&&0>b.indexOf("?"),"goog.uri.utils: Fragment or query identifiers are not supported: [%s]",b)};
n.uri.utils.parseQueryData=function(b,c){if(b){b=b.split("&");for(var d=0;d<b.length;d++){var e=b[d].indexOf("="),f=null;if(0<=e){var g=b[d].substring(0,e);f=b[d].substring(e+1)}else g=b[d];c(g,f?n.string.urlDecode(f):"")}}};n.uri.utils.splitQueryData_=function(b){var c=b.indexOf("#");0>c&&(c=b.length);var d=b.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=b.substring(d+1,c);return[b.substr(0,d),e,b.substr(c)]};n.uri.utils.joinQueryData_=function(b){return b[0]+(b[1]?"?"+b[1]:"")+b[2]};
n.uri.utils.appendQueryData_=function(b,c){return c?b?b+"&"+c:c:b};n.uri.utils.appendQueryDataToUri_=function(b,c){if(!c)return b;b=n.uri.utils.splitQueryData_(b);b[1]=n.uri.utils.appendQueryData_(b[1],c);return n.uri.utils.joinQueryData_(b)};n.uri.utils.appendKeyValuePairs_=function(b,c,d){n.asserts.assertString(b);if(n.isArray(c)){n.asserts.assertArray(c);for(var e=0;e<c.length;e++)n.uri.utils.appendKeyValuePairs_(b,String(c[e]),d)}else null!=c&&d.push(b+(""===c?"":"="+n.string.urlEncode(c)))};
n.uri.utils.buildQueryData=function(b,c){n.asserts.assert(0==Math.max(b.length-(c||0),0)%2,"goog.uri.utils: Key/value lists must be even in length.");var d=[];for(c=c||0;c<b.length;c+=2)n.uri.utils.appendKeyValuePairs_(b[c],b[c+1],d);return d.join("&")};n.uri.utils.buildQueryDataFromMap=function(b){var c=[],d;for(d in b)n.uri.utils.appendKeyValuePairs_(d,b[d],c);return c.join("&")};
n.uri.utils.appendParams=function(b,c){var d=2==arguments.length?n.uri.utils.buildQueryData(arguments[1],0):n.uri.utils.buildQueryData(arguments,1);return n.uri.utils.appendQueryDataToUri_(b,d)};n.uri.utils.appendParamsFromMap=function(b,c){c=n.uri.utils.buildQueryDataFromMap(c);return n.uri.utils.appendQueryDataToUri_(b,c)};n.uri.utils.appendParam=function(b,c,d){d=n.isDefAndNotNull(d)?"="+n.string.urlEncode(d):"";return n.uri.utils.appendQueryDataToUri_(b,c+d)};
n.uri.utils.findParam_=function(b,c,d,e){for(var f=d.length;0<=(c=b.indexOf(d,c))&&c<e;){var g=b.charCodeAt(c-1);if(g==n.uri.utils.CharCode_.AMPERSAND||g==n.uri.utils.CharCode_.QUESTION)if(g=b.charCodeAt(c+f),!g||g==n.uri.utils.CharCode_.EQUAL||g==n.uri.utils.CharCode_.AMPERSAND||g==n.uri.utils.CharCode_.HASH)return c;c+=f+1}return-1};n.uri.utils.hashOrEndRe_=/#|$/;n.uri.utils.hasParam=function(b,c){return 0<=n.uri.utils.findParam_(b,0,c,b.search(n.uri.utils.hashOrEndRe_))};
n.uri.utils.getParamValue=function(b,c){var d=b.search(n.uri.utils.hashOrEndRe_),e=n.uri.utils.findParam_(b,0,c,d);if(0>e)return null;var f=b.indexOf("&",e);if(0>f||f>d)f=d;e+=c.length+1;return n.string.urlDecode(b.substr(e,f-e))};n.uri.utils.getParamValues=function(b,c){for(var d=b.search(n.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=n.uri.utils.findParam_(b,e,c,d));){e=b.indexOf("&",f);if(0>e||e>d)e=d;f+=c.length+1;g.push(n.string.urlDecode(b.substr(f,e-f)))}return g};
n.uri.utils.trailingQueryPunctuationRe_=/[?&]($|#)/;n.uri.utils.removeParam=function(b,c){for(var d=b.search(n.uri.utils.hashOrEndRe_),e=0,f,g=[];0<=(f=n.uri.utils.findParam_(b,e,c,d));)g.push(b.substring(e,f)),e=Math.min(b.indexOf("&",f)+1||d,d);g.push(b.substr(e));return g.join("").replace(n.uri.utils.trailingQueryPunctuationRe_,"$1")};
n.uri.utils.setParam=function(b){var c=n.uri.utils.StandardQueryParam.RANDOM,d=n.string.getRandomString();return n.uri.utils.appendParam(n.uri.utils.removeParam(b,c),c,d)};n.uri.utils.setParamsFromMap=function(b,c){b=n.uri.utils.splitQueryData_(b);var d=b[1],e=[];d&&n.array.forEach(d.split("&"),function(b){var d=b.indexOf("=");c.hasOwnProperty(0<=d?b.substr(0,d):b)||e.push(b)});b[1]=n.uri.utils.appendQueryData_(e.join("&"),n.uri.utils.buildQueryDataFromMap(c));return n.uri.utils.joinQueryData_(b)};
n.uri.utils.appendPath=function(b,c){n.uri.utils.assertNoFragmentsOrQueries_(b);n.string.endsWith(b,"/")&&(b=b.substr(0,b.length-1));n.string.startsWith(c,"/")&&(c=c.substr(1));return n.string.buildString(b,"/",c)};
n.uri.utils.setPath=function(b,c){n.string.startsWith(c,"/")||(c="/"+c);b=n.uri.utils.split(b);return n.uri.utils.buildFromEncodedParts(b[n.uri.utils.ComponentIndex.SCHEME],b[n.uri.utils.ComponentIndex.USER_INFO],b[n.uri.utils.ComponentIndex.DOMAIN],b[n.uri.utils.ComponentIndex.PORT],c,b[n.uri.utils.ComponentIndex.QUERY_DATA],b[n.uri.utils.ComponentIndex.FRAGMENT])};n.uri.utils.StandardQueryParam={RANDOM:"zx"};n.uri.utils.makeUnique=function(b){return n.uri.utils.setParam(b)};n.Uri=function(b,c){this.domain_=this.userInfo_=this.scheme_="";this.port_=null;this.fragment_=this.path_="";this.ignoreCase_=this.isReadOnly_=!1;var d;b instanceof n.Uri?(this.ignoreCase_=n.isDef(c)?c:b.ignoreCase_,E(this,b.getScheme()),F(this,b.getUserInfo()),G(this,b.getDomain()),H(this,b.getPort()),this.setPath(b.getPath()),I(this,b.getQueryData().clone()),K(this,b.getFragment())):b&&(d=n.uri.utils.split(String(b)))?(this.ignoreCase_=!!c,E(this,d[n.uri.utils.ComponentIndex.SCHEME]||"",!0),F(this,
d[n.uri.utils.ComponentIndex.USER_INFO]||"",!0),G(this,d[n.uri.utils.ComponentIndex.DOMAIN]||"",!0),H(this,d[n.uri.utils.ComponentIndex.PORT]),this.setPath(d[n.uri.utils.ComponentIndex.PATH]||"",!0),I(this,d[n.uri.utils.ComponentIndex.QUERY_DATA]||"",!0),K(this,d[n.uri.utils.ComponentIndex.FRAGMENT]||"",!0)):(this.ignoreCase_=!!c,this.queryData_=new n.Uri.QueryData(null,0,this.ignoreCase_))};n.Uri.preserveParameterTypesCompatibilityFlag=!1;n.Uri.RANDOM_PARAM=n.uri.utils.StandardQueryParam.RANDOM;
n.Uri.prototype.toString=function(){var b=[],c=this.getScheme();c&&b.push(n.Uri.encodeSpecialChars_(c,n.Uri.reDisallowedInSchemeOrUserInfo_,!0),":");var d=this.getDomain();if(d||"file"==c)b.push("//"),(c=this.getUserInfo())&&b.push(n.Uri.encodeSpecialChars_(c,n.Uri.reDisallowedInSchemeOrUserInfo_,!0),"@"),b.push(n.Uri.removeDoubleEncoding_(n.string.urlEncode(d))),d=this.getPort(),null!=d&&b.push(":",String(d));if(d=this.getPath())this.domain_&&"/"!=d.charAt(0)&&b.push("/"),b.push(n.Uri.encodeSpecialChars_(d,
"/"==d.charAt(0)?n.Uri.reDisallowedInAbsolutePath_:n.Uri.reDisallowedInRelativePath_,!0));(d=this.queryData_.toString())&&b.push("?",d);(d=this.getFragment())&&b.push("#",n.Uri.encodeSpecialChars_(d,n.Uri.reDisallowedInFragment_));return b.join("")};
n.Uri.prototype.resolve=function(b){var c=this.clone(),d=!!b.scheme_;d?E(c,b.getScheme()):d=!!b.userInfo_;d?F(c,b.getUserInfo()):d=!!b.domain_;d?G(c,b.getDomain()):d=null!=b.port_;var e=b.getPath();if(d)H(c,b.getPort());else if(d=!!b.path_){if("/"!=e.charAt(0))if(this.domain_&&!this.path_)e="/"+e;else{var f=c.getPath().lastIndexOf("/");-1!=f&&(e=c.getPath().substr(0,f+1)+e)}e=n.Uri.removeDotSegments(e)}d?c.setPath(e):d=""!==b.queryData_.toString();d?I(c,b.getQueryData().clone()):d=!!b.fragment_;d&&
K(c,b.getFragment());return c};n.Uri.prototype.clone=function(){return new n.Uri(this)};n.Uri.prototype.getScheme=function(){return this.scheme_};var E=function(b,c,d){L(b);b.scheme_=d?n.Uri.decodeOrEmpty_(c,!0):c;b.scheme_&&(b.scheme_=b.scheme_.replace(/:$/,""))};n.Uri.prototype.getUserInfo=function(){return this.userInfo_};var F=function(b,c,d){L(b);b.userInfo_=d?n.Uri.decodeOrEmpty_(c):c};n.Uri.prototype.getDomain=function(){return this.domain_};
var G=function(b,c,d){L(b);b.domain_=d?n.Uri.decodeOrEmpty_(c,!0):c};n.Uri.prototype.getPort=function(){return this.port_};var H=function(b,c){L(b);if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.port_=c}else b.port_=null};n.Uri.prototype.getPath=function(){return this.path_};n.Uri.prototype.setPath=function(b,c){L(this);this.path_=c?n.Uri.decodeOrEmpty_(b,!0):b;return this};
var I=function(b,c,d){L(b);c instanceof n.Uri.QueryData?(b.queryData_=c,b.queryData_.setIgnoreCase(b.ignoreCase_)):(d||(c=n.Uri.encodeSpecialChars_(c,n.Uri.reDisallowedInQuery_)),b.queryData_=new n.Uri.QueryData(c,0,b.ignoreCase_))};n.Uri.prototype.getQueryData=function(){return this.queryData_};var M=function(b,c,d){L(b);b.queryData_.set(c,d)};n.Uri.prototype.getFragment=function(){return this.fragment_};var K=function(b,c,d){L(b);b.fragment_=d?n.Uri.decodeOrEmpty_(c):c};
n.Uri.prototype.makeUnique=function(){L(this);M(this,n.Uri.RANDOM_PARAM,n.string.getRandomString());return this};n.Uri.prototype.removeParameter=function(b){L(this);this.queryData_.remove(b);return this};var L=function(b){if(b.isReadOnly_)throw Error("Tried to modify a read-only Uri");};n.Uri.prototype.setIgnoreCase=function(b){this.ignoreCase_=b;this.queryData_&&this.queryData_.setIgnoreCase(b);return this};n.Uri.parse=function(b,c){return b instanceof n.Uri?b.clone():new n.Uri(b,c)};
n.Uri.create=function(b,c,d,e,f,g,h,l){l=new n.Uri(null,l);b&&E(l,b);c&&F(l,c);d&&G(l,d);e&&H(l,e);f&&l.setPath(f);g&&I(l,g);h&&K(l,h);return l};n.Uri.resolve=function(b,c){b instanceof n.Uri||(b=n.Uri.parse(b));c instanceof n.Uri||(c=n.Uri.parse(c));return b.resolve(c)};
n.Uri.removeDotSegments=function(b){if(".."==b||"."==b)return"";if(n.string.contains(b,"./")||n.string.contains(b,"/.")){var c=n.string.startsWith(b,"/");b=b.split("/");for(var d=[],e=0;e<b.length;){var f=b[e++];"."==f?c&&e==b.length&&d.push(""):".."==f?((1<d.length||1==d.length&&""!=d[0])&&d.pop(),c&&e==b.length&&d.push("")):(d.push(f),c=!0)}return d.join("/")}return b};n.Uri.decodeOrEmpty_=function(b,c){return b?c?decodeURI(b.replace(/%25/g,"%2525")):decodeURIComponent(b):""};
n.Uri.encodeSpecialChars_=function(b,c,d){return n.isString(b)?(b=encodeURI(b).replace(c,n.Uri.encodeChar_),d&&(b=n.Uri.removeDoubleEncoding_(b)),b):null};n.Uri.encodeChar_=function(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)};n.Uri.removeDoubleEncoding_=function(b){return b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")};n.Uri.reDisallowedInSchemeOrUserInfo_=/[#\/\?@]/g;n.Uri.reDisallowedInRelativePath_=/[\#\?:]/g;n.Uri.reDisallowedInAbsolutePath_=/[\#\?]/g;
n.Uri.reDisallowedInQuery_=/[\#\?@]/g;n.Uri.reDisallowedInFragment_=/#/g;n.Uri.haveSameDomain=function(b,c){b=n.uri.utils.split(b);c=n.uri.utils.split(c);return b[n.uri.utils.ComponentIndex.DOMAIN]==c[n.uri.utils.ComponentIndex.DOMAIN]&&b[n.uri.utils.ComponentIndex.PORT]==c[n.uri.utils.ComponentIndex.PORT]};n.Uri.QueryData=function(b,c,d){this.count_=this.keyMap_=null;this.encodedQuery_=b||null;this.ignoreCase_=!!d};
var O=function(b){b.keyMap_||(b.keyMap_=new n.structs.Map,b.count_=0,b.encodedQuery_&&n.uri.utils.parseQueryData(b.encodedQuery_,function(c,d){b.add(n.string.urlDecode(c),d)}))};n.Uri.QueryData.createFromMap=function(b,c,d){c=n.structs.getKeys(b);if("undefined"==typeof c)throw Error("Keys are undefined");d=new n.Uri.QueryData(null,0,d);b=n.structs.getValues(b);for(var e=0;e<c.length;e++){var f=c[e],g=b[e];n.isArray(g)?P(d,f,g):d.add(f,g)}return d};
n.Uri.QueryData.createFromKeysValues=function(b,c,d,e){if(b.length!=c.length)throw Error("Mismatched lengths for keys/values");d=new n.Uri.QueryData(null,0,e);for(e=0;e<b.length;e++)d.add(b[e],c[e]);return d};a=n.Uri.QueryData.prototype;a.getCount=function(){O(this);return this.count_};a.add=function(b,c){O(this);this.encodedQuery_=null;b=Q(this,b);var d=this.keyMap_.get(b);d||this.keyMap_.set(b,d=[]);d.push(c);this.count_=n.asserts.assertNumber(this.count_)+1;return this};
a.remove=function(b){O(this);b=Q(this,b);return this.keyMap_.containsKey(b)?(this.encodedQuery_=null,this.count_=n.asserts.assertNumber(this.count_)-this.keyMap_.get(b).length,this.keyMap_.remove(b)):!1};a.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};a.isEmpty=function(){O(this);return 0==this.count_};a.containsKey=function(b){O(this);b=Q(this,b);return this.keyMap_.containsKey(b)};a.containsValue=function(b){var c=this.getValues();return n.array.contains(c,b)};
a.forEach=function(b,c){O(this);this.keyMap_.forEach(function(d,e){n.array.forEach(d,function(d){b.call(c,d,e,this)},this)},this)};a.getKeys=function(){O(this);for(var b=this.keyMap_.getValues(),c=this.keyMap_.getKeys(),d=[],e=0;e<c.length;e++)for(var f=b[e],g=0;g<f.length;g++)d.push(c[e]);return d};
a.getValues=function(b){O(this);var c=[];if(n.isString(b))this.containsKey(b)&&(c=n.array.concat(c,this.keyMap_.get(Q(this,b))));else{b=this.keyMap_.getValues();for(var d=0;d<b.length;d++)c=n.array.concat(c,b[d])}return c};a.set=function(b,c){O(this);this.encodedQuery_=null;b=Q(this,b);this.containsKey(b)&&(this.count_=n.asserts.assertNumber(this.count_)-this.keyMap_.get(b).length);this.keyMap_.set(b,[c]);this.count_=n.asserts.assertNumber(this.count_)+1;return this};
a.get=function(b,c){b=b?this.getValues(b):[];return n.Uri.preserveParameterTypesCompatibilityFlag?0<b.length?b[0]:c:0<b.length?String(b[0]):c};var P=function(b,c,d){b.remove(c);0<d.length&&(b.encodedQuery_=null,b.keyMap_.set(Q(b,c),n.array.clone(d)),b.count_=n.asserts.assertNumber(b.count_)+d.length)};
n.Uri.QueryData.prototype.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var b=[],c=this.keyMap_.getKeys(),d=0;d<c.length;d++){var e=c[d],f=n.string.urlEncode(e);e=this.getValues(e);for(var g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+n.string.urlEncode(e[g]));b.push(h)}}return this.encodedQuery_=b.join("&")};
n.Uri.QueryData.prototype.clone=function(){var b=new n.Uri.QueryData;b.encodedQuery_=this.encodedQuery_;this.keyMap_&&(b.keyMap_=this.keyMap_.clone(),b.count_=this.count_);return b};var Q=function(b,c){c=String(c);b.ignoreCase_&&(c=c.toLowerCase());return c};n.Uri.QueryData.prototype.setIgnoreCase=function(b){b&&!this.ignoreCase_&&(O(this),this.encodedQuery_=null,this.keyMap_.forEach(function(b,d){var c=d.toLowerCase();d!=c&&(this.remove(d),P(this,c,b))},this));this.ignoreCase_=b};
n.Uri.QueryData.prototype.extend=function(b){for(var c=0;c<arguments.length;c++)n.structs.forEach(arguments[c],function(b,c){this.add(c,b)},this)};q.Errors={};q.Errors.ErrorTypes={MINT_JWT_ERROR:"MINT_JWT_ERROR",PURCHASE_CANCELED:"PURCHASE_CANCELED",CONSUME_PURCHASE_ERROR:"CONSUME_PURCHASE_ERROR",GET_PURCHASES_ERROR:"GET_PURCHASES_ERROR",GET_SKU_DETAILS_ERROR:"GET_SKU_DETAILS_ERROR",ENV_NOT_SUPPORTED_ERROR:"ENV_NOT_SUPPORTED_ERROR",TOKEN_MISSING_ERROR:"TOKEN_MISSING_ERROR",INVALID_RESPONSE_ERROR:"INVALID_RESPONSE_ERROR"};q.Errors.getErrorResponse=function(b){return{request:{},response:{errorType:b}}};q.WebStoreService=function(b){this.baseUrl_=b||q.WebStoreService.Environment.SANDBOX;this.baseUrlAndPath_=this.baseUrl_+q.WebStoreService.WEB_STORE_REQUEST_PATH_};q.WebStoreService.Environment={PROD:"https://www.googleapis.com",SANDBOX:"https://www-googleapis-staging.sandbox.google.com"};q.WebStoreService.WEB_STORE_REQUEST_PATH_="/chromewebstore/v1.1";
var ba=function(b,c,d,e,f,g,h,l,m,p){var z=d?d:"",N=l||"application/x-www-form-urlencoded",aa=function(b,c){if(c&&200==b){b=null;try{b=JSON.parse(c)}catch(va){g(q.Errors.ErrorTypes.INVALID_RESPONSE_ERROR);return}f(b)}else g(q.Errors.ErrorTypes.INVALID_RESPONSE_ERROR)},ca=function(J){if(J){var r=new XMLHttpRequest;r.open(e,c);r.setRequestHeader("Authorization","Bearer "+J);r.setRequestHeader("Content-Type",N);r.onreadystatechange=function(){4==r.readyState&&(401==r.status&&J?chrome.identity.removeCachedAuthToken({token:J},
function(){h?ba(b,e,d,e,f,g,!1,l,m,p):(console.log(r),aa(r.status,r.responseText))}):(console.log(r),aa(r.status,r.responseText)))};r.send(z)}else g(q.Errors.ErrorTypes.TOKEN_MISSING_ERROR)};p?ca(p):chrome.identity.getAuthToken({interactive:m||!1},ca)};q.WebStoreService.prototype.onFailure_=function(b,c,d){b(q.Errors.getErrorResponse(d||c))};
var da=function(b,c,d,e,f,g,h,l){c={hl:window.navigator.language,itemId:c,sku:d,paymentVersion:1};h&&(c.gl=h);h=new n.Uri.QueryData;l&&h.add("projection",l);l=new n.Uri(b.baseUrlAndPath_+"/payments/buy");I(l,h);f=n.bind(b.onFailure_,b,f,q.Errors.ErrorTypes.MINT_JWT_ERROR);ba(b,l.toString(),JSON.stringify(c),"POST",function(b){e(b.jwt,b.paymentData,b.signature)},f,!0,"application/json",void 0,g)};n.dom.asserts={};n.dom.asserts.assertIsLocation=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.Location&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.Location||!(b instanceof c.Element)),"Argument is not a Location (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLAnchorElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLAnchorElement&&"undefined"!=typeof c.Location&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLAnchorElement||!(b instanceof c.Location||b instanceof c.Element)),"Argument is not a HTMLAnchorElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLLinkElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLLinkElement&&"undefined"!=typeof c.Location&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLLinkElement||!(b instanceof c.Location||b instanceof c.Element)),"Argument is not a HTMLLinkElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLImageElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLImageElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLImageElement||!(b instanceof c.Element)),"Argument is not a HTMLImageElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLEmbedElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLEmbedElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLEmbedElement||!(b instanceof c.Element)),"Argument is not a HTMLEmbedElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLFrameElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLFrameElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLFrameElement||!(b instanceof c.Element)),"Argument is not a HTMLFrameElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLIFrameElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLIFrameElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLIFrameElement||!(b instanceof c.Element)),"Argument is not a HTMLIFrameElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLObjectElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLObjectElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLObjectElement||!(b instanceof c.Element)),"Argument is not a HTMLObjectElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.assertIsHTMLScriptElement=function(b){if(n.asserts.ENABLE_ASSERTS){var c=n.dom.asserts.getWindow_(b);"undefined"!=typeof c.HTMLScriptElement&&"undefined"!=typeof c.Element&&n.asserts.assert(b&&(b instanceof c.HTMLScriptElement||!(b instanceof c.Element)),"Argument is not a HTMLScriptElement (or a non-Element mock); got: %s",n.dom.asserts.debugStringForType_(b))}};
n.dom.asserts.debugStringForType_=function(b){return n.isObject(b)?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):void 0===b?"undefined":null===b?"null":typeof b};n.dom.asserts.getWindow_=function(b){return(b=b&&b.ownerDocument)&&(b.defaultView||b.parentWindow)||n.global};n.dom.BrowserFeature={CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!n.userAgent.IE||n.userAgent.isDocumentModeOrHigher(9),CAN_USE_CHILDREN_ATTRIBUTE:!n.userAgent.GECKO&&!n.userAgent.IE||n.userAgent.IE&&n.userAgent.isDocumentModeOrHigher(9)||n.userAgent.GECKO&&n.userAgent.isVersionOrHigher("1.9.1"),CAN_USE_INNER_TEXT:n.userAgent.IE&&!n.userAgent.isVersionOrHigher("9"),CAN_USE_PARENT_ELEMENT_PROPERTY:n.userAgent.IE||n.userAgent.OPERA||n.userAgent.WEBKIT,INNER_HTML_NEEDS_SCOPED_ELEMENT:n.userAgent.IE,LEGACY_IE_RANGES:n.userAgent.IE&&
!n.userAgent.isDocumentModeOrHigher(9)};n.dom.HtmlElement=function(){};n.dom.TagName=function(b){this.tagName_=b};n.dom.TagName.prototype.toString=function(){return this.tagName_};n.dom.TagName.A=new n.dom.TagName("A");n.dom.TagName.ABBR=new n.dom.TagName("ABBR");n.dom.TagName.ACRONYM=new n.dom.TagName("ACRONYM");n.dom.TagName.ADDRESS=new n.dom.TagName("ADDRESS");n.dom.TagName.APPLET=new n.dom.TagName("APPLET");n.dom.TagName.AREA=new n.dom.TagName("AREA");n.dom.TagName.ARTICLE=new n.dom.TagName("ARTICLE");n.dom.TagName.ASIDE=new n.dom.TagName("ASIDE");
n.dom.TagName.AUDIO=new n.dom.TagName("AUDIO");n.dom.TagName.B=new n.dom.TagName("B");n.dom.TagName.BASE=new n.dom.TagName("BASE");n.dom.TagName.BASEFONT=new n.dom.TagName("BASEFONT");n.dom.TagName.BDI=new n.dom.TagName("BDI");n.dom.TagName.BDO=new n.dom.TagName("BDO");n.dom.TagName.BIG=new n.dom.TagName("BIG");n.dom.TagName.BLOCKQUOTE=new n.dom.TagName("BLOCKQUOTE");n.dom.TagName.BODY=new n.dom.TagName("BODY");n.dom.TagName.BR=new n.dom.TagName("BR");n.dom.TagName.BUTTON=new n.dom.TagName("BUTTON");
n.dom.TagName.CANVAS=new n.dom.TagName("CANVAS");n.dom.TagName.CAPTION=new n.dom.TagName("CAPTION");n.dom.TagName.CENTER=new n.dom.TagName("CENTER");n.dom.TagName.CITE=new n.dom.TagName("CITE");n.dom.TagName.CODE=new n.dom.TagName("CODE");n.dom.TagName.COL=new n.dom.TagName("COL");n.dom.TagName.COLGROUP=new n.dom.TagName("COLGROUP");n.dom.TagName.COMMAND=new n.dom.TagName("COMMAND");n.dom.TagName.DATA=new n.dom.TagName("DATA");n.dom.TagName.DATALIST=new n.dom.TagName("DATALIST");
n.dom.TagName.DD=new n.dom.TagName("DD");n.dom.TagName.DEL=new n.dom.TagName("DEL");n.dom.TagName.DETAILS=new n.dom.TagName("DETAILS");n.dom.TagName.DFN=new n.dom.TagName("DFN");n.dom.TagName.DIALOG=new n.dom.TagName("DIALOG");n.dom.TagName.DIR=new n.dom.TagName("DIR");n.dom.TagName.DIV=new n.dom.TagName("DIV");n.dom.TagName.DL=new n.dom.TagName("DL");n.dom.TagName.DT=new n.dom.TagName("DT");n.dom.TagName.EM=new n.dom.TagName("EM");n.dom.TagName.EMBED=new n.dom.TagName("EMBED");
n.dom.TagName.FIELDSET=new n.dom.TagName("FIELDSET");n.dom.TagName.FIGCAPTION=new n.dom.TagName("FIGCAPTION");n.dom.TagName.FIGURE=new n.dom.TagName("FIGURE");n.dom.TagName.FONT=new n.dom.TagName("FONT");n.dom.TagName.FOOTER=new n.dom.TagName("FOOTER");n.dom.TagName.FORM=new n.dom.TagName("FORM");n.dom.TagName.FRAME=new n.dom.TagName("FRAME");n.dom.TagName.FRAMESET=new n.dom.TagName("FRAMESET");n.dom.TagName.H1=new n.dom.TagName("H1");n.dom.TagName.H2=new n.dom.TagName("H2");n.dom.TagName.H3=new n.dom.TagName("H3");
n.dom.TagName.H4=new n.dom.TagName("H4");n.dom.TagName.H5=new n.dom.TagName("H5");n.dom.TagName.H6=new n.dom.TagName("H6");n.dom.TagName.HEAD=new n.dom.TagName("HEAD");n.dom.TagName.HEADER=new n.dom.TagName("HEADER");n.dom.TagName.HGROUP=new n.dom.TagName("HGROUP");n.dom.TagName.HR=new n.dom.TagName("HR");n.dom.TagName.HTML=new n.dom.TagName("HTML");n.dom.TagName.I=new n.dom.TagName("I");n.dom.TagName.IFRAME=new n.dom.TagName("IFRAME");n.dom.TagName.IMG=new n.dom.TagName("IMG");
n.dom.TagName.INPUT=new n.dom.TagName("INPUT");n.dom.TagName.INS=new n.dom.TagName("INS");n.dom.TagName.ISINDEX=new n.dom.TagName("ISINDEX");n.dom.TagName.KBD=new n.dom.TagName("KBD");n.dom.TagName.KEYGEN=new n.dom.TagName("KEYGEN");n.dom.TagName.LABEL=new n.dom.TagName("LABEL");n.dom.TagName.LEGEND=new n.dom.TagName("LEGEND");n.dom.TagName.LI=new n.dom.TagName("LI");n.dom.TagName.LINK=new n.dom.TagName("LINK");n.dom.TagName.MAP=new n.dom.TagName("MAP");n.dom.TagName.MARK=new n.dom.TagName("MARK");
n.dom.TagName.MATH=new n.dom.TagName("MATH");n.dom.TagName.MENU=new n.dom.TagName("MENU");n.dom.TagName.META=new n.dom.TagName("META");n.dom.TagName.METER=new n.dom.TagName("METER");n.dom.TagName.NAV=new n.dom.TagName("NAV");n.dom.TagName.NOFRAMES=new n.dom.TagName("NOFRAMES");n.dom.TagName.NOSCRIPT=new n.dom.TagName("NOSCRIPT");n.dom.TagName.OBJECT=new n.dom.TagName("OBJECT");n.dom.TagName.OL=new n.dom.TagName("OL");n.dom.TagName.OPTGROUP=new n.dom.TagName("OPTGROUP");n.dom.TagName.OPTION=new n.dom.TagName("OPTION");
n.dom.TagName.OUTPUT=new n.dom.TagName("OUTPUT");n.dom.TagName.P=new n.dom.TagName("P");n.dom.TagName.PARAM=new n.dom.TagName("PARAM");n.dom.TagName.PRE=new n.dom.TagName("PRE");n.dom.TagName.PROGRESS=new n.dom.TagName("PROGRESS");n.dom.TagName.Q=new n.dom.TagName("Q");n.dom.TagName.RP=new n.dom.TagName("RP");n.dom.TagName.RT=new n.dom.TagName("RT");n.dom.TagName.RUBY=new n.dom.TagName("RUBY");n.dom.TagName.S=new n.dom.TagName("S");n.dom.TagName.SAMP=new n.dom.TagName("SAMP");
n.dom.TagName.SCRIPT=new n.dom.TagName("SCRIPT");n.dom.TagName.SECTION=new n.dom.TagName("SECTION");n.dom.TagName.SELECT=new n.dom.TagName("SELECT");n.dom.TagName.SMALL=new n.dom.TagName("SMALL");n.dom.TagName.SOURCE=new n.dom.TagName("SOURCE");n.dom.TagName.SPAN=new n.dom.TagName("SPAN");n.dom.TagName.STRIKE=new n.dom.TagName("STRIKE");n.dom.TagName.STRONG=new n.dom.TagName("STRONG");n.dom.TagName.STYLE=new n.dom.TagName("STYLE");n.dom.TagName.SUB=new n.dom.TagName("SUB");n.dom.TagName.SUMMARY=new n.dom.TagName("SUMMARY");
n.dom.TagName.SUP=new n.dom.TagName("SUP");n.dom.TagName.SVG=new n.dom.TagName("SVG");n.dom.TagName.TABLE=new n.dom.TagName("TABLE");n.dom.TagName.TBODY=new n.dom.TagName("TBODY");n.dom.TagName.TD=new n.dom.TagName("TD");n.dom.TagName.TEMPLATE=new n.dom.TagName("TEMPLATE");n.dom.TagName.TEXTAREA=new n.dom.TagName("TEXTAREA");n.dom.TagName.TFOOT=new n.dom.TagName("TFOOT");n.dom.TagName.TH=new n.dom.TagName("TH");n.dom.TagName.THEAD=new n.dom.TagName("THEAD");n.dom.TagName.TIME=new n.dom.TagName("TIME");
n.dom.TagName.TITLE=new n.dom.TagName("TITLE");n.dom.TagName.TR=new n.dom.TagName("TR");n.dom.TagName.TRACK=new n.dom.TagName("TRACK");n.dom.TagName.TT=new n.dom.TagName("TT");n.dom.TagName.U=new n.dom.TagName("U");n.dom.TagName.UL=new n.dom.TagName("UL");n.dom.TagName.VAR=new n.dom.TagName("VAR");n.dom.TagName.VIDEO=new n.dom.TagName("VIDEO");n.dom.TagName.WBR=new n.dom.TagName("WBR");n.dom.tags={};n.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};n.dom.tags.isVoidTag=function(b){return!0===n.dom.tags.VOID_TAGS_[b]};n.string.TypedString=function(){};n.string.Const=function(){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_="";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=n.string.Const.TYPE_MARKER_};n.string.Const.prototype.implementsGoogStringTypedString=!0;n.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
n.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"};n.string.Const.unwrap=function(b){if(b instanceof n.string.Const&&b.constructor===n.string.Const&&b.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===n.string.Const.TYPE_MARKER_)return b.stringConstValueWithSecurityContract__googStringSecurityPrivate_;n.asserts.fail("expected object of type Const, got '"+b+"'");return"type_error:Const"};
n.string.Const.from=function(b){return n.string.Const.create__googStringSecurityPrivate_(b)};n.string.Const.TYPE_MARKER_={};n.string.Const.create__googStringSecurityPrivate_=function(b){var c=new n.string.Const;c.stringConstValueWithSecurityContract__googStringSecurityPrivate_=b;return c};n.string.Const.EMPTY=n.string.Const.from("");n.html={};n.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="";this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};n.html.SafeScript.prototype.implementsGoogStringTypedString=!0;n.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};n.html.SafeScript.fromConstant=function(b){b=n.string.Const.unwrap(b);return 0===b.length?n.html.SafeScript.EMPTY:n.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
n.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_};n.DEBUG&&(n.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"});
n.html.SafeScript.unwrap=function(b){if(b instanceof n.html.SafeScript&&b.constructor===n.html.SafeScript&&b.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeScriptWrappedValue_;n.asserts.fail("expected object of type SafeScript, got '"+b+"' of type "+n.typeOf(b));return"type_error:SafeScript"};n.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(b){return(new n.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(b)};
n.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeScriptWrappedValue_=b;return this};n.html.SafeScript.EMPTY=n.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");n.fs={};n.fs.url={};n.fs.url.createObjectUrl=function(b){return n.fs.url.getUrlObject_().createObjectURL(b)};n.fs.url.revokeObjectUrl=function(b){n.fs.url.getUrlObject_().revokeObjectURL(b)};n.fs.url.getUrlObject_=function(){var b=n.fs.url.findUrlObject_();if(null!=b)return b;throw Error("This browser doesn't seem to support blob URLs");};
n.fs.url.findUrlObject_=function(){return n.isDef(n.global.URL)&&n.isDef(n.global.URL.createObjectURL)?n.global.URL:n.isDef(n.global.webkitURL)&&n.isDef(n.global.webkitURL.createObjectURL)?n.global.webkitURL:n.isDef(n.global.createObjectURL)?n.global:null};n.fs.url.browserSupportsObjectUrls=function(){return null!=n.fs.url.findUrlObject_()};n.i18n={};n.i18n.bidi={};n.i18n.bidi.FORCE_RTL=!1;
n.i18n.bidi.IS_RTL=n.i18n.bidi.FORCE_RTL||("ar"==n.LOCALE.substring(0,2).toLowerCase()||"fa"==n.LOCALE.substring(0,2).toLowerCase()||"he"==n.LOCALE.substring(0,2).toLowerCase()||"iw"==n.LOCALE.substring(0,2).toLowerCase()||"ps"==n.LOCALE.substring(0,2).toLowerCase()||"sd"==n.LOCALE.substring(0,2).toLowerCase()||"ug"==n.LOCALE.substring(0,2).toLowerCase()||"ur"==n.LOCALE.substring(0,2).toLowerCase()||"yi"==n.LOCALE.substring(0,2).toLowerCase())&&(2==n.LOCALE.length||"-"==n.LOCALE.substring(2,3)||"_"==
n.LOCALE.substring(2,3))||3<=n.LOCALE.length&&"ckb"==n.LOCALE.substring(0,3).toLowerCase()&&(3==n.LOCALE.length||"-"==n.LOCALE.substring(3,4)||"_"==n.LOCALE.substring(3,4));n.i18n.bidi.Format={LRE:"\u202a",RLE:"\u202b",PDF:"\u202c",LRM:"\u200e",RLM:"\u200f"};n.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0};n.i18n.bidi.RIGHT="right";n.i18n.bidi.LEFT="left";n.i18n.bidi.I18N_RIGHT=n.i18n.bidi.IS_RTL?n.i18n.bidi.LEFT:n.i18n.bidi.RIGHT;n.i18n.bidi.I18N_LEFT=n.i18n.bidi.IS_RTL?n.i18n.bidi.RIGHT:n.i18n.bidi.LEFT;
n.i18n.bidi.toDir=function(b){return"number"==typeof b?0<b?n.i18n.bidi.Dir.LTR:0>b?n.i18n.bidi.Dir.RTL:n.i18n.bidi.Dir.NEUTRAL:null==b?null:b?n.i18n.bidi.Dir.RTL:n.i18n.bidi.Dir.LTR};n.i18n.bidi.ltrChars_="A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";n.i18n.bidi.rtlChars_="\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";n.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g;
n.i18n.bidi.stripHtmlIfNeeded_=function(b,c){return c?b.replace(n.i18n.bidi.htmlSkipReg_,""):b};n.i18n.bidi.rtlCharReg_=new RegExp("["+n.i18n.bidi.rtlChars_+"]");n.i18n.bidi.ltrCharReg_=new RegExp("["+n.i18n.bidi.ltrChars_+"]");n.i18n.bidi.hasAnyRtl=function(b,c){return n.i18n.bidi.rtlCharReg_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,c))};n.i18n.bidi.hasRtlChar=n.i18n.bidi.hasAnyRtl;n.i18n.bidi.hasAnyLtr=function(b){return n.i18n.bidi.ltrCharReg_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,void 0))};
n.i18n.bidi.ltrRe_=new RegExp("^["+n.i18n.bidi.ltrChars_+"]");n.i18n.bidi.rtlRe_=new RegExp("^["+n.i18n.bidi.rtlChars_+"]");n.i18n.bidi.isRtlChar=function(b){return n.i18n.bidi.rtlRe_.test(b)};n.i18n.bidi.isLtrChar=function(b){return n.i18n.bidi.ltrRe_.test(b)};n.i18n.bidi.isNeutralChar=function(b){return!n.i18n.bidi.isLtrChar(b)&&!n.i18n.bidi.isRtlChar(b)};n.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+n.i18n.bidi.rtlChars_+"]*["+n.i18n.bidi.ltrChars_+"]");
n.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+n.i18n.bidi.ltrChars_+"]*["+n.i18n.bidi.rtlChars_+"]");n.i18n.bidi.startsWithRtl=function(b,c){return n.i18n.bidi.rtlDirCheckRe_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,c))};n.i18n.bidi.isRtlText=n.i18n.bidi.startsWithRtl;n.i18n.bidi.startsWithLtr=function(b,c){return n.i18n.bidi.ltrDirCheckRe_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,c))};n.i18n.bidi.isLtrText=n.i18n.bidi.startsWithLtr;n.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/;
n.i18n.bidi.isNeutralText=function(b,c){b=n.i18n.bidi.stripHtmlIfNeeded_(b,c);return n.i18n.bidi.isRequiredLtrRe_.test(b)||!n.i18n.bidi.hasAnyLtr(b)&&!n.i18n.bidi.hasAnyRtl(b)};n.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+n.i18n.bidi.ltrChars_+"][^"+n.i18n.bidi.rtlChars_+"]*$");n.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+n.i18n.bidi.rtlChars_+"][^"+n.i18n.bidi.ltrChars_+"]*$");n.i18n.bidi.endsWithLtr=function(b,c){return n.i18n.bidi.ltrExitDirCheckRe_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,c))};
n.i18n.bidi.isLtrExitText=n.i18n.bidi.endsWithLtr;n.i18n.bidi.endsWithRtl=function(b,c){return n.i18n.bidi.rtlExitDirCheckRe_.test(n.i18n.bidi.stripHtmlIfNeeded_(b,c))};n.i18n.bidi.isRtlExitText=n.i18n.bidi.endsWithRtl;n.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;n.i18n.bidi.isRtlLanguage=function(b){return n.i18n.bidi.rtlLocalesRe_.test(b)};n.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
n.i18n.bidi.guardBracketInText=function(b,c){c=(void 0===c?n.i18n.bidi.hasAnyRtl(b):c)?n.i18n.bidi.Format.RLM:n.i18n.bidi.Format.LRM;return b.replace(n.i18n.bidi.bracketGuardTextRe_,c+"$&"+c)};n.i18n.bidi.enforceRtlInHtml=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+b+"</span>"};n.i18n.bidi.enforceRtlInText=function(b){return n.i18n.bidi.Format.RLE+b+n.i18n.bidi.Format.PDF};
n.i18n.bidi.enforceLtrInHtml=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+b+"</span>"};n.i18n.bidi.enforceLtrInText=function(b){return n.i18n.bidi.Format.LRE+b+n.i18n.bidi.Format.PDF};n.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;n.i18n.bidi.leftRe_=/left/gi;n.i18n.bidi.rightRe_=/right/gi;n.i18n.bidi.tempRe_=/%%%%/g;
n.i18n.bidi.mirrorCSS=function(b){return b.replace(n.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(n.i18n.bidi.leftRe_,"%%%%").replace(n.i18n.bidi.rightRe_,n.i18n.bidi.LEFT).replace(n.i18n.bidi.tempRe_,n.i18n.bidi.RIGHT)};n.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g;n.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g;n.i18n.bidi.normalizeHebrewQuote=function(b){return b.replace(n.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05f4").replace(n.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05f3")};
n.i18n.bidi.wordSeparatorRe_=/\s+/;n.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/;n.i18n.bidi.rtlDetectionThreshold_=.4;
n.i18n.bidi.estimateDirection=function(b,c){var d=0,e=0,f=!1;b=n.i18n.bidi.stripHtmlIfNeeded_(b,c).split(n.i18n.bidi.wordSeparatorRe_);for(c=0;c<b.length;c++){var g=b[c];n.i18n.bidi.startsWithRtl(g)?(d++,e++):n.i18n.bidi.isRequiredLtrRe_.test(g)?f=!0:n.i18n.bidi.hasAnyLtr(g)?e++:n.i18n.bidi.hasNumeralsRe_.test(g)&&(f=!0)}return 0==e?f?n.i18n.bidi.Dir.LTR:n.i18n.bidi.Dir.NEUTRAL:d/e>n.i18n.bidi.rtlDetectionThreshold_?n.i18n.bidi.Dir.RTL:n.i18n.bidi.Dir.LTR};
n.i18n.bidi.detectRtlDirectionality=function(b,c){return n.i18n.bidi.estimateDirection(b,c)==n.i18n.bidi.Dir.RTL};n.i18n.bidi.setElementDirAndAlign=function(b,c){b&&(c=n.i18n.bidi.toDir(c))&&(b.style.textAlign=c==n.i18n.bidi.Dir.RTL?n.i18n.bidi.RIGHT:n.i18n.bidi.LEFT,b.dir=c==n.i18n.bidi.Dir.RTL?"rtl":"ltr")};n.i18n.bidi.setElementDirByTextDirectionality=function(b,c){switch(n.i18n.bidi.estimateDirection(c)){case n.i18n.bidi.Dir.LTR:b.dir="ltr";break;case n.i18n.bidi.Dir.RTL:b.dir="rtl";break;default:b.removeAttribute("dir")}};
n.i18n.bidi.DirectionalString=function(){};n.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="";this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};n.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0;n.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_};
n.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;n.html.TrustedResourceUrl.prototype.getDirection=function(){return n.i18n.bidi.Dir.LTR};n.DEBUG&&(n.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"});
n.html.TrustedResourceUrl.unwrap=function(b){if(b instanceof n.html.TrustedResourceUrl&&b.constructor===n.html.TrustedResourceUrl&&b.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;n.asserts.fail("expected object of type TrustedResourceUrl, got '"+b+"' of type "+n.typeOf(b));return"type_error:TrustedResourceUrl"};
n.html.TrustedResourceUrl.format=function(b,c){b=n.html.TrustedResourceUrl.format_(b,c);return n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};
n.html.TrustedResourceUrl.format_=function(b,c){var d=n.string.Const.unwrap(b);if(!n.html.TrustedResourceUrl.BASE_URL_.test(d))throw Error("Invalid TrustedResourceUrl format: "+d);return d.replace(n.html.TrustedResourceUrl.FORMAT_MARKER_,function(b,f){if(!Object.prototype.hasOwnProperty.call(c,f))throw Error('Found marker, "'+f+'", in format string, "'+d+'", but no valid label mapping found in args: '+JSON.stringify(c));b=c[f];return b instanceof n.string.Const?n.string.Const.unwrap(b):encodeURIComponent(String(b))})};
n.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g;n.html.TrustedResourceUrl.BASE_URL_=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank(#|$)/i;n.html.TrustedResourceUrl.formatWithParams=function(b,c,d){b=n.html.TrustedResourceUrl.format_(b,c);c=/\?/.test(b)?"&":"?";for(var e in d)for(var f=n.isArray(d[e])?d[e]:[d[e]],g=0;g<f.length;g++)null!=f[g]&&(b+=c+encodeURIComponent(e)+"="+encodeURIComponent(String(f[g])),c="&");return n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};
n.html.TrustedResourceUrl.fromConstant=function(b){return n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(n.string.Const.unwrap(b))};n.html.TrustedResourceUrl.fromConstants=function(b){for(var c="",d=0;d<b.length;d++)c+=n.string.Const.unwrap(b[d]);return n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c)};n.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(b){var c=new n.html.TrustedResourceUrl;c.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=b;return c};n.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};n.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez";n.html.SafeUrl.prototype.implementsGoogStringTypedString=!0;n.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_};n.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;
n.html.SafeUrl.prototype.getDirection=function(){return n.i18n.bidi.Dir.LTR};n.DEBUG&&(n.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});
n.html.SafeUrl.unwrap=function(b){if(b instanceof n.html.SafeUrl&&b.constructor===n.html.SafeUrl&&b.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeHtmlWrappedValue_;n.asserts.fail("expected object of type SafeUrl, got '"+b+"' of type "+n.typeOf(b));return"type_error:SafeUrl"};n.html.SafeUrl.fromConstant=function(b){return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(n.string.Const.unwrap(b))};
n.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp|3gpp2|aac|midi|mp4|mpeg|ogg|x-m4a|x-wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|text\/csv|video\/(?:mpeg|mp4|ogg|webm))$/i;n.html.SafeUrl.fromBlob=function(b){b=n.html.SAFE_MIME_TYPE_PATTERN_.test(b.type)?n.fs.url.createObjectUrl(b):n.html.SafeUrl.INNOCUOUS_STRING;return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};n.html.DATA_URL_PATTERN_=/^data:([^;,]*);base64,[a-z0-9+\/]+=*$/i;
n.html.SafeUrl.fromDataUrl=function(b){var c=b.match(n.html.DATA_URL_PATTERN_);c=c&&n.html.SAFE_MIME_TYPE_PATTERN_.test(c[1]);return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(c?b:n.html.SafeUrl.INNOCUOUS_STRING)};n.html.SafeUrl.fromTelUrl=function(b){n.string.caseInsensitiveStartsWith(b)||(b=n.html.SafeUrl.INNOCUOUS_STRING);return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};n.html.SafeUrl.fromTrustedResourceUrl=function(b){return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(n.html.TrustedResourceUrl.unwrap(b))};
n.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;n.html.SafeUrl.sanitize=function(b){if(b instanceof n.html.SafeUrl)return b;b=b.implementsGoogStringTypedString?b.getTypedStringValue():String(b);n.html.SAFE_URL_PATTERN_.test(b)||(b=n.html.SafeUrl.INNOCUOUS_STRING);return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};
n.html.SafeUrl.sanitizeAssertUnchanged=function(b){if(b instanceof n.html.SafeUrl)return b;b=b.implementsGoogStringTypedString?b.getTypedStringValue():String(b);n.asserts.assert(n.html.SAFE_URL_PATTERN_.test(b))||(b=n.html.SafeUrl.INNOCUOUS_STRING);return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};n.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(b){var c=new n.html.SafeUrl;c.privateDoNotAccessOrElseSafeHtmlWrappedValue_=b;return c};n.html.SafeUrl.ABOUT_BLANK=n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");n.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="";this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};n.html.SafeStyle.prototype.implementsGoogStringTypedString=!0;n.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
n.html.SafeStyle.fromConstant=function(b){b=n.string.Const.unwrap(b);if(0===b.length)return n.html.SafeStyle.EMPTY;n.html.SafeStyle.checkStyle_(b);n.asserts.assert(n.string.endsWith(b,";"),"Last character of style string is not ';': "+b);n.asserts.assert(n.string.contains(b,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+b);return n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
n.html.SafeStyle.checkStyle_=function(b){n.asserts.assert(!/[<>]/.test(b),"Forbidden characters in style string: "+b)};n.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};n.DEBUG&&(n.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"});
n.html.SafeStyle.unwrap=function(b){if(b instanceof n.html.SafeStyle&&b.constructor===n.html.SafeStyle&&b.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeStyleWrappedValue_;n.asserts.fail("expected object of type SafeStyle, got '"+b+"' of type "+n.typeOf(b));return"type_error:SafeStyle"};n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(b){return(new n.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(b)};
n.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=b;return this};n.html.SafeStyle.EMPTY=n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");n.html.SafeStyle.INNOCUOUS_STRING="zClosurez";
n.html.SafeStyle.create=function(b){var c="",d;for(d in b){if(!/^[-_a-zA-Z0-9]+$/.test(d))throw Error("Name allows only [-_a-zA-Z0-9], got: "+d);var e=b[d];null!=e&&(e=n.isArray(e)?n.array.map(e,n.html.SafeStyle.sanitizePropertyValue_).join(" "):n.html.SafeStyle.sanitizePropertyValue_(e),c+=d+":"+e+";")}if(!c)return n.html.SafeStyle.EMPTY;n.html.SafeStyle.checkStyle_(c);return n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c)};
n.html.SafeStyle.sanitizePropertyValue_=function(b){if(b instanceof n.html.SafeUrl)return'url("'+n.html.SafeUrl.unwrap(b).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';b=b instanceof n.string.Const?n.string.Const.unwrap(b):n.html.SafeStyle.sanitizePropertyValueString_(String(b));n.asserts.assert(!/[{;}]/.test(b),"Value does not allow [{;}].");return b};
n.html.SafeStyle.sanitizePropertyValueString_=function(b){var c=b.replace(n.html.SafeUrl.FUNCTIONS_RE_,"$1").replace(n.html.SafeUrl.URL_RE_,"url");return n.html.SafeStyle.VALUE_RE_.test(c)?n.html.SafeStyle.hasBalancedQuotes_(b)?n.html.SafeStyle.sanitizeUrl_(b):(n.asserts.fail("String value requires balanced quotes, got: "+b),n.html.SafeStyle.INNOCUOUS_STRING):(n.asserts.fail("String value allows only "+n.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+b),n.html.SafeStyle.INNOCUOUS_STRING)};
n.html.SafeStyle.hasBalancedQuotes_=function(b){for(var c=!0,d=!0,e=0;e<b.length;e++){var f=b.charAt(e);"'"==f&&d?c=!c:'"'==f&&c&&(d=!d)}return c&&d};n.html.SafeStyle.VALUE_ALLOWED_CHARS_="[-,.\"'%_!# a-zA-Z0-9]";n.html.SafeStyle.VALUE_RE_=new RegExp("^"+n.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$");n.html.SafeUrl.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;n.html.SafeUrl.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|(rotate|scale|translate)(X|Y|Z|3d)?)\([-0-9a-z.%, ]+\)/g;
n.html.SafeStyle.sanitizeUrl_=function(b){return b.replace(n.html.SafeUrl.URL_RE_,function(b,d,e,f){var c="";e=e.replace(/^(['"])(.*)\1$/,function(b,d,e){c=d;return e});b=n.html.SafeUrl.sanitize(e).getTypedStringValue();return d+c+b+c+f})};n.html.SafeStyle.concat=function(b){var c="",d=function(b){n.isArray(b)?n.array.forEach(b,d):c+=n.html.SafeStyle.unwrap(b)};n.array.forEach(arguments,d);return c?n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c):n.html.SafeStyle.EMPTY};n.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="";this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};n.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0;n.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
n.html.SafeStyleSheet.createRule=function(b,c){if(n.string.contains(b,"<"))throw Error("Selector does not allow '<', got: "+b);var d=b.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(d))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+b);if(!n.html.SafeStyleSheet.hasBalancedBrackets_(d))throw Error("() and [] in selector must be balanced, got: "+b);c instanceof n.html.SafeStyle||(c=n.html.SafeStyle.create(c));
b=b+"{"+n.html.SafeStyle.unwrap(c)+"}";return n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};n.html.SafeStyleSheet.hasBalancedBrackets_=function(b){for(var c={"(":")","[":"]"},d=[],e=0;e<b.length;e++){var f=b[e];if(c[f])d.push(c[f]);else if(n.object.contains(c,f)&&d.pop()!=f)return!1}return 0==d.length};n.html.SafeStyleSheet.concat=function(b){var c="",d=function(b){n.isArray(b)?n.array.forEach(b,d):c+=n.html.SafeStyleSheet.unwrap(b)};n.array.forEach(arguments,d);return n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(c)};
n.html.SafeStyleSheet.fromConstant=function(b){b=n.string.Const.unwrap(b);if(0===b.length)return n.html.SafeStyleSheet.EMPTY;n.asserts.assert(!n.string.contains(b,"<"),"Forbidden '<' character in style sheet string: "+b);return n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};n.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_};
n.DEBUG&&(n.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"});
n.html.SafeStyleSheet.unwrap=function(b){if(b instanceof n.html.SafeStyleSheet&&b.constructor===n.html.SafeStyleSheet&&b.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;n.asserts.fail("expected object of type SafeStyleSheet, got '"+b+"' of type "+n.typeOf(b));return"type_error:SafeStyleSheet"};
n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(b){return(new n.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(b)};n.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=b;return this};n.html.SafeStyleSheet.EMPTY=n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");n.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=n.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;this.dir_=null};n.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0;n.html.SafeHtml.prototype.getDirection=function(){return this.dir_};n.html.SafeHtml.prototype.implementsGoogStringTypedString=!0;n.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_};
n.DEBUG&&(n.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});n.html.SafeHtml.unwrap=function(b){if(b instanceof n.html.SafeHtml&&b.constructor===n.html.SafeHtml&&b.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===n.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return b.privateDoNotAccessOrElseSafeHtmlWrappedValue_;n.asserts.fail("expected object of type SafeHtml, got '"+b+"' of type "+n.typeOf(b));return"type_error:SafeHtml"};
n.html.SafeHtml.htmlEscape=function(b){if(b instanceof n.html.SafeHtml)return b;var c=null;b.implementsGoogI18nBidiDirectionalString&&(c=b.getDirection());return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.string.htmlEscape(b.implementsGoogStringTypedString?b.getTypedStringValue():String(b)),c)};
n.html.SafeHtml.htmlEscapePreservingNewlines=function(b){if(b instanceof n.html.SafeHtml)return b;b=n.html.SafeHtml.htmlEscape(b);return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.string.newLineToBr(n.html.SafeHtml.unwrap(b)),b.getDirection())};
n.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(b){if(b instanceof n.html.SafeHtml)return b;b=n.html.SafeHtml.htmlEscape(b);return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.string.whitespaceEscape(n.html.SafeHtml.unwrap(b)),b.getDirection())};n.html.SafeHtml.from=n.html.SafeHtml.htmlEscape;n.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/;n.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0};
n.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};n.html.SafeHtml.create=function(b,c,d){n.html.SafeHtml.verifyTagName(String(b));return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(b),c,d)};
n.html.SafeHtml.verifyTagName=function(b){if(!n.html.SafeHtml.VALID_NAMES_IN_TAG_.test(b))throw Error("Invalid tag name <"+b+">.");if(b.toUpperCase()in n.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+b+"> is not allowed for SafeHtml.");};
n.html.SafeHtml.createIframe=function(b,c,d,e){b&&n.html.TrustedResourceUrl.unwrap(b);var f={};f.src=b||null;f.srcdoc=c&&n.html.SafeHtml.unwrap(c);b=n.html.SafeHtml.combineAttributes(f,{sandbox:""},d);return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",b,e)};
n.html.SafeHtml.createSandboxIframe=function(b,c,d,e){if(!n.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var f={};f.src=b?n.html.SafeUrl.unwrap(n.html.SafeUrl.sanitize(b)):null;f.srcdoc=c||null;f.sandbox="";b=n.html.SafeHtml.combineAttributes(f,{},d);return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",b,e)};n.html.SafeHtml.canUseSandboxIframe=function(){return n.global.HTMLIFrameElement&&"sandbox"in n.global.HTMLIFrameElement.prototype};
n.html.SafeHtml.createScriptSrc=function(b,c){n.html.TrustedResourceUrl.unwrap(b);b=n.html.SafeHtml.combineAttributes({src:b},{},c);return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",b)};
n.html.SafeHtml.createScript=function(b,c){for(var d in c){var e=d.toLowerCase();if("language"==e||"src"==e||"text"==e||"type"==e)throw Error('Cannot set "'+e+'" attribute');}d="";b=n.array.concat(b);for(e=0;e<b.length;e++)d+=n.html.SafeScript.unwrap(b[e]);b=n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,n.i18n.bidi.Dir.NEUTRAL);return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",c,b)};
n.html.SafeHtml.createStyle=function(b,c){c=n.html.SafeHtml.combineAttributes({type:"text/css"},{},c);var d="";b=n.array.concat(b);for(var e=0;e<b.length;e++)d+=n.html.SafeStyleSheet.unwrap(b[e]);b=n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,n.i18n.bidi.Dir.NEUTRAL);return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",c,b)};
n.html.SafeHtml.createMetaRefresh=function(b,c){b=n.html.SafeUrl.unwrap(n.html.SafeUrl.sanitize(b));(n.labs.userAgent.browser.isIE()||n.labs.userAgent.browser.isEdge())&&n.string.contains(b,";")&&(b="'"+b.replace(/'/g,"%27")+"'");return n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(c||0)+"; url="+b})};
n.html.SafeHtml.getAttrNameAndValue_=function(b,c,d){if(d instanceof n.string.Const)d=n.string.Const.unwrap(d);else if("style"==c.toLowerCase())d=n.html.SafeHtml.getStyleValue_(d);else{if(/^on/i.test(c))throw Error('Attribute "'+c+'" requires goog.string.Const value, "'+d+'" given.');if(c.toLowerCase()in n.html.SafeHtml.URL_ATTRIBUTES_)if(d instanceof n.html.TrustedResourceUrl)d=n.html.TrustedResourceUrl.unwrap(d);else if(d instanceof n.html.SafeUrl)d=n.html.SafeUrl.unwrap(d);else if(n.isString(d))d=
n.html.SafeUrl.sanitize(d).getTypedStringValue();else throw Error('Attribute "'+c+'" on tag "'+b+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+d+'" given.');}d.implementsGoogStringTypedString&&(d=d.getTypedStringValue());n.asserts.assert(n.isString(d)||n.isNumber(d),"String or number value expected, got "+typeof d+" with value: "+d);return c+'="'+n.string.htmlEscape(String(d))+'"'};
n.html.SafeHtml.getStyleValue_=function(b){if(!n.isObject(b))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof b+" given: "+b);b instanceof n.html.SafeStyle||(b=n.html.SafeStyle.create(b));return n.html.SafeStyle.unwrap(b)};n.html.SafeHtml.createWithDir=function(b,c,d,e){c=n.html.SafeHtml.create(c,d,e);c.dir_=b;return c};
n.html.SafeHtml.concat=function(b){var c=n.i18n.bidi.Dir.NEUTRAL,d="",e=function(b){n.isArray(b)?n.array.forEach(b,e):(b=n.html.SafeHtml.htmlEscape(b),d+=n.html.SafeHtml.unwrap(b),b=b.getDirection(),c==n.i18n.bidi.Dir.NEUTRAL?c=b:b!=n.i18n.bidi.Dir.NEUTRAL&&c!=b&&(c=null))};n.array.forEach(arguments,e);return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d,c)};n.html.SafeHtml.concatWithDir=function(b,c){var d=n.html.SafeHtml.concat(n.array.slice(arguments,1));d.dir_=b;return d};
n.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(b,c){return(new n.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(b,c)};n.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(b,c){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=b;this.dir_=c;return this};
n.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(b,c,d){var e=null;var f="<"+b+n.html.SafeHtml.stringifyAttributes(b,c);n.isDefAndNotNull(d)?n.isArray(d)||(d=[d]):d=[];n.dom.tags.isVoidTag(b.toLowerCase())?(n.asserts.assert(!d.length,"Void tag <"+b+"> does not allow content."),f+=">"):(e=n.html.SafeHtml.concat(d),f+=">"+n.html.SafeHtml.unwrap(e)+"</"+b+">",e=e.getDirection());(b=c&&c.dir)&&(e=/^(ltr|rtl|auto)$/i.test(b)?n.i18n.bidi.Dir.NEUTRAL:null);return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(f,
e)};n.html.SafeHtml.stringifyAttributes=function(b,c){var d="";if(c)for(var e in c){if(!n.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error('Invalid attribute name "'+e+'".');var f=c[e];n.isDefAndNotNull(f)&&(d+=" "+n.html.SafeHtml.getAttrNameAndValue_(b,e,f))}return d};
n.html.SafeHtml.combineAttributes=function(b,c,d){var e={},f;for(f in b)n.asserts.assert(f.toLowerCase()==f,"Must be lower case"),e[f]=b[f];for(f in c)n.asserts.assert(f.toLowerCase()==f,"Must be lower case"),e[f]=c[f];for(f in d){var g=f.toLowerCase();if(g in b)throw Error('Cannot override "'+g+'" attribute, got "'+f+'" with value "'+d[f]+'"');g in c&&delete e[g];e[f]=d[f]}return e};n.html.SafeHtml.DOCTYPE_HTML=n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",n.i18n.bidi.Dir.NEUTRAL);
n.html.SafeHtml.EMPTY=n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",n.i18n.bidi.Dir.NEUTRAL);n.html.SafeHtml.BR=n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",n.i18n.bidi.Dir.NEUTRAL);n.dom.safe={};n.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"};n.dom.safe.insertAdjacentHtml=function(b,c,d){b.insertAdjacentHTML(c,n.html.SafeHtml.unwrap(d))};n.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};
n.dom.safe.setInnerHtml=function(b,c){if(n.asserts.ENABLE_ASSERTS&&n.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[b.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+b.tagName+".");b.innerHTML=n.html.SafeHtml.unwrap(c)};n.dom.safe.setOuterHtml=function(b,c){b.outerHTML=n.html.SafeHtml.unwrap(c)};n.dom.safe.setStyle=function(b,c){b.style.cssText=n.html.SafeStyle.unwrap(c)};n.dom.safe.documentWrite=function(b,c){b.write(n.html.SafeHtml.unwrap(c))};
n.dom.safe.setAnchorHref=function(b,c){n.dom.asserts.assertIsHTMLAnchorElement(b);c=c instanceof n.html.SafeUrl?c:n.html.SafeUrl.sanitizeAssertUnchanged(c);b.href=n.html.SafeUrl.unwrap(c)};n.dom.safe.setImageSrc=function(b,c){n.dom.asserts.assertIsHTMLImageElement(b);c=c instanceof n.html.SafeUrl?c:n.html.SafeUrl.sanitizeAssertUnchanged(c);b.src=n.html.SafeUrl.unwrap(c)};n.dom.safe.setEmbedSrc=function(b,c){n.dom.asserts.assertIsHTMLEmbedElement(b);b.src=n.html.TrustedResourceUrl.unwrap(c)};
n.dom.safe.setFrameSrc=function(b,c){n.dom.asserts.assertIsHTMLFrameElement(b);b.src=n.html.TrustedResourceUrl.unwrap(c)};n.dom.safe.setIframeSrc=function(b,c){n.dom.asserts.assertIsHTMLIFrameElement(b);b.src=n.html.TrustedResourceUrl.unwrap(c)};n.dom.safe.setIframeSrcdoc=function(b,c){n.dom.asserts.assertIsHTMLIFrameElement(b);b.srcdoc=n.html.SafeHtml.unwrap(c)};
n.dom.safe.setLinkHrefAndRel=function(b,c,d){n.dom.asserts.assertIsHTMLLinkElement(b);b.rel=d;n.string.caseInsensitiveContains(d,"stylesheet")?(n.asserts.assert(c instanceof n.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),b.href=n.html.TrustedResourceUrl.unwrap(c)):b.href=c instanceof n.html.TrustedResourceUrl?n.html.TrustedResourceUrl.unwrap(c):c instanceof n.html.SafeUrl?n.html.SafeUrl.unwrap(c):n.html.SafeUrl.sanitizeAssertUnchanged(c).getTypedStringValue()};
n.dom.safe.setObjectData=function(b,c){n.dom.asserts.assertIsHTMLObjectElement(b);b.data=n.html.TrustedResourceUrl.unwrap(c)};n.dom.safe.setScriptSrc=function(b,c){n.dom.asserts.assertIsHTMLScriptElement(b);b.src=n.html.TrustedResourceUrl.unwrap(c)};n.dom.safe.setScriptContent=function(b,c){n.dom.asserts.assertIsHTMLScriptElement(b);b.text=n.html.SafeScript.unwrap(c)};
n.dom.safe.setLocationHref=function(b,c){n.dom.asserts.assertIsLocation(b);c=c instanceof n.html.SafeUrl?c:n.html.SafeUrl.sanitizeAssertUnchanged(c);b.href=n.html.SafeUrl.unwrap(c)};n.dom.safe.openInWindow=function(b,c,d,e,f){b=b instanceof n.html.SafeUrl?b:n.html.SafeUrl.sanitizeAssertUnchanged(b);return(c||window).open(n.html.SafeUrl.unwrap(b),d?n.string.Const.unwrap(d):"",e,f)};n.html.uncheckedconversions={};n.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,null)};
n.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(c)};
n.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(c)};
n.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(c)};
n.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(c)};
n.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(b,c){n.asserts.assertString(n.string.Const.unwrap(b),"must provide justification");n.asserts.assert(!n.string.isEmptyOrWhitespace(n.string.Const.unwrap(b)),"must provide non-empty justification");return n.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c)};n.math.Coordinate=function(b,c){this.x=n.isDef(b)?b:0;this.y=n.isDef(c)?c:0};n.math.Coordinate.prototype.clone=function(){return new n.math.Coordinate(this.x,this.y)};n.DEBUG&&(n.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});n.math.Coordinate.prototype.equals=function(b){return b instanceof n.math.Coordinate&&n.math.Coordinate.equals(this,b)};n.math.Coordinate.equals=function(b,c){return b==c?!0:b&&c?b.x==c.x&&b.y==c.y:!1};
n.math.Coordinate.distance=function(b,c){var d=b.x-c.x;b=b.y-c.y;return Math.sqrt(d*d+b*b)};n.math.Coordinate.magnitude=function(b){return Math.sqrt(b.x*b.x+b.y*b.y)};n.math.Coordinate.azimuth=function(b){return n.math.angle(0,0,b.x,b.y)};n.math.Coordinate.squaredDistance=function(b,c){var d=b.x-c.x;b=b.y-c.y;return d*d+b*b};n.math.Coordinate.difference=function(b,c){return new n.math.Coordinate(b.x-c.x,b.y-c.y)};n.math.Coordinate.sum=function(b,c){return new n.math.Coordinate(b.x+c.x,b.y+c.y)};
a=n.math.Coordinate.prototype;a.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};a.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};a.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};a.translate=function(b,c){b instanceof n.math.Coordinate?(this.x+=b.x,this.y+=b.y):(this.x+=Number(b),n.isNumber(c)&&(this.y+=c));return this};a.scale=function(b,c){c=n.isNumber(c)?c:b;this.x*=b;this.y*=c;return this};n.math.Size=function(b,c){this.width=b;this.height=c};n.math.Size.equals=function(b,c){return b==c?!0:b&&c?b.width==c.width&&b.height==c.height:!1};n.math.Size.prototype.clone=function(){return new n.math.Size(this.width,this.height)};n.DEBUG&&(n.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"});a=n.math.Size.prototype;a.area=function(){return this.width*this.height};a.aspectRatio=function(){return this.width/this.height};a.isEmpty=function(){return!this.area()};
a.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};a.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};a.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};a.scale=function(b,c){c=n.isNumber(c)?c:b;this.width*=b;this.height*=c;return this};n.dom.ASSUME_QUIRKS_MODE=!1;n.dom.ASSUME_STANDARDS_MODE=!1;n.dom.COMPAT_MODE_KNOWN_=n.dom.ASSUME_QUIRKS_MODE||n.dom.ASSUME_STANDARDS_MODE;n.dom.getDomHelper=function(b){return b?new n.dom.DomHelper(n.dom.getOwnerDocument(b)):n.dom.defaultDomHelper_||(n.dom.defaultDomHelper_=new n.dom.DomHelper)};n.dom.getDocument=function(){return document};n.dom.getElement=function(b){return n.dom.getElementHelper_(document,b)};n.dom.getElementHelper_=function(b,c){return n.isString(c)?b.getElementById(c):c};
n.dom.getRequiredElement=function(b){return n.dom.getRequiredElementHelper_(document,b)};n.dom.getRequiredElementHelper_=function(b,c){n.asserts.assertString(c);b=n.dom.getElementHelper_(b,c);return b=n.asserts.assertElement(b,"No element found with id: "+c)};n.dom.$=n.dom.getElement;n.dom.getElementsByTagName=function(b,c){return(c||document).getElementsByTagName(String(b))};n.dom.getElementsByTagNameAndClass=function(b,c,d){return n.dom.getElementsByTagNameAndClass_(document,b,c,d)};
n.dom.getElementByTagNameAndClass=function(b,c,d){return n.dom.getElementByTagNameAndClass_(document,b,c,d)};n.dom.getElementsByClass=function(b,c){var d=c||document;return n.dom.canUseQuerySelector_(d)?d.querySelectorAll("."+b):n.dom.getElementsByTagNameAndClass_(document,"*",b,c)};n.dom.getElementByClass=function(b,c){var d=c||document;return(d.getElementsByClassName?d.getElementsByClassName(b)[0]:n.dom.getElementByTagNameAndClass_(document,"*",b,c))||null};
n.dom.getRequiredElementByClass=function(b,c){c=n.dom.getElementByClass(b,c);return n.asserts.assert(c,"No element found with className: "+b)};n.dom.canUseQuerySelector_=function(b){return!(!b.querySelectorAll||!b.querySelector)};
n.dom.getElementsByTagNameAndClass_=function(b,c,d,e){b=e||b;c=c&&"*"!=c?String(c).toUpperCase():"";if(n.dom.canUseQuerySelector_(b)&&(c||d))return b.querySelectorAll(c+(d?"."+d:""));if(d&&b.getElementsByClassName){b=b.getElementsByClassName(d);if(c){e={};for(var f=0,g=0,h;h=b[g];g++)c==h.nodeName&&(e[f++]=h);e.length=f;return e}return b}b=b.getElementsByTagName(c||"*");if(d){e={};for(g=f=0;h=b[g];g++)c=h.className,"function"==typeof c.split&&n.array.contains(c.split(/\s+/),d)&&(e[f++]=h);e.length=
f;return e}return b};n.dom.getElementByTagNameAndClass_=function(b,c,d,e){var f=e||b,g=c&&"*"!=c?String(c).toUpperCase():"";return n.dom.canUseQuerySelector_(f)&&(g||d)?f.querySelector(g+(d?"."+d:"")):n.dom.getElementsByTagNameAndClass_(b,c,d,e)[0]||null};n.dom.$$=n.dom.getElementsByTagNameAndClass;
n.dom.setProperties=function(b,c){n.object.forEach(c,function(c,e){c&&c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());"style"==e?b.style.cssText=c:"class"==e?b.className=c:"for"==e?b.htmlFor=c:n.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(e)?b.setAttribute(n.dom.DIRECT_ATTRIBUTE_MAP_[e],c):n.string.startsWith(e,"aria-")||n.string.startsWith(e,"data-")?b.setAttribute(e,c):b[e]=c})};
n.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};n.dom.getViewportSize=function(b){return n.dom.getViewportSize_(b||window)};n.dom.getViewportSize_=function(b){b=b.document;b=n.dom.isCss1CompatMode_(b)?b.documentElement:b.body;return new n.math.Size(b.clientWidth,b.clientHeight)};
n.dom.getDocumentHeight=function(){return n.dom.getDocumentHeight_(window)};n.dom.getDocumentHeightForWindow=function(b){return n.dom.getDocumentHeight_(b)};
n.dom.getDocumentHeight_=function(b){var c=b.document,d=0;if(c){d=c.body;var e=c.documentElement;if(!e||!d)return 0;b=n.dom.getViewportSize_(b).height;if(n.dom.isCss1CompatMode_(c)&&e.scrollHeight)d=e.scrollHeight!=b?e.scrollHeight:e.offsetHeight;else{c=e.scrollHeight;var f=e.offsetHeight;e.clientHeight!=f&&(c=d.scrollHeight,f=d.offsetHeight);d=c>b?c>f?c:f:c<f?c:f}}return d};n.dom.getPageScroll=function(b){return n.dom.getDomHelper((b||n.global||window).document).getDocumentScroll()};
n.dom.getDocumentScroll=function(){return n.dom.getDocumentScroll_(document)};n.dom.getDocumentScroll_=function(b){var c=n.dom.getDocumentScrollElement_(b);b=n.dom.getWindow_(b);return n.userAgent.IE&&n.userAgent.isVersionOrHigher("10")&&b.pageYOffset!=c.scrollTop?new n.math.Coordinate(c.scrollLeft,c.scrollTop):new n.math.Coordinate(b.pageXOffset||c.scrollLeft,b.pageYOffset||c.scrollTop)};n.dom.getDocumentScrollElement=function(){return n.dom.getDocumentScrollElement_(document)};
n.dom.getDocumentScrollElement_=function(b){return b.scrollingElement?b.scrollingElement:!n.userAgent.WEBKIT&&n.dom.isCss1CompatMode_(b)?b.documentElement:b.body||b.documentElement};n.dom.getWindow=function(b){return b?n.dom.getWindow_(b):window};n.dom.getWindow_=function(b){return b.parentWindow||b.defaultView};n.dom.createDom=function(b,c,d){return n.dom.createDom_(document,arguments)};
n.dom.createDom_=function(b,c){var d=String(c[0]),e=c[1];if(!n.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&e&&(e.name||e.type)){d=["<",d];e.name&&d.push(' name="',n.string.htmlEscape(e.name),'"');if(e.type){d.push(' type="',n.string.htmlEscape(e.type),'"');var f={};n.object.extend(f,e);delete f.type;e=f}d.push(">");d=d.join("")}d=b.createElement(d);e&&(n.isString(e)?d.className=e:n.isArray(e)?d.className=e.join(" "):n.dom.setProperties(d,e));2<c.length&&n.dom.append_(b,d,c,2);return d};
n.dom.append_=function(b,c,d,e){function f(d){d&&c.appendChild(n.isString(d)?b.createTextNode(d):d)}for(;e<d.length;e++){var g=d[e];n.isArrayLike(g)&&!n.dom.isNodeLike(g)?n.array.forEach(n.dom.isNodeList(g)?n.array.toArray(g):g,f):f(g)}};n.dom.$dom=n.dom.createDom;n.dom.createElement=function(b){return n.dom.createElement_(document,b)};n.dom.createElement_=function(b,c){return b.createElement(String(c))};n.dom.createTextNode=function(b){return document.createTextNode(String(b))};
n.dom.createTable=function(b,c,d){return n.dom.createTable_(document,b,c,!!d)};n.dom.createTable_=function(b,c,d,e){for(var f=n.dom.createElement_(b,"TABLE"),g=f.appendChild(n.dom.createElement_(b,"TBODY")),h=0;h<c;h++){for(var l=n.dom.createElement_(b,"TR"),m=0;m<d;m++){var p=n.dom.createElement_(b,"TD");e&&n.dom.setTextContent(p,n.string.Unicode.NBSP);l.appendChild(p)}g.appendChild(l)}return f};
n.dom.constHtmlToNode=function(b){var c=n.array.map(arguments,n.string.Const.unwrap);c=n.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(n.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."),c.join(""));return n.dom.safeHtmlToNode(c)};n.dom.safeHtmlToNode=function(b){return n.dom.safeHtmlToNode_(document,b)};
n.dom.safeHtmlToNode_=function(b,c){var d=n.dom.createElement_(b,"DIV");n.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(n.dom.safe.setInnerHtml(d,n.html.SafeHtml.concat(n.html.SafeHtml.BR,c)),d.removeChild(d.firstChild)):n.dom.safe.setInnerHtml(d,c);return n.dom.childrenToNode_(b,d)};n.dom.childrenToNode_=function(b,c){if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(b=b.createDocumentFragment();c.firstChild;)b.appendChild(c.firstChild);return b};n.dom.isCss1CompatMode=function(){return n.dom.isCss1CompatMode_(document)};
n.dom.isCss1CompatMode_=function(b){return n.dom.COMPAT_MODE_KNOWN_?n.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==b.compatMode};n.dom.canHaveChildren=function(b){if(b.nodeType!=n.dom.NodeType.ELEMENT)return!1;switch(b.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
n.dom.appendChild=function(b,c){b.appendChild(c)};n.dom.append=function(b,c){n.dom.append_(n.dom.getOwnerDocument(b),b,arguments,1)};n.dom.removeChildren=function(b){for(var c;c=b.firstChild;)b.removeChild(c)};n.dom.insertSiblingBefore=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c)};n.dom.insertSiblingAfter=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c.nextSibling)};n.dom.insertChildAt=function(b,c,d){b.insertBefore(c,b.childNodes[d]||null)};
n.dom.removeNode=function(b){return b&&b.parentNode?b.parentNode.removeChild(b):null};n.dom.replaceNode=function(b,c){var d=c.parentNode;d&&d.replaceChild(b,c)};n.dom.flattenElement=function(b){var c,d=b.parentNode;if(d&&d.nodeType!=n.dom.NodeType.DOCUMENT_FRAGMENT){if(b.removeNode)return b.removeNode(!1);for(;c=b.firstChild;)d.insertBefore(c,b);return n.dom.removeNode(b)}};
n.dom.getChildren=function(b){return n.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE&&void 0!=b.children?b.children:n.array.filter(b.childNodes,function(b){return b.nodeType==n.dom.NodeType.ELEMENT})};n.dom.getFirstElementChild=function(b){return n.isDef(b.firstElementChild)?b.firstElementChild:n.dom.getNextElementNode_(b.firstChild,!0)};n.dom.getLastElementChild=function(b){return n.isDef(b.lastElementChild)?b.lastElementChild:n.dom.getNextElementNode_(b.lastChild,!1)};
n.dom.getNextElementSibling=function(b){return n.isDef(b.nextElementSibling)?b.nextElementSibling:n.dom.getNextElementNode_(b.nextSibling,!0)};n.dom.getPreviousElementSibling=function(b){return n.isDef(b.previousElementSibling)?b.previousElementSibling:n.dom.getNextElementNode_(b.previousSibling,!1)};n.dom.getNextElementNode_=function(b,c){for(;b&&b.nodeType!=n.dom.NodeType.ELEMENT;)b=c?b.nextSibling:b.previousSibling;return b};
n.dom.getNextNode=function(b){if(!b)return null;if(b.firstChild)return b.firstChild;for(;b&&!b.nextSibling;)b=b.parentNode;return b?b.nextSibling:null};n.dom.getPreviousNode=function(b){if(!b)return null;if(!b.previousSibling)return b.parentNode;for(b=b.previousSibling;b&&b.lastChild;)b=b.lastChild;return b};n.dom.isNodeLike=function(b){return n.isObject(b)&&0<b.nodeType};n.dom.isElement=function(b){return n.isObject(b)&&b.nodeType==n.dom.NodeType.ELEMENT};
n.dom.isWindow=function(b){return n.isObject(b)&&b.window==b};n.dom.getParentElement=function(b){var c;if(n.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY&&!(n.userAgent.IE&&n.userAgent.isVersionOrHigher("9")&&!n.userAgent.isVersionOrHigher("10")&&n.global.SVGElement&&b instanceof n.global.SVGElement)&&(c=b.parentElement))return c;c=b.parentNode;return n.dom.isElement(c)?c:null};
n.dom.contains=function(b,c){if(!b||!c)return!1;if(b.contains&&c.nodeType==n.dom.NodeType.ELEMENT)return b==c||b.contains(c);if("undefined"!=typeof b.compareDocumentPosition)return b==c||!!(b.compareDocumentPosition(c)&16);for(;c&&b!=c;)c=c.parentNode;return c==b};
n.dom.compareNodeOrder=function(b,c){if(b==c)return 0;if(b.compareDocumentPosition)return b.compareDocumentPosition(c)&2?1:-1;if(n.userAgent.IE&&!n.userAgent.isDocumentModeOrHigher(9)){if(b.nodeType==n.dom.NodeType.DOCUMENT)return-1;if(c.nodeType==n.dom.NodeType.DOCUMENT)return 1}if("sourceIndex"in b||b.parentNode&&"sourceIndex"in b.parentNode){var d=b.nodeType==n.dom.NodeType.ELEMENT,e=c.nodeType==n.dom.NodeType.ELEMENT;if(d&&e)return b.sourceIndex-c.sourceIndex;var f=b.parentNode,g=c.parentNode;
return f==g?n.dom.compareSiblingOrder_(b,c):!d&&n.dom.contains(f,c)?-1*n.dom.compareParentsDescendantNodeIe_(b,c):!e&&n.dom.contains(g,b)?n.dom.compareParentsDescendantNodeIe_(c,b):(d?b.sourceIndex:f.sourceIndex)-(e?c.sourceIndex:g.sourceIndex)}e=n.dom.getOwnerDocument(b);d=e.createRange();d.selectNode(b);d.collapse(!0);b=e.createRange();b.selectNode(c);b.collapse(!0);return d.compareBoundaryPoints(n.global.Range.START_TO_END,b)};
n.dom.compareParentsDescendantNodeIe_=function(b,c){var d=b.parentNode;if(d==c)return-1;for(;c.parentNode!=d;)c=c.parentNode;return n.dom.compareSiblingOrder_(c,b)};n.dom.compareSiblingOrder_=function(b,c){for(;c=c.previousSibling;)if(c==b)return-1;return 1};
n.dom.findCommonAncestor=function(b){var c,d=arguments.length;if(!d)return null;if(1==d)return arguments[0];var e=[],f=Infinity;for(c=0;c<d;c++){for(var g=[],h=arguments[c];h;)g.unshift(h),h=h.parentNode;e.push(g);f=Math.min(f,g.length)}g=null;for(c=0;c<f;c++){h=e[0][c];for(var l=1;l<d;l++)if(h!=e[l][c])return g;g=h}return g};n.dom.getOwnerDocument=function(b){n.asserts.assert(b,"Node cannot be null or undefined.");return b.nodeType==n.dom.NodeType.DOCUMENT?b:b.ownerDocument||b.document};
n.dom.getFrameContentDocument=function(b){return b.contentDocument||b.contentWindow.document};n.dom.getFrameContentWindow=function(b){try{return b.contentWindow||(b.contentDocument?n.dom.getWindow(b.contentDocument):null)}catch(c){}return null};
n.dom.setTextContent=function(b,c){n.asserts.assert(null!=b,"goog.dom.setTextContent expects a non-null value for node");if("textContent"in b)b.textContent=c;else if(b.nodeType==n.dom.NodeType.TEXT)b.data=String(c);else if(b.firstChild&&b.firstChild.nodeType==n.dom.NodeType.TEXT){for(;b.lastChild!=b.firstChild;)b.removeChild(b.lastChild);b.firstChild.data=String(c)}else{n.dom.removeChildren(b);var d=n.dom.getOwnerDocument(b);b.appendChild(d.createTextNode(String(c)))}};
n.dom.getOuterHtml=function(b){n.asserts.assert(null!==b,"goog.dom.getOuterHtml expects a non-null value for element");if("outerHTML"in b)return b.outerHTML;var c=n.dom.getOwnerDocument(b);c=n.dom.createElement_(c,"DIV");c.appendChild(b.cloneNode(!0));return c.innerHTML};n.dom.findNode=function(b,c){var d=[];return n.dom.findNodes_(b,c,d,!0)?d[0]:void 0};n.dom.findNodes=function(b,c){var d=[];n.dom.findNodes_(b,c,d,!1);return d};
n.dom.findNodes_=function(b,c,d,e){if(null!=b)for(b=b.firstChild;b;){if(c(b)&&(d.push(b),e)||n.dom.findNodes_(b,c,d,e))return!0;b=b.nextSibling}return!1};n.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};n.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"};n.dom.isFocusableTabIndex=function(b){return n.dom.hasSpecifiedTabIndex_(b)&&n.dom.isTabIndexFocusable_(b)};n.dom.setFocusableTabIndex=function(b,c){c?b.tabIndex=0:(b.tabIndex=-1,b.removeAttribute("tabIndex"))};
n.dom.isFocusable=function(b){var c;return(c=n.dom.nativelySupportsFocus_(b)?!b.disabled&&(!n.dom.hasSpecifiedTabIndex_(b)||n.dom.isTabIndexFocusable_(b)):n.dom.isFocusableTabIndex(b))&&n.userAgent.IE?n.dom.hasNonZeroBoundingRect_(b):c};n.dom.hasSpecifiedTabIndex_=function(b){return n.userAgent.IE&&!n.userAgent.isVersionOrHigher("9")?(b=b.getAttributeNode("tabindex"),n.isDefAndNotNull(b)&&b.specified):b.hasAttribute("tabindex")};
n.dom.isTabIndexFocusable_=function(b){b=b.tabIndex;return n.isNumber(b)&&0<=b&&32768>b};n.dom.nativelySupportsFocus_=function(b){return"A"==b.tagName||"INPUT"==b.tagName||"TEXTAREA"==b.tagName||"SELECT"==b.tagName||"BUTTON"==b.tagName};n.dom.hasNonZeroBoundingRect_=function(b){b=!n.isFunction(b.getBoundingClientRect)||n.userAgent.IE&&null==b.parentElement?{height:b.offsetHeight,width:b.offsetWidth}:b.getBoundingClientRect();return n.isDefAndNotNull(b)&&0<b.height&&0<b.width};
n.dom.getTextContent=function(b){if(n.dom.BrowserFeature.CAN_USE_INNER_TEXT&&null!==b&&"innerText"in b)b=n.string.canonicalizeNewlines(b.innerText);else{var c=[];n.dom.getTextContent_(b,c,!0);b=c.join("")}b=b.replace(/ \xAD /g," ").replace(/\xAD/g,"");b=b.replace(/\u200B/g,"");n.dom.BrowserFeature.CAN_USE_INNER_TEXT||(b=b.replace(/ +/g," "));" "!=b&&(b=b.replace(/^\s*/,""));return b};n.dom.getRawTextContent=function(b){var c=[];n.dom.getTextContent_(b,c,!1);return c.join("")};
n.dom.getTextContent_=function(b,c,d){if(!(b.nodeName in n.dom.TAGS_TO_IGNORE_))if(b.nodeType==n.dom.NodeType.TEXT)d?c.push(String(b.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(b.nodeValue);else if(b.nodeName in n.dom.PREDEFINED_TAG_VALUES_)c.push(n.dom.PREDEFINED_TAG_VALUES_[b.nodeName]);else for(b=b.firstChild;b;)n.dom.getTextContent_(b,c,d),b=b.nextSibling};n.dom.getNodeTextLength=function(b){return n.dom.getTextContent(b).length};
n.dom.getNodeTextOffset=function(b,c){c=c||n.dom.getOwnerDocument(b).body;for(var d=[];b&&b!=c;){for(var e=b;e=e.previousSibling;)d.unshift(n.dom.getTextContent(e));b=b.parentNode}return n.string.trimLeft(d.join("")).replace(/ +/g," ").length};
n.dom.getNodeAtOffset=function(b,c,d){b=[b];for(var e=0,f=null;0<b.length&&e<c;)if(f=b.pop(),!(f.nodeName in n.dom.TAGS_TO_IGNORE_))if(f.nodeType==n.dom.NodeType.TEXT){var g=f.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," ");e+=g.length}else if(f.nodeName in n.dom.PREDEFINED_TAG_VALUES_)e+=n.dom.PREDEFINED_TAG_VALUES_[f.nodeName].length;else for(g=f.childNodes.length-1;0<=g;g--)b.push(f.childNodes[g]);n.isObject(d)&&(d.remainder=f?f.nodeValue.length+c-e-1:0,d.node=f);return f};
n.dom.isNodeList=function(b){if(b&&"number"==typeof b.length){if(n.isObject(b))return"function"==typeof b.item||"string"==typeof b.item;if(n.isFunction(b))return"function"==typeof b.item}return!1};n.dom.getAncestorByTagNameAndClass=function(b,c,d,e){if(!c&&!d)return null;var f=c?String(c).toUpperCase():null;return n.dom.getAncestor(b,function(b){return(!f||b.nodeName==f)&&(!d||n.isString(b.className)&&n.array.contains(b.className.split(/\s+/),d))},!0,e)};
n.dom.getAncestorByClass=function(b,c,d){return n.dom.getAncestorByTagNameAndClass(b,null,c,d)};n.dom.getAncestor=function(b,c,d,e){b&&!d&&(b=b.parentNode);for(d=0;b&&(null==e||d<=e);){n.asserts.assert("parentNode"!=b.name);if(c(b))return b;b=b.parentNode;d++}return null};n.dom.getActiveElement=function(b){try{return b&&b.activeElement}catch(c){}return null};
n.dom.getPixelRatio=function(){var b=n.dom.getWindow();return n.isDef(b.devicePixelRatio)?b.devicePixelRatio:b.matchMedia?n.dom.matchesPixelRatio_(3)||n.dom.matchesPixelRatio_(2)||n.dom.matchesPixelRatio_(1.5)||n.dom.matchesPixelRatio_(1)||.75:1};n.dom.matchesPixelRatio_=function(b){return n.dom.getWindow().matchMedia("(min-resolution: "+b+"dppx),(min--moz-device-pixel-ratio: "+b+"),(min-resolution: "+96*b+"dpi)").matches?b:0};n.dom.getCanvasContext2D=function(b){return b.getContext("2d")};
n.dom.DomHelper=function(b){this.document_=b||n.global.document||document};a=n.dom.DomHelper.prototype;a.getDomHelper=n.dom.getDomHelper;a.getDocument=function(){return this.document_};a.getElement=function(b){return n.dom.getElementHelper_(this.document_,b)};a.getRequiredElement=function(b){return n.dom.getRequiredElementHelper_(this.document_,b)};a.$=n.dom.DomHelper.prototype.getElement;a.getElementsByTagName=function(b,c){return(c||this.document_).getElementsByTagName(String(b))};
a.getElementsByTagNameAndClass=function(b,c,d){return n.dom.getElementsByTagNameAndClass_(this.document_,b,c,d)};a.getElementByTagNameAndClass=function(b,c,d){return n.dom.getElementByTagNameAndClass_(this.document_,b,c,d)};a.getElementsByClass=function(b,c){return n.dom.getElementsByClass(b,c||this.document_)};a.getElementByClass=function(b,c){return n.dom.getElementByClass(b,c||this.document_)};a.getRequiredElementByClass=function(b,c){return n.dom.getRequiredElementByClass(b,c||this.document_)};
a.$$=n.dom.DomHelper.prototype.getElementsByTagNameAndClass;a.setProperties=n.dom.setProperties;a.getViewportSize=function(b){return n.dom.getViewportSize(b||this.getWindow())};a.getDocumentHeight=function(){return n.dom.getDocumentHeight_(this.getWindow())};a.createDom=function(b,c,d){return n.dom.createDom_(this.document_,arguments)};a.$dom=n.dom.DomHelper.prototype.createDom;a.createElement=function(b){return n.dom.createElement_(this.document_,b)};a.createTextNode=function(b){return this.document_.createTextNode(String(b))};
a.createTable=function(b,c,d){return n.dom.createTable_(this.document_,b,c,!!d)};a.safeHtmlToNode=function(b){return n.dom.safeHtmlToNode_(this.document_,b)};a.isCss1CompatMode=function(){return n.dom.isCss1CompatMode_(this.document_)};a.getWindow=function(){return n.dom.getWindow_(this.document_)};a.getDocumentScrollElement=function(){return n.dom.getDocumentScrollElement_(this.document_)};a.getDocumentScroll=function(){return n.dom.getDocumentScroll_(this.document_)};
a.getActiveElement=function(b){return n.dom.getActiveElement(b||this.document_)};a.appendChild=n.dom.appendChild;a.append=n.dom.append;a.canHaveChildren=n.dom.canHaveChildren;a.removeChildren=n.dom.removeChildren;a.insertSiblingBefore=n.dom.insertSiblingBefore;a.insertSiblingAfter=n.dom.insertSiblingAfter;a.insertChildAt=n.dom.insertChildAt;a.removeNode=n.dom.removeNode;a.replaceNode=n.dom.replaceNode;a.flattenElement=n.dom.flattenElement;a.getChildren=n.dom.getChildren;a.getFirstElementChild=n.dom.getFirstElementChild;
a.getLastElementChild=n.dom.getLastElementChild;a.getNextElementSibling=n.dom.getNextElementSibling;a.getPreviousElementSibling=n.dom.getPreviousElementSibling;a.getNextNode=n.dom.getNextNode;a.getPreviousNode=n.dom.getPreviousNode;a.isNodeLike=n.dom.isNodeLike;a.isElement=n.dom.isElement;a.isWindow=n.dom.isWindow;a.getParentElement=n.dom.getParentElement;a.contains=n.dom.contains;a.compareNodeOrder=n.dom.compareNodeOrder;a.findCommonAncestor=n.dom.findCommonAncestor;a.getOwnerDocument=n.dom.getOwnerDocument;
a.getFrameContentDocument=n.dom.getFrameContentDocument;a.getFrameContentWindow=n.dom.getFrameContentWindow;a.setTextContent=n.dom.setTextContent;a.getOuterHtml=n.dom.getOuterHtml;a.findNode=n.dom.findNode;a.findNodes=n.dom.findNodes;a.isFocusableTabIndex=n.dom.isFocusableTabIndex;a.setFocusableTabIndex=n.dom.setFocusableTabIndex;a.isFocusable=n.dom.isFocusable;a.getTextContent=n.dom.getTextContent;a.getNodeTextLength=n.dom.getNodeTextLength;a.getNodeTextOffset=n.dom.getNodeTextOffset;
a.getNodeAtOffset=n.dom.getNodeAtOffset;a.isNodeList=n.dom.isNodeList;a.getAncestorByTagNameAndClass=n.dom.getAncestorByTagNameAndClass;a.getAncestorByClass=n.dom.getAncestorByClass;a.getAncestor=n.dom.getAncestor;a.getCanvasContext2D=n.dom.getCanvasContext2D;q.WindowDelegate=function(){n.craw.AppWindowDelegate.call(this);this.isFinishedLaunch_=this.retrieveJwtFailed_=this.transactionStarted_=this.walletIsLoaded_=!1;this.webStoreService_=new q.WebStoreService};n.inherits(q.WindowDelegate,n.craw.AppWindowDelegate);n.craw.AppWindowDelegate.setDefaultImpl();q.WindowDelegate.prototype.getAppUnavailableMessage=function(){return chrome.i18n.getMessage("iap_unavailable")};
q.WindowDelegate.prototype.pollOnlineStatus=function(){if(!window.iapParams_.oauthToken)return chrome.i18n.getMessage("please_sign_in");if(this.retrieveJwtFailed_)return chrome.i18n.getMessage("jwt_retrieve_failed")};q.WindowDelegate.prototype.finishedLaunch=function(){return this.isFinishedLaunch_};
var R=function(b){var c=window.iapParams_;b.isFinishedLaunch_&&c.oauthToken&&b.walletIsLoaded_&&!b.transactionStarted_&&(b.transactionStarted_=!0,n.dom.getDocument().querySelector("webview").contentWindow.postMessage({jwt:window.iapJwt_,parameters:c},"*"))};q.WindowDelegate.prototype.retrieveJwtOnSuccess_=function(b,c,d){window.iapJwt_=b;window.payment_data=c;window.signature=d;this.retrieveJwtFailed_=!1;this.isFinishedLaunch_=!0;R(this)};
q.WindowDelegate.prototype.retrieveJwtOnFailed_=function(){this.isFinishedLaunch_=this.retrieveJwtFailed_=!0};
q.WindowDelegate.prototype.onWindowReady=function(){var b=n.dom.getDocument().querySelector("webview");if(b){b.style.borderTop="1px #eaeaea solid";var c=!1,d=window.iapParams_,e=this,f=function(b){if(window.sku_){var c=window.sku_,d=window.iapParams_||{},f=e.webStoreService_,g=d||{};if("env"in g){switch(g.env){case "prod":f.baseUrl_=q.WebStoreService.Environment.PROD;break;default:f.baseUrl_=q.WebStoreService.Environment.SANDBOX}f.baseUrlAndPath_=f.baseUrl_+q.WebStoreService.WEB_STORE_REQUEST_PATH_}e.retrieveJwtFailed_=
!1;e.isFinishedLaunch_=!1;da(e.webStoreService_,d.applicationId,c,n.bind(e.retrieveJwtOnSuccess_,e),n.bind(e.retrieveJwtOnFailed_,e),b,d.gl,d.projection)}else e.isFinishedLaunch_=!0,R(e)};d.oauthToken?f(d.oauthToken):chrome.identity.getAuthToken({interactive:!0},function(b){window.iapParams_.oauthToken=b;f(b)});b.addEventListener("contentload",function(){if(!c){c=!0;switch(d.env||"sandbox"){case "prod":var e="https://payments.google.com/payments/v4/js/integrator.js";break;default:e="https://sandbox.google.com/payments/v4/js/integrator.js"}b.executeScript({runAt:"document_start",
code:'document.write("<script type=\\"text/javascript\\" src=\\"'+e+"\\\" data-payments-main>\x3c/script><script type=\\\"text/javascript\\\">window.addEventListener('message', function(e) {  if (e.origin != 'chrome-extension://"+chrome.runtime.id+"') return;var mode = payments.business.integration.mashupMode.embedded('renderplace');var bootstrapper = payments.business.integration.bootstrap.asMashupMode(mode);bootstrapper    .usingDefaultActivityStatusChangeHandler()    .usingBaseZIndex(1201)    .usingOnResizeFrameCallback(function() {        var iframe = document.getElementById('renderplaceIframe');        var size = {'width': iframe.clientWidth, 'height': iframe.clientHeight};        e.source.postMessage({resize: size}, e.origin);})    .usingOAuthToken(e.data.parameters.oauthToken)    .usingStyle('pc=#FF0000;ac=#0000FF');var standaloneContextBootstrapper = bootstrapper.inStandaloneContext(    payments.business.integration.standaloneContextAuthId.forGaia());var buyFlowScenario =    standaloneContextBootstrapper.buyFlow(function(res) {        e.source.postMessage({type: 'success', result: res}, e.origin);});buyFlowScenario.withEncryptedParameters(e.data.jwt);buyFlowScenario.load(undefined, function(res) {    e.source.postMessage({type: 'failure', result: res}, e.origin);});}, false);console.log('registered payment listener: ' + Date.now());\x3c/script>&nbsp;\");"},
function(){console.log("did exec once");b.executeScript({runAt:"document_end",code:"document.write(\"<script type=\\\"text/javascript\\\">var elem = document.createElement('div');elem.setAttribute('id', 'renderplace');elem.setAttribute('style', 'margin-left:35px;margin-right:35px;');document.body.appendChild(elem);console.log('finished loading, start payment: ' + Date.now());\x3c/script>\");"})})}},!1);b.addEventListener("consolemessage",function(b){-1!=b.message.indexOf("finished")&&(e.walletIsLoaded_=
!0,R(e))});b.addEventListener("newwindow",function(b){window.open(b.targetUrl);b.window.discard()},!1)}};window.addEventListener("message",function(b){console.log(b);if("type"in b.data)window.purchase_result=b.data.result,window.close();else if("resize"in b.data){var c=chrome.app.window.current();c.resizeTo(c.outerBounds.width+0,b.data.resize.height+80)}},!1);n.async={};n.async.FreeList=function(b,c,d){this.limit_=d;this.create_=b;this.reset_=c;this.occupants_=0;this.head_=null};n.async.FreeList.prototype.get=function(){if(0<this.occupants_){this.occupants_--;var b=this.head_;this.head_=b.next;b.next=null}else b=this.create_();return b};n.async.FreeList.prototype.put=function(b){this.reset_(b);this.occupants_<this.limit_&&(this.occupants_++,b.next=this.head_,this.head_=b)};n.async.throwException=function(b){n.global.setTimeout(function(){throw b;},0)};n.async.nextTick=function(b,c,d){var e=b;c&&(e=n.bind(b,c));e=n.async.nextTick.wrapCallback_(e);n.isFunction(n.global.setImmediate)&&(d||n.async.nextTick.useSetImmediate_())?n.global.setImmediate(e):(n.async.nextTick.setImmediate_||(n.async.nextTick.setImmediate_=n.async.nextTick.getSetImmediateEmulator_()),n.async.nextTick.setImmediate_(e))};
n.async.nextTick.useSetImmediate_=function(){return n.global.Window&&n.global.Window.prototype&&!n.labs.userAgent.browser.isEdge()&&n.global.Window.prototype.setImmediate==n.global.setImmediate?!1:!0};
n.async.nextTick.getSetImmediateEmulator_=function(){var b=n.global.MessageChannel;"undefined"===typeof b&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!n.labs.userAgent.engine.isPresto()&&(b=function(){var b=document.createElement("IFRAME");b.style.display="none";b.src="";document.documentElement.appendChild(b);var c=b.contentWindow;b=c.document;b.open();b.write("");b.close();var d="callImmediate"+Math.random(),e="file:"==c.location.protocol?"*":c.location.protocol+"//"+
c.location.host;b=n.bind(function(b){if(("*"==e||b.origin==e)&&b.data==d)this.port1.onmessage()},this);c.addEventListener("message",b,!1);this.port1={};this.port2={postMessage:function(){c.postMessage(d,e)}}});if("undefined"!==typeof b&&!n.labs.userAgent.browser.isIE()){var c=new b,d={},e=d;c.port1.onmessage=function(){if(n.isDef(d.next)){d=d.next;var b=d.cb;d.cb=null;b()}};return function(b){e.next={cb:b};e=e.next;c.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in
document.createElement("SCRIPT")?function(b){var c=document.createElement("SCRIPT");c.onreadystatechange=function(){c.onreadystatechange=null;c.parentNode.removeChild(c);c=null;b();b=null};document.documentElement.appendChild(c)}:function(b){n.global.setTimeout(b,0)}};n.async.nextTick.wrapCallback_=n.functions.identity;n.debug.entryPointRegistry.register(function(b){n.async.nextTick.wrapCallback_=b});n.async.WorkQueue=function(){this.workTail_=this.workHead_=null};n.async.WorkQueue.DEFAULT_MAX_UNUSED=100;n.async.WorkQueue.freelist_=new n.async.FreeList(function(){return new n.async.WorkItem},function(b){b.reset()},n.async.WorkQueue.DEFAULT_MAX_UNUSED);n.async.WorkQueue.prototype.add=function(b,c){var d=n.async.WorkQueue.freelist_.get();d.set(b,c);this.workTail_?this.workTail_.next=d:(n.asserts.assert(!this.workHead_),this.workHead_=d);this.workTail_=d};
n.async.WorkQueue.prototype.remove=function(){var b=null;this.workHead_&&(b=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),b.next=null);return b};n.async.WorkItem=function(){this.next=this.scope=this.fn=null};n.async.WorkItem.prototype.set=function(b,c){this.fn=b;this.scope=c;this.next=null};n.async.WorkItem.prototype.reset=function(){this.next=this.scope=this.fn=null};n.async.run=function(b,c){n.async.run.schedule_||n.async.run.initializeRunner_();n.async.run.workQueueScheduled_||(n.async.run.schedule_(),n.async.run.workQueueScheduled_=!0);n.async.run.workQueue_.add(b,c)};n.async.run.initializeRunner_=function(){if(-1!=String(n.global.Promise).indexOf("[native code]")){var b=n.global.Promise.resolve(void 0);n.async.run.schedule_=function(){b.then(n.async.run.processWorkQueue)}}else n.async.run.schedule_=function(){n.async.nextTick(n.async.run.processWorkQueue)}};
n.async.run.forceNextTick=function(b){n.async.run.schedule_=function(){n.async.nextTick(n.async.run.processWorkQueue);b&&b(n.async.run.processWorkQueue)}};n.async.run.workQueueScheduled_=!1;n.async.run.workQueue_=new n.async.WorkQueue;n.DEBUG&&(n.async.run.resetQueue=function(){n.async.run.workQueueScheduled_=!1;n.async.run.workQueue_=new n.async.WorkQueue});
n.async.run.processWorkQueue=function(){for(var b;b=n.async.run.workQueue_.remove();){try{b.fn.call(b.scope)}catch(c){n.async.throwException(c)}n.async.WorkQueue.freelist_.put(b)}n.async.run.workQueueScheduled_=!1};n.debug.errorcontext={};n.debug.errorcontext.addErrorContext=function(b,c,d){b[n.debug.errorcontext.CONTEXT_KEY_]||(b[n.debug.errorcontext.CONTEXT_KEY_]={});b[n.debug.errorcontext.CONTEXT_KEY_][c]=d};n.debug.errorcontext.getErrorContext=function(b){return b[n.debug.errorcontext.CONTEXT_KEY_]||{}};n.debug.errorcontext.CONTEXT_KEY_="__closure__error__context__984382";n.debug.LOGGING_ENABLED=n.DEBUG;n.debug.FORCE_SLOPPY_STACKS=!1;n.debug.catchErrors=function(b,c,d){d=d||n.global;var e=d.onerror,f=!!c;n.userAgent.WEBKIT&&!n.userAgent.isVersionOrHigher("535.3")&&(f=!f);d.onerror=function(c,d,l,m,p){e&&e(c,d,l,m,p);b({message:c,fileName:d,line:l,col:m,error:p});return f}};n.debug.expose=function(b,c){if("undefined"==typeof b)return"undefined";if(null==b)return"NULL";var d=[],e;for(e in b)if(c||!n.isFunction(b[e])){var f=e+" = ";try{f+=b[e]}catch(g){f+="*** "+g+" ***"}d.push(f)}return d.join("\n")};
n.debug.deepExpose=function(b,c){var d=[],e=[],f={},g=function(b,l){var h=l+"  ";try{if(n.isDef(b))if(n.isNull(b))d.push("NULL");else if(n.isString(b))d.push('"'+b.replace(/\n/g,"\n"+l)+'"');else if(n.isFunction(b))d.push(String(b).replace(/\n/g,"\n"+l));else if(n.isObject(b)){n.hasUid(b)||e.push(b);var p=n.getUid(b);if(f[p])d.push("*** reference loop detected (id="+p+") ***");else{f[p]=!0;d.push("{");for(var z in b)if(c||!n.isFunction(b[z]))d.push("\n"),d.push(h),d.push(z+" = "),g(b[z],h);d.push("\n"+
l+"}");delete f[p]}}else d.push(b);else d.push("undefined")}catch(N){d.push("*** "+N+" ***")}};g(b,"");for(b=0;b<e.length;b++)n.removeUid(e[b]);return d.join("")};n.debug.exposeArray=function(b){for(var c=[],d=0;d<b.length;d++)n.isArray(b[d])?c.push(n.debug.exposeArray(b[d])):c.push(b[d]);return"[ "+c.join(", ")+" ]"};
n.debug.normalizeErrorObject=function(b){var c=n.getObjectByName("window.location.href");if(n.isString(b))return{message:b,name:"Unknown error",lineNumber:"Not available",fileName:c,stack:"Not available"};var d=!1;try{var e=b.lineNumber||b.line||"Not available"}catch(g){e="Not available",d=!0}try{var f=b.fileName||b.filename||b.sourceURL||n.global.$googDebugFname||c}catch(g){f="Not available",d=!0}return!d&&b.lineNumber&&b.fileName&&b.stack&&b.message&&b.name?b:{message:b.message||"Not available",
name:b.name||"UnknownError",lineNumber:e,fileName:f,stack:b.stack||"Not available"}};n.debug.enhanceError=function(b,c){b instanceof Error||(b=Error(b),Error.captureStackTrace&&Error.captureStackTrace(b,n.debug.enhanceError));b.stack||(b.stack=n.debug.getStacktrace(n.debug.enhanceError));if(c){for(var d=0;b["message"+d];)++d;b["message"+d]=String(c)}return b};
n.debug.enhanceErrorWithContext=function(b,c){b=n.debug.enhanceError(b);if(c)for(var d in c)n.debug.errorcontext.addErrorContext(b,d,c[d]);return b};
n.debug.getStacktraceSimple=function(b){if(!n.debug.FORCE_SLOPPY_STACKS){var c=n.debug.getNativeStackTrace_(n.debug.getStacktraceSimple);if(c)return c}c=[];for(var d=arguments.callee.caller,e=0;d&&(!b||e<b);){c.push(n.debug.getFunctionName(d));c.push("()\n");try{d=d.caller}catch(f){c.push("[exception trying to get caller]\n");break}e++;if(e>=n.debug.MAX_STACK_DEPTH){c.push("[...long stack...]");break}}b&&e>=b?c.push("[...reached max depth limit...]"):c.push("[end]");return c.join("")};
n.debug.MAX_STACK_DEPTH=50;n.debug.getNativeStackTrace_=function(b){var c=Error();if(Error.captureStackTrace)return Error.captureStackTrace(c,b),String(c.stack);try{throw c;}catch(d){c=d}return(b=c.stack)?String(b):null};n.debug.getStacktrace=function(b){var c;n.debug.FORCE_SLOPPY_STACKS||(c=n.debug.getNativeStackTrace_(b||n.debug.getStacktrace));c||(c=n.debug.getStacktraceHelper_(b||arguments.callee.caller,[]));return c};
n.debug.getStacktraceHelper_=function(b,c){var d=[];if(n.array.contains(c,b))d.push("[...circular reference...]");else if(b&&c.length<n.debug.MAX_STACK_DEPTH){d.push(n.debug.getFunctionName(b)+"(");for(var e=b.arguments,f=0;e&&f<e.length;f++){0<f&&d.push(", ");var g=e[f];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=n.debug.getFunctionName(g))?g:"[fn]";break;default:g=typeof g}40<
g.length&&(g=g.substr(0,40)+"...");d.push(g)}c.push(b);d.push(")\n");try{d.push(n.debug.getStacktraceHelper_(b.caller,c))}catch(h){d.push("[exception trying to get caller]\n")}}else b?d.push("[...long stack...]"):d.push("[end]");return d.join("")};n.debug.setFunctionResolver=function(b){n.debug.fnNameResolver_=b};
n.debug.getFunctionName=function(b){if(n.debug.fnNameCache_[b])return n.debug.fnNameCache_[b];if(n.debug.fnNameResolver_){var c=n.debug.fnNameResolver_(b);if(c)return n.debug.fnNameCache_[b]=c}b=String(b);n.debug.fnNameCache_[b]||(c=/function ([^\(]+)/.exec(b),n.debug.fnNameCache_[b]=c?c[1]:"[Anonymous]");return n.debug.fnNameCache_[b]};n.debug.makeWhitespaceVisible=function(b){return b.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")};
n.debug.runtimeType=function(b){return b instanceof Function?b.displayName||b.name||"unknown type name":b instanceof Object?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):null===b?"null":typeof b};n.debug.fnNameCache_={};n.debug.LogRecord=function(b,c,d,e,f){this.reset(b,c,d,e,f)};n.debug.LogRecord.prototype.exception_=null;n.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS=!0;n.debug.LogRecord.nextSequenceNumber_=0;n.debug.LogRecord.prototype.reset=function(b,c,d,e,f){n.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS&&("number"==typeof f||n.debug.LogRecord.nextSequenceNumber_++);e||n.now();this.level_=b;this.msg_=c;delete this.exception_};n.debug.LogRecord.prototype.setLevel=function(b){this.level_=b};
n.debug.LogRecord.prototype.getMessage=function(){return this.msg_};n.debug.LogBuffer=function(){n.asserts.assert(n.debug.LogBuffer.isBufferingEnabled(),"Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");this.clear()};n.debug.LogBuffer.getInstance=function(){n.debug.LogBuffer.instance_||(n.debug.LogBuffer.instance_=new n.debug.LogBuffer);return n.debug.LogBuffer.instance_};n.debug.LogBuffer.CAPACITY=0;n.debug.LogBuffer.isBufferingEnabled=function(){return 0<n.debug.LogBuffer.CAPACITY};
n.debug.LogBuffer.prototype.clear=function(){this.buffer_=Array(n.debug.LogBuffer.CAPACITY);this.curIndex_=-1;this.isFull_=!1};n.debug.Logger=function(b){this.name_=b;this.handlers_=this.children_=this.level_=this.parent_=null};n.debug.Logger.ROOT_LOGGER_NAME="";n.debug.Logger.ENABLE_HIERARCHY=!0;n.debug.Logger.ENABLE_HIERARCHY||(n.debug.Logger.rootHandlers_=[]);n.debug.Logger.Level=function(b,c){this.name=b;this.value=c};n.debug.Logger.Level.prototype.toString=function(){return this.name};n.debug.Logger.Level.OFF=new n.debug.Logger.Level("OFF",Infinity);n.debug.Logger.Level.SHOUT=new n.debug.Logger.Level("SHOUT",1200);
n.debug.Logger.Level.SEVERE=new n.debug.Logger.Level("SEVERE",1E3);n.debug.Logger.Level.WARNING=new n.debug.Logger.Level("WARNING",900);n.debug.Logger.Level.INFO=new n.debug.Logger.Level("INFO",800);n.debug.Logger.Level.CONFIG=new n.debug.Logger.Level("CONFIG",700);n.debug.Logger.Level.FINE=new n.debug.Logger.Level("FINE",500);n.debug.Logger.Level.FINER=new n.debug.Logger.Level("FINER",400);n.debug.Logger.Level.FINEST=new n.debug.Logger.Level("FINEST",300);
n.debug.Logger.Level.ALL=new n.debug.Logger.Level("ALL",0);n.debug.Logger.Level.PREDEFINED_LEVELS=[n.debug.Logger.Level.OFF,n.debug.Logger.Level.SHOUT,n.debug.Logger.Level.SEVERE,n.debug.Logger.Level.WARNING,n.debug.Logger.Level.INFO,n.debug.Logger.Level.CONFIG,n.debug.Logger.Level.FINE,n.debug.Logger.Level.FINER,n.debug.Logger.Level.FINEST,n.debug.Logger.Level.ALL];n.debug.Logger.Level.predefinedLevelsCache_=null;
n.debug.Logger.Level.createPredefinedLevelsCache_=function(){n.debug.Logger.Level.predefinedLevelsCache_={};for(var b=0,c;c=n.debug.Logger.Level.PREDEFINED_LEVELS[b];b++)n.debug.Logger.Level.predefinedLevelsCache_[c.value]=c,n.debug.Logger.Level.predefinedLevelsCache_[c.name]=c};n.debug.Logger.Level.getPredefinedLevel=function(b){n.debug.Logger.Level.predefinedLevelsCache_||n.debug.Logger.Level.createPredefinedLevelsCache_();return n.debug.Logger.Level.predefinedLevelsCache_[b]||null};
n.debug.Logger.Level.getPredefinedLevelByValue=function(b){n.debug.Logger.Level.predefinedLevelsCache_||n.debug.Logger.Level.createPredefinedLevelsCache_();if(b in n.debug.Logger.Level.predefinedLevelsCache_)return n.debug.Logger.Level.predefinedLevelsCache_[b];for(var c=0;c<n.debug.Logger.Level.PREDEFINED_LEVELS.length;++c){var d=n.debug.Logger.Level.PREDEFINED_LEVELS[c];if(d.value<=b)return d}return null};n.debug.Logger.getLogger=function(b){return n.debug.LogManager.getLogger(b)};
n.debug.Logger.logToProfilers=function(b){var c=n.global.console;c&&c.timeStamp&&c.timeStamp(b);(c=n.global.msWriteProfilerMark)&&c(b)};a=n.debug.Logger.prototype;a.getName=function(){return this.name_};a.addHandler=function(b){n.debug.LOGGING_ENABLED&&(n.debug.Logger.ENABLE_HIERARCHY?(this.handlers_||(this.handlers_=[]),this.handlers_.push(b)):(n.asserts.assert(!this.name_,"Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),n.debug.Logger.rootHandlers_.push(b)))};
a.removeHandler=function(b){if(n.debug.LOGGING_ENABLED){var c=n.debug.Logger.ENABLE_HIERARCHY?this.handlers_:n.debug.Logger.rootHandlers_;return!!c&&n.array.remove(c,b)}return!1};a.getParent=function(){return this.parent_};a.getChildren=function(){this.children_||(this.children_={});return this.children_};
a.setLevel=function(b){n.debug.LOGGING_ENABLED&&(n.debug.Logger.ENABLE_HIERARCHY?this.level_=b:(n.asserts.assert(!this.name_,"Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),n.debug.Logger.rootLevel_=b))};
var ea=function(b){if(!n.debug.LOGGING_ENABLED)return n.debug.Logger.Level.OFF;if(!n.debug.Logger.ENABLE_HIERARCHY)return n.debug.Logger.rootLevel_;if(b.level_)return b.level_;if(b.parent_)return ea(b.parent_);n.asserts.fail("Root logger has no level set.");return null};
n.debug.Logger.prototype.log=function(b,c,d){if(n.debug.LOGGING_ENABLED&&n.debug.LOGGING_ENABLED&&b.value>=ea(this).value){n.isFunction(c)&&(c=c());if(n.debug.LogBuffer.isBufferingEnabled()){var e=n.debug.LogBuffer.getInstance(),f=this.name_,g=(e.curIndex_+1)%n.debug.LogBuffer.CAPACITY;e.curIndex_=g;e.isFull_?(e=e.buffer_[g],e.reset(b,c,f),b=e):(e.isFull_=g==n.debug.LogBuffer.CAPACITY-1,b=e.buffer_[g]=new n.debug.LogRecord(b,c,f))}else b=new n.debug.LogRecord(b,String(c),this.name_);d&&(b.exception_=
d);n.debug.Logger.logToProfilers("log:"+b.getMessage());if(n.debug.Logger.ENABLE_HIERARCHY)for(d=this;d;){f=d;e=b;if(f.handlers_)for(g=0;c=f.handlers_[g];g++)c(e);d=d.getParent()}else for(d=0;c=n.debug.Logger.rootHandlers_[d++];)c(b)}};n.debug.Logger.prototype.warning=function(b,c){n.debug.LOGGING_ENABLED&&this.log(n.debug.Logger.Level.WARNING,b,c)};n.debug.Logger.prototype.info=function(b,c){n.debug.LOGGING_ENABLED&&this.log(n.debug.Logger.Level.INFO,b,c)};
n.debug.Logger.prototype.fine=function(b,c){n.debug.LOGGING_ENABLED&&this.log(n.debug.Logger.Level.FINE,b,c)};n.debug.LogManager={};n.debug.LogManager.loggers_={};n.debug.LogManager.rootLogger_=null;n.debug.LogManager.initialize=function(){n.debug.LogManager.rootLogger_||(n.debug.LogManager.rootLogger_=new n.debug.Logger(n.debug.Logger.ROOT_LOGGER_NAME),n.debug.LogManager.loggers_[n.debug.Logger.ROOT_LOGGER_NAME]=n.debug.LogManager.rootLogger_,n.debug.LogManager.rootLogger_.setLevel(n.debug.Logger.Level.CONFIG))};
n.debug.LogManager.getLoggers=function(){return n.debug.LogManager.loggers_};n.debug.LogManager.getRoot=function(){n.debug.LogManager.initialize();return n.debug.LogManager.rootLogger_};n.debug.LogManager.getLogger=function(b){n.debug.LogManager.initialize();return n.debug.LogManager.loggers_[b]||n.debug.LogManager.createLogger_(b)};
n.debug.LogManager.createFunctionForCatchErrors=function(b){return function(c){var d=b||n.debug.LogManager.getRoot();n.debug.LOGGING_ENABLED&&d.log(n.debug.Logger.Level.SEVERE,"Error: "+c.message+" ("+c.fileName+" @ Line: "+c.line+")",void 0)}};
n.debug.LogManager.createLogger_=function(b){var c=new n.debug.Logger(b);if(n.debug.Logger.ENABLE_HIERARCHY){var d=b.lastIndexOf("."),e=b.substr(d+1);d=n.debug.LogManager.getLogger(b.substr(0,d));d.getChildren()[e]=c;c.parent_=d}return n.debug.LogManager.loggers_[b]=c};n.json={};n.json.USE_NATIVE_JSON=!1;n.json.TRY_NATIVE_JSON=!1;n.json.isValid=function(b){return/^\s*$/.test(b)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(b.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))};n.json.errorLogger_=n.nullFunction;n.json.setErrorLogger=function(b){n.json.errorLogger_=b};
n.json.parse=n.json.USE_NATIVE_JSON?n.global.JSON.parse:function(b){if(n.json.TRY_NATIVE_JSON)try{return n.global.JSON.parse(b)}catch(e){var c=e}b=String(b);if(n.json.isValid(b))try{var d=eval("("+b+")");c&&n.json.errorLogger_("Invalid JSON: "+b,c);return d}catch(e){}throw Error("Invalid JSON string: "+b);};n.json.serialize=n.json.USE_NATIVE_JSON?n.global.JSON.stringify:function(b,c){return(new n.json.Serializer(c)).serialize(b)};n.json.Serializer=function(b){this.replacer_=b};
n.json.Serializer.prototype.serialize=function(b){var c=[];S(this,b,c);return c.join("")};
var S=function(b,c,d){if(null==c)d.push("null");else{if("object"==typeof c){if(n.isArray(c)){var e=c;c=e.length;d.push("[");for(var f="",g=0;g<c;g++)d.push(f),f=e[g],S(b,b.replacer_?b.replacer_.call(e,String(g),f):f,d),f=",";d.push("]");return}if(c instanceof String||c instanceof Number||c instanceof Boolean)c=c.valueOf();else{d.push("{");g="";for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(f=c[e],"function"!=typeof f&&(d.push(g),fa(e,d),d.push(":"),S(b,b.replacer_?b.replacer_.call(c,e,f):
f,d),g=","));d.push("}");return}}switch(typeof c){case "string":fa(c,d);break;case "number":d.push(isFinite(c)&&!isNaN(c)?String(c):"null");break;case "boolean":d.push(String(c));break;case "function":d.push("null");break;default:throw Error("Unknown type: "+typeof c);}}};n.json.Serializer.charToJsonCharCache_={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"};
n.json.Serializer.charsToReplace_=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;var fa=function(b,c){c.push('"',b.replace(n.json.Serializer.charsToReplace_,function(b){var c=n.json.Serializer.charToJsonCharCache_[b];c||(c="\\u"+(b.charCodeAt(0)|65536).toString(16).substr(1),n.json.Serializer.charToJsonCharCache_[b]=c);return c}),'"')};n.json.hybrid={};n.json.hybrid.stringify=n.json.USE_NATIVE_JSON?n.global.JSON.stringify:function(b){if(n.global.JSON)try{return n.global.JSON.stringify(b)}catch(c){}return n.json.serialize(b)};n.json.hybrid.parse_=function(b){var c=n.json.parse;if(n.global.JSON)try{var d=n.global.JSON.parse(b);n.asserts.assertObject(d);return d}catch(e){}d=c(b);n.asserts.assert(d);return d};n.json.hybrid.parse=n.json.USE_NATIVE_JSON?n.global.JSON.parse:function(b){return n.json.hybrid.parse_(b)};n.log={};n.log.ENABLED=n.debug.LOGGING_ENABLED;n.log.ROOT_LOGGER_NAME=n.debug.Logger.ROOT_LOGGER_NAME;n.log.Logger=n.debug.Logger;n.log.Level=n.debug.Logger.Level;n.log.LogRecord=n.debug.LogRecord;n.log.getLogger=function(b,c){return n.log.ENABLED?(b=n.debug.LogManager.getLogger(b),c&&b&&b.setLevel(c),b):null};n.log.addHandler=function(b,c){n.log.ENABLED&&b&&b.addHandler(c)};n.log.removeHandler=function(b,c){return n.log.ENABLED&&b?b.removeHandler(c):!1};
n.log.log=function(b,c,d,e){n.log.ENABLED&&b&&b.log(c,d,e)};n.log.error=function(b,c,d){n.log.ENABLED&&b&&n.debug.LOGGING_ENABLED&&b.log(n.debug.Logger.Level.SEVERE,c,d)};n.log.warning=function(b,c,d){n.log.ENABLED&&b&&b.warning(c,d)};n.log.info=function(b,c,d){n.log.ENABLED&&b&&b.info(c,d)};n.log.fine=function(b,c,d){n.log.ENABLED&&b&&b.fine(c,d)};n.net={};n.net.ErrorCode={NO_ERROR:0,ACCESS_DENIED:1,FILE_NOT_FOUND:2,FF_SILENT_ERROR:3,CUSTOM_ERROR:4,EXCEPTION:5,HTTP_ERROR:6,ABORT:7,TIMEOUT:8,OFFLINE:9};
n.net.ErrorCode.getDebugMessage=function(b){switch(b){case n.net.ErrorCode.NO_ERROR:return"No Error";case n.net.ErrorCode.ACCESS_DENIED:return"Access denied to content document";case n.net.ErrorCode.FILE_NOT_FOUND:return"File not found";case n.net.ErrorCode.FF_SILENT_ERROR:return"Firefox silently errored";case n.net.ErrorCode.CUSTOM_ERROR:return"Application custom error";case n.net.ErrorCode.EXCEPTION:return"An exception occurred";case n.net.ErrorCode.HTTP_ERROR:return"Http response at 400 or 500 level";
case n.net.ErrorCode.ABORT:return"Request was aborted";case n.net.ErrorCode.TIMEOUT:return"Request timed out";case n.net.ErrorCode.OFFLINE:return"The resource is not available offline";default:return"Unrecognized error code"}};n.net.EventType={COMPLETE:"complete",SUCCESS:"success",ERROR:"error",ABORT:"abort",READY:"ready",READY_STATE_CHANGE:"readystatechange",TIMEOUT:"timeout",INCREMENTAL_DATA:"incrementaldata",PROGRESS:"progress",DOWNLOAD_PROGRESS:"downloadprogress",UPLOAD_PROGRESS:"uploadprogress"};n.net.HttpStatus={CONTINUE:100,SWITCHING_PROTOCOLS:101,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,
PRECONDITION_FAILED:412,REQUEST_ENTITY_TOO_LARGE:413,REQUEST_URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,REQUEST_RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,NETWORK_AUTHENTICATION_REQUIRED:511,QUIRK_IE_NO_CONTENT:1223};
n.net.HttpStatus.isSuccess=function(b){switch(b){case n.net.HttpStatus.OK:case n.net.HttpStatus.CREATED:case n.net.HttpStatus.ACCEPTED:case n.net.HttpStatus.NO_CONTENT:case n.net.HttpStatus.PARTIAL_CONTENT:case n.net.HttpStatus.NOT_MODIFIED:case n.net.HttpStatus.QUIRK_IE_NO_CONTENT:return!0;default:return!1}};n.net.XhrLike=function(){};a=n.net.XhrLike.prototype;a.open=function(){};a.send=function(){};a.abort=function(){};a.setRequestHeader=function(){};a.getResponseHeader=function(){};a.getAllResponseHeaders=function(){};n.net.XmlHttpFactory=function(){};n.net.XmlHttpFactory.prototype.cachedOptions_=null;n.net.XmlHttpFactory.prototype.getOptions=function(){var b;(b=this.cachedOptions_)||(b={},ha(this)&&(b[n.net.XmlHttp.OptionType.USE_NULL_FUNCTION]=!0,b[n.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]=!0),b=this.cachedOptions_=b);return b};n.net.WrapperXmlHttpFactory=function(b,c){this.xhrFactory_=b;this.optionsFactory_=c};n.inherits(n.net.WrapperXmlHttpFactory,n.net.XmlHttpFactory);n.net.WrapperXmlHttpFactory.prototype.createInstance=function(){return this.xhrFactory_()};n.net.WrapperXmlHttpFactory.prototype.getOptions=function(){return this.optionsFactory_()};n.net.XmlHttp=function(){return n.net.XmlHttp.factory_.createInstance()};n.net.XmlHttp.ASSUME_NATIVE_XHR=!1;n.net.XmlHttpDefines={};n.net.XmlHttpDefines.ASSUME_NATIVE_XHR=!1;n.net.XmlHttp.getOptions=function(){return n.net.XmlHttp.factory_.getOptions()};n.net.XmlHttp.OptionType={USE_NULL_FUNCTION:0,LOCAL_REQUEST_ERROR:1};n.net.XmlHttp.ReadyState={UNINITIALIZED:0,LOADING:1,LOADED:2,INTERACTIVE:3,COMPLETE:4};
n.net.XmlHttp.setFactory=function(b,c){n.net.XmlHttp.setGlobalFactory(new n.net.WrapperXmlHttpFactory(n.asserts.assert(b),n.asserts.assert(c)))};n.net.XmlHttp.setGlobalFactory=function(b){n.net.XmlHttp.factory_=b};n.net.DefaultXmlHttpFactory=function(){};n.inherits(n.net.DefaultXmlHttpFactory,n.net.XmlHttpFactory);n.net.DefaultXmlHttpFactory.prototype.createInstance=function(){var b=ha(this);return b?new ActiveXObject(b):new XMLHttpRequest};
var ha=function(b){if(n.net.XmlHttp.ASSUME_NATIVE_XHR||n.net.XmlHttpDefines.ASSUME_NATIVE_XHR)return"";if(!b.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var c=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d=0;d<c.length;d++){var e=c[d];try{return new ActiveXObject(e),b.ieProgId_=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return b.ieProgId_};n.net.XmlHttp.setGlobalFactory(new n.net.DefaultXmlHttpFactory);n.promise={};n.promise.Resolver=function(){};n.Thenable=function(){};n.Thenable.prototype.then=function(){};n.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable";n.Thenable.addImplementation=function(b){b.prototype.then=b.prototype.then;b.prototype[n.Thenable.IMPLEMENTED_BY_PROP]=!0};n.Thenable.isImplementedBy=function(b){if(!b)return!1;try{return!!b[n.Thenable.IMPLEMENTED_BY_PROP]}catch(c){return!1}};n.Promise=function(b,c){this.state_=n.Promise.State_.PENDING;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.executing_=!1;0<n.Promise.UNHANDLED_REJECTION_DELAY?this.unhandledRejectionId_=0:0==n.Promise.UNHANDLED_REJECTION_DELAY&&(this.hadUnhandledRejection_=!1);n.Promise.LONG_STACK_TRACES&&(this.stack_=[],T(this,Error("created")),this.currentStep_=0);if(b!=n.nullFunction)try{var d=this;b.call(c,function(b){U(d,n.Promise.State_.FULFILLED,b)},function(b){if(n.DEBUG&&
!(b instanceof n.Promise.CancellationError))try{if(b instanceof Error)throw b;throw Error("Promise rejected.");}catch(f){}U(d,n.Promise.State_.REJECTED,b)})}catch(e){U(this,n.Promise.State_.REJECTED,e)}};n.Promise.LONG_STACK_TRACES=!1;n.Promise.UNHANDLED_REJECTION_DELAY=0;n.Promise.State_={PENDING:0,BLOCKED:1,FULFILLED:2,REJECTED:3};n.Promise.CallbackEntry_=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};
n.Promise.CallbackEntry_.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};n.Promise.DEFAULT_MAX_UNUSED=100;n.Promise.freelist_=new n.async.FreeList(function(){return new n.Promise.CallbackEntry_},function(b){b.reset()},n.Promise.DEFAULT_MAX_UNUSED);n.Promise.getCallbackEntry_=function(b,c,d){var e=n.Promise.freelist_.get();e.onFulfilled=b;e.onRejected=c;e.context=d;return e};n.Promise.returnEntry_=function(b){n.Promise.freelist_.put(b)};
n.Promise.resolve=function(b){if(b instanceof n.Promise)return b;var c=new n.Promise(n.nullFunction);U(c,n.Promise.State_.FULFILLED,b);return c};n.Promise.reject=function(b){return new n.Promise(function(c,d){d(b)})};n.Promise.resolveThen_=function(b,c,d){n.Promise.maybeThen_(b,c,d,null)||n.async.run(n.partial(c,b))};n.Promise.race=function(b){return new n.Promise(function(c,d){b.length||c(void 0);for(var e=0,f;e<b.length;e++)f=b[e],n.Promise.resolveThen_(f,c,d)})};
n.Promise.all=function(b){return new n.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(b,d){e--;f[b]=d;0==e&&c(f)},h=function(b){d(b)},l=0,m;l<b.length;l++)m=b[l],n.Promise.resolveThen_(m,n.partial(g,l),h);else c(f)})};
n.Promise.allSettled=function(b){return new n.Promise(function(c){var d=b.length,e=[];if(d)for(var f=function(b,f,g){d--;e[b]=f?{fulfilled:!0,value:g}:{fulfilled:!1,reason:g};0==d&&c(e)},g=0,h;g<b.length;g++)h=b[g],n.Promise.resolveThen_(h,n.partial(f,g,!0),n.partial(f,g,!1));else c(e)})};
n.Promise.firstFulfilled=function(b){return new n.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(b){c(b)},h=function(b,c){e--;f[b]=c;0==e&&d(f)},l=0,m;l<b.length;l++)m=b[l],n.Promise.resolveThen_(m,g,n.partial(h,l));else c(void 0)})};n.Promise.withResolver=function(){var b,c,d=new n.Promise(function(d,f){b=d;c=f});return new n.Promise.Resolver_(d,b,c)};
n.Promise.prototype.then=function(b,c,d){null!=b&&n.asserts.assertFunction(b,"opt_onFulfilled should be a function.");null!=c&&n.asserts.assertFunction(c,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");n.Promise.LONG_STACK_TRACES&&T(this,Error("then"));return ia(this,n.isFunction(b)?b:null,n.isFunction(c)?c:null,d)};n.Thenable.addImplementation(n.Promise);
var ja=function(b,c){n.Promise.LONG_STACK_TRACES&&T(b,Error("thenCatch"));return ia(b,null,c,void 0)};n.Promise.prototype.cancel=function(b){this.state_==n.Promise.State_.PENDING&&n.async.run(function(){var c=new n.Promise.CancellationError(b);ka(this,c)},this)};
var ka=function(b,c){if(b.state_==n.Promise.State_.PENDING)if(b.parent_){var d=b.parent_;if(d.callbackEntries_){for(var e=0,f=null,g=null,h=d.callbackEntries_;h&&(h.always||(e++,h.child==b&&(f=h),!(f&&1<e)));h=h.next)f||(g=h);f&&(d.state_==n.Promise.State_.PENDING&&1==e?ka(d,c):(g?(e=g,n.asserts.assert(d.callbackEntries_),n.asserts.assert(null!=e),e.next==d.callbackEntriesTail_&&(d.callbackEntriesTail_=e),e.next=e.next.next):la(d),ma(d,f,n.Promise.State_.REJECTED,c)))}b.parent_=null}else U(b,n.Promise.State_.REJECTED,
c)},oa=function(b,c){b.callbackEntries_||b.state_!=n.Promise.State_.FULFILLED&&b.state_!=n.Promise.State_.REJECTED||na(b);n.asserts.assert(null!=c.onFulfilled);b.callbackEntriesTail_?b.callbackEntriesTail_.next=c:b.callbackEntries_=c;b.callbackEntriesTail_=c},ia=function(b,c,d,e){var f=n.Promise.getCallbackEntry_(null,null,null);f.child=new n.Promise(function(b,h){f.onFulfilled=c?function(d){try{var f=c.call(e,d);b(f)}catch(p){h(p)}}:b;f.onRejected=d?function(c){try{var f=d.call(e,c);!n.isDef(f)&&
c instanceof n.Promise.CancellationError?h(c):b(f)}catch(p){h(p)}}:h});f.child.parent_=b;oa(b,f);return f.child};n.Promise.prototype.unblockAndFulfill_=function(b){n.asserts.assert(this.state_==n.Promise.State_.BLOCKED);this.state_=n.Promise.State_.PENDING;U(this,n.Promise.State_.FULFILLED,b)};n.Promise.prototype.unblockAndReject_=function(b){n.asserts.assert(this.state_==n.Promise.State_.BLOCKED);this.state_=n.Promise.State_.PENDING;U(this,n.Promise.State_.REJECTED,b)};
var U=function(b,c,d){b.state_==n.Promise.State_.PENDING&&(b===d&&(c=n.Promise.State_.REJECTED,d=new TypeError("Promise cannot resolve to itself")),b.state_=n.Promise.State_.BLOCKED,n.Promise.maybeThen_(d,b.unblockAndFulfill_,b.unblockAndReject_,b)||(b.result_=d,b.state_=c,b.parent_=null,na(b),c!=n.Promise.State_.REJECTED||d instanceof n.Promise.CancellationError||n.Promise.addUnhandledRejection_(b,d)))};
n.Promise.maybeThen_=function(b,c,d,e){if(b instanceof n.Promise)return null!=c&&n.asserts.assertFunction(c,"opt_onFulfilled should be a function."),null!=d&&n.asserts.assertFunction(d,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),n.Promise.LONG_STACK_TRACES&&T(b,Error("then")),oa(b,n.Promise.getCallbackEntry_(c||n.nullFunction,d||null,e)),!0;if(n.Thenable.isImplementedBy(b))return b.then(c,d,e),!0;if(n.isObject(b))try{var f=b.then;if(n.isFunction(f))return n.Promise.tryThen_(b,
f,c,d,e),!0}catch(g){return d.call(e,g),!0}return!1};n.Promise.tryThen_=function(b,c,d,e,f){var g=!1,h=function(b){g||(g=!0,d.call(f,b))},l=function(b){g||(g=!0,e.call(f,b))};try{c.call(b,h,l)}catch(m){l(m)}};var na=function(b){b.executing_||(b.executing_=!0,n.async.run(b.executeCallbacks_,b))},la=function(b){var c=null;b.callbackEntries_&&(c=b.callbackEntries_,b.callbackEntries_=c.next,c.next=null);b.callbackEntries_||(b.callbackEntriesTail_=null);null!=c&&n.asserts.assert(null!=c.onFulfilled);return c};
n.Promise.prototype.executeCallbacks_=function(){for(var b;b=la(this);)n.Promise.LONG_STACK_TRACES&&this.currentStep_++,ma(this,b,this.state_,this.result_);this.executing_=!1};
var ma=function(b,c,d,e){if(d==n.Promise.State_.REJECTED&&c.onRejected&&!c.always)if(0<n.Promise.UNHANDLED_REJECTION_DELAY)for(;b&&b.unhandledRejectionId_;b=b.parent_)n.global.clearTimeout(b.unhandledRejectionId_),b.unhandledRejectionId_=0;else if(0==n.Promise.UNHANDLED_REJECTION_DELAY)for(;b&&b.hadUnhandledRejection_;b=b.parent_)b.hadUnhandledRejection_=!1;if(c.child)c.child.parent_=null,n.Promise.invokeCallback_(c,d,e);else try{c.always?c.onFulfilled.call(c.context):n.Promise.invokeCallback_(c,
d,e)}catch(f){n.Promise.handleRejection_.call(null,f)}n.Promise.returnEntry_(c)};n.Promise.invokeCallback_=function(b,c,d){c==n.Promise.State_.FULFILLED?b.onFulfilled.call(b.context,d):b.onRejected&&b.onRejected.call(b.context,d)};
var T=function(b,c){if(n.Promise.LONG_STACK_TRACES&&n.isString(c.stack)){var d=c.stack.split("\n",4)[3];c=c.message;c+=Array(11-c.length).join(" ");b.stack_.push(c+d)}},pa=function(b,c){if(n.Promise.LONG_STACK_TRACES&&c&&n.isString(c.stack)&&b.stack_.length){for(var d=["Promise trace:"],e=b;e;e=e.parent_){for(var f=b.currentStep_;0<=f;f--)d.push(e.stack_[f]);d.push("Value: ["+(e.state_==n.Promise.State_.REJECTED?"REJECTED":"FULFILLED")+"] <"+String(e.result_)+">")}c.stack+="\n\n"+d.join("\n")}};
n.Promise.addUnhandledRejection_=function(b,c){0<n.Promise.UNHANDLED_REJECTION_DELAY?b.unhandledRejectionId_=n.global.setTimeout(function(){pa(b,c);n.Promise.handleRejection_.call(null,c)},n.Promise.UNHANDLED_REJECTION_DELAY):0==n.Promise.UNHANDLED_REJECTION_DELAY&&(b.hadUnhandledRejection_=!0,n.async.run(function(){b.hadUnhandledRejection_&&(pa(b,c),n.Promise.handleRejection_.call(null,c))}))};n.Promise.handleRejection_=n.async.throwException;
n.Promise.setUnhandledRejectionHandler=function(b){n.Promise.handleRejection_=b};n.Promise.CancellationError=function(b){n.debug.Error.call(this,b)};n.inherits(n.Promise.CancellationError,n.debug.Error);n.Promise.CancellationError.prototype.name="cancel";n.Promise.Resolver_=function(b,c,d){this.promise=b;this.resolve=c;this.reject=d};n.Timer=function(b,c){n.events.EventTarget.call(this);this.interval_=b||1;this.timerObject_=c||n.Timer.defaultTimerObject;this.boundTick_=n.bind(this.tick_,this);this.last_=n.now()};n.inherits(n.Timer,n.events.EventTarget);n.Timer.MAX_TIMEOUT_=2147483647;n.Timer.INVALID_TIMEOUT_ID_=-1;n.Timer.prototype.enabled=!1;n.Timer.defaultTimerObject=n.global;n.Timer.intervalScale=.8;a=n.Timer.prototype;a.timer_=null;
a.setInterval=function(b){this.interval_=b;this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()};
a.tick_=function(){if(this.enabled){var b=n.now()-this.last_;0<b&&b<this.interval_*n.Timer.intervalScale?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-b):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent(n.Timer.TICK),this.enabled&&(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=n.now()))}};
a.start=function(){this.enabled=!0;this.timer_||(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=n.now())};a.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};a.disposeInternal=function(){n.Timer.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};n.Timer.TICK="tick";
n.Timer.callOnce=function(b,c,d){if(n.isFunction(b))d&&(b=n.bind(b,d));else if(b&&"function"==typeof b.handleEvent)b=n.bind(b.handleEvent,b);else throw Error("Invalid listener argument");return Number(c)>n.Timer.MAX_TIMEOUT_?n.Timer.INVALID_TIMEOUT_ID_:n.Timer.defaultTimerObject.setTimeout(b,c||0)};n.Timer.clear=function(b){n.Timer.defaultTimerObject.clearTimeout(b)};
n.Timer.promise=function(b,c){var d=null;return ja(new n.Promise(function(e,f){d=n.Timer.callOnce(function(){e(c)},b);d==n.Timer.INVALID_TIMEOUT_ID_&&f(Error("Failed to schedule timer."))}),function(b){n.Timer.clear(d);throw b;})};n.net.XhrIo=function(b){n.events.EventTarget.call(this);this.headers=new n.structs.Map;this.xmlHttpFactory_=b||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastError_=this.lastMethod_=this.lastUri_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_=n.net.XhrIo.ResponseType.DEFAULT;this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1};n.inherits(n.net.XhrIo,n.events.EventTarget);
n.net.XhrIo.ResponseType={DEFAULT:"",TEXT:"text",DOCUMENT:"document",BLOB:"blob",ARRAY_BUFFER:"arraybuffer"};n.net.XhrIo.prototype.logger_=n.log.getLogger("goog.net.XhrIo");n.net.XhrIo.CONTENT_TYPE_HEADER="Content-Type";n.net.XhrIo.CONTENT_TRANSFER_ENCODING="Content-Transfer-Encoding";n.net.XhrIo.HTTP_SCHEME_PATTERN=/^https?$/i;n.net.XhrIo.METHODS_WITH_FORM_DATA=["POST","PUT"];n.net.XhrIo.FORM_CONTENT_TYPE="application/x-www-form-urlencoded;charset=utf-8";n.net.XhrIo.XHR2_TIMEOUT_="timeout";
n.net.XhrIo.XHR2_ON_TIMEOUT_="ontimeout";n.net.XhrIo.sendInstances_=[];n.net.XhrIo.send=function(b,c,d,e,f,g,h){var l=new n.net.XhrIo;n.net.XhrIo.sendInstances_.push(l);c&&l.listen(n.net.EventType.COMPLETE,c);l.listenOnce(n.net.EventType.READY,l.cleanupSend_);g&&(l.timeoutInterval_=Math.max(0,g));h&&(l.withCredentials_=h);l.send(b,d,e,f);return l};n.net.XhrIo.cleanup=function(){for(var b=n.net.XhrIo.sendInstances_;b.length;)b.pop().dispose()};
n.net.XhrIo.protectEntryPoints=function(b){n.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=b.protectEntryPoint(n.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)};n.net.XhrIo.prototype.cleanupSend_=function(){this.dispose();n.array.remove(n.net.XhrIo.sendInstances_,this)};
n.net.XhrIo.prototype.send=function(b,c,d,e){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+b);c=c?c.toUpperCase():"GET";this.lastUri_=b;this.lastError_="";this.lastMethod_=c;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.xmlHttpFactory_?this.xmlHttpFactory_.createInstance():n.net.XmlHttp();this.xhrOptions_=this.xmlHttpFactory_?this.xmlHttpFactory_.getOptions():n.net.XmlHttp.getOptions();this.xhr_.onreadystatechange=n.bind(this.onReadyStateChange_,
this);this.progressEventsEnabled_&&"onprogress"in this.xhr_&&(this.xhr_.onprogress=n.bind(function(b){this.onProgressHandler_(b,!0)},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=n.bind(this.onProgressHandler_,this)));try{n.log.fine(this.logger_,V(this,"Opening Xhr")),this.inOpen_=!0,this.xhr_.open(c,String(b),!0),this.inOpen_=!1}catch(g){n.log.fine(this.logger_,V(this,"Error opening Xhr: "+g.message));qa(this,g);return}b=d||"";var f=this.headers.clone();e&&n.structs.forEach(e,function(b,c){f.set(c,
b)});e=n.array.find(f.getKeys(),n.net.XhrIo.isContentTypeHeader_);d=n.global.FormData&&b instanceof n.global.FormData;!n.array.contains(n.net.XhrIo.METHODS_WITH_FORM_DATA,c)||e||d||f.set(n.net.XhrIo.CONTENT_TYPE_HEADER,n.net.XhrIo.FORM_CONTENT_TYPE);f.forEach(function(b,c){this.xhr_.setRequestHeader(c,b)},this);this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);
try{ra(this),0<this.timeoutInterval_&&(this.useXhr2Timeout_=n.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_),n.log.fine(this.logger_,V(this,"Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_[n.net.XhrIo.XHR2_TIMEOUT_]=this.timeoutInterval_,this.xhr_[n.net.XhrIo.XHR2_ON_TIMEOUT_]=n.bind(this.timeout_,this)):this.timeoutId_=n.Timer.callOnce(this.timeout_,this.timeoutInterval_,this)),n.log.fine(this.logger_,V(this,"Sending request")),
this.inSend_=!0,this.xhr_.send(b),this.inSend_=!1}catch(g){n.log.fine(this.logger_,V(this,"Send error: "+g.message)),qa(this,g)}};n.net.XhrIo.shouldUseXhr2Timeout_=function(b){return n.userAgent.IE&&n.userAgent.isVersionOrHigher(9)&&n.isNumber(b[n.net.XhrIo.XHR2_TIMEOUT_])&&n.isDef(b[n.net.XhrIo.XHR2_ON_TIMEOUT_])};n.net.XhrIo.isContentTypeHeader_=function(b){return n.string.caseInsensitiveEquals(b)};
n.net.XhrIo.prototype.timeout_=function(){"undefined"!=typeof n&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",n.log.fine(this.logger_,V(this,this.lastError_)),this.dispatchEvent(n.net.EventType.TIMEOUT),this.abort(n.net.ErrorCode.TIMEOUT))};var qa=function(b,c){b.active_=!1;b.xhr_&&(b.inAbort_=!0,b.xhr_.abort(),b.inAbort_=!1);b.lastError_=c;sa(b);W(b)},sa=function(b){b.errorDispatched_||(b.errorDispatched_=!0,b.dispatchEvent(n.net.EventType.COMPLETE),b.dispatchEvent(n.net.EventType.ERROR))};
n.net.XhrIo.prototype.abort=function(){this.xhr_&&this.active_&&(n.log.fine(this.logger_,V(this,"Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.dispatchEvent(n.net.EventType.COMPLETE),this.dispatchEvent(n.net.EventType.ABORT),W(this))};n.net.XhrIo.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),W(this,!0));n.net.XhrIo.superClass_.disposeInternal.call(this)};
n.net.XhrIo.prototype.onReadyStateChange_=function(){if(!this.isDisposed())if(this.inOpen_||this.inSend_||this.inAbort_)ta(this);else this.onReadyStateChangeEntryPoint_()};n.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=function(){ta(this)};
var ta=function(b){if(b.active_&&"undefined"!=typeof n)if(b.xhrOptions_[n.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR]&&X(b)==n.net.XmlHttp.ReadyState.COMPLETE&&2==Y(b))n.log.fine(b.logger_,V(b,"Local request error detected and ignored"));else if(b.inSend_&&X(b)==n.net.XmlHttp.ReadyState.COMPLETE)n.Timer.callOnce(b.onReadyStateChange_,0,b);else if(b.dispatchEvent(n.net.EventType.READY_STATE_CHANGE),Z(b)){n.log.fine(b.logger_,V(b,"Request complete"));b.active_=!1;try{if(b.isSuccess())b.dispatchEvent(n.net.EventType.COMPLETE),
b.dispatchEvent(n.net.EventType.SUCCESS);else{try{var c=X(b)>n.net.XmlHttp.ReadyState.LOADED?b.xhr_.statusText:""}catch(d){n.log.fine(b.logger_,"Can not get status: "+d.message),c=""}b.lastError_=c+" ["+Y(b)+"]";sa(b)}}finally{W(b)}}};
n.net.XhrIo.prototype.onProgressHandler_=function(b,c){n.asserts.assert(b.type===n.net.EventType.PROGRESS,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(n.net.XhrIo.buildProgressEvent_(b,n.net.EventType.PROGRESS));this.dispatchEvent(n.net.XhrIo.buildProgressEvent_(b,c?n.net.EventType.DOWNLOAD_PROGRESS:n.net.EventType.UPLOAD_PROGRESS))};n.net.XhrIo.buildProgressEvent_=function(b,c){return{type:c,lengthComputable:b.lengthComputable,loaded:b.loaded,total:b.total}};
var W=function(b,c){if(b.xhr_){ra(b);var d=b.xhr_,e=b.xhrOptions_[n.net.XmlHttp.OptionType.USE_NULL_FUNCTION]?n.nullFunction:null;b.xhr_=null;b.xhrOptions_=null;c||b.dispatchEvent(n.net.EventType.READY);try{d.onreadystatechange=e}catch(f){n.log.error(b.logger_,"Problem encountered resetting onreadystatechange: "+f.message)}}},ra=function(b){b.xhr_&&b.useXhr2Timeout_&&(b.xhr_[n.net.XhrIo.XHR2_ON_TIMEOUT_]=null);n.isNumber(b.timeoutId_)&&(n.Timer.clear(b.timeoutId_),b.timeoutId_=null)},Z=function(b){return X(b)==
n.net.XmlHttp.ReadyState.COMPLETE};n.net.XhrIo.prototype.isSuccess=function(){var b=Y(this),c;if(!(c=n.net.HttpStatus.isSuccess(b))){if(b=0===b)b=n.uri.utils.getEffectiveScheme(String(this.lastUri_)),b=!n.net.XhrIo.HTTP_SCHEME_PATTERN.test(b);c=b}return c};var X=function(b){return b.xhr_?b.xhr_.readyState:n.net.XmlHttp.ReadyState.UNINITIALIZED},Y=function(b){try{return X(b)>n.net.XmlHttp.ReadyState.LOADED?b.xhr_.status:-1}catch(c){return-1}};
n.net.XhrIo.prototype.getResponseHeader=function(b){if(this.xhr_&&Z(this))return b=this.xhr_.getResponseHeader(b),n.isNull(b)?void 0:b};n.net.XhrIo.prototype.getAllResponseHeaders=function(){return this.xhr_&&Z(this)?this.xhr_.getAllResponseHeaders():""};var V=function(b,c){return c+" ["+b.lastMethod_+" "+b.lastUri_+" "+Y(b)+"]"};n.debug.entryPointRegistry.register(function(b){n.net.XhrIo.prototype.onReadyStateChangeEntryPoint_=b(n.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)});n.craw.AppAuthenticator=function(b,c,d){this.appUrl_=b;this.authCompletedCallback_=c;this.authFailedCallback_=d||n.functions.NULL;this.uberTokenAttempts_=0};n.craw.AppAuthenticator.UBERAUTH_URL_="https://www.google.com/accounts/OAuthLogin?issueuberauth=1";
n.craw.AppAuthenticator.prototype.onAuthTokenReceived_=function(b){if(n.isDef(b)){var c=n.bind(this.onUberAuthResponse_,this),d="source="+chrome.runtime.getManifest().oauth2.client_id,e={Authorization:"Bearer "+b,"Content-Type":"application/x-www-form-urlencoded"},f=n.bind(function(){0===this.uberTokenAttempts_?(++this.uberTokenAttempts_,chrome.identity.removeCachedAuthToken({token:b},n.bind(this.authenticate,this))):this.authFailedCallback_()},this);n.net.XhrIo.send(n.craw.AppAuthenticator.UBERAUTH_URL_,
function(){if(this.isSuccess()){try{var b=this.xhr_?this.xhr_.responseText:""}catch(h){n.log.fine(this.logger_,"Can not get responseText: "+h.message),b=""}c(b)}else f()},"POST",d,e)}else this.authFailedCallback_()};n.craw.AppAuthenticator.prototype.onUberAuthResponse_=function(b){var c=n.Uri.parse("https://accounts.google.com/MergeSession");M(c,"source","appsv2");M(c,"uberauth",b);M(c,"continue",this.appUrl_);this.authCompletedCallback_(c.toString())};
n.craw.AppAuthenticator.prototype.authenticate=function(){chrome.identity.getAuthToken({interactive:!0},n.bind(this.onAuthTokenReceived_,this))};n.craw.WindowConfig=function(b,c){this.url_=b;this.useAuth_=c};n.craw.WindowConfig.prototype.getUrl=function(){return this.url_};n.craw.WindowConfig.prototype.getUseAuth=function(){return this.useAuth_};n.craw.AppWindow=function(b){this.config_=b;this.authenticator_=new n.craw.AppAuthenticator(b.getUrl(),n.bind(this.navigateToUrl_,this),n.bind(this.showOfflineWarning,this));this.webview_=n.dom.getDocument().querySelector("webview");this.hasLaunched_=!1;this.loadingOverlay_=n.dom.getElement("loading_overlay");this.offlineOverlay_=n.dom.getElement("offline_overlay");this.customStatus_=null;this.delegate_=n.craw.AppWindowDelegate.createDefaultImpl(this);this.webview_.addEventListener("contentload",
n.bind(this.onContentLoad_,this),!1);this.webview_.addEventListener("newwindow",n.bind(this.onNewWindow_,this),!1);this.delegate_.onWindowReady();this.pollOnlineStatus_()};n.craw.AppWindow.REQUEST_FILTER_URL_PATTERN_="https://*.google.com/*";n.craw.AppWindow.REQUEST_FILTER_TYPE_="main_frame";n.craw.AppWindow.QUERY_NOCACHE_PARAMETER_="nocache";n.craw.AppWindow.NETWORK_TEST_URLS_=["https://www.google.com/images/cleardot.gif","https://www.google.com/images/dot2.gif","https://www.google.com/images/x2.gif"];
n.craw.AppWindow.prototype.navigateToUrl_=function(b){this.webview_.src=b;this.hasLaunched_=!0};n.craw.AppWindow.prototype.onContentLoad_=function(){};n.craw.AppWindow.prototype.onNewWindow_=function(){};var ua=function(b){b.hasLaunched_=!1;b.config_.getUseAuth()?b.authenticator_.authenticate():b.navigateToUrl_(b.config_.getUrl())};a=n.craw.AppWindow.prototype;a.hideVisibleOverlays_=function(){this.loadingOverlay_.style.display="none";this.offlineOverlay_.style.display="none"};
a.fadeInOfflineOverlay_=function(){this.offlineOverlay_.style.opacity="1"};a.showOfflineWarning=function(){n.dom.getElement("app_unavailable").innerText=this.delegate_.getAppUnavailableMessage();n.dom.getElement("connect_to_network").innerText=this.customStatus_||chrome.i18n.getMessage("craw_connect_to_network");this.offlineOverlay_.style.display="-webkit-flex";this.offlineOverlay_.style.pointerEvents="all";n.Timer.callOnce(n.bind(this.fadeInOfflineOverlay_,this),0)};
a.setOnlineStatus_=function(b){n.Timer.callOnce(n.bind(this.pollOnlineStatus_,this),1E3);b?this.hasLaunched_?this.delegate_.finishedLaunch()&&(this.offlineOverlay_.style.opacity="0",this.offlineOverlay_.style.pointerEvents="none",this.loadingOverlay_.style.opacity="0",this.loadingOverlay_.style.pointerEvents="none",n.Timer.callOnce(n.bind(this.hideVisibleOverlays_,this),250)):ua(this):this.showOfflineWarning()};
a.pollOnlineStatus_=function(){if(this.customStatus_=this.delegate_.pollOnlineStatus())this.setOnlineStatus_(!1);else{var b=n.bind(this.setOnlineStatus_,this),c=new n.Uri(n.craw.AppWindow.NETWORK_TEST_URLS_[n.math.randomInt()]);M(c,n.craw.AppWindow.QUERY_NOCACHE_PARAMETER_,Date.now().toString());n.net.XhrIo.send(c.toString(),function(){b(this.isSuccess())})}};window.onload=function(){ua(new n.craw.AppWindow(n.dom.getWindow().crawConfig_))};
