/*! ScrollMagic v2.0.7 | (c) 2019 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
!function(n,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():n.ScrollMagic=t()}(this,function(){"use strict";var t=function(){},r,u,i,n;return t.version="2.0.7",window.addEventListener("mousewheel",function(){}),r="data-scrollmagic-pin-spacer",t.Controller=function(i){var k,d,g="REVERSE",nt="PAUSED",p=u.defaults,e=this,f=n.extend({},p,i),o=[],s=!1,w=0,l=nt,h=!0,a=0,v=!0,tt=function(){0<f.refreshInterval&&(d=window.setTimeout(et,f.refreshInterval))},it=function(){return f.vertical?n.get.scrollTop(f.container):n.get.scrollLeft(f.container)},b=function(){return f.vertical?n.get.height(f.container):n.get.width(f.container)},rt=this._setScrollPos=function(t){f.vertical?h?window.scrollTo(n.get.scrollLeft(),t):f.container.scrollTop=t:h?window.scrollTo(t,n.get.scrollTop()):f.container.scrollLeft=t},ut=function(){var t,r,i;v&&s&&(t=n.type.Array(s)?s:o.slice(0),s=!1,r=w,i=(w=e.scrollPos())-r,0!==i&&(l=0<i?"FORWARD":g),l===g&&t.reverse(),t.forEach(function(n){n.update(!0)}))},ft=function(){k=n.rAF(ut)},c=function(n){"resize"==n.type&&(a=b(),l=nt);!0!==s&&(s=!0,ft())},et=function(){if(!h&&a!=b()){var n;try{n=new Event("resize",{bubbles:!1,cancelable:!1})}catch(t){(n=document.createEvent("Event")).initEvent("resize",!1,!1)}f.container.dispatchEvent(n)}o.forEach(function(n){n.refresh()});tt()},y;return this._options=f,y=function(n){if(n.length<=1)return n;var t=n.slice(0);return t.sort(function(n,t){return n.scrollOffset()>t.scrollOffset()?1:-1}),t},this.addScene=function(i){if(n.type.Array(i))i.forEach(function(n){e.addScene(n)});else if(i instanceof t.Scene)if(i.controller()!==e)i.addTo(e);else if(o.indexOf(i)<0)for(var r in o.push(i),o=y(o),i.on("shift.controller_sort",function(){o=y(o)}),f.globalSceneOptions)i[r]&&i[r].call(i,f.globalSceneOptions[r]);return e},this.removeScene=function(t){if(n.type.Array(t))t.forEach(function(n){e.removeScene(n)});else{var i=o.indexOf(t);-1<i&&(t.off("shift.controller_sort"),o.splice(i,1),t.remove())}return e},this.updateScene=function(i,r){return n.type.Array(i)?i.forEach(function(n){e.updateScene(n,r)}):r?i.update(!0):!0!==s&&i instanceof t.Scene&&(-1==(s=s||[]).indexOf(i)&&s.push(i),s=y(s),ft()),e},this.update=function(n){return c({type:"resize"}),n&&ut(),e},this.scrollTo=function(i,u){var o;if(n.type.Number(i))rt.call(f.container,i,u);else if(i instanceof t.Scene)i.controller()===e&&e.scrollTo(i.scrollOffset(),u);else if(n.type.Function(i))rt=i;else if(o=n.get.elements(i)[0],o){for(;o.parentNode.hasAttribute(r);)o=o.parentNode;var s=f.vertical?"top":"left",c=n.get.offset(f.container),l=n.get.offset(o);h||(c[s]-=e.scrollPos());e.scrollTo(l[s]-c[s],u)}return e},this.scrollPos=function(t){return arguments.length?(n.type.Function(t)&&(it=t),e):it.call(e)},this.info=function(n){var t={size:a,vertical:f.vertical,scrollPos:w,scrollDirection:l,container:f.container,isDocument:h};return arguments.length?void 0!==t[n]?t[n]:void 0:t},this.loglevel=function(){return e},this.enabled=function(n){return arguments.length?(v!=n&&(v=!!n,e.updateScene(o,!0)),e):v},this.destroy=function(t){window.clearTimeout(d);for(var i=o.length;i--;)o[i].destroy(t);return f.container.removeEventListener("resize",c),f.container.removeEventListener("scroll",c),n.cAF(k),null},function(){var t,i;for(t in f)p.hasOwnProperty(t)||delete f[t];if(f.container=n.get.elements(f.container)[0],!f.container)throw"ScrollMagic.Controller init failed.";(h=f.container===window||f.container===document.body||!document.body.contains(f.container))&&(f.container=window);a=b();f.container.addEventListener("resize",c);f.container.addEventListener("scroll",c);i=parseInt(f.refreshInterval,10);f.refreshInterval=n.type.Number(i)?i:p.refreshInterval;tt()}(),e},u={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}},t.Controller.addOption=function(n,t){u.defaults[n]=t},t.Controller.extend=function(i){var r=this;t.Controller=function(){return r.apply(this,arguments),this.$super=n.extend({},this),i.apply(this,arguments)||this};n.extend(t.Controller,r);t.Controller.prototype=r.prototype;t.Controller.prototype.constructor=t.Controller},t.Scene=function(u){var y,o,p="BEFORE",l="DURING",nt="AFTER",tt=i.defaults,f=this,h=n.extend({},tt,u),c=p,a=0,v={start:0,end:0},d=0,it=!0,w={},ft,k;this.on=function(t,i){return n.type.Function(i)&&(t=t.trim().split(" ")).forEach(function(n){var r=n.split("."),t=r[0],u=r[1];"*"!=t&&(w[t]||(w[t]=[]),w[t].push({namespace:u||"",callback:i}))}),f};this.off=function(n,t){return n&&(n=n.trim().split(" ")).forEach(function(n){var i=n.split("."),r=i[0],u=i[1]||"";("*"===r?Object.keys(w):[r]).forEach(function(n){for(var f,i=w[n]||[],r=i.length;r--;)f=i[r],!f||u!==f.namespace&&"*"!==u||t&&t!=f.callback||i.splice(r,1);i.length||delete w[n]})}),f};this.trigger=function(n,i){if(n){var r=n.trim().split("."),u=r[0],e=r[1],o=w[u];o&&o.forEach(function(n){e&&e!==n.namespace||n.callback.call(f,new t.Event(u,n.namespace,f,i))})}return f};f.on("change.internal",function(n){"loglevel"!==n.what&&"tweenChanges"!==n.what&&("triggerElement"===n.what?et():"reverse"===n.what&&f.update())}).on("shift.internal",function(){ht();f.update()});this.addTo=function(n){return n instanceof t.Controller&&o!=n&&(o&&o.removeScene(f),o=n,st(),ct(!0),et(!0),ht(),o.info("container").addEventListener("resize",lt),n.addScene(f),f.trigger("add",{controller:o}),f.update()),f};this.enabled=function(n){return arguments.length?(it!=n&&(it=!!n,f.update(!0)),f):it};this.remove=function(){if(o){o.info("container").removeEventListener("resize",lt);var n=o;o=void 0;n.removeScene(f);f.trigger("remove")}return f};this.destroy=function(n){return f.trigger("destroy",{reset:n}),f.remove(),f.off("*.*"),null};this.update=function(n){if(o)if(n)if(o.enabled()&&it){var i,t=o.info("scrollPos");i=0<h.duration?(t-v.start)/(v.end-v.start):t>=v.start?1:0;f.trigger("update",{startPos:v.start,endPos:v.end,scrollPos:t});f.progress(i)}else e&&c===l&&b(!0);else o.updateScene(f,!1);return f};this.refresh=function(){return ct(),et(),f};this.progress=function(n){if(arguments.length){var t=!1,u=c,s=o?o.info("scrollDirection"):"PAUSED",r=h.reverse||a<=n;if(0===h.duration?(t=a!=n,c=0==(a=n<1&&r?0:1)?p:l):n<0&&c!==p&&r?(c=p,t=!(a=0)):0<=n&&n<1&&r?(a=n,c=l,t=!0):1<=n&&c!==nt?(a=1,c=nt,t=!0):c!==l||r||b(),t){var v={progress:a,state:c,scrollDirection:s},e=c!=u,i=function(n){f.trigger(n,v)};e&&u!==l&&(i("enter"),i(u===p?"start":"end"));i("progress");e&&c!==l&&(i(c===p?"start":"end"),i("leave"))}return f}return a};var e,s,ht=function(){v={start:d+h.offset};o&&h.triggerElement&&(v.start-=o.info("size")*h.triggerHook);v.end=v.start+h.duration},ct=function(n){if(y){var t="duration";at(t,y.call(f))&&!n&&(f.trigger("change",{what:t,newval:h[t]}),f.trigger("shift",{reason:t}))}},et=function(t){var u=0,i=h.triggerElement,l,a;if(o&&(i||0<d)){if(i)if(i.parentNode){for(var e=o.info(),c=n.get.offset(e.container),s=e.vertical?"top":"left";i.parentNode.hasAttribute(r);)i=i.parentNode;l=n.get.offset(i);e.isDocument||(c[s]-=o.scrollPos());u=l[s]-c[s]}else f.triggerElement(void 0);a=u!=d;d=u;a&&!t&&f.trigger("shift",{reason:"triggerElementPosition"})}},lt=function(){0<h.triggerHook&&f.trigger("shift",{reason:"containerResize"})},ot=n.extend(i.validate,{duration:function(t){if(n.type.String(t)&&t.match(/^(\.|\d)*\d+%$/)){var i=parseFloat(t)/100;t=function(){return o?o.info("size")*i:0}}if(n.type.Function(t)){y=t;try{t=parseFloat(y.call(f))}catch(i){t=-1}}if(t=parseFloat(t),!n.type.Number(t)||t<0)throw y&&(y=void 0),0;return t}}),st=function(n){(n=arguments.length?[n]:Object.keys(ot)).forEach(function(n){var t;if(ot[n])try{t=ot[n](h[n])}catch(e){t=tt[n]}finally{h[n]=t}})},at=function(n,t){var i=!1,r=h[n];return h[n]!=t&&(h[n]=t,st(n),i=r!=h[n]),i},yt=function(n){f[n]||(f[n]=function(t){return arguments.length?("duration"===n&&(y=void 0),at(n,t)&&(f.trigger("change",{what:n,newval:h[n]}),-1<i.shifts.indexOf(n)&&f.trigger("shift",{reason:n})),f):h[n]})};this.controller=function(){return o};this.state=function(){return c};this.scrollOffset=function(){return v.start};this.triggerPosition=function(){var n=h.offset;return o&&(n+=h.triggerElement?d:o.info("size")*f.triggerHook()),n};f.on("shift.internal",function(n){var t="duration"===n.reason;(c===nt&&t||c===l&&0===h.duration)&&b();t&&g()}).on("progress.internal",function(){b()}).on("add.internal",function(){g()}).on("destroy.internal",function(n){f.removePin(n.reset)});var b=function(t){var r,i,u,f,y,w;e&&o&&(r=o.info(),i=s.spacer.firstChild,t||c!==l?(u={position:s.inFlow?"relative":"absolute",top:0,left:0},f=n.css(i,"position")!=u.position,s.pushFollowers?0<h.duration&&(c===nt&&0===parseFloat(n.css(s.spacer,"padding-top"))?f=!0:c===p&&0===parseFloat(n.css(s.spacer,"padding-bottom"))&&(f=!0)):u[r.vertical?"top":"left"]=h.duration*a,n.css(i,u),f&&g()):("fixed"!=n.css(i,"position")&&(n.css(i,{position:"fixed"}),g()),y=n.get.offset(s.spacer,!0),w=h.reverse||0===h.duration?r.scrollPos-v.start:Math.round(a*h.duration*10)/10,y[r.vertical?"top":"left"]+=w,n.css(s.spacer.firstChild,{top:y.top,left:y.left})))},g=function(){if(e&&o&&s.inFlow){var i=c===l,r=o.info("vertical"),u=s.spacer.firstChild,f=n.isMarginCollapseType(n.css(s.spacer,"display")),t={};s.relSize.width||s.relSize.autoFullWidth?i?n.css(e,{width:n.get.width(s.spacer)}):n.css(e,{width:"100%"}):(t["min-width"]=n.get.width(r?e:u,!0,!0),t.width=i?t["min-width"]:"auto");s.relSize.height?i?n.css(e,{height:n.get.height(s.spacer)-(s.pushFollowers?h.duration:0)}):n.css(e,{height:"100%"}):(t["min-height"]=n.get.height(r?u:e,!0,!f),t.height=i?t["min-height"]:"auto");s.pushFollowers&&(t["padding"+(r?"Top":"Left")]=h.duration*a,t["padding"+(r?"Bottom":"Right")]=h.duration*(1-a));n.css(s.spacer,t)}},rt=function(){o&&e&&c===l&&!o.info("isDocument")&&b()},vt=function(){o&&e&&c===l&&((s.relSize.width||s.relSize.autoFullWidth)&&n.get.width(window)!=n.get.width(s.spacer.parentNode)||s.relSize.height&&n.get.height(window)!=n.get.height(s.spacer.parentNode))&&g()},ut=function(n){o&&e&&c===l&&!o.info("isDocument")&&(n.preventDefault(),o._setScrollPos(o.info("scrollPos")-((n.wheelDelta||n[o.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-n.detail)))};return this.setPin=function(t,i){var a,c,u,l,y;if((i=n.extend({},{pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},i),!(t=n.get.elements(t)[0]))||"fixed"===n.css(t,"position"))return f;if(e){if(e===t)return f;f.removePin()}a=(e=t).parentNode.style.display;c=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];e.parentNode.style.display="none";var o="absolute"!=n.css(e,"position"),v=n.css(e,c.concat(["display"])),h=n.css(e,["width","height"]);return e.parentNode.style.display=a,!o&&i.pushFollowers&&(i.pushFollowers=!1),u=e.parentNode.insertBefore(document.createElement("div"),e),l=n.extend(v,{position:o?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"}),(o||n.extend(l,n.css(e,["width","height"])),n.css(u,l),u.setAttribute(r,""),n.addClass(u,i.spacerClass),s={spacer:u,relSize:{width:"%"===h.width.slice(-1),height:"%"===h.height.slice(-1),autoFullWidth:"auto"===h.width&&o&&n.isMarginCollapseType(v.display)},pushFollowers:i.pushFollowers,inFlow:o},e.___origStyle)||(e.___origStyle={},y=e.style,c.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]).forEach(function(n){e.___origStyle[n]=y[n]||""})),s.relSize.width&&n.css(u,{width:h.width}),s.relSize.height&&n.css(u,{height:h.height}),u.appendChild(e),n.css(e,{position:o?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(s.relSize.width||s.relSize.autoFullWidth)&&n.css(e,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",rt),window.addEventListener("resize",rt),window.addEventListener("resize",vt),e.addEventListener("mousewheel",ut),e.addEventListener("DOMMouseScroll",ut),b(),f},this.removePin=function(t){var i,h,u;return e&&((c===l&&b(!0),t||!o)&&(i=s.spacer.firstChild,i.hasAttribute(r)&&(h=s.spacer.style,u={},["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach(function(n){u[n]=h[n]||""}),n.css(i,u)),s.spacer.parentNode.insertBefore(i,s.spacer),s.spacer.parentNode.removeChild(s.spacer),e.parentNode.hasAttribute(r)||(n.css(e,e.___origStyle),delete e.___origStyle)),window.removeEventListener("scroll",rt),window.removeEventListener("resize",rt),window.removeEventListener("resize",vt),e.removeEventListener("mousewheel",ut),e.removeEventListener("DOMMouseScroll",ut),e=void 0),f},k=[],f.on("destroy.internal",function(n){f.removeClassToggle(n.reset)}),this.setClassToggle=function(t,i){var r=n.get.elements(t);return 0!==r.length&&n.type.String(i)&&(0<k.length&&f.removeClassToggle(),ft=i,k=r,f.on("enter.internal_class leave.internal_class",function(t){var i="enter"===t.type?n.addClass:n.removeClass;k.forEach(function(n){i(n,ft)})})),f},this.removeClassToggle=function(t){return t&&k.forEach(function(t){n.removeClass(t,ft)}),f.off("start.internal_class end.internal_class"),ft=void 0,k=[],f},function(){var n,t;for(n in h)tt.hasOwnProperty(n)||delete h[n];for(t in tt)yt(t);st()}(),f},i={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(t){if(t=parseFloat(t),!n.type.Number(t))throw 0;return t},triggerElement:function(t){if(t=t||void 0){var i=n.get.elements(t)[0];if(!i||!i.parentNode)throw 0;t=i}return t},triggerHook:function(t){var i={onCenter:.5,onEnter:1,onLeave:0};if(n.type.Number(t))t=Math.max(0,Math.min(parseFloat(t),1));else{if(!(t in i))throw 0;t=i[t]}return t},reverse:function(n){return!!n}},shifts:["duration","offset","triggerHook"]},t.Scene.addOption=function(n,t,r,u){n in i.defaults||(i.defaults[n]=t,i.validate[n]=r,u&&i.shifts.push(n))},t.Scene.extend=function(i){var r=this;t.Scene=function(){return r.apply(this,arguments),this.$super=n.extend({},this),i.apply(this,arguments)||this};n.extend(t.Scene,r);t.Scene.prototype=r.prototype;t.Scene.prototype.constructor=t.Scene},t.Event=function(n,t,i,r){for(var u in r=r||{})this[u]=r[u];return this.type=n,this.target=this.currentTarget=i,this.namespace=t||"",this.timeStamp=this.timestamp=Date.now(),this},n=t._util=function(n){var i,r={},e=function(n){return parseFloat(n)||0},s=function(t){return t.currentStyle?t.currentStyle:n.getComputedStyle(t)},l=function(i,r,u,f){var h,o;if((r=r===document?n:r)===n)f=!1;else if(!t.DomElement(r))return 0;return i=i.charAt(0).toUpperCase()+i.substr(1).toLowerCase(),h=(u?r["offset"+i]||r["outer"+i]:r["client"+i]||r["inner"+i])||0,u&&f&&(o=s(r),h+="Height"===i?e(o.marginTop)+e(o.marginBottom):e(o.marginLeft)+e(o.marginRight)),h},h=function(n){return n.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(n){return n[1].toUpperCase()})},t,u;r.extend=function(n){for(n=n||{},i=1;i<arguments.length;i++)if(arguments[i])for(var t in arguments[i])arguments[i].hasOwnProperty(t)&&(n[t]=arguments[i][t]);return n};r.isMarginCollapseType=function(n){return-1<["block","flex","list-item","table","-webkit-box"].indexOf(n)};var a=0,c=["ms","moz","webkit","o"],f=n.requestAnimationFrame,o=n.cancelAnimationFrame;for(i=0;!f&&i<4;++i)f=n[c[i]+"RequestAnimationFrame"],o=n[c[i]+"CancelAnimationFrame"]||n[c[i]+"CancelRequestAnimationFrame"];return f||(f=function(t){var i=(new Date).getTime(),r=Math.max(0,16-(i-a)),u=n.setTimeout(function(){t(i+r)},r);return a=i+r,u}),o||(o=function(t){n.clearTimeout(t)}),r.rAF=f.bind(n),r.cAF=o.bind(n),t=r.type=function(n){return Object.prototype.toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},t.String=function(n){return"string"===t(n)},t.Function=function(n){return"function"===t(n)},t.Array=function(n){return Array.isArray(n)},t.Number=function(n){return!t.Array(n)&&0<=n-parseFloat(n)+1},t.DomElement=function(n){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?n instanceof HTMLElement||n instanceof SVGElement:n&&"object"==typeof n&&null!==n&&1===n.nodeType&&"string"==typeof n.nodeName},u=r.get={},u.elements=function(i){var r=[],f,o,e;if(t.String(i))try{i=document.querySelectorAll(i)}catch(i){return r}if("nodelist"===t(i)||t.Array(i)||i instanceof NodeList)for(f=0,o=r.length=i.length;f<o;f++)e=i[f],r[f]=t.DomElement(e)?e:u.elements(e);else(t.DomElement(i)||i===document||i===n)&&(r=[i]);return r},u.scrollTop=function(t){return t&&"number"==typeof t.scrollTop?t.scrollTop:n.pageYOffset||0},u.scrollLeft=function(t){return t&&"number"==typeof t.scrollLeft?t.scrollLeft:n.pageXOffset||0},u.width=function(n,t,i){return l("width",n,t,i)},u.height=function(n,t,i){return l("height",n,t,i)},u.offset=function(n,t){var i={top:0,left:0},r;return n&&n.getBoundingClientRect&&(r=n.getBoundingClientRect(),i.top=r.top,i.left=r.left,t||(i.top+=u.scrollTop(),i.left+=u.scrollLeft())),i},r.addClass=function(n,t){t&&(n.classList?n.classList.add(t):n.className+=" "+t)},r.removeClass=function(n,t){t&&(n.classList?n.classList.remove(t):n.className=n.className.replace(RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},r.css=function(n,i){var u,e,f,r;if(t.String(i))return s(n)[h(i)];if(t.Array(i))return u={},e=s(n),i.forEach(function(n){u[n]=e[h(n)]}),u;for(f in i)r=i[f],r==parseFloat(r)&&(r+="px"),n.style[h(f)]=r},r}(window||{}),t})