diff --git a/dist/scrollxp.js b/dist/scrollxp.js index bff5e0f..088fc1e 100644 --- a/dist/scrollxp.js +++ b/dist/scrollxp.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("gsap")):"function"==typeof define&&define.amd?define(["gsap"],e):"object"==typeof exports?exports.ScrollXP=e(require("gsap")):t.ScrollXP=e(t.gsap)}(this,(function(t){return r={},e.m=n=[function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return s})),n.d(e,"__decorate",(function(){return a})),n.d(e,"__param",(function(){return l})),n.d(e,"__metadata",(function(){return u})),n.d(e,"__awaiter",(function(){return c})),n.d(e,"__generator",(function(){return f})),n.d(e,"__createBinding",(function(){return d})),n.d(e,"__exportStar",(function(){return h})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return g})),n.d(e,"__spread",(function(){return v})),n.d(e,"__spreadArrays",(function(){return m})),n.d(e,"__await",(function(){return y})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return w})),n.d(e,"__asyncValues",(function(){return E})),n.d(e,"__makeTemplateObject",(function(){return S})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return P})),n.d(e,"__classPrivateFieldGet",(function(){return A})),n.d(e,"__classPrivateFieldSet",(function(){return T})); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("gsap")):"function"==typeof define&&define.amd?define(["gsap"],e):"object"==typeof exports?exports.ScrollXP=e(require("gsap")):t.ScrollXP=e(t.gsap)}(this,(function(t){return n={},e.m=r=[function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return o})),r.d(e,"__rest",(function(){return s})),r.d(e,"__decorate",(function(){return a})),r.d(e,"__param",(function(){return l})),r.d(e,"__metadata",(function(){return u})),r.d(e,"__awaiter",(function(){return c})),r.d(e,"__generator",(function(){return d})),r.d(e,"__createBinding",(function(){return f})),r.d(e,"__exportStar",(function(){return h})),r.d(e,"__values",(function(){return p})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return v})),r.d(e,"__spreadArrays",(function(){return m})),r.d(e,"__await",(function(){return y})),r.d(e,"__asyncGenerator",(function(){return b})),r.d(e,"__asyncDelegator",(function(){return w})),r.d(e,"__asyncValues",(function(){return E})),r.d(e,"__makeTemplateObject",(function(){return S})),r.d(e,"__importStar",(function(){return _})),r.d(e,"__importDefault",(function(){return x})),r.d(e,"__classPrivateFieldGet",(function(){return P})),r.d(e,"__classPrivateFieldSet",(function(){return A})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;ni[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||0=t&&(Array.prototype.splice.call(e,1,0,"(INDICATOR) ->"),o.default.log.apply(window,e))},u.prototype.createOptions=function(t,e){var n={name:"No Name",colorStart:s,colorEnd:"red",colorTrigger:a,parent:void 0,indent:0};return void 0!==(null==t?void 0:t.name)?n.name=null==t?void 0:t.name:void 0!==e&&(n.name=""+e),void 0!==(null==t?void 0:t.colorStart)&&(n.colorStart=t.colorStart),void 0!==(null==t?void 0:t.colorEnd)&&(n.colorEnd=t.colorEnd),void 0!==(null==t?void 0:t.colorTrigger)&&(n.colorTrigger=t.colorTrigger),void 0!==(null==t?void 0:t.parent)&&(n.parent=t.parent),void 0!==(null==t?void 0:t.indent)&&(n.indent=t.indent),n},u.FONT_SIZE="0.85em",u.ZINDEX="9999",u.EDGE_OFFSET=15,u);function u(t,e,n){this.scene=t,this.options=this.createOptions(e,n),this.elemBounds=r.default.bounds(),this.elemStart=r.default.start(this.options.colorStart||s),this.elemEnd=r.default.end(this.options.colorEnd||"red"),this.elemStart.firstChild&&(this.elemStart.firstChild.textContent+=" "+this.options.name),this.elemEnd.textContent+=" "+this.options.name,this.elemBounds.appendChild(this.elemStart),this.elemBounds.appendChild(this.elemEnd),this.bounds=this.elemBounds}e.default=l},function(t,e,n){"use strict";function r(t){return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase()}Object.defineProperty(e,"__esModule",{value:!0}),e.default={isString:function(t){return"string"===r(t)},isFunction:function(t){return"function"===r(t)},isArray:function(t){return Array.isArray(t)},isNumber:function(t){return!this.isArray(t)&&0<=t-parseFloat(t)+1},isDomElement:function(t){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?t instanceof HTMLElement||"undefined"!=typeof SVGElement&&t instanceof SVGElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},isNodeList:function(t){return"nodelist"===r(t)}}},function(t,e,n){"use strict";var r=n(32),i={};i[n(1)("toStringTag")]="z",i+""!="[object z]"&&n(7)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r=n(33),i=n(1)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(4),i=n(3),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(53)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){"use strict";var r=n(82)(!0);n(38)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0=this._progress;0===this._duration?(i=this._progress!=t,this._progress=t<1&&l?0:1,this.state=0===this._progress?r.Before:r.During):t<0&&this.state!==r.Before&&l?(this._progress=0,this.state=r.Before,i=!0):0<=t&&t<1&&l?(this._progress=t,this.state=r.During,i=!0):1<=t&&this.state!==r.After?(this._progress=1,this.state=r.After,i=!0):this.state!==r.During||l||this.updatePinState(),i&&(e={progress:this._progress,state:this.state,scrollDirection:a},(n=this.state!=s)&&s!==r.During&&(this.trigger("enter",e),this.trigger(s===r.Before?"start":"end",e)),this.trigger("progress",e),n&&this.state!==r.During&&(this.trigger(this.state===r.Before?"start":"end",e),this.trigger("leave",e)))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"scrollOffset",{get:function(){return this._scrollOffset.start},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"triggerPosition",{get:function(){var t=this.offset;return this.controller&&(this.triggerElement?t+=this._triggerPosition:t+=this.controller.info().size*this.triggerHook),t},enumerable:!1,configurable:!0}),h.prototype.on=function(t,e){var n=this;return t.trim().split(" ").forEach((function(t){var r=t.split("."),i=r[0],o=r[1];n.listeners&&"*"!==i&&(n.listeners[i]||(n.listeners[i]=[]),n.listeners[i].push({namespace:o||"",callback:e}))})),this},h.prototype.off=function(t,e){var n=this;return t.trim().split(" ").forEach((function(t){var r=t.split("."),i=r[0],o=r[1]||"";("*"===i?n.listeners?Object.keys(n.listeners):[]:[i]).forEach((function(t){for(var r=(n.listeners?n.listeners[t]:[])||[],i=r.length;i--;){var s=r[i];!s||o!==s.namespace&&"*"!==o||e&&e!=s.callback||r.splice(i,1)}!r.length&&n.listeners&&delete n.listeners[t]}))})),this},h.prototype.addTo=function(t){return this._controller!=t&&(this._controller&&this._controller.removeScene(this),this._controller=t,this.updateDuration(!0),this.updateTriggerElementPosition(!0),this.updateScrollOffset(),this._controller.info().container.addEventListener("resize",this.onContainerResize.bind(this)),this._controller.addScene(this),this.trigger("add",{controller:this._controller}),this.log(3,"Added "+h.NAMESPACE+" to controller"),this.update()),this},h.prototype.remove=function(){return this.controller&&(this.controller.info().container.removeEventListener("resize",this.onContainerResize.bind(this)),this.controller.removeScene(this),this.trigger("remove"),this.log(3,"Removed "+h.NAMESPACE+" from controller")),this},h.prototype.destroy=function(t){return this.trigger("destroy",{reset:t}),this.remove(),this.off("*.*"),this.log(3,"destroyed "+h.NAMESPACE+" (reset: "+(t?"true":"false")+")"),null},h.prototype.update=function(t){var e,n;return this.controller&&(t?this.controller.enabled&&this._enabled?(e=this.controller.info().scrollPos,void 0,n=0=this._scrollOffset.start?1:0,this.trigger("update",{startPos:this._scrollOffset.start,endPos:this._scrollOffset.end,scrollPos:e}),this.progress=n):this.pin&&this.state===r.During&&this.updatePinState(!0):this.controller.updateScene(this,!1)),this},h.prototype.refresh=function(){return this.updateDuration(),this.updateTriggerElementPosition(),this},h.prototype.setPin=function(t,e){var n,r,i,o,s,a;if(e=void 0===e||e,!(t=l.default.getElements(t)[0]))return this.log(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),this;if("fixed"===l.default.css(t,"position"))return this.log(1,"ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."),this;if(this.pin){if(this.pin===t)return this;this.removePin()}this.pin=t;var u=null===(n=this.pin.parentNode)||void 0===n?void 0:n.style.display;this.pin.parentElement&&(this.pin.parentElement.style.display="none");var c="absolute"!=l.default.css(this.pin,"position"),f=l.default.css(this.pin,["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"].concat(["display"])),d=l.default.css(this.pin,["width","height"]);this.pin.parentElement&&(this.pin.parentElement.style.display=u),!c&&e&&(this.log(2,"WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."),e=!1);var p=null===(r=this.pin.parentNode)||void 0===r?void 0:r.insertBefore(document.createElement("div"),this.pin),g=l.default.extend(f,{position:c?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});return c||l.default.extend(g,l.default.css(this.pin,["width","height"])),l.default.css(p,g),null!=p&&p.setAttribute(h.PIN_SPACER_ATTRIBUTE,""),l.default.addClass(p,["scrollmagic-pin-spacer"]),p&&(this.pinOptions={spacer:p,inFlow:c,pushFollowers:e,relSize:{width:"%"===d.width.slice(-1),height:"%"===d.height.slice(-1),autoFullWidth:"auto"===d.width&&c&&l.default.isMarginCollapseType(f.display)}}),null!==(i=this.pinOptions)&&void 0!==i&&i.relSize.width&&l.default.css(p,{width:d.width}),null!==(o=this.pinOptions)&&void 0!==o&&o.relSize.height&&l.default.css(p,{height:d.height}),null!=p&&p.appendChild(this.pin),l.default.css(this.pin,{position:c?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(null!==(s=this.pinOptions)&&void 0!==s&&s.relSize.width||null!==(a=this.pinOptions)&&void 0!==a&&a.relSize.autoFullWidth)&&l.default.css(this.pin,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",this.updatePinInContainer.bind(this)),window.addEventListener("resize",this.updatePinInContainer.bind(this)),window.addEventListener("resize",this.updateRelativePinSpacer.bind(this)),this.pin.addEventListener("mousewheel",this.onMousewheelOverPin.bind(this)),this.pin.addEventListener("DOMMouseScroll",this.onMousewheelOverPin.bind(this)),this.log(3,"Added pin"),this.updatePinState(),this},h.prototype.removePin=function(t){var e,n,i,o,s,a,u,c,f;return this.pin&&(this.state===r.During&&this.updatePinState(!0),!t&&this.controller||(null==(u=null===(e=this.pinOptions)||void 0===e?void 0:e.spacer.firstChild)||!u.hasAttribute(h.PIN_SPACER_ATTRIBUTE)||(c=null===(n=this.pinOptions)||void 0===n?void 0:n.spacer.style)&&(f={},["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach((function(t){f[t]=c[t]||""})),l.default.css(u,f)),u&&null!==(o=null===(i=this.pinOptions)||void 0===i?void 0:i.spacer.parentNode)&&void 0!==o&&o.insertBefore(u,this.pinOptions.spacer),null!==(a=null===(s=this.pinOptions)||void 0===s?void 0:s.spacer.parentNode)&&void 0!==a&&a.removeChild(this.pinOptions.spacer)),window.removeEventListener("scroll",this.updatePinInContainer.bind(this)),window.removeEventListener("resize",this.updatePinInContainer.bind(this)),window.removeEventListener("resize",this.updateRelativePinSpacer.bind(this)),this.pin.removeEventListener("mousewheel",this.onMousewheelOverPin.bind(this)),this.pin.removeEventListener("DOMMouseScroll",this.onMousewheelOverPin.bind(this)),this.pin=void 0,this.log(3,"removed pin (reset: "+(t?"true":"false")+")")),this},h.prototype.setTween=function(t,e){return this.easing=!!e,t.pause(),this.tween&&this.removeTween(),this.tween=t,this.log(3,"Added tween"),this.updateTweenProgress(),this},h.prototype.removeTween=function(t){return this.tween&&(t&&this.tween.progress(0).pause(),this.tween.kill(),this.tween=void 0,this.log(3,"Removed tween (reset: "+(t?"true":"false")+")")),this},h.prototype.addIndicators=function(t){return this.indicator||(this.autoIndex++,this.indicator=new f.default(this,t,this.autoIndex),this.on("add.plugin_addIndicators",this.indicator.add.bind(this.indicator)),this.on("remove.plugin_addIndicators",this.indicator.remove.bind(this.indicator)),this.on("destroy.plugin_addIndicators",this.removeIndicators.bind(this)),this.controller&&this.indicator.add()),this},h.prototype.removeIndicators=function(){return this.indicator&&(this.indicator.remove(),this.off("*.plugin_addIndicators"),this.indicator=void 0),this},h.prototype.updateDuration=function(t){var e,n;this.durationUpdateMethod&&(n=(e=this.validateDuration(this.durationUpdateMethod()))!==this._duration,this._duration=e,n&&!t&&(this.trigger("change",{what:"duration",newValue:this._duration}),this.trigger("shift",{reason:"duration"})))},h.prototype.updateTriggerElementPosition=function(t){var e=0,n=this._triggerElement;if(this.controller&&(n||0":"",e||""),s.length&&s.forEach((function(t){o&&o!==t.namespace||t.callback.call(n,new a.default(i,t.namespace,n,e))})),this},h.prototype.setClassToggle=function(t,e){var n=this,r=l.default.getElements(t);return 0!==r.length&&c.default.isString(e)?(0=n&&(Array.prototype.splice.call(t,1,0,"("+h.NAMESPACE+")"),s.default.log.apply(window,t))},h.prototype.validateDuration=function(t){var e,n,r=this;if(!c.default.isString(t)||(e=t).match(/^(\.|\d)*\d+%$/)&&(n=parseFloat(e)/100,t=function(){return r._controller?r._controller.info().size*n:0}),c.default.isFunction(t)){this.durationUpdateMethod=t;try{t=this.durationUpdateMethod()}catch(e){t=-1}}if(c.default.isString(t)&&(t=parseFloat(t)),!c.default.isNumber(t)||t<0)throw this.durationUpdateMethod?(this.durationUpdateMethod=void 0,['Invalid return value of supplied function for option "duration": ',t]):['Invalid value for option "duration":',t];return t},h.prototype.validateOffset=function(t){return c.default.isString(t)&&(t=parseFloat(t)),t},h.prototype.validateTriggerElement=function(t){var e=l.default.getElements(t)[0];if(e&&e.parentNode)return e;throw['Element defined in option "triggerElement" was not found: ',t]},h.prototype.validateTriggerHook=function(t){var e={onCenter:.5,onEnter:1,onLeave:0};if(c.default.isNumber(t))return Math.max(0,Math.min(t,1));if(c.default.isString(t)&&t in e)return e[t];throw['Invalid value for option "triggerHook": ',t]},h.prototype.validateReverse=function(t){return!!t},h.prototype.validateTweenChanges=function(t){return!!t},h.prototype.valdiateLogLevel=function(t){if(t<0||3=n&&(Array.prototype.splice.call(t,1,0,"("+c.default.NAMESPACE+")"),a.default.log.apply(window,t))},h.prototype.sortScenes=function(t){if(t.length<=1)return t;var e=t.slice(0);return e.sort((function(t,e){return t.scrollOffset>e.scrollOffset?1:-1})),e},h.prototype.setOptions=function(t){var e={container:window,isVertical:!0,globalSceneOptions:{},logLevel:2,refreshInterval:100,addIndicators:!1,smoothScrolling:!1};t&&(void 0!==t.container&&(e.container=t.container),void 0!==t.isVertical&&(e.isVertical=t.isVertical),void 0!==t.globalSceneOptions&&(e.globalSceneOptions=t.globalSceneOptions),void 0!==t.logLevel&&(e.logLevel=t.logLevel),void 0!==t.refreshInterval&&(e.refreshInterval=t.refreshInterval),void 0!==t.addIndicators&&(e.addIndicators=t.addIndicators),void 0!==t.smoothScrolling&&(e.smoothScrolling=t.smoothScrolling));var n=s.default.getContainer(e.container);this.isDocument=n instanceof Window||n===document.body||!document.body.contains(n),this.isDocument?this.container=window:(Window,this.container=n),this.isVertical=e.isVertical,this.globalSceneOptions=e.globalSceneOptions,this.logLevel=e.logLevel,this.refreshInterval=e.refreshInterval,this.addIndicators=e.addIndicators,this.smoothScrolling=e.smoothScrolling},h.prototype.handleBoundsPositionChange=function(){this.indicators.updateBoundsPositions()},h.prototype.handleTriggerPositionChange=function(){this.indicators.updateTriggerGroupPositions()},h.prototype.addScene=function(t){var e=this;if(l.default.isArray(t))t.forEach((function(t){e.addScene(t)}));else{var n=t;if(n.controller!==this)n.addTo(this);else if(this.sceneObjects.indexOf(n)<0){for(var r in this.sceneObjects.push(n),this.sceneObjects=this.sortScenes(this.sceneObjects),n.on("shift.controller_sort",(function(){e.sceneObjects=e.sortScenes(e.sceneObjects)})),this.globalSceneOptions)n.setValue(r,this.globalSceneOptions[r]);this.log(3,"Adding Scene (now "+this.sceneObjects.length+" total)")}this.addIndicators&&n.addIndicators()}return this},h.prototype.removeScene=function(t){var e,n,r=this;return l.default.isArray(t)?t.forEach((function(t){r.removeScene(t)})):(e=t,-1<(n=this.sceneObjects.indexOf(e))&&(e.off("shift.controller_sort"),this.sceneObjects.splice(n,1),this.log(3,"Removing Scene (now "+this.sceneObjects.length+" left)"),e.remove())),this},h.prototype.updateScene=function(t,e){var n,r=this;return l.default.isArray(t)?t.forEach((function(t){r.updateScene(t,e)})):(n=t,e?n.update(!0):!0!==this.updateScenesOnNextCycle&&(this.updateScenesOnNextCycle=this.updateScenesOnNextCycle||[],-1==this.updateScenesOnNextCycle.indexOf(n)&&this.updateScenesOnNextCycle.push(n),this.updateScenesOnNextCycle=this.sortScenes(this.updateScenesOnNextCycle),this.debounceUpdate())),this},h.prototype.update=function(t){return this.onChange(new f.default("resize")),t&&this.updateScenes(),this},h.prototype.scrollTo=function(t,e){if(l.default.isNumber(t))this.setScrollPos.call(this.container,t,e);else if(t instanceof c.default){var n=t;n.controller===this?this.scrollTo(n.scrollOffset,e):this.log(2,"scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.",n)}else if(l.default.isFunction(t))this.setScrollPos=t;else{var r=s.default.getElements(t)[0];if(r){for(var i=r.parentNode;i.hasAttribute(c.default.PIN_SPACER_ATTRIBUTE);)r=i=r.parentNode;var o=this.isVertical?"top":"left",a=s.default.getOffset(this.container),u=s.default.getOffset(r);this.isDocument||(a[o]-=this.scrollPos()),this.scrollTo(u[o]-a[o],e)}else this.log(2,"scrollTo(): The supplied argument is invalid. Scroll cancelled.",t)}return this},h.prototype.scrollPos=function(){for(var t=[],e=0;edocument.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u[l][s[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(r[l]=i(t),n=new r,r[l]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";function r(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n}var i=n(8).f,o=n(58),s=n(44),a=n(11),l=n(45),u=n(18),c=n(38),f=n(60),d=n(93),h=n(5),p=n(27).fastKey,g=n(14),v=h?"_s":"size";t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,r){l(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&u(r,n,t[c],t)}));return s(f.prototype,{clear:function(){for(var t=g(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n,i,o=g(this,e),s=r(o,t);return s&&(n=s.n,i=s.p,delete o._i[s.i],s.r=!0,i&&(i.n=n),n&&(n.p=i),o._f==s&&(o._f=n),o._l==s&&(o._l=i),o[v]--),!!s},forEach:function(t,n){g(this,e);for(var r,i=a(t,1l;)r(a,n=e[l++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(24),i=n(25),o=n(87);t.exports=function(t){return function(e,n,s){var a,l=r(e),u=i(l.length),c=o(s,u);if(t&&n!=n){for(;c=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(1)("unscopables"),i=Array.prototype;null==i[r]&&n(13)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){"use strict";var r=n(61),i=n(14);t.exports=n(46)("Map",(function(t){return function(e){return t(this,0i[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||0=t&&(Array.prototype.splice.call(e,1,0,"(INDICATOR) ->"),o.default.log.apply(window,e))},c.prototype.createOptions=function(t,e){var r={name:"No Name",colorStart:s,colorEnd:a,colorTrigger:l,parent:void 0,indent:0};return void 0!==(null==t?void 0:t.name)?r.name=null==t?void 0:t.name:void 0!==e&&(r.name=""+e),void 0!==(null==t?void 0:t.colorStart)&&(r.colorStart=t.colorStart),void 0!==(null==t?void 0:t.colorEnd)&&(r.colorEnd=t.colorEnd),void 0!==(null==t?void 0:t.colorTrigger)&&(r.colorTrigger=t.colorTrigger),void 0!==(null==t?void 0:t.parent)&&(r.parent=t.parent),void 0!==(null==t?void 0:t.indent)&&(r.indent=t.indent),r},c.FONT_SIZE="14px",c.LINE_HEIGHT="16px",c.ZINDEX="9999",c.EDGE_OFFSET=0,c);function c(t,e,r){this.scene=t,this.options=this.createOptions(e,r),this.elemBounds=n.default.bounds(),this.elemStart=n.default.start(this.options.colorStart||s),this.elemEnd=n.default.end(this.options.colorEnd||a),this.elemStart.firstChild&&this.elemStart.firstChild.firstChild&&(this.elemStart.firstChild.firstChild.textContent+=" "+this.options.name),this.elemEnd.firstChild&&this.elemEnd.firstChild.firstChild&&(this.elemEnd.firstChild.firstChild.textContent+=" "+this.options.name),this.elemBounds.appendChild(this.elemStart),this.elemBounds.appendChild(this.elemEnd),this.bounds=this.elemBounds}e.default=u},function(t,e,r){"use strict";function n(t){return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase()}Object.defineProperty(e,"__esModule",{value:!0}),e.default={isString:function(t){return"string"===n(t)},isFunction:function(t){return"function"===n(t)},isArray:function(t){return Array.isArray(t)},isNumber:function(t){return!this.isArray(t)&&0<=t-parseFloat(t)+1},isDomElement:function(t){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?t instanceof HTMLElement||"undefined"!=typeof SVGElement&&t instanceof SVGElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},isNodeList:function(t){return"nodelist"===n(t)}}},function(t,e,r){"use strict";var n=r(32),i={};i[r(1)("toStringTag")]="z",i+""!="[object z]"&&r(7)(Object.prototype,"toString",(function(){return"[object "+n(this)+"]"}),!0)},function(t,e,r){var n=r(33),i=r(1)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(4),i=r(3),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(53)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){"use strict";var n=r(82)(!0);r(38)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0=this._progress;0===this._duration?(i=this._progress!=t,this._progress=t<1&&l?0:1,this.state=0===this._progress?n.Before:n.During):t<0&&this.state!==n.Before&&l?(this._progress=0,this.state=n.Before,i=!0):0<=t&&t<1&&l?(this._progress=t,this.state=n.During,i=!0):1<=t&&this.state!==n.After?(this._progress=1,this.state=n.After,i=!0):this.state!==n.During||l||this.updatePinState(),i&&(e={progress:this._progress,state:this.state,scrollDirection:a},(r=this.state!=s)&&s!==n.During&&(this.trigger("enter",e),this.trigger(s===n.Before?"start":"end",e)),this.trigger("progress",e),r&&this.state!==n.During&&(this.trigger(this.state===n.Before?"start":"end",e),this.trigger("leave",e)))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"scrollOffset",{get:function(){return this._scrollOffset.start},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"triggerPosition",{get:function(){var t=this.offset;return this.controller&&(this.triggerElement?t+=this._triggerPosition:t+=this.controller.info().size*this.triggerHook),t},enumerable:!1,configurable:!0}),h.prototype.on=function(t,e){var r=this;return t.trim().split(" ").forEach((function(t){var n=t.split("."),i=n[0],o=n[1];r.listeners&&"*"!==i&&(r.listeners[i]||(r.listeners[i]=[]),r.listeners[i].push({namespace:o||"",callback:e}))})),this},h.prototype.off=function(t,e){var r=this;return t.trim().split(" ").forEach((function(t){var n=t.split("."),i=n[0],o=n[1]||"";("*"===i?r.listeners?Object.keys(r.listeners):[]:[i]).forEach((function(t){for(var n=(r.listeners?r.listeners[t]:[])||[],i=n.length;i--;){var s=n[i];!s||o!==s.namespace&&"*"!==o||e&&e!=s.callback||n.splice(i,1)}!n.length&&r.listeners&&delete r.listeners[t]}))})),this},h.prototype.addTo=function(t){return this._controller!=t&&(this._controller&&this._controller.removeScene(this),this._controller=t,this.updateDuration(!0),this.updateTriggerElementPosition(!0),this.updateScrollOffset(),this._controller.info().container.addEventListener("resize",this.onContainerResize.bind(this)),this._controller.addScene(this),this.trigger("add",{controller:this._controller}),this.log(3,"Added "+h.NAMESPACE+" to controller"),this.update()),this},h.prototype.remove=function(){return this.controller&&(this.controller.info().container.removeEventListener("resize",this.onContainerResize.bind(this)),this.controller.removeScene(this),this.trigger("remove"),this.log(3,"Removed "+h.NAMESPACE+" from controller")),this},h.prototype.destroy=function(t){return this.trigger("destroy",{reset:t}),this.remove(),this.off("*.*"),this.log(3,"destroyed "+h.NAMESPACE+" (reset: "+(t?"true":"false")+")"),null},h.prototype.update=function(t){var e,r;return this.controller&&(t?this.controller.enabled&&this._enabled?(e=this.controller.info().scrollPos,void 0,r=0=this._scrollOffset.start?1:0,this.trigger("update",{startPos:this._scrollOffset.start,endPos:this._scrollOffset.end,scrollPos:e}),this.progress=r):this.pin&&this.state===n.During&&this.updatePinState(!0):this.controller.updateScene(this,!1)),this},h.prototype.refresh=function(){return this.updateDuration(),this.updateTriggerElementPosition(),this},h.prototype.setPin=function(t,e){var r,n,i,o,s,a;if(e=void 0===e||e,!(t=l.default.getElements(t)[0]))return this.log(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),this;if("fixed"===l.default.css(t,"position"))return this.log(1,"ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."),this;if(this.pin){if(this.pin===t)return this;this.removePin()}this.pin=t;var u=null===(r=this.pin.parentNode)||void 0===r?void 0:r.style.display;this.pin.parentElement&&(this.pin.parentElement.style.display="none");var c="absolute"!=l.default.css(this.pin,"position"),d=l.default.css(this.pin,["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"].concat(["display"])),f=l.default.css(this.pin,["width","height"]);this.pin.parentElement&&(this.pin.parentElement.style.display=u),!c&&e&&(this.log(2,"WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."),e=!1);var p=null===(n=this.pin.parentNode)||void 0===n?void 0:n.insertBefore(document.createElement("div"),this.pin),g=l.default.extend(d,{position:c?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});return c||l.default.extend(g,l.default.css(this.pin,["width","height"])),l.default.css(p,g),null!=p&&p.setAttribute(h.PIN_SPACER_ATTRIBUTE,""),l.default.addClass(p,["scrollmagic-pin-spacer"]),p&&(this.pinOptions={spacer:p,inFlow:c,pushFollowers:e,relSize:{width:"%"===f.width.slice(-1),height:"%"===f.height.slice(-1),autoFullWidth:"auto"===f.width&&c&&l.default.isMarginCollapseType(d.display)}}),null!==(i=this.pinOptions)&&void 0!==i&&i.relSize.width&&l.default.css(p,{width:f.width}),null!==(o=this.pinOptions)&&void 0!==o&&o.relSize.height&&l.default.css(p,{height:f.height}),null!=p&&p.appendChild(this.pin),l.default.css(this.pin,{position:c?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(null!==(s=this.pinOptions)&&void 0!==s&&s.relSize.width||null!==(a=this.pinOptions)&&void 0!==a&&a.relSize.autoFullWidth)&&l.default.css(this.pin,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",this.updatePinInContainer.bind(this)),window.addEventListener("resize",this.updatePinInContainer.bind(this)),window.addEventListener("resize",this.updateRelativePinSpacer.bind(this)),this.pin.addEventListener("mousewheel",this.onMousewheelOverPin.bind(this)),this.pin.addEventListener("DOMMouseScroll",this.onMousewheelOverPin.bind(this)),this.log(3,"Added pin"),this.updatePinState(),this},h.prototype.removePin=function(t){var e,r,i,o,s,a,u,c,d;return this.pin&&(this.state===n.During&&this.updatePinState(!0),!t&&this.controller||(null==(u=null===(e=this.pinOptions)||void 0===e?void 0:e.spacer.firstChild)||!u.hasAttribute(h.PIN_SPACER_ATTRIBUTE)||(c=null===(r=this.pinOptions)||void 0===r?void 0:r.spacer.style)&&(d={},["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach((function(t){d[t]=c[t]||""})),l.default.css(u,d)),u&&null!==(o=null===(i=this.pinOptions)||void 0===i?void 0:i.spacer.parentNode)&&void 0!==o&&o.insertBefore(u,this.pinOptions.spacer),null!==(a=null===(s=this.pinOptions)||void 0===s?void 0:s.spacer.parentNode)&&void 0!==a&&a.removeChild(this.pinOptions.spacer)),window.removeEventListener("scroll",this.updatePinInContainer.bind(this)),window.removeEventListener("resize",this.updatePinInContainer.bind(this)),window.removeEventListener("resize",this.updateRelativePinSpacer.bind(this)),this.pin.removeEventListener("mousewheel",this.onMousewheelOverPin.bind(this)),this.pin.removeEventListener("DOMMouseScroll",this.onMousewheelOverPin.bind(this)),this.pin=void 0,this.log(3,"removed pin (reset: "+(t?"true":"false")+")")),this},h.prototype.setTween=function(t,e){return this.easing=!!e,t.pause(),this.tween&&this.removeTween(),this.tween=t,this.log(3,"Added tween"),this.updateTweenProgress(),this},h.prototype.removeTween=function(t){return this.tween&&(t&&this.tween.progress(0).pause(),this.tween.kill(),this.tween=void 0,this.log(3,"Removed tween (reset: "+(t?"true":"false")+")")),this},h.prototype.addIndicators=function(t){return this.indicator||(this.autoIndex++,this.indicator=new d.default(this,t,this.autoIndex),this.on("add.plugin_addIndicators",this.indicator.add.bind(this.indicator)),this.on("remove.plugin_addIndicators",this.indicator.remove.bind(this.indicator)),this.on("destroy.plugin_addIndicators",this.removeIndicators.bind(this)),this.controller&&this.indicator.add()),this},h.prototype.removeIndicators=function(){return this.indicator&&(this.indicator.remove(),this.off("*.plugin_addIndicators"),this.indicator=void 0),this},h.prototype.updateDuration=function(t){var e,r;this.durationUpdateMethod&&(r=(e=this.validateDuration(this.durationUpdateMethod()))!==this._duration,this._duration=e,r&&!t&&(this.trigger("change",{what:"duration",newValue:this._duration}),this.trigger("shift",{reason:"duration"})))},h.prototype.updateTriggerElementPosition=function(t){var e=0,r=this._triggerElement;if(this.controller&&(r||0":"",e||""),s.length&&s.forEach((function(t){o&&o!==t.namespace||t.callback.call(r,new a.default(i,t.namespace,r,e))})),this},h.prototype.setClassToggle=function(t,e){var r=this,n=l.default.getElements(t);return 0!==n.length&&c.default.isString(e)?(0=r&&(Array.prototype.splice.call(t,1,0,"("+h.NAMESPACE+")"),s.default.log.apply(window,t))},h.prototype.validateDuration=function(t){var e,r,n=this;if(!c.default.isString(t)||(e=t).match(/^(\.|\d)*\d+%$/)&&(r=parseFloat(e)/100,t=function(){return n._controller?n._controller.info().size*r:0}),c.default.isFunction(t)){this.durationUpdateMethod=t;try{t=this.durationUpdateMethod()}catch(e){t=-1}}if(c.default.isString(t)&&(t=parseFloat(t)),!c.default.isNumber(t)||t<0)throw this.durationUpdateMethod?(this.durationUpdateMethod=void 0,['Invalid return value of supplied function for option "duration": ',t]):['Invalid value for option "duration":',t];return t},h.prototype.validateOffset=function(t){return c.default.isString(t)&&(t=parseFloat(t)),t},h.prototype.validateTriggerElement=function(t){var e=l.default.getElements(t)[0];if(e&&e.parentNode)return e;throw['Element defined in option "triggerElement" was not found: ',t]},h.prototype.validateTriggerHook=function(t){var e={onCenter:.5,onEnter:1,onLeave:0};if(c.default.isNumber(t))return Math.max(0,Math.min(t,1));if(c.default.isString(t)&&t in e)return e[t];throw['Invalid value for option "triggerHook": ',t]},h.prototype.validateReverse=function(t){return!!t},h.prototype.validateTweenChanges=function(t){return!!t},h.prototype.valdiateLogLevel=function(t){if(t<0||3=r&&(Array.prototype.splice.call(t,1,0,"("+c.default.NAMESPACE+")"),a.default.log.apply(window,t))},h.prototype.sortScenes=function(t){if(t.length<=1)return t;var e=t.slice(0);return e.sort((function(t,e){return t.scrollOffset>e.scrollOffset?1:-1})),e},h.prototype.setOptions=function(t){var e={container:window,isVertical:!0,globalSceneOptions:{},logLevel:2,refreshInterval:100,addIndicators:!1,smoothScrolling:!1};t&&(void 0!==t.container&&(e.container=t.container),void 0!==t.isVertical&&(e.isVertical=t.isVertical),void 0!==t.globalSceneOptions&&(e.globalSceneOptions=t.globalSceneOptions),void 0!==t.logLevel&&(e.logLevel=t.logLevel),void 0!==t.refreshInterval&&(e.refreshInterval=t.refreshInterval),void 0!==t.addIndicators&&(e.addIndicators=t.addIndicators),void 0!==t.smoothScrolling&&(e.smoothScrolling=t.smoothScrolling));var r=s.default.getContainer(e.container);this.isDocument=r instanceof Window||r===document.body||!document.body.contains(r),this.isDocument?this.container=window:(Window,this.container=r),this.isVertical=e.isVertical,this.globalSceneOptions=e.globalSceneOptions,this.logLevel=e.logLevel,this.refreshInterval=e.refreshInterval,this.addIndicators=e.addIndicators,this.smoothScrolling=e.smoothScrolling},h.prototype.handleBoundsPositionChange=function(){this.indicators.updateBoundsPositions()},h.prototype.handleTriggerPositionChange=function(){this.indicators.updateTriggerGroupPositions()},h.prototype.addScene=function(t){var e=this;if(l.default.isArray(t))t.forEach((function(t){e.addScene(t)}));else{var r=t;if(r.controller!==this)r.addTo(this);else if(this.sceneObjects.indexOf(r)<0){for(var n in this.sceneObjects.push(r),this.sceneObjects=this.sortScenes(this.sceneObjects),r.on("shift.controller_sort",(function(){e.sceneObjects=e.sortScenes(e.sceneObjects)})),this.globalSceneOptions)r.setValue(n,this.globalSceneOptions[n]);this.log(3,"Adding Scene (now "+this.sceneObjects.length+" total)")}this.addIndicators&&r.addIndicators()}return this},h.prototype.removeScene=function(t){var e,r,n=this;return l.default.isArray(t)?t.forEach((function(t){n.removeScene(t)})):(e=t,-1<(r=this.sceneObjects.indexOf(e))&&(e.off("shift.controller_sort"),this.sceneObjects.splice(r,1),this.log(3,"Removing Scene (now "+this.sceneObjects.length+" left)"),e.remove())),this},h.prototype.updateScene=function(t,e){var r,n=this;return l.default.isArray(t)?t.forEach((function(t){n.updateScene(t,e)})):(r=t,e?r.update(!0):!0!==this.updateScenesOnNextCycle&&(this.updateScenesOnNextCycle=this.updateScenesOnNextCycle||[],-1==this.updateScenesOnNextCycle.indexOf(r)&&this.updateScenesOnNextCycle.push(r),this.updateScenesOnNextCycle=this.sortScenes(this.updateScenesOnNextCycle),this.debounceUpdate())),this},h.prototype.update=function(t){return this.onChange(new d.default("resize")),t&&this.updateScenes(),this},h.prototype.scrollTo=function(t,e){if(l.default.isNumber(t))this.setScrollPos.call(this.container,t,e);else if(t instanceof c.default){var r=t;r.controller===this?this.scrollTo(r.scrollOffset,e):this.log(2,"scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.",r)}else if(l.default.isFunction(t))this.setScrollPos=t;else{var n=s.default.getElements(t)[0];if(n){for(var i=n.parentNode;i.hasAttribute(c.default.PIN_SPACER_ATTRIBUTE);)n=i=n.parentNode;var o=this.isVertical?"top":"left",a=s.default.getOffset(this.container),u=s.default.getOffset(n);this.isDocument||(a[o]-=this.scrollPos()),this.scrollTo(u[o]-a[o],e)}else this.log(2,"scrollTo(): The supplied argument is invalid. Scroll cancelled.",t)}return this},h.prototype.scrollPos=function(){for(var t=[],e=0;edocument.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u[l][s[n]];return u()};t.exports=Object.create||function(t,e){var r;return null!==t?(n[l]=i(t),r=new n,n[l]=null,r[a]=t):r=u(),void 0===e?r:o(r,e)}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){"use strict";function n(t,e){var r,n=p(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r}var i=r(8).f,o=r(58),s=r(44),a=r(11),l=r(45),u=r(18),c=r(38),d=r(60),f=r(93),h=r(5),p=r(27).fastKey,g=r(14),v=h?"_s":"size";t.exports={getConstructor:function(t,e,r,c){var d=t((function(t,n){l(t,d,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,null!=n&&u(n,r,t[c],t)}));return s(d.prototype,{clear:function(){for(var t=g(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var r,i,o=g(this,e),s=n(o,t);return s&&(r=s.n,i=s.p,delete o._i[s.i],s.r=!0,i&&(i.n=r),r&&(r.p=i),o._f==s&&(o._f=r),o._l==s&&(o._l=i),o[v]--),!!s},forEach:function(t,r){g(this,e);for(var n,i=a(t,1l;)n(a,r=e[l++])&&(~o(u,r)||u.push(r));return u}},function(t,e,r){var n=r(24),i=r(25),o=r(87);t.exports=function(t){return function(e,r,s){var a,l=n(e),u=i(l.length),c=o(s,u);if(t&&r!=r){for(;c=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])}),"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var n=r(1)("unscopables"),i=Array.prototype;null==i[n]&&r(13)(i,n,{}),t.exports=function(t){i[n][t]=!0}},function(t,e,r){"use strict";var n=r(61),i=r(14);t.exports=r(46)("Map",(function(t){return function(e){return t(this,0