!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define(e):t.shuffle=e()}(this,function(){"use strict";functiont(t,e){if(b)returnb.call(t,e);for(vari=t.parentNode.querySelectorAll(e),n=0;n<i.length;n++)if(i[n]==t)return!0;return!1}functione(){for(vart={},e=0;e<arguments.length;e++){vari=arguments[e];for(varnini)L.call(i,n)&&(t[n]=i[n])}returnt}functioni(t,e){functioni(){r=0,l=+newDate,o=t.apply(n,s),n=null,s=null}varn,s,o,r,l=0;returnfunction(){n=this,s=arguments;vart=newDate-l;returnr||(t>=e?i():r=setTimeout(i,e-t)),o}}functionn(){}functions(t){returnparseFloat(t)||0}functiono(t,e){vari=arguments.length>2&&void0!==arguments[2]?arguments[2]:window.getComputedStyle(t,null),n=s(i[e]);returnW||"width"!==e?W||"height"!==e||(n+=s(i.paddingTop)+s(i.paddingBottom)+s(i.borderTopWidth)+s(i.borderBottomWidth)):n+=s(i.paddingLeft)+s(i.paddingRight)+s(i.borderLeftWidth)+s(i.borderRightWidth),n}functionr(t){for(vare=t.length;e;){e-=1;vari=Math.floor(Math.random()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}returnt}functionl(t,e){vari=w(R,e),n=[].slice.call(t),s=!1;returnt.length?i.randomize?r(t):("function"==typeofi.by&&t.sort(function(t,e){if(s)return0;varn=i.by(t[i.key]),o=i.by(e[i.key]);returnvoid0===n&&void0===o?(s=!0,0):n<o||"sortFirst"===n||"sortLast"===o?-1:n>o||"sortLast"===n||"sortFirst"===o?1:0}),s?n:(i.reverse&&t.reverse(),t)):[]}functiona(){returnP+=1,q+P}functionu(t){return!!H[t]&&(H[t].element.removeEventListener(q,H[t].listener),H[t]=null,!0)}functionh(t,e){vari=a(),n=function(t){t.currentTarget===t.target&&(u(i),e(t))};returnt.addEventListener(q,n),H[i]={element:t,listener:n},i}functionf(t){returnMath.max.apply(Math,t)}functionc(t){returnMath.min.apply(Math,t)}functiond(t,e,i,n){vars=t/e;returnMath.abs(Math.round(s)-s)<n&&(s=Math.round(s)),Math.min(Math.ceil(s),i)}functionm(t,e,i){if(1===e)returnt;for(varn=[],s=0;s<=i-e;s++)n.push(f(t.slice(s,s+e)));returnn}functionv(t,e){for(vari=c(t),n=0,s=t.length;n<s;n++)if(t[n]>=i-e&&t[n]<=i+e)returnn;return0}functionp(t){for(vare=t.itemSize,i=t.positions,n=t.gridSize,s=t.total,o=t.threshold,r=t.buffer,l=d(e.width,n,s,o),a=m(i,l,s),u=v(a,r),h=newA(Math.round(n*u),Math.round(a[u])),f=a[u]+e.height,c=0;c<l;c++)i[u+c]=f;returnh}functiony(t){returnArray.prototype.slice.call(t)}functiong(t,e){returnt.indexOf(e)>-1}try{var_=newwindow.CustomEvent("test");if(_.preventDefault(),!0!==_.defaultPrevented)thrownewError("Could not prevent default")}catch(t){varE=function(t,e){vari,n;returne=e||{bubbles:!1,cancelable:!1,detail:void0},i=document.createEvent("CustomEvent"),i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n=i.preventDefault,i.preventDefault=function(){n.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},i};E.prototype=window.Event.prototype,window.CustomEvent=E}varS=Element.prototype,b=S.matches||S.matchesSelector||S.webkitMatchesSelector||S.mozMatchesSelector||S.msMatchesSelector||S.oMatchesSelector,I=t,k="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:{},T=function(t,e){returne={exports:{}},t(e,e.exports),e.exports}(function(t){functione(t){for(vare=[],i=0;i<t.length;i++)-1===e.indexOf(t[i])&&e.push(t[i]);returne}functioni(t){vare=newSet;returnt.filter(function(t){return!e.has(t)&&(e.add(t),!0)})}functionn(t){vare=[];returnnewSet(t).forEach(function(t){e.push(t)}),e}"Set"ink?"function"==typeofSet.prototype.forEach&&function(){vart=!1;returnnewSet([!0]).forEach(function(e){t=e}),!0===t}()?t.exports=n:t.exports=i:t.exports=e}),w=e,L=Object.prototype.hasOwnProperty,C=i,z=function(t,e,i){functions(t){returnfunction(e,n){if(!r){if(e)returni(e,l),void(r=!0);l[t]=n,--o||i(null,l)}}}i||("function"==typeofe?(i=e,e=null):i=n);varo=t&&t.length;if(!o)returni(null,[]);varr=!1,l=newArray(o);t.forEach(e?function(t,i){t.call(e,s(i))}:function(t,e){t(s(e))})},D=function(t,e){if(!(tinstanceofe))thrownewTy