;
(self.AMP=self.AMP||[]).push({m:0,v:"2402262017000",n:"amp-list",ev:"0.1",l:!0,f:function(t,i){!function(){function i(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,r=new Array(i);n=t.length?{done:!0}:{done:!1,value:t[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r;function e(){return r||(r=Promise.resolve(void 0))}var o=function(){var t=this;this.promise=new Promise((function(i,n){t.resolve=i,t.reject=n}))};function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,i){return(s=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(t,i)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,i){if(i&&("object"===a(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return t?Array.prototype.slice.call(t):[]}var h=Array.isArray,c=Object.prototype,m=c.hasOwnProperty,d=c.toString;function v(t){var i=Object.create(null);return t&&Object.assign(i,t),i}function p(t,i){return m.call(t,i)}function b(t,i){if("."==i)return t;for(var r,e=t,o=n(i.split("."),!0);!(r=o()).done;){var s=r.value;if(!(s&&e&&void 0!==e[s]&&"object"==a(e)&&p(e,s))){e=void 0;break}e=e[s]}return e}function g(t,i,n,r,e,o,a,s,u,l,f){return t}var y,w="amp:dom-update";function x(t){return void 0!==y?y:y=function(t){try{var i=t.ownerDocument,n=i.createElement("div"),r=i.createElement("div");return n.appendChild(r),n.querySelector(":scope div")===r}catch(t){return!1}}(t)}function O(t,i){return t.replace(/^|,/g,"$&".concat(i," "))}function j(t,i){var n=t.classList,r="i-amphtml-scoped";n.add(r);var e=O(i,".".concat(r)),o=t.querySelectorAll(e);return n.remove(r),o}function S(t,i){if(x(t))return t.querySelector(O(i,":scope"));var n=j(t,i)[0];return void 0===n?null:n}function R(t,i){return g(/^[\w-]+$/.test(i)),S(t,"> [".concat(i,"]"))}function E(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function k(t){try{t.focus()}catch(t){}}var I,T={NODISPLAY:"nodisplay",FIXED:"fixed",FIXED_HEIGHT:"fixed-height",RESPONSIVE:"responsive",CONTAINER:"container",FILL:"fill",FLEX_ITEM:"flex-item",FLUID:"fluid",INTRINSIC:"intrinsic"},P=["Webkit","webkit","Moz","moz","ms","O","o"];function U(t){var i=t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}));return P.some((function(t){return i.startsWith(t+"-")}))?"-".concat(i):i}function A(t,i,n){if(i.startsWith("--"))return i;I||(I=v());var r=I[i];if(!r||n){if(r=i,void 0===t[i]){var e=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),o=function(t,i){for(var n=0;n
1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return i}}function X(t){var i,n=v();if(!t)return n;for(;i=G.exec(t);){var r=H(i[1],i[1]),e=i[2]?H(i[2].replace(/\+/g," "),i[2]):"";n[r]=e}return n}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var J=self.__AMP_LOG;function D(t,i){throw new Error("failed to call initLogConstructor")}function q(t){return J.user||(J.user=B()),function(t,i){return i&&i.ownerDocument.defaultView!=t}(J.user.win,t)?J.userForEmbed||(J.userForEmbed=B()):J.user}function B(t){return D()}function $(){return J.dev||(J.dev=D())}function V(t,i,n,r,e,o,a,s,u,l,f){return t}function Y(t,i,n,r,e,o,a,s,u,l,f){return q().assert(t,i,n,r,e,o,a,s,u,l,f)}function W(t,i){return nt(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),i)}function Z(t,i){return nt(it(tt(t)),i)}function K(t,i){var n=it(tt(t));return ot(n,i)?nt(n,i):null}function Q(t,i){return rt(it(t),i)}function tt(t){return t.nodeType?(n=t,i=(n.ownerDocument||n).defaultView,W(i,"ampdoc")).getAmpDoc(t):t;var i,n}function it(t){var i=tt(t);return i.isSingleDoc()?i.win:i}function nt(t,i){V(ot(t,i));var n=et(t)[i];return n.obj||(V(n.ctor),V(n.context),n.obj=new n.ctor(n.context),V(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function rt(t,i){var n=et(t)[i];return n?n.promise?n.promise:(nt(t,i),n.promise=Promise.resolve(n.obj)):null}function et(t){var i=t.__AMP_SERVICES;return i||(i=t.__AMP_SERVICES={}),i}function ot(t,i){var n=t.__AMP_SERVICES&&t.__AMP_SERVICES[i];return!(!n||!n.ctor)}var at="__AMP__EXPERIMENT_TOGGLES",st=function(){function t(t){this.G=t,this.K=0,this.Y=0,this.rr=v()}var i=t.prototype;return i.has=function(t){return!!this.rr[t]},i.get=function(t){var i=this.rr[t];if(i)return i.access=++this.Y,i.payload},i.put=function(t,i){this.has(t)||this.K++,this.rr[t]={payload:i,access:this.Y},this.nr()},i.nr=function(){if(!(this.K<=this.G)){var t,i=this.rr,n=this.Y+1;for(var r in i){var e=i[r].access;e=0&&i.indexOf(n,r)==r);var i,n,r}function wt(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"source";return Y(null!=t,"%s %s must be available",i,n),Y(yt(t)||/^\/\//.test(t),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',i,n,t),t}function xt(t){return t.startsWith("amp-script:")}function Ot(t){return bt(function(t){if(!function(t){return dt.cdnProxyRegex.test(pt(t).origin)}(t=pt(t)))return t.href;var i=t.pathname.split("/"),n=i[1];Y(vt.has(n),"Unknown path prefix in url %s",t.href);var r=i[2],e="s"==r?"https://"+decodeURIComponent(i[3]):"http://"+decodeURIComponent(r);return Y(e.indexOf(".")>0,"Expected a . in origin %s",e),i.splice(1,"s"==r?3:2),e+i.join("/")+function(t,i){if(!t||"?"==t)return"";var n=new RegExp("[?&]".concat("(amp_(js[^&=]*|gsa|r|kit)|usqp)","\\b[^&]*"),"g"),r=t.replace(n,"").replace(/^[?&]/,"");return r?"?"+r:""}(t.search)+(t.hash||"")}(t)).origin}var jt="i-amphtml-key",St="i-amphtml-ignore",Rt={"AMP-IMG":["src","srcset","layout","width","height"]};Object.freeze({"input":{"type":/(?:image|button)/i}}),Object.freeze({"input":{"type":/(?:button|file|image|password)/i}});var Et,kt=Object.freeze(["form","formaction","formmethod","formtarget","formnovalidate","formenctype"]);function It(t,i,n,r){var e={detail:n};if(Object.assign(e,r),"function"==typeof t.CustomEvent)return new t.CustomEvent(i,e);var o=t.document.createEvent("CustomEvent");return o.initCustomEvent(i,!!e.bubbles,!!e.cancelable,n),o}function Tt(t,i,n,r){return function(t,i,n,r){var e=t,o=n,a=function(t){try{return o(t)}catch(t){var i,n;throw null===(i=(n=self).__AMP_REPORT_ERROR)||void 0===i||i.call(n,t),t}},s=function(){if(void 0!==Et)return Et;Et=!1;try{var t={get capture(){return Et=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Et}(),u=!(null==r||!r.capture);return e.addEventListener(i,a,s?r:u),function(){null==e||e.removeEventListener(i,a,s?r:u),o=null,e=null,a=null}}(t,i,n,r)}function Pt(t){return!!t&&"function"==typeof t.getFormData}Object.freeze({"input":kt,"textarea":kt,"select":kt}),Object.freeze({"amp-anim":["controls"],"form":["name"]});var Ut=["GET","POST"],At=[h,function(t){return"[object Object]"===d.call(t)}];function Nt(t,i){var n=z({},i);if(Pt(i.body)){var r=i.body;n.headers["Content-Type"]="multipart/form-data;charset=utf-8",n.body=function(t){for(var i=[],n=t.next();!n.done;n=t.next())i.push(n.value);return i}(r.entries())}return{input:t,init:n}}Ct.KEY="data-key",Ct.IGNORE="data-ignore",Ct.CHECKSUM="data-checksum";var Lt,Mt="_set-dom-mounted",_t=null;function Ct(t,i){_t=[],function(t,i){if(!t)throw new Error("set-dom: You must provide a valid node to update.")}(t&&t.nodeType),9===t.nodeType&&(t=t.documentElement),11===i.nodeType?zt(t,i):Ft(t,i),t[Mt]||(t[Mt]=!0,Jt(t));var n=_t;return _t=null,n}function Ft(t,i){if(t.nodeType===i.nodeType)if(1===t.nodeType){if(e=i,(o=Xt(r=t)&&Xt(e))&&_t.push(r,e),o||Ht(r)===Ht(e)||r.isEqualNode(e))return;if(zt(t,i),t.nodeName===i.nodeName)!function(t,i){var n,r,e,o,a;for(n=t.length;n--;)o=(r=t[n]).namespaceURI,a=r.localName,(e=i.getNamedItemNS(o,a))||t.removeNamedItemNS(o,a);for(n=i.length;n--;)o=(r=i[n]).namespaceURI,a=r.localName,(e=t.getNamedItemNS(o,a))?e.value!==r.value&&(e.value=r.value):(i.removeNamedItemNS(o,a),t.setNamedItemNS(r))}(t.attributes,i.attributes);else{for(var n=i.cloneNode();t.firstChild;)n.appendChild(t.firstChild);t.parentNode.replaceChild(n,t)}}else t.nodeValue!==i.nodeValue&&(t.nodeValue=i.nodeValue);else t.parentNode.replaceChild(i,Dt(t)),Jt(i);var r,e,o}function zt(t,i){for(var n,r,e,o,a,s,u=t.firstChild,l=i.firstChild,f=0;u;)f++,r=Gt(n=u),u=u.nextSibling,r&&(s||(s={}),s[r]=n);for(u=t.firstChild;l;)f--,e=l,l=l.nextSibling,s&&(o=Gt(e))&&(a=s[o])?(delete s[o],a!==u?t.insertBefore(a,u):u=u.nextSibling,Ft(a,e)):u?(n=u,u=u.nextSibling,Gt(n)?(t.insertBefore(e,n),Jt(e)):Ft(n,e)):(t.appendChild(e),Jt(e));for(r in s)f--,t.removeChild(Dt(s[r]));for(;--f>=0;)t.removeChild(Dt(t.lastChild))}function Gt(t){if(1===t.nodeType){var i=t.getAttribute(Ct.KEY)||t.id;return i?"_set-dom-"+i:void 0}}function Ht(t){return t.getAttribute(Ct.CHECKSUM)||NaN}function Xt(t){return null!=t.getAttribute(Ct.IGNORE)}function Jt(t){return qt(t,"mount")}function Dt(t){return qt(t,"dismount")}function qt(t,i){if(Gt(t)){var n=document.createEvent("Event"),r={value:t};n.initEvent(i,!1,!1),Object.defineProperty(n,"target",r),Object.defineProperty(n,"srcElement",r),t.dispatchEvent(n)}for(var e=t.firstChild;e;)e=qt(e,i).nextSibling;return t}function Bt(t){var i=t.ownerDocument||t;return Lt&&Lt.ownerDocument===i||(Lt=i.createElement("div")),$t}function $t(t){return function(t,i){if(g(1===i.length),g(Array.isArray(i)||p(i,"raw")),self.trustedTypes&&self.trustedTypes.createPolicy){var n=self.trustedTypes.createPolicy("static-template#createNode",{createHTML:function(t){return i[0]}});t.innerHTML=n.createHTML("ignored")}else t.innerHTML=i[0];var r=t.firstElementChild;return g(r),g(!r.nextElementSibling),t.removeChild(r),r}(Lt,t)}var Vt=[''],Yt=[""],Wt=['Unable to Load More
'],Zt=function(){function t(t){this.b0=t,this.g0=null,this.y0=null,this.w0=null,this.x0=null,this.O0=null,this.j0=null}var i=t.prototype;return i.initializeLoadMore=function(){this.S0(),this.R0(),this.E0(),this.k0()},i.S0=function(){this.g0=R(this.b0,"load-more-button"),this.g0?this.g0.classList.add("amp-visible"):this.g0=Bt(this.b0)(Vt),this.b0.appendChild(this.g0),M(this.g0,{visibility:"hidden"})},i.R0=function(){this.w0=R(this.b0,"load-more-loading"),this.w0||(this.w0=Bt(this.b0)(Yt)),this.b0.appendChild(this.w0)},i.getLoadMoreButton=function(){return this.g0||this.S0(),this.g0},i.getLoadMoreLoadingElement=function(){return this.w0||this.R0(),this.w0},i.getLoadMoreButtonClickable=function(){if(!this.y0){var t=this.getLoadMoreButton();this.y0=R(t,"load-more-clickable")||t}return this.y0},i.E0=function(){this.x0=R(this.b0,"load-more-failed"),this.x0||(this.x0=Bt(this.b0)(Wt)),this.b0.appendChild(this.x0)},i.getLoadMoreFailedElement=function(){return this.x0||this.E0(),this.x0},i.getLoadMoreFailedClickable=function(){if(!this.O0){var t=this.getLoadMoreFailedElement();this.O0=R(t,"load-more-clickable")||t}return this.O0},i.k0=function(){this.j0||(this.j0=R(this.b0,"load-more-end"),this.j0&&this.b0.appendChild(this.j0))},i.getLoadMoreEndElement=function(){return this.j0},i.setLoadMoreEnded=function(){this.getLoadMoreFailedElement().classList.toggle("amp-visible",!1),this.getLoadMoreButton().classList.toggle("amp-visible",!1),this.getLoadMoreLoadingElement().classList.toggle("amp-visible",!1);var t=this.getLoadMoreEndElement();t&&t.classList.toggle("amp-visible",!0)},i.toggleLoadMoreLoading=function(t){t&&this.getLoadMoreFailedElement().classList.toggle("amp-visible",!1);var i=this.getLoadMoreEndElement();i&&i.classList.toggle("amp-visible",!1),this.getLoadMoreButton().classList.toggle("amp-visible",!t),this.getLoadMoreLoadingElement().classList.toggle("amp-visible",t)},i.setLoadMoreFailed=function(){var t=this.getLoadMoreFailedElement(),i=this.getLoadMoreButton();(t||i)&&(t.classList.toggle("amp-visible",!0),i.classList.toggle("amp-visible",!1),this.getLoadMoreLoadingElement().classList.toggle("amp-visible",!1))},i.hideAllLoadMoreElements=function(){this.getLoadMoreButton().classList.toggle("amp-visible",!1),this.getLoadMoreLoadingElement().classList.toggle("amp-visible",!1),this.getLoadMoreFailedElement().classList.toggle("amp-visible",!1),this.getLoadMoreEndElement()&&this.getLoadMoreEndElement().classList.toggle("amp-visible",!1)},t}();function Kt(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.expr,e=void 0===r?".":r,o=n.refresh,a=void 0!==o&&o,s=n.url,u=void 0===s?i.getAttribute("src"):s,l=n.urlReplacement,f=void 0===l?0:l,h=n.xssiPrefix,c=void 0===h?void 0:h;wt(u,i);var m=ht(t.win);return Qt(i,u,f,a).then((function(t){return m.fetchJson(t.xhrUrl,t.fetchOpt)})).then((function(i){return mt(t.win).xssiJson(i,c)})).then((function(t){if(null==t)throw new Error("Response is undefined.");return b(t,e||".")})).catch((function(t){throw q().createError("failed fetching JSON data",t)}))}function Qt(t,i,n,r){var e=function(t){return K(t,"url-replace")}(t);return(n>=1?e.expandUrlAsync(i):Promise.resolve(i)).then((function(i){if(1===n){var o=e.collectDisallowedVarsSync(t);if(o.length>0)throw q().createError("URL variable substitutions in CORS fetches from dynamic URLs (e.g. via amp-bind) require opt-in. "+'Please add data-amp-replace="'.concat(o.join(" "),'" to the ')+"<".concat(t.tagName,"> element. See https://bit.ly/amp-var-subs."))}var a={};return t.hasAttribute("credentials")&&(a.credentials=t.getAttribute("credentials")),r&&(a.cache="reload"),{"xhrUrl":i,"fetchOpt":a}}))}var ti=function(){function t(t,i,n){var r=this;this.Ir=nt(t,"timer"),this.Sr=i,this.Mr=n||0,this.Rr=-1,this._r=0,this.kr=!1,this.Nr=function(){r.Cr()}}var i=t.prototype;return i.isPending=function(){return-1!=this.Rr},i.schedule=function(t){var i=t||this.Mr;this.kr&&i<10&&(i=10);var n=Date.now()+i;return(!this.isPending()||n-this._r<-10)&&(this.cancel(),this._r=n,this.Rr=this.Ir.delay(this.Nr,i),!0)},i.Cr=function(){this.Rr=-1,this._r=0,this.kr=!0,this.Sr(),this.kr=!1},i.cancel=function(){this.isPending()&&(this.Ir.cancel(this.Rr),this.Rr=-1)},t}(),ii=function(){function t(t,i,n){this.ne=i,this.ty=n,this.gJ=t}var i=t.prototype;return i.isEnabled=function(){var t=this.ne.getAmpDoc();return!(!t.isSingleDoc()||!t.getRootNode().documentElement.hasAttribute("allow-viewer-render-template"))&&this.ne.hasCapability("viewerRenderTemplate")},i.assertTrustedViewer=function(t){return this.ne.isTrustedViewer().then((function(i){Y(i,"Refused to attempt SSR in untrusted viewer: ",t)}))},i.ssr=function(t,i){var n,r=this,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e||(n=this.ty.maybeFindTemplate(t)),this.assertTrustedViewer(t).then((function(){return r.ne.sendMessageAwaitResponse("viewerRenderTemplate",r.jJ(i,n,e,o))}))},i.applySsrOrCsrTemplate=function(t,i){var n,r=this;return this.isEnabled()?(Y("string"==typeof i.html,"Skipping template rendering due to failed fetch"),n=this.assertTrustedViewer(t).then((function(){return r.ty.findAndSetHtmlForTemplate(t,i.html)}))):n=h(i)?this.ty.findAndRenderTemplateArray(t,i):this.ty.findAndRenderTemplate(t,i),n},i.jJ=function(t,i,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},e={"type":this.gJ},o="successTemplate",a=n&&n[o]?n[o]:i;a&&(e[o]={"type":"amp-mustache","payload":a.innerHTML});var s="errorTemplate",u=n&&n[s]?n[s]:null;u&&(e[s]={"type":"amp-mustache","payload":u.innerHTML}),r&&Object.assign(e,r);var l={"originalRequest":Nt(t.xhrUrl,t.fetchOpt),"ampComponent":e};return l},t}(),ni="amp-list",ri="amp-state:",ei=function(t){!function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),i&&s(t,i)}(m,t);var i,r,c=(i=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=u(i);if(r){var e=u(this).constructor;t=Reflect.construct(n,arguments,e)}else t=n.apply(this,arguments);return l(this,t)});function m(t){var i;return(i=c.call(this,t)).ij=null,i.ws=null,i.CJ=!1,i.I0=new ti(i.win,(function(){return i.T0()})),i.P0=null,i.U0=null,i.ty=null,i.A0=!1,i.N0=!1,i.L0=null,i.M0=null,i._0=null,i.C0=!1,i.F0=null,i.z0=null,i.G0=!1,i.H0=null,i.registerAction("refresh",(function(){if(i.A0)return i.X0(),i.J0({refresh:!0})})),i.registerAction("changeToLayoutContainer",(function(){return i.D0()})),i.q0=null,i.Gr=null,i.LL=null,i}var d=m.prototype;return d.isLayoutSupported=function(t){if(t===T.CONTAINER){var i=this.element.ownerDocument,r=i&&function(t){return function(t,i){var n=i.documentElement;return["⚡4email","amp4email"].some((function(t){return n.hasAttribute(t)}))}(0,t)}(i),e=this.getPlaceholder()||this.element.hasAttribute("diffable");return r?(e||q().warn(ni,"amp-list[layout=container] should have a placeholder to establish an initial size. See https://go.amp.dev/c/amp-list/#placeholder-and-fallback. %s",this.element),this.N0=!0):(Y(("amp-list-layout-container",o=function(t){var i,r,e,o,a;if(t[at])return t[at];t[at]=v();var s=t[at];g(s);var u,l=z(z({},null!==(i=t.AMP_CONFIG)&&void 0!==i?i:{}),null!==(r=t.AMP_EXP)&&void 0!==r?r:(u=(null===(e=t.__AMP_EXP)||void 0===e?void 0:e.textContent)||"{}",JSON.parse(u)));for(var f in l){var c=l[f];"number"==typeof c&&c>=0&&c<=1&&(s[f]=Math.random() div":"> div[role=list]";return t+=":not([placeholder]):not([fallback]):not([fetch-error])",S(this.element,t)},d.Y0=function(){var t=this;return this.mutateElement((function(){t.W0().initializeLoadMore();var i=t.getOverflowElement();i&&_(i,!1),t.element.warnOnMissingOverflow=!1})).then((function(){t.Z0(),Tt(t.W0().getLoadMoreFailedClickable(),"click",(function(){return t.K0(!0,!0)})),Tt(t.W0().getLoadMoreButtonClickable(),"click",(function(){return t.K0(!1,!0)}))}))},d.V0=function(){if(!this.C0)return this.$0(this.ij);this.Q0(this.ij)},d.W0=function(){return this.F0||(this.F0=new Zt(this.element)),this.F0},d.Z0=function(){var t,i,n=this;return this.measureMutateElement((function(){t=n.W0().getLoadMoreButton().offsetHeight,i=n.element.offsetHeight}),(function(){var r;M(n.ij,{"max-height":"calc(100% - ".concat((r=t,"".concat(r,"px")),")")}),n.element.applySize(i+t)}))},d.t1=function(t){return t.startsWith(ri)},d.i1=function(t){var i=this;return ct(this.element).then((function(n){Y(n,'"amp-state:" URLs require amp-bind to be installed.'),Y(!i.q0.isEnabled(),'[amp-list]: "amp-state" URIs cannot be used in SSR mode.');var r=t.slice(ri.length);return n.getStateAsync(r).catch((function(t){var i=r.split(".")[0];throw q().error(ni,"'amp-state' element with id '".concat(i,"' was not found.")),t}))})).then((function(i){return Y(void 0!==i,"[amp-list] No data was found at provided uri: ".concat(t)),i}))},d.n1=function(t){var i=this;return e().then((function(){return Y(!i.q0.isEnabled(),'[amp-list]: "amp-script" URIs cannot be used in SSR mode.'),(n=i.element,ut(n,"amp-script","amp-script")).then((function(i){return i.fetch(t)}));var n})).then((function(i){return Y("object"===a(i),"[amp-list] ".concat(t," must return json, but instead returned: ").concat(a(i))),i}))},d.mutatedAttributesCallback=function(t){var i=this;$().info(ni,"mutate:",this.element,t);var n=t.src;void 0!==n&&("string"==typeof n?this.A0&&(this.X0(),this.J0()):"object"===a(n)?function(t){i.element.setAttribute("src",""),Y(!i.q0.isEnabled(),'[amp-list] "[src]" may not be bound in SSR mode.');var n=h(t)?t:[t];i.X0(!1),i.cV(n,!1)}(n):this.user().error(ni,'Unexpected "src" type: '+n)),t["is-layout-container"]&&this.D0()},d.FJ=function(){var t,i=this.win.document.createElement("div");return this.e1(i,"list"),this.C0||this.N0||((t=i).classList.add("i-amphtml-fill-content"),t.classList.add("i-amphtml-replaced-content")),i},d.o1=function(t,i){var n=this;t.forEach((function(t){t.hasAttribute("role")||n.e1(t,"listitem"),i.appendChild(t)}))},d.e1=function(t,i){this.element.hasAttribute("single-item")||t.setAttribute("role",i)},d.a1=function(t){(t||this.CJ)&&(this.toggleFallback(t),this.CJ=t)},d.X0=function(){var t=this,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(i&&this.element.hasAttribute("reset-on-refresh")||"always"===this.element.getAttribute("reset-on-refresh")){var n=function(){t.togglePlaceholder(!0);var i=t.element.hasAttribute("reset-on-refresh");if(t.toggleLoading(!0,i),t.a1(!1),t._0){var n=f(t.ij.children);t._0.rescan([],n,{"fast":!0,"update":!1})}t.LL.scheduleUnlayout(t.element,t.ij),E(t.ij)};if(!this.C0&&this.N0)return void this.s1(n);this.mutateElement((function(){n(),t.C0&&t.W0().hideAllLoadMoreElements()}))}},d.u1=function(t){var i=this.element.getAttribute("items")||"items",n=t;return"."!=i&&(n=b(t,i)),Y(void 0!==n,'Response must contain an array or object at "%s". %s',i,this.element),this.element.hasAttribute("single-item")&&(h(n)?q().warn(ni,'Expected response to contain a non-array Object due to "single-item" attribute.',this.element):n=[n]),n=q().assertArray(n),this.element.hasAttribute("max-items")&&(n=this.l1(n)),n},d.f1=function(t){var i=t?It(this.win,"".concat(ni,".error"),{"response":t.response}):null;this.Gr.trigger(this.element,"fetch-error",i,1)},d.J0=function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.append,r=void 0!==n&&n,o=i.refresh,a=void 0!==o&&o,s=this.element.getAttribute("src");return s?(this.q0.isEnabled()?this.h1(a):(this.t1(s)?this.i1(s):xt(s)?this.n1(s):this.c1(a)).then((function(i){if(s===t.element.getAttribute("src")){var n=t.u1(i);return t.C0&&t.m1(i),t.cV(n,r,i).then((function(){return t.d1()}))}}))).catch((function(i){if(r)throw i;throw t.f1(i),t.v1(),i})):e()},d.l1=function(t){var i=parseInt(this.element.getAttribute("max-items"),10);return i=300)throw q().createError("Failed fetching JSON data (".concat(n.b1(i),")")+": HTTP error",e)}return Y("string"==typeof t.html,"Failed fetching JSON data: XHR Failed fetching "+"(".concat(n.b1(i),"): Expected response with ")+"format {html: }. Received: ",t),i.fetchOpt.responseType="application/json",t}),(function(t){throw q().createError("Failed fetching JSON data: XHR Failed fetching "+"(".concat(n.b1(i),")"),t)})).then((function(t){if(r===n.element.getAttribute("src"))return n.cV(t,!1)}))},d.b1=function(t){var i,n=(i=this.element,K(i,"url")).parse(t.xhrUrl);return"".concat(n.origin,"/...")},d.cV=function(t,i,n){var r=new o,e=r.promise,a=r.reject,s=r.resolve;return this.P0||this.I0.schedule(),this.P0={data:t,resolver:s,rejecter:a,append:i,payload:n},this.U0&&i&&(this.P0.payload=n||{}),e},d.T0=function(){var t=this,i=this.P0;q().fine(ni,"Rendering list",this.element,"with data",i.data),V(i&&i.data);var n=function(){t.P0!==i?t.I0.schedule(1):(t.U0=t.P0.data,t.P0=null)},r=this.q0.isEnabled(),e=this.q0.applySsrOrCsrTemplate(this.element,i.data).then((function(n){return t.g1(n,i.append)})).then((function(n){return t.Yu(n,i.append)}));if(!r){var o=i.payload;e=e.then((function(){return t.w1(o)}))}e.then((function(){n(),i.resolver()}),(function(){n(),i.rejecter()}))},d.w1=function(t){if(this.C0){var i=[];return i.push(this.O1(this.W0().getLoadMoreButton(),t)),i.push(this.O1(this.W0().getLoadMoreEndElement(),t)),Promise.all(i)}return e()},d.O1=function(t,i){var n=this;return t&&this.ty.hasTemplate(t)?this.ty.findAndRenderTemplate(t,i).then((function(i){return n.mutateElement((function(){E(t),t.appendChild(i)}))})):e()},d.g1=function(t,i){var n=this,r=h(t)?t:[t],e=this.element.getAttribute("binding");if("no"===e)return Promise.resolve(r);if(!r.some((function(t){return t.hasAttribute("i-amphtml-binding")||!!t.querySelector("[i-amphtml-binding]")})))return Promise.resolve(r);e||q().warn(ni,'Missing "binding" attribute. Using binding="refresh" is recommended for performance.');var o=function(t){var e=i?[]:[n.ij];return t.rescan(r,e,{"fast":!0,"update":!0}).then((function(){return r}),(function(){return r}))};return e&&e.startsWith("refresh")?this._0&&this._0.signals().get("FIRST_MUTATE")?o(this._0):(this.element.hasAttribute("diffable")||this.j1(r,[]),Promise.resolve(r)):ct(this.element).then((function(t){return t?o(t):Promise.resolve(r)}))},d.j1=function(t,i){var n=this.element.getAttribute("binding");n&&n.startsWith("refresh")&&ct(this.element).then((function(r){if(r){var e="refresh-evaluate"==n&&"evaluate";r.rescan(t,i,{"fast":!0,"update":e})}}))},d.Yu=function(t){var i=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.ij,e=function(){i.S1(),i.element.hasAttribute("diffable")?(i.R1(r,t),i.j1([r],[r])):(n||(i.LL.scheduleUnlayout(i.element,r),E(r)),i.o1(t,r)),i.element.closest("amp-story-page-attachment")&&i.ij.querySelectorAll("amp-img").forEach((function(t){t.getImpl().then((function(t){return t.layoutCallback()}))}));var e=It(i.win,w,null,{bubbles:!0});return i.ij.dispatchEvent(e),i.element.getResources().getResourceForElement(i.element).resetPendingChangeSize(),i.V0()};return!this.C0&&this.N0?this.s1((function(){(e()||Promise.resolve(!0)).then((function(t){return t?i.E1():null}))})):this.mutateElement(e)},d.R1=function(t,i){var n=this.FJ();this.o1(i,n),this.M0&&this.I1(t);for(var r=Ct(t,n),e=0;ei.element.offsetHeight)||i.attemptChangeHeight(n).then((function(){return!0}),(function(){return!1}))})):Promise.resolve(!0)},d.Q0=function(t){var i=this.z0?this.W0().getLoadMoreButton():this.W0().getLoadMoreEndElement();this.P1(i,t)},d.P1=function(t,i){var n=this;this.element.getAttribute("layout")!=T.CONTAINER&&this.measureElement((function(){var r=i.scrollHeight,e=n.element.offsetHeight,o=t?t.offsetHeight:0;r+o>e&&n.attemptChangeHeight(r+o).then((function(){n.G0=!1,"auto"===n.element.getAttribute("load-more")&&n.U1(),M(n.ij,{"max-height":""})})).catch((function(){n.G0=!0,n.Z0()}))}))},d.A1=function(t){var i=function(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}(t),n=function(t){return"i-amphtml-layout-"+t}(V(i));this.element.classList.remove(n,"i-amphtml-layout-size-defined"),[T.FIXED,T.FLEX_ITEM,T.FLUID,T.INTRINSIC,T.RESPONSIVE].includes(i)?M(this.element,{width:"",height:""}):i==T.FIXED_HEIGHT&&M(this.element,{height:""}),this.element.applySize()},d.D0=function(){var t=this;if(this.N0)return q().warn(ni,"[is-layout-container] and changeToLayoutContainer are ineffective when an amp-list initially sets layout=container",this.element),e();var i=this.element.getAttribute("i-amphtml-layout");return i==T.CONTAINER?e():this.mutateElement((function(){t.A1(i),t.ij.classList.remove("i-amphtml-fill-content","i-amphtml-replaced-content");var n=t.getOverflowElement();n&&_(n,!1),t.element.setAttribute("layout","container"),t.element.setAttribute("i-amphtml-layout","container"),t.element.classList.add("i-amphtml-layout-container")}))},d.d1=function(){return this.C0?this.N1():e()},d.N1=function(){var t=this;return this.z0?("auto"===this.element.getAttribute("load-more")&&this.L1(),this.mutateElement((function(){t.W0().toggleLoadMoreLoading(!1),M(t.W0().getLoadMoreButton(),{visibility:""})}))):this.mutateElement((function(){return t.W0().setLoadMoreEnded()}))},d.K0=function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.z0)this.element.setAttribute("src",this.z0),this.z0=null;else if(!i)return e();var r=this.ij,o=this.M1(r);return this.mutateElement((function(){t.W0().toggleLoadMoreLoading(!0)})),this.J0({append:!0}).then((function(){return t.mutateElement((function(){t.z0?(t.W0().toggleLoadMoreLoading(!1),o&&n&&k(o)):t.W0().setLoadMoreEnded()}))})).then((function(){t.Q0(t.ij)})).catch((function(i){t.f1(i),t._1()}))},d._1=function(){var t=this;this.mutateElement((function(){return t.W0().setLoadMoreFailed()})).then((function(){t.P1(t.W0().getLoadMoreFailedElement(),t.ij)}))},d.Qr=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Kt(this.getAmpDoc(),this.element,{expr:".",urlReplacement:this.dV(),refresh:t,xssiPrefix:this.element.getAttribute("xssi-prefix")||void 0})},d.L1=function(){var t=this;this.H0||(this.H0=this.ws.onChanged((function(){return t.U1()})))},d.U1=function(){var t=this;if(!this.G0){var i=this.ij.lastChild||this.ij;this.ws.getClientRectAsync(i).then((function(i){var n=t.ws.getHeight();if(i.bottom>0&&3*n>i.bottom)return t.K0()}))}},d.c1=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.Qr(t)},d.dV=function(){var t=this.element.getAttribute("src"),i=1;return t!=this.L0&&Ot(t)!=Ot(this.getAmpDoc().win.location)||(i=2),i},d.S1=function(){this.element.classList.remove("i-amphtml-list-fetch-error"),this.toggleLoading(!1),this.getFallback()&&this.a1(!1),this.togglePlaceholder(!1)},d.v1=function(){this.element.classList.add("i-amphtml-list-fetch-error"),R(this.element,"fetch-error")&&this.$0(this.element),this.toggleLoading(!1),this.getFallback()&&(this.a1(!0),this.togglePlaceholder(!1))},d.M1=function(t){var i,n,r=(n='button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"]), audio[controls], video[controls], [contenteditable]:not([contenteditable="false"])',x(i=t)?i.querySelectorAll(O(n,":scope")):j(i,n));return r?r[r.length-1]:null},m}(t.BaseElement);t.registerElement(ni,ei,'amp-list.i-amphtml-list-fetch-error [fetch-error],amp-list[load-more] [load-more-button].amp-visible,amp-list[load-more] [load-more-end].amp-visible,amp-list[load-more] [load-more-failed].amp-visible,amp-list[load-more] [load-more-loading].amp-visible{display:block}amp-list[load-more] [load-more-button].i-amphtml-default-ui,amp-list[load-more] [load-more-failed].i-amphtml-default-ui,amp-list[load-more] [load-more-loading].i-amphtml-default-ui{height:80px;padding:12px 0px;box-sizing:border-box}.i-amphtml-list-load-more-button,amp-list[load-more] [load-more-button].i-amphtml-default-ui,amp-list[load-more] [load-more-failed].i-amphtml-default-ui,amp-list[load-more] [load-more-loading].i-amphtml-default-ui{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-weight:700;font-size:14px;text-transform:uppercase;letter-spacing:.1em;color:#333;text-align:center}amp-list[load-more] [load-more-loading].i-amphtml-default-ui .i-amphtml-list-load-more-spinner{display:inline-block;width:40px;height:40px;margin:8px 0px;background-image:url(\'data:image/svg+xml;charset=utf-8,\');animation:amp-list-load-more-spinner 1000ms linear infinite}@keyframes amp-list-load-more-spinner{0%{transform:rotate(0deg)}to{transform:rotate(360deg)}}.i-amphtml-list-load-more-button{border:none;display:inline-block;background-color:rgba(51,51,51,.75);color:#fff;margin:4px 0px;padding:0px 32px;box-sizing:border-box;height:48px;border-radius:24px}[load-more] div[role=list]{overflow-y:hidden}.i-amphtml-list-load-more-button,.i-amphtml-list-load-more-button label,.i-amphtml-list-load-more-icon{cursor:pointer}.i-amphtml-list-load-more-button:hover{background-color:#333}.i-amphtml-list-load-more-button.i-amphtml-list-load-more-button-small{margin:0px;padding:4px 16px;height:32px}.i-amphtml-list-load-more-button label{display:inline-block;vertical-align:middle;line-height:24px}amp-list[load-more] [load-more-failed].i-amphtml-default-ui .i-amphtml-list-load-more-message{line-height:24px}amp-list[load-more] [load-more-failed].i-amphtml-default-ui .i-amphtml-list-load-more-icon{height:24px;width:24px;display:inline-block;vertical-align:middle;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}\n/*# sourceURL=/extensions/amp-list/0.1/amp-list.css*/')}();
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}});
//# sourceMappingURL=amp-list-0.1.js.map