Created
January 8, 2018 21:05
-
-
Save erwinmombay/c35c7d714fc2e7fab1c7531161339645 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| (function() { | |
| var $JSCompiler_prototypeAlias$$, $$jscomp$objectCreate$$ = "function" == typeof Object.create ? Object.create : function($prototype$$) { | |
| function $ctor$$() {} | |
| $ctor$$.prototype = $prototype$$; | |
| return new $ctor$$ | |
| }, $JSCompiler_temp$jscomp$209$$; | |
| if ("function" == typeof Object.setPrototypeOf) $JSCompiler_temp$jscomp$209$$ = Object.setPrototypeOf; | |
| else { | |
| var $JSCompiler_inline_result$jscomp$210$$; | |
| a: { | |
| var $JSCompiler_x$jscomp$inline_505$$ = { | |
| a: !0 | |
| }, $JSCompiler_y$jscomp$inline_506$$ = {}; | |
| try { | |
| $JSCompiler_y$jscomp$inline_506$$.__proto__ = $JSCompiler_x$jscomp$inline_505$$; | |
| $JSCompiler_inline_result$jscomp$210$$ = $JSCompiler_y$jscomp$inline_506$$.a; | |
| break a | |
| } catch ($JSCompiler_e$jscomp$inline_507$$) {} | |
| $JSCompiler_inline_result$jscomp$210$$ = !1 | |
| } | |
| $JSCompiler_temp$jscomp$209$$ = $JSCompiler_inline_result$jscomp$210$$ ? function($target$jscomp$55$$, $proto$jscomp$3$$) { | |
| $target$jscomp$55$$.__proto__ = $proto$jscomp$3$$; | |
| if ($target$jscomp$55$$.__proto__ !== $proto$jscomp$3$$) throw new TypeError($target$jscomp$55$$ + " is not extensible"); | |
| return $target$jscomp$55$$ | |
| } : null | |
| } | |
| var $$jscomp$setPrototypeOf$$ = $JSCompiler_temp$jscomp$209$$; | |
| function $$jscomp$inherits$$($childCtor$$, $parentCtor$$) { | |
| $childCtor$$.prototype = $$jscomp$objectCreate$$($parentCtor$$.prototype); | |
| $childCtor$$.prototype.constructor = $childCtor$$; | |
| if ($$jscomp$setPrototypeOf$$) $$jscomp$setPrototypeOf$$($childCtor$$, $parentCtor$$); | |
| else for (var $p$jscomp$1$$ in $parentCtor$$) if ("prototype" != $p$jscomp$1$$) if (Object.defineProperties) { | |
| var $descriptor$jscomp$1$$ = Object.getOwnPropertyDescriptor($parentCtor$$, $p$jscomp$1$$); | |
| $descriptor$jscomp$1$$ && Object.defineProperty($childCtor$$, | |
| $p$jscomp$1$$, $descriptor$jscomp$1$$) | |
| } else $childCtor$$[$p$jscomp$1$$] = $parentCtor$$[$p$jscomp$1$$]; $childCtor$$.$superClass_$ = $parentCtor$$.prototype | |
| } | |
| var $$jscomp$global$$ = function($maybeGlobal$$) { | |
| return "undefined" != typeof window && window === $maybeGlobal$$ ? $maybeGlobal$$ : "undefined" != typeof global && null != global ? global : $maybeGlobal$$ | |
| }(this), | |
| $$jscomp$defineProperty$$ = "function" == typeof Object.defineProperties ? Object.defineProperty : function($target$jscomp$56$$, $property$jscomp$4$$, $descriptor$jscomp$2$$) { | |
| $target$jscomp$56$$ != Array.prototype && $target$jscomp$56$$ != Object.prototype && ($target$jscomp$56$$[$property$jscomp$4$$] = $descriptor$jscomp$2$$.value) | |
| }; | |
| function $$jscomp$initSymbol$$() { | |
| $$jscomp$initSymbol$$ = function() {}; | |
| $$jscomp$global$$.Symbol || ($$jscomp$global$$.Symbol = $$jscomp$Symbol$$) | |
| } | |
| var $$jscomp$Symbol$$ = function() { | |
| var $counter$$ = 0; | |
| return function($opt_description$jscomp$1$$) { | |
| return "jscomp_symbol_" + ($opt_description$jscomp$1$$ || "") + $counter$$++ | |
| } | |
| }(); | |
| function $$jscomp$initSymbolIterator$$() { | |
| $$jscomp$initSymbol$$(); | |
| var $symbolIterator$$ = $$jscomp$global$$.Symbol.iterator; | |
| $symbolIterator$$ || ($symbolIterator$$ = $$jscomp$global$$.Symbol.iterator = $$jscomp$global$$.Symbol("iterator")); | |
| "function" != typeof Array.prototype[$symbolIterator$$] && $$jscomp$defineProperty$$(Array.prototype, $symbolIterator$$, { | |
| configurable: !0, | |
| writable: !0, | |
| value: function() { | |
| return $$jscomp$arrayIterator$$(this) | |
| } | |
| }); | |
| $$jscomp$initSymbolIterator$$ = function() {} | |
| } | |
| function $$jscomp$arrayIterator$$($array$jscomp$5$$) { | |
| var $index$jscomp$54$$ = 0; | |
| return $$jscomp$iteratorPrototype$$(function() { | |
| return $index$jscomp$54$$ < $array$jscomp$5$$.length ? { | |
| done: !1, | |
| value: $array$jscomp$5$$[$index$jscomp$54$$++] | |
| } : { | |
| done: !0 | |
| } | |
| }) | |
| } | |
| function $$jscomp$iteratorPrototype$$($next$$) { | |
| $$jscomp$initSymbolIterator$$(); | |
| var $iterator$jscomp$6$$ = { | |
| next: $next$$ | |
| }; | |
| $iterator$jscomp$6$$[$$jscomp$global$$.Symbol.iterator] = function() { | |
| return this | |
| }; | |
| return $iterator$jscomp$6$$ | |
| } | |
| function $toUpperCase$$module$src$string$$($_match$$, $character$$) { | |
| return $character$$.toUpperCase() | |
| } | |
| function $endsWith$$module$src$string$$($string$jscomp$5$$, $suffix$$) { | |
| var $index$jscomp$55$$ = $string$jscomp$5$$.length - $suffix$$.length; | |
| return 0 <= $index$jscomp$55$$ && $string$jscomp$5$$.indexOf($suffix$$, $index$jscomp$55$$) == $index$jscomp$55$$ | |
| } | |
| function $startsWith$$module$src$string$$($string$jscomp$6$$, $prefix$jscomp$2$$) { | |
| return $prefix$jscomp$2$$.length > $string$jscomp$6$$.length ? !1 : 0 == $string$jscomp$6$$.lastIndexOf($prefix$jscomp$2$$, 0) | |
| } | |
| function $expandTemplate$$module$src$string$$($template$jscomp$1$$, $getter$$) { | |
| for (var $opt_maxIterations$$ = 5, $maxIterations$$ = $opt_maxIterations$$ || 1, $$jscomp$loop$180$$ = {}, $i$jscomp$3$$ = 0; $i$jscomp$3$$ < $maxIterations$$ && ($$jscomp$loop$180$$.matches = 0, $template$jscomp$1$$ = $template$jscomp$1$$.replace(/\${([^}]*)}/g, function($template$jscomp$1$$) { | |
| return function($opt_maxIterations$$, $maxIterations$$) { | |
| $template$jscomp$1$$.matches++; | |
| return $getter$$($maxIterations$$) | |
| } | |
| }($$jscomp$loop$180$$)), $$jscomp$loop$180$$.matches); $$jscomp$loop$180$$ = { | |
| matches: $$jscomp$loop$180$$.matches | |
| }, $i$jscomp$3$$++); | |
| return $template$jscomp$1$$ | |
| } | |
| function $stringHash32$$module$src$string$$($str$jscomp$6$$) { | |
| for (var $length$jscomp$16$$ = $str$jscomp$6$$.length, $hash$$ = 5381, $i$jscomp$4$$ = 0; $i$jscomp$4$$ < $length$jscomp$16$$; $i$jscomp$4$$++) $hash$$ = 33 * $hash$$ ^ $str$jscomp$6$$.charCodeAt($i$jscomp$4$$); | |
| return String($hash$$ >>> 0) | |
| }; | |
| function $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($component$jscomp$4$$, $fallback$$) { | |
| $fallback$$ = void 0 === $fallback$$ ? "" : $fallback$$; | |
| try { | |
| return decodeURIComponent($component$jscomp$4$$) | |
| } catch ($e$jscomp$8$$) { | |
| return $fallback$$ | |
| } | |
| }; | |
| var $regex$$module$src$url_parse_query_string$$ = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | |
| function $parseQueryString_$$module$src$url_parse_query_string$$($queryString$$) { | |
| var $params$jscomp$1$$ = Object.create(null); | |
| if (!$queryString$$) return $params$jscomp$1$$; | |
| for (var $match$jscomp$1_value$2$$; $match$jscomp$1_value$2$$ = $regex$$module$src$url_parse_query_string$$.exec($queryString$$);) { | |
| var $name$1$$ = $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($match$jscomp$1_value$2$$[1], $match$jscomp$1_value$2$$[1]); | |
| $match$jscomp$1_value$2$$ = $match$jscomp$1_value$2$$[2] ? $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($match$jscomp$1_value$2$$[2], | |
| $match$jscomp$1_value$2$$[2]) : ""; | |
| $params$jscomp$1$$[$name$1$$] = $match$jscomp$1_value$2$$ | |
| } | |
| return $params$jscomp$1$$ | |
| }; | |
| var $rtvVersion$$module$src$mode$$ = ""; | |
| function $getMode$$module$src$mode$$($opt_win$$) { | |
| var $win$$ = $opt_win$$ || self; | |
| if ($win$$.AMP_MODE) var $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$ = $win$$.AMP_MODE; | |
| else { | |
| $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$ = $win$$; | |
| var $JSCompiler_hashQuery$jscomp$inline_515$$ = $parseQueryString_$$module$src$url_parse_query_string$$($JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.location.originalHash || $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.location.hash), | |
| $JSCompiler_searchQuery$jscomp$inline_516$$ = | |
| $parseQueryString_$$module$src$url_parse_query_string$$($JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.location.search); | |
| $rtvVersion$$module$src$mode$$ || ($rtvVersion$$module$src$mode$$ = $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.AMP_CONFIG && $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.AMP_CONFIG.v ? $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.AMP_CONFIG.v : "011515445171205"); | |
| $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$ = | |
| $win$$.AMP_MODE = { | |
| localDev: !1, | |
| development: !("1" != $JSCompiler_hashQuery$jscomp$inline_515$$.development && !$JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$.AMP_DEV_MODE), | |
| examiner: "2" == $JSCompiler_hashQuery$jscomp$inline_515$$.development, | |
| filter: $JSCompiler_hashQuery$jscomp$inline_515$$.filter, | |
| minified: !0, | |
| lite: void 0 != $JSCompiler_searchQuery$jscomp$inline_516$$.amp_lite, | |
| test: !1, | |
| log: $JSCompiler_hashQuery$jscomp$inline_515$$.log, | |
| version: "1515445171205", | |
| rtvVersion: $rtvVersion$$module$src$mode$$, | |
| runtime: "" | |
| } | |
| } | |
| return $JSCompiler_temp$jscomp$211_JSCompiler_win$jscomp$inline_509$$ | |
| }; | |
| function $getModeObject$$module$src$mode_object$$() { | |
| return { | |
| localDev: !1, | |
| development: $getMode$$module$src$mode$$(void 0).development, | |
| filter: $getMode$$module$src$mode$$(void 0).filter, | |
| minified: !0, | |
| lite: $getMode$$module$src$mode$$(void 0).lite, | |
| test: !1, | |
| log: $getMode$$module$src$mode$$(void 0).log, | |
| version: $getMode$$module$src$mode$$(void 0).version, | |
| rtvVersion: $getMode$$module$src$mode$$(void 0).rtvVersion | |
| } | |
| }; | |
| var $toString_$$module$src$types$$ = Object.prototype.toString; | |
| function $isArray$$module$src$types$$($value$jscomp$86$$) { | |
| return Array.isArray($value$jscomp$86$$) | |
| } | |
| function $toArray$$module$src$types$$($arrayLike$jscomp$1$$) { | |
| if (!$arrayLike$jscomp$1$$) return []; | |
| for (var $array$jscomp$6$$ = Array($arrayLike$jscomp$1$$.length), $i$jscomp$5$$ = 0; $i$jscomp$5$$ < $arrayLike$jscomp$1$$.length; $i$jscomp$5$$++) $array$jscomp$6$$[$i$jscomp$5$$] = $arrayLike$jscomp$1$$[$i$jscomp$5$$]; | |
| return $array$jscomp$6$$ | |
| } | |
| function $isObject$$module$src$types$$($value$jscomp$87$$) { | |
| return "[object Object]" === $toString_$$module$src$types$$.call($value$jscomp$87$$) | |
| } | |
| function $isFiniteNumber$$module$src$types$$($value$jscomp$88$$) { | |
| return "number" === typeof $value$jscomp$88$$ && isFinite($value$jscomp$88$$) | |
| } | |
| function $isEnumValue$$module$src$types$$($enumObj$$, $s$jscomp$2$$) { | |
| for (var $k$$ in $enumObj$$) if ($enumObj$$[$k$$] === $s$jscomp$2$$) return !0; | |
| return !1 | |
| }; | |
| var $start$$module$src$log$$ = Date.now(); | |
| function $isUserErrorMessage$$module$src$log$$($message$jscomp$23$$) { | |
| return 0 <= $message$jscomp$23$$.indexOf("\u200b\u200b\u200b") | |
| } | |
| function $Log$$module$src$log$$($win$jscomp$4$$, $levelFunc$$, $opt_suffix$$) { | |
| this.win = $win$jscomp$4$$; | |
| this.$levelFunc_$ = $levelFunc$$; | |
| this.$level_$ = this.win.console && this.win.console.log && "0" != $getMode$$module$src$mode$$().log ? this.$levelFunc_$($getModeObject$$module$src$mode_object$$()) : 0; | |
| this.$suffix_$ = $opt_suffix$$ || "" | |
| } | |
| function $JSCompiler_StaticMethods_msg_$$($JSCompiler_StaticMethods_msg_$self$$, $tag$jscomp$1$$, $level$jscomp$7$$, $messages$$) { | |
| if (0 != $JSCompiler_StaticMethods_msg_$self$$.$level_$) { | |
| var $fn$jscomp$1$$ = $JSCompiler_StaticMethods_msg_$self$$.win.console.log; | |
| "ERROR" == $level$jscomp$7$$ ? $fn$jscomp$1$$ = $JSCompiler_StaticMethods_msg_$self$$.win.console.error || $fn$jscomp$1$$ : "INFO" == $level$jscomp$7$$ ? $fn$jscomp$1$$ = $JSCompiler_StaticMethods_msg_$self$$.win.console.info || $fn$jscomp$1$$ : "WARN" == $level$jscomp$7$$ && | |
| ($fn$jscomp$1$$ = $JSCompiler_StaticMethods_msg_$self$$.win.console.warn || $fn$jscomp$1$$); | |
| $messages$$.unshift(Date.now() - $start$$module$src$log$$, "[" + $tag$jscomp$1$$ + "]"); | |
| $fn$jscomp$1$$.apply($JSCompiler_StaticMethods_msg_$self$$.win.console, $messages$$) | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$ = $Log$$module$src$log$$.prototype; | |
| $JSCompiler_prototypeAlias$$.isEnabled = function() { | |
| return 0 != this.$level_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.fine = function($tag$jscomp$2$$, $var_args$jscomp$47$$) { | |
| 4 <= this.$level_$ && $JSCompiler_StaticMethods_msg_$$(this, $tag$jscomp$2$$, "FINE", Array.prototype.slice.call(arguments, 1)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.info = function($tag$jscomp$3$$, $var_args$jscomp$48$$) { | |
| 3 <= this.$level_$ && $JSCompiler_StaticMethods_msg_$$(this, $tag$jscomp$3$$, "INFO", Array.prototype.slice.call(arguments, 1)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.warn = function($tag$jscomp$4$$, $var_args$jscomp$49$$) { | |
| 2 <= this.$level_$ && $JSCompiler_StaticMethods_msg_$$(this, $tag$jscomp$4$$, "WARN", Array.prototype.slice.call(arguments, 1)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$error_$ = function($tag$jscomp$5$$, $var_args$jscomp$50$$) { | |
| if (1 <= this.$level_$) $JSCompiler_StaticMethods_msg_$$(this, $tag$jscomp$5$$, "ERROR", Array.prototype.slice.call(arguments, 1)); | |
| else { | |
| var $error$jscomp$2$$ = $createErrorVargs$$module$src$log$$.apply(null, Array.prototype.slice.call(arguments, 1)); | |
| $JSCompiler_StaticMethods_prepareError_$$(this, $error$jscomp$2$$); | |
| return $error$jscomp$2$$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.error = function($tag$jscomp$6$$, $var_args$jscomp$51$$) { | |
| var $error$jscomp$3$$ = this.$error_$.apply(this, arguments); | |
| $error$jscomp$3$$ && ($error$jscomp$3$$.name = $tag$jscomp$6$$ || $error$jscomp$3$$.name, self.reportError($error$jscomp$3$$)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.expectedError = function($unusedTag$$, $var_args$jscomp$52$$) { | |
| var $error$jscomp$4$$ = this.$error_$.apply(this, arguments); | |
| $error$jscomp$4$$ && ($error$jscomp$4$$.expected = !0, self.reportError($error$jscomp$4$$)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.createError = function($var_args$jscomp$53$$) { | |
| var $error$jscomp$5$$ = $createErrorVargs$$module$src$log$$.apply(null, arguments); | |
| $JSCompiler_StaticMethods_prepareError_$$(this, $error$jscomp$5$$); | |
| return $error$jscomp$5$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.createExpectedError = function($var_args$jscomp$54$$) { | |
| var $error$jscomp$6$$ = $createErrorVargs$$module$src$log$$.apply(null, arguments); | |
| $JSCompiler_StaticMethods_prepareError_$$(this, $error$jscomp$6$$); | |
| $error$jscomp$6$$.expected = !0; | |
| return $error$jscomp$6$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.assert = function($shouldBeTrueish$$, $opt_message$jscomp$7$$, $var_args$jscomp$55$$) { | |
| var $firstElement$$; | |
| if (!$shouldBeTrueish$$) { | |
| var $splitMessage$$ = ($opt_message$jscomp$7$$ || "Assertion failed").split("%s"), | |
| $e$jscomp$9_first$jscomp$4_i$jscomp$6$$ = $splitMessage$$.shift(), | |
| $formatted$$ = $e$jscomp$9_first$jscomp$4_i$jscomp$6$$, | |
| $messageArray$$ = []; | |
| "" != $e$jscomp$9_first$jscomp$4_i$jscomp$6$$ && $messageArray$$.push($e$jscomp$9_first$jscomp$4_i$jscomp$6$$); | |
| for ($e$jscomp$9_first$jscomp$4_i$jscomp$6$$ = | |
| 2; $e$jscomp$9_first$jscomp$4_i$jscomp$6$$ < arguments.length; $e$jscomp$9_first$jscomp$4_i$jscomp$6$$++) { | |
| var $val$$ = arguments[$e$jscomp$9_first$jscomp$4_i$jscomp$6$$]; | |
| $val$$ && $val$$.tagName && ($firstElement$$ = $val$$); | |
| var $nextConstant$$ = $splitMessage$$.shift(); | |
| $messageArray$$.push($val$$); | |
| var $JSCompiler_temp_const$jscomp$213_JSCompiler_val$jscomp$inline_522$$ = $nextConstant$$.trim(); | |
| "" != $JSCompiler_temp_const$jscomp$213_JSCompiler_val$jscomp$inline_522$$ && $messageArray$$.push($JSCompiler_temp_const$jscomp$213_JSCompiler_val$jscomp$inline_522$$); | |
| $JSCompiler_temp_const$jscomp$213_JSCompiler_val$jscomp$inline_522$$ = $formatted$$; | |
| var $JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$ = ($JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$ = $val$$) && 1 == $JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$.nodeType ? $JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$.tagName.toLowerCase() + ($JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$.id ? "#" + $JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$.id : | |
| "") : $JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$; | |
| $formatted$$ = $JSCompiler_temp_const$jscomp$213_JSCompiler_val$jscomp$inline_522$$ + ($JSCompiler_inline_result$jscomp$214_JSCompiler_val$jscomp$inline_524$$ + $nextConstant$$) | |
| } | |
| $e$jscomp$9_first$jscomp$4_i$jscomp$6$$ = Error($formatted$$); | |
| $e$jscomp$9_first$jscomp$4_i$jscomp$6$$.fromAssert = !0; | |
| $e$jscomp$9_first$jscomp$4_i$jscomp$6$$.associatedElement = $firstElement$$; | |
| $e$jscomp$9_first$jscomp$4_i$jscomp$6$$.messageArray = $messageArray$$; | |
| $JSCompiler_StaticMethods_prepareError_$$(this, $e$jscomp$9_first$jscomp$4_i$jscomp$6$$); | |
| self.reportError($e$jscomp$9_first$jscomp$4_i$jscomp$6$$); | |
| throw $e$jscomp$9_first$jscomp$4_i$jscomp$6$$; | |
| } | |
| return $shouldBeTrueish$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.assertElement = function($shouldBeElement$$, $opt_message$jscomp$8$$) { | |
| this.assert($shouldBeElement$$ && 1 == $shouldBeElement$$.nodeType, ($opt_message$jscomp$8$$ || "Element expected") + ": %s", $shouldBeElement$$); | |
| return $shouldBeElement$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.assertString = function($shouldBeString$$, $opt_message$jscomp$9$$) { | |
| this.assert("string" == typeof $shouldBeString$$, ($opt_message$jscomp$9$$ || "String expected") + ": %s", $shouldBeString$$); | |
| return $shouldBeString$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.assertNumber = function($shouldBeNumber$$, $opt_message$jscomp$10$$) { | |
| this.assert("number" == typeof $shouldBeNumber$$, ($opt_message$jscomp$10$$ || "Number expected") + ": %s", $shouldBeNumber$$); | |
| return $shouldBeNumber$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.assertEnumValue = function($enumObj$jscomp$1$$, $s$jscomp$3$$, $opt_enumName$$) { | |
| if ($isEnumValue$$module$src$types$$($enumObj$jscomp$1$$, $s$jscomp$3$$)) return $s$jscomp$3$$; | |
| this.assert(!1, 'Unknown %s value: "%s"', $opt_enumName$$ || "enum", $s$jscomp$3$$) | |
| }; | |
| function $JSCompiler_StaticMethods_prepareError_$$($JSCompiler_StaticMethods_prepareError_$self$$, $error$jscomp$7$$) { | |
| $error$jscomp$7$$ = $duplicateErrorIfNecessary$$module$src$log$$($error$jscomp$7$$); | |
| $JSCompiler_StaticMethods_prepareError_$self$$.$suffix_$ ? $error$jscomp$7$$.message ? -1 == $error$jscomp$7$$.message.indexOf($JSCompiler_StaticMethods_prepareError_$self$$.$suffix_$) && ($error$jscomp$7$$.message += $JSCompiler_StaticMethods_prepareError_$self$$.$suffix_$) : $error$jscomp$7$$.message = $JSCompiler_StaticMethods_prepareError_$self$$.$suffix_$ : | |
| $isUserErrorMessage$$module$src$log$$($error$jscomp$7$$.message) && ($error$jscomp$7$$.message = $error$jscomp$7$$.message.replace("\u200b\u200b\u200b", "")) | |
| } | |
| function $duplicateErrorIfNecessary$$module$src$log$$($error$jscomp$8$$) { | |
| var $e$jscomp$10_message$jscomp$26$$ = $error$jscomp$8$$.message, | |
| $test$$ = String(Math.random()); | |
| $error$jscomp$8$$.message = $test$$; | |
| if ($error$jscomp$8$$.message === $test$$) return $error$jscomp$8$$.message = $e$jscomp$10_message$jscomp$26$$, $error$jscomp$8$$; | |
| $e$jscomp$10_message$jscomp$26$$ = Error($error$jscomp$8$$.message); | |
| for (var $prop$jscomp$4$$ in $error$jscomp$8$$) $e$jscomp$10_message$jscomp$26$$[$prop$jscomp$4$$] = $error$jscomp$8$$[$prop$jscomp$4$$]; | |
| $e$jscomp$10_message$jscomp$26$$.stack = $error$jscomp$8$$.stack; | |
| return $e$jscomp$10_message$jscomp$26$$ | |
| } | |
| function $createErrorVargs$$module$src$log$$($var_args$jscomp$56$$) { | |
| for (var $error$jscomp$9$$ = null, $message$jscomp$27$$ = "", $i$jscomp$7$$ = 0; $i$jscomp$7$$ < arguments.length; $i$jscomp$7$$++) { | |
| var $arg$jscomp$6$$ = arguments[$i$jscomp$7$$]; | |
| $arg$jscomp$6$$ instanceof Error && !$error$jscomp$9$$ ? $error$jscomp$9$$ = $duplicateErrorIfNecessary$$module$src$log$$($arg$jscomp$6$$) : ($message$jscomp$27$$ && ($message$jscomp$27$$ += " "), $message$jscomp$27$$ += $arg$jscomp$6$$) | |
| } | |
| $error$jscomp$9$$ ? $message$jscomp$27$$ && ($error$jscomp$9$$.message = | |
| $message$jscomp$27$$ + ": " + $error$jscomp$9$$.message) : $error$jscomp$9$$ = Error($message$jscomp$27$$); | |
| return $error$jscomp$9$$ | |
| } | |
| function $rethrowAsync$$module$src$log$$($var_args$jscomp$57$$) { | |
| var $error$jscomp$10$$ = $createErrorVargs$$module$src$log$$.apply(null, arguments); | |
| setTimeout(function() { | |
| self.reportError($error$jscomp$10$$); | |
| throw $error$jscomp$10$$; | |
| }) | |
| } | |
| self.log = self.log || { | |
| user: null, | |
| dev: null, | |
| userForEmbed: null | |
| }; | |
| var $logs$$module$src$log$$ = self.log, | |
| $logConstructor$$module$src$log$$ = null; | |
| function $initLogConstructor$$module$src$log$$() { | |
| $logConstructor$$module$src$log$$ = $Log$$module$src$log$$; | |
| $dev$$module$src$log$$(); | |
| $user$$module$src$log$$() | |
| } | |
| function $user$$module$src$log$$($opt_element$jscomp$5$$) { | |
| $logs$$module$src$log$$.user || ($logs$$module$src$log$$.user = $getUserLogger$$module$src$log$$("\u200b\u200b\u200b")); | |
| var $JSCompiler_win$jscomp$inline_527$$ = $logs$$module$src$log$$.user.win; | |
| return $opt_element$jscomp$5$$ && $opt_element$jscomp$5$$.ownerDocument.defaultView != $JSCompiler_win$jscomp$inline_527$$ ? $logs$$module$src$log$$.userForEmbed ? $logs$$module$src$log$$.userForEmbed : $logs$$module$src$log$$.userForEmbed = $getUserLogger$$module$src$log$$("\u200b\u200b\u200b\u200b") : | |
| $logs$$module$src$log$$.user | |
| } | |
| function $getUserLogger$$module$src$log$$($suffix$jscomp$1$$) { | |
| if (!$logConstructor$$module$src$log$$) throw Error("failed to call initLogConstructor"); | |
| return new $logConstructor$$module$src$log$$(self, function($suffix$jscomp$1$$) { | |
| var $mode$jscomp$10$$ = parseInt($suffix$jscomp$1$$.log, 10); | |
| return $suffix$jscomp$1$$.development || 1 <= $mode$jscomp$10$$ ? 4 : 0 | |
| }, $suffix$jscomp$1$$) | |
| } | |
| function $dev$$module$src$log$$() { | |
| if ($logs$$module$src$log$$.dev) return $logs$$module$src$log$$.dev; | |
| if (!$logConstructor$$module$src$log$$) throw Error("failed to call initLogConstructor"); | |
| return $logs$$module$src$log$$.dev = new $logConstructor$$module$src$log$$(self, function($logNum$jscomp$1_mode$jscomp$11$$) { | |
| $logNum$jscomp$1_mode$jscomp$11$$ = parseInt($logNum$jscomp$1_mode$jscomp$11$$.log, 10); | |
| return 3 <= $logNum$jscomp$1_mode$jscomp$11$$ ? 4 : 2 <= $logNum$jscomp$1_mode$jscomp$11$$ ? 3 : 0 | |
| }) | |
| }; | |
| var $hasOwn_$$module$src$utils$object$$ = Object.prototype.hasOwnProperty; | |
| function $map$$module$src$utils$object$$($opt_initial$$) { | |
| var $obj$jscomp$25$$ = Object.create(null); | |
| $opt_initial$$ && Object.assign($obj$jscomp$25$$, $opt_initial$$); | |
| return $obj$jscomp$25$$ | |
| } | |
| function $dict$$module$src$utils$object$$($opt_initial$jscomp$1$$) { | |
| return $opt_initial$jscomp$1$$ || {} | |
| } | |
| function $ownProperty$$module$src$utils$object$$($obj$jscomp$27$$, $key$jscomp$36$$) { | |
| if ($hasOwn_$$module$src$utils$object$$.call($obj$jscomp$27$$, $key$jscomp$36$$)) return $obj$jscomp$27$$[$key$jscomp$36$$] | |
| } | |
| function $deepMerge$$module$src$utils$object$$($$jscomp$loop$181_target$jscomp$57$$, $$jscomp$destructuring$var0_source$jscomp$12$$, $depth$jscomp$1$$) { | |
| $depth$jscomp$1$$ = void 0 === $depth$jscomp$1$$ ? 10 : $depth$jscomp$1$$; | |
| var $seen$$ = [], | |
| $queue$$ = []; | |
| $queue$$.push({ | |
| t: $$jscomp$loop$181_target$jscomp$57$$, | |
| s: $$jscomp$destructuring$var0_source$jscomp$12$$, | |
| d: 0 | |
| }); | |
| for ($$jscomp$loop$181_target$jscomp$57$$ = {}; 0 < $queue$$.length;) { | |
| $$jscomp$destructuring$var0_source$jscomp$12$$ = $queue$$.shift(); | |
| $$jscomp$loop$181_target$jscomp$57$$.$t$3$ = | |
| $$jscomp$destructuring$var0_source$jscomp$12$$.t; | |
| $$jscomp$loop$181_target$jscomp$57$$.s = $$jscomp$destructuring$var0_source$jscomp$12$$.s; | |
| $$jscomp$loop$181_target$jscomp$57$$.d = $$jscomp$destructuring$var0_source$jscomp$12$$.d; | |
| if ($seen$$.includes($$jscomp$loop$181_target$jscomp$57$$.s)) throw Error("Source object has a circular reference."); | |
| $seen$$.push($$jscomp$loop$181_target$jscomp$57$$.s); | |
| $$jscomp$loop$181_target$jscomp$57$$.$t$3$ !== $$jscomp$loop$181_target$jscomp$57$$.s && ($$jscomp$loop$181_target$jscomp$57$$.d > | |
| $depth$jscomp$1$$ ? Object.assign($$jscomp$loop$181_target$jscomp$57$$.$t$3$, $$jscomp$loop$181_target$jscomp$57$$.s) : (Object.keys($$jscomp$loop$181_target$jscomp$57$$.s).forEach(function($$jscomp$loop$181_target$jscomp$57$$) { | |
| return function($$jscomp$destructuring$var0_source$jscomp$12$$) { | |
| var $depth$jscomp$1$$ = $$jscomp$loop$181_target$jscomp$57$$.s[$$jscomp$destructuring$var0_source$jscomp$12$$]; | |
| if ($hasOwn_$$module$src$utils$object$$.call($$jscomp$loop$181_target$jscomp$57$$.$t$3$, $$jscomp$destructuring$var0_source$jscomp$12$$)) { | |
| var $seen$$ = | |
| $$jscomp$loop$181_target$jscomp$57$$.$t$3$[$$jscomp$destructuring$var0_source$jscomp$12$$]; | |
| if ($isObject$$module$src$types$$($depth$jscomp$1$$) && $isObject$$module$src$types$$($seen$$)) { | |
| $queue$$.push({ | |
| t: $seen$$, | |
| s: $depth$jscomp$1$$, | |
| d: $$jscomp$loop$181_target$jscomp$57$$.d + 1 | |
| }); | |
| return | |
| } | |
| } | |
| $$jscomp$loop$181_target$jscomp$57$$.$t$3$[$$jscomp$destructuring$var0_source$jscomp$12$$] = $depth$jscomp$1$$ | |
| } | |
| }($$jscomp$loop$181_target$jscomp$57$$)), $$jscomp$loop$181_target$jscomp$57$$ = { | |
| s: $$jscomp$loop$181_target$jscomp$57$$.s, | |
| $t$3$: $$jscomp$loop$181_target$jscomp$57$$.$t$3$, | |
| d: $$jscomp$loop$181_target$jscomp$57$$.d | |
| })) | |
| } | |
| } | |
| function $omit$$module$src$utils$object$$($o$$) { | |
| var $props$jscomp$130$$ = ["offset"]; | |
| return Object.keys($o$$).reduce(function($acc$$, $key$jscomp$38$$) { | |
| $props$jscomp$130$$.includes($key$jscomp$38$$) || ($acc$$[$key$jscomp$38$$] = $o$$[$key$jscomp$38$$]); | |
| return $acc$$ | |
| }, {}) | |
| }; | |
| var $a4aRegistry$$module$ads$_a4a_config$$; | |
| var $adConfig$$module$ads$_config$$ = { | |
| _ping_: { | |
| renderStartImplemented: !0, | |
| clientIdScope: "_PING_" | |
| }, | |
| "24smi": { | |
| prefetch: "https://jsn.24smi.net/smi.js", | |
| preconnect: "https://data.24smi.net" | |
| }, | |
| a8: { | |
| prefetch: "https://statics.a8.net/amp/ad.js", | |
| renderStartImplemented: !0 | |
| }, | |
| a9: { | |
| prefetch: "https://c.amazon-adsystem.com/aax2/assoc.js" | |
| }, | |
| accesstrade: { | |
| prefetch: "https://h.accesstrade.net/js/amp/amp.js" | |
| }, | |
| adagio: { | |
| prefetch: "https://js-ssl.neodatagroup.com/adagio_amp.js", | |
| preconnect: ["https://ad-aws-it.neodatagroup.com", "https://tracker.neodatagroup.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| adblade: { | |
| prefetch: "https://web.adblade.com/js/ads/async/show.js", | |
| preconnect: ["https://staticd.cdn.adblade.com", "https://static.adblade.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| adbutler: { | |
| prefetch: "https://servedbyadbutler.com/app.js" | |
| }, | |
| adform: {}, | |
| adfox: { | |
| prefetch: "https://yastatic.net/pcode/adfox/loader.js", | |
| renderStartImplemented: !0 | |
| }, | |
| adgeneration: { | |
| prefetch: "https://i.socdm.com/sdk/js/adg-script-loader.js" | |
| }, | |
| adhese: { | |
| renderStartImplemented: !0 | |
| }, | |
| adition: {}, | |
| adman: {}, | |
| admanmedia: { | |
| renderStartImplemented: !0 | |
| }, | |
| adocean: {}, | |
| adreactor: {}, | |
| adsense: { | |
| prefetch: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", | |
| preconnect: "https://googleads.g.doubleclick.net", | |
| clientIdScope: "AMP_ECID_GOOGLE", | |
| clientIdCookieName: "_ga", | |
| remoteHTMLDisabled: !0, | |
| masterFrameAccessibleType: "google_network", | |
| fullWidthHeightRatio: 1.2 | |
| }, | |
| adsnative: { | |
| prefetch: "https://static.adsnative.com/static/js/render.v1.js", | |
| preconnect: "https://api.adsnative.com" | |
| }, | |
| adspeed: { | |
| preconnect: "https://g.adspeed.net", | |
| renderStartImplemented: !0 | |
| }, | |
| adspirit: {}, | |
| adstir: { | |
| prefetch: "https://js.ad-stir.com/js/adstir_async.js", | |
| preconnect: "https://ad.ad-stir.com" | |
| }, | |
| adtech: { | |
| prefetch: "https://s.aolcdn.com/os/ads/adsWrapper3.js", | |
| preconnect: ["https://mads.at.atwola.com", "https://aka-cdn.adtechus.com"] | |
| }, | |
| adthrive: { | |
| prefetch: ["https://www.googletagservices.com/tag/js/gpt.js"], | |
| preconnect: ["https://partner.googleadservices.com", "https://securepubads.g.doubleclick.net", "https://tpc.googlesyndication.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| aduptech: { | |
| prefetch: "https://s.d.adup-tech.com/jsapi", | |
| preconnect: ["https://d.adup-tech.com", "https://m.adup-tech.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| adverline: { | |
| prefetch: "https://ads.adverline.com/richmedias/amp.js", | |
| preconnect: ["https://adnext.fr"], | |
| renderStartImplemented: !0 | |
| }, | |
| adverticum: {}, | |
| advertserve: { | |
| renderStartImplemented: !0 | |
| }, | |
| affiliateb: { | |
| prefetch: "https://track.affiliate-b.com/amp/a.js", | |
| renderStartImplemented: !0 | |
| }, | |
| amoad: { | |
| prefetch: ["https://j.amoad.com/js/a.js", "https://j.amoad.com/js/n.js"], | |
| preconnect: ["https://d.amoad.com", "https://i.amoad.com", "https://m.amoad.com", | |
| "https://v.amoad.com" | |
| ] | |
| }, | |
| appnexus: { | |
| prefetch: "https://acdn.adnxs.com/ast/ast.js", | |
| preconnect: "https://ib.adnxs.com" | |
| }, | |
| atomx: { | |
| prefetch: "https://s.ato.mx/p.js" | |
| }, | |
| bidtellect: {}, | |
| brainy: {}, | |
| bringhub: { | |
| renderStartImplemented: !0, | |
| preconnect: ["https://static.bh-cdn.com", "https://core-api.bringhub.io"] | |
| }, | |
| caajainfeed: { | |
| prefetch: ["https://cdn.amanad.adtdp.com/sdk/ajaamp.js"], | |
| preconnect: ["https://ad.amanad.adtdp.com"] | |
| }, | |
| capirs: { | |
| renderStartImplemented: !0 | |
| }, | |
| caprofitx: { | |
| prefetch: ["https://cdn.caprofitx.com/pfx.min.js", "https://cdn.caprofitx.com/tags/amp/profitx_amp.js"], | |
| preconnect: "https://ad.caprofitx.adtdp.com" | |
| }, | |
| chargeads: {}, | |
| colombia: { | |
| prefetch: "https://static.clmbtech.com/ad/commons/js/colombia-amp.js" | |
| }, | |
| connatix: { | |
| renderStartImplemented: !0 | |
| }, | |
| contentad: {}, | |
| criteo: { | |
| prefetch: "https://static.criteo.net/js/ld/publishertag.js", | |
| preconnect: "https://cas.criteo.com" | |
| }, | |
| csa: { | |
| prefetch: "https://www.google.com/adsense/search/ads.js" | |
| }, | |
| dable: { | |
| preconnect: ["https://static.dable.io", "https://api.dable.io", "https://images.dable.io"], | |
| renderStartImplemented: !0 | |
| }, | |
| directadvert: { | |
| renderStartImplemented: !0 | |
| }, | |
| distroscale: { | |
| preconnect: ["https://c.jsrdn.com", "https://s.jsrdn.com", "https://i.jsrdn.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| dotandads: { | |
| prefetch: "https://amp.ad.dotandad.com/dotandadsAmp.js", | |
| preconnect: "https://bal.ad.dotandad.com" | |
| }, | |
| doubleclick: { | |
| prefetch: ["https://www.googletagservices.com/tag/js/gpt.js", "https://securepubads.g.doubleclick.net/static/glade.js"], | |
| preconnect: ["https://partner.googleadservices.com", "https://tpc.googlesyndication.com"], | |
| clientIdScope: "AMP_ECID_GOOGLE", | |
| clientIdCookieName: "_ga", | |
| renderStartImplemented: !0, | |
| masterFrameAccessibleType: "google_network" | |
| }, | |
| eas: { | |
| prefetch: "https://amp.emediate.eu/amp.v0.js", | |
| renderStartImplemented: !0 | |
| }, | |
| engageya: {}, | |
| eplanning: { | |
| prefetch: "https://us.img.e-planning.net/layers/epl-amp.js" | |
| }, | |
| ezoic: { | |
| prefetch: ["https://www.googletagservices.com/tag/js/gpt.js", "https://g.ezoic.net/ezoic/ampad.js"], | |
| clientIdScope: "AMP_ECID_EZOIC" | |
| }, | |
| f1e: { | |
| prefetch: "https://img.ak.impact-ad.jp/util/f1e_amp.min.js" | |
| }, | |
| f1h: { | |
| preconnect: "https://img.ak.impact-ad.jp", | |
| renderStartImplemented: !0 | |
| }, | |
| fake: {}, | |
| felmat: { | |
| prefetch: "https://t.felmat.net/js/fmamp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| flite: {}, | |
| fluct: { | |
| preconnect: ["https://cdn-fluct.sh.adingo.jp", "https://s.sh.adingo.jp", "https://i.adingo.jp"] | |
| }, | |
| fusion: { | |
| prefetch: "https://assets.adtomafusion.net/fusion/latest/fusion-amp.min.js" | |
| }, | |
| genieessp: { | |
| prefetch: "https://js.gsspcln.jp/l/amp.js" | |
| }, | |
| giraff: { | |
| renderStartImplemented: !0 | |
| }, | |
| gmossp: { | |
| prefetch: "https://cdn.gmossp-sp.jp/ads/amp.js" | |
| }, | |
| gumgum: { | |
| prefetch: "https://g2.gumgum.com/javascripts/ad.js", | |
| renderStartImplemented: !0 | |
| }, | |
| holder: { | |
| prefetch: "https://i.holder.com.ua/js2/holder/ajax/ampv1.js", | |
| preconnect: "https://h.holder.com.ua", | |
| renderStartImplemented: !0 | |
| }, | |
| ibillboard: {}, | |
| imedia: { | |
| prefetch: "https://i.imedia.cz/js/im3.js", | |
| renderStartImplemented: !0 | |
| }, | |
| imobile: { | |
| prefetch: "https://spamp.i-mobile.co.jp/script/amp.js", | |
| preconnect: "https://spad.i-mobile.co.jp" | |
| }, | |
| improvedigital: {}, | |
| industrybrains: { | |
| prefetch: "https://web.industrybrains.com/js/ads/async/show.js", | |
| preconnect: ["https://staticd.cdn.industrybrains.com", "https://static.industrybrains.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| inmobi: { | |
| prefetch: "https://cf.cdn.inmobi.com/ad/inmobi.secure.js", | |
| renderStartImplemented: !0 | |
| }, | |
| innity: { | |
| prefetch: "https://cdn.innity.net/admanager.js", | |
| preconnect: "https://as.innity.com", | |
| renderStartImplemented: !0 | |
| }, | |
| ix: { | |
| prefetch: ["https://js-sec.indexww.com/apl/amp.js"], | |
| preconnect: "https://as-sec.casalemedia.com", | |
| renderStartImplemented: !0 | |
| }, | |
| kargo: {}, | |
| kiosked: { | |
| renderStartImplemented: !0 | |
| }, | |
| kixer: { | |
| prefetch: "https://cdn.kixer.com/ad/load.js", | |
| renderStartImplemented: !0 | |
| }, | |
| ligatus: { | |
| prefetch: "https://ssl.ligatus.com/render/ligrend.js", | |
| renderStartImplemented: !0 | |
| }, | |
| lockerdome: { | |
| prefetch: "https://cdn2.lockerdomecdn.com/_js/amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| loka: { | |
| prefetch: "https://loka-cdn.akamaized.net/scene/amp.js", | |
| preconnect: ["https://scene-front.lokaplatform.com", "https://loka-materials.akamaized.net"], | |
| renderStartImplemented: !0 | |
| }, | |
| mads: { | |
| prefetch: "https://eu2.madsone.com/js/tags.js" | |
| }, | |
| "mantis-display": { | |
| prefetch: "https://assets.mantisadnetwork.com/mantodea.min.js", | |
| preconnect: ["https://mantodea.mantisadnetwork.com", "https://res.cloudinary.com", | |
| "https://resize.mantisadnetwork.com" | |
| ] | |
| }, | |
| "mantis-recommend": { | |
| prefetch: "https://assets.mantisadnetwork.com/recommend.min.js", | |
| preconnect: ["https://mantodea.mantisadnetwork.com", "https://resize.mantisadnetwork.com"] | |
| }, | |
| mediaimpact: { | |
| prefetch: "https://ec-ns.sascdn.com/diff/251/pages/amp_default.js", | |
| preconnect: ["https://ww251.smartadserver.com", "https://static.sascdn.com/"], | |
| renderStartImplemented: !0 | |
| }, | |
| medianet: { | |
| preconnect: "https://contextual.media.net", | |
| renderStartImplemented: !0 | |
| }, | |
| mediavine: { | |
| prefetch: "https://amp.mediavine.com/wrapper.min.js", | |
| preconnect: ["https://partner.googleadservices.com", "https://securepubads.g.doubleclick.net", "https://tpc.googlesyndication.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| meg: { | |
| renderStartImplemented: !0 | |
| }, | |
| microad: { | |
| prefetch: "https://j.microad.net/js/camp.js", | |
| preconnect: ["https://s-rtb.send.microad.jp", "https://s-rtb.send.microadinc.com", "https://cache.send.microad.jp", "https://cache.send.microadinc.com", "https://deb.send.microad.jp"] | |
| }, | |
| mixpo: { | |
| prefetch: "https://cdn.mixpo.com/js/loader.js", | |
| preconnect: ["https://player1.mixpo.com", | |
| "https://player2.mixpo.com" | |
| ] | |
| }, | |
| mywidget: { | |
| preconnect: "https://likemore-fe.go.mail.ru", | |
| prefetch: "https://likemore-go.imgsmail.ru/widget_amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| nativo: { | |
| prefetch: "https://s.ntv.io/serve/load.js" | |
| }, | |
| navegg: { | |
| renderStartImplemented: !0 | |
| }, | |
| nend: { | |
| prefetch: "https://js1.nend.net/js/amp.js", | |
| preconnect: ["https://output.nend.net", "https://img1.nend.net"] | |
| }, | |
| netletix: { | |
| preconnect: ["https://call.netzathleten-media.de"], | |
| renderStartImplemented: !0 | |
| }, | |
| nokta: { | |
| prefetch: "https://static.virgul.com/theme/mockups/noktaamp/ampjs.js", | |
| renderStartImplemented: !0 | |
| }, | |
| openadstream: {}, | |
| openx: { | |
| prefetch: "https://www.googletagservices.com/tag/js/gpt.js", | |
| preconnect: ["https://partner.googleadservices.com", "https://securepubads.g.doubleclick.net", "https://tpc.googlesyndication.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| outbrain: { | |
| renderStartImplemented: !0, | |
| prefetch: "https://widgets.outbrain.com/widgetAMP/outbrainAMP.min.js", | |
| preconnect: ["https://odb.outbrain.com"] | |
| }, | |
| plista: {}, | |
| polymorphicads: { | |
| prefetch: "https://www.polymorphicads.jp/js/amp.js", | |
| preconnect: ["https://img.polymorphicads.jp", | |
| "https://ad.polymorphicads.jp" | |
| ], | |
| renderStartImplemented: !0 | |
| }, | |
| popin: { | |
| renderStartImplemented: !0 | |
| }, | |
| postquare: {}, | |
| pubmatic: { | |
| prefetch: "https://ads.pubmatic.com/AdServer/js/amp.js" | |
| }, | |
| pubmine: { | |
| prefetch: ["https://s.pubmine.com/head.js", "https://s.pubmine.com/showad.js"], | |
| preconnect: "https://delivery.g.switchadhub.com", | |
| renderStartImplemented: !0 | |
| }, | |
| pulsepoint: { | |
| prefetch: "https://ads.contextweb.com/TagPublish/getjs.static.js", | |
| preconnect: "https://tag.contextweb.com" | |
| }, | |
| purch: { | |
| prefetch: "https://ramp.purch.com/serve/creative_amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| relap: { | |
| renderStartImplemented: !0 | |
| }, | |
| revcontent: { | |
| prefetch: "https://labs-cdn.revcontent.com/build/amphtml/revcontent.amp.min.js", | |
| preconnect: ["https://trends.revcontent.com", "https://cdn.revcontent.com", "https://img.revcontent.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| revjet: { | |
| prefetch: "https://cdn.revjet.com/~cdn/JS/03/amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| rubicon: {}, | |
| sharethrough: { | |
| renderStartImplemented: !0 | |
| }, | |
| sklik: { | |
| prefetch: "https://c.imedia.cz/js/amp.js" | |
| }, | |
| slimcutmedia: { | |
| preconnect: ["https://sb.freeskreen.com", | |
| "https://static.freeskreen.com", "https://video.freeskreen.com" | |
| ], | |
| renderStartImplemented: !0 | |
| }, | |
| smartadserver: { | |
| prefetch: "https://ec-ns.sascdn.com/diff/js/amp.v0.js", | |
| preconnect: "https://static.sascdn.com", | |
| renderStartImplemented: !0 | |
| }, | |
| smartclip: { | |
| prefetch: "https://cdn.smartclip.net/amp/amp.v0.js", | |
| preconnect: "https://des.smartclip.net", | |
| renderStartImplemented: !0 | |
| }, | |
| smi2: { | |
| renderStartImplemented: !0 | |
| }, | |
| sogouad: { | |
| prefetch: "https://theta.sogoucdn.com/wap/js/aw.js", | |
| renderStartImplemented: !0 | |
| }, | |
| sortable: { | |
| prefetch: "https://www.googletagservices.com/tag/js/gpt.js", | |
| preconnect: ["https://tags-cdn.deployads.com", "https://partner.googleadservices.com", "https://securepubads.g.doubleclick.net", "https://tpc.googlesyndication.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| sovrn: { | |
| prefetch: "https://ap.lijit.com/www/sovrn_amp/sovrn_ads.js" | |
| }, | |
| spotx: { | |
| preconnect: "https://js.spotx.tv", | |
| renderStartImplemented: !0 | |
| }, | |
| sunmedia: { | |
| prefetch: "https://vod.addevweb.com/sunmedia/amp/ads/sunmedia.js", | |
| preconnect: "https://static.addevweb.com", | |
| renderStartImplemented: !0 | |
| }, | |
| swoop: { | |
| prefetch: "https://www.swoop-amp.com/amp.js", | |
| preconnect: ["https://www.swpsvc.com", "https://client.swpcld.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| taboola: {}, | |
| teads: { | |
| prefetch: "https://cdn.teads.tv/media/format/v3/teads-format.min.js", | |
| preconnect: ["https://cdn2.teads.tv", "https://a.teads.tv", "https://t.teads.tv"] | |
| }, | |
| triplelift: {}, | |
| valuecommerce: { | |
| prefetch: "https://amp.valuecommerce.com/amp_bridge.js", | |
| preconnect: ["https://ad.jp.ap.valuecommerce.com", "https://ad.omks.valuecommerce.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| viralize: { | |
| renderStartImplemented: !0 | |
| }, | |
| vmfive: { | |
| prefetch: "https://man.vm5apis.com/dist/adn-web-sdk.js", | |
| preconnect: ["https://vawpro.vm5apis.com", "https://vahfront.vm5apis.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| webediads: { | |
| prefetch: "https://eu1.wbdds.com/amp.min.js", | |
| preconnect: ["https://goutee.top", "https://mediaathay.org.uk"], | |
| renderStartImplemented: !0 | |
| }, | |
| "weborama-display": { | |
| prefetch: ["https://cstatic.weborama.fr/js/advertiserv2/adperf_launch_1.0.0_scrambled.js", "https://cstatic.weborama.fr/js/advertiserv2/adperf_core_1.0.0_scrambled.js"] | |
| }, | |
| widespace: {}, | |
| xlift: { | |
| prefetch: "https://cdn.x-lift.jp/resources/common/xlift_amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| yahoo: { | |
| prefetch: "https://s.yimg.com/os/ampad/display.js", | |
| preconnect: "https://us.adserver.yahoo.com" | |
| }, | |
| yahoojp: { | |
| prefetch: ["https://s.yimg.jp/images/listing/tool/yads/ydn/amp/amp.js", "https://yads.c.yimg.jp/js/yads.js"], | |
| preconnect: "https://yads.yahoo.co.jp" | |
| }, | |
| yandex: { | |
| prefetch: "https://yastatic.net/partner-code/loaders/context_amp.js", | |
| renderStartImplemented: !0 | |
| }, | |
| yengo: { | |
| renderStartImplemented: !0 | |
| }, | |
| yieldbot: { | |
| prefetch: ["https://cdn.yldbt.com/js/yieldbot.intent.amp.js", "https://msg.yldbt.com/js/ybmsg.html"], | |
| preconnect: "https://i.yldbt.com" | |
| }, | |
| yieldmo: { | |
| prefetch: "https://static.yieldmo.com/ym.amp1.js", | |
| preconnect: ["https://s.yieldmo.com", "https://ads.yieldmo.com"], | |
| renderStartImplemented: !0 | |
| }, | |
| yieldone: { | |
| prefetch: "https://img.ak.impact-ad.jp/ic/pone/commonjs/yone-amp.js" | |
| }, | |
| zedo: { | |
| prefetch: "https://ss3.zedo.com/gecko/tag/Gecko.amp.min.js", | |
| renderStartImplemented: !0 | |
| }, | |
| zergnet: {}, | |
| zucks: { | |
| preconnect: ["https://j.zucks.net.zimg.jp", "https://sh.zucks.net", "https://k.zucks.net", "https://static.zucks.net.zimg.jp"] | |
| } | |
| }; | |
| /* | |
| https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | |
| function $cssEscape$$module$third_party$css_escape$css_escape$$($value$jscomp$89$$) { | |
| if (0 == arguments.length) throw new TypeError("`CSS.escape` requires an argument."); | |
| for (var $string$jscomp$8$$ = String($value$jscomp$89$$), $length$jscomp$17$$ = $string$jscomp$8$$.length, $index$jscomp$57$$ = -1, $codeUnit$$, $result$jscomp$1$$ = "", $firstCodeUnit$$ = $string$jscomp$8$$.charCodeAt(0); ++$index$jscomp$57$$ < $length$jscomp$17$$;) $codeUnit$$ = $string$jscomp$8$$.charCodeAt($index$jscomp$57$$), $result$jscomp$1$$ = 0 == $codeUnit$$ ? | |
| $result$jscomp$1$$ + "\ufffd" : 1 <= $codeUnit$$ && 31 >= $codeUnit$$ || 127 == $codeUnit$$ || 0 == $index$jscomp$57$$ && 48 <= $codeUnit$$ && 57 >= $codeUnit$$ || 1 == $index$jscomp$57$$ && 48 <= $codeUnit$$ && 57 >= $codeUnit$$ && 45 == $firstCodeUnit$$ ? $result$jscomp$1$$ + ("\\" + $codeUnit$$.toString(16) + " ") : 0 == $index$jscomp$57$$ && 1 == $length$jscomp$17$$ && 45 == $codeUnit$$ ? $result$jscomp$1$$ + ("\\" + $string$jscomp$8$$.charAt($index$jscomp$57$$)) : 128 <= $codeUnit$$ || 45 == $codeUnit$$ || 95 == $codeUnit$$ || 48 <= $codeUnit$$ && 57 >= $codeUnit$$ || 65 <= $codeUnit$$ && | |
| 90 >= $codeUnit$$ || 97 <= $codeUnit$$ && 122 >= $codeUnit$$ ? $result$jscomp$1$$ + $string$jscomp$8$$.charAt($index$jscomp$57$$) : $result$jscomp$1$$ + ("\\" + $string$jscomp$8$$.charAt($index$jscomp$57$$)); | |
| return $result$jscomp$1$$ | |
| }; | |
| function $waitForChild$$module$src$dom$$($parent$jscomp$2$$, $checkFunc$$, $callback$jscomp$51$$) { | |
| if ($checkFunc$$($parent$jscomp$2$$)) $callback$jscomp$51$$(); | |
| else { | |
| var $win$jscomp$11$$ = $parent$jscomp$2$$.ownerDocument.defaultView; | |
| if ($win$jscomp$11$$.MutationObserver) { | |
| var $observer$$ = new $win$jscomp$11$$.MutationObserver(function() { | |
| $checkFunc$$($parent$jscomp$2$$) && ($observer$$.disconnect(), $callback$jscomp$51$$()) | |
| }); | |
| $observer$$.observe($parent$jscomp$2$$, { | |
| childList: !0 | |
| }) | |
| } else var $interval$$ = $win$jscomp$11$$.setInterval(function() { | |
| $checkFunc$$($parent$jscomp$2$$) && | |
| ($win$jscomp$11$$.clearInterval($interval$$), $callback$jscomp$51$$()) | |
| }, 5) | |
| } | |
| } | |
| function $waitForBody$$module$src$dom$$($doc$jscomp$1$$, $callback$jscomp$52$$) { | |
| $waitForChild$$module$src$dom$$($doc$jscomp$1$$.documentElement, function() { | |
| return !!$doc$jscomp$1$$.body | |
| }, $callback$jscomp$52$$) | |
| } | |
| function $waitForBodyPromise$$module$src$dom$$($doc$jscomp$2$$) { | |
| return new Promise(function($resolve$jscomp$1$$) { | |
| $waitForBody$$module$src$dom$$($doc$jscomp$2$$, $resolve$jscomp$1$$) | |
| }) | |
| } | |
| function $removeElement$$module$src$dom$$($element$jscomp$10$$) { | |
| $element$jscomp$10$$.parentElement && $element$jscomp$10$$.parentElement.removeChild($element$jscomp$10$$) | |
| } | |
| function $removeChildren$$module$src$dom$$($parent$jscomp$4$$) { | |
| for (; $parent$jscomp$4$$.firstChild;) $parent$jscomp$4$$.removeChild($parent$jscomp$4$$.firstChild) | |
| } | |
| function $createElementWithAttributes$$module$src$dom$$($doc$jscomp$3_element$jscomp$13$$, $tagName$jscomp$5$$, $attributes$jscomp$2$$) { | |
| $doc$jscomp$3_element$jscomp$13$$ = $doc$jscomp$3_element$jscomp$13$$.createElement($tagName$jscomp$5$$); | |
| for (var $JSCompiler_attr$jscomp$inline_531$$ in $attributes$jscomp$2$$) $doc$jscomp$3_element$jscomp$13$$.setAttribute($JSCompiler_attr$jscomp$inline_531$$, $attributes$jscomp$2$$[$JSCompiler_attr$jscomp$inline_531$$]); | |
| return $doc$jscomp$3_element$jscomp$13$$ | |
| } | |
| function $closest$$module$src$dom$$($element$jscomp$14$$, $callback$jscomp$53$$, $opt_stopAt$$) { | |
| for (var $el$$ = $element$jscomp$14$$; $el$$ && $el$$ !== $opt_stopAt$$; $el$$ = $el$$.parentElement) if ($callback$jscomp$53$$($el$$)) return $el$$; | |
| return null | |
| } | |
| function $closestNode$$module$src$dom$$($n$6_node$jscomp$4$$, $callback$jscomp$54$$) { | |
| for (; $n$6_node$jscomp$4$$; $n$6_node$jscomp$4$$ = $n$6_node$jscomp$4$$.parentNode) if ($callback$jscomp$54$$($n$6_node$jscomp$4$$)) return $n$6_node$jscomp$4$$; | |
| return null | |
| } | |
| function $closestByTag$$module$src$dom$$($element$jscomp$15$$, $tagName$jscomp$6$$) { | |
| if ($element$jscomp$15$$.closest) return $element$jscomp$15$$.closest($tagName$jscomp$6$$); | |
| $tagName$jscomp$6$$ = $tagName$jscomp$6$$.toUpperCase(); | |
| return $closest$$module$src$dom$$($element$jscomp$15$$, function($element$jscomp$15$$) { | |
| return $element$jscomp$15$$.tagName == $tagName$jscomp$6$$ | |
| }) | |
| } | |
| function $closestBySelector$$module$src$dom$$($element$jscomp$16$$, $selector$jscomp$1$$) { | |
| return $element$jscomp$16$$.closest ? $element$jscomp$16$$.closest($selector$jscomp$1$$) : $closest$$module$src$dom$$($element$jscomp$16$$, function($element$jscomp$16$$) { | |
| return $matches$$module$src$dom$$($element$jscomp$16$$, $selector$jscomp$1$$) | |
| }) | |
| } | |
| function $matches$$module$src$dom$$($el$jscomp$3$$, $selector$jscomp$2$$) { | |
| var $matcher$$ = $el$jscomp$3$$.matches || $el$jscomp$3$$.webkitMatchesSelector || $el$jscomp$3$$.mozMatchesSelector || $el$jscomp$3$$.msMatchesSelector || $el$jscomp$3$$.oMatchesSelector; | |
| return $matcher$$ ? $matcher$$.call($el$jscomp$3$$, $selector$jscomp$2$$) : !1 | |
| } | |
| function $childElements$$module$src$dom$$($child$jscomp$1_parent$jscomp$6$$, $callback$jscomp$56$$) { | |
| var $children$jscomp$126$$ = []; | |
| for ($child$jscomp$1_parent$jscomp$6$$ = $child$jscomp$1_parent$jscomp$6$$.firstElementChild; $child$jscomp$1_parent$jscomp$6$$; $child$jscomp$1_parent$jscomp$6$$ = $child$jscomp$1_parent$jscomp$6$$.nextElementSibling) $callback$jscomp$56$$($child$jscomp$1_parent$jscomp$6$$) && $children$jscomp$126$$.push($child$jscomp$1_parent$jscomp$6$$); | |
| return $children$jscomp$126$$ | |
| } | |
| function $lastChildElement$$module$src$dom$$($child$jscomp$2_parent$jscomp$7$$, $callback$jscomp$57$$) { | |
| for ($child$jscomp$2_parent$jscomp$7$$ = $child$jscomp$2_parent$jscomp$7$$.lastElementChild; $child$jscomp$2_parent$jscomp$7$$; $child$jscomp$2_parent$jscomp$7$$ = $child$jscomp$2_parent$jscomp$7$$.previousElementSibling) if ($callback$jscomp$57$$($child$jscomp$2_parent$jscomp$7$$)) return $child$jscomp$2_parent$jscomp$7$$; | |
| return null | |
| } | |
| function $childNodes$$module$src$dom$$($child$jscomp$3_parent$jscomp$8$$, $callback$jscomp$58$$) { | |
| var $nodes$jscomp$3$$ = []; | |
| for ($child$jscomp$3_parent$jscomp$8$$ = $child$jscomp$3_parent$jscomp$8$$.firstChild; $child$jscomp$3_parent$jscomp$8$$; $child$jscomp$3_parent$jscomp$8$$ = $child$jscomp$3_parent$jscomp$8$$.nextSibling) $callback$jscomp$58$$($child$jscomp$3_parent$jscomp$8$$) && $nodes$jscomp$3$$.push($child$jscomp$3_parent$jscomp$8$$); | |
| return $nodes$jscomp$3$$ | |
| } | |
| var $scopeSelectorSupported$$module$src$dom$$; | |
| function $isScopeSelectorSupported$$module$src$dom$$($doc$jscomp$4_parent$jscomp$9$$) { | |
| $doc$jscomp$4_parent$jscomp$9$$ = $doc$jscomp$4_parent$jscomp$9$$.ownerDocument; | |
| try { | |
| var $testElement$$ = $doc$jscomp$4_parent$jscomp$9$$.createElement("div"), | |
| $testChild$$ = $doc$jscomp$4_parent$jscomp$9$$.createElement("div"); | |
| $testElement$$.appendChild($testChild$$); | |
| return $testElement$$.querySelector(":scope div") === $testChild$$ | |
| } catch ($e$jscomp$11$$) { | |
| return !1 | |
| } | |
| } | |
| function $scopedQuerySelector$$module$src$dom$$($root$jscomp$3$$, $element$jscomp$18_selector$jscomp$3$$) { | |
| null == $scopeSelectorSupported$$module$src$dom$$ && ($scopeSelectorSupported$$module$src$dom$$ = $isScopeSelectorSupported$$module$src$dom$$($root$jscomp$3$$)); | |
| if ($scopeSelectorSupported$$module$src$dom$$) return $root$jscomp$3$$.querySelector(":scope " + $element$jscomp$18_selector$jscomp$3$$); | |
| var $unique$$ = "i-amphtml-scoped"; | |
| $root$jscomp$3$$.classList.add($unique$$); | |
| $element$jscomp$18_selector$jscomp$3$$ = | |
| $root$jscomp$3$$.querySelector("." + $unique$$ + " " + $element$jscomp$18_selector$jscomp$3$$); | |
| $root$jscomp$3$$.classList.remove($unique$$); | |
| return $element$jscomp$18_selector$jscomp$3$$ | |
| } | |
| function $scopedQuerySelectorAll$$module$src$dom$$($root$jscomp$4$$, $elements$jscomp$1_selector$jscomp$4$$) { | |
| null == $scopeSelectorSupported$$module$src$dom$$ && ($scopeSelectorSupported$$module$src$dom$$ = $isScopeSelectorSupported$$module$src$dom$$($root$jscomp$4$$)); | |
| if ($scopeSelectorSupported$$module$src$dom$$) return $root$jscomp$4$$.querySelectorAll(":scope " + $elements$jscomp$1_selector$jscomp$4$$); | |
| $root$jscomp$4$$.classList.add("i-amphtml-scoped"); | |
| $elements$jscomp$1_selector$jscomp$4$$ = $root$jscomp$4$$.querySelectorAll(".i-amphtml-scoped " + | |
| $elements$jscomp$1_selector$jscomp$4$$); | |
| $root$jscomp$4$$.classList.remove("i-amphtml-scoped"); | |
| return $elements$jscomp$1_selector$jscomp$4$$ | |
| } | |
| function $getDataParamsFromAttributes$$module$src$dom$$($element$jscomp$19_params$jscomp$2$$) { | |
| var $opt_computeParamNameFunc$$ = void 0, | |
| $opt_paramPattern$$ = $VARIABLE_DATA_ATTRIBUTE_KEY$$module$extensions$amp_analytics$0_1$events$$, | |
| $computeParamNameFunc$$ = $opt_computeParamNameFunc$$ || function($element$jscomp$19_params$jscomp$2$$) { | |
| return $element$jscomp$19_params$jscomp$2$$ | |
| }, $dataset$$ = $element$jscomp$19_params$jscomp$2$$.dataset; | |
| $element$jscomp$19_params$jscomp$2$$ = {}; | |
| var $paramPattern$$ = $opt_paramPattern$$ ? | |
| $opt_paramPattern$$ : /^param(.+)/, | |
| $key$jscomp$39$$; | |
| for ($key$jscomp$39$$ in $dataset$$) { | |
| var $matches$$ = $key$jscomp$39$$.match($paramPattern$$); | |
| if ($matches$$) { | |
| var $param$jscomp$3$$ = $matches$$[1][0].toLowerCase() + $matches$$[1].substr(1); | |
| $element$jscomp$19_params$jscomp$2$$[$computeParamNameFunc$$($param$jscomp$3$$)] = $dataset$$[$key$jscomp$39$$] | |
| } | |
| } | |
| return $element$jscomp$19_params$jscomp$2$$ | |
| } | |
| function $ancestorElements$$module$src$dom$$($child$jscomp$4$$, $predicate$$) { | |
| for (var $ancestors$$ = [], $ancestor$$ = $child$jscomp$4$$.parentElement; $ancestor$$; $ancestor$$ = $ancestor$$.parentElement) $predicate$$($ancestor$$) && $ancestors$$.push($ancestor$$); | |
| return $ancestors$$ | |
| } | |
| function $ancestorElementsByTag$$module$src$dom$$($child$jscomp$5$$, $tagName$jscomp$10$$) { | |
| $tagName$jscomp$10$$ = $tagName$jscomp$10$$.toUpperCase(); | |
| return $ancestorElements$$module$src$dom$$($child$jscomp$5$$, function($child$jscomp$5$$) { | |
| return $child$jscomp$5$$.tagName == $tagName$jscomp$10$$ | |
| }) | |
| } | |
| function $iterateCursor$$module$src$dom$$($iterable$jscomp$2$$, $cb$jscomp$2$$) { | |
| for (var $i$jscomp$11$$ = 0, $value$jscomp$90$$; void 0 !== ($value$jscomp$90$$ = $iterable$jscomp$2$$[$i$jscomp$11$$]); $i$jscomp$11$$++) $cb$jscomp$2$$($value$jscomp$90$$, $i$jscomp$11$$) | |
| } | |
| function $openWindowDialog$$module$src$dom$$($win$jscomp$12$$, $url$jscomp$23$$, $target$jscomp$58$$, $opt_features$$) { | |
| try { | |
| var $res$$ = $win$jscomp$12$$.open($url$jscomp$23$$, $target$jscomp$58$$, $opt_features$$) | |
| } catch ($e$jscomp$12$$) { | |
| $dev$$module$src$log$$().error("DOM", "Failed to open url on target: ", $target$jscomp$58$$, $e$jscomp$12$$) | |
| } | |
| $res$$ || "_top" == $target$jscomp$58$$ || ($res$$ = $win$jscomp$12$$.open($url$jscomp$23$$, "_top")); | |
| return $res$$ | |
| } | |
| function $isJsonScriptTag$$module$src$dom$$($element$jscomp$21$$) { | |
| return "SCRIPT" == $element$jscomp$21$$.tagName && "APPLICATION/JSON" == $element$jscomp$21$$.getAttribute("type").toUpperCase() | |
| } | |
| function $isJsonLdScriptTag$$module$src$dom$$($element$jscomp$22$$) { | |
| return "SCRIPT" == $element$jscomp$22$$.tagName && "APPLICATION/LD+JSON" == $element$jscomp$22$$.getAttribute("type").toUpperCase() | |
| } | |
| function $escapeCssSelectorIdent$$module$src$dom$$($win$jscomp$13$$, $ident$jscomp$1$$) { | |
| return $win$jscomp$13$$.CSS && $win$jscomp$13$$.CSS.escape ? $win$jscomp$13$$.CSS.escape($ident$jscomp$1$$) : $cssEscape$$module$third_party$css_escape$css_escape$$($ident$jscomp$1$$) | |
| } | |
| function $isIframed$$module$src$dom$$($win$jscomp$14$$) { | |
| return $win$jscomp$14$$.parent && $win$jscomp$14$$.parent != $win$jscomp$14$$ | |
| } | |
| function $fullscreenEnter$$module$src$dom$$($element$jscomp$26$$) { | |
| var $requestFs$$ = $element$jscomp$26$$.requestFullscreen || $element$jscomp$26$$.requestFullScreen || $element$jscomp$26$$.webkitRequestFullscreen || $element$jscomp$26$$.webkitRequestFullScreen || $element$jscomp$26$$.webkitEnterFullscreen || $element$jscomp$26$$.webkitEnterFullScreen || $element$jscomp$26$$.msRequestFullscreen || $element$jscomp$26$$.msRequestFullScreen || $element$jscomp$26$$.mozRequestFullscreen || $element$jscomp$26$$.mozRequestFullScreen; | |
| $requestFs$$ && $requestFs$$.call($element$jscomp$26$$) | |
| } | |
| function $fullscreenExit$$module$src$dom$$($element$jscomp$27$$) { | |
| var $exitFs$$ = $element$jscomp$27$$.cancelFullScreen || $element$jscomp$27$$.exitFullscreen || $element$jscomp$27$$.exitFullScreen || $element$jscomp$27$$.webkitExitFullscreen || $element$jscomp$27$$.webkitExitFullScreen || $element$jscomp$27$$.webkitCancelFullScreen || $element$jscomp$27$$.mozCancelFullScreen || $element$jscomp$27$$.msExitFullscreen; | |
| $exitFs$$ ? $exitFs$$.call($element$jscomp$27$$) : ($element$jscomp$27$$.ownerDocument && ($exitFs$$ = $element$jscomp$27$$.ownerDocument.cancelFullScreen || | |
| $element$jscomp$27$$.ownerDocument.exitFullscreen || $element$jscomp$27$$.ownerDocument.exitFullScreen || $element$jscomp$27$$.ownerDocument.webkitExitFullscreen || $element$jscomp$27$$.ownerDocument.webkitExitFullScreen || $element$jscomp$27$$.ownerDocument.webkitCancelFullScreen || $element$jscomp$27$$.ownerDocument.mozCancelFullScreen || $element$jscomp$27$$.ownerDocument.msExitFullscreen), $exitFs$$ && $exitFs$$.call($element$jscomp$27$$.ownerDocument)) | |
| }; | |
| var $module$src$config$$ = {}, $env$$module$src$config$$ = self.AMP_CONFIG || {}; | |
| $module$src$config$$.urls = { | |
| thirdParty: $env$$module$src$config$$.thirdPartyUrl || "https://3p.ampproject.net", | |
| thirdPartyFrameHost: $env$$module$src$config$$.thirdPartyFrameHost || "ampproject.net", | |
| thirdPartyFrameRegex: ("string" == typeof $env$$module$src$config$$.thirdPartyFrameRegex ? new RegExp($env$$module$src$config$$.thirdPartyFrameRegex) : $env$$module$src$config$$.thirdPartyFrameRegex) || /^d-\d+\.ampproject\.net$/, | |
| cdn: $env$$module$src$config$$.cdnUrl || "https://cdn.ampproject.org", | |
| cdnProxyRegex: ("string" == | |
| typeof $env$$module$src$config$$.cdnProxyRegex ? new RegExp($env$$module$src$config$$.cdnProxyRegex) : $env$$module$src$config$$.cdnProxyRegex) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/, | |
| localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | |
| errorReporting: $env$$module$src$config$$.errorReportingUrl || "https://amp-error-reporting.appspot.com/r", | |
| localDev: $env$$module$src$config$$.localDev || !1 | |
| }; | |
| var $a$$module$src$url$$, $cache$$module$src$url$$, $AMP_JS_PARAMS_REGEX$$module$src$url$$ = /[?&]amp_js[^&]*/, | |
| $GOOGLE_EXPERIMENT_PARAMS_REGEX$$module$src$url$$ = /[?&]usqp[^&]*/, | |
| $INVALID_PROTOCOLS$$module$src$url$$ = ["javascript:", "data:", "vbscript:"]; | |
| function $getWinOrigin$$module$src$url$$($win$jscomp$15$$) { | |
| return $win$jscomp$15$$.origin || $parseUrl$$module$src$url$$($win$jscomp$15$$.location.href).origin | |
| } | |
| function $parseUrl$$module$src$url$$($url$jscomp$24$$, $opt_nocache$$) { | |
| $a$$module$src$url$$ || ($a$$module$src$url$$ = self.document.createElement("a"), $cache$$module$src$url$$ = self.UrlCache || (self.UrlCache = Object.create(null))); | |
| var $fromCache$$ = $cache$$module$src$url$$[$url$jscomp$24$$]; | |
| if ($fromCache$$) return $fromCache$$; | |
| var $info$$ = $parseUrlWithA$$module$src$url$$($a$$module$src$url$$, $url$jscomp$24$$), | |
| $frozen$$ = $info$$; | |
| return $opt_nocache$$ ? $frozen$$ : $cache$$module$src$url$$[$url$jscomp$24$$] = $frozen$$ | |
| } | |
| function $parseUrlWithA$$module$src$url$$($a$jscomp$1$$, $info$jscomp$1_url$jscomp$25$$) { | |
| $a$jscomp$1$$.href = $info$jscomp$1_url$jscomp$25$$; | |
| $a$jscomp$1$$.protocol || ($a$jscomp$1$$.href = $a$jscomp$1$$.href); | |
| $info$jscomp$1_url$jscomp$25$$ = { | |
| href: $a$jscomp$1$$.href, | |
| protocol: $a$jscomp$1$$.protocol, | |
| host: $a$jscomp$1$$.host, | |
| hostname: $a$jscomp$1$$.hostname, | |
| port: "0" == $a$jscomp$1$$.port ? "" : $a$jscomp$1$$.port, | |
| pathname: $a$jscomp$1$$.pathname, | |
| search: $a$jscomp$1$$.search, | |
| hash: $a$jscomp$1$$.hash, | |
| origin: null | |
| }; | |
| "/" !== $info$jscomp$1_url$jscomp$25$$.pathname[0] && | |
| ($info$jscomp$1_url$jscomp$25$$.pathname = "/" + $info$jscomp$1_url$jscomp$25$$.pathname); | |
| if ("http:" == $info$jscomp$1_url$jscomp$25$$.protocol && 80 == $info$jscomp$1_url$jscomp$25$$.port || "https:" == $info$jscomp$1_url$jscomp$25$$.protocol && 443 == $info$jscomp$1_url$jscomp$25$$.port) $info$jscomp$1_url$jscomp$25$$.port = "", $info$jscomp$1_url$jscomp$25$$.host = $info$jscomp$1_url$jscomp$25$$.hostname; | |
| $info$jscomp$1_url$jscomp$25$$.origin = $a$jscomp$1$$.origin && "null" != $a$jscomp$1$$.origin ? $a$jscomp$1$$.origin : "data:" != | |
| $info$jscomp$1_url$jscomp$25$$.protocol && $info$jscomp$1_url$jscomp$25$$.host ? $info$jscomp$1_url$jscomp$25$$.protocol + "//" + $info$jscomp$1_url$jscomp$25$$.host : $info$jscomp$1_url$jscomp$25$$.href; | |
| return $info$jscomp$1_url$jscomp$25$$ | |
| } | |
| function $appendEncodedParamStringToUrl$$module$src$url$$($url$jscomp$26$$, $paramString$$, $opt_addToFront$$) { | |
| if (!$paramString$$) return $url$jscomp$26$$; | |
| var $mainAndFragment$$ = $url$jscomp$26$$.split("#", 2), | |
| $mainAndQuery$$ = $mainAndFragment$$[0].split("?", 2), | |
| $newUrl$$ = $mainAndQuery$$[0] + ($mainAndQuery$$[1] ? $opt_addToFront$$ ? "?" + $paramString$$ + "&" + $mainAndQuery$$[1] : "?" + $mainAndQuery$$[1] + "&" + $paramString$$ : "?" + $paramString$$); | |
| return $newUrl$$ += $mainAndFragment$$[1] ? "#" + $mainAndFragment$$[1] : "" | |
| } | |
| function $addParamToUrl$$module$src$url$$($url$jscomp$27$$, $field$jscomp$4_key$jscomp$41$$, $value$jscomp$91$$, $opt_addToFront$jscomp$1$$) { | |
| $field$jscomp$4_key$jscomp$41$$ = encodeURIComponent($field$jscomp$4_key$jscomp$41$$) + "=" + encodeURIComponent($value$jscomp$91$$); | |
| return $appendEncodedParamStringToUrl$$module$src$url$$($url$jscomp$27$$, $field$jscomp$4_key$jscomp$41$$, $opt_addToFront$jscomp$1$$) | |
| } | |
| function $addParamsToUrl$$module$src$url$$($url$jscomp$28$$, $params$jscomp$3$$) { | |
| return $appendEncodedParamStringToUrl$$module$src$url$$($url$jscomp$28$$, $serializeQueryString$$module$src$url$$($params$jscomp$3$$)) | |
| } | |
| function $serializeQueryString$$module$src$url$$($params$jscomp$4$$) { | |
| var $s$jscomp$5$$ = [], | |
| $k$jscomp$1$$; | |
| for ($k$jscomp$1$$ in $params$jscomp$4$$) { | |
| var $v$$ = $params$jscomp$4$$[$k$jscomp$1$$]; | |
| if (null != $v$$) if ($isArray$$module$src$types$$($v$$)) for (var $i$jscomp$12_sv$7$$ = 0; $i$jscomp$12_sv$7$$ < $v$$.length; $i$jscomp$12_sv$7$$++) { | |
| var $sv$$ = $v$$[$i$jscomp$12_sv$7$$]; | |
| $s$jscomp$5$$.push(encodeURIComponent($k$jscomp$1$$) + "=" + encodeURIComponent($sv$$)) | |
| } else $i$jscomp$12_sv$7$$ = $v$$, $s$jscomp$5$$.push(encodeURIComponent($k$jscomp$1$$) + | |
| "=" + encodeURIComponent($i$jscomp$12_sv$7$$)) | |
| } | |
| return $s$jscomp$5$$.join("&") | |
| } | |
| function $isSecureUrl$$module$src$url$$($url$jscomp$29$$) { | |
| "string" == typeof $url$jscomp$29$$ && ($url$jscomp$29$$ = $parseUrl$$module$src$url$$($url$jscomp$29$$)); | |
| return "https:" == $url$jscomp$29$$.protocol || "localhost" == $url$jscomp$29$$.hostname || $endsWith$$module$src$string$$($url$jscomp$29$$.hostname, ".localhost") | |
| } | |
| function $assertHttpsUrl$$module$src$url$$($urlString$jscomp$1$$, $elementContext$$, $sourceName$$) { | |
| $sourceName$$ = void 0 === $sourceName$$ ? "source" : $sourceName$$; | |
| $user$$module$src$log$$().assert(null != $urlString$jscomp$1$$, "%s %s must be available", $elementContext$$, $sourceName$$); | |
| var $theUrlString$$ = $urlString$jscomp$1$$; | |
| $user$$module$src$log$$().assert($isSecureUrl$$module$src$url$$($theUrlString$$) || /^(\/\/)/.test($theUrlString$$), '%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s', | |
| $elementContext$$, $sourceName$$, $theUrlString$$); | |
| return $theUrlString$$ | |
| } | |
| function $assertAbsoluteHttpOrHttpsUrl$$module$src$url$$($urlString$jscomp$2$$) { | |
| $user$$module$src$log$$().assert(/^https?:/i.test($urlString$jscomp$2$$), 'URL must start with "http://" or "https://". Invalid value: %s', $urlString$jscomp$2$$); | |
| return $parseUrl$$module$src$url$$($urlString$jscomp$2$$).href | |
| } | |
| function $removeFragment$$module$src$url$$($url$jscomp$30$$) { | |
| var $index$jscomp$58$$ = $url$jscomp$30$$.indexOf("#"); | |
| return -1 == $index$jscomp$58$$ ? $url$jscomp$30$$ : $url$jscomp$30$$.substring(0, $index$jscomp$58$$) | |
| } | |
| function $isProxyOrigin$$module$src$url$$($url$jscomp$32$$) { | |
| "string" == typeof $url$jscomp$32$$ && ($url$jscomp$32$$ = $parseUrl$$module$src$url$$($url$jscomp$32$$)); | |
| return $module$src$config$$.urls.cdnProxyRegex.test($url$jscomp$32$$.origin) | |
| } | |
| function $isProtocolValid$$module$src$url$$($url$jscomp$34$$) { | |
| if (!$url$jscomp$34$$) return !0; | |
| "string" == typeof $url$jscomp$34$$ && ($url$jscomp$34$$ = $parseUrl$$module$src$url$$($url$jscomp$34$$)); | |
| return !$INVALID_PROTOCOLS$$module$src$url$$.includes($url$jscomp$34$$.protocol) | |
| } | |
| function $getSourceUrl$$module$src$url$$($url$jscomp$35$$) { | |
| "string" == typeof $url$jscomp$35$$ && ($url$jscomp$35$$ = $parseUrl$$module$src$url$$($url$jscomp$35$$)); | |
| if (!$isProxyOrigin$$module$src$url$$($url$jscomp$35$$)) return $url$jscomp$35$$.href; | |
| var $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$ = $url$jscomp$35$$.pathname.split("/"), | |
| $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ = $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$[1]; | |
| $user$$module$src$log$$().assert("a" == $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ || "c" == $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ || "v" == $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$, "Unknown path prefix in url %s", $url$jscomp$35$$.href); | |
| var $domainOrHttpsSignal$$ = | |
| $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$[2], | |
| $origin$$ = "s" == $domainOrHttpsSignal$$ ? "https://" + decodeURIComponent($JSCompiler_temp_const$jscomp$222_path$jscomp$3$$[3]) : "http://" + decodeURIComponent($domainOrHttpsSignal$$); | |
| $user$$module$src$log$$().assert(0 < $origin$$.indexOf("."), "Expected a . in origin %s", $origin$$); | |
| $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$.splice(1, "s" == $domainOrHttpsSignal$$ ? 3 : 2); | |
| $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$ = $origin$$ + $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$.join("/"); | |
| $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ = ($JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ = $url$jscomp$35$$.search) && "?" != $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ ? ($JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ = | |
| $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$.replace($AMP_JS_PARAMS_REGEX$$module$src$url$$, "").replace($GOOGLE_EXPERIMENT_PARAMS_REGEX$$module$src$url$$, "").replace(/^[?&]/, "")) ? "?" + $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ : "" : ""; | |
| return $JSCompiler_temp_const$jscomp$222_path$jscomp$3$$ + $JSCompiler_inline_result$jscomp$223_JSCompiler_search$jscomp$inline_534_JSCompiler_urlSearch$jscomp$inline_533_prefix$jscomp$4$$ + | |
| ($url$jscomp$35$$.hash || "") | |
| } | |
| function $getSourceOrigin$$module$src$url$$($url$jscomp$36$$) { | |
| return $parseUrl$$module$src$url$$($getSourceUrl$$module$src$url$$($url$jscomp$36$$)).origin | |
| } | |
| function $resolveRelativeUrl$$module$src$url$$($relativeUrlString$$, $baseUrl$$) { | |
| "string" == typeof $baseUrl$$ && ($baseUrl$$ = $parseUrl$$module$src$url$$($baseUrl$$)); | |
| if ("function" == typeof URL) var $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ = (new URL($relativeUrlString$$, $baseUrl$$.href)).toString(); | |
| else { | |
| $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ = $relativeUrlString$$; | |
| var $JSCompiler_baseUrl$jscomp$inline_537$$ = $baseUrl$$; | |
| "string" == typeof $JSCompiler_baseUrl$jscomp$inline_537$$ && | |
| ($JSCompiler_baseUrl$jscomp$inline_537$$ = $parseUrl$$module$src$url$$($JSCompiler_baseUrl$jscomp$inline_537$$)); | |
| $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ = $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$.replace(/\\/g, "/"); | |
| var $JSCompiler_relativeUrl$jscomp$inline_538$$ = $parseUrl$$module$src$url$$($JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$); | |
| $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ = | |
| $startsWith$$module$src$string$$($JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$.toLowerCase(), $JSCompiler_relativeUrl$jscomp$inline_538$$.protocol) ? $JSCompiler_relativeUrl$jscomp$inline_538$$.href : $startsWith$$module$src$string$$($JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$, "//") ? $JSCompiler_baseUrl$jscomp$inline_537$$.protocol + $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ : $startsWith$$module$src$string$$($JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$, | |
| "/") ? $JSCompiler_baseUrl$jscomp$inline_537$$.origin + $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ : $JSCompiler_baseUrl$jscomp$inline_537$$.origin + $JSCompiler_baseUrl$jscomp$inline_537$$.pathname.replace(/\/[^/]*$/, "/") + $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ | |
| } | |
| return $JSCompiler_relativeUrlString$jscomp$inline_536_JSCompiler_temp$jscomp$224$$ | |
| } | |
| function $checkCorsUrl$$module$src$url$$($url$jscomp$38$$) { | |
| var $parsedUrl$$ = $parseUrl$$module$src$url$$($url$jscomp$38$$), | |
| $query$jscomp$8$$ = $parseQueryString_$$module$src$url_parse_query_string$$($parsedUrl$$.search); | |
| $user$$module$src$log$$().assert(!("__amp_source_origin" in $query$jscomp$8$$), "Source origin is not allowed in %s", $url$jscomp$38$$) | |
| }; | |
| function $handleClick$$module$ads$alp$handler$$($JSCompiler_url$jscomp$inline_542_e$jscomp$14$$, $opt_viewerNavigate$$) { | |
| if (!($JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.defaultPrevented || 0 != $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.buttons && 1 != $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.buttons || $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.ctrlKey || $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.altKey || $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.shiftKey || $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.metaKey)) { | |
| var $link$$ = | |
| $getLinkInfo$$module$ads$alp$handler$$($JSCompiler_url$jscomp$inline_542_e$jscomp$14$$); | |
| if ($link$$ && $link$$.eventualUrl && !1 !== $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.isTrusted) { | |
| var $fragment$$ = "click=" + encodeURIComponent($addParamToUrl$$module$src$url$$($link$$.a.href, "amp", "1", !0)), | |
| $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ = $link$$.eventualUrl; | |
| $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ = -1 == $link$$.eventualUrl.indexOf("#") ? $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ + | |
| ("#" + $fragment$$) : $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ + ("&" + $fragment$$); | |
| var $win$jscomp$18$$ = $link$$.a.ownerDocument.defaultView, | |
| $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = $win$jscomp$18$$.location.ancestorOrigins; | |
| $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ && | |
| "http://localhost:8000" == $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$[$JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.length - 1] && ($JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ = $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$.replace($parseUrl$$module$src$url$$($link$$.eventualUrl).host + | |
| "/c/", "http://localhost:8000/max/")); | |
| $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$.preventDefault(); | |
| if ($opt_viewerNavigate$$) $opt_viewerNavigate$$($JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$); | |
| else { | |
| $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$ = $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$; | |
| $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$ = ($link$$.a.target || "_top").toLowerCase(); | |
| if ($win$jscomp$18$$.location.ancestorOrigins) if ($JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = | |
| $win$jscomp$18$$.location.ancestorOrigins, 2 > $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.length || -1 == $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$[$JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.length - | |
| 1].indexOf(".google.")) $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = null; | |
| else { | |
| var $JSCompiler_amp$jscomp$inline_2397$$ = $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$[$JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.length - | |
| 2], | |
| $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$; | |
| ($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = $isProxyOrigin$$module$src$url$$($JSCompiler_amp$jscomp$inline_2397$$)) || ($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = $JSCompiler_amp$jscomp$inline_2397$$, "string" == typeof $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ && | |
| ($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = $parseUrl$$module$src$url$$($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$)), $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = $module$src$config$$.urls.localhostRegex.test($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$.origin)); | |
| if ($JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$) { | |
| $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = $win$jscomp$18$$; | |
| for (var $JSCompiler_i$jscomp$inline_2403$$ = 0; $JSCompiler_i$jscomp$inline_2403$$ < $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.length - 1; $JSCompiler_i$jscomp$inline_2403$$++) $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$ = | |
| $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$.parent; | |
| $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = { | |
| win: $JSCompiler_parent$jscomp$inline_2402_JSCompiler_temp$jscomp$inline_2398_JSCompiler_url$jscomp$inline_2399$$, | |
| origin: $JSCompiler_amp$jscomp$inline_2397$$ | |
| } | |
| } else $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = | |
| null | |
| } else $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ = null; | |
| $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$ ? $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.win.postMessage("a2a;" + | |
| JSON.stringify($dict$$module$src$utils$object$$({ | |
| url: $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$ | |
| })), $JSCompiler_a2aAncestor$jscomp$inline_544_JSCompiler_inline_result$jscomp$2356_JSCompiler_origins$jscomp$inline_2396_JSCompiler_temp$jscomp$inline_2400_ancestors$jscomp$1$$.origin) : $openWindowDialog$$module$src$dom$$($win$jscomp$18$$, $JSCompiler_url$jscomp$inline_542_e$jscomp$14$$, $JSCompiler_target$jscomp$inline_543_destination$jscomp$3$$) | |
| } | |
| } | |
| } | |
| } | |
| function $getLinkInfo$$module$ads$alp$handler$$($a$jscomp$2_e$jscomp$15$$) { | |
| if ($a$jscomp$2_e$jscomp$15$$ = $closest$$module$src$dom$$($a$jscomp$2_e$jscomp$15$$.target, function($a$jscomp$2_e$jscomp$15$$) { | |
| return "A" == $a$jscomp$2_e$jscomp$15$$.tagName && $a$jscomp$2_e$jscomp$15$$.href | |
| })) return { | |
| eventualUrl: $getEventualUrl$$module$ads$alp$handler$$($a$jscomp$2_e$jscomp$15$$), | |
| a: $a$jscomp$2_e$jscomp$15$$ | |
| } | |
| } | |
| function $getEventualUrl$$module$ads$alp$handler$$($a$jscomp$3$$) { | |
| var $urlParamName$$ = $a$jscomp$3$$.getAttribute("data-url-param-name") || "adurl", | |
| $eventualUrl$$ = $parseQueryString_$$module$src$url_parse_query_string$$($a$jscomp$3$$.search)[$urlParamName$$]; | |
| if ($eventualUrl$$ && $isProxyOrigin$$module$src$url$$($eventualUrl$$) && $startsWith$$module$src$string$$($parseUrl$$module$src$url$$($eventualUrl$$).pathname, "/c/")) return $eventualUrl$$ | |
| } | |
| function $warmupDynamic$$module$ads$alp$handler$$($e$jscomp$16$$) { | |
| var $link$jscomp$1$$ = $getLinkInfo$$module$ads$alp$handler$$($e$jscomp$16$$); | |
| if ($link$jscomp$1$$ && $link$jscomp$1$$.eventualUrl) { | |
| var $linkRel0$$ = document.createElement("link"); | |
| $linkRel0$$.rel = "preload"; | |
| $linkRel0$$.href = $link$jscomp$1$$.eventualUrl; | |
| var $linkRel1$$ = document.createElement("link"); | |
| $linkRel1$$.rel = "preload"; | |
| $linkRel1$$.as = "fetch"; | |
| $linkRel1$$.href = $link$jscomp$1$$.eventualUrl; | |
| var $head$$ = $getHeadOrFallback$$module$ads$alp$handler$$($e$jscomp$16$$.target.ownerDocument); | |
| $head$$.appendChild($linkRel0$$); | |
| $head$$.appendChild($linkRel1$$) | |
| } | |
| } | |
| function $getHeadOrFallback$$module$ads$alp$handler$$($doc$jscomp$6$$) { | |
| return $doc$jscomp$6$$.head || $doc$jscomp$6$$.documentElement | |
| }; | |
| function $exponentialBackoff$$module$src$exponential_backoff$$() { | |
| var $getTimeout$$ = $exponentialBackoffClock$$module$src$exponential_backoff$$(); | |
| return function($work$jscomp$1$$) { | |
| return setTimeout($work$jscomp$1$$, $getTimeout$$()) | |
| } | |
| } | |
| function $exponentialBackoffClock$$module$src$exponential_backoff$$() { | |
| var $count$jscomp$14$$ = 0; | |
| return function() { | |
| var $wait$$ = Math.pow(1.5, $count$jscomp$14$$++); | |
| var $JSCompiler_jitter$jscomp$inline_555_JSCompiler_opt_perc$jscomp$inline_554$$ = $wait$$ * ($JSCompiler_jitter$jscomp$inline_555_JSCompiler_opt_perc$jscomp$inline_554$$ || .3) * Math.random();.5 < Math.random() && ($JSCompiler_jitter$jscomp$inline_555_JSCompiler_opt_perc$jscomp$inline_554$$ *= -1); | |
| $wait$$ += $JSCompiler_jitter$jscomp$inline_555_JSCompiler_opt_perc$jscomp$inline_554$$; | |
| return 1E3 * $wait$$ | |
| } | |
| }; | |
| var $optsSupported$$module$src$event_helper_listen$$; | |
| function $internalListenImplementation$$module$src$event_helper_listen$$($element$jscomp$31$$, $eventType$jscomp$3$$, $listener$jscomp$56$$, $opt_evtListenerOpts$$) { | |
| function $wrapped$$($element$jscomp$31$$) { | |
| try { | |
| return $localListener$$($element$jscomp$31$$) | |
| } catch ($e$jscomp$17$$) { | |
| throw self.reportError($e$jscomp$17$$), $e$jscomp$17$$; | |
| } | |
| } | |
| var $localElement$$ = $element$jscomp$31$$, | |
| $localListener$$ = $listener$jscomp$56$$, | |
| $optsSupported$$ = $detectEvtListenerOptsSupport$$module$src$event_helper_listen$$(), | |
| $capture$$ = !1; | |
| $opt_evtListenerOpts$$ && ($capture$$ = $opt_evtListenerOpts$$.capture); | |
| $localElement$$.addEventListener($eventType$jscomp$3$$, $wrapped$$, $optsSupported$$ ? $opt_evtListenerOpts$$ : $capture$$); | |
| return function() { | |
| $localElement$$ && $localElement$$.removeEventListener($eventType$jscomp$3$$, $wrapped$$, $optsSupported$$ ? $opt_evtListenerOpts$$ : $capture$$); | |
| $wrapped$$ = $localElement$$ = $localListener$$ = null | |
| } | |
| } | |
| function $detectEvtListenerOptsSupport$$module$src$event_helper_listen$$() { | |
| if (void 0 !== $optsSupported$$module$src$event_helper_listen$$) return $optsSupported$$module$src$event_helper_listen$$; | |
| $optsSupported$$module$src$event_helper_listen$$ = !1; | |
| try { | |
| var $options$jscomp$13$$ = { | |
| get capture() { | |
| $optsSupported$$module$src$event_helper_listen$$ = !0 | |
| } | |
| }; | |
| self.addEventListener("test-options", null, $options$jscomp$13$$); | |
| self.removeEventListener("test-options", null, $options$jscomp$13$$) | |
| } catch ($err$jscomp$3$$) {} | |
| return $optsSupported$$module$src$event_helper_listen$$ | |
| }; | |
| function $createCustomEvent$$module$src$event_helper$$($e$jscomp$18_win$jscomp$23$$, $type$jscomp$116$$, $detail$jscomp$3$$, $opt_eventInit$jscomp$2$$) { | |
| var $eventInit$$ = { | |
| detail: $detail$jscomp$3$$ | |
| }; | |
| Object.assign($eventInit$$, $opt_eventInit$jscomp$2$$); | |
| if ("function" == typeof $e$jscomp$18_win$jscomp$23$$.CustomEvent) return new $e$jscomp$18_win$jscomp$23$$.CustomEvent($type$jscomp$116$$, $eventInit$$); | |
| $e$jscomp$18_win$jscomp$23$$ = $e$jscomp$18_win$jscomp$23$$.document.createEvent("CustomEvent"); | |
| $e$jscomp$18_win$jscomp$23$$.initCustomEvent($type$jscomp$116$$, !! $eventInit$$.bubbles, !! $eventInit$$.cancelable, $detail$jscomp$3$$); | |
| return $e$jscomp$18_win$jscomp$23$$ | |
| } | |
| function $listen$$module$src$event_helper$$($element$jscomp$32$$, $eventType$jscomp$4$$, $listener$jscomp$57$$) { | |
| return $internalListenImplementation$$module$src$event_helper_listen$$($element$jscomp$32$$, $eventType$jscomp$4$$, $listener$jscomp$57$$, void 0) | |
| } | |
| function $listenOnce$$module$src$event_helper$$($element$jscomp$33$$, $eventType$jscomp$5$$, $listener$jscomp$58$$, $opt_evtListenerOpts$jscomp$2$$) { | |
| var $localListener$jscomp$1$$ = $listener$jscomp$58$$, | |
| $unlisten$$ = $internalListenImplementation$$module$src$event_helper_listen$$($element$jscomp$33$$, $eventType$jscomp$5$$, function($element$jscomp$33$$) { | |
| try { | |
| $localListener$jscomp$1$$($element$jscomp$33$$) | |
| } finally { | |
| $localListener$jscomp$1$$ = null, $unlisten$$() | |
| } | |
| }, $opt_evtListenerOpts$jscomp$2$$); | |
| return $unlisten$$ | |
| } | |
| function $listenOncePromise$$module$src$event_helper$$($element$jscomp$34$$, $opt_cancel$$) { | |
| var $unlisten$jscomp$1$$, $eventPromise$$ = new Promise(function($opt_cancel$$) { | |
| $unlisten$jscomp$1$$ = $listenOnce$$module$src$event_helper$$($element$jscomp$34$$, "click", $opt_cancel$$, void 0) | |
| }); | |
| $eventPromise$$.then($unlisten$jscomp$1$$, $unlisten$jscomp$1$$); | |
| $opt_cancel$$ && $opt_cancel$$($unlisten$jscomp$1$$); | |
| return $eventPromise$$ | |
| } | |
| function $loadPromise$$module$src$event_helper$$($eleOrWindow$jscomp$1$$) { | |
| var $unlistenLoad$$, $unlistenError$$; | |
| if ($eleOrWindow$jscomp$1$$.complete || "complete" == $eleOrWindow$jscomp$1$$.readyState || $eleOrWindow$jscomp$1$$.document && "complete" == $eleOrWindow$jscomp$1$$.document.readyState) return Promise.resolve($eleOrWindow$jscomp$1$$); | |
| var $loadingPromise$$ = new Promise(function($loadingPromise$$, $reject$$) { | |
| var $resolve$jscomp$4$$ = $eleOrWindow$jscomp$1$$.tagName; | |
| $unlistenLoad$$ = "AUDIO" === $resolve$jscomp$4$$ || | |
| "VIDEO" === $resolve$jscomp$4$$ ? $listenOnce$$module$src$event_helper$$($eleOrWindow$jscomp$1$$, "loadstart", $loadingPromise$$) : $listenOnce$$module$src$event_helper$$($eleOrWindow$jscomp$1$$, "load", $loadingPromise$$); | |
| $resolve$jscomp$4$$ && ($unlistenError$$ = $listenOnce$$module$src$event_helper$$($eleOrWindow$jscomp$1$$, "error", $reject$$)) | |
| }); | |
| return $loadingPromise$$.then(function() { | |
| $unlistenError$$ && $unlistenError$$(); | |
| return $eleOrWindow$jscomp$1$$ | |
| }, function() { | |
| $unlistenLoad$$ && $unlistenLoad$$(); | |
| var $unlistenError$$ = | |
| $eleOrWindow$jscomp$1$$; | |
| $unlistenError$$ && $unlistenError$$.src && ($unlistenError$$ = $unlistenError$$.src); | |
| throw $user$$module$src$log$$().createError("Failed to load:", $unlistenError$$); | |
| }) | |
| }; | |
| function $utf8DecodeSync$$module$src$utils$bytes$$($bytes$jscomp$1$$) { | |
| if ("undefined" !== typeof TextDecoder) return (new TextDecoder("utf-8")).decode($bytes$jscomp$1$$); | |
| var $asciiString$$ = $bytesToString$$module$src$utils$bytes$$(new Uint8Array($bytes$jscomp$1$$.buffer || $bytes$jscomp$1$$)); | |
| return decodeURIComponent(escape($asciiString$$)) | |
| } | |
| function $utf8EncodeSync$$module$src$utils$bytes$$($string$jscomp$10$$) { | |
| return "undefined" !== typeof TextEncoder ? (new TextEncoder("utf-8")).encode($string$jscomp$10$$) : $stringToBytes$$module$src$utils$bytes$$(unescape(encodeURIComponent($string$jscomp$10$$))) | |
| } | |
| function $stringToBytes$$module$src$utils$bytes$$($str$jscomp$7$$) { | |
| for (var $bytes$jscomp$2$$ = new Uint8Array($str$jscomp$7$$.length), $i$jscomp$14$$ = 0; $i$jscomp$14$$ < $str$jscomp$7$$.length; $i$jscomp$14$$++) { | |
| var $charCode$$ = $str$jscomp$7$$.charCodeAt($i$jscomp$14$$); | |
| $bytes$jscomp$2$$[$i$jscomp$14$$] = $charCode$$ | |
| } | |
| return $bytes$jscomp$2$$ | |
| } | |
| function $bytesToString$$module$src$utils$bytes$$($bytes$jscomp$3$$) { | |
| for (var $array$jscomp$8$$ = Array($bytes$jscomp$3$$.length), $i$jscomp$15$$ = 0; $i$jscomp$15$$ < $bytes$jscomp$3$$.length; $i$jscomp$15$$++) $array$jscomp$8$$[$i$jscomp$15$$] = String.fromCharCode($bytes$jscomp$3$$[$i$jscomp$15$$]); | |
| return $array$jscomp$8$$.join("") | |
| }; | |
| function $recreateNonProtoObject$$module$src$json$$($obj$jscomp$28$$) { | |
| var $copy$$ = Object.create(null), | |
| $k$jscomp$2$$; | |
| for ($k$jscomp$2$$ in $obj$jscomp$28$$) if ($hasOwnProperty$$module$src$json$$($obj$jscomp$28$$, $k$jscomp$2$$)) { | |
| var $v$jscomp$1$$ = $obj$jscomp$28$$[$k$jscomp$2$$]; | |
| $copy$$[$k$jscomp$2$$] = $isObject$$module$src$types$$($v$jscomp$1$$) ? $recreateNonProtoObject$$module$src$json$$($v$jscomp$1$$) : $v$jscomp$1$$ | |
| } | |
| return $copy$$ | |
| } | |
| function $getValueForExpr$$module$src$json$$($obj$jscomp$29_value$jscomp$92$$, $expr$jscomp$3_i$jscomp$16$$) { | |
| if ("." == $expr$jscomp$3_i$jscomp$16$$) return $obj$jscomp$29_value$jscomp$92$$; | |
| var $parts$$ = $expr$jscomp$3_i$jscomp$16$$.split("."); | |
| for ($expr$jscomp$3_i$jscomp$16$$ = 0; $expr$jscomp$3_i$jscomp$16$$ < $parts$$.length; $expr$jscomp$3_i$jscomp$16$$++) { | |
| var $part$$ = $parts$$[$expr$jscomp$3_i$jscomp$16$$]; | |
| if ($part$$ && $obj$jscomp$29_value$jscomp$92$$ && void 0 !== $obj$jscomp$29_value$jscomp$92$$[$part$$] && $hasOwnProperty$$module$src$json$$($obj$jscomp$29_value$jscomp$92$$, | |
| $part$$)) $obj$jscomp$29_value$jscomp$92$$ = $obj$jscomp$29_value$jscomp$92$$[$part$$]; | |
| else { | |
| $obj$jscomp$29_value$jscomp$92$$ = void 0; | |
| break | |
| } | |
| } | |
| return $obj$jscomp$29_value$jscomp$92$$ | |
| } | |
| function $parseJson$$module$src$json$$($json$$) { | |
| return JSON.parse($json$$) | |
| } | |
| function $tryParseJson$$module$src$json$$($json$jscomp$1$$, $opt_onFailed$$) { | |
| try { | |
| return $parseJson$$module$src$json$$($json$jscomp$1$$) | |
| } catch ($e$jscomp$19$$) { | |
| $opt_onFailed$$ && $opt_onFailed$$($e$jscomp$19$$) | |
| } | |
| } | |
| function $recursiveEquals$$module$src$json$$($a$jscomp$5$$, $b$jscomp$2$$, $depth$jscomp$2$$) { | |
| $depth$jscomp$2$$ = void 0 === $depth$jscomp$2$$ ? 3 : $depth$jscomp$2$$; | |
| if (!isFinite($depth$jscomp$2$$)) throw Error("depth arg must be finite: " + $depth$jscomp$2$$); | |
| if ($a$jscomp$5$$ === $b$jscomp$2$$) return !0; | |
| if (1 > $depth$jscomp$2$$ || typeof $a$jscomp$5$$ !== typeof $b$jscomp$2$$) return !1; | |
| if (Array.isArray($a$jscomp$5$$) && Array.isArray($b$jscomp$2$$)) { | |
| if ($a$jscomp$5$$.length !== $b$jscomp$2$$.length) return !1; | |
| for (var $i$8_i$jscomp$17$$ = | |
| 0; $i$8_i$jscomp$17$$ < $a$jscomp$5$$.length; $i$8_i$jscomp$17$$++) if (!$recursiveEquals$$module$src$json$$($a$jscomp$5$$[$i$8_i$jscomp$17$$], $b$jscomp$2$$[$i$8_i$jscomp$17$$], $depth$jscomp$2$$ - 1)) return !1; | |
| return !0 | |
| } | |
| if ($a$jscomp$5$$ && $b$jscomp$2$$ && "object" === typeof $a$jscomp$5$$ && "object" === typeof $b$jscomp$2$$) { | |
| var $keysA$$ = Object.keys($a$jscomp$5$$), | |
| $keysB$$ = Object.keys($b$jscomp$2$$); | |
| if ($keysA$$.length !== $keysB$$.length) return !1; | |
| for ($i$8_i$jscomp$17$$ = 0; $i$8_i$jscomp$17$$ < $keysA$$.length; $i$8_i$jscomp$17$$++) { | |
| var $keyA$$ = | |
| $keysA$$[$i$8_i$jscomp$17$$], | |
| $valueA$$ = $a$jscomp$5$$[$keyA$$], | |
| $valueB$$ = $b$jscomp$2$$[$keyA$$]; | |
| if (!$recursiveEquals$$module$src$json$$($valueA$$, $valueB$$, $depth$jscomp$2$$ - 1)) return !1 | |
| } | |
| return !0 | |
| } | |
| return !1 | |
| } | |
| function $hasOwnProperty$$module$src$json$$($obj$jscomp$30$$, $key$jscomp$42$$) { | |
| return null == $obj$jscomp$30$$ || "object" != typeof $obj$jscomp$30$$ ? !1 : Object.prototype.hasOwnProperty.call($obj$jscomp$30$$, $key$jscomp$42$$) | |
| }; | |
| /* | |
| Copyright (C) 2014-2016 by Andrea Giammarchi - @WebReflection | |
| Use of this source code is governed by a MIT-style | |
| license that can be found in the LICENSE file or at | |
| https://opensource.org/licenses/MIT. | |
| */ | |
| exports.installCustomElements = function($window$jscomp$1$$, $polyfill$$) { | |
| function $secondArgument$$($window$jscomp$1$$) { | |
| return $window$jscomp$1$$.toLowerCase() | |
| } | |
| function $ASAP$$() { | |
| var $window$jscomp$1$$ = $asapQueue$$.splice(0, $asapQueue$$.length); | |
| for ($asapTimer$$ = 0; $window$jscomp$1$$.length;) $window$jscomp$1$$.shift().call(null, $window$jscomp$1$$.shift()) | |
| } | |
| function $loopAndVerify$$($window$jscomp$1$$, $polyfill$$) { | |
| for (var $secondArgument$$ = 0, $ASAP$$ = $window$jscomp$1$$.length; $secondArgument$$ < $ASAP$$; $secondArgument$$++) $verifyAndSetupAndAction$$($window$jscomp$1$$[$secondArgument$$], | |
| $polyfill$$) | |
| } | |
| function $loopAndSetup$$($window$jscomp$1$$) { | |
| for (var $polyfill$$ = 0, $secondArgument$$ = $window$jscomp$1$$.length, $ASAP$$; $polyfill$$ < $secondArgument$$; $polyfill$$++) $ASAP$$ = $window$jscomp$1$$[$polyfill$$], $patch$$($ASAP$$, $protos$$[$getTypeIndex$$($ASAP$$)]) | |
| } | |
| function $executeAction$$($window$jscomp$1$$) { | |
| return function($polyfill$$) { | |
| $isValidNode$$($polyfill$$) && ($verifyAndSetupAndAction$$($polyfill$$, $window$jscomp$1$$), $query$jscomp$9$$.length && $loopAndVerify$$($polyfill$$.querySelectorAll($query$jscomp$9$$), | |
| $window$jscomp$1$$)) | |
| } | |
| } | |
| function $getTypeIndex$$($window$jscomp$1$$) { | |
| var $polyfill$$ = $getAttribute$$.call($window$jscomp$1$$, "is"), | |
| $secondArgument$$ = $window$jscomp$1$$.nodeName.toUpperCase(); | |
| $window$jscomp$1$$ = $indexOf$$.call($types$$, $polyfill$$ ? $PREFIX_IS$$ + $polyfill$$.toUpperCase() : $PREFIX_TAG$$ + $secondArgument$$); | |
| return $polyfill$$ && -1 < $window$jscomp$1$$ && !$isInQSA$$($secondArgument$$, $polyfill$$) ? -1 : $window$jscomp$1$$ | |
| } | |
| function $isInQSA$$($window$jscomp$1$$, $polyfill$$) { | |
| return -1 < $query$jscomp$9$$.indexOf($window$jscomp$1$$ + | |
| '[is="' + $polyfill$$ + '"]') | |
| } | |
| function $onDOMAttrModified$$($window$jscomp$1$$) { | |
| var $polyfill$$ = $window$jscomp$1$$.currentTarget, | |
| $secondArgument$$ = $window$jscomp$1$$.attrChange, | |
| $ASAP$$ = $window$jscomp$1$$.attrName, | |
| $loopAndVerify$$ = $window$jscomp$1$$.target, | |
| $loopAndSetup$$ = $window$jscomp$1$$[$ADDITION$$] || 2, | |
| $executeAction$$ = $window$jscomp$1$$[$REMOVAL$$] || 3; | |
| if ($notFromInnerHTMLHelper$$ && (!$loopAndVerify$$ || $loopAndVerify$$ === $polyfill$$) && $polyfill$$[$ATTRIBUTE_CHANGED_CALLBACK$$] && "style" !== $ASAP$$ && ($window$jscomp$1$$.prevValue !== | |
| $window$jscomp$1$$.newValue || "" === $window$jscomp$1$$.newValue && ($secondArgument$$ === $loopAndSetup$$ || $secondArgument$$ === $executeAction$$))) $polyfill$$[$ATTRIBUTE_CHANGED_CALLBACK$$]($ASAP$$, $secondArgument$$ === $loopAndSetup$$ ? null : $window$jscomp$1$$.prevValue, $secondArgument$$ === $executeAction$$ ? null : $window$jscomp$1$$.newValue) | |
| } | |
| function $onDOMNode$$($window$jscomp$1$$) { | |
| var $polyfill$$ = $executeAction$$($window$jscomp$1$$); | |
| return function($window$jscomp$1$$) { | |
| $asapQueue$$.push($polyfill$$, $window$jscomp$1$$.target); | |
| $asapTimer$$ && clearTimeout($asapTimer$$); | |
| $asapTimer$$ = setTimeout($ASAP$$, 1) | |
| } | |
| } | |
| function $onReadyStateChange$$($window$jscomp$1$$) { | |
| $dropDomContentLoaded$$ && ($dropDomContentLoaded$$ = !1, $window$jscomp$1$$.currentTarget.removeEventListener($DOM_CONTENT_LOADED$$, $onReadyStateChange$$)); | |
| $query$jscomp$9$$.length && $loopAndVerify$$(($window$jscomp$1$$.target || $document$jscomp$1$$).querySelectorAll($query$jscomp$9$$), $window$jscomp$1$$.detail === $DETACHED$$ ? $DETACHED$$ : $ATTACHED$$); | |
| $IE8$$ && $purge$$() | |
| } | |
| function $patchedSetAttribute$$($window$jscomp$1$$, | |
| $polyfill$$) { | |
| $setAttribute$$.call(this, $window$jscomp$1$$, $polyfill$$); | |
| $onSubtreeModified$$.call(this, { | |
| target: this | |
| }) | |
| } | |
| function $setupNode$$($window$jscomp$1$$, $polyfill$$) { | |
| $setPrototype$$($window$jscomp$1$$, $polyfill$$); | |
| $observer$jscomp$1$$ ? $observer$jscomp$1$$.observe($window$jscomp$1$$, $attributesObserver$$) : ($doesNotSupportDOMAttrModified$$ && ($window$jscomp$1$$.setAttribute = $patchedSetAttribute$$, $window$jscomp$1$$[$EXPANDO_UID$$] = $getAttributesMirror$$($window$jscomp$1$$), $window$jscomp$1$$[$ADD_EVENT_LISTENER$$]($DOM_SUBTREE_MODIFIED$$, | |
| $onSubtreeModified$$)), $window$jscomp$1$$[$ADD_EVENT_LISTENER$$]($DOM_ATTR_MODIFIED$$, $onDOMAttrModified$$)); | |
| $window$jscomp$1$$[$CREATED_CALLBACK$$] && $notFromInnerHTMLHelper$$ && ($window$jscomp$1$$.created = !0, $window$jscomp$1$$[$CREATED_CALLBACK$$](), $window$jscomp$1$$.created = !1) | |
| } | |
| function $purge$$() { | |
| for (var $window$jscomp$1$$, $polyfill$$ = 0, $secondArgument$$ = $targets$$.length; $polyfill$$ < $secondArgument$$; $polyfill$$++) $window$jscomp$1$$ = $targets$$[$polyfill$$], $documentElement$$.contains($window$jscomp$1$$) || | |
| ($secondArgument$$--, $targets$$.splice($polyfill$$--, 1), $verifyAndSetupAndAction$$($window$jscomp$1$$, $DETACHED$$)) | |
| } | |
| function $throwTypeError$$($window$jscomp$1$$) { | |
| throw Error("A " + $window$jscomp$1$$ + " type is already registered"); | |
| } | |
| function $verifyAndSetupAndAction$$($window$jscomp$1$$, $polyfill$$) { | |
| var $secondArgument$$, $ASAP$$ = $getTypeIndex$$($window$jscomp$1$$); - 1 < $ASAP$$ && ($patchIfNotAlready$$($window$jscomp$1$$, $protos$$[$ASAP$$]), $ASAP$$ = 0, $polyfill$$ !== $ATTACHED$$ || $window$jscomp$1$$[$ATTACHED$$] ? | |
| $polyfill$$ !== $DETACHED$$ || $window$jscomp$1$$[$DETACHED$$] || ($window$jscomp$1$$[$ATTACHED$$] = !1, $window$jscomp$1$$[$DETACHED$$] = !0, $ASAP$$ = 1) : ($window$jscomp$1$$[$DETACHED$$] = !1, $window$jscomp$1$$[$ATTACHED$$] = !0, $ASAP$$ = 1, $IE8$$ && 0 > $indexOf$$.call($targets$$, $window$jscomp$1$$) && $targets$$.push($window$jscomp$1$$)), $ASAP$$ && ($secondArgument$$ = $window$jscomp$1$$[$polyfill$$ + $CALLBACK$$]) && $secondArgument$$.call($window$jscomp$1$$)) | |
| } | |
| function $CustomElementRegistry$jscomp$1$$() {} | |
| function $CERDefine$$($window$jscomp$1$$, | |
| $polyfill$$, $ASAP$$) { | |
| $ASAP$$ = $ASAP$$ && $ASAP$$[$EXTENDS$$] || ""; | |
| var $loopAndVerify$$ = $polyfill$$.prototype, | |
| $loopAndSetup$$ = $create$$($loopAndVerify$$), | |
| $executeAction$$ = $polyfill$$.observedAttributes || $empty$$, | |
| $onDOMNode$$ = { | |
| prototype: $loopAndSetup$$ | |
| }; | |
| $safeProperty$$($loopAndSetup$$, $CREATED_CALLBACK$$, { | |
| value: function() { | |
| if ($justCreated$$) $justCreated$$ = !1; | |
| else if (!this[$DRECEV1$$]) { | |
| this[$DRECEV1$$] = !0; | |
| new $polyfill$$(this); | |
| $loopAndVerify$$[$CREATED_CALLBACK$$] && $loopAndVerify$$[$CREATED_CALLBACK$$].call(this); | |
| var $window$jscomp$1$$ = $constructors$$[$nodeNames$$.get($polyfill$$)]; | |
| (!$usableCustomElements$$ || 1 < $window$jscomp$1$$.create.length) && $notifyAttributes$$(this) | |
| } | |
| } | |
| }); | |
| $safeProperty$$($loopAndSetup$$, $ATTRIBUTE_CHANGED_CALLBACK$$, { | |
| value: function($window$jscomp$1$$) { | |
| -1 < $indexOf$$.call($executeAction$$, $window$jscomp$1$$) && $loopAndVerify$$[$ATTRIBUTE_CHANGED_CALLBACK$$].apply(this, arguments) | |
| } | |
| }); | |
| $loopAndVerify$$[$CONNECTED_CALLBACK$$] && $safeProperty$$($loopAndSetup$$, $ATTACHED_CALLBACK$$, { | |
| value: $loopAndVerify$$[$CONNECTED_CALLBACK$$] | |
| }); | |
| $loopAndVerify$$[$DISCONNECTED_CALLBACK$$] && $safeProperty$$($loopAndSetup$$, $DETACHED_CALLBACK$$, { | |
| value: $loopAndVerify$$[$DISCONNECTED_CALLBACK$$] | |
| }); | |
| $ASAP$$ && ($onDOMNode$$[$EXTENDS$$] = $ASAP$$); | |
| $window$jscomp$1$$ = $window$jscomp$1$$.toUpperCase(); | |
| $constructors$$[$window$jscomp$1$$] = { | |
| constructor: $polyfill$$, | |
| create: $ASAP$$ ? [$ASAP$$, $secondArgument$$($window$jscomp$1$$)] : [$window$jscomp$1$$] | |
| }; | |
| $nodeNames$$.set($polyfill$$, $window$jscomp$1$$); | |
| $document$jscomp$1$$[$REGISTER_ELEMENT$$]($window$jscomp$1$$.toLowerCase(), | |
| $onDOMNode$$); | |
| $whenDefined$$($window$jscomp$1$$); | |
| $waitingList$$[$window$jscomp$1$$].r() | |
| } | |
| function $get$$($window$jscomp$1$$) { | |
| return ($window$jscomp$1$$ = $constructors$$[$window$jscomp$1$$.toUpperCase()]) && $window$jscomp$1$$.constructor | |
| } | |
| function $getIs$$($window$jscomp$1$$) { | |
| return "string" === typeof $window$jscomp$1$$ ? $window$jscomp$1$$ : $window$jscomp$1$$ && $window$jscomp$1$$.is || "" | |
| } | |
| function $notifyAttributes$$($window$jscomp$1$$) { | |
| for (var $polyfill$$ = $window$jscomp$1$$[$ATTRIBUTE_CHANGED_CALLBACK$$], $secondArgument$$ = | |
| $polyfill$$ ? $window$jscomp$1$$.attributes : $empty$$, $ASAP$$ = $secondArgument$$.length, $loopAndVerify$$; $ASAP$$--;) $loopAndVerify$$ = $secondArgument$$[$ASAP$$], $polyfill$$.call($window$jscomp$1$$, $loopAndVerify$$.name || $loopAndVerify$$.nodeName, null, $loopAndVerify$$.value || $loopAndVerify$$.nodeValue) | |
| } | |
| function $whenDefined$$($window$jscomp$1$$) { | |
| $window$jscomp$1$$ = $window$jscomp$1$$.toUpperCase(); | |
| $window$jscomp$1$$ in $waitingList$$ || ($waitingList$$[$window$jscomp$1$$] = {}, $waitingList$$[$window$jscomp$1$$].p = | |
| new $Promise$jscomp$1$$(function($polyfill$$) { | |
| $waitingList$$[$window$jscomp$1$$].r = $polyfill$$ | |
| })); | |
| return $waitingList$$[$window$jscomp$1$$].p | |
| } | |
| function $polyfillV1$$() { | |
| function $polyfill$$($polyfill$$) { | |
| var $secondArgument$$ = $window$jscomp$1$$[$polyfill$$]; | |
| if ($secondArgument$$) { | |
| $window$jscomp$1$$[$polyfill$$] = function($window$jscomp$1$$) { | |
| var $polyfill$$; | |
| $window$jscomp$1$$ || ($window$jscomp$1$$ = this); | |
| $window$jscomp$1$$[$DRECEV1$$] || ($justCreated$$ = !0, $window$jscomp$1$$ = $constructors$$[$nodeNames$$.get($window$jscomp$1$$.constructor)], | |
| $window$jscomp$1$$ = ($polyfill$$ = $usableCustomElements$$ && 1 === $window$jscomp$1$$.create.length) ? Reflect.construct($secondArgument$$, $empty$$, $window$jscomp$1$$.constructor) : $document$jscomp$1$$.createElement.apply($document$jscomp$1$$, $window$jscomp$1$$.create), $window$jscomp$1$$[$DRECEV1$$] = !0, $justCreated$$ = !1, $polyfill$$ || $notifyAttributes$$($window$jscomp$1$$)); | |
| return $window$jscomp$1$$ | |
| }; | |
| $window$jscomp$1$$[$polyfill$$].prototype = $secondArgument$$.prototype; | |
| try { | |
| $secondArgument$$.prototype.constructor = | |
| $window$jscomp$1$$[$polyfill$$] | |
| } catch ($WebKit$$) { | |
| $defineProperty$$($secondArgument$$, $DRECEV1$$, { | |
| value: $window$jscomp$1$$[$polyfill$$] | |
| }) | |
| } | |
| } | |
| } | |
| $customElements$jscomp$1$$ && delete $window$jscomp$1$$.customElements; | |
| $defineProperty$$($window$jscomp$1$$, "customElements", { | |
| configurable: !0, | |
| value: new $CustomElementRegistry$jscomp$1$$ | |
| }); | |
| $defineProperty$$($window$jscomp$1$$, "CustomElementRegistry", { | |
| configurable: !0, | |
| value: $CustomElementRegistry$jscomp$1$$ | |
| }); | |
| for (var $ASAP$$ = $htmlClass$$.get(/^HTML[A-Z]*[a-z]/), $loopAndVerify$$ = | |
| $ASAP$$.length; $loopAndVerify$$--; $polyfill$$($ASAP$$[$loopAndVerify$$])); | |
| $document$jscomp$1$$.createElement = function($window$jscomp$1$$, $polyfill$$) { | |
| return ($polyfill$$ = $getIs$$($polyfill$$)) ? $patchedCreateElement$$.call(this, $window$jscomp$1$$, $secondArgument$$($polyfill$$)) : $patchedCreateElement$$.call(this, $window$jscomp$1$$) | |
| }; | |
| $V0$$ || ($justSetup$$ = !0, $document$jscomp$1$$[$REGISTER_ELEMENT$$]("")) | |
| } | |
| var $document$jscomp$1$$ = $window$jscomp$1$$.document, | |
| $Object$jscomp$1$$ = $window$jscomp$1$$.Object, | |
| $htmlClass$$ = function($window$jscomp$1$$) { | |
| function $polyfill$$($window$jscomp$1$$, $polyfill$$) { | |
| $polyfill$$ = $polyfill$$.toLowerCase(); | |
| $polyfill$$ in $loopAndVerify$$ || ($loopAndVerify$$[$window$jscomp$1$$] = ($loopAndVerify$$[$window$jscomp$1$$] || []).concat($polyfill$$), $loopAndVerify$$[$polyfill$$] = $loopAndVerify$$[$polyfill$$.toUpperCase()] = $window$jscomp$1$$) | |
| } | |
| function $secondArgument$$($window$jscomp$1$$) { | |
| var $polyfill$$ = [], | |
| $secondArgument$$; | |
| for ($secondArgument$$ in $loopAndVerify$$) $window$jscomp$1$$.test($secondArgument$$) && | |
| $polyfill$$.push($secondArgument$$); | |
| return $polyfill$$ | |
| } | |
| var $ASAP$$ = /^[A-Z]+[a-z]/, | |
| $loopAndVerify$$ = ($Object$jscomp$1$$.create || $Object$jscomp$1$$)(null), | |
| $loopAndSetup$$ = {}, $executeAction$$, $onDOMNode$$, $onDOMAttrModified$$; | |
| for ($onDOMNode$$ in $window$jscomp$1$$) for ($onDOMAttrModified$$ in $window$jscomp$1$$[$onDOMNode$$]) { | |
| var $onReadyStateChange$$ = $window$jscomp$1$$[$onDOMNode$$][$onDOMAttrModified$$]; | |
| $loopAndVerify$$[$onDOMAttrModified$$] = $onReadyStateChange$$; | |
| for ($executeAction$$ = 0; $executeAction$$ < | |
| $onReadyStateChange$$.length; $executeAction$$++) $loopAndVerify$$[$onReadyStateChange$$[$executeAction$$].toLowerCase()] = $loopAndVerify$$[$onReadyStateChange$$[$executeAction$$].toUpperCase()] = $onDOMAttrModified$$ | |
| } | |
| $loopAndSetup$$.get = function($window$jscomp$1$$) { | |
| return "string" === typeof $window$jscomp$1$$ ? $loopAndVerify$$[$window$jscomp$1$$] || ($ASAP$$.test($window$jscomp$1$$) ? [] : "") : $secondArgument$$($window$jscomp$1$$) | |
| }; | |
| $loopAndSetup$$.set = function($window$jscomp$1$$, $secondArgument$$) { | |
| return $ASAP$$.test($window$jscomp$1$$) ? | |
| $polyfill$$($window$jscomp$1$$, $secondArgument$$) : $polyfill$$($secondArgument$$, $window$jscomp$1$$), $loopAndSetup$$ | |
| }; | |
| return $loopAndSetup$$ | |
| }({ | |
| collections: { | |
| HTMLAllCollection: ["all"], | |
| HTMLCollection: ["forms"], | |
| HTMLFormControlsCollection: ["elements"], | |
| HTMLOptionsCollection: ["options"] | |
| }, | |
| elements: { | |
| Element: ["element"], | |
| HTMLAnchorElement: ["a"], | |
| HTMLAppletElement: ["applet"], | |
| HTMLAreaElement: ["area"], | |
| HTMLAttachmentElement: ["attachment"], | |
| HTMLAudioElement: ["audio"], | |
| HTMLBRElement: ["br"], | |
| HTMLBaseElement: ["base"], | |
| HTMLBodyElement: ["body"], | |
| HTMLButtonElement: ["button"], | |
| HTMLCanvasElement: ["canvas"], | |
| HTMLContentElement: ["content"], | |
| HTMLDListElement: ["dl"], | |
| HTMLDataElement: ["data"], | |
| HTMLDataListElement: ["datalist"], | |
| HTMLDetailsElement: ["details"], | |
| HTMLDialogElement: ["dialog"], | |
| HTMLDirectoryElement: ["dir"], | |
| HTMLDivElement: ["div"], | |
| HTMLDocument: ["document"], | |
| HTMLElement: "element abbr address article aside b bdi bdo cite code command dd dfn dt em figcaption figure footer header i kbd mark nav noscript rp rt ruby s samp section small strong sub summary sup u var wbr".split(" "), | |
| HTMLEmbedElement: ["embed"], | |
| HTMLFieldSetElement: ["fieldset"], | |
| HTMLFontElement: ["font"], | |
| HTMLFormElement: ["form"], | |
| HTMLFrameElement: ["frame"], | |
| HTMLFrameSetElement: ["frameset"], | |
| HTMLHRElement: ["hr"], | |
| HTMLHeadElement: ["head"], | |
| HTMLHeadingElement: "h1 h2 h3 h4 h5 h6".split(" "), | |
| HTMLHtmlElement: ["html"], | |
| HTMLIFrameElement: ["iframe"], | |
| HTMLImageElement: ["img"], | |
| HTMLInputElement: ["input"], | |
| HTMLKeygenElement: ["keygen"], | |
| HTMLLIElement: ["li"], | |
| HTMLLabelElement: ["label"], | |
| HTMLLegendElement: ["legend"], | |
| HTMLLinkElement: ["link"], | |
| HTMLMapElement: ["map"], | |
| HTMLMarqueeElement: ["marquee"], | |
| HTMLMediaElement: ["media"], | |
| HTMLMenuElement: ["menu"], | |
| HTMLMenuItemElement: ["menuitem"], | |
| HTMLMetaElement: ["meta"], | |
| HTMLMeterElement: ["meter"], | |
| HTMLModElement: ["del", "ins"], | |
| HTMLOListElement: ["ol"], | |
| HTMLObjectElement: ["object"], | |
| HTMLOptGroupElement: ["optgroup"], | |
| HTMLOptionElement: ["option"], | |
| HTMLOutputElement: ["output"], | |
| HTMLParagraphElement: ["p"], | |
| HTMLParamElement: ["param"], | |
| HTMLPictureElement: ["picture"], | |
| HTMLPreElement: ["pre"], | |
| HTMLProgressElement: ["progress"], | |
| HTMLQuoteElement: ["blockquote", "q", "quote"], | |
| HTMLScriptElement: ["script"], | |
| HTMLSelectElement: ["select"], | |
| HTMLShadowElement: ["shadow"], | |
| HTMLSlotElement: ["slot"], | |
| HTMLSourceElement: ["source"], | |
| HTMLSpanElement: ["span"], | |
| HTMLStyleElement: ["style"], | |
| HTMLTableCaptionElement: ["caption"], | |
| HTMLTableCellElement: ["td", "th"], | |
| HTMLTableColElement: ["col", "colgroup"], | |
| HTMLTableElement: ["table"], | |
| HTMLTableRowElement: ["tr"], | |
| HTMLTableSectionElement: ["thead", "tbody", "tfoot"], | |
| HTMLTemplateElement: ["template"], | |
| HTMLTextAreaElement: ["textarea"], | |
| HTMLTimeElement: ["time"], | |
| HTMLTitleElement: ["title"], | |
| HTMLTrackElement: ["track"], | |
| HTMLUListElement: ["ul"], | |
| HTMLUnknownElement: ["unknown", "vhgroupv", "vkeygen"], | |
| HTMLVideoElement: ["video"] | |
| }, | |
| nodes: { | |
| Attr: ["node"], | |
| Audio: ["audio"], | |
| CDATASection: ["node"], | |
| CharacterData: ["node"], | |
| Comment: ["#comment"], | |
| Document: ["#document"], | |
| DocumentFragment: ["#document-fragment"], | |
| DocumentType: ["node"], | |
| HTMLDocument: ["#document"], | |
| Image: ["img"], | |
| Option: ["option"], | |
| ProcessingInstruction: ["node"], | |
| ShadowRoot: ["#shadow-root"], | |
| Text: ["#text"], | |
| XMLDocument: ["xml"] | |
| } | |
| }); | |
| $polyfill$$ || ($polyfill$$ = "auto"); | |
| var $REGISTER_ELEMENT$$ = "registerElement", | |
| $EXPANDO_UID$$ = "__" + $REGISTER_ELEMENT$$ + (1E5 * $window$jscomp$1$$.Math.random() >> 0), | |
| $ADD_EVENT_LISTENER$$ = "addEventListener", | |
| $ATTACHED$$ = "attached", | |
| $CALLBACK$$ = "Callback", | |
| $DETACHED$$ = "detached", | |
| $EXTENDS$$ = "extends", | |
| $ATTRIBUTE_CHANGED_CALLBACK$$ = "attributeChanged" + $CALLBACK$$, | |
| $ATTACHED_CALLBACK$$ = $ATTACHED$$ + $CALLBACK$$, | |
| $CONNECTED_CALLBACK$$ = "connected" + $CALLBACK$$, | |
| $DISCONNECTED_CALLBACK$$ = "disconnected" + | |
| $CALLBACK$$, | |
| $CREATED_CALLBACK$$ = "created" + $CALLBACK$$, | |
| $DETACHED_CALLBACK$$ = $DETACHED$$ + $CALLBACK$$, | |
| $ADDITION$$ = "ADDITION", | |
| $MODIFICATION$$ = "MODIFICATION", | |
| $REMOVAL$$ = "REMOVAL", | |
| $DOM_ATTR_MODIFIED$$ = "DOMAttrModified", | |
| $DOM_CONTENT_LOADED$$ = "DOMContentLoaded", | |
| $DOM_SUBTREE_MODIFIED$$ = "DOMSubtreeModified", | |
| $PREFIX_TAG$$ = "<", | |
| $PREFIX_IS$$ = "=", | |
| $validName$$ = /^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/, | |
| $invalidNames$$ = "ANNOTATION-XML COLOR-PROFILE FONT-FACE FONT-FACE-SRC FONT-FACE-URI FONT-FACE-FORMAT FONT-FACE-NAME MISSING-GLYPH".split(" "), | |
| $types$$ = [], | |
| $protos$$ = [], | |
| $query$jscomp$9$$ = "", | |
| $documentElement$$ = $document$jscomp$1$$.documentElement, | |
| $indexOf$$ = $types$$.indexOf || function($window$jscomp$1$$) { | |
| for (var $polyfill$$ = this.length; $polyfill$$-- && this[$polyfill$$] !== $window$jscomp$1$$;); | |
| return $polyfill$$ | |
| }, $OP$$ = $Object$jscomp$1$$.prototype, | |
| $hOP$$ = $OP$$.hasOwnProperty, | |
| $iPO$$ = $OP$$.isPrototypeOf, | |
| $defineProperty$$ = $Object$jscomp$1$$.defineProperty, | |
| $empty$$ = [], | |
| $gOPD$$ = $Object$jscomp$1$$.getOwnPropertyDescriptor, | |
| $gOPN$$ = $Object$jscomp$1$$.getOwnPropertyNames, | |
| $gPO$$ = $Object$jscomp$1$$.getPrototypeOf, | |
| $sPO$$ = $Object$jscomp$1$$.setPrototypeOf, | |
| $hasProto$$ = !! $Object$jscomp$1$$.__proto__, | |
| $DRECEV1$$ = "__dreCEv1", | |
| $customElements$jscomp$1$$ = $window$jscomp$1$$.customElements, | |
| $usableCustomElements$$ = "force" !== $polyfill$$ && !! ($customElements$jscomp$1$$ && $customElements$jscomp$1$$.define && $customElements$jscomp$1$$.get && $customElements$jscomp$1$$.whenDefined), | |
| $Dict$$ = $Object$jscomp$1$$.create || $Object$jscomp$1$$, | |
| $Map$jscomp$1$$ = $window$jscomp$1$$.Map || function() { | |
| var $window$jscomp$1$$ = [], | |
| $polyfill$$ = [], | |
| $secondArgument$$; | |
| return { | |
| get: function($secondArgument$$) { | |
| return $polyfill$$[$indexOf$$.call($window$jscomp$1$$, $secondArgument$$)] | |
| }, | |
| set: function($ASAP$$, $loopAndVerify$$) { | |
| $secondArgument$$ = $indexOf$$.call($window$jscomp$1$$, $ASAP$$); | |
| 0 > $secondArgument$$ ? $polyfill$$[$window$jscomp$1$$.push($ASAP$$) - 1] = $loopAndVerify$$ : $polyfill$$[$secondArgument$$] = $loopAndVerify$$ | |
| } | |
| } | |
| }, $Promise$jscomp$1$$ = $window$jscomp$1$$.Promise || function($window$jscomp$1$$) { | |
| function $polyfill$$($window$jscomp$1$$) { | |
| for ($ASAP$$ = !0; $secondArgument$$.length;) $secondArgument$$.shift()($window$jscomp$1$$) | |
| } | |
| var $secondArgument$$ = [], | |
| $ASAP$$ = !1, | |
| $loopAndVerify$$ = { | |
| "catch": function() { | |
| return $loopAndVerify$$ | |
| }, | |
| then: function($window$jscomp$1$$) { | |
| $secondArgument$$.push($window$jscomp$1$$); | |
| $ASAP$$ && setTimeout($polyfill$$, 1); | |
| return $loopAndVerify$$ | |
| } | |
| }; | |
| $window$jscomp$1$$($polyfill$$); | |
| return $loopAndVerify$$ | |
| }, $justCreated$$ = !1, | |
| $constructors$$ = $Dict$$(null), | |
| $waitingList$$ = $Dict$$(null), | |
| $nodeNames$$ = new $Map$jscomp$1$$, | |
| $create$$ = $Object$jscomp$1$$.create || function $Bridge$$($window$jscomp$1$$) { | |
| return $window$jscomp$1$$ ? ($Bridge$$.prototype = $window$jscomp$1$$, new $Bridge$$) : this | |
| }, $setPrototype$$ = $sPO$$ || ($hasProto$$ ? function($window$jscomp$1$$, $polyfill$$) { | |
| $window$jscomp$1$$.__proto__ = $polyfill$$; | |
| return $window$jscomp$1$$ | |
| } : $gOPN$$ && $gOPD$$ ? function() { | |
| function $window$jscomp$1$$($window$jscomp$1$$, $polyfill$$) { | |
| for (var $secondArgument$$, $ASAP$$ = $gOPN$$($polyfill$$), $loopAndVerify$$ = 0, $loopAndSetup$$ = $ASAP$$.length; $loopAndVerify$$ < $loopAndSetup$$; $loopAndVerify$$++) $secondArgument$$ = | |
| $ASAP$$[$loopAndVerify$$], $hOP$$.call($window$jscomp$1$$, $secondArgument$$) || $defineProperty$$($window$jscomp$1$$, $secondArgument$$, $gOPD$$($polyfill$$, $secondArgument$$)) | |
| } | |
| return function($polyfill$$, $secondArgument$$) { | |
| do $window$jscomp$1$$($polyfill$$, $secondArgument$$); while (($secondArgument$$ = $gPO$$($secondArgument$$)) && !$iPO$$.call($secondArgument$$, $polyfill$$)); | |
| return $polyfill$$ | |
| } | |
| }() : function($window$jscomp$1$$, $polyfill$$) { | |
| for (var $secondArgument$$ in $polyfill$$) $window$jscomp$1$$[$secondArgument$$] = | |
| $polyfill$$[$secondArgument$$]; | |
| return $window$jscomp$1$$ | |
| }), | |
| $MutationObserver$jscomp$1$$ = $window$jscomp$1$$.MutationObserver || $window$jscomp$1$$.WebKitMutationObserver, | |
| $HTMLElementPrototype$$ = ($window$jscomp$1$$.HTMLElement || $window$jscomp$1$$.Element || $window$jscomp$1$$.Node).prototype, | |
| $IE8$$ = !$iPO$$.call($HTMLElementPrototype$$, $documentElement$$), | |
| $safeProperty$$ = $IE8$$ ? function($window$jscomp$1$$, $polyfill$$, $secondArgument$$) { | |
| $window$jscomp$1$$[$polyfill$$] = $secondArgument$$.value; | |
| return $window$jscomp$1$$ | |
| } : | |
| $defineProperty$$, | |
| $isValidNode$$ = $IE8$$ ? function($window$jscomp$1$$) { | |
| return 1 === $window$jscomp$1$$.nodeType | |
| } : function($window$jscomp$1$$) { | |
| return $iPO$$.call($HTMLElementPrototype$$, $window$jscomp$1$$) | |
| }, $targets$$ = $IE8$$ && [], | |
| $attachShadow$$ = $HTMLElementPrototype$$.attachShadow, | |
| $cloneNode$$ = $HTMLElementPrototype$$.cloneNode, | |
| $dispatchEvent$$ = $HTMLElementPrototype$$.dispatchEvent, | |
| $getAttribute$$ = $HTMLElementPrototype$$.getAttribute, | |
| $hasAttribute$$ = $HTMLElementPrototype$$.hasAttribute, | |
| $removeAttribute$$ = | |
| $HTMLElementPrototype$$.removeAttribute, | |
| $setAttribute$$ = $HTMLElementPrototype$$.setAttribute, | |
| $createElement$$ = $document$jscomp$1$$.createElement, | |
| $patchedCreateElement$$ = $createElement$$, | |
| $attributesObserver$$ = $MutationObserver$jscomp$1$$ && { | |
| attributes: !0, | |
| characterData: !0, | |
| attributeOldValue: !0 | |
| }, $DOMAttrModified$$ = $MutationObserver$jscomp$1$$ || function() { | |
| $doesNotSupportDOMAttrModified$$ = !1; | |
| $documentElement$$.removeEventListener($DOM_ATTR_MODIFIED$$, $DOMAttrModified$$) | |
| }, $asapQueue$$, $asapTimer$$ = 0, | |
| $V0$$ = | |
| $REGISTER_ELEMENT$$ in $document$jscomp$1$$, | |
| $setListener$$ = !0, | |
| $justSetup$$ = !1, | |
| $doesNotSupportDOMAttrModified$$ = !0, | |
| $dropDomContentLoaded$$ = !0, | |
| $notFromInnerHTMLHelper$$ = !0, | |
| $observer$jscomp$1$$, $observe$$; | |
| if (!$V0$$) { | |
| if ($sPO$$ || $hasProto$$) { | |
| var $patchIfNotAlready$$ = function($window$jscomp$1$$, $polyfill$$) { | |
| $iPO$$.call($polyfill$$, $window$jscomp$1$$) || $setupNode$$($window$jscomp$1$$, $polyfill$$) | |
| }; | |
| var $patch$$ = $setupNode$$ | |
| } else $patch$$ = $patchIfNotAlready$$ = function($window$jscomp$1$$, $polyfill$$) { | |
| $window$jscomp$1$$[$EXPANDO_UID$$] || | |
| ($window$jscomp$1$$[$EXPANDO_UID$$] = $Object$jscomp$1$$(!0), $setupNode$$($window$jscomp$1$$, $polyfill$$)) | |
| }; if ($IE8$$) $doesNotSupportDOMAttrModified$$ = !1, | |
| function() { | |
| function $window$jscomp$1$$($window$jscomp$1$$) { | |
| var $polyfill$$ = $window$jscomp$1$$.currentTarget, | |
| $secondArgument$$ = $polyfill$$[$EXPANDO_UID$$]; | |
| $window$jscomp$1$$ = $window$jscomp$1$$.propertyName; | |
| if ($secondArgument$$.hasOwnProperty($window$jscomp$1$$)) { | |
| $secondArgument$$ = $secondArgument$$[$window$jscomp$1$$]; | |
| var $ASAP$$ = new CustomEvent($DOM_ATTR_MODIFIED$$, { | |
| bubbles: !0 | |
| }); | |
| $ASAP$$.attrName = $secondArgument$$.name; | |
| $ASAP$$.prevValue = $secondArgument$$.value || null; | |
| $ASAP$$.newValue = $secondArgument$$.value = $polyfill$$[$window$jscomp$1$$] || null; | |
| null == $ASAP$$.prevValue ? $ASAP$$[$ADDITION$$] = $ASAP$$.attrChange = 0 : $ASAP$$[$MODIFICATION$$] = $ASAP$$.attrChange = 1; | |
| $dispatchEvent$$.call($polyfill$$, $ASAP$$) | |
| } | |
| } | |
| function $polyfill$$($window$jscomp$1$$, $polyfill$$) { | |
| var $secondArgument$$ = $hasAttribute$$.call(this, $window$jscomp$1$$), | |
| $ASAP$$ = $secondArgument$$ && $getAttribute$$.call(this, | |
| $window$jscomp$1$$), | |
| $loopAndVerify$$ = new CustomEvent($DOM_ATTR_MODIFIED$$, { | |
| bubbles: !0 | |
| }); | |
| $setAttribute$$.call(this, $window$jscomp$1$$, $polyfill$$); | |
| $loopAndVerify$$.attrName = $window$jscomp$1$$; | |
| $loopAndVerify$$.prevValue = $secondArgument$$ ? $ASAP$$ : null; | |
| $loopAndVerify$$.newValue = $polyfill$$; | |
| $secondArgument$$ ? $loopAndVerify$$[$MODIFICATION$$] = $loopAndVerify$$.attrChange = 1 : $loopAndVerify$$[$ADDITION$$] = $loopAndVerify$$.attrChange = 0; | |
| $dispatchEvent$$.call(this, $loopAndVerify$$) | |
| } | |
| function $secondArgument$$($window$jscomp$1$$) { | |
| var $polyfill$$ = | |
| new CustomEvent($DOM_ATTR_MODIFIED$$, { | |
| bubbles: !0 | |
| }); | |
| $polyfill$$.attrName = $window$jscomp$1$$; | |
| $polyfill$$.prevValue = $getAttribute$$.call(this, $window$jscomp$1$$); | |
| $polyfill$$.newValue = null; | |
| $polyfill$$[$REMOVAL$$] = $polyfill$$.attrChange = 2; | |
| $removeAttribute$$.call(this, $window$jscomp$1$$); | |
| $dispatchEvent$$.call(this, $polyfill$$) | |
| } | |
| var $ASAP$$ = $gOPD$$($HTMLElementPrototype$$, $ADD_EVENT_LISTENER$$), | |
| $loopAndVerify$$ = $ASAP$$.value; | |
| $ASAP$$.value = function($ASAP$$, $loopAndSetup$$, $executeAction$$) { | |
| $ASAP$$ === $DOM_ATTR_MODIFIED$$ && | |
| this[$ATTRIBUTE_CHANGED_CALLBACK$$] && this.setAttribute !== $polyfill$$ && (this[$EXPANDO_UID$$] = { | |
| className: { | |
| name: "class", | |
| value: this.className | |
| } | |
| }, this.setAttribute = $polyfill$$, this.removeAttribute = $secondArgument$$, $loopAndVerify$$.call(this, "propertychange", $window$jscomp$1$$)); | |
| $loopAndVerify$$.call(this, $ASAP$$, $loopAndSetup$$, $executeAction$$) | |
| }; | |
| $defineProperty$$($HTMLElementPrototype$$, $ADD_EVENT_LISTENER$$, $ASAP$$) | |
| }(); | |
| else if (!$MutationObserver$jscomp$1$$ && ($documentElement$$[$ADD_EVENT_LISTENER$$]($DOM_ATTR_MODIFIED$$, | |
| $DOMAttrModified$$), $documentElement$$.setAttribute($EXPANDO_UID$$, 1), $documentElement$$.removeAttribute($EXPANDO_UID$$), $doesNotSupportDOMAttrModified$$)) { | |
| var $onSubtreeModified$$ = function($window$jscomp$1$$) { | |
| var $polyfill$$, $secondArgument$$; | |
| if (this === $window$jscomp$1$$.target) { | |
| var $ASAP$$ = this[$EXPANDO_UID$$]; | |
| this[$EXPANDO_UID$$] = $polyfill$$ = $getAttributesMirror$$(this); | |
| for ($secondArgument$$ in $polyfill$$) { | |
| if (!($secondArgument$$ in $ASAP$$)) return $callDOMAttrModified$$(0, this, $secondArgument$$, | |
| $ASAP$$[$secondArgument$$], $polyfill$$[$secondArgument$$], $ADDITION$$); | |
| if ($polyfill$$[$secondArgument$$] !== $ASAP$$[$secondArgument$$]) return $callDOMAttrModified$$(1, this, $secondArgument$$, $ASAP$$[$secondArgument$$], $polyfill$$[$secondArgument$$], $MODIFICATION$$) | |
| } | |
| for ($secondArgument$$ in $ASAP$$) if (!($secondArgument$$ in $polyfill$$)) return $callDOMAttrModified$$(2, this, $secondArgument$$, $ASAP$$[$secondArgument$$], $polyfill$$[$secondArgument$$], $REMOVAL$$) | |
| } | |
| }; | |
| var $callDOMAttrModified$$ = function($window$jscomp$1$$, | |
| $polyfill$$, $secondArgument$$, $ASAP$$, $loopAndVerify$$, $loopAndSetup$$) { | |
| $secondArgument$$ = { | |
| attrChange: $window$jscomp$1$$, | |
| currentTarget: $polyfill$$, | |
| attrName: $secondArgument$$, | |
| prevValue: $ASAP$$, | |
| newValue: $loopAndVerify$$ | |
| }; | |
| $secondArgument$$[$loopAndSetup$$] = $window$jscomp$1$$; | |
| $onDOMAttrModified$$($secondArgument$$) | |
| }; | |
| var $getAttributesMirror$$ = function($window$jscomp$1$$) { | |
| for (var $polyfill$$, $secondArgument$$ = {}, $ASAP$$ = $window$jscomp$1$$.attributes, $loopAndVerify$$ = 0, $loopAndSetup$$ = $ASAP$$.length; $loopAndVerify$$ < | |
| $loopAndSetup$$; $loopAndVerify$$++) $window$jscomp$1$$ = $ASAP$$[$loopAndVerify$$], $polyfill$$ = $window$jscomp$1$$.name, "setAttribute" !== $polyfill$$ && ($secondArgument$$[$polyfill$$] = $window$jscomp$1$$.value); | |
| return $secondArgument$$ | |
| } | |
| } | |
| $document$jscomp$1$$[$REGISTER_ELEMENT$$] = function($window$jscomp$1$$, $polyfill$$) { | |
| function $secondArgument$$() { | |
| return $patchedSetAttribute$$ ? $document$jscomp$1$$.createElement($isInQSA$$, $ASAP$$) : $document$jscomp$1$$.createElement($isInQSA$$) | |
| } | |
| var $ASAP$$ = $window$jscomp$1$$.toUpperCase(); | |
| $setListener$$ && ($setListener$$ = !1, $MutationObserver$jscomp$1$$ ? ($observer$jscomp$1$$ = function($window$jscomp$1$$, $polyfill$$) { | |
| function $secondArgument$$($window$jscomp$1$$, $polyfill$$) { | |
| for (var $secondArgument$$ = 0, $ASAP$$ = $window$jscomp$1$$.length; $secondArgument$$ < $ASAP$$; $polyfill$$($window$jscomp$1$$[$secondArgument$$++])); | |
| } | |
| return new $MutationObserver$jscomp$1$$(function($ASAP$$) { | |
| for (var $loopAndVerify$$, $loopAndSetup$$, $executeAction$$, $onDOMNode$$ = 0, $onDOMAttrModified$$ = $ASAP$$.length; $onDOMNode$$ < | |
| $onDOMAttrModified$$; $onDOMNode$$++) if ($loopAndVerify$$ = $ASAP$$[$onDOMNode$$], "childList" === $loopAndVerify$$.type) $secondArgument$$($loopAndVerify$$.addedNodes, $window$jscomp$1$$), $secondArgument$$($loopAndVerify$$.removedNodes, $polyfill$$); | |
| else if ($loopAndSetup$$ = $loopAndVerify$$.target, $notFromInnerHTMLHelper$$ && $loopAndSetup$$[$ATTRIBUTE_CHANGED_CALLBACK$$] && "style" !== $loopAndVerify$$.attributeName && ($executeAction$$ = $getAttribute$$.call($loopAndSetup$$, $loopAndVerify$$.attributeName), $executeAction$$ !== | |
| $loopAndVerify$$.oldValue)) $loopAndSetup$$[$ATTRIBUTE_CHANGED_CALLBACK$$]($loopAndVerify$$.attributeName, $loopAndVerify$$.oldValue, $executeAction$$) | |
| }) | |
| }($executeAction$$($ATTACHED$$), $executeAction$$($DETACHED$$)), $observe$$ = function($window$jscomp$1$$) { | |
| $observer$jscomp$1$$.observe($window$jscomp$1$$, { | |
| childList: !0, | |
| subtree: !0 | |
| }); | |
| return $window$jscomp$1$$ | |
| }, $observe$$($document$jscomp$1$$), $attachShadow$$ && ($HTMLElementPrototype$$.attachShadow = function() { | |
| return $observe$$($attachShadow$$.apply(this, arguments)) | |
| })) : | |
| ($asapQueue$$ = [], $document$jscomp$1$$[$ADD_EVENT_LISTENER$$]("DOMNodeInserted", $onDOMNode$$($ATTACHED$$)), $document$jscomp$1$$[$ADD_EVENT_LISTENER$$]("DOMNodeRemoved", $onDOMNode$$($DETACHED$$))), $document$jscomp$1$$[$ADD_EVENT_LISTENER$$]($DOM_CONTENT_LOADED$$, $onReadyStateChange$$), $document$jscomp$1$$[$ADD_EVENT_LISTENER$$]("readystatechange", $onReadyStateChange$$), $HTMLElementPrototype$$.cloneNode = function($window$jscomp$1$$) { | |
| var $polyfill$$ = $cloneNode$$.call(this, !! $window$jscomp$1$$), | |
| $secondArgument$$ = | |
| $getTypeIndex$$($polyfill$$); - 1 < $secondArgument$$ && $patch$$($polyfill$$, $protos$$[$secondArgument$$]); | |
| $window$jscomp$1$$ && $query$jscomp$9$$.length && $loopAndSetup$$($polyfill$$.querySelectorAll($query$jscomp$9$$)); | |
| return $polyfill$$ | |
| }); | |
| if ($justSetup$$) return $justSetup$$ = !1; - 2 < $indexOf$$.call($types$$, $PREFIX_IS$$ + $ASAP$$) + $indexOf$$.call($types$$, $PREFIX_TAG$$ + $ASAP$$) && $throwTypeError$$($window$jscomp$1$$); | |
| if (!$validName$$.test($ASAP$$) || -1 < $indexOf$$.call($invalidNames$$, $ASAP$$)) throw Error("The type " + | |
| $window$jscomp$1$$ + " is invalid"); | |
| var $onDOMAttrModified$$ = $polyfill$$ || $OP$$, | |
| $patchedSetAttribute$$ = $hOP$$.call($onDOMAttrModified$$, $EXTENDS$$), | |
| $isInQSA$$ = $patchedSetAttribute$$ ? $polyfill$$[$EXTENDS$$].toUpperCase() : $ASAP$$; | |
| $patchedSetAttribute$$ && -1 < $indexOf$$.call($types$$, $PREFIX_TAG$$ + $isInQSA$$) && $throwTypeError$$($isInQSA$$); | |
| $polyfill$$ = $types$$.push(($patchedSetAttribute$$ ? $PREFIX_IS$$ : $PREFIX_TAG$$) + $ASAP$$) - 1; | |
| $query$jscomp$9$$ = $query$jscomp$9$$.concat($query$jscomp$9$$.length ? "," : "", $patchedSetAttribute$$ ? | |
| $isInQSA$$ + '[is="' + $window$jscomp$1$$.toLowerCase() + '"]' : $isInQSA$$); | |
| $secondArgument$$.prototype = $protos$$[$polyfill$$] = $hOP$$.call($onDOMAttrModified$$, "prototype") ? $onDOMAttrModified$$.prototype : $create$$($HTMLElementPrototype$$); | |
| $query$jscomp$9$$.length && $loopAndVerify$$($document$jscomp$1$$.querySelectorAll($query$jscomp$9$$), $ATTACHED$$); | |
| return $secondArgument$$ | |
| }; | |
| $document$jscomp$1$$.createElement = $patchedCreateElement$$ = function($window$jscomp$1$$, $polyfill$$) { | |
| var $ASAP$$ = $getIs$$($polyfill$$), | |
| $loopAndVerify$$ = $ASAP$$ ? $createElement$$.call($document$jscomp$1$$, $window$jscomp$1$$, $secondArgument$$($ASAP$$)) : $createElement$$.call($document$jscomp$1$$, $window$jscomp$1$$); | |
| $window$jscomp$1$$ = "" + $window$jscomp$1$$; | |
| var $loopAndSetup$$ = $indexOf$$.call($types$$, ($ASAP$$ ? $PREFIX_IS$$ : $PREFIX_TAG$$) + ($ASAP$$ || $window$jscomp$1$$).toUpperCase()), | |
| $executeAction$$ = -1 < $loopAndSetup$$; | |
| $ASAP$$ && ($loopAndVerify$$.setAttribute("is", $ASAP$$ = $ASAP$$.toLowerCase()), $executeAction$$ && ($executeAction$$ = $isInQSA$$($window$jscomp$1$$.toUpperCase(), | |
| $ASAP$$))); | |
| $notFromInnerHTMLHelper$$ = !$document$jscomp$1$$.createElement.innerHTMLHelper; | |
| $executeAction$$ && $patch$$($loopAndVerify$$, $protos$$[$loopAndSetup$$]); | |
| return $loopAndVerify$$ | |
| } | |
| } | |
| $CustomElementRegistry$jscomp$1$$.prototype = { | |
| constructor: $CustomElementRegistry$jscomp$1$$, | |
| define: $usableCustomElements$$ ? function($window$jscomp$1$$, $polyfill$$, $secondArgument$$) { | |
| if ($secondArgument$$) $CERDefine$$($window$jscomp$1$$, $polyfill$$, $secondArgument$$); | |
| else { | |
| var $ASAP$$ = $window$jscomp$1$$.toUpperCase(); | |
| $constructors$$[$ASAP$$] = { | |
| constructor: $polyfill$$, | |
| create: [$ASAP$$] | |
| }; | |
| $nodeNames$$.set($polyfill$$, $ASAP$$); | |
| $customElements$jscomp$1$$.define($window$jscomp$1$$, $polyfill$$) | |
| } | |
| } : $CERDefine$$, | |
| get: $usableCustomElements$$ ? function($window$jscomp$1$$) { | |
| return $customElements$jscomp$1$$.get($window$jscomp$1$$) || $get$$($window$jscomp$1$$) | |
| } : $get$$, | |
| whenDefined: $usableCustomElements$$ ? function($window$jscomp$1$$) { | |
| return $Promise$jscomp$1$$.race([$customElements$jscomp$1$$.whenDefined($window$jscomp$1$$), $whenDefined$$($window$jscomp$1$$)]) | |
| } : $whenDefined$$ | |
| }; | |
| if ($customElements$jscomp$1$$ && "force" !== $polyfill$$) try { | |
| (function($polyfill$$, $secondArgument$$, $ASAP$$) { | |
| $secondArgument$$[$EXTENDS$$] = "a"; | |
| $polyfill$$.prototype = $create$$(HTMLAnchorElement.prototype); | |
| $polyfill$$.prototype.constructor = $polyfill$$; | |
| $window$jscomp$1$$.customElements.define($ASAP$$, $polyfill$$, $secondArgument$$); | |
| if ($getAttribute$$.call($document$jscomp$1$$.createElement("a", { | |
| is: $ASAP$$ | |
| }), "is") !== $ASAP$$ || $usableCustomElements$$ && $getAttribute$$.call(new $polyfill$$, "is") !== | |
| $ASAP$$) throw $secondArgument$$; | |
| })(function $DRE$jscomp$1$$() { | |
| return Reflect.construct(HTMLAnchorElement, [], $DRE$jscomp$1$$) | |
| }, {}, "document-register-element-a") | |
| } catch ($o_O$$) { | |
| $polyfillV1$$() | |
| } else $polyfillV1$$(); | |
| try { | |
| $createElement$$.call($document$jscomp$1$$, "a", "a") | |
| } catch ($FireFox$$) { | |
| $secondArgument$$ = function($window$jscomp$1$$) { | |
| return { | |
| is: $window$jscomp$1$$.toLowerCase() | |
| } | |
| } | |
| } | |
| console.log("i should not be ommitted cause im a side effect") | |
| }; | |
| function $domTokenListTogglePolyfill$$module$src$polyfills$domtokenlist_toggle$$($token$jscomp$3$$, $opt_force$jscomp$1$$) { | |
| var $remove$$ = void 0 === $opt_force$jscomp$1$$ ? this.contains($token$jscomp$3$$) : !$opt_force$jscomp$1$$; | |
| if ($remove$$) return this.remove($token$jscomp$3$$), !1; | |
| this.add($token$jscomp$3$$); | |
| return !0 | |
| } | |
| function $install$$module$src$polyfills$domtokenlist_toggle$$($win$jscomp$25$$) { | |
| /Trident|MSIE|IEMobile/i.test($win$jscomp$25$$.navigator.userAgent) && $win$jscomp$25$$.DOMTokenList && $win$jscomp$25$$.Object.defineProperty($win$jscomp$25$$.DOMTokenList.prototype, "toggle", { | |
| enumerable: !1, | |
| configurable: !0, | |
| writable: !0, | |
| value: $domTokenListTogglePolyfill$$module$src$polyfills$domtokenlist_toggle$$ | |
| }) | |
| }; | |
| function $documentContainsPolyfill$$module$src$polyfills$document_contains$$($node$jscomp$22$$) { | |
| return $node$jscomp$22$$ == this || this.documentElement.contains($node$jscomp$22$$) | |
| } | |
| function $install$$module$src$polyfills$document_contains$$($win$jscomp$27$$) { | |
| $win$jscomp$27$$.HTMLDocument.prototype.contains || $win$jscomp$27$$.Object.defineProperty($win$jscomp$27$$.HTMLDocument.prototype, "contains", { | |
| enumerable: !1, | |
| configurable: !0, | |
| writable: !0, | |
| value: $documentContainsPolyfill$$module$src$polyfills$document_contains$$ | |
| }) | |
| }; | |
| function $sign$$module$src$polyfills$math_sign$$($x$jscomp$76$$) { | |
| return ($x$jscomp$76$$ = Number($x$jscomp$76$$)) ? 0 < $x$jscomp$76$$ ? 1 : -1 : $x$jscomp$76$$ | |
| } | |
| function $install$$module$src$polyfills$math_sign$$() { | |
| var $win$jscomp$28$$ = self; | |
| $win$jscomp$28$$.Math.sign || $win$jscomp$28$$.Object.defineProperty($win$jscomp$28$$.Math, "sign", { | |
| enumerable: !1, | |
| configurable: !0, | |
| writable: !0, | |
| value: $sign$$module$src$polyfills$math_sign$$ | |
| }) | |
| }; | |
| var $hasOwnProperty$$module$src$polyfills$object_assign$$ = Object.prototype.hasOwnProperty; | |
| function $assign$$module$src$polyfills$object_assign$$($target$jscomp$63$$, $var_args$jscomp$58$$) { | |
| if (null == $target$jscomp$63$$) throw new TypeError("Cannot convert undefined or null to object"); | |
| for (var $output$jscomp$2$$ = Object($target$jscomp$63$$), $i$jscomp$36$$ = 1; $i$jscomp$36$$ < arguments.length; $i$jscomp$36$$++) { | |
| var $source$jscomp$13$$ = arguments[$i$jscomp$36$$]; | |
| if (null != $source$jscomp$13$$) for (var $key$jscomp$46$$ in $source$jscomp$13$$) $hasOwnProperty$$module$src$polyfills$object_assign$$.call($source$jscomp$13$$, $key$jscomp$46$$) && | |
| ($output$jscomp$2$$[$key$jscomp$46$$] = $source$jscomp$13$$[$key$jscomp$46$$]) | |
| } | |
| return $output$jscomp$2$$ | |
| } | |
| function $install$$module$src$polyfills$object_assign$$() { | |
| var $win$jscomp$29$$ = self; | |
| $win$jscomp$29$$.Object.assign || $win$jscomp$29$$.Object.defineProperty($win$jscomp$29$$.Object, "assign", { | |
| enumerable: !1, | |
| configurable: !0, | |
| writable: !0, | |
| value: $assign$$module$src$polyfills$object_assign$$ | |
| }) | |
| }; | |
| function $Promise$$module$node_modules$promise_pjs$promise$$($resolver$jscomp$1$$) { | |
| if (!(this instanceof $Promise$$module$node_modules$promise_pjs$promise$$)) throw new TypeError("Constructor Promise requires `new`"); | |
| if (!$isFunction$$module$node_modules$promise_pjs$promise$$($resolver$jscomp$1$$)) throw new TypeError("Must pass resolver function"); | |
| this._state = $PendingPromise$$module$node_modules$promise_pjs$promise$$; | |
| this._value = []; | |
| this._isChainEnd = !0; | |
| $doResolve$$module$node_modules$promise_pjs$promise$$(this, | |
| $adopter$$module$node_modules$promise_pjs$promise$$(this, $FulfilledPromise$$module$node_modules$promise_pjs$promise$$), $adopter$$module$node_modules$promise_pjs$promise$$(this, $RejectedPromise$$module$node_modules$promise_pjs$promise$$), { | |
| then: $resolver$jscomp$1$$ | |
| }) | |
| } | |
| $Promise$$module$node_modules$promise_pjs$promise$$.prototype.then = function($onFulfilled$$, $onRejected$jscomp$1$$) { | |
| $onFulfilled$$ = $isFunction$$module$node_modules$promise_pjs$promise$$($onFulfilled$$) ? $onFulfilled$$ : void 0; | |
| $onRejected$jscomp$1$$ = $isFunction$$module$node_modules$promise_pjs$promise$$($onRejected$jscomp$1$$) ? $onRejected$jscomp$1$$ : void 0; | |
| if ($onFulfilled$$ || $onRejected$jscomp$1$$) this._isChainEnd = !1; | |
| return this._state(this._value, $onFulfilled$$, $onRejected$jscomp$1$$) | |
| }; | |
| $Promise$$module$node_modules$promise_pjs$promise$$.prototype. | |
| catch = function($onRejected$jscomp$2$$) { | |
| return this.then(void 0, $onRejected$jscomp$2$$) | |
| }; | |
| function $FulfilledPromise$$module$node_modules$promise_pjs$promise$$($value$jscomp$98$$, $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$, $unused$$, $deferred$$) { | |
| if (!$JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$) { | |
| if ($JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$ = $deferred$$) $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$ = | |
| $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$.promise, $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$._state = $FulfilledPromise$$module$node_modules$promise_pjs$promise$$, $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$._value = $value$jscomp$98$$; | |
| return this | |
| } | |
| $deferred$$ || ($deferred$$ = new $Deferred$$module$node_modules$promise_pjs$promise$$(this.constructor)); | |
| $defer$$module$node_modules$promise_pjs$promise$$($tryCatchDeferred$$module$node_modules$promise_pjs$promise$$($deferred$$, $JSCompiler_deferred$jscomp$inline_565_JSCompiler_promise$jscomp$inline_568_onFulfilled$jscomp$1$$, $value$jscomp$98$$)); | |
| return $deferred$$.promise | |
| } | |
| function $RejectedPromise$$module$node_modules$promise_pjs$promise$$($reason$jscomp$7$$, $JSCompiler_promise$jscomp$inline_573_unused$jscomp$1$$, $onRejected$jscomp$3$$, $deferred$jscomp$1$$) { | |
| if (!$onRejected$jscomp$3$$) return $deferred$jscomp$1$$ && ($JSCompiler_promise$jscomp$inline_573_unused$jscomp$1$$ = $deferred$jscomp$1$$.promise, $JSCompiler_promise$jscomp$inline_573_unused$jscomp$1$$._state = $RejectedPromise$$module$node_modules$promise_pjs$promise$$, $JSCompiler_promise$jscomp$inline_573_unused$jscomp$1$$._value = | |
| $reason$jscomp$7$$), this; | |
| $deferred$jscomp$1$$ || ($deferred$jscomp$1$$ = new $Deferred$$module$node_modules$promise_pjs$promise$$(this.constructor)); | |
| $defer$$module$node_modules$promise_pjs$promise$$($tryCatchDeferred$$module$node_modules$promise_pjs$promise$$($deferred$jscomp$1$$, $onRejected$jscomp$3$$, $reason$jscomp$7$$)); | |
| return $deferred$jscomp$1$$.promise | |
| } | |
| function $PendingPromise$$module$node_modules$promise_pjs$promise$$($queue$jscomp$2$$, $onFulfilled$jscomp$2$$, $onRejected$jscomp$4$$, $deferred$jscomp$2$$) { | |
| if (!$deferred$jscomp$2$$) { | |
| if (!$onFulfilled$jscomp$2$$ && !$onRejected$jscomp$4$$) return this; | |
| $deferred$jscomp$2$$ = new $Deferred$$module$node_modules$promise_pjs$promise$$(this.constructor) | |
| } | |
| $queue$jscomp$2$$.push({ | |
| deferred: $deferred$jscomp$2$$, | |
| onFulfilled: $onFulfilled$jscomp$2$$ || $deferred$jscomp$2$$.resolve, | |
| onRejected: $onRejected$jscomp$4$$ || $deferred$jscomp$2$$.reject | |
| }); | |
| return $deferred$jscomp$2$$.promise | |
| } | |
| function $Deferred$$module$node_modules$promise_pjs$promise$$($Promise$jscomp$2$$) { | |
| var $deferred$jscomp$3$$ = this; | |
| this.promise = new $Promise$jscomp$2$$(function($Promise$jscomp$2$$, $reject$jscomp$6$$) { | |
| $deferred$jscomp$3$$.resolve = $Promise$jscomp$2$$; | |
| $deferred$jscomp$3$$.reject = $reject$jscomp$6$$ | |
| }); | |
| return $deferred$jscomp$3$$ | |
| } | |
| function $adopt$$module$node_modules$promise_pjs$promise$$($promise$jscomp$6$$, $state$$, $value$jscomp$99$$, $adoptee$$) { | |
| var $queue$jscomp$3$$ = $promise$jscomp$6$$._value; | |
| $promise$jscomp$6$$._state = $state$$; | |
| $promise$jscomp$6$$._value = $value$jscomp$99$$; | |
| $adoptee$$ && $state$$ === $PendingPromise$$module$node_modules$promise_pjs$promise$$ && $adoptee$$._state($value$jscomp$99$$, void 0, void 0, { | |
| promise: $promise$jscomp$6$$, | |
| resolve: void 0, | |
| reject: void 0 | |
| }); | |
| for (var $i$jscomp$38$$ = 0; $i$jscomp$38$$ < $queue$jscomp$3$$.length; $i$jscomp$38$$++) { | |
| var $next$jscomp$1$$ = | |
| $queue$jscomp$3$$[$i$jscomp$38$$]; | |
| $promise$jscomp$6$$._state($value$jscomp$99$$, $next$jscomp$1$$.onFulfilled, $next$jscomp$1$$.onRejected, $next$jscomp$1$$.deferred) | |
| } | |
| $queue$jscomp$3$$.length = 0; | |
| $state$$ === $RejectedPromise$$module$node_modules$promise_pjs$promise$$ && $promise$jscomp$6$$._isChainEnd && setTimeout(function() { | |
| if ($promise$jscomp$6$$._isChainEnd) throw $value$jscomp$99$$; | |
| }, 0) | |
| } | |
| function $adopter$$module$node_modules$promise_pjs$promise$$($promise$jscomp$7$$, $state$jscomp$1$$) { | |
| return function($value$jscomp$100$$) { | |
| $adopt$$module$node_modules$promise_pjs$promise$$($promise$jscomp$7$$, $state$jscomp$1$$, $value$jscomp$100$$) | |
| } | |
| } | |
| function $noop$$module$node_modules$promise_pjs$promise$$() {} | |
| function $isFunction$$module$node_modules$promise_pjs$promise$$($fn$jscomp$7$$) { | |
| return "function" === typeof $fn$jscomp$7$$ | |
| } | |
| function $tryCatchDeferred$$module$node_modules$promise_pjs$promise$$($deferred$jscomp$5$$, $fn$jscomp$8$$, $arg$jscomp$7$$) { | |
| var $promise$jscomp$9$$ = $deferred$jscomp$5$$.promise, | |
| $resolve$jscomp$14$$ = $deferred$jscomp$5$$.resolve, | |
| $reject$jscomp$7$$ = $deferred$jscomp$5$$.reject; | |
| return function() { | |
| try { | |
| var $deferred$jscomp$5$$ = $fn$jscomp$8$$($arg$jscomp$7$$); | |
| $doResolve$$module$node_modules$promise_pjs$promise$$($promise$jscomp$9$$, $resolve$jscomp$14$$, $reject$jscomp$7$$, $deferred$jscomp$5$$, $deferred$jscomp$5$$) | |
| } catch ($e$jscomp$29$$) { | |
| $reject$jscomp$7$$($e$jscomp$29$$) | |
| } | |
| } | |
| } | |
| var $defer$$module$node_modules$promise_pjs$promise$$ = function() { | |
| function $flush$$() { | |
| for (var $flush$$ = 0; $flush$$ < $length$jscomp$28$$; $flush$$++) { | |
| var $defer$$ = $queue$jscomp$4$$[$flush$$]; | |
| $queue$jscomp$4$$[$flush$$] = null; | |
| $defer$$() | |
| } | |
| $length$jscomp$28$$ = 0 | |
| } | |
| function $defer$$($flush$$) { | |
| 0 === $length$jscomp$28$$ && $scheduleFlush$$(); | |
| $queue$jscomp$4$$[$length$jscomp$28$$++] = $flush$$ | |
| } | |
| if ("undefined" !== typeof window && window.postMessage) { | |
| window.addEventListener("message", $flush$$); | |
| var $scheduleFlush$$ = function() { | |
| window.postMessage("macro-task", | |
| "*") | |
| } | |
| } else $scheduleFlush$$ = function() { | |
| setTimeout($flush$$, 0) | |
| }; | |
| var $queue$jscomp$4$$ = Array(16), | |
| $length$jscomp$28$$ = 0; | |
| return $defer$$ | |
| }(); | |
| function $doResolve$$module$node_modules$promise_pjs$promise$$($promise$jscomp$10$$, $resolve$jscomp$15$$, $reject$jscomp$8$$, $value$jscomp$102$$, $context$$) { | |
| var $_reject$$ = $reject$jscomp$8$$, | |
| $then$$; | |
| try { | |
| if ($value$jscomp$102$$ === $promise$jscomp$10$$) throw new TypeError("Cannot fulfill promise with itself"); | |
| var $isObj$$ = $value$jscomp$102$$ === Object($value$jscomp$102$$); | |
| if ($isObj$$ && $value$jscomp$102$$ instanceof $promise$jscomp$10$$.constructor) $adopt$$module$node_modules$promise_pjs$promise$$($promise$jscomp$10$$, | |
| $value$jscomp$102$$._state, $value$jscomp$102$$._value, $value$jscomp$102$$); | |
| else if ($isObj$$ && ($then$$ = $value$jscomp$102$$.then) && $isFunction$$module$node_modules$promise_pjs$promise$$($then$$)) { | |
| var $_resolve$$ = function($value$jscomp$102$$) { | |
| $_resolve$$ = $_reject$$ = $noop$$module$node_modules$promise_pjs$promise$$; | |
| $doResolve$$module$node_modules$promise_pjs$promise$$($promise$jscomp$10$$, $resolve$jscomp$15$$, $reject$jscomp$8$$, $value$jscomp$102$$, $value$jscomp$102$$) | |
| }; | |
| $_reject$$ = function($promise$jscomp$10$$) { | |
| $_resolve$$ = | |
| $_reject$$ = $noop$$module$node_modules$promise_pjs$promise$$; | |
| $reject$jscomp$8$$($promise$jscomp$10$$) | |
| }; | |
| $then$$.call($context$$, function($promise$jscomp$10$$) { | |
| $_resolve$$($promise$jscomp$10$$) | |
| }, function($promise$jscomp$10$$) { | |
| $_reject$$($promise$jscomp$10$$) | |
| }) | |
| } else $resolve$jscomp$15$$($value$jscomp$102$$) | |
| } catch ($e$jscomp$30$$) { | |
| $_reject$$($e$jscomp$30$$) | |
| } | |
| } | |
| module.exports = $Promise$$module$node_modules$promise_pjs$promise$$; | |
| function $includes$$module$src$polyfills$array_includes$$($value$jscomp$105$$, $i$jscomp$41_opt_fromIndex$jscomp$10$$) { | |
| var $fromIndex$$ = $i$jscomp$41_opt_fromIndex$jscomp$10$$ || 0, | |
| $len$$ = this.length; | |
| for ($i$jscomp$41_opt_fromIndex$jscomp$10$$ = 0 <= $fromIndex$$ ? $fromIndex$$ : Math.max($len$$ + $fromIndex$$, 0); $i$jscomp$41_opt_fromIndex$jscomp$10$$ < $len$$; $i$jscomp$41_opt_fromIndex$jscomp$10$$++) { | |
| var $other$jscomp$4$$ = this[$i$jscomp$41_opt_fromIndex$jscomp$10$$]; | |
| if ($other$jscomp$4$$ === $value$jscomp$105$$ || $value$jscomp$105$$ !== | |
| $value$jscomp$105$$ && $other$jscomp$4$$ !== $other$jscomp$4$$) return !0 | |
| } | |
| return !1 | |
| } | |
| function $install$$module$src$polyfills$array_includes$$() { | |
| var $win$jscomp$31$$ = self; | |
| $win$jscomp$31$$.Array.prototype.includes || $win$jscomp$31$$.Object.defineProperty(Array.prototype, "includes", { | |
| enumerable: !1, | |
| configurable: !0, | |
| writable: !0, | |
| value: $includes$$module$src$polyfills$array_includes$$ | |
| }) | |
| }; | |
| module$node_modules$document_register_element$build$document_register_element_node_install. | |
| default (self, "auto"); | |
| $install$$module$src$polyfills$domtokenlist_toggle$$(self); | |
| $install$$module$src$polyfills$math_sign$$(); | |
| $install$$module$src$polyfills$object_assign$$(); | |
| (function($win$jscomp$30$$) { | |
| $win$jscomp$30$$.Promise || ($win$jscomp$30$$.Promise = module$node_modules$promise_pjs$promise. | |
| default, module$node_modules$promise_pjs$promise. | |
| default. | |
| default && ($win$jscomp$30$$.Promise = module$node_modules$promise_pjs$promise. | |
| default. | |
| default), $win$jscomp$30$$.Promise.resolve = module$node_modules$promise_pjs$promise. | |
| default.resolve, $win$jscomp$30$$.Promise.reject = module$node_modules$promise_pjs$promise. | |
| default.reject, $win$jscomp$30$$.Promise.all = module$node_modules$promise_pjs$promise. | |
| default.all, | |
| $win$jscomp$30$$.Promise.race = module$node_modules$promise_pjs$promise. | |
| default.race) | |
| })(self); | |
| $install$$module$src$polyfills$document_contains$$(self); | |
| $install$$module$src$polyfills$array_includes$$(); | |
| function $getExistingServiceForDocInEmbedScope$$module$src$service$$($nodeOrDoc$$, $id$jscomp$9$$, $opt_fallbackToTopWin$jscomp$1$$) { | |
| if ($nodeOrDoc$$.nodeType) { | |
| var $local$jscomp$1$$ = $getLocalExistingServiceForEmbedWinOrNull$$module$src$service$$(($nodeOrDoc$$.ownerDocument || $nodeOrDoc$$).defaultView, $id$jscomp$9$$); | |
| if ($local$jscomp$1$$) return $local$jscomp$1$$ | |
| } | |
| return !$nodeOrDoc$$.nodeType || $opt_fallbackToTopWin$jscomp$1$$ ? $getServiceForDoc$$module$src$service$$($nodeOrDoc$$, $id$jscomp$9$$) : null | |
| } | |
| function $installServiceInEmbedScope$$module$src$service$$($embedWin$$, $id$jscomp$10$$, $service$$) { | |
| $getTopWindow$$module$src$service$$($embedWin$$); | |
| $getLocalExistingServiceForEmbedWinOrNull$$module$src$service$$($embedWin$$, $id$jscomp$10$$); | |
| $registerServiceInternal$$module$src$service$$($embedWin$$, $embedWin$$, $id$jscomp$10$$, function() { | |
| return $service$$ | |
| }); | |
| $getServiceInternal$$module$src$service$$($embedWin$$, $id$jscomp$10$$) | |
| } | |
| function $getLocalExistingServiceForEmbedWinOrNull$$module$src$service$$($embedWin$jscomp$1$$, $id$jscomp$11$$) { | |
| var $topWin$jscomp$1$$ = $getTopWindow$$module$src$service$$($embedWin$jscomp$1$$); | |
| return $embedWin$jscomp$1$$ != $topWin$jscomp$1$$ && $isServiceRegistered$$module$src$service$$($embedWin$jscomp$1$$, $id$jscomp$11$$) ? $getServiceInternal$$module$src$service$$($embedWin$jscomp$1$$, $id$jscomp$11$$) : null | |
| } | |
| function $registerServiceBuilder$$module$src$service$$($win$jscomp$34$$, $id$jscomp$12$$, $constructor$jscomp$2$$) { | |
| var $opt_instantiate$$; | |
| $win$jscomp$34$$ = $getTopWindow$$module$src$service$$($win$jscomp$34$$); | |
| $registerServiceInternal$$module$src$service$$($win$jscomp$34$$, $win$jscomp$34$$, $id$jscomp$12$$, $constructor$jscomp$2$$); | |
| $opt_instantiate$$ && $getServiceInternal$$module$src$service$$($win$jscomp$34$$, $id$jscomp$12$$) | |
| } | |
| function $registerServiceBuilderForDoc$$module$src$service$$($nodeOrDoc$jscomp$1$$, $id$jscomp$13$$, $constructor$jscomp$3$$, $opt_instantiate$jscomp$1$$) { | |
| var $ampdoc$$ = $getAmpdoc$$module$src$service$$($nodeOrDoc$jscomp$1$$), | |
| $holder$$ = $getAmpdocServiceHolder$$module$src$service$$($ampdoc$$); | |
| $registerServiceInternal$$module$src$service$$($holder$$, $ampdoc$$, $id$jscomp$13$$, $constructor$jscomp$3$$); | |
| $opt_instantiate$jscomp$1$$ && $getServiceInternal$$module$src$service$$($holder$$, $id$jscomp$13$$) | |
| } | |
| function $getService$$module$src$service$$($win$jscomp$35$$, $id$jscomp$14$$) { | |
| $win$jscomp$35$$ = $getTopWindow$$module$src$service$$($win$jscomp$35$$); | |
| return $getServiceInternal$$module$src$service$$($win$jscomp$35$$, $id$jscomp$14$$) | |
| } | |
| function $getExistingServiceOrNull$$module$src$service$$($win$jscomp$37$$) { | |
| $win$jscomp$37$$ = $getTopWindow$$module$src$service$$($win$jscomp$37$$); | |
| return $isServiceRegistered$$module$src$service$$($win$jscomp$37$$, "performance") ? $getServiceInternal$$module$src$service$$($win$jscomp$37$$, "performance") : null | |
| } | |
| function $getServiceForDoc$$module$src$service$$($ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$, $id$jscomp$18$$) { | |
| $ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$ = $getAmpdoc$$module$src$service$$($ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$); | |
| $ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$ = $getAmpdocServiceHolder$$module$src$service$$($ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$); | |
| return $getServiceInternal$$module$src$service$$($ampdoc$jscomp$1_holder$jscomp$1_nodeOrDoc$jscomp$2$$, | |
| $id$jscomp$18$$) | |
| } | |
| function $getServicePromiseForDoc$$module$src$service$$($nodeOrDoc$jscomp$3$$, $id$jscomp$19$$) { | |
| return $getServicePromiseInternal$$module$src$service$$($getAmpdocServiceHolder$$module$src$service$$($nodeOrDoc$jscomp$3$$), $id$jscomp$19$$) | |
| } | |
| function $getServicePromiseOrNullForDoc$$module$src$service$$($nodeOrDoc$jscomp$4$$, $id$jscomp$20$$) { | |
| return $getServicePromiseOrNullInternal$$module$src$service$$($getAmpdocServiceHolder$$module$src$service$$($nodeOrDoc$jscomp$4$$), $id$jscomp$20$$) | |
| } | |
| function $setParentWindow$$module$src$service$$($win$jscomp$39$$, $parentWin$$) { | |
| $win$jscomp$39$$.__AMP_PARENT = $parentWin$$; | |
| $win$jscomp$39$$.__AMP_TOP = $getTopWindow$$module$src$service$$($parentWin$$) | |
| } | |
| function $getTopWindow$$module$src$service$$($win$jscomp$41$$) { | |
| return $win$jscomp$41$$.__AMP_TOP || $win$jscomp$41$$ | |
| } | |
| function $getParentWindowFrameElement$$module$src$service$$($node$jscomp$23$$, $topWin$jscomp$2$$) { | |
| var $childWin$$ = ($node$jscomp$23$$.ownerDocument || $node$jscomp$23$$).defaultView; | |
| if ($childWin$$ && $childWin$$ != $topWin$jscomp$2$$ && $getTopWindow$$module$src$service$$($childWin$$) == $topWin$jscomp$2$$) try { | |
| return $childWin$$.frameElement | |
| } catch ($e$jscomp$31$$) {} | |
| return null | |
| } | |
| function $getAmpdoc$$module$src$service$$($nodeOrDoc$jscomp$5$$) { | |
| return $nodeOrDoc$jscomp$5$$.nodeType ? $getService$$module$src$service$$(($nodeOrDoc$jscomp$5$$.ownerDocument || $nodeOrDoc$jscomp$5$$).defaultView, "ampdoc").getAmpDoc($nodeOrDoc$jscomp$5$$) : $nodeOrDoc$jscomp$5$$ | |
| } | |
| function $getAmpdocServiceHolder$$module$src$service$$($ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$) { | |
| $ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$ = $getAmpdoc$$module$src$service$$($ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$); | |
| return $ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$.isSingleDoc() ? $ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$.win : $ampdoc$jscomp$2_nodeOrDoc$jscomp$6$$ | |
| } | |
| function $getServiceInternal$$module$src$service$$($holder$jscomp$2_s$jscomp$6$$, $id$jscomp$21$$) { | |
| $isServiceRegistered$$module$src$service$$($holder$jscomp$2_s$jscomp$6$$, $id$jscomp$21$$); | |
| var $services$$ = $getServices$$module$src$service$$($holder$jscomp$2_s$jscomp$6$$); | |
| $holder$jscomp$2_s$jscomp$6$$ = $services$$[$id$jscomp$21$$]; | |
| $holder$jscomp$2_s$jscomp$6$$.obj || ($holder$jscomp$2_s$jscomp$6$$.obj = new $holder$jscomp$2_s$jscomp$6$$.ctor($holder$jscomp$2_s$jscomp$6$$.context), $holder$jscomp$2_s$jscomp$6$$.ctor = | |
| null, $holder$jscomp$2_s$jscomp$6$$.context = null, $holder$jscomp$2_s$jscomp$6$$.resolve && $holder$jscomp$2_s$jscomp$6$$.resolve($holder$jscomp$2_s$jscomp$6$$.obj)); | |
| return $holder$jscomp$2_s$jscomp$6$$.obj | |
| } | |
| function $registerServiceInternal$$module$src$service$$($holder$jscomp$3$$, $context$jscomp$1$$, $id$jscomp$22$$, $ctor$jscomp$1$$) { | |
| var $services$jscomp$1$$ = $getServices$$module$src$service$$($holder$jscomp$3$$), | |
| $s$jscomp$7$$ = $services$jscomp$1$$[$id$jscomp$22$$]; | |
| $s$jscomp$7$$ || ($s$jscomp$7$$ = $services$jscomp$1$$[$id$jscomp$22$$] = { | |
| obj: null, | |
| promise: null, | |
| resolve: null, | |
| context: null, | |
| ctor: null | |
| }); | |
| $s$jscomp$7$$.ctor || $s$jscomp$7$$.obj || ($s$jscomp$7$$.ctor = $ctor$jscomp$1$$, $s$jscomp$7$$.context = $context$jscomp$1$$, | |
| $s$jscomp$7$$.resolve && $getServiceInternal$$module$src$service$$($holder$jscomp$3$$, $id$jscomp$22$$)) | |
| } | |
| function $getServicePromiseInternal$$module$src$service$$($holder$jscomp$4$$, $id$jscomp$23$$) { | |
| var $cached$$ = $getServicePromiseOrNullInternal$$module$src$service$$($holder$jscomp$4$$, $id$jscomp$23$$); | |
| if ($cached$$) return $cached$$; | |
| var $resolve$jscomp$16$$, $promise$jscomp$11$$ = new Promise(function($holder$jscomp$4$$) { | |
| $resolve$jscomp$16$$ = $holder$jscomp$4$$ | |
| }); | |
| $getServices$$module$src$service$$($holder$jscomp$4$$)[$id$jscomp$23$$] = { | |
| obj: null, | |
| promise: $promise$jscomp$11$$, | |
| resolve: $resolve$jscomp$16$$, | |
| context: null, | |
| ctor: null | |
| }; | |
| return $promise$jscomp$11$$ | |
| } | |
| function $getServicePromiseOrNullInternal$$module$src$service$$($holder$jscomp$5$$, $id$jscomp$24$$) { | |
| var $s$jscomp$8$$ = $getServices$$module$src$service$$($holder$jscomp$5$$)[$id$jscomp$24$$]; | |
| if ($s$jscomp$8$$) { | |
| if ($s$jscomp$8$$.promise) return $s$jscomp$8$$.promise; | |
| $getServiceInternal$$module$src$service$$($holder$jscomp$5$$, $id$jscomp$24$$); | |
| return $s$jscomp$8$$.promise = Promise.resolve($s$jscomp$8$$.obj) | |
| } | |
| return null | |
| } | |
| function $getServices$$module$src$service$$($holder$jscomp$6$$) { | |
| var $services$jscomp$4$$ = $holder$jscomp$6$$.services; | |
| $services$jscomp$4$$ || ($services$jscomp$4$$ = $holder$jscomp$6$$.services = {}); | |
| return $services$jscomp$4$$ | |
| } | |
| function $disposeServicesInternal$$module$src$service$$($holder$jscomp$7_services$jscomp$5$$) { | |
| $holder$jscomp$7_services$jscomp$5$$ = $getServices$$module$src$service$$($holder$jscomp$7_services$jscomp$5$$); | |
| var $$jscomp$loop$182$$ = {}, $id$jscomp$25$$; | |
| for ($id$jscomp$25$$ in $holder$jscomp$7_services$jscomp$5$$) if ($$jscomp$loop$182$$.id = $id$jscomp$25$$, Object.prototype.hasOwnProperty.call($holder$jscomp$7_services$jscomp$5$$, $$jscomp$loop$182$$.id)) { | |
| var $serviceHolder$$ = $holder$jscomp$7_services$jscomp$5$$[$$jscomp$loop$182$$.id]; | |
| $serviceHolder$$.obj ? $disposeServiceInternal$$module$src$service$$($$jscomp$loop$182$$.id, $serviceHolder$$.obj) : $serviceHolder$$.promise && $serviceHolder$$.promise.then(function($holder$jscomp$7_services$jscomp$5$$) { | |
| return function($$jscomp$loop$182$$) { | |
| return $disposeServiceInternal$$module$src$service$$($holder$jscomp$7_services$jscomp$5$$.id, $$jscomp$loop$182$$) | |
| } | |
| }($$jscomp$loop$182$$)); | |
| $$jscomp$loop$182$$ = { | |
| id: $$jscomp$loop$182$$.id | |
| } | |
| } | |
| } | |
| function $disposeServiceInternal$$module$src$service$$($id$jscomp$26$$, $service$jscomp$3$$) { | |
| if ("function" == typeof $service$jscomp$3$$.dispose) try { | |
| $service$jscomp$3$$.dispose() | |
| } catch ($e$jscomp$32$$) { | |
| $dev$$module$src$log$$().error("SERVICE", "failed to dispose service", $id$jscomp$26$$, $e$jscomp$32$$) | |
| } | |
| } | |
| function $adoptServiceForEmbedIfEmbeddable$$module$src$service$$($embedWin$jscomp$4$$, $service$jscomp$5_serviceId$jscomp$1$$) { | |
| var $frameElement$$ = $embedWin$jscomp$4$$.frameElement, | |
| $ampdoc$jscomp$4_holder$jscomp$8$$ = $getAmpdoc$$module$src$service$$($frameElement$$); | |
| $ampdoc$jscomp$4_holder$jscomp$8$$ = $getAmpdocServiceHolder$$module$src$service$$($ampdoc$jscomp$4_holder$jscomp$8$$); | |
| $isServiceRegistered$$module$src$service$$($ampdoc$jscomp$4_holder$jscomp$8$$, $service$jscomp$5_serviceId$jscomp$1$$) && | |
| ($service$jscomp$5_serviceId$jscomp$1$$ = $getServiceForDoc$$module$src$service$$($frameElement$$, $service$jscomp$5_serviceId$jscomp$1$$), "function" == typeof $service$jscomp$5_serviceId$jscomp$1$$.adoptEmbedWindow && $service$jscomp$5_serviceId$jscomp$1$$.adoptEmbedWindow($embedWin$jscomp$4$$)) | |
| } | |
| function $isServiceRegistered$$module$src$service$$($holder$jscomp$10_service$jscomp$6$$, $id$jscomp$28$$) { | |
| $holder$jscomp$10_service$jscomp$6$$ = $holder$jscomp$10_service$jscomp$6$$.services && $holder$jscomp$10_service$jscomp$6$$.services[$id$jscomp$28$$]; | |
| return !(!$holder$jscomp$10_service$jscomp$6$$ || !$holder$jscomp$10_service$jscomp$6$$.ctor && !$holder$jscomp$10_service$jscomp$6$$.obj) | |
| }; | |
| function $getElementServiceIfAvailable$$module$src$element_service$$($win$jscomp$45$$, $id$jscomp$30$$, $extension$jscomp$1$$) { | |
| var $s$jscomp$9$$ = $getServicePromiseOrNullInternal$$module$src$service$$($win$jscomp$45$$, $id$jscomp$30$$); | |
| return $s$jscomp$9$$ ? $s$jscomp$9$$ : $getElementServicePromiseOrNull$$module$src$element_service$$($win$jscomp$45$$, $id$jscomp$30$$, $extension$jscomp$1$$, !0) | |
| } | |
| function $isElementScheduled$$module$src$element_service$$($win$jscomp$46$$, $elementName$jscomp$1$$) { | |
| return $win$jscomp$46$$.ampExtendedElements ? !! $win$jscomp$46$$.ampExtendedElements[$elementName$jscomp$1$$] : !1 | |
| } | |
| function $getElementServiceForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$7$$, $id$jscomp$31$$, $extension$jscomp$2$$) { | |
| return $getElementServiceIfAvailableForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$7$$, $id$jscomp$31$$, $extension$jscomp$2$$, void 0).then(function($nodeOrDoc$jscomp$7$$) { | |
| return $user$$module$src$log$$().assert($nodeOrDoc$jscomp$7$$, "Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.", | |
| $id$jscomp$31$$, $extension$jscomp$2$$, $extension$jscomp$2$$, $extension$jscomp$2$$) | |
| }) | |
| } | |
| function $getElementServiceIfAvailableForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$8$$, $id$jscomp$32$$, $extension$jscomp$3$$, $opt_element$jscomp$10$$) { | |
| var $ampdoc$jscomp$5$$ = $getAmpdoc$$module$src$service$$($nodeOrDoc$jscomp$8$$), | |
| $s$jscomp$10$$ = $getServicePromiseOrNullForDoc$$module$src$service$$($nodeOrDoc$jscomp$8$$, $id$jscomp$32$$); | |
| return $s$jscomp$10$$ ? $s$jscomp$10$$ : Promise.resolve().then(function() { | |
| return !$opt_element$jscomp$10$$ && $isElementScheduled$$module$src$element_service$$($ampdoc$jscomp$5$$.win, | |
| $extension$jscomp$3$$) ? $getServicePromiseForDoc$$module$src$service$$($nodeOrDoc$jscomp$8$$, $id$jscomp$32$$) : $ampdoc$jscomp$5$$.whenBodyAvailable().then(function() { | |
| return $opt_element$jscomp$10$$ ? $getServicePromiseOrNullForDoc$$module$src$service$$($nodeOrDoc$jscomp$8$$, $id$jscomp$32$$) : $isElementScheduled$$module$src$element_service$$($ampdoc$jscomp$5$$.win, $extension$jscomp$3$$) ? $getServicePromiseForDoc$$module$src$service$$($nodeOrDoc$jscomp$8$$, $id$jscomp$32$$) : null | |
| }) | |
| }) | |
| } | |
| function $getElementServiceIfAvailableForDocInEmbedScope$$module$src$element_service$$($nodeOrDoc$jscomp$9$$) { | |
| var $s$jscomp$11_win$jscomp$47$$ = $getExistingServiceForDocInEmbedScope$$module$src$service$$($nodeOrDoc$jscomp$9$$, "bind"); | |
| if ($s$jscomp$11_win$jscomp$47$$) return Promise.resolve($s$jscomp$11_win$jscomp$47$$); | |
| if ($nodeOrDoc$jscomp$9$$.nodeType) { | |
| $s$jscomp$11_win$jscomp$47$$ = ($nodeOrDoc$jscomp$9$$.ownerDocument || $nodeOrDoc$jscomp$9$$).defaultView; | |
| var $topWin$jscomp$3$$ = $getTopWindow$$module$src$service$$($s$jscomp$11_win$jscomp$47$$); | |
| return $s$jscomp$11_win$jscomp$47$$ !== $topWin$jscomp$3$$ ? $getElementServicePromiseOrNull$$module$src$element_service$$($s$jscomp$11_win$jscomp$47$$, "bind", "amp-bind") : $getElementServiceIfAvailableForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$9$$, "bind", "amp-bind") | |
| } | |
| return Promise.resolve(null) | |
| } | |
| function $getElementServicePromiseOrNull$$module$src$element_service$$($win$jscomp$48$$, $id$jscomp$35$$, $extension$jscomp$6$$, $opt_element$jscomp$11$$) { | |
| return Promise.resolve().then(function() { | |
| return !$opt_element$jscomp$11$$ && $isElementScheduled$$module$src$element_service$$($win$jscomp$48$$, $extension$jscomp$6$$) ? $getServicePromiseInternal$$module$src$service$$($win$jscomp$48$$, $id$jscomp$35$$) : $waitForBodyPromise$$module$src$dom$$($win$jscomp$48$$.document).then(function() { | |
| return $opt_element$jscomp$11$$ ? | |
| $getServicePromiseOrNullInternal$$module$src$service$$($win$jscomp$48$$, $id$jscomp$35$$) : $isElementScheduled$$module$src$element_service$$($win$jscomp$48$$, $extension$jscomp$6$$) ? $getServicePromiseInternal$$module$src$service$$($win$jscomp$48$$, $id$jscomp$35$$) : null | |
| }) | |
| }) | |
| }; | |
| function $Services$$module$src$services$accessServiceForDocOrNull$$($nodeOrDoc$jscomp$11$$) { | |
| return $getElementServiceIfAvailableForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$11$$, "access", "amp-access") | |
| } | |
| function $Services$$module$src$services$actionServiceForDoc$$($nodeOrDoc$jscomp$12$$) { | |
| return $getExistingServiceForDocInEmbedScope$$module$src$service$$($nodeOrDoc$jscomp$12$$, "action", !0) | |
| } | |
| function $Services$$module$src$services$ampdocServiceFor$$($window$jscomp$2$$) { | |
| return $getService$$module$src$service$$($window$jscomp$2$$, "ampdoc") | |
| } | |
| function $Services$$module$src$services$analyticsForDoc$$($nodeOrDoc$jscomp$15$$) { | |
| var $loadAnalytics$$ = !0; | |
| if ($loadAnalytics$$ = void 0 === $loadAnalytics$$ ? !1 : $loadAnalytics$$) { | |
| var $ampdoc$jscomp$6$$ = $getAmpdoc$$module$src$service$$($nodeOrDoc$jscomp$15$$); | |
| $Services$$module$src$services$extensionsFor$$($ampdoc$jscomp$6$$.win).installExtensionForDoc($ampdoc$jscomp$6$$, "amp-analytics") | |
| } | |
| return $getElementServiceForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$15$$, "amp-analytics-instrumentation", "amp-analytics") | |
| } | |
| function $Services$$module$src$services$analyticsForDocOrNull$$($nodeOrDoc$jscomp$16$$) { | |
| return $getElementServiceIfAvailableForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$16$$, "amp-analytics-instrumentation", "amp-analytics") | |
| } | |
| function $Services$$module$src$services$cryptoFor$$($window$jscomp$4$$) { | |
| return $getService$$module$src$service$$($window$jscomp$4$$, "crypto") | |
| } | |
| function $Services$$module$src$services$documentInfoForDoc$$($nodeOrDoc$jscomp$19$$) { | |
| return $getServiceForDoc$$module$src$service$$($nodeOrDoc$jscomp$19$$, "documentInfo").get() | |
| } | |
| function $Services$$module$src$services$extensionsFor$$($window$jscomp$6$$) { | |
| return $getService$$module$src$service$$($window$jscomp$6$$, "extensions") | |
| } | |
| function $Services$$module$src$services$platformFor$$($window$jscomp$9$$) { | |
| return $getService$$module$src$service$$($window$jscomp$9$$, "platform") | |
| } | |
| function $Services$$module$src$services$resourcesForDoc$$($nodeOrDoc$jscomp$22$$) { | |
| return $getServiceForDoc$$module$src$service$$($nodeOrDoc$jscomp$22$$, "resources") | |
| } | |
| function $Services$$module$src$services$templatesFor$$($window$jscomp$10$$) { | |
| return $getService$$module$src$service$$($window$jscomp$10$$, "templates") | |
| } | |
| function $Services$$module$src$services$timerFor$$($window$jscomp$11$$) { | |
| return $getService$$module$src$service$$($window$jscomp$11$$, "timer") | |
| } | |
| function $Services$$module$src$services$urlReplacementsForDoc$$($nodeOrDoc$jscomp$25$$) { | |
| return $getExistingServiceForDocInEmbedScope$$module$src$service$$($nodeOrDoc$jscomp$25$$, "url-replace", !0) | |
| } | |
| function $Services$$module$src$services$userNotificationManagerForDoc$$($nodeOrDoc$jscomp$26$$) { | |
| return $getElementServiceForDoc$$module$src$element_service$$($nodeOrDoc$jscomp$26$$, "userNotificationManager", "amp-user-notification") | |
| } | |
| function $Services$$module$src$services$viewerForDoc$$($nodeOrDoc$jscomp$28$$) { | |
| return $getServiceForDoc$$module$src$service$$($nodeOrDoc$jscomp$28$$, "viewer") | |
| } | |
| function $Services$$module$src$services$vsyncFor$$($window$jscomp$12$$) { | |
| return $getService$$module$src$service$$($window$jscomp$12$$, "vsync") | |
| } | |
| function $Services$$module$src$services$viewportForDoc$$($nodeOrDoc$jscomp$30$$) { | |
| return $getServiceForDoc$$module$src$service$$($nodeOrDoc$jscomp$30$$, "viewport") | |
| } | |
| function $Services$$module$src$services$xhrFor$$($window$jscomp$13$$) { | |
| return $getService$$module$src$service$$($window$jscomp$13$$, "xhr") | |
| }; | |
| function $getCookie$$module$src$cookies$$($i$jscomp$42_win$jscomp$53$$, $name$jscomp$83_value$9$$) { | |
| try { | |
| var $JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$ = $i$jscomp$42_win$jscomp$53$$.document.cookie | |
| } catch ($JSCompiler_e$jscomp$inline_585$$) { | |
| $JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$ = "" | |
| } | |
| var $cookieString$$ = $JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$; | |
| if (!$cookieString$$) return null; | |
| var $cookies$$ = $cookieString$$.split(";"); | |
| for ($i$jscomp$42_win$jscomp$53$$ = 0; $i$jscomp$42_win$jscomp$53$$ < $cookies$$.length; $i$jscomp$42_win$jscomp$53$$++) { | |
| var $cookie$$ = $cookies$$[$i$jscomp$42_win$jscomp$53$$].trim(), | |
| $eq$$ = $cookie$$.indexOf("="); | |
| if ($JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$ = -1 != $eq$$) $JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$ = | |
| $cookie$$.substring(0, $eq$$).trim(), $JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$ = $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$, void 0) == $name$jscomp$83_value$9$$; | |
| if ($JSCompiler_component$jscomp$inline_587_JSCompiler_inline_result$jscomp$238_JSCompiler_temp$jscomp$226$$) return $name$jscomp$83_value$9$$ = $cookie$$.substring($eq$$ + | |
| 1).trim(), $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($name$jscomp$83_value$9$$, $name$jscomp$83_value$9$$) | |
| } | |
| return null | |
| } | |
| function $setCookie$$module$src$cookies$$($win$jscomp$55$$, $name$jscomp$84$$, $value$jscomp$106$$, $expirationTime$$, $opt_options$jscomp$78$$) { | |
| if (!$opt_options$jscomp$78$$ || !$opt_options$jscomp$78$$.allowOnProxyOrigin) { | |
| if ($isProxyOrigin$$module$src$url$$($win$jscomp$55$$.location.href)) throw Error("Should never attempt to set cookie on proxy origin: " + $name$jscomp$84$$); | |
| var $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$ = $parseUrl$$module$src$url$$($win$jscomp$55$$.location.href).hostname.toLowerCase(), | |
| $JSCompiler_proxy$jscomp$inline_594_domain$10$$ = $parseUrl$$module$src$url$$($module$src$config$$.urls.cdn).hostname.toLowerCase(); | |
| if ($JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$ == $JSCompiler_proxy$jscomp$inline_594_domain$10$$ || $endsWith$$module$src$string$$($JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$, "." + $JSCompiler_proxy$jscomp$inline_594_domain$10$$)) throw Error("Should never attempt to set cookie on proxy origin. (in depth check): " + $name$jscomp$84$$); | |
| } | |
| if ($opt_options$jscomp$78$$ && $opt_options$jscomp$78$$.highestAvailableDomain) { | |
| $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$ = $win$jscomp$55$$.location.hostname.split("."); | |
| $JSCompiler_proxy$jscomp$inline_594_domain$10$$ = $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$[$JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$.length - 1]; | |
| for (var $i$jscomp$43$$ = $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$.length - 2; 0 <= | |
| $i$jscomp$43$$; $i$jscomp$43$$--) if ($JSCompiler_proxy$jscomp$inline_594_domain$10$$ = $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$[$i$jscomp$43$$] + "." + $JSCompiler_proxy$jscomp$inline_594_domain$10$$, $trySetCookie$$module$src$cookies$$($win$jscomp$55$$, $name$jscomp$84$$, $value$jscomp$106$$, $expirationTime$$, $JSCompiler_proxy$jscomp$inline_594_domain$10$$), $getCookie$$module$src$cookies$$($win$jscomp$55$$, $name$jscomp$84$$) == $value$jscomp$106$$) return | |
| } | |
| $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$ = | |
| void 0; | |
| $opt_options$jscomp$78$$ && $opt_options$jscomp$78$$.domain && ($JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$ = $opt_options$jscomp$78$$.domain); | |
| $trySetCookie$$module$src$cookies$$($win$jscomp$55$$, $name$jscomp$84$$, $value$jscomp$106$$, $expirationTime$$, $JSCompiler_current$jscomp$inline_593_domain$jscomp$2_parts$jscomp$1$$) | |
| } | |
| function $trySetCookie$$module$src$cookies$$($win$jscomp$56$$, $cookie$jscomp$1_name$jscomp$85$$, $value$jscomp$107$$, $expirationTime$jscomp$1$$, $domain$jscomp$3$$) { | |
| "ampproject.org" == $domain$jscomp$3$$ && ($value$jscomp$107$$ = "delete", $expirationTime$jscomp$1$$ = 0); | |
| $cookie$jscomp$1_name$jscomp$85$$ = encodeURIComponent($cookie$jscomp$1_name$jscomp$85$$) + "=" + encodeURIComponent($value$jscomp$107$$) + "; path=/" + ($domain$jscomp$3$$ ? "; domain=" + $domain$jscomp$3$$ : "") + "; expires=" + (new Date($expirationTime$jscomp$1$$)).toUTCString(); | |
| try { | |
| $win$jscomp$56$$.document.cookie = $cookie$jscomp$1_name$jscomp$85$$ | |
| } catch ($ignore$$) {} | |
| }; | |
| function $isCanary$$module$src$experiments$$($win$jscomp$58$$) { | |
| return !(!$win$jscomp$58$$.AMP_CONFIG || !$win$jscomp$58$$.AMP_CONFIG.canary) | |
| } | |
| function $isExperimentOn$$module$src$experiments$$($win$jscomp$63$$, $experimentId$jscomp$4$$) { | |
| return !!$experimentToggles$$module$src$experiments$$($win$jscomp$63$$)[$experimentId$jscomp$4$$] | |
| } | |
| function $toggleExperiment$$module$src$experiments$$($win$jscomp$64$$, $JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$, $opt_on$$, $opt_transientExperiment$$) { | |
| var $currentlyOn$$ = $isExperimentOn$$module$src$experiments$$($win$jscomp$64$$, $JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$), | |
| $on$$ = !(void 0 !== $opt_on$$ ? !$opt_on$$ : $currentlyOn$$); | |
| if ($on$$ != $currentlyOn$$ && ($experimentToggles$$module$src$experiments$$($win$jscomp$64$$)[$JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$] = | |
| $on$$, !$opt_transientExperiment$$)) { | |
| var $cookieToggles$$ = $getExperimentTogglesFromCookie$$module$src$experiments$$($win$jscomp$64$$); | |
| $cookieToggles$$[$JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$] = $on$$; | |
| $JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$ = $cookieToggles$$; | |
| var $JSCompiler_experimentIds$jscomp$inline_598$$ = [], | |
| $JSCompiler_experiment$jscomp$inline_599$$; | |
| for ($JSCompiler_experiment$jscomp$inline_599$$ in $JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$) $JSCompiler_experimentIds$jscomp$inline_598$$.push((!1 === | |
| $JSCompiler_toggles$jscomp$inline_597_experimentId$jscomp$5$$[$JSCompiler_experiment$jscomp$inline_599$$] ? "-" : "") + $JSCompiler_experiment$jscomp$inline_599$$); | |
| $setCookie$$module$src$cookies$$($win$jscomp$64$$, "AMP_EXP", $JSCompiler_experimentIds$jscomp$inline_598$$.join(","), Date.now() + 15552E6, { | |
| domain: $win$jscomp$64$$.location.hostname, | |
| allowOnProxyOrigin: !0 | |
| }) | |
| } | |
| return $on$$ | |
| } | |
| function $experimentToggles$$module$src$experiments$$($params$jscomp$5_win$jscomp$65$$) { | |
| if ($params$jscomp$5_win$jscomp$65$$.__AMP__EXPERIMENT_TOGGLES) return $params$jscomp$5_win$jscomp$65$$.__AMP__EXPERIMENT_TOGGLES; | |
| $params$jscomp$5_win$jscomp$65$$.__AMP__EXPERIMENT_TOGGLES = Object.create(null); | |
| var $toggles$jscomp$3$$ = $params$jscomp$5_win$jscomp$65$$.__AMP__EXPERIMENT_TOGGLES; | |
| if ($params$jscomp$5_win$jscomp$65$$.AMP_CONFIG) for (var $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$ in $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG) { | |
| var $frequency$$ = | |
| $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$]; | |
| "number" === typeof $frequency$$ && 0 <= $frequency$$ && 1 >= $frequency$$ && ($toggles$jscomp$3$$[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$] = Math.random() < $frequency$$) | |
| } | |
| if ($params$jscomp$5_win$jscomp$65$$.AMP_CONFIG && Array.isArray($params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-doc-opt-in"]) && 0 < $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-doc-opt-in"].length) { | |
| var $allowed$$ = | |
| $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-doc-opt-in"]; | |
| if ($allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$ = $params$jscomp$5_win$jscomp$65$$.document.head.querySelector('meta[name="amp-experiments-opt-in"]')) { | |
| var $optedInExperiments$$ = $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$.getAttribute("content").split(","); | |
| for ($allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$ = 0; $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$ < $optedInExperiments$$.length; $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$++) - 1 != | |
| $allowed$$.indexOf($optedInExperiments$$[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$]) && ($toggles$jscomp$3$$[$optedInExperiments$$[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$]] = !0) | |
| } | |
| } | |
| Object.assign($toggles$jscomp$3$$, $getExperimentTogglesFromCookie$$module$src$experiments$$($params$jscomp$5_win$jscomp$65$$)); | |
| if ($params$jscomp$5_win$jscomp$65$$.AMP_CONFIG && Array.isArray($params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-url-opt-in"]) && 0 < $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-url-opt-in"].length) { | |
| $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$ = | |
| $params$jscomp$5_win$jscomp$65$$.AMP_CONFIG["allow-url-opt-in"]; | |
| $params$jscomp$5_win$jscomp$65$$ = $parseQueryString_$$module$src$url_parse_query_string$$($params$jscomp$5_win$jscomp$65$$.location.originalHash || $params$jscomp$5_win$jscomp$65$$.location.hash); | |
| for (var $i$13$$ = 0; $i$13$$ < $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$.length; $i$13$$++) { | |
| var $param$jscomp$4$$ = $params$jscomp$5_win$jscomp$65$$["e-" + $allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$[$i$13$$]]; | |
| "1" == $param$jscomp$4$$ && | |
| ($toggles$jscomp$3$$[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$[$i$13$$]] = !0); | |
| "0" == $param$jscomp$4$$ && ($toggles$jscomp$3$$[$allowed$12_experimentId$jscomp$6_i$jscomp$45_meta$jscomp$1$$[$i$13$$]] = !1) | |
| } | |
| } | |
| return $toggles$jscomp$3$$ | |
| } | |
| function $getExperimentTogglesFromCookie$$module$src$experiments$$($toggles$jscomp$4_win$jscomp$67$$) { | |
| var $experimentCookie$$ = $getCookie$$module$src$cookies$$($toggles$jscomp$4_win$jscomp$67$$, "AMP_EXP"), | |
| $tokens$$ = $experimentCookie$$ ? $experimentCookie$$.split(/\s*,\s*/g) : []; | |
| $toggles$jscomp$4_win$jscomp$67$$ = Object.create(null); | |
| for (var $i$jscomp$46$$ = 0; $i$jscomp$46$$ < $tokens$$.length; $i$jscomp$46$$++) 0 != $tokens$$[$i$jscomp$46$$].length && ("-" == $tokens$$[$i$jscomp$46$$][0] ? $toggles$jscomp$4_win$jscomp$67$$[$tokens$$[$i$jscomp$46$$].substr(1)] = !1 : $toggles$jscomp$4_win$jscomp$67$$[$tokens$$[$i$jscomp$46$$]] = !0); | |
| return $toggles$jscomp$4_win$jscomp$67$$ | |
| } | |
| function $randomlySelectUnsetExperiments$$module$src$experiments$$($win$jscomp$71$$, $experiments$$) { | |
| $win$jscomp$71$$.experimentBranches = $win$jscomp$71$$.experimentBranches || {}; | |
| for (var $experimentName$$ in $experiments$$) if ($experiments$$.hasOwnProperty($experimentName$$) && !$win$jscomp$71$$.experimentBranches.hasOwnProperty($experimentName$$)) if (!$experiments$$[$experimentName$$].isTrafficEligible || !$experiments$$[$experimentName$$].isTrafficEligible($win$jscomp$71$$)) $win$jscomp$71$$.experimentBranches[$experimentName$$] = | |
| null; | |
| else if (!$win$jscomp$71$$.experimentBranches[$experimentName$$] && $isExperimentOn$$module$src$experiments$$($win$jscomp$71$$, $experimentName$$)) { | |
| var $branches$$ = $experiments$$[$experimentName$$].branches, | |
| $JSCompiler_arr$jscomp$inline_601$$ = $branches$$; | |
| $win$jscomp$71$$.experimentBranches[$experimentName$$] = $JSCompiler_arr$jscomp$inline_601$$[Math.floor(Math.random() * $JSCompiler_arr$jscomp$inline_601$$.length)] || null | |
| } | |
| } | |
| function $forceExperimentBranch$$module$src$experiments$$($win$jscomp$73$$, $experimentName$jscomp$2$$, $branchId$$) { | |
| $win$jscomp$73$$.experimentBranches = $win$jscomp$73$$.experimentBranches || {}; | |
| $toggleExperiment$$module$src$experiments$$($win$jscomp$73$$, $experimentName$jscomp$2$$, !! $branchId$$, !0); | |
| $win$jscomp$73$$.experimentBranches[$experimentName$jscomp$2$$] = $branchId$$ | |
| }; | |
| var $propertyNameCache$$module$src$style$$, $vendorPrefixes$$module$src$style$$ = "Webkit webkit Moz moz ms O o".split(" "); | |
| function $getVendorJsPropertyName$$module$src$style$$($style$jscomp$1$$, $camelCase$jscomp$1$$, $opt_bypassCache$$) { | |
| if ($startsWith$$module$src$string$$($camelCase$jscomp$1$$, "--")) return $camelCase$jscomp$1$$; | |
| $propertyNameCache$$module$src$style$$ || ($propertyNameCache$$module$src$style$$ = $map$$module$src$utils$object$$()); | |
| var $propertyName$jscomp$10$$ = $propertyNameCache$$module$src$style$$[$camelCase$jscomp$1$$]; | |
| if (!$propertyName$jscomp$10$$ || $opt_bypassCache$$) { | |
| $propertyName$jscomp$10$$ = $camelCase$jscomp$1$$; | |
| if (void 0 === $style$jscomp$1$$[$camelCase$jscomp$1$$]) { | |
| var $JSCompiler_inline_result$jscomp$243_JSCompiler_inline_result$jscomp$244$$ = $camelCase$jscomp$1$$.charAt(0).toUpperCase() + $camelCase$jscomp$1$$.slice(1); | |
| a: { | |
| for (var $JSCompiler_i$jscomp$inline_608$$ = 0; $JSCompiler_i$jscomp$inline_608$$ < $vendorPrefixes$$module$src$style$$.length; $JSCompiler_i$jscomp$inline_608$$++) { | |
| var $JSCompiler_propertyName$jscomp$inline_609$$ = $vendorPrefixes$$module$src$style$$[$JSCompiler_i$jscomp$inline_608$$] + $JSCompiler_inline_result$jscomp$243_JSCompiler_inline_result$jscomp$244$$; | |
| if (void 0 !== $style$jscomp$1$$[$JSCompiler_propertyName$jscomp$inline_609$$]) { | |
| $JSCompiler_inline_result$jscomp$243_JSCompiler_inline_result$jscomp$244$$ = $JSCompiler_propertyName$jscomp$inline_609$$; | |
| break a | |
| } | |
| } | |
| $JSCompiler_inline_result$jscomp$243_JSCompiler_inline_result$jscomp$244$$ = "" | |
| } | |
| var $prefixedPropertyName$$ = $JSCompiler_inline_result$jscomp$243_JSCompiler_inline_result$jscomp$244$$; | |
| void 0 !== $style$jscomp$1$$[$prefixedPropertyName$$] && ($propertyName$jscomp$10$$ = $prefixedPropertyName$$) | |
| } | |
| $opt_bypassCache$$ || | |
| ($propertyNameCache$$module$src$style$$[$camelCase$jscomp$1$$] = $propertyName$jscomp$10$$) | |
| } | |
| return $propertyName$jscomp$10$$ | |
| } | |
| function $setImportantStyles$$module$src$style$$($element$jscomp$35$$, $styles$$) { | |
| for (var $k$jscomp$6$$ in $styles$$) $element$jscomp$35$$.style.setProperty($getVendorJsPropertyName$$module$src$style$$($styles$$, $k$jscomp$6$$), $styles$$[$k$jscomp$6$$].toString(), "important") | |
| } | |
| function $setStyle$$module$src$style$$($element$jscomp$36$$, $property$jscomp$5_propertyName$jscomp$11$$, $value$jscomp$108$$, $opt_units$$) { | |
| ($property$jscomp$5_propertyName$jscomp$11$$ = $getVendorJsPropertyName$$module$src$style$$($element$jscomp$36$$.style, $property$jscomp$5_propertyName$jscomp$11$$, void 0)) && ($element$jscomp$36$$.style[$property$jscomp$5_propertyName$jscomp$11$$] = $opt_units$$ ? $value$jscomp$108$$ + $opt_units$$ : $value$jscomp$108$$) | |
| } | |
| function $getStyle$$module$src$style$$($element$jscomp$37$$) { | |
| var $propertyName$jscomp$12$$ = $getVendorJsPropertyName$$module$src$style$$($element$jscomp$37$$.style, "display", void 0); | |
| if ($propertyName$jscomp$12$$) return $element$jscomp$37$$.style[$propertyName$jscomp$12$$] | |
| } | |
| function $setStyles$$module$src$style$$($element$jscomp$38$$, $styles$jscomp$1$$) { | |
| for (var $k$jscomp$7$$ in $styles$jscomp$1$$) $setStyle$$module$src$style$$($element$jscomp$38$$, $k$jscomp$7$$, $styles$jscomp$1$$[$k$jscomp$7$$]) | |
| } | |
| function $toggle$$module$src$style$$($element$jscomp$39$$, $opt_display$$) { | |
| void 0 === $opt_display$$ && ($opt_display$$ = "none" == $getStyle$$module$src$style$$($element$jscomp$39$$)); | |
| $setStyle$$module$src$style$$($element$jscomp$39$$, "display", $opt_display$$ ? "" : "none") | |
| } | |
| function $computedStyle$$module$src$style$$($win$jscomp$74$$, $el$jscomp$6$$) { | |
| return $win$jscomp$74$$.getComputedStyle($el$jscomp$6$$) || $map$$module$src$utils$object$$() | |
| } | |
| function $resetStyles$$module$src$style$$($element$jscomp$40$$, $properties$$) { | |
| var $styleObj$$ = {}; | |
| $properties$$.forEach(function($element$jscomp$40$$) { | |
| $styleObj$$[$element$jscomp$40$$] = null | |
| }); | |
| $setStyles$$module$src$style$$($element$jscomp$40$$, $styleObj$$) | |
| }; | |
| var $SERVICES$$module$src$render_delaying_services$$ = { | |
| "amp-dynamic-css-classes": "[custom-element=amp-dynamic-css-classes]", | |
| variant: "amp-experiment", | |
| "amp-story": "amp-story[standalone]" | |
| }; | |
| function $waitForServices$$module$src$render_delaying_services$$($win$jscomp$75$$) { | |
| var $promises$jscomp$3$$ = $includedServices$$module$src$render_delaying_services$$($win$jscomp$75$$).map(function($promises$jscomp$3$$) { | |
| return $Services$$module$src$services$timerFor$$($win$jscomp$75$$).timeoutPromise(3E3, $getServicePromiseInternal$$module$src$service$$($win$jscomp$75$$, $promises$jscomp$3$$), "Render timeout waiting for service " + $promises$jscomp$3$$ + " to be ready.") | |
| }); | |
| return Promise.all($promises$jscomp$3$$) | |
| } | |
| function $includedServices$$module$src$render_delaying_services$$($win$jscomp$77$$) { | |
| var $doc$jscomp$7$$ = $win$jscomp$77$$.document; | |
| return Object.keys($SERVICES$$module$src$render_delaying_services$$).filter(function($win$jscomp$77$$) { | |
| return $doc$jscomp$7$$.querySelector($SERVICES$$module$src$render_delaying_services$$[$win$jscomp$77$$]) | |
| }) | |
| }; | |
| function $installStylesForDoc$$module$src$style_installer$$($ampdoc$jscomp$7$$, $cssText$$, $cb$jscomp$4$$, $opt_isRuntimeCss$$, $opt_ext$$) { | |
| var $cssRoot$$ = $ampdoc$jscomp$7$$.getHeadNode(), | |
| $style$jscomp$3$$ = $insertStyleElement$$module$src$style_installer$$($cssRoot$$, $maybeTransform$$module$src$style_installer$$($cssRoot$$, $cssText$$), $opt_isRuntimeCss$$ || !1, $opt_ext$$ || null); | |
| if ($cb$jscomp$4$$) { | |
| var $rootNode$jscomp$1$$ = $ampdoc$jscomp$7$$.getRootNode(); | |
| if ($styleLoaded$$module$src$style_installer$$($rootNode$jscomp$1$$, | |
| $style$jscomp$3$$)) $cb$jscomp$4$$($style$jscomp$3$$); | |
| else var $interval$jscomp$1$$ = setInterval(function() { | |
| $styleLoaded$$module$src$style_installer$$($rootNode$jscomp$1$$, $style$jscomp$3$$) && (clearInterval($interval$jscomp$1$$), $cb$jscomp$4$$($style$jscomp$3$$)) | |
| }, 4) | |
| } | |
| } | |
| function $installStylesLegacy$$module$src$style_installer$$($doc$jscomp$8$$, $cssText$jscomp$1$$, $cb$jscomp$5$$, $opt_isRuntimeCss$jscomp$1$$, $opt_ext$jscomp$1$$) { | |
| var $style$jscomp$4$$ = $insertStyleElement$$module$src$style_installer$$($doc$jscomp$8$$.head, $cssText$jscomp$1$$, $opt_isRuntimeCss$jscomp$1$$ || !1, $opt_ext$jscomp$1$$ || null); | |
| if ($cb$jscomp$5$$) if ($styleLoaded$$module$src$style_installer$$($doc$jscomp$8$$, $style$jscomp$4$$)) $cb$jscomp$5$$($style$jscomp$4$$); | |
| else var $interval$jscomp$2$$ = setInterval(function() { | |
| $styleLoaded$$module$src$style_installer$$($doc$jscomp$8$$, | |
| $style$jscomp$4$$) && (clearInterval($interval$jscomp$2$$), $cb$jscomp$5$$($style$jscomp$4$$)) | |
| }, 4) | |
| } | |
| function $insertStyleElement$$module$src$style_installer$$($cssRoot$jscomp$1$$, $JSCompiler_after$jscomp$inline_613_cssText$jscomp$2$$, $isRuntimeCss$$, $ext$$) { | |
| var $styleMap$$ = $cssRoot$jscomp$1$$.__AMP_CSS_SM; | |
| $styleMap$$ || ($styleMap$$ = $cssRoot$jscomp$1$$.__AMP_CSS_SM = $map$$module$src$utils$object$$()); | |
| var $isExtCss$$ = !$isRuntimeCss$$ && $ext$$ && "amp-custom" != $ext$$ && "amp-keyframes" != $ext$$, | |
| $key$jscomp$47$$ = $isRuntimeCss$$ ? "amp-runtime" : $isExtCss$$ ? "amp-extension=" + $ext$$ : null; | |
| if ($key$jscomp$47$$) { | |
| var $existing$$ = | |
| $getExistingStyleElement$$module$src$style_installer$$($cssRoot$jscomp$1$$, $styleMap$$, $key$jscomp$47$$); | |
| if ($existing$$) return $existing$$ | |
| } | |
| var $style$jscomp$5$$ = ($cssRoot$jscomp$1$$.ownerDocument || $cssRoot$jscomp$1$$).createElement("style"); | |
| $style$jscomp$5$$.textContent = $JSCompiler_after$jscomp$inline_613_cssText$jscomp$2$$; | |
| var $afterElement$$ = null; | |
| $isRuntimeCss$$ ? $style$jscomp$5$$.setAttribute("amp-runtime", "") : $isExtCss$$ ? ($style$jscomp$5$$.setAttribute("amp-extension", $ext$$ || ""), $afterElement$$ = | |
| $getExistingStyleElement$$module$src$style_installer$$($cssRoot$jscomp$1$$, $styleMap$$, "amp-runtime")) : ($ext$$ && $style$jscomp$5$$.setAttribute($ext$$, ""), $afterElement$$ = $cssRoot$jscomp$1$$.lastChild); | |
| ($JSCompiler_after$jscomp$inline_613_cssText$jscomp$2$$ = $afterElement$$) ? $JSCompiler_after$jscomp$inline_613_cssText$jscomp$2$$.nextSibling ? $cssRoot$jscomp$1$$.insertBefore($style$jscomp$5$$, $JSCompiler_after$jscomp$inline_613_cssText$jscomp$2$$.nextSibling) : $cssRoot$jscomp$1$$.appendChild($style$jscomp$5$$) : | |
| $cssRoot$jscomp$1$$.insertBefore($style$jscomp$5$$, $cssRoot$jscomp$1$$.firstChild); | |
| $key$jscomp$47$$ && ($styleMap$$[$key$jscomp$47$$] = $style$jscomp$5$$); | |
| return $style$jscomp$5$$ | |
| } | |
| function $getExistingStyleElement$$module$src$style_installer$$($cssRoot$jscomp$2_existing$jscomp$1$$, $styleMap$jscomp$1$$, $key$jscomp$48$$) { | |
| return $styleMap$jscomp$1$$[$key$jscomp$48$$] ? $styleMap$jscomp$1$$[$key$jscomp$48$$] : ($cssRoot$jscomp$2_existing$jscomp$1$$ = $cssRoot$jscomp$2_existing$jscomp$1$$.querySelector("style[" + $key$jscomp$48$$ + "]")) ? $styleMap$jscomp$1$$[$key$jscomp$48$$] = $cssRoot$jscomp$2_existing$jscomp$1$$ : null | |
| } | |
| function $installCssTransformer$$module$src$style_installer$$($cssRoot$jscomp$3$$, $transformer$$) { | |
| $cssRoot$jscomp$3$$.__AMP_CSS_TR = $transformer$$ | |
| } | |
| function $maybeTransform$$module$src$style_installer$$($cssRoot$jscomp$4_transformer$jscomp$1$$, $cssText$jscomp$3$$) { | |
| return ($cssRoot$jscomp$4_transformer$jscomp$1$$ = $cssRoot$jscomp$4_transformer$jscomp$1$$.__AMP_CSS_TR) ? $cssRoot$jscomp$4_transformer$jscomp$1$$($cssText$jscomp$3$$) : $cssText$jscomp$3$$ | |
| } | |
| function $makeBodyVisible$$module$src$style_installer$$($doc$jscomp$10$$, $opt_waitForServices$$) { | |
| var $win$jscomp$78$$ = $doc$jscomp$10$$.defaultView; | |
| if (!$win$jscomp$78$$.__AMP_BODY_VISIBLE) { | |
| var $set$jscomp$1$$ = function() { | |
| $win$jscomp$78$$.__AMP_BODY_VISIBLE = !0; | |
| $setStyles$$module$src$style$$($doc$jscomp$10$$.body, { | |
| opacity: 1, | |
| visibility: "visible", | |
| animation: "none" | |
| }); | |
| try { | |
| $Services$$module$src$services$resourcesForDoc$$($doc$jscomp$10$$).renderStarted() | |
| } catch ($JSCompiler_e$jscomp$inline_616$$) {} | |
| }; | |
| try { | |
| $waitForBody$$module$src$dom$$($doc$jscomp$10$$, function() { | |
| $win$jscomp$78$$.__AMP_BODY_VISIBLE || ($win$jscomp$78$$.__AMP_BODY_VISIBLE = !0, $opt_waitForServices$$ ? $waitForServices$$module$src$render_delaying_services$$($win$jscomp$78$$). | |
| catch (function($doc$jscomp$10$$) { | |
| $rethrowAsync$$module$src$log$$($doc$jscomp$10$$); | |
| return [] | |
| }).then(function($opt_waitForServices$$) { | |
| $set$jscomp$1$$(); | |
| 0 < $opt_waitForServices$$.length && $Services$$module$src$services$resourcesForDoc$$($doc$jscomp$10$$).schedulePass(1, !0); | |
| try { | |
| var $services$jscomp$6$$ = $getService$$module$src$service$$($win$jscomp$78$$, | |
| "performance"); | |
| $services$jscomp$6$$.tick("mbv"); | |
| $services$jscomp$6$$.flush() | |
| } catch ($e$jscomp$34$$) {} | |
| }) : $set$jscomp$1$$()) | |
| }) | |
| } catch ($e$jscomp$35$$) { | |
| $set$jscomp$1$$(), $rethrowAsync$$module$src$log$$($e$jscomp$35$$) | |
| } | |
| } | |
| } | |
| function $bodyAlwaysVisible$$module$src$style_installer$$($win$jscomp$79$$) { | |
| $win$jscomp$79$$.__AMP_BODY_VISIBLE = !0 | |
| } | |
| function $styleLoaded$$module$src$style_installer$$($doc$jscomp$12_i$jscomp$48$$, $style$jscomp$6$$) { | |
| var $sheets$$ = $doc$jscomp$12_i$jscomp$48$$.styleSheets; | |
| for ($doc$jscomp$12_i$jscomp$48$$ = 0; $doc$jscomp$12_i$jscomp$48$$ < $sheets$$.length; $doc$jscomp$12_i$jscomp$48$$++) { | |
| var $sheet$$ = $sheets$$[$doc$jscomp$12_i$jscomp$48$$]; | |
| if ($sheet$$.ownerNode == $style$jscomp$6$$) return !0 | |
| } | |
| return !1 | |
| }; | |
| function $triggerAnalyticsEvent$$module$src$analytics$$($target$jscomp$64$$, $eventType$jscomp$7$$, $opt_vars$$) { | |
| $Services$$module$src$services$analyticsForDocOrNull$$($target$jscomp$64$$).then(function($analytics$$) { | |
| $analytics$$ && $analytics$$.triggerEventForTarget($target$jscomp$64$$, $eventType$jscomp$7$$, $opt_vars$$) | |
| }) | |
| }; | |
| var $accumulatedErrorMessages$$module$src$error$$ = self.AMPErrors || []; | |
| self.AMPErrors = $accumulatedErrorMessages$$module$src$error$$; | |
| function $reportingBackoff$$module$src$error$$($work$jscomp$2$$) { | |
| $reportingBackoff$$module$src$error$$ = $exponentialBackoff$$module$src$exponential_backoff$$(); | |
| return $reportingBackoff$$module$src$error$$($work$jscomp$2$$) | |
| } | |
| function $tryJsonStringify$$module$src$error$$($value$jscomp$112$$) { | |
| try { | |
| return JSON.stringify($value$jscomp$112$$) | |
| } catch ($e$jscomp$37$$) { | |
| return String($value$jscomp$112$$) | |
| } | |
| } | |
| var $detectedJsEngine$$module$src$error$$; | |
| function $reportError$$module$src$error$$($error$jscomp$13$$, $opt_associatedElement$jscomp$1$$) { | |
| try { | |
| if ($error$jscomp$13$$) if (void 0 !== $error$jscomp$13$$.message) $error$jscomp$13$$ = $duplicateErrorIfNecessary$$module$src$log$$($error$jscomp$13$$); | |
| else { | |
| var $origError$$ = $error$jscomp$13$$; | |
| $error$jscomp$13$$ = Error($tryJsonStringify$$module$src$error$$($origError$$)); | |
| $error$jscomp$13$$.origError = $origError$$ | |
| } else $error$jscomp$13$$ = Error("Unknown error"); | |
| if ($error$jscomp$13$$.reported) return $error$jscomp$13$$; | |
| $error$jscomp$13$$.reported = !0; | |
| var $element$jscomp$41$$ = $opt_associatedElement$jscomp$1$$ || $error$jscomp$13$$.associatedElement; | |
| $element$jscomp$41$$ && $element$jscomp$41$$.classList && ($element$jscomp$41$$.classList.add("i-amphtml-error"), $getMode$$module$src$mode$$().development && ($element$jscomp$41$$.classList.add("i-amphtml-element-error"), $element$jscomp$41$$.setAttribute("error-message", $error$jscomp$13$$.message))); | |
| if (self.console) { | |
| var $output$jscomp$3$$ = console.error || console.log; | |
| $error$jscomp$13$$.messageArray ? | |
| $output$jscomp$3$$.apply(console, $error$jscomp$13$$.messageArray) : $element$jscomp$41$$ ? $output$jscomp$3$$.call(console, $error$jscomp$13$$.message, $element$jscomp$41$$) : $output$jscomp$3$$.call(console, $error$jscomp$13$$.message) | |
| } | |
| $element$jscomp$41$$ && $element$jscomp$41$$.$dispatchCustomEventForTesting$ && $element$jscomp$41$$.$dispatchCustomEventForTesting$("amp:error", $error$jscomp$13$$.message); | |
| $reportErrorToServer$$module$src$error$$.call(void 0, void 0, void 0, void 0, void 0, $error$jscomp$13$$) | |
| } catch ($errorReportingError$$) { | |
| setTimeout(function() { | |
| throw $errorReportingError$$; | |
| }) | |
| } | |
| return $error$jscomp$13$$ | |
| } | |
| function $installErrorReporting$$module$src$error$$() { | |
| var $win$jscomp$81$$ = self; | |
| $win$jscomp$81$$.onerror = $reportErrorToServer$$module$src$error$$; | |
| $win$jscomp$81$$.addEventListener("unhandledrejection", function($win$jscomp$81$$) { | |
| $win$jscomp$81$$.reason && "CANCELLED" === $win$jscomp$81$$.reason.message ? $win$jscomp$81$$.preventDefault() : $reportError$$module$src$error$$($win$jscomp$81$$.reason || Error("rejected promise " + $win$jscomp$81$$)) | |
| }) | |
| } | |
| function $reportErrorToServer$$module$src$error$$($message$jscomp$29$$, $filename$$, $line$$, $col$$, $error$jscomp$14$$) { | |
| this && this.document && $makeBodyVisible$$module$src$style_installer$$(this.document); | |
| if (!$getMode$$module$src$mode$$().development) { | |
| var $hasNonAmpJs$$ = !1; | |
| try { | |
| $hasNonAmpJs$$ = $detectNonAmpJs$$module$src$error$$() | |
| } catch ($ignore$jscomp$1$$) {} | |
| if (!($hasNonAmpJs$$ && .01 < Math.random())) { | |
| var $data$jscomp$45$$ = $getErrorReportData$$module$src$error$$($message$jscomp$29$$, $filename$$, $line$$, $col$$, | |
| $error$jscomp$14$$, $hasNonAmpJs$$); | |
| $data$jscomp$45$$ && $reportingBackoff$$module$src$error$$(function() { | |
| var $message$jscomp$29$$ = new XMLHttpRequest; | |
| $message$jscomp$29$$.open("POST", $module$src$config$$.urls.errorReporting, !0); | |
| $message$jscomp$29$$.send(JSON.stringify($data$jscomp$45$$)) | |
| }) | |
| } | |
| } | |
| } | |
| function $getErrorReportData$$module$src$error$$($message$jscomp$30$$, $filename$jscomp$1$$, $line$jscomp$1$$, $col$jscomp$1$$, $error$jscomp$15$$, $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$) { | |
| var $expected$$ = !1; | |
| $error$jscomp$15$$ && ($message$jscomp$30$$ = $error$jscomp$15$$.message ? $error$jscomp$15$$.message : String($error$jscomp$15$$), $error$jscomp$15$$.expected && ($expected$$ = !0)); | |
| $message$jscomp$30$$ || ($message$jscomp$30$$ = "Unknown error"); | |
| if (!/_reported_/.test($message$jscomp$30$$) && | |
| "CANCELLED" != $message$jscomp$30$$) { | |
| var $throttleBase$$ = Math.random(); | |
| if (-1 != $message$jscomp$30$$.indexOf("Failed to load:") || "Script error." == $message$jscomp$30$$) if ($expected$$ = !0, .001 < $throttleBase$$) return; | |
| var $isUserError$$ = $isUserErrorMessage$$module$src$log$$($message$jscomp$30$$); | |
| if (!($isUserError$$ && .1 < $throttleBase$$)) { | |
| var $data$jscomp$46$$ = Object.create(null); | |
| $data$jscomp$46$$.v = $getMode$$module$src$mode$$().rtvVersion; | |
| $data$jscomp$46$$.noAmp = $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$ ? | |
| "1" : "0"; | |
| $data$jscomp$46$$.m = $message$jscomp$30$$.replace("\u200b\u200b\u200b", ""); | |
| $data$jscomp$46$$.a = $isUserError$$ ? "1" : "0"; | |
| $data$jscomp$46$$.ex = $expected$$ ? "1" : "0"; | |
| var $runtime$$ = "1p"; | |
| self.context && self.context.location ? ($data$jscomp$46$$["3p"] = "1", $runtime$$ = "3p") : $getMode$$module$src$mode$$().runtime && ($runtime$$ = $getMode$$module$src$mode$$().runtime); | |
| $data$jscomp$46$$.rt = $runtime$$; | |
| $data$jscomp$46$$.ca = $isCanary$$module$src$experiments$$(self) ? "1" : "0"; | |
| $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$ = | |
| self; | |
| $data$jscomp$46$$.bt = $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$.AMP_CONFIG && $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$.AMP_CONFIG.type ? $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$.AMP_CONFIG.type : "unknown"; | |
| self.location.ancestorOrigins && self.location.ancestorOrigins[0] && ($data$jscomp$46$$.or = self.location.ancestorOrigins[0]); | |
| self.viewerState && ($data$jscomp$46$$.vs = | |
| self.viewerState); | |
| self.parent && self.parent != self && ($data$jscomp$46$$.iem = "1"); | |
| if (self.AMP && self.AMP.viewer) { | |
| var $resolvedViewerUrl$$ = self.AMP.viewer.getResolvedViewerUrl(), | |
| $messagingOrigin$$ = self.AMP.viewer.maybeGetMessagingOrigin(); | |
| $resolvedViewerUrl$$ && ($data$jscomp$46$$.rvu = $resolvedViewerUrl$$); | |
| $messagingOrigin$$ && ($data$jscomp$46$$.mso = $messagingOrigin$$) | |
| } | |
| $detectedJsEngine$$module$src$error$$ || ($detectedJsEngine$$module$src$error$$ = $detectJsEngineFromStack$$module$src$error$$()); | |
| $data$jscomp$46$$.jse = | |
| $detectedJsEngine$$module$src$error$$; | |
| var $exps$$ = []; | |
| $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$ = self.__AMP__EXPERIMENT_TOGGLES || null; | |
| for (var $exp$$ in $JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$) $exps$$.push($exp$$ + "=" + ($JSCompiler_inline_result$jscomp$240_JSCompiler_win$jscomp$inline_618_hasNonAmpJs$jscomp$1$$[$exp$$] ? "1" : "0")); | |
| $data$jscomp$46$$.exps = $exps$$.join(","); | |
| $error$jscomp$15$$ ? ($data$jscomp$46$$.el = | |
| $error$jscomp$15$$ && $error$jscomp$15$$.associatedElement ? $error$jscomp$15$$.associatedElement.tagName : "u", $error$jscomp$15$$.args && ($data$jscomp$46$$.args = JSON.stringify($error$jscomp$15$$.args)), $isUserError$$ || $error$jscomp$15$$.ignoreStack || !$error$jscomp$15$$.stack || ($data$jscomp$46$$.s = $error$jscomp$15$$.stack), $error$jscomp$15$$.message += " _reported_") : ($data$jscomp$46$$.f = $filename$jscomp$1$$ || "", $data$jscomp$46$$.l = $line$jscomp$1$$ || "", $data$jscomp$46$$.c = $col$jscomp$1$$ || ""); | |
| $data$jscomp$46$$.r = | |
| self.document.referrer; | |
| $data$jscomp$46$$.ae = $accumulatedErrorMessages$$module$src$error$$.join(","); | |
| $data$jscomp$46$$.fr = self.location.originalHash || self.location.hash; | |
| $accumulatedErrorMessages$$module$src$error$$.push($message$jscomp$30$$); | |
| return $data$jscomp$46$$ | |
| } | |
| } | |
| } | |
| function $detectNonAmpJs$$module$src$error$$() { | |
| for (var $scripts$$ = self.document.querySelectorAll("script[src]"), $i$jscomp$49$$ = 0; $i$jscomp$49$$ < $scripts$$.length; $i$jscomp$49$$++) if (!$isProxyOrigin$$module$src$url$$($scripts$$[$i$jscomp$49$$].src.toLowerCase())) return !0; | |
| return !1 | |
| } | |
| function $detectJsEngineFromStack$$module$src$error$$() { | |
| function $Fn$$() {} | |
| $Fn$$.prototype.t = function() { | |
| throw Error("message"); | |
| }; | |
| var $object$jscomp$1$$ = new $Fn$$; | |
| try { | |
| $object$jscomp$1$$.t() | |
| } catch ($e$jscomp$38$$) { | |
| var $stack$$ = $e$jscomp$38$$.stack; | |
| if ($startsWith$$module$src$string$$($stack$$, "t@")) return "Safari"; | |
| if (-1 < $stack$$.indexOf(".prototype.t@")) return "Firefox"; | |
| var $last$$ = $stack$$.split("\n").pop(); | |
| if (/\bat .* \(/i.test($last$$)) return "IE"; | |
| if ($startsWith$$module$src$string$$($stack$$, "Error: message")) return "Chrome" | |
| } | |
| return "unknown" | |
| } | |
| function $reportErrorToAnalytics$$module$src$error$$($JSCompiler_root$jscomp$inline_623_error$jscomp$16$$, $win$jscomp$83$$) { | |
| if ($isExperimentOn$$module$src$experiments$$($win$jscomp$83$$, "user-error-reporting")) { | |
| var $vars$$ = { | |
| errorName: $JSCompiler_root$jscomp$inline_623_error$jscomp$16$$.name, | |
| errorMessage: $JSCompiler_root$jscomp$inline_623_error$jscomp$16$$.message | |
| }; | |
| $JSCompiler_root$jscomp$inline_623_error$jscomp$16$$ = $Services$$module$src$services$ampdocServiceFor$$($win$jscomp$83$$).getAmpDoc().getRootNode(); | |
| $triggerAnalyticsEvent$$module$src$analytics$$($JSCompiler_root$jscomp$inline_623_error$jscomp$16$$.documentElement || $JSCompiler_root$jscomp$inline_623_error$jscomp$16$$.body || $JSCompiler_root$jscomp$inline_623_error$jscomp$16$$, "user-error", $vars$$) | |
| } | |
| }; | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| (function($win$jscomp$17$$) { | |
| $win$jscomp$17$$.document.documentElement.addEventListener("click", $handleClick$$module$ads$alp$handler$$); | |
| $win$jscomp$17$$.document.documentElement.addEventListener("touchstart", $warmupDynamic$$module$ads$alp$handler$$) | |
| })(window); | |
| (function($win$jscomp$20$$) { | |
| (new $win$jscomp$20$$.Image).src = $module$src$config$$.urls.cdn + "/preconnect.gif"; | |
| var $linkRel$$ = document.createElement("link"); | |
| $linkRel$$.rel = "preload"; | |
| $linkRel$$.setAttribute("as", "script"); | |
| $linkRel$$.href = $module$src$config$$.urls.cdn + "/v0.js"; | |
| $getHeadOrFallback$$module$ads$alp$handler$$($win$jscomp$20$$.document).appendChild($linkRel$$) | |
| })(window); | |
| function $getAdCid$$module$src$ad_cid$$($adElement$$) { | |
| var $config$jscomp$5$$ = $adConfig$$module$ads$_config$$[$adElement$$.element.getAttribute("type")]; | |
| return $config$jscomp$5$$ && $config$jscomp$5$$.clientIdScope ? $getOrCreateAdCid$$module$src$ad_cid$$($adElement$$.getAmpDoc(), $config$jscomp$5$$.clientIdScope, $config$jscomp$5$$.clientIdCookieName) : Promise.resolve() | |
| } | |
| function $getOrCreateAdCid$$module$src$ad_cid$$($ampDoc$$, $clientIdScope$$, $opt_clientIdCookieName$$) { | |
| var $cidPromise$$ = $getServicePromiseForDoc$$module$src$service$$($ampDoc$$, "cid").then(function($ampDoc$$) { | |
| if ($ampDoc$$) return $ampDoc$$.get({ | |
| scope: $clientIdScope$$, | |
| createCookieIfNotPresent: !0, | |
| cookieName: $opt_clientIdCookieName$$ | |
| }, Promise.resolve(void 0)). | |
| catch (function($ampDoc$$) { | |
| $dev$$module$src$log$$().error("AD-CID", $ampDoc$$) | |
| }) | |
| }); | |
| return $Services$$module$src$services$timerFor$$($ampDoc$$.win).timeoutPromise(1E3, | |
| $cidPromise$$, "cid timeout"). | |
| catch (function($ampDoc$$) { | |
| $dev$$module$src$log$$().warn("AD-CID", $ampDoc$$) | |
| }) | |
| }; | |
| function $indexWithinParent$$module$src$utils$dom_fingerprint$$($element$jscomp$44$$) { | |
| for (var $nodeName$jscomp$3$$ = $element$jscomp$44$$.nodeName, $i$jscomp$51$$ = 0, $count$jscomp$15$$ = 0, $sibling$$ = $element$jscomp$44$$.previousElementSibling; $sibling$$ && 25 > $count$jscomp$15$$ && 100 > $i$jscomp$51$$;) $sibling$$.nodeName == $nodeName$jscomp$3$$ && $count$jscomp$15$$++, $i$jscomp$51$$++, $sibling$$ = $sibling$$.previousElementSibling; | |
| return 25 > $count$jscomp$15$$ && 100 > $i$jscomp$51$$ ? "." + $count$jscomp$15$$ : "" | |
| }; | |
| function $getCorrelator$$module$ads$google$a4a$utils$$($win$jscomp$96$$, $opt_cid$$, $opt_nodeOrDoc$$) { | |
| if (!$win$jscomp$96$$.ampAdPageCorrelator) { | |
| var $JSCompiler_clientId$jscomp$inline_2405_JSCompiler_inline_result$jscomp$2357$$ = $opt_cid$$; | |
| var $JSCompiler_pageViewId$jscomp$inline_2406_JSCompiler_pageViewIdNumeric$jscomp$inline_2407$$ = $Services$$module$src$services$documentInfoForDoc$$($opt_nodeOrDoc$$ || $win$jscomp$96$$.document).pageViewId; | |
| $JSCompiler_pageViewId$jscomp$inline_2406_JSCompiler_pageViewIdNumeric$jscomp$inline_2407$$ = | |
| Number($JSCompiler_pageViewId$jscomp$inline_2406_JSCompiler_pageViewIdNumeric$jscomp$inline_2407$$ || 0); | |
| $JSCompiler_clientId$jscomp$inline_2405_JSCompiler_inline_result$jscomp$2357$$ = $JSCompiler_clientId$jscomp$inline_2405_JSCompiler_inline_result$jscomp$2357$$ ? $JSCompiler_pageViewId$jscomp$inline_2406_JSCompiler_pageViewIdNumeric$jscomp$inline_2407$$ + $JSCompiler_clientId$jscomp$inline_2405_JSCompiler_inline_result$jscomp$2357$$.replace(/\D/g, "") % 1E6 * 1E6 : Math.floor(4503599627370496 * Math.random()); | |
| $win$jscomp$96$$.ampAdPageCorrelator = $JSCompiler_clientId$jscomp$inline_2405_JSCompiler_inline_result$jscomp$2357$$ | |
| } | |
| return $win$jscomp$96$$.ampAdPageCorrelator | |
| } | |
| function $mergeExperimentIds$$module$ads$google$a4a$utils$$($newIds$$, $currentIdString$$) { | |
| var $newIdString$$ = $newIds$$.filter(function($newIds$$) { | |
| return Number($newIds$$) | |
| }).join(","); | |
| $currentIdString$$ = $currentIdString$$ || ""; | |
| return $currentIdString$$ + ($currentIdString$$ && $newIdString$$ ? "," : "") + $newIdString$$ | |
| }; | |
| var $base64UrlDecodeSubs$$module$src$utils$base64$$ = { | |
| "-": "+", | |
| _: "/", | |
| ".": "=" | |
| }, $base64UrlEncodeSubs$$module$src$utils$base64$$ = { | |
| "+": "-", | |
| "/": "_", | |
| "=": "." | |
| }; | |
| function $base64UrlDecodeToBytes$$module$src$utils$base64$$($str$jscomp$8$$) { | |
| var $encoded$$ = atob($str$jscomp$8$$.replace(/[-_.]/g, function($str$jscomp$8$$) { | |
| return $base64UrlDecodeSubs$$module$src$utils$base64$$[$str$jscomp$8$$] | |
| })); | |
| return $stringToBytes$$module$src$utils$bytes$$($encoded$$) | |
| } | |
| function $base64UrlEncodeFromBytes$$module$src$utils$base64$$($bytes$jscomp$6_str$jscomp$10$$) { | |
| $bytes$jscomp$6_str$jscomp$10$$ = $bytesToString$$module$src$utils$bytes$$($bytes$jscomp$6_str$jscomp$10$$); | |
| return btoa($bytes$jscomp$6_str$jscomp$10$$).replace(/[+/=]/g, function($bytes$jscomp$6_str$jscomp$10$$) { | |
| return $base64UrlEncodeSubs$$module$src$utils$base64$$[$bytes$jscomp$6_str$jscomp$10$$] | |
| }) | |
| }; | |
| var $Layout$$module$src$layout$$ = { | |
| NODISPLAY: "nodisplay", | |
| FIXED: "fixed", | |
| FIXED_HEIGHT: "fixed-height", | |
| RESPONSIVE: "responsive", | |
| CONTAINER: "container", | |
| FILL: "fill", | |
| FLEX_ITEM: "flex-item", | |
| FLUID: "fluid" | |
| }, $naturalDimensions_$$module$src$layout$$ = { | |
| "AMP-PIXEL": { | |
| width: "0px", | |
| height: "0px" | |
| }, | |
| "AMP-ANALYTICS": { | |
| width: "1px", | |
| height: "1px" | |
| }, | |
| "AMP-AUDIO": null, | |
| "AMP-SOCIAL-SHARE": { | |
| width: "60px", | |
| height: "44px" | |
| } | |
| }, $LOADING_ELEMENTS_$$module$src$layout$$ = { | |
| "AMP-ANIM": !0, | |
| "AMP-BRIGHTCOVE": !0, | |
| "AMP-EMBED": !0, | |
| "AMP-IFRAME": !0, | |
| "AMP-IMG": !0, | |
| "AMP-INSTAGRAM": !0, | |
| "AMP-LIST": !0, | |
| "AMP-OOYALA-PLAYER": !0, | |
| "AMP-PINTEREST": !0, | |
| "AMP-PLAYBUZZ": !0, | |
| "AMP-VIDEO": !0, | |
| "AMP-YOUTUBE": !0 | |
| }; | |
| function $parseLayout$$module$src$layout$$($s$jscomp$12$$) { | |
| for (var $k$jscomp$8$$ in $Layout$$module$src$layout$$) if ($Layout$$module$src$layout$$[$k$jscomp$8$$] == $s$jscomp$12$$) return $Layout$$module$src$layout$$[$k$jscomp$8$$] | |
| } | |
| function $isLayoutSizeDefined$$module$src$layout$$($layout$jscomp$1$$) { | |
| return "fixed" == $layout$jscomp$1$$ || "fixed-height" == $layout$jscomp$1$$ || "responsive" == $layout$jscomp$1$$ || "fill" == $layout$jscomp$1$$ || "flex-item" == $layout$jscomp$1$$ || "fluid" == $layout$jscomp$1$$ | |
| } | |
| function $parseLength$$module$src$layout$$($s$jscomp$13$$) { | |
| if ("number" == typeof $s$jscomp$13$$) return $s$jscomp$13$$ + "px"; | |
| if ($s$jscomp$13$$ && /^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)?$/.test($s$jscomp$13$$)) return /^\d+(\.\d+)?$/.test($s$jscomp$13$$) ? $s$jscomp$13$$ + "px" : $s$jscomp$13$$ | |
| } | |
| function $assertLength$$module$src$layout$$($length$jscomp$29$$) { | |
| $user$$module$src$log$$().assert(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)$/.test($length$jscomp$29$$), "Invalid length value: %s", $length$jscomp$29$$); | |
| return $length$jscomp$29$$ | |
| } | |
| function $assertLengthOrPercent$$module$src$layout$$($length$jscomp$30$$) { | |
| $user$$module$src$log$$().assert(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|%)$/.test($length$jscomp$30$$), "Invalid length or percent value: %s", $length$jscomp$30$$); | |
| return $length$jscomp$30$$ | |
| } | |
| function $getLengthUnits$$module$src$layout$$($length$jscomp$31$$) { | |
| $assertLength$$module$src$layout$$($length$jscomp$31$$); | |
| return $user$$module$src$log$$().assert($length$jscomp$31$$.match(/[a-z]+/i), "Failed to read units from %s", $length$jscomp$31$$)[0] | |
| } | |
| function $getLengthNumeral$$module$src$layout$$($length$jscomp$32_res$jscomp$2$$) { | |
| $length$jscomp$32_res$jscomp$2$$ = parseFloat($length$jscomp$32_res$jscomp$2$$); | |
| return $isFiniteNumber$$module$src$types$$($length$jscomp$32_res$jscomp$2$$) ? $length$jscomp$32_res$jscomp$2$$ : void 0 | |
| } | |
| function $applyNoDisplayLayout$$module$src$layout$$($element$jscomp$49$$) { | |
| $setStyle$$module$src$style$$($element$jscomp$49$$, "display", "none"); | |
| $element$jscomp$49$$.classList.add("i-amphtml-display") | |
| }; | |
| var $CONTAINERS$$module$src$ad_helper$$ = { | |
| "AMP-FX-FLYING-CARPET": !0, | |
| "AMP-LIGHTBOX": !0, | |
| "AMP-STICKY-AD": !0 | |
| }; | |
| function $isAdPositionAllowed$$module$src$ad_helper$$($el$jscomp$9_element$jscomp$50$$, $win$jscomp$105$$) { | |
| var $hasFixedAncestor$$ = !1, | |
| $containers$$ = 0; | |
| do { | |
| if ($CONTAINERS$$module$src$ad_helper$$[$el$jscomp$9_element$jscomp$50$$.tagName]) $containers$$++, $hasFixedAncestor$$ = !1; | |
| else { | |
| var $JSCompiler_position$jscomp$inline_649$$ = $computedStyle$$module$src$style$$($win$jscomp$105$$, $el$jscomp$9_element$jscomp$50$$).position; | |
| "fixed" != $JSCompiler_position$jscomp$inline_649$$ && "sticky" != $JSCompiler_position$jscomp$inline_649$$ || | |
| ($hasFixedAncestor$$ = !0) | |
| } | |
| $el$jscomp$9_element$jscomp$50$$ = $el$jscomp$9_element$jscomp$50$$.parentElement | |
| } while ($el$jscomp$9_element$jscomp$50$$ && "BODY" != $el$jscomp$9_element$jscomp$50$$.tagName); | |
| return !$hasFixedAncestor$$ && 1 >= $containers$$ | |
| } | |
| function $getAdContainer$$module$src$ad_helper$$($element$jscomp$51$$) { | |
| if (void 0 === $element$jscomp$51$$.__AMP__AD_CONTAINER) { | |
| var $el$jscomp$10$$ = $element$jscomp$51$$; | |
| do if ($el$jscomp$10$$ = $el$jscomp$10$$.parentElement, $CONTAINERS$$module$src$ad_helper$$[$el$jscomp$10$$.tagName]) return $element$jscomp$51$$.__AMP__AD_CONTAINER = $el$jscomp$10$$.tagName; while ($el$jscomp$10$$ && "BODY" != $el$jscomp$10$$.tagName); | |
| $element$jscomp$51$$.__AMP__AD_CONTAINER = null | |
| } | |
| return $element$jscomp$51$$.__AMP__AD_CONTAINER | |
| } | |
| function $getAmpAdResourceId$$module$src$ad_helper$$($node$jscomp$24$$, $topWin$jscomp$4$$) { | |
| try { | |
| var $frameParent$$ = $getParentWindowFrameElement$$module$src$service$$($node$jscomp$24$$, $topWin$jscomp$4$$).parentElement; | |
| if ("AMP-AD" == $frameParent$$.nodeName) return String($frameParent$$.getResourceId()) | |
| } catch ($e$jscomp$42$$) {} | |
| return null | |
| }; | |
| function $getTimingDataAsync$$module$src$service$variable_source$$($win$jscomp$106$$, $startEvent$$, $endEvent$$) { | |
| var $metric$$ = $getTimingDataSync$$module$src$service$variable_source$$($win$jscomp$106$$, $startEvent$$, $endEvent$$); | |
| return "" === $metric$$ ? $loadPromise$$module$src$event_helper$$($win$jscomp$106$$).then(function() { | |
| return $getTimingDataSync$$module$src$service$variable_source$$($win$jscomp$106$$, $startEvent$$, $endEvent$$) | |
| }) : Promise.resolve($metric$$) | |
| } | |
| function $getTimingDataSync$$module$src$service$variable_source$$($metric$jscomp$1_win$jscomp$107$$, $startEvent$jscomp$1$$, $endEvent$jscomp$1$$) { | |
| var $timingInfo$$ = $metric$jscomp$1_win$jscomp$107$$.performance && $metric$jscomp$1_win$jscomp$107$$.performance.timing; | |
| if ($timingInfo$$ && 0 != $timingInfo$$.navigationStart && ($metric$jscomp$1_win$jscomp$107$$ = void 0 === $endEvent$jscomp$1$$ ? $timingInfo$$[$startEvent$jscomp$1$$] : $timingInfo$$[$endEvent$jscomp$1$$] - $timingInfo$$[$startEvent$jscomp$1$$], $isFiniteNumber$$module$src$types$$($metric$jscomp$1_win$jscomp$107$$))) return 0 > | |
| $metric$jscomp$1_win$jscomp$107$$ ? "" : $metric$jscomp$1_win$jscomp$107$$ | |
| } | |
| function $getNavigationData$$module$src$service$variable_source$$($win$jscomp$108$$, $attribute$jscomp$1$$) { | |
| var $navigationInfo$$ = $win$jscomp$108$$.performance && $win$jscomp$108$$.performance.navigation; | |
| if ($navigationInfo$$ && void 0 !== $navigationInfo$$[$attribute$jscomp$1$$]) return $navigationInfo$$[$attribute$jscomp$1$$] | |
| } | |
| function $VariableSource$$module$src$service$variable_source$$() { | |
| this.$replacementExpr_$ = void 0; | |
| this.$replacements_$ = Object.create(null); | |
| this.$initialized_$ = !1 | |
| } | |
| $JSCompiler_prototypeAlias$$ = $VariableSource$$module$src$service$variable_source$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$initialize_$ = function() { | |
| this.initialize(); | |
| this.$initialized_$ = !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.initialize = function() {}; | |
| $JSCompiler_prototypeAlias$$.get = function($name$jscomp$87$$) { | |
| this.$initialized_$ || this.$initialize_$(); | |
| return this.$replacements_$[$name$jscomp$87$$] | |
| }; | |
| $JSCompiler_prototypeAlias$$.set = function($varName$jscomp$2$$, $syncResolver$$) { | |
| $varName$jscomp$2$$.indexOf("RETURN"); | |
| this.$replacements_$[$varName$jscomp$2$$] = this.$replacements_$[$varName$jscomp$2$$] || { | |
| sync: void 0, | |
| async: void 0 | |
| }; | |
| this.$replacements_$[$varName$jscomp$2$$].sync = $syncResolver$$; | |
| this.$replacementExpr_$ = void 0; | |
| return this | |
| }; | |
| $JSCompiler_prototypeAlias$$.setAsync = function($varName$jscomp$3$$, $asyncResolver$$) { | |
| $varName$jscomp$3$$.indexOf("RETURN"); | |
| this.$replacements_$[$varName$jscomp$3$$] = this.$replacements_$[$varName$jscomp$3$$] || { | |
| sync: void 0, | |
| async: void 0 | |
| }; | |
| this.$replacements_$[$varName$jscomp$3$$].async = $asyncResolver$$; | |
| this.$replacementExpr_$ = void 0; | |
| return this | |
| }; | |
| $JSCompiler_prototypeAlias$$.setBoth = function($varName$jscomp$4$$, $syncResolver$jscomp$1$$, $asyncResolver$jscomp$1$$) { | |
| return this.set($varName$jscomp$4$$, $syncResolver$jscomp$1$$).setAsync($varName$jscomp$4$$, $asyncResolver$jscomp$1$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getExpr = function($opt_bindings$$) { | |
| var $$jscomp$this$jscomp$5$$ = this; | |
| this.$initialized_$ || this.$initialize_$(); | |
| var $additionalKeys$$ = $opt_bindings$$ ? Object.keys($opt_bindings$$) : null; | |
| if ($additionalKeys$$ && 0 < $additionalKeys$$.length) { | |
| var $allKeys$$ = Object.keys(this.$replacements_$); | |
| $additionalKeys$$.forEach(function($opt_bindings$$) { | |
| void 0 === $$jscomp$this$jscomp$5$$.$replacements_$[$opt_bindings$$] && $allKeys$$.push($opt_bindings$$) | |
| }); | |
| return $JSCompiler_StaticMethods_buildExpr_$$($allKeys$$) | |
| } | |
| this.$replacementExpr_$ || | |
| (this.$replacementExpr_$ = $JSCompiler_StaticMethods_buildExpr_$$(Object.keys(this.$replacements_$))); | |
| return this.$replacementExpr_$ | |
| }; | |
| function $JSCompiler_StaticMethods_buildExpr_$$($keys$jscomp$3$$) { | |
| $keys$jscomp$3$$.sort(function($keys$jscomp$3$$, $all$$) { | |
| return $all$$.length - $keys$jscomp$3$$.length | |
| }); | |
| var $all$$ = $keys$jscomp$3$$.join("|"); | |
| return new RegExp("\\$?(" + $all$$ + ")(?:\\(((?:\\s*[0-9a-zA-Z-_.]*\\s*(?=,|\\)),?)*)\\s*\\))?", "g") | |
| }; | |
| function $insertAnalyticsElement$$module$src$extension_analytics$$($parentElement$$, $ampdoc$jscomp$9_config$jscomp$8$$) { | |
| var $loadAnalytics$jscomp$1$$ = !0; | |
| $loadAnalytics$jscomp$1$$ = void 0 === $loadAnalytics$jscomp$1$$ ? !1 : $loadAnalytics$jscomp$1$$; | |
| var $doc$jscomp$14$$ = $parentElement$$.ownerDocument, | |
| $analyticsElem$$ = $createElementWithAttributes$$module$src$dom$$($doc$jscomp$14$$, "amp-analytics", $dict$$module$src$utils$object$$({ | |
| sandbox: "true", | |
| trigger: "immediate" | |
| })), | |
| $scriptElem$$ = $createElementWithAttributes$$module$src$dom$$($doc$jscomp$14$$, | |
| "script", $dict$$module$src$utils$object$$({ | |
| type: "application/json" | |
| })); | |
| $scriptElem$$.textContent = JSON.stringify($ampdoc$jscomp$9_config$jscomp$8$$); | |
| $analyticsElem$$.appendChild($scriptElem$$); | |
| $analyticsElem$$.CONFIG = $ampdoc$jscomp$9_config$jscomp$8$$; | |
| if ($loadAnalytics$jscomp$1$$) { | |
| var $extensions$$ = $Services$$module$src$services$extensionsFor$$($parentElement$$.ownerDocument.defaultView); | |
| $ampdoc$jscomp$9_config$jscomp$8$$ = $getAmpdoc$$module$src$service$$($parentElement$$); | |
| $extensions$$.installExtensionForDoc($ampdoc$jscomp$9_config$jscomp$8$$, | |
| "amp-analytics") | |
| } else $Services$$module$src$services$analyticsForDocOrNull$$($parentElement$$).then(function() {}); | |
| $parentElement$$.appendChild($analyticsElem$$); | |
| return $analyticsElem$$ | |
| }; | |
| $dict$$module$src$utils$object$$({ | |
| frameborder: "0", | |
| allowfullscreen: "", | |
| allowtransparency: "", | |
| scrolling: "no", | |
| marginwidth: "0", | |
| marginheight: "0" | |
| }); | |
| var $LIFECYCLE_STAGES$$module$extensions$amp_a4a$0_1$amp_a4a$$ = { | |
| adSlotCleared: "-1", | |
| urlBuilt: "1", | |
| adRequestStart: "2", | |
| adRequestEnd: "3", | |
| adResponseValidateStart: "5", | |
| renderFriendlyStart: "6", | |
| renderCrossDomainStart: "7", | |
| renderFriendlyEnd: "8", | |
| renderCrossDomainEnd: "9", | |
| preAdThrottle: "10", | |
| renderSafeFrameStart: "11", | |
| throttled3p: "12", | |
| adResponseValidateEnd: "13", | |
| xDomIframeLoaded: "14", | |
| friendlyIframeLoaded: "15", | |
| adSlotCollapsed: "16", | |
| adSlotUnhidden: "17", | |
| layoutAdPromiseDelay: "18", | |
| signatureVerifySuccess: "19", | |
| networkError: "20", | |
| friendlyIframeIniLoad: "21", | |
| visHalf: "22", | |
| visHalfIniLoad: "23", | |
| firstVisible: "24", | |
| visLoadAndOneSec: "25", | |
| iniLoad: "26", | |
| resumeCallback: "27", | |
| visIniLoad: "29", | |
| upgradeDelay: "30", | |
| crossDomainIframeLoaded: "31" | |
| }; | |
| function $BaseLifecycleReporter$$module$ads$google$a4a$performance$$() { | |
| this.$extraVariables_$ = {} | |
| } | |
| $JSCompiler_prototypeAlias$$ = $BaseLifecycleReporter$$module$ads$google$a4a$performance$$.prototype; | |
| $JSCompiler_prototypeAlias$$.addPingsForVisibility = function() {}; | |
| $JSCompiler_prototypeAlias$$.sendPing = function() {}; | |
| $JSCompiler_prototypeAlias$$.setPingParameter = function($parameter$$, $value$jscomp$113$$) { | |
| null != $parameter$$ && "" !== $parameter$$ && null !== $value$jscomp$113$$ && void 0 !== $value$jscomp$113$$ && "" !== $value$jscomp$113$$ && (this.$extraVariables_$[$parameter$$] = String($value$jscomp$113$$)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.setPingParameters = function($parametersToValues$$) { | |
| for (var $variable$$ in $parametersToValues$$) $parametersToValues$$.hasOwnProperty($variable$$) && this.setPingParameter($variable$$, $parametersToValues$$[$variable$$]) | |
| }; | |
| $JSCompiler_prototypeAlias$$.reset = function() { | |
| this.$extraVariables_$ = {} | |
| }; | |
| $JSCompiler_prototypeAlias$$.getInitTime = function() {}; | |
| $JSCompiler_prototypeAlias$$.getDeltaTime = function() {}; | |
| function $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$($win$jscomp$110$$, $element$jscomp$55$$, $slotId$jscomp$1$$) { | |
| this.$extraVariables_$ = {}; | |
| var $$jscomp$this$jscomp$23$$ = this; | |
| this.$win_$ = $win$jscomp$110$$; | |
| this.$element_$ = $element$jscomp$55$$; | |
| this.$namespace_$ = $element$jscomp$55$$.getAttribute("data-a4a-upgrade-type") ? "a4a" : "amp"; | |
| this.$slotId_$ = $slotId$jscomp$1$$; | |
| this.$correlator_$ = $getCorrelator$$module$ads$google$a4a$utils$$($win$jscomp$110$$, void 0, $element$jscomp$55$$); | |
| this.$slotName_$ = | |
| this.$namespace_$ + "." + this.$slotId_$; | |
| var $scratch$$ = $getTimingDataSync$$module$src$service$variable_source$$($win$jscomp$110$$, "navigationStart") || Date.now(); | |
| this.$initTime_$ = "number" == typeof $scratch$$ ? $scratch$$ : Number($scratch$$); | |
| this.getDeltaTime = $win$jscomp$110$$.performance && $win$jscomp$110$$.performance.now ? $win$jscomp$110$$.performance.now.bind($win$jscomp$110$$.performance) : function() { | |
| return Date.now() - $$jscomp$this$jscomp$23$$.$initTime_$ | |
| }; | |
| this.$pingbackAddress_$ = "https://csi.gstatic.com/csi"; | |
| this.$urlReplacer_$ = $Services$$module$src$services$urlReplacementsForDoc$$($element$jscomp$55$$); | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$($element$jscomp$55$$) | |
| } | |
| $$jscomp$inherits$$($GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$, $BaseLifecycleReporter$$module$ads$google$a4a$performance$$); | |
| $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$.prototype.setPingAddress = function($address$$) { | |
| this.$pingbackAddress_$ = $address$$ | |
| }; | |
| $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$.prototype.sendPing = function($JSCompiler_inline_result$jscomp$263_name$jscomp$89$$) { | |
| var $JSCompiler_stageId$jscomp$inline_654$$ = $LIFECYCLE_STAGES$$module$extensions$amp_a4a$0_1$amp_a4a$$[$JSCompiler_inline_result$jscomp$263_name$jscomp$89$$] || 9999, | |
| $JSCompiler_delta$jscomp$inline_655$$ = isNaN(Number(this.$extraVariables_$.forced_delta)) ? Math.round(this.getDeltaTime()) : this.$extraVariables_$.forced_delta; | |
| delete this.$extraVariables_$.forced_delta; | |
| var $JSCompiler_extraParams$jscomp$inline_656$$ = $serializeQueryString$$module$src$url$$(this.$extraVariables_$); | |
| "" != $JSCompiler_extraParams$jscomp$inline_656$$ && ($JSCompiler_extraParams$jscomp$inline_656$$ = this.$urlReplacer_$.expandStringSync($JSCompiler_extraParams$jscomp$inline_656$$, { | |
| AD_SLOT_NAMESPACE: this.$namespace_$, | |
| AD_SLOT_ID: this.$slotId_$, | |
| AD_SLOT_TIME_TO_EVENT: $JSCompiler_delta$jscomp$inline_655$$, | |
| AD_SLOT_EVENT_NAME: $JSCompiler_inline_result$jscomp$263_name$jscomp$89$$, | |
| AD_SLOT_EVENT_ID: $JSCompiler_stageId$jscomp$inline_654$$, | |
| AD_PAGE_CORRELATOR: this.$correlator_$, | |
| AD_PAGE_VISIBLE: this.$viewer_$.isVisible() ? 1 : 0, | |
| AD_PAGE_FIRST_VISIBLE_TIME: Math.round(this.$viewer_$.getFirstVisibleTime() - this.$initTime_$), | |
| AD_PAGE_LAST_VISIBLE_TIME: Math.round(this.$viewer_$.getLastVisibleTime() - this.$initTime_$) | |
| })); | |
| if ($JSCompiler_inline_result$jscomp$263_name$jscomp$89$$ = $JSCompiler_extraParams$jscomp$inline_656$$ ? this.$pingbackAddress_$ + "?" + $JSCompiler_extraParams$jscomp$inline_656$$ : "")(new Image).src = $JSCompiler_inline_result$jscomp$263_name$jscomp$89$$, | |
| $dev$$module$src$log$$().info("PING", $JSCompiler_inline_result$jscomp$263_name$jscomp$89$$) | |
| }; | |
| $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$.prototype.getInitTime = function() { | |
| return this.$initTime_$ | |
| }; | |
| $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$.prototype.addPingsForVisibility = function($element$jscomp$56$$) { | |
| var $$jscomp$this$jscomp$24$$ = this; | |
| $Services$$module$src$services$analyticsForDoc$$($element$jscomp$56$$).then(function($analytics$jscomp$2$$) { | |
| var $signals$$ = $element$jscomp$56$$.signals(), | |
| $readyPromise$$ = Promise.race([$signals$$.whenSignal("ini-load"), $signals$$.whenSignal("load-end")]), | |
| $vis$$ = $analytics$jscomp$2$$.getAnalyticsRoot($element$jscomp$56$$).getVisibilityManager(); | |
| $vis$$.listenElement($element$jscomp$56$$, { | |
| visiblePercentageMin: 50 | |
| }, null, null, function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("visHalf") | |
| }); | |
| $vis$$.listenElement($element$jscomp$56$$, { | |
| visiblePercentageMin: 50 | |
| }, $readyPromise$$, null, function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("visHalfIniLoad") | |
| }); | |
| $vis$$.listenElement($element$jscomp$56$$, { | |
| visiblePercentageMin: 1 | |
| }, null, null, function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("firstVisible") | |
| }); | |
| $readyPromise$$.then(function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("iniLoad") | |
| }); | |
| $vis$$.listenElement($element$jscomp$56$$, { | |
| waitFor: "ini-load" | |
| }, $readyPromise$$, null, function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("visIniLoad") | |
| }); | |
| $vis$$.listenElement($element$jscomp$56$$, { | |
| visiblePercentageMin: 1, | |
| waitFor: "ini-load", | |
| totalTimeMin: 1E3 | |
| }, $readyPromise$$, null, function() { | |
| $$jscomp$this$jscomp$24$$.sendPing("visLoadAndOneSec") | |
| }) | |
| }) | |
| }; | |
| var $PROFILING_BRANCHES$$module$ads$google$a4a$google_data_reporter$$ = { | |
| a4aProfilingRate: { | |
| isTrafficEligible: function() { | |
| return !0 | |
| }, | |
| branches: ["unused", "unused"] | |
| } | |
| }; | |
| function $extractUrlExperimentId$$module$ads$google$a4a$traffic_experiments$$($win$jscomp$115$$, $element$jscomp$58$$) { | |
| var $expParam$$ = $Services$$module$src$services$viewerForDoc$$($element$jscomp$58$$).getParam("exp") || $parseQueryString_$$module$src$url_parse_query_string$$($win$jscomp$115$$.location.search).exp; | |
| if (!$expParam$$) return null; | |
| var $expKeys$$ = ["doubleclick" == ($element$jscomp$58$$.getAttribute("type") || "").toLowerCase() ? "da" : "aa", "a4a"], | |
| $arg$jscomp$8$$, $match$jscomp$7$$; | |
| $expKeys$$.forEach(function($win$jscomp$115$$) { | |
| return $arg$jscomp$8$$ = | |
| $arg$jscomp$8$$ || ($match$jscomp$7$$ = (new RegExp("(?:^|,)" + $win$jscomp$115$$ + ":(-?\\d+)")).exec($expParam$$)) && $match$jscomp$7$$[1] | |
| }); | |
| return $arg$jscomp$8$$ || null | |
| } | |
| function $validateExperimentIds$$module$ads$google$a4a$traffic_experiments$$($idList$$) { | |
| return $idList$$.every(function($idList$$) { | |
| return !isNaN(parseInt($idList$$, 10)) | |
| }) | |
| } | |
| function $addExperimentIdToElement$$module$ads$google$a4a$traffic_experiments$$($experimentId$jscomp$7$$, $element$jscomp$63$$) { | |
| var $currentEids$$ = $element$jscomp$63$$.getAttribute("data-experiment-id"), | |
| $JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$; | |
| if ($JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$ = $currentEids$$) $JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$ = | |
| ($JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$ = $currentEids$$) ? $JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$.split(",") : [], $JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$ = $validateExperimentIds$$module$ads$google$a4a$traffic_experiments$$($JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$); | |
| $JSCompiler_idString$jscomp$inline_661_JSCompiler_inline_result$jscomp$269_JSCompiler_temp$jscomp$267$$ ? $element$jscomp$63$$.setAttribute("data-experiment-id", $mergeExperimentIds$$module$ads$google$a4a$utils$$([$experimentId$jscomp$7$$], $currentEids$$)) : $element$jscomp$63$$.setAttribute("data-experiment-id", $experimentId$jscomp$7$$) | |
| }; | |
| function $ImaPlayerData$$module$ads$google$ima_player_data$$() { | |
| this.currentTime = 0; | |
| this.duration = 1; | |
| this.playedRanges = [] | |
| } | |
| $ImaPlayerData$$module$ads$google$ima_player_data$$.prototype.update = function($videoPlayer$$) { | |
| this.currentTime = $videoPlayer$$.currentTime; | |
| this.duration = $videoPlayer$$.duration; | |
| var $played$$ = $videoPlayer$$.played, | |
| $length$jscomp$33$$ = $played$$.length; | |
| this.playedRanges = []; | |
| for (var $i$jscomp$57$$ = 0; $i$jscomp$57$$ < $length$jscomp$33$$; $i$jscomp$57$$++) this.playedRanges.push([$played$$.start($i$jscomp$57$$), $played$$.end($i$jscomp$57$$)]) | |
| }; | |
| new $ImaPlayerData$$module$ads$google$ima_player_data$$; | |
| function $restrictedVsync$$module$ads$inabox$util$$($win$jscomp$120$$, $task$$, $opt_state$$) { | |
| $win$jscomp$120$$.requestAnimationFrame(function() { | |
| $task$$.measure && $task$$.measure($opt_state$$); | |
| $task$$.mutate && $task$$.mutate($opt_state$$) | |
| }) | |
| } | |
| function $timer$$module$ads$inabox$util$$($callback$jscomp$63$$) { | |
| var $timeMs$$ = 700; | |
| setTimeout($callback$jscomp$63$$, $timeMs$$) | |
| }; | |
| function $module$ads$inabox$frame_overlay_helper$expandFrame$$($win$jscomp$121$$, $iframe$jscomp$2$$, $onFinish$$) { | |
| $restrictedVsync$$module$ads$inabox$util$$($win$jscomp$121$$, { | |
| measure: function($onFinish$$) { | |
| $onFinish$$.viewportSize = { | |
| width: $win$jscomp$121$$.innerWidth, | |
| height: $win$jscomp$121$$.innerHeight | |
| }; | |
| $onFinish$$.rect = $iframe$jscomp$2$$.getBoundingClientRect() | |
| }, | |
| mutate: function($state$jscomp$4$$) { | |
| var $collapsedRect$$ = $layoutRectFromDomRect$$module$src$layout_rect$$($state$jscomp$4$$.rect), | |
| $expandedRect$$ = | |
| $layoutRectLtwh$$module$src$layout_rect$$(0, 0, $state$jscomp$4$$.viewportSize.width, $state$jscomp$4$$.viewportSize.height); | |
| $centerFrameUnderVsyncMutate$$module$src$full_overlay_frame_helper$$($iframe$jscomp$2$$, $state$jscomp$4$$.rect, $state$jscomp$4$$.viewportSize); | |
| $timer$$module$ads$inabox$util$$(function() { | |
| $restrictedVsync$$module$ads$inabox$util$$($win$jscomp$121$$, { | |
| mutate: function() { | |
| $setStyles$$module$src$style$$($iframe$jscomp$2$$, { | |
| position: "fixed", | |
| "z-index": 1E3, | |
| left: 0, | |
| right: 0, | |
| top: 0, | |
| bottom: 0, | |
| width: "100vw", | |
| height: "100vh", | |
| transition: null, | |
| transform: null, | |
| margin: 0, | |
| border: 0 | |
| }); | |
| $onFinish$$($collapsedRect$$, $expandedRect$$) | |
| } | |
| }) | |
| }) | |
| } | |
| }, {}) | |
| } | |
| function $module$ads$inabox$frame_overlay_helper$collapseFrame$$($win$jscomp$122$$, $iframe$jscomp$3$$, $onFinish$jscomp$1$$, $onMeasure$$) { | |
| $restrictedVsync$$module$ads$inabox$util$$($win$jscomp$122$$, { | |
| mutate: function() { | |
| $resetStyles$$module$src$style$$($iframe$jscomp$3$$, "position z-index left right top bottom width height margin border".split(" ")); | |
| $onFinish$jscomp$1$$(); | |
| $restrictedVsync$$module$ads$inabox$util$$($win$jscomp$122$$, { | |
| measure: function() { | |
| $onMeasure$$($layoutRectFromDomRect$$module$src$layout_rect$$($iframe$jscomp$3$$.getBoundingClientRect())) | |
| } | |
| }) | |
| } | |
| }) | |
| }; | |
| function $FrameOverlayManager$$module$ads$inabox$frame_overlay_manager$$($win$jscomp$123$$) { | |
| this.$win_$ = $win$jscomp$123$$; | |
| this.$viewportChangedSinceExpand_$ = this.$isExpanded_$ = !1; | |
| this.$collapsedRect_$ = null; | |
| $JSCompiler_StaticMethods_listenToViewportChanges_$$(this) | |
| } | |
| function $JSCompiler_StaticMethods_listenToViewportChanges_$$($JSCompiler_StaticMethods_listenToViewportChanges_$self$$) { | |
| $JSCompiler_StaticMethods_listenToViewportChanges_$self$$.$win_$.addEventListener("resize", function() { | |
| return $JSCompiler_StaticMethods_listenToViewportChanges_$self$$.onWindowResize() | |
| }) | |
| } | |
| $FrameOverlayManager$$module$ads$inabox$frame_overlay_manager$$.prototype.onWindowResize = function() { | |
| this.$isExpanded_$ && (this.$viewportChangedSinceExpand_$ = !0) | |
| }; | |
| $FrameOverlayManager$$module$ads$inabox$frame_overlay_manager$$.prototype.expandFrame = function($iframe$jscomp$4$$, $callback$jscomp$64$$) { | |
| var $$jscomp$this$jscomp$26$$ = this; | |
| $module$ads$inabox$frame_overlay_helper$expandFrame$$(this.$win_$, $iframe$jscomp$4$$, function($iframe$jscomp$4$$, $expandedRect$jscomp$1$$) { | |
| $$jscomp$this$jscomp$26$$.$isExpanded_$ = !0; | |
| $$jscomp$this$jscomp$26$$.$viewportChangedSinceExpand_$ = !1; | |
| $$jscomp$this$jscomp$26$$.$collapsedRect_$ = $iframe$jscomp$4$$; | |
| $callback$jscomp$64$$($expandedRect$jscomp$1$$) | |
| }) | |
| }; | |
| $FrameOverlayManager$$module$ads$inabox$frame_overlay_manager$$.prototype.collapseFrame = function($iframe$jscomp$5$$, $callback$jscomp$65$$) { | |
| var $$jscomp$this$jscomp$27$$ = this; | |
| $module$ads$inabox$frame_overlay_helper$collapseFrame$$(this.$win_$, $iframe$jscomp$5$$, function() { | |
| $$jscomp$this$jscomp$27$$.$isExpanded_$ = !1; | |
| $$jscomp$this$jscomp$27$$.$viewportChangedSinceExpand_$ || $callback$jscomp$65$$($$jscomp$this$jscomp$27$$.$collapsedRect_$) | |
| }, function($iframe$jscomp$5$$) { | |
| $$jscomp$this$jscomp$27$$.$collapsedRect_$ = | |
| $iframe$jscomp$5$$; | |
| $$jscomp$this$jscomp$27$$.$viewportChangedSinceExpand_$ && $callback$jscomp$65$$($$jscomp$this$jscomp$27$$.$collapsedRect_$) | |
| }) | |
| }; | |
| function $Observable$$module$src$observable$$() { | |
| this.$handlers_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $Observable$$module$src$observable$$.prototype; | |
| $JSCompiler_prototypeAlias$$.add = function($handler$jscomp$5$$) { | |
| var $$jscomp$this$jscomp$28$$ = this; | |
| this.$handlers_$ || (this.$handlers_$ = []); | |
| this.$handlers_$.push($handler$jscomp$5$$); | |
| return function() { | |
| $$jscomp$this$jscomp$28$$.remove($handler$jscomp$5$$) | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.remove = function($handler$jscomp$6_index$jscomp$61$$) { | |
| this.$handlers_$ && ($handler$jscomp$6_index$jscomp$61$$ = this.$handlers_$.indexOf($handler$jscomp$6_index$jscomp$61$$), -1 < $handler$jscomp$6_index$jscomp$61$$ && this.$handlers_$.splice($handler$jscomp$6_index$jscomp$61$$, 1)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.removeAll = function() { | |
| this.$handlers_$ && (this.$handlers_$.length = 0) | |
| }; | |
| $JSCompiler_prototypeAlias$$.fire = function($opt_event$$) { | |
| if (this.$handlers_$) for (var $handlers$$ = this.$handlers_$, $i$jscomp$58$$ = 0; $i$jscomp$58$$ < $handlers$$.length; $i$jscomp$58$$++)(0, $handlers$$[$i$jscomp$58$$])($opt_event$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getHandlerCount = function() { | |
| return this.$handlers_$ ? this.$handlers_$.length : 0 | |
| }; | |
| function $throttle$$module$src$utils$rate_limit$$($win$jscomp$124$$, $callback$jscomp$66$$) { | |
| var $minInterval$$ = 100; | |
| function $fire$$($fire$$) { | |
| $nextCallArgs$$ = null; | |
| $locker$$ = $win$jscomp$124$$.setTimeout($waiter$$, $minInterval$$); | |
| $callback$jscomp$66$$.apply(null, $fire$$) | |
| } | |
| function $waiter$$() { | |
| $locker$$ = 0; | |
| $nextCallArgs$$ && $fire$$($nextCallArgs$$) | |
| } | |
| var $locker$$ = 0, | |
| $nextCallArgs$$ = null; | |
| return function($win$jscomp$124$$) { | |
| for (var $callback$jscomp$66$$ = [], $minInterval$$ = 0; $minInterval$$ < arguments.length; ++$minInterval$$) $callback$jscomp$66$$[$minInterval$$ - | |
| 0] = arguments[$minInterval$$]; | |
| $locker$$ ? $nextCallArgs$$ = $callback$jscomp$66$$ : $fire$$($callback$jscomp$66$$) | |
| } | |
| } | |
| function $debounce$$module$src$utils$rate_limit$$($win$jscomp$125$$, $callback$jscomp$67$$) { | |
| function $waiter$jscomp$1$$() { | |
| $locker$jscomp$1$$ = 0; | |
| var $remaining$$ = 300 - ($win$jscomp$125$$.Date.now() - $timestamp$$); | |
| if (0 < $remaining$$) $locker$jscomp$1$$ = $win$jscomp$125$$.setTimeout($waiter$jscomp$1$$, $remaining$$); | |
| else { | |
| var $JSCompiler_args$jscomp$inline_674$$ = $nextCallArgs$jscomp$1$$; | |
| $nextCallArgs$jscomp$1$$ = null; | |
| $callback$jscomp$67$$.apply(null, $JSCompiler_args$jscomp$inline_674$$) | |
| } | |
| } | |
| var $locker$jscomp$1$$ = | |
| 0, | |
| $timestamp$$ = 0, | |
| $nextCallArgs$jscomp$1$$ = null; | |
| return function($callback$jscomp$67$$) { | |
| for (var $args$jscomp$3$$ = [], $$jscomp$restIndex$jscomp$2$$ = 0; $$jscomp$restIndex$jscomp$2$$ < arguments.length; ++$$jscomp$restIndex$jscomp$2$$) $args$jscomp$3$$[$$jscomp$restIndex$jscomp$2$$ - 0] = arguments[$$jscomp$restIndex$jscomp$2$$]; | |
| $timestamp$$ = $win$jscomp$125$$.Date.now(); | |
| $nextCallArgs$jscomp$1$$ = $args$jscomp$3$$; | |
| $locker$jscomp$1$$ || ($locker$jscomp$1$$ = $win$jscomp$125$$.setTimeout($waiter$jscomp$1$$, 300)) | |
| } | |
| }; | |
| function $PositionObserver$$module$ads$inabox$position_observer$$($JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$) { | |
| this.$win_$ = $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$; | |
| this.$positionObservable_$ = null; | |
| var $JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$ = this.$win_$; | |
| $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$ = $JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$.document; | |
| if ($JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$.scrollingElement) $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$ = $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$.scrollingElement; | |
| else { | |
| var $JSCompiler_temp$jscomp$2363$$; | |
| if ($JSCompiler_temp$jscomp$2363$$ = $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$.body) $JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$ = | |
| $JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$.navigator.userAgent, $JSCompiler_temp$jscomp$2363$$ = /WebKit/i.test($JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$) && !/Edge/i.test($JSCompiler_ua$jscomp$inline_2409_JSCompiler_win$jscomp$inline_676$$); | |
| $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$ = $JSCompiler_temp$jscomp$2363$$ ? $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$.body : $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$.documentElement | |
| } | |
| this.$scrollingElement_$ = | |
| $JSCompiler_doc$jscomp$inline_677_JSCompiler_temp$jscomp$2362_win$jscomp$126$$; | |
| this.$viewportRect_$ = null | |
| } | |
| $PositionObserver$$module$ads$inabox$position_observer$$.prototype.observe = function($element$jscomp$65$$, $callback$jscomp$68$$) { | |
| var $$jscomp$this$jscomp$29$$ = this; | |
| if (!this.$positionObservable_$) { | |
| this.$positionObservable_$ = new $Observable$$module$src$observable$$; | |
| var $listener$jscomp$59$$ = $throttle$$module$src$utils$rate_limit$$(this.$win_$, function() { | |
| $$jscomp$this$jscomp$29$$.$update_$(); | |
| $$jscomp$this$jscomp$29$$.$positionObservable_$.fire() | |
| }); | |
| this.$update_$(); | |
| this.$win_$.addEventListener("scroll", | |
| $listener$jscomp$59$$, !0); | |
| this.$win_$.addEventListener("resize", $listener$jscomp$59$$, !0) | |
| } | |
| $callback$jscomp$68$$({ | |
| viewportRect: this.$viewportRect_$, | |
| targetRect: $layoutRectFromDomRect$$module$src$layout_rect$$($element$jscomp$65$$.getBoundingClientRect()) | |
| }); | |
| this.$positionObservable_$.add(function() { | |
| $callback$jscomp$68$$({ | |
| viewportRect: $$jscomp$this$jscomp$29$$.$viewportRect_$, | |
| targetRect: $layoutRectFromDomRect$$module$src$layout_rect$$($element$jscomp$65$$.getBoundingClientRect()) | |
| }) | |
| }) | |
| }; | |
| $PositionObserver$$module$ads$inabox$position_observer$$.prototype.$update_$ = function() { | |
| this.$viewportRect_$ = this.getViewportRect() | |
| }; | |
| $PositionObserver$$module$ads$inabox$position_observer$$.prototype.getViewportRect = function() { | |
| var $scrollingElement$$ = this.$scrollingElement_$, | |
| $win$jscomp$127$$ = this.$win_$, | |
| $scrollLeft$$ = $scrollingElement$$.scrollLeft || $win$jscomp$127$$.pageXOffset, | |
| $scrollTop$$ = $scrollingElement$$.scrollTop || $win$jscomp$127$$.pageYOffset; | |
| return $layoutRectLtwh$$module$src$layout_rect$$(Math.round($scrollLeft$$), Math.round($scrollTop$$), $win$jscomp$127$$.innerWidth, $win$jscomp$127$$.innerHeight) | |
| }; | |
| function $layoutRectLtwh$$module$src$layout_rect$$($left$jscomp$2$$, $top$jscomp$3$$, $width$jscomp$20$$, $height$jscomp$21$$) { | |
| return { | |
| left: $left$jscomp$2$$, | |
| top: $top$jscomp$3$$, | |
| width: $width$jscomp$20$$, | |
| height: $height$jscomp$21$$, | |
| bottom: $top$jscomp$3$$ + $height$jscomp$21$$, | |
| right: $left$jscomp$2$$ + $width$jscomp$20$$, | |
| x: $left$jscomp$2$$, | |
| y: $top$jscomp$3$$ | |
| } | |
| } | |
| function $layoutRectFromDomRect$$module$src$layout_rect$$($rect$$) { | |
| return $layoutRectLtwh$$module$src$layout_rect$$(Number($rect$$.left), Number($rect$$.top), Number($rect$$.width), Number($rect$$.height)) | |
| } | |
| function $rectIntersection$$module$src$layout_rect$$($var_args$jscomp$59$$) { | |
| for (var $x0$jscomp$2$$ = -Infinity, $x1$jscomp$5$$ = Infinity, $y0$jscomp$2$$ = -Infinity, $y1$jscomp$5$$ = Infinity, $i$jscomp$59$$ = 0; $i$jscomp$59$$ < arguments.length; $i$jscomp$59$$++) { | |
| var $current$jscomp$2$$ = arguments[$i$jscomp$59$$]; | |
| if ($current$jscomp$2$$ && ($x0$jscomp$2$$ = Math.max($x0$jscomp$2$$, $current$jscomp$2$$.left), $x1$jscomp$5$$ = Math.min($x1$jscomp$5$$, $current$jscomp$2$$.left + $current$jscomp$2$$.width), $y0$jscomp$2$$ = Math.max($y0$jscomp$2$$, | |
| $current$jscomp$2$$.top), $y1$jscomp$5$$ = Math.min($y1$jscomp$5$$, $current$jscomp$2$$.top + $current$jscomp$2$$.height), $x1$jscomp$5$$ < $x0$jscomp$2$$ || $y1$jscomp$5$$ < $y0$jscomp$2$$)) return null | |
| } | |
| return Infinity == $x1$jscomp$5$$ ? null : $layoutRectLtwh$$module$src$layout_rect$$($x0$jscomp$2$$, $y0$jscomp$2$$, $x1$jscomp$5$$ - $x0$jscomp$2$$, $y1$jscomp$5$$ - $y0$jscomp$2$$) | |
| } | |
| function $expandLayoutRect$$module$src$layout_rect$$($rect$jscomp$1$$, $dw$$, $dh$$) { | |
| return $layoutRectLtwh$$module$src$layout_rect$$($rect$jscomp$1$$.left - $rect$jscomp$1$$.width * $dw$$, $rect$jscomp$1$$.top - $rect$jscomp$1$$.height * $dh$$, $rect$jscomp$1$$.width * (1 + 2 * $dw$$), $rect$jscomp$1$$.height * (1 + 2 * $dh$$)) | |
| } | |
| function $moveLayoutRect$$module$src$layout_rect$$($rect$jscomp$2$$, $dx$jscomp$4$$, $dy$jscomp$4$$) { | |
| return 0 == $dx$jscomp$4$$ && 0 == $dy$jscomp$4$$ || 0 == $rect$jscomp$2$$.width && 0 == $rect$jscomp$2$$.height ? $rect$jscomp$2$$ : $layoutRectLtwh$$module$src$layout_rect$$($rect$jscomp$2$$.left + $dx$jscomp$4$$, $rect$jscomp$2$$.top + $dy$jscomp$4$$, $rect$jscomp$2$$.width, $rect$jscomp$2$$.height) | |
| }; | |
| function $NamedObservable$$module$ads$inabox$inabox_messaging_host$$() { | |
| this.$map_$ = {} | |
| } | |
| $NamedObservable$$module$ads$inabox$inabox_messaging_host$$.prototype.listen = function($key$jscomp$54$$, $callback$jscomp$69$$) { | |
| this.$map_$[$key$jscomp$54$$] = $callback$jscomp$69$$ | |
| }; | |
| $NamedObservable$$module$ads$inabox$inabox_messaging_host$$.prototype.fire = function($key$jscomp$55$$, $thisArg$jscomp$1$$, $args$jscomp$4$$) { | |
| return $key$jscomp$55$$ in this.$map_$ ? this.$map_$[$key$jscomp$55$$].apply($thisArg$jscomp$1$$, $args$jscomp$4$$) : !1 | |
| }; | |
| function $InaboxMessagingHost$$module$ads$inabox$inabox_messaging_host$$($win$jscomp$129$$, $iframes$$) { | |
| this.$win_$ = $win$jscomp$129$$; | |
| this.$iframes_$ = $iframes$$; | |
| this.$iframeMap_$ = Object.create(null); | |
| this.$registeredIframeSentinels_$ = Object.create(null); | |
| this.$positionObserver_$ = new $PositionObserver$$module$ads$inabox$position_observer$$($win$jscomp$129$$); | |
| this.$msgObservable_$ = new $NamedObservable$$module$ads$inabox$inabox_messaging_host$$; | |
| this.$frameOverlayManager_$ = new $FrameOverlayManager$$module$ads$inabox$frame_overlay_manager$$($win$jscomp$129$$); | |
| this.$msgObservable_$.listen($MessageType$$module$src$3p_frame_messaging$SEND_POSITIONS$$, this.$handleSendPositions_$); | |
| this.$msgObservable_$.listen($MessageType$$module$src$3p_frame_messaging$FULL_OVERLAY_FRAME$$, this.$handleEnterFullOverlay_$); | |
| this.$msgObservable_$.listen($MessageType$$module$src$3p_frame_messaging$CANCEL_FULL_OVERLAY_FRAME$$, this.$handleCancelFullOverlay_$) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $InaboxMessagingHost$$module$ads$inabox$inabox_messaging_host$$.prototype; | |
| $JSCompiler_prototypeAlias$$.processMessage = function($message$jscomp$34$$) { | |
| var $request$jscomp$6$$ = $deserializeMessage$$module$src$3p_frame_messaging$$($message$jscomp$34$$.data); | |
| if (!$request$jscomp$6$$ || !$request$jscomp$6$$.sentinel) return !1; | |
| a: { | |
| var $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ = $message$jscomp$34$$.source; | |
| var $JSCompiler_sentinel$jscomp$inline_681$$ = $request$jscomp$6$$.sentinel; | |
| if (this.$iframeMap_$[$JSCompiler_sentinel$jscomp$inline_681$$]) $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ = | |
| this.$iframeMap_$[$JSCompiler_sentinel$jscomp$inline_681$$]; | |
| else { | |
| for (; $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$.parent !== this.$win_$ && $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ !== this.$win_$.top;) $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ = $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$.parent; | |
| for (var $JSCompiler_i$jscomp$inline_682$$ = | |
| 0; $JSCompiler_i$jscomp$inline_682$$ < this.$iframes_$.length; $JSCompiler_i$jscomp$inline_682$$++) { | |
| var $JSCompiler_iframe$jscomp$inline_683$$ = this.$iframes_$[$JSCompiler_i$jscomp$inline_682$$]; | |
| if ($JSCompiler_iframe$jscomp$inline_683$$.contentWindow === $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$) { | |
| $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ = this.$iframeMap_$[$JSCompiler_sentinel$jscomp$inline_681$$] = $JSCompiler_iframe$jscomp$inline_683$$; | |
| break a | |
| } | |
| } | |
| $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ = null | |
| } | |
| } | |
| return $JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$ ? this.$msgObservable_$.fire($request$jscomp$6$$.type, this, [$JSCompiler_inline_result$jscomp$276_JSCompiler_source$jscomp$inline_680_iframe$jscomp$6$$, $request$jscomp$6$$, $message$jscomp$34$$.source, $message$jscomp$34$$.origin]) ? !0 : ($dev$$module$src$log$$().warn("InaboxMessagingHost", "Unprocessed AMP message:", | |
| $message$jscomp$34$$), !1) : ($dev$$module$src$log$$().info("InaboxMessagingHost", "Ignored message from untrusted iframe:", $message$jscomp$34$$), !1) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleSendPositions_$ = function($iframe$jscomp$7$$, $request$jscomp$7$$, $source$jscomp$14$$, $origin$jscomp$2$$) { | |
| var $$jscomp$this$jscomp$30$$ = this, | |
| $viewportRect$jscomp$1$$ = this.$positionObserver_$.getViewportRect(), | |
| $targetRect$$ = $layoutRectFromDomRect$$module$src$layout_rect$$($iframe$jscomp$7$$.getBoundingClientRect()); | |
| this.$sendPosition_$($request$jscomp$7$$, $source$jscomp$14$$, $origin$jscomp$2$$, $dict$$module$src$utils$object$$({ | |
| viewportRect: $viewportRect$jscomp$1$$, | |
| targetRect: $targetRect$$ | |
| })); | |
| if (this.$registeredIframeSentinels_$[$request$jscomp$7$$.sentinel]) return !0; | |
| this.$registeredIframeSentinels_$[$request$jscomp$7$$.sentinel] = !0; | |
| this.$positionObserver_$.observe($iframe$jscomp$7$$, function($iframe$jscomp$7$$) { | |
| $$jscomp$this$jscomp$30$$.$sendPosition_$($request$jscomp$7$$, $source$jscomp$14$$, $origin$jscomp$2$$, $iframe$jscomp$7$$) | |
| }); | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.$sendPosition_$ = function($request$jscomp$8$$, $source$jscomp$15$$, $origin$jscomp$3$$, $data$jscomp$57$$) { | |
| $source$jscomp$15$$.postMessage($serializeMessage$$module$src$3p_frame_messaging$$($MessageType$$module$src$3p_frame_messaging$POSITION$$, $request$jscomp$8$$.sentinel, $data$jscomp$57$$), $origin$jscomp$3$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleEnterFullOverlay_$ = function($iframe$jscomp$8$$, $request$jscomp$9$$, $source$jscomp$16$$, $origin$jscomp$4$$) { | |
| this.$frameOverlayManager_$.expandFrame($iframe$jscomp$8$$, function($iframe$jscomp$8$$) { | |
| $source$jscomp$16$$.postMessage($serializeMessage$$module$src$3p_frame_messaging$$($MessageType$$module$src$3p_frame_messaging$FULL_OVERLAY_FRAME_RESPONSE$$, $request$jscomp$9$$.sentinel, $dict$$module$src$utils$object$$({ | |
| success: !0, | |
| boxRect: $iframe$jscomp$8$$ | |
| })), $origin$jscomp$4$$) | |
| }); | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleCancelFullOverlay_$ = function($iframe$jscomp$9$$, $request$jscomp$10$$, $source$jscomp$17$$, $origin$jscomp$5$$) { | |
| this.$frameOverlayManager_$.collapseFrame($iframe$jscomp$9$$, function($iframe$jscomp$9$$) { | |
| $source$jscomp$17$$.postMessage($serializeMessage$$module$src$3p_frame_messaging$$($MessageType$$module$src$3p_frame_messaging$CANCEL_FULL_OVERLAY_FRAME_RESPONSE$$, $request$jscomp$10$$.sentinel, $dict$$module$src$utils$object$$({ | |
| success: !0, | |
| boxRect: $iframe$jscomp$9$$ | |
| })), $origin$jscomp$5$$) | |
| }); | |
| return !0 | |
| }; | |
| new function($win$jscomp$130$$) { | |
| if ($win$jscomp$130$$.ampInaboxInitialized) $dev$$module$src$log$$().info("inabox-host", "Skip a 2nd attempt of initializing AMP inabox host."); | |
| else { | |
| $win$jscomp$130$$.ampInaboxInitialized = !0; | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| $win$jscomp$130$$.ampInaboxIframes && !Array.isArray($win$jscomp$130$$.ampInaboxIframes) && ($dev$$module$src$log$$().info("inabox-host", "Invalid ampInaboxIframes", $win$jscomp$130$$.ampInaboxIframes), | |
| $win$jscomp$130$$.ampInaboxIframes = []); | |
| var $host$$ = new $InaboxMessagingHost$$module$ads$inabox$inabox_messaging_host$$($win$jscomp$130$$, $win$jscomp$130$$.ampInaboxIframes), | |
| $queuedMsgs$$ = $win$jscomp$130$$.ampInaboxPendingMessages; | |
| $queuedMsgs$$ && (Array.isArray($queuedMsgs$$) ? $queuedMsgs$$.forEach(function($win$jscomp$130$$) { | |
| try { | |
| $host$$.processMessage($win$jscomp$130$$) | |
| } catch ($err$jscomp$18$$) { | |
| $dev$$module$src$log$$().error("inabox-host", "Error processing inabox message", $win$jscomp$130$$, $err$jscomp$18$$) | |
| } | |
| }) : | |
| $dev$$module$src$log$$().info("inabox-host", "Invalid ampInaboxPendingMessages", $queuedMsgs$$)); | |
| $win$jscomp$130$$.ampInaboxPendingMessages = []; | |
| $win$jscomp$130$$.ampInaboxPendingMessages.push = function() {}; | |
| $win$jscomp$130$$.addEventListener("message", $host$$.processMessage.bind($host$$)) | |
| } | |
| }(self); | |
| var cssText$$module$build$css = "html{overflow-x:hidden!important}body,html{height:auto!important}html.i-amphtml-fie{height:100%!important;width:100%!important}body{margin:0!important;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}[hidden]{display:none!important}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y;touch-action:pan-y}html.i-amphtml-fie>body,html.i-amphtml-singledoc>body{overflow:visible!important;position:relative!important}html.i-amphtml-webview>body{overflow-x:hidden!important;overflow-y:visible!important}html.i-amphtml-ios-embed-legacy>body{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important}html.i-amphtml-ios-embed{overflow-y:auto!important;position:static}#i-amphtml-wrapper{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;margin:0!important;display:block!important}html.i-amphtml-ios-embed.i-amphtml-ios-overscroll,html.i-amphtml-ios-embed.i-amphtml-ios-overscroll>#i-amphtml-wrapper{-webkit-overflow-scrolling:touch!important}#i-amphtml-wrapper>body{position:relative!important;border-top:1px solid transparent!important}.i-amphtml-element{display:inline-block}.i-amphtml-layout-fixed,[layout=fixed][width][height]:not(.i-amphtml-layout-fixed){display:inline-block;position:relative}.i-amphtml-layout-container,.i-amphtml-layout-fixed-height,.i-amphtml-layout-responsive,[layout=container],[layout=fixed-height][height],[layout=responsive][width][height]:not(.i-amphtml-layout-responsive),[width][height][sizes]:not(.i-amphtml-layout-responsive){display:block;position:relative}.i-amphtml-layout-fill,[layout=fill]:not(.i-amphtml-layout-fill){display:block;overflow:hidden!important;position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-layout-flex-item,[layout=flex-item]:not(.i-amphtml-layout-flex-item){display:block;position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.i-amphtml-layout-size-defined{overflow:hidden!important}.i-amphtml-layout-awaiting-size{position:absolute!important;top:auto!important;bottom:auto!important}i-amphtml-sizer{display:block!important}.i-amphtml-fill-content{display:block;height:0;max-height:100%;max-width:100%;min-height:100%;min-width:100%;width:0;margin:auto}.i-amphtml-layout-size-defined .i-amphtml-fill-content{position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-replaced-content,.i-amphtml-screen-reader{padding:0!important;border:none!important}.i-amphtml-screen-reader{position:fixed!important;top:0px!important;left:0px!important;width:2px!important;height:2px!important;opacity:0!important;overflow:hidden!important;margin:0!important;display:block!important;visibility:visible!important}.i-amphtml-unresolved{position:relative;overflow:hidden!important}#i-amphtml-wrapper.i-amphtml-scroll-disabled,.i-amphtml-scroll-disabled{overflow-x:hidden!important;overflow-y:hidden!important}.i-amphtml-notbuilt,[layout]:not(.i-amphtml-element){position:relative;overflow:hidden!important;color:transparent!important}.i-amphtml-notbuilt:not(.i-amphtml-layout-container)>*,[layout]:not([layout=container]):not(.i-amphtml-element)>*{display:none}.i-amphtml-ghost{visibility:hidden!important}[layout=nodisplay]:not(.i-amphtml-display){display:none!important}.i-amphtml-element>[placeholder],[layout]:not(.i-amphtml-element)>[placeholder]{display:block}.i-amphtml-element>[placeholder].amp-hidden,.i-amphtml-element>[placeholder].hidden{visibility:hidden}.i-amphtml-element:not(.amp-notsupported)>[fallback]{display:none}.i-amphtml-layout-size-defined>[fallback],.i-amphtml-layout-size-defined>[placeholder]{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:1}.i-amphtml-notbuilt>[placeholder]{display:block!important}.i-amphtml-hidden-by-media-query{display:none!important}.i-amphtml-element-error{background:red!important;color:#fff!important;position:relative!important}.i-amphtml-element-error:before{content:attr(error-message)}i-amp-scroll-container,i-amphtml-scroll-container{position:absolute;top:0;left:0;right:0;bottom:0;display:block}i-amp-scroll-container.amp-active,i-amphtml-scroll-container.amp-active{overflow:auto;-webkit-overflow-scrolling:touch}.i-amphtml-loading-container{display:block!important;z-index:1}.i-amphtml-notbuilt>.i-amphtml-loading-container{display:block!important}.i-amphtml-loading-container.amp-hidden{visibility:hidden}.i-amphtml-loader-line{position:absolute;top:0;left:0;right:0;height:1px;overflow:hidden!important;background-color:hsla(0,0%,59%,0.2);display:block}.i-amphtml-loader-moving-line{display:block;position:absolute;width:100%;height:100%!important;background-color:hsla(0,0%,59%,0.65);z-index:2}@-webkit-keyframes i-amphtml-loader-line-moving{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes i-amphtml-loader-line-moving{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.i-amphtml-loader-line.amp-active .i-amphtml-loader-moving-line{-webkit-animation:i-amphtml-loader-line-moving 4s ease infinite;animation:i-amphtml-loader-line-moving 4s ease infinite}.i-amphtml-loader{position:absolute;display:block;height:10px;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;white-space:nowrap}.i-amphtml-loader.amp-active .i-amphtml-loader-dot{-webkit-animation:i-amphtml-loader-dots 2s infinite;animation:i-amphtml-loader-dots 2s infinite}.i-amphtml-loader-dot{position:relative;display:inline-block;height:10px;width:10px;margin:2px;border-radius:100%;background-color:rgba(0,0,0,0.3);box-shadow:2px 2px 2px 1px rgba(0,0,0,0.2);will-change:transform}.i-amphtml-loader .i-amphtml-loader-dot:first-child{-webkit-animation-delay:0s;animation-delay:0s}.i-amphtml-loader .i-amphtml-loader-dot:nth-child(2){-webkit-animation-delay:.1s;animation-delay:.1s}.i-amphtml-loader .i-amphtml-loader-dot:nth-child(3){-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes i-amphtml-loader-dots{0%,to{-webkit-transform:scale(.7);transform:scale(.7);background-color:rgba(0,0,0,0.3)}50%{-webkit-transform:scale(.8);transform:scale(.8);background-color:rgba(0,0,0,0.5)}}@keyframes i-amphtml-loader-dots{0%,to{-webkit-transform:scale(.7);transform:scale(.7);background-color:rgba(0,0,0,0.3)}50%{-webkit-transform:scale(.8);transform:scale(.8);background-color:rgba(0,0,0,0.5)}}.i-amphtml-element>[overflow]{cursor:pointer;position:relative;z-index:2;visibility:hidden}.i-amphtml-element>[overflow].amp-visible{visibility:visible}template{display:none!important}.amp-border-box,.amp-border-box *,.amp-border-box :after,.amp-border-box :before{box-sizing:border-box}amp-pixel{display:none!important}amp-instagram{padding:64px 0px 0px!important;background-color:#fff}amp-analytics{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}amp-iframe iframe{box-sizing:border-box!important}[amp-access][amp-access-hide],amp-experiment,amp-live-list>[update],amp-share-tracking,form [submit-error],form [submit-success],form [submitting]{display:none}.i-amphtml-jank-meter{position:fixed;background-color:rgba(232,72,95,0.5);bottom:0;right:0;color:#fff;font-size:16px;z-index:1000;padding:5px}i-amp-video-mask,i-amphtml-video-mask{z-index:1}.amp-video-eq{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;bottom:7px;display:-webkit-box;display:-ms-flexbox;display:flex;height:12px;opacity:0.8;overflow:hidden;position:absolute;right:7px;width:20px;z-index:1}.amp-video-eq .amp-video-eq-col{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;margin-right:1px;position:relative}.amp-video-eq .amp-video-eq-col div{-webkit-animation-name:amp-video-eq-animation;animation-name:amp-video-eq-animation;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate;background-color:#fafafa;height:100%;position:absolute;width:100%;will-change:transform;-webkit-animation-play-state:paused;animation-play-state:paused}.amp-video-eq[unpausable] .amp-video-eq-col div{-webkit-animation-name:none;animation-name:none}.amp-video-eq[unpausable].amp-video-eq-play .amp-video-eq-col div{-webkit-animation-name:amp-video-eq-animation;animation-name:amp-video-eq-animation}.amp-video-eq.amp-video-eq-play .amp-video-eq-col div{-webkit-animation-play-state:running;animation-play-state:running}.amp-video-eq-1-1{-webkit-animation-duration:0.3s;animation-duration:0.3s}.amp-video-eq-1-1,.amp-video-eq-1-2{-webkit-transform:translateY(60%);transform:translateY(60%)}.amp-video-eq-1-2{-webkit-animation-duration:0.45s;animation-duration:0.45s}.amp-video-eq-2-1{-webkit-animation-duration:0.5s;animation-duration:0.5s}.amp-video-eq-2-1,.amp-video-eq-2-2{-webkit-transform:translateY(30%);transform:translateY(30%)}.amp-video-eq-2-2{-webkit-animation-duration:0.4s;animation-duration:0.4s}.amp-video-eq-3-1{-webkit-animation-duration:0.3s;animation-duration:0.3s}.amp-video-eq-3-1,.amp-video-eq-3-2{-webkit-transform:translateY(70%);transform:translateY(70%)}.amp-video-eq-3-2{-webkit-animation-duration:0.35s;animation-duration:0.35s}.amp-video-eq-4-1{-webkit-animation-duration:0.4s;animation-duration:0.4s}.amp-video-eq-4-1,.amp-video-eq-4-2{-webkit-transform:translateY(50%);transform:translateY(50%)}.amp-video-eq-4-2{-webkit-animation-duration:0.25s;animation-duration:0.25s}@-webkit-keyframes amp-video-eq-animation{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes amp-video-eq-animation{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.i-amphtml-dockable-video{padding:0px;margin:0px;-webkit-transition:background-color 1s;transition:background-color 1s}.i-amphtml-dockable-video>iframe.i-amphtml-dockable-video-minimizing,.i-amphtml-dockable-video>video.i-amphtml-dockable-video-minimizing{position:fixed;height:auto;overflow:hidden;z-index:16;will-change:transform;-webkit-transform:scale(0.6) translateX(20px) translateY(20px);transform:scale(0.6) translateX(20px) translateY(20px);border-radius:6px;box-shadow:0px 3px 9px 3px rgba(0,0,0,0.1);-webkit-transition:box-shadow 1s,border-radius 1s;transition:box-shadow 1s,border-radius 1s;min-width:initial!important;min-height:initial!important;margin:initial!important}amp-accordion{display:block!important}amp-accordion>section{float:none!important}amp-accordion>section>*{float:none!important;display:block!important;overflow:hidden!important;position:relative!important}.i-amphtml-accordion-content,.i-amphtml-accordion-header,amp-accordion,amp-accordion>section{margin:0}.i-amphtml-accordion-header{cursor:pointer;background-color:#efefef;padding-right:20px;border:1px solid #dfdfdf}amp-accordion>section>:last-child{display:none!important}amp-accordion>section[expanded]>:last-child{display:block!important}amp-story,amp-story-page{display:block;height:100vh;margin:0;padding:0;overflow:hidden;width:100%}amp-story-page{background-color:#757575}amp-date-picker{display:block}amp-date-picker:not([i-amphtml-date-picker-attached]){display:-webkit-box;display:-ms-flexbox;display:flex;width:200px;height:50px;border:1px solid #dbdbdb}amp-date-picker[type=range]:not([i-amphtml-date-picker-attached]){width:400px}amp-date-picker[i-amphtml-date-picker-attached] [amp-date-placeholder],amp-date-picker[type=range][i-amphtml-date-picker-attached] [amp-date-placeholder-end],amp-date-picker[type=range][i-amphtml-date-picker-attached] [amp-date-placeholder-start]{display:none}amp-date-picker [amp-date-placeholder],amp-date-picker[type=range] [amp-date-placeholder-end],amp-date-picker[type=range] [amp-date-placeholder-start]{border:0;font-weight:200;font-size:18px;line-height:24px;color:#333;font-family:serif;padding:4px 8px;width:100%;height:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden}amp-date-picker[type=range] [amp-date-placeholder-end]::-webkit-input-placeholder,amp-date-picker[type=range] [amp-date-placeholder-start]::-webkit-input-placeholder,amp-date [amp-date-placeholder]::-webkit-input-placeholder{color:#757575}amp-date-picker[type=range] [amp-date-placeholder-end]::-ms-input-placeholder,amp-date-picker[type=range] [amp-date-placeholder-start]::-ms-input-placeholder,amp-date [amp-date-placeholder]::-ms-input-placeholder{color:#757575}amp-date-picker[type=range] [amp-date-placeholder-end]::placeholder,amp-date-picker[type=range] [amp-date-placeholder-start]::placeholder,amp-date [amp-date-placeholder]::placeholder{color:#757575}\n/*# sourceURL=/css/amp.css*/"; | |
| function $isDocumentReady$$module$src$document_ready$$($doc$jscomp$17$$) { | |
| return "loading" != $doc$jscomp$17$$.readyState && "uninitialized" != $doc$jscomp$17$$.readyState | |
| } | |
| function $isDocumentComplete$$module$src$document_ready$$($doc$jscomp$18$$) { | |
| return "complete" == $doc$jscomp$18$$.readyState | |
| } | |
| function $onDocumentReady$$module$src$document_ready$$($doc$jscomp$19$$, $callback$jscomp$70$$) { | |
| $onDocumentState$$module$src$document_ready$$($doc$jscomp$19$$, $isDocumentReady$$module$src$document_ready$$, $callback$jscomp$70$$) | |
| } | |
| function $onDocumentState$$module$src$document_ready$$($doc$jscomp$20$$, $stateFn$$, $callback$jscomp$71$$) { | |
| var $ready$$ = $stateFn$$($doc$jscomp$20$$); | |
| if ($ready$$) $callback$jscomp$71$$($doc$jscomp$20$$); | |
| else { | |
| var $readyListener$$ = function() { | |
| $stateFn$$($doc$jscomp$20$$) && ($ready$$ || ($ready$$ = !0, $callback$jscomp$71$$($doc$jscomp$20$$)), $doc$jscomp$20$$.removeEventListener("readystatechange", $readyListener$$)) | |
| }; | |
| $doc$jscomp$20$$.addEventListener("readystatechange", $readyListener$$) | |
| } | |
| } | |
| function $whenDocumentReady$$module$src$document_ready$$($doc$jscomp$21$$) { | |
| return new Promise(function($resolve$jscomp$17$$) { | |
| $onDocumentReady$$module$src$document_ready$$($doc$jscomp$21$$, $resolve$jscomp$17$$) | |
| }) | |
| } | |
| function $whenDocumentComplete$$module$src$document_ready$$($doc$jscomp$22$$) { | |
| return new Promise(function($resolve$jscomp$18$$) { | |
| $onDocumentState$$module$src$document_ready$$($doc$jscomp$22$$, $isDocumentComplete$$module$src$document_ready$$, $resolve$jscomp$18$$) | |
| }) | |
| }; | |
| function $Timer$$module$src$service$timer_impl$$($win$jscomp$131$$) { | |
| this.win = $win$jscomp$131$$; | |
| this.$resolved_$ = Promise.resolve(); | |
| this.$taskCount_$ = 0; | |
| this.$canceled_$ = {}; | |
| this.$startTime_$ = Date.now() | |
| } | |
| $JSCompiler_prototypeAlias$$ = $Timer$$module$src$service$timer_impl$$.prototype; | |
| $JSCompiler_prototypeAlias$$.timeSinceStart = function() { | |
| return Date.now() - this.$startTime_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.delay = function($callback$jscomp$72$$, $opt_delay$jscomp$2$$) { | |
| var $$jscomp$this$jscomp$31$$ = this; | |
| if (!$opt_delay$jscomp$2$$) { | |
| var $id$jscomp$39$$ = "p" + this.$taskCount_$++; | |
| this.$resolved_$.then(function() { | |
| $$jscomp$this$jscomp$31$$.$canceled_$[$id$jscomp$39$$] ? delete $$jscomp$this$jscomp$31$$.$canceled_$[$id$jscomp$39$$] : $callback$jscomp$72$$() | |
| }). | |
| catch ($reportError$$module$src$error$$); | |
| return $id$jscomp$39$$ | |
| } | |
| return this.win.setTimeout(function() { | |
| try { | |
| $callback$jscomp$72$$() | |
| } catch ($e$jscomp$43$$) { | |
| throw $reportError$$module$src$error$$($e$jscomp$43$$), | |
| $e$jscomp$43$$; | |
| } | |
| }, $opt_delay$jscomp$2$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.cancel = function($timeoutId$$) { | |
| "string" == typeof $timeoutId$$ ? this.$canceled_$[$timeoutId$$] = !0 : this.win.clearTimeout($timeoutId$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.promise = function($opt_delay$jscomp$3$$) { | |
| var $$jscomp$this$jscomp$32$$ = this; | |
| return new Promise(function($resolve$jscomp$19$$) { | |
| var $timerKey$$ = $$jscomp$this$jscomp$32$$.delay($resolve$jscomp$19$$, $opt_delay$jscomp$3$$); | |
| if (-1 == $timerKey$$) throw Error("Failed to schedule timer."); | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.timeoutPromise = function($delay$$, $opt_racePromise$$, $opt_message$jscomp$11$$) { | |
| function $cancel$$() { | |
| $$jscomp$this$jscomp$33$$.cancel($timerKey$jscomp$1$$) | |
| } | |
| var $$jscomp$this$jscomp$33$$ = this, | |
| $timerKey$jscomp$1$$, $delayPromise$$ = new Promise(function($opt_racePromise$$, $cancel$$) { | |
| $timerKey$jscomp$1$$ = $$jscomp$this$jscomp$33$$.delay(function() { | |
| $cancel$$($user$$module$src$log$$().createError($opt_message$jscomp$11$$ || "timeout")) | |
| }, $delay$$); | |
| if (-1 == $timerKey$jscomp$1$$) throw Error("Failed to schedule timer."); | |
| }); | |
| if (!$opt_racePromise$$) return $delayPromise$$; | |
| $opt_racePromise$$.then($cancel$$, $cancel$$); | |
| return Promise.race([$delayPromise$$, $opt_racePromise$$]) | |
| }; | |
| $JSCompiler_prototypeAlias$$.poll = function($delay$jscomp$1$$, $predicate$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$34$$ = this; | |
| return new Promise(function($resolve$jscomp$20$$) { | |
| var $interval$jscomp$3$$ = $$jscomp$this$jscomp$34$$.win.setInterval(function() { | |
| $predicate$jscomp$1$$() && ($$jscomp$this$jscomp$34$$.win.clearInterval($interval$jscomp$3$$), $resolve$jscomp$20$$()) | |
| }, $delay$jscomp$1$$) | |
| }) | |
| }; | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| var $EXPERIMENTS$$module$build$experiments$experiments$$ = [{ | |
| id: "dev-channel", | |
| name: "AMP Dev Channel (more info)", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/README.md#amp-dev-channel" | |
| }, { | |
| id: "ad-type-custom", | |
| name: "Activates support for custom (self-serve) advertisements", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/ads/custom.md" | |
| }, { | |
| id: "alp", | |
| name: "Activates support for measuring incoming clicks.", | |
| spec: "https://github.com/ampproject/amphtml/issues/2934", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4005" | |
| }, { | |
| id: "amp-access-server", | |
| name: "AMP Access server side prototype", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4000" | |
| }, { | |
| id: "amp-access-jwt", | |
| name: "AMP Access JWT prototype", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4000" | |
| }, { | |
| id: "amp-access-signin", | |
| name: "AMP Access sign-in", | |
| spec: "https://github.com/ampproject/amphtml/issues/4227", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4226" | |
| }, { | |
| id: "amp-auto-ads", | |
| name: "AMP Auto Ads", | |
| spec: "https://github.com/ampproject/amphtml/issues/6196", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/6217" | |
| }, { | |
| id: "amp-auto-ads-adsense-holdout", | |
| name: "AMP Auto Ads AdSense Holdout", | |
| spec: "https://github.com/ampproject/amphtml/issues/6196", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/9247" | |
| }, { | |
| id: "amp-google-vrview-image", | |
| name: "AMP VR Viewer for images via Google VRView", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-google-vrview-image/amp-google-vrview-image.md", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/3996" | |
| }, { | |
| id: "amp-gwd-animation", | |
| name: "AMP GWD Animation", | |
| spec: "https://github.com/ampproject/amphtml/issues/9949", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11238" | |
| }, { | |
| id: "no-auth-in-prerender", | |
| name: "Delay amp-access auth request until doc becomes visible.", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/3824" | |
| }, { | |
| id: "amp-share-tracking", | |
| name: "AMP Share Tracking", | |
| spec: "https://github.com/ampproject/amphtml/issues/3135", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5167" | |
| }, { | |
| id: "amp-viz-vega", | |
| name: "AMP Visualization using Vega grammar", | |
| spec: "https://github.com/ampproject/amphtml/issues/3991", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4171" | |
| }, { | |
| id: "amp-apester-media", | |
| name: "AMP extension for Apester media (launched)", | |
| spec: "https://github.com/ampproject/amphtml/issues/3233", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/pull/4291" | |
| }, { | |
| id: "cache-service-worker", | |
| name: "AMP Cache Service Worker", | |
| spec: "https://github.com/ampproject/amphtml/issues/1199" | |
| }, { | |
| id: "amp-lightbox-viewer", | |
| name: "Enables a new lightbox experience via the `lightbox` attribute", | |
| spec: "https://github.com/ampproject/amphtml/issues/4152" | |
| }, { | |
| id: "amp-lightbox-a4a-proto", | |
| name: "Allows the new lightbox experience to be used in A4A (prototype).", | |
| spec: "https://github.com/ampproject/amphtml/issues/7743" | |
| }, { | |
| id: "amp-lightbox-viewer-auto", | |
| name: "Allows the new lightbox experience to automatically include some elements without the need to manually add the `lightbox` attribute", | |
| spec: "https://github.com/ampproject/amphtml/issues/4152" | |
| }, { | |
| id: "amp-playbuzz", | |
| name: "AMP extension for playbuzz items (launched)", | |
| spec: "https://github.com/ampproject/amphtml/issues/6106", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/pull/6351" | |
| }, { | |
| id: "alp-for-a4a", | |
| name: "Enable redirect to landing page directly for A4A", | |
| spec: "https://github.com/ampproject/amphtml/issues/5212" | |
| }, { | |
| id: "ios-embed-wrapper", | |
| name: "A new iOS embedded viewport model that wraps the body into a synthetic root (launched)", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5639" | |
| }, { | |
| id: "chunked-amp", | |
| name: "Split AMP's loading phase into chunks", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5535" | |
| }, { | |
| id: "font-display-swap", | |
| name: "Use font-display: swap as the default for fonts.", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11165" | |
| }, { | |
| id: "amp-animation", | |
| name: "High-performing keyframe animations in AMP (launched).", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-animation/amp-animation.md", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5888" | |
| }, { | |
| id: "variable-filters", | |
| name: "Format to apply filters to analytics variables", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/2198" | |
| }, { | |
| id: "pump-early-frame", | |
| name: "Force all extensions to have the same release as the main JS binary", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8237" | |
| }, { | |
| id: "version-locking", | |
| name: "Force all extensions to have the same release as the main JS binary", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8236" | |
| }, { | |
| id: "web-worker", | |
| name: "Web worker for background processing", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/7156" | |
| }, { | |
| id: "jank-meter", | |
| name: "Display jank meter" | |
| }, { | |
| id: "amp-fx-parallax", | |
| name: "Amp extension for a parallax effect", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/7801", | |
| spec: "https://github.com/ampproject/amphtml/issues/1443" | |
| }, { | |
| id: "slidescroll-disable-css-snap", | |
| name: "Slidescroll disable css snap", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8195", | |
| spec: "https://github.com/ampproject/amphtml/issues/7670" | |
| }, { | |
| id: "3p-use-ampcontext", | |
| name: "Use AmpContext for window.context messaging", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8239", | |
| spec: "https://github.com/ampproject/amphtml/issues/6829" | |
| }, { | |
| id: "as-use-attr-for-format", | |
| name: "Use slot width/height attribute for AdSense size format" | |
| }, { | |
| id: "input-debounced", | |
| name: "A debounced input event for AMP actions", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/9413", | |
| spec: "https://github.com/ampproject/amphtml/issues/9277" | |
| }, { | |
| id: "amp-ima-video", | |
| name: "IMA-integrated Video Player" | |
| }, { | |
| id: "user-error-reporting", | |
| name: "Report error to publishers", | |
| spec: "https://github.com/ampproject/amphtml/issues/6415" | |
| }, { | |
| id: "disable-rtc", | |
| name: "Disable AMP RTC", | |
| spec: "https://github.com/ampproject/amphtml/issues/8551" | |
| }, { | |
| id: "inabox-position-api", | |
| name: "Position API for foreign iframe", | |
| spec: "https://github.com/ampproject/amphtml/issues/10995" | |
| }, { | |
| id: "amp-story", | |
| name: "Visual storytelling in AMP", | |
| spec: "https://github.com/ampproject/amphtml/issues/11329", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11475" | |
| }, { | |
| id: "disable-amp-story-desktop", | |
| name: "Disables responsive desktop experience for the amp-story component", | |
| spec: "https://github.com/ampproject/amphtml/issues/11714", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11715" | |
| }, { | |
| id: "amp-story-auto-fullscreen", | |
| name: "Enables full-screen mode on first page transition", | |
| spec: "https://github.com/ampproject/amphtml/issues/11974", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11975" | |
| }, { | |
| id: "amp-date-picker", | |
| name: "Enables the amp-date-picker extension", | |
| spec: "https://github.com/ampproject/amphtml/issues/6469", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/12267" | |
| } | |
| ]; | |
| function $build$$module$build$experiments$experiments$$() { | |
| var $table$$ = document.getElementById("experiments-table"); | |
| $EXPERIMENTS$$module$build$experiments$experiments$$.forEach(function($experiment$jscomp$2$$) { | |
| $table$$.appendChild($buildExperimentRow$$module$build$experiments$experiments$$($experiment$jscomp$2$$)) | |
| }) | |
| } | |
| function $buildExperimentRow$$module$build$experiments$experiments$$($experiment$jscomp$3$$) { | |
| var $tr$$ = document.createElement("tr"); | |
| $tr$$.id = "exp-tr-" + $experiment$jscomp$3$$.id; | |
| var $tdId$$ = document.createElement("td"); | |
| $tdId$$.appendChild($buildLinkMaybe$$module$build$experiments$experiments$$($experiment$jscomp$3$$.id, $experiment$jscomp$3$$.spec)); | |
| $tr$$.appendChild($tdId$$); | |
| var $tdName$$ = document.createElement("td"); | |
| $tdName$$.appendChild($buildLinkMaybe$$module$build$experiments$experiments$$($experiment$jscomp$3$$.name, | |
| $experiment$jscomp$3$$.spec)); | |
| $tr$$.appendChild($tdName$$); | |
| var $tdOn$$ = document.createElement("td"); | |
| $tdOn$$.classList.add("button-cell"); | |
| $tr$$.appendChild($tdOn$$); | |
| var $button$$ = document.createElement("button"); | |
| $tdOn$$.appendChild($button$$); | |
| var $buttonOn$$ = document.createElement("div"); | |
| $buttonOn$$.classList.add("on"); | |
| $buttonOn$$.textContent = "On"; | |
| $button$$.appendChild($buttonOn$$); | |
| var $buttonDefault$$ = document.createElement("div"); | |
| $buttonDefault$$.classList.add("default"); | |
| $buttonDefault$$.textContent = | |
| "Default on"; | |
| $button$$.appendChild($buttonDefault$$); | |
| var $buttonOff$$ = document.createElement("div"); | |
| $buttonOff$$.classList.add("off"); | |
| $buttonOff$$.textContent = "Off"; | |
| $button$$.appendChild($buttonOff$$); | |
| $button$$.addEventListener("click", $toggleExperiment_$$module$build$experiments$experiments$$.bind(null, $experiment$jscomp$3$$.id, $experiment$jscomp$3$$.name, void 0)); | |
| return $tr$$ | |
| } | |
| function $buildLinkMaybe$$module$build$experiments$experiments$$($text$jscomp$13$$, $link$jscomp$2$$) { | |
| if ($link$jscomp$2$$) { | |
| var $element$jscomp$67$$ = document.createElement("a"); | |
| $element$jscomp$67$$.setAttribute("href", $link$jscomp$2$$); | |
| $element$jscomp$67$$.setAttribute("target", "_blank") | |
| } else $element$jscomp$67$$ = document.createElement("span"); | |
| $element$jscomp$67$$.textContent = $text$jscomp$13$$; | |
| return $element$jscomp$67$$ | |
| } | |
| function $update$$module$build$experiments$experiments$$() { | |
| $EXPERIMENTS$$module$build$experiments$experiments$$.forEach(function($experiment$jscomp$4$$) { | |
| var $JSCompiler_tr$jscomp$inline_690$$ = document.getElementById("exp-tr-" + $experiment$jscomp$4$$.id); | |
| if ($JSCompiler_tr$jscomp$inline_690$$) { | |
| var $JSCompiler_state$jscomp$inline_691$$ = $isExperimentOn_$$module$build$experiments$experiments$$($experiment$jscomp$4$$.id) ? 1 : 0; | |
| self.AMP_CONFIG[$experiment$jscomp$4$$.id] && ($JSCompiler_state$jscomp$inline_691$$ = | |
| "default"); | |
| $JSCompiler_tr$jscomp$inline_690$$.setAttribute("data-on", $JSCompiler_state$jscomp$inline_691$$) | |
| } | |
| }) | |
| } | |
| function $isExperimentOn_$$module$build$experiments$experiments$$($id$jscomp$40$$) { | |
| return "dev-channel" == $id$jscomp$40$$ ? "1" == $getCookie$$module$src$cookies$$(window, "AMP_CANARY") : $isExperimentOn$$module$src$experiments$$(window, $id$jscomp$40$$) | |
| } | |
| function $toggleExperiment_$$module$build$experiments$experiments$$($id$jscomp$41$$, $name$jscomp$93$$, $opt_on$jscomp$1$$) { | |
| var $currentlyOn$jscomp$1$$ = $isExperimentOn_$$module$build$experiments$experiments$$($id$jscomp$41$$), | |
| $on$jscomp$3$$ = void 0 === $opt_on$jscomp$1$$ ? !$currentlyOn$jscomp$1$$ : $opt_on$jscomp$1$$, | |
| $confirmMessage$$ = $on$jscomp$3$$ ? "Do you really want to activate the AMP experiment" : "Do you really want to deactivate the AMP experiment"; | |
| $showConfirmation_$$module$build$experiments$experiments$$($confirmMessage$$ + | |
| ': "' + $name$jscomp$93$$ + '"', function() { | |
| if ("dev-channel" == $id$jscomp$41$$) { | |
| var $name$jscomp$93$$ = Date.now() + 15552E6; | |
| $setCookie$$module$src$cookies$$(window, "AMP_CANARY", $on$jscomp$3$$ ? "1" : "0", $on$jscomp$3$$ ? $name$jscomp$93$$ : 0, { | |
| domain: location.hostname, | |
| allowOnProxyOrigin: !0 | |
| }); | |
| self.location.reload() | |
| } else $toggleExperiment$$module$src$experiments$$(window, $id$jscomp$41$$, $on$jscomp$3$$); | |
| $update$$module$build$experiments$experiments$$() | |
| }) | |
| } | |
| function $showConfirmation_$$module$build$experiments$experiments$$($message$jscomp$36$$, $callback$jscomp$73$$) { | |
| function $closePopup$$($message$jscomp$36$$) { | |
| $container$jscomp$9$$.classList.remove("show"); | |
| $unlistenSet$$.forEach(function($message$jscomp$36$$) { | |
| return $message$jscomp$36$$() | |
| }); | |
| $message$jscomp$36$$ && $callback$jscomp$73$$() | |
| } | |
| var $container$jscomp$9$$ = document.getElementById("popup-container"), | |
| $messageElement$$ = document.getElementById("popup-message"), | |
| $confirmButton$$ = document.getElementById("popup-button-ok"), | |
| $cancelButton$$ = document.getElementById("popup-button-cancel"), | |
| $unlistenSet$$ = []; | |
| $messageElement$$.textContent = $message$jscomp$36$$; | |
| $unlistenSet$$.push($listenOnce$$module$src$event_helper$$($confirmButton$$, "click", function() { | |
| return $closePopup$$(!0) | |
| })); | |
| $unlistenSet$$.push($listenOnce$$module$src$event_helper$$($cancelButton$$, "click", function() { | |
| return $closePopup$$(!1) | |
| })); | |
| $container$jscomp$9$$.classList.add("show") | |
| } | |
| (function() { | |
| return (new Promise(function($resolve$jscomp$21$$, $reject$jscomp$10$$) { | |
| var $xhr$jscomp$1$$ = new XMLHttpRequest; | |
| $xhr$jscomp$1$$.addEventListener("load", function() { | |
| $resolve$jscomp$21$$($xhr$jscomp$1$$.responseText) | |
| }); | |
| $xhr$jscomp$1$$.addEventListener("error", function() { | |
| $reject$jscomp$10$$(Error($xhr$jscomp$1$$.statusText)) | |
| }); | |
| $xhr$jscomp$1$$.open("GET", "/v0.js?" + Math.random(), !0); | |
| $xhr$jscomp$1$$.send(null) | |
| })).then(function($text$jscomp$14$$) { | |
| var $match$jscomp$8$$ = $text$jscomp$14$$.match(/self\.AMP_CONFIG=([^;]+)/); | |
| if (!$match$jscomp$8$$) throw Error("Can't find AMP_CONFIG in: " + $text$jscomp$14$$); | |
| return self.AMP_CONFIG = JSON.parse($match$jscomp$8$$[1]) | |
| }). | |
| catch (function($error$jscomp$24$$) { | |
| console.error("Error fetching AMP_CONFIG", $error$jscomp$24$$); | |
| return {} | |
| }) | |
| })().then(function() { | |
| $onDocumentReady$$module$src$document_ready$$(document, function() { | |
| $build$$module$build$experiments$experiments$$(); | |
| $update$$module$build$experiments$experiments$$() | |
| }) | |
| }); | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| var $EXPERIMENTS$$module$build$experiments$experiments_max$$ = [{ | |
| id: "dev-channel", | |
| name: "AMP Dev Channel (more info)", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/README.md#amp-dev-channel" | |
| }, { | |
| id: "ad-type-custom", | |
| name: "Activates support for custom (self-serve) advertisements", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/ads/custom.md" | |
| }, { | |
| id: "alp", | |
| name: "Activates support for measuring incoming clicks.", | |
| spec: "https://github.com/ampproject/amphtml/issues/2934", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4005" | |
| }, { | |
| id: "amp-access-server", | |
| name: "AMP Access server side prototype", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4000" | |
| }, { | |
| id: "amp-access-jwt", | |
| name: "AMP Access JWT prototype", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4000" | |
| }, { | |
| id: "amp-access-signin", | |
| name: "AMP Access sign-in", | |
| spec: "https://github.com/ampproject/amphtml/issues/4227", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4226" | |
| }, { | |
| id: "amp-auto-ads", | |
| name: "AMP Auto Ads", | |
| spec: "https://github.com/ampproject/amphtml/issues/6196", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/6217" | |
| }, { | |
| id: "amp-auto-ads-adsense-holdout", | |
| name: "AMP Auto Ads AdSense Holdout", | |
| spec: "https://github.com/ampproject/amphtml/issues/6196", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/9247" | |
| }, { | |
| id: "amp-google-vrview-image", | |
| name: "AMP VR Viewer for images via Google VRView", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-google-vrview-image/amp-google-vrview-image.md", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/3996" | |
| }, { | |
| id: "amp-gwd-animation", | |
| name: "AMP GWD Animation", | |
| spec: "https://github.com/ampproject/amphtml/issues/9949", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11238" | |
| }, { | |
| id: "no-auth-in-prerender", | |
| name: "Delay amp-access auth request until doc becomes visible.", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/3824" | |
| }, { | |
| id: "amp-share-tracking", | |
| name: "AMP Share Tracking", | |
| spec: "https://github.com/ampproject/amphtml/issues/3135", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5167" | |
| }, { | |
| id: "amp-viz-vega", | |
| name: "AMP Visualization using Vega grammar", | |
| spec: "https://github.com/ampproject/amphtml/issues/3991", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/4171" | |
| }, { | |
| id: "amp-apester-media", | |
| name: "AMP extension for Apester media (launched)", | |
| spec: "https://github.com/ampproject/amphtml/issues/3233", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/pull/4291" | |
| }, { | |
| id: "cache-service-worker", | |
| name: "AMP Cache Service Worker", | |
| spec: "https://github.com/ampproject/amphtml/issues/1199" | |
| }, { | |
| id: "amp-lightbox-viewer", | |
| name: "Enables a new lightbox experience via the `lightbox` attribute", | |
| spec: "https://github.com/ampproject/amphtml/issues/4152" | |
| }, { | |
| id: "amp-lightbox-a4a-proto", | |
| name: "Allows the new lightbox experience to be used in A4A (prototype).", | |
| spec: "https://github.com/ampproject/amphtml/issues/7743" | |
| }, { | |
| id: "amp-lightbox-viewer-auto", | |
| name: "Allows the new lightbox experience to automatically include some elements without the need to manually add the `lightbox` attribute", | |
| spec: "https://github.com/ampproject/amphtml/issues/4152" | |
| }, { | |
| id: "amp-playbuzz", | |
| name: "AMP extension for playbuzz items (launched)", | |
| spec: "https://github.com/ampproject/amphtml/issues/6106", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/pull/6351" | |
| }, { | |
| id: "alp-for-a4a", | |
| name: "Enable redirect to landing page directly for A4A", | |
| spec: "https://github.com/ampproject/amphtml/issues/5212" | |
| }, { | |
| id: "ios-embed-wrapper", | |
| name: "A new iOS embedded viewport model that wraps the body into a synthetic root (launched)", | |
| spec: "", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5639" | |
| }, { | |
| id: "chunked-amp", | |
| name: "Split AMP's loading phase into chunks", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5535" | |
| }, { | |
| id: "font-display-swap", | |
| name: "Use font-display: swap as the default for fonts.", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11165" | |
| }, { | |
| id: "amp-animation", | |
| name: "High-performing keyframe animations in AMP (launched).", | |
| spec: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-animation/amp-animation.md", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/5888" | |
| }, { | |
| id: "variable-filters", | |
| name: "Format to apply filters to analytics variables", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/2198" | |
| }, { | |
| id: "pump-early-frame", | |
| name: "Force all extensions to have the same release as the main JS binary", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8237" | |
| }, { | |
| id: "version-locking", | |
| name: "Force all extensions to have the same release as the main JS binary", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8236" | |
| }, { | |
| id: "web-worker", | |
| name: "Web worker for background processing", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/7156" | |
| }, { | |
| id: "jank-meter", | |
| name: "Display jank meter" | |
| }, { | |
| id: "amp-fx-parallax", | |
| name: "Amp extension for a parallax effect", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/7801", | |
| spec: "https://github.com/ampproject/amphtml/issues/1443" | |
| }, { | |
| id: "slidescroll-disable-css-snap", | |
| name: "Slidescroll disable css snap", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8195", | |
| spec: "https://github.com/ampproject/amphtml/issues/7670" | |
| }, { | |
| id: "3p-use-ampcontext", | |
| name: "Use AmpContext for window.context messaging", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/8239", | |
| spec: "https://github.com/ampproject/amphtml/issues/6829" | |
| }, { | |
| id: "as-use-attr-for-format", | |
| name: "Use slot width/height attribute for AdSense size format" | |
| }, { | |
| id: "input-debounced", | |
| name: "A debounced input event for AMP actions", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/9413", | |
| spec: "https://github.com/ampproject/amphtml/issues/9277" | |
| }, { | |
| id: "amp-ima-video", | |
| name: "IMA-integrated Video Player" | |
| }, { | |
| id: "user-error-reporting", | |
| name: "Report error to publishers", | |
| spec: "https://github.com/ampproject/amphtml/issues/6415" | |
| }, { | |
| id: "disable-rtc", | |
| name: "Disable AMP RTC", | |
| spec: "https://github.com/ampproject/amphtml/issues/8551" | |
| }, { | |
| id: "inabox-position-api", | |
| name: "Position API for foreign iframe", | |
| spec: "https://github.com/ampproject/amphtml/issues/10995" | |
| }, { | |
| id: "amp-story", | |
| name: "Visual storytelling in AMP", | |
| spec: "https://github.com/ampproject/amphtml/issues/11329", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11475" | |
| }, { | |
| id: "disable-amp-story-desktop", | |
| name: "Disables responsive desktop experience for the amp-story component", | |
| spec: "https://github.com/ampproject/amphtml/issues/11714", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11715" | |
| }, { | |
| id: "amp-story-auto-fullscreen", | |
| name: "Enables full-screen mode on first page transition", | |
| spec: "https://github.com/ampproject/amphtml/issues/11974", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/11975" | |
| }, { | |
| id: "amp-date-picker", | |
| name: "Enables the amp-date-picker extension", | |
| spec: "https://github.com/ampproject/amphtml/issues/6469", | |
| cleanupIssue: "https://github.com/ampproject/amphtml/issues/12267" | |
| } | |
| ]; | |
| function $build$$module$build$experiments$experiments_max$$() { | |
| var $table$jscomp$1$$ = document.getElementById("experiments-table"); | |
| $EXPERIMENTS$$module$build$experiments$experiments_max$$.forEach(function($experiment$jscomp$7$$) { | |
| $table$jscomp$1$$.appendChild($buildExperimentRow$$module$build$experiments$experiments_max$$($experiment$jscomp$7$$)) | |
| }) | |
| } | |
| function $buildExperimentRow$$module$build$experiments$experiments_max$$($experiment$jscomp$8$$) { | |
| var $tr$jscomp$2$$ = document.createElement("tr"); | |
| $tr$jscomp$2$$.id = "exp-tr-" + $experiment$jscomp$8$$.id; | |
| var $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$ = document.createElement("td"); | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.appendChild($buildLinkMaybe$$module$build$experiments$experiments_max$$($experiment$jscomp$8$$.id, $experiment$jscomp$8$$.spec)); | |
| $tr$jscomp$2$$.appendChild($button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$); | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$ = document.createElement("td"); | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.appendChild($buildLinkMaybe$$module$build$experiments$experiments_max$$($experiment$jscomp$8$$.name, $experiment$jscomp$8$$.spec)); | |
| $tr$jscomp$2$$.appendChild($button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$); | |
| var $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$ = document.createElement("td"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.classList.add("button-cell"); | |
| $tr$jscomp$2$$.appendChild($buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$); | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$ = document.createElement("button"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.appendChild($button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$ = document.createElement("div"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.classList.add("on"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.textContent = "On"; | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.appendChild($buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$ = document.createElement("div"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.classList.add("default"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.textContent = | |
| "Default on"; | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.appendChild($buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$ = document.createElement("div"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.classList.add("off"); | |
| $buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$.textContent = "Off"; | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.appendChild($buttonDefault$jscomp$1_buttonOff$jscomp$1_buttonOn$jscomp$1_tdOn$jscomp$1$$); | |
| $button$jscomp$1_tdId$jscomp$1_tdName$jscomp$1$$.addEventListener("click", $toggleExperiment_$$module$build$experiments$experiments_max$$.bind(null, $experiment$jscomp$8$$.id, $experiment$jscomp$8$$.name, void 0)); | |
| return $tr$jscomp$2$$ | |
| } | |
| function $buildLinkMaybe$$module$build$experiments$experiments_max$$($text$jscomp$15$$, $link$jscomp$3$$) { | |
| if ($link$jscomp$3$$) { | |
| var $element$jscomp$68$$ = document.createElement("a"); | |
| $element$jscomp$68$$.setAttribute("href", $link$jscomp$3$$); | |
| $element$jscomp$68$$.setAttribute("target", "_blank") | |
| } else $element$jscomp$68$$ = document.createElement("span"); | |
| $element$jscomp$68$$.textContent = $text$jscomp$15$$; | |
| return $element$jscomp$68$$ | |
| } | |
| function $update$$module$build$experiments$experiments_max$$() { | |
| $EXPERIMENTS$$module$build$experiments$experiments_max$$.forEach(function($experiment$jscomp$9$$) { | |
| var $JSCompiler_tr$jscomp$inline_696$$ = document.getElementById("exp-tr-" + $experiment$jscomp$9$$.id); | |
| if ($JSCompiler_tr$jscomp$inline_696$$) { | |
| var $JSCompiler_state$jscomp$inline_697$$ = $isExperimentOn_$$module$build$experiments$experiments_max$$($experiment$jscomp$9$$.id) ? 1 : 0; | |
| self.AMP_CONFIG[$experiment$jscomp$9$$.id] && ($JSCompiler_state$jscomp$inline_697$$ = | |
| "default"); | |
| $JSCompiler_tr$jscomp$inline_696$$.setAttribute("data-on", $JSCompiler_state$jscomp$inline_697$$) | |
| } | |
| }) | |
| } | |
| function $isExperimentOn_$$module$build$experiments$experiments_max$$($id$jscomp$42$$) { | |
| return "dev-channel" == $id$jscomp$42$$ ? "1" == $getCookie$$module$src$cookies$$(window, "AMP_CANARY") : $isExperimentOn$$module$src$experiments$$(window, $id$jscomp$42$$) | |
| } | |
| function $toggleExperiment_$$module$build$experiments$experiments_max$$($id$jscomp$43$$, $name$jscomp$94$$, $opt_on$jscomp$2$$) { | |
| var $currentlyOn$jscomp$2$$ = $isExperimentOn_$$module$build$experiments$experiments_max$$($id$jscomp$43$$), | |
| $on$jscomp$4$$ = void 0 === $opt_on$jscomp$2$$ ? !$currentlyOn$jscomp$2$$ : $opt_on$jscomp$2$$; | |
| $showConfirmation_$$module$build$experiments$experiments_max$$(($on$jscomp$4$$ ? "Do you really want to activate the AMP experiment" : "Do you really want to deactivate the AMP experiment") + | |
| ': "' + $name$jscomp$94$$ + '"', function() { | |
| if ("dev-channel" == $id$jscomp$43$$) { | |
| var $name$jscomp$94$$ = Date.now() + 15552E6; | |
| $setCookie$$module$src$cookies$$(window, "AMP_CANARY", $on$jscomp$4$$ ? "1" : "0", $on$jscomp$4$$ ? $name$jscomp$94$$ : 0, { | |
| domain: location.hostname, | |
| allowOnProxyOrigin: !0 | |
| }); | |
| self.location.reload() | |
| } else $toggleExperiment$$module$src$experiments$$(window, $id$jscomp$43$$, $on$jscomp$4$$); | |
| $update$$module$build$experiments$experiments_max$$() | |
| }) | |
| } | |
| function $showConfirmation_$$module$build$experiments$experiments_max$$($message$jscomp$37$$, $callback$jscomp$74$$) { | |
| function $closePopup$jscomp$1$$($message$jscomp$37$$) { | |
| $container$jscomp$10$$.classList.remove("show"); | |
| $unlistenSet$jscomp$1$$.forEach(function($message$jscomp$37$$) { | |
| return $message$jscomp$37$$() | |
| }); | |
| $message$jscomp$37$$ && $callback$jscomp$74$$() | |
| } | |
| var $container$jscomp$10$$ = document.getElementById("popup-container"), | |
| $messageElement$jscomp$1$$ = document.getElementById("popup-message"), | |
| $confirmButton$jscomp$1$$ = | |
| document.getElementById("popup-button-ok"), | |
| $cancelButton$jscomp$1$$ = document.getElementById("popup-button-cancel"), | |
| $unlistenSet$jscomp$1$$ = []; | |
| $messageElement$jscomp$1$$.textContent = $message$jscomp$37$$; | |
| $unlistenSet$jscomp$1$$.push($listenOnce$$module$src$event_helper$$($confirmButton$jscomp$1$$, "click", function() { | |
| return $closePopup$jscomp$1$$(!0) | |
| })); | |
| $unlistenSet$jscomp$1$$.push($listenOnce$$module$src$event_helper$$($cancelButton$jscomp$1$$, "click", function() { | |
| return $closePopup$jscomp$1$$(!1) | |
| })); | |
| $container$jscomp$10$$.classList.add("show") | |
| } | |
| (function() { | |
| return (new Promise(function($resolve$jscomp$22$$, $reject$jscomp$11$$) { | |
| var $xhr$jscomp$2$$ = new XMLHttpRequest; | |
| $xhr$jscomp$2$$.addEventListener("load", function() { | |
| $resolve$jscomp$22$$($xhr$jscomp$2$$.responseText) | |
| }); | |
| $xhr$jscomp$2$$.addEventListener("error", function() { | |
| $reject$jscomp$11$$(Error($xhr$jscomp$2$$.statusText)) | |
| }); | |
| $xhr$jscomp$2$$.open("GET", "/v0.js?" + Math.random(), !0); | |
| $xhr$jscomp$2$$.send(null) | |
| })).then(function($text$jscomp$16$$) { | |
| var $match$jscomp$9$$ = $text$jscomp$16$$.match(/self\.AMP_CONFIG=([^;]+)/); | |
| if (!$match$jscomp$9$$) throw Error("Can't find AMP_CONFIG in: " + $text$jscomp$16$$); | |
| return self.AMP_CONFIG = JSON.parse($match$jscomp$9$$[1]) | |
| }). | |
| catch (function($error$jscomp$25$$) { | |
| console.error("Error fetching AMP_CONFIG", $error$jscomp$25$$); | |
| return {} | |
| }) | |
| })().then(function() { | |
| $onDocumentReady$$module$src$document_ready$$(document, function() { | |
| $build$$module$build$experiments$experiments_max$$(); | |
| $update$$module$build$experiments$experiments_max$$() | |
| }) | |
| }); | |
| var $parser$$module$build$all$v0$access_expr_impl$$ = function() { | |
| function $o$jscomp$6$$($o$jscomp$6$$, $Parser$$, $$V0$$, $$V1$$) { | |
| $$V0$$ = $$V0$$ || {}; | |
| for ($$V1$$ = $o$jscomp$6$$.length; $$V1$$--; $$V0$$[$o$jscomp$6$$[$$V1$$]] = $Parser$$); | |
| return $$V0$$ | |
| } | |
| function $Parser$$() { | |
| this.yy = {} | |
| } | |
| var $$V0$$ = [1, 3], | |
| $$V1$$ = [1, 4], | |
| $$V2$$ = [1, 18], | |
| $$V3$$ = [1, 13], | |
| $$V4$$ = [1, 14], | |
| $$V5$$ = [1, 15], | |
| $$V6$$ = [1, 16], | |
| $$V7$$ = [1, 17], | |
| $$V8$$ = [1, 20], | |
| $$V9$$ = [1, 21], | |
| $$Va$$ = [5, 6, 7, 10], | |
| $$Vb$$ = [5, 6, 7, 10, 15, 16, 17, 18, 19, 20, 21], | |
| $$Vc$$ = [5, 6, 7, 10, 15, 16, 17, 18, 19, | |
| 20, 21, 25 | |
| ], | |
| $parser$$ = { | |
| trace: function() {}, | |
| yy: {}, | |
| $symbols_$: { | |
| error: 2, | |
| result: 3, | |
| search_condition: 4, | |
| EOF: 5, | |
| OR: 6, | |
| AND: 7, | |
| NOT: 8, | |
| "(": 9, | |
| ")": 10, | |
| predicate: 11, | |
| comparison_predicate: 12, | |
| truthy_predicate: 13, | |
| scalar_exp: 14, | |
| EQ: 15, | |
| DEQ: 16, | |
| NEQ: 17, | |
| LT: 18, | |
| LTE: 19, | |
| GT: 20, | |
| GTE: 21, | |
| atom: 22, | |
| field_ref: 23, | |
| literal: 24, | |
| DOT: 25, | |
| field_name: 26, | |
| NAME: 27, | |
| STRING: 28, | |
| NUMERIC: 29, | |
| TRUE: 30, | |
| FALSE: 31, | |
| NULL: 32, | |
| $accept: 0, | |
| $end: 1 | |
| }, | |
| $terminals_$: { | |
| 2: "error", | |
| 5: "EOF", | |
| 6: "OR", | |
| 7: "AND", | |
| 8: "NOT", | |
| 9: "(", | |
| 10: ")", | |
| 15: "EQ", | |
| 16: "DEQ", | |
| 17: "NEQ", | |
| 18: "LT", | |
| 19: "LTE", | |
| 20: "GT", | |
| 21: "GTE", | |
| 25: "DOT", | |
| 27: "NAME", | |
| 28: "STRING", | |
| 29: "NUMERIC", | |
| 30: "TRUE", | |
| 31: "FALSE", | |
| 32: "NULL" | |
| }, | |
| $productions_$: [0, [3, 2], | |
| [4, 3], | |
| [4, 3], | |
| [4, 2], | |
| [4, 3], | |
| [4, 1], | |
| [11, 1], | |
| [11, 1], | |
| [12, 3], | |
| [12, 3], | |
| [12, 3], | |
| [12, 3], | |
| [12, 3], | |
| [12, 3], | |
| [12, 3], | |
| [13, 1], | |
| [14, 1], | |
| [14, 1], | |
| [22, 1], | |
| [23, 3], | |
| [23, 1], | |
| [26, 1], | |
| [24, 1], | |
| [24, 1], | |
| [24, 1], | |
| [24, 1], | |
| [24, 1] | |
| ], | |
| performAction: function($o$jscomp$6$$, $Parser$$, $$V0$$, $$V1$$, $$V2$$, $$V3$$) { | |
| var $$V4$$ = $$V3$$.length - 1; | |
| switch ($$V2$$) { | |
| case 1: | |
| return $$V3$$[$$V4$$ - 1]; | |
| case 2: | |
| this.$$$ = $$V3$$[$$V4$$ - 2] || $$V3$$[$$V4$$]; | |
| break; | |
| case 3: | |
| this.$$$ = $$V3$$[$$V4$$ - | |
| 2] && $$V3$$[$$V4$$]; | |
| break; | |
| case 4: | |
| this.$$$ = !$$V3$$[$$V4$$]; | |
| break; | |
| case 5: | |
| this.$$$ = $$V3$$[$$V4$$ - 1]; | |
| break; | |
| case 6: | |
| case 7: | |
| case 8: | |
| case 17: | |
| case 18: | |
| case 19: | |
| this.$$$ = $$V3$$[$$V4$$]; | |
| break; | |
| case 9: | |
| this.$$$ = $$V3$$[$$V4$$ - 2] === $$V3$$[$$V4$$]; | |
| break; | |
| case 10: | |
| throw Error('"==" is not allowed, use "="'); | |
| case 11: | |
| this.$$$ = $$V3$$[$$V4$$ - 2] !== $$V3$$[$$V4$$]; | |
| break; | |
| case 12: | |
| this.$$$ = typeof $$V3$$[$$V4$$ - 2] == typeof $$V3$$[$$V4$$] && $$V3$$[$$V4$$ - 2] < $$V3$$[$$V4$$]; | |
| break; | |
| case 13: | |
| this.$$$ = typeof $$V3$$[$$V4$$ - 2] == typeof $$V3$$[$$V4$$] && | |
| $$V3$$[$$V4$$ - 2] <= $$V3$$[$$V4$$]; | |
| break; | |
| case 14: | |
| this.$$$ = typeof $$V3$$[$$V4$$ - 2] == typeof $$V3$$[$$V4$$] && $$V3$$[$$V4$$ - 2] > $$V3$$[$$V4$$]; | |
| break; | |
| case 15: | |
| this.$$$ = typeof $$V3$$[$$V4$$ - 2] == typeof $$V3$$[$$V4$$] && $$V3$$[$$V4$$ - 2] >= $$V3$$[$$V4$$]; | |
| break; | |
| case 16: | |
| this.$$$ = void 0 !== $$V3$$[$$V4$$] && null !== $$V3$$[$$V4$$] && "" !== $$V3$$[$$V4$$] && 0 !== $$V3$$[$$V4$$] && !1 !== $$V3$$[$$V4$$]; | |
| break; | |
| case 20: | |
| this.$$$ = "[object Object]" == Object.prototype.toString.call($$V3$$[$$V4$$ - 2]) && $$V3$$[$$V4$$ - 2].hasOwnProperty($$V3$$[$$V4$$]) ? | |
| $$V3$$[$$V4$$ - 2][$$V3$$[$$V4$$]] : null; | |
| break; | |
| case 21: | |
| this.$$$ = void 0 !== $$V1$$[$$V3$$[$$V4$$]] ? $$V1$$[$$V3$$[$$V4$$]] : null; | |
| break; | |
| case 22: | |
| this.$$$ = $o$jscomp$6$$; | |
| break; | |
| case 23: | |
| this.$$$ = $o$jscomp$6$$.substring(1, $o$jscomp$6$$.length - 1); | |
| break; | |
| case 24: | |
| this.$$$ = Number($o$jscomp$6$$); | |
| break; | |
| case 25: | |
| this.$$$ = !0; | |
| break; | |
| case 26: | |
| this.$$$ = !1; | |
| break; | |
| case 27: | |
| this.$$$ = null | |
| } | |
| }, | |
| table: [{ | |
| 3: 1, | |
| 4: 2, | |
| 8: $$V0$$, | |
| 9: $$V1$$, | |
| 11: 5, | |
| 12: 6, | |
| 13: 7, | |
| 14: 8, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 1: [3] | |
| }, { | |
| 5: [1, 19], | |
| 6: $$V8$$, | |
| 7: $$V9$$ | |
| }, { | |
| 4: 22, | |
| 8: $$V0$$, | |
| 9: $$V1$$, | |
| 11: 5, | |
| 12: 6, | |
| 13: 7, | |
| 14: 8, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 4: 23, | |
| 8: $$V0$$, | |
| 9: $$V1$$, | |
| 11: 5, | |
| 12: 6, | |
| 13: 7, | |
| 14: 8, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, | |
| $o$jscomp$6$$($$Va$$, [2, 6]), $o$jscomp$6$$($$Va$$, [2, 7]), $o$jscomp$6$$($$Va$$, [2, 8]), $o$jscomp$6$$($$Va$$, [2, 16], { | |
| 15: [1, 24], | |
| 16: [1, 25], | |
| 17: [1, 26], | |
| 18: [1, 27], | |
| 19: [1, 28], | |
| 20: [1, 29], | |
| 21: [1, 30] | |
| }), $o$jscomp$6$$($$Vb$$, [2, 17]), $o$jscomp$6$$($$Vb$$, [2, 18], { | |
| 25: [1, 31] | |
| }), $o$jscomp$6$$($$Vb$$, [2, 19]), $o$jscomp$6$$($$Vc$$, [2, 21]), $o$jscomp$6$$($$Vb$$, [2, 23]), $o$jscomp$6$$($$Vb$$, [2, 24]), $o$jscomp$6$$($$Vb$$, [2, 25]), $o$jscomp$6$$($$Vb$$, [2, 26]), $o$jscomp$6$$($$Vb$$, [2, 27]), $o$jscomp$6$$($$Vc$$, [2, 22]), { | |
| 1: [2, 1] | |
| }, { | |
| 4: 32, | |
| 8: $$V0$$, | |
| 9: $$V1$$, | |
| 11: 5, | |
| 12: 6, | |
| 13: 7, | |
| 14: 8, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 4: 33, | |
| 8: $$V0$$, | |
| 9: $$V1$$, | |
| 11: 5, | |
| 12: 6, | |
| 13: 7, | |
| 14: 8, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, | |
| $o$jscomp$6$$($$Va$$, [2, 4]), { | |
| 6: $$V8$$, | |
| 7: $$V9$$, | |
| 10: [1, 34] | |
| }, { | |
| 14: 35, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 36, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 37, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 38, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 39, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 40, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 14: 41, | |
| 22: 9, | |
| 23: 10, | |
| 24: 11, | |
| 26: 12, | |
| 27: $$V2$$, | |
| 28: $$V3$$, | |
| 29: $$V4$$, | |
| 30: $$V5$$, | |
| 31: $$V6$$, | |
| 32: $$V7$$ | |
| }, { | |
| 26: 42, | |
| 27: $$V2$$ | |
| }, | |
| $o$jscomp$6$$([5, 6, 10], [2, 2], { | |
| 7: $$V9$$ | |
| }), $o$jscomp$6$$($$Va$$, [2, 3]), $o$jscomp$6$$($$Va$$, [2, 5]), $o$jscomp$6$$($$Va$$, [2, 9]), $o$jscomp$6$$($$Va$$, [2, 10]), $o$jscomp$6$$($$Va$$, [2, 11]), $o$jscomp$6$$($$Va$$, [2, 12]), $o$jscomp$6$$($$Va$$, [2, 13]), $o$jscomp$6$$($$Va$$, [2, 14]), $o$jscomp$6$$($$Va$$, [2, 15]), $o$jscomp$6$$($$Vc$$, [2, 20]) | |
| ], | |
| defaultActions: { | |
| 19: [2, 1] | |
| }, | |
| parseError: function($o$jscomp$6$$, $Parser$$) { | |
| if ($Parser$$.recoverable) this.trace($o$jscomp$6$$); | |
| else throw $o$jscomp$6$$ = Error($o$jscomp$6$$), $o$jscomp$6$$.hash = $Parser$$, $o$jscomp$6$$; | |
| }, | |
| parse: function($o$jscomp$6$$) { | |
| var $Parser$$ = this, | |
| $$V0$$ = [0], | |
| $$V1$$ = [null], | |
| $$V2$$ = [], | |
| $$V3$$ = this.table, | |
| $$V4$$ = "", | |
| $$V8$$ = 0, | |
| $$V7$$ = 0, | |
| $$V9$$ = 0, | |
| $$Va$$ = 2, | |
| $$V6$$ = 1, | |
| $$Vb$$ = $$V2$$.slice.call(arguments, 1), | |
| $$V5$$ = Object.create(this.lexer), | |
| $parser$$ = { | |
| yy: {} | |
| }; | |
| for ($action$jscomp$5_k$jscomp$10_newState$jscomp$1$$ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, | |
| $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$) && ($parser$$.yy[$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$] = this.yy[$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$]); | |
| $$V5$$.setInput($o$jscomp$6$$, $parser$$.yy); | |
| $parser$$.yy.lexer = $$V5$$; | |
| $parser$$.yy.parser = this; | |
| "undefined" == typeof $$V5$$.yylloc && ($$V5$$.yylloc = {}); | |
| var $$Vc$$ = $$V5$$.yylloc; | |
| $$V2$$.push($$Vc$$); | |
| var $lexer$$ = $$V5$$.options && $$V5$$.options.ranges; | |
| this.parseError = "function" === typeof $parser$$.yy.parseError ? $parser$$.yy.parseError : | |
| Object.getPrototypeOf(this).parseError; | |
| var $input$jscomp$11$$ = function() { | |
| var $o$jscomp$6$$ = $$V5$$.lex() || $$V6$$; | |
| "number" !== typeof $o$jscomp$6$$ && ($o$jscomp$6$$ = $Parser$$.$symbols_$[$o$jscomp$6$$] || $o$jscomp$6$$); | |
| return $o$jscomp$6$$ | |
| }; | |
| for (var $symbol$jscomp$1$$, $preErrorSymbol$$, $r$jscomp$4_state$jscomp$7$$, $yyval$$ = {}, $p$jscomp$8$$, $expected$jscomp$1_len$jscomp$1$$;;) { | |
| $r$jscomp$4_state$jscomp$7$$ = $$V0$$[$$V0$$.length - 1]; | |
| if (this.defaultActions[$r$jscomp$4_state$jscomp$7$$]) var $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$ = | |
| this.defaultActions[$r$jscomp$4_state$jscomp$7$$]; | |
| else { | |
| if (null === $symbol$jscomp$1$$ || "undefined" == typeof $symbol$jscomp$1$$) $symbol$jscomp$1$$ = $input$jscomp$11$$(); | |
| $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$ = $$V3$$[$r$jscomp$4_state$jscomp$7$$] && $$V3$$[$r$jscomp$4_state$jscomp$7$$][$symbol$jscomp$1$$] | |
| } if ("undefined" === typeof $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$ || !$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$.length || !$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[0]) { | |
| var $errStr$$ = | |
| ""; | |
| $expected$jscomp$1_len$jscomp$1$$ = []; | |
| for ($p$jscomp$8$$ in $$V3$$[$r$jscomp$4_state$jscomp$7$$]) this.$terminals_$[$p$jscomp$8$$] && $p$jscomp$8$$ > $$Va$$ && $expected$jscomp$1_len$jscomp$1$$.push("'" + this.$terminals_$[$p$jscomp$8$$] + "'"); | |
| $errStr$$ = $$V5$$.showPosition ? "Parse error on line " + ($$V8$$ + 1) + ":\n" + $$V5$$.showPosition() + "\nExpecting " + $expected$jscomp$1_len$jscomp$1$$.join(", ") + ", got '" + (this.$terminals_$[$symbol$jscomp$1$$] || $symbol$jscomp$1$$) + "'" : "Parse error on line " + ($$V8$$ + 1) + ": Unexpected " + | |
| ($symbol$jscomp$1$$ == $$V6$$ ? "end of input" : "'" + (this.$terminals_$[$symbol$jscomp$1$$] || $symbol$jscomp$1$$) + "'"); | |
| this.parseError($errStr$$, { | |
| text: $$V5$$.match, | |
| token: this.$terminals_$[$symbol$jscomp$1$$] || $symbol$jscomp$1$$, | |
| line: $$V5$$.yylineno, | |
| loc: $$Vc$$, | |
| expected: $expected$jscomp$1_len$jscomp$1$$ | |
| }) | |
| } | |
| if ($action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[0] instanceof Array && 1 < $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$.length) throw Error("Parse Error: multiple actions possible at state: " + $r$jscomp$4_state$jscomp$7$$ + | |
| ", token: " + $symbol$jscomp$1$$); | |
| switch ($action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[0]) { | |
| case 1: | |
| $$V0$$.push($symbol$jscomp$1$$); | |
| $$V1$$.push($$V5$$.yytext); | |
| $$V2$$.push($$V5$$.yylloc); | |
| $$V0$$.push($action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[1]); | |
| $symbol$jscomp$1$$ = null; | |
| $preErrorSymbol$$ ? ($symbol$jscomp$1$$ = $preErrorSymbol$$, $preErrorSymbol$$ = null) : ($$V7$$ = $$V5$$.yyleng, $$V4$$ = $$V5$$.yytext, $$V8$$ = $$V5$$.yylineno, $$Vc$$ = $$V5$$.yylloc, 0 < $$V9$$ && $$V9$$--); | |
| break; | |
| case 2: | |
| $expected$jscomp$1_len$jscomp$1$$ = | |
| this.$productions_$[$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[1]][1]; | |
| $yyval$$.$$$ = $$V1$$[$$V1$$.length - $expected$jscomp$1_len$jscomp$1$$]; | |
| $yyval$$.$_$$ = { | |
| first_line: $$V2$$[$$V2$$.length - ($expected$jscomp$1_len$jscomp$1$$ || 1)].first_line, | |
| last_line: $$V2$$[$$V2$$.length - 1].last_line, | |
| first_column: $$V2$$[$$V2$$.length - ($expected$jscomp$1_len$jscomp$1$$ || 1)].first_column, | |
| last_column: $$V2$$[$$V2$$.length - 1].last_column | |
| }; | |
| $lexer$$ && ($yyval$$.$_$$.range = [$$V2$$[$$V2$$.length - ($expected$jscomp$1_len$jscomp$1$$ || | |
| 1)].range[0], $$V2$$[$$V2$$.length - 1].range[1]]); | |
| $r$jscomp$4_state$jscomp$7$$ = this.performAction.apply($yyval$$, [$$V4$$, $$V7$$, $$V8$$, $parser$$.yy, $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[1], $$V1$$, $$V2$$].concat($$Vb$$)); | |
| if ("undefined" !== typeof $r$jscomp$4_state$jscomp$7$$) return $r$jscomp$4_state$jscomp$7$$; | |
| $expected$jscomp$1_len$jscomp$1$$ && ($$V0$$ = $$V0$$.slice(0, -2 * $expected$jscomp$1_len$jscomp$1$$), $$V1$$ = $$V1$$.slice(0, -1 * $expected$jscomp$1_len$jscomp$1$$), $$V2$$ = $$V2$$.slice(0, -1 * $expected$jscomp$1_len$jscomp$1$$)); | |
| $$V0$$.push(this.$productions_$[$action$jscomp$5_k$jscomp$10_newState$jscomp$1$$[1]][0]); | |
| $$V1$$.push($yyval$$.$$$); | |
| $$V2$$.push($yyval$$.$_$$); | |
| $action$jscomp$5_k$jscomp$10_newState$jscomp$1$$ = $$V3$$[$$V0$$[$$V0$$.length - 2]][$$V0$$[$$V0$$.length - 1]]; | |
| $$V0$$.push($action$jscomp$5_k$jscomp$10_newState$jscomp$1$$); | |
| break; | |
| case 3: | |
| return !0 | |
| } | |
| } | |
| } | |
| }, $lexer$$ = function() { | |
| return { | |
| EOF: 1, | |
| parseError: function($o$jscomp$6$$, $Parser$$) { | |
| if (this.yy.parser) this.yy.parser.parseError($o$jscomp$6$$, $Parser$$); | |
| else throw Error($o$jscomp$6$$); | |
| }, | |
| setInput: function($o$jscomp$6$$, $Parser$$) { | |
| this.yy = $Parser$$ || this.yy || {}; | |
| this._input = $o$jscomp$6$$; | |
| this._more = this._backtrack = this.done = !1; | |
| this.yylineno = this.yyleng = 0; | |
| this.yytext = this.matched = this.match = ""; | |
| this.conditionStack = ["INITIAL"]; | |
| this.yylloc = { | |
| first_line: 1, | |
| first_column: 0, | |
| last_line: 1, | |
| last_column: 0 | |
| }; | |
| this.options.ranges && (this.yylloc.range = [0, 0]); | |
| this.offset = 0; | |
| return this | |
| }, | |
| input: function() { | |
| var $o$jscomp$6$$ = this._input[0]; | |
| this.yytext += $o$jscomp$6$$; | |
| this.yyleng++; | |
| this.offset++; | |
| this.match += $o$jscomp$6$$; | |
| this.matched += $o$jscomp$6$$; | |
| var $Parser$$ = $o$jscomp$6$$.match(/(?:\r\n?|\n).*/g); | |
| $Parser$$ ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++; | |
| this.options.ranges && this.yylloc.range[1]++; | |
| this._input = this._input.slice(1); | |
| return $o$jscomp$6$$ | |
| }, | |
| unput: function($o$jscomp$6$$) { | |
| var $Parser$$ = $o$jscomp$6$$.length, | |
| $$V0$$ = $o$jscomp$6$$.split(/(?:\r\n?|\n)/g); | |
| this._input = $o$jscomp$6$$ + this._input; | |
| this.yytext = this.yytext.substr(0, this.yytext.length - $Parser$$); | |
| this.offset -= $Parser$$; | |
| var $$V1$$ = | |
| this.match.split(/(?:\r\n?|\n)/g); | |
| this.match = this.match.substr(0, this.match.length - 1); | |
| this.matched = this.matched.substr(0, this.matched.length - 1); | |
| $$V0$$.length - 1 && (this.yylineno -= $$V0$$.length - 1); | |
| $o$jscomp$6$$ = this.yylloc.range; | |
| this.yylloc = { | |
| first_line: this.yylloc.first_line, | |
| last_line: this.yylineno + 1, | |
| first_column: this.yylloc.first_column, | |
| last_column: $$V0$$ ? ($$V0$$.length === $$V1$$.length ? this.yylloc.first_column : 0) + $$V1$$[$$V1$$.length - $$V0$$.length].length - $$V0$$[0].length : this.yylloc.first_column - $Parser$$ | |
| }; | |
| this.options.ranges && (this.yylloc.range = [$o$jscomp$6$$[0], $o$jscomp$6$$[0] + this.yyleng - $Parser$$]); | |
| this.yyleng = this.yytext.length; | |
| return this | |
| }, | |
| more: function() { | |
| this._more = !0; | |
| return this | |
| }, | |
| reject: function() { | |
| if (this.options.backtrack_lexer) this._backtrack = !0; | |
| else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { | |
| text: "", | |
| token: null, | |
| line: this.yylineno | |
| }); | |
| return this | |
| }, | |
| less: function($o$jscomp$6$$) { | |
| this.unput(this.match.slice($o$jscomp$6$$)) | |
| }, | |
| pastInput: function() { | |
| var $o$jscomp$6$$ = this.matched.substr(0, this.matched.length - this.match.length); | |
| return (20 < $o$jscomp$6$$.length ? "..." : "") + $o$jscomp$6$$.substr(-20).replace(/\n/g, "") | |
| }, | |
| upcomingInput: function() { | |
| var $o$jscomp$6$$ = this.match; | |
| 20 > $o$jscomp$6$$.length && ($o$jscomp$6$$ += this._input.substr(0, 20 - $o$jscomp$6$$.length)); | |
| return ($o$jscomp$6$$.substr(0, 20) + (20 < $o$jscomp$6$$.length ? "..." : "")).replace(/\n/g, "") | |
| }, | |
| showPosition: function() { | |
| var $o$jscomp$6$$ = this.pastInput(), | |
| $Parser$$ = Array($o$jscomp$6$$.length + 1).join("-"); | |
| return $o$jscomp$6$$ + this.upcomingInput() + "\n" + $Parser$$ + "^" | |
| }, | |
| test_match: function($o$jscomp$6$$, $Parser$$) { | |
| var $$V0$$; | |
| if (this.options.backtrack_lexer) { | |
| var $$V1$$ = { | |
| yylineno: this.yylineno, | |
| yylloc: { | |
| first_line: this.yylloc.first_line, | |
| last_line: this.last_line, | |
| first_column: this.yylloc.first_column, | |
| last_column: this.yylloc.last_column | |
| }, | |
| yytext: this.yytext, | |
| match: this.match, | |
| matches: this.matches, | |
| matched: this.matched, | |
| yyleng: this.yyleng, | |
| offset: this.offset, | |
| _more: this._more, | |
| _input: this._input, | |
| yy: this.yy, | |
| conditionStack: this.conditionStack.slice(0), | |
| done: this.done | |
| }; | |
| this.options.ranges && ($$V1$$.yylloc.range = this.yylloc.range.slice(0)) | |
| } | |
| if ($$V0$$ = $o$jscomp$6$$[0].match(/(?:\r\n?|\n).*/g)) this.yylineno += $$V0$$.length; | |
| this.yylloc = { | |
| first_line: this.yylloc.last_line, | |
| last_line: this.yylineno + 1, | |
| first_column: this.yylloc.last_column, | |
| last_column: $$V0$$ ? $$V0$$[$$V0$$.length - 1].length - $$V0$$[$$V0$$.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + $o$jscomp$6$$[0].length | |
| }; | |
| this.yytext += $o$jscomp$6$$[0]; | |
| this.match += $o$jscomp$6$$[0]; | |
| this.matches = $o$jscomp$6$$; | |
| this.yyleng = this.yytext.length; | |
| this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]); | |
| this._backtrack = this._more = !1; | |
| this._input = this._input.slice($o$jscomp$6$$[0].length); | |
| this.matched += $o$jscomp$6$$[0]; | |
| $o$jscomp$6$$ = this.performAction.call(this, this.yy, this, $Parser$$, this.conditionStack[this.conditionStack.length - 1]); | |
| this.done && this._input && | |
| (this.done = !1); | |
| if ($o$jscomp$6$$) return $o$jscomp$6$$; | |
| if (this._backtrack) for (var $$V2$$ in $$V1$$) this[$$V2$$] = $$V1$$[$$V2$$]; | |
| return !1 | |
| }, | |
| next: function() { | |
| if (this.done) return this.EOF; | |
| this._input || (this.done = !0); | |
| var $o$jscomp$6$$; | |
| this._more || (this.match = this.yytext = ""); | |
| for (var $Parser$$ = this._currentRules(), $$V0$$ = 0; $$V0$$ < $Parser$$.length; $$V0$$++) if (($o$jscomp$6$$ = this._input.match(this.rules[$Parser$$[$$V0$$]])) && (!$$V1$$ || $o$jscomp$6$$[0].length > $$V1$$[0].length)) { | |
| var $$V1$$ = $o$jscomp$6$$; | |
| var $$V2$$ = | |
| $$V0$$; | |
| if (this.options.backtrack_lexer) { | |
| $$V1$$ = this.test_match($o$jscomp$6$$, $Parser$$[$$V0$$]); | |
| if (!1 !== $$V1$$) return $$V1$$; | |
| if (this._backtrack) $$V1$$ = !1; | |
| else return !1 | |
| } else if (!this.options.flex) break | |
| } | |
| return $$V1$$ ? ($$V1$$ = this.test_match($$V1$$, $Parser$$[$$V2$$]), !1 !== $$V1$$ ? $$V1$$ : !1) : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { | |
| text: "", | |
| token: null, | |
| line: this.yylineno | |
| }) | |
| }, | |
| lex: function() { | |
| var $o$jscomp$6$$ = this.next(); | |
| return $o$jscomp$6$$ ? $o$jscomp$6$$ : this.lex() | |
| }, | |
| begin: function($o$jscomp$6$$) { | |
| this.conditionStack.push($o$jscomp$6$$) | |
| }, | |
| popState: function() { | |
| return 0 < this.conditionStack.length - 1 ? this.conditionStack.pop() : this.conditionStack[0] | |
| }, | |
| _currentRules: function() { | |
| return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules | |
| }, | |
| topState: function($o$jscomp$6$$) { | |
| $o$jscomp$6$$ = this.conditionStack.length - | |
| 1 - Math.abs($o$jscomp$6$$ || 0); | |
| return 0 <= $o$jscomp$6$$ ? this.conditionStack[$o$jscomp$6$$] : "INITIAL" | |
| }, | |
| pushState: function($o$jscomp$6$$) { | |
| this.begin($o$jscomp$6$$) | |
| }, | |
| stateStackSize: function() { | |
| return this.conditionStack.length | |
| }, | |
| options: {}, | |
| performAction: function($o$jscomp$6$$, $Parser$$, $$V0$$) { | |
| switch ($$V0$$) { | |
| case 1: | |
| return 7; | |
| case 2: | |
| return 6; | |
| case 3: | |
| return 8; | |
| case 4: | |
| return 32; | |
| case 5: | |
| return 30; | |
| case 6: | |
| return 30; | |
| case 7: | |
| return 31; | |
| case 8: | |
| return 31; | |
| case 9: | |
| return 9; | |
| case 10: | |
| return 10; | |
| case 11: | |
| return "|"; | |
| case 12: | |
| return 19; | |
| case 13: | |
| return 18; | |
| case 14: | |
| return 21; | |
| case 15: | |
| return 20; | |
| case 16: | |
| return 17; | |
| case 17: | |
| return 16; | |
| case 18: | |
| return 15; | |
| case 19: | |
| return 29; | |
| case 20: | |
| return 27; | |
| case 21: | |
| return 28; | |
| case 22: | |
| return 28; | |
| case 23: | |
| return 25; | |
| case 24: | |
| return "INVALID"; | |
| case 25: | |
| return 5 | |
| } | |
| }, | |
| rules: [/^(?:\s+)/, /^(?:AND\b)/, /^(?:OR\b)/, /^(?:NOT\b)/, /^(?:NULL\b)/, /^(?:TRUE\b)/, /^(?:true\b)/, /^(?:FALSE\b)/, /^(?:false\b)/, /^(?:\()/, /^(?:\))/, /^(?:\|)/, /^(?:<=)/, /^(?:<)/, /^(?:>=)/, /^(?:>)/, /^(?:!=)/, /^(?:==)/, /^(?:=)/, /^(?:-?[0-9]+(\.[0-9]+)?\b)/, /^(?:[a-zA-Z_][a-zA-Z0-9_]*)/, | |
| /^(?:'[^']*')/, /^(?:"[^"]*")/, /^(?:\.)/, /^(?:.)/, /^(?:$)/ | |
| ], | |
| conditions: { | |
| INITIAL: { | |
| rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], | |
| inclusive: !0 | |
| } | |
| } | |
| } | |
| }(); | |
| $parser$$.lexer = $lexer$$; | |
| $Parser$$.prototype = $parser$$; | |
| $parser$$.Parser = $Parser$$; | |
| return new $Parser$$ | |
| }(); | |
| function $AccessClientAdapter$$module$build$all$v0$amp_access_client$$($ampdoc$jscomp$10$$, $configJson$$, $context$jscomp$2$$) { | |
| this.ampdoc = $ampdoc$jscomp$10$$; | |
| this.$context_$ = $context$jscomp$2$$; | |
| this.$authorizationUrl_$ = $user$$module$src$log$$().assert($configJson$$.authorization, '"authorization" URL must be specified'); | |
| $assertHttpsUrl$$module$src$url$$(this.$authorizationUrl_$, '"authorization"'); | |
| this.$isPingbackEnabled_$ = !$configJson$$.noPingback; | |
| this.$pingbackUrl_$ = $configJson$$.pingback; | |
| this.$isPingbackEnabled_$ && | |
| ($user$$module$src$log$$().assert(this.$pingbackUrl_$, '"pingback" URL must be specified'), $assertHttpsUrl$$module$src$url$$(this.$pingbackUrl_$, '"pingback"')); | |
| this.$authorizationTimeout_$ = this.$buildConfigAuthorizationTimeout_$($configJson$$); | |
| this.$xhr_$ = $Services$$module$src$services$xhrFor$$($ampdoc$jscomp$10$$.win); | |
| this.$timer_$ = $Services$$module$src$services$timerFor$$($ampdoc$jscomp$10$$.win) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessClientAdapter$$module$build$all$v0$amp_access_client$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$buildConfigAuthorizationTimeout_$ = function($configJson$jscomp$1_timeout$jscomp$1$$) { | |
| if (!$configJson$jscomp$1_timeout$jscomp$1$$.authorizationTimeout) return 3E3; | |
| $configJson$jscomp$1_timeout$jscomp$1$$ = $configJson$jscomp$1_timeout$jscomp$1$$.authorizationTimeout; | |
| $user$$module$src$log$$().assert("number" == typeof $configJson$jscomp$1_timeout$jscomp$1$$, '"authorizationTimeout" must be a number'); | |
| $getMode$$module$src$mode$$().development || ($configJson$jscomp$1_timeout$jscomp$1$$ = | |
| Math.min($configJson$jscomp$1_timeout$jscomp$1$$, 3E3)); | |
| return $configJson$jscomp$1_timeout$jscomp$1$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getConfig = function() { | |
| return { | |
| authorizationUrl: this.$authorizationUrl_$, | |
| pingbackEnabled: this.$isPingbackEnabled_$, | |
| pingbackUrl: this.$pingbackUrl_$, | |
| authorizationTimeout: this.$authorizationTimeout_$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAuthorizationUrl = function() { | |
| return this.$authorizationUrl_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAuthorizationEnabled = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAuthorizationTimeout = function() { | |
| return this.$authorizationTimeout_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.authorize = function() { | |
| var $$jscomp$this$jscomp$35$$ = this, | |
| $urlPromise$$ = this.$context_$.buildUrl(this.$authorizationUrl_$, !1); | |
| return $urlPromise$$.then(function($urlPromise$$) { | |
| return $$jscomp$this$jscomp$35$$.$timer_$.timeoutPromise($$jscomp$this$jscomp$35$$.$authorizationTimeout_$, $$jscomp$this$jscomp$35$$.$xhr_$.fetchJson($urlPromise$$, { | |
| credentials: "include" | |
| })).then(function($$jscomp$this$jscomp$35$$) { | |
| return $$jscomp$this$jscomp$35$$.json() | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isPingbackEnabled = function() { | |
| return this.$isPingbackEnabled_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.pingback = function() { | |
| var $$jscomp$this$jscomp$36$$ = this; | |
| return this.$context_$.buildUrl(this.$pingbackUrl_$, !0).then(function($url$jscomp$46$$) { | |
| return $$jscomp$this$jscomp$36$$.$xhr_$.sendSignal($url$jscomp$46$$, { | |
| method: "POST", | |
| credentials: "include", | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded" | |
| }, | |
| body: "" | |
| }) | |
| }) | |
| }; | |
| function $AccessOtherAdapter$$module$build$all$v0$amp_access_other$$($ampdoc$jscomp$11$$, $configJson$jscomp$2$$, $context$jscomp$3$$) { | |
| this.ampdoc = $ampdoc$jscomp$11$$; | |
| this.$context_$ = $context$jscomp$3$$; | |
| this.$authorizationResponse_$ = $configJson$jscomp$2$$.authorizationFallbackResponse || null; | |
| this.$isProxyOrigin_$ = $isProxyOrigin$$module$src$url$$($ampdoc$jscomp$11$$.win.location) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessOtherAdapter$$module$build$all$v0$amp_access_other$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getConfig = function() { | |
| return { | |
| authorizationResponse: this.$authorizationResponse_$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAuthorizationEnabled = function() { | |
| return !!this.$authorizationResponse_$ && !this.$isProxyOrigin_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.authorize = function() { | |
| return Promise.resolve(this.$authorizationResponse_$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isPingbackEnabled = function() { | |
| return !1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.pingback = function() { | |
| return Promise.resolve() | |
| }; | |
| function $pemToBytes$$module$src$utils$pem$$($pem$$) { | |
| $pem$$ = $pem$$.trim(); | |
| $pem$$ = $pem$$.replace(/^\-+BEGIN[^-]*\-+/, ""); | |
| $pem$$ = $pem$$.replace(/\-+END[^-]*\-+$/, ""); | |
| $pem$$ = $pem$$.replace(/[\r\n]/g, "").trim(); | |
| return $stringToBytes$$module$src$utils$bytes$$(atob($pem$$)) | |
| }; | |
| function $JwtHelper$$module$build$all$v0$jwt$$($win$jscomp$132$$) { | |
| this.win = $win$jscomp$132$$; | |
| this.$subtle_$ = $win$jscomp$132$$.crypto && ($win$jscomp$132$$.crypto.subtle || $win$jscomp$132$$.crypto.webkitSubtle) || null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $JwtHelper$$module$build$all$v0$jwt$$.prototype; | |
| $JSCompiler_prototypeAlias$$.decode = function($encodedToken$$) { | |
| return this.$decodeInternal_$($encodedToken$$).payload | |
| }; | |
| $JSCompiler_prototypeAlias$$.isVerificationSupported = function() { | |
| return !!this.$subtle_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.decodeAndVerify = function($encodedToken$jscomp$1$$, $pemPromise$$) { | |
| var $$jscomp$this$jscomp$37$$ = this; | |
| if (!this.$subtle_$) throw Error("Crypto is not supported on this platform"); | |
| var $decodedPromise$$ = new Promise(function($pemPromise$$) { | |
| return $pemPromise$$($$jscomp$this$jscomp$37$$.$decodeInternal_$($encodedToken$jscomp$1$$)) | |
| }); | |
| return $decodedPromise$$.then(function($encodedToken$jscomp$1$$) { | |
| var $decodedPromise$$ = $encodedToken$jscomp$1$$.header.alg; | |
| if (!$decodedPromise$$ || | |
| "RS256" != $decodedPromise$$) throw Error("Only alg=RS256 is supported"); | |
| return $$jscomp$this$jscomp$37$$.$importKey_$($pemPromise$$).then(function($pemPromise$$) { | |
| var $decodedPromise$$ = $base64UrlDecodeToBytes$$module$src$utils$base64$$($encodedToken$jscomp$1$$.sig); | |
| return $$jscomp$this$jscomp$37$$.$subtle_$.verify({ | |
| name: "RSASSA-PKCS1-v1_5" | |
| }, $pemPromise$$, $decodedPromise$$, $stringToBytes$$module$src$utils$bytes$$($encodedToken$jscomp$1$$.verifiable)) | |
| }).then(function($pemPromise$$) { | |
| if ($pemPromise$$) return $encodedToken$jscomp$1$$.payload; | |
| throw Error("Signature verification failed"); | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$decodeInternal_$ = function($encodedToken$jscomp$2$$) { | |
| function $invalidToken$$() { | |
| throw Error('Invalid token: "' + $encodedToken$jscomp$2$$ + '"'); | |
| } | |
| var $parts$jscomp$3$$ = $encodedToken$jscomp$2$$.split("."); | |
| 3 != $parts$jscomp$3$$.length && $invalidToken$$(); | |
| var $headerUtf8Bytes$$ = $base64UrlDecodeToBytes$$module$src$utils$base64$$($parts$jscomp$3$$[0]), | |
| $payloadUtf8Bytes$$ = $base64UrlDecodeToBytes$$module$src$utils$base64$$($parts$jscomp$3$$[1]); | |
| return { | |
| header: $tryParseJson$$module$src$json$$($utf8DecodeSync$$module$src$utils$bytes$$($headerUtf8Bytes$$), | |
| $invalidToken$$), | |
| payload: $tryParseJson$$module$src$json$$($utf8DecodeSync$$module$src$utils$bytes$$($payloadUtf8Bytes$$), $invalidToken$$), | |
| verifiable: $parts$jscomp$3$$[0] + "." + $parts$jscomp$3$$[1], | |
| sig: $parts$jscomp$3$$[2] | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.$importKey_$ = function($pemPromise$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$38$$ = this; | |
| return $pemPromise$jscomp$1$$.then(function($pemPromise$jscomp$1$$) { | |
| return $$jscomp$this$jscomp$38$$.$subtle_$.importKey("spki", $pemToBytes$$module$src$utils$pem$$($pemPromise$jscomp$1$$), { | |
| name: "RSASSA-PKCS1-v1_5", | |
| hash: { | |
| name: "SHA-256" | |
| } | |
| }, !1, ["verify"]) | |
| }) | |
| }; | |
| function $AccessServerJwtAdapter$$module$build$all$v0$amp_access_server_jwt$$($ampdoc$jscomp$12$$, $configJson$jscomp$3$$, $context$jscomp$4$$) { | |
| this.ampdoc = $ampdoc$jscomp$12$$; | |
| this.$context_$ = $context$jscomp$4$$; | |
| this.$clientAdapter_$ = new $AccessClientAdapter$$module$build$all$v0$amp_access_client$$($ampdoc$jscomp$12$$, $configJson$jscomp$3$$, $context$jscomp$4$$); | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$($ampdoc$jscomp$12$$); | |
| this.$xhr_$ = $Services$$module$src$services$xhrFor$$($ampdoc$jscomp$12$$.win); | |
| this.$timer_$ = $Services$$module$src$services$timerFor$$($ampdoc$jscomp$12$$.win); | |
| this.$vsync_$ = $Services$$module$src$services$vsyncFor$$($ampdoc$jscomp$12$$.win); | |
| var $stateElement$$ = $ampdoc$jscomp$12$$.getRootNode().querySelector('meta[name="i-amphtml-access-state"]'); | |
| this.$serverState_$ = $stateElement$$ ? $stateElement$$.getAttribute("content") : null; | |
| var $isInExperiment$$ = $isExperimentOn$$module$src$experiments$$($ampdoc$jscomp$12$$.win, "amp-access-server-jwt"); | |
| this.$isProxyOrigin_$ = $isProxyOrigin$$module$src$url$$($ampdoc$jscomp$12$$.win.location) || | |
| $isInExperiment$$; | |
| var $serviceUrlOverride$$ = $isInExperiment$$ ? this.$viewer_$.getParam("serverAccessService") : null; | |
| this.$serviceUrl_$ = $serviceUrlOverride$$ || $removeFragment$$module$src$url$$($ampdoc$jscomp$12$$.win.location.href); | |
| this.$key_$ = $configJson$jscomp$3$$.publicKey || null; | |
| this.$keyUrl_$ = $configJson$jscomp$3$$.publicKeyUrl || null; | |
| $user$$module$src$log$$().assert(this.$key_$ || this.$keyUrl_$, '"publicKey" or "publicKeyUrl" must be specified'); | |
| this.$keyUrl_$ && $assertHttpsUrl$$module$src$url$$(this.$keyUrl_$, | |
| '"publicKeyUrl"'); | |
| this.$key_$ && this.$keyUrl_$ && $user$$module$src$log$$().warn("amp-access-server-jwt", 'Both "publicKey" and "publicKeyUrl" specified. The "publicKeyUrl" will be ignored.'); | |
| this.$jwtHelper_$ = new $JwtHelper$$module$build$all$v0$jwt$$($ampdoc$jscomp$12$$.win) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessServerJwtAdapter$$module$build$all$v0$amp_access_server_jwt$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getConfig = function() { | |
| return { | |
| client: this.$clientAdapter_$.getConfig(), | |
| proxy: this.$isProxyOrigin_$, | |
| serverState: this.$serverState_$, | |
| publicKey: this.$key_$, | |
| publicKeyUrl: this.$keyUrl_$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAuthorizationEnabled = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.authorize = function() { | |
| return this.$isProxyOrigin_$ && this.$serverState_$ ? this.$authorizeOnServer_$() : this.$authorizeOnClient_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.isPingbackEnabled = function() { | |
| return this.$clientAdapter_$.isPingbackEnabled() | |
| }; | |
| $JSCompiler_prototypeAlias$$.pingback = function() { | |
| return this.$clientAdapter_$.pingback() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$fetchJwt_$ = function() { | |
| var $$jscomp$this$jscomp$39$$ = this, | |
| $jwtPromise$$ = this.$context_$.buildUrl(this.$clientAdapter_$.getAuthorizationUrl(), !1).then(function($jwtPromise$$) { | |
| return $$jscomp$this$jscomp$39$$.$timer_$.timeoutPromise(3E3, $$jscomp$this$jscomp$39$$.$xhr_$.fetchText($jwtPromise$$, { | |
| credentials: "include" | |
| })) | |
| }).then(function($$jscomp$this$jscomp$39$$) { | |
| return $$jscomp$this$jscomp$39$$.text() | |
| }).then(function($jwtPromise$$) { | |
| var $encoded$jscomp$1$$ = $$jscomp$this$jscomp$39$$.$jwtHelper_$.decode($jwtPromise$$); | |
| $user$$module$src$log$$().assert($encoded$jscomp$1$$.amp_authdata, '"amp_authdata" must be present in JWT'); | |
| return { | |
| encoded: $jwtPromise$$, | |
| jwt: $encoded$jscomp$1$$ | |
| } | |
| }); | |
| $getMode$$module$src$mode$$().development && (this.$jwtHelper_$.isVerificationSupported() ? $jwtPromise$$ = $jwtPromise$$.then(function($jwtPromise$$) { | |
| return $$jscomp$this$jscomp$39$$.$jwtHelper_$.decodeAndVerify($jwtPromise$$.encoded, $$jscomp$this$jscomp$39$$.$loadKeyPem_$()).then(function() { | |
| return $jwtPromise$$ | |
| }) | |
| }) : $user$$module$src$log$$().warn("amp-access-server-jwt", | |
| "Cannot verify signature on this browser since it doesn't support WebCrypto APIs"), $jwtPromise$$ = $jwtPromise$$.then(function($jwtPromise$$) { | |
| $$jscomp$this$jscomp$39$$.$validateJwt_$($jwtPromise$$.jwt); | |
| return $jwtPromise$$ | |
| })); | |
| return $jwtPromise$$. | |
| catch (function($$jscomp$this$jscomp$39$$) { | |
| throw $user$$module$src$log$$().createError("JWT fetch or validation failed: ", $$jscomp$this$jscomp$39$$); | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$loadKeyPem_$ = function() { | |
| return this.$key_$ ? Promise.resolve(this.$key_$) : this.$xhr_$.fetchText(this.$keyUrl_$).then(function($res$jscomp$4$$) { | |
| return $res$jscomp$4$$.text() | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$validateJwt_$ = function($i$jscomp$62_jwt$jscomp$1$$) { | |
| var $now$$ = Date.now(), | |
| $exp$jscomp$1$$ = $i$jscomp$62_jwt$jscomp$1$$.exp; | |
| $user$$module$src$log$$().assert($exp$jscomp$1$$, '"exp" field must be specified'); | |
| $user$$module$src$log$$().assert(1E3 * parseFloat($exp$jscomp$1$$) > $now$$, "token has expired: %s", $exp$jscomp$1$$); | |
| var $aud$$ = $i$jscomp$62_jwt$jscomp$1$$.aud; | |
| $user$$module$src$log$$().assert($aud$$, '"aud" field must be specified'); | |
| var $audForAmp$$ = !1; | |
| if ($isArray$$module$src$types$$($aud$$)) for ($i$jscomp$62_jwt$jscomp$1$$ = | |
| 0; $i$jscomp$62_jwt$jscomp$1$$ < $aud$$.length; $i$jscomp$62_jwt$jscomp$1$$++) { | |
| if ("ampproject.org" == $aud$$[$i$jscomp$62_jwt$jscomp$1$$]) { | |
| $audForAmp$$ = !0; | |
| break | |
| } | |
| } else $audForAmp$$ = "ampproject.org" == $aud$$; | |
| $user$$module$src$log$$().assert($audForAmp$$, '"aud" must be "%s": %s', "ampproject.org", $aud$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$authorizeOnClient_$ = function() { | |
| return this.$fetchJwt_$().then(function($resp$jscomp$3$$) { | |
| return $resp$jscomp$3$$.jwt.amp_authdata | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$authorizeOnServer_$ = function() { | |
| var $$jscomp$this$jscomp$40$$ = this; | |
| return this.$fetchJwt_$().then(function($request$jscomp$11_resp$jscomp$4$$) { | |
| var $encoded$jscomp$2$$ = $request$jscomp$11_resp$jscomp$4$$.encoded, | |
| $accessData$$ = $request$jscomp$11_resp$jscomp$4$$.jwt.amp_authdata; | |
| $request$jscomp$11_resp$jscomp$4$$ = $serializeQueryString$$module$src$url$$($dict$$module$src$utils$object$$({ | |
| url: $removeFragment$$module$src$url$$($$jscomp$this$jscomp$40$$.ampdoc.win.location.href), | |
| state: $$jscomp$this$jscomp$40$$.$serverState_$, | |
| jwt: $encoded$jscomp$2$$ | |
| })); | |
| return $$jscomp$this$jscomp$40$$.$timer_$.timeoutPromise(3E3, $$jscomp$this$jscomp$40$$.$xhr_$.fetchDocument($$jscomp$this$jscomp$40$$.$serviceUrl_$, { | |
| method: "POST", | |
| body: $request$jscomp$11_resp$jscomp$4$$, | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded" | |
| }, | |
| requireAmpResponseSourceOrigin: !1 | |
| })).then(function($request$jscomp$11_resp$jscomp$4$$) { | |
| return $$jscomp$this$jscomp$40$$.$replaceSections_$($request$jscomp$11_resp$jscomp$4$$) | |
| }).then(function() { | |
| return $accessData$$ | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$replaceSections_$ = function($doc$jscomp$23$$) { | |
| var $$jscomp$this$jscomp$41$$ = this, | |
| $sections$$ = $doc$jscomp$23$$.querySelectorAll("[i-amphtml-access-id]"); | |
| return this.$vsync_$.mutatePromise(function() { | |
| for (var $doc$jscomp$23$$ = 0; $doc$jscomp$23$$ < $sections$$.length; $doc$jscomp$23$$++) { | |
| var $section$jscomp$1$$ = $sections$$[$doc$jscomp$23$$], | |
| $sectionId$$ = $section$jscomp$1$$.getAttribute("i-amphtml-access-id"), | |
| $target$jscomp$65$$ = $$jscomp$this$jscomp$41$$.ampdoc.getRootNode().querySelector('[i-amphtml-access-id="' + | |
| $sectionId$$ + '"]'); | |
| $target$jscomp$65$$ ? $target$jscomp$65$$.parentElement.replaceChild($$jscomp$this$jscomp$41$$.ampdoc.win.document.importNode($section$jscomp$1$$, !0), $target$jscomp$65$$) : $dev$$module$src$log$$().warn("amp-access-server-jwt", "Section not found: ", $sectionId$$) | |
| } | |
| }) | |
| }; | |
| function $AccessServerAdapter$$module$build$all$v0$amp_access_server$$($ampdoc$jscomp$13$$, $configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$, $context$jscomp$5$$) { | |
| this.ampdoc = $ampdoc$jscomp$13$$; | |
| this.$context_$ = $context$jscomp$5$$; | |
| this.$clientAdapter_$ = new $AccessClientAdapter$$module$build$all$v0$amp_access_client$$($ampdoc$jscomp$13$$, $configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$, $context$jscomp$5$$); | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$($ampdoc$jscomp$13$$); | |
| this.$xhr_$ = $Services$$module$src$services$xhrFor$$($ampdoc$jscomp$13$$.win); | |
| this.$timer_$ = $Services$$module$src$services$timerFor$$($ampdoc$jscomp$13$$.win); | |
| this.$vsync_$ = $Services$$module$src$services$vsyncFor$$($ampdoc$jscomp$13$$.win); | |
| this.$serverState_$ = ($configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$ = $ampdoc$jscomp$13$$.getRootNode().querySelector('meta[name="i-amphtml-access-state"]')) ? $configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$.getAttribute("content") : | |
| null; | |
| $configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$ = $isExperimentOn$$module$src$experiments$$($ampdoc$jscomp$13$$.win, "amp-access-server"); | |
| this.$isProxyOrigin_$ = $isProxyOrigin$$module$src$url$$($ampdoc$jscomp$13$$.win.location) || $configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$; | |
| this.$serviceUrl_$ = ($configJson$jscomp$4_isInExperiment$jscomp$1_stateElement$jscomp$1$$ ? this.$viewer_$.getParam("serverAccessService") : null) || $removeFragment$$module$src$url$$($ampdoc$jscomp$13$$.win.location.href) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessServerAdapter$$module$build$all$v0$amp_access_server$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getConfig = function() { | |
| return { | |
| client: this.$clientAdapter_$.getConfig(), | |
| proxy: this.$isProxyOrigin_$, | |
| serverState: this.$serverState_$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAuthorizationEnabled = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.authorize = function() { | |
| var $$jscomp$this$jscomp$42$$ = this; | |
| if (!this.$isProxyOrigin_$ || !this.$serverState_$) return this.$clientAdapter_$.authorize(); | |
| var $varsPromise$$ = this.$context_$.collectUrlVars(this.$clientAdapter_$.getAuthorizationUrl(), !1); | |
| return $varsPromise$$.then(function($varsPromise$$) { | |
| var $request$jscomp$12_vars$jscomp$2$$ = {}, $k$jscomp$12$$; | |
| for ($k$jscomp$12$$ in $varsPromise$$) null != $varsPromise$$[$k$jscomp$12$$] && ($request$jscomp$12_vars$jscomp$2$$[$k$jscomp$12$$] = | |
| String($varsPromise$$[$k$jscomp$12$$])); | |
| $varsPromise$$ = $dict$$module$src$utils$object$$({ | |
| url: $removeFragment$$module$src$url$$($$jscomp$this$jscomp$42$$.ampdoc.win.location.href), | |
| state: $$jscomp$this$jscomp$42$$.$serverState_$, | |
| vars: $request$jscomp$12_vars$jscomp$2$$ | |
| }); | |
| return $$jscomp$this$jscomp$42$$.$timer_$.timeoutPromise($$jscomp$this$jscomp$42$$.$clientAdapter_$.getAuthorizationTimeout(), $$jscomp$this$jscomp$42$$.$xhr_$.fetchDocument($$jscomp$this$jscomp$42$$.$serviceUrl_$, { | |
| method: "POST", | |
| body: "request=" + encodeURIComponent(JSON.stringify($varsPromise$$)), | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded" | |
| }, | |
| requireAmpResponseSourceOrigin: !1 | |
| })) | |
| }).then(function($varsPromise$$) { | |
| var $responseDoc$$ = $varsPromise$$.querySelector('script[id="amp-access-data"]').textContent, | |
| $accessData$jscomp$1$$ = $parseJson$$module$src$json$$($responseDoc$$); | |
| return $$jscomp$this$jscomp$42$$.$replaceSections_$($varsPromise$$).then(function() { | |
| return $accessData$jscomp$1$$ | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isPingbackEnabled = function() { | |
| return this.$clientAdapter_$.isPingbackEnabled() | |
| }; | |
| $JSCompiler_prototypeAlias$$.pingback = function() { | |
| return this.$clientAdapter_$.pingback() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$replaceSections_$ = function($doc$jscomp$24$$) { | |
| var $$jscomp$this$jscomp$43$$ = this, | |
| $sections$jscomp$1$$ = $doc$jscomp$24$$.querySelectorAll("[i-amphtml-access-id]"); | |
| return this.$vsync_$.mutatePromise(function() { | |
| for (var $doc$jscomp$24$$ = 0; $doc$jscomp$24$$ < $sections$jscomp$1$$.length; $doc$jscomp$24$$++) { | |
| var $section$jscomp$2$$ = $sections$jscomp$1$$[$doc$jscomp$24$$], | |
| $sectionId$jscomp$1$$ = $section$jscomp$2$$.getAttribute("i-amphtml-access-id"), | |
| $target$jscomp$66$$ = $$jscomp$this$jscomp$43$$.ampdoc.getRootNode().querySelector('[i-amphtml-access-id="' + | |
| $sectionId$jscomp$1$$ + '"]'); | |
| $target$jscomp$66$$ ? $target$jscomp$66$$.parentElement.replaceChild($$jscomp$this$jscomp$43$$.ampdoc.win.document.importNode($section$jscomp$2$$, !0), $target$jscomp$66$$) : $dev$$module$src$log$$().warn("amp-access-server", "Section not found: ", $sectionId$jscomp$1$$) | |
| } | |
| }) | |
| }; | |
| function $AccessVendorAdapter$$module$build$all$v0$amp_access_vendor$$($ampdoc$jscomp$14$$, $configJson$jscomp$5$$) { | |
| var $$jscomp$this$jscomp$44$$ = this; | |
| this.ampdoc = $ampdoc$jscomp$14$$; | |
| this.$vendorName_$ = $user$$module$src$log$$().assert($configJson$jscomp$5$$.vendor, '"vendor" name must be specified'); | |
| this.$vendorConfig_$ = $configJson$jscomp$5$$[this.$vendorName_$]; | |
| this.$isPingbackEnabled_$ = !$configJson$jscomp$5$$.noPingback; | |
| this.$vendorResolve_$ = null; | |
| this.$vendorPromise_$ = new Promise(function($ampdoc$jscomp$14$$) { | |
| $$jscomp$this$jscomp$44$$.$vendorResolve_$ = | |
| $ampdoc$jscomp$14$$ | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessVendorAdapter$$module$build$all$v0$amp_access_vendor$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getConfig = function() { | |
| return this.$vendorConfig_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.registerVendor = function($name$jscomp$95$$, $vendor$$) { | |
| $user$$module$src$log$$().assert(this.$vendorResolve_$, "Vendor has already been registered"); | |
| $user$$module$src$log$$().assert($name$jscomp$95$$ == this.$vendorName_$, 'Vendor "%s" doesn\'t match the configured vendor "%s"', $name$jscomp$95$$, this.$vendorName_$); | |
| this.$vendorResolve_$($vendor$$); | |
| this.$vendorResolve_$ = null | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAuthorizationEnabled = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.authorize = function() { | |
| return this.$vendorPromise_$.then(function($vendor$jscomp$1$$) { | |
| return $vendor$jscomp$1$$.authorize() | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isPingbackEnabled = function() { | |
| return this.$isPingbackEnabled_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.pingback = function() { | |
| return this.$vendorPromise_$.then(function($vendor$jscomp$2$$) { | |
| return $vendor$jscomp$2$$.pingback() | |
| }) | |
| }; | |
| function $SignInProtocol$$module$build$all$v0$signin$$($ampdoc$jscomp$15$$, $viewer$jscomp$2$$, $pubOrigin$$, $configJson$jscomp$6$$) { | |
| this.ampdoc = $ampdoc$jscomp$15$$; | |
| this.$viewer_$ = $viewer$jscomp$2$$; | |
| this.$pubOrigin_$ = $pubOrigin$$; | |
| this.$isEnabled_$ = $isExperimentOn$$module$src$experiments$$($ampdoc$jscomp$15$$.win, "amp-access-signin") && this.$viewer_$.isEmbedded() && "1" == this.$viewer_$.getParam("signin"); | |
| if (this.$isEnabled_$) { | |
| var $acceptAccessToken$$ = !! $configJson$jscomp$6$$.acceptAccessToken; | |
| var $viewerSignInService$$ = | |
| this.$viewer_$.getParam("signinService"), | |
| $configSignInServices$$ = $configJson$jscomp$6$$.signinServices; | |
| $configSignInServices$$ && $user$$module$src$log$$().assert($isArray$$module$src$types$$($configSignInServices$$), '"signinServices" must be an array'); | |
| var $supportsSignInService$$ = $configSignInServices$$ && -1 != $configSignInServices$$.indexOf($viewerSignInService$$) | |
| } else $supportsSignInService$$ = $acceptAccessToken$$ = !1; | |
| this.$acceptAccessToken_$ = $acceptAccessToken$$; | |
| this.$supportsSignInService_$ = $supportsSignInService$$; | |
| this.$accessTokenPromise_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $SignInProtocol$$module$build$all$v0$signin$$.prototype; | |
| $JSCompiler_prototypeAlias$$.isEnabled = function() { | |
| return this.$isEnabled_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.start = function() { | |
| this.getAccessTokenPassive() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAccessTokenPassive = function() { | |
| if (!this.$acceptAccessToken_$) return null; | |
| this.$accessTokenPromise_$ || (this.$accessTokenPromise_$ = this.$viewer_$.sendMessageAwaitResponse("getAccessTokenPassive", $dict$$module$src$utils$object$$({ | |
| origin: this.$pubOrigin_$ | |
| })).then(function($resp$jscomp$5$$) { | |
| return $resp$jscomp$5$$ | |
| }). | |
| catch (function($reason$jscomp$12$$) { | |
| $user$$module$src$log$$().error("amp-access-signin", "Failed to retrieve access token: ", $reason$jscomp$12$$); | |
| return null | |
| })); | |
| return this.$accessTokenPromise_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$updateAccessToken_$ = function($accessToken$$) { | |
| this.$accessTokenPromise_$ = Promise.resolve($accessToken$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.postLoginResult = function($query$jscomp$10$$) { | |
| var $$jscomp$this$jscomp$45$$ = this; | |
| if (!this.$acceptAccessToken_$) return null; | |
| var $authorizationCode$$ = $query$jscomp$10$$.code; | |
| return $authorizationCode$$ ? this.$viewer_$.sendMessageAwaitResponse("storeAccessToken", $dict$$module$src$utils$object$$({ | |
| origin: this.$pubOrigin_$, | |
| authorizationCode: $authorizationCode$$ | |
| })).then(function($query$jscomp$10$$) { | |
| $$jscomp$this$jscomp$45$$.$updateAccessToken_$($query$jscomp$10$$); | |
| return $query$jscomp$10$$ | |
| }). | |
| catch (function($query$jscomp$10$$) { | |
| $user$$module$src$log$$().error("amp-access-signin", | |
| "Failed to retrieve access token: ", $query$jscomp$10$$); | |
| return null | |
| }) : null | |
| }; | |
| $JSCompiler_prototypeAlias$$.requestSignIn = function($url$jscomp$48$$) { | |
| var $$jscomp$this$jscomp$46$$ = this; | |
| return this.$supportsSignInService_$ ? this.$viewer_$.sendMessageAwaitResponse("requestSignIn", $dict$$module$src$utils$object$$({ | |
| origin: this.$pubOrigin_$, | |
| url: $url$jscomp$48$$ | |
| })).then(function($url$jscomp$48$$) { | |
| $$jscomp$this$jscomp$46$$.$updateAccessToken_$($url$jscomp$48$$); | |
| return "" | |
| }) : null | |
| }; | |
| var $RETURN_URL_REGEX$$module$build$all$v0$login_dialog$$ = /RETURN_URL/; | |
| function $createLoginDialog$$module$build$all$v0$login_dialog$$($ampdoc$jscomp$16$$, $urlOrPromise$$) { | |
| var $viewer$jscomp$3$$ = $Services$$module$src$services$viewerForDoc$$($ampdoc$jscomp$16$$), | |
| $overrideDialog$$ = parseInt($viewer$jscomp$3$$.getParam("dialog"), 10); | |
| return $overrideDialog$$ ? new $ViewerLoginDialog$$module$build$all$v0$login_dialog$$($viewer$jscomp$3$$, $urlOrPromise$$) : new $WebLoginDialog$$module$build$all$v0$login_dialog$$($ampdoc$jscomp$16$$.win, $viewer$jscomp$3$$, $urlOrPromise$$) | |
| } | |
| function $openLoginDialog$$module$build$all$v0$login_dialog$$($ampdoc$jscomp$17$$, $urlOrPromise$jscomp$1$$) { | |
| return $createLoginDialog$$module$build$all$v0$login_dialog$$($ampdoc$jscomp$17$$, $urlOrPromise$jscomp$1$$).open() | |
| } | |
| function $ViewerLoginDialog$$module$build$all$v0$login_dialog$$($viewer$jscomp$4$$, $urlOrPromise$jscomp$3$$) { | |
| this.viewer = $viewer$jscomp$4$$; | |
| this.urlOrPromise = $urlOrPromise$jscomp$3$$ | |
| } | |
| $ViewerLoginDialog$$module$build$all$v0$login_dialog$$.prototype.getLoginUrl = function() { | |
| return ("string" == typeof this.urlOrPromise ? Promise.resolve(this.urlOrPromise) : this.urlOrPromise).then(function($url$jscomp$49$$) { | |
| return $buildLoginUrl$$module$build$all$v0$login_dialog$$($url$jscomp$49$$, "RETURN_URL") | |
| }) | |
| }; | |
| $ViewerLoginDialog$$module$build$all$v0$login_dialog$$.prototype.open = function() { | |
| var $$jscomp$this$jscomp$47$$ = this; | |
| return this.getLoginUrl().then(function($loginUrl$$) { | |
| return $$jscomp$this$jscomp$47$$.viewer.sendMessageAwaitResponse("openDialog", $dict$$module$src$utils$object$$({ | |
| url: $loginUrl$$ | |
| })) | |
| }) | |
| }; | |
| function $WebLoginDialog$$module$build$all$v0$login_dialog$$($win$jscomp$133$$, $viewer$jscomp$5$$, $urlOrPromise$jscomp$4$$) { | |
| this.win = $win$jscomp$133$$; | |
| this.viewer = $viewer$jscomp$5$$; | |
| this.urlOrPromise = $urlOrPromise$jscomp$4$$; | |
| this.$messageUnlisten_$ = this.$heartbeatInterval_$ = this.$dialogReadyPromise_$ = this.$dialog_$ = this.$reject_$ = this.$resolve_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $WebLoginDialog$$module$build$all$v0$login_dialog$$.prototype; | |
| $JSCompiler_prototypeAlias$$.open = function() { | |
| var $$jscomp$this$jscomp$48$$ = this; | |
| $user$$module$src$log$$().assert(!this.$resolve_$, "Dialog already opened"); | |
| return (new Promise(function($resolve$jscomp$25$$, $reject$jscomp$12$$) { | |
| $$jscomp$this$jscomp$48$$.$resolve_$ = $resolve$jscomp$25$$; | |
| $$jscomp$this$jscomp$48$$.$reject_$ = $reject$jscomp$12$$; | |
| $$jscomp$this$jscomp$48$$.$openInternal_$() | |
| })).then(function($result$jscomp$8$$) { | |
| $$jscomp$this$jscomp$48$$.$cleanup_$(); | |
| return $result$jscomp$8$$ | |
| }, function($error$jscomp$27$$) { | |
| $$jscomp$this$jscomp$48$$.$cleanup_$(); | |
| throw $error$jscomp$27$$; | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$cleanup_$ = function() { | |
| this.$reject_$ = this.$resolve_$ = null; | |
| if (this.$dialog_$) { | |
| try { | |
| this.$dialog_$.close() | |
| } catch ($e$jscomp$44$$) {} | |
| this.$dialog_$ = null | |
| } | |
| this.$heartbeatInterval_$ && (this.win.clearInterval(this.$heartbeatInterval_$), this.$heartbeatInterval_$ = null); | |
| this.$messageUnlisten_$ && (this.$messageUnlisten_$(), this.$messageUnlisten_$ = null) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getLoginUrl = function() { | |
| var $$jscomp$this$jscomp$49$$ = this; | |
| return ("string" == typeof this.urlOrPromise ? Promise.resolve(this.urlOrPromise) : this.urlOrPromise).then(function($url$jscomp$50$$) { | |
| return $buildLoginUrl$$module$build$all$v0$login_dialog$$($url$jscomp$50$$, $$jscomp$this$jscomp$49$$.$getReturnUrl_$()) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$openInternal_$ = function() { | |
| var $$jscomp$this$jscomp$50$$ = this, | |
| $options$jscomp$21_screen$jscomp$2$$ = this.win.screen, | |
| $loginUrl$jscomp$1_w$jscomp$12$$ = Math.floor(Math.min(700, .9 * $options$jscomp$21_screen$jscomp$2$$.width)), | |
| $h$jscomp$10$$ = Math.floor(Math.min(450, .9 * $options$jscomp$21_screen$jscomp$2$$.height)), | |
| $sizing$$ = "height=" + $h$jscomp$10$$ + ",width=" + $loginUrl$jscomp$1_w$jscomp$12$$ + ",left=" + Math.floor(($options$jscomp$21_screen$jscomp$2$$.width - $loginUrl$jscomp$1_w$jscomp$12$$) / | |
| 2) + ",top=" + Math.floor(($options$jscomp$21_screen$jscomp$2$$.height - $h$jscomp$10$$) / 2); | |
| $options$jscomp$21_screen$jscomp$2$$ = $sizing$$ + ",resizable=yes,scrollbars=yes"; | |
| var $returnUrl$$ = this.$getReturnUrl_$(); | |
| this.$dialogReadyPromise_$ = null; | |
| if ("string" == typeof this.urlOrPromise) { | |
| if ($loginUrl$jscomp$1_w$jscomp$12$$ = $buildLoginUrl$$module$build$all$v0$login_dialog$$(this.urlOrPromise, $returnUrl$$), this.$dialog_$ = $openWindowDialog$$module$src$dom$$(this.win, $loginUrl$jscomp$1_w$jscomp$12$$, "_blank", $options$jscomp$21_screen$jscomp$2$$)) this.$dialogReadyPromise_$ = | |
| Promise.resolve() | |
| } else if (this.$dialog_$ = $openWindowDialog$$module$src$dom$$(this.win, "", "_blank", $options$jscomp$21_screen$jscomp$2$$)) this.$dialogReadyPromise_$ = this.urlOrPromise.then(function($options$jscomp$21_screen$jscomp$2$$) { | |
| $options$jscomp$21_screen$jscomp$2$$ = $buildLoginUrl$$module$build$all$v0$login_dialog$$($options$jscomp$21_screen$jscomp$2$$, $returnUrl$$); | |
| $$jscomp$this$jscomp$50$$.$dialog_$.location.replace($options$jscomp$21_screen$jscomp$2$$) | |
| }, function($$jscomp$this$jscomp$50$$) { | |
| throw Error("failed to resolve url: " + | |
| $$jscomp$this$jscomp$50$$); | |
| }); | |
| this.$dialogReadyPromise_$ ? this.$dialogReadyPromise_$.then(function() { | |
| $$jscomp$this$jscomp$50$$.$setupDialog_$($returnUrl$$) | |
| }, function($options$jscomp$21_screen$jscomp$2$$) { | |
| $$jscomp$this$jscomp$50$$.$loginDone_$(null, $options$jscomp$21_screen$jscomp$2$$) | |
| }) : this.$loginDone_$(null, Error("failed to open dialog")) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$setupDialog_$ = function($returnUrl$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$51$$ = this, | |
| $returnOrigin$$ = $parseUrl$$module$src$url$$($returnUrl$jscomp$1$$).origin; | |
| this.$heartbeatInterval_$ = this.win.setInterval(function() { | |
| $$jscomp$this$jscomp$51$$.$dialog_$.closed && ($$jscomp$this$jscomp$51$$.win.clearInterval($$jscomp$this$jscomp$51$$.$heartbeatInterval_$), $$jscomp$this$jscomp$51$$.$heartbeatInterval_$ = null, $$jscomp$this$jscomp$51$$.win.setTimeout(function() { | |
| $$jscomp$this$jscomp$51$$.$loginDone_$("") | |
| }, | |
| 3E3)) | |
| }, 500); | |
| this.$messageUnlisten_$ = $listen$$module$src$event_helper$$(this.win, "message", function($returnUrl$jscomp$1$$) { | |
| $returnUrl$jscomp$1$$.origin == $returnOrigin$$ && $returnUrl$jscomp$1$$.data && "amp" == $returnUrl$jscomp$1$$.data.sentinel && "result" == $returnUrl$jscomp$1$$.data.type && ($$jscomp$this$jscomp$51$$.$dialog_$ && $$jscomp$this$jscomp$51$$.$dialog_$.postMessage($dict$$module$src$utils$object$$({ | |
| sentinel: "amp", | |
| type: "result-ack" | |
| }), $returnOrigin$$), $$jscomp$this$jscomp$51$$.$loginDone_$($returnUrl$jscomp$1$$.data.result)) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$loginDone_$ = function($result$jscomp$9$$, $opt_error$jscomp$2$$) { | |
| this.$resolve_$ && ($opt_error$jscomp$2$$ ? this.$reject_$($opt_error$jscomp$2$$) : this.$resolve_$($result$jscomp$9$$), this.$cleanup_$()) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$getReturnUrl_$ = function() { | |
| var $currentUrl$$ = this.viewer.getResolvedViewerUrl(); | |
| return $module$src$config$$.urls.cdn + "/v0/amp-login-done-0.1.html?url=" + encodeURIComponent($currentUrl$$) | |
| }; | |
| function $buildLoginUrl$$module$build$all$v0$login_dialog$$($url$jscomp$52$$, $returnUrl$jscomp$3$$) { | |
| return $RETURN_URL_REGEX$$module$build$all$v0$login_dialog$$.test($url$jscomp$52$$) ? $url$jscomp$52$$.replace($RETURN_URL_REGEX$$module$build$all$v0$login_dialog$$, encodeURIComponent($returnUrl$jscomp$3$$)) : $url$jscomp$52$$ + (-1 == $url$jscomp$52$$.indexOf("?") ? "?" : "&") + "return=" + encodeURIComponent($returnUrl$jscomp$3$$) | |
| }; | |
| var $AccessType$$module$build$all$v0$amp_access$$ = { | |
| CLIENT: "client", | |
| SERVER: "server", | |
| VENDOR: "vendor", | |
| OTHER: "other" | |
| }; | |
| function $AccessService$$module$build$all$v0$amp_access$$($ampdoc$jscomp$19$$) { | |
| var $$jscomp$this$jscomp$52$$ = this; | |
| this.ampdoc = $ampdoc$jscomp$19$$; | |
| $installStylesForDoc$$module$src$style_installer$$($ampdoc$jscomp$19$$, "\n/*# sourceURL=/extensions/amp-access/0.1/amp-access.css*/", function() {}, !1, "amp-access"); | |
| var $accessElement$$ = $ampdoc$jscomp$19$$.getElementById("amp-access"); | |
| if (this.$enabled_$ = !! $accessElement$$) { | |
| this.$isServerEnabled_$ = $isExperimentOn$$module$src$experiments$$($ampdoc$jscomp$19$$.win, | |
| "amp-access-server"); | |
| this.$isJwtEnabled_$ = $isExperimentOn$$module$src$experiments$$($ampdoc$jscomp$19$$.win, "amp-access-jwt"); | |
| this.$accessElement_$ = $accessElement$$; | |
| var $configJson$jscomp$7$$ = $tryParseJson$$module$src$json$$(this.$accessElement_$.textContent, function($ampdoc$jscomp$19$$) { | |
| throw $user$$module$src$log$$().createError('Failed to parse "amp-access" JSON: ' + $ampdoc$jscomp$19$$); | |
| }); | |
| this.$type_$ = this.$buildConfigType_$($configJson$jscomp$7$$); | |
| this.$loginConfig_$ = this.$buildConfigLoginMap_$($configJson$jscomp$7$$); | |
| this.$authorizationFallbackResponse_$ = $configJson$jscomp$7$$.authorizationFallbackResponse; | |
| this.$adapter_$ = this.$createAdapter_$($configJson$jscomp$7$$); | |
| this.$pubOrigin_$ = $getSourceOrigin$$module$src$url$$($ampdoc$jscomp$19$$.win.location); | |
| this.$timer_$ = $Services$$module$src$services$timerFor$$($ampdoc$jscomp$19$$.win); | |
| this.$vsync_$ = $Services$$module$src$services$vsyncFor$$($ampdoc$jscomp$19$$.win); | |
| this.$urlReplacements_$ = $Services$$module$src$services$urlReplacementsForDoc$$($ampdoc$jscomp$19$$); | |
| this.$cid_$ = $getServicePromiseForDoc$$module$src$service$$($ampdoc$jscomp$19$$, "cid"); | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$($ampdoc$jscomp$19$$); | |
| this.$viewport_$ = $Services$$module$src$services$viewportForDoc$$($ampdoc$jscomp$19$$); | |
| this.$templates_$ = $Services$$module$src$services$templatesFor$$($ampdoc$jscomp$19$$.win); | |
| this.$resources_$ = $Services$$module$src$services$resourcesForDoc$$($ampdoc$jscomp$19$$); | |
| this.$performance_$ = $getExistingServiceOrNull$$module$src$service$$($ampdoc$jscomp$19$$.win); | |
| this.$openLoginDialog_$ = $openLoginDialog$$module$build$all$v0$login_dialog$$.bind(null, $ampdoc$jscomp$19$$); | |
| this.$authResponse_$ = this.$readerIdPromise_$ = null; | |
| this.$signIn_$ = new $SignInProtocol$$module$build$all$v0$signin$$($ampdoc$jscomp$19$$, this.$viewer_$, this.$pubOrigin_$, $configJson$jscomp$7$$); | |
| this.$firstAuthorizationResolver_$ = null; | |
| this.$lastAuthorizationPromise_$ = this.$firstAuthorizationPromise_$ = new Promise(function($ampdoc$jscomp$19$$) { | |
| $$jscomp$this$jscomp$52$$.$firstAuthorizationResolver_$ = | |
| $ampdoc$jscomp$19$$ | |
| }); | |
| this.$reportViewPromise_$ = null; | |
| this.$loginUrlMap_$ = {}; | |
| this.$loginPromise_$ = null; | |
| this.$loginStartTime_$ = 0; | |
| this.$firstAuthorizationPromise_$.then(function() { | |
| $$jscomp$this$jscomp$52$$.$analyticsEvent_$("access-authorization-received"); | |
| $$jscomp$this$jscomp$52$$.$performance_$ && ($$jscomp$this$jscomp$52$$.$performance_$.tick("aaa"), $$jscomp$this$jscomp$52$$.$performance_$.tickSinceVisible("aaav"), $$jscomp$this$jscomp$52$$.$performance_$.flush()) | |
| }); | |
| $ampdoc$jscomp$19$$.getRootNode().addEventListener("amp:dom-update", | |
| this.$onDomUpdate_$.bind(this)) | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AccessService$$module$build$all$v0$amp_access$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$onDomUpdate_$ = function($event$jscomp$14$$) { | |
| var $$jscomp$this$jscomp$53$$ = this, | |
| $response$jscomp$5$$ = this.$authResponse_$; | |
| if ($response$jscomp$5$$) return this.$lastAuthorizationPromise_$.then(function() { | |
| $$jscomp$this$jscomp$53$$.$applyAuthorizationToRoot_$($event$jscomp$14$$.target, $response$jscomp$5$$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.registerVendor = function($name$jscomp$96$$, $vendor$jscomp$3$$) { | |
| $user$$module$src$log$$().assert("vendor" == this.$type_$, 'Acccess vendor "%s" can only be used for "type=vendor"', $name$jscomp$96$$); | |
| var $vendorAdapter$$ = this.$adapter_$; | |
| $vendorAdapter$$.registerVendor($name$jscomp$96$$, $vendor$jscomp$3$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$createAdapter_$ = function($configJson$jscomp$8$$) { | |
| var $context$jscomp$6$$ = { | |
| buildUrl: this.buildUrl.bind(this), | |
| collectUrlVars: this.$collectUrlVars_$.bind(this) | |
| }, $isJwt$$ = this.$isJwtEnabled_$ && !0 === $configJson$jscomp$8$$.jwt; | |
| switch (this.$type_$) { | |
| case "client": | |
| return $isJwt$$ ? new $AccessServerJwtAdapter$$module$build$all$v0$amp_access_server_jwt$$(this.ampdoc, $configJson$jscomp$8$$, $context$jscomp$6$$) : new $AccessClientAdapter$$module$build$all$v0$amp_access_client$$(this.ampdoc, | |
| $configJson$jscomp$8$$, $context$jscomp$6$$); | |
| case "server": | |
| return $isJwt$$ ? new $AccessServerJwtAdapter$$module$build$all$v0$amp_access_server_jwt$$(this.ampdoc, $configJson$jscomp$8$$, $context$jscomp$6$$) : new $AccessServerAdapter$$module$build$all$v0$amp_access_server$$(this.ampdoc, $configJson$jscomp$8$$, $context$jscomp$6$$); | |
| case "vendor": | |
| return new $AccessVendorAdapter$$module$build$all$v0$amp_access_vendor$$(this.ampdoc, $configJson$jscomp$8$$); | |
| case "other": | |
| return new $AccessOtherAdapter$$module$build$all$v0$amp_access_other$$(this.ampdoc, | |
| $configJson$jscomp$8$$, $context$jscomp$6$$) | |
| } | |
| throw $dev$$module$src$log$$().createError("Unsupported access type: ", this.$type_$); | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAdapterConfig = function() { | |
| return this.$adapter_$.getConfig() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$buildConfigType_$ = function($configJson$jscomp$9$$) { | |
| var $type$jscomp$126$$ = $configJson$jscomp$9$$.type ? $user$$module$src$log$$().assertEnumValue($AccessType$$module$build$all$v0$amp_access$$, $configJson$jscomp$9$$.type, "access type") : null; | |
| $type$jscomp$126$$ || ($type$jscomp$126$$ = $configJson$jscomp$9$$.vendor ? "vendor" : "client"); | |
| "server" != $type$jscomp$126$$ || this.$isServerEnabled_$ || ($user$$module$src$log$$().warn("amp-access", 'Experiment "amp-access-server" is not enabled.'), | |
| $type$jscomp$126$$ = "client"); | |
| "client" == $type$jscomp$126$$ && this.$isServerEnabled_$ && ($user$$module$src$log$$().info("amp-access", "Forcing access type: SERVER"), $type$jscomp$126$$ = "server"); | |
| return $type$jscomp$126$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$buildConfigLoginMap_$ = function($configJson$jscomp$10$$) { | |
| var $loginConfig$$ = $configJson$jscomp$10$$.login, | |
| $loginMap$$ = {}; | |
| if ($loginConfig$$) if ("string" == typeof $loginConfig$$) $loginMap$$[""] = $loginConfig$$; | |
| else if ($isObject$$module$src$types$$($loginConfig$$)) for (var $k$jscomp$13$$ in $loginConfig$$) $loginMap$$[$k$jscomp$13$$] = $loginConfig$$[$k$jscomp$13$$]; | |
| else $user$$module$src$log$$().assert(!1, '"login" must be either a single URL or a map of URLs'); | |
| for (var $k$24$$ in $loginMap$$) $assertHttpsUrl$$module$src$url$$($loginMap$$[$k$24$$], | |
| this.$accessElement_$); | |
| return $loginMap$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.isEnabled = function() { | |
| return this.$enabled_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$getRootElement_$ = function() { | |
| var $root$jscomp$6$$ = this.ampdoc.getRootNode(); | |
| return $root$jscomp$6$$.documentElement || $root$jscomp$6$$.body || $root$jscomp$6$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$analyticsEvent_$ = function($eventType$jscomp$12$$) { | |
| $triggerAnalyticsEvent$$module$src$analytics$$(this.$getRootElement_$(), $eventType$jscomp$12$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$start_$ = function() { | |
| if (!this.$enabled_$) return $user$$module$src$log$$().info("amp-access", 'Access is disabled - no "id=amp-access" element'), this; | |
| $JSCompiler_StaticMethods_startInternal_$$(this); | |
| return this | |
| }; | |
| function $JSCompiler_StaticMethods_startInternal_$$($JSCompiler_StaticMethods_startInternal_$self$$) { | |
| $Services$$module$src$services$actionServiceForDoc$$($JSCompiler_StaticMethods_startInternal_$self$$.ampdoc).installActionHandler($JSCompiler_StaticMethods_startInternal_$self$$.$accessElement_$, $JSCompiler_StaticMethods_startInternal_$self$$.$handleAction_$.bind($JSCompiler_StaticMethods_startInternal_$self$$)); | |
| $JSCompiler_StaticMethods_startInternal_$self$$.$buildLoginUrls_$(); | |
| $JSCompiler_StaticMethods_startInternal_$self$$.$signIn_$.start(); | |
| $JSCompiler_StaticMethods_startInternal_$self$$.$runAuthorization_$(); | |
| $JSCompiler_StaticMethods_startInternal_$self$$.$scheduleView_$(2E3); | |
| $JSCompiler_StaticMethods_startInternal_$self$$.$listenToBroadcasts_$() | |
| } | |
| $JSCompiler_prototypeAlias$$.$listenToBroadcasts_$ = function() { | |
| var $$jscomp$this$jscomp$54$$ = this; | |
| this.$viewer_$.onBroadcast(function($message$jscomp$38$$) { | |
| "amp-access-reauthorize" == $message$jscomp$38$$.type && $message$jscomp$38$$.origin == $$jscomp$this$jscomp$54$$.$pubOrigin_$ && $$jscomp$this$jscomp$54$$.$runAuthorization_$() | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$broadcastReauthorize_$ = function() { | |
| this.$viewer_$.broadcast($dict$$module$src$utils$object$$({ | |
| type: "amp-access-reauthorize", | |
| origin: this.$pubOrigin_$ | |
| })) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$getReaderId_$ = function() { | |
| if (!this.$readerIdPromise_$) { | |
| var $consent$jscomp$1$$ = Promise.resolve(); | |
| this.$readerIdPromise_$ = this.$cid_$.then(function($cid$$) { | |
| return $cid$$.get({ | |
| scope: "amp-access", | |
| createCookieIfNotPresent: !0 | |
| }, $consent$jscomp$1$$) | |
| }) | |
| } | |
| return this.$readerIdPromise_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.buildUrl = function($url$jscomp$53$$, $useAuthData$$) { | |
| var $$jscomp$this$jscomp$55$$ = this; | |
| return this.$prepareUrlVars_$($useAuthData$$).then(function($useAuthData$$) { | |
| return $$jscomp$this$jscomp$55$$.$urlReplacements_$.expandAsync($url$jscomp$53$$, $useAuthData$$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$collectUrlVars_$ = function($url$jscomp$54$$, $useAuthData$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$56$$ = this; | |
| return this.$prepareUrlVars_$($useAuthData$jscomp$1$$).then(function($useAuthData$jscomp$1$$) { | |
| return $$jscomp$this$jscomp$56$$.$urlReplacements_$.collectVars($url$jscomp$54$$, $useAuthData$jscomp$1$$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$prepareUrlVars_$ = function($useAuthData$jscomp$2$$) { | |
| var $$jscomp$this$jscomp$57$$ = this; | |
| return this.$getReaderId_$().then(function($readerId$$) { | |
| var $vars$jscomp$5$$ = { | |
| READER_ID: $readerId$$, | |
| ACCESS_READER_ID: $readerId$$, | |
| ACCESS_TOKEN: function() { | |
| return $$jscomp$this$jscomp$57$$.$signIn_$.getAccessTokenPassive() | |
| } | |
| }; | |
| $useAuthData$jscomp$2$$ && ($vars$jscomp$5$$.AUTHDATA = function($useAuthData$jscomp$2$$) { | |
| if ($$jscomp$this$jscomp$57$$.$authResponse_$) return $getValueForExpr$$module$src$json$$($$jscomp$this$jscomp$57$$.$authResponse_$, | |
| $useAuthData$jscomp$2$$) | |
| }); | |
| return $vars$jscomp$5$$ | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$runAuthorization_$ = function($opt_disableFallback$$) { | |
| var $$jscomp$this$jscomp$58$$ = this; | |
| if (!this.$adapter_$.isAuthorizationEnabled()) return this.$firstAuthorizationResolver_$(), Promise.resolve(); | |
| this.$toggleTopClass_$("amp-access-loading", !0); | |
| var $startPromise$$ = this.$viewer_$.whenFirstVisible(), | |
| $responsePromise$$ = $startPromise$$.then(function() { | |
| return $$jscomp$this$jscomp$58$$.$adapter_$.authorize() | |
| }). | |
| catch (function($startPromise$$) { | |
| $$jscomp$this$jscomp$58$$.$analyticsEvent_$("access-authorization-failed"); | |
| if ($$jscomp$this$jscomp$58$$.$authorizationFallbackResponse_$ && !$opt_disableFallback$$) return $user$$module$src$log$$().error("amp-access", "Authorization failed: ", $startPromise$$), $$jscomp$this$jscomp$58$$.$authorizationFallbackResponse_$; | |
| throw $startPromise$$; | |
| }), | |
| $promise$jscomp$15$$ = $responsePromise$$.then(function($opt_disableFallback$$) { | |
| $$jscomp$this$jscomp$58$$.$setAuthResponse_$($opt_disableFallback$$); | |
| $$jscomp$this$jscomp$58$$.$toggleTopClass_$("amp-access-loading", !1); | |
| $$jscomp$this$jscomp$58$$.$toggleTopClass_$("amp-access-error", !1); | |
| $$jscomp$this$jscomp$58$$.$buildLoginUrls_$(); | |
| return $$jscomp$this$jscomp$58$$.ampdoc.whenReady().then(function() { | |
| return $$jscomp$this$jscomp$58$$.$applyAuthorization_$($opt_disableFallback$$) | |
| }) | |
| }). | |
| catch (function($opt_disableFallback$$) { | |
| $user$$module$src$log$$().error("amp-access", "Authorization failed: ", $opt_disableFallback$$); | |
| $$jscomp$this$jscomp$58$$.$toggleTopClass_$("amp-access-loading", !1); | |
| $$jscomp$this$jscomp$58$$.$toggleTopClass_$("amp-access-error", !0) | |
| }); | |
| this.$lastAuthorizationPromise_$ = Promise.all([this.$firstAuthorizationPromise_$, | |
| $promise$jscomp$15$$ | |
| ]); | |
| return $promise$jscomp$15$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$setAuthResponse_$ = function($authResponse$$) { | |
| this.$authResponse_$ = $authResponse$$; | |
| this.$firstAuthorizationResolver_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAccessReaderId = function() { | |
| return this.$enabled_$ ? this.$getReaderId_$() : null | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAuthdataField = function($field$jscomp$6$$) { | |
| var $$jscomp$this$jscomp$59$$ = this; | |
| return this.$enabled_$ ? this.$lastAuthorizationPromise_$.then(function() { | |
| if (!$$jscomp$this$jscomp$59$$.$authResponse_$) return null; | |
| var $v$jscomp$6$$ = $getValueForExpr$$module$src$json$$($$jscomp$this$jscomp$59$$.$authResponse_$, $field$jscomp$6$$); | |
| return void 0 !== $v$jscomp$6$$ ? $v$jscomp$6$$ : null | |
| }) : null | |
| }; | |
| $JSCompiler_prototypeAlias$$.whenFirstAuthorized = function() { | |
| return this.$firstAuthorizationPromise_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$applyAuthorization_$ = function($response$jscomp$7$$) { | |
| return this.$applyAuthorizationToRoot_$(this.ampdoc.getRootNode(), $response$jscomp$7$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$applyAuthorizationToRoot_$ = function($elements$jscomp$2_root$jscomp$7$$, $response$jscomp$8$$) { | |
| $elements$jscomp$2_root$jscomp$7$$ = $elements$jscomp$2_root$jscomp$7$$.querySelectorAll("[amp-access]"); | |
| for (var $promises$jscomp$4$$ = [], $i$jscomp$65$$ = 0; $i$jscomp$65$$ < $elements$jscomp$2_root$jscomp$7$$.length; $i$jscomp$65$$++) $promises$jscomp$4$$.push(this.$applyAuthorizationToElement_$($elements$jscomp$2_root$jscomp$7$$[$i$jscomp$65$$], $response$jscomp$8$$)); | |
| return Promise.all($promises$jscomp$4$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$applyAuthorizationToElement_$ = function($element$jscomp$69$$, $response$jscomp$9$$) { | |
| var $$jscomp$this$jscomp$60$$ = this, | |
| $expr$jscomp$5_renderPromise$jscomp$1$$ = $element$jscomp$69$$.getAttribute("amp-access"); | |
| a: { | |
| try { | |
| $parser$$module$build$all$v0$access_expr_impl$$.yy = $response$jscomp$9$$; | |
| var $JSCompiler_inline_result$jscomp$277$$ = !! $parser$$module$build$all$v0$access_expr_impl$$.parse($expr$jscomp$5_renderPromise$jscomp$1$$); | |
| break a | |
| } finally { | |
| $parser$$module$build$all$v0$access_expr_impl$$.yy = | |
| null | |
| } | |
| $JSCompiler_inline_result$jscomp$277$$ = void 0 | |
| } | |
| var $on$jscomp$5$$ = $JSCompiler_inline_result$jscomp$277$$; | |
| $expr$jscomp$5_renderPromise$jscomp$1$$ = null; | |
| $on$jscomp$5$$ && ($expr$jscomp$5_renderPromise$jscomp$1$$ = this.$renderTemplates_$($element$jscomp$69$$, $response$jscomp$9$$)); | |
| return $expr$jscomp$5_renderPromise$jscomp$1$$ ? $expr$jscomp$5_renderPromise$jscomp$1$$.then(function() { | |
| return $$jscomp$this$jscomp$60$$.$applyAuthorizationAttrs_$($element$jscomp$69$$, $on$jscomp$5$$) | |
| }) : this.$applyAuthorizationAttrs_$($element$jscomp$69$$, | |
| $on$jscomp$5$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$applyAuthorizationAttrs_$ = function($element$jscomp$70$$, $on$jscomp$6$$) { | |
| var $wasOn$$ = !$element$jscomp$70$$.hasAttribute("amp-access-hide"); | |
| return $on$jscomp$6$$ == $wasOn$$ ? Promise.resolve() : this.$resources_$.mutateElement($element$jscomp$70$$, function() { | |
| $on$jscomp$6$$ ? $element$jscomp$70$$.removeAttribute("amp-access-hide") : $element$jscomp$70$$.setAttribute("amp-access-hide", "") | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$renderTemplates_$ = function($element$jscomp$71$$, $response$jscomp$10$$) { | |
| var $promises$jscomp$5$$ = [], | |
| $templateElements$$ = $element$jscomp$71$$.querySelectorAll("[amp-access-template]"); | |
| if (0 < $templateElements$$.length) for (var $$jscomp$loop$184$$ = { | |
| i: 0 | |
| }; $$jscomp$loop$184$$.i < $templateElements$$.length; $$jscomp$loop$184$$ = { | |
| i: $$jscomp$loop$184$$.i | |
| }, $$jscomp$loop$184$$.i++) { | |
| var $p$25$$ = this.$renderTemplate_$($element$jscomp$71$$, $templateElements$$[$$jscomp$loop$184$$.i], $response$jscomp$10$$). | |
| catch (function($response$jscomp$10$$) { | |
| return function($promises$jscomp$5$$) { | |
| $dev$$module$src$log$$().error("amp-access", | |
| "Template failed: ", $promises$jscomp$5$$, $templateElements$$[$response$jscomp$10$$.i], $element$jscomp$71$$) | |
| } | |
| }($$jscomp$loop$184$$)); | |
| $promises$jscomp$5$$.push($p$25$$) | |
| } | |
| return 0 < $promises$jscomp$5$$.length ? Promise.all($promises$jscomp$5$$) : null | |
| }; | |
| $JSCompiler_prototypeAlias$$.$renderTemplate_$ = function($element$jscomp$72$$, $templateOrPrev$$, $response$jscomp$11$$) { | |
| var $$jscomp$this$jscomp$61$$ = this, | |
| $template$jscomp$3$$ = $templateOrPrev$$, | |
| $prev$$ = null; | |
| "TEMPLATE" != $template$jscomp$3$$.tagName && ($prev$$ = $template$jscomp$3$$, $template$jscomp$3$$ = $prev$$.__AMP_ACCESS__TEMPLATE); | |
| if (!$template$jscomp$3$$) return Promise.reject(Error("template not found")); | |
| var $rendered$$ = this.$templates_$.renderTemplate($template$jscomp$3$$, $response$jscomp$11$$); | |
| return $rendered$$.then(function($element$jscomp$72$$) { | |
| return $$jscomp$this$jscomp$61$$.$vsync_$.mutatePromise(function() { | |
| $element$jscomp$72$$.setAttribute("amp-access-template", | |
| ""); | |
| $element$jscomp$72$$.__AMP_ACCESS__TEMPLATE = $template$jscomp$3$$; | |
| $template$jscomp$3$$.parentElement ? $template$jscomp$3$$.parentElement.replaceChild($element$jscomp$72$$, $template$jscomp$3$$) : $prev$$ && $prev$$.parentElement && $prev$$.parentElement.replaceChild($element$jscomp$72$$, $prev$$) | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$scheduleView_$ = function($timeToView$$) { | |
| var $$jscomp$this$jscomp$62$$ = this; | |
| this.$adapter_$.isPingbackEnabled() && (this.$reportViewPromise_$ = null, this.ampdoc.whenReady().then(function() { | |
| $$jscomp$this$jscomp$62$$.$viewer_$.isVisible() && $$jscomp$this$jscomp$62$$.$reportWhenViewed_$($timeToView$$); | |
| $$jscomp$this$jscomp$62$$.$viewer_$.onVisibilityChanged(function() { | |
| $$jscomp$this$jscomp$62$$.$viewer_$.isVisible() && $$jscomp$this$jscomp$62$$.$reportWhenViewed_$($timeToView$$) | |
| }) | |
| })) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$reportWhenViewed_$ = function($timeToView$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$63$$ = this; | |
| this.$reportViewPromise_$ || (this.$reportViewPromise_$ = this.$whenViewed_$($timeToView$jscomp$1$$).then(function() { | |
| return $$jscomp$this$jscomp$63$$.$lastAuthorizationPromise_$ | |
| }).then(function() { | |
| $$jscomp$this$jscomp$63$$.$analyticsEvent_$("access-viewed"); | |
| return $$jscomp$this$jscomp$63$$.$reportViewToServer_$() | |
| }). | |
| catch (function($timeToView$jscomp$1$$) { | |
| $$jscomp$this$jscomp$63$$.$reportViewPromise_$ = | |
| null; | |
| throw $timeToView$jscomp$1$$; | |
| }), this.$reportViewPromise_$.then(this.$broadcastReauthorize_$.bind(this))) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$whenViewed_$ = function($timeToView$jscomp$2$$) { | |
| var $$jscomp$this$jscomp$64$$ = this; | |
| if (0 == $timeToView$jscomp$2$$) return Promise.resolve(); | |
| var $unlistenSet$jscomp$2$$ = []; | |
| return (new Promise(function($resolve$jscomp$27$$, $reject$jscomp$13$$) { | |
| $unlistenSet$jscomp$2$$.push($$jscomp$this$jscomp$64$$.$viewer_$.onVisibilityChanged(function() { | |
| $$jscomp$this$jscomp$64$$.$viewer_$.isVisible() || $reject$jscomp$13$$(Error("CANCELLED")) | |
| })); | |
| var $timeoutId$jscomp$1$$ = $$jscomp$this$jscomp$64$$.$timer_$.delay($resolve$jscomp$27$$, | |
| $timeToView$jscomp$2$$); | |
| $unlistenSet$jscomp$2$$.push(function() { | |
| return $$jscomp$this$jscomp$64$$.$timer_$.cancel($timeoutId$jscomp$1$$) | |
| }); | |
| $unlistenSet$jscomp$2$$.push($$jscomp$this$jscomp$64$$.$viewport_$.onScroll($resolve$jscomp$27$$)); | |
| $unlistenSet$jscomp$2$$.push($listenOnce$$module$src$event_helper$$($$jscomp$this$jscomp$64$$.ampdoc.getRootNode(), "click", $resolve$jscomp$27$$)) | |
| })).then(function() { | |
| $unlistenSet$jscomp$2$$.forEach(function($timeToView$jscomp$2$$) { | |
| return $timeToView$jscomp$2$$() | |
| }) | |
| }, function($timeToView$jscomp$2$$) { | |
| $unlistenSet$jscomp$2$$.forEach(function($timeToView$jscomp$2$$) { | |
| return $timeToView$jscomp$2$$() | |
| }); | |
| throw $timeToView$jscomp$2$$; | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$reportViewToServer_$ = function() { | |
| var $$jscomp$this$jscomp$65$$ = this; | |
| return this.$adapter_$.pingback().then(function() { | |
| $$jscomp$this$jscomp$65$$.$analyticsEvent_$("access-pingback-sent") | |
| }). | |
| catch (function($error$jscomp$33$$) { | |
| $$jscomp$this$jscomp$65$$.$analyticsEvent_$("access-pingback-failed"); | |
| throw $user$$module$src$log$$().createError("Pingback failed: ", $error$jscomp$33$$); | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$toggleTopClass_$ = function($className$jscomp$1$$, $on$jscomp$7$$) { | |
| var $$jscomp$this$jscomp$66$$ = this; | |
| this.$vsync_$.mutate(function() { | |
| $$jscomp$this$jscomp$66$$.$getRootElement_$().classList.toggle($className$jscomp$1$$, $on$jscomp$7$$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleAction_$ = function($invocation$$) { | |
| "login" == $invocation$$.method ? ($invocation$$.event && $invocation$$.event.preventDefault(), this.$loginWithType_$("")) : $startsWith$$module$src$string$$($invocation$$.method, "login-") && ($invocation$$.event && $invocation$$.event.preventDefault(), this.$loginWithType_$($invocation$$.method.substring(6))); | |
| return null | |
| }; | |
| $JSCompiler_prototypeAlias$$.getLoginUrl = function($urlOrPromise$jscomp$5$$) { | |
| return $createLoginDialog$$module$build$all$v0$login_dialog$$(this.ampdoc, $urlOrPromise$jscomp$5$$).getLoginUrl() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$loginWithType_$ = function($type$jscomp$127$$) { | |
| $user$$module$src$log$$().assert(this.$loginConfig_$[$type$jscomp$127$$], "Login URL is not configured: %s", $type$jscomp$127$$); | |
| var $loginUrl$jscomp$3$$ = $user$$module$src$log$$().assert(this.$loginUrlMap_$[$type$jscomp$127$$], "Login URL is not ready: %s", $type$jscomp$127$$); | |
| this.$login_$($loginUrl$jscomp$3$$, $type$jscomp$127$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.loginWithUrl = function($url$jscomp$55$$, $eventLabel$$) { | |
| $eventLabel$$ = void 0 === $eventLabel$$ ? "" : $eventLabel$$; | |
| return this.$login_$($url$jscomp$55$$, $eventLabel$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$login_$ = function($loginUrl$jscomp$4$$, $eventLabel$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$67$$ = this, | |
| $now$jscomp$1$$ = Date.now(); | |
| if (this.$loginPromise_$ && 1E3 > $now$jscomp$1$$ - this.$loginStartTime_$) return this.$loginPromise_$; | |
| this.$loginAnalyticsEvent_$($eventLabel$jscomp$1$$, "started"); | |
| var $dialogPromise$$ = this.$signIn_$.requestSignIn($loginUrl$jscomp$4$$) || this.$openLoginDialog_$($loginUrl$jscomp$4$$), | |
| $loginPromise$$ = $dialogPromise$$.then(function($loginUrl$jscomp$4$$) { | |
| $$jscomp$this$jscomp$67$$.$loginPromise_$ = | |
| null; | |
| $loginUrl$jscomp$4$$ = $parseQueryString_$$module$src$url_parse_query_string$$($loginUrl$jscomp$4$$); | |
| var $now$jscomp$1$$ = $loginUrl$jscomp$4$$.success, | |
| $dialogPromise$$ = "true" == $now$jscomp$1$$ || "yes" == $now$jscomp$1$$ || "1" == $now$jscomp$1$$; | |
| $dialogPromise$$ ? $$jscomp$this$jscomp$67$$.$loginAnalyticsEvent_$($eventLabel$jscomp$1$$, "success") : $$jscomp$this$jscomp$67$$.$loginAnalyticsEvent_$($eventLabel$jscomp$1$$, "rejected"); | |
| var $loginPromise$$ = $$jscomp$this$jscomp$67$$.$signIn_$.postLoginResult($loginUrl$jscomp$4$$) || | |
| Promise.resolve(); | |
| if ($dialogPromise$$ || !$now$jscomp$1$$) return $loginPromise$$.then(function() { | |
| $$jscomp$this$jscomp$67$$.$broadcastReauthorize_$(); | |
| return $$jscomp$this$jscomp$67$$.$runAuthorization_$(!0).then(function() { | |
| $$jscomp$this$jscomp$67$$.$scheduleView_$(0) | |
| }) | |
| }) | |
| }). | |
| catch (function($loginUrl$jscomp$4$$) { | |
| $$jscomp$this$jscomp$67$$.$loginAnalyticsEvent_$($eventLabel$jscomp$1$$, "failed"); | |
| $$jscomp$this$jscomp$67$$.$loginPromise_$ == $loginPromise$$ && ($$jscomp$this$jscomp$67$$.$loginPromise_$ = null); | |
| throw $loginUrl$jscomp$4$$; | |
| }); | |
| this.$loginPromise_$ = $loginPromise$$; | |
| this.$loginStartTime_$ = $now$jscomp$1$$; | |
| return this.$loginPromise_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.$loginAnalyticsEvent_$ = function($type$jscomp$128$$, $event$jscomp$15$$) { | |
| this.$analyticsEvent_$("access-login-" + $event$jscomp$15$$); | |
| $type$jscomp$128$$ && this.$analyticsEvent_$("access-login-" + $type$jscomp$128$$ + "-" + $event$jscomp$15$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$buildLoginUrls_$ = function() { | |
| var $$jscomp$this$jscomp$68$$ = this; | |
| if (0 != Object.keys(this.$loginConfig_$).length) { | |
| var $promises$jscomp$6$$ = [], | |
| $$jscomp$loop$185$$ = {}, $k$jscomp$14$$; | |
| for ($k$jscomp$14$$ in this.$loginConfig_$) $$jscomp$loop$185$$.k = $k$jscomp$14$$, $promises$jscomp$6$$.push(this.buildUrl(this.$loginConfig_$[$$jscomp$loop$185$$.k], !0).then(function($promises$jscomp$6$$) { | |
| return function($$jscomp$loop$185$$) { | |
| $$jscomp$this$jscomp$68$$.$loginUrlMap_$[$promises$jscomp$6$$.k] = | |
| $$jscomp$loop$185$$; | |
| return { | |
| type: $promises$jscomp$6$$.k, | |
| url: $$jscomp$loop$185$$ | |
| } | |
| } | |
| }($$jscomp$loop$185$$))), $$jscomp$loop$185$$ = { | |
| k: $$jscomp$loop$185$$.k | |
| }; | |
| Promise.all($promises$jscomp$6$$) | |
| } | |
| }; | |
| (function($AMP$jscomp$1$$) { | |
| $AMP$jscomp$1$$.registerServiceForDoc("access", function($AMP$jscomp$1$$) { | |
| return (new $AccessService$$module$build$all$v0$amp_access$$($AMP$jscomp$1$$)).$start_$() | |
| }) | |
| })(self.AMP); | |
| function $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$() { | |
| this.win = window | |
| } | |
| $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$.prototype.start = function() { | |
| var $JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$ = this.win.document, | |
| $JSCompiler_style$jscomp$inline_704$$ = $JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$.createElement("style"); | |
| a: { | |
| var $JSCompiler_langSet$jscomp$inline_2415_JSCompiler_query$jscomp$inline_2412$$ = $parseQueryString_$$module$src$url_parse_query_string$$(this.win.location.search); | |
| var $JSCompiler_doc$jscomp$inline_2413_JSCompiler_inline_result$jscomp$2365$$ = this.win.document; | |
| var $JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$ = this.win.navigator; | |
| $JSCompiler_langSet$jscomp$inline_2415_JSCompiler_query$jscomp$inline_2412$$ = [$JSCompiler_langSet$jscomp$inline_2415_JSCompiler_query$jscomp$inline_2412$$.hl, $JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$.language, $JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$.userLanguage, | |
| "en-US" | |
| ]; | |
| for ($JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$ = 0; $JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$ < $JSCompiler_langSet$jscomp$inline_2415_JSCompiler_query$jscomp$inline_2412$$.length; $JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$++) { | |
| var $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ = | |
| $JSCompiler_langSet$jscomp$inline_2415_JSCompiler_query$jscomp$inline_2412$$[$JSCompiler_i$jscomp$inline_2416_JSCompiler_nav$jscomp$inline_2414$$]; | |
| if ($JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$) { | |
| if ($JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$) { | |
| $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ = | |
| $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$.split("-"); | |
| for (var $JSCompiler_langExpr$jscomp$inline_2421$$ = "", $JSCompiler_langPrefix$jscomp$inline_2422$$ = "", $JSCompiler_i$jscomp$inline_2423$$ = 0; $JSCompiler_i$jscomp$inline_2423$$ < $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$.length; $JSCompiler_i$jscomp$inline_2423$$++) 0 < | |
| $JSCompiler_i$jscomp$inline_2423$$ && ($JSCompiler_langExpr$jscomp$inline_2421$$ += ", ", $JSCompiler_langPrefix$jscomp$inline_2422$$ += "-"), $JSCompiler_langPrefix$jscomp$inline_2422$$ += 0 == $JSCompiler_i$jscomp$inline_2423$$ ? $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$[$JSCompiler_i$jscomp$inline_2423$$].toLowerCase() : $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$[$JSCompiler_i$jscomp$inline_2423$$].toUpperCase(), | |
| $JSCompiler_langPrefix$jscomp$inline_2422$$ = $JSCompiler_langPrefix$jscomp$inline_2422$$.replace(/[^a-zA-Z\-]/g, ""), $JSCompiler_langExpr$jscomp$inline_2421$$ += '[lang="' + $JSCompiler_langPrefix$jscomp$inline_2422$$ + '"]'; | |
| $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ = $JSCompiler_langExpr$jscomp$inline_2421$$ | |
| } else $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ = | |
| null; if ($JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ && $JSCompiler_doc$jscomp$inline_2413_JSCompiler_inline_result$jscomp$2365$$.querySelector($JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$)) { | |
| $JSCompiler_doc$jscomp$inline_2413_JSCompiler_inline_result$jscomp$2365$$ = | |
| $JSCompiler_inline_result$jscomp$inline_2418_JSCompiler_lang$jscomp$inline_2417_JSCompiler_lang$jscomp$inline_2419_JSCompiler_parts$jscomp$inline_2420_JSCompiler_selector$jscomp$inline_2424$$ + " {display: block}"; | |
| break a | |
| } | |
| } | |
| } | |
| $JSCompiler_doc$jscomp$inline_2413_JSCompiler_inline_result$jscomp$2365$$ = "" | |
| } | |
| $JSCompiler_style$jscomp$inline_704$$.textContent = $JSCompiler_doc$jscomp$inline_2413_JSCompiler_inline_result$jscomp$2365$$; | |
| $JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$.head.appendChild($JSCompiler_style$jscomp$inline_704$$); | |
| $JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$ = $parseQueryString_$$module$src$url_parse_query_string$$(this.win.location.search); | |
| this.win.opener && this.win.opener != this.win ? $JSCompiler_StaticMethods_postback_$$(this).then(this.$postbackSuccess_$.bind(this), this.$postbackError_$.bind(this)) : $JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$.url ? (this.win.location.replace($assertAbsoluteHttpOrHttpsUrl$$module$src$url$$($JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$.url)), | |
| Promise.resolve()) : ($JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$ = Error("No opener or return location available"), this.$postbackError_$($JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$), Promise.reject($JSCompiler_doc$jscomp$inline_703_JSCompiler_error$jscomp$inline_708_JSCompiler_query$jscomp$inline_707$$)) | |
| }; | |
| function $JSCompiler_StaticMethods_postback_$$($JSCompiler_StaticMethods_postback_$self$$) { | |
| function $unlisten$jscomp$6$$() {} | |
| var $response$jscomp$12$$ = $JSCompiler_StaticMethods_postback_$self$$.win.location.hash; | |
| return (new Promise(function($resolve$jscomp$28$$, $reject$jscomp$14$$) { | |
| var $opener$jscomp$1$$ = $JSCompiler_StaticMethods_postback_$self$$.win.opener; | |
| $opener$jscomp$1$$ ? ($unlisten$jscomp$6$$ = $listen$$module$src$event_helper$$($JSCompiler_StaticMethods_postback_$self$$.win, "message", function($JSCompiler_StaticMethods_postback_$self$$) { | |
| ($JSCompiler_StaticMethods_postback_$self$$ = | |
| $JSCompiler_StaticMethods_postback_$self$$.data) && "amp" == $JSCompiler_StaticMethods_postback_$self$$.sentinel && "result-ack" == $JSCompiler_StaticMethods_postback_$self$$.type && $resolve$jscomp$28$$() | |
| }), $opener$jscomp$1$$.postMessage({ | |
| sentinel: "amp", | |
| type: "result", | |
| result: $response$jscomp$12$$ | |
| }, "*"), $JSCompiler_StaticMethods_postback_$self$$.win.setTimeout(function() { | |
| $reject$jscomp$14$$(Error("Timed out")) | |
| }, 5E3)) : $reject$jscomp$14$$(Error("Opener not available")) | |
| })).then(function() { | |
| $unlisten$jscomp$6$$() | |
| }, function($JSCompiler_StaticMethods_postback_$self$$) { | |
| $unlisten$jscomp$6$$(); | |
| throw $JSCompiler_StaticMethods_postback_$self$$; | |
| }) | |
| } | |
| $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$.prototype.$postbackSuccess_$ = function() { | |
| var $$jscomp$this$jscomp$70$$ = this; | |
| try { | |
| this.win.close() | |
| } catch ($e$jscomp$48$$) {} | |
| this.win.setTimeout(function() { | |
| $$jscomp$this$jscomp$70$$.$postbackError_$(Error("Failed to close the dialog")) | |
| }, 3E3) | |
| }; | |
| $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$.prototype.$postbackError_$ = function($error$jscomp$36$$) { | |
| var $$jscomp$this$jscomp$71$$ = this; | |
| this.win.console && this.win.console.log && (this.win.console.error || this.win.console.log).call(this.win.console, "Postback failed: ", $error$jscomp$36$$); | |
| var $doc$jscomp$27$$ = this.win.document; | |
| $doc$jscomp$27$$.documentElement.classList.toggle("amp-error", !0); | |
| $doc$jscomp$27$$.documentElement.setAttribute("data-error", "postback"); | |
| $doc$jscomp$27$$.getElementById("closeButton").onclick = function() { | |
| try { | |
| $$jscomp$this$jscomp$71$$.win.close() | |
| } catch ($e$jscomp$49$$) {} | |
| $$jscomp$this$jscomp$71$$.win.setTimeout(function() { | |
| $$jscomp$this$jscomp$71$$.win.closed || $doc$jscomp$27$$.documentElement.setAttribute("data-error", "close") | |
| }, 1E3) | |
| } | |
| }; | |
| $bodyAlwaysVisible$$module$src$style_installer$$(window); | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| $onDocumentReady$$module$src$document_ready$$(document, function() { | |
| (new $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$).start() | |
| }); | |
| $bodyAlwaysVisible$$module$src$style_installer$$(window); | |
| $initLogConstructor$$module$src$log$$(); | |
| self.reportError = $reportError$$module$src$error$$; | |
| $onDocumentReady$$module$src$document_ready$$(document, function() { | |
| (new $LoginDoneDialog$$module$build$all$v0$amp_login_done_dialog$$).start() | |
| }); | |
| var $WebPushConfigAttributes$$module$build$all$v0$amp_web_push_config$$ = { | |
| HELPER_FRAME_URL: "helper-iframe-url", | |
| PERMISSION_DIALOG_URL: "permission-dialog-url", | |
| SERVICE_WORKER_URL: "service-worker-url" | |
| }; | |
| function $WebPushConfig$$module$build$all$v0$amp_web_push_config$$($element$jscomp$74$$) { | |
| return AMP.BaseElement.call(this, $element$jscomp$74$$) || this | |
| } | |
| $$jscomp$inherits$$($WebPushConfig$$module$build$all$v0$amp_web_push_config$$, AMP.BaseElement); | |
| $JSCompiler_prototypeAlias$$ = $WebPushConfig$$module$build$all$v0$amp_web_push_config$$.prototype; | |
| $JSCompiler_prototypeAlias$$.isLayoutSupported = function($layout$jscomp$4$$) { | |
| return "nodisplay" == $layout$jscomp$4$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.validate = function() { | |
| if ("amp-web-push" !== this.element.getAttribute("id")) throw $user$$module$src$log$$().createError("<amp-web-push> must have an id attribute with value 'amp-web-push'."); | |
| if (1 < this.getAmpDoc().getRootNode().querySelectorAll("#amp-web-push").length) throw $user$$module$src$log$$().createError("Only one <amp-web-push> element may exist on a page."); | |
| var $config$jscomp$11$$ = { | |
| "helper-iframe-url": null, | |
| "permission-dialog-url": null, | |
| "service-worker-url": null | |
| }, $attribute$jscomp$2$$; | |
| for ($attribute$jscomp$2$$ in $WebPushConfigAttributes$$module$build$all$v0$amp_web_push_config$$) { | |
| var $value$26$$ = $WebPushConfigAttributes$$module$build$all$v0$amp_web_push_config$$[$attribute$jscomp$2$$]; | |
| $user$$module$src$log$$().assert(this.element.getAttribute($value$26$$), "The " + $value$26$$ + " attribute is required for <amp-web-push>"); | |
| $config$jscomp$11$$[$value$26$$] = this.element.getAttribute($value$26$$) | |
| } | |
| if (!$JSCompiler_StaticMethods_isValidHelperOrPermissionDialogUrl_$$($config$jscomp$11$$["helper-iframe-url"])) throw $user$$module$src$log$$().createError("<amp-web-push> must have a valid helper-iframe-url attribute. It should begin with the https:// protocol and point to the provided lightweight template page provided for AMP messaging."); | |
| if (!$JSCompiler_StaticMethods_isValidHelperOrPermissionDialogUrl_$$($config$jscomp$11$$["permission-dialog-url"])) throw $user$$module$src$log$$().createError("<amp-web-push> must have a valid permission-dialog-url attribute. It should begin with the https:// protocol and point to the provided template page for showing the permission prompt."); | |
| if ("https:" !== $parseUrl$$module$src$url$$($config$jscomp$11$$["service-worker-url"]).protocol) throw $user$$module$src$log$$().createError("<amp-web-push> must have a valid service-worker-url attribute. It should begin with the https:// protocol and point to the service worker JavaScript file to be installed."); | |
| if ($parseUrl$$module$src$url$$($config$jscomp$11$$["service-worker-url"]).origin !== $parseUrl$$module$src$url$$($config$jscomp$11$$["permission-dialog-url"]).origin || $parseUrl$$module$src$url$$($config$jscomp$11$$["permission-dialog-url"]).origin !== $parseUrl$$module$src$url$$($config$jscomp$11$$["helper-iframe-url"]).origin) throw $user$$module$src$log$$().createError("<amp-web-push> URL attributes service-worker-url, permission-dialog-url, and helper-iframe-url must all share the same origin."); | |
| }; | |
| $JSCompiler_prototypeAlias$$.parseConfig = function() { | |
| var $config$jscomp$12$$ = {}, $attribute$jscomp$3$$; | |
| for ($attribute$jscomp$3$$ in $WebPushConfigAttributes$$module$build$all$v0$amp_web_push_config$$) { | |
| var $value$27$$ = $WebPushConfigAttributes$$module$build$all$v0$amp_web_push_config$$[$attribute$jscomp$3$$]; | |
| $config$jscomp$12$$[$value$27$$] = this.element.getAttribute($value$27$$) | |
| } | |
| return $config$jscomp$12$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.buildCallback = function() { | |
| this.validate(); | |
| var $config$jscomp$13$$ = this.parseConfig(), | |
| $webPushService$$ = $getServiceForDoc$$module$src$service$$(this.getAmpDoc(), "amp-web-push-service"); | |
| $webPushService$$.start($config$jscomp$13$$). | |
| catch (function() {}); | |
| this.registerAction("subscribe", this.$onSubscribe_$.bind(this)); | |
| this.registerAction("unsubscribe", this.$onUnsubscribe_$.bind(this)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onSubscribe_$ = function($invocation$jscomp$1$$) { | |
| var $widget$$ = $invocation$jscomp$1$$.event.target; | |
| $widget$$.disabled = !0; | |
| $getServiceForDoc$$module$src$service$$(this.getAmpDoc(), "amp-web-push-service").subscribe(function() { | |
| $widget$$.disabled = !1 | |
| }).then(function() { | |
| $widget$$.disabled = !1 | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onUnsubscribe_$ = function($invocation$jscomp$2$$) { | |
| var $widget$jscomp$2$$ = $invocation$jscomp$2$$.event.target; | |
| $widget$jscomp$2$$.disabled = !0; | |
| $getServiceForDoc$$module$src$service$$(this.getAmpDoc(), "amp-web-push-service").unsubscribe().then(function() { | |
| $widget$jscomp$2$$.disabled = !1 | |
| }) | |
| }; | |
| function $JSCompiler_StaticMethods_isValidHelperOrPermissionDialogUrl_$$($url$jscomp$57$$) { | |
| try { | |
| var $parsedUrl$jscomp$1$$ = $parseUrl$$module$src$url$$($url$jscomp$57$$), | |
| $isNotRootUrl$$ = 1 < $parsedUrl$jscomp$1$$.pathname.length, | |
| $isSecureUrl$$ = "https:" === $parsedUrl$jscomp$1$$.protocol; | |
| return $isSecureUrl$$ && $isNotRootUrl$$ | |
| } catch ($e$jscomp$50$$) { | |
| return !1 | |
| } | |
| }; | |
| function $WindowMessenger$$module$build$all$v0$window_messenger$$($options$jscomp$22$$) { | |
| $options$jscomp$22$$ || ($options$jscomp$22$$ = { | |
| debug: !1, | |
| windowContext: window | |
| }); | |
| this.$messages_$ = {}; | |
| this.$listeners_$ = {}; | |
| this.$debug_$ = $options$jscomp$22$$.debug; | |
| this.$connected_$ = this.$connecting_$ = this.$listening_$ = !1; | |
| this.$onChannelMessageReceivedProc_$ = this.$onConnectConnectionMessageReceivedProc_$ = this.$onListenConnectionMessageReceivedProc_$ = this.$messagePort_$ = this.$channel_$ = null; | |
| this.$window_$ = $options$jscomp$22$$.windowContext || | |
| window | |
| } | |
| $JSCompiler_prototypeAlias$$ = $WindowMessenger$$module$build$all$v0$window_messenger$$.prototype; | |
| $JSCompiler_prototypeAlias$$.listen = function($allowedOrigins$$) { | |
| var $$jscomp$this$jscomp$74$$ = this; | |
| return (new Promise(function($resolve$jscomp$29$$, $reject$jscomp$15$$) { | |
| $$jscomp$this$jscomp$74$$.$connected_$ ? $reject$jscomp$15$$(Error("Already connected.")) : $$jscomp$this$jscomp$74$$.$listening_$ ? $reject$jscomp$15$$(Error("Already listening for connections.")) : Array.isArray($allowedOrigins$$) ? ($$jscomp$this$jscomp$74$$.$onListenConnectionMessageReceivedProc_$ = $$jscomp$this$jscomp$74$$.$onListenConnectionMessageReceived_$.bind($$jscomp$this$jscomp$74$$, | |
| $allowedOrigins$$, $resolve$jscomp$29$$, $reject$jscomp$15$$), $$jscomp$this$jscomp$74$$.$window_$.addEventListener("message", $$jscomp$this$jscomp$74$$.$onListenConnectionMessageReceivedProc_$)) : $reject$jscomp$15$$(Error("allowedOrigins should be a string array of allowed origins to accept messages from. Got:", $allowedOrigins$$)) | |
| })).then(function() { | |
| $$jscomp$this$jscomp$74$$.send($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.CONNECT_HANDSHAKE, null); | |
| $$jscomp$this$jscomp$74$$.$connected_$ = !0 | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$isAllowedOrigin_$ = function($i$jscomp$68_origin$jscomp$6$$, $allowedOrigins$jscomp$1$$) { | |
| var $normalizedOrigin$$ = $parseUrl$$module$src$url$$($i$jscomp$68_origin$jscomp$6$$).origin; | |
| for ($i$jscomp$68_origin$jscomp$6$$ = 0; $i$jscomp$68_origin$jscomp$6$$ < $allowedOrigins$jscomp$1$$.length; $i$jscomp$68_origin$jscomp$6$$++) { | |
| var $allowedOrigin$$ = $allowedOrigins$jscomp$1$$[$i$jscomp$68_origin$jscomp$6$$]; | |
| if ($parseUrl$$module$src$url$$($allowedOrigin$$).origin === $normalizedOrigin$$) return !0 | |
| } | |
| return !1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onListenConnectionMessageReceived_$ = function($allowedOrigins$jscomp$2$$, $resolvePromise$$, $rejectPromise$$, $messageChannelEvent$$) { | |
| var $message$jscomp$39$$ = $messageChannelEvent$$.data, | |
| $$jscomp$destructuring$var2$$ = $messageChannelEvent$$, | |
| $messagePorts$$ = $$jscomp$destructuring$var2$$.ports; | |
| this.$isAllowedOrigin_$($$jscomp$destructuring$var2$$.origin, $allowedOrigins$jscomp$2$$) && $message$jscomp$39$$ && $message$jscomp$39$$.topic === $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.CONNECT_HANDSHAKE && | |
| (this.$window_$.removeEventListener("message", this.$onListenConnectionMessageReceivedProc_$), this.$messagePort_$ = $messagePorts$$[0], this.$onChannelMessageReceivedProc_$ = this.$onChannelMessageReceived_$.bind(this), this.$messagePort_$.addEventListener("message", this.$onChannelMessageReceivedProc_$, !1), this.$messagePort_$.start(), $resolvePromise$$()) | |
| }; | |
| $JSCompiler_prototypeAlias$$.connect = function($remoteWindowContext$$, $expectedRemoteOrigin$$) { | |
| var $$jscomp$this$jscomp$75$$ = this; | |
| return new Promise(function($resolve$jscomp$30$$, $reject$jscomp$16$$) { | |
| $remoteWindowContext$$ || $reject$jscomp$16$$(Error("Provide a valid Window context to connect to.")); | |
| $expectedRemoteOrigin$$ || $reject$jscomp$16$$(Error("Provide an expected origin for the remote Window or provide the wildcard *.")); | |
| $$jscomp$this$jscomp$75$$.$connected_$ ? $reject$jscomp$16$$(Error("Already connected.")) : | |
| $$jscomp$this$jscomp$75$$.$connecting_$ ? $reject$jscomp$16$$(Error("Already connecting.")) : ($$jscomp$this$jscomp$75$$.$channel_$ = new MessageChannel, $$jscomp$this$jscomp$75$$.$messagePort_$ = $$jscomp$this$jscomp$75$$.$channel_$.port1, $$jscomp$this$jscomp$75$$.$onConnectConnectionMessageReceivedProc_$ = $$jscomp$this$jscomp$75$$.$onConnectConnectionMessageReceived_$.bind($$jscomp$this$jscomp$75$$, $$jscomp$this$jscomp$75$$.$messagePort_$, $expectedRemoteOrigin$$, $resolve$jscomp$30$$), $$jscomp$this$jscomp$75$$.$messagePort_$.addEventListener("message", | |
| $$jscomp$this$jscomp$75$$.$onConnectConnectionMessageReceivedProc_$), $$jscomp$this$jscomp$75$$.$messagePort_$.start(), $remoteWindowContext$$.postMessage({ | |
| topic: $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.CONNECT_HANDSHAKE | |
| }, "*" === $expectedRemoteOrigin$$ ? "*" : $parseUrl$$module$src$url$$($expectedRemoteOrigin$$).origin, [$$jscomp$this$jscomp$75$$.$channel_$.port2])) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onConnectConnectionMessageReceived_$ = function($messagePort$$, $expectedRemoteOrigin$jscomp$1$$, $resolvePromise$jscomp$1$$) { | |
| this.$connected_$ = !0; | |
| $messagePort$$.removeEventListener("message", this.$onConnectConnectionMessageReceivedProc_$); | |
| this.$onChannelMessageReceivedProc_$ = this.$onChannelMessageReceived_$.bind(this); | |
| $messagePort$$.addEventListener("message", this.$onChannelMessageReceivedProc_$, !1); | |
| $resolvePromise$jscomp$1$$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onChannelMessageReceived_$ = function($event$jscomp$16_message$jscomp$40$$) { | |
| $event$jscomp$16_message$jscomp$40$$ = $event$jscomp$16_message$jscomp$40$$.data; | |
| if (this.$messages_$[$event$jscomp$16_message$jscomp$40$$.id] && $event$jscomp$16_message$jscomp$40$$.isReply) { | |
| var $existingMessage$$ = this.$messages_$[$event$jscomp$16_message$jscomp$40$$.id]; | |
| delete this.$messages_$[$event$jscomp$16_message$jscomp$40$$.id]; | |
| var $promiseResolver$$ = $existingMessage$$.promiseResolver; | |
| $existingMessage$$.message = | |
| $event$jscomp$16_message$jscomp$40$$.data; | |
| $promiseResolver$$([$event$jscomp$16_message$jscomp$40$$.data, this.$sendReply_$.bind(this, $event$jscomp$16_message$jscomp$40$$.id, $existingMessage$$.topic)]) | |
| } else { | |
| var $listeners$$ = this.$listeners_$[$event$jscomp$16_message$jscomp$40$$.topic]; | |
| if ($listeners$$) for (var $i$jscomp$69$$ = 0; $i$jscomp$69$$ < $listeners$$.length; $i$jscomp$69$$++)(0, $listeners$$[$i$jscomp$69$$])($event$jscomp$16_message$jscomp$40$$.data, this.$sendReply_$.bind(this, $event$jscomp$16_message$jscomp$40$$.id, | |
| $event$jscomp$16_message$jscomp$40$$.topic)) | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.on = function($topic$$, $callback$jscomp$75$$) { | |
| this.$listeners_$[$topic$$] ? this.$listeners_$[$topic$$].push($callback$jscomp$75$$) : this.$listeners_$[$topic$$] = [$callback$jscomp$75$$] | |
| }; | |
| $JSCompiler_prototypeAlias$$.off = function($topic$jscomp$1$$, $callback$jscomp$76$$) { | |
| if ($callback$jscomp$76$$) { | |
| var $callbackIndex$$ = this.$listeners_$[$topic$jscomp$1$$].indexOf($callback$jscomp$76$$); - 1 !== $callbackIndex$$ && this.$listeners_$[$topic$jscomp$1$$].splice($callbackIndex$$, 1) | |
| } else this.$listeners_$[$topic$jscomp$1$$] && delete this.$listeners_$[$topic$jscomp$1$$] | |
| }; | |
| $JSCompiler_prototypeAlias$$.$sendReply_$ = function($id$jscomp$44$$, $topic$jscomp$2$$, $data$jscomp$60$$) { | |
| var $$jscomp$this$jscomp$76$$ = this, | |
| $payload$$ = { | |
| id: $id$jscomp$44$$, | |
| topic: $topic$jscomp$2$$, | |
| data: $data$jscomp$60$$, | |
| isReply: !0 | |
| }; | |
| this.$messagePort_$.postMessage($payload$$); | |
| return new Promise(function($id$jscomp$44$$) { | |
| $$jscomp$this$jscomp$76$$.$messages_$[$payload$$.id] = { | |
| message: $data$jscomp$60$$, | |
| topic: $topic$jscomp$2$$, | |
| promiseResolver: $id$jscomp$44$$ | |
| } | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.send = function($topic$jscomp$3$$, $data$jscomp$61$$) { | |
| var $$jscomp$this$jscomp$77$$ = this, | |
| $payload$jscomp$1$$ = { | |
| id: crypto.getRandomValues(new Uint8Array(10)).join(""), | |
| topic: $topic$jscomp$3$$, | |
| data: $data$jscomp$61$$ | |
| }; | |
| this.$messagePort_$.postMessage($payload$jscomp$1$$); | |
| return new Promise(function($resolve$jscomp$32$$) { | |
| $$jscomp$this$jscomp$77$$.$messages_$[$payload$jscomp$1$$.id] = { | |
| message: $data$jscomp$61$$, | |
| topic: $topic$jscomp$3$$, | |
| promiseResolver: $resolve$jscomp$32$$ | |
| } | |
| }) | |
| }; | |
| $$jscomp$global$$.Object.defineProperties($WindowMessenger$$module$build$all$v0$window_messenger$$, { | |
| Topics: { | |
| configurable: !0, | |
| enumerable: !0, | |
| get: function() { | |
| return { | |
| CONNECT_HANDSHAKE: "topic-connect-handshake", | |
| NOTIFICATION_PERMISSION_STATE: "topic-notification-permission-state", | |
| SERVICE_WORKER_STATE: "topic-service-worker-state", | |
| SERVICE_WORKER_REGISTRATION: "topic-service-worker-registration", | |
| SERVICE_WORKER_QUERY: "topic-service-worker-query", | |
| STORAGE_GET: "topic-storage-get" | |
| } | |
| } | |
| } | |
| }); | |
| function $AmpWebPushHelperFrame$$module$build$all$v0$amp_web_push_helper_frame$$() { | |
| var $options$jscomp$23$$ = { | |
| debug: !1 | |
| }; | |
| this.$debug_$ = $options$jscomp$23$$ && $options$jscomp$23$$.debug; | |
| this.$window_$ = $options$jscomp$23$$.windowContext || window; | |
| this.$ampMessenger_$ = new $WindowMessenger$$module$build$all$v0$window_messenger$$({ | |
| debug: this.$debug_$, | |
| windowContext: this.$window_$ | |
| }); | |
| this.$allowedWorkerMessageTopics_$ = {} | |
| } | |
| function $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrameFunction$$, $successPayload$$) { | |
| var $wasSuccessful$$ = !0, | |
| $errorPayload$$ = null; | |
| $replyToFrameFunction$$({ | |
| success: $wasSuccessful$$, | |
| error: $wasSuccessful$$ ? void 0 : $errorPayload$$, | |
| result: $wasSuccessful$$ ? $successPayload$$ : void 0 | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AmpWebPushHelperFrame$$module$build$all$v0$amp_web_push_helper_frame$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$onAmpPageMessageReceivedNotificationPermissionState_$ = function($message$jscomp$41$$, $replyToFrame$$) { | |
| if ($message$jscomp$41$$ && $message$jscomp$41$$.isQueryTopicSupported) { | |
| var $foundTopicValue$$ = !1, | |
| $topicName$$; | |
| for ($topicName$$ in $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics) $message$jscomp$41$$.isQueryTopicSupported === $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics[$topicName$$] && ($foundTopicValue$$ = !0); | |
| $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$$, | |
| $foundTopicValue$$) | |
| } else $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$$, Notification.permission) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onAmpPageMessageReceivedStorageGet_$ = function($message$jscomp$42$$, $replyToFrame$jscomp$1$$) { | |
| var $storageValue$$ = null; | |
| try { | |
| $message$jscomp$42$$ && $message$jscomp$42$$.key && this.$window_$.localStorage ? $storageValue$$ = this.$window_$.localStorage.getItem($message$jscomp$42$$.key) : $user$$module$src$log$$().warn("amp-web-push", "LocalStorage retrieval failed.") | |
| } catch ($e$jscomp$51$$) {} | |
| $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$jscomp$1$$, $storageValue$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onAmpPageMessageReceivedServiceWorkerState_$ = function($_$jscomp$2$$, $replyToFrame$jscomp$2$$) { | |
| var $serviceWorkerState$$ = { | |
| isControllingFrame: !! this.$window_$.navigator.serviceWorker.controller, | |
| url: this.$window_$.navigator.serviceWorker.controller ? this.$window_$.navigator.serviceWorker.controller.scriptURL : null, | |
| state: this.$window_$.navigator.serviceWorker.controller ? this.$window_$.navigator.serviceWorker.controller.state : null | |
| }; | |
| $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$jscomp$2$$, | |
| $serviceWorkerState$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onAmpPageMessageReceivedServiceWorkerRegistration_$ = function($message$jscomp$43$$, $replyToFrame$jscomp$3$$) { | |
| if (!$message$jscomp$43$$ || !$message$jscomp$43$$.workerUrl || !$message$jscomp$43$$.registrationOptions) throw Error("Expected arguments workerUrl and registrationOptions in message, got:", $message$jscomp$43$$); | |
| this.$window_$.navigator.serviceWorker.register($message$jscomp$43$$.workerUrl, $message$jscomp$43$$.registrationOptions).then(function() { | |
| $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$jscomp$3$$, null) | |
| }). | |
| catch (function($message$jscomp$43$$) { | |
| $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$jscomp$3$$, | |
| $message$jscomp$43$$ ? $message$jscomp$43$$.message || $message$jscomp$43$$.toString() : null) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.messageServiceWorker = function($message$jscomp$44$$) { | |
| this.$window_$.navigator.serviceWorker.controller.postMessage({ | |
| command: $message$jscomp$44$$.topic, | |
| payload: $message$jscomp$44$$.payload | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onAmpPageMessageReceivedServiceWorkerQuery_$ = function($message$jscomp$45$$, $replyToFrame$jscomp$4$$) { | |
| var $$jscomp$this$jscomp$79$$ = this; | |
| if (!$message$jscomp$45$$ || !$message$jscomp$45$$.topic) throw Error("Expected argument topic in message, got:", $message$jscomp$45$$); | |
| (new Promise(function($replyToFrame$jscomp$4$$) { | |
| $$jscomp$this$jscomp$79$$.$allowedWorkerMessageTopics_$[$message$jscomp$45$$.topic] = $replyToFrame$jscomp$4$$; | |
| $$jscomp$this$jscomp$79$$.waitUntilWorkerControlsPage().then(function() { | |
| $$jscomp$this$jscomp$79$$.messageServiceWorker($message$jscomp$45$$) | |
| }) | |
| })).then(function($workerReplyPayload$$) { | |
| delete $$jscomp$this$jscomp$79$$.$allowedWorkerMessageTopics_$[$message$jscomp$45$$.topic]; | |
| return $JSCompiler_StaticMethods_replyToFrameWithPayload_$$($replyToFrame$jscomp$4$$, $workerReplyPayload$$) | |
| }) | |
| }; | |
| function $JSCompiler_StaticMethods_getParentOrigin_$$($JSCompiler_StaticMethods_getParentOrigin_$self_queryParams$jscomp$1$$) { | |
| $JSCompiler_StaticMethods_getParentOrigin_$self_queryParams$jscomp$1$$ = $parseQueryString_$$module$src$url_parse_query_string$$($JSCompiler_StaticMethods_getParentOrigin_$self_queryParams$jscomp$1$$.$window_$.location.search); | |
| if (!$JSCompiler_StaticMethods_getParentOrigin_$self_queryParams$jscomp$1$$.parentOrigin) throw Error("Expecting parentOrigin URL query parameter."); | |
| return $JSCompiler_StaticMethods_getParentOrigin_$self_queryParams$jscomp$1$$.parentOrigin | |
| } | |
| $JSCompiler_prototypeAlias$$.$onPageMessageReceivedFromServiceWorker_$ = function($data$jscomp$62_event$jscomp$17_payload$jscomp$2$$) { | |
| $data$jscomp$62_event$jscomp$17_payload$jscomp$2$$ = $data$jscomp$62_event$jscomp$17_payload$jscomp$2$$.data; | |
| var $command$$ = $data$jscomp$62_event$jscomp$17_payload$jscomp$2$$.command; | |
| $data$jscomp$62_event$jscomp$17_payload$jscomp$2$$ = $data$jscomp$62_event$jscomp$17_payload$jscomp$2$$.payload; | |
| var $callbackPromiseResolver$$ = this.$allowedWorkerMessageTopics_$[$command$$]; | |
| "function" === typeof $callbackPromiseResolver$$ && $callbackPromiseResolver$$($data$jscomp$62_event$jscomp$17_payload$jscomp$2$$) | |
| }; | |
| function $JSCompiler_StaticMethods_isWorkerControllingPage_$$($JSCompiler_StaticMethods_isWorkerControllingPage_$self$$) { | |
| return !(!$JSCompiler_StaticMethods_isWorkerControllingPage_$self$$.$window_$.navigator.serviceWorker || !$JSCompiler_StaticMethods_isWorkerControllingPage_$self$$.$window_$.navigator.serviceWorker.controller || "activated" !== $JSCompiler_StaticMethods_isWorkerControllingPage_$self$$.$window_$.navigator.serviceWorker.controller.state) | |
| } | |
| $JSCompiler_prototypeAlias$$.waitUntilWorkerControlsPage = function() { | |
| var $$jscomp$this$jscomp$80$$ = this; | |
| return new Promise(function($resolve$jscomp$34$$) { | |
| $JSCompiler_StaticMethods_isWorkerControllingPage_$$($$jscomp$this$jscomp$80$$) ? $resolve$jscomp$34$$() : $$jscomp$this$jscomp$80$$.$window_$.navigator.serviceWorker.addEventListener("controllerchange", function() { | |
| $JSCompiler_StaticMethods_isWorkerControllingPage_$$($$jscomp$this$jscomp$80$$) ? $resolve$jscomp$34$$() : $$jscomp$this$jscomp$80$$.$window_$.navigator.serviceWorker.controller.addEventListener("statechange", function() { | |
| $JSCompiler_StaticMethods_isWorkerControllingPage_$$($$jscomp$this$jscomp$80$$) && $resolve$jscomp$34$$() | |
| }) | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.run = function($allowedOrigin$jscomp$1$$) { | |
| var $$jscomp$this$jscomp$81$$ = this; | |
| this.$ampMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.NOTIFICATION_PERMISSION_STATE, this.$onAmpPageMessageReceivedNotificationPermissionState_$.bind(this)); | |
| this.$ampMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_STATE, this.$onAmpPageMessageReceivedServiceWorkerState_$.bind(this)); | |
| this.$ampMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_REGISTRATION, | |
| this.$onAmpPageMessageReceivedServiceWorkerRegistration_$.bind(this)); | |
| this.$ampMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_QUERY, this.$onAmpPageMessageReceivedServiceWorkerQuery_$.bind(this)); | |
| this.$ampMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.STORAGE_GET, this.$onAmpPageMessageReceivedStorageGet_$.bind(this)); | |
| this.waitUntilWorkerControlsPage().then(function() { | |
| $$jscomp$this$jscomp$81$$.$window_$.navigator.serviceWorker.addEventListener("message", | |
| $$jscomp$this$jscomp$81$$.$onPageMessageReceivedFromServiceWorker_$.bind($$jscomp$this$jscomp$81$$)) | |
| }); | |
| this.$ampMessenger_$.listen([$allowedOrigin$jscomp$1$$ || $JSCompiler_StaticMethods_getParentOrigin_$$(this)]) | |
| }; | |
| window._ampWebPushHelperFrame = new $AmpWebPushHelperFrame$$module$build$all$v0$amp_web_push_helper_frame$$; | |
| window._ampWebPushHelperFrame.run(); | |
| function $AmpWebPushPermissionDialog$$module$build$all$v0$amp_web_push_permission_dialog$$() { | |
| var $options$jscomp$24$$ = { | |
| debug: !1 | |
| }; | |
| this.$debug_$ = $options$jscomp$24$$ && $options$jscomp$24$$.debug; | |
| this.$window_$ = $options$jscomp$24$$.windowContext || window; | |
| this.$ampMessenger_$ = new $WindowMessenger$$module$build$all$v0$window_messenger$$({ | |
| debug: this.$debug_$, | |
| windowContext: this.$window_$ | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AmpWebPushPermissionDialog$$module$build$all$v0$amp_web_push_permission_dialog$$.prototype; | |
| $JSCompiler_prototypeAlias$$.isCurrentDialogPopup = function() { | |
| return !!this.$window_$.opener && this.$window_$.opener !== this.$window_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.requestNotificationPermission = function() { | |
| var $$jscomp$this$jscomp$82$$ = this; | |
| return new Promise(function($resolve$jscomp$35$$, $reject$jscomp$17$$) { | |
| try { | |
| $$jscomp$this$jscomp$82$$.$window_$.Notification.requestPermission(function($$jscomp$this$jscomp$82$$) { | |
| return $resolve$jscomp$35$$($$jscomp$this$jscomp$82$$) | |
| }) | |
| } catch ($e$jscomp$52$$) { | |
| $reject$jscomp$17$$($e$jscomp$52$$) | |
| } | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.run = function() { | |
| $JSCompiler_StaticMethods_onCloseIconClick_$$(this); | |
| $JSCompiler_StaticMethods_storeNotificationPermission_$$(this); | |
| for (var $JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$ = this.$window_$.document.querySelectorAll("[permission]"), $JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$ = 0; $JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$ < | |
| $JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$.length; $JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$++) $JSCompiler_StaticMethods_setDomElementVisibility_$$($JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$[$JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$], !1); | |
| ($JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$ = | |
| this.$window_$.document.querySelector("[permission=" + this.$window_$.Notification.permission + "]")) && $JSCompiler_StaticMethods_setDomElementVisibility_$$($JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$, !0); | |
| $JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$ = this.$window_$.document.querySelector("#preload"); | |
| $JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$ = | |
| this.$window_$.document.querySelector("#postload"); | |
| $JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$ && $JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$ && ($JSCompiler_StaticMethods_setDomElementVisibility_$$($JSCompiler_allSections$jscomp$inline_746_JSCompiler_preloadSection$jscomp$inline_751_JSCompiler_section$jscomp$inline_748$$, !1), $JSCompiler_StaticMethods_setDomElementVisibility_$$($JSCompiler_i$jscomp$inline_747_JSCompiler_postloadSection$jscomp$inline_752$$, !0)); | |
| "denied" !== this.$window_$.Notification.permission ? $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$$(this) : $JSCompiler_StaticMethods_onPermissionDenied_$$(this) | |
| }; | |
| function $JSCompiler_StaticMethods_onCloseIconClick_$$($JSCompiler_StaticMethods_onCloseIconClick_$self$$) { | |
| var $closeIcon$$ = $JSCompiler_StaticMethods_onCloseIconClick_$self$$.$window_$.document.querySelector("#close"); | |
| $closeIcon$$ && $closeIcon$$.addEventListener("click", function() { | |
| $JSCompiler_StaticMethods_onCloseIconClick_$self$$.closeDialog() | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.closeDialog = function() { | |
| if (this.isCurrentDialogPopup()) this.$window_$.close(); | |
| else { | |
| var $winLocation$$ = this.$window_$.fakeLocation || this.$window_$.location, | |
| $queryParams$jscomp$2$$ = $parseQueryString_$$module$src$url_parse_query_string$$($winLocation$$.search); | |
| if (!$queryParams$jscomp$2$$["return"]) throw Error("Missing required parameter."); | |
| var $redirectLocation$$ = $tryDecodeUriComponent_$$module$src$url_try_decode_uri_component$$($queryParams$jscomp$2$$["return"], void 0); | |
| this.redirectToUrl($redirectLocation$$) | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_onPermissionDenied_$$($JSCompiler_StaticMethods_onPermissionDenied_$self$$) { | |
| navigator.permissions.query({ | |
| name: "notifications" | |
| }).then(function($permissionStatus$$) { | |
| $permissionStatus$$.onchange = function() { | |
| $JSCompiler_StaticMethods_storeNotificationPermission_$$($JSCompiler_StaticMethods_onPermissionDenied_$self$$); | |
| switch ($JSCompiler_StaticMethods_onPermissionDenied_$self$$.$window_$.Notification.permission) { | |
| case "default": | |
| case "granted": | |
| $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$$($JSCompiler_StaticMethods_onPermissionDenied_$self$$) | |
| } | |
| } | |
| }) | |
| } | |
| function $JSCompiler_StaticMethods_storeNotificationPermission_$$($JSCompiler_StaticMethods_storeNotificationPermission_$self$$) { | |
| $JSCompiler_StaticMethods_storeNotificationPermission_$self$$.$window_$.localStorage.setItem("amp-web-push-notification-permission", $JSCompiler_StaticMethods_storeNotificationPermission_$self$$.$window_$.Notification.permission) | |
| } | |
| function $JSCompiler_StaticMethods_setDomElementVisibility_$$($domElement$$, $isVisible$$) { | |
| if ($domElement$$) { | |
| var $invisibilityCssClassName$$ = "invisible"; | |
| $isVisible$$ ? $domElement$$.classList.remove($invisibilityCssClassName$$) : $domElement$$.classList.add($invisibilityCssClassName$$) | |
| } | |
| } | |
| function $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$$($JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$) { | |
| $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.requestNotificationPermission().then(function($permission$jscomp$2$$) { | |
| $JSCompiler_StaticMethods_storeNotificationPermission_$$($JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$); | |
| if ($JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.isCurrentDialogPopup()) return $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.$ampMessenger_$.connect(opener, | |
| "*"), $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.$ampMessenger_$.send($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.NOTIFICATION_PERMISSION_STATE, $permission$jscomp$2$$).then(function($permission$jscomp$2$$) { | |
| ($permission$jscomp$2$$ = $permission$jscomp$2$$[0]) && $permission$jscomp$2$$.closeFrame && $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.closeDialog() | |
| }); | |
| $JSCompiler_StaticMethods_onPermissionDefaultOrGranted_$self$$.closeDialog() | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.redirectToUrl = function($url$jscomp$58$$) { | |
| var $parsedUrl$jscomp$2$$ = $parseUrl$$module$src$url$$($url$jscomp$58$$); | |
| !$parsedUrl$jscomp$2$$ || "http:" !== $parsedUrl$jscomp$2$$.protocol && "https:" !== $parsedUrl$jscomp$2$$.protocol || (this.$window_$.location.href = $url$jscomp$58$$) | |
| }; | |
| window._ampWebPushPermissionDialog = new $AmpWebPushPermissionDialog$$module$build$all$v0$amp_web_push_permission_dialog$$; | |
| window._ampWebPushPermissionDialog.run(); | |
| function $WebPushWidget$$module$build$all$v0$amp_web_push_widget$$($element$jscomp$75$$) { | |
| return AMP.BaseElement.call(this, $element$jscomp$75$$) || this | |
| } | |
| $$jscomp$inherits$$($WebPushWidget$$module$build$all$v0$amp_web_push_widget$$, AMP.BaseElement); | |
| $WebPushWidget$$module$build$all$v0$amp_web_push_widget$$.prototype.isLayoutSupported = function($layout$jscomp$5$$) { | |
| return "fixed" == $layout$jscomp$5$$ | |
| }; | |
| $WebPushWidget$$module$build$all$v0$amp_web_push_widget$$.prototype.buildCallback = function() { | |
| this.element.classList.add("amp-invisible") | |
| }; | |
| function $IFrameHost$$module$build$all$v0$iframehost$$($ampdoc$jscomp$21$$, $url$jscomp$59$$) { | |
| this.$ampdoc_$ = $ampdoc$jscomp$21$$; | |
| this.$url_$ = $url$jscomp$59$$; | |
| this.$domElement_$ = null; | |
| this.$loadPromise_$ = new Promise(function() {}) | |
| } | |
| $IFrameHost$$module$build$all$v0$iframehost$$.prototype.load = function() { | |
| var $$jscomp$this$jscomp$86$$ = this; | |
| return this.$ampdoc_$.whenReady().then(function() { | |
| $$jscomp$this$jscomp$86$$.$domElement_$ = $$jscomp$this$jscomp$86$$.$ampdoc_$.win.document.createElement("iframe"); | |
| $setStyle$$module$src$style$$($$jscomp$this$jscomp$86$$.$domElement_$, "display", "none"); | |
| $$jscomp$this$jscomp$86$$.$domElement_$.sandbox = "allow-same-origin allow-scripts"; | |
| $$jscomp$this$jscomp$86$$.$domElement_$.src = $$jscomp$this$jscomp$86$$.$url_$; | |
| $$jscomp$this$jscomp$86$$.$ampdoc_$.getBody().appendChild($$jscomp$this$jscomp$86$$.$domElement_$); | |
| $$jscomp$this$jscomp$86$$.$loadPromise_$ = $loadPromise$$module$src$event_helper$$($$jscomp$this$jscomp$86$$.$domElement_$); | |
| return $$jscomp$this$jscomp$86$$.whenReady() | |
| }) | |
| }; | |
| $IFrameHost$$module$build$all$v0$iframehost$$.prototype.getDomElement = function() { | |
| return this.$domElement_$ | |
| }; | |
| $IFrameHost$$module$build$all$v0$iframehost$$.prototype.whenReady = function() { | |
| return this.$loadPromise_$ | |
| }; | |
| function $WebPushService$$module$build$all$v0$web_push_service$$($ampdoc$jscomp$22$$) { | |
| this.ampdoc = $ampdoc$jscomp$22$$; | |
| $installStylesForDoc$$module$src$style_installer$$($ampdoc$jscomp$22$$, "amp-web-push-widget.amp-invisible{visibility:hidden}\n/*# sourceURL=/extensions/amp-web-push/0.1/amp-web-push.css*/", function() {}, !1, "amp-web-push"); | |
| this.$config_$ = { | |
| "helper-iframe-url": null, | |
| "permission-dialog-url": null, | |
| "service-worker-url": null, | |
| debug: null | |
| }; | |
| this.$debug_$ = $getMode$$module$src$mode$$().development; | |
| this.$lastKnownPermission_$ = this.$iframe_$ = null; | |
| this.$frameMessenger_$ = new $WindowMessenger$$module$build$all$v0$window_messenger$$({ | |
| debug: this.$debug_$ | |
| }); | |
| this.$popupMessenger_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $WebPushService$$module$build$all$v0$web_push_service$$.prototype; | |
| $JSCompiler_prototypeAlias$$.start = function($configJson$jscomp$11$$) { | |
| var $$jscomp$this$jscomp$87$$ = this; | |
| if (!this.environmentSupportsWebPush()) return $user$$module$src$log$$().warn("amp-web-push", "Web push is not supported."), Promise.reject("Web push is not supported"); | |
| this.initializeConfig($configJson$jscomp$11$$); | |
| var $iframeLoadPromise$$ = this.installHelperFrame(); | |
| $iframeLoadPromise$$.then(function() { | |
| return $$jscomp$this$jscomp$87$$.$frameMessenger_$.connect($$jscomp$this$jscomp$87$$.$iframe_$.getDomElement().contentWindow, | |
| $parseUrl$$module$src$url$$($$jscomp$this$jscomp$87$$.$config_$["helper-iframe-url"]).origin) | |
| }).then(function() { | |
| if ($$jscomp$this$jscomp$87$$.isContinuingSubscriptionFromRedirect()) $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$$($$jscomp$this$jscomp$87$$); | |
| else return $$jscomp$this$jscomp$87$$.updateWidgetVisibilities() | |
| }); | |
| return $iframeLoadPromise$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.initializeConfig = function($configJson$jscomp$12$$) { | |
| this.$config_$ = $configJson$jscomp$12$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.installHelperFrame = function() { | |
| var $helperUrlHasQueryParams$$ = -1 !== this.$config_$["helper-iframe-url"].indexOf("?"), | |
| $helperUrlQueryParamPrefix$$ = $helperUrlHasQueryParams$$ ? "&" : "?", | |
| $finalIframeUrl$$ = "" + this.$config_$["helper-iframe-url"] + $helperUrlQueryParamPrefix$$ + ("parentOrigin=" + this.ampdoc.win.location.origin); | |
| this.$iframe_$ = new $IFrameHost$$module$build$all$v0$iframehost$$(this.ampdoc, $finalIframeUrl$$); | |
| return this.$iframe_$.load() | |
| }; | |
| $JSCompiler_prototypeAlias$$.isContinuingSubscriptionFromRedirect = function() { | |
| return -1 !== (this.ampdoc.win.testLocation || this.ampdoc.win.location).search.indexOf($WebPushService$$module$build$all$v0$web_push_service$$.PERMISSION_POPUP_URL_FRAGMENT) | |
| }; | |
| $JSCompiler_prototypeAlias$$.removePermissionPopupUrlFragmentFromUrl = function($url$jscomp$60$$) { | |
| var $urlWithoutFragment$$ = $url$jscomp$60$$.replace("?" + $WebPushService$$module$build$all$v0$web_push_service$$.PERMISSION_POPUP_URL_FRAGMENT, ""); | |
| return $urlWithoutFragment$$ = $urlWithoutFragment$$.replace("&" + $WebPushService$$module$build$all$v0$web_push_service$$.PERMISSION_POPUP_URL_FRAGMENT, "") | |
| }; | |
| function $JSCompiler_StaticMethods_queryHelperFrame_$$($JSCompiler_StaticMethods_queryHelperFrame_$self$$, $messageTopic$$, $message$jscomp$47$$) { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$self$$.$iframe_$.whenReady().then(function() { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$self$$.$frameMessenger_$.send($messageTopic$$, $message$jscomp$47$$) | |
| }).then(function($JSCompiler_StaticMethods_queryHelperFrame_$self$$) { | |
| var $result$jscomp$12$$ = $JSCompiler_StaticMethods_queryHelperFrame_$self$$[0]; | |
| if ($result$jscomp$12$$.success) return $result$jscomp$12$$.result; | |
| throw Error("AMP page helper iframe query topic " + $messageTopic$$ + " " + ("and message " + $message$jscomp$47$$ + " failed with: " + $result$jscomp$12$$.error)); | |
| }) | |
| } | |
| function $JSCompiler_StaticMethods_queryServiceWorker_$$($JSCompiler_StaticMethods_queryServiceWorker_$self$$, $messageTopic$jscomp$1$$) { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$$($JSCompiler_StaticMethods_queryServiceWorker_$self$$, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_QUERY, { | |
| topic: $messageTopic$jscomp$1$$, | |
| payload: null | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.queryNotificationPermission = function() { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$$(this, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.NOTIFICATION_PERMISSION_STATE, null) | |
| }; | |
| $JSCompiler_prototypeAlias$$.registerServiceWorker = function() { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$$(this, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_REGISTRATION, { | |
| workerUrl: this.$config_$["service-worker-url"], | |
| registrationOptions: this.$config_$.serviceWorkerRegistrationOptions || { | |
| scope: "/" | |
| } | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.querySubscriptionStateRemotely = function() { | |
| return $JSCompiler_StaticMethods_queryServiceWorker_$$(this, "amp-web-push-subscription-state") | |
| }; | |
| $JSCompiler_prototypeAlias$$.subscribeForPushRemotely = function() { | |
| return $JSCompiler_StaticMethods_queryServiceWorker_$$(this, "amp-web-push-subscribe") | |
| }; | |
| $JSCompiler_prototypeAlias$$.unsubscribeFromPushRemotely = function() { | |
| return $JSCompiler_StaticMethods_queryServiceWorker_$$(this, "amp-web-push-unsubscribe") | |
| }; | |
| $JSCompiler_prototypeAlias$$.isServiceWorkerActivated = function() { | |
| var $$jscomp$this$jscomp$89$$ = this, | |
| $self$jscomp$5$$ = this; | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$$(this, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.SERVICE_WORKER_STATE, null).then(function($serviceWorkerState$jscomp$1$$) { | |
| var $isControllingFrame$$ = !0 === $serviceWorkerState$jscomp$1$$.isControllingFrame, | |
| $serviceWorkerHasCorrectUrl$$ = $$jscomp$this$jscomp$89$$.isUrlSimilarForQueryParams($serviceWorkerState$jscomp$1$$.url, | |
| $self$jscomp$5$$.$config_$["service-worker-url"]), | |
| $serviceWorkerActivated$$ = "activated" === $serviceWorkerState$jscomp$1$$.state; | |
| return $isControllingFrame$$ && $serviceWorkerHasCorrectUrl$$ && $serviceWorkerActivated$$ | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isUrlSimilarForQueryParams = function($originalUrlString$$, $urlToTestString$$) { | |
| var $originalUrl$$ = $parseUrl$$module$src$url$$($originalUrlString$$), | |
| $originalUrlQueryParams$$ = $parseQueryString_$$module$src$url_parse_query_string$$($originalUrl$$.search), | |
| $urlToTest$$ = $parseUrl$$module$src$url$$($urlToTestString$$), | |
| $urlToTestQueryParams$$ = $parseQueryString_$$module$src$url_parse_query_string$$($urlToTest$$.search), | |
| $originalKey$$; | |
| for ($originalKey$$ in $originalUrlQueryParams$$) if ($urlToTestQueryParams$$[$originalKey$$] !== | |
| $originalUrlQueryParams$$[$originalKey$$]) return !1; | |
| return $originalUrl$$.origin === $urlToTest$$.origin && $originalUrl$$.pathname === $urlToTest$$.pathname | |
| }; | |
| $JSCompiler_prototypeAlias$$.setWidgetVisibilities = function($widgetCategoryName$$, $isVisible$jscomp$1$$) { | |
| for (var $widgetDomElements$$ = this.ampdoc.getRootNode().querySelectorAll("amp-web-push-widget[visibility=" + $widgetCategoryName$$ + "]"), $i$jscomp$71$$ = 0; $i$jscomp$71$$ < $widgetDomElements$$.length; $i$jscomp$71$$++) { | |
| var $widgetDomElement$$ = $widgetDomElements$$[$i$jscomp$71$$]; | |
| $isVisible$jscomp$1$$ ? $widgetDomElement$$.classList.remove("amp-invisible") : $widgetDomElement$$.classList.add("amp-invisible") | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_storeLastKnownPermission_$$($JSCompiler_StaticMethods_storeLastKnownPermission_$self$$) { | |
| return $JSCompiler_StaticMethods_storeLastKnownPermission_$self$$.queryNotificationPermission().then(function($permission$jscomp$3$$) { | |
| $JSCompiler_StaticMethods_storeLastKnownPermission_$self$$.$lastKnownPermission_$ = $permission$jscomp$3$$ | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.updateWidgetVisibilities = function() { | |
| var $$jscomp$this$jscomp$91$$ = this; | |
| return $JSCompiler_StaticMethods_storeLastKnownPermission_$$(this).then(function() { | |
| return $JSCompiler_StaticMethods_queryHelperFrame_$$($$jscomp$this$jscomp$91$$, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.NOTIFICATION_PERMISSION_STATE, { | |
| isQueryTopicSupported: $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.STORAGE_GET | |
| }) | |
| }).then(function($response$jscomp$13$$) { | |
| var $isSupported$$ = !0 === $response$jscomp$13$$; | |
| return $isSupported$$ ? $JSCompiler_StaticMethods_queryHelperFrame_$$($$jscomp$this$jscomp$91$$, $WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.STORAGE_GET, { | |
| key: "amp-web-push-notification-permission" | |
| }) : Promise.resolve("default") | |
| }).then(function($canonicalNotificationPermission$$) { | |
| if ("denied" === $canonicalNotificationPermission$$) 0 < $$jscomp$this$jscomp$91$$.ampdoc.getRootNode().querySelectorAll("amp-web-push-widget[visibility=blocked]").length ? ($$jscomp$this$jscomp$91$$.setWidgetVisibilities("unsubscribed", !1), $$jscomp$this$jscomp$91$$.setWidgetVisibilities("subscribed", !1), $$jscomp$this$jscomp$91$$.setWidgetVisibilities("blocked", !0)) : $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$$($$jscomp$this$jscomp$91$$); | |
| else return $$jscomp$this$jscomp$91$$.isServiceWorkerActivated().then(function($canonicalNotificationPermission$$) { | |
| $canonicalNotificationPermission$$ ? $JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$$($$jscomp$this$jscomp$91$$) : $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$$($$jscomp$this$jscomp$91$$) | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$updateWidgetVisibilitiesNotificationPermissionsBlocked_$ = function() { | |
| this.setWidgetVisibilities("unsubscribed", !1); | |
| this.setWidgetVisibilities("subscribed", !1); | |
| this.setWidgetVisibilities("blocked", !0) | |
| }; | |
| function $JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$$($JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$) { | |
| $Services$$module$src$services$timerFor$$($JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$.ampdoc.win).timeoutPromise(5E3, $JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$.querySubscriptionStateRemotely().then(function($reply$$) { | |
| switch ("boolean" === typeof $reply$$ ? 1 : void 0) { | |
| case $WebPushService$$module$build$all$v0$web_push_service$$.AMP_VERSION_INITIAL: | |
| var $isSubscribed$$ = | |
| $reply$$; | |
| $isSubscribed$$ ? ($JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$.setWidgetVisibilities("unsubscribed", !1), $JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$.setWidgetVisibilities("subscribed", !0), $JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$.setWidgetVisibilities("blocked", !1)) : $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$$($JSCompiler_StaticMethods_updateWidgetVisibilitiesServiceWorkerActivated_$self$$); | |
| break; | |
| default: | |
| throw $user$$module$src$log$$().createError("The controlling service worker replied to amp-web-push with an unexpected value."); | |
| } | |
| }), "The controlling service worker does not support amp-web-push.") | |
| } | |
| function $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$$($JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$self$$) { | |
| $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$self$$.setWidgetVisibilities("unsubscribed", !0); | |
| $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$self$$.setWidgetVisibilities("subscribed", !1); | |
| $JSCompiler_StaticMethods_updateWidgetVisibilitiesUnsubscribed_$self$$.setWidgetVisibilities("blocked", !1) | |
| } | |
| $JSCompiler_prototypeAlias$$.subscribe = function($onPopupClosed$$) { | |
| var $$jscomp$this$jscomp$93$$ = this, | |
| $promises$jscomp$7$$ = []; | |
| $promises$jscomp$7$$.push(this.registerServiceWorker()); | |
| $promises$jscomp$7$$.push(new Promise(function($promises$jscomp$7$$) { | |
| switch ($$jscomp$this$jscomp$93$$.$lastKnownPermission_$) { | |
| case "granted": | |
| return $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$$($$jscomp$this$jscomp$93$$).then(function() { | |
| $promises$jscomp$7$$() | |
| }); | |
| default: | |
| var $resolve$jscomp$36$$ = $$jscomp$this$jscomp$93$$.openPopupOrRedirect(); | |
| $JSCompiler_StaticMethods_checkPermissionDialogClosedInterval_$$($$jscomp$this$jscomp$93$$, $resolve$jscomp$36$$, $onPopupClosed$$); | |
| $$jscomp$this$jscomp$93$$.$popupMessenger_$ = new $WindowMessenger$$module$build$all$v0$window_messenger$$({ | |
| debug: $$jscomp$this$jscomp$93$$.$debug_$ | |
| }); | |
| $$jscomp$this$jscomp$93$$.$popupMessenger_$.listen([$$jscomp$this$jscomp$93$$.$config_$["permission-dialog-url"]]); | |
| $$jscomp$this$jscomp$93$$.onPermissionDialogInteracted().then(function($onPopupClosed$$) { | |
| return $$jscomp$this$jscomp$93$$.handlePermissionDialogInteraction($onPopupClosed$$) | |
| }).then(function() { | |
| $promises$jscomp$7$$() | |
| }) | |
| } | |
| })); | |
| return Promise.all($promises$jscomp$7$$) | |
| }; | |
| function $JSCompiler_StaticMethods_checkPermissionDialogClosedInterval_$$($JSCompiler_StaticMethods_checkPermissionDialogClosedInterval_$self$$, $permissionDialogWindow$jscomp$1$$, $onPopupClosed$jscomp$1$$) { | |
| if ($permissionDialogWindow$jscomp$1$$ && !$permissionDialogWindow$jscomp$1$$.closed) var $interval$jscomp$4$$ = $JSCompiler_StaticMethods_checkPermissionDialogClosedInterval_$self$$.ampdoc.win.setInterval(function() { | |
| $permissionDialogWindow$jscomp$1$$.closed && ($onPopupClosed$jscomp$1$$(), $JSCompiler_StaticMethods_checkPermissionDialogClosedInterval_$self$$.ampdoc.win.clearInterval($interval$jscomp$4$$)) | |
| }, | |
| 500) | |
| } | |
| $JSCompiler_prototypeAlias$$.handlePermissionDialogInteraction = function($reply$jscomp$1_result$jscomp$14$$) { | |
| var $permission$jscomp$4$$ = $reply$jscomp$1_result$jscomp$14$$[0]; | |
| $reply$jscomp$1_result$jscomp$14$$ = $reply$jscomp$1_result$jscomp$14$$[1]; | |
| switch ($permission$jscomp$4$$) { | |
| case "denied": | |
| case "default": | |
| return $reply$jscomp$1_result$jscomp$14$$({ | |
| closeFrame: !0 | |
| }), this.updateWidgetVisibilities(); | |
| case "granted": | |
| $reply$jscomp$1_result$jscomp$14$$({ | |
| closeFrame: !0 | |
| }); | |
| $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$$(this); | |
| break; | |
| default: | |
| throw Error("Unexpected permission value:", $permission$jscomp$4$$); | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$$($JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$self$$) { | |
| return $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$self$$.subscribeForPushRemotely().then(function() { | |
| return $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$self$$.updateWidgetVisibilities() | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.unsubscribe = function() { | |
| var $$jscomp$this$jscomp$96$$ = this; | |
| return this.unsubscribeFromPushRemotely().then(function() { | |
| return $$jscomp$this$jscomp$96$$.updateWidgetVisibilities() | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.onPermissionDialogInteracted = function() { | |
| var $$jscomp$this$jscomp$97$$ = this; | |
| return new Promise(function($resolve$jscomp$37$$) { | |
| $$jscomp$this$jscomp$97$$.$popupMessenger_$.on($WindowMessenger$$module$build$all$v0$window_messenger$$.Topics.NOTIFICATION_PERMISSION_STATE, function($$jscomp$this$jscomp$97$$, $replyToFrame$jscomp$5$$) { | |
| $resolve$jscomp$37$$([$$jscomp$this$jscomp$97$$, $replyToFrame$jscomp$5$$]) | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.openPopupOrRedirect = function() { | |
| var $pageUrlHasQueryParams$$ = -1 !== this.ampdoc.win.location.href.indexOf("?"), | |
| $pageUrlQueryParamPrefix$$ = $pageUrlHasQueryParams$$ ? "&" : "?", | |
| $returningPopupUrl$$ = this.ampdoc.win.location.href + $pageUrlQueryParamPrefix$$ + $WebPushService$$module$build$all$v0$web_push_service$$.PERMISSION_POPUP_URL_FRAGMENT, | |
| $permissionDialogUrlHasQueryParams$$ = -1 !== this.$config_$["permission-dialog-url"].indexOf("?"), | |
| $permissionDialogUrlQueryParamPrefix$$ = $permissionDialogUrlHasQueryParams$$ ? | |
| "&" : "?", | |
| $openingPopupUrl$$ = this.$config_$["permission-dialog-url"] + $permissionDialogUrlQueryParamPrefix$$ + ("return=" + encodeURIComponent($returningPopupUrl$$)), | |
| $JSCompiler_w$jscomp$inline_765$$ = Math.floor(Math.min(700, .9 * screen.width)), | |
| $JSCompiler_h$jscomp$inline_766$$ = Math.floor(Math.min(450, .9 * screen.height)); | |
| return $openWindowDialog$$module$src$dom$$(this.ampdoc.win, $openingPopupUrl$$, "_blank", "height=" + $JSCompiler_h$jscomp$inline_766$$ + ",width=" + $JSCompiler_w$jscomp$inline_765$$ + ",left=" + Math.floor((screen.width - | |
| $JSCompiler_w$jscomp$inline_765$$) / 2) + ",top=" + Math.floor((screen.height - $JSCompiler_h$jscomp$inline_766$$) / 2) + ",resizable=yes,scrollbars=yes") | |
| }; | |
| function $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$$($JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$) { | |
| $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$.ampdoc.win.history.replaceState(null, "", $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$.removePermissionPopupUrlFragmentFromUrl($JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$.ampdoc.win.location.href)); | |
| $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$.queryNotificationPermission().then(function($permission$jscomp$5$$) { | |
| switch ($permission$jscomp$5$$) { | |
| case "denied": | |
| case "default": | |
| return $JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$.updateWidgetVisibilities(); | |
| case "granted": | |
| $JSCompiler_StaticMethods_onPermissionGrantedSubscribe_$$($JSCompiler_StaticMethods_resumeSubscribingForPushNotifications_$self$$); | |
| break; | |
| default: | |
| throw Error("Unexpected permission value", $permission$jscomp$5$$); | |
| } | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.environmentSupportsWebPush = function() { | |
| return void 0 !== this.ampdoc.win.Notification && void 0 !== this.ampdoc.win.navigator.serviceWorker && void 0 !== this.ampdoc.win.PushManager && ("https:" === this.ampdoc.win.location.protocol || "localhost" === this.ampdoc.win.location.hostname || "127.0.0.1" === this.ampdoc.win.location.hostname || $getMode$$module$src$mode$$().development || !1) | |
| }; | |
| $$jscomp$global$$.Object.defineProperties($WebPushService$$module$build$all$v0$web_push_service$$, { | |
| PERMISSION_POPUP_URL_FRAGMENT: { | |
| configurable: !0, | |
| enumerable: !0, | |
| get: function() { | |
| return "amp-web-push-subscribing=yes" | |
| } | |
| }, | |
| AMP_VERSION_INITIAL: { | |
| configurable: !0, | |
| enumerable: !0, | |
| get: function() { | |
| return 1 | |
| } | |
| } | |
| }); | |
| (function($AMP$jscomp$2$$) { | |
| $AMP$jscomp$2$$.registerServiceForDoc("amp-web-push-service", $WebPushService$$module$build$all$v0$web_push_service$$); | |
| $AMP$jscomp$2$$.registerElement("amp-web-push", $WebPushConfig$$module$build$all$v0$amp_web_push_config$$); | |
| $AMP$jscomp$2$$.registerElement("amp-web-push-widget", $WebPushWidget$$module$build$all$v0$amp_web_push_widget$$, "amp-web-push-widget.amp-invisible{visibility:hidden}\n/*# sourceURL=/extensions/amp-web-push/0.1/amp-web-push.css*/") | |
| })(self.AMP); | |
| function $cloudflareIsA4AEnabled$$module$extensions$amp_ad_network_cloudflare_impl$0_1$cloudflare_a4a_config$$($win$jscomp$135$$, $element$jscomp$76$$, $useRemoteHtml$$) { | |
| return !$useRemoteHtml$$ | |
| }; | |
| var $URL_EXPERIMENT_MAPPING$$module$extensions$amp_ad_network_adsense_impl$0_1$adsense_a4a_config$$ = { | |
| "-1": "117152632", | |
| 0: null | |
| }; | |
| function $adsenseIsA4AEnabled$$module$extensions$amp_ad_network_adsense_impl$0_1$adsense_a4a_config$$($win$jscomp$136$$, $element$jscomp$77$$, $JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$) { | |
| $JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$ || ($JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$ = /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org((\/.*)|($))+/, | |
| $JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$ = !($win$jscomp$136$$.crypto && ($win$jscomp$136$$.crypto.subtle || $win$jscomp$136$$.crypto.webkitSubtle) && $JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$.test($win$jscomp$136$$.location.origin))); | |
| if ($JSCompiler_googleCdnProxyRegex$jscomp$inline_769_JSCompiler_temp$jscomp$254_useRemoteHtml$jscomp$1$$ || !$element$jscomp$77$$.getAttribute("data-ad-client")) return !1; | |
| var $urlExperimentId$$ = $extractUrlExperimentId$$module$ads$google$a4a$traffic_experiments$$($win$jscomp$136$$, $element$jscomp$77$$); | |
| if (void 0 != $urlExperimentId$$) { | |
| var $experimentId$jscomp$8$$ = $URL_EXPERIMENT_MAPPING$$module$extensions$amp_ad_network_adsense_impl$0_1$adsense_a4a_config$$[$urlExperimentId$$]; | |
| $dev$$module$src$log$$().info("amp-ad-network-adsense-impl", "url experiment selection " + $urlExperimentId$$ + ": " + $experimentId$jscomp$8$$ + ".") | |
| } | |
| $experimentId$jscomp$8$$ && ($addExperimentIdToElement$$module$ads$google$a4a$traffic_experiments$$($experimentId$jscomp$8$$, | |
| $element$jscomp$77$$), $forceExperimentBranch$$module$src$experiments$$($win$jscomp$136$$, "expAdsenseA4A", $experimentId$jscomp$8$$)); | |
| return !0 | |
| }; | |
| var $URL_EXPERIMENT_MAPPING$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$ = { | |
| "-1": "117152632", | |
| 0: null, | |
| 3: "21060728", | |
| 4: "21060729", | |
| 7: "117152666", | |
| 8: "117152667" | |
| }; | |
| function $DoubleclickA4aEligibility$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$() {} | |
| $JSCompiler_prototypeAlias$$ = $DoubleclickA4aEligibility$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$.prototype; | |
| $JSCompiler_prototypeAlias$$.isCdnProxy = function($win$jscomp$137$$) { | |
| return /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org((\/.*)|($))+/.test($win$jscomp$137$$.location.origin) | |
| }; | |
| $JSCompiler_prototypeAlias$$.unconditionedExperimentSelection = function($win$jscomp$138$$, $element$jscomp$78$$) { | |
| this.selectAndSetUnconditionedExp($win$jscomp$138$$, $element$jscomp$78$$, ["21061372", "21061373"], "expUnconditionedCanonicalHoldback") | |
| }; | |
| $JSCompiler_prototypeAlias$$.selectAndSetUnconditionedExp = function($win$jscomp$139$$, $element$jscomp$79$$, $branches$jscomp$2_experimentId$jscomp$9$$, $expName$$) { | |
| if ($branches$jscomp$2_experimentId$jscomp$9$$ = this.maybeSelectExperiment($win$jscomp$139$$, $element$jscomp$79$$, $branches$jscomp$2_experimentId$jscomp$9$$, $expName$$)) $addExperimentIdToElement$$module$ads$google$a4a$traffic_experiments$$($branches$jscomp$2_experimentId$jscomp$9$$, $element$jscomp$79$$), $forceExperimentBranch$$module$src$experiments$$($win$jscomp$139$$, | |
| $expName$$, $branches$jscomp$2_experimentId$jscomp$9$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isA4aEnabled = function($win$jscomp$140$$, $element$jscomp$80$$, $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$) { | |
| function $warnDeprecation$$($win$jscomp$140$$) { | |
| return $user$$module$src$log$$().warn("amp-ad-network-doubleclick-impl", $win$jscomp$140$$ + " will no longer be supported starting on March 29, 2018. Please refer to https://github.com/ampproject/amphtml/issues/11834 for more information") | |
| } | |
| this.unconditionedExperimentSelection($win$jscomp$140$$, $element$jscomp$80$$); | |
| var $usdrd$$ = "useSameDomainRenderingUntilDeprecated", | |
| $hasUSDRD$$ = $usdrd$$ in $element$jscomp$80$$.dataset || ($tryParseJson$$module$src$json$$($element$jscomp$80$$.getAttribute("json")) || {})[$usdrd$$]; | |
| $hasUSDRD$$ && $warnDeprecation$$($usdrd$$); | |
| $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$ && $warnDeprecation$$("remote.html"); | |
| if ($hasUSDRD$$ || $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$ && !$element$jscomp$80$$.getAttribute("rtc-config")) return !1; | |
| $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$ = | |
| $extractUrlExperimentId$$module$ads$google$a4a$traffic_experiments$$($win$jscomp$140$$, $element$jscomp$80$$); | |
| if (!this.isCdnProxy($win$jscomp$140$$)) return "21061373" != ($win$jscomp$140$$.experimentBranches ? $win$jscomp$140$$.experimentBranches.expUnconditionedCanonicalHoldback : null) ? ($addExperimentIdToElement$$module$ads$google$a4a$traffic_experiments$$("21060933", $element$jscomp$80$$), !0) : !1; | |
| if (void 0 != $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$) { | |
| var $experimentId$jscomp$10$$ = $URL_EXPERIMENT_MAPPING$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$[$urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$]; | |
| $dev$$module$src$log$$().info("amp-ad-network-doubleclick-impl", "url experiment selection " + $urlExperimentId$jscomp$1_useRemoteHtml$jscomp$2$$ + ": " + $experimentId$jscomp$10$$ + ".") | |
| } | |
| $experimentId$jscomp$10$$ && ($addExperimentIdToElement$$module$ads$google$a4a$traffic_experiments$$($experimentId$jscomp$10$$, $element$jscomp$80$$), $forceExperimentBranch$$module$src$experiments$$($win$jscomp$140$$, "expDoubleclickA4A", $experimentId$jscomp$10$$)); | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.maybeSelectExperiment = function($win$jscomp$141$$, $element$jscomp$81_experimentInfoMap$jscomp$1$$, $selectionBranches$$, $experimentName$jscomp$6$$) { | |
| $element$jscomp$81_experimentInfoMap$jscomp$1$$ = {}; | |
| $element$jscomp$81_experimentInfoMap$jscomp$1$$[$experimentName$jscomp$6$$] = { | |
| isTrafficEligible: function() { | |
| return !0 | |
| }, | |
| branches: $selectionBranches$$ | |
| }; | |
| $randomlySelectUnsetExperiments$$module$src$experiments$$($win$jscomp$141$$, $element$jscomp$81_experimentInfoMap$jscomp$1$$); | |
| return $win$jscomp$141$$.experimentBranches ? | |
| $win$jscomp$141$$.experimentBranches[$experimentName$jscomp$6$$] : null | |
| }; | |
| var $singleton$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$ = new $DoubleclickA4aEligibility$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$; | |
| function $doubleclickIsA4AEnabled$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$($win$jscomp$142$$, $element$jscomp$82$$, $useRemoteHtml$jscomp$3$$) { | |
| return $singleton$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$.isA4aEnabled($win$jscomp$142$$, $element$jscomp$82$$, $useRemoteHtml$jscomp$3$$) | |
| }; | |
| function $gmosspIsA4AEnabled$$module$extensions$amp_ad_network_gmossp_impl$0_1$gmossp_a4a_config$$($win$jscomp$144$$, $element$jscomp$83$$, $useRemoteHtml$jscomp$4$$) { | |
| var $src$jscomp$4$$; | |
| return !$useRemoteHtml$jscomp$4$$ && !! ($src$jscomp$4$$ = $element$jscomp$83$$.getAttribute("src")) && !! $element$jscomp$83$$.getAttribute("data-use-a4a") && ($startsWith$$module$src$string$$($src$jscomp$4$$, "https://sp.gmossp-sp.jp/") || $startsWith$$module$src$string$$($src$jscomp$4$$, "https://amp.sp.gmossp-sp.jp/_a4a/")) | |
| }; | |
| function $tripleliftIsA4AEnabled$$module$extensions$amp_ad_network_triplelift_impl$0_1$triplelift_a4a_config$$($win$jscomp$145$$, $element$jscomp$84$$, $useRemoteHtml$jscomp$5$$) { | |
| var $src$jscomp$5$$; | |
| return !$useRemoteHtml$jscomp$5$$ && !! $element$jscomp$84$$.getAttribute("data-use-a4a") && !! ($src$jscomp$5$$ = $element$jscomp$84$$.getAttribute("src")) && 0 == $src$jscomp$5$$.indexOf("https://ib.3lift.com/") | |
| }; | |
| function $handleMessageEvent$$module$extensions$amp_ad$0_1$a2a_listener$$($win$jscomp$148$$, $event$jscomp$18_source$jscomp$19$$) { | |
| var $data$jscomp$63_url$jscomp$61$$ = $event$jscomp$18_source$jscomp$19$$.data; | |
| if ("string" == typeof $data$jscomp$63_url$jscomp$61$$ && 0 == $data$jscomp$63_url$jscomp$61$$.indexOf("a2a;")) { | |
| var $origin$jscomp$8$$ = $event$jscomp$18_source$jscomp$19$$.origin; | |
| $data$jscomp$63_url$jscomp$61$$ = $parseJson$$module$src$json$$($data$jscomp$63_url$jscomp$61$$.substr(4)).url; | |
| $event$jscomp$18_source$jscomp$19$$ = | |
| $event$jscomp$18_source$jscomp$19$$.source; | |
| var $activeElement$$ = $win$jscomp$148$$.document.activeElement; | |
| $user$$module$src$log$$().assert("IFRAME" == $activeElement$$.tagName, "A2A request with invalid active element %s %s %s", $activeElement$$, $data$jscomp$63_url$jscomp$61$$, $origin$jscomp$8$$); | |
| for (var $found$$ = !1, $sourceParent$$ = $event$jscomp$18_source$jscomp$19$$, $activeWindow$$ = $activeElement$$.contentWindow; $sourceParent$$ != $win$jscomp$148$$.top;) { | |
| if ($sourceParent$$ == $activeWindow$$) { | |
| $found$$ = !0; | |
| break | |
| } | |
| $sourceParent$$ = $sourceParent$$.parent | |
| } | |
| $user$$module$src$log$$().assert($found$$, "A2A request from invalid source win %s %s", $data$jscomp$63_url$jscomp$61$$, $origin$jscomp$8$$); | |
| $user$$module$src$log$$().assert($closestByTag$$module$src$dom$$($activeElement$$, "amp-ad"), "A2A request from non-ad frame %s %s", $data$jscomp$63_url$jscomp$61$$, $origin$jscomp$8$$); | |
| $user$$module$src$log$$().assert($isProxyOrigin$$module$src$url$$($data$jscomp$63_url$jscomp$61$$), "Invalid ad A2A URL %s %s", $data$jscomp$63_url$jscomp$61$$, | |
| $origin$jscomp$8$$); | |
| $Services$$module$src$services$viewerForDoc$$($win$jscomp$148$$.document).navigateTo($data$jscomp$63_url$jscomp$61$$, "ad-" + $origin$jscomp$8$$) | |
| } | |
| }; | |
| var $excludedTags$$module$src$get_html$$ = ["script", "style"], | |
| $allowedAmpTags$$module$src$get_html$$ = "amp-accordion amp-app-banner amp-carousel amp-fit-text amp-form amp-selector amp-sidebar".split(" "), | |
| $allowedAttributes$$module$src$get_html$$ = "action alt class disabled height href id name placeholder readonly src tabindex title type value width".split(" "); | |
| function $appendToResult$$module$src$get_html$$($child$jscomp$7_node$jscomp$25$$, $attrs$jscomp$1$$, $result$jscomp$16$$) { | |
| for (var $stack$jscomp$2$$ = [$child$jscomp$7_node$jscomp$25$$], $allowedAttrs$$ = $attrs$jscomp$1$$.filter(function($child$jscomp$7_node$jscomp$25$$) { | |
| return $allowedAttributes$$module$src$get_html$$.includes($child$jscomp$7_node$jscomp$25$$) | |
| }); 0 < $stack$jscomp$2$$.length;) if ($child$jscomp$7_node$jscomp$25$$ = $stack$jscomp$2$$.pop(), "string" === typeof $child$jscomp$7_node$jscomp$25$$) $result$jscomp$16$$.push($child$jscomp$7_node$jscomp$25$$); | |
| else if ($child$jscomp$7_node$jscomp$25$$.nodeType === Node.TEXT_NODE) $result$jscomp$16$$.push($child$jscomp$7_node$jscomp$25$$.textContent); | |
| else if ($child$jscomp$7_node$jscomp$25$$.nodeType === Node.ELEMENT_NODE && $isApplicableNode$$module$src$get_html$$($child$jscomp$7_node$jscomp$25$$)) for ($appendOpenTag$$module$src$get_html$$($child$jscomp$7_node$jscomp$25$$, $allowedAttrs$$, $result$jscomp$16$$), $stack$jscomp$2$$.push("</" + $child$jscomp$7_node$jscomp$25$$.tagName.toLowerCase() + ">"), $child$jscomp$7_node$jscomp$25$$ = | |
| $child$jscomp$7_node$jscomp$25$$.lastChild; $child$jscomp$7_node$jscomp$25$$; $child$jscomp$7_node$jscomp$25$$ = $child$jscomp$7_node$jscomp$25$$.previousSibling) $stack$jscomp$2$$.push($child$jscomp$7_node$jscomp$25$$) | |
| } | |
| function $isApplicableNode$$module$src$get_html$$($node$jscomp$26$$) { | |
| var $tagName$jscomp$18$$ = $node$jscomp$26$$.tagName.toLowerCase(); | |
| return $startsWith$$module$src$string$$($tagName$jscomp$18$$, "amp-") ? !(!$allowedAmpTags$$module$src$get_html$$.includes($tagName$jscomp$18$$) || !$node$jscomp$26$$.textContent) : !($excludedTags$$module$src$get_html$$.includes($tagName$jscomp$18$$) || !$node$jscomp$26$$.textContent) | |
| } | |
| function $appendOpenTag$$module$src$get_html$$($node$jscomp$27$$, $attrs$jscomp$2$$, $result$jscomp$17$$) { | |
| $result$jscomp$17$$.push("<" + $node$jscomp$27$$.tagName.toLowerCase()); | |
| $attrs$jscomp$2$$.forEach(function($attrs$jscomp$2$$) { | |
| $node$jscomp$27$$.hasAttribute($attrs$jscomp$2$$) && $result$jscomp$17$$.push(" " + $attrs$jscomp$2$$ + '="' + $node$jscomp$27$$.getAttribute($attrs$jscomp$2$$) + '"') | |
| }); | |
| $result$jscomp$17$$.push(">") | |
| }; | |
| var $MessageType$$module$src$3p_frame_messaging$FULL_OVERLAY_FRAME$$ = "full-overlay-frame", | |
| $MessageType$$module$src$3p_frame_messaging$FULL_OVERLAY_FRAME_RESPONSE$$ = "full-overlay-frame-response", | |
| $MessageType$$module$src$3p_frame_messaging$CANCEL_FULL_OVERLAY_FRAME$$ = "cancel-full-overlay-frame", | |
| $MessageType$$module$src$3p_frame_messaging$CANCEL_FULL_OVERLAY_FRAME_RESPONSE$$ = "cancel-full-overlay-frame-response", | |
| $MessageType$$module$src$3p_frame_messaging$SEND_POSITIONS$$ = "send-positions", | |
| $MessageType$$module$src$3p_frame_messaging$POSITION$$ = | |
| "position"; | |
| function $serializeMessage$$module$src$3p_frame_messaging$$($type$jscomp$129$$, $sentinel$jscomp$2$$, $data$jscomp$64_message$jscomp$50$$) { | |
| $data$jscomp$64_message$jscomp$50$$ = void 0 === $data$jscomp$64_message$jscomp$50$$ ? {} : $data$jscomp$64_message$jscomp$50$$; | |
| var $rtvVersion$$ = void 0 === $rtvVersion$$ ? null : $rtvVersion$$; | |
| $data$jscomp$64_message$jscomp$50$$.type = $type$jscomp$129$$; | |
| $data$jscomp$64_message$jscomp$50$$.sentinel = $sentinel$jscomp$2$$; | |
| return "amp-" + ($rtvVersion$$ || "") + JSON.stringify($data$jscomp$64_message$jscomp$50$$) | |
| } | |
| function $deserializeMessage$$module$src$3p_frame_messaging$$($message$jscomp$51$$) { | |
| if (!$isAmpMessage$$module$src$3p_frame_messaging$$($message$jscomp$51$$)) return null; | |
| var $startPos$$ = $message$jscomp$51$$.indexOf("{"); | |
| try { | |
| return $parseJson$$module$src$json$$($message$jscomp$51$$.substr($startPos$$)) | |
| } catch ($e$jscomp$53$$) { | |
| return $dev$$module$src$log$$().error("MESSAGING", "Failed to parse message: " + $message$jscomp$51$$, $e$jscomp$53$$), null | |
| } | |
| } | |
| function $isAmpMessage$$module$src$3p_frame_messaging$$($message$jscomp$52$$) { | |
| return "string" == typeof $message$jscomp$52$$ && 0 == $message$jscomp$52$$.indexOf("amp-") && -1 != $message$jscomp$52$$.indexOf("{") | |
| }; | |
| function $AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler$$($baseInstance$jscomp$3$$) { | |
| this.$win_$ = $baseInstance$jscomp$3$$.win; | |
| this.$baseInstance_$ = $baseInstance$jscomp$3$$; | |
| this.$element_$ = $baseInstance$jscomp$3$$.element; | |
| this.$uiHandler_$ = $baseInstance$jscomp$3$$.uiHandler; | |
| this.$inaboxPositionApi_$ = this.$embedStateApi_$ = this.$intersectionObserver_$ = this.iframe = null; | |
| this.$isInaboxPositionApiInit_$ = !1; | |
| this.$inaboxRequestPositionApi_$ = null; | |
| this.$unlisteners_$ = []; | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$(this.$baseInstance_$.getAmpDoc()); | |
| this.$viewport_$ = $Services$$module$src$services$viewportForDoc$$(this.$baseInstance_$.getAmpDoc()); | |
| this.$sendPositionPending_$ = !1 | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler$$.prototype; | |
| $JSCompiler_prototypeAlias$$.init = function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $opt_isA4A$$) { | |
| var $$jscomp$this$jscomp$99$$ = this; | |
| this.iframe = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$; | |
| this.iframe.setAttribute("scrolling", "no"); | |
| this.$baseInstance_$.applyFillContent(this.iframe); | |
| var $timer$$ = $Services$$module$src$services$timerFor$$(this.$baseInstance_$.win); | |
| this.$intersectionObserver_$ = new $IntersectionObserver$$module$src$intersection_observer$$(this.$baseInstance_$, this.iframe); | |
| this.$embedStateApi_$ = | |
| new $SubscriptionApi$$module$src$iframe_helper$$(this.iframe, "send-embed-state", function() { | |
| return $JSCompiler_StaticMethods_sendEmbedInfo_$$($$jscomp$this$jscomp$99$$, $$jscomp$this$jscomp$99$$.$baseInstance_$.isInViewport()) | |
| }); | |
| $isExperimentOn$$module$src$experiments$$(this.$win_$, "inabox-position-api") && (this.$inaboxPositionApi_$ = new $SubscriptionApi$$module$src$iframe_helper$$(this.iframe, $MessageType$$module$src$3p_frame_messaging$SEND_POSITIONS$$, function() { | |
| $$jscomp$this$jscomp$99$$.$sendPosition_$(); | |
| $JSCompiler_StaticMethods_registerPosition_$$($$jscomp$this$jscomp$99$$) | |
| })); | |
| $listenForOncePromise$$module$src$iframe_helper$$(this.iframe, "entity-id").then(function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$) { | |
| $$jscomp$this$jscomp$99$$.$element_$.creativeId = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.data.id | |
| }); | |
| this.$unlisteners_$.push($listenFor$$module$src$iframe_helper$$(this.iframe, "get-html", function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $opt_isA4A$$, $timer$$) { | |
| if ($$jscomp$this$jscomp$99$$.iframe) { | |
| var $renderStartResolve$$ = | |
| $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.selector, | |
| $renderStartPromise$$ = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.attributes, | |
| $noContentResolve$$ = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.messageId, | |
| $origin$jscomp$9$$ = ""; | |
| $$jscomp$this$jscomp$99$$.$element_$.hasAttribute("data-html-access-allowed") && ($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ = $$jscomp$this$jscomp$99$$.$baseInstance_$.win.document.querySelector($renderStartResolve$$), $renderStartResolve$$ = [], $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ && | |
| $appendToResult$$module$src$get_html$$($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $renderStartPromise$$, $renderStartResolve$$), $origin$jscomp$9$$ = $renderStartResolve$$.join("").replace(/\s{2,}/g, " ")); | |
| $postMessageToWindows$$module$src$iframe_helper$$($$jscomp$this$jscomp$99$$.iframe, [{ | |
| win: $opt_isA4A$$, | |
| origin: $timer$$ | |
| } | |
| ], "get-html-result", $dict$$module$src$utils$object$$({ | |
| content: $origin$jscomp$9$$, | |
| messageId: $noContentResolve$$ | |
| }), !0) | |
| } | |
| }, !0, !1)); | |
| this.$unlisteners_$.push($listenFor$$module$src$iframe_helper$$(this.iframe, | |
| "embed-size", function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $opt_isA4A$$, $timer$$) { | |
| $JSCompiler_StaticMethods_handleResize_$$($$jscomp$this$jscomp$99$$, $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.height, $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.width, $opt_isA4A$$, $timer$$) | |
| }, !0, !0)); | |
| this.$unlisteners_$.push(this.$viewer_$.onVisibilityChanged(function() { | |
| $JSCompiler_StaticMethods_sendEmbedInfo_$$($$jscomp$this$jscomp$99$$, $$jscomp$this$jscomp$99$$.$baseInstance_$.isInViewport()) | |
| })); | |
| this.$unlisteners_$.push($listenFor$$module$src$iframe_helper$$(this.iframe, | |
| "user-error-in-iframe", function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$) { | |
| $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.message; | |
| "string" == typeof $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ && ($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ = Error($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$), $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.name = "3pError", $reportErrorToAnalytics$$module$src$error$$($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, | |
| $$jscomp$this$jscomp$99$$.$baseInstance_$.win)) | |
| }, !0, !0)); | |
| $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ = $loadPromise$$module$src$event_helper$$(this.iframe).then(function() { | |
| $$jscomp$this$jscomp$99$$.iframe && ($$jscomp$this$jscomp$99$$.iframe.readyState = "complete"); | |
| return $timer$$.promise(10) | |
| }); | |
| this.$baseInstance_$.emitLifecycleEvent && $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.then(function() { | |
| $$jscomp$this$jscomp$99$$.$baseInstance_$.emitLifecycleEvent("xDomIframeLoaded") | |
| }); | |
| var $renderStartResolve$$, | |
| $renderStartPromise$$ = new Promise(function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$) { | |
| $renderStartResolve$$ = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ | |
| }), | |
| $noContentResolve$$, $noContentPromise$$ = new Promise(function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$) { | |
| $noContentResolve$$ = $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$ | |
| }); | |
| this.$baseInstance_$.config && this.$baseInstance_$.config.renderStartImplemented ? $listenForOncePromise$$module$src$iframe_helper$$(this.iframe, ["render-start", "no-content"]).then(function($iframe$jscomp$11_iframeLoadPromise$jscomp$1$$) { | |
| "render-start" == | |
| $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$.data.type ? ($JSCompiler_StaticMethods_renderStart_$$($$jscomp$this$jscomp$99$$, $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$), $renderStartResolve$$()) : ($JSCompiler_StaticMethods_noContent_$$($$jscomp$this$jscomp$99$$), $noContentResolve$$()) | |
| }) : ($listenForOncePromise$$module$src$iframe_helper$$(this.iframe, "bootstrap-loaded").then(function() { | |
| $JSCompiler_StaticMethods_renderStart_$$($$jscomp$this$jscomp$99$$); | |
| $renderStartResolve$$() | |
| }), $listenForOncePromise$$module$src$iframe_helper$$(this.iframe, | |
| "no-content").then(function() { | |
| $JSCompiler_StaticMethods_noContent_$$($$jscomp$this$jscomp$99$$); | |
| $noContentResolve$$() | |
| })); | |
| $listenForOncePromise$$module$src$iframe_helper$$(this.iframe, "ini-load").then(function() { | |
| $$jscomp$this$jscomp$99$$.$baseInstance_$.signals().signal("ini-load") | |
| }); | |
| this.$element_$.appendChild(this.iframe); | |
| $opt_isA4A$$ ? ($JSCompiler_StaticMethods_renderStart_$$(this), $renderStartResolve$$()) : ($setStyle$$module$src$style$$(this.iframe, "visibility", "hidden"), this.$baseInstance_$.lifecycleReporter.addPingsForVisibility(this.$element_$)); | |
| Promise.race([$renderStartPromise$$, $iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $timer$$.promise(1E4)]).then(function() { | |
| $$jscomp$this$jscomp$99$$.iframe && ($setStyle$$module$src$style$$($$jscomp$this$jscomp$99$$.iframe, "visibility", ""), $$jscomp$this$jscomp$99$$.$baseInstance_$.emitLifecycleEvent && $$jscomp$this$jscomp$99$$.$baseInstance_$.emitLifecycleEvent("adSlotUnhidden")) | |
| }); | |
| return Promise.race([$iframe$jscomp$11_iframeLoadPromise$jscomp$1$$, $noContentPromise$$]) | |
| }; | |
| function $JSCompiler_StaticMethods_renderStart_$$($JSCompiler_StaticMethods_renderStart_$self$$, $opt_info$$) { | |
| $JSCompiler_StaticMethods_renderStart_$self$$.$baseInstance_$.renderStarted(); | |
| if ($opt_info$$) { | |
| var $data$jscomp$68$$ = $opt_info$$.data; | |
| $JSCompiler_StaticMethods_handleResize_$$($JSCompiler_StaticMethods_renderStart_$self$$, $data$jscomp$68$$.height, $data$jscomp$68$$.width, $opt_info$$.source, $opt_info$$.origin); | |
| $JSCompiler_StaticMethods_renderStart_$self$$.$baseInstance_$.emitLifecycleEvent && $JSCompiler_StaticMethods_renderStart_$self$$.$baseInstance_$.emitLifecycleEvent("renderCrossDomainStart") | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$.freeXOriginIframe = function($opt_keep$$) { | |
| this.$cleanup_$(); | |
| !$opt_keep$$ && this.iframe && ($removeElement$$module$src$dom$$(this.iframe), this.iframe = null) | |
| }; | |
| function $JSCompiler_StaticMethods_noContent_$$($JSCompiler_StaticMethods_noContent_$self$$) { | |
| $JSCompiler_StaticMethods_noContent_$self$$.iframe && ($JSCompiler_StaticMethods_noContent_$self$$.freeXOriginIframe(0 <= $JSCompiler_StaticMethods_noContent_$self$$.iframe.name.indexOf("_master")), $JSCompiler_StaticMethods_noContent_$self$$.$uiHandler_$.applyNoContentUI()) | |
| } | |
| $JSCompiler_prototypeAlias$$.$cleanup_$ = function() { | |
| this.$unlisteners_$.forEach(function($unlistener$$) { | |
| return $unlistener$$() | |
| }); | |
| this.$unlisteners_$.length = 0; | |
| this.$embedStateApi_$ && (this.$embedStateApi_$.destroy(), this.$embedStateApi_$ = null); | |
| this.$inaboxPositionApi_$ && (this.$inaboxPositionApi_$.destroy(), this.$inaboxPositionApi_$ = null); | |
| this.$intersectionObserver_$ && (this.$intersectionObserver_$.destroy(), this.$intersectionObserver_$ = null) | |
| }; | |
| function $JSCompiler_StaticMethods_handleResize_$$($JSCompiler_StaticMethods_handleResize_$self$$, $height$jscomp$22$$, $width$jscomp$21$$, $source$jscomp$22$$, $origin$jscomp$11$$) { | |
| $JSCompiler_StaticMethods_handleResize_$self$$.$baseInstance_$.getVsync().mutate(function() { | |
| if ($JSCompiler_StaticMethods_handleResize_$self$$.iframe) { | |
| var $iframeHeight$$ = $JSCompiler_StaticMethods_handleResize_$self$$.iframe.offsetHeight, | |
| $iframeWidth$$ = $JSCompiler_StaticMethods_handleResize_$self$$.iframe.offsetWidth; | |
| $JSCompiler_StaticMethods_handleResize_$self$$.$uiHandler_$.updateSize($height$jscomp$22$$, | |
| $width$jscomp$21$$, $iframeHeight$$, $iframeWidth$$).then(function($height$jscomp$22$$) { | |
| $JSCompiler_StaticMethods_handleResize_$self$$.iframe && $postMessageToWindows$$module$src$iframe_helper$$($JSCompiler_StaticMethods_handleResize_$self$$.iframe, [{ | |
| win: $source$jscomp$22$$, | |
| origin: $origin$jscomp$11$$ | |
| } | |
| ], $height$jscomp$22$$.success ? "embed-size-changed" : "embed-size-denied", $dict$$module$src$utils$object$$({ | |
| requestedWidth: $height$jscomp$22$$.newWidth, | |
| requestedHeight: $height$jscomp$22$$.newHeight | |
| }), !0) | |
| }, function() {}) | |
| } | |
| }) | |
| } | |
| function $JSCompiler_StaticMethods_sendEmbedInfo_$$($JSCompiler_StaticMethods_sendEmbedInfo_$self$$, $inViewport$jscomp$1$$) { | |
| $JSCompiler_StaticMethods_sendEmbedInfo_$self$$.$embedStateApi_$ && $JSCompiler_StaticMethods_sendEmbedInfo_$self$$.$embedStateApi_$.send("embed-state", $dict$$module$src$utils$object$$({ | |
| inViewport: $inViewport$jscomp$1$$, | |
| pageHidden: !$JSCompiler_StaticMethods_sendEmbedInfo_$self$$.$viewer_$.isVisible() | |
| })) | |
| } | |
| function $JSCompiler_StaticMethods_getIframePositionPromise_$$($JSCompiler_StaticMethods_getIframePositionPromise_$self$$) { | |
| return $JSCompiler_StaticMethods_getIframePositionPromise_$self$$.$viewport_$.getClientRectAsync($JSCompiler_StaticMethods_getIframePositionPromise_$self$$.iframe).then(function($position$jscomp$1$$) { | |
| var $viewport$jscomp$1$$ = $JSCompiler_StaticMethods_getIframePositionPromise_$self$$.$viewport_$.getRect(); | |
| return $dict$$module$src$utils$object$$({ | |
| targetRect: $position$jscomp$1$$, | |
| viewportRect: $viewport$jscomp$1$$ | |
| }) | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.$sendPosition_$ = function() { | |
| var $$jscomp$this$jscomp$102$$ = this; | |
| this.$sendPositionPending_$ || (this.$sendPositionPending_$ = !0, $JSCompiler_StaticMethods_getIframePositionPromise_$$(this).then(function($position$jscomp$2$$) { | |
| $$jscomp$this$jscomp$102$$.$sendPositionPending_$ = !1; | |
| $$jscomp$this$jscomp$102$$.$inaboxPositionApi_$.send($MessageType$$module$src$3p_frame_messaging$POSITION$$, $position$jscomp$2$$) | |
| })) | |
| }; | |
| function $JSCompiler_StaticMethods_registerPosition_$$($JSCompiler_StaticMethods_registerPosition_$self$$) { | |
| $JSCompiler_StaticMethods_registerPosition_$self$$.$isInaboxPositionApiInit_$ || ($JSCompiler_StaticMethods_registerPosition_$self$$.$isInaboxPositionApiInit_$ = !0, $JSCompiler_StaticMethods_registerPosition_$self$$.$unlisteners_$.push($JSCompiler_StaticMethods_registerPosition_$self$$.$viewport_$.onScroll($throttle$$module$src$utils$rate_limit$$($JSCompiler_StaticMethods_registerPosition_$self$$.$win_$, function() { | |
| $JSCompiler_StaticMethods_getIframePositionPromise_$$($JSCompiler_StaticMethods_registerPosition_$self$$).then(function($position$jscomp$3$$) { | |
| $JSCompiler_StaticMethods_registerPosition_$self$$.$inaboxPositionApi_$.send($MessageType$$module$src$3p_frame_messaging$POSITION$$, $position$jscomp$3$$) | |
| }) | |
| }))), $JSCompiler_StaticMethods_registerPosition_$self$$.$unlisteners_$.push($JSCompiler_StaticMethods_registerPosition_$self$$.$viewport_$.onResize(function() { | |
| $JSCompiler_StaticMethods_getIframePositionPromise_$$($JSCompiler_StaticMethods_registerPosition_$self$$).then(function($position$jscomp$4$$) { | |
| $JSCompiler_StaticMethods_registerPosition_$self$$.$inaboxPositionApi_$.send($MessageType$$module$src$3p_frame_messaging$POSITION$$, | |
| $position$jscomp$4$$) | |
| }) | |
| }))) | |
| } | |
| $JSCompiler_prototypeAlias$$.viewportCallback = function($inViewport$jscomp$2$$) { | |
| if (this.$intersectionObserver_$) this.$intersectionObserver_$.onViewportCallback($inViewport$jscomp$2$$); | |
| $JSCompiler_StaticMethods_sendEmbedInfo_$$(this, $inViewport$jscomp$2$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.onLayoutMeasure = function() { | |
| this.$intersectionObserver_$ && this.$intersectionObserver_$.fire() | |
| }; | |
| AMP.AmpAdXOriginIframeHandler = $AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler$$; | |
| var $count$$module$src$3p_frame$$ = {}; | |
| function $getFrameAttributes$$module$src$3p_frame$$($JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$, $element$jscomp$87$$, $opt_type$jscomp$9_type$jscomp$130$$, $opt_context$jscomp$5$$) { | |
| $opt_type$jscomp$9_type$jscomp$130$$ = $opt_type$jscomp$9_type$jscomp$130$$ || $element$jscomp$87$$.getAttribute("type"); | |
| $user$$module$src$log$$().assert($opt_type$jscomp$9_type$jscomp$130$$, "Attribute type required for <amp-ad>: %s", $element$jscomp$87$$); | |
| var $JSCompiler_inline_result$jscomp$288_JSCompiler_windowDepth$jscomp$inline_789$$ = 0; | |
| for (var $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = $JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$; $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ && $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ != $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$.parent; $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$.parent) $JSCompiler_inline_result$jscomp$288_JSCompiler_windowDepth$jscomp$inline_789$$++; | |
| $JSCompiler_inline_result$jscomp$288_JSCompiler_windowDepth$jscomp$inline_789$$ = String($JSCompiler_inline_result$jscomp$288_JSCompiler_windowDepth$jscomp$inline_789$$) + "-" + $getRandom$$module$src$3p_frame$$($JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$); | |
| var $JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$ = | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = {}, $JSCompiler_dataset$jscomp$inline_794_JSCompiler_temp_const$jscomp$2661$$ = $element$jscomp$87$$.dataset, | |
| $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$; | |
| for ($JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$ in $JSCompiler_dataset$jscomp$inline_794_JSCompiler_temp_const$jscomp$2661$$) $startsWith$$module$src$string$$($JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$, | |
| "vars") || ($JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$[$JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$] = $JSCompiler_dataset$jscomp$inline_794_JSCompiler_temp_const$jscomp$2661$$[$JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$]); | |
| if ($JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$ = | |
| $element$jscomp$87$$.getAttribute("json")) { | |
| $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$ = $tryParseJson$$module$src$json$$($JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$); | |
| if (void 0 === $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$) throw $user$$module$src$log$$().createError("Error parsing JSON in json attribute in element %s", | |
| $element$jscomp$87$$); | |
| for (var $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$ in $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$) $JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$[$JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$] = $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$[$JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$] | |
| } | |
| $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$ = | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$; | |
| $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$ = Date.now(); | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = $element$jscomp$87$$.getAttribute("width"); | |
| $JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$ = | |
| $element$jscomp$87$$.getAttribute("height"); | |
| $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$ = $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$ ? $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$ : {}; | |
| $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$.width = $getLengthNumeral$$module$src$layout$$($JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$); | |
| $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$.height = $getLengthNumeral$$module$src$layout$$($JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$); | |
| var $JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$ = $JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$.location.href; | |
| "about:srcdoc" == $JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$ && ($JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$ = | |
| $JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$.parent.location.href); | |
| var $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$ = $Services$$module$src$services$documentInfoForDoc$$($element$jscomp$87$$), | |
| $JSCompiler_temp_const$jscomp$2653_JSCompiler_viewer$jscomp$inline_809$$ = $Services$$module$src$services$viewerForDoc$$($element$jscomp$87$$); | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = | |
| $JSCompiler_temp_const$jscomp$2653_JSCompiler_viewer$jscomp$inline_809$$.getUnconfirmedReferrerUrl(); | |
| var $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$ = $element$jscomp$87$$.getPageLayoutBox(); | |
| $JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$ = $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$; | |
| $JSCompiler_dataset$jscomp$inline_794_JSCompiler_temp_const$jscomp$2661$$ = $module$src$config$$.urls.thirdParty + | |
| "/1515445171205/ampcontext-v0.js"; | |
| var $JSCompiler_temp_const$jscomp$2660$$ = $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$.sourceUrl, | |
| $JSCompiler_temp_const$jscomp$2659$$ = $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$.canonicalUrl; | |
| $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$ = $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$.pageViewId; | |
| $JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$ = { | |
| href: $JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$ | |
| }; | |
| var $JSCompiler_temp_const$jscomp$2656$$ = $element$jscomp$87$$.tagName, | |
| $JSCompiler_temp_const$jscomp$2655$$ = $getModeObject$$module$src$mode_object$$(), | |
| $JSCompiler_temp_const$jscomp$2654$$ = $isCanary$$module$src$experiments$$($JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$); | |
| $JSCompiler_temp_const$jscomp$2653_JSCompiler_viewer$jscomp$inline_809$$ = !$JSCompiler_temp_const$jscomp$2653_JSCompiler_viewer$jscomp$inline_809$$.isVisible(); | |
| $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$ = $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$ ? { | |
| left: $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$.left, | |
| top: $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$.top, | |
| width: $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$.width, | |
| height: $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$.height | |
| } : | |
| null; | |
| var $JSCompiler_temp_const$jscomp$2651$$ = $element$jscomp$87$$.getIntersectionChangeEntry(); | |
| var $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$ = $element$jscomp$87$$; | |
| for (var $JSCompiler_ids$jscomp$inline_2671$$ = [], $JSCompiler_level$jscomp$inline_2672$$ = 0; $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$ && 1 == $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$.nodeType && 25 > $JSCompiler_level$jscomp$inline_2672$$;) { | |
| var $JSCompiler_id$jscomp$inline_2673$$ = | |
| ""; | |
| $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$.id && ($JSCompiler_id$jscomp$inline_2673$$ = "/" + $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$.id); | |
| var $JSCompiler_nodeName$jscomp$inline_2674$$ = $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$.nodeName.toLowerCase(); | |
| $JSCompiler_ids$jscomp$inline_2671$$.push("" + $JSCompiler_nodeName$jscomp$inline_2674$$ + $JSCompiler_id$jscomp$inline_2673$$ + $indexWithinParent$$module$src$utils$dom_fingerprint$$($JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$)); | |
| $JSCompiler_level$jscomp$inline_2672$$++; | |
| $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$ = $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$.parentElement | |
| } | |
| $JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$ = $JSCompiler_ids$jscomp$inline_2671$$.join(); | |
| $JSCompiler_attributes$jscomp$inline_793_JSCompiler_height$jscomp$inline_806_JSCompiler_temp_const$jscomp$2662$$._context = $dict$$module$src$utils$object$$({ | |
| ampcontextVersion: "1515445171205", | |
| ampcontextFilepath: $JSCompiler_dataset$jscomp$inline_794_JSCompiler_temp_const$jscomp$2661$$, | |
| sourceUrl: $JSCompiler_temp_const$jscomp$2660$$, | |
| referrer: $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$, | |
| canonicalUrl: $JSCompiler_temp_const$jscomp$2659$$, | |
| pageViewId: $JSCompiler_docInfo$jscomp$inline_808_JSCompiler_temp_const$jscomp$2658$$, | |
| location: $JSCompiler_locationHref$jscomp$inline_807_JSCompiler_temp_const$jscomp$2657$$, | |
| startTime: $JSCompiler_json$jscomp$inline_796_JSCompiler_obj$jscomp$inline_797_JSCompiler_startTime$jscomp$inline_804_name$29$jscomp$inline_795$$, | |
| tagName: $JSCompiler_temp_const$jscomp$2656$$, | |
| mode: $JSCompiler_temp_const$jscomp$2655$$, | |
| canary: $JSCompiler_temp_const$jscomp$2654$$, | |
| hidden: $JSCompiler_temp_const$jscomp$2653_JSCompiler_viewer$jscomp$inline_809$$, | |
| initialLayoutRect: $JSCompiler_layoutRect$jscomp$inline_811_JSCompiler_temp_const$jscomp$2652$$, | |
| initialIntersection: $JSCompiler_temp_const$jscomp$2651$$, | |
| domFingerprint: $stringHash32$$module$src$string$$($JSCompiler_element$jscomp$inline_2670_JSCompiler_inline_result$jscomp$2663$$), | |
| experimentToggles: $experimentToggles$$module$src$experiments$$($JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$), | |
| sentinel: $JSCompiler_inline_result$jscomp$288_JSCompiler_windowDepth$jscomp$inline_789$$ | |
| }); | |
| ($JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$ = $element$jscomp$87$$.getAttribute("src")) && ($JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$.src = | |
| $JSCompiler_adSrc$jscomp$inline_812_parentWindow$jscomp$1$$); | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ = $JSCompiler_attributes$jscomp$inline_803_JSCompiler_key$jscomp$inline_798$$; | |
| $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$.type = $opt_type$jscomp$9_type$jscomp$130$$; | |
| Object.assign($JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$._context, | |
| $opt_context$jscomp$5$$); | |
| return $JSCompiler_referrer$jscomp$inline_810_JSCompiler_width$jscomp$inline_805_JSCompiler_win$jscomp$inline_790_attributes$jscomp$9$$ | |
| } | |
| function $getIframe$$module$src$3p_frame$$($baseUrl$jscomp$5_parentWindow$jscomp$2$$, $attributes$jscomp$10_parentElement$jscomp$1$$, $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$, $iframe$jscomp$12_opt_context$jscomp$6$$, $opt_disallowCustom$$) { | |
| $attributes$jscomp$10_parentElement$jscomp$1$$ = $getFrameAttributes$$module$src$3p_frame$$($baseUrl$jscomp$5_parentWindow$jscomp$2$$, $attributes$jscomp$10_parentElement$jscomp$1$$, $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$, $iframe$jscomp$12_opt_context$jscomp$6$$); | |
| $iframe$jscomp$12_opt_context$jscomp$6$$ = $baseUrl$jscomp$5_parentWindow$jscomp$2$$.document.createElement("iframe"); | |
| $count$$module$src$3p_frame$$[$attributes$jscomp$10_parentElement$jscomp$1$$.type] || ($count$$module$src$3p_frame$$[$attributes$jscomp$10_parentElement$jscomp$1$$.type] = 0); | |
| $count$$module$src$3p_frame$$[$attributes$jscomp$10_parentElement$jscomp$1$$.type] += 1; | |
| $baseUrl$jscomp$5_parentWindow$jscomp$2$$ = $getBootstrapBaseUrl$$module$src$3p_frame$$($baseUrl$jscomp$5_parentWindow$jscomp$2$$, | |
| $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$, $opt_disallowCustom$$); | |
| $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$ = $parseUrl$$module$src$url$$($baseUrl$jscomp$5_parentWindow$jscomp$2$$).hostname; | |
| $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$ = JSON.stringify($dict$$module$src$utils$object$$({ | |
| host: $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$, | |
| type: $attributes$jscomp$10_parentElement$jscomp$1$$.type, | |
| count: $count$$module$src$3p_frame$$[$attributes$jscomp$10_parentElement$jscomp$1$$.type], | |
| attributes: $attributes$jscomp$10_parentElement$jscomp$1$$ | |
| })); | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.src = $baseUrl$jscomp$5_parentWindow$jscomp$2$$; | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.ampLocation = $parseUrl$$module$src$url$$($baseUrl$jscomp$5_parentWindow$jscomp$2$$); | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.name = $host$jscomp$1_name$jscomp$97_opt_type$jscomp$10$$; | |
| $attributes$jscomp$10_parentElement$jscomp$1$$.width && ($iframe$jscomp$12_opt_context$jscomp$6$$.width = $attributes$jscomp$10_parentElement$jscomp$1$$.width); | |
| $attributes$jscomp$10_parentElement$jscomp$1$$.height && ($iframe$jscomp$12_opt_context$jscomp$6$$.height = $attributes$jscomp$10_parentElement$jscomp$1$$.height); | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.setAttribute("scrolling", "no"); | |
| $setStyle$$module$src$style$$($iframe$jscomp$12_opt_context$jscomp$6$$, "border", "none"); | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.onload = function() { | |
| this.readyState = "complete" | |
| }; | |
| $iframe$jscomp$12_opt_context$jscomp$6$$.setAttribute("data-amp-3p-sentinel", $attributes$jscomp$10_parentElement$jscomp$1$$._context.sentinel); | |
| return $iframe$jscomp$12_opt_context$jscomp$6$$ | |
| } | |
| function $preloadBootstrap$$module$src$3p_frame$$($url$jscomp$62_win$jscomp$150$$, $preconnect$jscomp$1$$, $opt_type$jscomp$11$$, $opt_disallowCustom$jscomp$1$$) { | |
| $url$jscomp$62_win$jscomp$150$$ = $getBootstrapBaseUrl$$module$src$3p_frame$$($url$jscomp$62_win$jscomp$150$$, $opt_type$jscomp$11$$, $opt_disallowCustom$jscomp$1$$); | |
| $preconnect$jscomp$1$$.preload($url$jscomp$62_win$jscomp$150$$, "document"); | |
| var $scriptUrl$$ = $module$src$config$$.urls.thirdParty + "/1515445171205/f.js"; | |
| $preconnect$jscomp$1$$.preload($scriptUrl$$, | |
| "script") | |
| } | |
| function $getBootstrapBaseUrl$$module$src$3p_frame$$($JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$, $JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$, $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$) { | |
| var $opt_strictForUnitTest$$ = void 0, | |
| $bootstrapBaseUrl$$ = $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.bootstrapBaseUrl; | |
| if ($bootstrapBaseUrl$$) $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$ = $bootstrapBaseUrl$$; | |
| else { | |
| var $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ = $opt_strictForUnitTest$$; | |
| var $JSCompiler_meta$jscomp$inline_818$$ = $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.document.querySelector('meta[name="amp-3p-iframe-src"]'); | |
| $JSCompiler_meta$jscomp$inline_818$$ ? $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$ ? ($user$$module$src$log$$().error("3p-frame", "3p iframe url disabled for " + ($JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$ || "unknown")), $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ = | |
| null) : ($JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$ = $assertHttpsUrl$$module$src$url$$($JSCompiler_meta$jscomp$inline_818$$.getAttribute("content"), $JSCompiler_meta$jscomp$inline_818$$), $user$$module$src$log$$().assert(-1 == $JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$.indexOf("?"), "3p iframe url must not include query string %s in element %s.", $JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$, $JSCompiler_meta$jscomp$inline_818$$), $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$ = | |
| $parseUrl$$module$src$url$$($JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$), $user$$module$src$log$$().assert("localhost" == $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$.hostname && !$JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ || $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$.origin != $parseUrl$$module$src$url$$($JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.location.href).origin, | |
| "3p iframe url must not be on the same origin as the current document %s (%s) in element %s. See https://github.com/ampproject/amphtml/blob/master/spec/amp-iframe-origin-policy.md for details.", $JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$, $JSCompiler_parsed$jscomp$inline_820_opt_disallowCustom$jscomp$2$$.origin, $JSCompiler_meta$jscomp$inline_818$$), $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ = $JSCompiler_url$jscomp$inline_819_opt_type$jscomp$12$$ + | |
| "?1515445171205") : $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ = null; | |
| $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ || ($JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.defaultBootstrapSubDomain = $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.defaultBootstrapSubDomain || "d-" + $getRandom$$module$src$3p_frame$$($JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$), | |
| $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ = "https://" + $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.defaultBootstrapSubDomain + ("." + $module$src$config$$.urls.thirdPartyFrameHost + "/1515445171205/") + "frame.html"); | |
| $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$ = $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$.bootstrapBaseUrl = $JSCompiler_inline_result$jscomp$287_JSCompiler_opt_strictForUnitTest$jscomp$inline_815_JSCompiler_temp$jscomp$286$$ | |
| } | |
| return $JSCompiler_temp$jscomp$285_parentWindow$jscomp$3$$ | |
| } | |
| function $getRandom$$module$src$3p_frame$$($win$jscomp$154$$) { | |
| if ($win$jscomp$154$$.crypto && $win$jscomp$154$$.crypto.getRandomValues) { | |
| var $uint32array$$ = new Uint32Array(2); | |
| $win$jscomp$154$$.crypto.getRandomValues($uint32array$$); | |
| var $rand$$ = String($uint32array$$[0]) + $uint32array$$[1] | |
| } else $rand$$ = String($win$jscomp$154$$.Math.random()).substr(2) + "0"; | |
| return $rand$$ | |
| }; | |
| function $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$($baseInstance$jscomp$4$$) { | |
| this.$baseInstance_$ = $baseInstance$jscomp$4$$; | |
| this.$element_$ = $baseInstance$jscomp$4$$.element; | |
| this.$doc_$ = $baseInstance$jscomp$4$$.win.document; | |
| $baseInstance$jscomp$4$$.getFallback() || $JSCompiler_StaticMethods_addDefaultUiComponent_$$(this, "fallback") | |
| } | |
| $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$.prototype.createPlaceholder = function() { | |
| return $JSCompiler_StaticMethods_addDefaultUiComponent_$$(this, "placeholder") | |
| }; | |
| $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$.prototype.applyNoContentUI = function() { | |
| var $$jscomp$this$jscomp$104$$ = this; | |
| "AMP-STICKY-AD" == $getAdContainer$$module$src$ad_helper$$(this.$element_$) ? this.$baseInstance_$.collapse() : this.$baseInstance_$.attemptCollapse().then(function() {}, function() { | |
| $$jscomp$this$jscomp$104$$.$baseInstance_$.deferMutate(function() { | |
| $$jscomp$this$jscomp$104$$.$baseInstance_$.togglePlaceholder(!1); | |
| $$jscomp$this$jscomp$104$$.$baseInstance_$.toggleFallback(!0) | |
| }) | |
| }) | |
| }; | |
| $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$.prototype.applyUnlayoutUI = function() { | |
| var $$jscomp$this$jscomp$105$$ = this; | |
| this.$baseInstance_$.deferMutate(function() { | |
| $$jscomp$this$jscomp$105$$.$baseInstance_$.toggleFallback(!1) | |
| }) | |
| }; | |
| function $JSCompiler_StaticMethods_addDefaultUiComponent_$$($JSCompiler_StaticMethods_addDefaultUiComponent_$self$$, $content$jscomp$1_name$jscomp$98$$) { | |
| if ("AMP-EMBED" == $JSCompiler_StaticMethods_addDefaultUiComponent_$self$$.$element_$.tagName) return null; | |
| var $uiComponent$$ = $JSCompiler_StaticMethods_addDefaultUiComponent_$self$$.$doc_$.createElement("div"); | |
| $uiComponent$$.setAttribute($content$jscomp$1_name$jscomp$98$$, ""); | |
| $content$jscomp$1_name$jscomp$98$$ = $JSCompiler_StaticMethods_addDefaultUiComponent_$self$$.$doc_$.createElement("div"); | |
| $content$jscomp$1_name$jscomp$98$$.classList.add("i-amphtml-ad-default-holder"); | |
| $content$jscomp$1_name$jscomp$98$$.setAttribute("data-ad-holder-text", "Ad"); | |
| $uiComponent$$.appendChild($content$jscomp$1_name$jscomp$98$$); | |
| $JSCompiler_StaticMethods_addDefaultUiComponent_$self$$.$baseInstance_$.element.appendChild($uiComponent$$); | |
| return $uiComponent$$ | |
| } | |
| $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$.prototype.updateSize = function($height$jscomp$23$$, $width$jscomp$22$$, $iframeHeight$jscomp$1$$, $iframeWidth$jscomp$1$$) { | |
| var $newHeight$jscomp$2$$, $newWidth$jscomp$1$$; | |
| $height$jscomp$23$$ = parseInt($height$jscomp$23$$, 10); | |
| isNaN($height$jscomp$23$$) || ($newHeight$jscomp$2$$ = Math.max(this.$element_$.offsetHeight + $height$jscomp$23$$ - $iframeHeight$jscomp$1$$, $height$jscomp$23$$)); | |
| $width$jscomp$22$$ = parseInt($width$jscomp$22$$, 10); | |
| isNaN($width$jscomp$22$$) || | |
| ($newWidth$jscomp$1$$ = Math.max(this.$element_$.offsetWidth + $width$jscomp$22$$ - $iframeWidth$jscomp$1$$, $width$jscomp$22$$)); | |
| var $resizeInfo$$ = { | |
| success: !0, | |
| newWidth: $newWidth$jscomp$1$$, | |
| newHeight: $newHeight$jscomp$2$$ | |
| }; | |
| return $newHeight$jscomp$2$$ || $newWidth$jscomp$1$$ ? "AMP-STICKY-AD" == $getAdContainer$$module$src$ad_helper$$(this.$element_$) ? ($resizeInfo$$.success = !1, Promise.resolve($resizeInfo$$)) : this.$baseInstance_$.attemptChangeSize($newHeight$jscomp$2$$, $newWidth$jscomp$1$$).then(function() { | |
| return $resizeInfo$$ | |
| }, function() { | |
| $resizeInfo$$.success = !1; | |
| return $resizeInfo$$ | |
| }) : Promise.reject(Error("undefined width and height")) | |
| }; | |
| AMP.AmpAdUIHandler = $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$; | |
| function $AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl$$($$jscomp$super$this$jscomp$1_element$jscomp$89$$) { | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$ = AMP.BaseElement.call(this, $$jscomp$super$this$jscomp$1_element$jscomp$89$$) || this; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$iframe_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.config = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.uiHandler = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$xOriginIframeHandler_$ = | |
| null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$placeholder_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$fallback_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$isInFixedContainer_$ = !1; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$iframeLayoutBox_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$unlistenViewportChanges_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$intersectionObserver_$ = null; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$container_$ = | |
| void 0; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$layoutPromise_$ = null; | |
| var $JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$ = $$jscomp$super$this$jscomp$1_element$jscomp$89$$.element.getAttribute("data-amp-slot-index"); | |
| var $JSCompiler_win$jscomp$inline_2429$$ = $$jscomp$super$this$jscomp$1_element$jscomp$89$$.win; | |
| $randomlySelectUnsetExperiments$$module$src$experiments$$($JSCompiler_win$jscomp$inline_2429$$, $PROFILING_BRANCHES$$module$ads$google$a4a$google_data_reporter$$); | |
| var $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$ = $$jscomp$super$this$jscomp$1_element$jscomp$89$$.element.getAttribute("type"), | |
| $JSCompiler_correlator$jscomp$inline_2682_JSCompiler_win$jscomp$inline_2678$$ = $$jscomp$super$this$jscomp$1_element$jscomp$89$$.win; | |
| ("doubleclick" == $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$ || "adsense" == $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$) && $isExperimentOn$$module$src$experiments$$($JSCompiler_correlator$jscomp$inline_2682_JSCompiler_win$jscomp$inline_2678$$, | |
| "a4aProfilingRate") && ($JSCompiler_win$jscomp$inline_2429$$.experimentBranches && $JSCompiler_win$jscomp$inline_2429$$.experimentBranches.expDoubleclickA4A || $JSCompiler_win$jscomp$inline_2429$$.experimentBranches && $JSCompiler_win$jscomp$inline_2429$$.experimentBranches.expAdsenseA4A) ? ($JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$ = $$jscomp$super$this$jscomp$1_element$jscomp$89$$.win, $JSCompiler_correlator$jscomp$inline_2682_JSCompiler_win$jscomp$inline_2678$$ = $getCorrelator$$module$ads$google$a4a$utils$$($JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$), | |
| $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$.ampAnalyticsPageLoadMetricsConfig = $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$.ampAnalyticsPageLoadMetricsConfig || $dict$$module$src$utils$object$$({ | |
| requests: { | |
| fvt: "https://csi.gstatic.com/csi?s=a4a" + ("&c=" + $JSCompiler_correlator$jscomp$inline_2682_JSCompiler_win$jscomp$inline_2678$$ + "&met.a4a=") + "firstVisibleTime.${firstVisibleTime}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1 | |
| }, | |
| triggers: { | |
| iniLoad: { | |
| on: "visible", | |
| request: "fvt", | |
| selector: "body" | |
| } | |
| } | |
| }), $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$.ampAnalyticsPageLoadMetricsElement = $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$.ampAnalyticsPageLoadMetricsElement || $insertAnalyticsElement$$module$src$extension_analytics$$($$jscomp$super$this$jscomp$1_element$jscomp$89$$.element, $JSCompiler_type$jscomp$inline_2677_JSCompiler_win$jscomp$inline_2681$$.ampAnalyticsPageLoadMetricsConfig), $JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$ = | |
| new $GoogleAdLifecycleReporter$$module$ads$google$a4a$performance$$($JSCompiler_win$jscomp$inline_2429$$, $$jscomp$super$this$jscomp$1_element$jscomp$89$$.element, Number($JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$))) : $JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$ = new $BaseLifecycleReporter$$module$ads$google$a4a$performance$$; | |
| $JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$.setPingParameters({ | |
| s: "AD_SLOT_NAMESPACE", | |
| dt: "NAV_TIMING(navigationStart)", | |
| v: "2", | |
| c: "AD_PAGE_CORRELATOR", | |
| rls: "AMP_VERSION", | |
| v_h: "VIEWPORT_HEIGHT", | |
| s_t: "SCROLL_TOP", | |
| slotId: "AD_SLOT_ID", | |
| stageName: "AD_SLOT_EVENT_NAME", | |
| stageIdx: "AD_SLOT_EVENT_ID", | |
| "met.AD_SLOT_NAMESPACE.AD_SLOT_ID": "AD_SLOT_EVENT_NAME.AD_SLOT_TIME_TO_EVENT", | |
| "e.AD_SLOT_ID": $$jscomp$super$this$jscomp$1_element$jscomp$89$$.element.getAttribute("data-experiment-id"), | |
| "adt.AD_SLOT_ID": $$jscomp$super$this$jscomp$1_element$jscomp$89$$.element.getAttribute("type"), | |
| "met.AD_SLOT_NAMESPACE": "firstVisibleTime.AD_PAGE_FIRST_VISIBLE_TIME,lastVisibleTime.AD_PAGE_LAST_VISIBLE_TIME" | |
| }); | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.lifecycleReporter = $JSCompiler_inline_result$jscomp$2361_JSCompiler_reporter$jscomp$inline_827_JSCompiler_slotId$jscomp$inline_2428$$; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$type_$ = void 0; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$isFullWidthAligned_$ = !1; | |
| $$jscomp$super$this$jscomp$1_element$jscomp$89$$.$isFullWidthRequested_$ = !1; | |
| return $$jscomp$super$this$jscomp$1_element$jscomp$89$$ | |
| } | |
| $$jscomp$inherits$$($AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl$$, AMP.BaseElement); | |
| $JSCompiler_prototypeAlias$$ = $AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getPriority = function() { | |
| return this.element.getAmpDoc().isSingleDoc() ? 2 : 1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.renderOutsideViewport = function() { | |
| if (this.win["3pla"]) return !1; | |
| var $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$ = this.element.getAttribute("data-loading-strategy"); | |
| if (null == $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$) var $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ = null; | |
| else "prefer-viewability-over-views" == $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$ || | |
| "" == $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$ ? $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ = 1.25 : ($JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ = "Value of data-loading-strategy should be a float number in range of [0, 3], but got " + $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$, $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$ = | |
| $user$$module$src$log$$().assertNumber(parseFloat($JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$), $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$), $user$$module$src$log$$().assert(0 <= $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$ && 3 >= $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$, $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$), | |
| $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ = $JSCompiler_rawValue$jscomp$inline_830_JSCompiler_viewportNumber$jscomp$inline_832$$); | |
| return null !== $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ ? $JSCompiler_errorMessage$jscomp$inline_831_JSCompiler_inline_result$jscomp$290_elementCheck$jscomp$1$$ : AMP.BaseElement.prototype.renderOutsideViewport.call(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isLayoutSupported = function($layout$jscomp$6$$) { | |
| return $isLayoutSizeDefined$$module$src$layout$$($layout$jscomp$6$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getResource = function() { | |
| return this.element.getResources().getResourceForElement(this.element) | |
| }; | |
| $JSCompiler_prototypeAlias$$.buildCallback = function() { | |
| this.$type_$ = this.element.getAttribute("type"); | |
| var $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$ = Math.round(this.getResource().getUpgradeDelayMs()); | |
| $dev$$module$src$log$$().info("amp-ad-3p-impl", "upgradeDelay " + this.$type_$ + ": " + $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$); | |
| this.emitLifecycleEvent("upgradeDelay", { | |
| forced_delta: $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$ | |
| }); | |
| this.$placeholder_$ = this.getPlaceholder(); | |
| this.$fallback_$ = this.getFallback(); | |
| this.config = $adConfig$$module$ads$_config$$[this.$type_$]; | |
| $user$$module$src$log$$().assert(this.config, 'Type "' + this.$type_$ + '" is not supported in amp-ad'); | |
| this.uiHandler = new $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$(this); | |
| $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$ = this.win; | |
| $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$.a2alistener || | |
| ($JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$.a2alistener = !0, $isExperimentOn$$module$src$experiments$$($JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$, "alp") && $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$.addEventListener("message", $handleMessageEvent$$module$extensions$amp_ad$0_1$a2a_listener$$.bind(null, $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$))); | |
| this.element.hasAttribute("data-full-width") ? ($user$$module$src$log$$().assert("100vw" == this.element.getAttribute("width"), 'Ad units with data-full-width must have width="100vw".'), $user$$module$src$log$$().assert( !! this.config.fullWidthHeightRatio, "Ad network does not support full width ads."), $dev$$module$src$log$$().info("amp-ad-3p-impl", "#${this.getResource().getId()} Full width requested"), $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$ = !0) : $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$ = !1; | |
| if (this.$isFullWidthRequested_$ = $JSCompiler_inline_result$jscomp$289_JSCompiler_win$jscomp$inline_834_upgradeDelayMs$jscomp$1$$) return $JSCompiler_StaticMethods_attemptFullWidthSizeChange_$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.preconnectCallback = function($opt_onLayout$$) { | |
| var $$jscomp$this$jscomp$106$$ = this; | |
| $preloadBootstrap$$module$src$3p_frame$$(this.win, this.preconnect, this.$type_$, this.config.remoteHTMLDisabled); | |
| "string" == typeof this.config.prefetch ? this.preconnect.preload(this.config.prefetch, "script") : this.config.prefetch && this.config.prefetch.forEach(function($opt_onLayout$$) { | |
| $$jscomp$this$jscomp$106$$.preconnect.preload($opt_onLayout$$, "script") | |
| }); | |
| "string" == typeof this.config.preconnect ? | |
| this.preconnect.url(this.config.preconnect, $opt_onLayout$$) : this.config.preconnect && this.config.preconnect.forEach(function($src$jscomp$6$$) { | |
| $$jscomp$this$jscomp$106$$.preconnect.url($src$jscomp$6$$, $opt_onLayout$$) | |
| }); | |
| var $src$jscomp$6$$ = this.element.getAttribute("src"); | |
| $src$jscomp$6$$ && this.preconnect.url($src$jscomp$6$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.onLayoutMeasure = function() { | |
| var $$jscomp$this$jscomp$107$$ = this; | |
| this.$isInFixedContainer_$ = !$isAdPositionAllowed$$module$src$ad_helper$$(this.element, this.win); | |
| void 0 === this.$container_$ && (this.$container_$ = $getAdContainer$$module$src$ad_helper$$(this.element)); | |
| $JSCompiler_StaticMethods_measureIframeLayoutBox_$$(this); | |
| if (this.$xOriginIframeHandler_$) this.$xOriginIframeHandler_$.onLayoutMeasure(); | |
| if (this.$isFullWidthRequested_$ && !this.$isFullWidthAligned_$) { | |
| this.$isFullWidthAligned_$ = !0; | |
| var $layoutBox$$ = this.getLayoutBox(); | |
| this.getVsync().run({ | |
| measure: function($layoutBox$$) { | |
| $layoutBox$$.direction = $computedStyle$$module$src$style$$($$jscomp$this$jscomp$107$$.win, $$jscomp$this$jscomp$107$$.element).direction | |
| }, | |
| mutate: function($state$jscomp$9$$) { | |
| "rtl" == $state$jscomp$9$$.direction ? $setStyle$$module$src$style$$($$jscomp$this$jscomp$107$$.element, "marginRight", $layoutBox$$.left, "px") : $setStyle$$module$src$style$$($$jscomp$this$jscomp$107$$.element, "marginLeft", -$layoutBox$$.left, "px") | |
| } | |
| }, { | |
| direction: "" | |
| }) | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_measureIframeLayoutBox_$$($JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$) { | |
| if ($JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.$xOriginIframeHandler_$ && $JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.$xOriginIframeHandler_$.iframe) { | |
| var $iframeBox$$ = $JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.getViewport().getLayoutRect($JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.$xOriginIframeHandler_$.iframe), | |
| $box$$ = $JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.getLayoutBox(); | |
| $JSCompiler_StaticMethods_measureIframeLayoutBox_$self$$.$iframeLayoutBox_$ = $moveLayoutRect$$module$src$layout_rect$$($iframeBox$$, -$box$$.left, -$box$$.top) | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$.getIntersectionElementLayoutBox = function() { | |
| if (!this.$xOriginIframeHandler_$ || !this.$xOriginIframeHandler_$.iframe) return AMP.BaseElement.prototype.getIntersectionElementLayoutBox.call(this); | |
| var $box$jscomp$1$$ = this.getLayoutBox(); | |
| this.$iframeLayoutBox_$ || $JSCompiler_StaticMethods_measureIframeLayoutBox_$$(this); | |
| return $moveLayoutRect$$module$src$layout_rect$$(this.$iframeLayoutBox_$, $box$jscomp$1$$.left, $box$jscomp$1$$.top) | |
| }; | |
| $JSCompiler_prototypeAlias$$.layoutCallback = function() { | |
| var $$jscomp$this$jscomp$108$$ = this; | |
| if (this.$layoutPromise_$) return this.$layoutPromise_$; | |
| this.emitLifecycleEvent("preAdThrottle"); | |
| $user$$module$src$log$$().assert(!this.$isInFixedContainer_$, "<amp-ad> is not allowed to be placed in elements with position:fixed: %s", this.element); | |
| this.$layoutPromise_$ = $getAdCid$$module$src$ad_cid$$(this).then(function($cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$) { | |
| $cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$ = { | |
| clientId: $cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$ || null, | |
| container: $$jscomp$this$jscomp$108$$.$container_$ | |
| }; | |
| $$jscomp$this$jscomp$108$$.emitLifecycleEvent("adRequestStart"); | |
| $cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$ = $getIframe$$module$src$3p_frame$$($$jscomp$this$jscomp$108$$.element.ownerDocument.defaultView, $$jscomp$this$jscomp$108$$.element, $$jscomp$this$jscomp$108$$.$type_$, $cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$, $$jscomp$this$jscomp$108$$.config.remoteHTMLDisabled); | |
| $$jscomp$this$jscomp$108$$.$xOriginIframeHandler_$ = new $AmpAdXOriginIframeHandler$$module$extensions$amp_ad$0_1$amp_ad_xorigin_iframe_handler$$($$jscomp$this$jscomp$108$$); | |
| return $$jscomp$this$jscomp$108$$.$xOriginIframeHandler_$.init($cid$jscomp$1_iframe$jscomp$14_opt_context$jscomp$7$$) | |
| }); | |
| $incrementLoadingAds$$module$extensions$amp_ad$0_1$concurrent_load$$(this.win, this.$layoutPromise_$); | |
| return this.$layoutPromise_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.viewportCallback = function($inViewport$jscomp$3$$) { | |
| this.$xOriginIframeHandler_$ && this.$xOriginIframeHandler_$.viewportCallback($inViewport$jscomp$3$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.unlayoutCallback = function() { | |
| this.$layoutPromise_$ = null; | |
| this.uiHandler.applyUnlayoutUI(); | |
| this.$xOriginIframeHandler_$ && (this.$xOriginIframeHandler_$.freeXOriginIframe(), this.$xOriginIframeHandler_$ = null); | |
| this.emitLifecycleEvent("adSlotCleared"); | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.createPlaceholderCallback = function() { | |
| return this.uiHandler.createPlaceholder() | |
| }; | |
| $JSCompiler_prototypeAlias$$.emitLifecycleEvent = function($eventName$jscomp$2$$, $opt_extraVariables$jscomp$1$$) { | |
| $opt_extraVariables$jscomp$1$$ && this.lifecycleReporter.setPingParameters($opt_extraVariables$jscomp$1$$); | |
| this.lifecycleReporter.sendPing($eventName$jscomp$2$$) | |
| }; | |
| function $JSCompiler_StaticMethods_attemptFullWidthSizeChange_$$($JSCompiler_StaticMethods_attemptFullWidthSizeChange_$self$$) { | |
| var $viewportSize$jscomp$2$$ = $JSCompiler_StaticMethods_attemptFullWidthSizeChange_$self$$.getViewport().getSize(), | |
| $maxHeight$$ = Math.min(500, $viewportSize$jscomp$2$$.height), | |
| $ratio$$ = $JSCompiler_StaticMethods_attemptFullWidthSizeChange_$self$$.config.fullWidthHeightRatio, | |
| $idealHeight$$ = Math.round($viewportSize$jscomp$2$$.width / $ratio$$), | |
| $height$jscomp$24$$ = Math.min(Math.max($idealHeight$$, | |
| 100), $maxHeight$$), | |
| $width$jscomp$23$$ = $viewportSize$jscomp$2$$.width; | |
| return $JSCompiler_StaticMethods_attemptFullWidthSizeChange_$self$$.attemptChangeSize($height$jscomp$24$$, $width$jscomp$23$$).then(function() { | |
| $dev$$module$src$log$$().info("amp-ad-3p-impl", "Size change accepted: " + $width$jscomp$23$$ + "x" + $height$jscomp$24$$) | |
| }, function() { | |
| $dev$$module$src$log$$().info("amp-ad-3p-impl", "Size change rejected: " + $width$jscomp$23$$ + "x" + $height$jscomp$24$$) | |
| }) | |
| }; | |
| var $ampCustomadXhrPromises$$module$extensions$amp_ad$0_1$amp_ad_custom$$ = {}, $ampCustomadFullUrls$$module$extensions$amp_ad$0_1$amp_ad_custom$$ = null; | |
| function $AmpAdCustom$$module$extensions$amp_ad$0_1$amp_ad_custom$$($$jscomp$super$this$jscomp$2_element$jscomp$90$$) { | |
| $$jscomp$super$this$jscomp$2_element$jscomp$90$$ = AMP.BaseElement.call(this, $$jscomp$super$this$jscomp$2_element$jscomp$90$$) || this; | |
| $$jscomp$super$this$jscomp$2_element$jscomp$90$$.$url_$ = null; | |
| $$jscomp$super$this$jscomp$2_element$jscomp$90$$.$slot_$ = null; | |
| $$jscomp$super$this$jscomp$2_element$jscomp$90$$.uiHandler = null; | |
| return $$jscomp$super$this$jscomp$2_element$jscomp$90$$ | |
| } | |
| $$jscomp$inherits$$($AmpAdCustom$$module$extensions$amp_ad$0_1$amp_ad_custom$$, AMP.BaseElement); | |
| $JSCompiler_prototypeAlias$$ = $AmpAdCustom$$module$extensions$amp_ad$0_1$amp_ad_custom$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getPriority = function() { | |
| return this.element.getAmpDoc().isSingleDoc() ? 2 : 1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.isLayoutSupported = function($layout$jscomp$7$$) { | |
| return $isLayoutSizeDefined$$module$src$layout$$($layout$jscomp$7$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.buildCallback = function() { | |
| this.$url_$ = this.element.getAttribute("data-url"); | |
| this.$slot_$ = this.element.getAttribute("data-slot"); | |
| var $templates$$ = this.element.querySelectorAll("template"); | |
| $user$$module$src$log$$().assert(0 < $templates$$.length, "Missing template in custom ad"); | |
| $user$$module$src$log$$().assert(null === this.$slot_$ || this.$slot_$.match(/^[0-9a-z]+$/), "custom ad slot should be alphanumeric: " + this.$slot_$); | |
| this.uiHandler = new $AmpAdUIHandler$$module$extensions$amp_ad$0_1$amp_ad_ui$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.layoutCallback = function() { | |
| var $$jscomp$this$jscomp$109$$ = this, | |
| $fullUrl$$ = $JSCompiler_StaticMethods_getFullUrl_$$(this); | |
| $fullUrl$$ in $ampCustomadXhrPromises$$module$extensions$amp_ad$0_1$amp_ad_custom$$ || ($ampCustomadXhrPromises$$module$extensions$amp_ad$0_1$amp_ad_custom$$[$fullUrl$$] = $Services$$module$src$services$xhrFor$$(this.win).fetchJson($fullUrl$$).then(function($$jscomp$this$jscomp$109$$) { | |
| return $$jscomp$this$jscomp$109$$.json() | |
| })); | |
| return $ampCustomadXhrPromises$$module$extensions$amp_ad$0_1$amp_ad_custom$$[$fullUrl$$].then(function($fullUrl$$) { | |
| var $data$jscomp$69$$ = | |
| $$jscomp$this$jscomp$109$$.element, | |
| $templateData$$ = $fullUrl$$; | |
| null !== $$jscomp$this$jscomp$109$$.$slot_$ && ($templateData$$ = $fullUrl$$.hasOwnProperty($$jscomp$this$jscomp$109$$.$slot_$) ? $fullUrl$$[$$jscomp$this$jscomp$109$$.$slot_$] : null); | |
| null !== $templateData$$ && "object" == typeof $templateData$$ ? ($$jscomp$this$jscomp$109$$.renderStarted(), $Services$$module$src$services$templatesFor$$($$jscomp$this$jscomp$109$$.win).findAndRenderTemplate($data$jscomp$69$$, $templateData$$).then(function($$jscomp$this$jscomp$109$$) { | |
| $removeChildren$$module$src$dom$$($data$jscomp$69$$); | |
| $data$jscomp$69$$.appendChild($$jscomp$this$jscomp$109$$) | |
| })) : $$jscomp$this$jscomp$109$$.uiHandler.applyNoContentUI() | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.unlayoutCallback = function() { | |
| this.uiHandler.applyUnlayoutUI(); | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.createPlaceholderCallback = function() { | |
| return this.uiHandler.createPlaceholder() | |
| }; | |
| function $JSCompiler_StaticMethods_getFullUrl_$$($JSCompiler_StaticMethods_getFullUrl_$self$$) { | |
| if (null === $JSCompiler_StaticMethods_getFullUrl_$self$$.$slot_$) return $JSCompiler_StaticMethods_getFullUrl_$self$$.$url_$; | |
| if (null === $ampCustomadFullUrls$$module$extensions$amp_ad$0_1$amp_ad_custom$$) { | |
| $ampCustomadFullUrls$$module$extensions$amp_ad$0_1$amp_ad_custom$$ = {}; | |
| for (var $slots$$ = {}, $elements$jscomp$3$$ = $ancestorElementsByTag$$module$src$dom$$($JSCompiler_StaticMethods_getFullUrl_$self$$.element, "BODY")[0].querySelectorAll("amp-ad[type=custom]"), | |
| $index$jscomp$63$$ = 0; $index$jscomp$63$$ < $elements$jscomp$3$$.length; $index$jscomp$63$$++) { | |
| var $elem$jscomp$1_slotId$jscomp$3$$ = $elements$jscomp$3$$[$index$jscomp$63$$], | |
| $url$jscomp$65$$ = $elem$jscomp$1_slotId$jscomp$3$$.getAttribute("data-url"); | |
| $elem$jscomp$1_slotId$jscomp$3$$ = $elem$jscomp$1_slotId$jscomp$3$$.getAttribute("data-slot"); | |
| null !== $elem$jscomp$1_slotId$jscomp$3$$ && ($url$jscomp$65$$ in $slots$$ || ($slots$$[$url$jscomp$65$$] = []), $slots$$[$url$jscomp$65$$].push(encodeURIComponent($elem$jscomp$1_slotId$jscomp$3$$))) | |
| } | |
| for (var $baseUrl$jscomp$6$$ in $slots$$) $ampCustomadFullUrls$$module$extensions$amp_ad$0_1$amp_ad_custom$$[$baseUrl$jscomp$6$$] = | |
| $addParamToUrl$$module$src$url$$($baseUrl$jscomp$6$$, "ampslots", $slots$$[$baseUrl$jscomp$6$$].join(",")) | |
| } | |
| return $ampCustomadFullUrls$$module$extensions$amp_ad$0_1$amp_ad_custom$$[$JSCompiler_StaticMethods_getFullUrl_$self$$.$url_$] | |
| }; | |
| function $AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$($var_args$jscomp$60$$) { | |
| return AMP.BaseElement.apply(this, arguments) || this | |
| } | |
| $$jscomp$inherits$$($AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$, AMP.BaseElement); | |
| $AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$.prototype.isLayoutSupported = function() { | |
| return !0 | |
| }; | |
| $AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$.prototype.upgradeCallback = function() { | |
| var $$jscomp$this$jscomp$110$$ = this; | |
| $a4aRegistry$$module$ads$_a4a_config$$ || ($a4aRegistry$$module$ads$_a4a_config$$ = $map$$module$src$utils$object$$({ | |
| adsense: $adsenseIsA4AEnabled$$module$extensions$amp_ad_network_adsense_impl$0_1$adsense_a4a_config$$, | |
| doubleclick: $doubleclickIsA4AEnabled$$module$extensions$amp_ad_network_doubleclick_impl$0_1$doubleclick_a4a_config$$, | |
| triplelift: $tripleliftIsA4AEnabled$$module$extensions$amp_ad_network_triplelift_impl$0_1$triplelift_a4a_config$$, | |
| cloudflare: $cloudflareIsA4AEnabled$$module$extensions$amp_ad_network_cloudflare_impl$0_1$cloudflare_a4a_config$$, | |
| gmossp: $gmosspIsA4AEnabled$$module$extensions$amp_ad_network_gmossp_impl$0_1$gmossp_a4a_config$$ | |
| })); | |
| var $a4aRegistry$$ = $a4aRegistry$$module$ads$_a4a_config$$, | |
| $consentId$$ = this.element.getAttribute("data-consent-notification-id"); | |
| return ($consentId$$ ? $Services$$module$src$services$userNotificationManagerForDoc$$(this.element).then(function($$jscomp$this$jscomp$110$$) { | |
| return $$jscomp$this$jscomp$110$$.get($consentId$$) | |
| }) : | |
| Promise.resolve()).then(function() { | |
| var $consentId$$ = $$jscomp$this$jscomp$110$$.element.getAttribute("type"), | |
| $isCustom$$ = "custom" === $consentId$$ && $isExperimentOn$$module$src$experiments$$($$jscomp$this$jscomp$110$$.win, "ad-type-custom"); | |
| $user$$module$src$log$$().assert($isCustom$$ || $hasOwn_$$module$src$utils$object$$.call($adConfig$$module$ads$_config$$, $consentId$$) || $hasOwn_$$module$src$utils$object$$.call($a4aRegistry$$, $consentId$$), 'Unknown ad type "' + $consentId$$ + '"'); | |
| if ($isCustom$$) return new $AmpAdCustom$$module$extensions$amp_ad$0_1$amp_ad_custom$$($$jscomp$this$jscomp$110$$.element); | |
| $$jscomp$this$jscomp$110$$.win.ampAdSlotIdCounter = $$jscomp$this$jscomp$110$$.win.ampAdSlotIdCounter || 0; | |
| var $slotId$jscomp$4_useRemoteHtml$jscomp$7$$ = $$jscomp$this$jscomp$110$$.win.ampAdSlotIdCounter++; | |
| $$jscomp$this$jscomp$110$$.element.setAttribute("data-amp-slot-index", $slotId$jscomp$4_useRemoteHtml$jscomp$7$$); | |
| $slotId$jscomp$4_useRemoteHtml$jscomp$7$$ = !($adConfig$$module$ads$_config$$[$consentId$$] || {}).remoteHTMLDisabled && $$jscomp$this$jscomp$110$$.win.document.querySelector("meta[name=amp-3p-iframe-src]"); | |
| if (!$a4aRegistry$$[$consentId$$] || !$a4aRegistry$$[$consentId$$]($$jscomp$this$jscomp$110$$.win, $$jscomp$this$jscomp$110$$.element, $slotId$jscomp$4_useRemoteHtml$jscomp$7$$)) return new $AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl$$($$jscomp$this$jscomp$110$$.element); | |
| var $extensionTagName$$ = "amp-ad-network-" + $consentId$$ + "-impl"; | |
| $$jscomp$this$jscomp$110$$.element.setAttribute("data-a4a-upgrade-type", $extensionTagName$$); | |
| return $Services$$module$src$services$extensionsFor$$($$jscomp$this$jscomp$110$$.win).loadElementClass($extensionTagName$$).then(function($a4aRegistry$$) { | |
| return new $a4aRegistry$$($$jscomp$this$jscomp$110$$.element) | |
| }). | |
| catch (function($a4aRegistry$$) { | |
| var $type$jscomp$132$$ = | |
| $$jscomp$this$jscomp$110$$.element.tagName; | |
| $$jscomp$this$jscomp$110$$.user().error($type$jscomp$132$$, "Unable to load ad implementation for type ", $consentId$$, ", falling back to 3p, error: ", $a4aRegistry$$); | |
| return new $AmpAd3PImpl$$module$extensions$amp_ad$0_1$amp_ad_3p_impl$$($$jscomp$this$jscomp$110$$.element) | |
| }) | |
| }) | |
| }; | |
| (function($AMP$jscomp$3$$) { | |
| $AMP$jscomp$3$$.registerElement("amp-ad", $AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$, 'amp-ad iframe,amp-embed iframe{border:0!important;margin:0!important;padding:0!important}.i-amphtml-ad-default-holder{position:absolute;left:0;right:0;top:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background-color:hsla(0,0%,78%,0.05)}.i-amphtml-ad-default-holder:after{content:"Ad";content:attr(data-ad-holder-text);background-color:transparent;border-radius:2px;color:#696969;font-size:10px;line-height:1;font-family:Arial,sans-serif;padding:3px 4px 1px;border:1px solid #696969}amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl]>iframe,amp-ad[type=adsense]>iframe{top:50%!important;left:50%!important;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}[dir=rtl] amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl]>iframe,[dir=rtl] amp-ad[type=adsense]>iframe{left:0!important;right:50%!important;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%)}amp-ad[data-a4a-upgrade-type=amp-ad-network-adsense-impl]>iframe,amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl]>iframe{min-height:0;min-width:0}amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl][height=fluid]>iframe{height:100%!important;width:100%!important;position:relative}amp-ad[data-a4a-upgrade-type=amp-ad-network-doubleclick-impl][height=fluid]{width:100%!important}\n/*# sourceURL=/extensions/amp-ad/0.1/amp-ad.css*/'); | |
| $AMP$jscomp$3$$.registerElement("amp-embed", | |
| $AmpAd$$module$extensions$amp_ad$0_1$amp_ad$$) | |
| })(self.AMP); | |
| function $incrementLoadingAds$$module$extensions$amp_ad$0_1$concurrent_load$$($win$jscomp$157$$, $opt_loadingPromise$$) { | |
| void 0 === $win$jscomp$157$$["3pla"] && ($win$jscomp$157$$["3pla"] = 0); | |
| $win$jscomp$157$$["3pla"]++; | |
| $Services$$module$src$services$timerFor$$($win$jscomp$157$$).timeoutPromise(1E3, $opt_loadingPromise$$). | |
| catch (function() {}).then(function() { | |
| $win$jscomp$157$$["3pla"]-- | |
| }) | |
| }; | |
| var $RTC_VENDORS$$module$extensions$amp_a4a$0_1$callout_vendors$$ = {}; | |
| function $logAndAddErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($promiseArray$$, $error$jscomp$39$$, $callout$$) { | |
| $dev$$module$src$log$$().warn("real-time-config", "Dropping RTC Callout to " + $callout$$ + " due to " + $error$jscomp$39$$); | |
| $promiseArray$$.push($buildErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($error$jscomp$39$$, $callout$$)) | |
| } | |
| function $buildErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($error$jscomp$40$$, $callout$jscomp$1$$, $opt_rtcTime$$) { | |
| return Promise.resolve({ | |
| error: $error$jscomp$40$$, | |
| callout: $callout$jscomp$1$$, | |
| rtcTime: $opt_rtcTime$$ || 0 | |
| }) | |
| } | |
| function $inflateAndSendRtc_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($a4aElement$jscomp$1_ampDoc$jscomp$1$$, $url$jscomp$68$$, $seenUrls$jscomp$1$$, $promiseArray$jscomp$2$$, $rtcStartTime$jscomp$1$$, $macros$jscomp$1$$, $timeoutMillis$$, $opt_vendor$$) { | |
| var $win$jscomp$158$$ = $a4aElement$jscomp$1_ampDoc$jscomp$1$$.win; | |
| $a4aElement$jscomp$1_ampDoc$jscomp$1$$ = $a4aElement$jscomp$1_ampDoc$jscomp$1$$.getAmpDoc(); | |
| if (5 == Object.keys($seenUrls$jscomp$1$$).length) return $logAndAddErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($promiseArray$jscomp$2$$, | |
| "max_callouts_exceeded", $opt_vendor$$ || $url$jscomp$68$$); | |
| if ($macros$jscomp$1$$ && Object.keys($macros$jscomp$1$$).length) { | |
| var $urlReplacements$$ = $Services$$module$src$services$urlReplacementsForDoc$$($a4aElement$jscomp$1_ampDoc$jscomp$1$$), | |
| $whitelist$$ = {}; | |
| Object.keys($macros$jscomp$1$$).forEach(function($a4aElement$jscomp$1_ampDoc$jscomp$1$$) { | |
| return $whitelist$$[$a4aElement$jscomp$1_ampDoc$jscomp$1$$] = !0 | |
| }); | |
| $url$jscomp$68$$ = $urlReplacements$$.expandUrlSync($url$jscomp$68$$, $macros$jscomp$1$$, void 0, | |
| $whitelist$$) | |
| } | |
| if (!$isSecureUrl$$module$src$url$$($url$jscomp$68$$)) return $logAndAddErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($promiseArray$jscomp$2$$, "insecure_url", $opt_vendor$$ || $url$jscomp$68$$); | |
| if ($seenUrls$jscomp$1$$[$url$jscomp$68$$]) return $logAndAddErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($promiseArray$jscomp$2$$, "duplicate_url", $opt_vendor$$ || $url$jscomp$68$$); | |
| $seenUrls$jscomp$1$$[$url$jscomp$68$$] = !0; | |
| $promiseArray$jscomp$2$$.push($sendRtcCallout_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($url$jscomp$68$$, | |
| $rtcStartTime$jscomp$1$$, $win$jscomp$158$$, $timeoutMillis$$, $opt_vendor$$ || $url$jscomp$68$$)) | |
| } | |
| function $sendRtcCallout_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($url$jscomp$69$$, $rtcStartTime$jscomp$2$$, $win$jscomp$159$$, $timeoutMillis$jscomp$1$$, $callout$jscomp$2$$) { | |
| return $Services$$module$src$services$timerFor$$($win$jscomp$159$$).timeoutPromise($timeoutMillis$jscomp$1$$, $Services$$module$src$services$xhrFor$$($win$jscomp$159$$).fetchJson($url$jscomp$69$$, { | |
| credentials: "include" | |
| }).then(function($url$jscomp$69$$) { | |
| return $url$jscomp$69$$.text().then(function($url$jscomp$69$$) { | |
| var $win$jscomp$159$$ = Date.now() - | |
| $rtcStartTime$jscomp$2$$; | |
| return $url$jscomp$69$$ ? ($url$jscomp$69$$ = $tryParseJson$$module$src$json$$($url$jscomp$69$$)) ? { | |
| response: $url$jscomp$69$$, | |
| rtcTime: $win$jscomp$159$$, | |
| callout: $callout$jscomp$2$$ | |
| } : $buildErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$("malformed_json_response", $callout$jscomp$2$$, $win$jscomp$159$$) : { | |
| rtcTime: $win$jscomp$159$$, | |
| callout: $callout$jscomp$2$$ | |
| } | |
| }) | |
| })). | |
| catch (function($url$jscomp$69$$) { | |
| return $buildErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($url$jscomp$69$$.message && | |
| $url$jscomp$69$$.message.match(/^timeout/) ? "timeout" : "network_failure", $callout$jscomp$2$$, Date.now() - $rtcStartTime$jscomp$2$$) | |
| }) | |
| } | |
| function $validateRtcConfig_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($element$jscomp$93$$) { | |
| var $defaultTimeoutMillis$$ = 1E3, | |
| $unparsedRtcConfig$$ = $element$jscomp$93$$.getAttribute("rtc-config"); | |
| if (!$unparsedRtcConfig$$) return null; | |
| var $rtcConfig$jscomp$1$$ = $tryParseJson$$module$src$json$$($unparsedRtcConfig$$); | |
| if (!$rtcConfig$jscomp$1$$) return $user$$module$src$log$$().warn("real-time-config", "Could not parse rtc-config attribute"), null; | |
| var $timeout$jscomp$2$$; | |
| try { | |
| if ($user$$module$src$log$$().assert($rtcConfig$jscomp$1$$.vendors || | |
| $rtcConfig$jscomp$1$$.urls, "RTC Config must specify vendors or urls"), Object.keys($rtcConfig$jscomp$1$$).forEach(function($element$jscomp$93$$) { | |
| switch ($element$jscomp$93$$) { | |
| case "vendors": | |
| $user$$module$src$log$$().assert($isObject$$module$src$types$$($rtcConfig$jscomp$1$$[$element$jscomp$93$$]), "RTC invalid vendors"); | |
| break; | |
| case "urls": | |
| $user$$module$src$log$$().assert($isArray$$module$src$types$$($rtcConfig$jscomp$1$$[$element$jscomp$93$$]), "RTC invalid urls"); | |
| break; | |
| case "timeoutMillis": | |
| $timeout$jscomp$2$$ = | |
| parseInt($rtcConfig$jscomp$1$$[$element$jscomp$93$$], 10); | |
| if (isNaN($timeout$jscomp$2$$)) $user$$module$src$log$$().warn("real-time-config", "Invalid RTC timeout is NaN, " + ("using default timeout " + $defaultTimeoutMillis$$ + "ms")); | |
| else if ($timeout$jscomp$2$$ >= $defaultTimeoutMillis$$ || 0 > $timeout$jscomp$2$$) $timeout$jscomp$2$$ = void 0, $user$$module$src$log$$().warn("real-time-config", "Invalid RTC timeout: " + $timeout$jscomp$2$$ + "ms, " + ("using default timeout " + $defaultTimeoutMillis$$ + "ms")); | |
| break; | |
| default: | |
| $user$$module$src$log$$().warn("real-time-config", | |
| "Unknown RTC Config key: " + $element$jscomp$93$$) | |
| } | |
| }), !Object.keys($rtcConfig$jscomp$1$$.vendors || {}).length && !($rtcConfig$jscomp$1$$.urls || []).length) return null | |
| } catch ($unusedErr$jscomp$1$$) { | |
| return null | |
| } | |
| $rtcConfig$jscomp$1$$.timeoutMillis = void 0 !== $timeout$jscomp$2$$ ? $timeout$jscomp$2$$ : $defaultTimeoutMillis$$; | |
| return $rtcConfig$jscomp$1$$ | |
| } | |
| AMP.maybeExecuteRealTimeConfig = function($a4aElement$$, $customMacros$$) { | |
| var $rtcConfig$$ = $validateRtcConfig_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($a4aElement$$.element); | |
| if ($rtcConfig$$) { | |
| var $promiseArray$jscomp$1$$ = [], | |
| $seenUrls$$ = {}, $rtcStartTime$$ = Date.now(); | |
| ($rtcConfig$$.urls || []).forEach(function($url$jscomp$66$$) { | |
| return $inflateAndSendRtc_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($a4aElement$$, $url$jscomp$66$$, $seenUrls$$, $promiseArray$jscomp$1$$, $rtcStartTime$$, | |
| $customMacros$$, $rtcConfig$$.timeoutMillis) | |
| }); | |
| Object.keys($rtcConfig$$.vendors || []).forEach(function($vendor$jscomp$4$$) { | |
| var $vendorObject$$ = $RTC_VENDORS$$module$extensions$amp_a4a$0_1$callout_vendors$$[$vendor$jscomp$4$$.toLowerCase()], | |
| $url$jscomp$67$$ = $vendorObject$$ ? $vendorObject$$.url : ""; | |
| if (!$url$jscomp$67$$) return $logAndAddErrorResponse_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($promiseArray$jscomp$1$$, "unknown_vendor", $vendor$jscomp$4$$); | |
| var $validVendorMacros$$ = {}; | |
| Object.keys($rtcConfig$$.vendors[$vendor$jscomp$4$$]).forEach(function($a4aElement$$) { | |
| $vendorObject$$.macros && | |
| $vendorObject$$.macros.includes($a4aElement$$) ? $validVendorMacros$$[$a4aElement$$] = $rtcConfig$$.vendors[$vendor$jscomp$4$$][$a4aElement$$] : $user$$module$src$log$$().warn("real-time-config", "Unknown macro: " + $a4aElement$$ + " for vendor: " + $vendor$jscomp$4$$) | |
| }); | |
| var $macros$$ = Object.assign($validVendorMacros$$, $customMacros$$); | |
| $inflateAndSendRtc_$$module$extensions$amp_a4a$0_1$real_time_config_manager$$($a4aElement$$, $url$jscomp$67$$, $seenUrls$$, $promiseArray$jscomp$1$$, $rtcStartTime$$, $macros$$, $rtcConfig$$.timeoutMillis, | |
| $vendor$jscomp$4$$.toLowerCase()) | |
| }); | |
| return Promise.all($promiseArray$jscomp$1$$) | |
| } | |
| }; | |
| function $filterSplice$$module$src$utils$array$$($array$jscomp$9$$, $filter$jscomp$3$$) { | |
| for (var $splice$$ = [], $index$jscomp$64$$ = 0, $i$jscomp$72$$ = 0; $i$jscomp$72$$ < $array$jscomp$9$$.length; $i$jscomp$72$$++) { | |
| var $item$$ = $array$jscomp$9$$[$i$jscomp$72$$]; | |
| $filter$jscomp$3$$($item$$, $i$jscomp$72$$, $array$jscomp$9$$) ? ($index$jscomp$64$$ < $i$jscomp$72$$ && ($array$jscomp$9$$[$index$jscomp$64$$] = $item$$), $index$jscomp$64$$++) : $splice$$.push($item$$) | |
| } | |
| $index$jscomp$64$$ < $array$jscomp$9$$.length && ($array$jscomp$9$$.length = | |
| $index$jscomp$64$$) | |
| } | |
| function $findIndex$$module$src$utils$array$$($array$jscomp$10$$, $predicate$jscomp$2$$) { | |
| for (var $i$jscomp$73$$ = 0; $i$jscomp$73$$ < $array$jscomp$10$$.length; $i$jscomp$73$$++) if ($predicate$jscomp$2$$($array$jscomp$10$$[$i$jscomp$73$$], $i$jscomp$73$$, $array$jscomp$10$$)) return $i$jscomp$73$$; | |
| return -1 | |
| }; | |
| function $getListenForSentinel$$module$src$iframe_helper$$($JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$, $sentinel$jscomp$4$$, $opt_create$jscomp$1$$) { | |
| var $JSCompiler_listeningFors$jscomp$inline_842$$ = $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$.listeningFors; | |
| !$JSCompiler_listeningFors$jscomp$inline_842$$ && $opt_create$jscomp$1$$ && ($JSCompiler_listeningFors$jscomp$inline_842$$ = $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$.listeningFors = Object.create(null)); | |
| $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$ = | |
| $JSCompiler_listeningFors$jscomp$inline_842$$ || null; | |
| if (!$JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$) return $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$; | |
| var $listenSentinel$$ = $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$[$sentinel$jscomp$4$$]; | |
| !$listenSentinel$$ && $opt_create$jscomp$1$$ && ($listenSentinel$$ = $JSCompiler_inline_result$jscomp$292_parentWin$jscomp$2$$[$sentinel$jscomp$4$$] = []); | |
| return $listenSentinel$$ || null | |
| } | |
| function $getOrCreateListenForEvents$$module$src$iframe_helper$$($listenSentinel$jscomp$1_parentWin$jscomp$3$$, $iframe$jscomp$15$$, $opt_is3P$$) { | |
| var $origin$jscomp$13$$ = $parseUrl$$module$src$url$$($iframe$jscomp$15$$.src).origin, | |
| $i$jscomp$74_sentinel$jscomp$5$$ = $opt_is3P$$ ? $iframe$jscomp$15$$.getAttribute("data-amp-3p-sentinel") : "amp"; | |
| $listenSentinel$jscomp$1_parentWin$jscomp$3$$ = $getListenForSentinel$$module$src$iframe_helper$$($listenSentinel$jscomp$1_parentWin$jscomp$3$$, $i$jscomp$74_sentinel$jscomp$5$$, !0); | |
| for ($i$jscomp$74_sentinel$jscomp$5$$ = 0; $i$jscomp$74_sentinel$jscomp$5$$ < $listenSentinel$jscomp$1_parentWin$jscomp$3$$.length; $i$jscomp$74_sentinel$jscomp$5$$++) { | |
| var $we$$ = $listenSentinel$jscomp$1_parentWin$jscomp$3$$[$i$jscomp$74_sentinel$jscomp$5$$]; | |
| if ($we$$.frame === $iframe$jscomp$15$$) { | |
| var $windowEvents$$ = $we$$; | |
| break | |
| } | |
| } | |
| $windowEvents$$ || ($windowEvents$$ = { | |
| frame: $iframe$jscomp$15$$, | |
| origin: $origin$jscomp$13$$, | |
| events: Object.create(null) | |
| }, $listenSentinel$jscomp$1_parentWin$jscomp$3$$.push($windowEvents$$)); | |
| return $windowEvents$$.events | |
| } | |
| function $dropListenSentinel$$module$src$iframe_helper$$($listenSentinel$jscomp$3$$) { | |
| for (var $noopData$$ = $dict$$module$src$utils$object$$({ | |
| sentinel: "unlisten" | |
| }), $i$jscomp$76$$ = $listenSentinel$jscomp$3$$.length - 1; 0 <= $i$jscomp$76$$; $i$jscomp$76$$--) { | |
| var $windowEvents$jscomp$2$$ = $listenSentinel$jscomp$3$$[$i$jscomp$76$$]; | |
| if (!$windowEvents$jscomp$2$$.frame.contentWindow) { | |
| $listenSentinel$jscomp$3$$.splice($i$jscomp$76$$, 1); | |
| var $events$$ = $windowEvents$jscomp$2$$.events, | |
| $name$30$$; | |
| for ($name$30$$ in $events$$) $events$$[$name$30$$].splice(0, | |
| Infinity).forEach(function($listenSentinel$jscomp$3$$) { | |
| $listenSentinel$jscomp$3$$($noopData$$) | |
| }) | |
| } | |
| } | |
| } | |
| function $registerGlobalListenerIfNeeded$$module$src$iframe_helper$$($parentWin$jscomp$5$$) { | |
| if (!$parentWin$jscomp$5$$.listeningFors) { | |
| var $listenForListener$$ = function($listenForListener$$) { | |
| if ($listenForListener$$.data) { | |
| var $event$jscomp$20$$ = $parseIfNeeded$$module$src$iframe_helper$$($listenForListener$$.data); | |
| if ($event$jscomp$20$$ && $event$jscomp$20$$.sentinel) { | |
| var $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$ = $event$jscomp$20$$.sentinel; | |
| var $JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$ = | |
| $listenForListener$$.origin, | |
| $JSCompiler_triggerWin$jscomp$inline_847$$ = $listenForListener$$.source, | |
| $JSCompiler_listenSentinel$jscomp$inline_848$$ = $getListenForSentinel$$module$src$iframe_helper$$($parentWin$jscomp$5$$, $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$); | |
| if ($JSCompiler_listenSentinel$jscomp$inline_848$$) { | |
| for (var $JSCompiler_windowEvents$jscomp$inline_849$$, $JSCompiler_i$jscomp$inline_850$$ = 0; $JSCompiler_i$jscomp$inline_850$$ < $JSCompiler_listenSentinel$jscomp$inline_848$$.length; $JSCompiler_i$jscomp$inline_850$$++) { | |
| var $JSCompiler_we$jscomp$inline_851$$ = | |
| $JSCompiler_listenSentinel$jscomp$inline_848$$[$JSCompiler_i$jscomp$inline_850$$], | |
| $JSCompiler_contentWindow$jscomp$inline_852$$ = $JSCompiler_we$jscomp$inline_851$$.frame.contentWindow; | |
| if ($JSCompiler_contentWindow$jscomp$inline_852$$) if ("amp" === $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$) { | |
| if ($JSCompiler_we$jscomp$inline_851$$.origin === $JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$ && $JSCompiler_contentWindow$jscomp$inline_852$$ == $JSCompiler_triggerWin$jscomp$inline_847$$) { | |
| $JSCompiler_windowEvents$jscomp$inline_849$$ = | |
| $JSCompiler_we$jscomp$inline_851$$; | |
| break | |
| } | |
| } else { | |
| var $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$; | |
| if (!($JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ = $JSCompiler_triggerWin$jscomp$inline_847$$ == $JSCompiler_contentWindow$jscomp$inline_852$$)) b: { | |
| for ($JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ = $JSCompiler_triggerWin$jscomp$inline_847$$; $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ && $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ != | |
| $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$.parent; $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ = $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$.parent) if ($JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ == $JSCompiler_contentWindow$jscomp$inline_852$$) { | |
| $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ = !0; | |
| break b | |
| } | |
| $JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$ = !1 | |
| } | |
| if ($JSCompiler_temp$jscomp$2366_JSCompiler_win$jscomp$inline_2433$$) { | |
| $JSCompiler_windowEvents$jscomp$inline_849$$ = | |
| $JSCompiler_we$jscomp$inline_851$$; | |
| break | |
| } | |
| } else setTimeout($dropListenSentinel$$module$src$iframe_helper$$, 0, $JSCompiler_listenSentinel$jscomp$inline_848$$) | |
| } | |
| $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$ = $JSCompiler_windowEvents$jscomp$inline_849$$ ? $JSCompiler_windowEvents$jscomp$inline_849$$.events : null | |
| } else $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$ = $JSCompiler_listenSentinel$jscomp$inline_848$$; | |
| var $listenForEvents$$ = $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$; | |
| if ($listenForEvents$$ && ($JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$ = $listenForEvents$$[$event$jscomp$20$$.type])) for ($JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$ = $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$.slice(), $JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$ = | |
| 0; $JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$ < $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$.length; $JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$++)(0, $JSCompiler_inline_result$jscomp$293_JSCompiler_sentinel$jscomp$inline_845_listeners$jscomp$1$$[$JSCompiler_origin$jscomp$inline_846_i$jscomp$77$$])($event$jscomp$20$$, $listenForListener$$.source, $listenForListener$$.origin) | |
| } | |
| } | |
| }; | |
| $parentWin$jscomp$5$$.addEventListener("message", $listenForListener$$) | |
| } | |
| } | |
| function $listenFor$$module$src$iframe_helper$$($iframe$jscomp$16$$, $typeOfMessage$$, $callback$jscomp$77$$, $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$, $opt_includingNestedWindows$$) { | |
| function $listener$jscomp$63$$($typeOfMessage$$, $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$, $listener$jscomp$63$$) { | |
| if ($opt_includingNestedWindows$$ || $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$ == $iframe$jscomp$16$$.contentWindow) "unlisten" == $typeOfMessage$$.sentinel ? $unlisten$jscomp$7$$() : $callback$jscomp$77$$($typeOfMessage$$, | |
| $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$, $listener$jscomp$63$$) | |
| } | |
| var $parentWin$jscomp$6$$ = $iframe$jscomp$16$$.ownerDocument.defaultView; | |
| $registerGlobalListenerIfNeeded$$module$src$iframe_helper$$($parentWin$jscomp$6$$); | |
| $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$ = $getOrCreateListenForEvents$$module$src$iframe_helper$$($parentWin$jscomp$6$$, $iframe$jscomp$16$$, $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$); | |
| var $events$jscomp$1$$ = $listenForEvents$jscomp$1_opt_is3P$jscomp$1$$[$typeOfMessage$$] || | |
| ($listenForEvents$jscomp$1_opt_is3P$jscomp$1$$[$typeOfMessage$$] = []), | |
| $unlisten$jscomp$7$$; | |
| $events$jscomp$1$$.push($listener$jscomp$63$$); | |
| return $unlisten$jscomp$7$$ = function() { | |
| if ($listener$jscomp$63$$) { | |
| var $iframe$jscomp$16$$ = $events$jscomp$1$$.indexOf($listener$jscomp$63$$); - 1 < $iframe$jscomp$16$$ && $events$jscomp$1$$.splice($iframe$jscomp$16$$, 1); | |
| $callback$jscomp$77$$ = $events$jscomp$1$$ = $listener$jscomp$63$$ = null | |
| } | |
| } | |
| } | |
| function $listenForOncePromise$$module$src$iframe_helper$$($iframe$jscomp$17$$, $typeOfMessages$$) { | |
| var $unlistenList$$ = []; | |
| "string" == typeof $typeOfMessages$$ && ($typeOfMessages$$ = [$typeOfMessages$$]); | |
| return new Promise(function($resolve$jscomp$40$$) { | |
| for (var $i$jscomp$78$$ = 0; $i$jscomp$78$$ < $typeOfMessages$$.length; $i$jscomp$78$$++) { | |
| var $unlisten$jscomp$8$$ = $listenFor$$module$src$iframe_helper$$($iframe$jscomp$17$$, $typeOfMessages$$[$i$jscomp$78$$], function($iframe$jscomp$17$$, $typeOfMessages$$, $i$jscomp$78$$) { | |
| for (var $unlisten$jscomp$8$$ = | |
| 0; $unlisten$jscomp$8$$ < $unlistenList$$.length; $unlisten$jscomp$8$$++) $unlistenList$$[$unlisten$jscomp$8$$](); | |
| $resolve$jscomp$40$$({ | |
| data: $iframe$jscomp$17$$, | |
| source: $typeOfMessages$$, | |
| origin: $i$jscomp$78$$ | |
| }) | |
| }, !0); | |
| $unlistenList$$.push($unlisten$jscomp$8$$) | |
| } | |
| }) | |
| } | |
| function $postMessageToWindows$$module$src$iframe_helper$$($iframe$jscomp$19_payload$jscomp$3$$, $targets$jscomp$1$$, $type$jscomp$134$$, $i$jscomp$79_object$jscomp$3$$, $opt_is3P$jscomp$4_target$jscomp$69$$) { | |
| if ($iframe$jscomp$19_payload$jscomp$3$$.contentWindow) for ($i$jscomp$79_object$jscomp$3$$.type = $type$jscomp$134$$, $i$jscomp$79_object$jscomp$3$$.sentinel = $opt_is3P$jscomp$4_target$jscomp$69$$ ? $iframe$jscomp$19_payload$jscomp$3$$.getAttribute("data-amp-3p-sentinel") : "amp", $iframe$jscomp$19_payload$jscomp$3$$ = | |
| $i$jscomp$79_object$jscomp$3$$, $opt_is3P$jscomp$4_target$jscomp$69$$ && ($iframe$jscomp$19_payload$jscomp$3$$ = "amp-" + JSON.stringify($i$jscomp$79_object$jscomp$3$$)), $i$jscomp$79_object$jscomp$3$$ = 0; $i$jscomp$79_object$jscomp$3$$ < $targets$jscomp$1$$.length; $i$jscomp$79_object$jscomp$3$$++) $opt_is3P$jscomp$4_target$jscomp$69$$ = $targets$jscomp$1$$[$i$jscomp$79_object$jscomp$3$$], $opt_is3P$jscomp$4_target$jscomp$69$$.win.postMessage($iframe$jscomp$19_payload$jscomp$3$$, $opt_is3P$jscomp$4_target$jscomp$69$$.origin) | |
| } | |
| function $parseIfNeeded$$module$src$iframe_helper$$($data$jscomp$73$$) { | |
| "string" == typeof $data$jscomp$73$$ && ($data$jscomp$73$$ = "{" == $data$jscomp$73$$.charAt(0) ? $tryParseJson$$module$src$json$$($data$jscomp$73$$, function($data$jscomp$73$$) { | |
| $dev$$module$src$log$$().warn("IFRAME-HELPER", "Postmessage could not be parsed. Is it in a valid JSON format?", $data$jscomp$73$$) | |
| }) || null : $isAmpMessage$$module$src$3p_frame_messaging$$($data$jscomp$73$$) ? $deserializeMessage$$module$src$3p_frame_messaging$$($data$jscomp$73$$) : | |
| null); | |
| return $data$jscomp$73$$ | |
| } | |
| function $SubscriptionApi$$module$src$iframe_helper$$($iframe$jscomp$21$$, $type$jscomp$135$$, $requestCallback$$) { | |
| var $is3p$$ = !0, | |
| $$jscomp$this$jscomp$111$$ = this; | |
| this.$iframe_$ = $iframe$jscomp$21$$; | |
| this.$is3p_$ = $is3p$$; | |
| this.$clientWindows_$ = []; | |
| this.$unlisten_$ = $listenFor$$module$src$iframe_helper$$(this.$iframe_$, $type$jscomp$135$$, function($iframe$jscomp$21$$, $type$jscomp$135$$, $is3p$$) { | |
| $$jscomp$this$jscomp$111$$.$clientWindows_$.some(function($iframe$jscomp$21$$) { | |
| return $iframe$jscomp$21$$.win == $type$jscomp$135$$ | |
| }) || | |
| $$jscomp$this$jscomp$111$$.$clientWindows_$.push({ | |
| win: $type$jscomp$135$$, | |
| origin: $is3p$$ | |
| }); | |
| $requestCallback$$($iframe$jscomp$21$$, $type$jscomp$135$$, $is3p$$) | |
| }, this.$is3p_$, this.$is3p_$) | |
| } | |
| $SubscriptionApi$$module$src$iframe_helper$$.prototype.send = function($type$jscomp$136$$, $data$jscomp$75$$) { | |
| $filterSplice$$module$src$utils$array$$(this.$clientWindows_$, function($type$jscomp$136$$) { | |
| return !!$type$jscomp$136$$.win.parent | |
| }); | |
| $postMessageToWindows$$module$src$iframe_helper$$(this.$iframe_$, this.$clientWindows_$, $type$jscomp$136$$, $data$jscomp$75$$, this.$is3p_$) | |
| }; | |
| $SubscriptionApi$$module$src$iframe_helper$$.prototype.destroy = function() { | |
| this.$unlisten_$(); | |
| this.$clientWindows_$.length = 0 | |
| }; | |
| var $DEFAULT_THRESHOLD$$module$src$intersection_observer_polyfill$$ = [0, .05, .1, .15, .2, .25, .3, .35, .4, .45, .5, .55, .6, .65, .7, .75, .8, .85, .9, .95, 1], | |
| $INIT_TIME$$module$src$intersection_observer_polyfill$$ = Date.now(); | |
| function $nativeIntersectionObserverSupported$$module$src$intersection_observer_polyfill$$($win$jscomp$161$$) { | |
| return "IntersectionObserver" in $win$jscomp$161$$ && "IntersectionObserverEntry" in $win$jscomp$161$$ && "intersectionRatio" in $win$jscomp$161$$.IntersectionObserverEntry.prototype | |
| } | |
| function $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$($callback$jscomp$78_i$jscomp$81$$) { | |
| var $opt_option$$ = { | |
| threshold: $DEFAULT_THRESHOLD$$module$src$intersection_observer_polyfill$$ | |
| }; | |
| this.$callback_$ = $callback$jscomp$78_i$jscomp$81$$; | |
| var $threshold$$ = $opt_option$$ && $opt_option$$.threshold; | |
| $threshold$$ = $threshold$$ ? $isArray$$module$src$types$$($threshold$$) ? $threshold$$ : [$threshold$$] : [0]; | |
| for ($callback$jscomp$78_i$jscomp$81$$ = 0; $callback$jscomp$78_i$jscomp$81$$ < $threshold$$.length; $callback$jscomp$78_i$jscomp$81$$++) $isFiniteNumber$$module$src$types$$($threshold$$[$callback$jscomp$78_i$jscomp$81$$]); | |
| this.$threshold_$ = $threshold$$.sort(); | |
| this.$lastViewportRect_$ = null; | |
| this.$lastIframeRect_$ = void 0; | |
| this.$observeEntries_$ = [] | |
| } | |
| $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$.prototype.disconnect = function() { | |
| this.$observeEntries_$.length = 0 | |
| }; | |
| $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$.prototype.observe = function($element$jscomp$95_newState$jscomp$2$$) { | |
| for (var $change$jscomp$1_i$jscomp$82$$ = 0; $change$jscomp$1_i$jscomp$82$$ < this.$observeEntries_$.length; $change$jscomp$1_i$jscomp$82$$++) if (this.$observeEntries_$[$change$jscomp$1_i$jscomp$82$$].element === $element$jscomp$95_newState$jscomp$2$$) { | |
| $dev$$module$src$log$$().warn("INTERSECTION-OBSERVER", "should observe same element once"); | |
| return | |
| } | |
| $element$jscomp$95_newState$jscomp$2$$ = { | |
| element: $element$jscomp$95_newState$jscomp$2$$, | |
| currentThresholdSlot: 0 | |
| }; | |
| this.$lastViewportRect_$ && ($change$jscomp$1_i$jscomp$82$$ = $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$$(this, $element$jscomp$95_newState$jscomp$2$$, this.$lastViewportRect_$, this.$lastIframeRect_$)) && this.$callback_$([$change$jscomp$1_i$jscomp$82$$]); | |
| this.$observeEntries_$.push($element$jscomp$95_newState$jscomp$2$$) | |
| }; | |
| $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$.prototype.unobserve = function($element$jscomp$96$$) { | |
| for (var $i$jscomp$83$$ = 0; $i$jscomp$83$$ < this.$observeEntries_$.length; $i$jscomp$83$$++) if (this.$observeEntries_$[$i$jscomp$83$$].element === $element$jscomp$96$$) { | |
| this.$observeEntries_$.splice($i$jscomp$83$$, 1); | |
| return | |
| } | |
| $dev$$module$src$log$$().warn("INTERSECTION-OBSERVER", "unobserve non-observed element") | |
| }; | |
| $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$.prototype.tick = function($hostViewport$jscomp$1$$, $opt_iframe$$) { | |
| $opt_iframe$$ && ($hostViewport$jscomp$1$$ = $moveLayoutRect$$module$src$layout_rect$$($hostViewport$jscomp$1$$, -$opt_iframe$$.left, -$opt_iframe$$.top), $opt_iframe$$ = $moveLayoutRect$$module$src$layout_rect$$($opt_iframe$$, -$opt_iframe$$.left, -$opt_iframe$$.top)); | |
| this.$lastViewportRect_$ = $hostViewport$jscomp$1$$; | |
| this.$lastIframeRect_$ = $opt_iframe$$; | |
| for (var $changes$jscomp$1$$ = [], $i$jscomp$84$$ = 0; $i$jscomp$84$$ < this.$observeEntries_$.length; $i$jscomp$84$$++) { | |
| var $change$jscomp$2$$ = $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$$(this, this.$observeEntries_$[$i$jscomp$84$$], $hostViewport$jscomp$1$$, $opt_iframe$$); | |
| $change$jscomp$2$$ && $changes$jscomp$1$$.push($change$jscomp$2$$) | |
| } | |
| $changes$jscomp$1$$.length && this.$callback_$($changes$jscomp$1$$) | |
| }; | |
| function $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$$($JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$, $state$jscomp$10$$, $hostViewport$jscomp$2$$, $opt_iframe$jscomp$1$$) { | |
| var $element$jscomp$97$$ = $state$jscomp$10$$.element, | |
| $ownerRect$$ = null, | |
| $elementRect$$ = $element$jscomp$97$$.getLayoutBox(), | |
| $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$ = $element$jscomp$97$$.getOwner(); | |
| $ownerRect$$ = $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$ && $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$.getLayoutBox(); | |
| var $intersectionRect$$ = $rectIntersection$$module$src$layout_rect$$($elementRect$$, $ownerRect$$, $hostViewport$jscomp$2$$, $opt_iframe$jscomp$1$$) || $layoutRectLtwh$$module$src$layout_rect$$(0, 0, 0, 0); | |
| $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$ = | |
| $intersectionRect$$; | |
| var $JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ = $elementRect$$; | |
| $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$ = $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$.width * $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$.height / ($JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$.width * $JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$.height); | |
| $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$ = $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$.$threshold_$; | |
| $JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ = 0; | |
| var $JSCompiler_endIdx$jscomp$inline_857$$ = $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$.length; | |
| if (0 == $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$) $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$ = 0; | |
| else { | |
| for (var $JSCompiler_mid$jscomp$inline_858$$ = ($JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ + $JSCompiler_endIdx$jscomp$inline_857$$) / 2 | 0; $JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ < $JSCompiler_mid$jscomp$inline_858$$;) $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$ < | |
| $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$[$JSCompiler_mid$jscomp$inline_858$$] ? $JSCompiler_endIdx$jscomp$inline_857$$ = $JSCompiler_mid$jscomp$inline_858$$ : $JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ = $JSCompiler_mid$jscomp$inline_858$$, $JSCompiler_mid$jscomp$inline_858$$ = ($JSCompiler_larger$jscomp$inline_2436_JSCompiler_startIdx$jscomp$inline_856$$ + $JSCompiler_endIdx$jscomp$inline_857$$) / | |
| 2 | 0; | |
| $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$ = $JSCompiler_endIdx$jscomp$inline_857$$ | |
| } | |
| var $newThresholdSlot$$ = $JSCompiler_StaticMethods_getValidIntersectionChangeEntry_$self_JSCompiler_inline_result$jscomp$295_JSCompiler_sortedThreshold$jscomp$inline_854$$; | |
| if ($newThresholdSlot$$ == $state$jscomp$10$$.currentThresholdSlot) return null; | |
| $state$jscomp$10$$.currentThresholdSlot = $newThresholdSlot$$; | |
| var $changeEntry$$ = | |
| $calculateChangeEntry$$module$src$intersection_observer_polyfill$$($elementRect$$, $opt_iframe$jscomp$1$$ ? null : $hostViewport$jscomp$2$$, $intersectionRect$$, $JSCompiler_inline_result$jscomp$2367_JSCompiler_smaller$jscomp$inline_2435_owner$jscomp$1$$); | |
| $changeEntry$$.target = $element$jscomp$97$$; | |
| return $changeEntry$$ | |
| } | |
| function $calculateChangeEntry$$module$src$intersection_observer_polyfill$$($element$jscomp$98$$, $hostViewport$jscomp$3$$, $intersection$jscomp$1$$, $ratio$jscomp$4$$) { | |
| var $boundingClientRect$$ = $element$jscomp$98$$, | |
| $rootBounds$$ = $hostViewport$jscomp$3$$; | |
| $hostViewport$jscomp$3$$ && ($intersection$jscomp$1$$ = $moveLayoutRect$$module$src$layout_rect$$($intersection$jscomp$1$$, -$hostViewport$jscomp$3$$.left, -$hostViewport$jscomp$3$$.top), $boundingClientRect$$ = $moveLayoutRect$$module$src$layout_rect$$($boundingClientRect$$, -$hostViewport$jscomp$3$$.left, -$hostViewport$jscomp$3$$.top), $rootBounds$$ = $moveLayoutRect$$module$src$layout_rect$$($rootBounds$$, -$hostViewport$jscomp$3$$.left, -$hostViewport$jscomp$3$$.top)); | |
| return { | |
| time: "undefined" !== typeof performance && performance.now ? performance.now() : Date.now() - $INIT_TIME$$module$src$intersection_observer_polyfill$$, | |
| rootBounds: $rootBounds$$, | |
| boundingClientRect: $boundingClientRect$$, | |
| intersectionRect: $intersection$jscomp$1$$, | |
| intersectionRatio: $ratio$jscomp$4$$ | |
| } | |
| }; | |
| function $findEngagedTimeBetween$$module$extensions$amp_analytics$0_1$activity_impl$$($activityEvent$$, $time$jscomp$3$$) { | |
| var $engagementBonus$$ = 0; | |
| "active" === $activityEvent$$.type && ($engagementBonus$$ = 5); | |
| return Math.min($time$jscomp$3$$ - $activityEvent$$.time, $engagementBonus$$) | |
| } | |
| function $ActivityHistory$$module$extensions$amp_analytics$0_1$activity_impl$$() { | |
| this.$totalEngagedTime_$ = 0; | |
| this.$prevActivityEvent_$ = void 0 | |
| } | |
| $ActivityHistory$$module$extensions$amp_analytics$0_1$activity_impl$$.prototype.push = function($activityEvent$jscomp$1$$) { | |
| this.$prevActivityEvent_$ || (this.$prevActivityEvent_$ = $activityEvent$jscomp$1$$); | |
| this.$prevActivityEvent_$.time < $activityEvent$jscomp$1$$.time && (this.$totalEngagedTime_$ += $findEngagedTimeBetween$$module$extensions$amp_analytics$0_1$activity_impl$$(this.$prevActivityEvent_$, $activityEvent$jscomp$1$$.time), this.$prevActivityEvent_$ = $activityEvent$jscomp$1$$) | |
| }; | |
| $ActivityHistory$$module$extensions$amp_analytics$0_1$activity_impl$$.prototype.getTotalEngagedTime = function($time$jscomp$4$$) { | |
| var $totalEngagedTime$$ = 0; | |
| void 0 !== this.$prevActivityEvent_$ && ($totalEngagedTime$$ = this.$totalEngagedTime_$ + $findEngagedTimeBetween$$module$extensions$amp_analytics$0_1$activity_impl$$(this.$prevActivityEvent_$, $time$jscomp$4$$)); | |
| return $totalEngagedTime$$ | |
| }; | |
| var $ACTIVE_EVENT_TYPES$$module$extensions$amp_analytics$0_1$activity_impl$$ = ["mousedown", "mouseup", "mousemove", "keydown", "keyup"]; | |
| function $Activity$$module$extensions$amp_analytics$0_1$activity_impl$$($ampdoc$jscomp$23$$) { | |
| this.ampdoc = $ampdoc$jscomp$23$$; | |
| this.$boundStopIgnore_$ = this.$stopIgnore_$.bind(this); | |
| this.$boundHandleActivity_$ = this.$handleActivity_$.bind(this); | |
| this.$boundHandleInactive_$ = this.$handleInactive_$.bind(this); | |
| this.$boundHandleVisibilityChange_$ = this.$handleVisibilityChange_$.bind(this); | |
| this.$unlistenFuncs_$ = []; | |
| this.$ignoreInactive_$ = this.$ignoreActivity_$ = !1; | |
| this.$activityHistory_$ = new $ActivityHistory$$module$extensions$amp_analytics$0_1$activity_impl$$; | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$(this.ampdoc); | |
| this.$viewport_$ = $Services$$module$src$services$viewportForDoc$$(this.ampdoc); | |
| this.$viewer_$.whenFirstVisible().then(this.$start_$.bind(this)) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $Activity$$module$extensions$amp_analytics$0_1$activity_impl$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$start_$ = function() { | |
| this.$startTime_$ = Date.now(); | |
| this.$handleActivity_$(); | |
| for (var $JSCompiler_i$jscomp$inline_862$$ = 0; $JSCompiler_i$jscomp$inline_862$$ < $ACTIVE_EVENT_TYPES$$module$extensions$amp_analytics$0_1$activity_impl$$.length; $JSCompiler_i$jscomp$inline_862$$++) this.$unlistenFuncs_$.push($listen$$module$src$event_helper$$(this.ampdoc.getRootNode(), $ACTIVE_EVENT_TYPES$$module$extensions$amp_analytics$0_1$activity_impl$$[$JSCompiler_i$jscomp$inline_862$$], this.$boundHandleActivity_$)); | |
| this.$unlistenFuncs_$.push(this.$viewer_$.onVisibilityChanged(this.$boundHandleVisibilityChange_$)); | |
| this.$viewport_$.onScroll(this.$boundHandleActivity_$) | |
| }; | |
| function $JSCompiler_StaticMethods_getTimeSinceStart_$$($JSCompiler_StaticMethods_getTimeSinceStart_$self$$) { | |
| var $timeSinceStart$$ = Date.now() - $JSCompiler_StaticMethods_getTimeSinceStart_$self$$.$startTime_$; | |
| return 0 < $timeSinceStart$$ ? $timeSinceStart$$ : 0 | |
| } | |
| $JSCompiler_prototypeAlias$$.$stopIgnore_$ = function() { | |
| this.$ignoreInactive_$ = this.$ignoreActivity_$ = !1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleActivity_$ = function() { | |
| this.$ignoreActivity_$ || (this.$ignoreActivity_$ = !0, this.$ignoreInactive_$ = !1, $JSCompiler_StaticMethods_handleActivityEvent_$$(this, "active")) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$handleInactive_$ = function() { | |
| this.$ignoreInactive_$ || (this.$ignoreInactive_$ = !0, this.$ignoreActivity_$ = !1, $JSCompiler_StaticMethods_handleActivityEvent_$$(this, "inactive")) | |
| }; | |
| function $JSCompiler_StaticMethods_handleActivityEvent_$$($JSCompiler_StaticMethods_handleActivityEvent_$self$$, $type$jscomp$137$$) { | |
| var $timeSinceStart$jscomp$1$$ = $JSCompiler_StaticMethods_getTimeSinceStart_$$($JSCompiler_StaticMethods_handleActivityEvent_$self$$), | |
| $secondKey$$ = Math.floor($timeSinceStart$jscomp$1$$ / 1E3), | |
| $timeToWait$$ = 1E3 - $timeSinceStart$jscomp$1$$ % 1E3; | |
| setTimeout($JSCompiler_StaticMethods_handleActivityEvent_$self$$.$boundStopIgnore_$, $timeToWait$$); | |
| $JSCompiler_StaticMethods_handleActivityEvent_$self$$.$activityHistory_$.push({ | |
| type: $type$jscomp$137$$, | |
| time: $secondKey$$ | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.$handleVisibilityChange_$ = function() { | |
| this.$viewer_$.isVisible() ? this.$handleActivity_$() : this.$handleInactive_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$unlisten_$ = function() { | |
| for (var $i$jscomp$87$$ = 0; $i$jscomp$87$$ < this.$unlistenFuncs_$.length; $i$jscomp$87$$++) { | |
| var $unlistenFunc$$ = this.$unlistenFuncs_$[$i$jscomp$87$$]; | |
| "function" === typeof $unlistenFunc$$ && $unlistenFunc$$() | |
| } | |
| this.$unlistenFuncs_$ = [] | |
| }; | |
| $JSCompiler_prototypeAlias$$.$cleanup_$ = function() { | |
| this.$unlisten_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getTotalEngagedTime = function() { | |
| var $secondsSinceStart$$ = Math.floor($JSCompiler_StaticMethods_getTimeSinceStart_$$(this) / 1E3); | |
| return this.$activityHistory_$.getTotalEngagedTime($secondsSinceStart$$) | |
| }; | |
| function $Transport$$module$extensions$amp_analytics$0_1$transport$sendRequestUsingImage$$($request$jscomp$14$$) { | |
| var $image$jscomp$3$$ = new Image; | |
| $image$jscomp$3$$.src = $request$jscomp$14$$; | |
| $image$jscomp$3$$.width = 1; | |
| $image$jscomp$3$$.height = 1; | |
| $loadPromise$$module$src$event_helper$$($image$jscomp$3$$).then(function() {}). | |
| catch (function() { | |
| $user$$module$src$log$$().warn("amp-analytics.Transport", "Response unparseable or failed to send image request", $request$jscomp$14$$) | |
| }) | |
| } | |
| function $Transport$$module$extensions$amp_analytics$0_1$transport$sendRequestUsingXhr$$($win$jscomp$166_xhr$jscomp$3$$, $request$jscomp$16$$) { | |
| if (!$win$jscomp$166_xhr$jscomp$3$$.XMLHttpRequest) return !1; | |
| $win$jscomp$166_xhr$jscomp$3$$ = new $win$jscomp$166_xhr$jscomp$3$$.XMLHttpRequest; | |
| if (!("withCredentials" in $win$jscomp$166_xhr$jscomp$3$$)) return !1; | |
| $win$jscomp$166_xhr$jscomp$3$$.open("POST", $request$jscomp$16$$, !0); | |
| $win$jscomp$166_xhr$jscomp$3$$.withCredentials = !0; | |
| $win$jscomp$166_xhr$jscomp$3$$.setRequestHeader("Content-Type", | |
| "text/plain"); | |
| $win$jscomp$166_xhr$jscomp$3$$.onreadystatechange = function() {}; | |
| $win$jscomp$166_xhr$jscomp$3$$.send(""); | |
| return !0 | |
| } | |
| function $sendRequestUsingIframe$$module$extensions$amp_analytics$0_1$transport$$($win$jscomp$167$$, $request$jscomp$17$$) { | |
| $assertHttpsUrl$$module$src$url$$($request$jscomp$17$$, "amp-analytics request"); | |
| var $iframe$jscomp$23$$ = $win$jscomp$167$$.document.createElement("iframe"); | |
| $setStyle$$module$src$style$$($iframe$jscomp$23$$, "display", "none"); | |
| $iframe$jscomp$23$$.onload = $iframe$jscomp$23$$.onerror = function() { | |
| $Services$$module$src$services$timerFor$$($win$jscomp$167$$).delay(function() { | |
| $removeElement$$module$src$dom$$($iframe$jscomp$23$$) | |
| }, | |
| 5E3) | |
| }; | |
| $user$$module$src$log$$().assert($parseUrl$$module$src$url$$($request$jscomp$17$$).origin != $parseUrl$$module$src$url$$($win$jscomp$167$$.location.href).origin, "Origin of iframe request must not be equal to the document origin. See https://github.com/ampproject/ amphtml/blob/master/spec/amp-iframe-origin-policy.md for details."); | |
| $iframe$jscomp$23$$.setAttribute("amp-analytics", ""); | |
| $iframe$jscomp$23$$.setAttribute("sandbox", "allow-scripts allow-same-origin"); | |
| $iframe$jscomp$23$$.src = $request$jscomp$17$$; | |
| $win$jscomp$167$$.document.body.appendChild($iframe$jscomp$23$$) | |
| }; | |
| function $JankMeter$$module$src$service$jank_meter$$($win$jscomp$168$$) { | |
| this.$win_$ = $win$jscomp$168$$; | |
| this.$longTaskSelf_$ = this.$longTaskChild_$ = this.$totalFrameCnt_$ = this.$badFrameCnt_$ = 0; | |
| this.$scheduledTime_$ = null; | |
| this.$perf_$ = $getExistingServiceOrNull$$module$src$service$$($win$jscomp$168$$); | |
| this.$longTaskObserver_$ = this.$batteryLevelStart_$ = this.$batteryManager_$ = null; | |
| $JSCompiler_StaticMethods_initializeLongTaskObserver_$$(this) | |
| } | |
| $JankMeter$$module$src$service$jank_meter$$.prototype.onScheduled = function() { | |
| this.$isEnabled_$() && null == this.$scheduledTime_$ && (this.$scheduledTime_$ = this.$win_$.Date.now()) | |
| }; | |
| $JankMeter$$module$src$service$jank_meter$$.prototype.onRun = function() { | |
| if (this.$isEnabled_$() && null != this.$scheduledTime_$) { | |
| var $paintLatency$$ = this.$win_$.Date.now() - this.$scheduledTime_$; | |
| this.$scheduledTime_$ = null; | |
| this.$totalFrameCnt_$++; | |
| 16 < $paintLatency$$ && (this.$badFrameCnt_$++, $dev$$module$src$log$$().info("JANK", "Paint latency: " + $paintLatency$$ + "ms")); | |
| if (this.$perf_$ && 200 == this.$totalFrameCnt_$) { | |
| var $gfp$$ = this.$win_$.Math.floor((this.$totalFrameCnt_$ - this.$badFrameCnt_$) / this.$totalFrameCnt_$ * | |
| 100); | |
| this.$perf_$.tickDelta("gfp", $gfp$$); | |
| this.$perf_$.tickDelta("bf", this.$badFrameCnt_$); | |
| this.$longTaskObserver_$ && (this.$perf_$.tickDelta("lts", this.$longTaskSelf_$), this.$perf_$.tickDelta("ltc", this.$longTaskChild_$), this.$longTaskObserver_$.disconnect(), this.$longTaskObserver_$ = null); | |
| var $batteryDrop$$ = 0; | |
| this.$batteryManager_$ && null != this.$batteryLevelStart_$ && ($batteryDrop$$ = this.$win_$.Math.max(0, this.$win_$.Math.floor(100 * this.$batteryManager_$.level - this.$batteryLevelStart_$)), this.$perf_$.tickDelta("bd", | |
| $batteryDrop$$)); | |
| this.$perf_$.flush(); | |
| if ($isExperimentOn$$module$src$experiments$$(this.$win_$, "jank-meter")) { | |
| var $JSCompiler_batteryDrop$jscomp$inline_865$$ = $batteryDrop$$, | |
| $JSCompiler_display$jscomp$inline_866$$ = this.$win_$.document.createElement("div"); | |
| $JSCompiler_display$jscomp$inline_866$$.classList.add("i-amphtml-jank-meter"); | |
| $JSCompiler_display$jscomp$inline_866$$.textContent = "bf:" + this.$badFrameCnt_$ + ", lts: " + this.$longTaskSelf_$ + ", " + ("ltc:" + this.$longTaskChild_$ + ", bd:" + $JSCompiler_batteryDrop$jscomp$inline_865$$); | |
| this.$win_$.document.body.appendChild($JSCompiler_display$jscomp$inline_866$$) | |
| } | |
| } | |
| } | |
| }; | |
| $JankMeter$$module$src$service$jank_meter$$.prototype.$isEnabled_$ = function() { | |
| return $isExperimentOn$$module$src$experiments$$(this.$win_$, "jank-meter") || this.$perf_$ && this.$perf_$.isPerformanceTrackingOn() && 200 > this.$totalFrameCnt_$ | |
| }; | |
| function $JSCompiler_StaticMethods_initializeLongTaskObserver_$$($JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$) { | |
| $JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$isEnabled_$() && $isLongTaskApiSupported$$module$src$service$jank_meter$$($JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$win_$) && ($JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$longTaskObserver_$ = new $JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$win_$.PerformanceObserver(function($entryList$$) { | |
| for (var $entries$jscomp$2$$ = | |
| $entryList$$.getEntries(), $i$jscomp$88$$ = 0; $i$jscomp$88$$ < $entries$jscomp$2$$.length; $i$jscomp$88$$++) if ("longtask" == $entries$jscomp$2$$[$i$jscomp$88$$].entryType) { | |
| var $span$$ = $JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$win_$.Math.floor($entries$jscomp$2$$[$i$jscomp$88$$].duration / 50); | |
| "cross-origin-descendant" == $entries$jscomp$2$$[$i$jscomp$88$$].name ? ($JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$longTaskChild_$ += $span$$, $user$$module$src$log$$().info("LONGTASK", | |
| "from child frame " + $entries$jscomp$2$$[$i$jscomp$88$$].duration + "ms")) : ($JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$longTaskSelf_$ += $span$$, $dev$$module$src$log$$().info("LONGTASK", "from self frame " + $entries$jscomp$2$$[$i$jscomp$88$$].duration + "ms")) | |
| } | |
| }), $JSCompiler_StaticMethods_initializeLongTaskObserver_$self$$.$longTaskObserver_$.observe({ | |
| entryTypes: ["longtask"] | |
| })) | |
| } | |
| function $isLongTaskApiSupported$$module$src$service$jank_meter$$($win$jscomp$170$$) { | |
| return !!$win$jscomp$170$$.PerformanceObserver && !! $win$jscomp$170$$.TaskAttributionTiming && "containerName" in $win$jscomp$170$$.TaskAttributionTiming.prototype | |
| }; | |
| function $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$($win$jscomp$171$$, $frame$$) { | |
| var $$jscomp$this$jscomp$118$$ = this; | |
| this.$win_$ = $win$jscomp$171$$; | |
| this.$frame_$ = $frame$$; | |
| this.$isReady_$ = !1; | |
| this.$pendingEvents_$ = []; | |
| this.$postMessageApi_$ = new $SubscriptionApi$$module$src$iframe_helper$$(this.$frame_$, "send-iframe-transport-events", function() { | |
| $$jscomp$this$jscomp$118$$.setIsReady() | |
| }) | |
| } | |
| $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$.prototype.isReady = function() { | |
| return this.$isReady_$ | |
| }; | |
| $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$.prototype.setIsReady = function() { | |
| this.$isReady_$ = !0; | |
| $JSCompiler_StaticMethods_flushQueue_$$(this) | |
| }; | |
| $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$.prototype.queueSize = function() { | |
| return this.$pendingEvents_$.length | |
| }; | |
| $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$.prototype.enqueue = function($event$jscomp$21$$) { | |
| this.$pendingEvents_$.push($event$jscomp$21$$); | |
| 100 <= this.queueSize() && ($dev$$module$src$log$$().warn("amp-analytics.IframeTransportMessageQueue", "Exceeded maximum size of queue for: " + $event$jscomp$21$$.creativeId), this.$pendingEvents_$.shift()); | |
| $JSCompiler_StaticMethods_flushQueue_$$(this) | |
| }; | |
| function $JSCompiler_StaticMethods_flushQueue_$$($JSCompiler_StaticMethods_flushQueue_$self$$) { | |
| $JSCompiler_StaticMethods_flushQueue_$self$$.isReady() && $JSCompiler_StaticMethods_flushQueue_$self$$.queueSize() && ($JSCompiler_StaticMethods_flushQueue_$self$$.$postMessageApi_$.send("iframe-transport-events", { | |
| events: $JSCompiler_StaticMethods_flushQueue_$self$$.$pendingEvents_$ | |
| }), $JSCompiler_StaticMethods_flushQueue_$self$$.$pendingEvents_$ = []) | |
| }; | |
| function $getIframeTransportScriptUrl$$module$extensions$amp_analytics$0_1$iframe_transport$$() { | |
| return $module$src$config$$.urls.thirdParty + "/1515445171205/iframe-transport-client-v0.js" | |
| } | |
| function $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$$($ampWin$jscomp$1$$, $type$jscomp$138$$, $config$jscomp$16$$, $id$jscomp$45$$) { | |
| this.$ampWin_$ = $ampWin$jscomp$1$$; | |
| this.$type_$ = $type$jscomp$138$$; | |
| this.$creativeId_$ = $id$jscomp$45$$; | |
| this.$frameUrl_$ = $config$jscomp$16$$.iframe; | |
| this.$numLongTasks_$ = 0; | |
| this.processCrossDomainIframe() | |
| } | |
| $JSCompiler_prototypeAlias$$ = $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$$.prototype; | |
| $JSCompiler_prototypeAlias$$.detach = function() { | |
| var $JSCompiler_ampDoc$jscomp$inline_868$$ = this.$ampWin_$.document, | |
| $JSCompiler_type$jscomp$inline_869$$ = this.$type_$, | |
| $JSCompiler_frameData$jscomp$inline_870$$ = $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$[$JSCompiler_type$jscomp$inline_869$$]; | |
| --$JSCompiler_frameData$jscomp$inline_870$$.usageCount || ($JSCompiler_ampDoc$jscomp$inline_868$$.body.removeChild($JSCompiler_frameData$jscomp$inline_870$$.frame), delete $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$[$JSCompiler_type$jscomp$inline_869$$], | |
| $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$[$JSCompiler_type$jscomp$inline_869$$] && ($IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$[$JSCompiler_type$jscomp$inline_869$$].disconnect(), $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$[$JSCompiler_type$jscomp$inline_869$$] = null)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.processCrossDomainIframe = function() { | |
| if ($hasOwn_$$module$src$utils$object$$.call($IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$, this.$type_$)) { | |
| var $frameData$$ = $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$[this.$type_$]; | |
| ++$frameData$$.usageCount | |
| } else $frameData$$ = this.createCrossDomainIframe(), this.$ampWin_$.document.body.appendChild($frameData$$.frame), $JSCompiler_StaticMethods_createPerformanceObserver_$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.createCrossDomainIframe = function() { | |
| var $frameData$jscomp$1_sentinel$jscomp$7$$ = String(++$IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$nextId_$$), | |
| $frameName$$ = JSON.stringify({ | |
| scriptSrc: $getIframeTransportScriptUrl$$module$extensions$amp_analytics$0_1$iframe_transport$$(), | |
| sentinel: $frameData$jscomp$1_sentinel$jscomp$7$$, | |
| type: this.$type_$ | |
| }), | |
| $frame$jscomp$1$$ = $createElementWithAttributes$$module$src$dom$$(this.$ampWin_$.document, "iframe", { | |
| sandbox: "allow-scripts allow-same-origin", | |
| name: $frameName$$, | |
| "data-amp-3p-sentinel": $frameData$jscomp$1_sentinel$jscomp$7$$ | |
| }); | |
| $frame$jscomp$1$$.sentinel = $frameData$jscomp$1_sentinel$jscomp$7$$; | |
| $setStyles$$module$src$style$$($frame$jscomp$1$$, { | |
| display: "none" | |
| }); | |
| $frame$jscomp$1$$.src = this.$frameUrl_$; | |
| $frameData$jscomp$1_sentinel$jscomp$7$$ = { | |
| frame: $frame$jscomp$1$$, | |
| usageCount: 1, | |
| queue: new $IframeTransportMessageQueue$$module$extensions$amp_analytics$0_1$iframe_transport_message_queue$$(this.$ampWin_$, $frame$jscomp$1$$) | |
| }; | |
| return $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$[this.$type_$] = | |
| $frameData$jscomp$1_sentinel$jscomp$7$$ | |
| }; | |
| function $JSCompiler_StaticMethods_createPerformanceObserver_$$($JSCompiler_StaticMethods_createPerformanceObserver_$self$$) { | |
| $isLongTaskApiSupported$$module$src$service$jank_meter$$($JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$ampWin_$) && ($IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$[$JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$type_$] = new $JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$ampWin_$.PerformanceObserver(function($entryList$jscomp$1$$) { | |
| $entryList$jscomp$1$$ && $entryList$jscomp$1$$.getEntries().forEach(function($entryList$jscomp$1$$) { | |
| $entryList$jscomp$1$$ && | |
| "longtask" == $entryList$jscomp$1$$.entryType && "cross-origin-descendant" == $entryList$jscomp$1$$.name && $entryList$jscomp$1$$.attribution && $entryList$jscomp$1$$.attribution.forEach(function($entry$jscomp$2$$) { | |
| $JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$frameUrl_$ == $entry$jscomp$2$$.containerSrc && 0 == ++$JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$numLongTasks_$ % 5 && $user$$module$src$log$$().warn("amp-analytics.IframeTransport", "Long Task: " + ('Vendor: "' + $JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$type_$ + | |
| '" ') + ('Src: "' + $entry$jscomp$2$$.containerSrc + '" ') + ("Duration: " + $entryList$jscomp$1$$.duration + "ms ") + ("Occurrences: " + $JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$numLongTasks_$)) | |
| }) | |
| }) | |
| }), $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$[$JSCompiler_StaticMethods_createPerformanceObserver_$self$$.$type_$].observe({ | |
| entryTypes: ["longtask"] | |
| })) | |
| } | |
| $JSCompiler_prototypeAlias$$.sendRequest = function($event$jscomp$22$$) { | |
| $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$[this.$type_$].queue.enqueue({ | |
| creativeId: this.$creativeId_$, | |
| message: $event$jscomp$22$$ | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getCreativeId = function() { | |
| return this.$creativeId_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getType = function() { | |
| return this.$type_$ | |
| }; | |
| var $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$crossDomainIframes_$$ = {}, $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$nextId_$$ = 0, | |
| $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$performanceObservers_$$ = {}; | |
| var $VARIABLE_DATA_ATTRIBUTE_KEY$$module$extensions$amp_analytics$0_1$events$$ = /^vars(.+)/; | |
| function $NO_UNLISTEN$$module$extensions$amp_analytics$0_1$events$$() {} | |
| var $AnalyticsEventType$$module$extensions$amp_analytics$0_1$events$$ = { | |
| VISIBLE: "visible", | |
| CLICK: "click", | |
| TIMER: "timer", | |
| SCROLL: "scroll", | |
| HIDDEN: "hidden" | |
| }, $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$ = ["ampdoc", "embed"], | |
| $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$ = Object.freeze({ | |
| click: { | |
| name: "click", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer"]), | |
| klass: function($root$jscomp$9$$) { | |
| return new $ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$9$$) | |
| } | |
| }, | |
| custom: { | |
| name: "custom", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer"]), | |
| klass: function($root$jscomp$10$$) { | |
| return new $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$10$$) | |
| } | |
| }, | |
| "render-start": { | |
| name: "render-start", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer", "visible"]), | |
| klass: function($root$jscomp$11$$) { | |
| return new $SignalTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$11$$) | |
| } | |
| }, | |
| "ini-load": { | |
| name: "ini-load", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer", "visible"]), | |
| klass: function($root$jscomp$12$$) { | |
| return new $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$12$$) | |
| } | |
| }, | |
| timer: { | |
| name: "timer", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$, | |
| klass: function($root$jscomp$13$$) { | |
| return new $TimerEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$13$$) | |
| } | |
| }, | |
| visible: { | |
| name: "visible", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer"]), | |
| klass: function($root$jscomp$14$$) { | |
| return new $VisibilityTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$14$$) | |
| } | |
| }, | |
| hidden: { | |
| name: "visible", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer"]), | |
| klass: function($root$jscomp$15$$) { | |
| return new $VisibilityTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$15$$) | |
| } | |
| }, | |
| video: { | |
| name: "video", | |
| allowedFor: $ALLOWED_FOR_ALL_ROOT_TYPES$$module$extensions$amp_analytics$0_1$events$$.concat(["timer"]), | |
| klass: function($root$jscomp$16$$) { | |
| return new $VideoEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$16$$) | |
| } | |
| } | |
| }); | |
| function $getTrackerKeyName$$module$extensions$amp_analytics$0_1$events$$($eventType$jscomp$14$$) { | |
| return $startsWith$$module$src$string$$($eventType$jscomp$14$$, "video") ? "video" : $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$[$eventType$jscomp$14$$] || $isEnumValue$$module$src$types$$($AnalyticsEventType$$module$extensions$amp_analytics$0_1$events$$, $eventType$jscomp$14$$) ? $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$.hasOwnProperty($eventType$jscomp$14$$) ? $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$[$eventType$jscomp$14$$].name : | |
| $eventType$jscomp$14$$ : "custom" | |
| } | |
| function $getTrackerTypesForParentType$$module$extensions$amp_analytics$0_1$events$$($parentType$$) { | |
| var $filtered$$ = {}; | |
| Object.keys($TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$).forEach(function($key$jscomp$60$$) { | |
| $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$.hasOwnProperty($key$jscomp$60$$) && -1 != $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$[$key$jscomp$60$$].allowedFor.indexOf($parentType$$) && ($filtered$$[$key$jscomp$60$$] = $TRACKER_TYPE$$module$extensions$amp_analytics$0_1$events$$[$key$jscomp$60$$].klass) | |
| }, | |
| this); | |
| return $filtered$$ | |
| } | |
| function $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$70$$, $type$jscomp$142$$, $opt_vars$jscomp$3$$) { | |
| this.target = $target$jscomp$70$$; | |
| this.type = $type$jscomp$142$$; | |
| this.vars = $opt_vars$jscomp$3$$ || Object.create(null) | |
| } | |
| function $EventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$17$$) { | |
| this.root = $root$jscomp$17$$ | |
| } | |
| $EventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() {}; | |
| $EventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function() {}; | |
| function $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$18$$) { | |
| this.root = $root$jscomp$18$$; | |
| var $$jscomp$this$jscomp$120$$ = this; | |
| this.$observables_$ = {}; | |
| this.$buffer_$ = {}; | |
| this.$sandboxBuffer_$ = {}; | |
| setTimeout(function() { | |
| $$jscomp$this$jscomp$120$$.$buffer_$ = void 0 | |
| }, 1E4) | |
| } | |
| $$jscomp$inherits$$($CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() { | |
| this.$sandboxBuffer_$ = this.$buffer_$ = void 0; | |
| for (var $k$jscomp$15$$ in this.$observables_$) this.$observables_$[$k$jscomp$15$$].removeAll() | |
| }; | |
| $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function($context$jscomp$7$$, $eventType$jscomp$15$$, $config$jscomp$17$$, $listener$jscomp$64$$) { | |
| var $$jscomp$this$jscomp$121$$ = this, | |
| $selector$jscomp$8$$ = $config$jscomp$17$$.selector; | |
| $selector$jscomp$8$$ || ($selector$jscomp$8$$ = ":root"); | |
| var $selectionMethod$$ = $config$jscomp$17$$.selectionMethod || null, | |
| $targetReady$$ = this.root.getElement($context$jscomp$7$$, $selector$jscomp$8$$, $selectionMethod$$), | |
| $isSandboxEvent$$ = $startsWith$$module$src$string$$($eventType$jscomp$15$$, | |
| "sandbox-"), | |
| $buffer$jscomp$9$$ = $isSandboxEvent$$ ? this.$sandboxBuffer_$ && this.$sandboxBuffer_$[$eventType$jscomp$15$$] : this.$buffer_$ && this.$buffer_$[$eventType$jscomp$15$$]; | |
| if ($buffer$jscomp$9$$) { | |
| var $bufferLength$$ = $buffer$jscomp$9$$.length; | |
| $targetReady$$.then(function($context$jscomp$7$$) { | |
| setTimeout(function() { | |
| for (var $config$jscomp$17$$ = 0; $config$jscomp$17$$ < $bufferLength$$; $config$jscomp$17$$++) { | |
| var $selector$jscomp$8$$ = $buffer$jscomp$9$$[$config$jscomp$17$$]; | |
| $context$jscomp$7$$.contains($selector$jscomp$8$$.target) && | |
| $listener$jscomp$64$$($selector$jscomp$8$$) | |
| } | |
| $isSandboxEvent$$ && ($$jscomp$this$jscomp$121$$.$sandboxBuffer_$[$eventType$jscomp$15$$] = void 0) | |
| }, 1) | |
| }) | |
| } | |
| var $observables$$ = this.$observables_$[$eventType$jscomp$15$$]; | |
| $observables$$ || ($observables$$ = new $Observable$$module$src$observable$$, this.$observables_$[$eventType$jscomp$15$$] = $observables$$); | |
| return this.$observables_$[$eventType$jscomp$15$$].add(function($context$jscomp$7$$) { | |
| $targetReady$$.then(function($eventType$jscomp$15$$) { | |
| $eventType$jscomp$15$$.contains($context$jscomp$7$$.target) && | |
| $listener$jscomp$64$$($context$jscomp$7$$) | |
| }) | |
| }) | |
| }; | |
| $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.trigger = function($event$jscomp$25$$) { | |
| var $eventType$jscomp$16$$ = $event$jscomp$25$$.type, | |
| $isSandboxEvent$jscomp$1$$ = $startsWith$$module$src$string$$($eventType$jscomp$16$$, "sandbox-"), | |
| $observables$jscomp$1$$ = this.$observables_$[$eventType$jscomp$16$$]; | |
| if ($observables$jscomp$1$$ && ($observables$jscomp$1$$.fire($event$jscomp$25$$), $isSandboxEvent$jscomp$1$$)) return; | |
| $isSandboxEvent$jscomp$1$$ ? (this.$sandboxBuffer_$[$eventType$jscomp$16$$] = | |
| this.$sandboxBuffer_$[$eventType$jscomp$16$$] || [], this.$sandboxBuffer_$[$eventType$jscomp$16$$].push($event$jscomp$25$$)) : this.$buffer_$ && (this.$buffer_$[$eventType$jscomp$16$$] = this.$buffer_$[$eventType$jscomp$16$$] || [], this.$buffer_$[$eventType$jscomp$16$$].push($event$jscomp$25$$)) | |
| }; | |
| function $ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$19$$) { | |
| this.root = $root$jscomp$19$$; | |
| var $$jscomp$this$jscomp$122$$ = this; | |
| this.$clickObservable_$ = new $Observable$$module$src$observable$$; | |
| this.$boundOnClick_$ = function($root$jscomp$19$$) { | |
| $$jscomp$this$jscomp$122$$.$clickObservable_$.fire($root$jscomp$19$$) | |
| }; | |
| this.root.getRoot().addEventListener("click", this.$boundOnClick_$) | |
| } | |
| $$jscomp$inherits$$($ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() { | |
| this.root.getRoot().removeEventListener("click", this.$boundOnClick_$); | |
| this.$clickObservable_$.removeAll() | |
| }; | |
| $ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function($context$jscomp$8$$, $eventType$jscomp$17_selector$jscomp$9$$, $config$jscomp$18_selectionMethod$jscomp$1$$, $listener$jscomp$65$$) { | |
| $eventType$jscomp$17_selector$jscomp$9$$ = $user$$module$src$log$$().assert($config$jscomp$18_selectionMethod$jscomp$1$$.selector, "Missing required selector on click trigger"); | |
| $config$jscomp$18_selectionMethod$jscomp$1$$ = $config$jscomp$18_selectionMethod$jscomp$1$$.selectionMethod || null; | |
| return this.$clickObservable_$.add(this.root.createSelectiveListener(this.$handleClick_$.bind(this, $listener$jscomp$65$$), $context$jscomp$8$$.parentElement || $context$jscomp$8$$, $eventType$jscomp$17_selector$jscomp$9$$, $config$jscomp$18_selectionMethod$jscomp$1$$)) | |
| }; | |
| $ClickEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.$handleClick_$ = function($listener$jscomp$66$$, $target$jscomp$73$$) { | |
| var $params$jscomp$7$$ = $getDataParamsFromAttributes$$module$src$dom$$($target$jscomp$73$$); | |
| $listener$jscomp$66$$(new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$73$$, "click", $params$jscomp$7$$)) | |
| }; | |
| function $SignalTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$20$$) { | |
| this.root = $root$jscomp$20$$ | |
| } | |
| $$jscomp$inherits$$($SignalTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $SignalTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() {}; | |
| $SignalTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function($context$jscomp$9$$, $eventType$jscomp$18$$, $config$jscomp$19$$, $listener$jscomp$67$$) { | |
| var $$jscomp$this$jscomp$123$$ = this, | |
| $selector$jscomp$10$$ = $config$jscomp$19$$.selector || ":root"; | |
| if (":root" == $selector$jscomp$10$$ || ":host" == $selector$jscomp$10$$) { | |
| var $target$jscomp$74$$ = this.root.getRootElement(); | |
| var $signalsPromise$$ = this.getRootSignal($eventType$jscomp$18$$) | |
| } else $signalsPromise$$ = this.root.getAmpElement($context$jscomp$9$$.parentElement || | |
| $context$jscomp$9$$, $selector$jscomp$10$$, $config$jscomp$19$$.selectionMethod).then(function($context$jscomp$9$$) { | |
| $target$jscomp$74$$ = $context$jscomp$9$$; | |
| return $$jscomp$this$jscomp$123$$.getElementSignal($eventType$jscomp$18$$, $target$jscomp$74$$) | |
| }); | |
| $signalsPromise$$.then(function() { | |
| $listener$jscomp$67$$(new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$74$$, $eventType$jscomp$18$$)) | |
| }); | |
| return $NO_UNLISTEN$$module$extensions$amp_analytics$0_1$events$$ | |
| }; | |
| $SignalTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.getRootSignal = function($eventType$jscomp$19$$) { | |
| return this.root.signals().whenSignal($eventType$jscomp$19$$) | |
| }; | |
| $SignalTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.getElementSignal = function($eventType$jscomp$20$$, $element$jscomp$101$$) { | |
| return "function" != typeof $element$jscomp$101$$.signals ? Promise.resolve() : $element$jscomp$101$$.signals().whenSignal($eventType$jscomp$20$$) | |
| }; | |
| function $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$21$$) { | |
| this.root = $root$jscomp$21$$ | |
| } | |
| $$jscomp$inherits$$($IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() {}; | |
| $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function($context$jscomp$10_promise$jscomp$16$$, $eventType$jscomp$21$$, $config$jscomp$20$$, $listener$jscomp$68$$) { | |
| var $$jscomp$this$jscomp$124$$ = this, | |
| $selector$jscomp$11$$ = $config$jscomp$20$$.selector || ":root"; | |
| if (":root" == $selector$jscomp$11$$ || ":host" == $selector$jscomp$11$$) { | |
| var $target$jscomp$75$$ = this.root.getRootElement(); | |
| $context$jscomp$10_promise$jscomp$16$$ = this.getRootSignal() | |
| } else $context$jscomp$10_promise$jscomp$16$$ = | |
| this.root.getAmpElement($context$jscomp$10_promise$jscomp$16$$.parentElement || $context$jscomp$10_promise$jscomp$16$$, $selector$jscomp$11$$, $config$jscomp$20$$.selectionMethod).then(function($context$jscomp$10_promise$jscomp$16$$) { | |
| $target$jscomp$75$$ = $context$jscomp$10_promise$jscomp$16$$; | |
| return $$jscomp$this$jscomp$124$$.getElementSignal("ini-load", $target$jscomp$75$$) | |
| }); | |
| $context$jscomp$10_promise$jscomp$16$$.then(function() { | |
| $listener$jscomp$68$$(new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$75$$, | |
| $eventType$jscomp$21$$)) | |
| }); | |
| return $NO_UNLISTEN$$module$extensions$amp_analytics$0_1$events$$ | |
| }; | |
| $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.getRootSignal = function() { | |
| return this.root.whenIniLoaded() | |
| }; | |
| $IniLoadTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.getElementSignal = function($signals$jscomp$1_unusedEventType$jscomp$3$$, $element$jscomp$103$$) { | |
| if ("function" != typeof $element$jscomp$103$$.signals) return Promise.resolve(); | |
| $signals$jscomp$1_unusedEventType$jscomp$3$$ = $element$jscomp$103$$.signals(); | |
| return Promise.race([$signals$jscomp$1_unusedEventType$jscomp$3$$.whenSignal("ini-load"), $signals$jscomp$1_unusedEventType$jscomp$3$$.whenSignal("load-end")]) | |
| }; | |
| function $TimerEventHandler$$module$extensions$amp_analytics$0_1$events$$($timerSpec$$, $opt_startBuilder$$, $opt_stopBuilder$$) { | |
| this.$intervalId_$ = void 0; | |
| $user$$module$src$log$$().assert("interval" in $timerSpec$$, "Timer interval specification required"); | |
| this.$intervalLength_$ = Number($timerSpec$$.interval) || 0; | |
| $user$$module$src$log$$().assert(.5 <= this.$intervalLength_$, "Bad timer interval specification"); | |
| this.$maxTimerLength_$ = "maxTimerLength" in $timerSpec$$ ? Number($timerSpec$$.maxTimerLength) : 7200; | |
| $user$$module$src$log$$().assert(0 < this.$maxTimerLength_$, "Bad maxTimerLength specification"); | |
| this.$maxTimerInSpec_$ = "maxTimerLength" in $timerSpec$$; | |
| this.$callImmediate_$ = "immediate" in $timerSpec$$ ? !! $timerSpec$$.immediate : !0; | |
| this.$unlistenStop_$ = this.$unlistenStart_$ = this.$intervalCallback_$ = null; | |
| this.$startBuilder_$ = $opt_startBuilder$$ || null; | |
| this.$stopBuilder_$ = $opt_stopBuilder$$ || null; | |
| this.$lastRequestTime_$ = this.$startTime_$ = void 0 | |
| } | |
| $JSCompiler_prototypeAlias$$ = $TimerEventHandler$$module$extensions$amp_analytics$0_1$events$$.prototype; | |
| $JSCompiler_prototypeAlias$$.init = function($startTimer$$) { | |
| this.$startBuilder_$ ? this.$startBuilder_$ && (this.$unlistenStart_$ = this.$startBuilder_$()) : $startTimer$$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| this.$unlistenStop_$ && (this.$unlistenStop_$(), this.$unlistenStop_$ = null); | |
| this.$unlistenStart_$ && (this.$unlistenStart_$(), this.$unlistenStart_$ = null) | |
| }; | |
| $JSCompiler_prototypeAlias$$.isRunning = function() { | |
| return !!this.$intervalId_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.startIntervalInWindow = function($win$jscomp$172$$, $timerCallback$$, $timeoutCallback$$) { | |
| if (!this.isRunning() && (this.$startTime_$ = Date.now(), this.$lastRequestTime_$ = void 0, this.$intervalCallback_$ = $timerCallback$$, this.$intervalId_$ = $win$jscomp$172$$.setInterval(function() { | |
| $timerCallback$$() | |
| }, 1E3 * this.$intervalLength_$), (!this.$stopBuilder_$ || this.$stopBuilder_$ && this.$maxTimerInSpec_$) && $win$jscomp$172$$.setTimeout(function() { | |
| $timeoutCallback$$() | |
| }, 1E3 * this.$maxTimerLength_$), | |
| this.$unlistenStart_$ && (this.$unlistenStart_$(), this.$unlistenStart_$ = null), this.$callImmediate_$ && $timerCallback$$(), this.$stopBuilder_$)) try { | |
| this.$unlistenStop_$ = this.$stopBuilder_$() | |
| } catch ($JSCompiler_e$jscomp$inline_889$$) { | |
| throw this.dispose(), $JSCompiler_e$jscomp$inline_889$$; | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.$stopTimer_$ = function($win$jscomp$173$$) { | |
| this.isRunning() && (this.$intervalCallback_$(), this.$intervalCallback_$ = null, $win$jscomp$173$$.clearInterval(this.$intervalId_$), this.$lastRequestTime_$ = this.$intervalId_$ = void 0, this.$unlistenStop_$ && (this.$unlistenStop_$(), this.$unlistenStop_$ = null), this.$startBuilder_$ && (this.$unlistenStart_$ = this.$startBuilder_$())) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getTimerVars = function() { | |
| var $timerDuration$$ = 0; | |
| this.isRunning() && ($timerDuration$$ = this.$startTime_$ ? Date.now() - (this.$lastRequestTime_$ || this.$startTime_$) : 0, this.$lastRequestTime_$ = Date.now()); | |
| return { | |
| timerDuration: $timerDuration$$, | |
| timerStart: this.$startTime_$ || 0 | |
| } | |
| }; | |
| function $TimerEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$22$$) { | |
| this.root = $root$jscomp$22$$; | |
| this.$trackers_$ = {}; | |
| this.$timerIdSequence_$ = 1 | |
| } | |
| $$jscomp$inherits$$($TimerEventTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $JSCompiler_prototypeAlias$$ = $TimerEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getTrackedTimerKeys = function() { | |
| return Object.keys(this.$trackers_$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| var $$jscomp$this$jscomp$125$$ = this; | |
| this.getTrackedTimerKeys().forEach(function($timerId$$) { | |
| $$jscomp$this$jscomp$125$$.$removeTracker_$($timerId$$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.add = function($context$jscomp$11$$, $eventType$jscomp$22$$, $config$jscomp$21_timerSpec$jscomp$1$$, $listener$jscomp$69$$) { | |
| var $$jscomp$this$jscomp$126$$ = this; | |
| $config$jscomp$21_timerSpec$jscomp$1$$ = $config$jscomp$21_timerSpec$jscomp$1$$.timerSpec; | |
| $user$$module$src$log$$().assert($config$jscomp$21_timerSpec$jscomp$1$$ && "object" == typeof $config$jscomp$21_timerSpec$jscomp$1$$, "Bad timer specification"); | |
| var $timerStart$$ = "startSpec" in $config$jscomp$21_timerSpec$jscomp$1$$ ? $config$jscomp$21_timerSpec$jscomp$1$$.startSpec : | |
| null; | |
| $user$$module$src$log$$().assert(!$timerStart$$ || "object" == typeof $timerStart$$, "Bad timer start specification"); | |
| var $timerStop$$ = "stopSpec" in $config$jscomp$21_timerSpec$jscomp$1$$ ? $config$jscomp$21_timerSpec$jscomp$1$$.stopSpec : null; | |
| $user$$module$src$log$$().assert(!$timerStart$$ && !$timerStop$$ || "object" == typeof $timerStop$$, "Bad timer stop specification"); | |
| var $timerId$jscomp$1$$ = ++this.$timerIdSequence_$; | |
| if ($timerStart$$) { | |
| var $startTracker$$ = $JSCompiler_StaticMethods_getTracker_$$(this, $timerStart$$); | |
| $user$$module$src$log$$().assert($startTracker$$, "Cannot track timer start"); | |
| var $startBuilder$$ = $startTracker$$.add.bind($startTracker$$, $context$jscomp$11$$, $timerStart$$.on, $timerStart$$, this.$handleTimerToggle_$.bind(this, $timerId$jscomp$1$$, $eventType$jscomp$22$$, $listener$jscomp$69$$)) | |
| } | |
| if ($timerStop$$) { | |
| var $stopTracker$$ = $JSCompiler_StaticMethods_getTracker_$$(this, $timerStop$$); | |
| $user$$module$src$log$$().assert($stopTracker$$, "Cannot track timer stop"); | |
| var $stopBuilder$$ = $stopTracker$$.add.bind($stopTracker$$, | |
| $context$jscomp$11$$, $timerStop$$.on, $timerStop$$, this.$handleTimerToggle_$.bind(this, $timerId$jscomp$1$$, $eventType$jscomp$22$$, $listener$jscomp$69$$)) | |
| } | |
| var $timerHandler$$ = new $TimerEventHandler$$module$extensions$amp_analytics$0_1$events$$($config$jscomp$21_timerSpec$jscomp$1$$, $startBuilder$$, $stopBuilder$$); | |
| this.$trackers_$[$timerId$jscomp$1$$] = $timerHandler$$; | |
| $timerHandler$$.init(this.$startTimer_$.bind(this, $timerId$jscomp$1$$, $eventType$jscomp$22$$, $listener$jscomp$69$$)); | |
| return function() { | |
| $$jscomp$this$jscomp$126$$.$removeTracker_$($timerId$jscomp$1$$) | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_getTracker_$$($JSCompiler_StaticMethods_getTracker_$self$$, $config$jscomp$22_eventType$jscomp$23$$) { | |
| $config$jscomp$22_eventType$jscomp$23$$ = $user$$module$src$log$$().assertString($config$jscomp$22_eventType$jscomp$23$$.on); | |
| var $trackerKey$$ = $getTrackerKeyName$$module$extensions$amp_analytics$0_1$events$$($config$jscomp$22_eventType$jscomp$23$$); | |
| return $JSCompiler_StaticMethods_getTracker_$self$$.root.getTrackerForWhitelist($trackerKey$$, $getTrackerTypesForParentType$$module$extensions$amp_analytics$0_1$events$$("timer")) | |
| } | |
| $JSCompiler_prototypeAlias$$.$handleTimerToggle_$ = function($timerId$jscomp$2$$, $eventType$jscomp$24$$, $listener$jscomp$70$$) { | |
| var $timerHandler$jscomp$1$$ = this.$trackers_$[$timerId$jscomp$2$$]; | |
| $timerHandler$jscomp$1$$ && ($timerHandler$jscomp$1$$.isRunning() ? this.$stopTimer_$($timerId$jscomp$2$$) : this.$startTimer_$($timerId$jscomp$2$$, $eventType$jscomp$24$$, $listener$jscomp$70$$)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$startTimer_$ = function($timerId$jscomp$3$$, $eventType$jscomp$25$$, $listener$jscomp$71$$) { | |
| var $$jscomp$this$jscomp$127$$ = this; | |
| this.$trackers_$[$timerId$jscomp$3$$].startIntervalInWindow(this.root.ampdoc.win, function() { | |
| var $JSCompiler_inline_result$jscomp$298$$ = new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($$jscomp$this$jscomp$127$$.root.getRootElement(), $eventType$jscomp$25$$, $$jscomp$this$jscomp$127$$.$trackers_$[$timerId$jscomp$3$$].getTimerVars()); | |
| $listener$jscomp$71$$($JSCompiler_inline_result$jscomp$298$$) | |
| }, this.$removeTracker_$.bind(this, $timerId$jscomp$3$$)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$stopTimer_$ = function($timerId$jscomp$4$$) { | |
| this.$trackers_$[$timerId$jscomp$4$$].$stopTimer_$(this.root.ampdoc.win) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$removeTracker_$ = function($timerId$jscomp$6$$) { | |
| this.$trackers_$[$timerId$jscomp$6$$] && (this.$stopTimer_$($timerId$jscomp$6$$), this.$trackers_$[$timerId$jscomp$6$$].dispose(), delete this.$trackers_$[$timerId$jscomp$6$$]) | |
| }; | |
| function $VideoEventTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$23$$) { | |
| this.root = $root$jscomp$23$$; | |
| var $$jscomp$this$jscomp$128$$ = this; | |
| this.$sessionObservable_$ = new $Observable$$module$src$observable$$; | |
| this.$boundOnSession_$ = function($root$jscomp$23$$) { | |
| $$jscomp$this$jscomp$128$$.$sessionObservable_$.fire($root$jscomp$23$$) | |
| }; | |
| Object.keys($VideoAnalyticsEvents$$module$src$video_interface$$).forEach(function($root$jscomp$23$$) { | |
| $$jscomp$this$jscomp$128$$.root.getRoot().addEventListener($VideoAnalyticsEvents$$module$src$video_interface$$[$root$jscomp$23$$], | |
| $$jscomp$this$jscomp$128$$.$boundOnSession_$) | |
| }) | |
| } | |
| $$jscomp$inherits$$($VideoEventTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $VideoEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.dispose = function() { | |
| var $$jscomp$this$jscomp$129$$ = this, | |
| $root$jscomp$24$$ = this.root.getRoot(); | |
| Object.keys($VideoAnalyticsEvents$$module$src$video_interface$$).forEach(function($key$jscomp$62$$) { | |
| $root$jscomp$24$$.removeEventListener($VideoAnalyticsEvents$$module$src$video_interface$$[$key$jscomp$62$$], $$jscomp$this$jscomp$129$$.$boundOnSession_$) | |
| }); | |
| this.$sessionObservable_$ = this.$boundOnSession_$ = null | |
| }; | |
| $VideoEventTracker$$module$extensions$amp_analytics$0_1$events$$.prototype.add = function($context$jscomp$12$$, $eventType$jscomp$27$$, $config$jscomp$23$$, $listener$jscomp$72$$) { | |
| var $videoSpec$$ = $config$jscomp$23$$.videoSpec || {}, $targetReady$jscomp$1$$ = this.root.getElement($context$jscomp$12$$, $config$jscomp$23$$.selector || $videoSpec$$.selector, $config$jscomp$23$$.selectionMethod || null), | |
| $endSessionWhenInvisible$$ = $videoSpec$$["end-session-when-invisible"], | |
| $excludeAutoplay$$ = $videoSpec$$["exclude-autoplay"], | |
| $interval$jscomp$5$$ = $videoSpec$$.interval, | |
| $on$jscomp$8$$ = $config$jscomp$23$$.on, | |
| $intervalCounter$$ = 0; | |
| return this.$sessionObservable_$.add(function($context$jscomp$12$$) { | |
| var $eventType$jscomp$27$$ = $context$jscomp$12$$.type, | |
| $config$jscomp$23$$ = $eventType$jscomp$27$$ === $VideoAnalyticsEvents$$module$src$video_interface$SESSION_VISIBLE$$, | |
| $videoSpec$$ = $config$jscomp$23$$ ? $VideoAnalyticsEvents$$module$src$video_interface$SESSION$$ : $eventType$jscomp$27$$, | |
| $event$jscomp$26$$ = $context$jscomp$12$$.data; | |
| if ($videoSpec$$ === | |
| $on$jscomp$8$$) if ($videoSpec$$ !== $VideoAnalyticsEvents$$module$src$video_interface$SECONDS_PLAYED$$ || $interval$jscomp$5$$) { | |
| if ($videoSpec$$ === $VideoAnalyticsEvents$$module$src$video_interface$SECONDS_PLAYED$$ && ($intervalCounter$$++, 0 !== $intervalCounter$$ % $interval$jscomp$5$$)) return; | |
| if (!$config$jscomp$23$$ || $endSessionWhenInvisible$$) if (!$excludeAutoplay$$ || $event$jscomp$26$$.state !== $PlayingStates$$module$src$video_interface$PLAYING_AUTO$$) { | |
| var $el$jscomp$12$$ = $context$jscomp$12$$.target; | |
| $targetReady$jscomp$1$$.then(function($context$jscomp$12$$) { | |
| $context$jscomp$12$$.contains($el$jscomp$12$$) && | |
| $listener$jscomp$72$$(new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($context$jscomp$12$$, $videoSpec$$, $event$jscomp$26$$)) | |
| }) | |
| } | |
| } else $user$$module$src$log$$().error("analytics-events", "video-seconds-played requires interval spec with non-zero value") | |
| }) | |
| }; | |
| function $VisibilityTracker$$module$extensions$amp_analytics$0_1$events$$($root$jscomp$25$$) { | |
| this.root = $root$jscomp$25$$; | |
| this.$waitForTrackers_$ = {} | |
| } | |
| $$jscomp$inherits$$($VisibilityTracker$$module$extensions$amp_analytics$0_1$events$$, $EventTracker$$module$extensions$amp_analytics$0_1$events$$); | |
| $JSCompiler_prototypeAlias$$ = $VisibilityTracker$$module$extensions$amp_analytics$0_1$events$$.prototype; | |
| $JSCompiler_prototypeAlias$$.dispose = function() {}; | |
| $JSCompiler_prototypeAlias$$.add = function($context$jscomp$13$$, $eventType$jscomp$28$$, $config$jscomp$24$$, $listener$jscomp$73$$) { | |
| var $$jscomp$this$jscomp$130$$ = this, | |
| $visibilitySpec$$ = $config$jscomp$24$$.visibilitySpec || {}, $selector$jscomp$13$$ = $config$jscomp$24$$.selector || $visibilitySpec$$.selector, | |
| $waitForSpec$$ = $visibilitySpec$$.waitFor, | |
| $visibilityManager$$ = this.root.getVisibilityManager(), | |
| $createReadyReportPromiseFunc$$ = null; | |
| "hidden" == $eventType$jscomp$28$$ && ($createReadyReportPromiseFunc$$ = this.$createReportReadyPromise_$.bind(this)); | |
| if (!$selector$jscomp$13$$ || ":root" == $selector$jscomp$13$$ || ":host" == $selector$jscomp$13$$) return $visibilityManager$$.listenRoot($visibilitySpec$$, this.getReadyPromise($waitForSpec$$, $selector$jscomp$13$$), $createReadyReportPromiseFunc$$, this.$onEvent_$.bind(this, $eventType$jscomp$28$$, $listener$jscomp$73$$, this.root.getRootElement())); | |
| var $unlistenPromise$$ = this.root.getAmpElement($context$jscomp$13$$.parentElement || $context$jscomp$13$$, $selector$jscomp$13$$, $config$jscomp$24$$.selectionMethod || | |
| $visibilitySpec$$.selectionMethod).then(function($context$jscomp$13$$) { | |
| return $visibilityManager$$.listenElement($context$jscomp$13$$, $visibilitySpec$$, $$jscomp$this$jscomp$130$$.getReadyPromise($waitForSpec$$, $selector$jscomp$13$$, $context$jscomp$13$$), $createReadyReportPromiseFunc$$, $$jscomp$this$jscomp$130$$.$onEvent_$.bind($$jscomp$this$jscomp$130$$, $eventType$jscomp$28$$, $listener$jscomp$73$$, $context$jscomp$13$$)) | |
| }); | |
| return function() { | |
| $unlistenPromise$$.then(function($context$jscomp$13$$) { | |
| $context$jscomp$13$$() | |
| }) | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.$createReportReadyPromise_$ = function() { | |
| var $viewer$jscomp$6$$ = this.root.getViewer(); | |
| return $viewer$jscomp$6$$.isVisible() ? new Promise(function($resolve$jscomp$42$$) { | |
| $viewer$jscomp$6$$.onVisibilityChanged(function() { | |
| $viewer$jscomp$6$$.isVisible() || $resolve$jscomp$42$$() | |
| }) | |
| }) : Promise.resolve() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getReadyPromise = function($waitForSpec$jscomp$1$$, $selector$jscomp$14$$, $opt_element$jscomp$12$$) { | |
| if (!$waitForSpec$jscomp$1$$) if ($selector$jscomp$14$$) $waitForSpec$jscomp$1$$ = "ini-load"; | |
| else return null; | |
| var $trackerWhitelist$$ = $getTrackerTypesForParentType$$module$extensions$amp_analytics$0_1$events$$("visible"); | |
| $user$$module$src$log$$().assert("none" == $waitForSpec$jscomp$1$$ || void 0 !== $trackerWhitelist$$[$waitForSpec$jscomp$1$$], "waitFor value %s not supported", $waitForSpec$jscomp$1$$); | |
| var $waitForTracker$$ = this.$waitForTrackers_$[$waitForSpec$jscomp$1$$] || this.root.getTrackerForWhitelist($waitForSpec$jscomp$1$$, $trackerWhitelist$$); | |
| if ($waitForTracker$$) this.$waitForTrackers_$[$waitForSpec$jscomp$1$$] = $waitForTracker$$; | |
| else return null; | |
| return $opt_element$jscomp$12$$ ? $waitForTracker$$.getElementSignal($waitForSpec$jscomp$1$$, $opt_element$jscomp$12$$) : $waitForTracker$$.getRootSignal($waitForSpec$jscomp$1$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$onEvent_$ = function($eventType$jscomp$29$$, $listener$jscomp$74$$, $target$jscomp$77$$, $state$jscomp$11$$) { | |
| var $attr$jscomp$7$$ = $getDataParamsFromAttributes$$module$src$dom$$($target$jscomp$77$$), | |
| $key$jscomp$63$$; | |
| for ($key$jscomp$63$$ in $attr$jscomp$7$$) $state$jscomp$11$$[$key$jscomp$63$$] = $attr$jscomp$7$$[$key$jscomp$63$$]; | |
| $listener$jscomp$74$$(new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$77$$, $eventType$jscomp$29$$, $state$jscomp$11$$)) | |
| }; | |
| var $ANALYTICS_CONFIG$$module$extensions$amp_analytics$0_1$vendors$$ = { | |
| "default": { | |
| transport: { | |
| beacon: !0, | |
| xhrpost: !0, | |
| image: !0 | |
| }, | |
| vars: { | |
| accessReaderId: "ACCESS_READER_ID", | |
| adNavTiming: "AD_NAV_TIMING", | |
| adNavType: "AD_NAV_TYPE", | |
| adRedirectCount: "AD_NAV_REDIRECT_COUNT", | |
| ampdocHost: "AMPDOC_HOST", | |
| ampdocHostname: "AMPDOC_HOSTNAME", | |
| ampdocUrl: "AMPDOC_URL", | |
| ampVersion: "AMP_VERSION", | |
| authdata: "AUTHDATA", | |
| availableScreenHeight: "AVAILABLE_SCREEN_HEIGHT", | |
| availableScreenWidth: "AVAILABLE_SCREEN_WIDTH", | |
| backgroundState: "BACKGROUND_STATE", | |
| browserLanguage: "BROWSER_LANGUAGE", | |
| canonicalHost: "CANONICAL_HOST", | |
| canonicalHostname: "CANONICAL_HOSTNAME", | |
| canonicalPath: "CANONICAL_PATH", | |
| canonicalUrl: "CANONICAL_URL", | |
| clientId: "CLIENT_ID", | |
| contentLoadTime: "CONTENT_LOAD_TIME", | |
| counter: "COUNTER", | |
| documentCharset: "DOCUMENT_CHARSET", | |
| documentReferrer: "DOCUMENT_REFERRER", | |
| domainLookupTime: "DOMAIN_LOOKUP_TIME", | |
| domInteractiveTime: "DOM_INTERACTIVE_TIME", | |
| externalReferrer: "EXTERNAL_REFERRER", | |
| navRedirectCount: "NAV_REDIRECT_COUNT", | |
| navTiming: "NAV_TIMING", | |
| navType: "NAV_TYPE", | |
| pageDownloadTime: "PAGE_DOWNLOAD_TIME", | |
| pageLoadTime: "PAGE_LOAD_TIME", | |
| pageViewId: "PAGE_VIEW_ID", | |
| queryParam: "QUERY_PARAM", | |
| random: "RANDOM", | |
| redirectTime: "REDIRECT_TIME", | |
| screenColorDepth: "SCREEN_COLOR_DEPTH", | |
| screenHeight: "SCREEN_HEIGHT", | |
| screenWidth: "SCREEN_WIDTH", | |
| scrollHeight: "SCROLL_HEIGHT", | |
| scrollLeft: "SCROLL_LEFT", | |
| scrollTop: "SCROLL_TOP", | |
| scrollWidth: "SCROLL_WIDTH", | |
| serverResponseTime: "SERVER_RESPONSE_TIME", | |
| sourceUrl: "SOURCE_URL", | |
| sourceHost: "SOURCE_HOST", | |
| sourceHostname: "SOURCE_HOSTNAME", | |
| sourcePath: "SOURCE_PATH", | |
| tcpConnectTime: "TCP_CONNECT_TIME", | |
| timestamp: "TIMESTAMP", | |
| timezone: "TIMEZONE", | |
| title: "TITLE", | |
| totalEngagedTime: "TOTAL_ENGAGED_TIME", | |
| userAgent: "USER_AGENT", | |
| viewer: "VIEWER", | |
| viewportHeight: "VIEWPORT_HEIGHT", | |
| viewportWidth: "VIEWPORT_WIDTH" | |
| } | |
| }, | |
| acquialift: { | |
| vars: { | |
| decisionApiUrl: "us-east-1-decisionapi.lift.acquia.com", | |
| accountId: "xxxxxxxx", | |
| siteId: "xxxxxxxx" | |
| }, | |
| transport: { | |
| beacon: !0, | |
| xhrpost: !0, | |
| image: !1 | |
| }, | |
| requests: { | |
| base: "https://${decisionApiUrl}/capture?account_id=${accountId}&site_id=${siteId}", | |
| basicCapture: "${base}&ident=${clientId(tc_ptid)}&identsrc=amp&es=Amp&url=${canonicalUrl}&rurl=${documentReferrer}&cttl=${title}", | |
| pageview: "${basicCapture}&en=Content View", | |
| click: "${basicCapture}&en=Click-Through" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| afsanalytics: { | |
| vars: { | |
| server: "www", | |
| websiteid: "xxxxxxxx", | |
| event: "click", | |
| clicklabel: "clicked from AMP page" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| host: "//${server}.afsanalytics.com", | |
| base: "${host}/cgi_bin/", | |
| pageview: "${base}connect.cgi?usr=${websiteid}Pauto&js=1&=1&title=${title}&url=${canonicalUrl}&refer=${documentReferrer}&resolution=${screenWidth}x${screenHeight}&color=${screenColorDepth}&Tips=${random}", | |
| click: "${base}click.cgi?usr=${websiteid}&event=${event}&exit=${clicklabel}" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| alexametrics: { | |
| requests: { | |
| base: "https://${ampAtrkHost}/atrk.gif?account=${atrk_acct}&domain=${domain}", | |
| pageview: "${base}&jsv=amp-${ampVersion}&frame_height=${viewportHeight}&frame_width=${viewportWidth}&title=${title}&time=${timestamp}&time_zone_offset=${timezone}&screen_params=${screenWidth}x${screenHeight}x${screenColorDepth}&ref_url=${documentReferrer}&host_url=${sourceUrl}&random_number=${random}&user_cookie=${clientId(__auc)}&user_cookie_flag=0&user_lang=${browserLanguage}&_doc_url=${ampdocUrl}" | |
| }, | |
| vars: { | |
| atrk_acct: "", | |
| domain: "", | |
| ampAtrkHost: "certify-amp.alexametrics.com" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| xhrpost: !1, | |
| beacon: !1, | |
| image: !0 | |
| } | |
| }, | |
| atinternet: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| base: "https://${log}${domain}/hit.xiti?s=${site}&ts=${timestamp}&r=${screenWidth}x${screenHeight}x${screenColorDepth}&re=${availableScreenWidth}x${availableScreenHeight}", | |
| suffix: "&medium=amp&${extraUrlParams}&ref=${documentReferrer}", | |
| pageview: "${base}&p=${title}&s2=${level2}${suffix}", | |
| click: "${base}&pclick=${title}&s2click=${level2}&p=${label}&s2=${level2Click}&type=click&click=${type}${suffix}" | |
| } | |
| }, | |
| baiduanalytics: { | |
| requests: { | |
| host: "https://hm.baidu.com", | |
| base: "${host}/hm.gif?si=${token}&nv=0&st=4&v=pixel-1.0&rnd=${timestamp}", | |
| pageview: "${base}&et=0", | |
| event: "${base}&ep=${category}*${action}*${label}*${value}&et=4&api=8_0" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| bg: { | |
| transport: { | |
| iframe: "https://tpc.googlesyndication.com/b4a/b4a-runner.html" | |
| } | |
| }, | |
| burt: { | |
| vars: { | |
| trackingKey: "ignore", | |
| category: "", | |
| subCategory: "" | |
| }, | |
| requests: { | |
| host: "//${trackingKey}.c.richmetrics.com/", | |
| base: "${host}imglog?e=${trackingKey}&pi=${trackingKey}|${pageViewId}|${canonicalPath}|${clientId(burt-amp-user-id)}&ui=${clientId(burt-amp-user-id)}&v=amp&ts=${timestamp}&sn=${requestCount}&", | |
| pageview: "${base}type=page&ca=${category}&sc=${subCategory}&ln=${browserLanguage}&lr=${documentReferrer}&eu=${sourceUrl}&tz=${timezone}&pd=${scrollWidth}x${scrollHeight}&sd=${screenWidth}x${screenHeight}&wd=${availableScreenWidth}x${availableScreenHeight}&ws=${scrollLeft}x${scrollTop}", | |
| pageping: "${base}type=pageping" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| }, | |
| pageping: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 15, | |
| maxTimerLength: 1200 | |
| }, | |
| request: "pageping" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| chartbeat: { | |
| requests: { | |
| host: "https://ping.chartbeat.net", | |
| basePrefix: "/ping?h=${domain}&p=${canonicalPath}&u=${clientId(_cb)}&d=${canonicalHost}&g=${uid}&g0=${sections}&g1=${authors}&g2=${zone}&g3=${sponsorName}&g4=${contentType}&c=120&x=${scrollTop}&y=${scrollHeight}&j=${decayTime}&R=1&W=0&I=0&E=${totalEngagedTime}&r=${documentReferrer}&t=${pageViewId}${clientId(_cb)}&b=${pageLoadTime}&i=${title}&T=${timestamp}&tz=${timezone}&C=2", | |
| baseSuffix: "&_", | |
| interval: "${host}${basePrefix}${baseSuffix}", | |
| anchorClick: "${host}${basePrefix}${baseSuffix}" | |
| }, | |
| triggers: { | |
| trackInterval: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 15, | |
| maxTimerLength: 7200 | |
| }, | |
| request: "interval", | |
| vars: { | |
| decayTime: 30 | |
| } | |
| }, | |
| trackAnchorClick: { | |
| on: "click", | |
| selector: "a", | |
| request: "anchorClick", | |
| vars: { | |
| decayTime: 30 | |
| } | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| clicky: { | |
| vars: { | |
| site_id: "" | |
| }, | |
| requests: { | |
| base: "https://in.getclicky.com/in.php?site_id=${site_id}", | |
| baseSuffix: "&mime=${contentType}&x=${random}", | |
| pageview: "${base}&res=${screenWidth}x${screenHeight}&lang=${browserLanguage}&secure=1&type=pageview&href=${canonicalPath}&title=${title}${baseSuffix}", | |
| interval: "${base}&type=ping${baseSuffix}" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| }, | |
| interval: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 60, | |
| maxTimerLength: 600 | |
| }, | |
| request: "interval" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| colanalytics: { | |
| requests: { | |
| host: "https://ase.clmbtech.com", | |
| base: "${host}/message", | |
| pageview: "${base}?cid=${id}&val_101=${id}&val_101=${canonicalPath}&ch=${canonicalHost}&uuid=${uid}&au=${authors}&zo=${zone}&sn=${sponsorName}&ct=${contentType}&st=${scrollTop}&sh=${scrollHeight}&dct=${decayTime}&tet=${totalEngagedTime}&dr=${documentReferrer}&plt=${pageLoadTime}&val_108=${title}&val_120=3" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| comscore: { | |
| vars: { | |
| c2: "1000001" | |
| }, | |
| requests: { | |
| host: "https://sb.scorecardresearch.com", | |
| base: "${host}/b?", | |
| pageview: "${base}c1=2&c2=${c2}&cs_pv=${pageViewId}&c12=${clientId(comScore)}&rn=${random}&c8=${title}&c7=${canonicalUrl}&c9=${documentReferrer}&cs_c7amp=${ampdocUrl}" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| cxense: { | |
| requests: { | |
| host: "https://scomcluster.cxense.com", | |
| base: "${host}/Repo/rep.gif", | |
| pageview: "${base}?ver=1&typ=pgv&sid=${siteId}&ckp=${clientId(cX_P)}&loc=${sourceUrl}&rnd=${random}&ref=${documentReferrer}<m=${timestamp}&wsz=${screenWidth}x${screenHeight}&bln=${browserLanguage}&chs=${documentCharset}&col=${screenColorDepth}&tzo=${timezone}&cp_cx_channel=amp" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| dynatrace: { | |
| requests: { | |
| endpoint: "${protocol}://${tenant}${separator}${environment}:${port}/ampbf/${tenantpath}", | |
| pageview: "${endpoint}?type=js&flavor=amp&v=1&a=1%7C1%7C_load_%7C_load_%7C-%7C${navTiming(navigationStart)}%7C${navTiming(domContentLoadedEventEnd)}%7C0%2C2%7C2%7C_onload_%7C_load_%7C-%7C${navTiming(domContentLoadedEventStart)}%7C${navTiming(domContentLoadedEventEnd)}%7C0&fId=${pageViewId}&vID=${clientId(rxVisitor)}&referer=${sourceUrl}&title=${title}&sw=${screenWidth}&sh=${screenHeight}&w=${viewportWidth}&h=${viewportHeight}&nt=a${navType}b${navTiming(navigationStart)}c${navTiming(navigationStart,redirectStart)}d${navTiming(navigationStart,redirectEnd)}e${navTiming(navigationStart,fetchStart)}f${navTiming(navigationStart,domainLookupStart)}g${navTiming(navigationStart,domainLookupEnd)}h${navTiming(navigationStart,connectStart)}i${navTiming(navigationStart,connectEnd)}j${navTiming(navigationStart,secureConnectionStart)}k${navTiming(navigationStart,requestStart)}l${navTiming(navigationStart,responseStart)}m${navTiming(navigationStart,responseEnd)}n${navTiming(navigationStart,domLoading)}o${navTiming(navigationStart,domInteractive)}p${navTiming(navigationStart,domContentLoadedEventStart)}q${navTiming(navigationStart,domContentLoadedEventEnd)}r${navTiming(navigationStart,domComplete)}s${navTiming(navigationStart,loadEventStart)}t${navTiming(navigationStart,loadEventEnd)}&app=${app}&time=${timestamp}" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| vars: { | |
| app: "ampapp", | |
| protocol: "https", | |
| tenant: "", | |
| environment: "live.dynatrace.com", | |
| port: "443", | |
| separator: "." | |
| } | |
| }, | |
| euleriananalytics: { | |
| vars: { | |
| analyticsHost: "", | |
| documentLocation: "SOURCE_URL" | |
| }, | |
| requests: { | |
| base: "https://${analyticsHost}", | |
| basePrefix: "-/${random}?euid-amp=${clientId(etuix)}&url=${documentLocation}&", | |
| pageview: "${base}/col2/${basePrefix}rf=${documentReferrer}&sd=${screenWidth}x${screenHeight}&sd=${screenColorDepth}&elg=${browserLanguage}", | |
| action: "${base}/action/${basePrefix}eact=${actionCode}&actr=${actionRef}", | |
| user: "${base}/uparam/${basePrefix}euk${userParamKey}=${userParamVal}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| facebookpixel: { | |
| vars: { | |
| pixelId: "PIXEL-ID" | |
| }, | |
| requests: { | |
| host: "https://www.facebook.com", | |
| base: "${host}/tr?noscript=1", | |
| pageview: "${base}&ev=PageView&id=${pixelId}", | |
| event: "${base}&ev=${eventName}&id=${pixelId}&cd[content_name]=${content_name}", | |
| eventViewContent: "${base}&ev=ViewContent&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}", | |
| eventSearch: "${base}&ev=Search&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}&cd[search_string]=${search_string}", | |
| eventAddToCart: "${base}&ev=AddToCart&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}", | |
| eventAddToWishlist: "${base}&ev=AddToWishlist&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}", | |
| eventInitiateCheckout: "${base}&ev=InitiateCheckout&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}&cd[num_items]=${num_items}&cd[content_ids]=${content_ids}", | |
| eventAddPaymentInfo: "${base}&ev=AddPaymentInfo&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_category]=${content_category}&cd[content_ids]=${content_ids}", | |
| eventPurchase: "${base}&ev=Purchase&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_type]=${content_type}&cd[content_ids]=${content_ids}&cd[num_items]=${num_items}", | |
| eventLead: "${base}&ev=Lead&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[content_category]=${content_category}", | |
| eventCompleteRegistration: "${base}&ev=CompleteRegistration&id=${pixelId}&cd[value]=${value}&cd[currency]=${currency}&cd[content_name]=${content_name}&cd[status]=${status}" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| gemius: { | |
| requests: { | |
| base: "https://${prefix}.hit.gemius.pl/_${timestamp}/redot.gif?l=91&id=${identifier}&screen=${screenWidth}x${screenHeight}&window=${viewportWidth}x${viewportHeight}&fr=1&href=${sourceUrl}&ref=${documentReferrer}&extra=gemamp%3D1%7Campid%3D${clientId(gemius)}%7C${extraparams}", | |
| pageview: "${base}&et=view&hsrc=1", | |
| event: "${base}&et=action&hsrc=3" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| googleadwords: { | |
| requests: { | |
| conversion_prefix: "https://www.googleadservices.com/pagead/conversion/", | |
| remarketing_prefix: "https://googleads.g.doubleclick.net/pagead/viewthroughconversion/", | |
| common_params: "${googleConversionId}/?cv=amp2&label=${googleConversionLabel}&random=${random}&url=${sourceUrl}&ref=${documentReferrer}&fst=${pageViewId}&num=${counter(googleadwords)}&fmt=3&async=1&u_h=${screenHeight}&u_w=${screenWidth}&u_ah=${availableScreenHeight}&u_aw=${availableScreenWidth}&u_cd=${screenColorDepth}&u_tz=${timezone}&tiba=${title}&guid=ON&script=0", | |
| conversion_params: "value=${googleConversionValue}¤cy_code=${googleConversionCurrency}&bg=${googleConversionColor}&hl=${googleConversionLanguage}", | |
| conversion: "${conversion_prefix}${common_params}&${conversion_params}", | |
| remarketing: "${remarketing_prefix}${common_params}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| googleanalytics: { | |
| vars: { | |
| eventValue: "0", | |
| documentLocation: "SOURCE_URL", | |
| clientId: "CLIENT_ID(AMP_ECID_GOOGLE,,_ga)", | |
| dataSource: "AMP", | |
| anonymizeIP: "aip", | |
| errorParam: "${errorName}-${errorMessage}" | |
| }, | |
| requests: { | |
| host: "https://www.google-analytics.com", | |
| basePrefix: "v=1&_v=a1&ds=${dataSource}&${anonymizeIP}&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=${clientId}&tid=${account}&dl=${documentLocation}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}", | |
| baseSuffix: "&a=${pageViewId}&z=${random}", | |
| pageview: "${host}/r/collect?${basePrefix}&t=pageview&jid=${random}&_r=1${baseSuffix}", | |
| event: "${host}/collect?${basePrefix}&t=event&jid=&ec=${eventCategory}&ea=${eventAction}&el=${eventLabel}&ev=${eventValue}${baseSuffix}", | |
| social: "${host}/collect?${basePrefix}&t=social&jid=&sa=${socialAction}&sn=${socialNetwork}&st=${socialTarget}${baseSuffix}", | |
| timing: "${host}/collect?${basePrefix}&t=${timingRequestType}&jid=&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}${baseSuffix}", | |
| error: "${host}/collect?${basePrefix}&t=exception&exd=${errorParam}${baseSuffix}" | |
| }, | |
| triggers: { | |
| performanceTiming: { | |
| on: "visible", | |
| request: "timing", | |
| sampleSpec: { | |
| sampleOn: "${clientId}", | |
| threshold: 1 | |
| }, | |
| vars: { | |
| timingRequestType: "timing" | |
| } | |
| }, | |
| adwordsTiming: { | |
| on: "visible", | |
| request: "timing", | |
| enabled: "${queryParam(gclid)}", | |
| vars: { | |
| timingRequestType: "adtiming" | |
| } | |
| } | |
| }, | |
| extraUrlParamsReplaceMap: { | |
| dimension: "cd", | |
| metric: "cm" | |
| }, | |
| optout: "_gaUserPrefs.ioo" | |
| }, | |
| "googleanalytics-alpha": { | |
| vars: { | |
| eventValue: "0", | |
| documentLocation: "SOURCE_URL", | |
| clientId: "CLIENT_ID(AMP_ECID_GOOGLE,,_ga)", | |
| dataSource: "AMP", | |
| anonymizeIP: "aip", | |
| errorParam: "${errorName}-${errorMessage}" | |
| }, | |
| requests: { | |
| host: "https://www.google-analytics.com", | |
| basePrefix: "v=1&_v=a1&ds=${dataSource}&${anonymizeIP}&_s=${requestCount}&dt=${title}&sr=${screenWidth}x${screenHeight}&_utmht=${timestamp}&cid=${clientId}&tid=${account}&dl=${documentLocation}&dr=${externalReferrer}&sd=${screenColorDepth}&ul=${browserLanguage}&de=${documentCharset}", | |
| baseSuffix: "&a=${pageViewId}&z=${random}", | |
| pageview: "${host}/r/collect?${basePrefix}&t=pageview&jid=${random}&_r=1${baseSuffix}", | |
| event: "${host}/collect?${basePrefix}&t=event&jid=&ec=${eventCategory}&ea=${eventAction}&el=${eventLabel}&ev=${eventValue}${baseSuffix}", | |
| social: "${host}/collect?${basePrefix}&t=social&jid=&sa=${socialAction}&sn=${socialNetwork}&st=${socialTarget}${baseSuffix}", | |
| timing: "${host}/collect?${basePrefix}&t=${timingRequestType}&jid=&plt=${pageLoadTime}&dns=${domainLookupTime}&tcp=${tcpConnectTime}&rrt=${redirectTime}&srt=${serverResponseTime}&pdt=${pageDownloadTime}&clt=${contentLoadTime}&dit=${domInteractiveTime}${baseSuffix}", | |
| error: "${host}/collect?${basePrefix}&t=exception&exd=${errorParam}${baseSuffix}" | |
| }, | |
| triggers: { | |
| performanceTiming: { | |
| on: "visible", | |
| request: "timing", | |
| sampleSpec: { | |
| sampleOn: "${clientId}", | |
| threshold: 1 | |
| }, | |
| vars: { | |
| timingRequestType: "timing" | |
| } | |
| }, | |
| adwordsTiming: { | |
| on: "visible", | |
| request: "timing", | |
| enabled: "${queryParam(gclid)}", | |
| vars: { | |
| timingRequestType: "adtiming" | |
| } | |
| } | |
| }, | |
| extraUrlParamsReplaceMap: { | |
| dimension: "cd", | |
| metric: "cm" | |
| }, | |
| optout: "_gaUserPrefs.ioo" | |
| }, | |
| krux: { | |
| requests: { | |
| beaconHost: "https://beacon.krxd.net", | |
| timing: "t_navigation_type=0&t_dns=${domainLookupTime}&t_tcp=${tcpConnectTime}&t_http_request=${serverResponseTime}&t_http_response=${pageDownloadTime}&t_content_ready=${contentLoadTime}&t_window_load=${pageLoadTime}&t_redirect=${redirectTime}", | |
| common: "source=amp&confid=${confid}&_kpid=${pubid}&_kcp_s=${site}&_kcp_sc=${section}&_kcp_ssc=${subsection}&_kcp_d=${canonicalHost}&_kpref_=${documentReferrer}&_kua_kx_amp_client_id=${clientId(_kuid_)}&_kua_kx_lang=${browserLanguage}&_kua_kx_tech_browser_language=${browserLanguage}&_kua_kx_tz=${timezone}", | |
| pageview: "${beaconHost}/pixel.gif?${common}&${timing}", | |
| event: "${beaconHost}/event.gif?${common}&${timing}&pageview=false" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| extraUrlParamsReplaceMap: { | |
| "user.": "_kua_", | |
| "page.": "_kpa_" | |
| } | |
| }, | |
| lotame: { | |
| requests: { | |
| pageview: "https://bcp.crwdcntrl.net/amp?c=${account}&pv=y" | |
| }, | |
| triggers: { | |
| "track pageview": { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| mediametrie: { | |
| requests: { | |
| host: "https://prof.estat.com/m/web", | |
| pageview: "${host}/${serial}?c=${level1}&dom=${ampdocUrl}&enc=${documentCharset}&l3=${level3}&l4=${level4}&n=${random}&p=${level2}&r=${documentReferrer}&sch=${screenHeight}&scw=${screenWidth}&tn=amp&v=1&vh=${availableScreenHeight}&vw=${availableScreenWidth}" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| mediarithmics: { | |
| vars: { | |
| domain: "events.mediarithmics.com", | |
| url: "SOURCE_URL", | |
| event_name: "$page_view", | |
| referrer: "DOCUMENT_REFERRER" | |
| }, | |
| requests: { | |
| host: "https://${domain}", | |
| pageview: "${host}/v1/visits/pixel?$site_token=${site_token}&$url=${url}&$ev=${event_name}&$referrer=${referrer}" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| mediator: { | |
| requests: { | |
| host: "//collector.mediator.media/amp/?", | |
| prefix: "${host}cid=${mediator_id}&url=${canonicalUrl}&ref=${documentReferrer}&p=4&", | |
| suffix: "vh=${viewportHeight}&sh=${scrollHeight}&st=${scrollTop}", | |
| pageview: "${prefix}e=v", | |
| timer: "${prefix}e=t&${suffix}", | |
| s0: "${prefix}e=s0", | |
| s1: "${prefix}e=s1", | |
| s2: "${prefix}e=s2", | |
| s3: "${prefix}e=s3" | |
| }, | |
| vars: { | |
| mediator_id: "" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| }, | |
| scrollPing0: { | |
| on: "scroll", | |
| scrollSpec: { | |
| verticalBoundaries: [5] | |
| }, | |
| request: "s0" | |
| }, | |
| scrollPing1: { | |
| on: "scroll", | |
| scrollSpec: { | |
| verticalBoundaries: [35] | |
| }, | |
| request: "s1" | |
| }, | |
| scrollPing2: { | |
| on: "scroll", | |
| scrollSpec: { | |
| verticalBoundaries: [65] | |
| }, | |
| request: "s2" | |
| }, | |
| scrollPing3: { | |
| on: "scroll", | |
| scrollSpec: { | |
| verticalBoundaries: [95] | |
| }, | |
| request: "s3" | |
| }, | |
| pageTimer: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 5, | |
| maxTimerLength: 600, | |
| immediate: !1 | |
| }, | |
| request: "timer" | |
| } | |
| } | |
| }, | |
| metrika: { | |
| transport: { | |
| beacon: !0, | |
| xhrpost: !0, | |
| image: !1 | |
| }, | |
| requests: { | |
| pageview: "${_watch}?browser-info=${_brInfo}&${_siteInfo}&${_suffix}", | |
| notBounce: "${_watch}?browser-info=ar%3A1%3Anb%3A1%3A${_brInfo}&${_suffix}", | |
| externalLink: "${_watch}?browser-info=ln%3A1%3A${_brInfo}&${_suffix}", | |
| reachGoal: "${_watch}?browser-info=ar%3A1%3A${_brInfo}&${_siteInfo}&${_goalSuffix}", | |
| _domain: "https://mc.yandex.ru", | |
| _watch: "${_domain}/watch/${counterId}", | |
| _suffix: "page-url=${sourceUrl}&page-ref=${documentReferrer}", | |
| _goalSuffix: "page-url=goal%3A%2F%2F${sourceHost}%2F${goalId}&page-ref=${sourceUrl}", | |
| _techInfo: "amp%3A1%3Az%3A${timezone}%3Ai%3A${timestamp}%3Arn%3A${random}%3Ala%3A${browserLanguage}%3Aen%3A${documentCharset}%3Arqn%3A${requestCount}%3As%3A${screenWidth}x${screenHeight}x${screenColorDepth}%3Aw%3A${availableScreenWidth}x${availableScreenHeight}%3Ads%3A${_timings}%3Auid%3A${clientId(_ym_uid)}%3Apvid%3A${pageViewId}", | |
| _timings: "${domainLookupTime}%2C${tcpConnectTime}%2C${serverResponseTime}%2C${pageDownloadTime}%2C${redirectTime}%2C${navTiming(redirectStart,redirectEnd)}%2C${navRedirectCount}%2C${navTiming(domLoading,domInteractive)}%2C${navTiming(domContentLoadedEventStart,domContentLoadedEventEnd)}%2C${navTiming(navigationStart,domComplete)}%2C${pageLoadTime}%2C${navTiming(loadEventStart,loadEventEnd)}%2C${contentLoadTime}", | |
| _brInfo: "${_techInfo}%3A${_title}", | |
| _title: "t%3A${title}", | |
| _siteInfo: "site-info=${yaParams}" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| mparticle: { | |
| vars: { | |
| eventType: "Unknown", | |
| debug: !1, | |
| amp_clientId: "CLIENT_ID(mparticle_amp_id)" | |
| }, | |
| requests: { | |
| host: "https://pixels.mparticle.com", | |
| endpointPath: "/v1/${apiKey}/Pixel", | |
| baseParams: "et=${eventType}&_id=${amp_clientId}&attrs_k=${eventAttributes_Keys}&attrs_v=${eventAttributes_Values}&ua_k=${userAttributes_Keys}&ua_v=${userAttributes_Values}&ui_t=${userIdentities_Types}&ui_v=${userIdentities_Values}&flags_k=${customFlags_Keys}&flags_v=${customFlags_Values}&ct=${timestamp}&dbg=${debug}&lc=${location}&av=${appVersion}", | |
| pageview: "${host}${endpointPath}?dt=ScreenView&n=${canonicalPath}&hn=${ampdocUrl}&ttl=${title}&${baseParams}", | |
| event: "${host}${endpointPath}?dt=AppEvent&n=${eventName}&${baseParams}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| newrelic: { | |
| requests: { | |
| pageview: "https://${beacon}/amp?appId=${appId}&licenseKey=${licenseKey}&Url=${ampdocUrl}&canonicalUrl=${canonicalUrl}&timeToDomContentLoadedEventEnd=${navTiming(domContentLoadedEventEnd)}&timeToDomInteractive=${navTiming(domInteractive)}&timeToDomComplete=${navTiming(domComplete)}&timeToDomLoading=${navTiming(domLoading)}&timeToResponseStart=${navTiming(responseStart)}&timeToResponseEnd=${navTiming(responseEnd)}&timeToLoadEventStart=${navTiming(loadEventStart)}&timeToLoadEventEnd=${navTiming(loadEventEnd)}&timeToConnectStart=${navTiming(connectStart)}&timeToConnectEnd=${navTiming(connectEnd)}&timeToFetchStart=${navTiming(fetchStart)}&timeToRequestStart=${navTiming(requestStart)}&timeToUnloadEventStart=${navTiming(unloadEventStart)}&timeToUnloadEventEnd=${navTiming(unloadEventEnd)}&timeToDomainLookupStart=${navTiming(domainLookupStart)}&timeToDomainLookupEnd=${navTiming(domainLookupEnd)}&timeToRedirectStart=${navTiming(redirectStart)}&timeToRedirectEnd=${navTiming(redirectEnd)}&timeToSecureConnection=${navTiming(secureConnectionStart)}×tamp=${timestamp}&Version=${ampVersion}&pageLoadTime=${pageLoadTime}" | |
| }, | |
| vars: { | |
| beacon: "bam.nr-data.net", | |
| appId: [], | |
| licenseKey: "" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "ini-load", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| nielsen: { | |
| vars: { | |
| sessionId: "CLIENT_ID(imrworldwide)" | |
| }, | |
| requests: { | |
| session: "https://uaid-linkage.imrworldwide.com/cgi-bin/gn?prd=session&c13=asid,P${apid}&sessionId=${sessionId}&pingtype=4&enc=false&c61=createtm,${timestamp}&rnd=${random}", | |
| cloudapi: "https://cloudapi.imrworldwide.com/nmapi/v2/${apid}/${sessionId}/a?b=%7B%22devInfo%22%3A%7B%22devId%22%3A%22${sessionId}%22%2C%22apn%22%3A%22${apn}%22%2C%22apv%22%3A%22${apv}%22%2C%22apid%22%3A%22${apid}%22%7D%2C%22metadata%22%3A%7B%22static%22%3A%7B%22type%22%3A%22static%22%2C%22section%22%3A%22${section}%22%2C%22assetid%22%3A%22${pageViewId}%22%2C%22segA%22%3A%22${segA}%22%2C%22segB%22%3A%22${segB}%22%2C%22segC%22%3A%22${segC}%22%2C%22adModel%22%3A%220%22%2C%22dataSrc%22%3A%22cms%22%7D%2C%22content%22%3A%7B%7D%2C%22ad%22%3A%7B%7D%7D%2C%22event%22%3A%22playhead%22%2C%22position%22%3A%22${timestamp}%22%2C%22data%22%3A%7B%22hidden%22%3A%22${backgroundState}%22%2C%22blur%22%3A%22${backgroundState}%22%2C%22position%22%3A%22${timestamp}%22%7D%2C%22type%22%3A%22static%22%2C%22utc%22%3A%22${timestamp}%22%2C%22index%22%3A%22${requestCount}%22%7D" | |
| }, | |
| triggers: { | |
| visible: { | |
| on: "visible", | |
| request: ["session", "cloudapi"] | |
| }, | |
| hidden: { | |
| on: "hidden", | |
| request: "cloudapi" | |
| }, | |
| duration: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 10, | |
| maxTimerLength: 86400, | |
| immediate: !1 | |
| }, | |
| request: "cloudapi" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| "nielsen-marketing-cloud": { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| vars: { | |
| pubId: "", | |
| siteId: "" | |
| }, | |
| requests: { | |
| host: "loadeu.exelator.com", | |
| pathPrefix: "load/", | |
| trackurl: "https://${host}/${pathPrefix}?p=${pubId}&g=${siteId}&j=0" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "trackurl" | |
| } | |
| } | |
| }, | |
| oewadirect: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| pageview: "https://${s}.oewabox.at/j0=,,,r=${canonicalUrl};+,amp=1+cp=${cp}+ssl=1+hn=${canonicalHost};;;?lt=${pageViewId}&x=${screenWidth}x${screenHeight}x24&c=CLIENT_ID(oewa)" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| oewa: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| pageview: "${url}?s=${s}&=1&cp=${cp}&host=${canonicalHost}&path=${canonicalPath}" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| parsely: { | |
| requests: { | |
| host: "https://srv.pixel.parsely.com", | |
| basePrefix: "${host}/plogger/?rand=${timestamp}&idsite=${apikey}&url=${ampdocUrl}&urlref=${documentReferrer}&screen=${screenWidth}x${screenHeight}%7C${availableScreenWidth}x${availableScreenHeight}%7C${screenColorDepth}&title=${title}&date=${timestamp}&id=${clientId(_parsely_visitor)}", | |
| pageview: "${basePrefix}&action=pageview" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| piano: { | |
| requests: { | |
| host: "https://api-v3.tinypass.com", | |
| basePrefix: "/api/v3", | |
| baseSuffix: "&pageview_id=${pageViewId}&rand=${random}&_client_id=${clientId}&aid=${aid}", | |
| pageview: "${host}${basePrefix}/page/track?url=${canonicalUrl}&referer=${documentReferrer}&content_created=${contentCreated}&content_author=${contentAuthor}&content_section=${contentSection}&timezone_offset=${timezone}&tags=${tags}&_url=${ampdocUrl}&screen=${screenWidth}x${screenHeight}${baseSuffix}" | |
| } | |
| }, | |
| quantcast: { | |
| vars: { | |
| labels: "" | |
| }, | |
| requests: { | |
| host: "https://pixel.quantserve.com/pixel", | |
| pageview: "${host};r=${random};a=${pcode};labels=${labels};fpan=;fpa=${clientId(__qca)};ns=0;ce=1;cm=;je=0;sr=${screenWidth}x${screenHeight}x${screenColorDepth};enc=n;et=${timestamp};ref=${documentReferrer};url=${canonicalUrl}" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| adobeanalytics: { | |
| transport: { | |
| xhrpost: !1, | |
| beacon: !1, | |
| image: !0 | |
| }, | |
| vars: { | |
| pageName: "TITLE", | |
| host: "", | |
| reportSuites: "", | |
| linkType: "o", | |
| linkUrl: "", | |
| linkName: "" | |
| }, | |
| requests: { | |
| requestPath: "/b/ss/${reportSuites}/0/amp-1.0/s${random}", | |
| basePrefix: "vid=z${clientId(adobe_amp_id)}&ndh=0&ce=${documentCharset}&pageName=${pageName}&g=${ampdocUrl}&r=${documentReferrer}&bh=${availableScreenHeight}&bw=${availableScreenWidth}&c=${screenColorDepth}&j=amp&s=${screenWidth}x${screenHeight}", | |
| pageview: "https://${host}${requestPath}?${basePrefix}", | |
| click: "https://${host}${requestPath}?${basePrefix}&pe=lnk_${linkType}&pev1=${linkUrl}&pev2=${linkName}" | |
| } | |
| }, | |
| adobeanalytics_nativeConfig: { | |
| triggers: { | |
| pageLoad: { | |
| on: "visible", | |
| request: "iframeMessage" | |
| } | |
| } | |
| }, | |
| infonline: { | |
| vars: { | |
| sv: "ke", | |
| ap: "1" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| pageview: "${url}?st=${st}&sv=${sv}&ap=${ap}&co=${co}&cp=${cp}&host=${canonicalHost}&path=${canonicalPath}" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| simplereach: { | |
| vars: { | |
| pid: "", | |
| published_at: "", | |
| authors: [], | |
| channels: [], | |
| tags: [] | |
| }, | |
| requests: { | |
| host: "https://edge.simplereach.com", | |
| baseParams: "amp=true&pid=${pid}&title=${title}&url=${canonicalUrl}&date=${published_at}&authors=${authors}&channels=${categories}&tags=${tags}&referrer=${documentReferrer}&page_url=${sourceUrl}&user_id=${clientId(sr_amp_id)}&domain=${canonicalHost}&article_id=${article_id}&ignore_metadata=${ignore_metadata}", | |
| visible: "${host}/n?${baseParams}", | |
| timer: "${host}/t?${baseParams}&t=5000&e=5000" | |
| }, | |
| triggers: { | |
| visible: { | |
| on: "visible", | |
| request: "visible" | |
| }, | |
| timer: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 5, | |
| maxTimerLength: 1200 | |
| }, | |
| request: "timer" | |
| } | |
| } | |
| }, | |
| segment: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| vars: { | |
| anonymousId: "CLIENT_ID(segment_amp_id)" | |
| }, | |
| requests: { | |
| host: "https://api.segment.io/v1/pixel", | |
| base: "?writeKey=${writeKey}&context.library.name=amp&anonymousId=${anonymousId}&context.locale=${browserLanguage}&context.page.path=${canonicalPath}&context.page.url=${canonicalUrl}&context.page.referrer=${documentReferrer}&context.page.title=${title}&context.screen.width=${screenWidth}&context.screen.height=${screenHeight}", | |
| page: "${host}/page${base}&name=${name}", | |
| track: "${host}/track${base}&event=${event}" | |
| }, | |
| triggers: { | |
| page: { | |
| on: "visible", | |
| request: "page" | |
| } | |
| } | |
| }, | |
| shinystat: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| requests: { | |
| base: "https://amp.shinystat.com/cgi-bin/shinyamp.cgi", | |
| commpar: "AMP=1&RM=${random}&USER=${account}&PAG=${page}&HR=${canonicalUrl}&REFER=${documentReferrer}&RES=${screenWidth}X${screenHeight}&COLOR=${screenColorDepth}&CID=${clientId(AMP_CID)}&PAGID=${pageViewId}&TITL=${title}&RQC=${requestCount}", | |
| pagepar: "&VIE=${viewer}&PLT=${pageLoadTime}", | |
| eventpar: "&SSXL=1", | |
| linkpar: "&LINK=${outboundLink}", | |
| pageview: "${base}?${commpar}${pagepar}", | |
| event: "${base}?${commpar}${eventpar}", | |
| link: "${base}?${commpar}${linkpar}" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| snowplow: { | |
| vars: { | |
| duid: "CLIENT_ID(_sp_id)" | |
| }, | |
| requests: { | |
| aaVersion: "amp-0.2", | |
| basePrefix: "https://${collectorHost}/i?url=${canonicalUrl}&page=${title}&res=${screenWidth}x${screenHeight}&stm=${timestamp}&tz=${timezone}&aid=${appId}&p=web&tv=${aaVersion}&cd=${screenColorDepth}&cs=${documentCharset}&duid=${duid}&lang=${browserLanguage}&refr=${documentReferrer}&stm=${timezone}&vp=${viewportWidth}x${viewportHeight}", | |
| pageView: "${basePrefix}&e=pv", | |
| structEvent: "${basePrefix}&e=se&se_ca=${structEventCategory}&se_ac=${structEventAction}&se_la=${structEventLabel}&se_pr=${structEventProperty}&se_va=${structEventValue}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| top100: { | |
| vars: { | |
| pid: "", | |
| rid: "PAGE_VIEW_ID", | |
| ruid: "CLIENT_ID(ruid)", | |
| version: "1.0.0" | |
| }, | |
| requests: { | |
| host: "https://kraken.rambler.ru", | |
| base: "${host}/cnt/?pid=${pid}&rid=${rid}&v=${version}&rn=${random}&ruid=${ruid}&ct=amp", | |
| pageview: "${base}&et=pv${_pageData}${_screenData}", | |
| _screenData: "&sr=${screenWidth}x${screenHeight}&cd=${screenColorDepth}-bit&bs=${scrollWidth}x${scrollHeight}", | |
| _pageData: "&pt=${title}&rf=${documentReferrer}&en=${documentCharset}&la=${browserLanguage}&tz=${timezone}" | |
| }, | |
| triggers: { | |
| trackPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| webtrekk: { | |
| requests: { | |
| trackURL: "https://${trackDomain}/${trackId}/wt", | |
| parameterPrefix: "?p=432,${contentId},1,${screenWidth}x${screenHeight},${screenColorDepth},1,${timestamp},${documentReferrer},${viewportWidth}x${viewportHeight},0&tz=${timezone}&eid=${clientId(amp-wt3-eid)}&la=${browserLanguage}", | |
| parameterSuffix: "&pu=${sourceUrl}", | |
| pageParameter: "&cp1=${pageParameter1}&cp2=${pageParameter2}&cp3=${pageParameter3}&cp4=${pageParameter4}&cp5=${pageParameter5}&cp6=${pageParameter6}&cp7=${pageParameter7}&cp8=${pageParameter8}&cp9=${pageParameter9}&cp10=${pageParameter10}", | |
| pageCategories: "&cg1=${pageCategory1}&cg2=${pageCategory2}&cg3=${pageCategory3}&cg4=${pageCategory4}&cg5=${pageCategory5}&cg6=${pageCategory6}&cg7=${pageCategory7}&cg8=${pageCategory8}&cg9=${pageCategory9}&cg10=${pageCategory10}", | |
| pageview: "${trackURL}${parameterPrefix}${pageParameter}${pageCategories}${parameterSuffix}", | |
| actionParameter: "&ck1=${actionParameter1}&ck2=${actionParameter2}&ck3=${actionParameter3}&ck4=${actionParameter4}&ck5=${actionParameter5}", | |
| event: "${trackURL}${parameterPrefix}&ct=${actionName}${actionParameter}${parameterSuffix}" | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| mpulse: { | |
| requests: { | |
| onvisible: "https://${beacon_url}?h.d=${h.d}&h.key=${h.key}&h.t=${h.t}&h.cr=${h.cr}&rt.start=navigation&rt.si=${clientId(amp_mpulse)}&rt.ss=${timestamp}&rt.end=${timestamp}&t_resp=${navTiming(navigationStart,responseStart)}&t_page=${navTiming(responseStart,loadEventStart)}&t_done=${navTiming(navigationStart,loadEventStart)}&nt_nav_type=${navType}&nt_red_cnt=${navRedirectCount}&nt_nav_st=${navTiming(navigationStart)}&nt_red_st=${navTiming(redirectStart)}&nt_red_end=${navTiming(redirectEnd)}&nt_fet_st=${navTiming(fetchStart)}&nt_dns_st=${navTiming(domainLookupStart)}&nt_dns_end=${navTiming(domainLookupEnd)}&nt_con_st=${navTiming(connectStart)}&nt_ssl_st=${navTiming(secureConnectionStart)}&nt_con_end=${navTiming(connectEnd)}&nt_req_st=${navTiming(requestStart)}&nt_res_st=${navTiming(responseStart)}&nt_unload_st=${navTiming(unloadEventStart)}&nt_unload_end=${navTiming(unloadEventEnd)}&nt_domloading=${navTiming(domLoading)}&nt_res_end=${navTiming(responseEnd)}&nt_domint=${navTiming(domInteractive)}&nt_domcontloaded_st=${navTiming(domContentLoadedEventStart)}&nt_domcontloaded_end=${navTiming(domContentLoadedEventEnd)}&nt_domcomp=${navTiming(domComplete)}&nt_load_st=${navTiming(loadEventStart)}&nt_load_end=${navTiming(loadEventEnd)}&v=1&http.initiator=amp&u=${sourceUrl}&.u=${ampdocUrl}&r2=${documentReferrer}&scr.xy=${screenWidth}x${screenHeight}" | |
| }, | |
| triggers: { | |
| onvisible: { | |
| on: "visible", | |
| request: "onvisible" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| extraUrlParamsReplaceMap: { | |
| ab_test: "h.ab", | |
| page_group: "h.pg", | |
| "custom_dimension.": "cdim.", | |
| "custom_metric.": "cmet." | |
| } | |
| }, | |
| linkpulse: { | |
| vars: { | |
| id: "", | |
| pageUrl: "CANONICAL_URL", | |
| title: "TITLE", | |
| section: "", | |
| channel: "amp", | |
| type: "", | |
| host: "pp.lp4.io", | |
| empty: "" | |
| }, | |
| requests: { | |
| base: "https://${host}", | |
| pageview: "${base}/p?i=${id}&r=${documentReferrer}&p=${pageUrl}&s=${section}&t=${type}&c=${channel}&mt=${title}&_t=amp&_r=${random}", | |
| pageload: "${base}/pl?i=${id}&ct=${domInteractiveTime}&rt=${pageDownloadTime}&pt=${pageLoadTime}&p=${pageUrl}&c=${channel}&t=${type}&s=${section}&_t=amp&_r=${random}", | |
| ping: "${base}/u?i=${id}&u=${clientId(_lp4_u)}&p=${pageUrl}&uActive=true&isPing=yes&c=${channel}&t=${type}&s=${section}&_t=amp&_r=${random}" | |
| }, | |
| triggers: { | |
| pageview: { | |
| on: "visible", | |
| request: "pageview" | |
| }, | |
| pageload: { | |
| on: "visible", | |
| request: "pageload" | |
| }, | |
| ping: { | |
| on: "timer", | |
| timerSpec: { | |
| interval: 30, | |
| maxTimerLength: 7200 | |
| }, | |
| request: "ping" | |
| } | |
| }, | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| } | |
| }, | |
| rakam: { | |
| vars: { | |
| deviceId: "CLIENT_ID(rakam_device_id)" | |
| }, | |
| requests: { | |
| base: "?api.api_key=${writeKey}&prop._platform=amp&prop._device_id=${deviceId}&prop.locale=${browserLanguage}&prop.path=${canonicalPath}&prop.url=${canonicalUrl}&prop.color_depth=${screenColorDepth}&prop._referrer=${documentReferrer}&prop.title=${title}&prop.timezone=${timezone}&prop._time=${timestamp}&prop.resolution=${screenWidth} \u00d7 ${screenHeight}", | |
| pageview: "https://${apiEndpoint}/event/pixel${base}&collection=${pageViewName}", | |
| custom: "https://${apiEndpoint}/event/pixel${base}&collection=${collection}" | |
| } | |
| }, | |
| ibeatanalytics: { | |
| requests: { | |
| host: "https://ibeat.indiatimes.com", | |
| base: "https://ibeat.indiatimes.com/iBeat/pageTrendlogAmp.html", | |
| pageview: "${base}?&h=${h}&d=${h}&url=${url}&k=${key}&ts=${time}&ch=${channel}&sid=${uid}&at=${agentType}&ref=${documentReferrer}&aid=${aid}&loc=1&ct=1&cat=${cat}&scat=${scat}&ac=1&tg=${tags}&ctids=${catIds}&pts=${pagePublishTime}&auth=${author}&pos=${position}&iBeatField=${ibeatFields}&cid=${clientId(MSCSAuthDetails)}" | |
| }, | |
| triggers: { | |
| defaultPageview: { | |
| on: "visible", | |
| request: "pageview" | |
| } | |
| } | |
| }, | |
| topmailru: { | |
| transport: { | |
| beacon: !1, | |
| xhrpost: !1, | |
| image: !0 | |
| }, | |
| vars: { | |
| url: "${sourceUrl}", | |
| referrer: "${documentReferrer}" | |
| }, | |
| requests: { | |
| pageView: "${_domain}/counter?${_basicMessage};title=${title}", | |
| reachGoal: "${_domain}/tracker?${_basicMessage};title=${title};e=RG%3A${value}%2F${goal}", | |
| sendEvent: "${_domain}/tracker?${_basicMessage};e=CE%3A${value}%2F${category}%3B${action}%3B${label}", | |
| _domain: "https://top-fwz1.mail.ru", | |
| _basicMessage: "js=13;id=${id};u=${url};r=${referrer};s=${screenWidth}*${screenHeight};vp=${viewportWidth}*${viewportHeight};st=${start};gender=${gender};age=${age};pid=${pid};userid=${userid};device=${device};params=${params};_=${random}" | |
| }, | |
| triggers: { | |
| pageView: { | |
| on: "visible", | |
| request: "pageView" | |
| } | |
| } | |
| } | |
| }; | |
| $ANALYTICS_CONFIG$$module$extensions$amp_analytics$0_1$vendors$$.infonline.triggers.pageview.iframePing = !0; | |
| $ANALYTICS_CONFIG$$module$extensions$amp_analytics$0_1$vendors$$.adobeanalytics_nativeConfig.triggers.pageLoad.iframePing = !0; | |
| $ANALYTICS_CONFIG$$module$extensions$amp_analytics$0_1$vendors$$.oewa.triggers.pageview.iframePing = !0; | |
| var $WHITELIST_EVENT_IN_SANDBOX$$module$extensions$amp_analytics$0_1$amp_analytics$$ = ["visible", "hidden"]; | |
| function $AmpAnalytics$$module$extensions$amp_analytics$0_1$amp_analytics$$($$jscomp$super$this$jscomp$3_element$jscomp$105$$) { | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$ = AMP.BaseElement.call(this, $$jscomp$super$this$jscomp$3_element$jscomp$105$$) || this; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$predefinedConfig_$ = $ANALYTICS_CONFIG$$module$extensions$amp_analytics$0_1$vendors$$; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$consentPromise_$ = Promise.resolve(); | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$consentNotificationId_$ = | |
| null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$type_$ = null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$isSandbox_$ = !1; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$requests_$ = {}; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$config_$ = {}; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$remoteConfig_$ = {}; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$instrumentation_$ = null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$analyticsGroup_$ = null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$variableService_$ = | |
| $getService$$module$src$service$$($$jscomp$super$this$jscomp$3_element$jscomp$105$$.win, "amp-analytics-variables"); | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$cryptoService_$ = $Services$$module$src$services$cryptoFor$$($$jscomp$super$this$jscomp$3_element$jscomp$105$$.win); | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$iniPromise_$ = null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$iframeTransport_$ = null; | |
| $$jscomp$super$this$jscomp$3_element$jscomp$105$$.$isInabox_$ = "inabox" == $getMode$$module$src$mode$$($$jscomp$super$this$jscomp$3_element$jscomp$105$$.win).runtime; | |
| return $$jscomp$super$this$jscomp$3_element$jscomp$105$$ | |
| } | |
| $$jscomp$inherits$$($AmpAnalytics$$module$extensions$amp_analytics$0_1$amp_analytics$$, AMP.BaseElement); | |
| $JSCompiler_prototypeAlias$$ = $AmpAnalytics$$module$extensions$amp_analytics$0_1$amp_analytics$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getPriority = function() { | |
| return this.$isInabox_$ ? 0 : 1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.isAlwaysFixed = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.isLayoutSupported = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.buildCallback = function() { | |
| var $$jscomp$this$jscomp$131$$ = this; | |
| this.$isSandbox_$ = this.element.hasAttribute("sandbox"); | |
| this.element.setAttribute("aria-hidden", "true"); | |
| this.$consentNotificationId_$ = this.element.getAttribute("data-consent-notification-id"); | |
| null != this.$consentNotificationId_$ && (this.$consentPromise_$ = $Services$$module$src$services$userNotificationManagerForDoc$$(this.element).then(function($service$jscomp$13$$) { | |
| return $service$jscomp$13$$.get($$jscomp$this$jscomp$131$$.$consentNotificationId_$) | |
| })); | |
| "immediate" == this.element.getAttribute("trigger") && $JSCompiler_StaticMethods_ensureInitialized_$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.preconnectCallback = function() { | |
| var $url$jscomp$72$$ = $getIframeTransportScriptUrl$$module$extensions$amp_analytics$0_1$iframe_transport$$(this.getAmpDoc().win); | |
| this.preconnect.preload($url$jscomp$72$$, "script") | |
| }; | |
| $JSCompiler_prototypeAlias$$.layoutCallback = function() { | |
| return $JSCompiler_StaticMethods_ensureInitialized_$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.detachedCallback = function() { | |
| this.$analyticsGroup_$ && (this.$analyticsGroup_$.dispose(), this.$analyticsGroup_$ = null); | |
| for (var $i$jscomp$90$$ = 0; $i$jscomp$90$$ < this.$requests_$.length; $i$jscomp$90$$++) this.$requests_$[$i$jscomp$90$$].dispose(), delete this.$requests_$[$i$jscomp$90$$] | |
| }; | |
| $JSCompiler_prototypeAlias$$.resumeCallback = function() { | |
| this.$config_$.transport && this.$config_$.transport.iframe && $JSCompiler_StaticMethods_initIframeTransport_$$(this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.unlayoutCallback = function() { | |
| if ($Services$$module$src$services$viewerForDoc$$(this.getAmpDoc()).isVisible()) return !1; | |
| this.$iframeTransport_$ && (this.$iframeTransport_$.detach(), this.$iframeTransport_$ = null); | |
| return AMP.BaseElement.prototype.unlayoutCallback.call(this) | |
| }; | |
| function $JSCompiler_StaticMethods_ensureInitialized_$$($JSCompiler_StaticMethods_ensureInitialized_$self$$) { | |
| if ($JSCompiler_StaticMethods_ensureInitialized_$self$$.$iniPromise_$) return $JSCompiler_StaticMethods_ensureInitialized_$self$$.$iniPromise_$; | |
| $toggle$$module$src$style$$($JSCompiler_StaticMethods_ensureInitialized_$self$$.element, !1); | |
| $JSCompiler_StaticMethods_ensureInitialized_$self$$.$iniPromise_$ = $Services$$module$src$services$viewerForDoc$$($JSCompiler_StaticMethods_ensureInitialized_$self$$.getAmpDoc()).whenFirstVisible().then(function() { | |
| return $Services$$module$src$services$timerFor$$($JSCompiler_StaticMethods_ensureInitialized_$self$$.win).promise(1) | |
| }).then(function() { | |
| return $JSCompiler_StaticMethods_ensureInitialized_$self$$.$consentPromise_$ | |
| }).then($JSCompiler_StaticMethods_ensureInitialized_$self$$.$fetchRemoteConfig_$.bind($JSCompiler_StaticMethods_ensureInitialized_$self$$)).then(function() { | |
| return $getServicePromiseForDoc$$module$src$service$$($JSCompiler_StaticMethods_ensureInitialized_$self$$.getAmpDoc(), | |
| "amp-analytics-instrumentation") | |
| }).then(function($instrumentation$$) { | |
| $JSCompiler_StaticMethods_ensureInitialized_$self$$.$instrumentation_$ = $instrumentation$$ | |
| }).then($JSCompiler_StaticMethods_ensureInitialized_$self$$.$onFetchRemoteConfigSuccess_$.bind($JSCompiler_StaticMethods_ensureInitialized_$self$$)); | |
| return $JSCompiler_StaticMethods_ensureInitialized_$self$$.$iniPromise_$ | |
| } | |
| $JSCompiler_prototypeAlias$$.$onFetchRemoteConfigSuccess_$ = function() { | |
| var $$jscomp$this$jscomp$133$$ = this; | |
| this.$config_$ = $JSCompiler_StaticMethods_mergeConfigs_$$(this); | |
| if ($JSCompiler_StaticMethods_hasOptedOut_$$(this)) return this.$getName_$(), Promise.resolve(); | |
| $JSCompiler_StaticMethods_generateRequests_$$(this); | |
| if (!this.$config_$.triggers) { | |
| var $TAG$32_promises$jscomp$8$$ = this.$getName_$(); | |
| this.user().error($TAG$32_promises$jscomp$8$$, "No triggers were found in the config. No analytics data will be sent."); | |
| return Promise.resolve() | |
| } | |
| $JSCompiler_StaticMethods_processExtraUrlParams_$$(this, this.$config_$.extraUrlParams, this.$config_$.extraUrlParamsReplaceMap); | |
| this.$analyticsGroup_$ = this.$instrumentation_$.createAnalyticsGroup(this.element); | |
| this.$config_$.transport && this.$config_$.transport.iframe && $JSCompiler_StaticMethods_initIframeTransport_$$(this); | |
| $TAG$32_promises$jscomp$8$$ = []; | |
| var $$jscomp$loop$186$$ = {}, $k$jscomp$16$$; | |
| for ($k$jscomp$16$$ in this.$config_$.triggers) { | |
| if ($hasOwn_$$module$src$utils$object$$.call(this.$config_$.triggers, | |
| $k$jscomp$16$$)) { | |
| $$jscomp$loop$186$$.trigger = this.$config_$.triggers[$k$jscomp$16$$]; | |
| $$jscomp$loop$186$$.expansionOptions = $JSCompiler_StaticMethods_expansionOptions_$$(this, {}, $$jscomp$loop$186$$.trigger, void 0, !0); | |
| var $TAG$33$$ = this.$getName_$(); | |
| if (!$$jscomp$loop$186$$.trigger) { | |
| this.user().error($TAG$33$$, "Trigger should be an object: ", $k$jscomp$16$$); | |
| continue | |
| } | |
| if (!$$jscomp$loop$186$$.trigger.on || !$$jscomp$loop$186$$.trigger.request) { | |
| this.user().error($TAG$33$$, '"on" and "request" attributes are required for data to be collected.'); | |
| continue | |
| } | |
| if (this.$isSandbox_$) { | |
| var $eventType$jscomp$30$$ = $$jscomp$loop$186$$.trigger.on; | |
| if ($isEnumValue$$module$src$types$$($AnalyticsEventType$$module$extensions$amp_analytics$0_1$events$$, $eventType$jscomp$30$$) && !$WHITELIST_EVENT_IN_SANDBOX$$module$extensions$amp_analytics$0_1$amp_analytics$$.includes($eventType$jscomp$30$$)) { | |
| this.user().error($TAG$33$$, $eventType$jscomp$30$$ + "is not supported for amp-analytics in scope"); | |
| continue | |
| } | |
| } | |
| $JSCompiler_StaticMethods_processExtraUrlParams_$$(this, $$jscomp$loop$186$$.trigger.extraUrlParams, | |
| this.$config_$.extraUrlParamsReplaceMap); | |
| $TAG$32_promises$jscomp$8$$.push($JSCompiler_StaticMethods_isSampledIn_$$(this, $$jscomp$loop$186$$.trigger).then(function($TAG$32_promises$jscomp$8$$) { | |
| return function($$jscomp$loop$186$$) { | |
| if ($$jscomp$loop$186$$) { | |
| if ($$jscomp$this$jscomp$133$$.$isSandbox_$) $TAG$32_promises$jscomp$8$$.trigger.selector = $$jscomp$this$jscomp$133$$.element.parentElement.tagName, $TAG$32_promises$jscomp$8$$.trigger.selectionMethod = "closest"; | |
| else if ($TAG$32_promises$jscomp$8$$.trigger.selector) return $$jscomp$this$jscomp$133$$.$variableService_$.expandTemplate($TAG$32_promises$jscomp$8$$.trigger.selector, | |
| $TAG$32_promises$jscomp$8$$.expansionOptions).then(function($$jscomp$loop$186$$) { | |
| $TAG$32_promises$jscomp$8$$.trigger.selector = $$jscomp$loop$186$$; | |
| $JSCompiler_StaticMethods_addTriggerNoInline_$$($$jscomp$this$jscomp$133$$, $TAG$32_promises$jscomp$8$$.trigger) | |
| }); | |
| $JSCompiler_StaticMethods_addTriggerNoInline_$$($$jscomp$this$jscomp$133$$, $TAG$32_promises$jscomp$8$$.trigger) | |
| } | |
| } | |
| }($$jscomp$loop$186$$))) | |
| } | |
| $$jscomp$loop$186$$ = { | |
| trigger: $$jscomp$loop$186$$.trigger, | |
| expansionOptions: $$jscomp$loop$186$$.expansionOptions | |
| } | |
| } | |
| return Promise.all($TAG$32_promises$jscomp$8$$) | |
| }; | |
| function $JSCompiler_StaticMethods_initIframeTransport_$$($JSCompiler_StaticMethods_initIframeTransport_$self$$) { | |
| if (!$JSCompiler_StaticMethods_initIframeTransport_$self$$.$iframeTransport_$) { | |
| var $TAG$jscomp$2$$ = $JSCompiler_StaticMethods_initIframeTransport_$self$$.$getName_$(), | |
| $ampAdResourceId$$ = $user$$module$src$log$$().assertString($getAmpAdResourceId$$module$src$ad_helper$$($JSCompiler_StaticMethods_initIframeTransport_$self$$.element, $getTopWindow$$module$src$service$$($JSCompiler_StaticMethods_initIframeTransport_$self$$.win)), | |
| $TAG$jscomp$2$$ + ": No friendly amp-ad ancestor element was found for amp-analytics tag with iframe transport."); | |
| $JSCompiler_StaticMethods_initIframeTransport_$self$$.$iframeTransport_$ = new $IframeTransport$$module$extensions$amp_analytics$0_1$iframe_transport$$($JSCompiler_StaticMethods_initIframeTransport_$self$$.$isInabox_$ ? $JSCompiler_StaticMethods_initIframeTransport_$self$$.win : $JSCompiler_StaticMethods_initIframeTransport_$self$$.getAmpDoc().win, $JSCompiler_StaticMethods_initIframeTransport_$self$$.element.getAttribute("type"), | |
| $JSCompiler_StaticMethods_initIframeTransport_$self$$.$config_$.transport, $ampAdResourceId$$) | |
| } | |
| } | |
| function $JSCompiler_StaticMethods_addTriggerNoInline_$$($JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$, $config$jscomp$25$$) { | |
| try { | |
| $JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$.$analyticsGroup_$.addTrigger($config$jscomp$25$$, $JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$.$handleEvent_$.bind($JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$, $config$jscomp$25$$)) | |
| } catch ($e$jscomp$60$$) { | |
| $JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$ = | |
| $JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$.$getName_$(), $rethrowAsync$$module$src$log$$($JSCompiler_StaticMethods_addTriggerNoInline_$self_TAG$jscomp$3$$, 'Failed to process trigger "' + $config$jscomp$25$$.on + '"', $e$jscomp$60$$) | |
| } | |
| } | |
| function $JSCompiler_StaticMethods_processExtraUrlParams_$$($JSCompiler_StaticMethods_processExtraUrlParams_$self$$, $TAG$jscomp$4_params$jscomp$8$$, $replaceMap$$) { | |
| if ($TAG$jscomp$4_params$jscomp$8$$ && $replaceMap$$) { | |
| var $count$jscomp$16$$ = 0, | |
| $replaceMapKey$$; | |
| for ($replaceMapKey$$ in $replaceMap$$) { | |
| if (16 < ++$count$jscomp$16$$) { | |
| $TAG$jscomp$4_params$jscomp$8$$ = $JSCompiler_StaticMethods_processExtraUrlParams_$self$$.$getName_$(); | |
| $JSCompiler_StaticMethods_processExtraUrlParams_$self$$.user().error($TAG$jscomp$4_params$jscomp$8$$, | |
| "More than 16 extraUrlParamsReplaceMap rules aren't allowed; Skipping the rest"); | |
| break | |
| } | |
| for (var $extraUrlParamsKey$$ in $TAG$jscomp$4_params$jscomp$8$$) { | |
| var $newkey$$ = $extraUrlParamsKey$$.replace($replaceMapKey$$, $replaceMap$$[$replaceMapKey$$]); | |
| if ($extraUrlParamsKey$$ != $newkey$$) { | |
| var $value$34$$ = $TAG$jscomp$4_params$jscomp$8$$[$extraUrlParamsKey$$]; | |
| delete $TAG$jscomp$4_params$jscomp$8$$[$extraUrlParamsKey$$]; | |
| $TAG$jscomp$4_params$jscomp$8$$[$newkey$$] = $value$34$$ | |
| } | |
| } | |
| } | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$.$fetchRemoteConfig_$ = function() { | |
| var $$jscomp$this$jscomp$134$$ = this, | |
| $remoteConfigUrl$$ = this.element.getAttribute("config"); | |
| if (!$remoteConfigUrl$$ || this.$isSandbox_$) return Promise.resolve(); | |
| $assertHttpsUrl$$module$src$url$$($remoteConfigUrl$$, this.element); | |
| var $TAG$jscomp$5$$ = this.$getName_$(), | |
| $fetchConfig$$ = {}; | |
| this.element.hasAttribute("data-credentials") && ($fetchConfig$$.credentials = this.element.getAttribute("data-credentials")); | |
| var $ampdoc$jscomp$24$$ = this.getAmpDoc(); | |
| return $Services$$module$src$services$urlReplacementsForDoc$$(this.element).expandAsync($remoteConfigUrl$$).then(function($$jscomp$this$jscomp$134$$) { | |
| $remoteConfigUrl$$ = $$jscomp$this$jscomp$134$$; | |
| return $Services$$module$src$services$xhrFor$$($ampdoc$jscomp$24$$.win).fetchJson($remoteConfigUrl$$, $fetchConfig$$) | |
| }).then(function($$jscomp$this$jscomp$134$$) { | |
| return $$jscomp$this$jscomp$134$$.json() | |
| }).then(function($remoteConfigUrl$$) { | |
| $$jscomp$this$jscomp$134$$.$remoteConfig_$ = $remoteConfigUrl$$ | |
| }, function($fetchConfig$$) { | |
| $$jscomp$this$jscomp$134$$.user().error($TAG$jscomp$5$$, | |
| "Error loading remote config: ", $remoteConfigUrl$$, $fetchConfig$$) | |
| }) | |
| }; | |
| function $JSCompiler_StaticMethods_mergeConfigs_$$($JSCompiler_StaticMethods_mergeConfigs_$self$$) { | |
| var $inlineConfig$$ = $expandConfigRequest$$module$extensions$amp_analytics$0_1$requests$$($JSCompiler_StaticMethods_mergeConfigs_$self$$.getInlineConfigNoInline()), | |
| $config$jscomp$26$$ = $dict$$module$src$utils$object$$({ | |
| vars: { | |
| requestCount: 0 | |
| } | |
| }), | |
| $defaultConfig$$ = $expandConfigRequest$$module$extensions$amp_analytics$0_1$requests$$($JSCompiler_StaticMethods_mergeConfigs_$self$$.$predefinedConfig_$["default"] || {}), | |
| $TAG$35_type$jscomp$144$$ = $JSCompiler_StaticMethods_mergeConfigs_$self$$.element.getAttribute("type"); | |
| if ("googleanalytics-alpha" == $TAG$35_type$jscomp$144$$) { | |
| var $TAG$jscomp$6$$ = $JSCompiler_StaticMethods_mergeConfigs_$self$$.$getName_$(); | |
| $user$$module$src$log$$().warn($TAG$jscomp$6$$, '"googleanalytics-alpha" configuration is not planned to be supported long-term. Avoid use of this value for amp-analytics config attribute unless you plan to migrate before deprecation') | |
| } | |
| var $typeConfig$$ = $expandConfigRequest$$module$extensions$amp_analytics$0_1$requests$$($JSCompiler_StaticMethods_mergeConfigs_$self$$.$predefinedConfig_$[$TAG$35_type$jscomp$144$$] || {}); | |
| $JSCompiler_StaticMethods_mergeConfigs_$self$$.$predefinedConfig_$[$TAG$35_type$jscomp$144$$] && ($inlineConfig$$.transport || $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$.transport) && ($TAG$35_type$jscomp$144$$ = $JSCompiler_StaticMethods_mergeConfigs_$self$$.$getName_$(), $JSCompiler_StaticMethods_mergeConfigs_$self$$.user().error($TAG$35_type$jscomp$144$$, "Inline or remote config should not overwrite vendor transport settings")); | |
| $inlineConfig$$.transport && $inlineConfig$$.transport.iframe && | |
| ($JSCompiler_StaticMethods_mergeConfigs_$self$$.user().error("amp-analytics", "Inline configs are not allowed to specify transport iframe"), $inlineConfig$$.transport.iframe = void 0); | |
| $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$.transport && $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$.transport.iframe && ($JSCompiler_StaticMethods_mergeConfigs_$self$$.user().error("amp-analytics", "Remote configs are not allowed to specify transport iframe"), $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$.transport.iframe = | |
| void 0); | |
| $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$ = $expandConfigRequest$$module$extensions$amp_analytics$0_1$requests$$($JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeConfigs_$self$$, $defaultConfig$$, $config$jscomp$26$$); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeConfigs_$self$$, $typeConfig$$, $config$jscomp$26$$, !0); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeConfigs_$self$$, | |
| $inlineConfig$$, $config$jscomp$26$$); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeConfigs_$self$$, $JSCompiler_StaticMethods_mergeConfigs_$self$$.$remoteConfig_$, $config$jscomp$26$$); | |
| return $config$jscomp$26$$ | |
| } | |
| $JSCompiler_prototypeAlias$$.getInlineConfigNoInline = function() { | |
| if (this.element.CONFIG) return this.element.CONFIG; | |
| var $inlineConfig$jscomp$1$$ = {}, $TAG$jscomp$7$$ = this.$getName_$(); | |
| try { | |
| var $children$jscomp$128$$ = this.element.children; | |
| 1 == $children$jscomp$128$$.length ? $isJsonScriptTag$$module$src$dom$$($children$jscomp$128$$[0]) ? $inlineConfig$jscomp$1$$ = $parseJson$$module$src$json$$($children$jscomp$128$$[0].textContent) : this.user().error($TAG$jscomp$7$$, 'The analytics config should be put in a <script> tag with type="application/json"') : | |
| 1 < $children$jscomp$128$$.length && this.user().error($TAG$jscomp$7$$, "The tag should contain only one <script> child.") | |
| } catch ($er$$) { | |
| this.user().error($TAG$jscomp$7$$, "Analytics config could not be parsed. Is it in a valid JSON format?", $er$$) | |
| } | |
| return $inlineConfig$jscomp$1$$ | |
| }; | |
| function $JSCompiler_StaticMethods_hasOptedOut_$$($JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$) { | |
| if (!$JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$.$config_$.optout) return !1; | |
| var $props$jscomp$131$$ = $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$.$config_$.optout.split("."); | |
| $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$ = $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$.win; | |
| for (var $i$jscomp$91$$ = 0; $i$jscomp$91$$ < $props$jscomp$131$$.length; $i$jscomp$91$$++) { | |
| if (!$JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$) return !1; | |
| $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$ = $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$[$props$jscomp$131$$[$i$jscomp$91$$]] | |
| } | |
| return $JSCompiler_StaticMethods_hasOptedOut_$self_k$jscomp$17$$() | |
| } | |
| function $JSCompiler_StaticMethods_generateRequests_$$($JSCompiler_StaticMethods_generateRequests_$self$$) { | |
| if (!$JSCompiler_StaticMethods_generateRequests_$self$$.$config_$ || !$JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests) { | |
| var $TAG$jscomp$8_k$37$$ = $JSCompiler_StaticMethods_generateRequests_$self$$.$getName_$(); | |
| $JSCompiler_StaticMethods_generateRequests_$self$$.user().error($TAG$jscomp$8_k$37$$, "No request strings defined. Analytics data will not be sent from this page.") | |
| } else if ($JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests) { | |
| for (var $k$jscomp$18_requests$jscomp$2$$ in $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests) $hasOwn_$$module$src$utils$object$$.call($JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests, | |
| $k$jscomp$18_requests$jscomp$2$$) && !$JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$k$jscomp$18_requests$jscomp$2$$].baseUrl && ($JSCompiler_StaticMethods_generateRequests_$self$$.user().error("amp-analytics", "request must have a baseUrl"), delete $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$k$jscomp$18_requests$jscomp$2$$]); | |
| for (var $k$36_request$38$$ in $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests) $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$k$36_request$38$$].baseUrl = | |
| $expandTemplate$$module$src$string$$($JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$k$36_request$38$$].baseUrl, function($TAG$jscomp$8_k$37$$) { | |
| var $k$jscomp$18_requests$jscomp$2$$ = $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$TAG$jscomp$8_k$37$$]; | |
| return $k$jscomp$18_requests$jscomp$2$$ && $k$jscomp$18_requests$jscomp$2$$.baseUrl || "${" + $TAG$jscomp$8_k$37$$ + "}" | |
| }); | |
| $k$jscomp$18_requests$jscomp$2$$ = {}; | |
| for ($TAG$jscomp$8_k$37$$ in $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests) $hasOwn_$$module$src$utils$object$$.call($JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests, | |
| $TAG$jscomp$8_k$37$$) && ($k$36_request$38$$ = $JSCompiler_StaticMethods_generateRequests_$self$$.$config_$.requests[$TAG$jscomp$8_k$37$$], $k$jscomp$18_requests$jscomp$2$$[$TAG$jscomp$8_k$37$$] = new $RequestHandler$$module$extensions$amp_analytics$0_1$requests$$($JSCompiler_StaticMethods_generateRequests_$self$$.getAmpDoc(), $k$36_request$38$$, $JSCompiler_StaticMethods_generateRequests_$self$$.preconnect, $JSCompiler_StaticMethods_generateRequests_$self$$.$sendRequest_$.bind($JSCompiler_StaticMethods_generateRequests_$self$$), | |
| $JSCompiler_StaticMethods_generateRequests_$self$$.$isSandbox_$)); | |
| $JSCompiler_StaticMethods_generateRequests_$self$$.$requests_$ = $k$jscomp$18_requests$jscomp$2$$ | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$.$handleEvent_$ = function($trigger$$, $event$jscomp$27$$) { | |
| for (var $requests$jscomp$3$$ = $isArray$$module$src$types$$($trigger$$.request) ? $trigger$$.request : [$trigger$$.request], $resultPromises$$ = [], $r$jscomp$7$$ = 0; $r$jscomp$7$$ < $requests$jscomp$3$$.length; $r$jscomp$7$$++) $resultPromises$$.push($JSCompiler_StaticMethods_handleRequestForEvent_$$(this, $requests$jscomp$3$$[$r$jscomp$7$$], $trigger$$, $event$jscomp$27$$)); | |
| return Promise.all($resultPromises$$) | |
| }; | |
| function $JSCompiler_StaticMethods_handleRequestForEvent_$$($JSCompiler_StaticMethods_handleRequestForEvent_$self$$, $TAG$39_TAG$jscomp$9_requestName$jscomp$2$$, $trigger$jscomp$1$$, $event$jscomp$28$$) { | |
| if (!$JSCompiler_StaticMethods_handleRequestForEvent_$self$$.element.ownerDocument.defaultView) return $TAG$39_TAG$jscomp$9_requestName$jscomp$2$$ = $JSCompiler_StaticMethods_handleRequestForEvent_$self$$.$getName_$(), $dev$$module$src$log$$().warn($TAG$39_TAG$jscomp$9_requestName$jscomp$2$$, "request against destroyed embed: ", | |
| $trigger$jscomp$1$$.on), Promise.resolve(); | |
| var $request$jscomp$20$$ = $JSCompiler_StaticMethods_handleRequestForEvent_$self$$.$requests_$[$TAG$39_TAG$jscomp$9_requestName$jscomp$2$$]; | |
| return $request$jscomp$20$$ ? $JSCompiler_StaticMethods_checkTriggerEnabled_$$($JSCompiler_StaticMethods_handleRequestForEvent_$self$$, $trigger$jscomp$1$$, $event$jscomp$28$$).then(function($TAG$39_TAG$jscomp$9_requestName$jscomp$2$$) { | |
| if ($TAG$39_TAG$jscomp$9_requestName$jscomp$2$$) { | |
| $JSCompiler_StaticMethods_handleRequestForEvent_$self$$.$config_$.vars.requestCount++; | |
| var $enabled$$ = $JSCompiler_StaticMethods_expansionOptions_$$($JSCompiler_StaticMethods_handleRequestForEvent_$self$$, $event$jscomp$28$$, $trigger$jscomp$1$$); | |
| return $request$jscomp$20$$.send($JSCompiler_StaticMethods_handleRequestForEvent_$self$$.$config_$.extraUrlParams, $trigger$jscomp$1$$, $enabled$$) | |
| } | |
| }) : ($TAG$39_TAG$jscomp$9_requestName$jscomp$2$$ = $JSCompiler_StaticMethods_handleRequestForEvent_$self$$.$getName_$(), $JSCompiler_StaticMethods_handleRequestForEvent_$self$$.user().error($TAG$39_TAG$jscomp$9_requestName$jscomp$2$$, | |
| "Ignoring event. Request string not found: ", $trigger$jscomp$1$$.request), Promise.resolve()) | |
| } | |
| function $JSCompiler_StaticMethods_isSampledIn_$$($JSCompiler_StaticMethods_isSampledIn_$self$$, $expansionOptions$jscomp$1_trigger$jscomp$3$$) { | |
| var $spec$$ = $expansionOptions$jscomp$1_trigger$jscomp$3$$.sampleSpec, | |
| $resolve$jscomp$43$$ = Promise.resolve(!0), | |
| $TAG$jscomp$10$$ = $JSCompiler_StaticMethods_isSampledIn_$self$$.$getName_$(); | |
| if (!$spec$$) return $resolve$jscomp$43$$; | |
| var $sampleOn$$ = $spec$$.sampleOn; | |
| if (!$sampleOn$$) return $JSCompiler_StaticMethods_isSampledIn_$self$$.user().error($TAG$jscomp$10$$, "Invalid sampleOn value."), | |
| $resolve$jscomp$43$$; | |
| var $threshold$jscomp$2$$ = parseFloat($spec$$.threshold); | |
| if (0 <= $threshold$jscomp$2$$ && 100 >= $threshold$jscomp$2$$) return $expansionOptions$jscomp$1_trigger$jscomp$3$$ = $JSCompiler_StaticMethods_expansionOptions_$$($JSCompiler_StaticMethods_isSampledIn_$self$$, {}, $expansionOptions$jscomp$1_trigger$jscomp$3$$), $JSCompiler_StaticMethods_expandTemplateWithUrlParams_$$($JSCompiler_StaticMethods_isSampledIn_$self$$, $sampleOn$$, $expansionOptions$jscomp$1_trigger$jscomp$3$$).then(function($expansionOptions$jscomp$1_trigger$jscomp$3$$) { | |
| return $JSCompiler_StaticMethods_isSampledIn_$self$$.$cryptoService_$.uniform($expansionOptions$jscomp$1_trigger$jscomp$3$$) | |
| }).then(function($JSCompiler_StaticMethods_isSampledIn_$self$$) { | |
| return 100 * | |
| $JSCompiler_StaticMethods_isSampledIn_$self$$ < $threshold$jscomp$2$$ | |
| }); | |
| $user$$module$src$log$$().error($TAG$jscomp$10$$, "Invalid threshold for sampling."); | |
| return $resolve$jscomp$43$$ | |
| } | |
| function $JSCompiler_StaticMethods_checkTriggerEnabled_$$($JSCompiler_StaticMethods_checkTriggerEnabled_$self$$, $trigger$jscomp$4$$, $event$jscomp$30_expansionOptions$jscomp$2$$) { | |
| $event$jscomp$30_expansionOptions$jscomp$2$$ = $JSCompiler_StaticMethods_expansionOptions_$$($JSCompiler_StaticMethods_checkTriggerEnabled_$self$$, $event$jscomp$30_expansionOptions$jscomp$2$$, $trigger$jscomp$4$$); | |
| var $enabledOnTagLevel$$ = $JSCompiler_StaticMethods_checkSpecEnabled_$$($JSCompiler_StaticMethods_checkTriggerEnabled_$self$$, | |
| $JSCompiler_StaticMethods_checkTriggerEnabled_$self$$.$config_$.enabled, $event$jscomp$30_expansionOptions$jscomp$2$$), | |
| $enabledOnTriggerLevel$$ = $JSCompiler_StaticMethods_checkSpecEnabled_$$($JSCompiler_StaticMethods_checkTriggerEnabled_$self$$, $trigger$jscomp$4$$.enabled, $event$jscomp$30_expansionOptions$jscomp$2$$); | |
| return Promise.all([$enabledOnTagLevel$$, $enabledOnTriggerLevel$$]).then(function($JSCompiler_StaticMethods_checkTriggerEnabled_$self$$) { | |
| return $JSCompiler_StaticMethods_checkTriggerEnabled_$self$$[0] && | |
| $JSCompiler_StaticMethods_checkTriggerEnabled_$self$$[1] | |
| }) | |
| } | |
| function $JSCompiler_StaticMethods_checkSpecEnabled_$$($JSCompiler_StaticMethods_checkSpecEnabled_$self$$, $spec$jscomp$1$$, $expansionOptions$jscomp$3$$) { | |
| return void 0 === $spec$jscomp$1$$ ? Promise.resolve(!0) : $JSCompiler_StaticMethods_expandTemplateWithUrlParams_$$($JSCompiler_StaticMethods_checkSpecEnabled_$self$$, $spec$jscomp$1$$, $expansionOptions$jscomp$3$$).then(function($JSCompiler_StaticMethods_checkSpecEnabled_$self$$) { | |
| return "" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ && "0" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ && | |
| "false" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ && "null" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ && "NaN" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ && "undefined" !== $JSCompiler_StaticMethods_checkSpecEnabled_$self$$ | |
| }) | |
| } | |
| function $JSCompiler_StaticMethods_expandTemplateWithUrlParams_$$($JSCompiler_StaticMethods_expandTemplateWithUrlParams_$self$$, $spec$jscomp$2$$, $expansionOptions$jscomp$4$$) { | |
| return $JSCompiler_StaticMethods_expandTemplateWithUrlParams_$self$$.$variableService_$.expandTemplate($spec$jscomp$2$$, $expansionOptions$jscomp$4$$).then(function($spec$jscomp$2$$) { | |
| return $Services$$module$src$services$urlReplacementsForDoc$$($JSCompiler_StaticMethods_expandTemplateWithUrlParams_$self$$.element).expandUrlAsync($spec$jscomp$2$$) | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.$addParamsToUrl_$ = function($request$jscomp$22$$, $paramString$jscomp$1_params$jscomp$9$$) { | |
| var $s$jscomp$17$$ = [], | |
| $k$jscomp$19$$; | |
| for ($k$jscomp$19$$ in $paramString$jscomp$1_params$jscomp$9$$) { | |
| var $sv$jscomp$1_v$jscomp$7$$ = $paramString$jscomp$1_params$jscomp$9$$[$k$jscomp$19$$]; | |
| null != $sv$jscomp$1_v$jscomp$7$$ && ($sv$jscomp$1_v$jscomp$7$$ = this.$variableService_$.encodeVars($k$jscomp$19$$, $sv$jscomp$1_v$jscomp$7$$), $s$jscomp$17$$.push(encodeURIComponent($k$jscomp$19$$) + "=" + $sv$jscomp$1_v$jscomp$7$$)) | |
| } | |
| $paramString$jscomp$1_params$jscomp$9$$ = | |
| $s$jscomp$17$$.join("&"); | |
| return 0 <= $request$jscomp$22$$.indexOf("${extraUrlParams}") ? $request$jscomp$22$$.replace("${extraUrlParams}", $paramString$jscomp$1_params$jscomp$9$$) : $appendEncodedParamStringToUrl$$module$src$url$$($request$jscomp$22$$, $paramString$jscomp$1_params$jscomp$9$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$sendRequest_$ = function($TAG$jscomp$11_request$jscomp$23$$, $JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$) { | |
| if ($TAG$jscomp$11_request$jscomp$23$$) if ($JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$.iframePing) $user$$module$src$log$$().assert("visible" == $JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$.on, "iframePing is only available on page view requests."), $sendRequestUsingIframe$$module$extensions$amp_analytics$0_1$transport$$(this.win, $TAG$jscomp$11_request$jscomp$23$$); | |
| else if (this.$config_$.transport && this.$config_$.transport.iframe) $user$$module$src$log$$().assert(this.$iframeTransport_$, "iframe transport was inadvertently deleted"), this.$iframeTransport_$.sendRequest($TAG$jscomp$11_request$jscomp$23$$); | |
| else { | |
| $JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$ = this.win; | |
| var $JSCompiler_transportOptions$jscomp$inline_913$$ = this.$config_$.transport || {}; | |
| $assertHttpsUrl$$module$src$url$$($TAG$jscomp$11_request$jscomp$23$$, "amp-analytics request"); | |
| $checkCorsUrl$$module$src$url$$($TAG$jscomp$11_request$jscomp$23$$); | |
| $JSCompiler_transportOptions$jscomp$inline_913$$.beacon && $JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$.navigator.sendBeacon && $JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$.navigator.sendBeacon($TAG$jscomp$11_request$jscomp$23$$, "") || $JSCompiler_transportOptions$jscomp$inline_913$$.xhrpost && $Transport$$module$extensions$amp_analytics$0_1$transport$sendRequestUsingXhr$$($JSCompiler_win$jscomp$inline_911_trigger$jscomp$5$$, $TAG$jscomp$11_request$jscomp$23$$) || ($JSCompiler_transportOptions$jscomp$inline_913$$.image ? | |
| $Transport$$module$extensions$amp_analytics$0_1$transport$sendRequestUsingImage$$($TAG$jscomp$11_request$jscomp$23$$) : $user$$module$src$log$$().warn("amp-analytics.Transport", "Failed to send request", $TAG$jscomp$11_request$jscomp$23$$, $JSCompiler_transportOptions$jscomp$inline_913$$)) | |
| } else $TAG$jscomp$11_request$jscomp$23$$ = this.$getName_$(), this.user().error($TAG$jscomp$11_request$jscomp$23$$, "Request not sent. Contents empty.") | |
| }; | |
| $JSCompiler_prototypeAlias$$.$getName_$ = function() { | |
| return "AmpAnalytics " + (this.element.getAttribute("id") || "<unknown id>") | |
| }; | |
| function $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeObjects_$self$$, $from$jscomp$1$$, $to$jscomp$1$$, $opt_predefinedConfig$$) { | |
| if (null === $to$jscomp$1$$ || void 0 === $to$jscomp$1$$) $to$jscomp$1$$ = {}; | |
| $user$$module$src$log$$().assert($opt_predefinedConfig$$ || !$from$jscomp$1$$ || !$from$jscomp$1$$.optout || "_gaUserPrefs.ioo" == $from$jscomp$1$$.optout, "optout property is only available to vendor config."); | |
| for (var $property$jscomp$7$$ in $from$jscomp$1$$) $user$$module$src$log$$().assert($opt_predefinedConfig$$ || | |
| "iframePing" != $property$jscomp$7$$, "iframePing config is only available to vendor config."), $hasOwn_$$module$src$utils$object$$.call($from$jscomp$1$$, $property$jscomp$7$$) && ($isArray$$module$src$types$$($from$jscomp$1$$[$property$jscomp$7$$]) ? ($isArray$$module$src$types$$($to$jscomp$1$$[$property$jscomp$7$$]) || ($to$jscomp$1$$[$property$jscomp$7$$] = []), $to$jscomp$1$$[$property$jscomp$7$$] = $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeObjects_$self$$, $from$jscomp$1$$[$property$jscomp$7$$], | |
| $to$jscomp$1$$[$property$jscomp$7$$], $opt_predefinedConfig$$)) : $isObject$$module$src$types$$($from$jscomp$1$$[$property$jscomp$7$$]) ? ($isObject$$module$src$types$$($to$jscomp$1$$[$property$jscomp$7$$]) || ($to$jscomp$1$$[$property$jscomp$7$$] = {}), $to$jscomp$1$$[$property$jscomp$7$$] = $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_mergeObjects_$self$$, $from$jscomp$1$$[$property$jscomp$7$$], $to$jscomp$1$$[$property$jscomp$7$$], $opt_predefinedConfig$$)) : $to$jscomp$1$$[$property$jscomp$7$$] = | |
| $from$jscomp$1$$[$property$jscomp$7$$]); | |
| return $to$jscomp$1$$ | |
| } | |
| function $JSCompiler_StaticMethods_expansionOptions_$$($JSCompiler_StaticMethods_expansionOptions_$self$$, $source1$$, $source2$$, $opt_iterations$$, $opt_noEncode$$) { | |
| var $vars$jscomp$6$$ = $map$$module$src$utils$object$$(); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_expansionOptions_$self$$, $JSCompiler_StaticMethods_expansionOptions_$self$$.$config_$.vars, $vars$jscomp$6$$); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_expansionOptions_$self$$, $source2$$.vars, | |
| $vars$jscomp$6$$); | |
| $JSCompiler_StaticMethods_mergeObjects_$$($JSCompiler_StaticMethods_expansionOptions_$self$$, $source1$$.vars, $vars$jscomp$6$$); | |
| return new $ExpansionOptions$$module$extensions$amp_analytics$0_1$variables$$($vars$jscomp$6$$, $opt_iterations$$, $opt_noEncode$$) | |
| } | |
| (function($AMP$jscomp$4$$) { | |
| $AMP$jscomp$4$$.registerServiceForDoc("amp-analytics-instrumentation", $InstrumentationService$$module$extensions$amp_analytics$0_1$instrumentation$$); | |
| $AMP$jscomp$4$$.registerServiceForDoc("activity", $Activity$$module$extensions$amp_analytics$0_1$activity_impl$$); | |
| $registerServiceBuilder$$module$src$service$$($AMP$jscomp$4$$.win, "amp-analytics-variables", $VariableService$$module$extensions$amp_analytics$0_1$variables$$); | |
| $AMP$jscomp$4$$.registerElement("amp-analytics", $AmpAnalytics$$module$extensions$amp_analytics$0_1$amp_analytics$$) | |
| })(self.AMP); | |
| function $Signals$$module$src$utils$signals$$() { | |
| this.$map_$ = $map$$module$src$utils$object$$(); | |
| this.$promiseMap_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $Signals$$module$src$utils$signals$$.prototype; | |
| $JSCompiler_prototypeAlias$$.get = function($name$jscomp$100$$) { | |
| return this.$map_$[$name$jscomp$100$$] || null | |
| }; | |
| $JSCompiler_prototypeAlias$$.whenSignal = function($name$jscomp$101$$) { | |
| var $promiseStruct$$ = this.$promiseMap_$ && this.$promiseMap_$[$name$jscomp$101$$]; | |
| if (!$promiseStruct$$) { | |
| var $result$jscomp$20$$ = this.$map_$[$name$jscomp$101$$]; | |
| if (null != $result$jscomp$20$$) $promiseStruct$$ = { | |
| promise: "number" == typeof $result$jscomp$20$$ ? Promise.resolve($result$jscomp$20$$) : Promise.reject($result$jscomp$20$$) | |
| }; | |
| else { | |
| var $resolve$jscomp$44$$, $reject$jscomp$18$$; | |
| $promiseStruct$$ = { | |
| promise: new Promise(function($name$jscomp$101$$, | |
| $promiseStruct$$) { | |
| $resolve$jscomp$44$$ = $name$jscomp$101$$; | |
| $reject$jscomp$18$$ = $promiseStruct$$ | |
| }), | |
| resolve: $resolve$jscomp$44$$, | |
| reject: $reject$jscomp$18$$ | |
| } | |
| } | |
| this.$promiseMap_$ || (this.$promiseMap_$ = $map$$module$src$utils$object$$()); | |
| this.$promiseMap_$[$name$jscomp$101$$] = $promiseStruct$$ | |
| } | |
| return $promiseStruct$$.promise | |
| }; | |
| $JSCompiler_prototypeAlias$$.signal = function($name$jscomp$102_promiseStruct$jscomp$1$$, $opt_time$$) { | |
| if (null == this.$map_$[$name$jscomp$102_promiseStruct$jscomp$1$$]) { | |
| var $time$jscomp$5$$ = $opt_time$$ || Date.now(); | |
| this.$map_$[$name$jscomp$102_promiseStruct$jscomp$1$$] = $time$jscomp$5$$; | |
| ($name$jscomp$102_promiseStruct$jscomp$1$$ = this.$promiseMap_$ && this.$promiseMap_$[$name$jscomp$102_promiseStruct$jscomp$1$$]) && $name$jscomp$102_promiseStruct$jscomp$1$$.resolve && ($name$jscomp$102_promiseStruct$jscomp$1$$.resolve($time$jscomp$5$$), | |
| $name$jscomp$102_promiseStruct$jscomp$1$$.resolve = void 0, $name$jscomp$102_promiseStruct$jscomp$1$$.reject = void 0) | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.rejectSignal = function($name$jscomp$103_promiseStruct$jscomp$2$$, $error$jscomp$42$$) { | |
| null == this.$map_$[$name$jscomp$103_promiseStruct$jscomp$2$$] && (this.$map_$[$name$jscomp$103_promiseStruct$jscomp$2$$] = $error$jscomp$42$$, ($name$jscomp$103_promiseStruct$jscomp$2$$ = this.$promiseMap_$ && this.$promiseMap_$[$name$jscomp$103_promiseStruct$jscomp$2$$]) && $name$jscomp$103_promiseStruct$jscomp$2$$.reject && ($name$jscomp$103_promiseStruct$jscomp$2$$.reject($error$jscomp$42$$), $name$jscomp$103_promiseStruct$jscomp$2$$.resolve = | |
| void 0, $name$jscomp$103_promiseStruct$jscomp$2$$.reject = void 0)) | |
| }; | |
| $JSCompiler_prototypeAlias$$.reset = function($name$jscomp$104$$) { | |
| this.$map_$[$name$jscomp$104$$] && delete this.$map_$[$name$jscomp$104$$]; | |
| var $promiseStruct$jscomp$3$$ = this.$promiseMap_$ && this.$promiseMap_$[$name$jscomp$104$$]; | |
| $promiseStruct$jscomp$3$$ && !$promiseStruct$jscomp$3$$.resolve && delete this.$promiseMap_$[$name$jscomp$104$$] | |
| }; | |
| var $EXCLUDE_INI_LOAD$$module$src$friendly_iframe_embed$$ = ["AMP-AD", "AMP-ANALYTICS", "AMP-PIXEL"]; | |
| function $whenContentIniLoad$$module$src$friendly_iframe_embed$$($context$jscomp$14$$, $hostWin$$, $rect$jscomp$4$$) { | |
| return $Services$$module$src$services$resourcesForDoc$$($context$jscomp$14$$).getResourcesInRect($hostWin$$, $rect$jscomp$4$$).then(function($context$jscomp$14$$) { | |
| var $hostWin$$ = []; | |
| $context$jscomp$14$$.forEach(function($context$jscomp$14$$) { | |
| $EXCLUDE_INI_LOAD$$module$src$friendly_iframe_embed$$.includes($context$jscomp$14$$.element.tagName) || $hostWin$$.push($context$jscomp$14$$.loadedOnce()) | |
| }); | |
| return Promise.all($hostWin$$) | |
| }) | |
| }; | |
| function $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$($ampdoc$jscomp$25$$, $parent$jscomp$18$$) { | |
| this.ampdoc = $ampdoc$jscomp$25$$; | |
| this.parent = $parent$jscomp$18$$; | |
| this.$trackers_$ = $map$$module$src$utils$object$$(); | |
| this.$visibilityManager_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$.prototype; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| for (var $k$jscomp$20$$ in this.$trackers_$) this.$trackers_$[$k$jscomp$20$$].dispose(), delete this.$trackers_$[$k$jscomp$20$$]; | |
| this.$visibilityManager_$ && this.$visibilityManager_$.dispose() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getType = function() {}; | |
| $JSCompiler_prototypeAlias$$.getRoot = function() {}; | |
| $JSCompiler_prototypeAlias$$.getViewer = function() { | |
| return $Services$$module$src$services$viewerForDoc$$(this.ampdoc) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getRootElement = function() { | |
| var $root$jscomp$26$$ = this.getRoot(); | |
| return $root$jscomp$26$$.documentElement || $root$jscomp$26$$.body || $root$jscomp$26$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getHostElement = function() {}; | |
| $JSCompiler_prototypeAlias$$.signals = function() {}; | |
| $JSCompiler_prototypeAlias$$.contains = function($node$jscomp$28$$) { | |
| return this.getRoot().contains($node$jscomp$28$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementById = function() {}; | |
| $JSCompiler_prototypeAlias$$.getTrackerForWhitelist = function($name$jscomp$105$$, $whitelist$jscomp$1$$) { | |
| var $trackerProfile$$ = $whitelist$jscomp$1$$[$name$jscomp$105$$]; | |
| return $trackerProfile$$ ? this.getTracker($name$jscomp$105$$, $trackerProfile$$) : null | |
| }; | |
| $JSCompiler_prototypeAlias$$.getTracker = function($name$jscomp$106$$, $klass$jscomp$1$$) { | |
| var $tracker$$ = this.$trackers_$[$name$jscomp$106$$]; | |
| $tracker$$ || ($tracker$$ = new $klass$jscomp$1$$(this), this.$trackers_$[$name$jscomp$106$$] = $tracker$$); | |
| return $tracker$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getTrackerOptional = function($name$jscomp$107$$) { | |
| return this.$trackers_$[$name$jscomp$107$$] || null | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElement = function($context$jscomp$15$$, $selector$jscomp$16$$, $selectionMethod$jscomp$6$$) { | |
| var $$jscomp$this$jscomp$143$$ = this; | |
| $selectionMethod$jscomp$6$$ = void 0 === $selectionMethod$jscomp$6$$ ? null : $selectionMethod$jscomp$6$$; | |
| return ":root" == $selector$jscomp$16$$ ? Promise.resolve(this.getRootElement()) : ":host" == $selector$jscomp$16$$ ? new Promise(function($context$jscomp$15$$) { | |
| $context$jscomp$15$$($user$$module$src$log$$().assertElement($$jscomp$this$jscomp$143$$.getHostElement(), 'Element "' + | |
| $selector$jscomp$16$$ + '" not found')) | |
| }) : this.ampdoc.whenReady().then(function() { | |
| var $found$jscomp$1$$, $result$jscomp$22$$ = null; | |
| ($found$jscomp$1$$ = "scope" == $selectionMethod$jscomp$6$$ ? $scopedQuerySelector$$module$src$dom$$($context$jscomp$15$$, $selector$jscomp$16$$) : "closest" == $selectionMethod$jscomp$6$$ ? $closestBySelector$$module$src$dom$$($context$jscomp$15$$, $selector$jscomp$16$$) : $$jscomp$this$jscomp$143$$.getRoot().querySelector($selector$jscomp$16$$)) && $$jscomp$this$jscomp$143$$.contains($found$jscomp$1$$) && | |
| ($result$jscomp$22$$ = $found$jscomp$1$$); | |
| return $user$$module$src$log$$().assertElement($result$jscomp$22$$, 'Element "' + $selector$jscomp$16$$ + '" not found') | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAmpElement = function($context$jscomp$16$$, $selector$jscomp$17$$, $selectionMethod$jscomp$7$$) { | |
| return this.getElement($context$jscomp$16$$, $selector$jscomp$17$$, $selectionMethod$jscomp$7$$).then(function($context$jscomp$16$$) { | |
| $user$$module$src$log$$().assert($context$jscomp$16$$.classList.contains("i-amphtml-element"), 'Element "%s" is required to be an AMP element', $selector$jscomp$17$$); | |
| return $context$jscomp$16$$ | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.createSelectiveListener = function($listener$jscomp$75$$, $context$jscomp$17$$, $selector$jscomp$18$$, $selectionMethod$jscomp$8$$) { | |
| var $$jscomp$this$jscomp$144$$ = this; | |
| $selectionMethod$jscomp$8$$ = void 0 === $selectionMethod$jscomp$8$$ ? null : $selectionMethod$jscomp$8$$; | |
| return function($event$jscomp$31$$) { | |
| if (":host" != $selector$jscomp$18$$) for (var $rootElement$$ = $$jscomp$this$jscomp$144$$.getRootElement(), $isSelectAny$$ = "*" == $selector$jscomp$18$$, $isSelectRoot$$ = ":root" == $selector$jscomp$18$$, | |
| $target$jscomp$78$$ = $event$jscomp$31$$.target; $target$jscomp$78$$ && $$jscomp$this$jscomp$144$$.contains($target$jscomp$78$$) && ("scope" != $selectionMethod$jscomp$8$$ || $isSelectRoot$$ || $context$jscomp$17$$.contains($target$jscomp$78$$));) { | |
| if ("closest" != $selectionMethod$jscomp$8$$ || $target$jscomp$78$$.contains($context$jscomp$17$$)) { | |
| var $JSCompiler_temp$jscomp$300$$; | |
| if (!($JSCompiler_temp$jscomp$300$$ = $isSelectAny$$ || $isSelectRoot$$ && $target$jscomp$78$$ == $rootElement$$)) { | |
| var $JSCompiler_selector$jscomp$inline_920$$ = | |
| $selector$jscomp$18$$; | |
| try { | |
| $JSCompiler_temp$jscomp$300$$ = $matches$$module$src$dom$$($target$jscomp$78$$, $JSCompiler_selector$jscomp$inline_920$$) | |
| } catch ($JSCompiler_e$jscomp$inline_921$$) { | |
| $user$$module$src$log$$().error("amp-analytics", "Bad query selector.", $JSCompiler_selector$jscomp$inline_920$$, $JSCompiler_e$jscomp$inline_921$$), $JSCompiler_temp$jscomp$300$$ = !1 | |
| } | |
| } | |
| if ($JSCompiler_temp$jscomp$300$$) { | |
| $listener$jscomp$75$$($target$jscomp$78$$, $event$jscomp$31$$); | |
| break | |
| } | |
| } | |
| $target$jscomp$78$$ = $target$jscomp$78$$.parentElement | |
| } | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.whenIniLoaded = function() {}; | |
| $JSCompiler_prototypeAlias$$.getVisibilityManager = function() { | |
| this.$visibilityManager_$ || (this.$visibilityManager_$ = this.createVisibilityManager()); | |
| return this.$visibilityManager_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.createVisibilityManager = function() {}; | |
| function $AmpdocAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$($ampdoc$jscomp$26$$) { | |
| $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$.call(this, $ampdoc$jscomp$26$$, null) | |
| } | |
| $$jscomp$inherits$$($AmpdocAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$, $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$); | |
| $JSCompiler_prototypeAlias$$ = $AmpdocAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getType = function() { | |
| return "ampdoc" | |
| }; | |
| $JSCompiler_prototypeAlias$$.getRoot = function() { | |
| return this.ampdoc.getRootNode() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getHostElement = function() { | |
| return null | |
| }; | |
| $JSCompiler_prototypeAlias$$.signals = function() { | |
| return this.ampdoc.signals() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementById = function($id$jscomp$46$$) { | |
| return this.ampdoc.getElementById($id$jscomp$46$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.whenIniLoaded = function() { | |
| var $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$ = $Services$$module$src$services$viewportForDoc$$(this.ampdoc); | |
| "inabox" == $getMode$$module$src$mode$$(this.ampdoc.win).runtime ? $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$ = $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$.getLayoutRect(this.getRootElement()) : ($rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$ = $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$.getSize(), $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$ = | |
| $layoutRectLtwh$$module$src$layout_rect$$(0, 0, $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$.width, $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$.height)); | |
| return $whenContentIniLoad$$module$src$friendly_iframe_embed$$(this.ampdoc, this.ampdoc.win, $rect$jscomp$5_size$jscomp$14_viewport$jscomp$2$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.createVisibilityManager = function() { | |
| return new $VisibilityManagerForDoc$$module$extensions$amp_analytics$0_1$visibility_manager$$(this.ampdoc) | |
| }; | |
| function $EmbedAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$($ampdoc$jscomp$27$$, $embed$jscomp$2$$, $parent$jscomp$19$$) { | |
| $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$.call(this, $ampdoc$jscomp$27$$, $parent$jscomp$19$$); | |
| this.embed = $embed$jscomp$2$$ | |
| } | |
| $$jscomp$inherits$$($EmbedAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$, $AnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$); | |
| $JSCompiler_prototypeAlias$$ = $EmbedAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getType = function() { | |
| return "embed" | |
| }; | |
| $JSCompiler_prototypeAlias$$.getRoot = function() { | |
| return this.embed.win.document | |
| }; | |
| $JSCompiler_prototypeAlias$$.getHostElement = function() { | |
| return this.embed.iframe | |
| }; | |
| $JSCompiler_prototypeAlias$$.signals = function() { | |
| return this.embed.signals() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementById = function($id$jscomp$47$$) { | |
| return this.embed.win.document.getElementById($id$jscomp$47$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.whenIniLoaded = function() { | |
| return this.embed.whenIniLoaded() | |
| }; | |
| $JSCompiler_prototypeAlias$$.createVisibilityManager = function() { | |
| return new $VisibilityManagerForEmbed$$module$extensions$amp_analytics$0_1$visibility_manager$$(this.parent.getVisibilityManager(), this.embed) | |
| }; | |
| var $ALLOWED_IN_EMBED$$module$extensions$amp_analytics$0_1$instrumentation$$ = ["visible", "click", "timer", "hidden"]; | |
| function $InstrumentationService$$module$extensions$amp_analytics$0_1$instrumentation$$($ampdoc$jscomp$28$$) { | |
| this.ampdoc = $ampdoc$jscomp$28$$; | |
| this.$ampdocRoot_$ = new $AmpdocAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$(this.ampdoc); | |
| this.$viewport_$ = $Services$$module$src$services$viewportForDoc$$(this.ampdoc); | |
| this.$scrollHandlerRegistered_$ = !1; | |
| this.$scrollObservable_$ = new $Observable$$module$src$observable$$ | |
| } | |
| $JSCompiler_prototypeAlias$$ = $InstrumentationService$$module$extensions$amp_analytics$0_1$instrumentation$$.prototype; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| this.$ampdocRoot_$.dispose() | |
| }; | |
| $JSCompiler_prototypeAlias$$.getAnalyticsRoot = function($context$jscomp$18$$) { | |
| return $JSCompiler_StaticMethods_findRoot_$$(this, $context$jscomp$18$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.createAnalyticsGroup = function($analyticsElement$jscomp$1$$) { | |
| var $root$jscomp$27$$ = $JSCompiler_StaticMethods_findRoot_$$(this, $analyticsElement$jscomp$1$$); | |
| return new $AnalyticsGroup$$module$extensions$amp_analytics$0_1$instrumentation$$($root$jscomp$27$$, $analyticsElement$jscomp$1$$, this) | |
| }; | |
| $JSCompiler_prototypeAlias$$.triggerEventForTarget = function($target$jscomp$79$$, $event$jscomp$32_eventType$jscomp$32$$, $opt_vars$jscomp$4$$) { | |
| $event$jscomp$32_eventType$jscomp$32$$ = new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($target$jscomp$79$$, $event$jscomp$32_eventType$jscomp$32$$, $opt_vars$jscomp$4$$); | |
| $JSCompiler_StaticMethods_findRoot_$$(this, $target$jscomp$79$$).getTracker("custom", $CustomEventTracker$$module$extensions$amp_analytics$0_1$events$$).trigger($event$jscomp$32_eventType$jscomp$32$$) | |
| }; | |
| function $JSCompiler_StaticMethods_findRoot_$$($JSCompiler_StaticMethods_findRoot_$self$$, $context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$) { | |
| if ($context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$ = $getParentWindowFrameElement$$module$src$service$$($context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$, $JSCompiler_StaticMethods_findRoot_$self$$.ampdoc.win)) if ($context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$ = $context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$.__AMP_EMBED__) { | |
| var $embedNotNull$$ = $context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$; | |
| return $JSCompiler_StaticMethods_getOrCreateRoot_$$($context$jscomp$19_embed$jscomp$3_frame$jscomp$2$$, function() { | |
| return new $EmbedAnalyticsRoot$$module$extensions$amp_analytics$0_1$analytics_root$$($JSCompiler_StaticMethods_findRoot_$self$$.ampdoc, $embedNotNull$$, $JSCompiler_StaticMethods_findRoot_$self$$.$ampdocRoot_$) | |
| }) | |
| } | |
| return $JSCompiler_StaticMethods_findRoot_$self$$.$ampdocRoot_$ | |
| } | |
| function $JSCompiler_StaticMethods_getOrCreateRoot_$$($holder$jscomp$11$$, $factory$$) { | |
| var $root$jscomp$29$$ = $holder$jscomp$11$$.__AMP_AN_ROOT; | |
| $root$jscomp$29$$ || ($root$jscomp$29$$ = $factory$$(), $holder$jscomp$11$$.__AMP_AN_ROOT = $root$jscomp$29$$); | |
| return $root$jscomp$29$$ | |
| } | |
| $JSCompiler_prototypeAlias$$.$onScroll_$ = function($e$jscomp$62$$) { | |
| this.$scrollObservable_$.fire($e$jscomp$62$$) | |
| }; | |
| function $JSCompiler_StaticMethods_registerScrollTrigger_$$($JSCompiler_StaticMethods_registerScrollTrigger_$self$$, $config$jscomp$28$$, $listener$jscomp$77$$) { | |
| if (Array.isArray($config$jscomp$28$$.verticalBoundaries) || Array.isArray($config$jscomp$28$$.horizontalBoundaries)) { | |
| $JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$scrollHandlerRegistered_$ || ($JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$scrollHandlerRegistered_$ = !0, $JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$viewport_$.onChanged($JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$onScroll_$.bind($JSCompiler_StaticMethods_registerScrollTrigger_$self$$))); | |
| var $triggerScrollEvents$$ = function($config$jscomp$28$$, $triggerScrollEvents$$, $boundsV$$) { | |
| if ($triggerScrollEvents$$) for (var $boundsH$$ in $config$jscomp$28$$) if (!(!$config$jscomp$28$$.hasOwnProperty($boundsH$$) || $boundsH$$ > $triggerScrollEvents$$ || $config$jscomp$28$$[$boundsH$$])) { | |
| $config$jscomp$28$$[$boundsH$$] = !0; | |
| var $JSCompiler_inline_result$jscomp$301_vars$jscomp$7$$ = Object.create(null); | |
| $JSCompiler_inline_result$jscomp$301_vars$jscomp$7$$[$boundsV$$] = $boundsH$$; | |
| $JSCompiler_inline_result$jscomp$301_vars$jscomp$7$$ = | |
| new $AnalyticsEvent$$module$extensions$amp_analytics$0_1$events$$($JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$ampdocRoot_$.getRootElement(), "scroll", $JSCompiler_inline_result$jscomp$301_vars$jscomp$7$$); | |
| $listener$jscomp$77$$($JSCompiler_inline_result$jscomp$301_vars$jscomp$7$$) | |
| } | |
| }, $boundsV$$ = $JSCompiler_StaticMethods_normalizeBoundaries_$$($config$jscomp$28$$.verticalBoundaries), | |
| $boundsH$$ = $JSCompiler_StaticMethods_normalizeBoundaries_$$($config$jscomp$28$$.horizontalBoundaries); | |
| $JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$scrollObservable_$.add(function($config$jscomp$28$$) { | |
| $triggerScrollEvents$$($boundsV$$, | |
| 100 * ($config$jscomp$28$$.top + $config$jscomp$28$$.height) / $JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$viewport_$.getScrollHeight(), "verticalScrollBoundary"); | |
| $triggerScrollEvents$$($boundsH$$, 100 * ($config$jscomp$28$$.left + $config$jscomp$28$$.width) / $JSCompiler_StaticMethods_registerScrollTrigger_$self$$.$viewport_$.getScrollWidth(), "horizontalScrollBoundary") | |
| }) | |
| } else $user$$module$src$log$$().error("Analytics.Instrumentation", "Boundaries are required for the scroll trigger to work.") | |
| } | |
| function $JSCompiler_StaticMethods_normalizeBoundaries_$$($bounds$jscomp$1$$) { | |
| var $result$jscomp$23$$ = {}; | |
| if (!$bounds$jscomp$1$$ || !Array.isArray($bounds$jscomp$1$$)) return $result$jscomp$23$$; | |
| for (var $b$jscomp$4$$ = 0; $b$jscomp$4$$ < $bounds$jscomp$1$$.length; $b$jscomp$4$$++) { | |
| var $bound$jscomp$2$$ = $bounds$jscomp$1$$[$b$jscomp$4$$]; | |
| if ("number" !== typeof $bound$jscomp$2$$ || !isFinite($bound$jscomp$2$$)) { | |
| $user$$module$src$log$$().error("Analytics.Instrumentation", "Scroll trigger boundaries must be finite."); | |
| break | |
| } | |
| $bound$jscomp$2$$ = Math.min(5 * Math.round($bound$jscomp$2$$ / 5), 100); | |
| $result$jscomp$23$$[$bound$jscomp$2$$] = !1 | |
| } | |
| return $result$jscomp$23$$ | |
| } | |
| function $AnalyticsGroup$$module$extensions$amp_analytics$0_1$instrumentation$$($root$jscomp$30$$, $analyticsElement$jscomp$3$$, $service$jscomp$14$$) { | |
| this.$root_$ = $root$jscomp$30$$; | |
| this.$analyticsElement_$ = $analyticsElement$jscomp$3$$; | |
| this.$service_$ = $service$jscomp$14$$; | |
| this.$listeners_$ = [] | |
| } | |
| $AnalyticsGroup$$module$extensions$amp_analytics$0_1$instrumentation$$.prototype.dispose = function() { | |
| this.$listeners_$.forEach(function($listener$jscomp$78$$) { | |
| $listener$jscomp$78$$() | |
| }) | |
| }; | |
| $AnalyticsGroup$$module$extensions$amp_analytics$0_1$instrumentation$$.prototype.addTrigger = function($JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$, $handler$jscomp$9$$) { | |
| var $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$ = $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.on, | |
| $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$ = $getTrackerKeyName$$module$extensions$amp_analytics$0_1$events$$($JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$), | |
| $trackerWhitelist$jscomp$1$$ = $getTrackerTypesForParentType$$module$extensions$amp_analytics$0_1$events$$(this.$root_$.getType()); | |
| this.isDeprecatedListenerEvent($JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$) ? ($JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$ = this.$service_$, $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$ = $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.on, this.$analyticsElement_$.ownerDocument.defaultView == | |
| $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$.ampdoc.win || $ALLOWED_IN_EMBED$$module$extensions$amp_analytics$0_1$instrumentation$$.includes($JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$)) ? "scroll" === $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$ && ($JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.scrollSpec ? ($JSCompiler_StaticMethods_registerScrollTrigger_$$($JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$, | |
| $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.scrollSpec, $handler$jscomp$9$$), $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$ = $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$.$viewport_$.getSize(), $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$.$onScroll_$({ | |
| top: $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$.$viewport_$.getScrollTop(), | |
| left: $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$.$viewport_$.getScrollLeft(), | |
| width: $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.width, | |
| height: $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$.height, | |
| relayoutAll: !1, | |
| velocity: 0 | |
| })) : $user$$module$src$log$$().error("Analytics.Instrumentation", "Missing scrollSpec on scroll trigger.")) : $user$$module$src$log$$().error("Analytics.Instrumentation", 'Trigger type "' + | |
| $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$ + '" is not allowed in the embed.') : ($JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$ = this.$root_$.getTrackerForWhitelist($JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$, $trackerWhitelist$jscomp$1$$), $user$$module$src$log$$().assert( !! $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$, 'Trigger type "%s" is not allowed in the %s', $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$, | |
| this.$root_$.getType()), $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$ = $JSCompiler_eventType$jscomp$inline_931_tracker$jscomp$2_trackerKey$jscomp$1$$.add(this.$analyticsElement_$, $JSCompiler_StaticMethods_addListenerDepr_$self$jscomp$inline_927_eventType$jscomp$34$$, $JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$, $handler$jscomp$9$$), this.$listeners_$.push($JSCompiler_size$jscomp$inline_932_config$jscomp$29_unlisten$jscomp$10$$)) | |
| }; | |
| $AnalyticsGroup$$module$extensions$amp_analytics$0_1$instrumentation$$.prototype.isDeprecatedListenerEvent = function($triggerType$jscomp$3$$) { | |
| return "scroll" == $triggerType$jscomp$3$$ | |
| }; | |
| var $SANDBOX_AVAILABLE_VARS$$module$extensions$amp_analytics$0_1$sandbox_vars_whitelist$$ = { | |
| RANDOM: !0, | |
| CANONICAL_URL: !0, | |
| CANONICAL_HOST: !0, | |
| CANONICAL_HOSTNAME: !0, | |
| CANONICAL_PATH: !0, | |
| AMPDOC_URL: !0, | |
| AMPDOC_HOST: !0, | |
| AMPDOC_HOSTNAME: !0, | |
| SOURCE_URL: !0, | |
| SOURCE_HOST: !0, | |
| SOURCE_HOSTNAME: !0, | |
| SOURCE_PATH: !0, | |
| TIMESTAMP: !0, | |
| TIMEZONE: !0, | |
| VIEWPORT_HEIGHT: !0, | |
| VIEWPORT_WIDTH: !0, | |
| SCREEN_WIDTH: !0, | |
| SCREEN_HEIGHT: !0, | |
| AVAILABLE_SCREEN_HEIGHT: !0, | |
| AVAILABLE_SCREEN_WIDTH: !0, | |
| SCREEN_COLOR_DEPTH: !0, | |
| DOCUMENT_CHARSET: !0, | |
| BROWSER_LANGUAGE: !0, | |
| AMP_VERSION: !0, | |
| BACKGROUND_STATE: !0, | |
| USER_AGENT: !0 | |
| }; | |
| function $RequestHandler$$module$extensions$amp_analytics$0_1$requests$$($ampdoc$jscomp$29$$, $request$jscomp$24$$, $preconnect$jscomp$2$$, $handler$jscomp$10$$, $isSandbox$$) { | |
| this.win = $ampdoc$jscomp$29$$.win; | |
| this.baseUrl = $request$jscomp$24$$.baseUrl; | |
| this.$maxDelay_$ = Number($request$jscomp$24$$.maxDelay) || 0; | |
| this.$variableService_$ = $getService$$module$src$service$$(this.win, "amp-analytics-variables"); | |
| this.$urlReplacementService_$ = $Services$$module$src$services$urlReplacementsForDoc$$($ampdoc$jscomp$29$$); | |
| this.$baseUrlTemplatePromise_$ = this.$baseUrlPromise_$ = null; | |
| this.$extraUrlParamsPromise_$ = []; | |
| this.$preconnect_$ = $preconnect$jscomp$2$$; | |
| this.$handler_$ = $handler$jscomp$10$$; | |
| this.$whiteList_$ = $isSandbox$$ ? $SANDBOX_AVAILABLE_VARS$$module$extensions$amp_analytics$0_1$sandbox_vars_whitelist$$ : void 0; | |
| this.$sendPromise_$ = this.$lastTrigger_$ = this.$timeoutId_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $RequestHandler$$module$extensions$amp_analytics$0_1$requests$$.prototype; | |
| $JSCompiler_prototypeAlias$$.send = function($configParams$$, $trigger$jscomp$6$$, $expansionOption$$) { | |
| var $$jscomp$this$jscomp$147$$ = this; | |
| this.$lastTrigger_$ = $trigger$jscomp$6$$; | |
| var $triggerParams$$ = $trigger$jscomp$6$$.extraUrlParams; | |
| this.$baseUrlPromise_$ || ($expansionOption$$.freezeVar("extraUrlParams"), this.$baseUrlTemplatePromise_$ = this.$variableService_$.expandTemplate(this.baseUrl, $expansionOption$$), this.$baseUrlPromise_$ = this.$baseUrlTemplatePromise_$.then(function($configParams$$) { | |
| return $$jscomp$this$jscomp$147$$.$urlReplacementService_$.expandAsync($configParams$$, | |
| void 0, $$jscomp$this$jscomp$147$$.$whiteList_$) | |
| })); | |
| this.$extraUrlParamsPromise_$.push($JSCompiler_StaticMethods_expandExtraUrlParams_$$(this, $configParams$$, $triggerParams$$, $expansionOption$$).then(function($configParams$$) { | |
| return $$jscomp$this$jscomp$147$$.$urlReplacementService_$.expandAsync($configParams$$, void 0, $$jscomp$this$jscomp$147$$.$whiteList_$) | |
| }).then(function($configParams$$) { | |
| return $configParams$$ | |
| })); | |
| return this.$trigger_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| this.$timeoutId_$ && this.win.clearTimeout(this.$timeoutId_$); | |
| this.$reset_$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.$trigger_$ = function() { | |
| var $$jscomp$this$jscomp$148$$ = this; | |
| return 0 == this.$maxDelay_$ ? this.$fire_$() : this.$timeoutId_$ ? this.$sendPromise_$ : this.$sendPromise_$ = new Promise(function($resolve$jscomp$48$$) { | |
| $$jscomp$this$jscomp$148$$.$timeoutId_$ = $$jscomp$this$jscomp$148$$.win.setTimeout(function() { | |
| $$jscomp$this$jscomp$148$$.$fire_$().then(function($$jscomp$this$jscomp$148$$) { | |
| $resolve$jscomp$48$$($$jscomp$this$jscomp$148$$) | |
| }) | |
| }, 1E3 * $$jscomp$this$jscomp$148$$.$maxDelay_$) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$fire_$ = function() { | |
| var $$jscomp$this$jscomp$149$$ = this, | |
| $extraUrlParamsPromise$$ = this.$extraUrlParamsPromise_$, | |
| $baseUrlTemplatePromise$$ = this.$baseUrlTemplatePromise_$, | |
| $baseUrlPromise$$ = this.$baseUrlPromise_$, | |
| $lastTrigger$$ = this.$lastTrigger_$; | |
| this.$reset_$(); | |
| return Promise.all($extraUrlParamsPromise$$).then(function($extraUrlParamsPromise$$) { | |
| $filterSplice$$module$src$utils$array$$($extraUrlParamsPromise$$, function($$jscomp$this$jscomp$149$$) { | |
| return !!$$jscomp$this$jscomp$149$$ | |
| }); | |
| var $paramStrs$$ = $extraUrlParamsPromise$$.join("&"), | |
| $preUrl$$ = $$jscomp$this$jscomp$149$$.baseUrl; | |
| $preUrl$$ = 0 <= $preUrl$$.indexOf("${extraUrlParams}") ? $preUrl$$.replace("${extraUrlParams}", $paramStrs$$) : $appendEncodedParamStringToUrl$$module$src$url$$($preUrl$$, $paramStrs$$); | |
| return $baseUrlTemplatePromise$$.then(function($extraUrlParamsPromise$$) { | |
| $$jscomp$this$jscomp$149$$.$preconnect_$.url($extraUrlParamsPromise$$, !0); | |
| return $baseUrlPromise$$.then(function($$jscomp$this$jscomp$149$$) { | |
| return $$jscomp$this$jscomp$149$$ = | |
| 0 <= $$jscomp$this$jscomp$149$$.indexOf("${extraUrlParams}") ? $$jscomp$this$jscomp$149$$.replace("${extraUrlParams}", $paramStrs$$) : $appendEncodedParamStringToUrl$$module$src$url$$($$jscomp$this$jscomp$149$$, $paramStrs$$) | |
| }).then(function($extraUrlParamsPromise$$) { | |
| $$jscomp$this$jscomp$149$$.$handler_$($extraUrlParamsPromise$$, $lastTrigger$$); | |
| return $extraUrlParamsPromise$$ | |
| }) | |
| }) | |
| }) | |
| }; | |
| $JSCompiler_prototypeAlias$$.$reset_$ = function() { | |
| this.$baseUrlTemplatePromise_$ = this.$baseUrlPromise_$ = null; | |
| this.$extraUrlParamsPromise_$ = []; | |
| this.$sendPromise_$ = this.$lastTrigger_$ = this.$timeoutId_$ = null | |
| }; | |
| function $JSCompiler_StaticMethods_expandExtraUrlParams_$$($JSCompiler_StaticMethods_expandExtraUrlParams_$self$$, $$jscomp$loop$187_configParams$jscomp$1$$, $triggerParams$jscomp$1$$, $expansionOption$jscomp$1$$) { | |
| var $requestPromises$$ = [], | |
| $params$jscomp$10$$ = $map$$module$src$utils$object$$(), | |
| $option$$ = new $ExpansionOptions$$module$extensions$amp_analytics$0_1$variables$$($expansionOption$jscomp$1$$.vars, $expansionOption$jscomp$1$$.iterations, !0); | |
| if ($$jscomp$loop$187_configParams$jscomp$1$$ || $triggerParams$jscomp$1$$) { | |
| Object.assign($params$jscomp$10$$, | |
| $$jscomp$loop$187_configParams$jscomp$1$$, $triggerParams$jscomp$1$$); | |
| $$jscomp$loop$187_configParams$jscomp$1$$ = {}; | |
| for (var $k$jscomp$21$$ in $params$jscomp$10$$) $$jscomp$loop$187_configParams$jscomp$1$$.k = $k$jscomp$21$$, "string" == typeof $params$jscomp$10$$[$$jscomp$loop$187_configParams$jscomp$1$$.k] && $requestPromises$$.push($JSCompiler_StaticMethods_expandExtraUrlParams_$self$$.$variableService_$.expandTemplate($params$jscomp$10$$[$$jscomp$loop$187_configParams$jscomp$1$$.k], $option$$).then(function($JSCompiler_StaticMethods_expandExtraUrlParams_$self$$) { | |
| return function($$jscomp$loop$187_configParams$jscomp$1$$) { | |
| $params$jscomp$10$$[$JSCompiler_StaticMethods_expandExtraUrlParams_$self$$.k] = | |
| $$jscomp$loop$187_configParams$jscomp$1$$ | |
| } | |
| }($$jscomp$loop$187_configParams$jscomp$1$$))), $$jscomp$loop$187_configParams$jscomp$1$$ = { | |
| k: $$jscomp$loop$187_configParams$jscomp$1$$.k | |
| } | |
| } | |
| return Promise.all($requestPromises$$).then(function() { | |
| var $$jscomp$loop$187_configParams$jscomp$1$$ = [], | |
| $triggerParams$jscomp$1$$; | |
| for ($triggerParams$jscomp$1$$ in $params$jscomp$10$$) { | |
| var $expansionOption$jscomp$1$$ = $params$jscomp$10$$[$triggerParams$jscomp$1$$]; | |
| null != $expansionOption$jscomp$1$$ && ($expansionOption$jscomp$1$$ = | |
| $JSCompiler_StaticMethods_expandExtraUrlParams_$self$$.$variableService_$.encodeVars($triggerParams$jscomp$1$$, $expansionOption$jscomp$1$$), $$jscomp$loop$187_configParams$jscomp$1$$.push(encodeURIComponent($triggerParams$jscomp$1$$) + "=" + $expansionOption$jscomp$1$$)) | |
| } | |
| return $$jscomp$loop$187_configParams$jscomp$1$$.join("&") | |
| }) | |
| } | |
| function $expandConfigRequest$$module$extensions$amp_analytics$0_1$requests$$($config$jscomp$30$$) { | |
| if (!$config$jscomp$30$$.requests) return $config$jscomp$30$$; | |
| for (var $k$jscomp$23$$ in $config$jscomp$30$$.requests) if ($hasOwn_$$module$src$utils$object$$.call($config$jscomp$30$$.requests, $k$jscomp$23$$)) { | |
| var $JSCompiler_temp_const$jscomp$304$$ = $config$jscomp$30$$.requests; | |
| var $JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$ = $config$jscomp$30$$.requests[$k$jscomp$23$$]; | |
| $JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$ = | |
| $isObject$$module$src$types$$($JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$) ? $JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$ : { | |
| baseUrl: $JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$ | |
| }; | |
| $JSCompiler_temp_const$jscomp$304$$[$k$jscomp$23$$] = $JSCompiler_inline_result$jscomp$305_JSCompiler_request$jscomp$inline_941$$ | |
| } | |
| return $config$jscomp$30$$ | |
| }; | |
| var $VARIABLE_ARGS_REGEXP$$module$extensions$amp_analytics$0_1$variables$$ = /^(?:([^\s]*)(\([^)]*\))|[^]+)$/; | |
| function $Filter$$module$extensions$amp_analytics$0_1$variables$$($filter$jscomp$4$$, $opt_allowNull$$) { | |
| this.filter = $filter$jscomp$4$$; | |
| this.allowNull = !! $opt_allowNull$$ | |
| } | |
| function $ExpansionOptions$$module$extensions$amp_analytics$0_1$variables$$($vars$jscomp$8$$, $opt_iterations$jscomp$1$$, $opt_noEncode$jscomp$1$$) { | |
| this.vars = $vars$jscomp$8$$; | |
| this.iterations = void 0 === $opt_iterations$jscomp$1$$ ? 2 : $opt_iterations$jscomp$1$$; | |
| this.noEncode = !! $opt_noEncode$jscomp$1$$; | |
| this.freezeVars = {} | |
| } | |
| $ExpansionOptions$$module$extensions$amp_analytics$0_1$variables$$.prototype.freezeVar = function($str$jscomp$13$$) { | |
| this.freezeVars[$str$jscomp$13$$] = !0 | |
| }; | |
| function $substrFilter$$module$extensions$amp_analytics$0_1$variables$$($str$jscomp$14$$, $s$jscomp$19_start$jscomp$10$$, $opt_l$$) { | |
| $s$jscomp$19_start$jscomp$10$$ = Number($s$jscomp$19_start$jscomp$10$$); | |
| var $length$jscomp$34$$ = $str$jscomp$14$$.length; | |
| $user$$module$src$log$$().assert($isFiniteNumber$$module$src$types$$($s$jscomp$19_start$jscomp$10$$), "Start index " + $s$jscomp$19_start$jscomp$10$$ + "in substr filter should be a number"); | |
| $opt_l$$ && ($length$jscomp$34$$ = Number($opt_l$$), $user$$module$src$log$$().assert($isFiniteNumber$$module$src$types$$($length$jscomp$34$$), | |
| "Length " + $length$jscomp$34$$ + " in substr filter should be a number")); | |
| return $str$jscomp$14$$.substr($s$jscomp$19_start$jscomp$10$$, $length$jscomp$34$$) | |
| } | |
| function $defaultFilter$$module$extensions$amp_analytics$0_1$variables$$($value$jscomp$115$$, $defaultValue$jscomp$2$$) { | |
| return $value$jscomp$115$$ || $user$$module$src$log$$().assertString($defaultValue$jscomp$2$$) | |
| } | |
| function $VariableService$$module$extensions$amp_analytics$0_1$variables$$($window$jscomp$15$$) { | |
| this.$win_$ = $window$jscomp$15$$; | |
| this.$filters_$ = $map$$module$src$utils$object$$(); | |
| $JSCompiler_StaticMethods_register_$$(this, "default", new $Filter$$module$extensions$amp_analytics$0_1$variables$$($defaultFilter$$module$extensions$amp_analytics$0_1$variables$$, !0)); | |
| $JSCompiler_StaticMethods_register_$$(this, "substr", new $Filter$$module$extensions$amp_analytics$0_1$variables$$($substrFilter$$module$extensions$amp_analytics$0_1$variables$$)); | |
| $JSCompiler_StaticMethods_register_$$(this, "trim", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return $window$jscomp$15$$.trim() | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "json", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return JSON.stringify($window$jscomp$15$$) | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "toLowerCase", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return $window$jscomp$15$$.toLowerCase() | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "toUpperCase", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return $window$jscomp$15$$.toUpperCase() | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "not", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return String(!$window$jscomp$15$$) | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "base64", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$) { | |
| return btoa($window$jscomp$15$$) | |
| })); | |
| $JSCompiler_StaticMethods_register_$$(this, "hash", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(this.$hashFilter_$.bind(this))); | |
| $JSCompiler_StaticMethods_register_$$(this, "if", new $Filter$$module$extensions$amp_analytics$0_1$variables$$(function($window$jscomp$15$$, $thenValue$$, $elseValue$$) { | |
| return $window$jscomp$15$$ ? $thenValue$$ : $elseValue$$ | |
| }, !0)) | |
| } | |
| function $JSCompiler_StaticMethods_register_$$($JSCompiler_StaticMethods_register_$self$$, $name$jscomp$108$$, $filter$jscomp$5$$) { | |
| $JSCompiler_StaticMethods_register_$self$$.$filters_$[$name$jscomp$108$$] = $filter$jscomp$5$$ | |
| } | |
| function $JSCompiler_StaticMethods_parseFilter_$$($JSCompiler_StaticMethods_parseFilter_$self$$, $filterStr$$) { | |
| if (!$filterStr$$) return null; | |
| var $tokens$jscomp$1$$ = $filterStr$$.split(":"), | |
| $fnName$$ = $tokens$jscomp$1$$.shift(); | |
| $user$$module$src$log$$().assert($fnName$$, "Filter " + name + " is invalid."); | |
| return { | |
| filter: $user$$module$src$log$$().assert($JSCompiler_StaticMethods_parseFilter_$self$$.$filters_$[$fnName$$], "Unknown filter: " + $fnName$$), | |
| args: $tokens$jscomp$1$$ | |
| } | |
| } | |
| function $JSCompiler_StaticMethods_applyFilters_$$($JSCompiler_StaticMethods_applyFilters_$self$$, $result$jscomp$24_value$jscomp$123$$, $filters$$) { | |
| if (!$isExperimentOn$$module$src$experiments$$($JSCompiler_StaticMethods_applyFilters_$self$$.$win_$, "variable-filters")) return Promise.resolve($result$jscomp$24_value$jscomp$123$$); | |
| $result$jscomp$24_value$jscomp$123$$ = Promise.resolve($result$jscomp$24_value$jscomp$123$$); | |
| for (var $$jscomp$loop$188$$ = {}, $i$jscomp$92$$ = 0; $i$jscomp$92$$ < $filters$$.length; $$jscomp$loop$188$$ = { | |
| filter: $$jscomp$loop$188$$.filter, | |
| args: $$jscomp$loop$188$$.args | |
| }, $i$jscomp$92$$++) { | |
| var $$jscomp$destructuring$var4$$ = $JSCompiler_StaticMethods_parseFilter_$$($JSCompiler_StaticMethods_applyFilters_$self$$, $filters$$[$i$jscomp$92$$].trim()); | |
| $$jscomp$loop$188$$.filter = $$jscomp$destructuring$var4$$.filter; | |
| $$jscomp$loop$188$$.args = $$jscomp$destructuring$var4$$.args; | |
| $$jscomp$loop$188$$.filter && ($result$jscomp$24_value$jscomp$123$$ = $result$jscomp$24_value$jscomp$123$$.then(function($JSCompiler_StaticMethods_applyFilters_$self$$) { | |
| return function($result$jscomp$24_value$jscomp$123$$) { | |
| return null != | |
| $result$jscomp$24_value$jscomp$123$$ || $JSCompiler_StaticMethods_applyFilters_$self$$.filter.allowNull ? ($JSCompiler_StaticMethods_applyFilters_$self$$.args.unshift($result$jscomp$24_value$jscomp$123$$), $JSCompiler_StaticMethods_applyFilters_$self$$.filter.filter.apply(null, $JSCompiler_StaticMethods_applyFilters_$self$$.args)) : null | |
| } | |
| }($$jscomp$loop$188$$))) | |
| } | |
| return $result$jscomp$24_value$jscomp$123$$ | |
| } | |
| $VariableService$$module$extensions$amp_analytics$0_1$variables$$.prototype.expandTemplate = function($template$jscomp$4$$, $options$jscomp$27$$) { | |
| var $$jscomp$this$jscomp$151$$ = this; | |
| if (0 > $options$jscomp$27$$.iterations) return $user$$module$src$log$$().error("Analytics.Variables", "Maximum depth reached while expanding variables. Please ensure that the variables are not recursive."), Promise.resolve($template$jscomp$4$$); | |
| var $replacementPromises$$ = [], | |
| $replacement$jscomp$1$$ = $template$jscomp$4$$.replace(/\${([^}]*)}/g, function($template$jscomp$4$$, $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$) { | |
| var $match$jscomp$12$$ = $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$.split("|"), | |
| $initialValue$$ = $match$jscomp$12$$.shift().trim(); | |
| if (!$initialValue$$) return Promise.resolve(""); | |
| $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$ = $JSCompiler_StaticMethods_getNameArgs_$$($initialValue$$); | |
| var $name$jscomp$109$$ = $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$.name, | |
| $argList$jscomp$2$$ = $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$.argList; | |
| if ($options$jscomp$27$$.freezeVars[$name$jscomp$109$$]) return $template$jscomp$4$$; | |
| var $raw$$ = null != $options$jscomp$27$$.vars[$name$jscomp$109$$] ? $options$jscomp$27$$.vars[$name$jscomp$109$$] : ""; | |
| $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$ = "string" == typeof $raw$$ ? $$jscomp$this$jscomp$151$$.expandTemplate($raw$$, new $ExpansionOptions$$module$extensions$amp_analytics$0_1$variables$$($options$jscomp$27$$.vars, $options$jscomp$27$$.iterations - 1, !0)) : Promise.resolve($raw$$); | |
| $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$ = | |
| $$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$.then(function($template$jscomp$4$$) { | |
| return $JSCompiler_StaticMethods_applyFilters_$$($$jscomp$this$jscomp$151$$, $template$jscomp$4$$, $match$jscomp$12$$) | |
| }).then(function($template$jscomp$4$$) { | |
| var $replacementPromises$$ = $options$jscomp$27$$.noEncode ? $template$jscomp$4$$ : $$jscomp$this$jscomp$151$$.encodeVars($name$jscomp$109$$, $template$jscomp$4$$); | |
| return $replacementPromises$$ ? $replacementPromises$$ + $argList$jscomp$2$$ : $replacementPromises$$ | |
| }).then(function($options$jscomp$27$$) { | |
| $replacement$jscomp$1$$ = | |
| $replacement$jscomp$1$$.replace($template$jscomp$4$$, $options$jscomp$27$$) | |
| }); | |
| $replacementPromises$$.push($$jscomp$destructuring$var5_key$jscomp$67_p$jscomp$11$$); | |
| return $template$jscomp$4$$ | |
| }); | |
| return Promise.all($replacementPromises$$).then(function() { | |
| return $replacement$jscomp$1$$ | |
| }) | |
| }; | |
| function $JSCompiler_StaticMethods_getNameArgs_$$($key$jscomp$68$$) { | |
| if (!$key$jscomp$68$$) return { | |
| name: "", | |
| argList: "" | |
| }; | |
| var $match$jscomp$13$$ = $key$jscomp$68$$.match($VARIABLE_ARGS_REGEXP$$module$extensions$amp_analytics$0_1$variables$$); | |
| $user$$module$src$log$$().assert($match$jscomp$13$$, "Variable with invalid format found: " + $key$jscomp$68$$); | |
| return { | |
| name: $match$jscomp$13$$[1] || $match$jscomp$13$$[0], | |
| argList: $match$jscomp$13$$[2] || "" | |
| } | |
| } | |
| $VariableService$$module$extensions$amp_analytics$0_1$variables$$.prototype.encodeVars = function($$jscomp$destructuring$var6_unusedName$jscomp$1$$, $argList$jscomp$3_raw$jscomp$1$$) { | |
| if (null == $argList$jscomp$3_raw$jscomp$1$$) return ""; | |
| if ($isArray$$module$src$types$$($argList$jscomp$3_raw$jscomp$1$$)) return $argList$jscomp$3_raw$jscomp$1$$.map(this.encodeVars.bind(this, $$jscomp$destructuring$var6_unusedName$jscomp$1$$)).join(","); | |
| $$jscomp$destructuring$var6_unusedName$jscomp$1$$ = $JSCompiler_StaticMethods_getNameArgs_$$(String($argList$jscomp$3_raw$jscomp$1$$)); | |
| $argList$jscomp$3_raw$jscomp$1$$ = $$jscomp$destructuring$var6_unusedName$jscomp$1$$.argList; | |
| return encodeURIComponent($$jscomp$destructuring$var6_unusedName$jscomp$1$$.name) + $argList$jscomp$3_raw$jscomp$1$$ | |
| }; | |
| $VariableService$$module$extensions$amp_analytics$0_1$variables$$.prototype.$hashFilter_$ = function($value$jscomp$125$$) { | |
| return $Services$$module$src$services$cryptoFor$$(this.$win_$).sha384Base64($value$jscomp$125$$) | |
| }; | |
| function $VisibilityModel$$module$extensions$amp_analytics$0_1$visibility_model$$($spec$jscomp$7$$, $calcVisibility$$) { | |
| var $$jscomp$this$jscomp$152$$ = this; | |
| this.$calcVisibility_$ = $calcVisibility$$; | |
| this.$spec_$ = { | |
| visiblePercentageMin: Number($spec$jscomp$7$$.visiblePercentageMin) / 100 || 0, | |
| visiblePercentageMax: Number($spec$jscomp$7$$.visiblePercentageMax) / 100 || 1, | |
| totalTimeMin: Number($spec$jscomp$7$$.totalTimeMin) || 0, | |
| totalTimeMax: Number($spec$jscomp$7$$.totalTimeMax) || Infinity, | |
| continuousTimeMin: Number($spec$jscomp$7$$.continuousTimeMin) || 0, | |
| continuousTimeMax: Number($spec$jscomp$7$$.continuousTimeMax) || Infinity | |
| }; | |
| "0" === String($spec$jscomp$7$$.visiblePercentageMax).trim() && (this.$spec_$.visiblePercentageMax = 0); | |
| this.$repeat_$ = !0 === $spec$jscomp$7$$.repeat; | |
| this.$eventResolver_$ = null; | |
| this.$onTriggerObservable_$ = new $Observable$$module$src$observable$$; | |
| this.$eventPromise_$ = new Promise(function($spec$jscomp$7$$) { | |
| $$jscomp$this$jscomp$152$$.$eventResolver_$ = $spec$jscomp$7$$ | |
| }); | |
| this.$eventPromise_$.then(function() { | |
| $$jscomp$this$jscomp$152$$.$onTriggerObservable_$ ? | |
| $$jscomp$this$jscomp$152$$.$onTriggerObservable_$.fire() : $dev$$module$src$log$$().warn("amp-analytics.VisibilityModel", "onTriggerObservable_ is unexpectedly null.") | |
| }); | |
| this.$unsubscribe_$ = []; | |
| this.$createdTime_$ = Date.now(); | |
| this.$reportReady_$ = this.$ready_$ = !0; | |
| this.$scheduledUpdateTimeoutId_$ = this.$createReportReadyPromise_$ = null; | |
| this.$everMatchedVisibility_$ = this.$matchesVisibility_$ = !1; | |
| this.$lastVisibleUpdateTime_$ = this.$maxVisiblePercentage_$ = this.$minVisiblePercentage_$ = this.$loadTimeVisibility_$ = | |
| this.$lastVisibleTime_$ = this.$firstVisibleTime_$ = this.$lastSeenTime_$ = this.$firstSeenTime_$ = this.$totalVisibleTime_$ = this.$maxContinuousVisibleTime_$ = this.$continuousTime_$ = 0; | |
| this.$waitToReset_$ = !1; | |
| this.$scheduleRepeatId_$ = null | |
| } | |
| $JSCompiler_prototypeAlias$$ = $VisibilityModel$$module$extensions$amp_analytics$0_1$visibility_model$$.prototype; | |
| $JSCompiler_prototypeAlias$$.$reset_$ = function() { | |
| var $$jscomp$this$jscomp$153$$ = this; | |
| this.$eventPromise_$ = new Promise(function($resolve$jscomp$50$$) { | |
| $$jscomp$this$jscomp$153$$.$eventResolver_$ = $resolve$jscomp$50$$ | |
| }); | |
| this.$eventPromise_$.then(function() { | |
| $$jscomp$this$jscomp$153$$.$onTriggerObservable_$ ? $$jscomp$this$jscomp$153$$.$onTriggerObservable_$.fire() : $dev$$module$src$log$$().warn("amp-analytics.VisibilityModel", "onTriggerObservable_ is unexpectedly null.") | |
| }); | |
| this.$scheduleRepeatId_$ = null; | |
| this.$matchesVisibility_$ = | |
| this.$everMatchedVisibility_$ = !1; | |
| this.$lastVisibleUpdateTime_$ = this.$maxVisiblePercentage_$ = this.$minVisiblePercentage_$ = this.$lastVisibleTime_$ = this.$lastSeenTime_$ = this.$firstSeenTime_$ = this.$firstVisibleTime_$ = this.$totalVisibleTime_$ = this.$maxContinuousVisibleTime_$ = this.$continuousTime_$ = 0; | |
| this.$waitToReset_$ = !1 | |
| }; | |
| $JSCompiler_prototypeAlias$$.maybeDispose = function() { | |
| this.$repeat_$ || this.dispose() | |
| }; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| this.$scheduledUpdateTimeoutId_$ && (clearTimeout(this.$scheduledUpdateTimeoutId_$), this.$scheduledUpdateTimeoutId_$ = null); | |
| this.$scheduleRepeatId_$ && (clearTimeout(this.$scheduleRepeatId_$), this.$scheduleRepeatId_$ = null); | |
| this.$unsubscribe_$.forEach(function($unsubscribe$$) { | |
| $unsubscribe$$() | |
| }); | |
| this.$unsubscribe_$.length = 0; | |
| this.$eventResolver_$ = null; | |
| this.$onTriggerObservable_$ ? (this.$onTriggerObservable_$.removeAll(), this.$onTriggerObservable_$ = null) : $dev$$module$src$log$$().warn("amp-analytics.VisibilityModel", | |
| "dispose() called when onTriggerObservable_ already null.") | |
| }; | |
| $JSCompiler_prototypeAlias$$.unsubscribe = function($handler$jscomp$11$$) { | |
| this.$unsubscribe_$.push($handler$jscomp$11$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.onTriggerEvent = function($handler$jscomp$12$$) { | |
| this.$onTriggerObservable_$ ? this.$onTriggerObservable_$.add($handler$jscomp$12$$) : $dev$$module$src$log$$().warn("amp-analytics.VisibilityModel", "onTriggerObservable_ is unexpectedly null."); | |
| this.$eventPromise_$ && !this.$eventResolver_$ && $handler$jscomp$12$$() | |
| }; | |
| $JSCompiler_prototypeAlias$$.setReady = function($ready$jscomp$1$$) { | |
| this.$ready_$ = $ready$jscomp$1$$; | |
| this.update() | |
| }; | |
| $JSCompiler_prototypeAlias$$.setReportReady = function($callback$jscomp$80$$) { | |
| this.$reportReady_$ = !1; | |
| this.$createReportReadyPromise_$ = $callback$jscomp$80$$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.update = function() { | |
| this.$update_$(this.$ready_$ ? this.$calcVisibility_$() : 0) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getState = function($startTime$jscomp$13$$) { | |
| return { | |
| firstSeenTime: $timeBase$$module$extensions$amp_analytics$0_1$visibility_model$$(this.$firstSeenTime_$, $startTime$jscomp$13$$), | |
| lastSeenTime: $timeBase$$module$extensions$amp_analytics$0_1$visibility_model$$(this.$lastSeenTime_$, $startTime$jscomp$13$$), | |
| lastVisibleTime: $timeBase$$module$extensions$amp_analytics$0_1$visibility_model$$(this.$lastVisibleTime_$, $startTime$jscomp$13$$), | |
| firstVisibleTime: $timeBase$$module$extensions$amp_analytics$0_1$visibility_model$$(this.$firstVisibleTime_$, | |
| $startTime$jscomp$13$$), | |
| maxContinuousVisibleTime: this.$maxContinuousVisibleTime_$, | |
| totalVisibleTime: this.$totalVisibleTime_$, | |
| loadTimeVisibility: 100 * this.$loadTimeVisibility_$ || 0, | |
| minVisiblePercentage: 100 * this.$minVisiblePercentage_$, | |
| maxVisiblePercentage: 100 * this.$maxVisiblePercentage_$ | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.$update_$ = function($visibility$$) { | |
| var $$jscomp$this$jscomp$154$$ = this; | |
| if (this.$waitToReset_$) $JSCompiler_StaticMethods_isVisibilityMatch_$$(this, $visibility$$) || this.$reset_$(); | |
| else if (this.$eventResolver_$) { | |
| var $conditionsMet$$ = $JSCompiler_StaticMethods_updateCounters_$$(this, $visibility$$); | |
| if ($conditionsMet$$) if (this.$scheduledUpdateTimeoutId_$ && (clearTimeout(this.$scheduledUpdateTimeoutId_$), this.$scheduledUpdateTimeoutId_$ = null), this.$reportReady_$) this.$eventResolver_$(), | |
| this.$eventResolver_$ = null, this.$repeat_$ && (this.$waitToReset_$ = !0, this.$continuousTime_$ = 0); | |
| else { | |
| if (this.$createReportReadyPromise_$) { | |
| var $reportReadyPromise$$ = this.$createReportReadyPromise_$(); | |
| this.$createReportReadyPromise_$ = null; | |
| $reportReadyPromise$$.then(function() { | |
| $$jscomp$this$jscomp$154$$.$reportReady_$ = !0; | |
| $$jscomp$this$jscomp$154$$.update() | |
| }) | |
| } | |
| } else if (this.$matchesVisibility_$ && !this.$scheduledUpdateTimeoutId_$) { | |
| var $timeToWait$jscomp$1$$ = $JSCompiler_StaticMethods_computeTimeToWait_$$(this); | |
| 0 < $timeToWait$jscomp$1$$ && (this.$scheduledUpdateTimeoutId_$ = setTimeout(function() { | |
| $$jscomp$this$jscomp$154$$.update(); | |
| $$jscomp$this$jscomp$154$$.$eventResolver_$ || ($$jscomp$this$jscomp$154$$.$reset_$(), $$jscomp$this$jscomp$154$$.setReady(!0)); | |
| $$jscomp$this$jscomp$154$$.$scheduledUpdateTimeoutId_$ = null | |
| }, $timeToWait$jscomp$1$$)) | |
| } else !this.$matchesVisibility_$ && this.$scheduledUpdateTimeoutId_$ && (clearTimeout(this.$scheduledUpdateTimeoutId_$), this.$scheduledUpdateTimeoutId_$ = null) | |
| } | |
| }; | |
| function $JSCompiler_StaticMethods_isVisibilityMatch_$$($JSCompiler_StaticMethods_isVisibilityMatch_$self$$, $visibility$jscomp$1$$) { | |
| return 1 == $JSCompiler_StaticMethods_isVisibilityMatch_$self$$.$spec_$.visiblePercentageMin ? 1 == $visibility$jscomp$1$$ : 0 == $JSCompiler_StaticMethods_isVisibilityMatch_$self$$.$spec_$.visiblePercentageMax ? 0 == $visibility$jscomp$1$$ : $visibility$jscomp$1$$ > $JSCompiler_StaticMethods_isVisibilityMatch_$self$$.$spec_$.visiblePercentageMin && $visibility$jscomp$1$$ <= $JSCompiler_StaticMethods_isVisibilityMatch_$self$$.$spec_$.visiblePercentageMax | |
| } | |
| function $JSCompiler_StaticMethods_updateCounters_$$($JSCompiler_StaticMethods_updateCounters_$self$$, $visibility$jscomp$2$$) { | |
| var $now$jscomp$2$$ = Date.now(); | |
| 0 < $visibility$jscomp$2$$ && ($JSCompiler_StaticMethods_updateCounters_$self$$.$firstSeenTime_$ = $JSCompiler_StaticMethods_updateCounters_$self$$.$firstSeenTime_$ || $now$jscomp$2$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$lastSeenTime_$ = $now$jscomp$2$$, !$JSCompiler_StaticMethods_updateCounters_$self$$.$loadTimeVisibility_$ && 300 > $now$jscomp$2$$ - | |
| $JSCompiler_StaticMethods_updateCounters_$self$$.$createdTime_$ && ($JSCompiler_StaticMethods_updateCounters_$self$$.$loadTimeVisibility_$ = $visibility$jscomp$2$$)); | |
| var $prevMatchesVisibility$$ = $JSCompiler_StaticMethods_updateCounters_$self$$.$matchesVisibility_$, | |
| $timeSinceLastUpdate$$ = $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleUpdateTime_$ ? $now$jscomp$2$$ - $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleUpdateTime_$ : 0; | |
| $JSCompiler_StaticMethods_updateCounters_$self$$.$matchesVisibility_$ = | |
| $JSCompiler_StaticMethods_isVisibilityMatch_$$($JSCompiler_StaticMethods_updateCounters_$self$$, $visibility$jscomp$2$$); | |
| $JSCompiler_StaticMethods_updateCounters_$self$$.$matchesVisibility_$ ? ($JSCompiler_StaticMethods_updateCounters_$self$$.$everMatchedVisibility_$ = !0, $prevMatchesVisibility$$ ? ($JSCompiler_StaticMethods_updateCounters_$self$$.$totalVisibleTime_$ += $timeSinceLastUpdate$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$continuousTime_$ += $timeSinceLastUpdate$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$ = | |
| Math.max($JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$, $JSCompiler_StaticMethods_updateCounters_$self$$.$continuousTime_$)) : $JSCompiler_StaticMethods_updateCounters_$self$$.$firstVisibleTime_$ = $JSCompiler_StaticMethods_updateCounters_$self$$.$firstVisibleTime_$ || $now$jscomp$2$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleUpdateTime_$ = $now$jscomp$2$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$minVisiblePercentage_$ = 0 < $JSCompiler_StaticMethods_updateCounters_$self$$.$minVisiblePercentage_$ ? | |
| Math.min($JSCompiler_StaticMethods_updateCounters_$self$$.$minVisiblePercentage_$, $visibility$jscomp$2$$) : $visibility$jscomp$2$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$maxVisiblePercentage_$ = Math.max($JSCompiler_StaticMethods_updateCounters_$self$$.$maxVisiblePercentage_$, $visibility$jscomp$2$$), $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleTime_$ = $now$jscomp$2$$) : $prevMatchesVisibility$$ && ($JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$ = Math.max($JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$, | |
| $JSCompiler_StaticMethods_updateCounters_$self$$.$continuousTime_$ + $timeSinceLastUpdate$$), $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleUpdateTime_$ = 0, $JSCompiler_StaticMethods_updateCounters_$self$$.$totalVisibleTime_$ += $timeSinceLastUpdate$$, $JSCompiler_StaticMethods_updateCounters_$self$$.$continuousTime_$ = 0, $JSCompiler_StaticMethods_updateCounters_$self$$.$lastVisibleTime_$ = $now$jscomp$2$$); | |
| return $JSCompiler_StaticMethods_updateCounters_$self$$.$everMatchedVisibility_$ && $JSCompiler_StaticMethods_updateCounters_$self$$.$totalVisibleTime_$ >= | |
| $JSCompiler_StaticMethods_updateCounters_$self$$.$spec_$.totalTimeMin && $JSCompiler_StaticMethods_updateCounters_$self$$.$totalVisibleTime_$ <= $JSCompiler_StaticMethods_updateCounters_$self$$.$spec_$.totalTimeMax && $JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$ >= $JSCompiler_StaticMethods_updateCounters_$self$$.$spec_$.continuousTimeMin && $JSCompiler_StaticMethods_updateCounters_$self$$.$maxContinuousVisibleTime_$ <= $JSCompiler_StaticMethods_updateCounters_$self$$.$spec_$.continuousTimeMax | |
| } | |
| function $JSCompiler_StaticMethods_computeTimeToWait_$$($JSCompiler_StaticMethods_computeTimeToWait_$self$$) { | |
| var $waitForContinuousTime$$ = Math.max($JSCompiler_StaticMethods_computeTimeToWait_$self$$.$spec_$.continuousTimeMin - $JSCompiler_StaticMethods_computeTimeToWait_$self$$.$continuousTime_$, 0), | |
| $waitForTotalTime$$ = Math.max($JSCompiler_StaticMethods_computeTimeToWait_$self$$.$spec_$.totalTimeMin - $JSCompiler_StaticMethods_computeTimeToWait_$self$$.$totalVisibleTime_$, 0), | |
| $maxWaitTime$$ = Math.max($waitForContinuousTime$$, | |
| $waitForTotalTime$$); | |
| return Math.min($maxWaitTime$$, $waitForContinuousTime$$ || Infinity, $waitForTotalTime$$ || Infinity) | |
| } | |
| function $timeBase$$module$extensions$amp_analytics$0_1$visibility_model$$($time$jscomp$6$$, $baseTime$$) { | |
| return $time$jscomp$6$$ >= $baseTime$$ ? $time$jscomp$6$$ - $baseTime$$ : 0 | |
| }; | |
| var $visibilityIdCounter$$module$extensions$amp_analytics$0_1$visibility_manager$$ = 1; | |
| function $getElementId$$module$extensions$amp_analytics$0_1$visibility_manager$$($element$jscomp$108$$) { | |
| var $id$jscomp$48$$ = $element$jscomp$108$$.__AMP_VIS_ID; | |
| $id$jscomp$48$$ || ($id$jscomp$48$$ = ++$visibilityIdCounter$$module$extensions$amp_analytics$0_1$visibility_manager$$, $element$jscomp$108$$.__AMP_VIS_ID = $id$jscomp$48$$); | |
| return $id$jscomp$48$$ | |
| } | |
| function $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$($JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$, $ampdoc$jscomp$30$$) { | |
| this.parent = $JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$; | |
| this.ampdoc = $ampdoc$jscomp$30$$; | |
| this.$resources_$ = $Services$$module$src$services$resourcesForDoc$$($ampdoc$jscomp$30$$); | |
| this.$rootVisibility_$ = 0; | |
| this.$models_$ = []; | |
| this.$children_$ = null; | |
| this.$unsubscribe_$ = []; | |
| this.parent && ($JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$ = | |
| this.parent, $JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$.$children_$ || ($JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$.$children_$ = []), $JSCompiler_StaticMethods_addChild_$self$jscomp$inline_943_parent$jscomp$20$$.$children_$.push(this)) | |
| } | |
| function $JSCompiler_StaticMethods_removeChild_$$($JSCompiler_StaticMethods_removeChild_$self$$, $child$jscomp$10_index$jscomp$66$$) { | |
| $JSCompiler_StaticMethods_removeChild_$self$$.$children_$ && ($child$jscomp$10_index$jscomp$66$$ = $JSCompiler_StaticMethods_removeChild_$self$$.$children_$.indexOf($child$jscomp$10_index$jscomp$66$$), -1 != $child$jscomp$10_index$jscomp$66$$ && $JSCompiler_StaticMethods_removeChild_$self$$.$children_$.splice($child$jscomp$10_index$jscomp$66$$, 1)) | |
| } | |
| $JSCompiler_prototypeAlias$$ = $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$.prototype; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| this.setRootVisibility(0); | |
| for (var $i$41_i$jscomp$93$$ = this.$models_$.length - 1; 0 <= $i$41_i$jscomp$93$$; $i$41_i$jscomp$93$$--) this.$models_$[$i$41_i$jscomp$93$$].dispose(); | |
| this.$unsubscribe_$.forEach(function($i$41_i$jscomp$93$$) { | |
| $i$41_i$jscomp$93$$() | |
| }); | |
| this.$unsubscribe_$.length = 0; | |
| this.parent && $JSCompiler_StaticMethods_removeChild_$$(this.parent, this); | |
| if (this.$children_$) for ($i$41_i$jscomp$93$$ = 0; $i$41_i$jscomp$93$$ < this.$children_$.length; $i$41_i$jscomp$93$$++) this.$children_$[$i$41_i$jscomp$93$$].dispose() | |
| }; | |
| $JSCompiler_prototypeAlias$$.unsubscribe = function($handler$jscomp$13$$) { | |
| this.$unsubscribe_$.push($handler$jscomp$13$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getStartTime = function() {}; | |
| $JSCompiler_prototypeAlias$$.isBackgrounded = function() {}; | |
| $JSCompiler_prototypeAlias$$.isBackgroundedAtStart = function() {}; | |
| $JSCompiler_prototypeAlias$$.getRootLayoutBox = function() {}; | |
| $JSCompiler_prototypeAlias$$.getRootVisibility = function() { | |
| return this.parent ? 0 < this.parent.getRootVisibility() ? this.$rootVisibility_$ : 0 : this.$rootVisibility_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.setRootVisibility = function($i$jscomp$94_visibility$jscomp$3$$) { | |
| this.$rootVisibility_$ = $i$jscomp$94_visibility$jscomp$3$$; | |
| $JSCompiler_StaticMethods_updateModels_$$(this); | |
| if (this.$children_$) for ($i$jscomp$94_visibility$jscomp$3$$ = 0; $i$jscomp$94_visibility$jscomp$3$$ < this.$children_$.length; $i$jscomp$94_visibility$jscomp$3$$++) $JSCompiler_StaticMethods_updateModels_$$(this.$children_$[$i$jscomp$94_visibility$jscomp$3$$]) | |
| }; | |
| function $JSCompiler_StaticMethods_updateModels_$$($JSCompiler_StaticMethods_updateModels_$self$$) { | |
| for (var $i$jscomp$95$$ = 0; $i$jscomp$95$$ < $JSCompiler_StaticMethods_updateModels_$self$$.$models_$.length; $i$jscomp$95$$++) $JSCompiler_StaticMethods_updateModels_$self$$.$models_$[$i$jscomp$95$$].update() | |
| } | |
| $JSCompiler_prototypeAlias$$.listenRoot = function($spec$jscomp$8$$, $readyPromise$jscomp$2$$, $createReportPromiseFunc$$, $callback$jscomp$81$$) { | |
| var $calcVisibility$jscomp$1$$ = this.getRootVisibility.bind(this); | |
| return $JSCompiler_StaticMethods_createModelAndListen_$$(this, $calcVisibility$jscomp$1$$, $spec$jscomp$8$$, $readyPromise$jscomp$2$$, $createReportPromiseFunc$$, $callback$jscomp$81$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.listenElement = function($element$jscomp$109$$, $spec$jscomp$9$$, $readyPromise$jscomp$3$$, $createReportPromiseFunc$jscomp$1$$, $callback$jscomp$82$$) { | |
| var $calcVisibility$jscomp$2$$ = this.getElementVisibility.bind(this, $element$jscomp$109$$); | |
| return $JSCompiler_StaticMethods_createModelAndListen_$$(this, $calcVisibility$jscomp$2$$, $spec$jscomp$9$$, $readyPromise$jscomp$3$$, $createReportPromiseFunc$jscomp$1$$, $callback$jscomp$82$$, $element$jscomp$109$$) | |
| }; | |
| function $JSCompiler_StaticMethods_createModelAndListen_$$($JSCompiler_StaticMethods_createModelAndListen_$self$$, $calcVisibility$jscomp$3$$, $spec$jscomp$10$$, $readyPromise$jscomp$4$$, $createReportPromiseFunc$jscomp$2$$, $callback$jscomp$83$$, $opt_element$jscomp$13$$) { | |
| if ($spec$jscomp$10$$.visiblePercentageThresholds && void 0 == $spec$jscomp$10$$.visiblePercentageMin && void 0 == $spec$jscomp$10$$.visiblePercentageMax) { | |
| var $unlisteners$$ = [], | |
| $ranges$jscomp$1$$ = $spec$jscomp$10$$.visiblePercentageThresholds; | |
| if (!$ranges$jscomp$1$$ || !$isArray$$module$src$types$$($ranges$jscomp$1$$)) return $user$$module$src$log$$().error("VISIBILITY-MANAGER", "invalid visiblePercentageThresholds"), | |
| function() {}; | |
| for (var $i$jscomp$96$$ = 0; $i$jscomp$96$$ < $ranges$jscomp$1$$.length; $i$jscomp$96$$++) { | |
| var $percents$$ = $ranges$jscomp$1$$[$i$jscomp$96$$]; | |
| if ($isArray$$module$src$types$$($percents$$) && 2 == $percents$$.length) if ($isFiniteNumber$$module$src$types$$($percents$$[0]) && $isFiniteNumber$$module$src$types$$($percents$$[1])) { | |
| var $min$jscomp$1_model$42$$ = | |
| Number($percents$$[0]), | |
| $max$jscomp$1$$ = Number($percents$$[1]); | |
| if (0 > $min$jscomp$1_model$42$$ || 100 < $max$jscomp$1$$ || $min$jscomp$1_model$42$$ > $max$jscomp$1$$ || $min$jscomp$1_model$42$$ == $max$jscomp$1$$ && 100 != $min$jscomp$1_model$42$$ && 0 != $max$jscomp$1$$) $user$$module$src$log$$().error("VISIBILITY-MANAGER", "visiblePercentageThresholds entry invalid min/max value"); | |
| else { | |
| var $newSpec$$ = $spec$jscomp$10$$; | |
| $newSpec$$.visiblePercentageMin = $min$jscomp$1_model$42$$; | |
| $newSpec$$.visiblePercentageMax = $max$jscomp$1$$; | |
| $min$jscomp$1_model$42$$ = new $VisibilityModel$$module$extensions$amp_analytics$0_1$visibility_model$$($newSpec$$, $calcVisibility$jscomp$3$$); | |
| $unlisteners$$.push($JSCompiler_StaticMethods_listen_$$($JSCompiler_StaticMethods_createModelAndListen_$self$$, $min$jscomp$1_model$42$$, $readyPromise$jscomp$4$$, $createReportPromiseFunc$jscomp$2$$, $callback$jscomp$83$$, $opt_element$jscomp$13$$)) | |
| } | |
| } else $user$$module$src$log$$().error("VISIBILITY-MANAGER", "visiblePercentageThresholds entry is not valid number"); | |
| else $user$$module$src$log$$().error("VISIBILITY-MANAGER", "visiblePercentageThresholds entry length is not 2") | |
| } | |
| return function() { | |
| $unlisteners$$.forEach(function($JSCompiler_StaticMethods_createModelAndListen_$self$$) { | |
| return $JSCompiler_StaticMethods_createModelAndListen_$self$$() | |
| }) | |
| } | |
| } | |
| var $model$$ = new $VisibilityModel$$module$extensions$amp_analytics$0_1$visibility_model$$($spec$jscomp$10$$, $calcVisibility$jscomp$3$$); | |
| return $JSCompiler_StaticMethods_listen_$$($JSCompiler_StaticMethods_createModelAndListen_$self$$, | |
| $model$$, $readyPromise$jscomp$4$$, $createReportPromiseFunc$jscomp$2$$, $callback$jscomp$83$$, $opt_element$jscomp$13$$) | |
| } | |
| function $JSCompiler_StaticMethods_listen_$$($JSCompiler_StaticMethods_listen_$self$$, $model$jscomp$1$$, $readyPromise$jscomp$5$$, $createReportPromiseFunc$jscomp$3$$, $callback$jscomp$84$$, $opt_element$jscomp$14$$) { | |
| $readyPromise$jscomp$5$$ && ($model$jscomp$1$$.setReady(!1), $readyPromise$jscomp$5$$.then(function() { | |
| $model$jscomp$1$$.setReady(!0) | |
| })); | |
| $createReportPromiseFunc$jscomp$3$$ && $model$jscomp$1$$.setReportReady($createReportPromiseFunc$jscomp$3$$); | |
| $model$jscomp$1$$.onTriggerEvent(function() { | |
| var $readyPromise$jscomp$5$$ = | |
| $JSCompiler_StaticMethods_listen_$self$$.getStartTime(), | |
| $createReportPromiseFunc$jscomp$3$$ = $model$jscomp$1$$.getState($readyPromise$jscomp$5$$); | |
| $createReportPromiseFunc$jscomp$3$$.backgrounded = $JSCompiler_StaticMethods_listen_$self$$.isBackgrounded() ? 1 : 0; | |
| $createReportPromiseFunc$jscomp$3$$.backgroundedAtStart = $JSCompiler_StaticMethods_listen_$self$$.isBackgroundedAtStart() ? 1 : 0; | |
| $createReportPromiseFunc$jscomp$3$$.totalTime = Date.now() - $readyPromise$jscomp$5$$; | |
| if ($opt_element$jscomp$14$$) { | |
| $readyPromise$jscomp$5$$ = | |
| ($readyPromise$jscomp$5$$ = $JSCompiler_StaticMethods_listen_$self$$.$resources_$.getResourceForElementOptional($opt_element$jscomp$14$$)) ? $readyPromise$jscomp$5$$.getLayoutBox() : $Services$$module$src$services$viewportForDoc$$($JSCompiler_StaticMethods_listen_$self$$.ampdoc).getLayoutRect($opt_element$jscomp$14$$); | |
| var $intersectionRatio$$ = $JSCompiler_StaticMethods_listen_$self$$.getElementVisibility($opt_element$jscomp$14$$), | |
| $intersectionRect$jscomp$1$$ = $JSCompiler_StaticMethods_listen_$self$$.getElementIntersectionRect($opt_element$jscomp$14$$); | |
| Object.assign($createReportPromiseFunc$jscomp$3$$, { | |
| intersectionRatio: $intersectionRatio$$, | |
| intersectionRect: JSON.stringify($intersectionRect$jscomp$1$$) | |
| }) | |
| } else $readyPromise$jscomp$5$$ = $JSCompiler_StaticMethods_listen_$self$$.getRootLayoutBox(); | |
| $model$jscomp$1$$.maybeDispose(); | |
| $readyPromise$jscomp$5$$ && Object.assign($createReportPromiseFunc$jscomp$3$$, { | |
| elementX: $readyPromise$jscomp$5$$.left, | |
| elementY: $readyPromise$jscomp$5$$.top, | |
| elementWidth: $readyPromise$jscomp$5$$.width, | |
| elementHeight: $readyPromise$jscomp$5$$.height | |
| }); | |
| $callback$jscomp$84$$($createReportPromiseFunc$jscomp$3$$) | |
| }); | |
| $JSCompiler_StaticMethods_listen_$self$$.$models_$.push($model$jscomp$1$$); | |
| $model$jscomp$1$$.unsubscribe(function() { | |
| var $readyPromise$jscomp$5$$ = $JSCompiler_StaticMethods_listen_$self$$.$models_$.indexOf($model$jscomp$1$$); - 1 != $readyPromise$jscomp$5$$ && $JSCompiler_StaticMethods_listen_$self$$.$models_$.splice($readyPromise$jscomp$5$$, 1) | |
| }); | |
| $opt_element$jscomp$14$$ && $model$jscomp$1$$.unsubscribe($JSCompiler_StaticMethods_listen_$self$$.observe($opt_element$jscomp$14$$, function() { | |
| return $model$jscomp$1$$.update() | |
| })); | |
| $model$jscomp$1$$.update(); | |
| return function() { | |
| $model$jscomp$1$$.dispose() | |
| } | |
| } | |
| $JSCompiler_prototypeAlias$$.observe = function() {}; | |
| $JSCompiler_prototypeAlias$$.getElementVisibility = function() {}; | |
| $JSCompiler_prototypeAlias$$.getElementIntersectionRect = function() {}; | |
| function $VisibilityManagerForDoc$$module$extensions$amp_analytics$0_1$visibility_manager$$($ampdoc$jscomp$31_root$jscomp$31$$) { | |
| $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$.call(this, null, $ampdoc$jscomp$31_root$jscomp$31$$); | |
| var $$jscomp$this$jscomp$156$$ = this; | |
| this.$viewer_$ = $Services$$module$src$services$viewerForDoc$$($ampdoc$jscomp$31_root$jscomp$31$$); | |
| this.$viewport_$ = $Services$$module$src$services$viewportForDoc$$($ampdoc$jscomp$31_root$jscomp$31$$); | |
| this.$backgrounded_$ = !this.$viewer_$.isVisible(); | |
| this.$backgroundedAtStart_$ = this.isBackgrounded(); | |
| this.$trackedElements_$ = $map$$module$src$utils$object$$(); | |
| this.$intersectionObserver_$ = null; | |
| "inabox" == $getMode$$module$src$mode$$(this.ampdoc.win).runtime ? ($ampdoc$jscomp$31_root$jscomp$31$$ = this.ampdoc.getRootNode(), this.unsubscribe(this.observe($ampdoc$jscomp$31_root$jscomp$31$$.documentElement || $ampdoc$jscomp$31_root$jscomp$31$$.body || $ampdoc$jscomp$31_root$jscomp$31$$, this.setRootVisibility.bind(this)))) : (this.setRootVisibility(this.$viewer_$.isVisible() ? | |
| 1 : 0), this.unsubscribe(this.$viewer_$.onVisibilityChanged(function() { | |
| var $ampdoc$jscomp$31_root$jscomp$31$$ = $$jscomp$this$jscomp$156$$.$viewer_$.isVisible(); | |
| $ampdoc$jscomp$31_root$jscomp$31$$ || ($$jscomp$this$jscomp$156$$.$backgrounded_$ = !0); | |
| $$jscomp$this$jscomp$156$$.setRootVisibility($ampdoc$jscomp$31_root$jscomp$31$$ ? 1 : 0) | |
| }))) | |
| } | |
| $$jscomp$inherits$$($VisibilityManagerForDoc$$module$extensions$amp_analytics$0_1$visibility_manager$$, $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$); | |
| $JSCompiler_prototypeAlias$$ = $VisibilityManagerForDoc$$module$extensions$amp_analytics$0_1$visibility_manager$$.prototype; | |
| $JSCompiler_prototypeAlias$$.dispose = function() { | |
| $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$.prototype.dispose.call(this); | |
| this.$intersectionObserver_$ && (this.$intersectionObserver_$.disconnect(), this.$intersectionObserver_$ = null) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getStartTime = function() { | |
| return this.$viewer_$.getFirstVisibleTime() | |
| }; | |
| $JSCompiler_prototypeAlias$$.isBackgrounded = function() { | |
| return this.$backgrounded_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.isBackgroundedAtStart = function() { | |
| return this.$backgroundedAtStart_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getRootLayoutBox = function() { | |
| var $root$jscomp$32$$ = this.ampdoc.getRootNode(); | |
| return this.$viewport_$.getLayoutRect($root$jscomp$32$$.documentElement || $root$jscomp$32$$.body || $root$jscomp$32$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.observe = function($element$jscomp$110$$, $listener$jscomp$79$$) { | |
| var $$jscomp$this$jscomp$157$$ = this; | |
| $JSCompiler_StaticMethods_polyfillAmpElementIfNeeded_$$(this, $element$jscomp$110$$); | |
| var $id$jscomp$49$$ = $getElementId$$module$extensions$amp_analytics$0_1$visibility_manager$$($element$jscomp$110$$), | |
| $trackedElement$$ = this.$trackedElements_$[$id$jscomp$49$$]; | |
| $trackedElement$$ ? 0 < $trackedElement$$.intersectionRatio && $listener$jscomp$79$$($trackedElement$$.intersectionRatio) : | |
| ($trackedElement$$ = { | |
| element: $element$jscomp$110$$, | |
| intersectionRatio: 0, | |
| intersectionRect: null, | |
| listeners: [] | |
| }, this.$trackedElements_$[$id$jscomp$49$$] = $trackedElement$$); | |
| $trackedElement$$.listeners.push($listener$jscomp$79$$); | |
| this.$intersectionObserver_$ || (this.$intersectionObserver_$ = $JSCompiler_StaticMethods_createIntersectionObserver_$$(this)); | |
| this.$intersectionObserver_$.observe($element$jscomp$110$$); | |
| return function() { | |
| var $trackedElement$$ = $$jscomp$this$jscomp$157$$.$trackedElements_$[$id$jscomp$49$$]; | |
| if ($trackedElement$$) { | |
| var $index$jscomp$68$$ = $trackedElement$$.listeners.indexOf($listener$jscomp$79$$); - 1 != $index$jscomp$68$$ && $trackedElement$$.listeners.splice($index$jscomp$68$$, 1); | |
| 0 == $trackedElement$$.listeners.length && ($$jscomp$this$jscomp$157$$.$intersectionObserver_$.unobserve($element$jscomp$110$$), delete $$jscomp$this$jscomp$157$$.$trackedElements_$[$id$jscomp$49$$]) | |
| } | |
| } | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementVisibility = function($element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$) { | |
| if (0 == this.getRootVisibility()) return 0; | |
| $element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$ = $getElementId$$module$extensions$amp_analytics$0_1$visibility_manager$$($element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$); | |
| return ($element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$ = this.$trackedElements_$[$element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$]) && | |
| $element$jscomp$111_id$jscomp$50_trackedElement$jscomp$2$$.intersectionRatio || 0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementIntersectionRect = function($element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$) { | |
| if (0 >= this.getElementVisibility($element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$)) return null; | |
| $element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$ = $getElementId$$module$extensions$amp_analytics$0_1$visibility_manager$$($element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$); | |
| return ($element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$ = this.$trackedElements_$[$element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$]) ? | |
| $element$jscomp$112_id$jscomp$51_trackedElement$jscomp$3$$.intersectionRect : null | |
| }; | |
| function $JSCompiler_StaticMethods_createIntersectionObserver_$$($JSCompiler_StaticMethods_createIntersectionObserver_$self$$) { | |
| function $ticker$$() { | |
| $intersectionObserverPolyfill$$.tick($JSCompiler_StaticMethods_createIntersectionObserver_$self$$.$viewport_$.getRect()) | |
| } | |
| var $win$jscomp$177$$ = $JSCompiler_StaticMethods_createIntersectionObserver_$self$$.ampdoc.win; | |
| if ($nativeIntersectionObserverSupported$$module$src$intersection_observer_polyfill$$($win$jscomp$177$$)) return new $win$jscomp$177$$.IntersectionObserver($JSCompiler_StaticMethods_createIntersectionObserver_$self$$.$onIntersectionChanges_$.bind($JSCompiler_StaticMethods_createIntersectionObserver_$self$$), { | |
| threshold: $DEFAULT_THRESHOLD$$module$src$intersection_observer_polyfill$$ | |
| }); | |
| var $intersectionObserverPolyfill$$ = new $IntersectionObserverPolyfill$$module$src$intersection_observer_polyfill$$($JSCompiler_StaticMethods_createIntersectionObserver_$self$$.$onIntersectionChanges_$.bind($JSCompiler_StaticMethods_createIntersectionObserver_$self$$)); | |
| $JSCompiler_StaticMethods_createIntersectionObserver_$self$$.unsubscribe($JSCompiler_StaticMethods_createIntersectionObserver_$self$$.$viewport_$.onScroll($ticker$$)); | |
| $JSCompiler_StaticMethods_createIntersectionObserver_$self$$.unsubscribe($JSCompiler_StaticMethods_createIntersectionObserver_$self$$.$viewport_$.onChanged($ticker$$)); | |
| setTimeout($ticker$$); | |
| return $intersectionObserverPolyfill$$ | |
| } | |
| function $JSCompiler_StaticMethods_polyfillAmpElementIfNeeded_$$($JSCompiler_StaticMethods_polyfillAmpElementIfNeeded_$self$$, $element$jscomp$113$$) { | |
| $nativeIntersectionObserverSupported$$module$src$intersection_observer_polyfill$$($JSCompiler_StaticMethods_polyfillAmpElementIfNeeded_$self$$.ampdoc.win) || "function" == typeof $element$jscomp$113$$.getLayoutBox || ($element$jscomp$113$$.getLayoutBox = function() { | |
| return $JSCompiler_StaticMethods_polyfillAmpElementIfNeeded_$self$$.$viewport_$.getLayoutRect($element$jscomp$113$$) | |
| }, $element$jscomp$113$$.getOwner = function() { | |
| return null | |
| }) | |
| } | |
| $JSCompiler_prototypeAlias$$.$onIntersectionChanges_$ = function($entries$jscomp$3$$) { | |
| var $$jscomp$this$jscomp$160$$ = this; | |
| $entries$jscomp$3$$.forEach(function($entries$jscomp$3$$) { | |
| var $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$ = $entries$jscomp$3$$.intersectionRect; | |
| $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$ = $layoutRectLtwh$$module$src$layout_rect$$(Number($JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$.left), Number($JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$.top), | |
| Number($JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$.width), Number($JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$.height)); | |
| var $JSCompiler_intersectionRatio$jscomp$inline_950$$ = $entries$jscomp$3$$.intersectionRatio; | |
| $JSCompiler_intersectionRatio$jscomp$inline_950$$ = Math.min(Math.max($JSCompiler_intersectionRatio$jscomp$inline_950$$, 0), 1); | |
| $entries$jscomp$3$$ = $getElementId$$module$extensions$amp_analytics$0_1$visibility_manager$$($entries$jscomp$3$$.target); | |
| if ($entries$jscomp$3$$ = $$jscomp$this$jscomp$160$$.$trackedElements_$[$entries$jscomp$3$$]) for ($entries$jscomp$3$$.intersectionRatio = $JSCompiler_intersectionRatio$jscomp$inline_950$$, $entries$jscomp$3$$.intersectionRect = $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$, $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$ = 0; $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$ < | |
| $entries$jscomp$3$$.listeners.length; $JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$++) $entries$jscomp$3$$.listeners[$JSCompiler_id$jscomp$inline_952_JSCompiler_trackedElement$jscomp$inline_953_change$jscomp$3$$]($JSCompiler_intersectionRatio$jscomp$inline_950$$) | |
| }) | |
| }; | |
| function $VisibilityManagerForEmbed$$module$extensions$amp_analytics$0_1$visibility_manager$$($parent$jscomp$21$$, $embed$jscomp$4$$) { | |
| $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$.call(this, $parent$jscomp$21$$, $parent$jscomp$21$$.ampdoc); | |
| this.embed = $embed$jscomp$4$$; | |
| this.$backgroundedAtStart_$ = this.parent.isBackgrounded(); | |
| this.unsubscribe(this.parent.observe($embed$jscomp$4$$.host, this.setRootVisibility.bind(this))) | |
| } | |
| $$jscomp$inherits$$($VisibilityManagerForEmbed$$module$extensions$amp_analytics$0_1$visibility_manager$$, $VisibilityManager$$module$extensions$amp_analytics$0_1$visibility_manager$$); | |
| $JSCompiler_prototypeAlias$$ = $VisibilityManagerForEmbed$$module$extensions$amp_analytics$0_1$visibility_manager$$.prototype; | |
| $JSCompiler_prototypeAlias$$.getStartTime = function() { | |
| return this.embed.getStartTime() | |
| }; | |
| $JSCompiler_prototypeAlias$$.isBackgrounded = function() { | |
| return this.parent.isBackgrounded() | |
| }; | |
| $JSCompiler_prototypeAlias$$.isBackgroundedAtStart = function() { | |
| return this.$backgroundedAtStart_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.getRootLayoutBox = function() { | |
| var $rootElement$jscomp$3$$ = this.embed.host; | |
| return $Services$$module$src$services$viewportForDoc$$(this.ampdoc).getLayoutRect($rootElement$jscomp$3$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.observe = function($element$jscomp$114$$, $listener$jscomp$80$$) { | |
| return this.parent.observe($element$jscomp$114$$, $listener$jscomp$80$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementVisibility = function($element$jscomp$115$$) { | |
| return 0 == this.getRootVisibility() ? 0 : this.parent.getElementVisibility($element$jscomp$115$$) | |
| }; | |
| $JSCompiler_prototypeAlias$$.getElementIntersectionRect = function($element$jscomp$116$$) { | |
| return 0 == this.getRootVisibility() ? null : this.parent.getElementIntersectionRect($element$jscomp$116$$) | |
| }; | |
| var $FINAL_URL_RE$$module$extensions$amp_animation$0_1$css_expr_ast$$ = /^(data|https):/i, | |
| $DEG_TO_RAD$$module$extensions$amp_animation$0_1$css_expr_ast$$ = 2 * Math.PI / 360, | |
| $GRAD_TO_RAD$$module$extensions$amp_animation$0_1$css_expr_ast$$ = Math.PI / 200, | |
| $VAR_CSS_RE$$module$extensions$amp_animation$0_1$css_expr_ast$$ = /(calc|var|url|rand|index|width|height|num)\(/i, | |
| $NORM_CSS_RE$$module$extensions$amp_animation$0_1$css_expr_ast$$ = /\d(%|em|rem|vw|vh|vmin|vmax|s|deg|grad)/i, | |
| $INFINITY_RE$$module$extensions$amp_animation$0_1$css_expr_ast$$ = | |
| /^(infinity|infinite)$/i; | |
| function $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$() {} | |
| $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() {}; | |
| $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.resolve = function($context$jscomp$20$$, $normalize$jscomp$1$$) { | |
| return this.isConst($normalize$jscomp$1$$) ? this : this.calc($context$jscomp$20$$, $normalize$jscomp$1$$) | |
| }; | |
| $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function() { | |
| return !0 | |
| }; | |
| $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function() { | |
| return this | |
| }; | |
| function $CssPassthroughNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($css$jscomp$1$$) { | |
| this.$css_$ = $css$jscomp$1$$ | |
| } | |
| $$jscomp$inherits$$($CssPassthroughNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssPassthroughNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| return this.$css_$ | |
| }; | |
| function $CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($opt_array$$) { | |
| this.$array_$ = $opt_array$$ || [] | |
| } | |
| $$jscomp$inherits$$($CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| return this.$array_$.map(function($node$jscomp$29$$) { | |
| return $node$jscomp$29$$.css() | |
| }).join(" ") | |
| }; | |
| $CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function($normalize$jscomp$2$$) { | |
| return this.$array_$.reduce(function($acc$jscomp$1$$, $node$jscomp$30$$) { | |
| return $acc$jscomp$1$$ && $node$jscomp$30$$.isConst($normalize$jscomp$2$$) | |
| }, !0) | |
| }; | |
| $CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function($context$jscomp$21$$, $normalize$jscomp$3$$) { | |
| for (var $resolvedArray$$ = [], $i$jscomp$98$$ = 0; $i$jscomp$98$$ < this.$array_$.length; $i$jscomp$98$$++) { | |
| var $resolved$$ = this.$array_$[$i$jscomp$98$$].resolve($context$jscomp$21$$, $normalize$jscomp$3$$); | |
| if ($resolved$$) $resolvedArray$$.push($resolved$$); | |
| else return null | |
| } | |
| return new $CssConcatNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($resolvedArray$$) | |
| }; | |
| function $CssUrlNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($url$jscomp$73$$) { | |
| this.$url_$ = $url$jscomp$73$$ | |
| } | |
| $$jscomp$inherits$$($CssUrlNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssUrlNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| return this.$url_$ ? 'url("' + this.$url_$ + '")' : "" | |
| }; | |
| $CssUrlNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function() { | |
| return !this.$url_$ || $FINAL_URL_RE$$module$extensions$amp_animation$0_1$css_expr_ast$$.test(this.$url_$) | |
| }; | |
| $CssUrlNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function($context$jscomp$22_url$jscomp$74$$) { | |
| $context$jscomp$22_url$jscomp$74$$ = $context$jscomp$22_url$jscomp$74$$.resolveUrl(this.$url_$); | |
| return new $CssPassthroughNode$$module$extensions$amp_animation$0_1$css_expr_ast$$('url("' + $context$jscomp$22_url$jscomp$74$$ + '")') | |
| }; | |
| function $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($type$jscomp$146$$, $num$jscomp$5$$, $units$jscomp$1$$) { | |
| this.$type_$ = $type$jscomp$146$$; | |
| this.$num_$ = $num$jscomp$5$$; | |
| this.$units_$ = $units$jscomp$1$$.toLowerCase() | |
| } | |
| $$jscomp$inherits$$($CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $JSCompiler_prototypeAlias$$ = $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype; | |
| $JSCompiler_prototypeAlias$$.css = function() { | |
| return "" + this.$num_$ + this.$units_$ | |
| }; | |
| $JSCompiler_prototypeAlias$$.createSameUnits = function() {}; | |
| $JSCompiler_prototypeAlias$$.isConst = function($normalize$jscomp$4$$) { | |
| return $normalize$jscomp$4$$ ? this.isNorm() : !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.isNorm = function() { | |
| return !0 | |
| }; | |
| $JSCompiler_prototypeAlias$$.norm = function() { | |
| return this | |
| }; | |
| $JSCompiler_prototypeAlias$$.calc = function($context$jscomp$23$$, $normalize$jscomp$5$$) { | |
| return $normalize$jscomp$5$$ ? this.norm($context$jscomp$23$$) : this | |
| }; | |
| $JSCompiler_prototypeAlias$$.calcPercent = function() { | |
| throw Error("cannot calculate percent for " + this.$type_$); | |
| }; | |
| function $CssNumberNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$6$$) { | |
| $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "NUM", $num$jscomp$6$$, "") | |
| } | |
| $$jscomp$inherits$$($CssNumberNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssNumberNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.createSameUnits = function($num$jscomp$7$$) { | |
| return new $CssNumberNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$7$$) | |
| }; | |
| function $CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$8$$) { | |
| $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "PRC", $num$jscomp$8$$, "%") | |
| } | |
| $$jscomp$inherits$$($CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.createSameUnits = function($num$jscomp$9$$) { | |
| return new $CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$9$$) | |
| }; | |
| $CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isNorm = function() { | |
| return !1 | |
| }; | |
| $CssPercentNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.norm = function($context$jscomp$24$$) { | |
| return $context$jscomp$24$$.getDimension() ? (new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$(0, "px")).calcPercent(this.$num_$, $context$jscomp$24$$) : this | |
| }; | |
| function $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$10$$, $units$jscomp$2$$) { | |
| $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "LEN", $num$jscomp$10$$, $units$jscomp$2$$) | |
| } | |
| $$jscomp$inherits$$($CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.createSameUnits = function($num$jscomp$11$$) { | |
| return new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$11$$, this.$units_$) | |
| }; | |
| $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isNorm = function() { | |
| return "px" == this.$units_$ | |
| }; | |
| $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.norm = function($context$jscomp$25_num$jscomp$12$$) { | |
| if (this.isNorm()) return this; | |
| if ("em" == this.$units_$ || "rem" == this.$units_$) { | |
| var $fontSize$$ = "em" == this.$units_$ ? $context$jscomp$25_num$jscomp$12$$.getCurrentFontSize() : $context$jscomp$25_num$jscomp$12$$.getRootFontSize(); | |
| return new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$num_$ * $fontSize$$, "px") | |
| } | |
| if ("vw" == this.$units_$ || "vh" == this.$units_$ || "vmin" == | |
| this.$units_$ || "vmax" == this.$units_$) { | |
| var $vp$$ = $context$jscomp$25_num$jscomp$12$$.getViewportSize(), | |
| $vw$$ = $vp$$.width * this.$num_$ / 100, | |
| $vh$$ = $vp$$.height * this.$num_$ / 100; | |
| $context$jscomp$25_num$jscomp$12$$ = 0; | |
| "vw" == this.$units_$ ? $context$jscomp$25_num$jscomp$12$$ = $vw$$ : "vh" == this.$units_$ ? $context$jscomp$25_num$jscomp$12$$ = $vh$$ : "vmin" == this.$units_$ ? $context$jscomp$25_num$jscomp$12$$ = Math.min($vw$$, $vh$$) : "vmax" == this.$units_$ && ($context$jscomp$25_num$jscomp$12$$ = Math.max($vw$$, $vh$$)); | |
| return new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($context$jscomp$25_num$jscomp$12$$, | |
| "px") | |
| } | |
| throw $unknownUnits$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$units_$); | |
| }; | |
| $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calcPercent = function($percent$jscomp$1$$, $context$jscomp$26_size$jscomp$16$$) { | |
| var $dim$$ = $context$jscomp$26_size$jscomp$16$$.getDimension(); | |
| $context$jscomp$26_size$jscomp$16$$ = $context$jscomp$26_size$jscomp$16$$.getCurrentElementSize(); | |
| var $side$$ = $getDimSide$$module$extensions$amp_animation$0_1$css_expr_ast$$($dim$$, $context$jscomp$26_size$jscomp$16$$); | |
| return new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($side$$ * | |
| $percent$jscomp$1$$ / 100, "px") | |
| }; | |
| function $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$13$$, $units$jscomp$3$$) { | |
| $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "ANG", $num$jscomp$13$$, $units$jscomp$3$$) | |
| } | |
| $$jscomp$inherits$$($CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.createSameUnits = function($num$jscomp$14$$) { | |
| return new $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$14$$, this.$units_$) | |
| }; | |
| $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isNorm = function() { | |
| return "rad" == this.$units_$ | |
| }; | |
| $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.norm = function() { | |
| if (this.isNorm()) return this; | |
| if ("deg" == this.$units_$) return new $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$num_$ * $DEG_TO_RAD$$module$extensions$amp_animation$0_1$css_expr_ast$$, "rad"); | |
| if ("grad" == this.$units_$) return new $CssAngleNode$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$num_$ * $GRAD_TO_RAD$$module$extensions$amp_animation$0_1$css_expr_ast$$, "rad"); | |
| throw $unknownUnits$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$units_$); | |
| }; | |
| function $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$15$$, $units$jscomp$4$$) { | |
| $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "TME", $num$jscomp$15$$, $units$jscomp$4$$) | |
| } | |
| $$jscomp$inherits$$($CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNumericNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.createSameUnits = function($num$jscomp$16$$) { | |
| return new $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($num$jscomp$16$$, this.$units_$) | |
| }; | |
| $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isNorm = function() { | |
| return "ms" == this.$units_$ | |
| }; | |
| $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.norm = function() { | |
| return this.isNorm() ? this : new $CssTimeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($JSCompiler_StaticMethods_millis_$$(this), "ms") | |
| }; | |
| function $JSCompiler_StaticMethods_millis_$$($JSCompiler_StaticMethods_millis_$self$$) { | |
| if ("ms" == $JSCompiler_StaticMethods_millis_$self$$.$units_$) return $JSCompiler_StaticMethods_millis_$self$$.$num_$; | |
| if ("s" == $JSCompiler_StaticMethods_millis_$self$$.$units_$) return 1E3 * $JSCompiler_StaticMethods_millis_$self$$.$num_$; | |
| throw $unknownUnits$$module$extensions$amp_animation$0_1$css_expr_ast$$($JSCompiler_StaticMethods_millis_$self$$.$units_$); | |
| } | |
| function $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($name$jscomp$111$$, $args$jscomp$6$$, $opt_dimensions$$) { | |
| this.$name_$ = $name$jscomp$111$$.toLowerCase(); | |
| this.$args_$ = $args$jscomp$6$$; | |
| this.$dimensions_$ = $opt_dimensions$$ || null | |
| } | |
| $$jscomp$inherits$$($CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| var $args$jscomp$7$$ = this.$args_$.map(function($args$jscomp$7$$) { | |
| return $args$jscomp$7$$.css() | |
| }).join(","); | |
| return this.$name_$ + "(" + $args$jscomp$7$$ + ")" | |
| }; | |
| $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function($normalize$jscomp$6$$) { | |
| return this.$args_$.reduce(function($acc$jscomp$2$$, $node$jscomp$34$$) { | |
| return $acc$jscomp$2$$ && $node$jscomp$34$$.isConst($normalize$jscomp$6$$) | |
| }, !0) | |
| }; | |
| $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function($context$jscomp$27$$, $normalize$jscomp$7$$) { | |
| for (var $resolvedArgs$$ = [], $$jscomp$loop$189$$ = {}, $i$jscomp$99$$ = 0; $i$jscomp$99$$ < this.$args_$.length; $$jscomp$loop$189$$ = { | |
| node: $$jscomp$loop$189$$.node | |
| }, $i$jscomp$99$$++) { | |
| $$jscomp$loop$189$$.node = this.$args_$[$i$jscomp$99$$]; | |
| var $resolved$jscomp$1$$ = void 0; | |
| if ($resolved$jscomp$1$$ = this.$dimensions_$ && $i$jscomp$99$$ < this.$dimensions_$.length ? $context$jscomp$27$$.withDimension(this.$dimensions_$[$i$jscomp$99$$], function($resolvedArgs$$) { | |
| return function() { | |
| return $resolvedArgs$$.node.resolve($context$jscomp$27$$, $normalize$jscomp$7$$) | |
| } | |
| }($$jscomp$loop$189$$)) : $$jscomp$loop$189$$.node.resolve($context$jscomp$27$$, $normalize$jscomp$7$$)) $resolvedArgs$$.push($resolved$jscomp$1$$); | |
| else return null | |
| } | |
| return new $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$name_$, $resolvedArgs$$) | |
| }; | |
| function $CssTranslateNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($suffix$jscomp$2$$, $args$jscomp$8$$) { | |
| $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.call(this, "translate" + $suffix$jscomp$2$$.toUpperCase(), $args$jscomp$8$$, "" == $suffix$jscomp$2$$ ? ["w", "h"] : "x" == $suffix$jscomp$2$$ ? ["w"] : "y" == $suffix$jscomp$2$$ ? ["h"] : "z" == $suffix$jscomp$2$$ ? ["z"] : "3d" == $suffix$jscomp$2$$ ? ["w", "h", "z"] : null); | |
| this.$suffix_$ = $suffix$jscomp$2$$ | |
| } | |
| $$jscomp$inherits$$($CssTranslateNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssFuncNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| function $CssDimSizeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($dim$jscomp$1$$, $opt_selector$$, $opt_selectionMethod$$) { | |
| this.$dim_$ = $dim$jscomp$1$$; | |
| this.$selector_$ = $opt_selector$$ || null; | |
| this.$selectionMethod_$ = $opt_selectionMethod$$ || null | |
| } | |
| $$jscomp$inherits$$($CssDimSizeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssDimSizeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| throw Error("no css"); | |
| }; | |
| $CssDimSizeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function() { | |
| return !1 | |
| }; | |
| $CssDimSizeNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function($context$jscomp$28_size$jscomp$17$$) { | |
| $context$jscomp$28_size$jscomp$17$$ = this.$selector_$ ? $context$jscomp$28_size$jscomp$17$$.getElementSize(this.$selector_$, this.$selectionMethod_$) : $context$jscomp$28_size$jscomp$17$$.getCurrentElementSize(); | |
| return new $CssLengthNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($getDimSide$$module$extensions$amp_animation$0_1$css_expr_ast$$(this.$dim_$, $context$jscomp$28_size$jscomp$17$$), | |
| "px") | |
| }; | |
| function $CssNumConvertNode$$module$extensions$amp_animation$0_1$css_expr_ast$$($value$jscomp$126$$) { | |
| this.$value_$ = $value$jscomp$126$$ | |
| } | |
| $$jscomp$inherits$$($CssNumConvertNode$$module$extensions$amp_animation$0_1$css_expr_ast$$, $CssNode$$module$extensions$amp_animation$0_1$css_expr_ast$$); | |
| $CssNumConvertNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.css = function() { | |
| throw Error("no css"); | |
| }; | |
| $CssNumConvertNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.isConst = function() { | |
| return !1 | |
| }; | |
| $CssNumConvertNode$$module$extensions$amp_animation$0_1$css_expr_ast$$.prototype.calc = function($context$jscomp$29_num$jscomp$17_value$jscomp$127$$, $normalize$jscomp$8$$) { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment