self.AMP_CONFIG={"v":"012203041950000","type":"production","allow-doc-opt-in":["amp-next-page"],"allow-url-opt-in":[],"canary":0,"a4aProfilingRate":0.01,"doubleclickSraExp":0.01,"doubleclickSraReportExcludedBlock":0.1,"flexAdSlots":0.05,"flexible-bitrate":0.1,"ios-fixed-no-transfer":0,"story-ad-placements":0.01,"story-disable-animations-first-page":1,"story-load-inactive-outside-viewport":1,"amp-sticky-ad-to-amp-ad-v4":0,"esm":1};/*AMP_CONFIG*/self.AMP_EXP={"flexible-bitrate":0.1,"amp-story-first-page-max-bitrate":0.3,"story-disable-animations-first-page":1,"story-load-first-page-only":1,"story-load-inactive-outside-viewport":1,"story-ad-page-outlink":0.02,"amp-geo-ssr":1};/*AMP_EXP*/; self,self.AMP=self.AMP||[];try{AMP._=AMP._||{},self.AMP&&!Array.isArray(self.AMP)||(()=>{var t,i=class{constructor(){this.nt=new s}abort(){if(!this.nt.rt&&(this.nt.rt=!0,this.nt.ot)){const t={"type":"abort","bubbles":!1,"cancelable":!1,"target":this.nt,"currentTarget":this.nt};this.nt.ot(t)}}get signal(){return this.nt}},s=class{constructor(){this.rt=!1,this.ot=null}get aborted(){return this.rt}get onabort(){return this.ot}set onabort(t){this.ot=t}};function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var s=0,e=new Array(i);s=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(){return t||(t=Promise.resolve(void 0))}var h=class{constructor(){this.promise=new Promise(((t,i)=>{this.resolve=t,this.reject=i}))}};function o(t){return new Promise((i=>{i(t())}))}function u(t){const i=Object.getOwnPropertyDescriptor(t,"message");if(null!=i&&i.writable)return t;const{message:s,stack:e}=t,n=new Error(s);for(const i in t)n[i]=t[i];return n.stack=e,n}function l(t){let i=null,s="";for(var e,r=n(arguments,!0);!(e=r()).done;){const t=e.value;t instanceof Error&&!i?i=u(t):(s&&(s+=" "),s+=t)}return i?s&&(i.message=s+": "+i.message):i=new Error(s),i}function c(t){var i,s;null===(i=(s=self).__AMP_REPORT_ERROR)||void 0===i||i.call(s,t)}function a(t){const i=l.apply(null,arguments);setTimeout((()=>{throw c(i),i}))}function d(t){const i=l.apply(null,arguments);return i.expected=!0,i}var{hasOwnProperty:f,toString:p}=Object.prototype;function m(t){return"[object Object]"===p.call(t)}function _(t){const i=Object.create(null);return t&&Object.assign(i,t),i}function A(t,i){return f.call(t,i)}function P(t){const i=_();for(const s in t){if(!A(t,s))continue;const e=t[s];i[s]=m(e)?P(e):e}return i}function g(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}function v(t,i){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);i&&(e=e.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),s.push.apply(s,e)}return s}function E(t){for(var i=1;i=0&&t.indexOf(i,s)==s}function w(t){return"string"==typeof t}function V(t){return 1==(null==t?void 0:t.nodeType)}function S(t){return"number"==typeof t&&isFinite(t)}var x="​​​",O="​​​​";function C(t){return V(t)?(t=t).tagName.toLowerCase()+(t.id?`#${t.id}`:""):t}function k(t){return t.indexOf(x)>=0}function N(t){return t.replace(x,"")}function D(t,i,s="Assertion failed",e){var n,r;if(i)return i;t&&-1==s.indexOf(t)&&(s+=t);let h=3;const o=s.split("%s");let u=o.shift();const l=[u];for(;o.length;){const t=arguments[h++],i=o.shift();u+=C(t)+i,l.push(t,i.trim())}const c=new Error(u);throw c.messageArray=I(l,(t=>""!==t)),null===(n=(r=self).__AMP_REPORT_ERROR)||void 0===n||n.call(r,c),c}function L(t,i,s,e,n){return T(n)?t(s,n.concat([i])):t(s,`${n||e}: %s`,i),i}function U(t,i,s,e,n,r,h,o,u,l,c){return t}function $(t,i){return t}function F(t,i){return t}function B(t,i){return t}function H(t,i,s,e,n,r,h,o,u,l,c){return D(x,t,i,s,e,n,r,h,o,u,l,c)}function j(t){return JSON.parse(t)}function z(t){const i=new Uint8Array(t.length);for(let s=0;s0?e=t.setTimeout(h,o):(u=r,r=null,i.apply(null,u))}return function(...i){n=t.Date.now(),r=i,e||(e=t.setTimeout(h,s))}}var K=["javascript:","data:","vbscript:"],Y=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function Q(t,i=""){try{return decodeURIComponent(t)}catch(t){return i}}function J(t){const i=_();if(!t)return i;let s;for(;s=Y.exec(t);){const t=Q(s[1],s[1]),e=s[2]?Q(s[2].replace(/\+/g," "),s[2]):"";i[t]=e}return i}function X(t){const{location:i}=t||self;return J(i.originalHash||i.hash)}var Z=self.AMP_CONFIG||{},tt=("string"==typeof Z.thirdPartyFrameRegex?new RegExp(Z.thirdPartyFrameRegex):Z.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,it=("string"==typeof Z.cdnProxyRegex?new RegExp(Z.cdnProxyRegex):Z.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function st(t){if(!self.document||!self.document.head)return null;if(self.location&&it.test(self.location.origin))return null;const i=self.document.head.querySelector(`meta[name="${t}"]`);return i&&i.getAttribute("content")||null}var et={thirdParty:Z.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:Z.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:tt,cdn:Z.cdnUrl||st("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:it,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:Z.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:Z.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:Z.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:Z.geoApiUrl||st("amp-geo-api")},nt={urls:et},rt="";function ht(t){const i=t||self;return i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:ut(t,X(t)),esm:!0,test:!1,rtvVersion:ot(t)}}(i)}function ot(t){var i;return rt||(rt=(null===(i=t.AMP_CONFIG)||void 0===i?void 0:i.v)||"012203041950000"),rt}function ut(t,i){const s=i||X(t);return["1","actions","amp","amp4ads","amp4email"].includes(s.development)||!!t.AMP_DEV_MODE}var lt=()=>{},ct=void 0;function at(t){ct=t}var dt=(t,i)=>i.reduce(((t,i)=>`${t}&s[]=${ft(i)}`),`https://log.amp.dev/?v=012203041950000&id=${encodeURIComponent(t)}`),ft=t=>encodeURIComponent(String(C(t))),pt=t=>parseInt(X(t).log,10);self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var mt=self.__AMP_LOG,_t=null;function At(t,i){if(!_t)throw new Error("failed to call initLogConstructor");return new _t(self,t,i)}function Pt(t){return mt.user||(mt.user=gt(x)),function(t,i){return i&&i.ownerDocument.defaultView!=t}(mt.user.win,t)?mt.userForEmbed||(mt.userForEmbed=gt(O)):mt.user}function gt(t){return At(((t,i)=>i||t>=1?4:2),t)}function vt(){return mt.dev||(mt.dev=At((t=>t>=3?4:t>=2?3:0)))}function Et(t,i,s,e,n,r,h,o,u,l,c){return t}function Tt(t,i,s,e,n,r,h,o,u,l,c){return Pt().assert(t,i,s,e,n,r,h,o,u,l,c)}function Mt(t){return(t.ownerDocument||t).defaultView}function It(t,i){return t.replace(/^|,/g,`$&${i} `)}function Rt(t){return CSS.escape(t)}function yt(t){U(/^[\w-]+$/.test(t))}function bt(t,i){return t.querySelector(It(i,":scope"))}function wt(t,i){const s=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!s&&s.call(t,i)}function Vt(t,i,s){let e;for(e=t;e&&e!==s;e=e.parentElement)if(i(e))return e;return null}function St(t,i){return t.closest?t.closest(i):Vt(t,(t=>wt(t,i)))}function xt(t,i){for(let s=t.lastElementChild;s;s=s.previousElementSibling)if(i(s))return s;return null}function Ot(t,i){return yt(i),bt(t,`> [${i}]`)}function Ct(t){return!!function(t){let i;return w(t)?i=t:V(t)&&(i=t.tagName),!!i&&i.toLowerCase().startsWith("i-")}(t)||t.nodeType===Node.ELEMENT_NODE&&($(t),t.hasAttribute("placeholder")||t.hasAttribute("fallback")||t.hasAttribute("overflow"))}var kt={bubbles:!0,cancelable:!0};function Nt(t,i,s){if(i(t))s();else{const e=new(Mt(t).MutationObserver)((()=>{i(t)&&(e.disconnect(),s())}));e.observe(t,{childList:!0})}}function Dt(t,i){Nt(t.documentElement,(()=>!!t.body),i)}function Lt(t){return new Promise((i=>Dt(t,i)))}function Ut(t){var i;null===(i=t.parentElement)||void 0===i||i.removeChild(t)}function $t(t){const i=t.isConnected;if(void 0!==i)return i;let s=t;for(;s=Ft(s),s.host;)s=s.host;return s.nodeType===Node.DOCUMENT_NODE}function Ft(t){if(Node.prototype.getRootNode)return t.getRootNode();let i;for(i=t;i.parentNode&&(!(s=i)||"I-AMPHTML-SHADOW-ROOT"!=s.tagName&&(11!=s.nodeType||"[object ShadowRoot]"!==Object.prototype.toString.call(s)));i=i.parentNode);var s;return i}function Bt(t,i){let s=t;do{if(s.nextSibling)return!0}while((s=s.parentNode)&&s!=i);return!1}function Ht(t){try{t.focus()}catch(t){}}function jt(t){return t.parent&&t.parent!=t}function zt(t,i,s,e){const n=s||{};U(t.ownerDocument);const r=t.ownerDocument.createEvent("Event");r.data=n;const{bubbles:h,cancelable:o}=e||kt;r.initEvent(i,h,o),t.dispatchEvent(r)}function Gt(t,i){return i!==t&&t.contains(i)}function qt(t){return t.hasAttribute("i-amphtml-ssr")}function Wt(t,i){const s=t.head.querySelector("script[nonce]");if(s){const t=s.nonce||s.getAttribute("nonce");i.setAttribute("nonce",null!=t?t:"")}}function Kt(t,i,s,e){return{left:t,top:i,width:s,height:e,bottom:i+e,right:t+s,x:t,y:i}}function Yt(t,i,s){return Kt(t.left-t.width*i,t.top-t.height*s,t.width*(1+2*i),t.height*(1+2*s))}function Qt(t,i,s){return 0==i&&0==s||0==t.width&&0==t.height?t:Kt(t.left+i,t.top+s,t.width,t.height)}function Jt(t){return!t.IntersectionObserver||!t.IntersectionObserverEntry||!!t.IntersectionObserver._stub||!function(t){try{return new t.IntersectionObserver((()=>{}),{root:t.document}),!0}catch(t){return!1}}(t)||function(t){return/apple/i.test(t.navigator.vendor)}(t)}var Xt=class{constructor(t,i){this.st=t,this.it=E({root:null,rootMargin:"0px 0px 0px 0px"},i),this.ct=[],this.ut=null,Xt._upgraders.push(this.lt.bind(this))}get root(){return this.ut?this.ut.root:this.it.root||null}get rootMargin(){return this.ut?this.ut.rootMargin:this.it.rootMargin}get thresholds(){return this.ut?this.ut.thresholds:[].concat(this.it.threshold||0)}disconnect(){this.ut?this.ut.disconnect():this.ct.length=0}takeRecords(){return this.ut?this.ut.takeRecords():[]}observe(t){this.ut?this.ut.observe(t):-1==this.ct.indexOf(t)&&this.ct.push(t)}unobserve(t){if(this.ut)this.ut.unobserve(t);else{const i=this.ct.indexOf(t);-1!=i&&this.ct.splice(i,1)}}lt(t){const i=new t(this.st,this.it);this.ut=i;for(var s,e=n(this.ct,!0);!(s=e()).done;){const t=s.value;i.observe(t)}this.ct.length=0}};Xt._upgraders=[];var{hasOwnProperty:Zt}=Object.prototype;function ti(t){return!t.ResizeObserver||!!t.ResizeObserver._stub}var ii,si=class{constructor(t){this.st=t,this.ct=[],this.ut=null,si._upgraders.push(this.lt.bind(this))}disconnect(){this.ut?this.ut.disconnect():this.ct.length=0}observe(t){this.ut?this.ut.observe(t):-1==this.ct.indexOf(t)&&this.ct.push(t)}unobserve(t){if(this.ut)this.ut.unobserve(t);else{const i=this.ct.indexOf(t);-1!=i&&this.ct.splice(i,1)}}lt(t){const i=new t(this.st);this.ut=i;for(var s,e=n(this.ct,!0);!(s=e()).done;){const t=s.value;i.observe(t)}this.ct.length=0}};si._upgraders=[],self.document&&(Jt(ii=self)&&function(t){if(!t.IntersectionObserver)return t.IntersectionObserver=Xt,void(t.IntersectionObserver._stub=Xt);const i=t.IntersectionObserver;t.IntersectionObserver=function(t,i){return function(s,e){var n;return 9===(null==e||null===(n=e.root)||void 0===n?void 0:n.nodeType)?new i(s,e):new t(s,e)}}(t.IntersectionObserver,Xt),t.IntersectionObserver._stub=Xt,t.IntersectionObserver._native=i}(ii),function(t){t.IntersectionObserverEntry&&!("isIntersecting"in t.IntersectionObserverEntry.prototype)&&Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{enumerable:!0,configurable:!0,get(){return this.intersectionRatio>0}})}(ii),function(t){ti(t)&&function(t){t.ResizeObserver||(t.ResizeObserver=si,t.ResizeObserver._stub=si)}(t)}(self),function(t){t.AbortController||(Object.defineProperty(t,"AbortController",{configurable:!0,enumerable:!1,writable:!0,value:i}),Object.defineProperty(t,"AbortSignal",{configurable:!0,enumerable:!1,writable:!0,value:s}))}(self));var ei="cls",ni="clstu",ri="cls-1",hi="pc",oi="building",ui="mounting",li="loading",ci="complete",ai="error";function di(t){return t.readyState!=li&&"uninitialized"!=t.readyState}function fi(t){return t.readyState==ci}function pi(t,i){mi(t,di,i)}function mi(t,i,s){let e=i(t);if(e)s(t);else{const n=()=>{i(t)&&(e||(e=!0,s(t)),t.removeEventListener("readystatechange",n))};t.addEventListener("readystatechange",n)}}function _i(t){return new Promise((i=>{pi(t,i)}))}function Ai(t){return new Promise((i=>{mi(t,fi,i)}))}var Pi=["amp-mustache"];function gi(t){if(!t)return null;const i=t.match(/^(.*)\/(.*)-([0-9.]+|latest)(\.max)?\.(?:js|mjs)$/i),s=i?i[2]:void 0,e=i?i[3]:void 0;return s&&e?{extensionId:s,extensionVersion:e}:null}function vi(t,i,s){const e=t.document.createElement("script");e.async=!0,Ti(i)?s="":e.setAttribute(Pi.indexOf(i)>=0?"custom-template":"custom-element",i),e.setAttribute("data-script",i),e.setAttribute("i-amphtml-inserted",""),e.setAttribute("type","module"),Wt(t.document,e),e.setAttribute("crossorigin","anonymous");const n=function(t,i,s,e){return`${et.cdn}/rtv/${ht().rtvVersion}/v0/${i}${s?"-"+s:""}.mjs`}(t.location,i,s);return e.src=n,e}function Ei(t,i,s,e,n=!0){const r=":not([i-amphtml-loaded-new-version])"+(n?"":":not([i-amphtml-inserted])"),h=t.document.head.querySelectorAll(`script[src*="/${i}-"]${r}`),o=[];for(let t=0;t{})),{obj:null,promise:i,resolve:e,reject:s,context:null,ctor:null}}(),e[i].promise}function Li(t,i){const s=Ui(t)[i];return s?s.promise?s.promise:(ki(t,i),s.promise=Promise.resolve(s.obj)):null}function Ui(t){let i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function $i(t){return"function"==typeof t.dispose}function Fi(t,i){if($i(i))try{(function(t){return Et($i(t)),t})(i).dispose()}catch(i){vt().error("SERVICE","failed to dispose service",t,i)}}function Bi(t,i){const s=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!s||!s.ctor)}function Hi(t,i,s,e){return ji(t,i,s,e).then((t=>function(t,i,s){return Tt(t,"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.",i,s,s,s)}(t,i,s)))}function ji(t,i,s,e){const n=Vi(t,i);if(n)return n;const r=Oi(t);return r.whenExtensionsKnown().then((()=>{const t=r.getExtensionVersion(s);return t?Ri(r.win,"extensions").waitForExtension(s,t):null})).then((s=>s?e?Vi(t,i):wi(t,i):null))}var zi,Gi=t=>ji(t,"access","amp-access"),qi=t=>ji(t,"subscriptions","amp-subscriptions"),Wi=t=>bi(t,"action"),Ki=t=>Hi(t,"activity","amp-analytics"),Yi=t=>Oi(t),Qi=t=>Ri(t,"ampdoc"),Ji=t=>function(t,i,s){const e=bi(t,i);return e?Promise.resolve(e):ji(t,i,s)}(t,"bind","amp-bind"),Xi=t=>wi(t,"cid"),Zi=t=>Ri(t,"crypto"),ts=t=>yi(t,"documentInfo").get(),is=t=>Ri(t,"extensions"),ss=t=>yi(t,"history"),es=t=>yi(t,"mutator"),ns=t=>Ri(t,"performance"),rs=t=>function(t,i){return Bi(t=Si(t),i)?ki(t,i):null}(t,"performance"),hs=t=>Ri(t,"platform"),os=t=>Ri(t,"preconnect"),us=t=>yi(t,"resources"),ls=t=>wi(t,"storage"),cs=t=>function(t,i){return ki(t,"timer")}(t),as=t=>bi(t,"url-replace"),ds=t=>ji(t,"geo","amp-geo",!0),fs=t=>bi(t,"url"),ps=t=>yi(t,"viewer"),ms=t=>Ri(t,"vsync"),_s=t=>yi(t,"viewport"),As=t=>Ri(t,"xhr"),Ps={PRERENDER:"prerender",PREVIEW:"preview",VISIBLE:"visible",HIDDEN:"hidden",PAUSED:"paused",INACTIVE:"inactive"},gs=class{constructor(){this._t=null}add(t){return this._t||(this._t=[]),this._t.push(t),()=>{this.remove(t)}}remove(t){this._t&&y(this._t,t)}removeAll(){this._t&&(this._t.length=0)}fire(t){if(this._t)for(var i,s=n(this._t,!0);!(i=s()).done;)(0,i.value)(t)}getHandlerCount(){var t,i;return null!==(t=null===(i=this._t)||void 0===i?void 0:i.length)&&void 0!==t?t:0}},vs=class{constructor(){this.Et=_(),this.Tt=null}get(t){const i=this.Et[t];return null==i?null:i}whenSignal(t){var i;let s=null===(i=this.Tt)||void 0===i?void 0:i[t];if(!s){const i=this.Et[t];s=null!=i?{promise:"number"==typeof i?Promise.resolve(i):Promise.reject(i)}:new h,this.Tt||(this.Tt=_()),this.Tt[t]=s}return s.promise}signal(t,i){var s;if(null!=this.Et[t])return;const e=null!=i?i:Date.now();this.Et[t]=e;const n=null===(s=this.Tt)||void 0===s?void 0:s[t];null!=n&&n.resolve&&(n.resolve(e),n.resolve=void 0,n.reject=void 0)}rejectSignal(t,i){var s;if(null!=this.Et[t])return;this.Et[t]=i;const e=null===(s=this.Tt)||void 0===s?void 0:s[t];null!=e&&e.reject&&(e.reject(i),e.promise.catch((()=>{})),e.resolve=void 0,e.reject=void 0)}reset(t){var i;this.Et[t]&&delete this.Et[t];const s=null===(i=this.Tt)||void 0===i?void 0:i[t];s&&!s.resolve&&delete this.Tt[t]}},Es=["Webkit","webkit","Moz","moz","ms","O","o"],Ts={"getPropertyPriority":()=>"","getPropertyValue":()=>""};function Ms(t){const i=t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()));return Es.some((t=>i.startsWith(t+"-")))?`-${i}`:i}function Is(t,i,s){if(i.startsWith("--"))return i;zi||(zi=_());let e=zi[i];if(!e||s){if(e=i,void 0===t[i]){const s=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),n=function(t,i){for(let s=0;sCs(this.win.document,r))),this.Lt()}dispose(){(function(t){const i=Ui(t);for(const t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const s=i[t];s.sharedInstance||(s.obj?Fi(t,s.obj):s.promise&&s.promise.then((i=>Fi(t,i))))}})(this),this.Dt.forEach((t=>t()))}isSingleDoc(){return Et(null)}getParent(){return this.Mt}signals(){return this.Rt}getParam(t){const i=this.Vt[t];return null==i?null:i}getMeta(){return this.St||(this.St=_(),function(t,i){const{length:s}=t;for(let e=0;e{const i=t.getAttribute("name"),s=t.getAttribute("content");i&&null!==s&&void 0===this.St[i]&&(this.St[i]=s)}))),_(this.St)}getMetaByName(t){if(!t)return null;const i=this.getMeta()[t];return void 0!==i?i:null}setMetaByName(t,i){Et(null)}declaresExtension(t,i){const s=this.Ot[t];return!(!s||i&&s!==i)}declareExtension(t,i){Et(!this.Ot[t]||this.Ot[t]===i),this.Ot[t]=i}getExtensionVersion(t){return this.Ot[t]||null}setExtensionsKnown(){this.Rt.signal(Ls)}whenExtensionsKnown(){return this.Rt.whenSignal(Ls)}getRootNode(){return Et(null)}getHeadNode(){}isBodyAvailable(){return Et(!1)}getBody(){return Et(null)}waitForBodyOpen(){return Et(null)}isReady(){return Et(null)}whenReady(){return Et(null)}getUrl(){return Et(null)}getElementById(t){return this.getRootNode().getElementById(t)}contains(t){return this.getRootNode().contains(t)}overrideVisibilityState(t){this.Ct!=t&&(this.Ct=t,this.Lt())}Lt(){const t=xs(this.win.document);let i,s=Ps.VISIBLE;for(let t=this.Mt;t;t=t.getParent())if(t.getVisibilityState()!=Ps.VISIBLE){s=t.getVisibilityState();break}const e=this.Ct||Ps.VISIBLE;if(i=e==Ps.VISIBLE&&s==Ps.VISIBLE&&t==Ps.VISIBLE?Ps.VISIBLE:t==Ps.HIDDEN&&e==Ps.PAUSED?t:e==Ps.PAUSED||e==Ps.INACTIVE?e:s==Ps.PAUSED||s==Ps.INACTIVE?s:e==Ps.PREVIEW||t==Ps.PREVIEW||s==Ps.PREVIEW?Ps.PREVIEW:e==Ps.PRERENDER||t==Ps.PRERENDER||s==Ps.PRERENDER?Ps.PRERENDER:Ps.HIDDEN,this.D!=i){if(i==Ps.VISIBLE){var n;const{performance:t}=this.win;let i=Math.floor(null!==(n=t.timeOrigin)&&void 0!==n?n:t.timing.navigationStart);null!=this.D&&(i+=Math.floor(t.now())),this.Nt=i,this.Rt.signal(Us,i),this.Rt.signal($s,i)}else this.Rt.reset($s);this.D=i,this.kt.fire()}}whenFirstVisible(){return this.Rt.whenSignal(Us).then((()=>{}))}whenNextVisible(){return this.Rt.whenSignal($s).then((()=>{}))}getFirstVisibleTime(){return this.Rt.get(Us)}getLastVisibleTime(){return this.Nt}getVisibilityState(){return Et(this.D)}isVisible(){return this.D==Ps.VISIBLE}hasBeenVisible(){return null!=this.getLastVisibleTime()}onVisibilityChanged(t){return this.kt.add(t)}registerSingleton(t){return!this.It[t]&&(this.It[t]=!0,!0)}},Bs=class extends Fs{constructor(t,i){super(t,null,i),this.Ut=this.win.document.body?Promise.resolve(this.win.document.body):Lt(this.win.document).then((()=>this.getBody())),this.$t=_i(this.win.document)}isSingleDoc(){return!0}getRootNode(){return this.win.document}getUrl(){return Ns.getLocation(this.win).href}getHeadNode(){return this.win.document.head}isBodyAvailable(){return!!this.win.document.body}getBody(){return this.win.document.body}waitForBodyOpen(){return this.Ut}isReady(){return di(this.win.document)}whenReady(){return this.$t}},Hs=class extends Fs{constructor(t,i,s,e){super(t,null,e),this.Ft=i,this.Bt=s,this.Ht=null;const n=new h;this.Ut=n.promise,this.zt=n.resolve,this.Gt=!1;const r=new h;this.$t=r.promise,this.qt=r.resolve}isSingleDoc(){return!1}getRootNode(){return this.Bt}getUrl(){return this.Ft}getHeadNode(){return this.Bt}isBodyAvailable(){return!!this.Ht}getBody(){return this.Ht}setBody(t){Et(!this.Ht),this.Ht=t,this.zt(t),this.zt=void 0}waitForBodyOpen(){return this.Ut}isReady(){return this.Gt}setReady(){Et(!this.Gt),this.Gt=!0,this.qt(),this.qt=void 0}whenReady(){return this.$t}getMeta(){return _(this.St)}setMetaByName(t,i){Et(t),this.St||(this.St=_()),this.St[t]=i}},js=class extends Fs{constructor(t,i,s,e){super(t,s,e),this.Ft=i,this.Ut=this.win.document.body?Promise.resolve(this.win.document.body):Lt(this.win.document).then((()=>this.getBody())),this.Gt=!1;const n=new h;this.$t=n.promise,this.qt=n.resolve}isSingleDoc(){return!1}getRootNode(){return this.win.document}getUrl(){return this.Ft}getHeadNode(){return this.win.document.head}isBodyAvailable(){return!!this.win.document.body}getBody(){return this.win.document.body}waitForBodyOpen(){return this.Ut}isReady(){return this.Gt}whenReady(){return this.$t}setReady(){Et(!this.Gt),this.Gt=!0,this.qt(),this.qt=void 0}};function zs(t,i){const s=_();return i?Object.assign(s,i):(t.name&&0==t.name.indexOf(Ds)&&Object.assign(s,J(t.name.substring(Ds.length))),t.location&&t.location.hash&&Object.assign(s,J(t.location.hash))),s}var Gs="nodisplay",qs="fixed",Ws="fixed-height",Ks="responsive",Ys="container",Qs="fill",Js="flex-item",Xs="fluid",Zs="intrinsic",te=/^amp\-(video|.+player)|AMP-BRIGHTCOVE|AMP-DAILYMOTION|AMP-YOUTUBE|AMP-VIMEO|AMP-IMA-VIDEO/i;function ie(t){if("nodisplay"===(i=t)||"fixed"===i||"fixed-height"===i||"responsive"===i||"container"===i||"fill"===i||"flex-item"===i||"fluid"===i||"intrinsic"===i)return t;var i}function se(t){return"i-amphtml-layout-"+t}function ee(t){return t==qs||t==Ws||t==Ks||t==Qs||t==Js||t==Xs||t==Zs}function ne(t){return"number"==typeof t?t+"px":t&&/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)?$/.test(t)?/^\d+(\.\d+)?$/.test(t)?t+"px":t:void 0}function re(t){!function(t){H(/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|q|in|pc|pt)$/.test(null!=t?t:""),"Invalid length value: %s",t)}(t);const i=/[a-z]+/i.exec(null!=t?t:"");return H(i,"Failed to read units from %s",t),i[0]}function he(t){const i=parseFloat(t);return S(i)?i:void 0}function oe(t,i){t.classList.add("i-amphtml-fill-content"),i&&t.classList.add("i-amphtml-replaced-content")}function ue(t,i,s,e){for(var r,h=n(M(t),!0);!(r=h()).done;){const t=r.value,n=i.getAttribute(t);null!==n?s.setAttribute(t,n):e&&s.removeAttribute(t)}}var le,ce="amp:attached",ae="amp:load-start",de="amp:load-end",fe="ready-upgrade",pe="upgraded",me="built",_e="mounted",Ae="load-start",Pe="render-start",ge="load-end",ve="unload";function Ee(t,i){return[{query:t.matchMedia(i),value:"1"},{query:null,value:""}]}function Te(t,i){return i.split(",").map((i=>{if(0==(i=i.replace(/\s+/g," ").trim()).length)return;let s,e,n;if(")"==i.charAt(i.length-1)){let t=1;for(n=i.length-2;n>=0;n--){const s=i.charAt(n);if("("==s?t--:")"==s&&t++,0==t)break}const s=n-1;if(n>0)for(n--;n>=0;n--){const t=i.charAt(n);if(!("%"==t||"-"==t||"_"==t||t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"))break}if(n>=s)return null}else for(n=i.length-2;n>=0;n--){const t=i.charAt(n);if(!("%"==t||"."==t||t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"))break}return n>=0?(s=i.substring(0,n+1).trim(),e=i.substring(n+1).trim()):(e=i,s=void 0),e?{query:s?t.matchMedia(s):null,value:e}:null})).filter(Boolean)}function Me(t,i,s){for(let e=0;e'],be={"AMP-PIXEL":{width:"0px",height:"0px"},"AMP-ANALYTICS":{width:"1px",height:"1px"},"AMP-AUDIO":null,"AMP-SOCIAL-SHARE":{width:"60px",height:"44px"}};function we(t){const i=t.getAttribute("layout"),s=t.getAttribute("width"),e=t.getAttribute("height"),n=t.getAttribute("sizes"),r=t.getAttribute("heights"),h=i?ie(i):null;H(void 0!==h,'Invalid "layout" value: %s, %s',i,t);const o=s&&"auto"!=s?ne(s):s;H(void 0!==o,'Invalid "width" value: %s, %s',s,t);const u=e&&"fluid"!=e?ne(e):e;let l,c,a;if(H(void 0!==u,'Invalid "height" value: %s, %s',e,t),h&&h!=qs&&h!=Ws||o&&u||(d=(d=t.tagName).toUpperCase(),void 0===be[d]))l=o,c=u;else{const i=function(t){const i=t.tagName.toUpperCase();if(U(void 0!==be[i]),!be[i]){const s=t.ownerDocument,e=i.replace(/^AMP\-/,""),n=s.createElement(e);n.controls=!0,bs(n,{position:"absolute",visibility:"hidden"}),s.body.appendChild(n),be[i]={width:(n.offsetWidth||1)+"px",height:(n.offsetHeight||1)+"px"},s.body.removeChild(n)}return be[i]}(t);l=o||h==Ws?o:i.width,c=u||i.height}var d;return a=h||(l||c?"fluid"==c?Xs:!c||l&&"auto"!=l?c&&l&&(n||r)?Ks:qs:Ws:Ys),a!=qs&&a!=Ws&&a!=Ks&&a!=Zs||H(c,'The "height" attribute is missing: %s',t),a==Ws&&H(!l||"auto"==l,'The "width" attribute must be missing or "auto": %s',t),a!=qs&&a!=Ks&&a!=Zs||H(l&&"auto"!=l,'The "width" attribute must be present and not "auto": %s',t),a==Ks||a==Zs?H(re(l)==re(c),'Length units should be the same for "width" and "height": %s, %s, %s',s,e,t):H(null===r,'"heights" attribute must be missing: %s',t),{layout:a,width:l,height:c}}var Ve,Se="amp-experiment-toggles",xe="__AMP__EXPERIMENT_TOGGLES";function Oe(t,i){return!!ke(t)[i]}function Ce(t,i,s,e){const n=Oe(t,i),r=null!=s?s:!n;if(r!=n&&(ke(t)[i]=r,!e)){const s=Ne(t);s[i]=r,function(t,i){const s=[];for(const t in i)s.push((!1===i[t]?"-":"")+t);try{var e;null===(e=t.localStorage)||void 0===e||e.setItem(Se,s.join(","))}catch(t){Pt().error("EXPERIMENTS","Failed to save experiments to localStorage.")}}(t,s)}return r}function ke(t){var i,s,e,r,h;if(t[xe])return t[xe];t[xe]=_();const o=t[xe];U(o);const u=E(E({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(s=t.AMP_EXP)&&void 0!==s?s:j((null===(e=t.__AMP_EXP)||void 0===e?void 0:e.textContent)||"{}"));for(const t in u){const i=u[t];"number"==typeof i&&i>=0&&i<=1&&(o[t]=Math.random(){try{return r(t)}catch(t){var i,s;throw null===(i=(s=self).__AMP_REPORT_ERROR)||void 0===i||i.call(s,t),t}};const o=function(){if(void 0!==Ve)return Ve;Ve=!1;try{const t={get capture(){return Ve=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Ve}(),u=!(null==e||!e.capture);return n.addEventListener(i,h,o?e:u),()=>{null==n||n.removeEventListener(i,h,o?e:u),r=null,n=null,h=null}}var Le="Failed to load:";function Ue(t,i,s,e){const n={detail:s};return Object.assign(n,e),new t.CustomEvent(i,n)}function $e(t,i,s,e){return De(t,i,s,e)}function Fe(t){return t.data}function Be(t,i,s,e){let n=s;const r=De(t,i,(t=>{try{n(t)}finally{n=null,r()}}),e);return r}function He(t){let i,s;if(function(t){return!!(t.complete||"complete"==t.readyState||je(t)&&t.readyState>0||t.document&&"complete"==t.document.readyState)}(t))return Promise.resolve(t);const e=je(t);return e&&t.__AMP_MEDIA_LOAD_FAILURE_SRC===t.currentSrc?Promise.reject(t):new Promise(((n,r)=>{if(i=e?Be(t,"loadedmetadata",n,{capture:!0}):Be(t,"load",n),!t.tagName)return;let h=t;if(e&&!t.hasAttribute("src")&&(h=xt(t,(t=>"SOURCE"===t.tagName)),!h))return r(new Error("Media has no source."));s=Be(h,"error",r)})).then((()=>(s&&s(),t)),(()=>{i&&i(),function(t){je(t)&&(t.__AMP_MEDIA_LOAD_FAILURE_SRC=t.currentSrc||!0);let i=t;throw i&&i.src&&(i=i.src),Pt().createError(Le,i)}(t)}))}function je(t){return"AUDIO"===t.tagName||"VIDEO"===t.tagName}var ze={"amp-dynamic-css-classes":"[custom-element=amp-dynamic-css-classes]","variant":"amp-experiment"};function Ge(t){const i=t.document;return Et(i.body),Object.keys(ze).filter((t=>i.querySelector(ze[t])))}function qe(t,i,s){if(i[s])return i[s];const e=t.querySelector(`style[${s}], link[${s}]`);return e?(i[s]=e,e):null}var We=!1;function Ke(t){Et(t.defaultView),We||(We=!0,Ye(t))}function Ye(t){bs(t.body,{opacity:1,visibility:"visible","animation":"none"})}function Qe(t,i){const s=t.styleSheets;for(let t=0;t"string"==typeof t?sn(t):t;function sn(t,i){return Je||(Je=self.document.createElement("a")),en(Je,t)}function en(t,i,s){return t.href="",new URL(i,t.href)}function nn(t,i,s){if(!i)return t;const e=t.split("#",2),n=e[0].split("?",2);let r=n[0]+(n[1]?s?`?${i}&${n[1]}`:`?${n[1]}&${i}`:`?${i}`);return r+=e[1]?`#${e[1]}`:"",r}function rn(t,i){return`${encodeURIComponent(t)}=${encodeURIComponent(i)}`}function hn(t,i){return nn(t,on(i))}function on(t){const i=[];for(const s in t){let e=t[s];if(null!=e){e=M(e);for(let t=0;t0,"Expected a . in origin %s",n),i.splice(1,"s"==e?3:2),n+i.join("/")+pn(t.search)+(t.hash||"")}function _n(t){return sn(mn(t)).origin}function An(t,i){return i=tn(i),new URL(t,i.href).toString()}function Pn(t,i){return gn(i),function(t,i,s,e){return nn(t,rn("__amp_source_origin",s),void 0)}(i,0,_n(t.location.href))}function gn(t){const i=J(sn(t).search);Tt(!(Ze in i),"Source origin is not allowed in %s",t)}var vn="CANCELLED",En="BLOCK_BY_CONSENT",Tn=self.__AMP_ERRORS||[];self.__AMP_ERRORS=Tn;var Mn=function(t){return(Mn=function(t){const i=function(t){let i=0;return()=>{let t=Math.pow(1.5,i++);return t+=function(t,i){let s=t*(i=i||.3)*Math.random();return Math.random()>.5&&(s*=-1),s}(t),1e3*t}}();return t=>setTimeout(t,i())}())(t)};function In(t,i){try{let s;if(t)if(void 0!==t.message)t=u(t),s=!0;else{const i=t;(t=new Error(function(t){try{return JSON.stringify(t)}catch(i){return String(t)}}(i))).origError=i}else t=new Error("Unknown error");if(t.reported)return t;if(t.reported=!0,t.messageArray){const i=R(t.messageArray,(t=>null==t?void 0:t.tagName));i>-1&&(t.associatedElement=t.messageArray[i])}const e=i||t.associatedElement;if(e&&e.classList&&e.classList.add("i-amphtml-error"),self.console&&(k(t.message)||!t.expected)){const i=console.error||console.log;t.messageArray?i.apply(console,t.messageArray):e?i.call(console,t.message,e):i.call(console,t.message)}e&&e.dispatchCustomEventForTesting&&e.dispatchCustomEventForTesting("amp:error",t.message),bn.call(self,void 0,void 0,void 0,void 0,t)}catch(t){setTimeout((function(){throw t}))}return t}function Rn(){return new Error(vn)}function yn(t){return!!t&&("string"==typeof t?t.startsWith(En):"string"==typeof t.message&&t.message.startsWith(En))}function bn(t,i,s,e,n){!this||!this.document||n&&n.expected||Ke(this.document);let h=!1;try{h=function(t){if(!t.document)return!1;const i=t.document.querySelectorAll("script[src]");for(let t=0;t.01)return;const o=function(t,i,s,e,n,r){t=function(t,i){return i&&(t=i.message?i.message:String(i)),t||(t="Unknown error"),t}(t,n);let h=!(!n||!n.expected);if(/_reported_/.test(t))return;if(t==vn)return;const o=!(self&&self.window),u=Math.random();if((function(t){return-1!=t.indexOf(Le)}(t)||"Script error."==t||o)&&(h=!0,u>.001))return;const l=k(t);if(l&&u>.1)return;const c=Object.create(null);c.v=ht().rtvVersion,c.noAmp=r?"1":"0",c.m=t.replace(x,""),c.a=l?"1":"0",c.ex=h?"1":"0",c.dw=o?"1":"0";let a="1p";if(a="esm",c.esm="1",c.rt="esm",c.ca=null!==(f=self.AMP_CONFIG)&&void 0!==f&&f.canary?"1":"0",c.bt=(null===(d=self.AMP_CONFIG)||void 0===d?void 0:d.type)||"unknown",self.location.ancestorOrigins&&self.location.ancestorOrigins[0]&&(c.or=self.location.ancestorOrigins[0]),self.viewerState&&(c.vs=self.viewerState),self.parent&&self.parent!=self&&(c.iem="1"),self.AMP&&self.AMP.viewer){const t=self.AMP.viewer.getResolvedViewerUrl(),i=self.AMP.viewer.maybeGetMessagingOrigin();t&&(c.rvu=t),i&&(c.mso=i)}var d,f;const p=[],m=self[xe]||null;for(const t in m){const i=m[t];p.push(`${t}=${i?"1":"0"}`)}var _,A,P;return c.exps=p.join(","),n?(c.el=(null===(_=n.associatedElement)||void 0===_?void 0:_.tagName)||"u",n.args&&(c.args=JSON.stringify(n.args)),l||n.ignoreStack||!n.stack||(c.s=n.stack),n.message&&(n.message+=" _reported_")):(c.f=i||"",c.l=s||"",c.c=e||""),c.r=self.document?self.document.referrer:"",c.ae=Tn.join(","),c.fr=self.location.originalHash||self.location.hash,"production"===c.bt&&(c.pt="1"),P=t,(A=Tn).length>=25&&A.splice(0,A.length-25+1),A.push(P),c}(t,i,s,e,n,h);o&&Mn((()=>{try{return function(t,i){return i.pt&&Math.random()<.9?r():function(t,i){const s=Qi(t);if(!s.isSingleDoc())return Promise.resolve(!1);const e=s.getSingleDoc();if(!e.getRootNode().documentElement.hasAttribute("report-errors-to-viewer"))return Promise.resolve(!1);const n=ps(e);return n.hasCapability("errorReporter")?n.isTrustedViewer().then((t=>{return!!t&&(n.sendMessage("error",{"m":(s=i).m,"a":s.a,"s":s.s,"el":s.el,"ex":s.ex,"v":s.v,"pt":s.pt}),!0);var s})):Promise.resolve(!1)}(t,i).then((t=>{if(!t){const t=new XMLHttpRequest;t.open("POST",Math.random()<.1?et.betaErrorReporting:et.errorReporting,!0),t.send(JSON.stringify(i))}}))}(this,o).catch((()=>{}))}catch(t){}}))}var wn="Resource",Vn=class{static forElement(t){return Et(Vn.forElementOptional(t))}static forElementOptional(t){return t.__AMP__RESOURCE}static setOwner(t,i){Et(i.contains(t)),Vn.forElementOptional(t)&&Vn.forElementOptional(t).updateOwner(i),t.__AMP__OWNER=i;const s=t.getElementsByClassName("i-amphtml-element");for(let t=0;t{this.Jt=!1,this.Xt=1,this.element.signals().signal("res-built")}),(t=>{throw this.maybeReportErrorOnBuildFailure(t),this.Jt=!1,this.element.signals().rejectSignal("res-built",t),t})))}maybeReportErrorOnBuildFailure(t){yn(t)||vt().error(wn,"failed to build:",this.debugid,t)}changeSize(t,i,s){this.element.applySize(t,i,s),this.requestMeasure()}overflowCallback(t,i,s,e){t&&(this.li={height:i,width:s,margins:e}),this.element.overflowCallback(t,i,s,e)}resetPendingChangeSize(){this.li=void 0}getPendingChangeSize(){return this.li}getUpgradeDelayMs(){return this.element.getUpgradeDelayMs()}measure(){if(this.Yt&&this.element.parentElement&&this.element.parentElement.tagName.startsWith("AMP-")&&!("__AMP__RESOURCE"in this.element.parentElement))return;if(!this.element.ownerDocument||!this.element.ownerDocument.defaultView)return void(this.Xt=1);this.hi=!1;const t=this.ni;this.fi();const i=this.ni,s=(n=i,!((e=t).width==n.width&&e.height===n.height));var e,n;(1==this.Xt||t.top!=i.top||s)&&this.element.isUpgraded()&&(1==this.Xt?this.Xt=2:4!=this.Xt&&5!=this.Xt||!this.element.isRelayoutNeeded()||(this.Xt=2)),this.hasBeenMeasured()||(this.ri=i),this.element.updateLayoutBox(i,s)}ensureMeasured(){return this.hasBeenMeasured()?r():ms(this.hostWin).measure((()=>this.measure()))}fi(){const t=_s(this.element);this.ni=t.getLayoutRect(this.element);let i=!1;if(t.supportsPositionFixed()&&this.isDisplayed()){const{win:s}=this.Kt.getAmpdoc(),{body:e}=s.document;for(let n=this.element;n&&n!=e;n=n.offsetParent){if(n.isAlwaysFixed&&n.isAlwaysFixed()){i=!0;break}if(t.isDeclaredFixed(n)&&"fixed"==Ss(s,n).position){i=!0;break}}}this.ei=i,i&&(this.ni=Qt(this.ni,-t.getScrollLeft(),-t.getScrollTop()))}completeCollapse(){ws(this.element,!1),this.ni=Kt(this.ni.left,this.ni.top,0,0),this.ei=!1,this.element.updateLayoutBox(this.getLayoutBox());const t=this.getOwner();t&&t.collapsedCallback(this.element)}completeExpand(){ws(this.element,!0),this.requestMeasure()}isMeasureRequested(){return this.hi}hasBeenMeasured(){return!!this.ri}requestMeasure(){this.hi=!0}getLayoutSize(){return function(t){const{height:i,width:s}=t;return{width:s,height:i}}(this.ni)}getLayoutBox(){if(!this.ei)return this.ni;const t=_s(this.element);return Qt(this.ni,t.getScrollLeft(),t.getScrollTop())}getInitialLayoutBox(){return this.ri||this.ni}isDisplayed(){if(!this.element.ownerDocument||!this.element.ownerDocument.defaultView)return!1;const t=this.element.getLayout()==Xs,i=this.getLayoutBox(),s=i.height>0&&i.width>0;return t||s}isFixed(){return this.ei}overlaps(t){return s=t,(i=this.getLayoutBox()).top<=s.bottom&&s.top<=i.bottom&&i.left<=s.right&&s.left<=i.right;var i,s}prerenderAllowed(){return this.element.prerenderAllowed()}previewAllowed(){return this.element.previewAllowed()}isBuildRenderBlocking(){return this.element.isBuildRenderBlocking()}whenWithinViewport(t){if(Et(!1!==t),!this.isLayoutPending()||!0===t)return r();const i=t,s=String(i);return this.oi&&this.oi[s]?this.oi[s].promise:this.isWithinViewportRatio(i)?r():(this.oi=this.oi||{},this.oi[s]=new h,this.oi[s].promise)}pi(){if(!this.oi)return;const t=this.getDistanceViewportRatio();for(const i in this.oi)this.isWithinViewportRatio(parseFloat(i),t)&&(this.oi[i].resolve(),delete this.oi[i])}getDistanceViewportRatio(){const t=_s(this.element).getRect(),i=this.getLayoutBox(),s=this.Kt.getScrollDirection();let e=1,n=0;if(t.righti.right)return{distance:!1};if(t.bottomi.bottom))return{distance:!0};n=t.top-i.bottom,1==s&&(e=2)}return{distance:n,scrollPenalty:e,viewportHeight:t.height}}isWithinViewportRatio(t,i){if("boolean"==typeof t)return t;const{distance:s,scrollPenalty:e,viewportHeight:n}=i||this.getDistanceViewportRatio();return"boolean"==typeof s?s:s0&&!this.element.isRelayoutNeeded())return this.Xt=4,r();this.ti++,this.Xt=3,this.ii=new AbortController;const{signal:t}=this.ii,i=new Promise(((i,s)=>{ms(this.hostWin).mutate((()=>{let e;try{e=this.element.layoutCallback(t)}catch(t){s(t)}Promise.resolve(e).then(i,s)})),t.onabort=()=>s(Rn())})).then((()=>this.mi(!0,t)),(i=>this.mi(!1,t,i)));return this.ui=i}mi(t,i,s){if(this.ii=null,i.aborted){const t=vt().createError("layoutComplete race");throw t.associatedElement=this.element,vt().expectedError(wn,t),Rn()}if(this.ai&&(this.ai(),this.ai=null),this.ui=null,this.Xt=t?4:5,this.si=s,!t)return Promise.reject(s)}isLayoutPending(){return 4!=this.Xt&&5!=this.Xt}loadedOnce(){return this.element.R1()?this.element.whenLoaded():this.ci}isInViewport(){return this.di&&this.pi(),this.di}setInViewport(t){this.di=t}unlayout(){0!=this.Xt&&1!=this.Xt&&2!=this.Xt&&(this.ii&&(this.ii.abort(),this.ii=null),this.setInViewport(!1),this.element.unlayoutCallback()&&(this.element.togglePlaceholder(!0),this.Xt=1,this.ti=0,this.ui=null))}getTaskId(t){return this.debugid+"#"+t}pause(){this.element.pause()}pauseOnRemove(){this.element.pause()}resume(){this.element.resume()}unload(){this.element.unmount()}disconnect(){delete this.element.__AMP__RESOURCE,this.element.disconnect(!0)}},Sn="ready-scan",xn="scheduler",On="250% 31.25%";function Cn(t){return Ii(t,xn,class{constructor(t){this._i=t;const{win:i}=t;this.Ai=new i.IntersectionObserver((t=>this.gi(t)),{root:jt(i)?i.document:null,rootMargin:On}),this.Pi=new Map,this.vi=new Map,this.Ei=[],this.Ti=!1,t.whenReady().then((()=>this.yi())),this.Ii=t.onVisibilityChanged((()=>this.Mi()))}dispose(){this.Ai.disconnect(),this.vi.clear(),this.Ii&&(this.Ii(),this.Ii=null)}scheduleAsap(t){this.vi.set(t,{asap:!0,isIntersecting:!1}),this.Ri(t)}schedule(t){this.vi.has(t)||(t.deferredMount()?(this.vi.set(t,{asap:!1,isIntersecting:!1}),this.Ai.observe(t),this.Pi.size>0&&this.Pi.forEach(((i,s)=>{Gt(s,t)&&i.observe(t)}))):this.vi.set(t,{asap:!1,isIntersecting:!0}),this.Ri(t))}unschedule(t){this.vi.has(t)&&(this.vi.delete(t),this.Ai.unobserve(t),this.Pi.size>0&&this.Pi.forEach((i=>{i.unobserve(t)})),this.Ei&&(y(this.Ei,t),this.yi()))}setContainer(t,i){if(this.Pi.has(t))return;const{win:s}=this._i,e=new s.IntersectionObserver((t=>this.gi(t)),{root:i||t,rootMargin:On});this.Pi.set(t,e),this.vi.forEach((({asap:i},s)=>{!i&&Gt(t,s)&&e.observe(s)}))}removeContainer(t){const i=this.Pi.get(t);i&&(i.disconnect(),this.Pi.delete(t))}wi(){if(this._i.isReady()&&!this.Ti){this.Ti=!0;const{win:t}=this._i;t.setTimeout((()=>{this._i.signals().signal(Sn)}),50)}}Mi(){const t=this._i.getVisibilityState();t!=Ps.VISIBLE&&t!=Ps.HIDDEN&&t!=Ps.PRERENDER&&t!=Ps.PREVIEW||this.vi.forEach(((t,i)=>this.bi(i)))}Ri(t){const i=this.Ei;i?(i.includes(t)||i.push(t),this.yi()):this.bi(t)}yi(){const t=this._i.isReady(),i=this.Ei;if(i)for(let s=0;st.mountInternal()))}}),yi(t,xn)}var kn=class{constructor(){this.Vi=[]}peek(){const t=this.length;return t?this.Vi[t-1].item:null}enqueue(t,i){if(isNaN(i))throw new Error("Priority must not be NaN.");const s=this.Si(i);this.Vi.splice(s,0,{item:t,priority:i})}Si(t){let i=-1,s=0,e=this.length;for(;s<=e&&(i=Math.floor((s+e)/2),i!==this.length);)if(this.Vi[i].priority0&&this.Vi[i-1].priority>=t))break;e=i-1}return i}forEach(t){let i=this.length;for(;i--;)t(this.Vi[i].item)}dequeue(){const t=this.Vi.pop();return t?t.item:null}get length(){return this.Vi.length}},Nn=/nochunking=1/.test(self.location.hash),Dn=r();function Ln(t){return Ii(t,"chunk",jn),yi(t,"chunk")}function Un(t,i,s){if(Nn)return void Dn.then(i);const e=Ln(t.documentElement||t);e.runForStartup(i),s&&e.runForStartup((()=>{e.xi=!0}))}function $n(t,i,s){Nn?Dn.then(i):Ln(t).run(i,s)}var Fn="not_run",Bn=class{constructor(t){this.state=Fn,this.Oi=t}Ci(t){if("run"!=this.state){this.state="run";try{this.Oi(t)}catch(t){throw this.ki(t),t}}}Ni(){return this.Oi.displayName||this.Oi.name}ki(t){}Di(){return!1}Li(){return!1}},Hn=class extends Bn{constructor(t,i,s){super(t),this.Ui=s}ki(t){Ke(self.document)}Di(){return this.$i()}Li(){return this.Ui.Fi}$i(){return this.Ui.ampdoc.isVisible()}},jn=class{constructor(t){var i;this.ampdoc=t,this.i=t.win,this.Bi=new kn,this.Hi=this.ji.bind(this),this.zi=0,this.Gi=!(!this.i.navigator.scheduling||!this.i.navigator.scheduling.isInputPending),this.qi=!1,this.xi=this.i.document.documentElement.hasAttribute("i-amphtml-no-boilerplate"),this.i.addEventListener("message",(t=>{"amp-macro-task"==Fe(t)&&this.ji(null)})),this.Fi=!1,(i=t,wi(i,"viewer")).then((()=>{this.Fi=!0})),t.onVisibilityChanged((()=>{t.isVisible()&&this.Wi()}))}run(t,i){const s=new Bn(t);this.Ki(s,i)}runForStartup(t){const i=new Hn(t,this.i,this);this.Ki(i,Number.POSITIVE_INFINITY)}Ki(t,i){this.Bi.enqueue(t,i),this.Wi()}Yi(t){let i=this.Bi.peek();for(;i&&i.state!==Fn;)this.Bi.dequeue(),i=this.Bi.peek();return i&&t&&this.Bi.dequeue(),i}ji(t){const i=this.Yi(!0);if(!i)return this.qi=!1,this.zi=0,!1;let s;try{s=Date.now(),i.Ci(t)}finally{Dn.then().then().then().then().then().then().then().then().then((()=>{this.qi=!1,this.zi+=Date.now()-s,this.Wi()}))}return!0}Ji(t){if(this.xi&&(this.Gi?this.i.navigator.scheduling.isInputPending():this.zi>5))return this.zi=0,void this.Qi();Dn.then((()=>{this.Hi(t)}))}Wi(){if(this.qi)return;const t=this.Yi();return t?t.Di()?(this.qi=!0,void this.Ji(null)):void(t.Li()&&this.i.requestIdleCallback?function(t,i,s,e){const n=Date.now();t.requestIdleCallback((function i(s){if(s.timeRemaining()<15){const r=2e3-(Date.now()-n);r<=0||s.didTimeout?e(s):t.requestIdleCallback(i,{timeout:r})}else e(s)}),{timeout:2e3})}(this.i,0,0,this.Hi):this.Qi()):void 0}Qi(){this.i.postMessage("amp-macro-task","*")}},zn="activate",Gn=class{static R1(){return!1}static deferredMount(t){return!0}static prerenderAllowed(t){return!1}static previewAllowed(t){return this.prerenderAllowed(t)}static usesLoading(t){return!1}static createLoaderLogoCallback(t){return{}}static getBuildPriority(t){return 0}static getPreconnects(t){return null}static requiresShadowDom(){return!1}constructor(t){this.element=t,this.win=Mt(t),this.actionMap_=null,this.defaultActionAlias_=null}signals(){return this.element.signals()}getDefaultActionAlias(){return this.defaultActionAlias_}getLayoutPriority(){return 0}updateLayoutPriority(t){this.element.getResources().updateLayoutPriority(this.element,t)}getLayout(){return this.element.getLayout()}getLayoutBox(){return this.element.getLayoutBox()}getLayoutSize(){return this.element.getLayoutSize()}getAmpDoc(){return this.element.getAmpDoc()}getVsync(){return ms(this.win)}getConsentPolicy(){let t=null;return this.element.hasAttribute("data-block-on-consent")&&(t=this.element.getAttribute("data-block-on-consent")||"default"),t}isLayoutSupported(t){return t==Gs}isAlwaysFixed(){return!1}upgradeCallback(){return null}buildCallback(){}preconnectCallback(t){}attachedCallback(){}detachedCallback(){}setAsContainer(t){this.element.setAsContainerInternal(t)}removeAsContainer(){this.element.removeAsContainerInternal()}isBuildRenderBlocking(){return!1}createPlaceholderCallback(){return null}renderOutsideViewport(){return"inabox"==ht(this.win).runtime||3}idleRenderOutsideViewport(){return!1}ensureLoaded(){}setReadyState(t,i){this.element.setReadyStateInternal(t,i)}mountCallback(t){}unmountCallback(){}isRelayoutNeeded(){return!1}layoutCallback(){return r()}firstLayoutCompleted(){this.togglePlaceholder(!1)}pauseCallback(){}resumeCallback(){}unlayoutCallback(){return!1}unlayoutOnPause(){return!1}reconstructWhenReparented(){return!0}loadPromise(t){return He(t)}registerAction(t,i,s=2){qn(this),this.actionMap_[t]={handler:i,minTrust:s}}registerDefaultAction(t,i="activate",s=2){Et(!this.defaultActionAlias_),this.registerAction(i,t,s),this.defaultActionAlias_=i}executeAction(t,i){let{method:s}=t;s===zn&&(s=this.defaultActionAlias_||s),qn(this);const e=this.actionMap_[s],{tagName:n}=this.element;Tt(e,`Method not found: ${s} in ${n}`);const{handler:r,minTrust:h}=e;if(t.satisfiesTrust(h))return r(t)}forwardEvents(t,i){const s=(T(t)?t:[t]).map((t=>$e(i,t,(i=>{zt(this.element,t,Fe(i)||{})}))));return()=>s.forEach((t=>t()))}getPlaceholder(){return this.element.getPlaceholder()}togglePlaceholder(t){this.element.togglePlaceholder(t)}getFallback(){return this.element.getFallback()}toggleFallback(t){this.element.toggleFallback(t)}toggleLoading(t,i=!1){this.element.toggleLoading(t,i)}getOverflowElement(){return this.element.getOverflowElement()}renderStarted(){this.element.renderStarted()}getViewport(){return _s(this.getAmpDoc())}getIntersectionElementLayoutBox(){return this.getLayoutBox()}collapse(){es(this.getAmpDoc()).collapseElement(this.element)}attemptCollapse(){return es(this.getAmpDoc()).attemptCollapse(this.element)}forceChangeHeight(t){es(this.getAmpDoc()).forceChangeSize(this.element,t,void 0)}attemptChangeHeight(t){return es(this.getAmpDoc()).requestChangeSize(this.element,t,void 0)}attemptChangeSize(t,i,s){return es(this.getAmpDoc()).requestChangeSize(this.element,t,i,void 0,s)}measureElement(t){return es(this.getAmpDoc()).measureElement(t)}mutateElement(t,i){return this.measureMutateElement(null,t,i)}measureMutateElement(t,i,s){return es(this.getAmpDoc()).measureMutateElement(s||this.element,t,i)}mutateElementSkipRemeasure(t){return es(this.getAmpDoc()).mutateElement(this.element,t,!0)}collapsedCallback(t){}expand(){es(this.getAmpDoc()).expandElement(this.element)}mutatedAttributesCallback(t){}onLayoutMeasure(){}user(){return Pt(this.element)}getApi(){return this}};function qn(t){t.actionMap_||(t.actionMap_=t.win.Object.create(null))}var Wn,Kn=class extends Gn{},Yn=Date.now(),Qn={bubbles:!1},Jn=()=>!0,Xn=[],Zn=new Set;function tr(t,i){const s=function(t,i){if(t.__AMP_BASE_CE_CLASS)return t.__AMP_BASE_CE_CLASS;const s=t.HTMLElement;return t.__AMP_BASE_CE_CLASS=class extends s{constructor(){super(),this.createdCallback()}createdCallback(){this.Xi=!1,this.Zi=!1,this.ts=null,this.ss=!1,this.es=null,this.ns=null,this.rs="upgrading",this.everAttached=!1,this._i=null,this.Kt=null,this.hs=Gs,this.ti=0,this.os=!1,this.warnOnMissingOverflow=!0,this.sizerElement=void 0,this.us=void 0,this.layoutScheduleTime=void 0;const i=this;let s=t.__AMP_EXTENDED_ELEMENTS&&t.__AMP_EXTENDED_ELEMENTS[this.localName];this.ls=s===Kn?null:s||null,this.ls||Xn.push(this),this.cs=null,this.ds=1,this.fs=0,this.ps=void 0,this._s=void 0,this.Rt=new vs,this.ls&&this.Rt.signal(fe);const e=rs(t);this.As=e&&e.isPerformanceTrackingOn(),this.gs=null,i.__AMP_UPG_RES&&(i.__AMP_UPG_RES(i),delete i.__AMP_UPG_RES,delete i.__AMP_UPG_PRM)}get readyState(){return this.rs}signals(){return this.Rt}getAmpDoc(){return Et(this._i),this._i}getResources(){return Et(this.Kt),this.Kt}isUpgraded(){return 2==this.ds}whenUpgraded(){return this.Rt.whenSignal(pe)}upgrade(t){this._s||1==this.ds&&(this.ls=t,this.Rt.signal(fe),this.everAttached&&this.Ps())}markUnresolved(){this.ls||this.classList.add("amp-unresolved","i-amphtml-unresolved")}getUpgradeDelayMs(){return this.fs}vs(i,s){this.cs=i,this.fs=t.Date.now()-s,this.ds=2,this.setReadyStateInternal(oi),this.classList.remove("amp-unresolved","i-amphtml-unresolved"),this.Es(),this.dispatchCustomEventForTesting(ce),this.R1()||this.getResources().upgraded(this),this.Rt.signal(pe)}Es(){this.hs!=Gs&&this.cs&&!this.cs.isLayoutSupported(this.hs)&&(Tt(this.getAttribute("layout"),"The element did not specify a layout attribute. Check https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/control_layout and the respective element documentation for details."),Tt(!1,`Layout not supported: ${this.hs}`))}getBuildPriority(){return this.ls?this.ls.getBuildPriority(this):3}getLayoutPriority(){return this.cs?this.cs.getLayoutPriority():3}getDefaultActionAlias(){return Et(this.isUpgraded()),this.cs.getDefaultActionAlias()}isBuilding(){return!!this.ts}isBuilt(){return this.Xi}whenBuilt(){return this.Rt.whenSignal(me)}buildInternal(){if(sr(this),Et(this.ls),this.ts)return this.ts;this.setReadyStateInternal(oi);const t=this.Ts();this.ys();const i=t.then((()=>{const t=this.Is(),i=t?null:this.Ms();if(t||i)return(s=this,ji(s,"consentPolicyManager","amp-consent")).then((s=>!s||(t?s.whenPolicyUnblock(t):s.whenPurposesUnblock(i)))).then((t=>{if(!t)throw new Error(En)}));var s})).then((()=>Et(this.cs).buildCallback()));return this.ts=i.then((()=>{if(this.Xi=!0,this.classList.add("i-amphtml-built"),this.classList.remove("i-amphtml-notbuilt","amp-notbuilt"),this.Rt.signal(me),this.R1()?this.setReadyStateInternal(this.rs!=oi?this.rs:ui):(this.setReadyStateInternal(li),this.preconnect(!1)),this.Zi&&this.Rs(),this.ps&&cs(Mt(this)).delay(this.ws.bind(this),1),!this.getPlaceholder()){const t=this.createPlaceholder();t&&this.appendChild(t)}}),(t=>{throw this.Rt.rejectSignal(me,t),this.R1()&&this.setReadyStateInternal(ai,t),yn(t)||In(t,this),t}))}build(){return this.ts?this.ts:this.Rt.whenSignal(fe).then((()=>(this.R1()&&Cn(this.getAmpDoc()).scheduleAsap(this),this.whenBuilt())))}mountInternal(){if(this.es)return this.es;this.ns=this.ns||new AbortController;const{signal:t}=this.ns;return this.es=this.buildInternal().then((()=>{if(Et(this.R1()),t.aborted)return;this.setReadyStateInternal(this.rs!=ui?this.rs:this.ls.usesLoading(this)?li:ui),this.ss=!0;const i=this.cs.mountCallback(t);return!!i&&i.then(Jn)})).then((i=>{if(this.ns=null,t.aborted)throw Rn();this.Rt.signal(_e),this.ls.usesLoading(this)&&!i||this.setReadyStateInternal(ci)})).catch((t=>{var i;throw this.ns=null,(i=t)&&("string"==typeof i?i.startsWith(vn):"string"==typeof i.message&&i.message.startsWith(vn))?this.es=null:(this.Rt.rejectSignal(_e,t),this.setReadyStateInternal(ai,t)),t}))}mount(){if(this.es)return this.es;this.ns=this.ns||new AbortController;const{signal:t}=this.ns;return this.Rt.whenSignal(fe).then((()=>{if(!this.R1())return this.whenBuilt();if(t.aborted)throw Rn();return Cn(this.getAmpDoc()).scheduleAsap(this),this.whenMounted()}))}unmount(){this.Zi&&this.pause(),this.R1()?(this.ns&&(this.ns.abort(),this.ns=null),Cn(this.getAmpDoc()).unschedule(this),this.ss&&this.cs.unmountCallback(),this.ss=!1,this.es=null,this.bs(),this.Zi&&this.Ps(!0)):this.Vs()}whenMounted(){return this.Rt.whenSignal(_e)}whenLoaded(){return this.Rt.whenSignal(ge)}ensureLoaded(t){return this.mount().then((()=>{if(this.R1())return this.ls.usesLoading(this)&&this.cs.ensureLoaded(),this.whenLoaded();const i=this.Ss();return i.whenBuilt().then((()=>{if(4!=i.getState()&&((3!=i.getState()||i.isMeasureRequested())&&i.measure(),i.isDisplayed()))return this.getResources().scheduleLayoutOrPreload(i,!0,t,!0),this.whenLoaded()}))}))}setAsContainerInternal(t){Cn(this.getAmpDoc()).setContainer(this,t)}removeAsContainerInternal(){Cn(this.getAmpDoc()).removeContainer(this)}setReadyStateInternal(t,i){if(t!==this.rs&&(this.rs=t,this.R1()))switch(t){case li:return this.Rt.signal(Ae),this.Rt.reset(ve),this.Rt.reset(ge),this.classList.add("i-amphtml-layout"),this.toggleLoading(!0),void this.dispatchCustomEventForTesting(ae);case ci:return this.Rt.signal(Ae),this.Rt.signal(ge),this.Rt.reset(ve),this.classList.add("i-amphtml-layout"),this.toggleLoading(!1),zt(this,"load",null,Qn),void this.dispatchCustomEventForTesting(de);case ai:return this.Rt.rejectSignal(ge,i),this.toggleLoading(!1),void zt(this,"error",i,Qn)}}preconnect(t){Et(this.isUpgraded()),t?this.cs.preconnectCallback(t):Un(this.getAmpDoc(),(()=>{this.ownerDocument&&this.ownerDocument.defaultView&&this.cs.preconnectCallback(t)}))}R1(){return!!this.ls&&this.ls.R1()}deferredMount(){return!!this.ls&&this.ls.deferredMount(this)}isAlwaysFixed(){return!!this.cs&&this.cs.isAlwaysFixed()}updateLayoutBox(t,i=!1){this.isBuilt()&&this.onMeasure(i)}onMeasure(){Et(this.isBuilt());try{this.cs.onLayoutMeasure()}catch(t){In(t,this)}}ys(){var t;return void 0!==this.sizerElement||this.hs!==Ks&&this.hs!==Zs||(this.sizerElement=this.querySelector("i-amphtml-sizer"),null===(t=this.sizerElement)||void 0===t||t.setAttribute("slot","i-amphtml-svc")),this.sizerElement||null}xs(t){if(this.hs!==Ks)if(this.hs!==Zs);else{const i=t.querySelector(".i-amphtml-intrinsic-sizer");if(!i)return;i.setAttribute("src","")}else ys(t,"paddingTop","0")}Os(){const t=this.hasAttribute("media")||this.hasAttribute("sizes")&&!this.hasAttribute("disable-inline-width")||this.hasAttribute("heights"),i=!!this.gs,s=this.ownerDocument.defaultView;t!=i&&s&&(t?(this.gs=new class{constructor(t,i){this.i=t,this.st=i,this.Cs={},this.ks=null}start(){this.ks=this.Cs,this.Cs={}}resolveMatchQuery(t){return"1"===this.Ns(t,Ee,"1")}resolveListQuery(t){return this.Ns(t,Te,"")}complete(){for(const t in this.ks)t in this.Cs||Me(this.ks[t],this.st,!1);this.ks=null}dispose(){for(const t in this.Cs)Me(this.Cs[t],this.st,!1);this.Cs={}}Ns(t,i,s){if(!t.trim())return s;let e=this.Cs[t];return e||(U(this.ks),e=this.ks[t]),e||(e=i(this.i,t),Me(e,this.st,!0)),this.Cs[t]=e,function(t){for(let i=0;ithis.Ds())),this.Ds()):this.Ls())}Ls(){this.gs&&(this.gs.dispose(),this.gs=null)}Ds(){const t=this.gs;if(!t)return;t.start();const i=this.getAttribute("media")||null,s=!i||t.resolveMatchQuery(i);this.classList.toggle("i-amphtml-hidden-by-media-query",!s);const e=this.hasAttribute("disable-inline-width")?null:this.getAttribute("sizes");e&&ys(this,"width",t.resolveListQuery(e));const n=this.hs===Ks?this.getAttribute("heights"):null;if(n){const i=this.ys();i&&ys(i,"paddingTop",t.resolveListQuery(n))}t.complete(),this.Ss().requestMeasure()}applySize(t,i,s){const e=this.ys();e&&(this.sizerElement=null,this.xs(e),this.Us((()=>{e&&Ut(e)}))),void 0!==t&&ys(this,"height",t,"px"),void 0!==i&&ys(this,"width",i,"px"),s&&(null!=s.top&&ys(this,"marginTop",s.top,"px"),null!=s.right&&ys(this,"marginRight",s.right,"px"),null!=s.bottom&&ys(this,"marginBottom",s.bottom,"px"),null!=s.left&&ys(this,"marginLeft",s.left,"px")),this.$s()&&this.Fs(),zt(this,"amp:size-changed")}connectedCallback(){if(function(){if(void 0===Wn){const t=self.document.createElement("template");Wn="content"in t}return Wn}()||void 0!==this._s||(this._s=!!St(this,"template")),!this._s&&!this.Zi&&$t(this)){if(this.Zi=!0,this.everAttached||this.classList.add("i-amphtml-element","i-amphtml-notbuilt","amp-notbuilt"),!this._i){const t=Mt(this),s=Qi(t).getAmpDoc(this);this._i=s,i(s,this,this.ls)}if(this.Kt||(this.Kt=us(this._i)),this.getResources().add(this),this.everAttached){const t=this.reconstructWhenReparented();t&&this.bs(),this.isUpgraded()&&(t&&!this.R1()&&this.getResources().upgraded(this),this.Rs(),this.dispatchCustomEventForTesting(ce)),this.ls&&this.R1()&&this.Ps()}else{this.everAttached=!0;try{this.hs=function(t){const i=t.getAttribute("i-amphtml-layout");if(i){const e=ie(i);var s;return U(e),e!=Ks&&e!=Zs||!t.firstElementChild?e==Gs&&ws(t,!1):(t.sizerElement=t.querySelector("i-amphtml-sizer")||void 0,null===(s=t.sizerElement)||void 0===s||s.setAttribute("slot","i-amphtml-svc")),e}const{height:e,layout:n,width:r}=we(t);if(t.classList.add(se(n)),ee(n)&&t.classList.add("i-amphtml-layout-size-defined"),n==Gs)ws(t,!1);else if(n==qs)bs(t,{width:F(r),height:F(e)});else if(n==Ws)ys(t,"height",F(e));else if(n==Ks){const i=t.ownerDocument.createElement("i-amphtml-sizer");i.setAttribute("slot","i-amphtml-svc");const s=he(e),n=he(r);B(s),B(n),bs(i,{paddingTop:s/n*100+"%"}),t.insertBefore(i,t.firstChild),t.sizerElement=i}else if(n==Zs){const i=Ie(t)(ye),s=i.firstElementChild;$(s),s.setAttribute("src",`data:image/svg+xml;charset=utf-8,`),t.insertBefore(i,t.firstChild),t.sizerElement=i}else n==Qs||n==Ys||(n==Js?(r&&ys(t,"width",r),e&&ys(t,"height",e)):n==Xs&&(t.classList.add("i-amphtml-layout-awaiting-size"),r&&ys(t,"width",r),ys(t,"height",0)));return t.setAttribute("i-amphtml-layout",n),n}(this),this.Os()}catch(t){In(t,this)}this.ls?this.Ps():(Zn.has("*")||Zn.has(this.tagName.toLowerCase()))&&this.markUnresolved(),this.isUpgraded()||this.dispatchCustomEventForTesting("amp:stubbed")}this.toggleLoading(!0)}}$s(){return this.classList.contains("i-amphtml-layout-awaiting-size")}Fs(){this.classList.remove("i-amphtml-layout-awaiting-size")}Ps(t){if(this.R1()){if(!this.es)if(Cn(this.getAmpDoc()).schedule(this),this.classList.remove("amp-unresolved","i-amphtml-unresolved"),this.ts)this.setReadyStateInternal(this.ls&&this.ls.usesLoading(this)?li:ui);else if(this.setReadyStateInternal(oi),!t){const t=this.ls.getPreconnects(this);if(t&&t.length>0){const i=this.getAmpDoc();Un(i,(()=>{const{win:s}=i;if(!s)return;const e=os(s);t.forEach((t=>e.url(i,t,!1)))}))}}}else this.Bs()}Bs(){if(this._s)return;if(1!=this.ds)return;const i=new(Et(this.ls))(this);this.ds=4;const s=t.Date.now(),e=i.upgradeCallback();if(e){if("function"==typeof e.then)return e.then((t=>{this.vs(t||i,s)})).catch((t=>{this.ds=3,a(t)}));this.vs(e,s)}else this.vs(i,s)}disconnectedCallback(){this.disconnect(!1)}Rs(){this.Xi&&this.cs.attachedCallback()}disconnect(t){!this._s&&this.Zi&&(!t&&$t(this)||(t&&this.classList.remove("i-amphtml-element"),this.Zi=!1,this.getResources().remove(this),this.cs&&this.cs.detachedCallback(),this.R1()&&this.unmount(),this.toggleLoading(!1),this.Ls()))}dispatchCustomEventForTesting(t,i){}prerenderAllowed(){return!this.hasAttribute("noprerender")&&!!this.ls&&this.ls.prerenderAllowed(this)}previewAllowed(){return!!this.ls&&this.ls.previewAllowed(this)}isBuildRenderBlocking(){return!!this.cs&&this.cs.isBuildRenderBlocking()}createPlaceholder(){return this.cs?this.cs.createPlaceholderCallback():null}createLoaderLogo(){return this.ls?this.ls.createLoaderLogoCallback(this):{}}renderOutsideViewport(){return!!this.cs&&this.cs.renderOutsideViewport()}idleRenderOutsideViewport(){return!!this.cs&&this.cs.idleRenderOutsideViewport()}getLayoutBox(){return this.Ss().getLayoutBox()}getLayoutSize(){return this.Ss().getLayoutSize()}getOwner(){return this.Ss().getOwner()}getIntersectionChangeEntry(){const t=this.cs?this.cs.getIntersectionElementLayoutBox():this.getLayoutBox(),i=this.getOwner(),s=_s(this.getAmpDoc()).getRect();return function(t,i,s){const e=function(t){let i=-1/0,s=1/0,e=-1/0,n=1/0;for(let t=0;tthis.cs))}Ts(){return this.Rt.whenSignal(fe).then((()=>(this.Bs(),this.whenUpgraded())))}getApi(){return this.getImpl().then((t=>t.getApi()))}getLayout(){return this.hs}layoutCallback(t){if(sr(this),Et(this.isBuilt()),t.aborted)return Promise.reject(Rn());this.dispatchCustomEventForTesting(ae);const i=0==this.ti;this.Rt.reset(ve),i&&this.Rt.signal(Ae),this.toggleLoading(!0);const s=o((()=>this.cs.layoutCallback()));return this.preconnect(!0),this.classList.add("i-amphtml-layout"),s.then((()=>{if(t.aborted)throw Rn();i&&this.Rt.signal(ge),this.setReadyStateInternal(ci),this.ti++,this.toggleLoading(!1),this.os||(this.cs.firstLayoutCompleted(),this.os=!0,this.dispatchCustomEventForTesting(de))}),(s=>{if(t.aborted)throw Rn();throw i&&this.Rt.rejectSignal(ge,s),this.setReadyStateInternal(ai,s),this.ti++,this.toggleLoading(!1),s}))}pause(){this.isBuilt()&&(this.cs.pauseCallback(),!this.R1()&&this.cs.unlayoutOnPause()&&this.Vs())}resume(){this.isBuilt()&&this.cs.resumeCallback()}unlayoutCallback(){if(sr(this),!this.isBuilt())return!1;this.Rt.signal(ve);const t=this.cs.unlayoutCallback();return t&&this.bs(),this.dispatchCustomEventForTesting("amp:unload"),t}Vs(){this.Ss().unlayout(),this.Zi&&this.Kt&&this.Kt.schedulePass()}bs(){this.ti=0,this.os=!1,this.Rt.reset(_e),this.Rt.reset(Pe),this.Rt.reset(Ae),this.Rt.reset(ge),this.Rt.reset("ini-load")}reconstructWhenReparented(){return!!this.cs&&this.cs.reconstructWhenReparented()}collapse(){this.cs&&this.cs.collapse()}collapsedCallback(t){this.cs&&this.cs.collapsedCallback(t)}expand(){this.cs&&this.cs.expand()}mutatedAttributesCallback(t){this.cs?this.cs.mutatedAttributesCallback(t):this.R1()&&Cn(this).scheduleAsap(this)}enqueAction(t){sr(this),this.isBuilt()?this.Hs(t,!1):(void 0===this.ps&&(this.ps=[]),Et(this.ps).push(t),this.build())}ws(){if(!this.ps)return;const t=Et(this.ps);this.ps=null,t.forEach((t=>{this.Hs(t,!0)}))}Hs(t,i){try{this.cs.executeAction(t,i)}catch(i){a("Action execution failed:",i,t.node.tagName,t.method)}}Is(){let t=this.getAttribute("data-block-on-consent");if(null===t){if(!function(t){let i=t.getAmpDoc().getMetaByName("amp-consent-blocking");return!!i&&(i=i.toUpperCase().replace(/\s+/g,""),i.split(",").includes(t.tagName))}(this))return null;t="default",this.setAttribute("data-block-on-consent",t)}return""==t||"default"==t?Et(this.cs).getConsentPolicy():t}Ms(){var t;const i=this.getAttribute("data-block-on-consent-purposes")||null;return null==i||null===(t=i.replace(/\s+/g,""))||void 0===t?void 0:t.split(",")}getPlaceholder(){return xt(this,(t=>t.hasAttribute("placeholder")&&!ir(t)))}togglePlaceholder(t){if(sr(this),t){const t=this.getPlaceholder();t&&t.classList.remove("amp-hidden")}else{const t=(this,yt("placeholder"),"> [placeholder]",this.querySelectorAll(It("> [placeholder]",":scope")));for(let i=0;i0||this.Rt.get(Pe);return!(this.hs==Gs||this.hasAttribute("noloading")||i&&!t||!function(t){const i=t.tagName.toUpperCase();return"AMP-AD"===(s=i)||"AMP-ANIM"===s||"AMP-EMBED"===s||"AMP-FACEBOOK"===s||"AMP-FACEBOOK-COMMENTS"===s||"AMP-FACEBOOK-PAGE"===s||"AMP-GOOGLE-DOCUMENT-EMBED"===s||"AMP-IFRAME"===s||"AMP-IMG"===s||"AMP-INSTAGRAM"===s||"AMP-LIST"===s||"AMP-PINTEREST"===s||"AMP-PLAYBUZZ"===s||"AMP-RENDER"===s||"AMP-TIKTOK"===s||"AMP-TWITTER"===s||function(t){return"AMP-VIDEO"!=t&&te.test(t)}(i);var s}(this)||Ct(this))}toggleLoading(t,i=!1){if(!this.ownerDocument||!this.ownerDocument.defaultView)return;const s=bi(this.getAmpDoc(),"loadingIndicator");s&&((t=t&&this.js(i))?s.track(this):s.untrack(this))}getOverflowElement(){return void 0===this.us&&(this.us=Ot(this,"overflow"),this.us&&(this.us.hasAttribute("tabindex")||this.us.setAttribute("tabindex","0"),this.us.hasAttribute("role")||this.us.setAttribute("role","button"))),this.us}overflowCallback(t,i,s){this.getOverflowElement(),this.us?(this.us.classList.toggle("amp-visible",t),this.us.onclick=t?()=>{const t=es(this.getAmpDoc());t.forceChangeSize(this,i,s),t.mutateElement(this,(()=>{this.overflowCallback(!1,i,s)}))}:null):t&&this.warnOnMissingOverflow}Us(t,i,s=!1){this._i?es(this.getAmpDoc()).mutateElement(i||this,t,s):t()}},t.__AMP_BASE_CE_CLASS}(t,i);class e extends s{adoptedCallback(){Object.getPrototypeOf(this)!==n&&Object.setPrototypeOf(this,n)}}const n=e.prototype;return e}function ir(t){return"placeholder"in t}function sr(t){Et(!t._s)}function er(t){Zn.add(t||"*");for(var i,s=n(Xn,!0);!(i=s()).done;){const s=i.value;null!=t&&s.tagName.toLowerCase()!==t||s.markUnresolved()}}var nr=new WeakMap;function rr(t){return t.__AMP_EXTENDED_ELEMENTS||(t.__AMP_EXTENDED_ELEMENTS={}),t.__AMP_EXTENDED_ELEMENTS}function hr(t,i,s){const e=rr(t);if(e[i]){if(e[i]!=s){Tt(e[i]==Kn,"%s is already registered. The script tag for %s is likely included twice in the page.",i,i),e[i]=s;for(let e=0;e{t.declareExtension(i,s),e.addEventListener("error",(()=>er(i))),lr(t.win,i)})),t.isBodyAvailable()&&t.setExtensionsKnown()}function lr(t,i){rr(t)[i]||ar(t,i,Kn)}function cr(t,i,s){ar(i,s,rr(t)[s]||Kn)}function ar(t,i,s){rr(t)[i]=s;const e=tr(t,dr);t.customElements.define(i,e)}function dr(t,i,s){nr.has(t)||(nr.set(t,!0),ur(t));const e=i.localName;s||t.declaresExtension(e)||is(t.win).installExtensionForDoc(t,e,"0.1")}var fr="amp-img",pr=["alt","aria-describedby","aria-label","aria-labelledby","crossorigin","referrerpolicy","title","importance","sizes","srcset","src"],mr=class extends Gn{static R1(){return!1}static prerenderAllowed(){return!0}static usesLoading(){return!0}static getPreconnects(t){const i=t.getAttribute("src");if(i)return[i];const s=t.getAttribute("srcset");if(s){const t=/\S+/.exec(s);if(t)return[t[0]]}return null}constructor(t){super(t),this.zs=!0,this.Gs=null,this.qs=null,this.Ws=null,this.Ks=0}mutatedAttributesCallback(t){if(this.Gs){const i=pr.filter((i=>void 0!==t[i]));t.src&&!t.srcset&&this.element.hasAttribute("srcset")&&(this.element.removeAttribute("srcset"),i.push("srcset"),this.user().warn(fr,"Removed [srcset] since [src] was mutated. Recommend adding a [srcset] binding to support responsive images.",this.element)),ue(i,this.element,this.Gs,!0),this.propagateDataset(this.Gs),mr.R1()&&!this.Gs.complete&&this.setReadyState(li)}}preconnectCallback(t){const i=this.element.getAttribute("src");if(i)os(this.win).url(this.getAmpDoc(),i,t);else{const i=this.element.getAttribute("srcset");if(!i)return;const s=/\S+/.exec(i);s&&os(this.win).url(this.getAmpDoc(),s[0],t)}}isLayoutSupported(t){return ee(t)}Ys(){if(this.Gs)return this.Gs;this.zs=!this.element.hasAttribute("fallback");const t=qt(this.element);var i,s;return t&&(this.Gs=bt(this.element,"> img:not([placeholder])")),this.Gs=this.Gs||new Image,this.Gs.setAttribute("decoding","async"),this.element.id&&this.Gs.setAttribute("amp-img-id",this.element.id),"img"==this.element.getAttribute("role")&&(this.element.removeAttribute("role"),this.user().error(fr,"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 element.")),this.Js(!0),ue(pr,this.element,this.Gs),this.propagateDataset(this.Gs),oe(this.Gs,!0),i=this.element,s=this.Gs,i.hasAttribute("object-fit")&&ys(s,"object-fit",i.getAttribute("object-fit")),i.hasAttribute("object-position")&&ys(s,"object-position",i.getAttribute("object-position")),t||this.element.appendChild(this.Gs),this.Gs}Js(t){if(!this.Gs)return;if(this.element.hasAttribute("i-amphtml-ssr"))return;if(this.element.hasAttribute("sizes")||this.Gs.hasAttribute("sizes"))return;const i=this.element.getAttribute("srcset");if(!i||/[0-9]+x(?:,|$)/.test(i))return;const{width:s}=this.element.getLayoutSize();if(!this.Qs(s))return;const e=this.getViewport().getWidth(),n=`(max-width: ${e}px) ${s}px, `;let r=s+"px";if(this.getLayout()!==qs){const t=Math.round(100*s/e);r=Math.max(t,100)+"vw"}const h=n+r;t?this.Gs.setAttribute("sizes",h):this.mutateElement((()=>{this.Gs.setAttribute("sizes",h)})),this.Ks=s}Qs(t){return!this.Gs.hasAttribute("sizes")||t>this.Ks}reconstructWhenReparented(){return!1}mountCallback(){const t=!!this.Gs,i=this.Ys();t||($e(i,"load",(()=>{this.setReadyState(ci),this.firstLayoutCompleted(),this.Xs()})),$e(i,"error",(t=>{this.setReadyState(ai,t),this.Zs()}))),i.complete?(this.setReadyState(ci),this.firstLayoutCompleted(),this.Xs()):this.setReadyState(li)}unmountCallback(){const t=this.Gs;t&&!t.complete&&(t.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",Ut(t),this.Gs=null)}ensureLoaded(){this.Gs.loading="eager"}layoutCallback(){this.Ys();const t=this.Gs;this.qs=$e(t,"load",(()=>this.Xs())),this.Ws=$e(t,"error",(()=>this.Zs()));const{width:i}=this.element.getLayoutSize();return i<=0?r():this.loadPromise(t)}unlayoutCallback(){if(mr.R1())return;this.Ws&&(this.Ws(),this.Ws=null),this.qs&&(this.qs(),this.qs=null);const t=this.Gs;return t&&!t.complete&&(t.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",Ut(t),this.Gs=null),!0}firstLayoutCompleted(){const t=this.getPlaceholder();t&&t.classList.contains("i-amphtml-blurry-placeholder")?Rs(t,{"opacity":0}):this.togglePlaceholder(!1)}Xs(){!this.zs&&this.Gs.classList.contains("i-amphtml-ghost")&&(this.Gs.classList.remove("i-amphtml-ghost"),this.toggleFallback(!1))}Zs(){this.zs&&(this.Gs.classList.add("i-amphtml-ghost"),this.toggleFallback(!0),this.togglePlaceholder(!1),this.zs=!1)}propagateDataset(t){for(const i in t.dataset)i in this.element.dataset||delete t.dataset[i];for(const i in this.element.dataset)i.startsWith("ampBind")&&"ampBind"!==i||t.dataset[i]!==this.element.dataset[i]&&(t.dataset[i]=this.element.dataset[i])}},_r=class extends Gn{static prerenderAllowed(){return!0}isLayoutSupported(t){return t==Ys||ee(t)}buildCallback(){!function(t){if(qt(t))return;const i=function(t){var i;return ie(null!==(i=t.getAttribute("layout"))&&void 0!==i?i:"")||we(t).layout}(t);if(i==Ys)return;const s=t.ownerDocument.createElement("div");oe(s),function(t){return function(t,i){const s=[];for(let i=t.firstChild;i;i=i.nextSibling)!Ct(i)&&s.push(i);return s}(t)}(t).forEach((t=>{s.appendChild(t)})),t.appendChild(s)}(this.element)}};function Ar(t,i,s=!1){const e=new(Ns.getImage(t));return s&&(e.referrerPolicy="no-referrer"),e.src=i,e}var Pr="amp-pixel",gr=class extends Gn{constructor(t){super(t),this.te=null}isLayoutSupported(t){return!0}buildCallback(){this.element.setAttribute("aria-hidden","true"),this.ie=this.element.getAttribute("referrerpolicy"),this.ie&&Tt("no-referrer"==this.ie,`${Pr}: invalid "referrerpolicy" value "${this.ie}". Only "no-referrer" is supported`),this.element.hasAttribute("i-amphtml-ssr")&&this.element.querySelector("img")||this.getAmpDoc().whenFirstVisible().then(this.se.bind(this))}se(){if(this.te)return vt().error(Pr,"duplicate pixel"),this.te;this.te=cs(this.win).promise(1).then((()=>{const t=this.element.getAttribute("src");if(t)return as(this.element).expandUrlAsync(this.ee(t)).then((t=>{if(this.win)return function(t,i,s){return s&&"no-referrer"!==s&&Pt().error("pixel","Unsupported referrerPolicy: %s",s),"no-referrer"===s?function(t,i){if("referrerPolicy"in Image.prototype)return Ar(t,i,!0);{const e=(s={"src":"about:blank","style":"display:none"},function(t,i){for(const s in i)t.setAttribute(s,i[s]);return t}(t.document.createElement("iframe"),s));return e.onload=()=>{Ar(e.contentWindow,i)},t.document.body.appendChild(e),e}var s}(t,i):Ar(t,i)}(this.win,t,this.ie)}))}))}ee(t){return Tt(/^(https\:\/\/|\/\/)/i.test(t),'The src attribute must start with "https://" or "//". Invalid value: '+t),t}},vr=class{constructor(t,i,s){this.ne=cs(t),this.re=i,this.he=s||0,this.oe=-1,this.ue=0,this.le=!1,this.ce=()=>{this.ae()}}isPending(){return-1!=this.oe}schedule(t){let i=t||this.he;this.le&&i<10&&(i=10);const s=Date.now()+i;return(!this.isPending()||s-this.ue<-10)&&(this.cancel(),this.ue=s,this.oe=this.ne.delay(this.ce,i),!0)}ae(){this.oe=-1,this.ue=0,this.le=!0,this.re(),this.le=!1}cancel(){this.isPending()&&(this.ne.cancel(this.oe),this.oe=-1)}};function Er(t,i){const s=i.documentElement;return t.some((t=>s.hasAttribute(t)))}function Tr(t){return Er(["⚡4email","amp4email"],t)}function Mr(t){return Er(["⚡","amp"],t)}var Ir="Action",Rr="__AMP_ACTION_MAP__"+Math.random(),yr="__AMP_ACTION_QUEUE__",br="__AMP_ACTION_HANDLER__",wr={"form":["submit","clear"]},Vr=[{tagOrTarget:"AMP",method:"setState"},{tagOrTarget:"*",method:"focus"},{tagOrTarget:"*",method:"hide"},{tagOrTarget:"*",method:"show"},{tagOrTarget:"*",method:"toggleClass"},{tagOrTarget:"*",method:"toggleChecked"},{tagOrTarget:"*",method:"toggleVisibility"}],Sr={"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},xr=class{constructor(t,i,s,e,n,r,h,o="?",u=null,l=Math.random()){this.node=t,this.method=i,this.args=s,this.source=e,this.caller=n,this.event=r,this.trust=h,this.actionEventType=o,this.tagOrTarget=u||t.tagName,this.sequenceId=l}satisfiesTrust(t){if(!S(this.trust))return vt().error(Ir,`Invalid trust for '${this.method}': ${this.trust}`),!1;if(this.trustt.value)).join(".")};r||(r=_()),r[u]=l,n=t.peek(),s(n.type==$r.SEPARATOR&&(","==n.value||")"==n.value),"Expected either [,] or [)]")}else s(!1,`; unexpected token [${e.value||""}]`)}while(e.type!=$r.SEPARATOR||")"!=e.value);var h;return r}function Lr(t,i,s,e){return Tt(s,"Invalid action definition in %s: [%s] %s",i,t,e||"")}function Ur(t,i,s,e,n){return void 0!==n?Lr(t,i,e.includes(s.type)&&s.value==n,`; expected [${n}]`):Lr(t,i,e.includes(s.type)),s}var $r={INVALID:0,EOF:1,SEPARATOR:2,LITERAL:3,ID:4,OBJECT:5},Fr=" \t\n\r\f\v \u2028\u2029",Br=class{constructor(t){this.de=t,this.fe=-1}next(t){const i=this.pe(t||!1);return this.fe=i.index,i}peek(t){return this.pe(t||!1)}pe(t){let i=this.fe+1;if(i>=this.de.length)return{type:$r.EOF,index:this.fe};let s=this.de.charAt(i);if(-1!=Fr.indexOf(s)){for(i++;i=this.de.length)return{type:$r.EOF,index:i};s=this.de.charAt(i)}if(t&&(Hr(s)||"."==s&&i+1="0"&&t<="9"}function jr(t){return!!t&&"function"==typeof t.getFormData}var zr=["GET","POST"],Gr=[T,m];function qr(t,i){const s=E({},i);if(jr(i.body)){const t=i.body;s.headers["Content-Type"]="multipart/form-data;charset=utf-8",s.body=function(t){const i=[];for(let s=t.next();!s.done;s=t.next())i.push(s.value);return i}(t.entries())}return{input:t,init:s}}function Wr(t,i){const s=t||{},e=s.credentials;return U(void 0===e||"include"==e||"omit"==e),s.method=void 0===(n=s.method)?"GET":(n=n.toUpperCase(),U(zr.includes(n)),n),s.headers=s.headers||{},i&&(s.headers.Accept=i),U(null!==s.body),s;var n}function Kr(t){return new Promise((i=>{if(t.ok)return i(t);const{status:s}=t,e=Pt().createError(`HTTP error ${s}`);throw e.retriable=function(t){return 415==t||t>=500&&t<600}(s),e.response=t,e}))}var Yr=class{constructor(t){this.win=t;const i=Qi(t);this.me=i.isSingleDoc()?i.getSingleDoc():null}_e(t,i){return function(t,i,s,e){if(!i)return r();const n=e.prerenderSafe?r():i.whenFirstVisible(),h=ps(i),o=an(s),u=h.hasCapability("xhrInterceptor"),l=e.bypassInterceptorForDev&&!1;return o||!u||l?n:i.getRootNode().documentElement.hasAttribute("allow-xhr-interception")?n.then((()=>h.isTrustedViewer())).then((i=>{if(!i&&!Oe(t,"untrusted-xhr-interception"))return;const n={"originalRequest":qr(s,e)};return h.sendMessageAwaitResponse("xhr",n).then((t=>function(t,i){if(H(m(t),"Object expected: %s",t),"document"!=i)return new Response(t.body,t.init);const s=_(),e={status:200,statusText:"OK",getResponseHeader:t=>s[String(t).toLowerCase()]||null};if(t.init){const i=t.init;T(i.headers)&&i.headers.forEach((t=>{const i=t[0],e=t[1];s[String(i).toLowerCase()]=String(e)})),i.status&&(e.status=parseInt(i.status,10)),i.statusText&&(e.statusText=String(i.statusText))}return new Response(t.body?String(t.body):"",e)}(t,e.responseType)))})):n}(this.win,this.me,t,i).then((t=>{if(t)return t;if(jr(i.body)){const t=i.body;i.body=t.getFormData()}return this.win.fetch.apply(null,arguments)}))}Ae(t,i={}){return t=function(t,i,s){return U("string"==typeof i),!1!==s.ampCors&&(i=Pn(t,i)),i}(this.win,t,i),i=function(t,i,s){s=s||{};const e=function(t){return t.origin||sn(t.location.href).origin}(t);return e==sn(i).origin&&(s.headers=s.headers||{},s.headers["AMP-Same-Origin"]="true"),s}(this.win,t,i),this._e(t,i).then((t=>t),(i=>{const s=sn(t).origin;throw Pt().createExpectedError("XHR",`Failed fetching (${s}/...):`,i&&i.message)}))}fetchJson(t,i){return this.fetch(t,function(t){const i=Wr(t,"application/json");if("POST"==i.method&&!jr(i.body)){U(Gr.some((t=>t(i.body)))),i.headers["Content-Type"]=i.headers["Content-Type"]||"text/plain;charset=utf-8";const t=i.headers["Content-Type"];i.body="application/x-www-form-urlencoded"===t?on(i.body):JSON.stringify(i.body)}return i}(i))}fetchText(t,i){return this.fetch(t,Wr(i,"text/plain"))}xssiJson(t,i){return i?t.text().then((t=>t.startsWith(i)?j(t.slice(i.length)):j(t))):t.json()}fetch(t,i){const s=Wr(i);return this.Ae(t,s).then((t=>Kr(t)))}sendSignal(t,i){return this.Ae(t,i).then((t=>Kr(t)))}getCorsUrl(t,i){return Pn(t,i)}},Qr=class extends Yr{constructor(t){super(t),this.ge=_()}fetch(t,i){const s=i&&i.headers&&i.headers.Accept||"",e=!i||!i.method||"GET"===i.method,n=this.Pe(t,s),r=!!this.ge[n];if(e&&r)return this.ge[n].then((t=>t.clone()));const h=super.fetch(t,i);return e&&(this.ge[n]=h.then((t=>(delete this.ge[n],t.clone())),(t=>{throw delete this.ge[n],t}))),h}Pe(t,i){return cn(An(t,_n(this.win.location)))+i}},Jr={"+":"-","/":"_","=":"."};function Xr(t){const i=function(t){const i=new Array(t.length);for(let s=0;sJr[t]))}var Zr="AIzaSyDKtqGxnoeIqVM33Uf7hRSa3GJxuzR7mLc",th="CacheCidApi",ih="-test-amp-cookie-tmp";function sh(t,i){const s=function(t){try{return t.document.cookie}catch(t){return""}}(t);if(!s)return null;const e=s.split(";");for(let t=0;t=0;n--)if(s=i[n]+"."+s,nh(t,e,"delete",Date.now()+1e3,s),"delete"==sh(t,e))return nh(t,e,"delete",Date.now()-1e3,s),s}return null}(t)),nh(t,i,s,e,r,n.sameSite,n.secure)}function nh(t,i,s,e,n,r,h){"ampproject.org"==n&&(s="delete",e=0);const o=encodeURIComponent(i)+"="+encodeURIComponent(s)+"; path=/"+(n?"; domain="+n:"")+"; expires="+new Date(e).toUTCString()+function(t,i){return i?`; SameSite=${i}`:""}(0,r)+(h?"; Secure":"");try{t.document.cookie=o}catch(t){}}var rh="GoogleCidApi",hh="AMP_TOKEN",oh="$RETRIEVING",uh="$OPT_OUT",lh="$NOT_FOUND",ch=3e4,ah=31536e6,dh=31536e6,fh=/^[a-zA-Z0-9-_.]+$/,ph="amp-cid-optout",mh={"googleanalytics":"AMP_ECID_GOOGLE"},_h={"googleanalytics":"AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM"};function Ah(t,i,s){eh(t,i,s,Date.now()+dh,{highestAvailableDomain:!0})}function Ph(t,i,s){ls(t).then((t=>{if(!t.isViewerStorage()){const e=gh(i);t.setNonBoolean(e,s)}}))}function gh(t){return"amp-cid:"+t}function vh(t,i,s){const{ampdoc:e}=t,{win:n}=e,{disableBackup:r,scope:h}=i,o=i.cookieName||h;return function(t,i){const{ampdoc:s}=t,{win:e}=s,{disableBackup:n,scope:r}=i,h=i.cookieName||r,o=sh(e,h);return o?Promise.resolve(o):n?Promise.resolve(null):ls(s).then((t=>{const i=gh(h);return t.get(i,dh)})).then((t=>t&&"string"==typeof t?t:null))}(t,i).then((u=>{if(!u&&!i.createCookieIfNotPresent)return Promise.resolve(null);if(u)return/^amp-/.test(u)&&(Ah(n,o,u),r||Ph(e,o,u)),Promise.resolve(u);if(t.ve[h])return t.ve[h];const l=Ih(n).then((t=>"amp-"+t));return Promise.all([l,s]).then((t=>{const i=t[0];sh(n,o)||(Ah(n,o,i),r||Ph(e,o,i))})),t.ve[h]=l}))}function Eh(t,i){const s=ps(t);return s.isTrustedViewer().then((t=>{if(t)return vt().expectedError("CID","Viewer does not provide cap=cid"),s.sendMessageAwaitResponse("cid",i).then((t=>t&&!function(t,i){try{return j(t)}catch(t){return null}}(t)?(vt().expectedError("CID","invalid cid format"),JSON.stringify({"time":Date.now(),"cid":t})):t))}))}function Th(t){return JSON.stringify({"time":Date.now(),"cid":t})}function Mh(t){return G(t,16)||String(t.location.href+Date.now()+t.Math.random()+t.screen.width+t.screen.height)}function Ih(t){const i=Mh(t);if("string"==typeof i)return Zi(t).sha384Base64(i);{const t=i;return o((()=>Xr(t).replace(/\.+$/,"")))}}var Rh="Crypto";var yh=["prefetch","preload","preconnect","dns-prefetch"],bh={attributes:!0,attributeFilter:["hidden"],subtree:!0};function wh(t){try{return t.state}catch(t){return null}}var Vh="History",Sh="AMP.History";function xh(t){const i=ps(t);let s;return i.isOvertakeHistory()||t.win.__AMP_TEST_IFRAME?s=new class{constructor(t,i){this.win=t,this.Ee=i,this.Te=0,this.ye=null,this.Ie=this.Ee.onMessage("historyPopped",(t=>this.Me(t)))}replaceStateForTarget(t){Et("#"==t[0]),this.win.location.replace(t)}cleanup(){this.Ie()}setOnStateUpdated(t){this.ye=t}Re(t,i,s){return this.we(t)?t:i}we(t){return!!t&&void 0!==t.stackIndex}push(t){const i=E({"stackIndex":this.Te+1},t||{}),s="pushHistory";return this.Ee.sendMessageAwaitResponse(s,i).then((t=>{const e=i,n=this.Re(t,e,s);return this.be(n),n}))}pop(t){if(t>this.Te)return this.get();const i={"stackIndex":this.Te},s="popHistory";return this.Ee.sendMessageAwaitResponse(s,i).then((t=>{const i={"stackIndex":this.Te-1},e=this.Re(t,i,s);return this.be(e),e}))}replace(t){if(t&&t.url){if(!this.Ee.hasCapability("fullReplaceHistory")){const t={"stackIndex":this.Te};return Promise.resolve(t)}const i=t.url.replace(/#.*/,"");t.url=i}const i=E({"stackIndex":this.Te},t||{}),s="replaceHistory";return this.Ee.sendMessageAwaitResponse(s,i,!0).then((t=>{const e=i,n=this.Re(t,e,s);return this.be(n),n}))}get(){return Promise.resolve({data:void 0,fragment:"",stackIndex:this.Te,title:""})}Me(t){void 0!==t.newStackIndex&&(t.stackIndex=t.newStackIndex),this.we(t)&&this.be(t)}be(t){const{stackIndex:i}=t;this.Te!=i&&(this.Te=i,this.ye&&this.ye(t))}getFragment(){return this.Ee.hasCapability("fragment")?this.Ee.sendMessageAwaitResponse("getFragment",void 0,!0).then((t=>{if(!t)return"";let i=t;return"#"==i[0]&&(i=i.substr(1)),i})):Promise.resolve("")}updateFragment(t){return this.Ee.hasCapability("fragment")?this.Ee.sendMessageAwaitResponse("replaceHistory",{"fragment":t},!0):r()}}(t.win,i):(Mi(t.win,"global-history-binding",class{constructor(t){this.win=t,this.ne=cs(t);const{history:i}=this.win;this.Ve=i.length-1;const s=wh(i);let e,n;s&&void 0!==s[Sh]&&(this.Ve=Math.min(s[Sh],this.Ve)),this.Te=this.Ve,this.Se,this.ye=null,this.xe="state"in i,this.Oe=this.Ce(this.Te),i.pushState&&i.replaceState?(this.ke=i.originalPushState||i.pushState.bind(i),this.Ne=i.originalReplaceState||i.replaceState.bind(i),e=(t,i,s)=>{this.Oe=t,this.ke(t,i,s||null)},n=(t,i,s)=>{this.Oe=t,void 0!==s?this.Ne(t,i,s):this.Ne(t,i)},i.originalPushState||(i.originalPushState=this.ke),i.originalReplaceState||(i.originalReplaceState=this.Ne)):(e=(t,i,s)=>{this.Oe=t},n=(t,i,s)=>{this.Oe=t}),this.De=e,this.Le=n;try{this.Le(this.Ce(this.Te,!0))}catch(t){vt().error(Vh,"Initial replaceState failed: "+t.message)}i.pushState=this.Ue.bind(this),i.replaceState=this.$e.bind(this),this.Fe=t=>{t.state,this.Be()},this.win.addEventListener("popstate",this.Fe)}cleanup(){this.ke&&(this.win.history.pushState=this.ke),this.Ne&&(this.win.history.replaceState=this.Ne),this.win.removeEventListener("popstate",this.Fe)}Ce(t,i){const s=_(i?this.He():void 0);return s[Sh]=t,s}setOnStateUpdated(t){this.ye=t}push(t){return this.je((()=>{const i=this.ze(this.He(),t||{});return this.Ue(i,void 0,i.fragment?"#"+i.fragment:void 0),o((()=>this.ze(i,{stackIndex:this.Te})))}))}pop(t){return t=Math.max(t,this.Ve),this.je((()=>this.Ge(this.Te-t+1))).then((t=>this.ze(this.He(),{stackIndex:t})))}replace(t={}){return this.je((()=>{const i=this.ze(this.He(),t||{}),s=(i.url||"").replace(/#.*/,""),e=i.fragment?"#"+i.fragment:"";return this.$e(i,i.title,s||e?s+e:void 0),o((()=>this.ze(i,{stackIndex:this.Te})))}))}get(){return o((()=>this.ze(this.He(),{stackIndex:this.Te})))}backTo(t){return t=Math.max(t,this.Ve),this.je((()=>this.Ge(this.Te-t)))}Be(){let t=this.He();const i=t?t[Sh]:void 0;let s=this.Te;const e=this.Se;this.Se=void 0,s>this.win.history.length-2&&(s=this.win.history.length-2,this.be(this.ze(t,{stackIndex:s}))),null==i?s+=1:s=iPromise.resolve(this.Te)))}Ue(t,i,s){this.qe(),t||(t={});let e=this.Te+1;t[Sh]=e,this.De(t,i,s),e!=this.win.history.length-1&&(e=this.win.history.length-1,t[Sh]=e,this.Le(t));const n=this.ze(t,{stackIndex:e});this.be(n)}replaceStateForTarget(t){Et("#"==t[0]),this.je((()=>{this.win.removeEventListener("popstate",this.Fe);try{this.win.location.replace(t)}finally{this.win.addEventListener("popstate",this.Fe)}return this.$e(),r()}))}$e(t,i,s){this.qe(),t||(t={});const e=Math.min(this.Te,this.win.history.length-1);t[Sh]=e,this.Le(t,i,s);const n=this.ze(t,{stackIndex:e});this.be(n)}be(t){this.qe(),t.stackIndex=Math.min(t.stackIndex,this.win.history.length-1),this.Te!=t.stackIndex&&(this.Te=t.stackIndex,this.ye&&this.ye(t))}getFragment(){let{hash:t}=this.win.location;return t=t.substr(1),Promise.resolve(t)}updateFragment(t){return this.replace({fragment:t})}ze(t,i){const s=E(E({},t&&t.data||{}),i.data||{});return E(E(E({},t||{}),i),{},{data:s})}}),s=Ri(t.win,"global-history-binding")),new class{constructor(t,i){this._i=t,this.ne=cs(t.win),this.Ke=i,this.Te=0,this.Ye=[],this.Vi=[],this.Ke.setOnStateUpdated(this.ye.bind(this))}cleanup(){this.Ke.cleanup()}push(t,i){return this.Je((()=>this.Ke.push(i).then((i=>(this.ye(i),t&&(this.Ye[i.stackIndex]=t),i.stackIndex)))),"push")}pop(t){return this.Je((()=>this.Ke.pop(t).then((t=>{this.ye(t)}))),"pop")}replace(t){return this.Je((()=>this.Ke.replace(t)),"replace")}get(){return this.Je((()=>this.Ke.get()),"get")}goBack(t){return this.Je((()=>this.Te<=0&&!t?r():this.Ke.pop(this.Te).then((t=>{this.ye(t)}))),"goBack")}replaceStateForTarget(t){Et("#"==t[0]);const i=this._i.win.location.hash;return this.push((()=>{this._i.win.location.replace(i||"#")})).then((()=>{this.Ke.replaceStateForTarget(t)}))}getFragment(){return this.Ke.getFragment()}updateFragment(t){return"#"==t[0]&&(t=t.substr(1)),this.Ke.updateFragment(t)}ye(t){this.Te=t.stackIndex,this.Qe(t)}Qe(t){if(this.Te>=this.Ye.length-1)return;const i=[];for(let t=this.Ye.length-1;t>this.Te;t--)this.Ye[t]&&(i.push(this.Ye[t]),this.Ye[t]=void 0);if(this.Ye.splice(this.Te+1),i.length>0)for(let s=0;si[s](t)),1)}Je(t,i){const s=new h,{promise:e,reject:n,resolve:r}=s,o=new Error("history trace for "+i+": ");return this.Vi.push({callback:t,resolve:r,reject:n,trace:o}),1==this.Vi.length&&this.Xe(),e}Xe(){if(0==this.Vi.length)return;const t=this.Vi[0];let i;try{i=t.callback()}catch(t){i=Promise.reject(t)}i.then((i=>{t.resolve(i)}),(i=>{vt().error(Vh,"failed to execute a task:",i),t.trace&&(t.trace.message+=i,vt().error(Vh,t.trace)),t.reject(i)})).then((()=>{this.Vi.splice(0,1),this.Xe()}))}}(t,s)}new WeakMap,new WeakMap;var Oh=['
'],Ch=class{constructor(t,i){this.win=t,this.Ze=i,this.tn=[],this.sn=new gs,this.en=t=>{V(t.target)&&this.nn(t.target)},this.rn=i=>{cs(t).delay((()=>{this.win.document.activeElement&&this.nn(this.win.document.activeElement)}),500)},this.win.document.addEventListener("focus",this.en,!0),this.win.addEventListener("blur",this.rn)}hn(){this.win.document.removeEventListener("focus",this.en,!0),this.win.removeEventListener("blur",this.rn)}onFocus(t){return this.sn.add(t)}nn(t){const i=Date.now();0==this.tn.length||this.tn[this.tn.length-1].el!=t?this.tn.push({el:t,time:i}):this.tn[this.tn.length-1].time=i,this.purgeBefore(i-this.Ze),this.sn.fire(t)}getLast(){return 0==this.tn.length?null:this.tn[this.tn.length-1].el}purgeBefore(t){let i=this.tn.length-1;for(let s=0;s=t){i=s-1;break}-1!=i&&this.tn.splice(0,i+1)}hasDescendantsOf(t){this.win.document.activeElement&&this.nn(this.win.document.activeElement);for(let i=0;i(r=e||"").length||-1===r.indexOf("noopener",h))&&(n=t.open(i,"_top")),n}var $h="navigation",Fh="click",Bh="contextmenu",Hh=["_top","_blank"],jh="data-a4a-orig-href";function zh(t,i){const s=St(i.target,"A");if(!s||!s.href)return;const e=s.getAttribute(jh)||s.getAttribute("href");if(!e)return;const n={"CLICK_X":()=>i.pageX,"CLICK_Y":()=>i.pageY},r=as(s).expandUrlSync(e,n,{"CLICK_X":!0,"CLICK_Y":!0});r!=e&&(s.getAttribute(jh)||s.setAttribute(jh,e),s.setAttribute("href",r))}function Gh(t){return`${t.origin}${t.pathname}${t.search}`}function qh(t){return T(t)?t:[t]}function Wh(t){Mi(t,"platform",class{constructor(t){this._h=t.navigator,this.i=t}isAndroid(){return/Android/i.test(this._h.userAgent)}isIos(){return/iPhone|iPad|iPod/i.test(this._h.userAgent)}isSafari(){return/Safari/i.test(this._h.userAgent)&&!this.isChrome()&&!this.isEdge()&&!this.isFirefox()&&!this.isOpera()}isChrome(){return/Chrome|CriOS/i.test(this._h.userAgent)&&!this.isEdge()&&!this.isOpera()}isFirefox(){return/Firefox|FxiOS/i.test(this._h.userAgent)&&!this.isEdge()}isOpera(){return/OPR\/|Opera|OPiOS/i.test(this._h.userAgent)}isEdge(){return/Edge/i.test(this._h.userAgent)}isWebKit(){return/WebKit/i.test(this._h.userAgent)&&!this.isEdge()}isWindows(){return/Windows/i.test(this._h.userAgent)}isStandalone(){return this.isIos()&&this._h.standalone||this.isChrome()&&this.i.matchMedia("(display-mode: standalone)").matches}isBot(){return/bot/i.test(this._h.userAgent)}getMajorVersion(){return this.isSafari()?this.isIos()?this.getIosMajorVersion()||0:this.Ah(/\sVersion\/(\d+)/,1):this.isChrome()?this.Ah(/(Chrome|CriOS)\/(\d+)/,2):this.isFirefox()?this.Ah(/(Firefox|FxiOS)\/(\d+)/,2):this.isOpera()?this.Ah(/(OPR|Opera|OPiOS)\/(\d+)/,2):this.isEdge()?this.Ah(/Edge\/(\d+)/,1):0}Ah(t,i){if(!this._h.userAgent)return 0;const s=this._h.userAgent.match(t);return!s||i>=s.length?0:parseInt(s[i],10)}getIosVersionString(){var t,i,s;return this.isIos()&&(null===(t=this._h.userAgent)||void 0===t||null===(i=t.match(/OS ([0-9]+[_.][0-9]+([_.][0-9]+)?)\b/))||void 0===i||null===(s=i[1])||void 0===s?void 0:s.replace(/_/g,"."))||""}getIosMajorVersion(){const t=this.getIosVersionString();return""==t?null:Number(t.split(".")[0])}})}var Kh=class{constructor(){this.Bi=[],this.on={},this.un=0,this.ln=0}getSize(){return this.Bi.length}getLastEnqueueTime(){return this.un}getLastDequeueTime(){return this.ln}getTaskById(t){return this.on[t]||null}enqueue(t){Et(!this.on[t.id]),this.Bi.push(t),this.on[t.id]=t,this.un=Date.now()}dequeue(t){const i=this.on[t.id];return!!this.removeAtIndex(t,this.Bi.indexOf(i))&&(this.ln=Date.now(),!0)}peek(t){let i=1e6,s=null;for(let e=0;e{const i=t.getAttribute("data-prefers-dark-mode-class")||"amp-dark-mode";t.classList.add(i)}))}yn(){var t,i;try{const t=this.ampdoc.win.localStorage.getItem("amp-dark-mode");if(t)return"yes"===t}catch(t){}return null===(t=(i=this.ampdoc.win).matchMedia)||void 0===t?void 0:t.call(i,"(prefers-color-scheme: dark)").matches}pn(t){if(!t.satisfiesTrust(2))return null;const{args:i,method:s,node:e}=t,n=Mt(e);switch(s){case"pushState":case"setState":const s=e.nodeType===Node.DOCUMENT_NODE?e.documentElement:e;return Ji(s).then((i=>(Tt(i,"AMP-BIND is not installed."),i.invoke(t))));case"navigateTo":return this.In(t);case"closeOrNavigateTo":return this.Mn(t);case"scrollTo":return Tt(i.id,"AMP.scrollTo must provide element ID"),t.node=Oi(e).getElementById(i.id),this.gn(t);case"goBack":return ss(this.ampdoc).goBack(!(!i||!0!==i.navigate)),null;case"print":return n.print(),null;case"copy":return this.En(t);case"optoutOfCid":return Xi(this.ampdoc).then((t=>t.optOut())).catch((t=>{vt().error(Jh,"Failed to opt out of CID",t)}));case"toggleTheme":return this.Rn(),null}throw Pt().createError("Unknown AMP action ",s)}En(t){const{args:i,node:s}=t,e=Mt(s),n="copy-error";let r;if("AMP"===t.tagOrTarget)r=i.text.trim();else{var h;const i=$(t.node);r=(null!==(h=i.value)&&void 0!==h?h:i.textContent).trim()}const o=function(t,i,s){const n=Ue(e,`${t}`,{data:{type:i}});Wi(s.caller).trigger(s.caller,t,n,3)};var u,l,c;null!==(l=(u=e.document).defaultView)&&void 0!==l&&null!==(c=l.navigator)&&void 0!==c&&c.clipboard||Yh(u)?function(t,i,s,e){var n;null!==(n=t.navigator)&&void 0!==n&&n.clipboard?t.navigator.clipboard.writeText(i).then(s,e):Yh(t.document)&&function(t,i){var s;let e=!1;const n=t.document,r=n.createElement("textarea");bs(r,{"position":"fixed","top":0,"left":0,"width":"50px","height":"50px","padding":0,"border":"none","outline":"none","background":"transparent"}),r.value=i,r.readOnly=!0,r.contentEditable="true",n.body.appendChild(r),null===(s=t.getSelection())||void 0===s||s.removeAllRanges(),r.focus(),r.setSelectionRange(0,i.length);try{e=n.execCommand("copy")}catch(t){}return Ut(r),e}(t,i)?s():e()}(e,r,(()=>{o("copy-success","success",t)}),(()=>{o(n,"error",t)})):o(n,"unsupported",t)}In(t){const{args:i,caller:s,method:e,node:n}=t,h=Mt(n);let o=r();return s.tagName.startsWith("AMP-")&&(o=s.getImpl().then((t=>{"function"==typeof t.throwIfCannotNavigate&&t.throwIfCannotNavigate()}))),o.then((()=>{var t;(t=this.ampdoc,yi(t,"navigation")).navigateTo(h,i.url,`AMP.${e}`,{target:i.target,opener:i.opener})}),(t=>{Pt().error(Jh,t)}))}Rn(){this.ampdoc.waitForBodyOpen().then((t=>{try{const i=t.getAttribute("data-prefers-dark-mode-class")||"amp-dark-mode";this.yn()?(t.classList.remove(i),this.ampdoc.win.localStorage.setItem("amp-dark-mode","no")):(t.classList.add(i),this.ampdoc.win.localStorage.setItem("amp-dark-mode","yes"))}catch(t){}}))}Mn(t){const{node:i}=t,s=Mt(i),e=s.parent!=s;let n=!1;return s.opener&&this.ampdoc.isSingleDoc()&&!e&&(s.close(),n=s.closed),n?r():this.In(t)}gn(t){const i=t.node,{args:s}=t;let e=s&&s.position,n=s&&s.duration;return e&&!["top","bottom","center"].includes(e)&&(e=void 0),S(n)||(n=void 0),this.an.animateScrollIntoView(i,e,n)}Pn(t){return Ht(t.node),null}mn(t){const i=t.node;if(i.classList.contains("i-amphtml-element")){const t=i;this.cn.mutateElement(t,(()=>t.collapse()),!0)}else this.cn.mutateElement(i,(()=>ws(i,!1)));return null}_n(t){const{node:i}=t,s=i,e=Mt(s);if(s.classList.contains(se(Gs)))return null;this.cn.measureElement((()=>{"none"==Ss(e,s).display&&Qh(s)}));const n=(r=s).hasAttribute("autofocus")?r:r.querySelector("[autofocus]");var r;return n&&hs(e).isIos()?(this.wn(s,n),this.cn.mutateElement(s,(()=>{}))):this.cn.mutateElement(s,(()=>{this.wn(s,n)})),null}wn(t,i){t.classList.contains("i-amphtml-element")?t.expand():ws(t,!0),i&&Ht(i)}An(t){return Qh(t.node)?this._n(t):this.mn(t)}vn(t){const i=t.node,{args:s}=t,e=Pt().assertString(s.class,"Argument 'class' must be a string.");return Xh.test(e)||this.cn.mutateElement(i,(()=>{if(void 0!==s.force){const t=Pt().assertBoolean(s.force,"Optional argument 'force' must be a boolean.");i.classList.toggle(e,t)}else i.classList.toggle(e)})),null}Tn(t){const i=t.node,{args:s}=t;return this.cn.mutateElement(i,(()=>{if(void 0!==s.force){const t=Pt().assertBoolean(s.force,"Optional argument 'force' must be a boolean.");i.checked=t}else!0===i.checked?i.checked=!1:i.checked=!0})),null}},!0)}var to="Storage",io=class{constructor(t){this.Ee=t}loadBlob(t){return this.Ee.sendMessageAwaitResponse("loadStore",{"origin":t}).then((t=>t.blob))}saveBlob(t,i){return this.Ee.sendMessageAwaitResponse("saveStore",{"origin":t,"blob":i}).catch((t=>{throw vt().createExpectedError(to,"Failed to save store: ",t)}))}};function so(t){Ii(t,"storage",(function(){const i=ps(t),s=parseInt(i.getParam("storage"),10)?new io(i):new class{constructor(t){if(this.win=t,this.bn=this.Vn(),!this.bn){const t=new Error("localStorage not supported.");vt().expectedError(to,t)}}Vn(){try{return"localStorage"in this.win&&(this.win.localStorage.getItem("test"),!0)}catch(t){return!1}}Sn(t){return`amp-store:${t}`}loadBlob(t){return new Promise((i=>{this.bn?i(this.win.localStorage.getItem(this.Sn(t))):i(null)}))}saveBlob(t,i){return new Promise((s=>{this.bn?(this.win.localStorage.setItem(this.Sn(t),i),s()):s()}))}}(t.win);return new class{constructor(t,i,s){this.ampdoc=t,this.Ee=i,this.Ke=s,this.On=s instanceof io,this.h=_n(this.ampdoc.win.location),this.Cn=null}xn(){return this.kn(),this}get(t,i){return this.Nn().then((s=>s.get(t,i)))}set(t,i,s){return Et("boolean"==typeof i),this.setNonBoolean(t,i,s)}setNonBoolean(t,i,s){return this.Dn((e=>e.set(t,i,s)))}remove(t){return this.Dn((i=>i.remove(t)))}isViewerStorage(){return this.On}Nn(){return this.Cn||(this.Cn=this.Ke.loadBlob(this.h).then((t=>t?j(atob(t)):{})).catch((t=>(vt().expectedError(to,"Failed to load store: ",t),{}))).then((t=>new class{constructor(t,i){this.obj=P(t),this.Ln=i||8,this.Un=this.obj.vv||Object.create(null),this.obj.vv||(this.obj.vv=this.Un)}get(t,i){const s=this.Un[t],e=s?s.t:void 0,n=!i||null==e||e+i>Date.now();return s&&n?s.v:void 0}set(t,i,s){if(Et("__proto__"!=t&&"prototype"!=t),void 0!==this.Un[t]){const e=this.Un[t];let n=Date.now();s&&(n=e.t),e.v=i,e.t=n}else this.Un[t]={"v":i,"t":Date.now()};const e=Object.keys(this.Un);if(e.length>this.Ln){let t=1/0,i=null;for(let s=0;s{t(i);const s=btoa(JSON.stringify(i.obj));return this.Ke.saveBlob(this.h,s)})).then(this.$n.bind(this))}kn(){this.Ee.onBroadcast((t=>{"amp-storage-reset"==t.type&&t.origin==this.h&&(this.Cn=null)}))}$n(){this.Ee.broadcast({"type":"amp-storage-reset","origin":this.h})}}(t,i,s).xn()}),!0)}var eo="__AMP_IMPL_",no=()=>{};function ro(t){Mi(t,"timer",class{constructor(t){this.win=t,this.Fn=this.win.Promise.resolve(),this.Bn=0,this.Hn={},this.jn=Date.now()}timeSinceStart(){return Date.now()-this.jn}delay(t,i){if(!i){const i="p"+this.Bn++;return this.Fn.then((()=>{this.Hn[i]?delete this.Hn[i]:t()})).catch(In),i}return this.win.setTimeout((()=>{try{t()}catch(t){throw In(t),t}}),i)}cancel(t){"string"!=typeof t?this.win.clearTimeout(t):this.Hn[t]=!0}promise(t){return new this.win.Promise((i=>{if(-1==this.delay(i,t))throw new Error("Failed to schedule timer.")}))}timeoutPromise(t,i,s){let e;const n=new this.win.Promise(((i,n)=>{if(e=this.delay((()=>{n(Pt().createError(s||"timeout"))}),t),-1==e)throw new Error("Failed to schedule timer.")}));if(!i)return n;const r=()=>{this.cancel(e)};return i.then(r,r),this.win.Promise.race([n,i])}poll(t,i){return new this.win.Promise((s=>{const e=this.win.setInterval((()=>{i()&&(this.win.clearInterval(e),s())}),t)}))}})}var ho="Expander",oo=class{constructor(t,i,s,e,n,r){this.zn=t,this.Gn=i,this.qn=s,this.Wn=e,this.Kn=n,this.Yn=!r}expand(t){if(!t.length)return this.Wn?t:Promise.resolve(t);const i=this.zn.getExpr(this.Gn,this.Kn),s=this.Jn(t,i);return s.length?this.Qn(t,s):this.Wn?t:Promise.resolve(t)}getMacroNames(t){const i=this.zn.getExpr(this.Gn,this.Kn);return t.match(i)||[]}Jn(t,i){const s=[];return t.replace(i,((t,i,e)=>{const{length:n}=t,r={start:e,stop:n+e-1,name:i,length:n};s.push(r)})),s}Qn(t,i){const s=[];let e=0,n=0,r=i[n],h=0,o=!1;const u=l=>{let c="",d=[];const f=[];for(;et.join(""))).catch((t=>(a(t),"")))};return u(this.Yn)}Xn(t,i){const{encode:s,name:e}=t;let n;if(null!=t.prioritized?n=t.prioritized:this.Wn&&null!=t.sync?n=t.sync:this.Wn?(Pt().error(ho,"ignoring async replacement key: ",t.name),n=""):n=t.async||t.sync,this.Wn){const t=this.Zn(n,e,i);return s?encodeURIComponent(t):t}return this.tr(n,e,i).then((t=>s?encodeURIComponent(t):t))}tr(t,i,s){let e;try{if("function"==typeof t){const i=t;e=s?this.ir(s).then((t=>i.apply(null,t))):o(i)}else e=Promise.resolve(t);return e.then((t=>{let e;return this.sr(i,t,s),e=null==t?"":t,e})).catch((t=>(a(t),this.sr(i,"",s),Promise.resolve(""))))}catch(t){return a(t),this.sr(i,"",s),Promise.resolve("")}}ir(t){return Promise.all(t.map((t=>Promise.all(t).then((t=>t.join(""))))))}Zn(t,i,s){try{let e,n=t;return"function"==typeof t&&(n=t.apply(null,this.er(s))),n&&"function"==typeof n.then?(Pt().error(ho,"ignoring async macro resolution"),e=""):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?(this.sr(i,n,s),e=n.toString()):(this.sr(i,"",s),e=""),e}catch(t){return a(t),this.sr(i,"",s),""}}er(t){return t?t.map((t=>t.join(""))):t}sr(t,i,s){if(!this.qn)return;let e="";s&&(e=`(${s.filter((t=>""!==t)).join(",")})`),this.qn[`${t}${e}`]=i||""}},uo={"navigationStart":1,"redirectStart":1,"redirectEnd":1,"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"secureConnectionStart":1,"connectEnd":1,"requestStart":1,"responseStart":1,"responseEnd":1,"domLoading":2,"domInteractive":2,"domContentLoaded":2,"domComplete":2,"loadEventStart":3,"loadEventEnd":4};function lo(t,i,s){const e=uo[i]||3,n=s?uo[s]||3:e,h=Math.max(e,n);let o;if(1===h)o=r();else if(2===h)o=Ai(t.document);else if(3===h)o=He(t);else if(4===h){const i=cs(t);o=He(t).then((()=>i.promise(1)))}return Et(o),o.then((()=>co(t,i,s)))}function co(t,i,s){const e=t.performance&&t.performance.timing;if(!e||0==e.navigationStart)return;const n=void 0===s?e[i]:e[s]-e[i];return!S(n)||n<0?void 0:n}function ao(t,i){const s=t.performance&&t.performance.navigation;if(s&&void 0!==s[i])return s[i]}var fo="UrlReplacements";function po(t){return()=>(new Date)[t]()}function mo(t,i){return()=>t[i]}function _o(t,i){return i?(Tt("ISOCountry"===i,"The value passed to AMP_GEO() is not valid name:"+i),t&&t[i]||"unknown"):(null==t?void 0:t.matchedISOCountryGroups.join(","))||"unknown"}var Ao="Viewer",Po=/^(https?:\/\/)((www[0-9]*|web|ftp|wap|home|mobile|amp|m)\.)+/i;function go(t){let i;return t instanceof Error?((t=u(t)).message="No messaging channel: "+t.message,i=t):i=new Error("No messaging channel: "+t),i.message=N(i.message),i}var vo=class{static solveYValueFromXValue(t,i,s,e,n,r,h,o,u){return vo.nr(vo.rr(t,i,e,r,o),s,n,h,u)}static rr(t,i,s,e,n){const r=1e-6;let h=(t-i)/(n-i);if(h<=0)return 0;if(h>=1)return 1;let o=0,u=1,l=0;for(let c=0;c<8;c++){l=vo.hr(h,i,s,e,n);const c=(vo.hr(h+r,i,s,e,n)-l)/r;if(Math.abs(l-t)r&&c<8;c++)lt,EASE:t=>vo.solveYValueFromXValue(t,0,0,.25,.1,.25,1,1,1),EASE_IN:t=>vo.solveYValueFromXValue(t,0,0,.42,0,1,1,1,1),EASE_OUT:t=>vo.solveYValueFromXValue(t,0,0,0,0,.58,1,1,1),EASE_IN_OUT:t=>vo.solveYValueFromXValue(t,0,0,.42,0,.58,1,1,1)},To={"linear":Eo.LINEAR,"ease":Eo.EASE,"ease-in":Eo.EASE_IN,"ease-out":Eo.EASE_OUT,"ease-in-out":Eo.EASE_IN_OUT};function Mo(t){if(!t)return null;if(w(t)){if(-1!=(t=t).indexOf("cubic-bezier")){const r=t.match(/cubic-bezier\((.+)\)/);if(r){const t=r[1].split(",").map(parseFloat);if(4==t.length){for(let i=0;i<4;i++)if(isNaN(t[i]))return null;return i=t[0],s=t[1],e=t[2],n=t[3],t=>vo.solveYValueFromXValue(t,0,0,i,s,e,n,1,1)}}return null}return To[t]}var i,s,e,n;return t}var Io="Animation",Ro=function(){},yo=class{static animate(t,i,s,e){return new yo(t).setCurve(e).add(0,i,1).start(s)}constructor(t,i){this.lr=t,this.cr=i||ms(self),this.ar=null,this.dr=[]}setCurve(t){return t&&(this.ar=Mo(t)),this}add(t,i,s,e){return this.dr.push({delay:t,func:i,duration:s,curve:Mo(e)}),this}start(t){return new bo(this.cr,this.lr,this.dr,this.ar,t)}},bo=class{constructor(t,i,s,e,n){this.cr=t,this.lr=i,this.dr=[];for(let t=0;t1&&this.dr.sort(((t,i)=>t.delay+t.duration-(i.delay+i.duration)));try{if(i>0)for(let t=0;t=0;t--)this.dr[t].func(0,!1)}catch(i){vt().error(Io,"completion failed: "+i,i),t=!1}}t?this.Ns():this._r()}}gr(t){if(!this.le)return;const i=Date.now(),s=Math.min((i-this.jn)/this.pr,1);for(let t=0;t=i.delay&&(i.started=!0)}for(let t=0;t0){if(s=Math.min((i-t.delay)/t.duration,1),e=s,t.curve&&1!=e)try{e=t.curve(s)}catch(t){return vt().error(Io,"step curve failed: "+t,t),void this.Pr(!1,0)}}else s=1,e=1;1==s&&(t.completed=!0);try{t.func(e,t.completed)}catch(t){return vt().error(Io,"step mutate failed: "+t,t),void this.Pr(!1,0)}}};function wo(t,i){let s;for(let e=i.lastElementChild;e;e=e.previousElementSibling)if(e.getBoundingClientRect().height>0){const i=Ss(t,e);if("static"==i.position||"relative"==i.position){s=i;break}}return s?parseInt(s.marginBottom,10):0}function Vo(t,i,s){return function(t,i,s){const e=parseInt(Ss(t,i)[s],10);return isNaN(e)?0:e}(t,i===t.document.body?t.document.documentElement:i,s)}function So(t,i){return Vo(t,i,"scrollPaddingTop")}function xo(t){const i=ps(t),{win:s}=t;let e;return e=t.isSingleDoc()&&function(t,i){return hs(t).isIos()&&jt(t)&&i.isEmbedded()&&!i.hasCapability("iframeScroll")?Oo.NATURAL_IOS_EMBED:Oo.NATURAL}(s,i)==Oo.NATURAL_IOS_EMBED?new class{constructor(t){this.win=t,this.cr=ms(t);const i=this.win.document,{documentElement:s}=i,e=s.className;s.classList.add("i-amphtml-ios-embed");const n=i.createElement("html");this.Er=n,n.id="i-amphtml-wrapper",n.className=e,this.Tr=new gs,this.yr=new gs,this.Ir=this.Mr.bind(this),this.Rr=()=>this.yr.fire(),this.wr=0,this.br=!1,Dt(i,this.Vr.bind(this)),_i(i).then((()=>{s.classList.add("i-amphtml-ios-overscroll")}))}ensureReadyForElements(){this.Vr()}Vr(){if(this.br)return;this.br=!0;const t=this.win.document,i=t.body;t.documentElement.appendChild(this.Er),this.Er.appendChild(i),Object.defineProperty(t,"body",{get:()=>i}),this.Mr()}connect(){this.win.addEventListener("resize",this.Rr),this.Er.addEventListener("scroll",this.Ir)}disconnect(){this.win.removeEventListener("resize",this.Rr),this.Er.removeEventListener("scroll",this.Ir)}getBorderTop(){return 1}requiresFixedLayerTransfer(){return!Oe(this.win,"ios-fixed-no-transfer")||parseFloat(hs(this.win).getIosVersionString())<12.2}overrideGlobalScrollTo(){return!0}supportsPositionFixed(){return!0}onScroll(t){this.Tr.add(t)}onResize(t){this.yr.add(t)}updatePaddingTop(t){this.wr=t,Rs(this.Er,{"padding-top":Vs(t)})}hideViewerHeader(t,i){t||this.updatePaddingTop(0)}showViewerHeader(t,i){t||this.updatePaddingTop(i)}disableScroll(){this.Er.classList.add("i-amphtml-scroll-disabled")}resetScroll(){this.Er.classList.remove("i-amphtml-scroll-disabled")}updateLightboxMode(t){return r()}getSize(){return{width:this.win.innerWidth,height:this.win.innerHeight}}getScrollTop(){return this.Er.scrollTop}getScrollLeft(){return 0}getScrollWidth(){return this.Er.scrollWidth}getScrollHeight(){return this.Er.scrollHeight}getContentHeight(){const t=this.win.document.body,{height:i}=t.getBoundingClientRect(),s=wo(this.win,t),e=Ss(this.win,t);return parseInt(e.marginTop,10)+this.wr+i+s+parseInt(e.marginBottom,10)}contentHeightChanged(){}getLayoutRect(t,i,s){const e=t.getBoundingClientRect(),n=null!=s?s:this.getScrollTop(),r=null!=i?i:this.getScrollLeft();return Kt(Math.round(e.left+r),Math.round(e.top+n),Math.round(e.width),Math.round(e.height))}getRootClientRectAsync(){return Promise.resolve(null)}setScrollTop(t){this.Er.scrollTop=t||1}Mr(t){0==this.Er.scrollTop&&(this.Er.scrollTop=1,t&&t.preventDefault()),t&&this.Tr.fire()}getScrollingElement(){return this.Er}getScrollingElementScrollsLikeViewport(){return!1}}(s):new class{constructor(t){this.ampdoc=t,this.win=t.win,this.Sr=hs(this.win),this.Tr=new gs,this.yr=new gs,this.Ir=this.Or.bind(this),this.Rr=()=>this.yr.fire()}Or(){this.Tr.fire()}connect(){this.win.addEventListener("scroll",this.Ir),this.win.addEventListener("resize",this.Rr)}disconnect(){this.win.removeEventListener("scroll",this.Ir),this.win.removeEventListener("resize",this.Rr)}ensureReadyForElements(){}getBorderTop(){return 0}requiresFixedLayerTransfer(){return!1}overrideGlobalScrollTo(){return!1}supportsPositionFixed(){return!0}onScroll(t){this.Tr.add(t)}onResize(t){this.yr.add(t)}updatePaddingTop(t){Rs(this.win.document.documentElement,{"padding-top":Vs(t)})}hideViewerHeader(t,i){t||this.updatePaddingTop(0)}showViewerHeader(t,i){t||this.updatePaddingTop(i)}disableScroll(){this.win.document.documentElement.classList.add("i-amphtml-scroll-disabled")}resetScroll(){this.win.document.documentElement.classList.remove("i-amphtml-scroll-disabled")}updateLightboxMode(t){return r()}getSize(){const t=this.win.innerWidth,i=this.win.innerHeight;if(t&&i)return{width:t,height:i};const s=this.win.document.documentElement;return{width:s.clientWidth,height:s.clientHeight}}getScrollTop(){const t=this.getScrollingElement().scrollTop||this.win.pageYOffset,{host:i}=this.ampdoc.getRootNode();return i?t-i.offsetTop:t}getScrollLeft(){return 0}getScrollWidth(){return this.getScrollingElement().scrollWidth}getScrollHeight(){return this.getScrollingElement().scrollHeight}getContentHeight(){const t=this.getScrollingElement(),i=t.getBoundingClientRect(),s=i.top+this.getScrollTop(),e=hs(this.win).isSafari()?wo(this.win,t):0,n=Ss(this.win,t);return s+parseInt(n.marginTop,10)+i.height+e+parseInt(n.marginBottom,10)}contentHeightChanged(){}getLayoutRect(t,i,s){const e=t.getBoundingClientRect(),n=null!=s?s:this.getScrollTop(),r=null!=i?i:this.getScrollLeft();return Kt(Math.round(e.left+r),Math.round(e.top+n),Math.round(e.width),Math.round(e.height))}getRootClientRectAsync(){return Promise.resolve(null)}setScrollTop(t){this.getScrollingElement().scrollTop=t}getScrollingElement(){const t=this.win.document;return t.scrollingElement?t.scrollingElement:t.body&&this.Sr.isWebKit()?t.body:t.documentElement}getScrollingElementScrollsLikeViewport(){return!0}}(t),new class{constructor(t,i,s){const{win:e}=t;this.ampdoc=t,this.Cr=this.ampdoc.win.document,this.Ke=i,this.Ee=s,this.kr=null,this.Nr=null,this.Dr=null,this.Lr=!1,this.Ur=null,this.wr=Number(s.getParam("paddingTop")||0),this.$r=0,this.ne=cs(e),this.cr=ms(e),this.Fr=!1,this.Br=null,this.Hr=0,this.jr=new gs,this.Tr=new gs,this.yr=new gs,this.zr=void 0,this.Gr=void 0,this.qr=null,this.Ee.onMessage("viewport",this.Wr.bind(this)),this.Ee.onMessage("scroll",this.Kr.bind(this)),this.Ee.onMessage("disableScroll",this.Yr.bind(this)),this.Ee.isEmbedded()&&this.Ke.updatePaddingTop(this.wr),this.Ke.onScroll(this.Jr.bind(this)),this.Ke.onResize(this.Qr.bind(this)),this.onScroll(this.Xr.bind(this)),this.Zr=!1,this.ampdoc.onVisibilityChanged(this.th.bind(this)),this.th();const n=this.Cr.documentElement;if(t.isSingleDoc()&&n.classList.add("i-amphtml-singledoc"),s.isEmbedded()?n.classList.add("i-amphtml-embedded"):n.classList.add("i-amphtml-standalone"),jt(e)&&n.classList.add("i-amphtml-iframed"),"1"===s.getParam("webview")&&n.classList.add("i-amphtml-webview"),jt(e)&&"scrollRestoration"in e.history&&(e.history.scrollRestoration="manual"),this.Ke.overrideGlobalScrollTo())try{Object.defineProperty(e,"scrollTo",{value:(t,i)=>this.setScrollTop(i)}),["pageYOffset","scrollY"].forEach((t=>{Object.defineProperty(e,t,{get:()=>this.getScrollTop()})}))}catch(t){}hs(e).isIos()&&jt(e)&&this.ampdoc.isSingleDoc()&&this.ampdoc.whenReady().then((()=>{e.scrollTo(-.1,0)}))}dispose(){this.Ke.disconnect()}ensureReadyForElements(){this.Ke.ensureReadyForElements()}th(){const t=this.ampdoc.isVisible();t!=this.Zr&&(this.Zr=t,t?(this.Ke.connect(),this.Nr&&this.Qr(),this.Dr&&(this.Dr=null,this.getScrollTop())):this.Ke.disconnect())}getPaddingTop(){return this.wr}getScrollTop(){return null==this.Dr&&(this.Dr=this.Ke.getScrollTop()),this.Dr}getScrollLeft(){return null==this.Ur&&(this.Ur=this.Ke.getScrollLeft()),this.Ur}setScrollTop(t){this.Dr=null,this.Ke.setScrollTop(t)}updatePaddingBottom(t){this.ampdoc.waitForBodyOpen().then((i=>{ys(i,"borderBottom",`${t}px solid transparent`)}))}getSize(){if(this.Nr)return this.Nr;if(this.Nr=this.Ke.getSize(),0==this.Nr.width||0==this.Nr.height){const t=this.ampdoc.getVisibilityState();t!=Ps.PRERENDER&&t!=Ps.VISIBLE||Math.random()<.01&&vt().error("Viewport","viewport has zero dimensions")}return this.Nr}getHeight(){return this.getSize().height}getWidth(){return this.getSize().width}getScrollWidth(){return this.Ke.getScrollWidth()}getScrollHeight(){return this.Ke.getScrollHeight()}getContentHeight(){return this.Ke.getContentHeight()}contentHeightChanged(){this.Ke.contentHeightChanged()}getRect(){if(null==this.kr){const t=this.getScrollTop(),i=this.getScrollLeft(),s=this.getSize();this.kr=Kt(i,t,s.width,s.height)}return this.kr}getLayoutRect(t){const i=this.getScrollLeft(),s=this.getScrollTop(),e=xi(t,this.ampdoc.win);if(e){const n=this.Ke.getLayoutRect(t,0,0),r=this.Ke.getLayoutRect(e,i,s);return Kt(Math.round(n.left+r.left),Math.round(n.top+r.top),Math.round(n.width),Math.round(n.height))}return this.Ke.getLayoutRect(t,i,s)}getClientRectAsync(t){const i=this.cr.measurePromise((()=>t.getBoundingClientRect()));let s=this.Ke.getRootClientRectAsync();const e=xi(t,this.ampdoc.win);return e&&(s=this.cr.measurePromise((()=>e.getBoundingClientRect()))),Promise.all([i,s]).then((t=>{const i=t[0],s=t[1];return s?Qt(i,s.left,s.top):(e=i,Kt(Number(e.left),Number(e.top),Number(e.width),Number(e.height)));var e}))}supportsPositionFixed(){return this.Ke.supportsPositionFixed()}isDeclaredFixed(t){return!!this.qr&&this.qr.isDeclaredFixed(t)}scrollIntoView(t){return this.ih(t).then((i=>this.sh(t,i)))}sh(t,i){const s=this.Ke.getLayoutRect(t).top,e=So(this.ampdoc.win,i);o((()=>Math.max(0,s-this.wr-e))).then((t=>this.eh(i,t)))}animateScrollIntoView(t,i="top",s,e){return Et(!e||void 0!==s),this.ih(t).then((n=>this.animateScrollWithinParent(t,n,i,s,e)))}animateScrollWithinParent(t,i,s,e,n){Et(!n||void 0!==e);const r=this.Ke.getLayoutRect(t),{height:h}=this.nh(i)?this.getSize():this.getLayoutRect(i),{win:o}=this.ampdoc,u=So(o,i),l=function(t,i){return Vo(t,i,"scrollPaddingBottom")}(o,i);let c=-u;return"bottom"===s?c=-h+l+r.height:"center"===s&&(c=-(h-u-l)/2+r.height/2),this.rh(i).then((t=>{const s=r.top-this.wr+c,h=Math.max(0,s);if(h!=t)return this.hh(i,t,h,e,n)}))}hh(t,i,s,e,n="ease-in"){const r=void 0!==e?e:function(t,i,s=500){return Math.floor(function(t,i,s){return U(0<=s),Math.min(Math.max(t,0),s)}(.65*Math.abs(t-i),0,s))}(i,s),h=(o=i,u=s,t=>o+(u-o)*t);var o,u;return yo.animate(t,(i=>{this.eh(t,h(i))}),r,n).thenAlways((()=>{this.eh(t,s)}))}ih(t){return this.cr.measurePromise((()=>St(t,".i-amphtml-scrollable")||this.Ke.getScrollingElement()))}eh(t,i){this.nh(t)?this.Ke.setScrollTop(i):this.cr.mutate((()=>{t.scrollTop=i}))}rh(t){return this.nh(t)?o((()=>this.getScrollTop())):this.cr.measurePromise((()=>t.scrollTop))}nh(t){return t==this.Ke.getScrollingElement()}getScrollingElement(){return this.Br?this.Br:this.Br=this.Ke.getScrollingElement()}onChanged(t){return this.jr.add(t)}onScroll(t){return this.Tr.add(t)}onResize(t){return this.yr.add(t)}enterLightboxMode(t,i){return this.Ee.sendMessage("requestFullOverlay",{},!0),this.enterOverlayMode(),this.qr&&this.qr.enterLightbox(t,i),t&&this.maybeEnterFieLightboxMode(t),this.Ke.updateLightboxMode(!0)}leaveLightboxMode(t){return this.Ee.sendMessage("cancelFullOverlay",{},!0),this.qr&&this.qr.leaveLightbox(),this.leaveOverlayMode(),t&&this.maybeLeaveFieLightboxMode(t),this.Ke.updateLightboxMode(!1)}isLightboxExperimentOn(){return Oe(this.ampdoc.win,"amp-lightbox-a4a-proto")}maybeEnterFieLightboxMode(t){const i=this.oh(t);i&&(Et(this.isLightboxExperimentOn()),i.enterFullOverlayMode())}maybeLeaveFieLightboxMode(t){const i=this.oh(t);i&&Et(i).leaveFullOverlayMode()}oh(t){const i=xi(t,this.ampdoc.win);return i&&i.__AMP_EMBED__}enterOverlayMode(){this.disableTouchZoom(),this.disableScroll()}leaveOverlayMode(){this.resetScroll(),this.restoreOriginalTouchZoom()}disableScroll(){const{win:t}=this.ampdoc,{documentElement:i}=t.document;let s;this.cr.measure((()=>{const e=Ss(t,i).marginRight,n=function(t){const{documentElement:i}=t.document;return t.innerWidth-i.clientWidth}(this.ampdoc.win);s=parseInt(e,10)+n})),this.cr.mutate((()=>{ys(i,"margin-right",s,"px"),this.Ke.disableScroll()}))}resetScroll(){const{win:t}=this.ampdoc,{documentElement:i}=t.document;this.cr.mutate((()=>{ys(i,"margin-right",""),this.Ke.resetScroll()}))}resetTouchZoom(){const t=this.ampdoc.win.innerHeight,i=this.Cr.documentElement.clientHeight;t&&i&&t===i||this.disableTouchZoom()&&this.ne.delay((()=>{this.restoreOriginalTouchZoom()}),50)}disableTouchZoom(){const t=this.uh();if(!t)return!1;const i=function(t,i){const s=function(t){const i=Object.create(null);if(!t)return i;const s=t.split(/,|;/);for(let t=0;t0&&(i+=","),t[s]?i+=s+"="+t[s]:i+=s;return i}(s):t}(t.content,{"maximum-scale":"1","user-scalable":"no"});return this.lh(i)}restoreOriginalTouchZoom(){return void 0!==this.Gr&&this.lh(this.Gr)}updateFixedLayer(){return this.qr?this.qr.update():r()}addToFixedLayer(t,i){return this.qr?this.qr.addElement(t,i):r()}removeFromFixedLayer(t){this.qr&&this.qr.removeElement(t)}createFixedLayer(t){this.qr=new t(this.ampdoc,this.cr,this.Ke.getBorderTop(),this.wr,this.Ke.requiresFixedLayerTransfer()),this.ampdoc.whenReady().then((()=>this.qr.setup()))}lh(t){const i=this.uh();return!(!i||i.content==t||(i.content=t,0))}uh(){return jt(this.ampdoc.win)?null:(void 0===this.zr&&(this.zr=this.Cr.querySelector("meta[name=viewport]"),this.zr&&(this.Gr=this.zr.content)),this.zr)}Kr(t){const i=t.scrollTop;this.setScrollTop(i)}Wr(t){const i=t.paddingTop,s=t.duration||0,e=t.curve,n=t.transient;if(null!=i&&i!=this.wr&&(this.$r=this.wr,this.wr=i,this.qr)){const t=this.qr.animateFixedElements(this.wr,this.$r,s,e,n);i{this.Ke.showViewerHeader(n,i)}))}}Yr(t){t?this.disableScroll():this.resetScroll()}ah(t,i){const s=this.getSize(),e=this.getScrollTop(),n=this.getScrollLeft();this.jr.fire({relayoutAll:t,top:e,left:n,width:s.width,height:s.height,velocity:i})}Jr(){this.kr=null,this.Hr++,this.Ur=this.Ke.getScrollLeft();const t=this.Ke.getScrollTop();if(!(t<0)){if(this.Dr=t,!this.Fr){this.Fr=!0;const i=Date.now();this.ne.delay((()=>{this.cr.measure((()=>{this.dh(i,t)}))}),36)}this.Tr.fire()}}dh(t,i){this.Dr=this.Ke.getScrollTop();const s=this.Dr,e=Date.now();let n=0;e!=t&&(n=(s-i)/(e-t)),Math.abs(n)<.03?(this.ah(!1,n),this.Fr=!1):this.ne.delay((()=>this.cr.measure(this.dh.bind(this,e,s))),20)}Xr(){this.Lr||(this.Lr=!0,this.cr.measure((()=>{this.Lr=!1,this.Ee.sendMessage("scroll",{"scrollTop":this.getScrollTop()},!0)})))}Qr(){this.kr=null;const t=this.Nr;this.Nr=null;const i=this.getSize();this.updateFixedLayer().then((()=>{const s=!t||t.width!=i.width;this.ah(s,0),(s||t.height!=i.height)&&this.yr.fire({relayoutAll:s,width:i.width,height:i.height})}))}}(t,e,i)}var Oo={NATURAL:"natural",NATURAL_IOS_EMBED:"natural-ios-embed"};function Co(t,i){Et(t);try{void 0!==t(i)&&vt().error("VSYNC","callback returned a value but vsync cannot propogate it: %s",t.toString())}catch(t){return a(t),!1}return!0}function ko(t){if(t.defaultPrevented)return;const i=t.target;if(!i||"FORM"!=i.tagName)return;let s;s=i.classList.contains("i-amphtml-form")?!i.hasAttribute("amp-novalidate"):!i.hasAttribute("novalidate"),s&&i.checkValidity&&!i.checkValidity()&&t.preventDefault();const e=i.elements;for(let t=0;t"],Do=18e4,Lo=null;function Uo(t){var i;(function(t){Mi(t,"crypto",class{constructor(t){this.i=t;let i=null,s=!1;t.crypto&&(t.crypto.subtle?i=t.crypto.subtle:t.crypto.webkitSubtle&&(i=t.crypto.webkitSubtle,s=!0)),this.pkcsAlgo={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},this.subtle=i,this.fh=s,this.ph=null}sha384(t){if("string"==typeof t&&(t=z(t)),!this.subtle||this.ph)return(this.ph||this.mh()).then((i=>i(t)));try{return this.subtle.digest({name:"SHA-384"},t).then((t=>new Uint8Array(t)),(i=>(i.message&&i.message.indexOf("secure origin")<0&&Pt().error(Rh,"SubtleCrypto failed, fallback to closure lib.",i),this.mh().then((()=>this.sha384(t))))))}catch(i){return vt().error(Rh,"SubtleCrypto failed, fallback to closure lib.",i),this.mh().then((()=>this.sha384(t)))}}sha384Base64(t){return this.sha384(t).then((t=>Xr(t)))}uniform(t){return this.sha384(t).then((t=>{let i=0;for(let s=2;s>=0;s--)i=(i+t[s])/256;return i}))}mh(){return this.ph?this.ph:this.ph=is(this.i).preloadExtension("amp-crypto-polyfill").then((()=>Ri(this.i,"crypto-polyfill")))}isPkcsAvailable(){return Boolean(this.subtle)&&!1!==this.i.isSecureContext}importPkcsKey(t){Et(this.isPkcsAvailable());const i=this.fh?(s=JSON.stringify(t),"undefined"!=typeof TextEncoder?(new TextEncoder).encode(s):z(unescape(encodeURIComponent(s)))):t;var s;return this.subtle.importKey("jwk",i,this.pkcsAlgo,!0,["verify"])}verifyPkcs(t,i,s){return Et(this.isPkcsAvailable()),this.subtle.verify(this.pkcsAlgo,t,i,s)}})})(t),Mi(t,"batched-xhr",Qr),Wh(t),ro(t),ro(i=t),Mi(i,"vsync",class{constructor(t){this.win=t,this.gh=Qi(this.win),this.Ph=this.Eh(),this.Bi=[],this.Th=[],this.yh=[],this.Ih=[],this.oe=!1,this.Mh=null,this.Rh=null,this.wh=this.bh.bind(this),this.Vh=new vr(this.win,this.wh,16),this.Sh=new vr(this.win,this.wh,40),this.xh=this.Oh.bind(this),this.gh.isSingleDoc()?this.gh.getSingleDoc().onVisibilityChanged(this.xh):Os(this.win.document,this.xh)}dispose(){Cs(this.win.document,this.xh)}Oh(){this.oe&&this.Ch()}run(t,i){this.Bi.push(t),this.yh.push(i||void 0),this.Wi()}runPromise(t,i){if(this.run(t,i),this.Mh)return this.Mh;const s=new h;return this.Rh=s.resolve,this.Mh=s.promise}createTask(t){return i=>{this.run(t,i)}}mutate(t){this.run({measure:void 0,mutate:t})}mutatePromise(t){return this.runPromise({measure:void 0,mutate:t})}measure(t){this.run({measure:t,mutate:void 0})}measurePromise(t){return new Promise((i=>{this.measure((()=>{i(t())}))}))}canAnimate(t){return this.kh(Et(t))}kh(t){if(xs(this.win.document)!=Ps.VISIBLE)return!1;if(this.gh.isSingleDoc())return this.gh.getSingleDoc().isVisible();if(t){const i=this.gh.getAmpDocIfAvailable(t);return!i||i.isVisible()}return!0}runAnim(t,i,s){return!!this.kh(t)&&(this.run(i,s),!0)}createAnimTask(t,i){return s=>this.runAnim(t,i,s)}runAnimMutateSeries(t,i,s){return this.kh(t)?new Promise(((e,n)=>{const r=Date.now();let h=0;const o=this.createAnimTask(t,{mutate:t=>{const u=Date.now()-r;i(u,u-h,t)?s&&u>s?n(new Error("timeout")):(h=u,o(t)):e()}});o({})})):Promise.reject(Rn())}Wi(){this.oe||(this.oe=!0,this.Ch())}Ch(){this.kh()?(this.Ph(this.wh),this.Sh.schedule()):this.Vh.schedule()}bh(){this.Sh.cancel(),this.oe=!1;const{Rh:t,yh:i,Bi:s}=this;this.Rh=null,this.Mh=null,this.Bi=this.Th,this.yh=this.Ih;for(let t=0;t{const s=Date.now(),e=Math.max(0,16-(s-i));i=s+e,this.win.setTimeout(t,e)}}}),function(t){Mi(t,"xhr",Yr)}(t),function(t){Mi(t,"input",class{constructor(t){this.win=t,this.Nh=this.Dh.bind(this),this.Lh=this.Uh.bind(this),this.$h=null,this.Fh=null,this.Bh=null,this.Hh="ontouchstart"in t||void 0!==t.navigator.maxTouchPoints&&t.navigator.maxTouchPoints>0||void 0!==t.DocumentTouch,this.jh=!1,this.win.document.addEventListener("keydown",this.Nh),this.win.document.addEventListener("mousedown",this.Lh),this.zh=!0,this.Gh=0,this.qh=new gs,this.Wh=new gs,this.Kh=new gs,this.Hh&&(this.zh=!this.Hh,this.$h=this.Yh.bind(this),Be(t.document,"mousemove",this.$h))}setupInputModeClasses(t){this.onTouchDetected((i=>{this.Jh(t,"amp-mode-touch",i)}),!0),this.onMouseDetected((i=>{this.Jh(t,"amp-mode-mouse",i)}),!0),this.onKeyboardStateChanged((i=>{this.Jh(t,"amp-mode-keyboard-active",i)}),!0)}isTouchDetected(){return this.Hh}onTouchDetected(t,i){return i&&t(this.isTouchDetected()),this.qh.add(t)}isMouseDetected(){return this.zh}onMouseDetected(t,i){return i&&t(this.isMouseDetected()),this.Wh.add(t)}isKeyboardActive(){return this.jh}onKeyboardStateChanged(t,i){return i&&t(this.isKeyboardActive()),this.Kh.add(t)}Jh(t,i,s){t.waitForBodyOpen().then((t=>{ms(this.win).mutate((()=>{t.classList.toggle(i,s)}))}))}Dh(t){if(this.jh)return;if(t.defaultPrevented)return;const{target:i}=t;i&&("INPUT"==i.tagName||"TEXTAREA"==i.tagName||"SELECT"==i.tagName||"OPTION"==i.tagName||i.hasAttribute("contenteditable"))||(this.jh=!0,this.Kh.fire(!0))}Uh(){this.jh&&(this.jh=!1,this.Kh.fire(!1))}Yh(t){if(t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents)return void this.Qh();let i;this.Bh||(this.Bh=this.Xh.bind(this),this.Fh=this.Qh.bind(this));const s=function(t,i,s,e){let n;const r=new Promise((i=>{n=Be(t,"click",i,void 0)}));return r.then(n,n),e&&e(n),r}(this.win.document,0,0,(t=>{i=t}));return cs(this.win).timeoutPromise(300,s).then(this.Fh,(()=>{i&&i(),this.Bh()}))}Xh(){this.zh=!0,this.Wh.fire(!0)}Qh(){this.Gh++,this.Gh<=3&&Be(this.win.document,"mousemove",this.$h)}})}(t),function(t){Mi(t,"preconnect",class{constructor(t){this.Zh=t.document,this.io=t.document.head,this.so={},this.eo={},this.Sr=hs(t),this.so[sn(t.location.href).origin]=!0,this.no=function(t){if(!Lo){const i=t.document.createElement("link"),s=i.relList;if(i.as="invalid-value",!s||!s.supports)return{};Lo={preconnect:s.supports("preconnect"),preload:s.supports("preload"),onlyValidAs:"invalid-value"!=i.as}}return Lo}(t),this.ne=cs(t)}url(t,i,s){t.whenFirstVisible().then((()=>{this.Ft(t,i,s)}))}Ft(t,i,s){if(!this.ro(i))return;const{origin:e}=sn(i),n=Date.now(),r=this.so[e];if(r&&n{o&&o.parentNode&&o.parentNode.removeChild(o),u.parentNode&&u.parentNode.removeChild(u)}),1e4),this.ho(t,e)}preload(t,i,s){this.ro(i)&&(this.eo[i]||(this.eo[i]=!0,this.url(t,i,!0),this.no.preload&&("document"==s&&this.Sr.isSafari()||t.whenFirstVisible().then((()=>{this.oo(i)})))))}oo(t){const i=Ie(this.Zh)(No);i.setAttribute("href",t),this.no.onlyValidAs?i.as="fetch":i.as="",this.io.appendChild(i)}ro(t){return!(!t.startsWith("https:")&&!t.startsWith("http:"))}ho(t,i){if(this.no.preconnect||!this.Sr.isSafari()&&!this.Sr.isIos())return;const s=Date.now();this.so[i]=s+Do;const e=i+"/robots.txt?_AMP_safari_preconnect_polyfill_cachebust="+(s-s%Do),n=new XMLHttpRequest;n.open("HEAD",e,!0),n.withCredentials=!0,n.send()}})}(t)}function $o(t){Et(!t.getParent()),function(t,i){(function(t){Ii(t,"url",class{constructor(t){const i=t.getRootNode(),s=i.ownerDocument||i;this.uo=s.createElement("a"),this.lo=null}parse(t,i){return en(this.uo,t)}co(t){return"string"!=typeof t?t:this.parse(t)}isProtocolValid(t){return dn(t)}getSourceOrigin(t){return _n(this.co(t))}getSourceUrl(t){return mn(this.co(t))}resolveRelativeUrl(t,i){return An(t,this.co(i))}assertHttpsUrl(t,i,s="source"){return ln(t,i,s)}assertAbsoluteHttpOrHttpsUrl(t){return function(t){return Tt(/^https?\:/i.test(t),'URL must start with "http://" or "https://". Invalid value: %s',t),sn(t).href}(t)}isProxyOrigin(t){return an(this.co(t))}isSecure(t){return un(this.co(t))}getWinOrigin(t){return t.origin||this.co(t.location.href).origin}getCdnUrlOnOrigin(t){if(an(t))return t;const{hash:i,host:s,pathname:e,search:n}=this.co(t),r=encodeURIComponent(s);return`${et.cdn}/c/${r}${e}${n}${i}`}},!0)})(t),function(t){Ii(t,"templates",class{constructor(t){this._i=t,this.ao={},this.do={}}whenReady(t){return this.fo(t).then(no)}setHtmlForTemplate(t,i){return this.fo(t).then((t=>this.po(t,i)))}renderTemplate(t,i){return this.fo(t).then((t=>this.mo(t,i)))}renderTemplateAsString(t,i){return this.fo(t).then((t=>t.renderAsString(i)))}getTemplateRenderer(t){return this.fo(t).then((t=>({renderAsString:i=>t.renderAsString(i)})))}renderTemplateArray(t,i){return 0==i.length?Promise.resolve([]):this.fo(t).then((t=>i.map((i=>this.mo(t,i)))))}findAndRenderTemplate(t,i,s){return this.renderTemplate(this.findTemplate(t,s),i)}findAndSetHtmlForTemplate(t,i,s){return this.setHtmlForTemplate(this.findTemplate(t,s),i)}findAndRenderTemplateArray(t,i,s){return this.renderTemplateArray(this.findTemplate(t,s),i)}hasTemplate(t,i){return!!this.maybeFindTemplate(t,i)}findTemplate(t,i){const s=this.maybeFindTemplate(t,i);Tt(s,"Template not found for %s",t);const e=s.tagName;return Tt("TEMPLATE"==e||"SCRIPT"==e&&"text/plain"===s.getAttribute("type"),'Template must be defined in a