1/*! 2 * @splidejs/splide-extension-auto-scroll 3 * Version : 0.5.2 4 * License : MIT 5 * Copyright: 2022 Naotoshi Fujita 6*/ !function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict";function n(n,t,e){return Array.prototype.slice.call(n,t,e)}function t(t){return t.bind.apply(t,[null].concat(n(arguments,1)))}function e(n){return requestAnimationFrame(n)}function o(n,t){return typeof t===n}var i=Array.isArray;function u(n){return i(n)?n:[n]}function r(n,t){u(n).forEach(t)}t(o,"function"),t(o,"string"),t(o,"undefined");var c=Object.keys,a=Math.min,f="move",s="moved",l="drag",d="scroll",p="scrolled";function v(n,t,o,i){var u,r,c=Date.now,f=0,s=!0,l=0;function d(){if(!s){if(f=n?a((c()-u)/n,1):1,o&&o(f),f>=1&&(t(),u=c(),i&&++l>=i))return p();e(d)}}function p(){s=!0}function v(){r&&cancelAnimationFrame(r),f=0,r=0,s=!0}function $(t){n=t}function _(){return s}return{start:function t(o){o||v(),u=c()-(o?f*n:0),s=!1,e(d)},rewind:function n(){u=c(),f=0,o&&o(f)},pause:p,cancel:v,set:$,isPaused:_}}function $(n,t,e){return Array.prototype.slice.call(n,t,e)}function _(n){return n.bind.apply(n,[null].concat($(arguments,1)))}function y(n,t){return typeof t===n}function b(n){return!E(n)&&y("object",n)}var m=Array.isArray;_(y,"function"),_(y,"string");var g=_(y,"undefined");function E(n){return null===n}function h(n,t){var e;(m(e=n)?e:[e]).forEach(t)}var S=Object.keys;function L(n,t,e){if(n){var o=S(n);o=e?o.reverse():o;for(var i=0;i<o.length;i++){var u=o[i];if("__proto__"!==u&&!1===t(n[u],u))break}}return n}function k(n){return $(arguments,1).forEach(function(t){L(t,function(e,o){n[o]=t[o]})}),n}var x=Math.min,A=Math.max,P={speed:1,autoStart:!0,pauseOnHover:!0,pauseOnFocus:!0},w={startScroll:"Start auto scroll",pauseScroll:"Pause auto scroll"};"undefined"!=typeof window&&(window.splide=window.splide||{},window.splide.Extensions=window.splide.Extensions||{},window.splide.Extensions.AutoScroll=function e(o,a,$){var _,y,m,S,C,O,F,I,j,z,D,H=(y=(_=o)?_.event.bus:document.createDocumentFragment(),m=function n(){var t=[];function e(n,t,e){r(n,function(n){n&&r(t,function(t){t.split(" ").forEach(function(t){var o=t.split(".");e(n,o[0],o[1])})})})}return{bind:function n(o,i,u,r){e(o,i,function(n,e,o){var i="addEventListener"in n,c=i?n.removeEventListener.bind(n,e,u,r):n.removeListener.bind(n,u);i?n.addEventListener(e,u,r):n.addListener(u),t.push([n,e,o,u,c])})},unbind:function n(o,i,u){e(o,i,function(n,e,o){t=t.filter(function(t){return t[0]!==n||t[1]!==e||t[2]!==o||!!u&&t[3]!==u||(t[4](),!1)})})},dispatch:function n(t,e,o){var i;return"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:!0,detail:o}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!1,o),t.dispatchEvent(i),i},destroy:function n(){var e;t.forEach(function(n){n[4]()}),(e=t).length=0}}}(),_&&_.event.on("destroy",m.destroy),function t(e){return n(arguments,1).forEach(function(n){!function n(t,e,o){
6if(t){for(var i=c(t),u=0;u<i.length;u++){var r=i[u];if("__proto__"!==r&&!1===e(t[r],r))break}}return t}(n,function(t,o){e[o]=n[o]})}),e}(m,{bus:y,on:function n(t,e){m.bind(y,u(t).join(" "),function(n){e.apply(e,i(n.detail)?n.detail:[])})},off:t(m.unbind,y),emit:function t(e){m.dispatch(y,e,n(arguments,1))}})),B=H.on,M=H.off,T=H.bind,q=H.unbind,G=a.Move,J=G.translate,K=G.getPosition,N=G.toIndex,Q=G.getLimit,R=a.Controller,U=R.setIndex,V=R.getIndex,W=a.Direction.orient,X=a.Elements.toggle,Y=a.Live,Z=o.root,nn=(a.Arrows.update,function n(){D||(D=v(500,function(){D=null},null,1)).start()}),nt={};function ne(){o.is("fade")||S||!1===$.autoScroll||(S=v(0,na),nt.pauseOnHover&&T(Z,"mouseenter mouseleave",function(n){O="mouseenter"===n.type,nc()}),nt.pauseOnFocus&&T(Z,"focusin focusout",function(n){F="focusin"===n.type,nc()}),nt.useToggleButton&&T(X,"click",function(){C?nu():nr()}),B("updated",ni),B([f,l,d],function(){I=!0,nr(!1)}),B([s,"dragged",p],function(){I=!1,nc()}),nt.autoStart&&("complete"===document.readyState?nu():T(window,"load",nu)))}function no(){S&&(S.cancel(),S=null,j=void 0,M([f,l,d,s,p]),q(Z,"mouseenter mouseleave focusin focusout"),q(X,"click"))}function ni(){var n=$.autoScroll;!1!==n?(nt=k({},nt,b(n)?n:{}),ne()):no(),S&&!g(j)&&J(j)}function nu(){ns()&&(S.start(!0),Y.disable(!0),F=O=C=!1,nf())}function nr(n){void 0===n&&(n=!0),C||(C=n,nf(),ns()||(S.pause(),Y.disable(!1)))}function nc(){C||(O||F||I?nr(!1):nu())}function na(){var n,t,e,i,u,r,c,f,s,l=K(),d=(n=l,n+=W(nt.speed||1),o.is("slide")&&(n=(t=n,e=Q(!1),i=Q(!0),u=x(e,i),r=A(e,i),x(A(u,t),r))),n);l!==d?(J(d),c=j=K(),f=o.length,(s=(N(c)+f)%f)!==V()&&(U(s),a.Slides.update(),a.Pagination.update(),"nearby"===$.lazyLoad&&a.LazyLoad.check())):(nr(!1),nt.rewind&&o.go(nt.speed>0?0:a.Controller.getEnd())),nn()}function nf(){if(X){var n,t,e=C?"startScroll":"pauseScroll";n=X,t=!C,n&&h("is-active",function(e){e&&n.classList[t?"add":"remove"](e)}),function n(t,e,o){b(e)?L(e,function(e,o){n(t,o,e)}):h(t,function(n){var t,i;E(o)||""===o?(t=n,i=e,h(t,function(n){h(i,function(t){n&&n.removeAttribute(t)})})):n.setAttribute(e,String(o))})}(X,"aria-label",$.i18n[e]||w[e])}}function ns(){return!S||S.isPaused()}return{setup:function n(){var t=$.autoScroll;nt=k({},P,b(t)?t:{})},mount:ne,destroy:no,play:nu,pause:nr,isPaused:ns}})});
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.