mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 19:58:52 +00:00
511 lines
251 KiB
Text
511 lines
251 KiB
Text
self.AMP_CONFIG={"allow-doc-opt-in":["amp-date-picker","amp-next-page","ampdoc-shell","disable-amp-story-desktop","disable-faster-amp-list","inabox-rov","inline-styles","url-replacement-v2"],"allow-url-opt-in":["pump-early-frame"],"canary":0,"expAdsenseA4A":0.01,"a4aProfilingRate":0.01,"ad-type-custom":1,"amp-access-iframe":1,"amp-apester-media":1,"amp-ima-video":1,"amp-playbuzz":1,"amp-story-navigation-performance":0,"chunked-amp":1,"amp-auto-ads":1,"amp-auto-ads-adsense-holdout":0.1,"version-locking":1,"as-use-attr-for-format":0.01,"a4aFastFetchDoubleclickLaunched":0,"a4aFastFetchAdSenseLaunched":0,"pump-early-frame":1,"3p-use-ampcontext":1,"amp-live-list-sorting":1,"amp-sidebar toolbar":1,"svg-in-mustache":0,"disable-faster-amp-list":1,"amp-consent":1,"amp-img-native-srcset":1,"amp-story-v1":1,"expAdsenseUnconditionedCanonical":0,"expAdsenseCanonical":0,"font-display-swap":1,"amp-date-picker":1,"url-replacement-v2":0,"inline-styles":1,"v":"011533253141109","type":"production"};/*AMP_CONFIG*/var global=self;self.AMP=self.AMP||[];try{(function(_){
|
|
var f;function aa(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]}var ca=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a}(this);function da(a,b){b=void 0===b?"":b;try{return decodeURIComponent(a)}catch(c){return b}};var ia=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function p(a){var b=Object.create(null);if(!a)return b;for(var c;c=ia.exec(a);){var d=da(c[1],c[1]),e=c[2]?da(c[2],c[2]):"";b[d]=e}return b};var ja="";function r(a){var b=a||self,c;if(b.AMP_MODE)c=b.AMP_MODE;else{c=b;var d=p(c.location.originalHash||c.location.hash),e=p(c.location.search);ja||(ja=c.AMP_CONFIG&&c.AMP_CONFIG.v?c.AMP_CONFIG.v:"011533253141109");c=b.AMP_MODE={localDev:!1,development:!("1"!=d.development&&!c.AMP_DEV_MODE),examiner:"2"==d.development,filter:d.filter,geoOverride:d["amp-geo"],minified:!0,lite:void 0!=e.amp_lite,test:!1,log:d.log,version:"1533253141109",rtvVersion:ja}}return c};var ka=Object.prototype.toString;function la(a){return Array.isArray(a)}function ma(a){return"[object Object]"===ka.call(a)}function na(a){return"number"===typeof a&&isFinite(a)};function qa(a){return 0<=a.indexOf("\u200b\u200b\u200b")}var ra=void 0;function sa(a){ra=a}function ta(a,b,c){this.win=a;this.Lg=b;this.Mg=this.win.console&&this.win.console.log&&"0"!=r().log?this.Lg({localDev:!1,development:r(void 0).development,filter:r(void 0).filter,minified:!0,lite:r(void 0).lite,test:!1,log:r(void 0).log,version:r(void 0).version,rtvVersion:r(void 0).rtvVersion}):0;this.Hc=c||""}function ua(a){return void 0!==ra?ra:a.Mg}
|
|
function va(a,b,c){if(0!=ua(a)){var d=a.win.console.log;"ERROR"==b?d=a.win.console.error||d:"INFO"==b?d=a.win.console.info||d:"WARN"==b&&(d=a.win.console.warn||d);d.apply(a.win.console,c)}}f=ta.prototype;f.isEnabled=function(){return 0!=ua(this)};f.fine=function(a,b){4<=ua(this)&&va(this,"FINE",Array.prototype.slice.call(arguments,1))};f.info=function(a,b){3<=ua(this)&&va(this,"INFO",Array.prototype.slice.call(arguments,1))};
|
|
f.warn=function(a,b){2<=ua(this)&&va(this,"WARN",Array.prototype.slice.call(arguments,1))};f.Ka=function(a,b){if(1<=ua(this))va(this,"ERROR",Array.prototype.slice.call(arguments,1));else{var c=wa.apply(null,Array.prototype.slice.call(arguments,1));za(this,c);return c}};f.error=function(a,b){var c=this.Ka.apply(this,arguments);c&&(c.name=a||c.name,self.reportError(c))};f.expectedError=function(a,b){var c=this.Ka.apply(this,arguments);c&&(c.expected=!0,self.reportError(c))};
|
|
f.createError=function(a){var b=wa.apply(null,arguments);za(this,b);return b};f.createExpectedError=function(a){var b=wa.apply(null,arguments);za(this,b);b.expected=!0;return b};
|
|
f.assert=function(a,b,c){var d;if(!a){var e=(b||"Assertion failed").split("%s"),g=e.shift(),h=g,k=[];""!=g&&k.push(g);for(g=2;g<arguments.length;g++){var l=arguments[g];l&&l.tagName&&(d=l);var n=e.shift();k.push(l);var m=n.trim();""!=m&&k.push(m);m=l;h+=(m&&1==m.nodeType?m.tagName.toLowerCase()+(m.id?"#"+m.id:""):m)+n}g=Error(h);g.fromAssert=!0;g.associatedElement=d;g.messageArray=k;za(this,g);self.reportError(g);throw g;}return a};
|
|
f.assertElement=function(a,b){this.assert(a&&1==a.nodeType,(b||"Element expected")+": %s",a);return a};f.assertString=function(a,b){this.assert("string"==typeof a,(b||"String expected")+": %s",a);return a};f.assertNumber=function(a,b){this.assert("number"==typeof a,(b||"Number expected")+": %s",a);return a};f.assertBoolean=function(a,b){this.assert(!!a===a,(b||"Boolean expected")+": %s",a);return a};
|
|
f.assertEnumValue=function(a,b,c){a:{for(var d in a)if(a[d]===b){a=!0;break a}a=!1}if(a)return b;this.assert(!1,'Unknown %s value: "%s"',c||"enum",b)};function za(a,b){b=Aa(b);a.Hc?b.message?-1==b.message.indexOf(a.Hc)&&(b.message+=a.Hc):b.message=a.Hc:qa(b.message)&&(b.message=b.message.replace("\u200b\u200b\u200b",""))}function Aa(a){var b=a.message,c=String(Math.random());a.message=c;if(a.message===c)return a.message=b,a;var b=Error(a.message),d;for(d in a)b[d]=a[d];b.stack=a.stack;return b}
|
|
function wa(a){for(var b=null,c="",d=0;d<arguments.length;d++){var e=arguments[d];e instanceof Error&&!b?b=Aa(e):(c&&(c+=" "),c+=e)}b?c&&(b.message=c+": "+b.message):b=Error(c);return b}function w(a){var b=wa.apply(null,arguments);setTimeout(function(){self.reportError(b);throw b;})}self.log=self.log||{user:null,dev:null,userForEmbed:null};var Ba=self.log,Ca=null;
|
|
function C(a){Ba.user||(Ba.user=Da("\u200b\u200b\u200b"));var b=Ba.user.win;return a&&a.ownerDocument.defaultView!=b?Ba.userForEmbed?Ba.userForEmbed:Ba.userForEmbed=Da("\u200b\u200b\u200b\u200b"):Ba.user}function Da(a){if(!Ca)throw Error("failed to call initLogConstructor");return new Ca(self,function(a){var b=parseInt(a.log,10);return a.development||1<=b?4:2},a)}
|
|
function E(){if(Ba.dev)return Ba.dev;if(!Ca)throw Error("failed to call initLogConstructor");return Ba.dev=new Ca(self,function(a){a=parseInt(a.log,10);return 3<=a?4:2<=a?3:0})};var Ea=Object.prototype.hasOwnProperty;function G(a){var b=Object.create(null);a&&Object.assign(b,a);return b}function H(a){return a||{}};function Ia(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function I(a,b){return b.length>a.length?!1:0==a.lastIndexOf(b,0)};var Ja=self.AMP_CONFIG||{},Ka={thirdParty:Ja.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:Ja.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:("string"==typeof Ja.thirdPartyFrameRegex?new RegExp(Ja.thirdPartyFrameRegex):Ja.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdn:Ja.cdnUrl||"https://cdn.ampproject.org",cdnProxyRegex:("string"==typeof Ja.cdnProxyRegex?new RegExp(Ja.cdnProxyRegex):Ja.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,
|
|
errorReporting:Ja.errorReportingUrl||"https://amp-error-reporting.appspot.com/r",localDev:Ja.localDev||!1},La={urls:Ka};function Ma(a){this.ng=a;this.Tc=this.T=0;this.Wa=Object.create(null)}Ma.prototype.has=function(a){return!!this.Wa[a]};Ma.prototype.get=function(a){var b=this.Wa[a];if(b)return b.access=++this.Tc,b.payload};Ma.prototype.put=function(a,b){this.has(a)||this.T++;this.Wa[a]={payload:b,access:this.Tc};if(!(this.T<=this.ng)){E().warn("lru-cache","Trimming LRU cache");a=this.Wa;var c=this.Tc+1,d,e;for(e in a){var g=a[e].access;g<c&&(c=g,d=e)}void 0!==d&&(delete a[d],this.T--)}};var Na=H({c:!0,v:!0,a:!0,ad:!0}),Oa,Pa,Sa=/[?&]amp_js[^&]*/,Ta=/[?&]amp_gsa[^&]*/,Ua=/[?&]amp_r[^&]*/,Va=/[?&]usqp[^&]*/,Wa=["javascript:","data:","vbscript:"];function K(a,b){Oa||(Oa=self.document.createElement("a"),Pa=self.UrlCache||(self.UrlCache=new Ma(100)));return Xa(Oa,a,b?null:Pa)}
|
|
function Xa(a,b,c){if(c&&c.has(b))return c.get(b);a.href=b;a.protocol||(a.href=a.href);var d={href:a.href,protocol:a.protocol,host:a.host,hostname:a.hostname,port:"0"==a.port?"":a.port,pathname:a.pathname,search:a.search,hash:a.hash,origin:null};"/"!==d.pathname[0]&&(d.pathname="/"+d.pathname);if("http:"==d.protocol&&80==d.port||"https:"==d.protocol&&443==d.port)d.port="",d.host=d.hostname;d.origin=a.origin&&"null"!=a.origin?a.origin:"data:"!=d.protocol&&d.host?d.protocol+"//"+d.host:d.href;var e=
|
|
d;c&&c.put(b,e);return e}function Ya(a,b,c){if(!b)return a;var d=a.split("#",2),e=d[0].split("?",2),g=e[0]+(e[1]?c?"?"+b+"&"+e[1]:"?"+e[1]+"&"+b:"?"+b);return g+=d[1]?"#"+d[1]:""}function Za(a,b){return Ya(a,$a(b))}function $a(a){var b=[],c;for(c in a){var d=a[c];if(null!=d)if(la(d))for(var e=0;e<d.length;e++){var g=d[e];b.push(encodeURIComponent(c)+"="+encodeURIComponent(g))}else b.push(encodeURIComponent(c)+"="+encodeURIComponent(d))}return b.join("&")}
|
|
function ab(a){"string"==typeof a&&(a=K(a));return"https:"==a.protocol||"localhost"==a.hostname||Ia(a.hostname,".localhost")}function hb(a,b,c){c=void 0===c?"source":c;C().assert(null!=a,"%s %s must be available",b,c);var d=a;C().assert(ab(d)||/^(\/\/)/.test(d),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',b,c,d);return d}function ib(a){var b=a.indexOf("#");return-1==b?a:a.substring(0,b)}
|
|
function jb(a){"string"==typeof a&&(a=K(a));return Ka.cdnProxyRegex.test(a.origin)}function kb(a){if(!a)return!0;"string"==typeof a&&(a=K(a));return!Wa.includes(a.protocol)}function lb(a){var b=K(a),c=mb(b.search);return b.origin+b.pathname+c+b.hash}function mb(a){if(!a||"?"==a)return"";var b=a.replace(Sa,"").replace(Ta,"").replace(Ua,"").replace(Va,"").replace(/^[?&]/,"");return b?"?"+b:""}
|
|
function nb(a){"string"==typeof a&&(a=K(a));if(!jb(a))return a.href;var b=a.pathname.split("/"),c=b[1];C().assert(Na[c],"Unknown path prefix in url %s",a.href);var d=b[2],e="s"==d?"https://"+decodeURIComponent(b[3]):"http://"+decodeURIComponent(d);C().assert(0<e.indexOf("."),"Expected a . in origin %s",e);b.splice(1,"s"==d?3:2);return e+b.join("/")+mb(a.search)+(a.hash||"")}function ob(a){return K(nb(a)).origin}
|
|
function pb(a,b){qb(b);var c=ob(a.location.href);return Ya(b,encodeURIComponent("__amp_source_origin")+"="+encodeURIComponent(c),void 0)}function qb(a){var b=K(a),c=p(b.search);C().assert(!("__amp_source_origin"in c),"Source origin is not allowed in %s",a)};function rb(a,b){var c;try{c=a.document.cookie}catch(k){c=""}var d=c;if(!d)return null;var e=d.split(";");for(a=0;a<e.length;a++){var g=e[a].trim(),h=g.indexOf("=");if(-1!=h&&da(g.substring(0,h).trim(),void 0)==b)return b=g.substring(h+1).trim(),da(b,b)}return null}
|
|
function sb(a,b,c,d,e){if(!e||!e.allowOnProxyOrigin){if(jb(a.location.href))throw Error("Should never attempt to set cookie on proxy origin: "+b);var g=K(a.location.href).hostname.toLowerCase(),h=K(Ka.cdn).hostname.toLowerCase();if(g==h||Ia(g,"."+h))throw Error("Should never attempt to set cookie on proxy origin. (in depth check): "+b);}if(e&&e.highestAvailableDomain)for(var k=a.location.hostname.split("."),g=k[k.length-1],h=k.length-2;0<=h;h--)if(g=k[h]+"."+g,tb(a,b,c,d,g),rb(a,b)==c)return;g=void 0;
|
|
e&&e.domain&&(g=e.domain);tb(a,b,c,d,g)}function tb(a,b,c,d,e){"ampproject.org"==e&&(c="delete",d=0);b=encodeURIComponent(b)+"="+encodeURIComponent(c)+"; path=/"+(e?"; domain="+e:"")+"; expires="+(new Date(d)).toUTCString();try{a.document.cookie=b}catch(g){}};function ub(a){return!(!a.AMP_CONFIG||!a.AMP_CONFIG.canary)}function L(a,b){var c=vb(a);return!!c[b]}function wb(a,b,c,d){var e=L(a,b),g=!(void 0!==c?!c:e);if(g!=e&&(vb(a)[b]=g,!d)){var h=xb(a);h[b]=g;b=h;var k=[],l;for(l in b)k.push((!1===b[l]?"-":"")+l);sb(a,"AMP_EXP",k.join(","),Date.now()+15552E6,{domain:a.location.hostname,allowOnProxyOrigin:!0})}return g}
|
|
function vb(a){if(a.__AMP__EXPERIMENT_TOGGLES)return a.__AMP__EXPERIMENT_TOGGLES;a.__AMP__EXPERIMENT_TOGGLES=Object.create(null);var b=a.__AMP__EXPERIMENT_TOGGLES;if(a.AMP_CONFIG)for(var c in a.AMP_CONFIG){var d=a.AMP_CONFIG[c];"number"===typeof d&&0<=d&&1>=d&&(b[c]=Math.random()<d)}if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-doc-opt-in"])&&0<a.AMP_CONFIG["allow-doc-opt-in"].length){var e=a.AMP_CONFIG["allow-doc-opt-in"],g=a.document.head.querySelector('meta[name="amp-experiments-opt-in"]');
|
|
if(g){var h=g.getAttribute("content").split(",");for(c=0;c<h.length;c++)-1!=e.indexOf(h[c])&&(b[h[c]]=!0)}}Object.assign(b,xb(a));if(a.AMP_CONFIG&&Array.isArray(a.AMP_CONFIG["allow-url-opt-in"])&&0<a.AMP_CONFIG["allow-url-opt-in"].length){c=a.AMP_CONFIG["allow-url-opt-in"];a=p(a.location.originalHash||a.location.hash);for(var k=0;k<c.length;k++){var l=a["e-"+c[k]];"1"==l&&(b[c[k]]=!0);"0"==l&&(b[c[k]]=!1)}}return b}
|
|
function xb(a){var b=rb(a,"AMP_EXP"),c=b?b.split(/\s*,\s*/g):[];a=Object.create(null);for(var d=0;d<c.length;d++)0!=c[d].length&&("-"==c[d][0]?a[c[d].substr(1)]=!1:a[c[d]]=!0);return a};function yb(a,b){var c=b||0,d=this.length;for(b=0<=c?c:Math.max(d+c,0);b<d;b++){var e=this[b];if(e===a||a!==a&&e!==e)return!0}return!1};function zb(a){return a==this||this.documentElement.contains(a)}function Ab(a){var b=a.HTMLDocument||a.Document;b.prototype.contains||a.Object.defineProperty(b.prototype,"contains",{enumerable:!1,configurable:!0,writable:!0,value:zb})};function Bb(a){return(a=Number(a))?0<a?1:-1:a};var Cb=Object.prototype.hasOwnProperty;function Mb(a,b){if(null==a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1;d<arguments.length;d++){var e=arguments[d];if(null!=e)for(var g in e)Cb.call(e,g)&&(c[g]=e[g])}return c};function M(a){if(!(this instanceof M))throw new TypeError("Constructor Promise requires `new`");if(!Nb(a))throw new TypeError("Must pass resolver function");this._state=Ob;this._value=[];this._isChainEnd=!0;Pb(this,Qb(this,Rb),Qb(this,Sb),{then:a})}M.prototype.then=function(a,b){a=Nb(a)?a:void 0;b=Nb(b)?b:void 0;if(a||b)this._isChainEnd=!1;return this._state(this._value,a,b)};M.prototype.catch=function(a){return this.then(void 0,a)};
|
|
M.resolve=function(a){var b=this,c;return c=a===Object(a)&&a instanceof this?a:new b(function(b){b(a)})};M.reject=function(a){return new this(function(b,c){c(a)})};M.all=function(a){var b=this;return new b(function(c,d){var e=a.length,g=Array(e);if(0===e)return c(g);Tb(a,function(a,k){b.resolve(a).then(function(a){g[k]=a;0===--e&&c(g)},d)})})};M.race=function(a){var b=this;return new b(function(c,d){for(var e=0;e<a.length;e++)b.resolve(a[e]).then(c,d)})};function Ub(a){throw a;}
|
|
M._overrideUnhandledExceptionHandler=function(a){Ub=a};function Rb(a,b,c,d){if(!b){if(b=d)b=b.promise,b._state=Rb,b._value=a;return this}d||(d=new Vb(this.constructor));Wb(Xb(d,b,a));return d.promise}function Sb(a,b,c,d){if(!c)return d&&(b=d.promise,b._state=Sb,b._value=a),this;d||(d=new Vb(this.constructor));Wb(Xb(d,c,a));return d.promise}
|
|
function Ob(a,b,c,d){if(!d){if(!b&&!c)return this;d=new Vb(this.constructor)}a.push({deferred:d,onFulfilled:b||d.resolve,onRejected:c||d.reject});return d.promise}function Vb(a){var b=this;this.promise=new a(function(a,d){b.resolve=a;b.reject=d});return b}
|
|
function Yb(a,b,c,d){var e=a._value;a._state=b;a._value=c;d&&b===Ob&&d._state(c,void 0,void 0,{promise:a,resolve:void 0,reject:void 0});for(var g=0;g<e.length;g++){var h=e[g];a._state(c,h.onFulfilled,h.onRejected,h.deferred)}e.length=0;b===Sb&&a._isChainEnd&&setTimeout(function(){a._isChainEnd&&Ub(c,a)},0)}function Qb(a,b){return function(c){Yb(a,b,c)}}function Zb(){}function Nb(a){return"function"===typeof a}function Tb(a,b){for(var c=0;c<a.length;c++)b(a[c],c)}
|
|
function Xb(a,b,c){var d=a.promise,e=a.resolve,g=a.reject;return function(){try{var a=b(c);Pb(d,e,g,a,a)}catch(k){g(k)}}}var Wb=function(){function a(){for(var a=0;a<e;a++){var b=d[a];d[a]=null;b()}e=0}function b(a){0===e&&c();d[e++]=a}var c;"undefined"!==typeof window&&window.postMessage?(window.addEventListener("message",a),c=function(){window.postMessage("macro-task","*")}):c=function(){setTimeout(a,0)};var d=Array(16),e=0;return b}();
|
|
function Pb(a,b,c,d,e){var g=c,h,k;try{if(d===a)throw new TypeError("Cannot fulfill promise with itself");var l=d===Object(d);l&&d instanceof a.constructor?Yb(a,d._state,d._value,d):l&&(h=d.then)&&Nb(h)?(k=function(d){k=g=Zb;Pb(a,b,c,d,d)},g=function(a){k=g=Zb;c(a)},h.call(e,function(a){k(a)},function(a){g(a)})):b(d)}catch(n){g(n)}};function $b(a,b){var c=void 0===b?this.contains(a):!b;if(c)return this.remove(a),!1;this.add(a);return!0}function ac(a){/Trident|MSIE|IEMobile/i.test(a.navigator.userAgent)&&a.DOMTokenList&&a.Object.defineProperty(a.DOMTokenList.prototype,"toggle",{enumerable:!1,configurable:!0,writable:!0,value:$b})};/*
|
|
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.
|
|
|
|
*/
|
|
function bc(a){function b(a){return a.toLowerCase()}var c="auto";function d(){var a=sc.splice(0,sc.length);for(tc=0;a.length;)a.shift().call(null,a.shift())}function e(a,b){for(var c=0,d=a.length;c<d;c++)D(a[c],b)}function g(a){for(var b=0,c=a.length,d;b<c;b++)d=a[b],Db(d,Eb[k(d)])}function h(a){return function(b){zj(b)&&(D(b,a),ea.length&&e(b.querySelectorAll(ea),a))}}function k(a){var b=bb.call(a,"is"),c=a.nodeName.toUpperCase();a=oa.call(Qa,b?vc+b.toUpperCase():Fb+c);return b&&-1<a&&!l(c,b)?-1:
|
|
a}function l(a,b){return-1<ea.indexOf(a+'[is="'+b+'"]')}function n(a){var b=a.currentTarget,c=a.attrChange,d=a.attrName,e=a.target,g=a[wc]||2,h=a[Ad]||3;if(xc&&(!e||e===b)&&b[Fa]&&"style"!==d&&(a.prevValue!==a.newValue||""===a.newValue&&(c===g||c===h)))b[Fa](d,c===g?null:a.prevValue,c===h?null:a.newValue)}function m(a){var b=h(a);return function(a){sc.push(b,a.target);tc&&clearTimeout(tc);tc=setTimeout(d,1)}}function q(a){Jf&&(Jf=!1,a.currentTarget.removeEventListener(Kf,q));ea.length&&e((a.target||
|
|
F).querySelectorAll(ea),a.detail===pa?pa:fa);cb&&v()}function t(a,b){Lf.call(this,a,b);Bd.call(this,{target:this})}function y(a,b){Bj(a,b);yc?yc.observe(a,Cj):(zc&&(a.setAttribute=t,a[ba]=Cd(a),a[ga](Dj,Bd)),a[ga](Ra,n));a[Gb]&&xc&&(a.created=!0,a[Gb](),a.created=!1)}function v(){for(var a,b=0,c=Hb.length;b<c;b++)a=Hb[b],db.contains(a)||(c--,Hb.splice(b--,1),D(a,pa))}function A(a){throw Error("A "+a+" type is already registered");}function D(a,b){var c,d=k(a);-1<d&&(Dd(a,Eb[d]),d=0,b!==fa||a[fa]?
|
|
b!==pa||a[pa]||(a[fa]=!1,a[pa]=!0,d=1):(a[pa]=!1,a[fa]=!0,d=1,cb&&0>oa.call(Hb,a)&&Hb.push(a)),d&&(c=a[b+xa])&&c.call(a))}function z(){}function B(a,c,d){d=d&&d[Ib]||"";var e=c.prototype,g=Ed(e),h=c.observedAttributes||Fd,k={prototype:g};Ac(g,Gb,{value:function(){if(Bc)Bc=!1;else if(!this[Jb]){this[Jb]=!0;new c(this);e[Gb]&&e[Gb].call(this);var a=Kb[Cc.get(c)];(!eb||1<a.create.length)&&J(this)}}});Ac(g,Fa,{value:function(a){-1<oa.call(h,a)&&e[Fa].apply(this,arguments)}});e[Mf]&&Ac(g,Ej,{value:e[Mf]});
|
|
e[Nf]&&Ac(g,Fj,{value:e[Nf]});d&&(k[Ib]=d);a=a.toUpperCase();Kb[a]={constructor:c,create:d?[d,b(a)]:[a]};Cc.set(c,a);F[Ga](a.toLowerCase(),k);ha(a);fb[a].r()}function x(a){return(a=Kb[a.toUpperCase()])&&a.constructor}function u(a){return"string"===typeof a?a:a&&a.is||""}function J(a){for(var b=a[Fa],c=b?a.attributes:Fd,d=c.length,e;d--;)e=c[d],b.call(a,e.name||e.nodeName,null,e.value||e.nodeValue)}function ha(a){a=a.toUpperCase();a in fb||(fb[a]={},fb[a].p=new Of(function(b){fb[a].r=b}));return fb[a].p}
|
|
function S(){function c(b){var c=a[b];if(c){a[b]=function Aj(a){var b;a||(a=this);a[Jb]||(Bc=!0,a=Kb[Cc.get(a.constructor)],a=(b=eb&&1===a.create.length)?Reflect.construct(c,Fd,a.constructor):F.createElement.apply(F,a.create),a[Jb]=!0,Bc=!1,b||J(a));return a};a[b].prototype=c.prototype;try{c.prototype.constructor=a[b]}catch(Aj){Gj=!0,gb(c,Jb,{value:a[b]})}}}ya&&delete a.customElements;gb(a,"customElements",{configurable:!0,value:new z});gb(a,"CustomElementRegistry",{configurable:!0,value:z});for(var d=
|
|
Ha.get(/^HTML[A-Z]*[a-z]/),e=d.length;e--;c(d[e]));F.createElement=function(a,c){return(c=u(c))?Gd.call(this,a,b(c)):Gd.call(this,a)};Pf||(Hd=!0,F[Ga](""))}var F=a.document,V=a.Object,Ha=function(a){function b(a,b){b=b.toLowerCase();b in e||(e[a]=(e[a]||[]).concat(b),e[b]=e[b.toUpperCase()]=a)}function c(a){var b=[],c;for(c in e)a.test(c)&&b.push(c);return b}var d=/^[A-Z]+[a-z]/,e=(V.create||V)(null),g={},h,k,l,m;for(k in a)for(m in a[k])for(l=a[k][m],e[m]=l,h=0;h<l.length;h++)e[l[h].toLowerCase()]=
|
|
e[l[h].toUpperCase()]=m;g.get=function(a){return"string"===typeof a?e[a]||(d.test(a)?[]:""):c(a)};g.set=function Hm(a,c){return d.test(a)?b(a,c):b(c,a),g};return g}({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"]}});c||(c="auto");var Ga="registerElement",ba="__"+Ga+(1E5*a.Math.random()>>0),ga="addEventListener",fa="attached",xa="Callback",pa="detached",Ib="extends",Fa="attributeChanged"+xa,Ej=fa+xa,Mf="connected"+xa,Nf="disconnected"+xa,Gb="created"+xa,Fj=pa+xa,wc="ADDITION",Id="MODIFICATION",Ad="REMOVAL",Ra="DOMAttrModified",Kf="DOMContentLoaded",Dj="DOMSubtreeModified",Fb="<",vc="=",Hj=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,Ij="ANNOTATION-XML COLOR-PROFILE FONT-FACE FONT-FACE-SRC FONT-FACE-URI FONT-FACE-FORMAT FONT-FACE-NAME MISSING-GLYPH".split(" "),
|
|
Qa=[],Eb=[],ea="",db=F.documentElement,oa=Qa.indexOf||function(a){for(var b=this.length;b--&&this[b]!==a;);return b},Jd=V.prototype,Kd=Jd.hasOwnProperty,Dc=Jd.isPrototypeOf,gb=V.defineProperty,Fd=[],Ld=V.getOwnPropertyDescriptor,Qf=V.getOwnPropertyNames,Jj=V.getPrototypeOf,Rf=V.setPrototypeOf,Sf=!!V.__proto__,Gj=!1,Jb="__dreCEv1",ya=a.customElements,eb="force"!==c&&!!(ya&&ya.define&&ya.get&&ya.whenDefined),Tf=V.create||V,Kj=a.Map||function(){var a=[],b=[],c;return{get:function(c){return b[oa.call(a,
|
|
c)]},set:function(d,e){c=oa.call(a,d);0>c?b[a.push(d)-1]=e:b[c]=e}}},Of=a.Promise||function(a){function b(a){for(d=!0;c.length;)c.shift()(a)}var c=[],d=!1,e={"catch":function(){return e},then:function(a){c.push(a);d&&setTimeout(b,1);return e}};a(b);return e},Bc=!1,Kb=Tf(null),fb=Tf(null),Cc=new Kj,Ed=V.create||function uc(a){return a?(uc.prototype=a,new uc):this},Bj=Rf||(Sf?function(a,b){a.__proto__=b;return a}:Qf&&Ld?function(){function a(a,b){for(var c,d=Qf(b),e=0,g=d.length;e<g;e++)c=d[e],Kd.call(a,
|
|
c)||gb(a,c,Ld(b,c))}return function(b,c){do a(b,c);while((c=Jj(c))&&!Dc.call(c,b));return b}}():function(a,b){for(var c in b)a[c]=b[c];return a}),Lb=a.MutationObserver||a.WebKitMutationObserver,X=(a.HTMLElement||a.Element||a.Node).prototype,cb=!Dc.call(X,db),Ac=cb?function(a,b,c){a[b]=c.value;return a}:gb,zj=cb?function(a){return 1===a.nodeType}:function(a){return Dc.call(X,a)},Hb=cb&&[],Uf=X.attachShadow,Lj=X.cloneNode,Md=X.dispatchEvent,bb=X.getAttribute,Mj=X.hasAttribute,Nj=X.removeAttribute,Lf=
|
|
X.setAttribute,Ec=F.createElement,Gd=Ec,Cj=Lb&&{attributes:!0,characterData:!0,attributeOldValue:!0},Vf=Lb||function(){zc=!1;db.removeEventListener(Ra,Vf)},sc,tc=0,Pf=Ga in F,Wf=!0,Hd=!1,zc=!0,Jf=!0,xc=!0,Bd,Fc,Cd,yc,Nd,Dd,Db;Pf||(Rf||Sf?(Dd=function(a,b){Dc.call(b,a)||y(a,b)},Db=y):Db=Dd=function(a,b){a[ba]||(a[ba]=V(!0),y(a,b))},cb?(zc=!1,function(){function a(a){var b=a.currentTarget,c=b[ba];a=a.propertyName;var d;c.hasOwnProperty(a)&&(c=c[a],d=new CustomEvent(Ra,{bubbles:!0}),d.attrName=c.name,
|
|
d.prevValue=c.value||null,d.newValue=c.value=b[a]||null,null==d.prevValue?d[wc]=d.attrChange=0:d[Id]=d.attrChange=1,Md.call(b,d))}function b(a,b){var c=Mj.call(this,a),d=c&&bb.call(this,a),e=new CustomEvent(Ra,{bubbles:!0});Lf.call(this,a,b);e.attrName=a;e.prevValue=c?d:null;e.newValue=b;c?e[Id]=e.attrChange=1:e[wc]=e.attrChange=0;Md.call(this,e)}function c(a){var b=new CustomEvent(Ra,{bubbles:!0});b.attrName=a;b.prevValue=bb.call(this,a);b.newValue=null;b[Ad]=b.attrChange=2;Nj.call(this,a);Md.call(this,
|
|
b)}var d=Ld(X,ga),e=d.value;d.value=function(d,g,h){d===Ra&&this[Fa]&&this.setAttribute!==b&&(this[ba]={className:{name:"class",value:this.className}},this.setAttribute=b,this.removeAttribute=c,e.call(this,"propertychange",a));e.call(this,d,g,h)};gb(X,ga,d)}()):Lb||(db[ga](Ra,Vf),db.setAttribute(ba,1),db.removeAttribute(ba),zc&&(Bd=function(a){var b,c,d;if(this===a.target){b=this[ba];this[ba]=c=Cd(this);for(d in c){if(!(d in b))return Fc(0,this,d,b[d],c[d],wc);if(c[d]!==b[d])return Fc(1,this,d,b[d],
|
|
c[d],Id)}for(d in b)if(!(d in c))return Fc(2,this,d,b[d],c[d],Ad)}},Fc=function(a,b,c,d,e,g){c={attrChange:a,currentTarget:b,attrName:c,prevValue:d,newValue:e};c[g]=a;n(c)},Cd=function(a){for(var b,c={},d=a.attributes,e=0,g=d.length;e<g;e++)b=d[e],a=b.name,"setAttribute"!==a&&(c[a]=b.value);return c})),F[Ga]=function If(a,b){function c(){return l?F.createElement(n,v):F.createElement(n)}v=a.toUpperCase();Wf&&(Wf=!1,Lb?(yc=function(a,b){function c(a,b){for(var c=0,d=a.length;c<d;b(a[c++]));}return new Lb(function(d){for(var e,
|
|
g,h,k=0,l=d.length;k<l;k++)if(e=d[k],"childList"===e.type)c(e.addedNodes,a),c(e.removedNodes,b);else if(g=e.target,xc&&g[Fa]&&"style"!==e.attributeName&&(h=bb.call(g,e.attributeName),h!==e.oldValue))g[Fa](e.attributeName,e.oldValue,h)})}(h(fa),h(pa)),Nd=function(a){yc.observe(a,{childList:!0,subtree:!0});return a},Nd(F),Uf&&(X.attachShadow=function(){return Nd(Uf.apply(this,arguments))})):(sc=[],F[ga]("DOMNodeInserted",m(fa)),F[ga]("DOMNodeRemoved",m(pa))),F[ga](Kf,q),F[ga]("readystatechange",q),
|
|
X.cloneNode=function(a){var b=Lj.call(this,!!a),c=k(b);-1<c&&Db(b,Eb[c]);a&&ea.length&&g(b.querySelectorAll(ea));return b});if(Hd)return Hd=!1;-2<oa.call(Qa,vc+v)+oa.call(Qa,Fb+v)&&A(a);if(!Hj.test(v)||-1<oa.call(Ij,v))throw Error("The type "+a+" is invalid");var d=b||Jd,l=Kd.call(d,Ib),n=l?b[Ib].toUpperCase():v,v;l&&-1<oa.call(Qa,Fb+n)&&A(n);b=Qa.push((l?vc:Fb)+v)-1;ea=ea.concat(ea.length?",":"",l?n+'[is="'+a.toLowerCase()+'"]':n);c.prototype=Eb[b]=Kd.call(d,"prototype")?d.prototype:Ed(X);ea.length&&
|
|
e(F.querySelectorAll(ea),fa);return c},F.createElement=Gd=function(a,c){var d=u(c),e=d?Ec.call(F,a,b(d)):Ec.call(F,a);a=""+a;var g=oa.call(Qa,(d?vc:Fb)+(d||a).toUpperCase()),h=-1<g;d&&(e.setAttribute("is",d=d.toLowerCase()),h&&(h=l(a.toUpperCase(),d)));xc=!F.createElement.innerHTMLHelper;h&&Db(e,Eb[g]);return e});z.prototype={constructor:z,define:eb?function(a,b,c){if(c)B(a,b,c);else{var d=a.toUpperCase();Kb[d]={constructor:b,create:[d]};Cc.set(b,d);ya.define(a,b)}}:B,get:eb?function(a){return ya.get(a)||
|
|
x(a)}:x,whenDefined:eb?function(a){return Of.race([ya.whenDefined(a),ha(a)])}:ha};if(ya&&"force"!==c)try{(function(b,c,d){c[Ib]="a";b.prototype=Ed(HTMLAnchorElement.prototype);b.prototype.constructor=b;a.customElements.define(d,b,c);if(bb.call(F.createElement("a",{is:d}),"is")!==d||eb&&bb.call(new b,"is")!==d)throw c;})(function If(){return Reflect.construct(HTMLAnchorElement,[],If)},{},"document-register-element-a")}catch(uc){S()}else S();try{Ec.call(F,"a","a")}catch(uc){b=function(a){return{is:a.toLowerCase()}}}}
|
|
;bc(self);ac(self);(function(a){a.Math.sign||a.Object.defineProperty(a.Math,"sign",{enumerable:!1,configurable:!0,writable:!0,value:Bb})})(self);(function(a){a.Object.assign||a.Object.defineProperty(a.Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:Mb})})(self);(function(a){a.Promise||(a.Promise=M,M.default&&(a.Promise=M.default),a.Promise.resolve=M.resolve,a.Promise.reject=M.reject,a.Promise.all=M.all,a.Promise.race=M.race)})(self);Ab(self);
|
|
(function(a){a.Array.prototype.includes||a.Object.defineProperty(Array.prototype,"includes",{enumerable:!1,configurable:!0,writable:!0,value:yb})})(self);function N(){var a,b;this.promise=new Promise(function(c,d){a=c;b=d});this.resolve=a;this.reject=b}function cc(a){return new Promise(function(b){b(a())})};function dc(a,b,c){if(a.nodeType){var d=ec((a.ownerDocument||a).defaultView,b);if(d)return d}return!a.nodeType||c?fc(a,b):null}function gc(a,b,c){var d=hc(a);ec(a,b);ic(a,a,b,function(){return c});jc(a,b)}function ec(a,b){var c=hc(a);return a!=c&&kc(a,b)?jc(a,b):null}function O(a,b,c){var d;a=hc(a);ic(a,a,b,c);d&&jc(a,b)}function P(a,b,c,d){var e=lc(a),g=mc(e);ic(g,e,b,c);d&&jc(g,b)}function Q(a,b){a=hc(a);return jc(a,b)}function nc(a){a=hc(a);return kc(a,"performance")?jc(a,"performance"):null}
|
|
function oc(a,b){var c=lc(a),c=mc(c);return jc(c,b)}function fc(a,b){a=lc(a);a=mc(a);return jc(a,b)}function pc(a,b){return qc(mc(a),b)}function rc(a,b){return Gc(mc(a),b)}function Hc(a,b){a.__AMP_PARENT=b;a.__AMP_TOP=hc(b)}function hc(a){return a.__AMP_TOP||a}function Ic(a,b){var c=(a.ownerDocument||a).defaultView;if(c&&c!=b&&hc(c)==b)try{return c.frameElement}catch(d){}return null}function lc(a){return a.nodeType?Q((a.ownerDocument||a).defaultView,"ampdoc").getAmpDoc(a):a}
|
|
function mc(a){a=lc(a);return a.isSingleDoc()?a.win:a}function jc(a,b){kc(a,b);var c=Jc(a);a=c[b];a.obj||(a.obj=new a.ctor(a.context),a.ctor=null,a.context=null,a.resolve&&a.resolve(a.obj));return a.obj}function ic(a,b,c,d){var e=Jc(a),g=e[c];g||(g=e[c]={obj:null,promise:null,resolve:null,context:null,ctor:null});g.ctor||g.obj||(g.ctor=d,g.context=b,g.resolve&&jc(a,c))}
|
|
function qc(a,b){var c=Gc(a,b);if(c)return c;var d=new N,e=d.promise,d=d.resolve;Jc(a)[b]={obj:null,promise:e,resolve:d,context:null,ctor:null};return e}function Gc(a,b){var c=Jc(a)[b];if(c){if(c.promise)return c.promise;jc(a,b);return c.promise=Promise.resolve(c.obj)}return null}function Jc(a){var b=a.services;b||(b=a.services={});return b}function Kc(a,b){var c=a.frameElement,d=lc(c),d=mc(d);kc(d,b)&&(b=fc(c,b),"function"==typeof b.adoptEmbedWindow&&b.adoptEmbedWindow(a))}
|
|
function kc(a,b){a=a.services&&a.services[b];return!(!a||!a.ctor&&!a.obj)};/*
|
|
https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
var Lc=/(\0)|^(-)$|([\x01-\x1f\x7f]|^-?[0-9])|([\x80-\uffff0-9a-zA-Z_-]+)|[^]/g;function Mc(a,b,c,d,e){return e?e:b?"\ufffd":d?a.slice(0,-1)+"\\"+a.slice(-1).charCodeAt(0).toString(16)+" ":"\\"+a};function Nc(a,b,c){if(b(a))c();else{var d=a.ownerDocument.defaultView;if(d.MutationObserver){var e=new d.MutationObserver(function(){b(a)&&(e.disconnect(),c())});e.observe(a,{childList:!0})}else var g=d.setInterval(function(){b(a)&&(d.clearInterval(g),c())},5)}}function Oc(a,b){Nc(a.documentElement,function(){return!!a.body},b)}function Pc(a){return new Promise(function(b){Oc(a,b)})}function Qc(a){a.parentElement&&a.parentElement.removeChild(a)}
|
|
function Rc(a){var b=a.isConnected;if(void 0!==b)return b;do if(a=Sc(a),a.host)a=a.host;else break;while(1);return a.nodeType===Node.DOCUMENT_NODE}function Sc(a){if(Node.prototype.getRootNode)return a.getRootNode()||a;for(;a.parentNode;a=a.parentNode);return a}function Tc(a,b){for(var c,d=a;d&&d!==c;d=d.parentElement)if(b(d))return d;return null}function Uc(a,b){for(;a;a=a.parentNode)if(b(a))return a;return null}
|
|
function Vc(a,b){if(a.closest)return a.closest(b);b=b.toUpperCase();return Tc(a,function(a){return a.tagName==b})}function Wc(a){return a.closest?a.closest(".i-amphtml-scrollable"):Tc(a,function(a){return Xc(a,".i-amphtml-scrollable")})}function Xc(a,b){var c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector;return c?c.call(a,b):!1}function Yc(a,b){var c=[];for(a=a.firstElementChild;a;a=a.nextElementSibling)b(a)&&c.push(a);return c}
|
|
function Zc(a,b){for(a=a.lastElementChild;a;a=a.previousElementSibling)if(b(a))return a;return null}function $c(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)b(a)&&c.push(a);return c}var ad;function bd(a){a=a.ownerDocument;try{var b=a.createElement("div"),c=a.createElement("div");b.appendChild(c);return b.querySelector(":scope div")===c}catch(d){return!1}}
|
|
function cd(a,b){null==ad&&(ad=bd(a));if(ad)return a.querySelector(":scope "+b);var c="i-amphtml-scoped";a.classList.add(c);b=a.querySelector("."+c+" "+b);a.classList.remove(c);return b}function dd(a,b){null==ad&&(ad=bd(a));if(ad)return a.querySelectorAll(":scope "+b);a.classList.add("i-amphtml-scoped");b=a.querySelectorAll(".i-amphtml-scoped "+b);a.classList.remove("i-amphtml-scoped");return b}
|
|
function ed(a,b,c){var d,e;try{e=a.open(b,c,d)}catch(g){E().error("DOM","Failed to open url on target: ",c,g)}e||"_top"==c||a.open(b,"_top")}function fd(a){return a.parent&&a.parent!=a};function gd(a,b,c){var d=Gc(a,b);return d?d:hd(a,b,c,!0)}function id(a,b,c){return jd(a,b,c,void 0).then(function(a){return C().assert(a,"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.",b,c,c,c)})}
|
|
function jd(a,b,c,d){var e=lc(a),g=rc(a,b);return g?g:e.whenBodyAvailable().then(function(){return kd(e.win,c,e.getHeadNode())}).then(function(){var g;d?g=rc(a,b):(g=e.win,g=g.ampExtendedElements&&g.ampExtendedElements[c]?pc(a,b):null);return g})}function ld(a){var b=dc(a,"bind");if(b)return Promise.resolve(b);if(a.nodeType){var b=a.ownerDocument.defaultView,c=hc(b);return b!==c?hd(b,"bind","amp-bind"):jd(a,"bind","amp-bind")}return Promise.resolve(null)}
|
|
function md(a){if(!a)return[];for(var b=[],c=a.querySelectorAll("script[custom-element]"),d=0;d<c.length;d++)b.push(c[d].getAttribute("custom-element"));return b}function kd(a,b,c){if(!md(c).includes(b))return Promise.resolve();var d=Q(a,"extensions");return d.waitForExtension(a,b)}function hd(a,b,c,d){return Pc(a.document).then(function(){return kd(a,c,a.document.head)}).then(function(){return d?Gc(a,b):a.ampExtendedElements&&a.ampExtendedElements[c]?qc(a,b):null})};function nd(a){return Q(a,"ampdoc")}function od(a){return oc(a,"documentInfo").get()}function pd(a){return Q(a,"extensions")}function qd(a){return Q(a,"performance")}function rd(a){return Q(a,"platform")}function sd(a){return fc(a,"resources")}function R(a){return Q(a,"timer")}function T(a){return fc(a,"viewer")}function td(a){return Q(a,"vsync")}function ud(a){return fc(a,"viewport")};var vd;function wd(a,b,c,d){var e=a,g=c,h;h=function(a){try{return g(a)}catch(m){throw self.reportError(m),m;}};var k=xd(),l=!1;d&&(l=d.capture);e.addEventListener(b,h,k?d:l);return function(){e&&e.removeEventListener(b,h,k?d:l);h=e=g=null}}function xd(){if(void 0!==vd)return vd;vd=!1;try{var a={get capture(){vd=!0}};self.addEventListener("test-options",null,a);self.removeEventListener("test-options",null,a)}catch(b){}return vd};function yd(a,b,c,d){return wd(a,b,c,d)}function zd(a,b,c,d){var e=c,g=wd(a,b,function(a){try{e(a)}finally{e=null,g()}},d);return g}function Od(a,b){var c,d=new Promise(function(b){c=zd(a,"click",b,void 0)});d.then(c,c);b&&b(c);return d}
|
|
function Pd(a){var b,c;if(a.complete||"complete"==a.readyState||a.document&&"complete"==a.document.readyState)return Promise.resolve(a);var d=new Promise(function(d,g){var e=a.tagName;b="AUDIO"===e||"VIDEO"===e?zd(a,"loadstart",d):zd(a,"load",d);e&&(c=zd(a,"error",g))});return d.then(function(){c&&c();return a},function(){b&&b();var c=a;c&&c.src&&(c=c.src);throw C().createError("Failed to load:",c);})};function Qd(a,b,c){return Pd(a).then(function(){return Rd(a,b,c)})}function Rd(a,b,c){var d=a.performance&&a.performance.timing;if(d&&0!=d.navigationStart){var e=void 0===c?d[b]:d[c]-d[b];if(na(e)&&!(0>e))return e}}function Sd(a,b){var c=a.performance&&a.performance.navigation;if(c&&void 0!==c[b])return c[b]}function Td(a){this.ampdoc=a;this.Nb=this.Ob=void 0;this.ha=Object.create(null);this.xd=!1;Ud(this)}f=Td.prototype;f.ec=function(){this.initialize();this.xd=!0};f.initialize=function(){};
|
|
f.get=function(a){this.xd||this.ec();return this.ha[a]};f.set=function(a,b){this.ha[a]=this.ha[a]||{sync:void 0,async:void 0};this.ha[a].sync=b;this.Nb=this.Ob=void 0;return this};f.setAsync=function(a,b){this.ha[a]=this.ha[a]||{sync:void 0,async:void 0};this.ha[a].async=b;this.Nb=this.Ob=void 0;return this};f.setBoth=function(a,b,c){return this.set(a,b).setAsync(a,c)};
|
|
f.getExpr=function(a,b,c){var d=this;this.xd||this.ec();var e=a?Object.keys(a):null;if(e&&0<e.length){var g=Object.keys(this.ha);e.forEach(function(a){void 0===d.ha[a]&&g.push(a)});return Vd(this,g,b,c)}this.Ob||b||(this.Ob=Vd(this,Object.keys(this.ha)));!this.Nb&&b&&(this.Nb=Vd(this,Object.keys(this.ha),b,c));return b?this.Nb:this.Ob};
|
|
function Vd(a,b,c,d){Ud(a)&&(b=b.filter(function(b){return Ud(a).includes(b)}));d&&(b=b.filter(function(a){return d[a]}));b.sort(function(a,b){return b.length-a.length});var e=b.map(function(a){return"$"===a[0]?"\\"+a:a}).join("|"),g="\\$?("+e+")";c||(g+="(?:\\(((?:\\s*[0-9a-zA-Z-_.]*\\s*(?=,|\\)),?)*)\\s*\\))?");return new RegExp(g,"g")}
|
|
function Ud(a){if(a.qe)return a.qe;var b=a.ampdoc.getRootNode().head;if(!b)return null;b=b.querySelector('meta[name="amp-allowed-url-macros"]');if(!b)return null;a.qe=b.getAttribute("content").split(",").map(function(a){return a.trim()});return a.qe};function Wd(a){var b=Object.create(null),c;for(c in a)if(Xd(a,c)){var d=a[c];b[c]=ma(d)?Wd(d):d}return b}function Yd(a){return JSON.parse(a)}function Xd(a,b){return null==a||"object"!=typeof a?!1:Object.prototype.hasOwnProperty.call(a,b)};function Zd(){var a=$d();return function(b){return setTimeout(b,a())}}function $d(){var a=0;return function(){var b=Math.pow(1.5,a++),c;c=b*(c||.3)*Math.random();.5<Math.random()&&(c*=-1);b+=c;return 1E3*b}};var ae,be="Webkit webkit Moz moz ms O o".split(" ");function ce(a,b,c){if(I(b,"--"))return b;ae||(ae=G());var d=ae[b];if(!d||c){d=b;if(void 0===a[b]){var e=b.charAt(0).toUpperCase()+b.slice(1);a:{for(var g=0;g<be.length;g++){var h=be[g]+e;if(void 0!==a[h]){e=h;break a}}e=""}var k=e;void 0!==a[k]&&(d=k)}c||(ae[b]=d)}return d}function de(a,b){for(var c in b)a.style.setProperty(ce(b,c),b[c].toString(),"important")}function U(a,b,c,d){(b=ce(a.style,b,void 0))&&(a.style[b]=d?c+d:c)}
|
|
function ee(a){var b=ce(a.style,"display",void 0);if(b)return a.style[b]}function fe(a,b){for(var c in b)U(a,c,b[c])}function ge(a,b){void 0===b&&(b="none"==ee(a));U(a,"display",b?"":"none")}function he(a,b){return a.getComputedStyle(b)||G()};var ie={"amp-dynamic-css-classes":"[custom-element=amp-dynamic-css-classes]",variant:"amp-experiment","amp-story":"amp-story[standalone]"};function je(a){var b=ke(a).map(function(b){return R(a).timeoutPromise(3E3,qc(a,b),"Render timeout waiting for service "+b+" to be ready.")});return Promise.all(b)}function ke(a){var b=a.document;return Object.keys(ie).filter(function(a){return b.querySelector(ie[a])})};function le(a,b,c,d,e){var g=a.getHeadNode(),h=me(g,ne(g,b),d||!1,e||null);if(c){var k=a.getRootNode();if(oe(k,h))c(h);else var l=setInterval(function(){oe(k,h)&&(clearInterval(l),c(h))},4)}}function pe(a,b,c,d,e){var g=me(a.head,b,d||!1,e||null);if(c)if(oe(a,g))c(g);else var h=setInterval(function(){oe(a,g)&&(clearInterval(h),c(g))},4)}
|
|
function me(a,b,c,d){var e=a.__AMP_CSS_SM;e||(e=a.__AMP_CSS_SM=G());var g=!c&&d&&"amp-custom"!=d&&"amp-keyframes"!=d,h=c?"amp-runtime":g?"amp-extension="+d:null;if(h){var k=qe(a,e,h);if(k)return k}var l=(a.ownerDocument||a).createElement("style");l.textContent=b;var n=null;c?l.setAttribute("amp-runtime",""):g?(l.setAttribute("amp-extension",d||""),n=qe(a,e,"amp-runtime")):(d&&l.setAttribute(d,""),n=a.lastChild);b=n;a.insertBefore(l,b?b.nextSibling:a.firstChild);h&&(e[h]=l);return l}
|
|
function qe(a,b,c){return b[c]?b[c]:(a=a.querySelector("style["+c+"]"))?b[c]=a:null}function ne(a,b){return(a=a.__AMP_CSS_TR)?a(b):b}
|
|
function re(a,b){var c=a.defaultView;if(!c.__AMP_BODY_VISIBLE){var d=function(){c.__AMP_BODY_VISIBLE=!0;fe(a.body,{opacity:1,visibility:"visible",animation:"none"});try{sd(a).renderStarted()}catch(e){}};try{Oc(a,function(){c.__AMP_BODY_VISIBLE||(c.__AMP_BODY_VISIBLE=!0,b?je(c).catch(function(a){w(a);return[]}).then(function(b){d();0<b.length&&sd(a).schedulePass(1,!0);try{var e=qd(c);e.tick("mbv");e.flush()}catch(h){}}):d())})}catch(e){d(),w(e)}}}
|
|
function oe(a,b){var c=a.styleSheets;for(a=0;a<c.length;a++){var d=c[a];if(d.ownerNode==b)return!0}return!1};function se(a,b){jd(a,"amp-analytics-instrumentation","amp-analytics").then(function(c){c&&c.triggerEventForTarget(a,"user-error",b)})};var te=self.AMPErrors||[];self.AMPErrors=te;function ue(a){ue=Zd();return ue(a)}function ve(a){try{return JSON.stringify(a)}catch(b){return String(a)}}var we;
|
|
function xe(a,b){try{var c;if(a)if(void 0!==a.message)a=Aa(a),c=!0;else{var d=a;a=Error(ve(d));a.origError=d}else a=Error("Unknown error");if(a.reported)return a;a.reported=!0;var e=b||a.associatedElement;e&&e.classList&&(e.classList.add("i-amphtml-error"),r().development&&(e.classList.add("i-amphtml-element-error"),e.setAttribute("error-message",a.message)));if(self.console){var g=console.error||console.log;a.messageArray?g.apply(console,a.messageArray):e?g.call(console,a.message,e):g.call(console,
|
|
a.message)}e&&e.$a&&e.$a();ye.call(void 0,void 0,void 0,void 0,void 0,a)}catch(h){setTimeout(function(){throw h;})}return a}function ze(a){return a?"string"==typeof a?I(a,"BLOCK_BY_CONSENT"):"string"==typeof a.message?I(a.message,"BLOCK_BY_CONSENT"):!1:!1}function Ae(){var a=self;a.onerror=ye;a.addEventListener("unhandledrejection",function(a){!a.reason||"CANCELLED"!==a.reason.message&&"BLOCK_BY_CONSENT"!==a.reason.message?xe(a.reason||Error("rejected promise "+a)):a.preventDefault()})}
|
|
function ye(a,b,c,d,e){this&&this.document&&re(this.document);if(!r().development){var g=!1;try{g=Be()}catch(k){}if(!(g&&.01<Math.random())){var h=Ce(a,b,c,d,e,g);h&&(De(this,h),ue(function(){var a=new XMLHttpRequest;a.open("POST",Ka.errorReporting,!0);a.send(JSON.stringify(h))}))}}}
|
|
function De(a,b){var c=nd(a);if(c.isSingleDoc()){var d=c.getAmpDoc(),e=d.getRootNode().documentElement,g=e.hasAttribute("report-errors-to-viewer");if(g){var h=T(d);h.hasCapability("errorReporter")?h.isTrustedViewer().then(function(a){if(!a)return!1;h.sendMessage("error",b);return!0}):Promise.resolve(!1)}else Promise.resolve(!1)}else Promise.resolve(!1)}
|
|
function Ce(a,b,c,d,e,g){var h=!1;e&&(a=e.message?e.message:String(e),e.expected&&(h=!0));a||(a="Unknown error");if(!/_reported_/.test(a)&&"CANCELLED"!=a){var k=!(self&&self.window),l=Math.random();if(-1!=a.indexOf("Failed to load:")||"Script error."==a||k)if(h=!0,.001<l)return;var n=qa(a);if(!(n&&.1<l)){var m=Object.create(null);m.v=r().rtvVersion;m.noAmp=g?"1":"0";m.m=a.replace("\u200b\u200b\u200b","");m.a=n?"1":"0";m.ex=h?"1":"0";m.dw=k?"1":"0";var q="1p";self.context&&self.context.location?(m["3p"]=
|
|
"1",q="3p"):r().runtime&&(q=r().runtime);m.rt=q;m.ca=ub(self)?"1":"0";g=self;m.bt=g.AMP_CONFIG&&g.AMP_CONFIG.type?g.AMP_CONFIG.type:"unknown";self.location.ancestorOrigins&&self.location.ancestorOrigins[0]&&(m.or=self.location.ancestorOrigins[0]);self.viewerState&&(m.vs=self.viewerState);self.parent&&self.parent!=self&&(m.iem="1");if(self.AMP&&self.AMP.viewer){var t=self.AMP.viewer.getResolvedViewerUrl(),y=self.AMP.viewer.maybeGetMessagingOrigin();t&&(m.rvu=t);y&&(m.mso=y)}we||(we=Ee());m.jse=we;
|
|
var v=[];g=self.__AMP__EXPERIMENT_TOGGLES||null;for(var A in g)v.push(A+"="+(g[A]?"1":"0"));m.exps=v.join(",");e?(m.el=e.associatedElement?e.associatedElement.tagName:"u",e.args&&(m.args=JSON.stringify(e.args)),n||e.ignoreStack||!e.stack||(m.s=e.stack),e.message+=" _reported_"):(m.f=b||"",m.l=c||"",m.c=d||"");m.r=self.document.referrer;m.ae=te.join(",");m.fr=self.location.originalHash||self.location.hash;25<=te.length&&te.splice(0,te.length-25+1);te.push(a);return m}}}
|
|
function Be(){for(var a=self.document.querySelectorAll("script[src]"),b=0;b<a.length;b++)if(!jb(a[b].src.toLowerCase()))return!0;return!1}function Ee(){function a(){}a.prototype.t=function(){throw Error("message");};var b=new a;try{b.t()}catch(e){var c=e.stack;if(I(c,"t@"))return"Safari";if(-1<c.indexOf(".prototype.t@"))return"Firefox";var d=c.split("\n").pop();if(/\bat .* \(/i.test(d))return"IE";if(I(c,"Error: message"))return"Chrome"}return"unknown"};function W(a,b,c,d){return{left:a,top:b,width:c,height:d,bottom:b+d,right:a+c,x:a,y:b}}function Fe(a){for(var b=-Infinity,c=Infinity,d=-Infinity,e=Infinity,g=0;g<arguments.length;g++){var h=arguments[g];if(h&&(b=Math.max(b,h.left),c=Math.min(c,h.left+h.width),d=Math.max(d,h.top),e=Math.min(e,h.top+h.height),c<b||e<d))return null}return Infinity==c?null:W(b,d,c-b,e-d)}function Ge(a,b,c){return W(a.left-a.width*b,a.top-a.height*c,a.width*(1+2*b),a.height*(1+2*c))}
|
|
function He(a,b,c){return 0==b&&0==c||0==a.width&&0==a.height?a:W(a.left+b,a.top+c,a.width,a.height)};function Y(){this.$=null}f=Y.prototype;f.add=function(a){var b=this;this.$||(this.$=[]);this.$.push(a);return function(){b.remove(a)}};f.remove=function(a){this.$&&(a=this.$.indexOf(a),-1<a&&this.$.splice(a,1))};f.removeAll=function(){this.$&&(this.$.length=0)};f.fire=function(a){if(this.$)for(var b=this.$,c=0;c<b.length;c++)(0,b[c])(a)};f.getHandlerCount=function(){return this.$?this.$.length:0};function Ie(a,b){var c=100;function d(d){h=null;g=a.setTimeout(e,c);b.apply(null,d)}function e(){g=0;h&&d(h)}var g=0,h=null;return function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];g?h=b:d(b)}}function Je(a,b){function c(){d=0;var h=300-(a.Date.now()-e);if(0<h)d=a.setTimeout(c,h);else{var k=g;g=null;b.apply(null,k)}}var d=0,e=0,g=null;return function(b){for(var h=[],l=0;l<arguments.length;++l)h[l-0]=arguments[l];e=a.Date.now();g=h;d||(d=a.setTimeout(c,300))}};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;min-height:100vh!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}html.i-amphtml-ios-embed-sd{overflow:hidden!important;position:static!important}html.i-amphtml-ios-embed-sd>body,html.i-amphtml-singledoc.i-amphtml-ios-embed-sd>body{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;overflow:hidden!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-responsive,[layout=responsive][width][height]:not(.i-amphtml-layout-responsive),[width][height][sizes]:not(.i-amphtml-layout-responsive){display:block;position:relative}.i-amphtml-layout-intrinsic{display:inline-block;position:relative;max-width:100%}.i-amphtml-intrinsic-sizer{max-width:100%;display:block!important}.i-amphtml-layout-fixed-height,[layout=fixed-height][height]{display:block;position:relative}.i-amphtml-layout-container,[layout=container]{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-fluid{position:relative}.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-layout-intrinsic .i-amphtml-sizer{max-width:100%}.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:4px!important;height:4px!important;opacity:0!important;overflow:hidden!important;margin:0!important;display:block!important;visibility:visible!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:8px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:12px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:16px!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-select-disabled{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!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.2%,0.2);display:block}.i-amphtml-loader-moving-line{display:block;position:absolute;width:100%;height:100%!important;background-color:hsla(0,0%,59.2%,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,amp-story-auto-ads{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]{display:none}[subscriptions-dialog],body:not(.i-amphtml-subs-ready) [subscriptions-action],body:not(.i-amphtml-subs-ready) [subscriptions-section]{display:none!important}form [submit-error],form [submit-success],form [submitting]{display:none}[visible-when-invalid]{display:none}amp-live-list>[update]{display:none}amp-experiment,amp-share-tracking{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}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-page,amp-story[standalone]{display:block!important;height:100%!important;margin:0!important;padding:0!important;overflow:hidden!important;width:100%!important}amp-story[standalone]{background-color:#fff!important;position:relative!important}amp-story-page{background-color:#757575}amp-story .i-amphtml-loader{display:none!important}[amp-fx^=fly-in]{visibility:hidden}\n/*# sourceURL=/css/amp.css*/";function Ke(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var g=a[e];b(g,e,a)?(d<e&&(a[d]=g),d++):c.push(g)}d<a.length&&(a.length=d)}function Le(a,b){for(var c=0;c<a.length;c++)if(b(a[c],c,a))return c;return-1};var Me;function Ne(a){a=a.ownerDocument||a;Me&&Me.ownerDocument===a||(Me=a.createElement("div"));return Oe}function Oe(a){Me.innerHTML=a[0];var b=Me.firstElementChild;Me.innerHTML="";return b};var Pe=['\n <i-amphtml-sizer class="i-amphtml-sizer">\n <img class="i-amphtml-intrinsic-sizer" />\n </i-amphtml-sizer>'];Pe.raw=['\n <i-amphtml-sizer class="i-amphtml-sizer">\n <img class="i-amphtml-intrinsic-sizer" />\n </i-amphtml-sizer>'];
|
|
var Qe={NODISPLAY:"nodisplay",FIXED:"fixed",FIXED_HEIGHT:"fixed-height",RESPONSIVE:"responsive",CONTAINER:"container",FILL:"fill",FLEX_ITEM:"flex-item",FLUID:"fluid",INTRINSIC:"intrinsic"},Re={"AMP-PIXEL":{width:"0px",height:"0px"},"AMP-ANALYTICS":{width:"1px",height:"1px"},"AMP-AUDIO":null,"AMP-SOCIAL-SHARE":{width:"60px",height:"44px"}},Se={"AMP-ANIM":!0,"AMP-BRIGHTCOVE":!0,"AMP-GOOGLE-DOCUMENT-EMBED":!0,"AMP-EMBED":!0,"AMP-FACEBOOK":!0,"AMP-FACEBOOK-COMMENTS":!0,"AMP-FACEBOOK-LIKE":!0,"AMP-FACEBOOK-PAGE":!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 Te(a){for(var b in Qe)if(Qe[b]==a)return Qe[b]}function Ue(a){return"fixed"==a||"fixed-height"==a||"responsive"==a||"fill"==a||"flex-item"==a||"fluid"==a||"intrinsic"==a}function Ve(a){if("number"==typeof a)return a+"px";if(a&&/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)?$/.test(a))return/^\d+(\.\d+)?$/.test(a)?a+"px":a}
|
|
function We(a){C().assert(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)$/.test(a),"Invalid length value: %s",a);return a}function Xe(a){C().assert(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|%)$/.test(a),"Invalid length or percent value: %s",a);return a}function Ye(a){We(a);var b=C().assert(a.match(/[a-z]+/i),"Failed to read units from %s",a);return b[0]}function Ze(a){a=parseFloat(a);return na(a)?a:void 0}function $e(a){U(a,"display","none");a.classList.add("i-amphtml-display")};function af(a){return"undefined"!==typeof TextEncoder?(new TextEncoder("utf-8")).encode(a):bf(unescape(encodeURIComponent(a)))}function bf(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;c++){var d=a.charCodeAt(c);b[c]=d}return b}function cf(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};var df={"+":"-","/":"_","=":"."};function ef(a){a=cf(a);return btoa(a).replace(/[+/=]/g,function(a){return df[a]})};function ff(){this.Ea=G();this.ba=null}f=ff.prototype;f.get=function(a){return this.Ea[a]||null};f.whenSignal=function(a){var b=this.ba&&this.ba[a];if(!b){var c=this.Ea[a];null!=c?b={promise:"number"==typeof c?Promise.resolve(c):Promise.reject(c)}:(c=new N,b={promise:c.promise,resolve:c.resolve,reject:c.reject});this.ba||(this.ba=G());this.ba[a]=b}return b.promise};
|
|
f.signal=function(a,b){if(null==this.Ea[a]){var c=b||Date.now();this.Ea[a]=c;(a=this.ba&&this.ba[a])&&a.resolve&&(a.resolve(c),a.resolve=void 0,a.reject=void 0)}};f.rejectSignal=function(a,b){null==this.Ea[a]&&(this.Ea[a]=b,(a=this.ba&&this.ba[a])&&a.reject&&(a.reject(b),a.resolve=void 0,a.reject=void 0))};f.reset=function(a){this.Ea[a]&&delete this.Ea[a];var b=this.ba&&this.ba[a];b&&!b.resolve&&delete this.ba[a]};function gf(a){return"loading"!=a.readyState&&"uninitialized"!=a.readyState}function hf(a){return"complete"==a.readyState}function jf(a,b){kf(a,gf,b)}function kf(a,b,c){var d=b(a);if(d)c(a);else{var e=function(){b(a)&&(d||(d=!0,c(a)),a.removeEventListener("readystatechange",e))};a.addEventListener("readystatechange",e)}}function lf(a){return new Promise(function(b){jf(a,b)})}function mf(a){return new Promise(function(b){kf(a,hf,b)})};var nf={ANCESTOR_ORIGIN:!0};function of(a){this.Ta=a}of.prototype.expand=function(a,b,c,d,e){if(!a.length)return d?a:Promise.resolve(a);e=this.Ta.getExpr(b,!0,e);e=pf(a,e);return e.length?qf(this,a,e,b,c,d):d?a:Promise.resolve(a)};function pf(a,b){var c=[];a.replace(b,function(a,b,g){a=a.length;var d=a+g-1;c.push({start:g,stop:d,name:b,length:a})});return c}
|
|
function qf(a,b,c,d,e,g){function h(){for(var v="",A=[];l<b.length&&n<=c.length;){if(m&&l===m.start){var D=void 0;d&&Ea.call(d,m.name)?D={name:m.name,prioritized:d[m.name]}:(D=a.Ta.get(m.name),D.name=m.name);l=m.stop+1;m=c[++n];"("===b[l]?(l++,q++,k.push(D),v.trim().length&&A.push(v),A.push(h())):(v.length&&A.push(v),A.push(rf(D,void 0,e,g)));v=""}else{if("`"===b[l])t?t=!1:(y=t=!0,C().assert(""===v.trim(),'The substring "'+v+'" was lost during url-replacement. Please ensure the url syntax is correct'),
|
|
v="");else if(q&&","===b[l]&&!t){if(v.length){var z=y?v:v.trim();A.push(z);y=!1}","===b[l+1]&&(A.push(""),l++);v=""}else{if(q&&")"===b[l]&&!t){l++;q--;var B=k.pop();A.push(y?v:v.trim());y=!1;return rf(B,A,e,g)}v+=b[l]}l++}l===b.length&&v.length&&A.push(v)}return g?A.join(""):Promise.all(A).then(function(a){return a.join("")}).catch(function(a){w(a);return""})}var k=[],l=0,n=0,m=c[n],q=0,t=!1,y=!1;return h()}
|
|
function rf(a,b,c,d){var e=a.name,g;a.prioritized?g=a.prioritized:d&&a.sync?g=a.sync:d?(C().error("Expander","ignoring async replacement key: ",a.name),g=""):g=a.async||a.sync;var h;if(d){d=g;try{var k="function"===typeof d?d.apply(null,b):d,l;k&&k.then?(C().error("Expander","ignoring async macro resolution"),l=""):l="string"===typeof k||"number"===typeof k?nf[e]?k.toString():encodeURIComponent(k):"";c&&(c[e]=l);h=l}catch(n){w(n),c&&(c[e]=""),h=""}}else h=sf(g,e,b,c);return h}
|
|
function sf(a,b,c,d){var e;try{return e="function"===typeof a?c?Promise.all(c).then(function(b){return a.apply(null,b)}):cc(a):Promise.resolve(a),e.then(function(a){a=null==a?"":nf[b]?a:encodeURIComponent(a);d&&(d[b]=a);return a}).catch(function(a){w(a);d&&(d[b]="");return Promise.resolve("")})}catch(g){return w(g),d&&(d[b]=""),Promise.resolve("")}};var tf=null,uf=["gclid","gclsrc"];function vf(){var a=self,b=new N,c=b.promise,d=b.resolve;tf=R(a).timeoutPromise(8E3,c,"TrackImpressionPromise timeout").catch(function(a){E().warn("IMPRESSION",a)});var b=T(a.document),e=b.isTrustedViewer(),g=b.isTrustedReferrer();Promise.all([e,g]).then(function(b){var c=b[0],e=b[1];if(c||e||L(a,"alp")){var g=wf(a),h=xf(a);Promise.all([g,h]).then(function(){d()},function(){})}else d()})}
|
|
function wf(a){var b=T(a.document);return b.getParam("replaceUrl")?b.hasCapability("replaceUrl")?b.sendMessageAwaitResponse("getReplaceUrl",void 0).then(function(a){a&&"object"==typeof a?b.replaceUrl(a.replaceUrl||null):E().warn("IMPRESSION","get invalid replaceUrl response")},function(a){E().warn("IMPRESSION","Error request replaceUrl from viewer",a)}):(b.replaceUrl(b.getParam("replaceUrl")||null),Promise.resolve()):Promise.resolve()}
|
|
function xf(a){var b=T(a.document),c=b.getParam("click");if(!c)return Promise.resolve();if(0!=c.indexOf("https://"))return C().warn("IMPRESSION","click fragment param should start with https://. Found ",c),Promise.resolve();a.location.hash&&(a.location.hash="");return b.whenFirstVisible().then(function(){return yf(a,c)}).then(function(b){if(b){var c=b.location;(b=b.tracking_url||c)&&!jb(b)&&((new Image).src=b);if(c&&a.history.replaceState){b=T(a.document);var d=a.location.href,c=K(c),c=p(c.search),
|
|
c=Za(d,c);a.history.replaceState(null,"",c);b.maybeUpdateFragmentForCct()}}}).catch(function(a){C().warn("IMPRESSION","Error on request clickUrl: ",a)})}function yf(a,b){return Q(a,"xhr").fetchJson(b,{credentials:"include",requireAmpResponseSourceOrigin:!1}).then(function(a){return 204==a.status?null:a.json()})}function zf(a){return a.whenReady().then(function(){return!!a.getBody().querySelector("amp-analytics[type=googleanalytics]")})};function Af(a){return function(){return(new Date)[a]()}}function Bf(a,b){return function(){return a[b]}}function Cf(a){Td.call(this,a);this.he=this.re=null}aa(Cf,Td);function Df(a,b,c,d){a.setBoth(b,function(){return Rd(a.ampdoc.win,c,d)},function(){return Qd(a.ampdoc.win,c,d)})}
|
|
Cf.prototype.initialize=function(){function a(){var a=od(b.ampdoc);return ib(Ef(b,a.sourceUrl))}var b=this,c=ud(this.ampdoc);this.set("RANDOM",function(){return Math.random()});var d=Object.create(null);this.set("COUNTER",function(a){return d[a]=(d[a]|0)+1});this.set("CANONICAL_URL",Ff(this,"canonicalUrl"));this.set("CANONICAL_HOST",Ff(this,"canonicalUrl","host"));this.set("CANONICAL_HOSTNAME",Ff(this,"canonicalUrl","hostname"));this.set("CANONICAL_PATH",Ff(this,"canonicalUrl","pathname"));this.setAsync("DOCUMENT_REFERRER",
|
|
function(){return T(b.ampdoc).getReferrerUrl()});this.setAsync("EXTERNAL_REFERRER",function(){return T(b.ampdoc).getReferrerUrl().then(function(a){if(!a)return null;var c=K(nb(a)).hostname,d=b.ampdoc.win.location.hostname;return c===d?null:a})});this.set("TITLE",function(){return b.ampdoc.win.document.originalTitle||b.ampdoc.win.document.title});this.set("AMPDOC_URL",function(){return ib(Ef(b,b.ampdoc.win.location.href))});this.set("AMPDOC_HOST",function(){var a=K(b.ampdoc.win.location.href);return a&&
|
|
a.host});this.set("AMPDOC_HOSTNAME",function(){var a=K(b.ampdoc.win.location.href);return a&&a.hostname});this.setBoth("SOURCE_URL",function(){return a()},function(){return tf.then(function(){return a()})});this.set("SOURCE_HOST",Ff(this,"sourceUrl","host"));this.set("SOURCE_HOSTNAME",Ff(this,"sourceUrl","hostname"));this.set("SOURCE_PATH",Ff(this,"sourceUrl","pathname"));this.set("PAGE_VIEW_ID",Ff(this,"pageViewId"));this.setBoth("QUERY_PARAM",function(a,c){c=void 0===c?"":c;return Gf(b,a,c)},function(a,
|
|
c){c=void 0===c?"":c;return tf.then(function(){return Gf(b,a,c)})});this.setAsync("FRAGMENT_PARAM",Hf(this,"fragmentParam","FRAGMENT_PARAM"));this.setAsync("ANCESTOR_ORIGIN",Hf(this,"ancestorOrigin","ANCESTOR_ORIGIN"));var e=null;this.setBoth("CLIENT_ID",function(a){return e?e[a]:null},function(a,c,d){C().assertString(a,"The first argument to CLIENT_ID, the fallback Cookie name, is required");var g=Promise.resolve();c&&(g=id(b.ampdoc,"userNotificationManager","amp-user-notification").then(function(a){return a.get(c)}));
|
|
return pc(b.ampdoc,"cid").then(function(b){return b.get({scope:a,createCookieIfNotPresent:!0,cookieName:d},g)}).then(function(b){e||(e=Object.create(null));var c=d||a;b&&"_ga"==c&&("string"===typeof b?b=b.replace(/^(GA1|1)\.[\d-]+\./,""):E().error("UrlReplacements","non-string cid, what is it?",Object.keys(b)));return e[a]=b})});this.setAsync("VARIANT",function(a){return Xf(b,function(b){var c=b[a];C().assert(void 0!==c,"The value passed to VARIANT() is not a valid experiment name:"+a);return null===
|
|
c?"none":c},"VARIANT")});this.setAsync("VARIANTS",function(){return Xf(b,function(a){var b=[],c;for(c in a)b.push(c+"."+(a[c]||"none"));return b.join("!")},"VARIANTS")});this.setAsync("AMP_GEO",function(a){return Yf(b,function(b){return a?(C().assert("ISOCountry"===a,"The value passed to AMP_GEO() is not valid name:"+a),b[a]||"unknown"):b.ISOCountryGroups.join(",")})});this.setAsync("SHARE_TRACKING_INCOMING",function(){return Zf(b,function(a){return a.incomingFragment},"SHARE_TRACKING_INCOMING")});
|
|
this.setAsync("SHARE_TRACKING_OUTGOING",function(){return Zf(b,function(a){return a.outgoingFragment},"SHARE_TRACKING_OUTGOING")});this.set("TIMESTAMP",Af("getTime"));this.set("TIMESTAMP_ISO",Af("toISOString"));this.set("TIMEZONE",Af("getTimezoneOffset"));this.set("TIMEZONE_CODE",function(){var a;"Intl"in b.ampdoc.win&&"DateTimeFormat"in b.ampdoc.win.Intl&&(a=(new Intl.DateTimeFormat).resolvedOptions().timeZone);return a||""});this.set("SCROLL_TOP",function(){return c.getScrollTop()});this.set("SCROLL_LEFT",
|
|
function(){return c.getScrollLeft()});this.set("SCROLL_HEIGHT",function(){return c.getScrollHeight()});this.set("SCROLL_WIDTH",function(){return c.getScrollWidth()});this.set("VIEWPORT_HEIGHT",function(){return c.getHeight()});this.set("VIEWPORT_WIDTH",function(){return c.getWidth()});var g=this.ampdoc.win.screen;this.set("SCREEN_WIDTH",Bf(g,"width"));this.set("SCREEN_HEIGHT",Bf(g,"height"));this.set("AVAILABLE_SCREEN_HEIGHT",Bf(g,"availHeight"));this.set("AVAILABLE_SCREEN_WIDTH",Bf(g,"availWidth"));
|
|
this.set("SCREEN_COLOR_DEPTH",Bf(g,"colorDepth"));this.set("DOCUMENT_CHARSET",function(){var a=b.ampdoc.win.document;return a.characterSet||a.charset});this.set("BROWSER_LANGUAGE",function(){var a=b.ampdoc.win.navigator;return(a.language||a.userLanguage||a.browserLanguage||"").toLowerCase()});this.set("USER_AGENT",function(){return b.ampdoc.win.navigator.userAgent});Df(this,"PAGE_LOAD_TIME","navigationStart","loadEventStart");Df(this,"DOMAIN_LOOKUP_TIME","domainLookupStart","domainLookupEnd");Df(this,
|
|
"TCP_CONNECT_TIME","connectStart","connectEnd");Df(this,"SERVER_RESPONSE_TIME","requestStart","responseStart");Df(this,"PAGE_DOWNLOAD_TIME","responseStart","responseEnd");Df(this,"REDIRECT_TIME","navigationStart","fetchStart");Df(this,"DOM_INTERACTIVE_TIME","navigationStart","domInteractive");Df(this,"CONTENT_LOAD_TIME","navigationStart","domContentLoadedEventStart");this.setAsync("ACCESS_READER_ID",function(){return $f(b,function(a){return a.getAccessReaderId()},"ACCESS_READER_ID")});this.setAsync("AUTHDATA",
|
|
function(a){C().assert(a,"The first argument to AUTHDATA, the field, is required");return $f(b,function(b){return b.getAuthdataField(a)},"AUTHDATA")});this.setAsync("VIEWER",function(){return T(b.ampdoc).getViewerOrigin().then(function(a){return void 0==a?"":a})});this.setAsync("TOTAL_ENGAGED_TIME",function(){return id(b.ampdoc,"activity","amp-analytics").then(function(a){return a.getTotalEngagedTime()})});this.setAsync("INCREMENTAL_ENGAGED_TIME",function(a,c){return id(b.ampdoc,"activity","amp-analytics").then(function(b){return b.getIncrementalEngagedTime(a,
|
|
"false"!==c)})});this.set("NAV_TIMING",function(a,c){C().assert(a,"The first argument to NAV_TIMING, the start attribute name, is required");return Rd(b.ampdoc.win,a,c)});this.setAsync("NAV_TIMING",function(a,c){C().assert(a,"The first argument to NAV_TIMING, the start attribute name, is required");return Qd(b.ampdoc.win,a,c)});this.set("NAV_TYPE",function(){return Sd(b.ampdoc.win,"type")});this.set("NAV_REDIRECT_COUNT",function(){return Sd(b.ampdoc.win,"redirectCount")});this.set("AMP_VERSION",function(){return"1533253141109"});
|
|
this.set("BACKGROUND_STATE",function(){return T(b.ampdoc).isVisible()?"0":"1"});this.setAsync("VIDEO_STATE",function(a,c){var d=b.ampdoc.getRootNode(),e=C().assertElement(d.getElementById(a),'Could not find an element with id="'+a+'" for VIDEO_STATE');return oc(b.ampdoc,"video-manager").getAnalyticsDetails(e).then(function(a){return a?a[c]:""})});this.setAsync("STORY_PAGE_INDEX",ag(this,"pageIndex","STORY_PAGE_INDEX"));this.setAsync("STORY_PAGE_ID",ag(this,"pageId","STORY_PAGE_ID"));this.setAsync("FIRST_CONTENTFUL_PAINT",
|
|
function(){return cc(function(){return qd(b.ampdoc.win).getFirstContentfulPaint()})});this.setAsync("FIRST_VIEWPORT_READY",function(){return cc(function(){return qd(b.ampdoc.win).getFirstViewportReady()})});this.setAsync("MAKE_BODY_VISIBLE",function(){return cc(function(){return qd(b.ampdoc.win).getMakeBodyVisible()})});this.setAsync("AMP_STATE",function(a){return ld(b.ampdoc).then(function(b){return b?b.getStateValue(a):""})})};
|
|
function Ef(a,b){var c=od(a.ampdoc).replaceParams;a=K(lb(b));a=p(a.search);var d;d=b;var e=d.indexOf("?");if(-1!=e){var g=d.indexOf("#");d=d.substring(0,e)+(-1==g?"":d.substring(g))}return Za(d,Object.assign({},c,a))}function Ff(a,b,c){return function(){var d=od(a.ampdoc)[b];return c?K(d)[c]:d}}
|
|
function $f(a,b,c){return Promise.all([jd(a.ampdoc,"access","amp-access"),jd(a.ampdoc,"subscriptions","amp-subscriptions")]).then(function(a){a=a[0]||a[1];return a?b(a):(C().error("UrlReplacements","Access or subsciptions service is not installed to access: ",c),null)})}
|
|
function Gf(a,b,c){C().assert(b,"The first argument to QUERY_PARAM, the query string param is required");var d=K(lb(a.ampdoc.win.location.href)),d=p(d.search);b=C().assertString(b);a=od(a.ampdoc).replaceParams;return"undefined"!==typeof d[b]?d[b]:"undefined"!==typeof a[b]?a[b]:c}function Xf(a,b,c){a.re||(a.re=gd(a.ampdoc.win,"variant","amp-experiment"));return a.re.then(function(a){C().assert(a,"To use variable %s, amp-experiment should be configured",c);return b(a)})}
|
|
function Yf(a,b){return jd(a.ampdoc,"geo","amp-geo",!0).then(function(a){C().assert(a,"To use variable %s, amp-geo should be configured","AMP_GEO");return b(a)})}function Zf(a,b,c){a.he||(a.he=gd(a.ampdoc.win,"share-tracking","amp-share-tracking"));return a.he.then(function(a){C().assert(a,"To use variable %s, amp-share-tracking should be configured",c);return b(a)})}
|
|
function ag(a,b,c){return function(){return gd(a.ampdoc.win,"story-variable","amp-story").then(function(a){C().assert(a,"To use variable %s amp-story should be configured",c);return a[b]})}}function Hf(a,b,c){return function(d,e){e=void 0===e?"":e;return gd(a.ampdoc.win,"viewer-integration-variable","amp-viewer-integration").then(function(a){C().assert(a,"To use variable %s amp-viewer-integration must be installed",c);return a[b](d,e)})}}
|
|
function bg(a,b){this.ampdoc=a;this.Ta=b;this.ug=new of(this.Ta)}f=bg.prototype;f.expandStringSync=function(a,b,c,d){return cg(this,a,b,c,!0,d)};f.expandStringAsync=function(a,b){return cg(this,a,b)};f.expandUrlSync=function(a,b,c,d){return dg(a,cg(this,a,b,c,!0,d))};f.expandUrlAsync=function(a,b,c){return cg(this,a,b,void 0,void 0,c).then(function(b){return dg(a,b)})};f.expandInputValueAsync=function(a){return eg(this,a,!1)};f.expandInputValueSync=function(a){return eg(this,a,!0)};
|
|
function eg(a,b,c){"INPUT"==b.tagName&&b.getAttribute("type");var d=fg(b);if(!d)return c?b.value:Promise.resolve(b.value);void 0===b["amp-original-value"]&&(b["amp-original-value"]=b.value);a=cg(a,b["amp-original-value"]||b.value,void 0,void 0,c,d);return c?b.value=a:a.then(function(a){return b.value=a})}
|
|
function fg(a,b){if(a=a.getAttribute("data-amp-replace")){var c={};a.trim().split(/\s+/).forEach(function(a){!b||Ea.call(b,a)?c[a]=!0:C().warn("URL","Ignoring unsupported replacement",a)});return c}}
|
|
f.maybeExpandLink=function(a,b){var c={CLIENT_ID:!0,QUERY_PARAM:!0},d=a.getAttribute("data-amp-addparams")||"",e=fg(a,c);if(e||d||b){var g=a["amp-original-href"]||a.getAttribute("href"),h=K(g);null==a["amp-original-href"]&&(a["amp-original-href"]=g);d&&(g=Za(g,p(d)));a:{var k=od(this.ampdoc);if(h.origin==K(k.canonicalUrl).origin||h.origin==K(k.sourceUrl).origin)h=!0;else{if((k=this.ampdoc.getRootNode().querySelector("meta[name=amp-link-variable-allowed-origin]"))&&k.hasAttribute("content"))for(var k=
|
|
k.getAttribute("content").trim().split(/\s+/),l=0;l<k.length;l++)if(h.origin==K(k[l]).origin){h=!0;break a}h=!1}}var n=h;if(!n)return e&&C().warn("URL","Ignoring link replacement",g," because the link does not go to the document's source, canonical, or whitelisted origin."),a.href=g;if(b){if(!e||!e.QUERY_PARAM){var m={QUERY_PARAM:!0};b=this.expandUrlSync(b,void 0,void 0,m)}g=Za(g,p(b))}e&&(g=this.expandUrlSync(g,void 0,void 0,e));return a.href=g}};
|
|
function cg(a,b,c,d,e,g){var h=L(a.ampdoc.win,"url-replacement-v2");if(h)return a.ug.expand(b,c,d,e,g);var k=a.Ta.getExpr(c),l,n=b.replace(k,function(b,h,k){var m=[];"string"==typeof k&&(m=k.split(/,\s*/));if(g&&!g[h])return b;var q;if(c&&h in c)q=c[h];else if(q=a.Ta.get(h))if(e){if(q=q.sync,!q)return C().error("UrlReplacements","ignoring async replacement key: ",h),""}else q=q.async||q.sync;var t;try{t="function"==typeof q?q.apply(null,m):q}catch(z){e&&(t=""),w(z)}if(t&&t.then){if(e)return C().error("UrlReplacements",
|
|
"ignoring promise value for key: ",h),"";var D=t.catch(function(a){w(a)}).then(function(a){n=n.replace(b,nf[b]?a:null==a?"":encodeURIComponent(a));d&&(d[b]=a)});l=l?l.then(function(){return D}):D;return b}d&&(d[b]=t);return nf[b]?t:null==t?"":encodeURIComponent(t)});l&&(l=l.then(function(){return n}));return e?n:l||Promise.resolve(n)}f.collectVars=function(a,b){var c=Object.create(null);return cg(this,a,b,c).then(function(){return c})};
|
|
f.collectUnwhitelistedVarsSync=function(a){var b=a.getAttribute("src"),c=Object.create(null);this.expandStringSync(b,void 0,c);var d=Object.keys(c),e=fg(a);return e?d.filter(function(a){return!e[a]}):d};function dg(a,b){var c=K(b,!0).protocol,d=K(a,!0).protocol;if(c!=d)return C().error("UrlReplacements","Illegal replacement of the protocol: ",a),a;C().assert(kb(b),"The replacement url has invalid protocol: %s",b);return b}f.getVariableSource=function(){return this.Ta};
|
|
function gg(a){P(a,"url-replace",function(a){return new bg(a,new Cf(a))})};var hg=Date.now();var ig=['\n <div class="i-amphtml-jank-meter"></div>'];ig.raw=['\n <div class="i-amphtml-jank-meter"></div>'];function jg(a){this.A=a;this.nc=this.mc=this.Tb=this.Xb=0;this.Pb=null;this.xa=nc(a);this.Db=this.Be=this.Ce=null;kg(this)}jg.prototype.onScheduled=function(){lg(this)&&null==this.Pb&&(this.Pb=this.A.Date.now())};
|
|
jg.prototype.onRun=function(){if(lg(this)&&null!=this.Pb){var a=this.A.Date.now()-this.Pb;this.Pb=null;this.Tb++;16<a&&(this.Xb++,E().info("JANK","Paint latency: "+a+"ms"));if(this.xa&&200==this.Tb){var b=this.A.Math.floor((this.Tb-this.Xb)/this.Tb*100);this.xa.tickDelta("gfp",b);this.xa.tickDelta("bf",this.Xb);this.Db&&(this.xa.tickDelta("lts",this.nc),this.xa.tickDelta("ltc",this.mc),this.Db.disconnect(),this.Db=null);var c=0;this.Ce&&null!=this.Be&&(c=this.A.Math.max(0,this.A.Math.floor(100*this.Ce.level-
|
|
this.Be)),this.xa.tickDelta("bd",c));this.xa.flush();if(L(this.A,"jank-meter")){var d=c,e=this.A.document,g=Ne(e)(ig);g.textContent="bf:"+this.Xb+", lts: "+this.nc+", "+("ltc:"+this.mc+", bd:"+d);e.body.appendChild(g)}}}};function lg(a){return L(a.A,"jank-meter")||a.xa&&a.xa.isPerformanceTrackingOn()&&200>a.Tb}
|
|
function kg(a){lg(a)&&mg(a.A)&&(a.Db=new a.A.PerformanceObserver(function(b){for(var c=b.getEntries(),d=0;d<c.length;d++)if("longtask"==c[d].entryType){var e=a.A.Math.floor(c[d].duration/50);"cross-origin-descendant"==c[d].name?(a.mc+=e,C().info("LONGTASK","from child frame "+c[d].duration+"ms")):(a.nc+=e,E().info("LONGTASK","from self frame "+c[d].duration+"ms"))}}),a.Db.observe({entryTypes:["longtask"]}))}
|
|
function mg(a){return!!a.PerformanceObserver&&!!a.TaskAttributionTiming&&"containerName"in a.TaskAttributionTiming.prototype};function ng(a,b,c){c=void 0===c?!1:c;a=new a.Image;c&&(a.referrerPolicy="no-referrer");a.src=b;return a};function og(a,b,c){var d=this;this.R=R(a);this.Ag=b;this.qg=c||0;this.qa=-1;this.Wd=0;this.Oa=!1;this.hg=function(){return d.yc()}}og.prototype.isPending=function(){return-1!=this.qa};og.prototype.schedule=function(a){var b=a||this.qg;this.Oa&&10>b&&(b=10);var c=Date.now()+b;return!this.isPending()||-10>c-this.Wd?(this.cancel(),this.Wd=c,this.qa=this.R.delay(this.hg,b),!0):!1};og.prototype.yc=function(){this.qa=-1;this.Wd=0;this.Oa=!0;this.Ag();this.Oa=!1};
|
|
og.prototype.cancel=function(){this.isPending()&&(this.R.cancel(this.qa),this.qa=-1)};function pg(){this.C=[]}pg.prototype.peek=function(){var a=this.C.length;return a?this.C[a-1].item:null};pg.prototype.enqueue=function(a,b){if(isNaN(b))throw Error("Priority must not be NaN.");for(var c=b,d=-1,e=0,g=this.C.length;e<=g;){d=Math.floor((e+g)/2);if(d===this.C.length)break;if(this.C[d].priority<c)e=d+1;else if(0<d&&this.C[d-1].priority>=c)g=d-1;else break}this.C.splice(d,0,{item:a,priority:b})};pg.prototype.dequeue=function(){return this.C.length?this.C.pop().item:null};
|
|
ca.Object.defineProperties(pg.prototype,{length:{configurable:!0,enumerable:!0,get:function(){return this.C.length}}});var qg=/nochunking=1/.test(self.location.hash),rg=Promise.resolve();function sg(a,b){qg?rg.then(b):(P(a,"chunk",tg),fc(a,"chunk").runForStartup(b))}function ug(a){this.state="not_run";this.kd=a}function vg(a,b){if("run"!=a.state){a.state="run";try{a.kd(b)}catch(c){throw a.vf(c),c;}}}ug.prototype.Dh=function(){return this.kd.displayName||this.kd.name};ug.prototype.vf=function(){};ug.prototype.ef=function(){return!1};ug.prototype.Vf=function(){return!0};
|
|
function wg(a,b,c){ug.call(this,a);var d=this;this.A=b;this.h=null;c.then(function(a){d.h=a;d.h.isVisible()&&vg(d,null);d.h.onVisibilityChanged(function(){d.h.isVisible()&&vg(d,null)})})}aa(wg,ug);wg.prototype.vf=function(){re(self.document)};wg.prototype.ef=function(){return this.h?this.h.isVisible():this.A.document.hidden?!1:!/visibilityState=(hidden|prerender)/.test(this.A.location.hash)};wg.prototype.Vf=function(){return!!this.h};
|
|
function tg(a){var b=this;this.A=a.win;this.I=new pg;this.Ee=this.Ve.bind(this);this.xh=pc(a,"viewer");this.A.addEventListener("message",function(a){"amp-macro-task"==a.data&&b.Ve(null)})}tg.prototype.run=function(a,b){var c=new ug(a);xg(this,c,b)};tg.prototype.runForStartup=function(a){a=new wg(a,this.A,this.xh);xg(this,a,Number.POSITIVE_INFINITY)};function xg(a,b,c){a.I.enqueue(b,c);rg.then(function(){a.Pa()})}
|
|
function yg(a,b){for(var c=a.I.peek();c&&"not_run"!==c.state;)a.I.dequeue(),c=a.I.peek();c&&b&&a.I.dequeue();return c}tg.prototype.Ve=function(a){var b=this,c=yg(this,!0);if(!c)return!1;vg(c,a);rg.then(function(){b.Pa()});return!0};function zg(a){rg.then(function(){a.Ee(null)})}tg.prototype.Pa=function(){var a=yg(this);a&&(a.ef()?zg(this):a.Vf()&&this.A.requestIdleCallback?Ag(this.A,this.Ee):this.A.postMessage("amp-macro-task","*"))};
|
|
function Ag(a,b){var c=15,d=2E3;function e(h){if(h.timeRemaining()<c){var k=d-(Date.now()-g);0>=k||h.didTimeout?b(h):a.requestIdleCallback(e,{timeout:k})}else b(h)}var g=Date.now();a.requestIdleCallback(e,{timeout:d})};function Bg(a){return!!a&&"function"==typeof a.getFormData};var Cg={PRERENDER:"prerender",VISIBLE:"visible",HIDDEN:"hidden",PAUSED:"paused",INACTIVE:"inactive"};var Dg=/^(https?:\/\/)((www[0-9]*|web|ftp|wap|home|mobile|amp|m)\.)+/i,Eg=[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/],Fg=[/^t.co$/];
|
|
function Gg(a,b){var c=this;this.ampdoc=a;this.win=a.win;this.yb=fd(this.win);this.qb=Q(this.win,"documentState");this.na=!0;this.$d=!1;this.Xf=this.Qc="visible";this.Fa=1;this.Qd=G();this.pc=G();this.If=new Y;this.Vb=new Y;this.Le=new Y;this.qc=this.gb=null;this.hb=[];this.L={};this.vb={};this.ne=this.se=this.Sd=this.lf=this.Da=this.vc=this.uc=null;var d=new N;this.Ah=d.promise;this.Bh=d.resolve;b?Object.assign(this.L,b):(this.win.name&&0==this.win.name.indexOf("__AMP__")&&Hg(this.win.name.substring(7),
|
|
this.L),this.win.location.hash&&(Hg(this.win.location.hash,this.vb),Object.assign(this.L,this.vb)));this.na=!parseInt(this.L.off,10);this.$d=!(!parseInt(this.L.history,10)&&!this.$d);Ig(this,this.L.visibilityState);this.Fa=parseInt(this.L.prerenderSize,10)||this.Fa;var e=!1;if(!this.yb)var g=p(this.win.location.search),e="1"===g.amp_gsa&&I(g.amp_js_v||"","a");this.fc=e;this.Hd=!this.yb&&"1"==this.L.webview;this.hc=!(!(this.yb&&!this.win.AMP_TEST_IFRAME&&(this.L.origin||this.L.visibilityState||-1!=
|
|
this.win.location.search.indexOf("amp_js_v"))||this.Hd||this.fc)&&a.isSingleDoc());a=K(this.ampdoc.win.location.href);this.Jg=jb(a);this.md=this.isVisible();this.qb.onVisibilityChanged(this.Df.bind(this));var h=new N;this.Sd=h.resolve;this.Rd=this.hc?R(this.win).timeoutPromise(2E4,h.promise).catch(function(a){throw Jg(a);}):null;this.qf=this.hc?this.Rd.catch(function(a){xe(Jg(a))}):null;var k,l;this.hc?!this.win.location.ancestorOrigins||this.Hd||this.fc?(a=new N,l=a.promise,this.ne=a.resolve):(k=
|
|
0<this.win.location.ancestorOrigins.length&&Kg(this.win.location.ancestorOrigins[0]),l=Promise.resolve(k)):(k=!1,l=Promise.resolve(!1));this.Gd=l;this.wh=new Promise(function(a){c.isEmbedded()?c.win.location.ancestorOrigins&&0<c.win.location.ancestorOrigins.length?a(c.win.location.ancestorOrigins[0]):(R(c.win).delay(function(){return a("")},1E3),c.se=a):a("")});this.Kc=this.isEmbedded()&&"referrer"in this.L&&!1!==k?this.L.referrer:this.win.document.referrer;this.Ef=new Promise(function(a){c.isEmbedded()&&
|
|
"referrer"in c.L?c.Gd.then(function(b){b?a(c.L.referrer):(a(c.win.document.referrer),c.Kc!=c.win.document.referrer&&(E().expectedError("Viewer","Untrusted viewer referrer override: "+c.Kc+" at "+c.qc),c.Kc=c.win.document.referrer))}):a(c.win.document.referrer)});this.Dc=ib(this.win.location.href||"");this.zh=new Promise(function(a){var b=c.L.viewerUrl;c.isEmbedded()&&b?c.Gd.then(function(d){d?c.Dc=b:E().error("Viewer","Untrusted viewer url override: "+b+" at "+c.qc);a(c.Dc)}):a(c.Dc)});this.L.click&&
|
|
(a=ib(this.win.location.href),a!=this.win.location.href&&this.win.history.replaceState&&(this.win.location.originalHash||(this.win.location.originalHash=this.win.location.hash),this.win.history.replaceState({},"",a),delete this.vb.click));this.Df();Lg(this);this.maybeUpdateFragmentForCct()}function Lg(a){if(a.isVisible()){var b=Date.now();a.Da||(a.Da=b);a.lf=b;a.md=!0;a.Bh();a.vc&&(a.vc(),a.vc=null,a.uc=null)}a.Vb.fire()}f=Gg.prototype;f.getParam=function(a){return this.L[a]};
|
|
f.hasCapability=function(a){var b=this.L.cap;return b?-1!=b.split(",").indexOf(a):!1};f.canRenderTemplates=function(){return this.hasCapability("viewerRenderTemplate")};f.navigateToAmpUrl=function(a,b){return this.hasCapability("a2a")?(this.sendMessage("a2aNavigate",H({url:a,requestedBy:b})),!0):!1};f.isEmbedded=function(){return this.hc};f.isWebviewEmbedded=function(){return this.Hd};f.isCctEmbedded=function(){return this.fc};f.isProxyOrigin=function(){return this.Jg};
|
|
f.maybeUpdateFragmentForCct=function(){if(this.fc&&this.win.history.replaceState){var a=ob(this.win.location.href),b=od(this.ampdoc).canonicalUrl,c=ob(b);Mg(a,c)&&(this.vb.ampshare=b,this.win.history.replaceState({},"","#"+$a(this.vb)))}};function Mg(a,b){function c(a){return 2<a.split(".").length?a.replace(Dg,"$1"):a}return c(a)==c(b)}f.isRuntimeOn=function(){return this.na};f.toggleRuntime=function(){this.na=!this.na;this.If.fire(this.na)};f.onRuntimeState=function(a){return this.If.add(a)};
|
|
f.isOvertakeHistory=function(){return this.$d};f.getVisibilityState=function(){return this.Qc};f.Df=function(){Ig(this,this.Xf)};function Ig(a,b){if(b){var c=a.Qc;b=E().assertEnumValue(Cg,b,"VisibilityState");"hidden"===b&&(b=a.md?"inactive":"prerender");a.Xf=b;!a.qb.isHidden()||"visible"!==b&&"paused"!==b||(b="hidden");a.Qc=b;c!==b&&Lg(a)}}f.isVisible=function(){return"visible"==this.getVisibilityState()};f.hasBeenVisible=function(){return this.md};f.whenFirstVisible=function(){return this.Ah};
|
|
f.whenNextVisible=function(){if(this.isVisible())return Promise.resolve();if(this.uc)return this.uc;var a=new N;this.vc=a.resolve;return this.uc=a.promise};f.getFirstVisibleTime=function(){return this.Da};f.getLastVisibleTime=function(){return this.lf};f.getPrerenderSize=function(){return this.Fa};f.getResolvedViewerUrl=function(){return this.Dc};f.getViewerUrl=function(){return this.zh};f.maybeGetMessagingOrigin=function(){return this.qc};
|
|
function Ng(a){var b=K(a);return"https:"!=b.protocol?!1:Fg.some(function(a){return a.test(b.hostname)})}f.getUnconfirmedReferrerUrl=function(){return this.Kc};f.getReferrerUrl=function(){return this.Ef};f.isTrustedViewer=function(){return this.Gd};f.isTrustedReferrer=function(){return this.Ef.then(function(a){return Ng(a)})};f.getViewerOrigin=function(){return this.wh};function Kg(a){var b=K(a);return"https:"!=b.protocol?!1:Eg.some(function(a){return a.test(b.hostname)})}f.onVisibilityChanged=function(a){return this.Vb.add(a)};
|
|
f.onMessage=function(a,b){var c=this.Qd[a];c||(c=new Y,this.Qd[a]=c);return c.add(b)};f.onMessageRespond=function(a,b){var c=this;this.pc[a]=b;return function(){c.pc[a]===b&&delete c.pc[a]}};f.receiveMessage=function(a,b){if("visibilitychange"==a)return void 0!==b.prerenderSize&&(this.Fa=b.prerenderSize),Ig(this,b.state),Promise.resolve();if("broadcast"==a)return this.Le.fire(b),Promise.resolve();var c=this.Qd[a];c&&c.fire(b);if(a=this.pc[a])return a(b);if(c)return Promise.resolve()};
|
|
f.setMessageDeliverer=function(a,b){var c=this;if(this.gb)throw Error("message channel can only be initialized once");if(null==b)throw Error("message channel must have an origin");this.gb=a;this.qc=b;this.Sd&&this.Sd();this.ne&&this.ne(b?Kg(b):!1);this.se&&this.se(b||"");0<this.hb.length&&(b=this.hb.slice(0),this.hb=[],b.forEach(function(a){var b=c.gb(a.eventType,a.data,a.awaitResponse);a.awaitResponse&&a.responseResolver(b)}))};f.sendMessage=function(a,b,c){c=void 0===c?!1:c;Og(this,a,b,c,!1)};
|
|
f.sendMessageAwaitResponse=function(a,b,c){return Og(this,a,b,void 0===c?!1:c,!0)};
|
|
function Og(a,b,c,d,e){if(a.gb)return cc(function(){return a.gb(b,c,e)});if(!a.Rd)return e?Promise.reject(Jg()):Promise.resolve();if(!d)return a.Rd.then(function(){return a.gb(b,c,e)});var g=Le(a.hb,function(a){return a.eventType==b});if(-1!=g)d=a.hb.splice(g,1)[0],d.data=c,d.awaitResponse=d.awaitResponse||e;else{d=new N;var h=d.resolve;d={eventType:b,data:c,awaitResponse:e,responsePromise:d.promise,responseResolver:h}}a.hb.push(d);return d.responsePromise}
|
|
f.broadcast=function(a){this.qf&&this.sendMessage("broadcast",a)};f.onBroadcast=function(a){return this.Le.add(a)};f.whenMessagingReady=function(){return this.qf};f.replaceUrl=function(a){if(a&&this.ampdoc.isSingleDoc()&&this.win.history.replaceState)try{var b=K(this.win.location.href),c=K(ib(a)+this.win.location.hash);b.origin==c.origin&&ob(b)==ob(c)&&(this.win.history.replaceState({},"",c.href),this.win.location.originalHref=b.href)}catch(d){E().error("Viewer","replaceUrl failed",d)}};
|
|
function Hg(a,b){a=p(a);for(var c in a)b[c]=a[c]}function Jg(a){return a instanceof Error?(a=Aa(a),a.message="No messaging channel: "+a.message,a):Error("No messaging channel: "+a)}function Pg(a){P(a,"viewer",function(){return new Gg(a,void 0)},!0)};/*
|
|
|
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
Use of this source code is governed by a BSD-style
|
|
license that can be found in the LICENSE file or at
|
|
https://developers.google.com/open-source/licenses/bsd
|
|
*/
|
|
var Qg;function Rg(){var a;if(void 0===Qg){var b=a||Element;Qg=b.prototype.attachShadow?"v1":b.prototype.createShadowRoot?"v0":"none"}return Qg};var Sg={composed:!1};function Tg(a){return"none"!=Rg()&&Node.prototype.getRootNode?a.getRootNode(Sg):Uc(a,function(a){return a?"I-AMPHTML-SHADOW-ROOT"==a.tagName?!0:11==a.nodeType&&"[object ShadowRoot]"===Object.prototype.toString.call(a):!1})};var Ug="__AMP_ACTION_MAP__"+Math.random(),Vg={form:["submit","clear"]},Wg={button:!0,checkbox:!0,link:!0,listbox:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,option:!0,radio:!0,scrollbar:!0,slider:!0,spinbutton:!0,"switch":!0,tab:!0,treeitem:!0};
|
|
function Xg(a,b,c,d,e,g,h,k,l,n){k=void 0===k?"?":k;l=void 0===l?null:l;n=void 0===n?Math.random():n;this.node=a;this.method=b;this.args=c;this.source=d;this.caller=e;this.event=g;this.trust=h;this.actionEventType=k;this.tagOrTarget=l||a.tagName;this.sequenceId=n}
|
|
Xg.prototype.satisfiesTrust=function(a){return na(this.trust)?this.trust<a?(C().error("Action",'"'+this.actionEventType+'" is not allowed to invoke '+('"'+this.tagOrTarget+"."+this.method+'".')),!1):!0:(E().error("Action","Invalid trust for '"+this.method+"': "+this.trust),!1)};
|
|
function Yg(a,b){this.ampdoc=a;this.ya=b||a.getRootNode();this.Ua=Zg(this);this.ld=G();this.bf=G();this.addEvent("tap");this.addEvent("submit");this.addEvent("change");this.addEvent("input-debounced");this.addEvent("input-throttled");this.addEvent("valid");this.addEvent("invalid")}f=Yg.prototype;f.adoptEmbedWindow=function(a){gc(a,"action",new Yg(this.ampdoc,a.document))};
|
|
f.addEvent=function(a){var b=this;if("tap"==a)this.ya.addEventListener("click",function(c){c.defaultPrevented||b.trigger(c.target,a,c,100)}),this.ya.addEventListener("keydown",function(c){var d=c.target,e=c.keyCode;if(13==e||32==e){var k=d.getAttribute("role"),l=k&&Ea.call(Wg,k.toLowerCase());!c.defaultPrevented&&l&&(c.preventDefault(),b.trigger(d,a,c,100))}});else if("submit"==a)this.ya.addEventListener(a,function(c){b.trigger(c.target,a,c,100)});else if("change"==a)this.ya.addEventListener(a,function(c){var d=
|
|
c.target;$g(c);b.trigger(d,a,c,100)});else if("input-debounced"==a){var c=Je(this.ampdoc.win,function(c){b.trigger(c.target,a,c,100)});this.ya.addEventListener("input",function(a){var b=new ah(a);$g(b);c(b)})}else if("input-throttled"==a){var d=Ie(this.ampdoc.win,function(c){b.trigger(c.target,a,c,100)});this.ya.addEventListener("input",function(a){a=new ah(a);$g(a);d(a)})}else"valid"!=a&&"invalid"!=a||this.ya.addEventListener(a,function(c){b.trigger(c.target,a,c,100)})};
|
|
f.addGlobalTarget=function(a,b){this.ld[a]=b};f.addGlobalMethodHandler=function(a,b,c){c=void 0===c?100:c;this.bf[a]={handler:b,minTrust:c}};f.trigger=function(a,b,c,d){bh(this,a,b,c,d)};f.execute=function(a,b,c,d,e,g,h){var k=new Xg(a,b,c,d,e,g,h);ch(this,k)};
|
|
f.installActionHandler=function(a,b,c){c=void 0===c?100:c;var d=a.getAttribute("id")||"",e=a.tagName+"#"+d;if(a.__AMP_ACTION_HANDLER__)E().error("Action","Action handler already installed for "+a);else{var g=a.__AMP_ACTION_QUEUE__;a.__AMP_ACTION_HANDLER__={handler:b,minTrust:c};la(g)&&R(a.ownerDocument.defaultView).delay(function(){g.forEach(function(a){try{a.satisfiesTrust(c)&&b(a)}catch(k){E().error("Action","Action execution failed:",a,k)}});a.__AMP_ACTION_QUEUE__.length=0},1)}};
|
|
f.hasAction=function(a,b,c){return!!dh(a,b,c)};f.setWhitelist=function(a){this.Ua=a};f.addToWhitelist=function(a){this.Ua||(this.Ua=[]);this.Ua.push(a)};function bh(a,b,c,d,e){var g=dh(b,c);if(g){var h=Math.random(),k=null;g.actionInfos.forEach(function(l){function n(){var k=a.ld[m]?a.ya:a.ya.getElementById(m);if(k)return k=new Xg(k,l.method,q,b,g.node,d,e,c,k.tagName||m,h),ch(a,k);a.Ka('Target "'+m+'" not found for action '+("["+l.str+"]."))}var m=l.target,q=eh(l.args,d);k=k?k.then(n):n()})}}
|
|
f.Ka=function(a,b){if(b)throw a=C().createError("[Action] "+a),xe(a,b),a;C().error("Action",a)};
|
|
function ch(a,b){var c=b.method,d=b.tagOrTarget;if(a.Ua){var e=d+"."+c;if(!a.Ua.includes(e))return a.Ka('"'+e+'" is not whitelisted ('+a.Ua+")."),null}var g=a.ld[d];if(g)return g(b);var e=b.node,h=a.bf[c];if(h&&b.satisfiesTrust(h.minTrust))return h.handler(b);var k=e.tagName.toLowerCase();if("amp-"==k.substring(0,4))return e.enqueAction?e.enqueAction(b):a.Ka('Unrecognized AMP element "'+k+'".',e),null;var l=Vg[k],n=e.getAttribute("id")||"";if(n&&"amp-"==n.substring(0,4)||l&&-1<l.indexOf(c))return(a=
|
|
e.__AMP_ACTION_HANDLER__)?(c=a.handler,b.satisfiesTrust(a.minTrust)&&c(b)):(e.__AMP_ACTION_QUEUE__=e.__AMP_ACTION_QUEUE__||[],e.__AMP_ACTION_QUEUE__.push(b)),null;a.Ka("Target ("+d+") doesn't support \""+c+'" action.',b.caller);return null}
|
|
function dh(a,b,c){for(;a&&(!c||a!=c);){var d=b,e,g,h;e=a;h=e[Ug];if(void 0===h){h=null;if(e.hasAttribute("on")){var k=e.getAttribute("on"),l=fh.bind(null,k,e),n=gh.bind(null,k,e),m=null,q=new hh(k);do if(h=q.next(),h.type!=ih&&(h.type!=jh||";"!=h.value))if(h.type==kh||h.type==lh){var t=h.value;n(q.next(),[jh],":");var y=[];do{var v=n(q.next(),[kh,lh]).value,A="activate",D=null;g=q.peek();if(g.type==jh&&"."==g.value&&(q.next(),A=n(q.next(),[kh,lh]).value||A,g=q.peek(),g.type==jh&&"("==g.value)){q.next();
|
|
var z;g=q;var D=n,B=l,x=g.peek(),u=null;if(x.type==mh)u=G(),z=g.next().value,u.__AMP_OBJECT_STRING__=z,D(g.next(),[jh],")");else{do{var J=z=g.next(),x=J.type,J=J.value;if(x!=jh||","!=J&&")"!=J)if(x==kh||x==lh){D(g.next(),[jh],"=");z=D(g.next(!0),[kh,lh]);var ha=[z];if(z.type==lh)for(x=g.peek();x.type==jh&&"."==x.value;x=g.peek())g.next(),z=D(g.next(!1),[lh]),ha.push(z);x=nh(ha);u||(u=G());u[J]=x;x=g.peek();B(x.type==jh&&(","==x.value||")"==x.value),"Expected either [,] or [)]")}else B(!1,"; unexpected token ["+
|
|
(z.value||"")+"]")}while(z.type!=jh||")"!=z.value)}D=u}y.push({event:t,target:v,method:A,args:D,str:k});g=q.peek()}while(g.type==jh&&","==g.value&&q.next());m||(m=G());m[t]=y}else l(!1,"; unexpected token ["+(h.value||"")+"]");while(h.type!=ih);h=m}e[Ug]=h}var S=(e=h)?e[d]||null:null;if(S&&!a.disabled&&!Xc(a,":disabled"))return{node:a,actionInfos:S};a=a.parentElement}return null}f.setActions=function(a,b){a.setAttribute("on",b);delete a[Ug]};
|
|
function Zg(a){a=a.ampdoc.getRootNode().head;return a?(a=a.querySelector('meta[name="amp-action-whitelist"]'))?a.getAttribute("content").split(",").map(function(a){return a.trim()}):null:null}function $g(a){var b=G(),c=a.target;void 0!==c.value&&(b.value=c.value);"INPUT"==c.tagName&&(b.valueAsNumber=Number(c.value));void 0!==c.checked&&(b.checked=c.checked);if(void 0!==c.min||void 0!==c.max)b.min=c.min,b.max=c.max;0<Object.keys(b).length&&(a.detail=b)}
|
|
function ah(a){this.detail=null;var b=this||G(),c;for(c in a)b[c]="function"===typeof a[c]?oh:a[c]}function oh(){}function nh(a){return 0==a.length?null:1==a.length?a[0].value:{expression:a.map(function(a){return a.value}).join(".")}}
|
|
function eh(a,b){if(!a)return a;var c={};b&&b.detail&&(c.event=b.detail);var d=G();Object.keys(a).forEach(function(b){var e=a[b];if("object"==typeof e&&e.expression){e=e.expression;if("."==e)e=c;else{for(var e=e.split("."),h=c,k=0;k<e.length;k++){var l=e[k];if(l&&h&&void 0!==h[l]&&Xd(h,l))h=h[l];else{h=void 0;break}}e=h}var n=e,e=void 0===n?null:n}d[b]=e});return d}function fh(a,b,c,d){return C().assert(c,"Invalid action definition in %s: [%s] %s",b,a,d||"")}
|
|
function gh(a,b,c,d,e){void 0!==e?fh(a,b,d.includes(c.type)&&c.value==e,"; expected ["+e+"]"):fh(a,b,d.includes(c.type));return c}var ih=1,jh=2,kh=3,lh=4,mh=5;function hh(a){this.J=a;this.sd=-1}hh.prototype.next=function(a){var b=ph(this,a||!1);this.sd=b.index;return b};hh.prototype.peek=function(a){return ph(this,a||!1)};
|
|
function ph(a,b){var c=a.sd+1;if(c>=a.J.length)return{type:ih,index:a.sd};var d=a.J.charAt(c);if(-1!=" \t\n\r\f\v\u00a0\u2028\u2029".indexOf(d)){for(c++;c<a.J.length&&-1!=" \t\n\r\f\v\u00a0\u2028\u2029".indexOf(a.J.charAt(c));c++);if(c>=a.J.length)return{type:ih,index:c};d=a.J.charAt(c)}if(b&&(qh(d)||"."==d&&c+1<a.J.length&&qh(a.J[c+1]))){for(var e="."==d,g=c+1;g<a.J.length;g++){var h=a.J.charAt(g);if("."==h)e=!0;else if(!qh(h))break}a=a.J.substring(c,g);a=e?parseFloat(a):parseInt(a,10);c=g-1;return{type:kh,
|
|
value:a,index:c}}if(-1!=";:.()=,|!".indexOf(d))return{type:jh,value:d,index:c};if(-1!="\"'".indexOf(d)){for(var g=-1,k=c+1;k<a.J.length;k++)if(a.J.charAt(k)==d){g=k;break}if(-1==g)return{type:0,index:c};a=a.J.substring(c+1,g);c=g;return{type:kh,value:a,index:c}}if("{"==d){for(var l=1,g=-1,d=c+1;d<a.J.length;d++){var n=a.J[d];"{"==n?l++:"}"==n&&l--;if(0>=l){g=d;break}}if(-1==g)return{type:0,index:c};a=a.J.substring(c,g+1);c=g;return{type:mh,value:a,index:c}}for(g=c+1;g<a.J.length&&-1==" \t\n\r\f\x0B\u00a0\u2028\u2029;:.()=,|!\"'{}".indexOf(a.J.charAt(g));g++);
|
|
a=a.J.substring(c,g);c=g-1;return!b||"true"!=a&&"false"!=a?qh(a.charAt(0))?{type:kh,value:a,index:c}:{type:lh,value:a,index:c}:{type:kh,value:"true"==a,index:c}}function qh(a){return"0"<=a&&"9">=a};function rh(a,b){this.win=a;this.Ec=null;b&&(this.Ec=new sh(a));this.sa=null}f=rh.prototype;f.isSingleDoc=function(){return!!this.Ec};f.hasAmpDocShell=function(){return!!this.sa};
|
|
f.getAmpDoc=function(a){if(this.Ec)return this.Ec;if(L(this.win,"ampdoc-shell")&&a===this.win.document){if(this.sa)return this.sa;throw E().createError("Ampdoc for shell has not been installed");}for(var b=a;b;){if(b.D)return b.D;var c=Ic(b,this.win);if(c)b=c;else{b=Tg(b);if(!b){if(this.sa)return this.sa;break}if(c=b.__AMPDOC)return c;b=b.host}}throw E().createError("No ampdoc found for",a);};f.installShadowDoc=function(a,b){a=new th(this.win,a,b);return b.__AMPDOC=a};
|
|
f.installShellShadowDoc=function(){var a=this;this.sa=new uh(this.win);this.win.document.__AMPDOC=this.sa;lf(this.win.document).then(function(b){a.sa.setBody(b.body);a.sa.setReady()});return this.sa};function vh(a){this.win=a;this.P=new ff;this.Se=[]}f=vh.prototype;f.isSingleDoc=function(){return null};f.getWin=function(){return this.win};f.signals=function(){return this.P};f.declaresExtension=function(a){return-1!=this.Se.indexOf(a)};f.declareExtension=function(a){this.declaresExtension(a)||this.Se.push(a)};
|
|
f.getRootNode=function(){return null};f.getHeadNode=function(){};f.isBodyAvailable=function(){return!1};f.getBody=function(){return null};f.whenBodyAvailable=function(){return null};f.isReady=function(){return null};f.whenReady=function(){return null};f.getUrl=function(){return null};f.getElementById=function(a){return this.getRootNode().getElementById(a)};f.contains=function(a){return this.getRootNode().contains(a)};
|
|
function sh(a){vh.call(this,a);var b=this;this.Wc=this.win.document.body?Promise.resolve(this.win.document.body):Pc(this.win.document).then(function(){return b.getBody()});this.ee=lf(this.win.document)}aa(sh,vh);f=sh.prototype;f.isSingleDoc=function(){return!0};f.getRootNode=function(){return this.win.document};f.getUrl=function(){return this.win.location.href};f.getHeadNode=function(){return this.win.document.head};f.isBodyAvailable=function(){return!!this.win.document.body};f.getBody=function(){return this.win.document.body};
|
|
f.whenBodyAvailable=function(){return this.Wc};f.isReady=function(){return gf(this.win.document)};f.whenReady=function(){return this.ee};function th(a,b,c){vh.call(this,a);this.pe=b;this.Kf=c;this.Yc=null;var d=new N;this.Wc=d.promise;this.De=d.resolve;this.Cf=!1;var e=new N;this.ee=e.promise;this.Bf=e.resolve}aa(th,vh);f=th.prototype;f.isSingleDoc=function(){return!1};f.getRootNode=function(){return this.Kf};f.getUrl=function(){return this.pe};f.getHeadNode=function(){return this.Kf};
|
|
f.isBodyAvailable=function(){return!!this.Yc};f.getBody=function(){return this.Yc};f.setBody=function(a){this.Yc=a;this.De(a);this.De=void 0};f.whenBodyAvailable=function(){return this.Wc};f.isReady=function(){return this.Cf};f.setReady=function(){this.Cf=!0;this.Bf();this.Bf=void 0};f.whenReady=function(){return this.ee};function uh(a){th.call(this,a,a.location.href,a.document)}aa(uh,th);uh.prototype.getHeadNode=function(){return this.win.document.head};
|
|
function wh(){var a=self;O(a,"ampdoc",function(){return new rh(a,!0)})};function xh(a){var b=this;this.win=a;this.vd=this.win.Date.now();this.sb=[];this.o=this.h=null;this.Ab=this.Ed=!1;this.Ue=G();this.ye="";this.Ze=this.Xe=this.nf=null;this.addEnabledExperiment("rtv-"+r(this.win).rtvVersion);ub(this.win)&&this.addEnabledExperiment("canary");mf(a.document).then(function(){b.tick("ol");if(!b.win.PerformancePaintTiming&&b.win.chrome&&"function"==typeof b.win.chrome.loadTimes){var a=1E3*b.win.chrome.loadTimes().firstPaintTime-b.win.performance.timing.navigationStart;1>=
|
|
a||b.tickDelta("fp",a)}b.flush()});yh(this)}f=xh.prototype;f.coreServicesAvailable=function(){var a=this;this.h=T(this.win.document);this.o=sd(this.win.document);this.Ab=this.h.isEmbedded()&&"1"===this.h.getParam("csi");this.h.onVisibilityChanged(this.flush.bind(this));zh(this);var b=this.h.whenMessagingReady();this.h.whenFirstVisible().then(function(){a.tick("ofv");a.flush()});return b?b.then(function(){a.Ed=!0;a.tickDelta("msr",a.win.Date.now()-a.vd);Ah(a);a.flush()}):Promise.resolve()};
|
|
function yh(a){if(a.win.PerformancePaintTiming){var b=!1,c=!1,d=function(d){"first-paint"!=d.name||b?"first-contentful-paint"!=d.name||c||(a.tickDelta("fcp",d.startTime+d.duration),c=!0):(a.tickDelta("fp",d.startTime+d.duration),b=!0)},e=new a.win.PerformanceObserver(function(b){b.getEntries().forEach(d);a.flush()});a.win.performance.getEntriesByType("paint").forEach(d);e.observe({entryTypes:["paint"]})}}
|
|
function zh(a){var b=!a.h.hasBeenVisible(),c=b?-1:a.vd;b&&a.h.whenFirstVisible().then(function(){c=a.win.Date.now()});Bh(a).then(function(){if(b){var d=-1<c?a.win.Date.now()-c:0;a.h.whenFirstVisible().then(function(){a.tickDelta("pc",d)});Ch(a,d);a.mark("pc")}else a.tick("pc"),Ch(a,a.win.Date.now()-c);a.flush()})}
|
|
function Bh(a){var b=ud(a.win.document).getSize(),b=W(0,0,b.width,b.height);return a.o.getResourcesInRect(a.win,b,!0).then(function(a){return Promise.all(a.map(function(a){return a.loadedOnce()}))})}
|
|
f.tick=function(a,b){var c=void 0==b?this.win.Date.now():void 0,d=H({label:a,value:c,delta:null!=b?Math.max(b,0):void 0});this.Ed&&this.Ab?this.h.sendMessage("tick",d):(50<=this.sb.length&&this.sb.shift(),this.sb.push(d));1==arguments.length&&this.mark(a);var e=Math.round(null!=b?Math.max(b,0):c-this.vd);switch(a){case "fcp":this.Xe=e;break;case "pc":this.Ze=e;break;case "mbv":this.nf=e}};f.mark=function(a){this.win.performance&&this.win.performance.mark&&1==arguments.length&&this.win.performance.mark(a)};
|
|
f.tickDelta=function(a,b){this.tick(a,b)};f.tickSinceVisible=function(a){var b=this.win.Date.now(),c=this.h?this.h.getFirstVisibleTime():0;this.tickDelta(a,c?Math.max(b-c,0):0)};f.flush=function(){this.Ed&&this.Ab&&this.h.sendMessage("sendCsi",H({ampexp:this.ye}),!0)};f.throttledFlush=function(){this.Nf||(this.Nf=Ie(this.win,this.flush.bind(this)));this.Nf()};f.addEnabledExperiment=function(a){this.Ue[a]=!0;this.ye=Object.keys(this.Ue).join(",")};
|
|
function Ah(a){a.h&&(a.Ab&&a.sb.forEach(function(b){a.h.sendMessage("tick",b)}),a.sb.length=0)}function Ch(a,b){a.h&&a.h.sendMessage("prerenderComplete",H({value:b}),!0)}f.isPerformanceTrackingOn=function(){return this.Ab};f.getFirstContentfulPaint=function(){return this.Xe};f.getMakeBodyVisible=function(){return this.nf};f.getFirstViewportReady=function(){return this.Ze};var Dh=['\n <link rel="preload" referrerpolicy="origin" />'];Dh.raw=['\n <link rel="preload" referrerpolicy="origin" />'];var Eh=null;
|
|
function Fh(a){this.Z=a.document;this.pd=a.document.head;this.Gb={};this.Uf={};this.Jb=rd(a);this.Gb[K(a.location.href).origin]=!0;var b;a:{if(!Eh){b=a.document.createElement("link");var c=b.relList;b.as="invalid-value";if(!c||!c.supports){b={};break a}Eh={preconnect:c.supports("preconnect"),preload:c.supports("preload"),onlyValidAs:"invalid-value"!=b.as}}b=Eh}this.ac=b;this.R=R(a)}Fh.prototype.url=function(a,b,c){var d=this;a.whenFirstVisible().then(function(){d.pe(a,b,c)})};
|
|
Fh.prototype.pe=function(a,b,c){if(Gh(b)){a=K(b).origin;b=Date.now();var d=this.Gb[a];if(d&&b<d)c&&(this.Gb[a]=b+18E4);else{this.Gb[a]=b+(c?18E4:1E4);var e;this.ac.preconnect||(e=this.Z.createElement("link"),e.setAttribute("rel","dns-prefetch"),e.setAttribute("href",a),this.pd.appendChild(e));var g=this.Z.createElement("link");g.setAttribute("rel","preconnect");g.setAttribute("href",a);g.setAttribute("referrerpolicy","origin");this.pd.appendChild(g);this.R.delay(function(){e&&e.parentNode&&e.parentNode.removeChild(e);
|
|
g.parentNode&&g.parentNode.removeChild(g)},1E4);Hh(this,a)}}};Fh.prototype.preload=function(a,b,c){var d=this;Gh(b)&&!this.Uf[b]&&(this.Uf[b]=!0,this.url(a,b,!0),this.ac.preload&&("document"==c&&this.Jb.isSafari()||a.whenFirstVisible().then(function(){var a=Ne(d.Z)(Dh);a.setAttribute("href",b);a.as=d.ac.onlyValidAs?"fetch":"";d.pd.appendChild(a)})))};function Gh(a){return I(a,"https:")||I(a,"http:")?!0:!1}
|
|
function Hh(a,b){if(!a.ac.preconnect&&(a.Jb.isSafari()||a.Jb.isIos())){var c=Date.now();a.Gb[b]=c+18E4;var d=c-c%18E4;a=new XMLHttpRequest;a.open("HEAD",b+"/amp_preconnect_polyfill_404_or_other_error_expected._Do_not_worry_about_it?"+d,!0);a.withCredentials=!0;a.send()}}function Ih(a,b){this.yf=a;this.da=b;this.h=null}function Jh(a){a.h||(a.h=T(a.da));return a.h}Ih.prototype.url=function(a,b){this.yf.url(Jh(this),a,b)};Ih.prototype.preload=function(a,b){this.yf.preload(Jh(this),a,b)};function Kh(a){this.element=a;this.layout_="nodisplay";this.layoutWidth_=-1;this.inViewport_=!1;this.win=a.ownerDocument.defaultView;this.actionMap_=null;a=this.element;var b=a.ownerDocument.defaultView;O(b,"preconnect",Fh);b=Q(b,"preconnect");this.preconnect=new Ih(b,a);this.config=null;this.layoutScheduleTime=0}f=Kh.prototype;f.signals=function(){return this.element.signals()};f.getLayoutPriority=function(){return 0};
|
|
f.updateLayoutPriority=function(a){this.element.getResources().updateLayoutPriority(this.element,a)};f.getLayout=function(){return this.layout_};f.getLayoutBox=function(){return this.element.getLayoutBox()};f.getPageLayoutBox=function(){return this.element.getPageLayoutBox()};f.getWin=function(){return this.win};f.getAmpDoc=function(){return this.element.getAmpDoc()};f.getVsync=function(){return td(this.win)};f.getLayoutWidth=function(){return this.layoutWidth_};
|
|
f.getConsentPolicy=function(){var a=null;this.element.hasAttribute("data-block-on-consent")&&(a=this.element.getAttribute("data-block-on-consent")||"default");return a};f.isLayoutSupported=function(a){return"nodisplay"==a};f.isAlwaysFixed=function(){return!1};f.isInViewport=function(){return this.inViewport_};f.upgradeCallback=function(){return null};f.createdCallback=function(){};f.firstAttachedCallback=function(){};f.buildCallback=function(){};f.preconnectCallback=function(){};
|
|
f.detachedCallback=function(){};f.setAsOwner=function(a){this.element.getResources().setOwner(a,this.element)};f.prerenderAllowed=function(){return!1};f.createPlaceholderCallback=function(){return null};f.renderOutsideViewport=function(){return"inabox"==r(this.win).runtime&&L(this.win,"inabox-rov")?!0:3};f.idleRenderOutsideViewport=function(){return!1};f.isRelayoutNeeded=function(){return!1};f.layoutCallback=function(){return Promise.resolve()};f.firstLayoutCompleted=function(){this.togglePlaceholder(!1)};
|
|
f.viewportCallback=function(){};f.pauseCallback=function(){};f.resumeCallback=function(){};f.unlayoutCallback=function(){return!1};f.unlayoutOnPause=function(){return!1};f.reconstructWhenReparented=function(){return!0};f.activate=function(){};f.activationTrust=function(){return 100};f.loadPromise=function(a){return Pd(a)};function Lh(a){a.actionMap_||(a.actionMap_=a.win.Object.create(null))}f.registerAction=function(a,b,c){c=void 0===c?100:c;Lh(this);this.actionMap_[a]={handler:b,minTrust:c}};
|
|
f.executeAction=function(a){if("activate"==a.method){if(a.satisfiesTrust(this.activationTrust()))return this.activate(a)}else{Lh(this);var b=this.actionMap_[a.method];C().assert(b,"Method not found: "+a.method+" in %s",this);var c=b.handler;if(a.satisfiesTrust(b.minTrust))return c(a)}};f.getMaxDpr=function(){return this.element.getResources().getMaxDpr()};f.getDpr=function(){return this.element.getResources().getDpr()};
|
|
f.propagateAttributes=function(a,b,c){a=la(a)?a:[a];for(var d=0;d<a.length;d++){var e=a[d];this.element.hasAttribute(e)?b.setAttribute(e,this.element.getAttribute(e)):c&&b.removeAttribute(e)}};f.forwardEvents=function(a,b){var c=this,d=(la(a)?a:[a]).map(function(a){return yd(b,a,function(b){c.element.dispatchCustomEvent(a,b.data||{})})});return function(){return d.forEach(function(a){return a()})}};f.toggleLayoutDisplay=function(a){this.element.toggleLayoutDisplay(a)};f.getPlaceholder=function(){return this.element.getPlaceholder()};
|
|
f.togglePlaceholder=function(a){this.element.togglePlaceholder(a)};f.getFallback=function(){return this.element.getFallback()};f.toggleFallback=function(a){this.element.toggleFallback(a)};f.toggleLoading=function(a,b){this.element.toggleLoading(a,{force:!!b})};f.isLoadingReused=function(){return!1};f.getOverflowElement=function(){return this.element.getOverflowElement()};f.renderStarted=function(){this.element.renderStarted()};f.getRealChildNodes=function(){return this.element.getRealChildNodes()};
|
|
f.getRealChildren=function(){return this.element.getRealChildren()};f.applyFillContent=function(a,b){a.classList.add("i-amphtml-fill-content");b&&a.classList.add("i-amphtml-replaced-content")};f.getViewport=function(){return ud(this.getAmpDoc())};f.getIntersectionElementLayoutBox=function(){return this.getLayoutBox()};f.scheduleLayout=function(a){this.element.getResources().scheduleLayout(this.element,a)};f.schedulePause=function(a){this.element.getResources().schedulePause(this.element,a)};
|
|
f.scheduleResume=function(a){this.element.getResources().scheduleResume(this.element,a)};f.schedulePreload=function(a){this.element.getResources().schedulePreload(this.element,a)};f.scheduleUnlayout=function(a){this.element.getResources().scheduleUnlayout(this.element,a)};f.updateInViewport=function(a,b){this.element.getResources().updateInViewport(this.element,a,b)};f.changeHeight=function(a){this.element.getResources().changeSize(this.element,a,void 0)};f.collapse=function(){this.element.getResources().collapseElement(this.element)};
|
|
f.attemptCollapse=function(){return this.element.getResources().attemptCollapse(this.element)};f.attemptChangeHeight=function(a){return this.element.getResources().attemptChangeSize(this.element,a,void 0)};f.attemptChangeSize=function(a,b){return this.element.getResources().attemptChangeSize(this.element,a,b)};f.measureElement=function(a){return this.element.getResources().measureElement(a)};f.mutateElement=function(a,b){return this.measureMutateElement(null,a,b)};
|
|
f.measureMutateElement=function(a,b,c){return this.element.getResources().measureMutateElement(c||this.element,a,b)};f.collapsedCallback=function(){};f.expand=function(){this.element.getResources().expandElement(this.element)};f.expandedCallback=function(){};f.mutatedAttributesCallback=function(){};f.onLayoutMeasure=function(){};f.onMeasureChanged=function(){};f.user=function(){return C(this.element)};
|
|
f.declareLayer=function(a){L(this.win,"layers");a&&this.element.contains(a);return this.element.getLayers().declareLayer(a||this.element)};var Mh=[];function Nh(a){Kh.call(this,a);Mh.push(this)}aa(Nh,Kh);Nh.prototype.getLayoutPriority=function(){return 0};Nh.prototype.isLayoutSupported=function(){return!0};Nh.prototype.reconstructWhenReparented=function(){return!1};var Oh={0:"cld",2:"adld"};function Ph(a,b){this.A=a;this.zc=nc(a);this.cc=this.bc=null;this.Te=!1;this.Jd=Oh[b]}Ph.prototype.enterViewport=function(){this.Jd&&!this.bc&&(this.bc=this.A.Date.now(),Qh(this))};Ph.prototype.startLayout=function(){this.Jd&&!this.cc&&(this.cc=this.A.Date.now(),Qh(this))};function Qh(a){if(a.zc&&a.zc.isPerformanceTrackingOn()&&!a.Te&&a.bc&&a.cc){var b=a.A.Math.max(a.cc-a.bc,0);a.zc.tickDelta(a.Jd,b);a.zc.throttledFlush();a.Te=!0}};function Rh(a,b,c){b.__AMP__RESOURCE=this;this.rd=a;this.element=b;this.debugid=b.tagName.toLowerCase()+"#"+a;this.hostWin=b.ownerDocument.defaultView;this.o=c;this.Ig=b.hasAttribute("placeholder");this.xb=!1;this.jb=void 0;this.F=b.isBuilt()?1:0;this.ce=-1;this.fa=0;this.kf=null;this.ic=!1;this.va=W(-1E4,-1E4,0,0);this.wd=null;this.Dd=!1;this.eb=this.ma=null;this.be=void 0;this.mf=!1;a=new N;this.Ng=a.promise;this.Md=a.resolve;this.H=L(this.hostWin,"layers")}
|
|
function Z(a){return a.__AMP__RESOURCE}f=Rh.prototype;f.getId=function(){return this.rd};f.updateOwner=function(a){this.jb=a};f.getOwner=function(){if(void 0===this.jb){for(var a=this.element;a;a=a.parentElement)if(a.__AMP__OWNER){this.jb=a.__AMP__OWNER;break}void 0===this.jb&&(this.jb=null)}return this.jb};f.hasOwner=function(){return!!this.getOwner()};f.getLayoutPriority=function(){return-1!=this.ce?this.ce:this.element.getLayoutPriority()};f.updateLayoutPriority=function(a){this.ce=a};
|
|
f.getState=function(){return this.F};f.isBuilt=function(){return this.element.isBuilt()};f.isBuilding=function(){return this.xb};f.whenBuilt=function(){return this.element.signals().whenSignal("res-built")};
|
|
f.build=function(){var a=this;if(this.xb||!this.element.isUpgraded()||!this.o.grantBuildPermission())return null;this.xb=!0;return this.element.build().then(function(){a.xb=!1;a.hasBeenMeasured()?(a.F=2,a.element.updateLayoutBox(a.getLayoutBox())):a.F=1;a.element.signals().signal("res-built");a.element.dispatchCustomEvent("amp:built")},function(b){a.maybeReportErrorOnBuildFailure(b);a.xb=!1;a.element.signals().rejectSignal("res-built",b);throw b;})};
|
|
f.maybeReportErrorOnBuildFailure=function(a){ze(a)||E().error("Resource","failed to build:",this.debugid,a)};f.applySizesAndMediaQuery=function(){this.element.applySizesAndMediaQuery()};f.changeSize=function(a,b,c){this.element.changeSize(a,b,c);this.requestMeasure()};f.overflowCallback=function(a,b,c,d){a&&(this.be={height:b,width:c,margins:d});this.element.overflowCallback(a,b,c,d)};f.resetPendingChangeSize=function(){this.be=void 0};f.getPendingChangeSize=function(){return this.be};
|
|
f.getUpgradeDelayMs=function(){return this.element.getUpgradeDelayMs()};
|
|
f.measure=function(){if(!(this.Ig&&this.element.parentElement&&I(this.element.parentElement.tagName,"AMP-"))||"__AMP__RESOURCE"in this.element.parentElement){this.Dd=!1;var a=this.getPageLayoutBox();if(this.H){var b=this.element;b.getLayers().remeasure(b,!0)}else{var b=this.o.getViewport(),c=this.o.getViewport().getLayoutRect(this.element);this.va=c;var d=!1;if(b.supportsPositionFixed()&&this.isDisplayed())for(var e=this.o.win,g=e.document.body,h=this.element;h&&h!=g;h=h.offsetParent){if(h.isAlwaysFixed&&
|
|
h.isAlwaysFixed()){d=!0;break}if(b.isDeclaredFixed(h)&&"fixed"==he(e,h).position){d=!0;break}}if(this.ic=d)this.va=He(c,-b.getScrollLeft(),-b.getScrollTop())}var b=this.getPageLayoutBox(),c=a,k=!(c.width==b.width&&c.height===b.height);1!=this.F&&a.top==b.top&&!k||!this.element.isUpgraded()||0==this.F||1!=this.F&&!this.element.isRelayoutNeeded()||(this.F=2);this.hasBeenMeasured()||(this.wd=b);this.element.updateLayoutBox(b,k)}};
|
|
f.completeCollapse=function(){ge(this.element,!1);this.va=this.H?W(0,0,0,0):W(this.va.left,this.va.top,0,0);this.ic=!1;this.element.updateLayoutBox(this.getLayoutBox());var a=this.getOwner();a&&a.collapsedCallback(this.element)};f.completeExpand=function(){ge(this.element,!0);this.element.removeAttribute("hidden");this.requestMeasure()};f.isMeasureRequested=function(){return this.Dd};f.hasBeenMeasured=function(){return!!this.wd};f.requestMeasure=function(){this.Dd=!0};
|
|
f.getLayoutBox=function(){if(this.H){var a=this.element,b=a.getLayers(),c=b.getScrolledPosition(a),a=b.getSize(a);return W(c.left,c.top,a.width,a.height)}if(!this.ic)return this.va;c=this.o.getViewport();return He(this.va,c.getScrollLeft(),c.getScrollTop())};f.getPageLayoutBox=function(){if(this.H){var a=this.element,b=a.getLayers(),c=b.getOffsetPosition(a),a=b.getSize(a);return W(c.left,c.top,a.width,a.height)}return this.va};f.getInitialLayoutBox=function(){return this.wd||this.va};
|
|
f.isDisplayed=function(){var a="fluid"==this.element.getLayout(),b=this.getLayoutBox(),c=0<b.height&&0<b.width;return(a||c)&&!!this.element.ownerDocument&&!!this.element.ownerDocument.defaultView};f.isFixed=function(){return this.ic};f.overlaps=function(a){var b=this.getLayoutBox();return b.top<=a.bottom&&a.top<=b.bottom&&b.left<=a.right&&a.left<=b.right};f.prerenderAllowed=function(){return this.element.prerenderAllowed()};
|
|
f.whenWithinViewport=function(a){if(!this.isLayoutPending()||!0===a)return Promise.resolve();var b=a;a=String(b);if(this.ma&&this.ma[a])return this.ma[a].promise;if(this.isWithinViewportRatio(b))return Promise.resolve();this.ma=this.ma||{};this.ma[a]=new N;return this.ma[a].promise};function Sh(a){if(a.ma){var b=a.getDistanceViewportRatio(),c;for(c in a.ma)a.isWithinViewportRatio(parseFloat(c),b)&&(a.ma[c].resolve(),delete a.ma[c])}}
|
|
f.getDistanceViewportRatio=function(){if(this.H){var a=this.element;return{distance:a.getLayers().iterateAncestry(a,this.Kg)}}var b=this.o.getViewport().getRect(),c=this.getLayoutBox(),d=this.o.getScrollDirection(),e=1,g=0;if(b.right<c.left||b.left>c.right)return{distance:!1};if(b.bottom<c.top)g=c.top-b.bottom,-1==d&&(e=2);else if(b.top>c.bottom)g=b.top-c.bottom,1==d&&(e=2);else return{distance:!0};return{distance:g,scrollPenalty:e,viewportHeight:b.height}};
|
|
f.isWithinViewportRatio=function(a,b){if("boolean"===typeof a)return a;var c=b||this.getDistanceViewportRatio(),d=c.distance,e=c.viewportHeight;return this.H?d<a:"boolean"==typeof d?d:d<e*a/c.scrollPenalty};f.Kg=function(a,b,c){var d=1+c/10,e=b.isActiveUnsafe()?1:2;b=b.getHorizontalViewportsFromParent()+b.getVerticalViewportsFromParent();return a+e*d*b};f.renderOutsideViewport=function(){Sh(this);return this.hasOwner()||this.isWithinViewportRatio(this.element.renderOutsideViewport())};
|
|
f.idleRenderOutsideViewport=function(){return this.isWithinViewportRatio(this.element.idleRenderOutsideViewport())};f.layoutScheduled=function(a){this.F=3;this.element.layoutScheduleTime=a};f.layoutCanceled=function(){this.F=this.hasBeenMeasured()?2:1};
|
|
f.startLayout=function(){var a=this;if(this.eb)return this.eb;if(4==this.F)return Promise.resolve();if(5==this.F)return Promise.reject(this.kf);this.isDisplayed();if(0<this.fa&&!this.element.isRelayoutNeeded())return this.F=4,Promise.resolve();this.fa++;this.F=3;var b;try{b=this.element.layoutCallback()}catch(c){return Promise.reject(c)}return this.eb=b.then(function(){return Th(a,!0)},function(b){return Th(a,!1,b)})};
|
|
function Th(a,b,c){a.Md&&(a.Md(),a.Md=null);a.eb=null;a.mf=!0;a.F=b?4:5;a.kf=c;if(!b)return Promise.reject(c)}f.isLayoutPending=function(){return 4!=this.F&&5!=this.F};f.loadedOnce=function(){return this.Ng};f.hasLoadedOnce=function(){return this.mf};f.isInViewport=function(){var a=this.element.isInViewport();a&&Sh(this);return a};f.setInViewport=function(a){this.element.viewportCallback(a)};
|
|
f.unlayout=function(){0!=this.F&&1!=this.F&&(this.setInViewport(!1),this.element.unlayoutCallback()&&(this.element.togglePlaceholder(!0),this.F=1,this.fa=0,this.eb=null))};f.getTaskId=function(a){return this.debugid+"#"+a};f.pause=function(){this.element.pauseCallback();this.element.unlayoutOnPause()&&this.unlayout()};f.pauseOnRemove=function(){this.element.pauseCallback()};f.resume=function(){this.element.resumeCallback()};f.unload=function(){this.pause();this.unlayout()};
|
|
f.disconnect=function(){delete this.element.__AMP__RESOURCE;this.element.disconnectedCallback()};var Uh=['<div class="i-amphtml-loader">\n <div class="i-amphtml-loader-dot"></div>\n <div class="i-amphtml-loader-dot"></div>\n <div class="i-amphtml-loader-dot"></div>\n </div>'];Uh.raw=['<div class="i-amphtml-loader">\n <div class="i-amphtml-loader-dot"></div>\n <div class="i-amphtml-loader-dot"></div>\n <div class="i-amphtml-loader-dot"></div>\n </div>'];var Vh=['<div class="i-amphtml-loader-line">\n <div class="i-amphtml-loader-moving-line"></div>\n </div>'];
|
|
Vh.raw=['<div class="i-amphtml-loader-line">\n <div class="i-amphtml-loader-moving-line"></div>\n </div>'];var Wh={"AMP-AD":!0};function Xh(a,b){var c=a.split(",");C().assert(0<c.length,"sizes has to have at least one size");var d=[];c.forEach(function(a){a=a.replace(/\s+/g," ").trim();if(0!=a.length){var c,e,k=a.charAt(a.length-1),l,n=!1;if(")"==k){var n=!0,m=1;for(l=a.length-2;0<=l;l--){var q=a.charAt(l);"("==q?m--:")"==q&&m++;if(0==m)break}var t=l-1;if(0<l)for(l--;0<=l&&(q=a.charAt(l),"%"==q||"-"==q||"_"==q||"a"<=q&&"z">=q||"A"<=q&&"Z">=q||"0"<=q&&"9">=q);l--);C().assert(l<t,'Invalid CSS function in "%s"',a)}else for(l=
|
|
a.length-2;0<=l&&(q=a.charAt(l),"%"==q||"."==q||"a"<=q&&"z">=q||"A"<=q&&"Z">=q||"0"<=q&&"9">=q);l--);0<=l?(c=a.substring(0,l+1).trim(),e=a.substring(l+1).trim()):(e=a,c=void 0);d.push({mediaQuery:c,size:n?e:b?Xe(e):We(e)})}});return new Yh(d)}
|
|
function Yh(a){C().assert(0<a.length,"SizeList must have at least one option");this.nh=a;for(var b=0;b<a.length;b++){var c=a[b];b<a.length-1?C().assert(c.mediaQuery,"All options except for the last must have a media condition"):C().assert(!c.mediaQuery,"The last option must not have a media condition")}}Yh.prototype.select=function(a){for(var b=this.nh,c=b.length-1,d=0;d<c;d++){var e=b[d];if(a.matchMedia(e.mediaQuery).matches)return e.size}return b[c].size};var Zh=['\n <div class="i-amphtml-loading-container i-amphtml-fill-content\n amp-hidden"></div>'];Zh.raw=['\n <div class="i-amphtml-loading-container i-amphtml-fill-content\n amp-hidden"></div>'];var $h;function ai(a,b){function c(a){return d.call(this,a)||this}var d=bi(a);aa(c,d);c.prototype.elementName=function(){return b};return c}
|
|
function bi(a){function b(a){a=c.call(this,a)||this;a.createdCallback();return a}if(a.BaseCustomElementClass)return a.BaseCustomElementClass;var c=a.HTMLElement;aa(b,c);b.prototype.createdCallback=function(){this.gc=this.Me=!1;this.cd=null;this.readyState="loading";this.everAttached=!1;this.cb=this.o=this.D=null;this.layout_="nodisplay";this.layoutWidth_=-1;this.fa=0;this.Ib=this.ab=this.Bd=!1;this.dc=this.Fc=this.oc=void 0;this.warnOnMissingOverflow=!0;this.Pd=this.Nd=this.sizerElement=void 0;this.Od=
|
|
this.Na=null;this.ga=void 0;var b=a.ampExtendedElements&&a.ampExtendedElements[this.elementName()];this.implementation_=new b(this);this.nb=1;this.Tf=0;this.zb=this.Ia=void 0;this.P=new ff;var c=nc(a);this.wf=c&&c.isPerformanceTrackingOn();this.Ld=null;this.__AMP_UPG_RES&&(this.__AMP_UPG_RES(this),delete this.__AMP_UPG_RES,delete this.__AMP_UPG_PRM)};b.prototype.elementName=function(){};b.prototype.signals=function(){return this.P};b.prototype.getAmpDoc=function(){return this.D};b.prototype.getResources=
|
|
function(){return this.o};b.prototype.getLayers=function(){return this.cb};b.prototype.isUpgraded=function(){return 2==this.nb};b.prototype.upgrade=function(a){this.zb||1!=this.nb||(this.implementation_=new a(this),this.everAttached&&this.Qf())};b.prototype.getUpgradeDelayMs=function(){return this.Tf};b.prototype.hd=function(b,c){this.Tf=a.Date.now()-c;this.nb=2;this.implementation_=b;this.classList.remove("amp-unresolved");this.classList.remove("i-amphtml-unresolved");this.implementation_.createdCallback();
|
|
this.bg();this.implementation_.layout_=this.layout_;this.implementation_.layoutWidth_=this.layoutWidth_;this.implementation_.firstAttachedCallback();this.$a();this.getResources().upgraded(this)};b.prototype.bg=function(){if("nodisplay"!=this.layout_&&!this.implementation_.isLayoutSupported(this.layout_)){var a="Layout not supported: "+this.layout_;this.getAttribute("layout")||(a+=". The element did not specify a layout attribute. Check https://www.ampproject.org/docs/guides/responsive/control_layout and the respective element documentation for details.");
|
|
throw C().createError(a);}};b.prototype.isBuilt=function(){return this.Me};b.prototype.whenBuilt=function(){return this.P.whenSignal("built")};b.prototype.getLayoutPriority=function(){this.isUpgraded();return this.implementation_.getLayoutPriority()};b.prototype.build=function(){var a=this;this.isUpgraded();return this.cd?this.cd:this.cd=(new Promise(function(b,c){var d=a.xg();d?jd(a.getAmpDoc(),"consentPolicyManager","amp-consent").then(function(a){return a?a.whenPolicyUnblock(d):!0}).then(function(d){1==
|
|
d?b(a.implementation_.buildCallback()):c(Error("BLOCK_BY_CONSENT"))}):b(a.implementation_.buildCallback())})).then(function(){a.preconnect(!1);a.Me=!0;a.classList.remove("i-amphtml-notbuilt");a.classList.remove("amp-notbuilt");a.P.signal("built");a.ab&&a.Rf(!0);a.Ia&&R(a.ownerDocument.defaultView).delay(a.rg.bind(a),1);if(!a.getPlaceholder()){var b=a.createPlaceholder();b&&a.appendChild(b)}},function(b){a.P.rejectSignal("built",b);ze(b)||xe(b,a);throw b;})};b.prototype.preconnect=function(a){var b=
|
|
this;a?this.implementation_.preconnectCallback(a):R(this.ownerDocument.defaultView).delay(function(){var c=b.tagName;b.ownerDocument?b.ownerDocument.defaultView?b.implementation_.preconnectCallback(a):E().error(c,"preconnect without defaultView"):E().error(c,"preconnect without ownerDocument")},1)};b.prototype.isAlwaysFixed=function(){return this.implementation_.isAlwaysFixed()};b.prototype.updateLayoutBox=function(a,b){var c=this;this.layoutWidth_=a.width;this.isUpgraded()&&(this.implementation_.layoutWidth_=
|
|
this.layoutWidth_);if(this.isBuilt())try{if(this.implementation_.onLayoutMeasure(),b)this.implementation_.onMeasureChanged()}catch(h){xe(h,this)}this.jc()&&(this.ab?this.toggleLoading(!0):1E3>a.top&&0<=a.top&&this.rc(function(){return c.zf()}))};b.prototype.af=function(){void 0===this.sizerElement&&"responsive"===this.layout_&&(this.sizerElement=this.querySelector("i-amphtml-sizer"));return this.sizerElement||null};b.prototype.applySizesAndMediaQuery=function(){void 0===this.oc&&(this.oc=this.getAttribute("media")||
|
|
null);if(this.oc){var a=this.ownerDocument.defaultView;this.classList.toggle("i-amphtml-hidden-by-media-query",!a.matchMedia(this.oc).matches)}if(void 0===this.Fc){var b=this.getAttribute("sizes");this.Fc=b?Xh(b):null}this.Fc&&U(this,"width",this.Fc.select(this.ownerDocument.defaultView));void 0===this.dc&&"responsive"===this.layout_&&(this.dc=(b=this.getAttribute("heights"))?Xh(b,!0):null);this.dc&&(b=this.af())&&U(b,"paddingTop",this.dc.select(this.ownerDocument.defaultView))};b.prototype.changeSize=
|
|
function(a,b,c){var d=this.af();d&&(this.sizerElement=null,U(d,"paddingTop","0"),this.rc(function(){Qc(d)}));void 0!==a&&U(this,"height",a,"px");void 0!==b&&U(this,"width",b,"px");c&&(null!=c.top&&U(this,"marginTop",c.top,"px"),null!=c.right&&U(this,"marginRight",c.right,"px"),null!=c.bottom&&U(this,"marginBottom",c.bottom,"px"),null!=c.left&&U(this,"marginLeft",c.left,"px"));this.Cg()&&this.mh()};b.prototype.connectedCallback=function(){if(!this.gc&&Rc(this)&&(this.gc=!0,this.everAttached||(this.classList.add("i-amphtml-element"),
|
|
this.classList.add("i-amphtml-notbuilt"),this.classList.add("amp-notbuilt")),void 0===$h&&($h="content"in self.document.createElement("template")),$h||void 0!==this.zb||(this.zb=!!Vc(this,"template")),!this.zb)){if(!this.D){var a=this.ownerDocument.defaultView,b=nd(a).getAmpDoc(this);this.D=b;var c=this.tagName.toLowerCase();this.implementation_ instanceof Nh&&!b.declaresExtension(c)&&pd(a).installExtensionForDoc(b,c)}this.o||(this.o=sd(this.D));L(this.D.win,"layers")&&(this.cb||(this.cb=oc(this.D,
|
|
"layers")),this.getLayers().add(this));this.getResources().add(this);if(this.everAttached){var h=this.reconstructWhenReparented();h&&this.Gf();this.isUpgraded()&&(h&&this.getResources().upgraded(this),this.$a())}else{this.everAttached=!0;try{var k;var l=this.getAttribute("i-amphtml-layout");if(l){var n=Te(l);"responsive"!=n&&"intrinsic"!=n||!this.firstElementChild?"nodisplay"==n&&$e(this):this.sizerElement=this.querySelector("i-amphtml-sizer")||void 0;k=n}else{var m=this.getAttribute("layout"),q=
|
|
this.getAttribute("width"),t=this.getAttribute("height"),y=this.getAttribute("sizes"),v=this.getAttribute("heights"),A=m?Te(m):null;C().assert(void 0!==A,"Unknown layout: %s",m);var D=q&&"auto"!=q?Ve(q):q;C().assert(void 0!==D,"Invalid width value: %s",q);var z=t&&"fluid"!=t?Ve(t):t;C().assert(void 0!==z,"Invalid height value: %s",t);var B,x,u,J;if(!(J=A&&"fixed"!=A&&"fixed-height"!=A||D&&z)){var ha=this.tagName,ha=ha.toUpperCase();J=void 0===Re[ha]}if(J)B=D,x=z;else{var S=this.tagName.toUpperCase();
|
|
if(!Re[S]){var F=this.ownerDocument,V=S.replace(/^AMP\-/,""),Ha=F.createElement(V);Ha.controls=!0;fe(Ha,{position:"absolute",visibility:"hidden"});F.body.appendChild(Ha);Re[S]={width:(Ha.offsetWidth||1)+"px",height:(Ha.offsetHeight||1)+"px"};F.body.removeChild(Ha)}var Ga=Re[S];B=D||"fixed-height"==A?D:Ga.width;x=z||Ga.height}u=A?A:B||x?"fluid"==x?"fluid":!x||B&&"auto"!=B?x&&B&&(y||v)?"responsive":"fixed":"fixed-height":"container";"fixed"!=u&&"fixed-height"!=u&&"responsive"!=u&&"intrinsic"!=u||C().assert(x,
|
|
"Expected height to be available: %s",t);"fixed-height"==u&&C().assert(!B||"auto"==B,'Expected width to be either absent or equal "auto" for fixed-height layout: %s',q);"fixed"!=u&&"responsive"!=u&&"intrinsic"!=u||C().assert(B&&"auto"!=B,'Expected width to be available and not equal to "auto": %s',q);"responsive"==u||"intrinsic"==u?C().assert(Ye(B)==Ye(x),"Length units should be the same for width and height: %s, %s",q,t):C().assert(null===v,'Unexpected "heights" attribute for none-responsive layout');
|
|
this.classList.add("i-amphtml-layout-"+u);Ue(u)&&this.classList.add("i-amphtml-layout-size-defined");if("nodisplay"==u)$e(this);else if("fixed"==u)fe(this,{width:B,height:x});else if("fixed-height"==u)U(this,"height",x);else if("responsive"==u){var ba=this.ownerDocument.createElement("i-amphtml-sizer");fe(ba,{display:"block",paddingTop:Ze(x)/Ze(B)*100+"%"});this.insertBefore(ba,this.firstChild);this.sizerElement=ba}else if("intrinsic"==u){var ga=Ne(this)(Pe),fa=ga.firstElementChild;fa.setAttribute("src",
|
|
'data:image/svg+xml;charset=utf-8,<svg height="'+x+'" width="'+B+'" xmlns="http://www.w3.org/2000/svg" version="1.1"/>');this.insertBefore(ga,this.firstChild);this.sizerElement=fa}else"fill"!=u&&"container"!=u&&("flex-item"==u?(B&&U(this,"width",B),x&&U(this,"height",x)):"fluid"==u&&(this.classList.add("i-amphtml-layout-awaiting-size"),B&&U(this,"width",B),U(this,"height",0)));k=u}this.layout_=k}catch(xa){xe(xa,this)}this.implementation_ instanceof Nh||this.Qf();this.isUpgraded()||(this.classList.add("amp-unresolved"),
|
|
this.classList.add("i-amphtml-unresolved"),this.$a())}}};b.prototype.Cg=function(){return this.classList.contains("i-amphtml-layout-awaiting-size")};b.prototype.mh=function(){this.classList.remove("i-amphtml-layout-awaiting-size")};b.prototype.attachedCallback=function(){this.connectedCallback()};b.prototype.Qf=function(){var b=this,c=this.implementation_;if(1==this.nb){this.nb=4;var g=a.Date.now(),h=c.upgradeCallback();h?"function"==typeof h.then?h.then(function(a){b.hd(a||c,g)}).catch(function(a){b.nb=
|
|
3;w(a)}):this.hd(h,g):this.hd(c,g)}};b.prototype.disconnectedCallback=function(){this.zb||!this.gc||Rc(this)||(this.gc=!1,this.getResources().remove(this),this.implementation_.detachedCallback())};b.prototype.detachedCallback=function(){this.disconnectedCallback()};b.prototype.dispatchCustomEvent=function(a,b){b=b||{};var c=this.ownerDocument.createEvent("Event");c.data=b;c.initEvent(a,!0,!0);this.dispatchEvent(c)};b.prototype.$a=function(){};b.prototype.prerenderAllowed=function(){return this.implementation_.prerenderAllowed()};
|
|
b.prototype.createPlaceholder=function(){return this.implementation_.createPlaceholderCallback()};b.prototype.renderOutsideViewport=function(){return this.implementation_.renderOutsideViewport()};b.prototype.idleRenderOutsideViewport=function(){return this.implementation_.idleRenderOutsideViewport()};b.prototype.getLayoutBox=function(){return this.getResources().getResourceForElement(this).getLayoutBox()};b.prototype.getPageLayoutBox=function(){return this.getResources().getResourceForElement(this).getPageLayoutBox()};
|
|
b.prototype.getOwner=function(){return this.getResources().getResourceForElement(this).getOwner()};b.prototype.getIntersectionChangeEntry=function(){var a=this.implementation_.getIntersectionElementLayoutBox(),b=this.getResources().getResourceForElement(this).getOwner(),c=this.implementation_.getViewport().getRect(),h=b&&b.getLayoutBox(),k=Fe(a,h,c)||W(0,0,0,0),b=k.width*k.height/(a.width*a.height),l=c;c&&(k=He(k,-c.left,-c.top),a=He(a,-c.left,-c.top),l=He(l,-c.left,-c.top));return{time:"undefined"!==
|
|
typeof performance&&performance.now?performance.now():Date.now()-hg,rootBounds:l,boundingClientRect:a,intersectionRect:k,intersectionRatio:b}};b.prototype.getResourceId=function(){return this.getResources().getResourceForElement(this).getId()};b.prototype.yg=function(){return this.getResources().getResourceForElement(this).getState()};b.prototype.isRelayoutNeeded=function(){return this.implementation_.isRelayoutNeeded()};b.prototype.getImpl=function(){var a=this;return this.whenBuilt().then(function(){return a.implementation_})};
|
|
b.prototype.getLayout=function(){return this.layout_};b.prototype.layoutCallback=function(){var a=this;this.isBuilt();this.$a();var b=0==this.fa;this.P.reset("unload");b&&this.P.signal("load-start");this.wf&&this.$e().startLayout();var c=cc(function(){return a.implementation_.layoutCallback()});this.preconnect(!0);this.classList.add("i-amphtml-layout");return c.then(function(){b&&a.P.signal("load-end");a.readyState="complete";a.fa++;a.toggleLoading(!1,{cleanup:!0});a.Bd||(a.implementation_.firstLayoutCompleted(),
|
|
a.Bd=!0,a.dispatchCustomEvent("amp:load:end"))},function(c){b&&a.P.rejectSignal("load-end",c);a.fa++;a.toggleLoading(!1,{cleanup:!0});throw c;})};b.prototype.isInViewport=function(){return this.ab};b.prototype.viewportCallback=function(a){var b=this;a!=this.ab&&this.ownerDocument&&this.ownerDocument.defaultView&&(this.ab=a,0==this.fa&&(a?R(this.ownerDocument.defaultView).delay(function(){b.ab&&b.ownerDocument&&b.ownerDocument.defaultView&&b.toggleLoading(!0)},100):this.toggleLoading(!1)),this.isBuilt()&&
|
|
this.Rf(a))};b.prototype.Rf=function(a){this.implementation_.inViewport_=a;this.implementation_.viewportCallback(a);a&&this.wf&&this.$e().enterViewport()};b.prototype.isPaused=function(){return this.Ib};b.prototype.pauseCallback=function(){this.Ib||(this.Ib=!0,this.viewportCallback(!1),this.isBuilt()&&this.implementation_.pauseCallback())};b.prototype.resumeCallback=function(){this.Ib&&(this.Ib=!1,this.isBuilt()&&this.implementation_.resumeCallback())};b.prototype.unlayoutCallback=function(){if(!this.isBuilt())return!1;
|
|
this.P.signal("unload");var a=this.implementation_.unlayoutCallback();a&&this.Gf();return a};b.prototype.Gf=function(){this.fa=0;this.Bd=!1;this.P.reset("render-start");this.P.reset("load-start");this.P.reset("load-end");this.P.reset("ini-load")};b.prototype.unlayoutOnPause=function(){return this.implementation_.unlayoutOnPause()};b.prototype.reconstructWhenReparented=function(){return this.implementation_.reconstructWhenReparented()};b.prototype.collapse=function(){this.implementation_.collapse()};
|
|
b.prototype.collapsedCallback=function(a){this.implementation_.collapsedCallback(a)};b.prototype.expand=function(){this.implementation_.expand()};b.prototype.expandedCallback=function(a){this.implementation_.expandedCallback(a)};b.prototype.mutatedAttributesCallback=function(a){this.implementation_.mutatedAttributesCallback(a)};b.prototype.enqueAction=function(a){this.isBuilt()?this.We(a,!1):(void 0===this.Ia&&(this.Ia=[]),this.Ia.push(a))};b.prototype.rg=function(){var a=this;if(this.Ia){var b=this.Ia;
|
|
this.Ia=null;b.forEach(function(b){a.We(b,!0)})}};b.prototype.We=function(a,b){try{this.implementation_.executeAction(a,b)}catch(g){w("Action execution failed:",g,a.node.tagName,a.method)}};b.prototype.xg=function(){var a=this.getAttribute("data-block-on-consent");return null===a?null:""==a||"default"==a?this.implementation_.getConsentPolicy():a};b.prototype.getRealChildNodes=function(){return $c(this,function(a){return!ci(a)})};b.prototype.getRealChildren=function(){return Yc(this,function(a){return!ci(a)})};
|
|
b.prototype.toggleLayoutDisplay=function(a){this.classList.toggle("i-amphtml-display",a)};b.prototype.getPlaceholder=function(){return Zc(this,function(a){return a.hasAttribute("placeholder")&&!("placeholder"in a)})};b.prototype.togglePlaceholder=function(a){if(a){var b=this.getPlaceholder();b&&b.classList.remove("amp-hidden")}else for(var c=dd(this,"> [placeholder]"),b=0;b<c.length;b++)"placeholder"in c[b]||c[b].classList.add("amp-hidden")};b.prototype.getFallback=function(){return cd(this,"> [fallback]")};
|
|
b.prototype.toggleFallback=function(a){var b=this.yg();if(!a||0!=b&&1!=b&&2!=b)if(this.classList.toggle("amp-notsupported",a),1==a){var c=this.getFallback();c&&this.getResources().scheduleLayout(this,c)}};b.prototype.renderStarted=function(){this.P.signal("render-start");this.togglePlaceholder(!1);this.toggleLoading(!1)};b.prototype.jc=function(){if(this.Eg())return!1;void 0===this.Nd&&(this.Nd=this.hasAttribute("noloading"));var a;(a=this.Nd)||(a=this.tagName.toUpperCase(),a=!("AMP-AD"==a||"AMP-EMBED"==
|
|
a||Se[a]));return a||100>this.layoutWidth_||0<this.fa||ci(this)||!Ue(this.layout_)?!1:!0};b.prototype.Eg=function(){return this.D&&this.D.win!=this.ownerDocument.defaultView||"inabox"==r().runtime};b.prototype.zf=function(){if(this.jc()&&!this.Na){var a=this.ownerDocument,b=Ne(a)(Zh),c=this.elementName(),a=Wh[c.toUpperCase()]?Ne(a)(Vh):Ne(a)(Uh);b.appendChild(a);this.appendChild(b);this.Na=b;this.Od=a}};b.prototype.toggleLoading=function(a,b){var c=this,d=b&&b.cleanup,e=b&&b.force;if(!a||this.implementation_.isLoadingReused()||
|
|
!(0<this.fa||this.P.get("render-start")))if((this.Pd=a)||this.Na)!a||e||this.jc()?this.rc(function(){var a=c.Pd;!a||e||c.jc()||(a=!1);a&&c.zf();if(c.Na&&(c.Na.classList.toggle("amp-hidden",!a),c.Od.classList.toggle("amp-active",a),!a&&d&&!c.implementation_.isLoadingReused())){var b=c.Na;c.Na=null;c.Od=null;c.rc(function(){Qc(b)})}}):this.Pd=!1};b.prototype.$e=function(){this.Ld||(this.Ld=new Ph(this.ownerDocument.defaultView,this.getLayoutPriority()));return this.Ld};b.prototype.getOverflowElement=
|
|
function(){void 0===this.ga&&(this.ga=cd(this,"> [overflow]"))&&(this.ga.hasAttribute("tabindex")||this.ga.setAttribute("tabindex","0"),this.ga.hasAttribute("role")||this.ga.setAttribute("role","button"));return this.ga};b.prototype.overflowCallback=function(a,b,c){var d=this;this.getOverflowElement();this.ga?(this.ga.classList.toggle("amp-visible",a),this.ga.onclick=a?function(){var a=d.getResources();a.changeSize(d,b,c);a.mutateElement(d,function(){d.overflowCallback(!1,b,c)})}:null):a&&this.warnOnMissingOverflow&&
|
|
C().warn("CustomElement","Cannot resize element and overflow is not available",this)};b.prototype.rc=function(a){this.o?this.getResources().mutateElement(this,a):a()};a.BaseCustomElementClass=b;return a.BaseCustomElementClass}function ci(a){var b="string"==typeof a?a:a.tagName;return b&&I(b.toLowerCase(),"i-")||a.tagName&&(a.hasAttribute("placeholder")||a.hasAttribute("fallback")||a.hasAttribute("overflow"))?!0:!1};function di(a){a.ampExtendedElements||(a.ampExtendedElements={});return a.ampExtendedElements}function ei(a,b,c){var d=di(a);if(!d[b])fi(a,b,c);else if(d[b]!=c){C().assert(d[b]==Nh,"%s is already registered. The script tag for %s is likely included twice in the page.",b,b);d[b]=c;for(var e=0;e<Mh.length;e++){var g=Mh[e],h=g.element;if(h.tagName.toLowerCase()==b&&h.ownerDocument.defaultView==a){try{h.upgrade(c)}catch(k){xe(k,h)}Mh.splice(e--,1)}}}}
|
|
function gi(a){md(a.getHeadNode()).forEach(function(b){a.declareExtension(b);hi(a.win,b)})}function hi(a,b){di(a)[b]||fi(a,b,Nh)}function fi(a,b,c){di(a)[b]=c;var d=ai(a,b),e="customElements"in a;e?a.customElements.define(b,d):a.document.registerElement(b,{prototype:d.prototype})};function ii(a,b){this.element=a;this.win=a.ownerDocument.defaultView||b;this.compileCallback()}ii.prototype.compileCallback=function(){};ii.prototype.render=function(){throw Error("Not implemented");};ii.prototype.unwrap=function(a){for(var b=null,c=a.firstChild;null!=c;c=c.nextSibling)if(3==c.nodeType){if(c.textContent.trim()){b=null;break}}else if(8!=c.nodeType)if(1==c.nodeType)if(b){b=null;break}else b=c;else b=null;return b||a};
|
|
ii.prototype.viewerCanRenderTemplates=function(){return oc(this.element,"viewer").canRenderTemplates()};function ji(a){this.A=a;this.lb={};this.Ic={}}f=ji.prototype;f.renderTemplate=function(a,b){return ki(this,a).then(function(a){return a.render(b)})};f.renderTemplateArray=function(a,b){return 0==b.length?Promise.resolve([]):ki(this,a).then(function(a){return b.map(function(b){return a.render(b)})})};f.findAndRenderTemplate=function(a,b,c){return this.renderTemplate(this.findTemplate(a,c),b)};
|
|
f.findAndRenderTemplateArray=function(a,b,c){return this.renderTemplateArray(this.findTemplate(a,c),b)};f.hasTemplate=function(a,b){return!!this.maybeFindTemplate(a,b)};f.findTemplate=function(a,b){b=this.maybeFindTemplate(a,b);C().assert(b,"Template not found for %s",a);C().assert("TEMPLATE"==b.tagName,'Template element must be a "template" tag %s',b);return b};f.maybeFindTemplate=function(a,b){var c=a.getAttribute("template");return c?Sc(a).getElementById(c):b?cd(a,b):cd(a,"> template")};
|
|
function ki(a,b){var c=b.__AMP_IMPL_;if(c)return Promise.resolve(c);var c=C().assert(b.getAttribute("type"),"Type must be specified: %s",b),d=b.__AMP_WAIT_;if(d)return d;d=li(a,c).then(function(c){var d=b.__AMP_IMPL_=new c(b,a.A);delete b.__AMP_WAIT_;return d});return b.__AMP_WAIT_=d}function li(a,b){if(a.lb[b])return a.lb[b];var c=new N,d=c.promise,c=c.resolve;a.lb[b]=d;a.Ic[b]=c;return d}f.unregisterTemplate=function(a){delete this.lb[a];delete this.Ic[a]};var mi=["GET","POST"];function ni(a,b){var c=Object.assign({},b);if(Bg(b.body)){c.headers["Content-Type"]="multipart/form-data;charset=utf-8";b=b.body.entries();for(var d=[],e=b.next();!e.done;e=b.next())d.push(e.value);c.body=d}return{input:a,init:c}}
|
|
function oi(a,b){C().assert(ma(a),"Object expected: %s",a);var c="document"==b;if("function"===typeof Response&&!c)return new Response(a.body,a.init);var d=G(),e={status:200,statusText:"OK",responseText:a.body?String(a.body):"",getResponseHeader:function(a){return d[String(a).toLowerCase()]||null}};a.init&&(a=a.init,la(a.headers)&&a.headers.forEach(function(a){var b=a[0],c=a[1];d[String(b).toLowerCase()]=String(c)}),a.status&&(e.status=parseInt(a.status,10)),a.statusText&&(e.statusText=String(a.statusText)));
|
|
c&&(e.responseXML=(new DOMParser).parseFromString(e.responseText,"text/html"));return new pi(e)}
|
|
function qi(a,b,c,d){if(!b)return Promise.resolve();var e=T(b),g=e.whenFirstVisible();return!jb(c)&&e.hasCapability("xhrInterceptor")&&b.getRootNode().documentElement.hasAttribute("allow-xhr-interception")?g.then(function(){return e.isTrustedViewer()}).then(function(b){var g=r(a).development;if(b||g){var h=H({originalRequest:ni(c,d)});return e.sendMessageAwaitResponse("xhr",h).then(function(a){return oi(a,d.responseType)})}}):g}function ri(a,b,c){!1!==c.ampCors&&(b=pb(a,b));return b}
|
|
function si(a,b){a=a||{};var c=a.credentials,d;d=a.method;void 0===d?d="GET":(d=d.toUpperCase(),mi.includes(d));a.method=d;a.headers=a.headers||H({});b&&(a.headers.Accept=b);return a}
|
|
function ti(a,b,c){!1===c.ampCors&&(c.requireAmpResponseSourceOrigin=!1);!0===c.requireAmpResponseSourceOrigin&&E().error("XHR","requireAmpResponseSourceOrigin is deprecated, use ampCors instead");void 0===c.requireAmpResponseSourceOrigin&&(c.requireAmpResponseSourceOrigin=!0);var d=a.origin||K(a.location.href).origin;a=K(b).origin;d==a&&(c.headers=c.headers||{},c.headers["AMP-Same-Origin"]="true");return c}var ui={document:1,text:2};
|
|
function vi(a,b){return new Promise(function(c,d){var e=wi(b.method||"GET",a);"include"==b.credentials&&(e.withCredentials=!0);b.responseType in ui&&(e.responseType=b.responseType);b.headers&&Object.keys(b.headers).forEach(function(a){e.setRequestHeader(a,b.headers[a])});e.onreadystatechange=function(){2>e.readyState||(100>e.status||599<e.status?(e.onreadystatechange=null,d(C().createExpectedError("Unknown HTTP status "+e.status))):4==e.readyState&&c(new pi(e)))};e.onerror=function(){d(C().createExpectedError("Request failure"))};
|
|
e.onabort=function(){d(C().createExpectedError("Request aborted"))};"POST"==b.method?e.send(b.body):e.send()})}function wi(a,b){var c=new XMLHttpRequest;if("withCredentials"in c)c.open(a,b,!0);else if("undefined"!=typeof XDomainRequest)c=new XDomainRequest,c.open(a,b);else throw E().createExpectedError("CORS is not supported");return c}
|
|
function xi(a){return new Promise(function(b){if(a.ok)return b(a);b=a.status;var c=C().createError("HTTP error "+b);c.retriable=415==b||500<=b&&600>b;c.response=a;throw c;})}function pi(a){this.Ha=a;this.status=this.Ha.status;this.ok=200<=this.status&&300>this.status;this.headers=new yi(a);this.bodyUsed=!1;this.body=null}f=pi.prototype;f.clone=function(){return new pi(this.Ha)};function zi(a){a.bodyUsed=!0;return Promise.resolve(a.Ha.responseText)}f.text=function(){return zi(this)};f.json=function(){return zi(this).then(Yd)};
|
|
f.document=function(){this.bodyUsed=!0;C().assert(this.Ha.responseXML,"responseXML should exist. Make sure to return Content-Type: text/html header.");return Promise.resolve(this.Ha.responseXML)};f.arrayBuffer=function(){return zi(this).then(af)};function yi(a){this.Ha=a}yi.prototype.get=function(a){return this.Ha.getResponseHeader(a)};yi.prototype.has=function(a){return null!=this.Ha.getResponseHeader(a)};var Ai=[la,ma];function Bi(a){this.win=a;a=nd(a);this.$f=a.isSingleDoc()?a.getAmpDoc():null}f=Bi.prototype;f.wg=function(a,b){var c=this,d=arguments;return qi(this.win,this.$f,a,b).then(function(e){if(e)return e;Bg(b.body)&&(b.body=b.body.getFormData());return"document"==b.responseType?vi(a,b):(c.win.fetch||vi).apply(null,d)})};
|
|
function Ci(a,b,c){c=void 0===c?{}:c;b=ri(a.win,b,c);c=ti(a.win,b,c);return a.wg(b,c).then(function(b){var d=a.win,g=c,h=b.headers.get("AMP-Access-Control-Allow-Source-Origin");h?(d=ob(d.location.href),C().assert(h==d,"Returned AMP-Access-Control-Allow-Source-Origin is not equal to the current: "+h+(" vs "+d))):g.requireAmpResponseSourceOrigin&&C().assert(!1,"Response must contain the AMP-Access-Control-Allow-Source-Origin header");return b},function(a){var c=K(b).origin;throw C().createExpectedError("XHR",
|
|
"Failed fetching"+(" ("+c+"/...):"),a&&a.message);})}f.fetchJson=function(a,b){var c=si(b,"application/json");if("POST"==c.method&&!Bg(c.body)){Ai.some(function(a){return a(c.body)});c.headers["Content-Type"]=c.headers["Content-Type"]||"text/plain;charset=utf-8";var d=c.headers["Content-Type"];c.body="application/x-www-form-urlencoded"===d?$a(c.body):JSON.stringify(c.body)}return this.fetch(a,c)};f.fetchText=function(a,b){return this.fetch(a,si(b,"text/plain"))};
|
|
f.fetchDocument=function(a,b){b=si(b,"text/html");b.responseType="document";return this.fetch(a,b).then(function(a){return a.document()})};f.fetch=function(a,b){b=si(b);return Ci(this,a,b).then(function(a){return xi(a)})};f.sendSignal=function(a,b){return Ci(this,a,b).then(function(a){return xi(a)})};f.getCorsUrl=function(a,b){return pb(a,b)};function Di(a){Bi.call(this,a);this.ub=G()}aa(Di,Bi);Di.prototype.fetch=function(a,b){var c=this,d=b&&b.headers&&b.headers.Accept||"",e=!b||!b.method||"GET"===b.method,g=ib(a)+d,h=!!this.ub[g];if(e&&h)return this.ub[g].then(function(a){return a.clone()});var k=Bi.prototype.fetch.call(this,a,b);e&&(this.ub[g]=k.then(function(a){delete c.ub[g];return a.clone()},function(a){delete c.ub[g];throw a;}));return k};function Ei(a){this.D=a;this.h=T(this.D);this.de=null;this.R=R(this.D.win)}Ei.prototype.isSupported=function(){return this.h.isCctEmbedded()&&this.h.isProxyOrigin()};Ei.prototype.getScopedCid=function(a){var b=this;if(!this.h.isCctEmbedded())return Promise.resolve(null);this.de||(this.de=this.tb("https://ampcid.google.com/v1/cache:getClientId?key=AIzaSyDKtqGxnoeIqVM33Uf7hRSa3GJxuzR7mLc"));return this.de.then(function(c){return c?Fi(b,c,a):null})};
|
|
Ei.prototype.tb=function(a,b){b=void 0===b?!0:b;var c=this,d=H({publisherOrigin:ob(this.D.win.location)});return this.R.timeoutPromise(3E4,Q(this.D.win,"xhr").fetchJson(a,{method:"POST",ampCors:!1,credentials:"include",mode:"cors",body:d})).then(function(a){return a.json().then(function(a){if(a.optOut)return null;var d=a.publisherClientId;if(!d&&b&&a.alternateUrl){var e=a.alternateUrl+"?key=AIzaSyDKtqGxnoeIqVM33Uf7hRSa3GJxuzR7mLc";return c.tb(e,!1)}return d})}).catch(function(a){a&&a.response?a.response.json().then(function(a){E().error("CacheCidApi",
|
|
JSON.stringify(a))}):E().error("CacheCidApi",a);return null})};function Fi(a,b,c){b=b+";"+c;return Q(a.D.win,"crypto").sha384Base64(b).then(function(a){return"amp-"+a})};function Gi(a){this.A=a.win;this.R=R(this.A);this.gd={};this.fd=(a=od(a).canonicalUrl)?K(a).origin:null}
|
|
Gi.prototype.getScopedCid=function(a,b){var c=this;if(this.gd[b])return this.gd[b];var d;return this.gd[b]=this.R.poll(200,function(){d=rb(c.A,"AMP_TOKEN");return"$RETRIEVING"!==d}).then(function(){if("$OPT_OUT"===d)return"$OPT_OUT";var e="$NOT_FOUND"===d&&jb(c.A.document.referrer);if(!e&&d&&"$"===d[0])return null;d&&(!d||"$"!==d[0])||Hi(c,"$RETRIEVING",3E4);return c.tb("https://ampcid.google.com/v1/publisher:getClientId?key="+a,b,d).then(function(e){var g=c.cf(e);if(!g&&e.alternateUrl){var k=e.alternateUrl+
|
|
"?key="+a;return c.tb(k,b,d).then(c.cf.bind(c))}return g}).catch(function(a){Hi(c,"$ERROR",3E4);a&&a.response?a.response.json().then(function(a){E().error("GoogleCidApi",JSON.stringify(a))}):E().error("GoogleCidApi",a);return null})})};Gi.prototype.tb=function(a,b,c){b=H({originScope:b,canonicalOrigin:this.fd});c&&(b.securityToken=c);return this.R.timeoutPromise(3E4,Q(this.A,"xhr").fetchJson(a,{method:"POST",ampCors:!1,credentials:"include",mode:"cors",body:b}).then(function(a){return a.json()}))};
|
|
Gi.prototype.cf=function(a){if(a.optOut)return Hi(this,"$OPT_OUT",31536E6),"$OPT_OUT";if(a.clientId)return Hi(this,a.securityToken,31536E6),a.clientId;if(a.alternateUrl)return null;Hi(this,"$NOT_FOUND",36E5);return null};function Hi(a,b,c){b&&sb(a.A,"AMP_TOKEN",b,a.A.Date.now()+c,{highestAvailableDomain:!0})};function Ii(a){this.D=a;this.h=T(this.D);this.fd=(a=od(this.D).canonicalUrl)?K(a).origin:null}Ii.prototype.isSupported=function(){return this.h.hasCapability("cid")?this.h.isTrustedViewer():Promise.resolve(!1)};Ii.prototype.getScopedCid=function(a,b){b=H({scope:b,clientIdApi:!!a,canonicalOrigin:this.fd});a&&(b.apiKey=a);return this.h.sendMessageAwaitResponse("cid",b)};var Ji=/^[a-zA-Z0-9-_.]+$/,Ki={googleanalytics:"AMP_ECID_GOOGLE"},Li={googleanalytics:"AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM"};function Mi(a){this.ampdoc=a;this.Vc=null;this.jd=Object.create(null);this.Ne=new Ei(a);this.Wf=new Ii(a);this.og=new Gi(a);this.Uc=null}
|
|
Mi.prototype.get=function(a,b,c){var d=this;C().assert(Ji.test(a.scope)&&Ji.test(a.cookieName),"The CID scope and cookie name must only use the characters [a-zA-Z0-9-_.]+\nInstead found: %s",a.scope);return b.then(function(){return T(d.ampdoc).whenFirstVisible()}).then(function(){return Ni(d.ampdoc)}).then(function(e){if(e)return"";var g=Oi(d,a,c||b);return R(d.ampdoc.win).timeoutPromise(1E4,g,'Getting cid for "'+a.scope+'" timed out').catch(function(a){w(a)})})};Mi.prototype.optOut=function(){return Pi(this.ampdoc)};
|
|
function Oi(a,b,c){var d=b.scope,e=K(a.ampdoc.win.location.href);if(!jb(e)){var g=Qi(a,d);return g?a.og.getScopedCid(g,d).then(function(e){return"$OPT_OUT"==e?null:e?(Ri(a.ampdoc.win,b.cookieName||d,e),e):Si(a,b,c)}):Si(a,b,c)}return a.Wf.isSupported().then(function(b){if(b){var g=Qi(a,d);return a.Wf.getScopedCid(g,d)}return a.Ne.isSupported()&&Qi(a,d)?a.Ne.getScopedCid(d).then(function(b){return b?b:Ti(a,c,d,e)}):Ti(a,c,d,e)})}
|
|
function Ti(a,b,c,d){return Ui(a,b).then(function(b){return Q(a.ampdoc.win,"crypto").sha384Base64(b+Vi(d)+c)})}function Qi(a,b){a.Uc||(a.Uc=Wi(a));return a.Uc[b]}
|
|
function Wi(a){var b={},c=a.ampdoc.win.document.head.querySelector("meta[name=amp-google-client-id-api]");c&&c.hasAttribute("content")&&c.getAttribute("content").split(",").forEach(function(a){a=a.trim();if(0<a.indexOf("=")){var c=a.split("=");b[c[0].trim()]=c[1].trim()}else{var d=a;(a=Ki[d])?b[a]=Li[d]:C().error("CID","Unsupported client for Google CID API: "+d)}});return b}
|
|
function Pi(a){T(a).sendMessage("cidOptOut",{});return pc(a,"storage").then(function(a){return a.set("amp-cid-optout",!0)})}function Ni(a){return pc(a,"storage").then(function(a){return a.get("amp-cid-optout").then(function(a){return!!a})}).catch(function(){return!1})}function Ri(a,b,c){var d=Date.now()+31536E6;sb(a,b,c,d,{highestAvailableDomain:!0})}
|
|
function Si(a,b,c){var d=a.ampdoc.win,e=b.scope,g=b.cookieName||e,h=rb(d,g);if(!h&&!b.createCookieIfNotPresent)return Promise.resolve(null);if(a.jd[e])return a.jd[e];if(h)return/^amp-/.test(h)&&Ri(d,g,h),Promise.resolve(h);var k=Xi(d).then(function(a){return"amp-"+a});Promise.all([k,c]).then(function(a){var b=a[0],c=rb(d,g);c||Ri(d,g,b)});return a.jd[e]=k}function Vi(a){C().assert(jb(a),"Expected proxy origin %s",a.origin);return ob(a)}
|
|
function Ui(a,b){if(a.Vc)return a.Vc;var c=a.ampdoc.win;return a.Vc=Yi(a.ampdoc).then(function(d){var e=!1,g;d&&!Zi(d)?(g=Promise.resolve(d.cid),d.time+864E5<Date.now()&&(e=!0)):(g=Q(c,"crypto").sha384Base64($i(c)),e=!0);e&&g.then(function(c){aj(a.ampdoc,b,c)});return g})}function aj(a,b,c){var d=a.win;fd(d)?bj(a,JSON.stringify(H({time:Date.now(),cid:c}))):b.then(function(){try{d.localStorage.setItem("amp-cid",JSON.stringify(H({time:Date.now(),cid:c})))}catch(e){}})}
|
|
function bj(a,b){var c=T(a);return c.isTrustedViewer().then(function(a){if(a)return E().expectedError("CID","Viewer does not provide cap=cid"),c.sendMessageAwaitResponse("cid",b).then(function(a){var b;if(b=a){var c;a:{try{c=Yd(a);break a}catch(k){}c=void 0}b=!c}return b?(E().expectedError("CID","invalid cid format"),JSON.stringify(H({time:Date.now(),cid:a}))):a})})}
|
|
function Yi(a){var b=a.win,c;try{c=b.localStorage.getItem("amp-cid")}catch(e){}var d=Promise.resolve(c);!c&&fd(b)&&(d=bj(a));return d.then(function(a){if(!a)return null;a=Yd(a);return{time:a.time,cid:a.cid}})}function Zi(a){var b=a.time;return b+31536E6<Date.now()}function $i(a){var b;a.crypto&&a.crypto.getRandomValues?(b=new Uint8Array(16),a.crypto.getRandomValues(b)):b=null;return b?b:String(a.location.href+Date.now()+a.Math.random()+a.screen.width+a.screen.height)}
|
|
function Xi(a){var b=$i(a);if("string"==typeof b)return Q(a,"crypto").sha384Base64(b);var c=b;return cc(function(){return ef(c).replace(/\.+$/,"")})};function cj(a){this.A=a;var b=null,c=!1;a.crypto&&(a.crypto.subtle?b=a.crypto.subtle:a.crypto.webkitSubtle&&(b=a.crypto.webkitSubtle,c=!0));this.pkcsAlgo={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};this.subtle=b;this.Hg=c;this.Kb=null}f=cj.prototype;
|
|
f.sha384=function(a){var b=this;"string"===typeof a&&(a=bf(a));if(!this.subtle||this.Kb)return(this.Kb||dj(this)).then(function(b){return b.sha384(a)});try{return this.subtle.digest({name:"SHA-384"},a).then(function(a){return new Uint8Array(a)},function(c){c.message&&0>c.message.indexOf("secure origin")&&E().error("Crypto","SubtleCrypto failed, fallback to closure lib.",c);return dj(b).then(function(){return b.sha384(a)})})}catch(c){return E().error("Crypto","SubtleCrypto failed, fallback to closure lib.",
|
|
c),dj(this).then(function(){return b.sha384(a)})}};f.sha384Base64=function(a){return this.sha384(a).then(function(a){return ef(a)})};f.uniform=function(a){return this.sha384(a).then(function(a){for(var b=0,d=2;0<=d;d--)b=(b+a[d])/256;return b})};function dj(a){return a.Kb?a.Kb:a.Kb=pd(a.A).preloadExtension("amp-crypto-polyfill").then(function(){return Q(a.A,"crypto-polyfill")})}f.isPkcsAvailable=function(){return!!this.subtle&&!1!==this.A.isSecureContext};
|
|
f.importPkcsKey=function(a){this.isPkcsAvailable();var b=this.Hg?af(JSON.stringify(a)):a;return this.subtle.importKey("jwk",b,this.pkcsAlgo,!0,["verify"])};f.verifyPkcs=function(a,b,c){this.isPkcsAvailable();return this.subtle.verify(this.pkcsAlgo,a,b,c)};var ej=["prefetch","preload","preconnect","dns-prefetch"];function fj(a){this.D=a;this.ud=null}
|
|
fj.prototype.get=function(){if(this.ud)return this.ud;var a=this.D,b=a.getUrl(),c=nb(b),d=a.getRootNode(),b=d&&d.AMP&&d.AMP.canonicalUrl;if(!b)var e=d.querySelector("link[rel=canonical]"),b=e?K(e.href).href:c;var g=String(Math.floor(1E4*a.win.Math.random())),h=gj(a.win.document),k=hj(a.win.document),d=ij(a);return this.ud={get sourceUrl(){return nb(a.getUrl())},canonicalUrl:b,pageViewId:g,linkRels:h,metaTags:k,replaceParams:d}};
|
|
function gj(a){var b=G();if(a.head){var c=a.head.querySelectorAll("link[rel]");a={};for(var d=0;d<c.length;a={href:a.href},d++){var e=c[d];a.href=e.href;var g=e.getAttribute("rel");g&&a.href&&g.split(/\s+/).forEach(function(a){return function(c){if(-1==ej.indexOf(c)){var d=b[c];d?(la(d)||(d=b[c]=[d]),d.push(a.href)):b[c]=a.href}}}(a))}}return b}
|
|
function hj(a){var b=G();if(a.head){var c=a.head.querySelectorAll("meta[name]");for(a=0;a<c.length;a++){var d=c[a],e=d.getAttribute("content");if((d=d.getAttribute("name"))&&e){var g=b[d];g?(la(g)||(g=b[d]=[g]),g.push(e)):b[d]=e}}}return b}function ij(a){var b;(b=!a.isSingleDoc())||(b=a.win.location.href,"string"==typeof b&&(b=K(b)),b="a"!=(jb(b)?b.pathname.split("/",2)[1]:null));if(b)return{};a=K(a.win.location.href);var c=p(a.search).amp_r;return p(c)};function jj(a){this.win=a;this.Z=a.document;this.Ma=ce(this.Z,"hidden",!0);void 0===this.Z[this.Ma]&&(this.Ma=null);this.Pc=ce(this.Z,"visibilityState",!0);void 0===this.Z[this.Pc]&&(this.Pc=null);this.Vb=new Y;this.Oc=null;if(this.Ma){this.Oc="visibilitychange";var b=this.Ma.indexOf("Hidden");-1!=b&&(this.Oc=this.Ma.substring(0,b)+"Visibilitychange")}this.gg=this.Yd.bind(this);this.Oc&&this.Z.addEventListener(this.Oc,this.gg);this.Va=null}f=jj.prototype;
|
|
f.isHidden=function(){return this.Ma?this.Z[this.Ma]:!1};f.getVisibilityState=function(){return this.Pc?this.Z[this.Pc]:this.isHidden()?"hidden":"visible"};f.onVisibilityChanged=function(a){return this.Vb.add(a)};f.Yd=function(){this.Vb.fire()};f.onBodyAvailable=function(a){var b=this.Z;if(b.body)return a(),null;this.Va||(this.Va=new Y,Nc(b.documentElement,function(){return!!b.body},this.Qg.bind(this)));return this.Va.add(a)};f.Qg=function(){this.Va.fire();this.Va.removeAll();this.Va=null};function kj(a,b){var c=this;this.ampdoc=a;this.pa=b||a.getRootNode();this.G=ud(this.ampdoc);this.h=T(this.ampdoc);this.N=oc(this.ampdoc,"history");var d=rd(this.ampdoc.win);this.Gg=d.isIos()&&d.isSafari();this.yb=fd(this.ampdoc.win)&&this.h.isOvertakeHistory();this.Ad=this.pa!=this.ampdoc.getRootNode();this.Fg="inabox"==r(this.ampdoc.win).runtime;this.ob=this.zg.bind(this);this.pa.addEventListener("click",this.ob);this.pa.addEventListener("contextmenu",this.ob);this.ze=!1;zf(this.ampdoc).then(function(a){c.ze=
|
|
a});this.Sc=null}kj.prototype.adoptEmbedWindow=function(a){gc(a,"navigation",new kj(this.ampdoc,a.document))};kj.prototype.cleanup=function(){this.ob&&(this.pa.removeEventListener("click",this.ob),this.pa.removeEventListener("contextmenu",this.ob))};
|
|
kj.prototype.navigateTo=function(a,b,c){var d=dc(this.ampdoc,"url",!0);if(d.isProtocolValid(b)){if(c&&(this.Sc||(this.Sc=lj(this)),this.Sc.includes(c)&&this.h.navigateToAmpUrl(b,c)))return;a.top.location.href=b}else C().error("navigation","Cannot navigate to invalid protocol: "+b)};function lj(a){return(a=a.pa.querySelector('meta[name="amp-to-amp-navigation"]'))&&a.hasAttribute("content")?a.getAttribute("content").split(",").map(function(a){return a.trim()}):[]}
|
|
kj.prototype.zg=function(a){if(!a.defaultPrevented){var b=Vc(a.target,"A");if(b&&b.href)if("click"==a.type){mj(this,b);var c=b.href,c=dc(this.pa,"url",!0).parse(c);if(!nj(this,a,b,c)){var d;if(this.yb){d=b.ownerDocument.defaultView;var e=b.href,g=c.protocol;"ftp:"==g?(ed(d,e,"_blank"),a.preventDefault(),d=!0):(g=/^(https?|mailto):$/.test(g),this.Gg&&!g?(ed(d,e,"_top"),a.preventDefault(),d=!0):d=!1)}else d=!1;d||oj(this,a,b,c)}}else"contextmenu"==a.type&&mj(this,b)}};
|
|
function mj(a,b){var c=null;if(a.ze&&!a.Ad){a=K(a.ampdoc.win.location.href);var d=p(a.search);a=[];for(var e=0;e<uf.length;e++){var g=uf[e];"undefined"!==typeof d[g]&&a.push(g)}d=b.getAttribute("data-amp-addparams");e=b.href;d&&(e=Za(e,p(d)));d=K(e);d=p(d.search);for(e=a.length-1;0<=e;e--)"undefined"!==typeof d[a[e]]&&a.splice(e,1);d="";for(e=0;e<a.length;e++)g=a[e],d+=0==e?g+"=QUERY_PARAM("+g+")":"&"+g+"=QUERY_PARAM("+g+")";c=d}var h=dc(b,"url-replace",!0);h.maybeExpandLink(b,c)}
|
|
function nj(a,b,c,d){if(!c.hasAttribute("rel"))return!1;var e=c.getAttribute("rel").split(" ").map(function(a){return a.trim()});return e.includes("amphtml")?a.h.navigateToAmpUrl(d.href,"<a rel=amphtml>")?(b.preventDefault(),!0):!1:!1}
|
|
function oj(a,b,c,d){var e="",g=dc(a.pa,"url",!0).parse(e),h=""+d.origin+d.pathname+d.search,k=""+g.origin+g.pathname+g.search;if(d.hash&&h==k){if(b.preventDefault(),!a.Ad){var l=d.hash.slice(1),n=null;if(l)var m=String(l).replace(Lc,Mc),n=a.pa.getElementById(l)||a.pa.querySelector('a[name="'+m+'"]');d.hash!=g.hash?a.N.replaceStateForTarget(d.hash).then(function(){pj(a,n,l)}):pj(a,n,l)}}else if(a.Ad||a.Fg){var q=(c.getAttribute("target")||"").toLowerCase();"_top"!=q&&"_blank"!=q&&c.setAttribute("target",
|
|
"_blank")}}function pj(a,b,c){b?(a.G.scrollIntoView(b),R(a.ampdoc.win).delay(function(){return a.G.scrollIntoView(b)},1)):E().warn("navigation","failed to find element with id="+c+" or a[name="+c+"]")};function qj(a){if(!a.defaultPrevented){var b=a.target;if(b&&"FORM"==b.tagName){var c=b.classList.contains("i-amphtml-form"),d;(d=c?!b.hasAttribute("amp-novalidate"):!b.hasAttribute("novalidate"))&&b.checkValidity&&!b.checkValidity()&&a.preventDefault();for(var e=b.elements,g=0;g<e.length;g++)C().assert(!e[g].name||"__amp_source_origin"!=e[g].name,"Illegal input name, %s found: %s","__amp_source_origin",e[g]);var e=b.getAttribute("action"),h=b.getAttribute("action-xhr"),g=(b.getAttribute("method")||
|
|
"GET").toUpperCase();h&&(hb(h,b,"action-xhr"),C().assert(!jb(h),"form action-xhr should not be on AMP CDN: %s",b),qb(h));e&&(hb(e,b,"action"),C().assert(!jb(e),"form action should not be on AMP CDN: %s",b),qb(e));"GET"==g?C().assert(h||e,"form action-xhr or action attribute is required for method=GET: %s",b):"POST"==g&&(e&&C().error("form","action attribute is invalid for method=POST: %s",b),h||(a.preventDefault(),C().assert(!1,"Only XHR based (via action-xhr attribute) submissions are support for POST requests. %s",
|
|
b)));(e=b.getAttribute("target"))?C().assert("_blank"==e||"_top"==e,"form target=%s is invalid can only be _blank or _top: %s",e,b):b.setAttribute("target","_top");h&&(a.preventDefault(),a.stopImmediatePropagation(),dc(b,"action",!0).execute(b,"submit",null,b,b,a,100))}}};function rj(a,b){this.D=a;this.R=R(a.win);this.j=b;this.B=0;this.Ra=[];this.C=[];this.j.setOnStateUpdated(this.aa.bind(this))}f=rj.prototype;f.cleanup=function(){this.j.cleanup()};f.push=function(a,b){var c=this;return sj(this,function(){return c.j.push(b).then(function(b){c.aa(b);a&&(c.Ra[b.stackIndex]=a);return b.stackIndex})},"push")};f.pop=function(a){var b=this;return sj(this,function(){return b.j.pop(a).then(function(a){b.aa(a)})},"pop")};
|
|
f.replace=function(a){var b=this;return sj(this,function(){return b.j.replace(a)},"replace")};f.get=function(){var a=this;return sj(this,function(){return a.j.get()},"get")};f.goBack=function(){var a=this;return sj(this,function(){return 0>=a.B?Promise.resolve():a.j.pop(a.B).then(function(b){a.aa(b)})},"goBack")};f.replaceStateForTarget=function(a){var b=this,c=this.D.win.location.hash;return this.push(function(){b.D.win.location.replace(c||"#")}).then(function(){b.j.replaceStateForTarget(a)})};
|
|
f.getFragment=function(){return this.j.getFragment()};f.updateFragment=function(a){"#"==a[0]&&(a=a.substr(1));return this.j.updateFragment(a)};f.aa=function(a){this.B=a.stackIndex;tj(this,a)};function tj(a,b){if(!(a.B>=a.Ra.length-1)){for(var c=[],d=a.Ra.length-1;d>a.B;d--)a.Ra[d]&&(c.push(a.Ra[d]),a.Ra[d]=void 0);a.Ra.splice(a.B+1);if(0<c.length)for(d={wb:0};d.wb<c.length;d={wb:d.wb},d.wb++)a.R.delay(function(a){return function(){return c[a.wb](b)}}(d),1)}}
|
|
function sj(a,b,c){var d=new N,e=d.promise,g=Error("history trace for "+c+": ");a.C.push({callback:b,resolve:d.resolve,reject:d.reject,trace:g});1==a.C.length&&uj(a);return e}function uj(a){if(0!=a.C.length){var b=a.C[0],c;try{c=b.callback()}catch(d){c=Promise.reject(d)}c.then(function(a){b.resolve(a)},function(a){E().error("History","failed to execute a task:",a);b.trace&&(b.trace.message+=a,E().error("History",b.trace));b.reject(a)}).then(function(){a.C.splice(0,1);uj(a)})}}
|
|
function vj(a){var b=this;this.win=a;this.R=R(a);a=this.win.history;this.Sa=a.length-1;a.state&&void 0!==a.state["AMP.History"]&&(this.Sa=Math.min(a.state["AMP.History"],this.Sa));this.B=this.Sa;this.aa=null;this.ph="state"in a;this.mb=wj(this,this.B);var c,d;a.pushState&&a.replaceState?(this.wc=a.originalPushState||a.pushState.bind(a),this.Fb=a.originalReplaceState||a.replaceState.bind(a),c=function(a,c,d){b.mb=a;b.wc(a,c,d||null)},d=function(a,c,d){b.mb=a;void 0!==d?b.Fb(a,c,d):b.Fb(a,c)},a.originalPushState||
|
|
(a.originalPushState=this.wc),a.originalReplaceState||(a.originalReplaceState=this.Fb)):(c=function(a){b.mb=a},d=function(a){b.mb=a});this.ah=c;this.Cc=d;try{this.Cc(wj(this,this.B,!0))}catch(e){E().error("History","Initial replaceState failed: "+e.message)}a.pushState=this.df.bind(this);a.replaceState=this.qd.bind(this);this.Ac=function(){var a=xj(b),c=a?a["AMP.History"]:void 0,d=b.B,k=b.Rc;b.Rc=void 0;d>b.win.history.length-2&&(d=b.win.history.length-2,b.za(yj(a,{stackIndex:d})));d=void 0==c?d+
|
|
1:c<b.win.history.length?c:b.win.history.length-1;a||(a={});a["AMP.History"]=d;b.Cc(a,void 0,void 0);d!=b.B&&b.za(yj(a,{stackIndex:d}));d<b.Sa&&(b.Sa=d);k&&k.resolve()};this.win.addEventListener("popstate",this.Ac)}f=vj.prototype;f.cleanup=function(){this.wc&&(this.win.history.pushState=this.wc);this.Fb&&(this.win.history.replaceState=this.Fb);this.win.removeEventListener("popstate",this.Ac)};function wj(a,b,c){a=G(c?xj(a):void 0);a["AMP.History"]=b;return a}
|
|
f.setOnStateUpdated=function(a){this.aa=a};f.push=function(a){var b=this;return Oj(this,function(){var c=yj(xj(b),a||{});b.df(c,void 0,c.fragment?"#"+c.fragment:void 0);return cc(function(){return yj(c,{stackIndex:b.B})})})};f.pop=function(a){var b=this;a=Math.max(a,this.Sa);return Oj(this,function(){return Pj(b,b.B-a+1)}).then(function(a){return yj(xj(b),{stackIndex:a})})};
|
|
f.replace=function(a){a=void 0===a?{}:a;var b=this;return Oj(this,function(){var c=yj(xj(b),a||{});b.qd(c,void 0,c.fragment?"#"+c.fragment:void 0);return cc(function(){return yj(c,{stackIndex:b.B})})})};f.get=function(){var a=this;return cc(function(){return yj(xj(a),{stackIndex:a.B})})};f.backTo=function(a){var b=this;a=Math.max(a,this.Sa);return Oj(this,function(){return Pj(b,b.B-a)})};function xj(a){return a.ph?a.win.history.state:a.mb}function Oj(a,b){return a.Rc?a.Rc.promise.then(b,b):b()}
|
|
function Qj(a){var b=new N,c=b.resolve,d=b.reject,b=a.R.timeoutPromise(500,b.promise);a.Rc={promise:b,resolve:c,reject:d};return b}function Pj(a,b){if(0>=b)return Promise.resolve(a.B);a.mb=wj(a,a.B-b);var c=Qj(a);a.win.history.go(-b);return c.then(function(){return Promise.resolve(a.B)})}f.df=function(a,b,c){a||(a={});var d=this.B+1;a["AMP.History"]=d;this.ah(a,b,c);d!=this.win.history.length-1&&(d=this.win.history.length-1,a["AMP.History"]=d,this.Cc(a));this.za(yj(a,{stackIndex:d}))};
|
|
f.replaceStateForTarget=function(a){var b=this;Oj(this,function(){b.win.removeEventListener("popstate",b.Ac);try{b.win.location.replace(a)}finally{b.win.addEventListener("popstate",b.Ac)}b.qd();return Promise.resolve()})};f.qd=function(a,b,c){a||(a={});var d=Math.min(this.B,this.win.history.length-1);a["AMP.History"]=d;this.Cc(a,b,c);this.za(yj(a,{stackIndex:d}))};f.za=function(a){a.stackIndex=Math.min(a.stackIndex,this.win.history.length-1);this.B!=a.stackIndex&&(this.B=a.stackIndex,this.aa&&this.aa(a))};
|
|
f.getFragment=function(){var a=this.win.location.hash,a=a.substr(1);return Promise.resolve(a)};f.updateFragment=function(a){return this.replace({fragment:a})};function yj(a,b){var c=Object.assign({},a&&a.data||{},b&&b.data||{});return Object.assign({},a,b,{data:c})}function Rj(a,b){this.win=a;this.h=b;this.B=0;this.aa=null;this.uh=this.h.onMessage("historyPopped",this.Rg.bind(this))}f=Rj.prototype;f.replaceStateForTarget=function(a){this.win.location.replace(a)};f.cleanup=function(){this.uh()};
|
|
f.setOnStateUpdated=function(a){this.aa=a};f.push=function(a){var b=this,c=Object.assign({stackIndex:this.B+1},a||{});return this.h.sendMessageAwaitResponse("pushHistory",c).then(function(a){a=a||c;b.za(a);return a})};f.pop=function(a){var b=this;if(a>this.B)return this.get();a=H({stackIndex:this.B});return this.h.sendMessageAwaitResponse("popHistory",a).then(function(a){a=a||H({stackIndex:b.B-1});b.za(a);return a})};
|
|
f.replace=function(a){var b=this,c=Object.assign({stackIndex:this.B},a||{});return this.h.sendMessageAwaitResponse("replaceHistory",c,!0).then(function(a){a=a||c;b.za(a);return a})};f.get=function(){return this.h.sendMessageAwaitResponse("getHistory",void 0,!0).then(function(a){return{fragment:a.fragment,stackIndex:a.stackIndex,data:a.data,title:a.title}})};f.Rg=function(a){this.za(a)};f.za=function(a){this.B!=a.stackIndex&&(this.B=a.stackIndex,this.aa&&this.aa(a))};
|
|
f.getFragment=function(){return this.h.hasCapability("fragment")?this.h.sendMessageAwaitResponse("getFragment",void 0,!0).then(function(a){if(!a)return"";"#"==a[0]&&(a=a.substr(1));return a}):Promise.resolve("")};f.updateFragment=function(a){return this.h.hasCapability("fragment")?this.h.sendMessageAwaitResponse("replaceHistory",H({fragment:a}),!0):Promise.resolve()};
|
|
function Sj(a){var b=T(a);b.isOvertakeHistory()||a.win.AMP_TEST_IFRAME?b=new Rj(a.win,b):(O(a.win,"global-history-binding",vj),b=Q(a.win,"global-history-binding"));return new rj(a,b)};function Tj(a){this.win=a;this.eg=this.Sg.bind(this);this.fg=this.Tg.bind(this);this.Zc=this.Fe=this.$c=null;this.od="ontouchstart"in a||void 0!==a.navigator.maxTouchPoints&&0<a.navigator.maxTouchPoints||void 0!==a.DocumentTouch;this.Bb=!1;this.win.document.addEventListener("keydown",this.eg);this.win.document.addEventListener("mousedown",this.fg);this.nd=!0;this.sf=0;this.rh=new Y;this.tf=new Y;this.Id=new Y;this.od&&(this.nd=!this.od,this.$c=this.Ug.bind(this),zd(a.document,"mousemove",this.$c))}
|
|
f=Tj.prototype;f.isTouchDetected=function(){return this.od};f.onTouchDetected=function(a,b){b&&a(this.isTouchDetected());return this.rh.add(a)};f.isMouseDetected=function(){return this.nd};f.onMouseDetected=function(a,b){b&&a(this.isMouseDetected());return this.tf.add(a)};f.isKeyboardActive=function(){return this.Bb};f.onKeyboardStateChanged=function(a,b){b&&a(this.isKeyboardActive());return this.Id.add(a)};
|
|
f.Sg=function(a){this.Bb||a.defaultPrevented||(a=a.target,a&&("INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"OPTION"==a.tagName||a.hasAttribute("contenteditable")))||(this.Bb=!0,this.Id.fire(!0))};f.Tg=function(){this.Bb&&(this.Bb=!1,this.Id.fire(!1))};
|
|
f.Ug=function(a){var b=this;if(a.sourceCapabilities&&a.sourceCapabilities.firesTouchEvents)this.rf();else{this.Zc||(this.Zc=this.Pg.bind(this),this.Fe=this.rf.bind(this));var c,d=Od(this.win.document,function(a){c=a});return R(this.win).timeoutPromise(300,d).then(this.Fe,function(){c&&c();b.Zc()})}};f.Pg=function(){this.nd=!0;this.tf.fire(!0)};f.rf=function(){this.sf++;3>=this.sf&&zd(this.win.document,"mousemove",this.$c)};function Uj(a){this.U=a.navigator}f=Uj.prototype;f.isAndroid=function(){return/Android/i.test(this.U.userAgent)};f.isIos=function(){return/iPhone|iPad|iPod/i.test(this.U.userAgent)};f.isSafari=function(){return/Safari/i.test(this.U.userAgent)&&!this.isChrome()&&!this.isIe()&&!this.isEdge()&&!this.isFirefox()&&!this.isOpera()};f.isChrome=function(){return/Chrome|CriOS/i.test(this.U.userAgent)&&!this.isEdge()&&!this.isOpera()};f.isFirefox=function(){return/Firefox|FxiOS/i.test(this.U.userAgent)&&!this.isEdge()};
|
|
f.isOpera=function(){return/OPR\/|Opera|OPiOS/i.test(this.U.userAgent)};f.isIe=function(){return/Trident|MSIE|IEMobile/i.test(this.U.userAgent)};f.isEdge=function(){return/Edge/i.test(this.U.userAgent)};f.isWebKit=function(){return/WebKit/i.test(this.U.userAgent)&&!this.isEdge()};f.isStandalone=function(){return this.isIos()&&this.U.standalone};f.isBot=function(){return/bot/i.test(this.U.userAgent)};
|
|
f.getMajorVersion=function(){return this.isSafari()?this.isIos()?this.getIosMajorVersion()||0:Vj(this,/\sVersion\/(\d+)/,1):this.isChrome()?Vj(this,/(Chrome|CriOS)\/(\d+)/,2):this.isFirefox()?Vj(this,/(Firefox|FxiOS)\/(\d+)/,2):this.isOpera()?Vj(this,/(OPR|Opera|OPiOS)\/(\d+)/,2):this.isIe()?Vj(this,/MSIE\s(\d+)/,1):this.isEdge()?Vj(this,/Edge\/(\d+)/,1):0};function Vj(a,b,c){if(!a.U.userAgent)return 0;a=a.U.userAgent.match(b);return!a||c>=a.length?0:parseInt(a[c],10)}
|
|
f.getIosVersionString=function(){if(!this.U.userAgent||!this.isIos())return"";var a=this.U.userAgent.match(/OS ([0-9]+[_.][0-9]+([_.][0-9]+)?)\b/);return a?a=a[1].replace(/_/g,"."):""};f.getIosMajorVersion=function(){var a=this.getIosVersionString();return""==a?null:Number(a.split(".")[0])};function Wj(a){this.F=a;this.Pf=Object.create(null)}Wj.prototype.addTransition=function(a,b,c){var d=a+"|"+b;this.Pf[d]=c};Wj.prototype.setState=function(a){var b=this.F;this.F=a;(a=this.Pf[b+"|"+a])&&a()};function Xj(a,b){var c=this;this.win=a;this.$g=b;this.N=[];this.uf=new Y;this.Pe=function(a){a.target&&1==a.target.nodeType&&Yj(c,a.target)};this.Oe=function(){R(a).delay(function(){Yj(c,c.win.document.activeElement)},500)};this.win.document.addEventListener("focus",this.Pe,!0);this.win.addEventListener("blur",this.Oe)}f=Xj.prototype;f.Ch=function(){this.win.document.removeEventListener("focus",this.Pe,!0);this.win.removeEventListener("blur",this.Oe)};f.onFocus=function(a){return this.uf.add(a)};
|
|
function Yj(a,b){var c=Date.now();0==a.N.length||a.N[a.N.length-1].el!=b?a.N.push({el:b,time:c}):a.N[a.N.length-1].time=c;a.purgeBefore(c-a.$g);a.uf.fire(b)}f.getLast=function(){return 0==this.N.length?null:this.N[this.N.length-1].el};f.purgeBefore=function(a){for(var b=this.N.length-1,c=0;c<this.N.length;c++)if(this.N[c].time>=a){b=c-1;break}-1!=b&&this.N.splice(0,b+1)};
|
|
f.hasDescendantsOf=function(a){this.win.document.activeElement&&Yj(this,this.win.document.activeElement);for(var b=0;b<this.N.length;b++)if(a.contains(this.N[b].el))return!0;return!1};function Zj(){this.I=[];this.Sb={};this.hf=this.jf=0}f=Zj.prototype;f.getSize=function(){return this.I.length};f.getLastEnqueueTime=function(){return this.jf};f.getLastDequeueTime=function(){return this.hf};f.getTaskById=function(a){return this.Sb[a]||null};f.enqueue=function(a){this.I.push(a);this.Sb[a.id]=a;this.jf=Date.now()};f.dequeue=function(a){var b=this.removeAtIndex(a,this.I.indexOf(this.Sb[a.id]));if(!b)return!1;this.hf=Date.now();return!0};
|
|
f.peek=function(a,b){for(var c=1E6,d=null,e=0;e<this.I.length;e++){var g=this.I[e],h=a(g,b);h<c&&(c=h,d=g)}return d};f.forEach=function(a){this.I.forEach(a)};f.removeAtIndex=function(a,b){var c=this.Sb[a.id];if(!c||this.I[b]!=c)return!1;this.I.splice(b,1);delete this.Sb[a.id];return!0};f.purge=function(a){for(var b=this.I.length;b--;)a(this.I[b])&&this.removeAtIndex(this.I[b],b)};function ak(a){var b;return!(b||rd(a)).isIe()||bk(a)?null:new Promise(function(b){var c=Date.now()+2E3,e=a.setInterval(function(){var d=Date.now(),h=bk(a);if(h||d>c)a.clearInterval(e),b(),h||E().error("ie-media-bug","IE media never resolved")},10)})}function bk(a){var b="(min-width: "+(a.innerWidth-1)+"px)"+(" AND (max-width: "+(a.innerWidth+1)+"px)");try{return a.matchMedia(b).matches}catch(c){return E().error("ie-media-bug","IE matchMedia failed: ",c),!0}};function ck(a){var b=this;this.ampdoc=a;this.win=a.win;this.h=T(a);this.na=this.h.isRuntimeOn();this.Dg=!1;this.pf=this.win.devicePixelRatio||1;this.hh=0;this.o=[];this.jg=this.we=0;this.la=this.h.isVisible();this.Fa=this.h.getPrerenderSize();this.rb=!1;this.Ye=!0;this.xe=!1;this.Da=-1;this.kb=!0;this.Mb=-1;this.Kd=this.lc=0;this.yc=new og(this.win,function(){return b.doPass()});this.Ff=new og(this.win,function(){b.kb=!0;b.schedulePass()});this.ua=new Zj;this.C=new Zj;this.H=L(this.win,"layers");
|
|
var c;this.Ge=c=this.H?this.lg.bind(this):this.mg.bind(this);this.ia=[];this.wa=[];this.zd=!1;this.G=ud(this.ampdoc);this.w=td(this.win);this.ue=new Xj(this.win,6E4);this.te=!1;this.Zb=0;this.fb=!1;this.Yf=new Wj(this.h.getVisibilityState());dk(this,this.Yf);this.G.onChanged(function(a){b.lc=Date.now();b.Kd=a.velocity;a.relayoutAll&&(b.kb=!0,b.fb=!0);b.schedulePass()});this.G.onScroll(function(){b.lc=Date.now()});this.H&&(this.cb=a=oc(this.ampdoc,"layers"),a.onScroll(function(){b.schedulePass()}),
|
|
this.dg=this.kg.bind(this));this.h.onVisibilityChanged(function(){-1==b.Da&&b.h.isVisible()&&(b.Da=Date.now());b.schedulePass()});this.h.onRuntimeState(function(a){b.na=a;b.schedulePass(1)});this.ue.onFocus(function(a){ek(b,a)});this.schedulePass();this.rebuildDomWhenReady()}f=ck.prototype;
|
|
f.rebuildDomWhenReady=function(){var a=this;this.ampdoc.whenReady().then(function(){function b(){return a.Ff.schedule()}a.rb=!0;fk(a);a.wa=null;var c=ak(a.win);c?c.then(b):b();gk(a);Promise.race([Pd(a.win),R(a.win).promise(3100)]).then(b);a.win.document.fonts&&"loaded"!=a.win.document.fonts.status&&a.win.document.fonts.ready.then(b)})};f.get=function(){return this.o.slice(0)};f.isRuntimeOn=function(){return this.na};f.renderStarted=function(){this.ampdoc.signals().signal("render-start")};
|
|
f.getMeasuredResources=function(a,b){var c=this;return this.ampdoc.signals().whenSignal("ready-scan").then(function(){var b=[];c.o.forEach(function(d){d.hasBeenMeasured()||d.hostWin!=a||d.hasOwner()||b.push(hk(c,d))});return Promise.all(b)}).then(function(){return c.o.filter(function(c){return c.hostWin==a&&!c.hasOwner()&&c.hasBeenMeasured()&&b(c)})})};
|
|
f.getResourcesInRect=function(a,b,c){return this.getMeasuredResources(a,function(a){return!a.isDisplayed()||!a.overlaps(b)&&!a.isFixed()||c&&!a.prerenderAllowed()?!1:!0})};function gk(a){var b=Q(a.win,"input");b.onTouchDetected(function(b){ik(a,"amp-mode-touch",b)},!0);b.onMouseDetected(function(b){ik(a,"amp-mode-mouse",b)},!0);b.onKeyboardStateChanged(function(b){ik(a,"amp-mode-keyboard-active",b)},!0)}
|
|
function ik(a,b,c){a.ampdoc.whenBodyAvailable().then(function(d){a.w.mutate(function(){d.classList.toggle(b,c)})})}f.getMaxDpr=function(){return this.pf};f.getDpr=function(){return this.pf};f.getResourceForElement=function(a){return Z(a)};f.getResourceForElementOptional=function(a){return Z(a)};f.getElementLayoutBox=function(a){var b=this,c=this.getResourceForElementOptional(a);return c?hk(this,c):this.w.measurePromise(function(){return b.getViewport().getLayoutRect(a)})};
|
|
function hk(a,b){return b.hasBeenMeasured()?cc(function(){return b.getPageLayoutBox()}):a.w.measurePromise(function(){b.measure();return b.getPageLayoutBox()})}f.getViewport=function(){return this.G};f.getScrollDirection=function(){return Math.sign(this.Kd)||1};f.add=function(a){this.we++;1==this.we&&this.G.ensureReadyForElements();var b=Z(a);b&&0!=b.getState()&&!a.reconstructWhenReparented()?b.requestMeasure():b=new Rh(++this.hh,a,this);this.o.push(b);this.Ff.schedule(1E3)};
|
|
f.grantBuildPermission=function(){return 20>this.jg++||this.h.hasBeenVisible()};function jk(a,b,c){var d;c=void 0===c?!1:c;d=void 0===d?!0:d;var e=a.na||a.Dg,g="prerender"!=a.h.getVisibilityState()||b.prerenderAllowed();e&&g&&(a.rb?kk(a,b,d):b.isBuilt()||b.isBuilding()||c&&a.wa.includes(b)||(a.wa.push(b),fk(a,d)))}
|
|
function fk(a,b){if(!a.zd)try{a.zd=!0;b=void 0===b?!0:b;b=void 0===b?!0:b;for(var c=0;c<a.wa.length;c++){var d=a.wa[c],e;if(!(e=a.rb))a:{var g=a.ampdoc.getRootNode(),h=d.element;do if(h.nextSibling){e=!0;break a}while((h=h.parentNode)&&h!=g);e=!1}e&&(a.wa.splice(c--,1),kk(a,d,b))}}finally{a.zd=!1}}function kk(a,b,c){var d=b.build();d&&c&&d.then(function(){return a.schedulePass()},function(c){lk(a,b);if(!ze(c))throw c;})}f.remove=function(a){(a=Z(a))&&lk(this,a)};
|
|
function lk(a,b,c){var d=a.o.indexOf(b);-1!=d&&a.o.splice(d,1);b.isBuilt()&&(b.pauseOnRemove(),c&&b.disconnect());mk(a,b,!0)}f.removeForChildWindow=function(a){var b=this,c=this.o.filter(function(b){return b.hostWin==a});c.forEach(function(a){return lk(b,a,!0)})};f.upgraded=function(a){a=Z(a);jk(this,a)};f.setOwner=function(a,b){b.contains(a);Z(a)&&Z(a).updateOwner(b);a.__AMP__OWNER=b;a=a.getElementsByClassName("i-amphtml-element");for(b=0;b<a.length;b++){var c=a[b];Z(c)&&Z(c).updateOwner(void 0)}};
|
|
f.requireLayout=function(a,b){var c=this,d=[];nk(this,a,function(a){4!=a.getState()&&(3!=a.getState()?d.push(a.whenBuilt().then(function(){a.measure();if(a.isDisplayed())return ok(c,a,!0,b,!0),a.loadedOnce()})):a.isDisplayed()&&d.push(a.loadedOnce()))});return Promise.all(d)};f.scheduleLayout=function(a,b){pk(this,Z(a),!0,qk(b))};f.schedulePause=function(a,b){var c=Z(a);b=qk(b);rk(this,c,b,function(a){a.pause()})};f.scheduleResume=function(a,b){a=Z(a);b=qk(b);rk(this,a,b,function(a){a.resume()})};
|
|
f.scheduleUnlayout=function(a,b){a=Z(a);b=qk(b);rk(this,a,b,function(a){a.unlayout()})};f.schedulePreload=function(a,b){pk(this,Z(a),!1,qk(b))};f.updateLayoutPriority=function(a,b){var c=Z(a);c.updateLayoutPriority(b);this.C.forEach(function(a){a.resource==c&&(a.priority=b)});this.schedulePass()};f.updateInViewport=function(a,b,c){sk(this,Z(a),qk(b),c)};f.changeSize=function(a,b,c,d,e){tk(this,Z(a),b,c,e,!0,d)};
|
|
f.attemptChangeSize=function(a,b,c,d){var e=this;return new Promise(function(g,h){tk(e,Z(a),b,c,d,!1,function(a){a?g():h(Error("changeSize attempt denied"))})})};f.measureElement=function(a){return this.w.measurePromise(a)};f.mutateElement=function(a,b){return this.measureMutateElement(a,null,b)};f.measureMutateElement=function(a,b,c){return this.H?uk(this,a,b,c):vk(this,a,b,c)};
|
|
function vk(a,b,c,d){function e(){var c=a.G.getLayoutRect(b);return 0!=c.width&&0!=c.height?c.top:-1}var g=-1;return a.w.runPromise({measure:function(){c&&c();g=e()},mutate:function(){d();b.classList.contains("i-amphtml-element")&&Z(b).requestMeasure();for(var c=b.getElementsByClassName("i-amphtml-element"),k=0;k<c.length;k++)Z(c[k]).requestMeasure();-1!=g&&wk(a,g);a.schedulePass(70);a.w.measure(function(){var b=e();-1!=b&&b!=g&&(wk(a,b),a.schedulePass(70));a.fb=!0})}})}
|
|
function uk(a,b,c,d){return a.w.runPromise({measure:c||void 0,mutate:function(){d();a.dirtyElement(b)}})}f.dirtyElement=function(a){if(this.H)this.cb.dirty(a);else{var b=a.classList.contains("i-amphtml-element");b&&(a=Z(a),wk(this,a.getLayoutBox().top));this.schedulePass(70,!b)}};f.attemptCollapse=function(a){var b=this;return new Promise(function(c,d){tk(b,Z(a),0,0,void 0,!1,function(b){b?(Z(a).completeCollapse(),c()):d(Error("collapse attempt denied"))})})};
|
|
f.collapseElement=function(a){var b=this.G.getLayoutRect(a);a=Z(a);0!=b.width&&0!=b.height&&wk(this,b.top);a.completeCollapse();this.schedulePass(70)};f.expandElement=function(a){var b=Z(a);b.completeExpand();(b=b.getOwner())&&b.expandedCallback(a);this.schedulePass(70)};f.schedulePass=function(a,b){b&&(this.kb=!0);return this.yc.schedule(a)};f.schedulePassVsync=function(){var a=this;this.te||(this.te=!0,this.w.mutate(function(){return a.doPass()}))};f.ampInitComplete=function(){this.xe=!0;this.schedulePass()};
|
|
f.doPass=function(){var a=this;if(this.na){this.la=this.h.isVisible();this.Fa=this.h.getPrerenderSize();var b=this.rb&&this.Ye;if(b){this.Ye=!1;var c=this.win.document,d=od(this.ampdoc);this.h.sendMessage("documentLoaded",H({title:c.title,sourceUrl:nb(this.ampdoc.getUrl()),serverLayout:c.documentElement.hasAttribute("i-amphtml-element"),linkRels:d.linkRels,metaTags:d.metaTags}),!0);this.Zb=this.G.getContentHeight();this.h.sendMessage("documentHeight",H({height:this.Zb}),!0)}var e=this.G.getSize();
|
|
this.yc.cancel();this.te=!1;this.Yf.setState(this.h.getVisibilityState());this.rb&&this.xe&&!this.ampdoc.signals().get("ready-scan")&&this.ampdoc.signals().signal("ready-scan");this.fb&&(this.fb=!1,this.w.measure(function(){var b=a.G.getContentHeight();b!=a.Zb&&(a.h.sendMessage("documentHeight",H({height:b}),!0),a.Zb=b)}))}};
|
|
function xk(a){var b=Date.now(),c=a.G.getRect(),d=c.height/10,e=c.height/10,g=.01>Math.abs(a.Kd)&&500<b-a.lc||1E3<b-a.lc;if(0<a.ia.length){var h=a.ia;a.ia=[];for(var k=-1,l=[],n=0,b=0;b<h.length;b++){var m=h[b],q=m.resource,t=q.getLayoutBox(),y=0,v=0,A=0,D=0,z=t,B=z.top,x=z.bottom,u=void 0;m.marginChange&&(u=m.marginChange.newMargins,z=m.marginChange.currentMargins,void 0!=u.top&&(y=u.top-z.top),void 0!=u.bottom&&(v=u.bottom-z.bottom),void 0!=u.left&&(A=u.left-z.left),void 0!=u.right&&(D=u.right-
|
|
z.right),y&&(B=t.top-z.top),v&&(x=t.bottom+z.bottom));var J=m.newHeight-t.height,ha=m.newWidth-t.width,S=!1;if(0!=J||0!=y||0!=v||0!=ha||0!=A||0!=D)if(m.force||!a.la)S=!0;else if(a.ue.hasDescendantsOf(q.element))S=!0;else if(B>=c.bottom-e||0==y&&t.bottom+Math.min(J,0)>=c.bottom-e)S=!0;else if(1<c.top&&x<=c.top+d){if(0>J&&c.top+n<-J)continue;g?(n+=J,l.push(m)):a.ia.push(m);continue}else yk(a,q,t)?S=!0:0>J||0>y||0>v||m.resource.overflowCallback(!0,m.newHeight,m.newWidth,u);S&&(0<=t.top&&(k=-1==k?t.top:
|
|
Math.min(k,t.top)),m.resource.changeSize(m.newHeight,m.newWidth,u),m.resource.overflowCallback(!1,m.newHeight,m.newWidth,u),a.fb=!0);m.callback&&m.callback(S)}-1!=k&&wk(a,k);0<l.length&&a.w.run({measure:function(b){b.scrollHeight=a.G.getScrollHeight();b.scrollTop=a.G.getScrollTop()},mutate:function(b){var c=-1;l.forEach(function(a){var b=a.resource.getLayoutBox();c=-1==c?b.top:Math.min(c,b.top);a.resource.changeSize(a.newHeight,a.newWidth,a.marginChange?a.marginChange.newMargins:void 0);a.callback&&
|
|
a.callback(!0)});-1!=c&&wk(a,c);var d=a.G.getScrollHeight();d!=b.scrollHeight&&a.G.setScrollTop(b.scrollTop+(d-b.scrollHeight));a.fb=!0}},{})}}function yk(a,b,c){var d,e=a.G.getContentHeight();a=Math.max(.85*e,e-1E3);var g=c||b.getLayoutBox(),h=d||b.getInitialLayoutBox();return g.bottom>=a||h.bottom>=a}function wk(a,b){a.H?a.kb=!0:a.Mb=-1==a.Mb?b:Math.min(b,a.Mb)}
|
|
function ek(a,b){var c=Tc(b,function(a){return!!Z(a)});if(c){b=Z(c);var d=b.getPendingChangeSize();void 0!==d&&tk(a,b,d.height,d.width,d.margins,!0)}}
|
|
function zk(a){var b=Date.now(),c=a.kb;a.kb=!1;var d=a.Mb;a.Mb=-1;for(var e=0,g=0,h=0;h<a.o.length;h++){var k=a.o[h];0!=k.getState()||k.isBuilding()||jk(a,k,!0);if(c||!k.hasBeenMeasured()||1==k.getState())k.applySizesAndMediaQuery(),e++;k.isMeasureRequested()&&g++}var l;if(0<e||0<g||c||-1!=d)for(h=0;h<a.o.length;h++)if(k=a.o[h],!k.hasOwner()||k.isMeasureRequested())if(c||1==k.getState()||!k.hasBeenMeasured()||k.isMeasureRequested()||-1!=d&&k.getLayoutBox().bottom>=d){var n=k.isDisplayed();k.measure();
|
|
n&&!k.isDisplayed()&&(l||(l=[]),l.push(k))}l&&a.w.mutate(function(){l.forEach(function(b){b.unload();mk(a,b)})});var d=a.G.getRect(),m;m=a.la?Ge(d,.25,2):0<a.Fa?Ge(d,0,a.Fa-1):null;for(var q=a.la?Ge(d,.25,.25):d,d=0;d<a.o.length;d++)if(h=a.o[d],0!=h.getState()&&!h.hasOwner()){var t=a.la&&h.isDisplayed()&&h.overlaps(q);h.setInViewport(t)}if(m)for(d=0;d<a.o.length;d++)h=a.o[d],2!=h.getState()||h.hasOwner()||h.isDisplayed()&&h.overlaps(m)&&ok(a,h,!0);if(a.la&&0==a.ua.getSize()&&0==a.C.getSize()&&b>a.ua.getLastDequeueTime()+
|
|
5E3){for(var y=0,b=0;b<a.o.length&&4>y;b++)d=a.o[b],2==d.getState()&&!d.hasOwner()&&d.isDisplayed()&&d.idleRenderOutsideViewport()&&(ok(a,d,!1),y++);for(b=0;b<a.o.length&&4>y;b++)d=a.o[b],2==d.getState()&&!d.hasOwner()&&d.isDisplayed()&&(ok(a,d,!1),y++)}}f.mg=function(a){var b=this.G.getRect(),c=a.resource.getLayoutBox(),d=Math.floor((c.top-b.top)/b.height);Math.sign(d)!=this.getScrollDirection()&&(d*=2);d=Math.abs(d);return 10*a.priority+d};
|
|
f.lg=function(a,b){var c=this.cb.iterateAncestry(a.resource.element,this.dg,b);return 10*a.priority+c};f.kg=function(a,b,c,d){var e=b.getId();if(Ea.call(d,e))return d[e];a=a||0;c=1+c/10;var g=b.isActiveUnsafe()?1:2;b=b.getHorizontalDistanceFromParent()+b.getVerticalDistanceFromParent();return d[e]=a+g*c*b};
|
|
function Ak(a,b){var c=Date.now();if(0==a.ua.getSize()){if(-1===a.Da)return 0;var d=1E3*b.priority;return Math.max(d-(c-a.Da),0)}var e=0;a.ua.forEach(function(a){e=Math.max(e,Math.max(1E3*(b.priority-a.priority),0)-(c-a.startTime))});return e}f.eh=function(a){this.C.getTaskById(a.id)||this.C.enqueue(a)};f.Lf=function(a,b,c){this.ua.dequeue(a);this.schedulePass(1E3);if(!b)return E().info("Resources","task failed:",a.id,a.resource.debugid,c),Promise.reject(c)};
|
|
function tk(a,b,c,d,e,g,h){b.hasBeenMeasured()&&!e?Bk(a,b,c,d,void 0,g,h):a.w.measure(function(){b.hasBeenMeasured()||b.measure();var k;e?(k=he(a.win,b.element),k={newMargins:e,currentMargins:{top:parseInt(k.marginTop,10)||0,right:parseInt(k.marginRight,10)||0,bottom:parseInt(k.marginBottom,10)||0,left:parseInt(k.marginLeft,10)||0}}):k=void 0;var l=k;Bk(a,b,c,d,l,g,h)})}
|
|
function Bk(a,b,c,d,e,g,h){b.resetPendingChangeSize();var k=b.getPageLayoutBox();if(!(k=void 0!==c&&c!=k.height||void 0!==d&&d!=k.width)&&(k=void 0!==e))var k=e.currentMargins,l=e.newMargins,k=void 0!==l.top&&l.top!=k.top||void 0!==l.right&&l.right!=k.right||void 0!==l.bottom&&l.bottom!=k.bottom||void 0!==l.left&&l.left!=k.left;if(k){k=null;for(l=0;l<a.ia.length;l++)if(a.ia[l].resource==b){k=a.ia[l];break}k?(k.newHeight=c,k.newWidth=d,k.marginChange=e,k.force=g||k.force,k.callback=h):a.ia.push({resource:b,
|
|
newHeight:c,newWidth:d,marginChange:e,force:g,callback:h});a.schedulePassVsync()}else void 0===c&&void 0===d&&void 0===e&&E().error("Resources","attempting to change size with undefined dimensions",b.debugid),h&&h(!0)}function Ck(a,b,c){return 0!=b.getState()&&b.isDisplayed()&&(a.la||"prerender"==a.h.getVisibilityState()&&b.prerenderAllowed())&&(c||b.isInViewport()||b.renderOutsideViewport()||b.idleRenderOutsideViewport())?!0:!1}
|
|
function ok(a,b,c,d,e){0!=b.getState()&&b.isDisplayed();var g=e||!1;Ck(a,b,g)&&(c?a.Pa(b,"L",0,d||0,g,b.startLayout.bind(b)):a.Pa(b,"P",2,d||0,g,b.startLayout.bind(b)))}function pk(a,b,c,d){rk(a,b,d,function(d){0==d.getState()?d.whenBuilt().then(function(){Dk(a,d,c,b.getLayoutPriority())}):Dk(a,d,c,b.getLayoutPriority())})}function Dk(a,b,c,d){b.measure();2==b.getState()&&b.isDisplayed()&&ok(a,b,c,d)}
|
|
f.Pa=function(a,b,c,d,e,g){b=a.getTaskId(b);a={id:b,resource:a,priority:Math.max(a.getLayoutPriority(),d)+c,forceOutsideViewport:e,callback:g,scheduleTime:Date.now(),startTime:0,promise:null};var h=this.C.getTaskById(b);if(!h||a.priority<h.priority)h&&this.C.dequeue(h),this.C.enqueue(a),this.schedulePass(Ak(this,a));a.resource.layoutScheduled(a.scheduleTime)};function sk(a,b,c,d){var e=b.isInViewport()&&d;rk(a,b,c,function(a){a.setInViewport(e)})}
|
|
function rk(a,b,c,d){c.forEach(function(c){b.element.contains(c);nk(a,c,d)})}function nk(a,b,c){if(b.classList.contains("i-amphtml-element"))c(Z(b)),(b=b.getPlaceholder())&&nk(a,b,c);else{a=b.getElementsByClassName("i-amphtml-element");b=[];for(var d=0;d<a.length;d++){for(var e=a[d],g=!1,h=0;h<b.length;h++)if(b[h].contains(e)){g=!0;break}g||(b.push(e),c(Z(e)))}}}
|
|
function dk(a,b){function c(){a.o.forEach(function(a){return a.resume()});h()}function d(){a.o.forEach(function(b){b.unload();mk(a,b)});a.unselectText()}function e(){a.o.forEach(function(a){return a.pause()})}function g(){}function h(){var b=a.G.getSize();if(0<b.height&&0<b.width){0<a.ia.length&&xk(a);zk(a);for(var b=Date.now(),c=-1,d=Object.create(null),e=a.C.peek(a.Ge,d);e;){c=Ak(a,e);if(16<c)break;a.C.dequeue(e);(c=a.ua.getTaskById(e.id))?(e=a.eh.bind(a,e),c.promise.then(e,e)):(e.resource.measure(),
|
|
Ck(a,e.resource,e.forceOutsideViewport)?(e.promise=e.callback(),e.startTime=b,a.ua.enqueue(e),e.promise.then(a.Lf.bind(a,e,!0),a.Lf.bind(a,e,!1)).catch(xe)):e.resource.layoutCanceled());e=a.C.peek(a.Ge,d);c=-1}0<=c?b=c:(b=2*(b-a.ua.getLastDequeueTime()),b=Math.max(Math.min(3E4,b),5E3));0<a.ia.length&&(b=Math.min(b,500));a.la&&a.schedulePass(b)}}var k="prerender",l="hidden",n="paused",m="inactive";b.addTransition(k,k,h);b.addTransition(k,"visible",h);b.addTransition(k,l,h);b.addTransition(k,m,h);b.addTransition(k,
|
|
n,h);b.addTransition("visible","visible",h);b.addTransition("visible",l,h);b.addTransition("visible",m,d);b.addTransition("visible",n,e);b.addTransition(l,"visible",h);b.addTransition(l,l,h);b.addTransition(l,m,d);b.addTransition(l,n,e);b.addTransition(m,"visible",c);b.addTransition(m,l,c);b.addTransition(m,m,g);b.addTransition(m,n,h);b.addTransition(n,"visible",c);b.addTransition(n,l,h);b.addTransition(n,m,d);b.addTransition(n,n,g)}f.unselectText=function(){try{this.win.getSelection().removeAllRanges()}catch(a){}};
|
|
function mk(a,b,c){1==b.getState()&&(a.C.purge(function(a){return a.resource==b}),a.ua.purge(function(a){return a.resource==b}),Ke(a.ia,function(a){return a.resource!=b}));if(0==b.getState()&&c&&a.wa){var d=a.wa.indexOf(b);-1!=d&&a.wa.splice(d,1)}}function qk(a){return la(a)?a:[a]};function Ek(a){return"none"==ee(a)||a.hasAttribute("hidden")}var Fk=["top","bottom","center"];function Gk(a){this.ampdoc=a;this.Zf=dc(a,"action",!0);this.o=sd(a);this.G=ud(a);Hk(this,this.Zf)}f=Gk.prototype;f.adoptEmbedWindow=function(a){Hk(this,dc(a.document,"action",!0))};
|
|
function Hk(a,b){b.addGlobalTarget("AMP",a.handleAmpTarget.bind(a));b.addGlobalMethodHandler("hide",a.handleHide.bind(a));b.addGlobalMethodHandler("show",a.handleShow.bind(a));b.addGlobalMethodHandler("toggleVisibility",a.handleToggle.bind(a));b.addGlobalMethodHandler("scrollTo",a.handleScrollTo.bind(a));b.addGlobalMethodHandler("focus",a.handleFocus.bind(a));b.addGlobalMethodHandler("toggleClass",a.handleToggleClass.bind(a))}
|
|
f.handleAmpTarget=function(a){var b=this;if(!a.satisfiesTrust(100))return null;var c=a.node,d=a.caller,e=a.method,g=a.args,h=(c.ownerDocument||c).defaultView;switch(e){case "pushState":case "setState":return d=lc(c),ld(d).then(function(b){C().assert(b,"AMP-BIND is not installed.");return b.invoke(a)});case "navigateTo":return c=Promise.resolve(),I(d.tagName,"AMP-")&&(c=d.getImpl().then(function(a){"function"==typeof a.throwIfCannotNavigate&&a.throwIfCannotNavigate()})),c.then(function(){oc(b.ampdoc,
|
|
"navigation").navigateTo(h,g.url,"AMP."+e)},function(a){C().error("STANDARD-ACTIONS",a.message)});case "goBack":return oc(this.ampdoc,"history").goBack(),null;case "print":return h.print(),null;case "optoutOfCid":return pc(this.ampdoc,"cid").then(function(a){return a.optOut()}).catch(function(a){E().error("STANDARD-ACTIONS","Failed to opt out of CID",a)})}throw C().createError("Unknown AMP action ",e);};
|
|
f.handleScrollTo=function(a){if(!a.satisfiesTrust(100))return null;var b=a.node,c=a.args&&a.args.duration&&0<=a.args.duration?a.args.duration:500;a=a.args&&a.args.position&&Fk.includes(a.args.position)?a.args.position:"top";this.G.animateScrollIntoView(b,c,"ease-in",a);return null};f.handleFocus=function(a){if(!a.satisfiesTrust(100))return null;try{a.node.focus()}catch(b){}return null};
|
|
f.handleHide=function(a){var b=a.node;this.o.mutateElement(b,function(){b.classList.contains("i-amphtml-element")?b.collapse():ge(b,!1)});return null};
|
|
f.handleShow=function(a){var b=a.node,c=b.ownerDocument.defaultView;if(b.classList.contains("i-amphtml-layout-nodisplay"))return C().warn("STANDARD-ACTIONS","Elements with layout=nodisplay cannot be dynamically shown.",b),null;td(c).measure(function(){"none"!=he(c,b).display||Ek(b)||C().warn("STANDARD-ACTIONS",'Elements can only be dynamically shown when they have the "hidden" attribute set or when they were dynamically hidden.',b)});this.o.mutateElement(b,function(){b.classList.contains("i-amphtml-element")?
|
|
b.expand():(ge(b,!0),b.removeAttribute("hidden"))});return null};f.handleToggle=function(a){return Ek(a.node)?this.handleShow(a):this.handleHide(a)};f.handleToggleClass=function(a){if(!a.satisfiesTrust(100))return null;var b=a.node,c=a.args,d=C().assertString(c["class"],"Argument 'class' must be a string.");this.o.mutateElement(b,function(){if(void 0!==c.force){var a=C().assertBoolean(c.force,"Optional argument 'force' must be a boolean.");b.classList.toggle(d,a)}else b.classList.toggle(d)});return null};function Ik(a,b,c){this.ampdoc=a;this.h=b;this.j=c;this.xc=ob(this.ampdoc.win.location);this.Gc=null}Ik.prototype.get=function(a){return Jk(this).then(function(b){return b.get(a)})};Ik.prototype.set=function(a,b){return Kk(this,function(c){return c.set(a,b)})};Ik.prototype.remove=function(a){return Kk(this,function(b){return b.remove(a)})};
|
|
function Jk(a){a.Gc||(a.Gc=a.j.loadBlob(a.xc).then(function(a){return a?Yd(atob(a)):{}}).catch(function(a){E().expectedError("Storage","Failed to load store: ",a);return{}}).then(function(a){return new Lk(a)}));return a.Gc}function Kk(a,b){return Jk(a).then(function(c){b(c);c=btoa(JSON.stringify(c.obj));return a.j.saveBlob(a.xc,c)}).then(a.ig.bind(a))}function Mk(a){a.h.onBroadcast(function(b){"amp-storage-reset"==b.type&&b.origin==a.xc&&(a.Gc=null)})}
|
|
Ik.prototype.ig=function(){this.h.broadcast({type:"amp-storage-reset",origin:this.xc})};function Lk(a,b){this.obj=Wd(a);this.Og=b||8;this.Aa=this.obj.vv||Object.create(null);this.obj.vv||(this.obj.vv=this.Aa)}Lk.prototype.get=function(a){return(a=this.Aa[a])?a.v:void 0};
|
|
Lk.prototype.set=function(a,b){void 0!==this.Aa[a]?(a=this.Aa[a],a.v=b,a.t=Date.now()):this.Aa[a]=H({v:b,t:Date.now()});b=Object.keys(this.Aa);if(b.length>this.Og){var c=Infinity,d=null;for(a=0;a<b.length;a++){var e=this.Aa[b[a]];e.t<c&&(d=b[a],c=e.t)}d&&delete this.Aa[d]}};Lk.prototype.remove=function(a){delete this.Aa[a]};
|
|
function Nk(a){this.win=a;var b;try{"localStorage"in this.win?(this.win.localStorage.getItem("test"),b=!0):b=!1}catch(c){b=!1}this.Cd=b;this.Cd||(a=Error("localStorage not supported."),E().expectedError("Storage",a))}Nk.prototype.loadBlob=function(a){var b=this;return new Promise(function(c){b.Cd?c(b.win.localStorage.getItem("amp-store:"+a)):c(null)})};Nk.prototype.saveBlob=function(a,b){var c=this;return new Promise(function(d){c.Cd&&c.win.localStorage.setItem("amp-store:"+a,b);d()})};
|
|
function Ok(a){this.h=a}Ok.prototype.loadBlob=function(a){return this.h.sendMessageAwaitResponse("loadStore",H({origin:a})).then(function(a){return a.blob})};Ok.prototype.saveBlob=function(a,b){return this.h.sendMessageAwaitResponse("saveStore",H({origin:a,blob:b}))};function Pk(a){P(a,"storage",function(){var b=T(a),c=parseInt(b.getParam("storage"),10),d=c?new Ok(b):new Nk(a.win),b=new Ik(a,b,d);Mk(b);return b},!0)};function Qk(a){this.win=a;this.gh=Promise.resolve();this.qh=0;this.ed={};this.ke=Date.now()}f=Qk.prototype;f.timeSinceStart=function(){return Date.now()-this.ke};f.delay=function(a,b){var c=this;if(!b){var d="p"+this.qh++;this.gh.then(function(){c.ed[d]?delete c.ed[d]:a()}).catch(xe);return d}return this.win.setTimeout(function(){try{a()}catch(e){throw xe(e),e;}},b)};f.cancel=function(a){"string"==typeof a?this.ed[a]=!0:this.win.clearTimeout(a)};
|
|
f.promise=function(a){var b=this;return new Promise(function(c){var d=b.delay(c,a);if(-1==d)throw Error("Failed to schedule timer.");})};f.timeoutPromise=function(a,b,c){function d(){e.cancel(g)}var e=this,g,h=new Promise(function(b,d){g=e.delay(function(){d(C().createError(c||"timeout"))},a);if(-1==g)throw Error("Failed to schedule timer.");});if(!b)return h;b.then(d,d);return Promise.race([h,b])};
|
|
f.poll=function(a,b){var c=this;return new Promise(function(d){var e=c.win.setInterval(function(){b()&&(c.win.clearInterval(e),d())},a)})};function Rk(a,b){this.D=a;a=b||a.getRootNode();this.ag=(a.ownerDocument||a).createElement("a");this.Wa=new Ma(100)}f=Rk.prototype;f.adoptEmbedWindow=function(a){gc(a,"url",new Rk(this.D,a.document))};f.parse=function(a,b){return Xa(this.ag,a,b?null:this.Wa)};f.isProtocolValid=function(a){return kb(a)};f.getSourceOrigin=function(a){return ob(a)};f.assertHttpsUrl=function(a,b,c){return hb(a,b,void 0===c?"source":c)};
|
|
f.assertAbsoluteHttpOrHttpsUrl=function(a){C().assert(/^https?\:/i.test(a),'URL must start with "http://" or "https://". Invalid value: %s',a);return K(a).href};f.isProxyOrigin=function(a){return jb(a)};f.isSecure=function(a){return ab(this.parse(a))};f.getWinOrigin=function(a){return a.origin||this.parse(a.location.href).origin};function Sk(a,b,c,d){var e=new Tk(0,0,a,b,c,d,1,1);return e.solveYValueFromXValue.bind(e)}function Tk(a,b,c,d,e,g,h,k){this.x0=a;this.y0=b;this.x1=c;this.y1=d;this.x2=e;this.y2=g;this.x3=h;this.y3=k}f=Tk.prototype;f.solveYValueFromXValue=function(a){return this.getPointY(this.solvePositionFromXValue(a))};
|
|
f.solvePositionFromXValue=function(a){var b=1E-6,c=(a-this.x0)/(this.x3-this.x0);if(0>=c)return 0;if(1<=c)return 1;for(var d=0,e=1,g=0,h=0;8>h;h++){var g=this.getPointX(c),k=(this.getPointX(c+b)-g)/b;if(Math.abs(g-a)<b)return c;if(Math.abs(k)<b)break;else g<a?d=c:e=c,c-=(g-a)/k}for(h=0;Math.abs(g-a)>b&&8>h;h++)g<a?(d=c,c=(c+e)/2):(e=c,c=(c+d)/2),g=this.getPointX(c);return c};
|
|
f.getPointX=function(a){if(0==a)return this.x0;if(1==a)return this.x3;var b=this.lerp(this.x0,this.x1,a),c=this.lerp(this.x1,this.x2,a),d=this.lerp(this.x2,this.x3,a),b=this.lerp(b,c,a),c=this.lerp(c,d,a);return this.lerp(b,c,a)};f.getPointY=function(a){if(0==a)return this.y0;if(1==a)return this.y3;var b=this.lerp(this.y0,this.y1,a),c=this.lerp(this.y1,this.y2,a),d=this.lerp(this.y2,this.y3,a),b=this.lerp(b,c,a),c=this.lerp(c,d,a);return this.lerp(b,c,a)};f.lerp=function(a,b,c){return a+c*(b-a)};
|
|
var Uk=Sk(.25,.1,.25,1),Vk=Sk(.42,0,1,1),Wk=Sk(0,0,.58,1),Xk=Sk(.42,0,.58,1),Yk={linear:function(a){return a},ease:Uk,"ease-in":Vk,"ease-out":Wk,"ease-in-out":Xk};function Zk(a){if(!a)return null;if("string"==typeof a){if(-1!=a.indexOf("cubic-bezier")){var b=a.match(/cubic-bezier\((.+)\)/);if(b&&(b=b[1].split(",").map(parseFloat),4==b.length)){for(var c=0;4>c;c++)if(isNaN(b[c]))return null;return Sk(b[0],b[1],b[2],b[3])}return null}return Yk[a]}return a};function $k(){}function al(a,b){this.pb=a;this.w=b||td(self);this.Re=null;this.Y=[]}function bl(a,b,c,d){return(new al(a)).setCurve(d).add(0,b,1).start(c)}al.prototype.setCurve=function(a){a&&(this.Re=Zk(a));return this};al.prototype.add=function(a,b,c,d){this.Y.push({delay:a,func:b,duration:c,curve:Zk(d)});return this};al.prototype.start=function(a){var b=new cl(this.w,this.pb,this.Y,this.Re,a);return b};
|
|
function cl(a,b,c,d,e){this.w=a;this.pb=b;this.Y=[];for(b=0;b<c.length;b++){var g=c[b];this.Y.push({delay:g.delay,func:g.func,duration:g.duration,curve:g.curve||d,started:!1,completed:!1})}this.tg=e;this.ke=Date.now();this.Oa=!0;this.F={};e=new N;this.Af=e.promise;this.fh=e.resolve;this.dh=e.reject;this.Mf=this.w.createAnimTask(this.pb,{mutate:this.oh.bind(this)});this.w.canAnimate(this.pb)?this.Mf(this.F):(E().warn("Animation","cannot animate"),this.Ya(!1,0))}f=cl.prototype;
|
|
f.then=function(a,b){return a||b?this.Af.then(a,b):this.Af};f.thenAlways=function(a){a=a||$k;return this.then(a,a)};f.halt=function(a){this.Ya(!1,a||0)};f.Ya=function(a,b){if(this.Oa){this.Oa=!1;if(0!=b){1<this.Y.length&&this.Y.sort(function(a,b){return a.delay+a.duration-(b.delay+b.duration)});try{if(0<b)for(b=0;b<this.Y.length;b++)this.Y[b].func(1,!0);else for(var c=this.Y.length-1;0<=c;c--)this.Y[c].func(0,!1)}catch(d){E().error("Animation","completion failed: "+d,d),a=!1}}a?this.fh():this.dh()}};
|
|
f.oh=function(){if(this.Oa){for(var a=Date.now(),b=Math.min((a-this.ke)/this.tg,1),c=0;c<this.Y.length;c++){var d=this.Y[c];!d.started&&b>=d.delay&&(d.started=!0)}for(c=0;c<this.Y.length;c++)if(d=this.Y[c],d.started&&!d.completed)a:{var e,g;if(0<d.duration){if(e=g=Math.min((b-d.delay)/d.duration,1),d.curve&&1!=e)try{e=d.curve(g)}catch(h){E().error("Animation","step curve failed: "+h,h);this.Ya(!1,0);break a}}else e=g=1;1==g&&(d.completed=!0);try{d.func(e,d.completed)}catch(h){E().error("Animation",
|
|
"step mutate failed: "+h,h),this.Ya(!1,0)}}1==b?this.Ya(!0,0):this.w.canAnimate(this.pb)?this.Mf(this.F):(E().warn("Animation","cancel animation"),this.Ya(!1,0))}};function dl(a,b,c,d,e){this.ampdoc=a;this.w=b;this.cg=c;this.Yb=this.K=d;this.Ga=e&&a.isSingleDoc();this.ta=null;this.pg=0;this.W=[]}f=dl.prototype;f.setVisible=function(a){var b=this;this.ta&&this.w.mutate(function(){U(b.ta.getRoot(),"visibility",a?"visible":"hidden")})};
|
|
f.setup=function(){var a=this.ampdoc.getRootNode().styleSheets;if(a){for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d],g=e.ownerNode;e.disabled||!g||"STYLE"!=g.tagName||g.hasAttribute("amp-boilerplate")||g.hasAttribute("amp-runtime")||g.hasAttribute("amp-extension")||el(this,e.cssRules,b,c)}this.trySetupSelectorsNoInline(b,c);fl(this);d=rd(this.ampdoc.win);0<this.W.length&&!this.Ga&&d.isIos()&&C().warn("FixedLayer","Please test this page inside of an AMP Viewer such as Google's because the fixed or sticky positioning might have slightly different layout.");
|
|
this.update()}};f.updatePaddingTop=function(a,b){this.K=a;b||(this.Yb=a);this.update()};f.transformMutate=function(a){a?this.W.forEach(function(b){b.fixedNow&&b.top&&(U(b.element,"transition","none"),b.transform&&"none"!=b.transform?U(b.element,"transform",b.transform+" "+a):U(b.element,"transform",a))}):this.W.forEach(function(a){a.fixedNow&&a.top&&fe(a.element,{transform:"",transition:""})})};
|
|
f.addElement=function(a,b){var c=this.ampdoc.win;a.offsetParent||"none"!==he(c,a).display||E().error("FixedLayer","Tried to add display:none element to FixedLayer",a.tagName);gl(this,a,"*","fixed",b);fl(this);return this.update()};f.removeElement=function(a){var b=this,c=hl(this,a);0<c.length&&this.ta&&this.w.mutate(function(){for(var a=0;a<c.length;a++){var e=c[a];"fixed"==e.position&&b.ta.returnFrom(e)}})};f.isDeclaredFixed=function(a){return!!a.__AMP_DECLFIXED};f.isDeclaredSticky=function(a){return!!a.__AMP_DECLSTICKY};
|
|
f.update=function(){var a=this;this.W.filter(function(b){return!a.ampdoc.contains(b.element)}).forEach(function(b){return hl(a,b.element)});if(0==this.W.length)return Promise.resolve();var b=!1;return this.w.runPromise({measure:function(c){for(var d=a.W,e=[],g=a.ampdoc.win,h=0;h<d.length;h++)de(d[h].element,{top:"",bottom:"-9999vh",transition:"none"});for(h=0;h<d.length;h++)e.push(he(g,d[h].element).top);for(h=0;h<d.length;h++)U(d[h].element,"bottom","");for(h=0;h<d.length;h++){var k=d[h],l=k.element,
|
|
n=he(g,l),m=l.offsetWidth,q=l.offsetHeight,t=l.offsetTop,y=n,v=void 0===y.position?"":y.position,l=void 0===y.display?"":y.display,A=y.bottom,D=y.zIndex,z=parseFloat(n.opacity),y=n[ce(n,"transform")],n=n.top,B="fixed"==v&&(k.forceTransfer||0<m&&0<q),x=Ia(v,"sticky"),u="none"!==l;if(u&&(B||x)){if("auto"===n||e[h]!==n)n=B&&t===a.Yb+a.cg?"0px":"";var J=B&&(k.forceTransfer||0<z&&300>q&&(!!n&&0==parseInt(n,10)||!!A&&0==parseInt(A,10)));J&&(b=!0);c[k.id]={fixed:B,sticky:x,transferrable:J,top:n,zIndex:D,
|
|
transform:y}}else c[k.id]={fixed:!1,sticky:!1,transferrable:!1,top:"",zIndex:""}}},mutate:function(c){b&&a.Ga&&il(a).update();for(var d=a.W,e=0;e<d.length;e++){var g=d[e],h=c[g.id];U(g.element,"transition","none");U(g.element,"transition","");if(h){var k=e,l=h,n=g.element,m=g.fixedNow;g.fixedNow=l.fixed;g.stickyNow=l.sticky;g.top=l.fixed||l.sticky?l.top:"";g.transform=l.transform;!m||l.fixed&&l.transferrable||!a.ta||a.ta.returnFrom(g);l.top&&(l.fixed||l.sticky)&&(l.fixed||!a.Ga?U(n,"top","calc("+
|
|
l.top+" + "+a.K+"px)"):a.Yb===a.K?U(n,"top",l.top):U(n,"top","calc("+l.top+" - "+a.Yb+"px)"));a.Ga&&l.fixed&&l.transferrable&&il(a).transferTo(g,k,l)}}}},{}).catch(function(a){E().error("FixedLayer","Failed to mutate fixed elements:",a)})};
|
|
f.trySetupSelectorsNoInline=function(a,b){try{for(var c=0;c<a.length;c++)for(var d=a[c],e=this.ampdoc.getRootNode().querySelectorAll(d),g=0;g<e.length&&!(10<g);g++)gl(this,e[g],d,"fixed");for(a=0;a<b.length;a++)for(var h=b[a],k=this.ampdoc.getRootNode().querySelectorAll(h),c=0;c<k.length;c++)gl(this,k[c],h,"sticky")}catch(l){E().error("FixedLayer","Failed to setup fixed elements:",l)}};
|
|
function gl(a,b,c,d,e){b.hasAttribute("style")&&(b.style.top||b.style.bottom)&&C().error("FixedLayer","Inline styles with `top`, `bottom` and other CSS rules are not supported yet for fixed or sticky elements (#14186). Unexpected behavior may occur.",b);for(var g=null,h=0;h<a.W.length;h++){var k=a.W[h];if(k.element==b&&k.position==d){g=k;break}}h="fixed"==d;g?g.selectors.includes(c)||g.selectors.push(c):(g="F"+a.pg++,b.setAttribute("i-amphtml-fixedid",g),h?b.__AMP_DECLFIXED=!0:b.__AMP_DECLSTICKY=
|
|
!0,g={id:g,element:b,position:d,selectors:[c],fixedNow:!1,stickyNow:!1},a.W.push(g));g.forceTransfer=h&&!!e}function hl(a,b){for(var c=[],d=0;d<a.W.length;d++){var e=a.W[d];e.element==b&&(a.w.mutate(function(){U(b,"top","")}),a.W.splice(d,1),c.push(e))}return c}function fl(a){a.W.sort(function(a,c){return a.element.compareDocumentPosition(c.element)&1?1:-1})}function il(a){if(!a.Ga||a.ta)return a.ta;var b=a.ampdoc.win.document;a.ta=b.body.shadowRoot?new jl(b):new kl(b);return a.ta}
|
|
function el(a,b,c,d){for(var e=0;e<b.length;e++){var g=b[e];1==g.type?"*"!=g.selectorText&&g.style.position&&("fixed"==g.style.position?c.push(g.selectorText):Ia(g.style.position,"sticky")&&d.push(g.selectorText)):4==g.type?el(a,g.cssRules,c,d):12==g.type&&el(a,g.cssRules,c,d)}}
|
|
function kl(a){this.V=a;this.X=a.body.cloneNode(!1);this.X.removeAttribute("style");fe(this.X,{position:"absolute",top:0,left:0,height:0,width:0,pointerEvents:"none",overflow:"hidden",animation:"none",background:"none",border:"none",borderImage:"none",boxSizing:"border-box",boxShadow:"none",display:"block",float:"none",margin:0,opacity:1,outline:"none",padding:"none",transform:"none",transition:"none",visibility:"visible"});a.documentElement.appendChild(this.X)}kl.prototype.getRoot=function(){return this.X};
|
|
kl.prototype.update=function(){this.X.className!=this.V.body.className&&(this.X.className=this.V.body.className)};
|
|
kl.prototype.transferTo=function(a,b,c){var d=a.element;if(d.parentElement!=this.X){C().warn("FixedLayer","In order to improve scrolling performance in Safari, we now move the element to a fixed positioning layer:",a.element);if(!a.placeholder){U(d,"pointer-events","initial");var e=a.placeholder=this.V.createElement("i-amphtml-fpa");U(e,"display","none");e.setAttribute("i-amphtml-fixedid",a.id)}U(d,"zIndex","calc("+(1E4+b)+" + "+(c.zIndex||0)+")");d.parentElement.replaceChild(a.placeholder,d);this.X.appendChild(d);
|
|
a.selectors.some(function(a){var b;a:{try{var c=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.msMatchesSelector||d.oMatchesSelector;if(c){b=c.call(d,a);break a}}catch(l){E().error("FixedLayer","Failed to test query match:",l)}b=!1}return b})||(C().warn("FixedLayer","Failed to move the element to the fixed position layer. This is most likely due to the compound CSS selector:",a.element),this.returnFrom(a))}};
|
|
kl.prototype.returnFrom=function(a){a.placeholder&&this.V.contains(a.placeholder)&&(this.V.contains(a.element)?(U(a.element,"zIndex",""),a.placeholder.parentElement.replaceChild(a.element,a.placeholder)):a.placeholder.parentElement.removeChild(a.placeholder))};
|
|
function jl(a){this.X=a.createElement("div");this.X.id="i-amphtml-fixed-layer";de(this.X,{position:"absolute",top:0,left:0,height:0,width:0,overflow:"hidden"});var b=a.createElement("slot");b.setAttribute("name","i-amphtml-fixed");this.X.appendChild(b);a.body.shadowRoot.appendChild(this.X)}jl.prototype.getRoot=function(){return this.X};jl.prototype.update=function(){};
|
|
jl.prototype.transferTo=function(a){var b=a.element;C().warn("FixedLayer","In order to improve scrolling performance in Safari, we now move the element to a fixed positioning layer:",a.element);b.setAttribute("slot","i-amphtml-fixed")};jl.prototype.returnFrom=function(a){a.element.removeAttribute("slot")};function ll(a){var b=this;this.ampdoc=a;this.win=a.win;this.Jb=rd(this.win);this.ka=new Y;this.ja=new Y;this.Ca=function(){b.ka.fire()};this.Ba=function(){return b.ja.fire()};this.H=L(this.win,"layers")}f=ll.prototype;f.connect=function(){this.win.addEventListener("scroll",this.Ca);this.win.addEventListener("resize",this.Ba)};f.disconnect=function(){this.win.removeEventListener("scroll",this.Ca);this.win.removeEventListener("resize",this.Ba)};f.ensureReadyForElements=function(){};f.getBorderTop=function(){return 0};
|
|
f.requiresFixedLayerTransfer=function(){return!1};f.supportsPositionFixed=function(){return!0};f.onScroll=function(a){this.ka.add(a)};f.onResize=function(a){this.ja.add(a)};f.updatePaddingTop=function(a){de(this.win.document.documentElement,{"padding-top":a+"px"})};f.hideViewerHeader=function(a){a||this.updatePaddingTop(0)};f.showViewerHeader=function(a,b){a||this.updatePaddingTop(b)};f.disableScroll=function(){this.win.document.documentElement.classList.add("i-amphtml-scroll-disabled")};
|
|
f.resetScroll=function(){this.win.document.documentElement.classList.remove("i-amphtml-scroll-disabled")};f.updateLightboxMode=function(){return Promise.resolve()};f.getSize=function(){var a=this.win.innerWidth,b=this.win.innerHeight;if(a&&b)return{width:a,height:b};var c=this.win.document.documentElement;return{width:c.clientWidth,height:c.clientHeight}};
|
|
f.getScrollTop=function(){var a=this.getScrollingElement().scrollTop||this.win.pageYOffset,b=this.ampdoc.getRootNode().host;return b?a-b.offsetTop:a};f.getScrollLeft=function(){return 0};f.getScrollWidth=function(){return this.getScrollingElement().scrollWidth};f.getScrollHeight=function(){return this.getScrollingElement().scrollHeight};f.getContentHeight=function(){var a=this.win.document.body.getBoundingClientRect();return a.height+a.top+this.getScrollTop()};
|
|
f.getLayoutRect=function(a,b,c){a=a.getBoundingClientRect();if(this.H)return W(a.left,a.top,a.width,a.height);var d=void 0!=c?c:this.getScrollTop(),e=void 0!=b?b:this.getScrollLeft();return W(Math.round(a.left+e),Math.round(a.top+d),Math.round(a.width),Math.round(a.height))};f.getRootClientRectAsync=function(){return Promise.resolve(null)};f.setScrollTop=function(a){this.getScrollingElement().scrollTop=a};
|
|
f.getScrollingElement=function(){var a=this.win.document;return a.scrollingElement?a.scrollingElement:a.body&&this.Jb.isWebKit()?a.body:a.documentElement};function ml(a,b){return{left:a,top:b}}var nl=[],ol=0;
|
|
function pl(a,b){var c=this;a=a.win;this.kh=b;this.Xd=null;this.Cb=[];this.Nc=[];this.Nc.push(yd(a.document,"scroll",function(a){a=a.target;var d=a.nodeType==Node.ELEMENT_NODE?a:b;a=d;var g=ql(a);g&&g.isLayer()?g.dirtyScrollMeasurements():g=rl(c,a,!1);c.ve=g;c.Xd&&c.Xd()},{capture:!0,passive:!0}));this.Nc.push(yd(a,"resize",function(){for(var a=c.Cb,b=0;b<a.length;b++){var g=a[b];g.undeclareLayer();g.forgetParentLayer()}},{capture:!0,passive:!0}));this.ve=rl(this,b,!0)}f=pl.prototype;
|
|
f.dispose=function(){this.Nc.forEach(function(a){return a()});this.Nc.length=0};f.add=function(a){var b=ql(a);b||(b=new sl(a));-1===this.Cb.indexOf(b)&&this.Cb.push(b);return b};f.remove=function(a){if(a=ql(a)){var b=this.Cb.indexOf(a);-1<b&&this.Cb.splice(b,1);(b=a.getParentLayer())&&b.remove(a);a.undeclareLayer()}};f.getScrolledPosition=function(a,b){return this.add(a).getScrolledPosition(b)};f.getOffsetPosition=function(a,b){return this.add(a).getOffsetPosition(b)};f.getSize=function(a){return this.add(a).getSize()};
|
|
f.remeasure=function(a,b){a=this.add(a);a=a.getParentLayer()||a;b&&a.dirtyMeasurements();a.remeasure()};f.declareLayer=function(a){rl(this,a,!1)};f.dirty=function(a){var b=tl(a)||ql(this.kh);b.dirtyMeasurements()};function rl(a,b,c){a=a.add(b);a.declareLayer(c);return a}f.onScroll=function(a){this.Xd=a};f.getActiveLayer=function(){return this.ve};f.iterateAncestry=function(a,b,c){return this.add(a).iterateAncestry(b,c)};
|
|
function sl(a){a.__AMP_LAYOUT=this;this.da=a;this.rd=a.tagName+"-"+ol++;this.Hb=void 0;this.ib=!0;this.T={height:0,width:0};this.xf=ml(0,0);this.yd=void 0;this.sc=this.Fd=this.bb=!1;this.ra=this.Qa=0;this.Xa=[]}function ql(a){return a.__AMP_LAYOUT||null}
|
|
function tl(a,b){if(!b&&(b=ql(a)))return b.getParentLayer();b=a.ownerDocument.defaultView;for(var c=a,d=a;d;d=d.parentNode){var e=d===a?null:ql(d);if(e&&e.isLayer())return e;if(d===c){if("fixed"==he(b,c).position)return oc(c,"layers").declareLayer(c),c===a?null:ql(c);c=c.offsetParent}}return null}f=sl.prototype;f.getId=function(){return this.rd};f.contains=function(a){return a!==this&&this.da.contains(a.da)};f.add=function(a){this.isLayer();this.contains(a);this.Xa.push(a)};
|
|
f.remove=function(a){this.isLayer();a.getParentLayer();var b=this.Xa.indexOf(a);-1<b&&(this.Xa.splice(b,1),a.forgetParentLayer())};f.isLayer=function(){return this.bb};f.declareLayer=function(a){this.bb||(this.bb=!0,this.Fd=a,this.sc=this.ib=!0,(a=this.getParentLayer())&&a.Ga(this))};f.undeclareLayer=function(){if(this.bb&&!this.Fd){var a=this.da;"fixed"!==he(a.ownerDocument.defaultView,a).position&&(this.bb=!1,a=this.getParentLayer()||tl(this.da,!0),this.Ga(a))}};
|
|
f.Ga=function(a){var b=a.contains(this);Ke(this.Xa,function(c){return b||a.contains(c)?(c.ib=!0,c.Hb=a,a.Xa.push(c),!1):!0})};f.getParentLayer=function(){if(void 0===this.Hb){var a=tl(this.da,!0);(this.Hb=a)&&a.add(this)}return this.Hb};f.forgetParentLayer=function(){this.Hb=void 0};f.getSize=function(){this.remeasure();return this.T};f.getOffsetFromParent=function(){this.remeasure();return this.xf};f.isActiveUnsafe=function(){return this.yd};
|
|
f.getHorizontalDistanceFromParent=function(){var a=this.getParentLayer();if(!a)return 0;var b=this.getOffsetFromParent().left,c=this.getSize().width,d=a.getScrollLeft(),e=a.getSize().width;return b+c<d?d-(b+c):d+e<b?b-(d+e):0};f.getHorizontalViewportsFromParent=function(){var a=this.getHorizontalDistanceFromParent();if(0===a)return 0;var b=this.getParentLayer().getSize().width;return a/b};
|
|
f.getVerticalDistanceFromParent=function(){var a=this.getParentLayer();if(!a)return 0;var b=this.getOffsetFromParent().top,c=this.getSize().height,d=a.getScrollTop(),e=a.getSize().height;return b+c<d?d-(b+c):d+e<b?b-(d+e):0};f.getVerticalViewportsFromParent=function(){var a=this.getVerticalDistanceFromParent();if(0===a)return 0;var b=this.getParentLayer().getSize().height;return a/b};f.getScrollTop=function(){ul(this);return this.ra};f.getScrollLeft=function(){ul(this);return this.Qa};
|
|
f.getScrolledPosition=function(a){var b=this.getScrollLeft(),c=this.getScrollTop(),d=a?tl(a):null;for(a=this;a!==d;a=a.getParentLayer())var e=a.getOffsetFromParent(),b=b+(e.left-a.getScrollLeft()),c=c+(e.top-a.getScrollTop());return ml(b,c)};f.getOffsetPosition=function(a){var b=0,c=0;a=a?tl(a):null;for(var d=this;d!==a;d=d.getParentLayer())var e=d.getOffsetFromParent(),b=b+e.left,c=c+e.top;return ml(b,c)};f.dirtyMeasurements=function(){this.ib=!0};f.dirtyScrollMeasurements=function(){this.sc=!0};
|
|
f.remeasure=function(){for(var a=this,b=this.getParentLayer();b;b=b.getParentLayer())b.ib&&(a=b);a.ib&&vl(a)};f.iterateAncestry=function(a,b){for(var c=oc(this.da,"layers").getActiveLayer(),d=c===this||c.contains(this),e=this;e;)nl.push(e),e.yd=d,e===c&&(d=!1),e=e.getParentLayer();for(var g=void 0,e=nl.length,h=0;h<e;h++){var k=nl.pop(),g=a(g,k,h,b);k.yd=void 0}return g};
|
|
function vl(a,b){ul(a);a.ib=!1;var c=a.da,d=b;if(!d)var e=a.getParentLayer(),d=e?wl(e):ml(0,0);a.T={height:c.clientHeight,width:c.clientWidth};e=c.getBoundingClientRect();c=e.left;e=e.top;a.Fd&&(c+=a.getScrollLeft(),e+=a.getScrollTop());a.xf=ml(c-d.left,e-d.top);c=a.Xa;if(c.length)for(a=wl(a),e=0;e<c.length;e++)vl(c[e],a)}function ul(a){a.bb&&a.sc&&(a.sc=!1,a.Qa=a.da.scrollLeft,a.ra=a.da.scrollTop)}
|
|
function wl(a){var b=a.getScrolledPosition();return ml(b.left-a.getScrollLeft(),b.top-a.getScrollTop())}function xl(a,b){P(a,"layers",function(a){return new pl(a,b)},!0)};function yl(a,b){return function(c){return a+(b-a)*c}};var zl=['\n <div id="i-amphtml-scroller">\n <div id="i-amphtml-body-wrapper">\n <slot></slot>\n </div>\n </div>'];zl.raw=['\n <div id="i-amphtml-scroller">\n <div id="i-amphtml-body-wrapper">\n <slot></slot>\n </div>\n </div>'];var Al="align-content align-items align-self alignment-baseline backface-visibility box-sizing column-count column-fill column-gap column-rule column-span column-width columns display flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap gap grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-gap grid-row grid-template justify-content justify-items justify-self margin order padding perspective perspective-origin place-content place-items place-self table-layout".split(" ");
|
|
function Bl(a){var b=this;this.win=a;this.w=td(a);a=this.win.document;a.documentElement.classList.add("i-amphtml-ios-embed-sd");var c=Ne(a)(zl);this.S=c;this.M=c.firstElementChild;de(this.S,{"overflow-x":"hidden","overflow-y":"auto",position:"absolute",top:"0",left:"0",right:"0",bottom:"0",margin:"0",width:"100%","box-sizing":"border-box",display:"block","padding-top":"0px","border-top":"1px solid transparent"});de(this.M,{overflow:"visible",position:"relative"});this.ka=new Y;this.ja=new Y;this.Ca=
|
|
this.Eb.bind(this);this.Ba=this.Vg.bind(this);this.H=L(this.win,"layers");this.K=0;this.Qb=this.Xc=!1;Oc(a,this.Rb.bind(this));lf(a).then(function(){b.S.classList.add("i-amphtml-ios-overscroll");de(b.S,{"-webkit-overflow-scrolling":"touch"})})}f=Bl.prototype;f.ensureReadyForElements=function(){this.Rb()};
|
|
f.Rb=function(){if(!this.Qb){this.Qb=!0;var a=this.win.document.body;a.attachShadow({mode:"open"}).appendChild(this.S);this.oe();if(this.win.MutationObserver){var b=new this.win.MutationObserver(this.oe.bind(this));b.observe(a,{attributes:!0})}this.Eb()}};f.oe=function(){var a=this;if(!this.Xc){var b=this.win.document.body;if(b){var c={};this.Xc=!0;this.w.run({measure:function(){var d=he(a.win,b);Al.forEach(function(a){c[a]=d[a]||""})},mutate:function(){a.Xc=!1;de(a.M,c)}})}}};
|
|
f.Vg=function(){this.ja.fire();this.oe()};f.connect=function(){this.win.addEventListener("resize",this.Ba);this.S.addEventListener("scroll",this.Ca)};f.disconnect=function(){this.win.removeEventListener("resize",this.Ba);this.S.removeEventListener("scroll",this.Ca)};f.getBorderTop=function(){return 1};f.requiresFixedLayerTransfer=function(){return!0};f.supportsPositionFixed=function(){return!0};f.onScroll=function(a){this.ka.add(a)};f.onResize=function(a){this.ja.add(a)};
|
|
f.updatePaddingTop=function(a){this.K=a;de(this.S,{"padding-top":a+"px"})};f.hideViewerHeader=function(a){a||this.updatePaddingTop(0)};f.showViewerHeader=function(a,b){a||this.updatePaddingTop(b)};f.disableScroll=function(){de(this.S,{"overflow-y":"hidden"})};f.resetScroll=function(){de(this.S,{"overflow-y":"auto"})};f.updateLightboxMode=function(){return Promise.resolve()};f.getSize=function(){return{width:this.win.innerWidth,height:this.win.innerHeight}};f.getScrollTop=function(){return this.S.scrollTop};
|
|
f.getScrollLeft=function(){return 0};f.getScrollWidth=function(){return this.S.scrollWidth};f.getScrollHeight=function(){return this.S.scrollHeight};f.getContentHeight=function(){return this.M.scrollHeight+this.K+this.getBorderTop()};f.getLayoutRect=function(a,b,c){a=a.getBoundingClientRect();if(this.H)return W(a.left,a.top,a.width,a.height);c=void 0!=c?c:this.getScrollTop();b=void 0!=b?b:this.getScrollLeft();return W(Math.round(a.left+b),Math.round(a.top+c),Math.round(a.width),Math.round(a.height))};
|
|
f.getRootClientRectAsync=function(){return Promise.resolve(null)};f.setScrollTop=function(a){this.S.scrollTop=a||1};f.Eb=function(a){0==this.S.scrollTop&&(this.S.scrollTop=1,a&&a.preventDefault());a&&this.ka.fire()};f.getScrollingElement=function(){return this.S};function Cl(a){var b=this;this.win=a;a=this.win.document;var c=a.documentElement,d=c.className;c.className="i-amphtml-ios-embed";var e=a.createElement("html");this.M=e;e.id="i-amphtml-wrapper";e.className=d;this.ka=new Y;this.ja=new Y;this.Ca=this.Eb.bind(this);this.Ba=function(){return b.ja.fire()};this.H=L(this.win,"layers");this.Qb=!1;Oc(a,this.Rb.bind(this));lf(a).then(function(){c.classList.add("i-amphtml-ios-overscroll")})}f=Cl.prototype;f.ensureReadyForElements=function(){this.Rb()};
|
|
f.Rb=function(){if(!this.Qb){this.Qb=!0;var a=this.win.document,b=a.body;a.documentElement.appendChild(this.M);this.M.appendChild(b);Object.defineProperty(a,"body",{get:function(){return b}});this.Eb()}};f.connect=function(){this.win.addEventListener("resize",this.Ba);this.M.addEventListener("scroll",this.Ca)};f.disconnect=function(){this.win.removeEventListener("resize",this.Ba);this.M.removeEventListener("scroll",this.Ca)};f.getBorderTop=function(){return 1};f.requiresFixedLayerTransfer=function(){return!0};
|
|
f.supportsPositionFixed=function(){return!0};f.onScroll=function(a){this.ka.add(a)};f.onResize=function(a){this.ja.add(a)};f.updatePaddingTop=function(a){de(this.M,{"padding-top":a+"px"})};f.hideViewerHeader=function(a){a||this.updatePaddingTop(0)};f.showViewerHeader=function(a,b){a||this.updatePaddingTop(b)};f.disableScroll=function(){this.M.classList.add("i-amphtml-scroll-disabled")};f.resetScroll=function(){this.M.classList.remove("i-amphtml-scroll-disabled")};f.updateLightboxMode=function(){return Promise.resolve()};
|
|
f.getSize=function(){return{width:this.win.innerWidth,height:this.win.innerHeight}};f.getScrollTop=function(){return this.M.scrollTop};f.getScrollLeft=function(){return 0};f.getScrollWidth=function(){return this.M.scrollWidth};f.getScrollHeight=function(){return this.M.scrollHeight};f.getContentHeight=function(){var a=this.win.document.body.getBoundingClientRect();return a.height+a.top+this.getScrollTop()};
|
|
f.getLayoutRect=function(a,b,c){a=a.getBoundingClientRect();if(this.H)return W(a.left,a.top,a.width,a.height);c=void 0!=c?c:this.getScrollTop();b=void 0!=b?b:this.getScrollLeft();return W(Math.round(a.left+b),Math.round(a.top+c),Math.round(a.width),Math.round(a.height))};f.getRootClientRectAsync=function(){return Promise.resolve(null)};f.setScrollTop=function(a){this.M.scrollTop=a||1};f.Eb=function(a){0==this.M.scrollTop&&(this.M.scrollTop=1,a&&a.preventDefault());a&&this.ka.fire()};
|
|
f.getScrollingElement=function(){return this.M};function Dl(a,b,c){var d=this;this.ampdoc=a;this.La=this.ampdoc.win.document;this.j=b;this.h=c;this.ra=this.T=this.Lb=null;this.fe=!1;this.Qa=null;this.K=Number(c.getParam("paddingTop")||0);this.kc=0;this.R=R(this.ampdoc.win);this.w=td(this.ampdoc.win);this.ge=!1;this.Jf=0;this.Qe=new Y;this.ka=new Y;this.ja=new Y;this.Zd=this.Ub=void 0;(this.H=L(this.ampdoc.win,"layers"))&&xl(this.ampdoc,this.j.getScrollingElement());this.ea=new dl(this.ampdoc,this.w,this.j.getBorderTop(),this.K,this.j.requiresFixedLayerTransfer());
|
|
this.ampdoc.whenReady().then(function(){return d.ea.setup()});this.h.onMessage("viewport",this.vh.bind(this));this.h.onMessage("scroll",this.yh.bind(this));this.h.onMessage("disableScroll",this.sg.bind(this));this.j.updatePaddingTop(this.K);this.j.onScroll(this.jh.bind(this));this.j.onResize(this.Hf.bind(this));this.onScroll(this.lh.bind(this));this.la=!1;this.h.onVisibilityChanged(this.Sf.bind(this));this.Sf();this.ampdoc.isSingleDoc()&&this.La.documentElement.classList.add("i-amphtml-singledoc");
|
|
c.isEmbedded()?this.La.documentElement.classList.add("i-amphtml-embedded"):this.La.documentElement.classList.add("i-amphtml-standalone");fd(this.ampdoc.win)&&this.La.documentElement.classList.add("i-amphtml-iframed");"1"===c.getParam("webview")&&this.La.documentElement.classList.add("i-amphtml-webview");fd(this.ampdoc.win)&&"scrollRestoration"in this.ampdoc.win.history&&(this.ampdoc.win.history.scrollRestoration="manual")}f=Dl.prototype;f.dispose=function(){this.j.disconnect()};
|
|
f.ensureReadyForElements=function(){this.j.ensureReadyForElements()};f.Sf=function(){var a=this.h.isVisible();a!=this.la&&((this.la=a)?(this.j.connect(),this.T&&this.Hf()):this.j.disconnect())};f.getPaddingTop=function(){return this.K};f.getTop=function(){return this.getScrollTop()};f.getScrollTop=function(){null==this.ra&&(this.ra=this.j.getScrollTop());return this.ra};f.getScrollLeft=function(){null==this.Qa&&(this.Qa=this.j.getScrollLeft());return this.Qa};
|
|
f.setScrollTop=function(a){this.ra=null;this.j.setScrollTop(a)};f.updatePaddingBottom=function(a){this.ampdoc.whenBodyAvailable().then(function(b){U(b,"borderBottom",a+"px solid transparent")})};f.getSize=function(){if(this.T)return this.T;this.T=this.j.getSize();if(0==this.T.width||0==this.T.height){var a=this.h.getVisibilityState();("prerender"==a||"visible"==a)&&.01>Math.random()&&E().error("Viewport","viewport has zero dimensions")}return this.T};f.getHeight=function(){return this.getSize().height};
|
|
f.getWidth=function(){return this.getSize().width};f.getScrollWidth=function(){return this.j.getScrollWidth()};f.getScrollHeight=function(){return this.j.getScrollHeight()};f.getContentHeight=function(){return this.j.getContentHeight()};f.getRect=function(){if(null==this.Lb){var a=0,b=0;this.H||(a=this.getScrollTop(),b=this.getScrollLeft());var c=this.getSize();this.Lb=W(b,a,c.width,c.height)}return this.Lb};
|
|
f.getLayoutRect=function(a){var b=this.getScrollLeft(),c=this.getScrollTop(),d=Ic(a,this.ampdoc.win);return d?(a=this.j.getLayoutRect(a,0,0),b=this.j.getLayoutRect(d,b,c),W(Math.round(a.left+b.left),Math.round(a.top+b.top),Math.round(a.width),Math.round(a.height))):this.j.getLayoutRect(a,b,c)};
|
|
f.getClientRectAsync=function(a){var b=this;if(this.H)return this.w.measurePromise(function(){return b.getLayoutRect(a)});var c=this.w.measurePromise(function(){return a.getBoundingClientRect()}),d=this.j.getRootClientRectAsync(),e=Ic(a,this.ampdoc.win);e&&(d=this.w.measurePromise(function(){return e.getBoundingClientRect()}));return Promise.all([c,d]).then(function(a){var b=a[0];return(a=a[1])?He(b,a.left,a.top):W(Number(b.left),Number(b.top),Number(b.width),Number(b.height))})};
|
|
f.supportsPositionFixed=function(){return this.j.supportsPositionFixed()};f.isDeclaredFixed=function(a){return this.ea.isDeclaredFixed(a)};f.scrollIntoView=function(a){var b=this;return El(this,a).then(function(c){return Fl(b,a,c)})};function Fl(a,b,c){var d=a.j.getLayoutRect(b).top,e=a.H?Gl(a,c).then(function(a){return d+a}):cc(function(){return Math.max(0,d-a.K)});e.then(function(b){return Hl(a,c,b)})}
|
|
f.animateScrollIntoView=function(a,b,c,d){b=void 0===b?500:b;c=void 0===c?"ease-in":c;d=void 0===d?"top":d;var e=this;return El(this,a).then(function(g){return Il(e,a,g,b,c,d)})};
|
|
function Il(a,b,c,d,e,g){b=a.j.getLayoutRect(b);var h=(c==a.j.getScrollingElement()?a.getSize():a.getLayoutRect(c)).height;switch(g){case "bottom":g=-h+b.height;break;case "center":g=-h/2+b.height/2;break;default:g=0}var k,l;if(a.H)k=b.top+g,l=Promise.resolve(0);else{var n=b.top-a.K+g;k=Math.max(0,n);l=Gl(a,c)}return l.then(function(b){if(k!=b)return Jl(a,c,b,k,d,e)})}function Jl(a,b,c,d,e,g){var h=yl(c,d);return bl(b,function(c){Hl(a,b,h(c))},e,g).thenAlways(function(){Hl(a,b,d)})}
|
|
function El(a,b){return a.w.measurePromise(function(){return Wc(b)||a.j.getScrollingElement()})}function Hl(a,b,c){b==a.j.getScrollingElement()?a.j.setScrollTop(c):a.w.mutate(function(){b.scrollTop=c})}function Gl(a,b){return b==a.j.getScrollingElement()?cc(function(){return a.getScrollTop()}):a.w.measurePromise(function(){return b.scrollTop})}f.onChanged=function(a){return this.Qe.add(a)};f.onScroll=function(a){return this.ka.add(a)};f.onResize=function(a){return this.ja.add(a)};
|
|
f.enterLightboxMode=function(a){this.h.sendMessage("requestFullOverlay",{},!0);this.enterOverlayMode();this.hideFixedLayer();a&&this.maybeEnterFieLightboxMode(a);return this.j.updateLightboxMode(!0)};f.leaveLightboxMode=function(a){this.h.sendMessage("cancelFullOverlay",{},!0);this.showFixedLayer();this.leaveOverlayMode();a&&this.maybeLeaveFieLightboxMode(a);return this.j.updateLightboxMode(!1)};f.isLightboxExperimentOn=function(){return L(this.ampdoc.win,"amp-lightbox-a4a-proto")};
|
|
f.maybeEnterFieLightboxMode=function(a){var b=Kl(this,a);b&&(this.isLightboxExperimentOn(),b.enterFullOverlayMode())};f.maybeLeaveFieLightboxMode=function(a){(a=Kl(this,a))&&a.leaveFullOverlayMode()};function Kl(a,b){var c=Ic(b,a.ampdoc.win);return c&&c.__AMP_EMBED__}f.enterOverlayMode=function(){this.disableTouchZoom();this.disableScroll()};f.leaveOverlayMode=function(){this.resetScroll();this.restoreOriginalTouchZoom()};f.disableScroll=function(){var a=this;this.w.mutate(function(){a.j.disableScroll()})};
|
|
f.resetScroll=function(){var a=this;this.w.mutate(function(){a.j.resetScroll()})};f.resetTouchZoom=function(){var a=this,b=this.ampdoc.win.innerHeight,c=this.La.documentElement.clientHeight;b&&c&&b===c||this.disableTouchZoom()&&this.R.delay(function(){a.restoreOriginalTouchZoom()},50)};
|
|
f.disableTouchZoom=function(){var a=Ll(this);if(!a)return!1;var b=a.content,c={"maximum-scale":"1","user-scalable":"no"};var d=Object.create(null);if(b)for(var e=b.split(/,|;/),g=0;g<e.length;g++){var h=e[g].split("="),k=h[0].trim(),h=h[1],h=(h||"").trim();k&&(d[k]=h)}var e=!1,l;for(l in c)d[l]!==c[l]&&(e=!0,void 0!==c[l]?d[l]=c[l]:delete d[l]);if(e){var b="",n;for(n in d)0<b.length&&(b+=","),b=d[n]?b+(n+"="+d[n]):b+n}d=b;return Ml(this,d)};
|
|
f.restoreOriginalTouchZoom=function(){return void 0!==this.Zd?Ml(this,this.Zd):!1};f.hasScrolled=function(){return 0<this.Jf};f.hideFixedLayer=function(){this.ea.setVisible(!1)};f.showFixedLayer=function(){this.ea.setVisible(!0)};f.updateFixedLayer=function(){this.ea.update()};f.addToFixedLayer=function(a,b){return this.ea.addElement(a,b)};f.removeFromFixedLayer=function(a){this.ea.removeElement(a)};function Ml(a,b){return(a=Ll(a))&&a.content!=b?(a.content=b,!0):!1}
|
|
function Ll(a){if(fd(a.ampdoc.win))return null;void 0===a.Ub&&(a.Ub=a.La.querySelector("meta[name=viewport]"),a.Ub&&(a.Zd=a.Ub.content));return a.Ub}f.yh=function(a){var b=a.scrollTop;this.setScrollTop(b)};f.vh=function(a){var b=this,c=a.paddingTop,d=a.duration||0,e=a.curve,g=a["transient"];void 0!=c&&c!=this.K&&(this.kc=this.K,this.K=c,this.K<this.kc?(this.j.hideViewerHeader(g,this.kc),Nl(this,d,e,g)):Nl(this,d,e,g).then(function(){b.j.showViewerHeader(g,b.K)}))};
|
|
f.sg=function(a){a?this.disableScroll():this.resetScroll()};function Nl(a,b,c,d){a.ea.updatePaddingTop(a.K,d);if(0>=b)return Promise.resolve();var e=yl(a.kc-a.K,0);return bl(a.ampdoc.getRootNode(),function(b){b=e(b);a.ea.transformMutate("translateY("+b+"px)")},b,c).thenAlways(function(){a.ea.transformMutate(null)})}function Ol(a,b,c){var d=a.getSize(),e=a.getScrollTop(),g=a.getScrollLeft();a.Qe.fire({relayoutAll:b,top:e,left:g,width:d.width,height:d.height,velocity:c})}
|
|
f.jh=function(){var a=this;this.Lb=null;this.Jf++;this.Qa=this.j.getScrollLeft();var b=this.j.getScrollTop();if(!(0>b)){this.ra=b;if(!this.ge){this.ge=!0;var c=Date.now();this.R.delay(function(){a.w.measure(function(){a.Of(c,b)})},36)}this.ka.fire()}};f.Of=function(a,b){var c=this,d=this.ra=this.j.getScrollTop(),e=Date.now(),g=0;e!=a&&(g=(d-b)/(e-a));.03>Math.abs(g)?(Ol(this,!1,g),this.ge=!1):this.R.delay(function(){return c.w.measure(c.Of.bind(c,e,d))},20)};
|
|
f.lh=function(){var a=this;this.fe||(this.fe=!0,this.w.measure(function(){a.fe=!1;a.h.sendMessage("scroll",H({scrollTop:a.getScrollTop()}),!0)}))};f.Hf=function(){var a=this;this.Lb=null;var b=this.T;this.T=null;var c=this.getSize();this.ea.update().then(function(){var d=!b||b.width!=c.width;Ol(a,d,0);var e=d||b.height!=c.height;e&&a.ja.fire({relayoutAll:d,width:c.width,height:c.height})})};
|
|
function Pl(a){var b=T(a),c;if(c=a.isSingleDoc()){c=a.win;var d=b.getParam("viewportType")||Ql;rd(c).isIos()&&d==Ql?!fd(c)&&r(c).development?c=Rl:(fd(c),c=fd(c)&&b.isEmbedded()?Rl:d):c=d;c=c==Rl}c=c?L(a.win,"ios-embed-sd")&&a.win.Element.prototype.attachShadow&&11<=rd(a.win).getMajorVersion()?new Bl(a.win):new Cl(a.win):new ll(a);return new Dl(a,c,b)}var Ql="natural",Rl="natural-ios-embed";function Sl(a){var b=this;this.win=a;this.Ja=nd(this.win);this.qb=Q(this.win,"documentState");this.bh=Tl(this);this.I=[];this.Vd=[];this.le=[];this.Ud=[];this.qa=!1;this.Td=this.tc=null;this.bd=this.ih.bind(this);this.Bg=new og(this.win,this.bd,16);this.Ae=new og(this.win,this.bd,40);this.ie=null;var c=this.Yd.bind(this);if(this.Ja.isSingleDoc())pc(this.Ja.getAmpDoc(),"viewer").then(function(a){b.ie=a;a.onVisibilityChanged(c)});else this.qb.onVisibilityChanged(c);this.gf=new jg(this.win)}f=Sl.prototype;
|
|
f.Yd=function(){this.qa&&Ul(this)};f.run=function(a,b){this.I.push(a);this.le.push(b||void 0);this.Pa()};f.runPromise=function(a,b){this.run(a,b);if(this.tc)return this.tc;a=new N;this.Td=a.resolve;return this.tc=a.promise};f.createTask=function(a){var b=this;return function(c){b.run(a,c)}};f.mutate=function(a){this.run({measure:void 0,mutate:a})};f.mutatePromise=function(a){return this.runPromise({measure:void 0,mutate:a})};f.measure=function(a){this.run({measure:a,mutate:void 0})};
|
|
f.measurePromise=function(a){var b=this;return new Promise(function(c){b.measure(function(){c(a())})})};f.canAnimate=function(a){return Vl(this,a)};function Vl(a,b){return a.qb.isHidden()?!1:a.ie?a.ie.isVisible():b?(a=a.Ja.getAmpDoc(b),T(a).isVisible()):!0}f.runAnim=function(a,b,c){if(!Vl(this,a))return E().warn("VSYNC","Did not schedule a vsync request, because document was invisible"),!1;this.run(b,c);return!0};f.createAnimTask=function(a,b){var c=this;return function(d){return c.runAnim(a,b,d)}};
|
|
f.runAnimMutateSeries=function(a,b,c){var d=this;return Vl(this,a)?new Promise(function(e,g){var h=Date.now(),k=0,l=d.createAnimTask(a,{mutate:function(a){var d=Date.now()-h;b(d,d-k,a)?c&&d>c?g(Error("timeout")):(k=d,l(a)):e()}});l({})}):Promise.reject(Error("CANCELLED"))};f.Pa=function(){this.qa||(this.qa=!0,this.gf.onScheduled(),Ul(this))};function Ul(a){Vl(a)?(a.bh(a.bd),a.Ae.schedule()):a.Bg.schedule()}
|
|
f.ih=function(){this.Ae.cancel();this.qa=!1;this.gf.onRun();var a=this.I,b=this.le,c=this.Td;this.tc=this.Td=null;this.I=this.Vd;this.le=this.Ud;for(var d=0;d<a.length;d++)a[d].measure&&!Wl(a[d].measure,b[d])&&(a[d].mutate=void 0);for(d=0;d<a.length;d++)a[d].mutate&&Wl(a[d].mutate,b[d]);this.Vd=a;this.Ud=b;this.Vd.length=0;this.Ud.length=0;c&&c()};
|
|
function Tl(a){var b=a.win.requestAnimationFrame||a.win.webkitRequestAnimationFrame;if(b)return b.bind(a.win);var c=0;return function(b){var d=Date.now(),g=Math.max(0,16-(d-c));c=d+g;a.win.setTimeout(b,g)}}function Wl(a,b){try{a(b)}catch(c){return w(c),!1}return!0};function Xl(a){if(!a.hasAttribute("src")&&0=="srcset"in a){var b=a.getAttribute("srcset"),c=/\S+/.exec(b);if(null!=c){var d=c[0];a.setAttribute("src",d)}}};var Yl="alt title referrerpolicy aria-label aria-describedby aria-labelledby srcset src sizes".split(" ");function Zl(a){Kh.call(this,a);this.ff=this.Wb=!0;this.Lc=this.Mc=this.O=null}aa(Zl,Kh);f=Zl.prototype;f.mutatedAttributesCallback=function(a){if(this.O){var b=Yl.filter(function(b){return void 0!==a[b]});this.propagateAttributes(b,this.O,!0);Xl(this.O)}};
|
|
f.preconnectCallback=function(a){var b=this.element.getAttribute("src");b?this.preconnect.url(b,a):(b=this.element.getAttribute("srcset"))&&(b=/\S+/.exec(b))&&this.preconnect.url(b[0],a)};f.buildCallback=function(){this.ff=!this.element.hasAttribute("noprerender")};f.isLayoutSupported=function(a){return Ue(a)};
|
|
f.ec=function(){this.O||(this.Wb=!this.element.hasAttribute("fallback"),this.element.hasAttribute("i-amphtml-ssr")&&(this.O=this.element.querySelector("img")),this.O=this.O||new Image,this.O.setAttribute("decoding","async"),this.element.id&&this.O.setAttribute("amp-img-id",this.element.id),"img"==this.element.getAttribute("role")&&(this.element.removeAttribute("role"),this.user().error("AMP-IMG","Setting role=img on amp-img elements breaks screen readers please just set alt or ARIA attributes, they will be correctly propagated for the underlying <img> element.")),
|
|
this.propagateAttributes(Yl,this.O),Xl(this.O),this.applyFillContent(this.O,!0),this.element.appendChild(this.O))};f.prerenderAllowed=function(){return this.ff};f.reconstructWhenReparented=function(){return!1};f.layoutCallback=function(){var a=this;this.ec();var b=this.O;this.Mc=yd(b,"load",function(){return $l(a)});this.Lc=yd(b,"error",function(){return am(a)});return 0>=this.getLayoutWidth()?Promise.resolve():this.loadPromise(b)};
|
|
f.unlayoutCallback=function(){this.Lc&&(this.Lc(),this.Lc=null);this.Mc&&(this.Mc(),this.Mc=null);return!0};function $l(a){!a.Wb&&a.O.classList.contains("i-amphtml-ghost")&&a.getVsync().mutate(function(){a.O.classList.remove("i-amphtml-ghost");a.toggleFallback(!1)})}function am(a){a.Wb&&(a.getVsync().mutate(function(){a.O.classList.add("i-amphtml-ghost");a.toggleFallback(!0);a.togglePlaceholder(!1)}),a.Wb=!1)};function bm(a){Kh.apply(this,arguments)}aa(bm,Kh);bm.prototype.isLayoutSupported=function(a){return Ue(a)};bm.prototype.buildCallback=function(){var a=this.win.document.createElement("div");this.applyFillContent(a);this.getRealChildNodes().forEach(function(b){a.appendChild(b)});this.element.appendChild(a)};function cm(a){Kh.call(this,a);this.me=null}aa(cm,Kh);cm.prototype.isLayoutSupported=function(){return!0};
|
|
cm.prototype.buildCallback=function(){this.element.setAttribute("aria-hidden","true");(this.Bc=this.element.getAttribute("referrerpolicy"))&&C().assert("no-referrer"==this.Bc,'amp-pixel: invalid "referrerpolicy" value "'+this.Bc+'". Only "no-referrer" is supported');this.element.hasAttribute("i-amphtml-ssr")&&this.element.querySelector("img")?E().info("amp-pixel","inabox img already present"):T(this.getAmpDoc()).whenFirstVisible().then(this.sh.bind(this))};
|
|
cm.prototype.sh=function(){var a=this;if(this.me)return E().error("amp-pixel","duplicate pixel"),this.me;this.me=R(this.win).promise(1).then(function(){var b=a.element.getAttribute("src");if(b)return dc(a.element,"url-replace",!0).expandUrlAsync(dm(b)).then(function(b){var c=a.win,e=a.Bc;e&&"no-referrer"!==e&&C().error("pixel","Unsupported referrerPolicy: "+e);if("no-referrer"===e)if("referrerPolicy"in Image.prototype)c=ng(c,b,!0);else{var g=c.document,e=H({src:"about:blank",style:"display:none"}),
|
|
g=g.createElement("iframe"),h;for(h in e)g.setAttribute(h,e[h]);c.document.body.appendChild(g);ng(g.contentWindow,b);c=g}else c=ng(c,b);var k=c;E().info("amp-pixel","pixel triggered: ",b);return k})})};function dm(a){C().assert(/^(https\:\/\/|\/\/)/i.test(a),'The <amp-pixel> src attribute must start with "https://" or "//". Invalid value: '+a);return a};var em=["amp-ad","amp-embed","amp-video"],fm=["amp-mustache"];function gm(a){this.win=a;this.Ja=nd(a);this.$b={};this.Za=null}f=gm.prototype;f.registerExtension=function(a,b,c){var d=hm(this,a,!0);try{this.Za=a,b(c,c._),d.loaded=!0,d.resolve&&d.resolve(d.extension)}catch(e){throw d.error=e,d.reject&&d.reject(e),e;}finally{this.Za=null}};f.waitForExtension=function(a,b,c){return R(a).timeoutPromise(c||8E3,im(hm(this,b,!1)),"Render timeout waiting for extension "+b+" to be load.")};
|
|
f.preloadExtension=function(a,b){"amp-embed"==a&&(a="amp-ad");var c=hm(this,a,!1),d;c.loaded||c.error?d=!1:(void 0===c.scriptPresent&&(c.scriptPresent=!!this.win.document.head.querySelector('[custom-element="'+a+'"]')),d=!c.scriptPresent);if(d){d=b;b=this.win.document.createElement("script");b.async=!0;I(a,"_")?d="":b.setAttribute(0<=fm.indexOf(a)?"custom-template":"custom-element",a);b.setAttribute("data-script",a);b.setAttribute("i-amphtml-inserted","");var e;e=Ka.cdn;var g=r().rtvVersion;null==
|
|
d&&(d="0.1");b.src=e+"/rtv/"+g+"/v0/"+a+(d?"-"+d:"")+".js";this.win.document.head.appendChild(b);c.scriptPresent=!0}return im(c)};f.installExtensionForDoc=function(a,b,c){var d=this,e=a.getRootNode(),g=e.__AMP_EXT_LDR;g||(g=e.__AMP_EXT_LDR=G());if(g[b])return g[b];hi(a.win,b);return g[b]=this.preloadExtension(b,c).then(function(){return jm(d,a,b)})};f.reloadExtension=function(a,b){this.$b[a]&&delete this.$b[a];b.removeAttribute("custom-element");b.setAttribute("i-amphtml-loaded-new-version",a);return this.preloadExtension(a)};
|
|
f.loadElementClass=function(a){return this.preloadExtension(a).then(function(b){return b.elements[a].implementationClass})};f.addElement=function(a,b,c){km(this,a).extension.elements[a]={implementationClass:b,css:c};this.addDocFactory(function(d){lm(d,a,b,c)})};function lm(a,b,c,d){d?le(a,d,function(){mm(a.win,b,c)},!1,b):mm(a.win,b,c)}function mm(a,b,c){ei(a,b,c);O(a,b,nm)}f.addService=function(a,b){km(this).extension.services.push(a);this.addDocFactory(function(c){P(c,a,b,!0)})};
|
|
f.addDocFactory=function(a,b){var c=km(this,b);c.docFactories.push(a);if(this.Za&&(this.Ja.isSingleDoc()||this.Ja.hasAmpDocShell())){var d=this.Ja.getAmpDoc(this.win.document);(d.declaresExtension(this.Za)||c.auto)&&a(d)}};f.installExtensionsInDoc=function(a,b){var c=this,d=[];b.forEach(function(b){d.push(jm(c,a,b))});return Promise.all(d)};
|
|
function jm(a,b,c){var d=hm(a,c,!1);return im(d).then(function(){b.declareExtension(c);d.docFactories.forEach(function(a){try{a(b)}catch(g){w("Doc factory failed: ",g,c)}})})}
|
|
f.installExtensionsInChildWindow=function(a,b,c){var d=this,e=this.win;Hc(a,a.frameElement.ownerDocument.defaultView);om(a);pe(a.document,cssText$$module$build$css,null,!0,"amp-runtime");c&&c(a);pm(a);qm(e,a);rm(a);var g=[];b.forEach(function(b){em.includes(b)||hi(a,b);var c=d.preloadExtension(b).then(function(c){c.services.forEach(function(b){Kc(a,b)});var d=null,e={},g;for(g in c.elements){e.elementName=g;e.elementDef=c.elements[e.elementName];var h=(new Promise(function(c){return function(d){c.elementDef.css?
|
|
pe(a.document,c.elementDef.css,d,!1,b):d()}}(e))).then(function(b){return function(){ei(a,b.elementName,b.elementDef.implementationClass)}}(e));d?d.push(h):d=[h];e={elementDef:e.elementDef,elementName:e.elementName}}return d?Promise.all(d).then(function(){return c}):c});g.push(c)});return Promise.all(g)};
|
|
function hm(a,b,c){var d=a.$b[b];d||(d={extension:{elements:{},services:[]},auto:c,docFactories:[],promise:void 0,resolve:void 0,reject:void 0,loaded:void 0,error:void 0,scriptPresent:void 0},a.$b[b]=d);return d}function km(a,b){a.Za||E().error("extensions","unknown extension for ",b);return hm(a,a.Za||"_UNKNOWN_",!0)}
|
|
function im(a){if(!a.promise)if(a.loaded)a.promise=Promise.resolve(a.extension);else if(a.error)a.promise=Promise.reject(a.error);else{var b=new N;a.promise=b.promise;a.resolve=b.resolve;a.reject=b.reject}return a.promise}function qm(a,b){var c=di(a)["amp-img"];fi(b,"amp-img",c||Nh);a=di(a)["amp-pixel"];fi(b,"amp-pixel",a||Nh)}function rm(a){em.forEach(function(b){hi(a,b)})}function om(a){Ab(a);ac(a);bc(a)}function pm(a){Kc(a,"url");Kc(a,"action");Kc(a,"standard-actions");Kc(a,"navigation")}
|
|
function nm(){return{}};(function(){Ca=ta;E();C()})();(function(a){self.reportError=a})(function(a,b,c){xe(b,c);b&&a&&qa(b.message)&&!(0<=b.message.indexOf("\u200b\u200b\u200b\u200b"))&&L(a,"user-error-reporting")&&(b={errorName:b.name,errorMessage:b.message},a=nd(a).getAmpDoc().getRootNode(),se(a.documentElement||a.body||a,b))}.bind(null,self));
|
|
function sm(a){O(a,"crypto",cj);O(a,"batched-xhr",Di);O(a,"documentState",jj);O(a,"platform",Uj);O(a,"templates",ji);O(a,"timer",Qk);O(a,"timer",Qk);O(a,"vsync",Sl);O(a,"xhr",Bi);O(a,"input",Tj)}
|
|
function tm(a){var b=self;function c(a){function c(){g.then(function(){"function"==typeof a?a(b.AMP,b.AMP._):e.registerExtension(a.n,a.f,b.AMP)})}"function"!=typeof a&&a.i?um(e,a).then(function(){return vm(b,a,c)}):vm(b,a,c)}if(b.AMP_TAG)Promise.resolve();else{b.AMP_TAG=!0;var d=b.AMP||[];O(b,"extensions",gm);var e=pd(b);sm(b);rm(b);b.AMP={win:b,_:b.AMP?b.AMP._:void 0};b.AMP.config=La;b.AMP.BaseElement=Kh;b.AMP.BaseTemplate=ii;b.AMP.registerElement=e.addElement.bind(e);b.AMP.registerTemplate=function(a,
|
|
c){var d=Q(b,"templates");if(d.lb[a]){var e=d.Ic[a];C().assert(e,"Duplicate template type: %s",a);delete d.Ic[a];e(c)}else d.lb[a]=Promise.resolve(c)};b.AMP.registerServiceForDoc=e.addService.bind(e);b.AMP.isExperimentOn=L.bind(null,b);b.AMP.toggleExperiment=wb.bind(null,b);b.AMP.setLogLevel=sa.bind(null);b.AMP.setTickFunction=function(){};var g=a(b,e);for(a=0;a<d.length;a++){var h=d[a];if(wm(b,h))d.splice(a--,1);else if("function"==typeof h||"high"==h.p){try{c(h)}catch(k){E().error("runtime","Extension failed: ",
|
|
k,h.n)}d.splice(a--,1)}}xm(b,function(){b.AMP.push=function(a){wm(b,a)||c(a)};for(var a=0;a<d.length;a++){var e=d[a];if(!wm(b,e))try{c(e)}catch(n){E().error("runtime","Extension failed: ",n,e.n)}}d.length=0});b.AMP.push||(b.AMP.push=d.push.bind(d));rd(b).isIos()&&U(b.document.documentElement,"cursor","pointer")}}
|
|
function um(a,b){if(Array.isArray(b.i))return b=b.i.map(function(b){return a.preloadExtension(b)}),Promise.all(b);if("string"==typeof b.i)return a.preloadExtension(b.i);E().error("RUNTIME","dependency is neither an array or a string",b.i);return Promise.resolve()}function vm(a,b,c){"function"==typeof b||"high"==b.p?Promise.resolve().then(c):(c.displayName=b.n,sg(a.document,c))}
|
|
function ym(){tm(function(a){var b=nd(a).getAmpDoc();a.AMP.ampdoc=b;var c=T(a.document);a.AMP.viewer=c;r().development&&(a.AMP.toggleRuntime=c.toggleRuntime.bind(c),a.AMP.resources=sd(a.document));c=ud(a.document);a.AMP.viewport={};a.AMP.viewport.getScrollLeft=c.getScrollLeft.bind(c);a.AMP.viewport.getScrollWidth=c.getScrollWidth.bind(c);a.AMP.viewport.getWidth=c.getWidth.bind(c);return Pc(a.document).then(function(){gi(b)})})}
|
|
function wm(a,b){if(!L(a,"version-locking")||"function"==typeof b||"1533253141109"==b.v)return!1;var c=a.document.head.querySelector('[custom-element="'+b.n+'"]:not([i-amphtml-inserted])');if(!c)return!1;pd(a).reloadExtension(b.n,c);return!0}function xm(a,b){L(a,"pump-early-frame")?a.document.body?0<ke(a).length?b():R(a).delay(b,1):b():b()};function zm(){var a=self;jf(a.document,function(){return Am(a)})}
|
|
function Am(a){var b=0,c=a.performance;c&&c.timing&&c.timing.responseStart&&(b=Date.now()-c.timing.responseStart);var d=Math.max(1,250-b);a.setTimeout(function(){Bm(a);var b=a.document.styleSheets;if(b){for(var c=a.document.querySelectorAll('link[rel~="stylesheet"]:not([href^="'+String(Ka.cdn).replace(Lc,Mc)+'"])'),h=[],k=0;k<c.length;k++){for(var l=c[k],n=!1,m=0;m<b.length;m++)if(b[m].ownerNode==l){n=!0;break}n||h.push(l)}k={};for(l=0;l<h.length;k={oa:k.oa,media:k.media},l++)k.oa=h[l],k.media=k.oa.media||
|
|
"all",k.oa.media="not-matching",k.oa.onload=function(b){return function(){b.oa.media=b.media;Bm(a)}}(k),k.oa.setAttribute("i-amphtml-timeout",d),k.oa.parentNode.insertBefore(k.oa,k.oa.nextSibling)}},d)}function Bm(a){if(L(a,"font-display-swap")&&(a=a.document,a.fonts||a.fonts.values))for(var b=a.fonts.values();a=b.next();){var c=a.value;if(!c)break;"loading"==c.status&&"display"in c&&"auto"==c.display&&(c.display="swap")}};function Cm(a,b){this.V=a;this.G=b;this.Jc=!1;this.je=0;this.Ke=this.Zg.bind(this);this.Je=this.Yg.bind(this);this.Ie=this.Xg.bind(this);this.He=this.Wg.bind(this);this.V.addEventListener("touchstart",this.Ke,!0)}f=Cm.prototype;f.cleanup=function(){Dm(this);this.V.removeEventListener("touchstart",this.Ke,!0)};
|
|
f.Zg=function(a){this.Jc||!a.touches||1!=a.touches.length||0<this.G.getScrollTop()||(a=a.touches[0].clientY,this.Jc=!0,this.je=a,this.V.addEventListener("touchmove",this.Je,!0),this.V.addEventListener("touchend",this.Ie,!0),this.V.addEventListener("touchcancel",this.He,!0))};function Dm(a){a.Jc=!1;a.je=0;a.V.removeEventListener("touchmove",a.Je,!0);a.V.removeEventListener("touchend",a.Ie,!0);a.V.removeEventListener("touchcancel",a.He,!0)}
|
|
f.Yg=function(a){if(this.Jc){var b=a.touches[0].clientY-this.je;0<b&&a.preventDefault();0!=b&&Dm(this)}};f.Xg=function(){Dm(this)};f.Wg=function(){Dm(this)};function Em(){var a=self,b=a.location.href;if(!I(b,"about:")){var c=!1;r().development&&(c="0"!==p(a.location.originalHash||a.location.hash).validate);c?Fm(a.document,Ka.cdn+"/v0/validator.js").then(function(){amp.validator.validateUrlAndLog(b,a.document,r().filter)}):r().examiner&&Fm(a.document,Ka.cdn+"/examiner.js")}}function Fm(a,b){var c=a.createElement("script");c.src=b;b=Pd(c).then(function(){a.head.removeChild(c)},function(){});a.head.appendChild(c);return b};self.location&&(self.location.originalHash=self.location.hash);var Gm;try{Ae(),wh(),Gm=nd(self)}catch(a){throw re(self.document),a;}
|
|
sg(self.document,function initial(){var b=Gm.getAmpDoc(self.document);O(self,"performance",xh);var c=qd(self);self.document.documentElement.hasAttribute("i-amphtml-no-boilerplate")&&c.addEnabledExperiment("no-boilerplate");O(self,"platform",Uj);zm();c.tick("is");le(b,cssText$$module$build$css,function(){sg(self.document,function(){sm(self);P(b,"url",Rk,!0);P(b,"cid",Mi);P(b,"documentInfo",fj);Pg(b);P(b,"viewport",Pl,!0);P(b,"history",Sj);P(b,"resources",ck);gg(b);P(b,"action",Yg,!0);P(b,"standard-actions",
|
|
Gk,!0);Pk(b);P(b,"navigation",kj,!0);b.getRootNode().addEventListener("submit",qj,!0);c.coreServicesAvailable();vf()});sg(self.document,function e(){ym()});sg(self.document,function g(){var b=self;fi(b,"amp-img",Zl);fi(b,"amp-pixel",cm);fi(b,"amp-layout",bm)});sg(self.document,function(){gi(b)});sg(self.document,function h(){var b=self;"0"==T(b.document).getParam("p2r")&&rd(b).isChrome()&&new Cm(b.document,ud(b.document));Em();re(self.document,!0)});sg(self.document,function k(){c.tick("e_is");sd(b).ampInitComplete();
|
|
c.flush()})},!0,"amp-runtime")});self.console&&(console.info||console.log).call(console,"Powered by AMP \u26a1 HTML \u2013 Version 1533253141109",self.location.href);self.document.documentElement.setAttribute("amp-version","1533253141109");})(AMP._={})}catch(e){setTimeout(function(){var s=document.body.style;s.opacity=1;s.visibility="visible";s.animation="none";s.WebkitAnimation="none;"},1000);throw e};
|
|
//# sourceMappingURL=v0.js.map
|