1/*! @yama-dev/js-scroll-effect-module Version 0.11.2 Repository https://github.com/yama-dev/js-scroll-effect-module Copyright yama-dev Licensed MIT */ 2!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SCROLL_EFFECT_MODULE=e():t.SCROLL_EFFECT_MODULE=e()}(self,(function(){return function(){"use strict";var t={d:function(e,i){for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e={};function i(t){try{return t instanceof HTMLElement}catch(t){return!1}}function n(t,e){if(e){var s,o=n(t),a=[];return!!o&&(o.map((function(t){if(!(s=i(e)?Array.prototype.slice.call(t.querySelectorAll(e.tagName.toLowerCase())):Array.prototype.slice.call(t.querySelectorAll(e))))return!1;a=a.concat(s)})),a)}if(!t)return!1;var c;if(!Array.isArray(t)&&!t.length||function(t){try{return"string"==typeof t}catch(t){return!1}}(t))c=i(t)?Array(t):Array.prototype.slice.call(document.querySelectorAll(t));else{if(!i(t[0]))return!1;c=Array.prototype.slice.call(t)}return 0===c.length&&(c=null),c}function s(t,e){return i(t)?t.classList.contains(e):document.querySelector(t).classList.contains(e)}function o(t,e){var i=n(t);if(!i)return!1;i.map((function(t){t.classList.add(e)}))}function a(t,e){var i=n(t);if(!i)return!1;i.map((function(t){t.classList.remove(e)}))}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function r(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){l(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.d(e,{default:function(){return h}});var h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,t),this.Version="0.11.2",this.state={NumScrolltopPre:window.pageYOffset,NumScrolltop:window.pageYOffset,PosList:[],PosListFixPre:[],PosListFix:[],PosListNoneFix:[],flg:{intersectChanged:!1}};var i={elem:null,firstElem:null,displayRatio:.8,displayReverse:!1,displayRatioReverse:null,firstDelay:10,firstDelaySteps:100,throttleInterval:5,addClassNameActive:"is-active",autoStart:!0,intersect:!1,addClassNameIntersect:"is-intersect",addClassNameIntersectOver:"is-intersect-over",on:{Scroll:null,Change:null,In:null,Out:null,Intersect:null}};this.config=r(r({},i),e),this.config.displayRatioReverse?this.config.displayRatioReverse<this.config.displayRatio&&(this.config.displayRatioReverse=this.config.displayRatio):this.config.displayRatioReverse=this.config.displayRatio,this.config.autoStart&&this.Init()}var e,i,c;return e=t,(i=[{key:"Init",value:function(){var t=this;"complete"==document.readyState||"interactive"==document.readyState?(this.CacheDom(),this.BindEvent()):document.addEventListener("DOMContentLoaded",(function(){t.CacheDom(),t.BindEvent()}))}},{key:"BindEvent",value:function(){var t,e,i,n=this,s=this;setTimeout((function(){n.Update(),n._storeElementStateAtPosList("load")}),this.config.firstDelay),window.addEventListener("resize",(function(){n.Update()})),window.addEventListener("scroll",(t=function(){s._storeElementStateAtPosList("scroll")},e=this.config.throttleInterval,i=Date.now(),function(){i+e-Date.now()<0&&(t(),i=Date.now())}),{passive:!0})}},{key:"CacheDom",value:function(){this.$elemItem=n(this.config.elem),this.$elemItemFirst=n(this.config.firstElem)}},{key:"CacheDomSize",value:function(){this.NumWindowHeight=window.innerHeight}},{key:"SetDom",value:function(){var t=this;this.state.PosList=[],this.state.NumScrolltop=window.pageYOffset;var e=n(this.$elemItem);e&&e.map((function(e,i){var n=0;e.dataset&&void 0!==e.dataset.semOffset&&(n=Number(e.dataset.semOffset));var s={el:e,index:i,pos:e.getBoundingClientRect().top+t.state.NumScrolltop-n,height:e.clientHeight,height2:e.offsetHeight,count:0,active:!1,intersect:!1,intersectover:!1,dataset:e.dataset};t.state.PosList.push(s)}))}},{key:"Start",value:function(){if(this.config.autoStart)return!1;this.Init()}},{key:"Update",value:function(){this.CacheDom(),this.CacheDomSize(),this.SetDom()}},{key:"Refresh",value:function(){this.Update(),this.Clear(),this._actionChange()}},{key:"Clear",value:function(){var t=this;this.state.PosList.map((function(e,i){e.active=!1,a(t.$elemItem[i],t.config.addClassNameActive)}))}},{key:"_storeElementStateAtPosList",value:function(t){var e=this;this.state.PosListFix=[],this.state.PosListNoneFix=[],this.state.NumScrolltop=window.pageYOffset,this.state.PosList.map((function(i){e.config.displayRatio===e.config.displayRatioReverse&&(e.state.NumScrolltop+e.NumWindowHeight*e.config.displayRatio>i.pos?("load"===t&&i.count++,i.active=!0,e.state.PosListFix.push(i)):(i.active=!1,e.state.PosListNoneFix.push(i))),e.config.displayRatio!==e.config.displayRatioReverse&&(e.state.NumScrolltop+e.NumWindowHeight*e.config.displayRatio>i.pos?("load"===t&&i.count++,i.active=!0,e.state.PosListFix.push(i)):e.state.NumScrolltop+e.NumWindowHeight*e.config.displayRatioReverse>i.pos?i.active?e.state.PosListFix.push(i):e.state.PosListNoneFix.push(i):(i.active=!1,e.state.PosListNoneFix.push(i))),e.config.intersect&&(e.state.NumScrolltop>i.pos?e.state.NumScrolltop+e.NumWindowHeight>i.pos+i.height?i.intersect&&(e.state.flg.intersectChanged=!0,i.intersect=!1,i.intersectover=!0):i.intersect||(e.state.flg.intersectChanged=!0,i.intersect=!0,i.intersectover=!1):i.intersect&&(e.state.flg.intersectChanged=!0,i.intersect=!1,i.intersectover=!1))})),"load"===t?this.ActionChangeFirst():"scroll"===t&&this.state.PosListFixPre.length!==this.state.PosListFix.length&&this._actionChange(),this.config.intersect&&this.state.flg.intersectChanged&&(this.state.flg.intersectChanged=!1,this._actionChangeIntersect()),this.config.on.Scroll&&"function"==typeof this.config.on.Scroll&&this.config.on.Scroll(this.state.NumScrolltop),this.state.NumScrolltopPre=this.state.NumScrolltop,this.state.PosListFixPre=this.state.PosListFix}},{key:"ActionChangeFirst",value:function(){var t=this,e=0;this.$elemItemFirst?function i(){setTimeout((function(){t.config.addClassNameActive&&o(t.$elemItemFirst[e],t.config.addClassNameActive),++e<t.$elemItemFirst.length&&i(),t.$elemItemFirst.length==e&&t._actionChange()}),t.config.firstDelaySteps)}():setTimeout((function(){t._actionChange()}),this.config.firstDelaySteps)}},{key:"_actionChange",value:function(){var t=this;if(!this.state.PosList.length)return!1;if(this.state.PosListFix.map((function(e){s(t.$elemItem[e.index],t.config.addClassNameActive)||(e.count++,t.config.addClassNameActive&&o(t.$elemItem[e.index],t.config.addClassNameActive),t.config.on.In&&"function"==typeof t.config.on.In&&t.config.on.In(t.$elemItem[e.index],e.index,e,t.state.NumScrolltop))})),this.config.displayReverse&&this.state.PosListNoneFix.map((function(e){s(t.$elemItem[e.index],t.config.addClassNameActive)&&(a(t.$elemItem[e.index],t.config.addClassNameActive),t.config.on.Out&&"function"==typeof t.config.on.Out&&t.config.on.Out(t.$elemItem[e.index],e.index,e,t.state.NumScrolltop))})),this.config.on.Change&&"function"==typeof this.config.on.Change){var e=this.state.PosListFix;this.config.on.Change(this.$elemItem[e.length-1],e.length,e[e.length-1],this.state.NumScrolltop)}}},{key:"_actionChangeIntersect",value:function(){var t=this;this.state.PosList.map((function(e){var i={el:e.el,intersect:e.intersect,index:e.index,pos:e.pos,height:e.height,height2:e.height2,count:e.count,dataset:e.dataset};e.intersect?s(e.el,t.config.addClassNameIntersect)||(t.config.addClassNameIntersect&&o(e.el,t.config.addClassNameIntersect),t.config.on.Intersect&&"function"==typeof t.config.on.Intersect&&t.config.on.Intersect(i)):s(e.el,t.config.addClassNameIntersect)&&(t.config.addClassNameIntersect&&a(e.el,t.config.addClassNameIntersect),t.config.on.Intersect&&"function"==typeof t.config.on.Intersect&&t.config.on.Intersect(i)),e.intersectover?s(e.el,t.config.addClassNameIntersectOver)||(t.config.addClassNameIntersectOver&&o(e.el,t.config.addClassNameIntersectOver),t.config.on.Intersect&&"function"==typeof t.config.on.Intersect&&t.config.on.Intersect(i)):s(e.el,t.config.addClassNameIntersectOver)&&(t.config.addClassNameIntersectOver&&a(e.el,t.config.addClassNameIntersectOver),t.config.on.Intersect&&"function"==typeof t.config.on.Intersect&&t.config.on.Intersect(i))}))}}
2])&&u(e.prototype,i),c&&u(e,c),t}();return e=e.default}()}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.