; (self.AMP=self.AMP||[]).push({m:0,v:"2601162341000",n:"amp-fx-collection",ev:"0.1",l:!0,f:function(t,n){!function(){var n;function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,i=new Array(n);r=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.")}function e(t){var n=Object.getOwnPropertyDescriptor(t,"message");if(null!=n&&n.writable)return t;var r=t.message,i=t.stack,e=new Error(r);for(var a in t)e[a]=t[a];return e.stack=i,e}function a(t){for(var n,r=null,a="",s=i(arguments,!0);!(n=s()).done;){var u=n.value;u instanceof Error&&!r?r=e(u):(a&&(a+=" "),a+=u)}return r?a&&(r.message=a+": "+r.message):r=new Error(a),r}function s(t){var n,r;null===(n=(r=self).__AMP_REPORT_ERROR)||void 0===n||n.call(r,t)}function u(t){var n=a.apply(null,arguments);setTimeout((function(){throw s(n),n}))}var o=Object.prototype;function f(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}o.hasOwnProperty,o.toString,self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var c,h=self.__AMP_LOG;function l(t,n){throw new Error("failed to call initLogConstructor")}function v(t){return h.user||(h.user=d()),function(t,n){return n&&n.ownerDocument.defaultView!=t}(h.user.win,t)?h.userForEmbed||(h.userForEmbed=d()):h.user}function d(t){return l()}function p(t,n,r,i,e,a,s,u,o,f,c){return t}function m(t,n,r,i,e,a,s,u,o,f,c){return v().assert(t,n,r,i,e,a,s,u,o,f,c)}var b,y=["fade-in","fade-in-scroll","float-in-bottom","float-in-top","fly-in-bottom","fly-in-left","fly-in-right","fly-in-top","parallax"],g={FADE_IN:y[0],FADE_IN_SCROLL:y[1],FLOAT_IN_BOTTOM:y[2],FLOAT_IN_TOP:y[3],FLY_IN_BOTTOM:y[4],FLY_IN_LEFT:y[5],FLY_IN_RIGHT:y[6],FLY_IN_TOP:y[7],PARALLAX:y[8]},w=(f(c={},g.FADE_IN,{observes:0,opacity:!0}),f(c,g.FADE_IN_SCROLL,{observes:0,opacity:!0}),f(c,g.FLOAT_IN_BOTTOM,{observes:1,translates:{y:!0}}),f(c,g.FLOAT_IN_TOP,{observes:1,translates:{y:!0}}),f(c,g.FLY_IN_BOTTOM,{observes:0,translates:{y:!0}}),f(c,g.FLY_IN_LEFT,{observes:0,translates:{x:!0}}),f(c,g.FLY_IN_RIGHT,{observes:0,translates:{x:!0}}),f(c,g.FLY_IN_TOP,{observes:0,translates:{y:!0}}),f(c,g.PARALLAX,{observes:0,translates:{y:!0}}),c);function x(t,n){if(t==n)return!1;var r=w[t],i=r.observes,e=r.opacity,a=r.translates,s=w[n],u=s.observes,o=s.opacity,f=s.translates;if(i!==u)return!1;if(e&&o)return!1;if(a&&f){if(a.x&&f.x)return!1;if(a.y&&f.y)return!1}return!0}function A(t){return m(y.indexOf(t)>-1,"Invalid amp-fx type `%s`",t)}var O=["Webkit","webkit","Moz","moz","ms","O","o"],F={"getPropertyPriority":function(){return""},"getPropertyValue":function(){return""}};function I(t){var n=t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}));return O.some((function(t){return n.startsWith(t+"-")}))?"-".concat(n):n}function _(t,n,r){if(n.startsWith("--"))return n;b||(b=Object.create(null));var i=b[n];if(!i||r){if(i=n,void 0===t[n]){var e=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(n),a=function(t,n){for(var r=0;r1?n-1:0),i=1;ii.bottom?"bottom":"inside"),function(t,n){return t.top<=n.bottom&&n.top<=t.bottom&&t.left<=n.right&&n.left<=t.right}(e,t.viewportRect)?(this.BR=t,this.Os(t)):this.BR&&(this.BR=null,t.positionRect=null,this.Os(t))}},n.update=function(t){var n=this;if(!t){if(0!=this.turn)return void this.turn--;0==this.fidelity&&(this.turn=4)}var r,i,e=this.mu.getSize(),a={left:0,top:0,width:r=e.width,height:i=e.height,bottom:0+i,right:0+r,x:0,y:0};this.mu.getClientRectAsync(this.element).then((function(t){n.As({positionRect:t,viewportRect:a,relativePos:null})}))},t}(),G=function(){function t(t){var n=this;this.Lr=t,this.t=t.win,this.$R=[],this.pu=M(this.t,"vsync"),this.mu=$(t),this.hb=[],this.qR=!1,this.zR=!1,this.VR=!1,this.GR=function(t,n,r){var i=0,e=0,a=null;function s(){i=0;var r,u=500-(t.Date.now()-e);u>0?i=t.setTimeout(s,u):(r=a,a=null,n.apply(null,r))}return function(){e=t.Date.now();for(var n=arguments.length,r=new Array(n),u=0;u=0&&n<=100,"data-margin-start must be a percentage value and be between 0% and 100% for: %s",t),n}function W(t){return t&&t.positionRect?t.positionRect.top:null}function Z(t,n,r){var i=W(t);return p(1==Math.abs(r)),!!i&&i+r*n.viewportHeight*n.flyInDistance/100<=(1-n.marginStart)*n.viewportHeight}function q(t,n,r){var i=W(t),e=void 0!==r?r:n.viewportHeight;return!!i&&i<=(1-n.marginStart)*e}var J=(f(D={},g.PARALLAX,{userAsserts:function(t){var n=m(t.getAttribute("data-parallax-factor"),"data-parallax-factor= attribute must be provided for: %s",t);m(parseFloat(n)>0,"data-parallax-factor must be a number and greater than 0 for: %s",t)},update:function(t){var n=this,r=W(t);if(p(n.adjustedViewportHeight),r&&!(r>n.adjustedViewportHeight)){var i=-(parseFloat(n.factor)-1),e=(n.adjustedViewportHeight-r)*i;n.offset=e,E(n.element,{transform:"translateY(".concat(n.offset.toFixed(0),"px)")})}}}),f(D,g.FLY_IN_BOTTOM,{userAsserts:U,update:function(t){var n=this;p(n.viewportHeight),Z(t,n,-1)&&H(n,"Y",-1)}}),f(D,g.FLY_IN_LEFT,{userAsserts:U,update:function(t){var n=this;p(n.viewportHeight),q(t,n)&&H(n,"X",1)}}),f(D,g.FLY_IN_RIGHT,{userAsserts:U,update:function(t){var n=this;p(n.viewportHeight),q(t,n)&&H(n,"X",-1)}}),f(D,g.FLY_IN_TOP,{userAsserts:U,update:function(t){var n=this;p(n.viewportHeight),Z(t,n,1)&&H(n,"Y",1)}}),f(D,g.FADE_IN,{userAsserts:U,update:function(t){var n=this;p(n.viewportHeight),q(t,n)&&E(n.element,{"transition-duration":n.duration,"transition-timing-function":n.easing,"opacity":1})}}),f(D,g.FADE_IN_SCROLL,{userAsserts:function(t){var n=U(t),r=parseFloat(t.getAttribute("data-margin-end"));r&&(m(r>=0&&r<=100,"data-margin-end must be a percentage value and be between 0% and 100% for: %s",t),m(r>n,"data-margin-end must be greater than data-margin-start for: %s",t))},update:function(t){var n=this,r=n.marginStart,i=n.viewportHeight;if(p(n.adjustedViewportHeight),q(t,n,n.adjustedViewportHeight)&&(n.hasRepeat||!(n.offset>=1))){var e=1*(i-W(t)-r*i)/((n.marginEnd-r)*i);n.offset=e,E(n.element,{opacity:n.offset})}}}),D);function K(t){var n=parseFloat(t);return isNaN(n)?null:n/100}function Q(t){switch(t){case g.FADE_IN:case g.FLY_IN_RIGHT:case g.FLY_IN_LEFT:case g.FLY_IN_TOP:case g.FLY_IN_BOTTOM:return{"start":.05};case g.FADE_IN_SCROLL:return{"start":0,"end":.5};default:return{"start":0,"end":1}}}var tt=function(){function t(){this.wt=null}var n=t.prototype;return n.add=function(t){var n=this;return this.wt||(this.wt=[]),this.wt.push(t),function(){n.remove(t)}},n.remove=function(t){var n,r,i;this.wt&&(r=t,-1!=(i=(n=this.wt).indexOf(r))&&n.splice(i,1))},n.removeAll=function(){this.wt&&(this.wt.length=0)},n.fire=function(t){if(this.wt)for(var n,r=i(this.wt.slice(),!0);!(n=r()).done;)(0,n.value)(t)},n.getHandlerCount=function(){var t,n;return null!==(t=null===(n=this.wt)||void 0===n?void 0:n.length)&&void 0!==t?t:0},t}(),nt=function(){function t(t){var n,r,i,e=this;this.Lr=t,this.To=new tt,this.FF=(n=!1,r=null,i=function(){return e.Po()},function(){if(!n){for(var t=arguments.length,e=new Array(t),a=0;a0||this.NF&&n<0)&&(this.TF=this.LF),!this.NF&&this.LF<=36||!this.NF&&n<-20?(this.zF(!0),void(this.TF=this.LF)):void(this.NF&&n>80&&(this.zF(!1),this.TF=this.LF))},n.zF=function(t){this.NF!=t&&(this.NF=t,this.To.fire(t))},t}();function rt(t,n,r,i,e){if(t[n]==r)return!0;var a=e?" ".concat(e):"",s=it(i);return v().warn("amp-fx","FX element must have `".concat(n,": ").concat(r,"` [").concat(s,"]").concat(a,".")),!1}function it(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.classList,i=t.id,e=t.parentElement,a=t.tagName;if(i)return"#".concat(i);var s=a.toLowerCase(),u=s;if(r.length>0){var o=r.length>1?"...":"";u+=".".concat(r[0]).concat(o)}if(!e)return"".concat(u," (detached)");var f=e.firstElementChild,c=e.lastElementChild;return t==f&&t==c||(t==f?u+=":first-child":t==c&&(u+=":last-child")),n>0?u:"".concat(it(e,n+1)," > ").concat(u)}var et=function(){function t(t,n,r){var i,e,a=this;this.win=t.win,this.dr=function(t){return P(t,"position-observer")}(n),this.mu=$(n),this.fa=C(n),this.viewportHeight=null,this.adjustedViewportHeight=null,this.element=n,this.offset=0,this.MF=r,J[r].userAsserts(n),this.factor=parseFloat(n.getAttribute("data-parallax-factor")),this.marginStart=n.hasAttribute("data-margin-start")?K(n.getAttribute("data-margin-start")):Q(r).start,this.marginEnd=n.hasAttribute("data-margin-end")?K(n.getAttribute("data-margin-end")):Q(r).end,this.easing=(i=n.hasAttribute("data-easing")?n.getAttribute("data-easing"):function(t){switch(t){case g.FADE_IN:return"ease-in";case g.FLY_IN_RIGHT:case g.FLY_IN_LEFT:case g.FLY_IN_TOP:case g.FLY_IN_BOTTOM:return"ease-out";default:return"ease-in"}}(r),(e={"linear":"cubic-bezier(0.00, 0.00, 1.00, 1.00)","ease-in-out":"cubic-bezier(0.80, 0.00, 0.20, 1.00)","ease-in":"cubic-bezier(0.80, 0.00, 0.60, 1.00)","ease-out":"cubic-bezier(0.40, 0.00, 0.40, 1.00)"})[i]?e[i]:(m(i.startsWith("cubic-bezier"),"All custom bezier curves should be specified by following the `cubic-bezier()` function notation."),i)),this.duration=n.hasAttribute("data-duration")?n.getAttribute("data-duration"):function(t,n){switch(n){case g.FADE_IN:return"1000ms";case g.FLY_IN_BOTTOM:case g.FLY_IN_TOP:case g.FLY_IN_LEFT:case g.FLY_IN_RIGHT:var r=$(t).getSize().width;return 1e3,e=480,(i=Math.min(1e3,r))1e3&&(i=1e3),200*(i-480)/520+400+"ms";default:return"1ms"}var i,e}(t,r),this.flyInDistance=n.hasAttribute("data-fly-in-distance")?parseFloat(n.getAttribute("data-fly-in-distance")):function(t,n){switch(n){case g.FLY_IN_BOTTOM:case g.FLY_IN_TOP:return $(t).getSize().width<1e3?25:33;case g.FLY_IN_LEFT:case g.FLY_IN_RIGHT:return 100;default:return 1}}(t,r),this.hasRepeat=n.hasAttribute("data-repeat"),this.initialTrigger=!1,this.PF().then((function(t){a.adjustedViewportHeight=t,a.XF()})),this.BF()}var n=t.prototype;return n.XF=function(){var t=this;this.dr.observe(this.element,1,J[this.MF].update.bind(this)),this.mu.onResize((function(){t.BF(),t.PF().then((function(n){t.adjustedViewportHeight=n}))}))},n.BF=function(){var t=this;this.fa.measureElement((function(){t.viewportHeight=t.mu.getHeight()}))},n.PF=function(){var t=this;return this.fa.measureElement((function(){for(var n=t.mu.getHeight(),r=0,i=t.element;i;i=i.offsetParent)r+=i.offsetTop;return r1?n-1:0),i=1;i0),rt(r,i,N(0),t,"amp-fx=".concat(n))?i:null}(n,r,i),u=function(t,n){return rt(n,"overflow","hidden",t)&&rt(n,"position","fixed",t)}(n,i);a&&u?e.observe((function(t){!function(t,n,r){var i=0;C(t).measureMutateElement(t,(function(){i=function(t,n,r){if(n)return 0;var i=t.getBoundingClientRect().height;return"top"==r?-i:i}(t,n,r)}),(function(){!function(t,n){T(t,{"transition":"transform ".concat(300,"ms ").concat("ease"),"transform":"translate(0, ".concat(N(n),")")})}(t,i)}))}(n,t,p(a))})):s=!1}),(function(){s&&function(t){T(t,{"will-change":"transform"})}(n)}))}var u}(this.Lr,t,n)},t}();t.registerServiceForDoc("amp-fx-collection",at)}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-fx-collection-0.1.js.map