You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/Old/Ombi.UI/Content/jquery.mixitup.js

14 lines
28 KiB

/**!
* MixItUp v2.1.11
*
* @copyright Copyright 2015 KunkaLabs Limited.
* @author KunkaLabs Limited.
* @link https://mixitup.kunkalabs.com
*
* @license Commercial use requires a commercial license.
* https://mixitup.kunkalabs.com/licenses/
*
* Non-commercial use permitted under terms of CC-BY-NC license.
* http://creativecommons.org/licenses/by-nc/3.0/
*/
(function(n,t){"use strict";n.MixItUp=function(){var t=this;t._execAction("_constructor",0);n.extend(t,{selectors:{target:".mix",filter:".filter",sort:".sort"},animation:{enable:!0,effects:"fade scale",duration:600,easing:"ease",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",queue:!0,queueLimit:1,animateChangeLayout:!1,animateResizeContainer:!0,animateResizeTargets:!1,staggerSequence:!1,reverseOut:!1},callbacks:{onMixLoad:!1,onMixStart:!1,onMixBusy:!1,onMixEnd:!1,onMixFail:!1,_user:!1},controls:{enable:!0,live:!1,toggleFilterButtons:!1,toggleLogic:"or",activeClass:"active"},layout:{display:"inline-block",containerClass:"",containerClassFail:"fail"},load:{filter:"all",sort:!1},_$body:null,_$container:null,_$targets:null,_$parent:null,_$sortButtons:null,_$filterButtons:null,_suckMode:!1,_mixing:!1,_sorting:!1,_clicking:!1,_loading:!0,_changingLayout:!1,_changingClass:!1,_changingDisplay:!1,_origOrder:[],_startOrder:[],_newOrder:[],_activeFilter:null,_toggleArray:[],_toggleString:"",_activeSort:"default:asc",_newSort:null,_startHeight:null,_newHeight:null,_incPadding:!0,_newDisplay:null,_newClass:null,_targetsBound:0,_targetsDone:0,_queue:[],_$show:n(),_$hide:n()});t._execAction("_constructor",1)};n.MixItUp.prototype={constructor:n.MixItUp,_instances:{},_handled:{_filter:{},_sort:{}},_bound:{_filter:{},_sort:{}},_actions:{},_filters:{},extend:function(t){for(var i in t)n.MixItUp.prototype[i]=t[i]},addAction:function(t,i,r,u){n.MixItUp.prototype._addHook("_actions",t,i,r,u)},addFilter:function(t,i,r,u){n.MixItUp.prototype._addHook("_filters",t,i,r,u)},_addHook:function(t,i,r,u,f){var o=n.MixItUp.prototype[t],e={};f=f===1||f==="post"?"post":"pre";e[i]={};e[i][f]={};e[i][f][r]=u;n.extend(!0,o,e)},_init:function(t,i){var r=this,u;if(r._execAction("_init",0,arguments),i&&n.extend(!0,r,i),r._$body=n("body"),r._domNode=t,r._$container=n(t),r._$container.addClass(r.layout.containerClass),r._id=t.id,r._platformDetect(),r._brake=r._getPrefixedCSS("transition","none"),r._refresh(!0),r._$parent=r._$targets.parent().length?r._$targets.parent():r._$container,r.load.sort&&(r._newSort=r._parseSort(r.load.sort),r._newSortString=r.load.sort,r._activeSort=r.load.sort,r._sort(),r._printSort()),r._activeFilter=r.load.filter==="all"?r.selectors.target:r.load.filter==="none"?"":r.load.filter,r.controls.enable&&r._bindHandlers(),r.controls.toggleFilterButtons)for(r._buildToggleArray(),u=0;u<r._toggleArray.length;u++)r._updateControls({filter:r._toggleArray[u],sort:r._activeSort},!0);else r.controls.enable&&r._updateControls({filter:r._activeFilter,sort:r._activeSort});r._filter();r._init=!0;r._$container.data("mixItUp",r);r._execAction("_init",1,arguments);r._buildState();r._$targets.css(r._brake);r._goMix(r.animation.enable)},_platformDetect:function(){var n=this,i=["Webkit","Moz","O","ms"],u=["webkit","moz"],f=window.navigator.appVersion.match(/Chrome\/(\d+)\./)||!1,o=typeof InstallTrigger!="undefined",s=function(n){for(var t=0;t<i.length;t++)if(i[t]+"Transition"in n.style)return{prefix:"-"+i[t].toLowerCase()+"-",vendor:i[t]};return"transition"in n.style?"":!1},e=s(n._domNode),r;for(n._execAction("_platformDetect",0),n._chrome=f?parseInt(f[1],10):!1,n._ff=o?parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]):!1,n._prefix=e.prefix,n._vendor=e.vendor,n._suckMode=window.atob&&n._prefix?!1:!0,n._suckMode&&(n.animation.enable=!1),n._ff&&n._ff<=4&&(n.animation.enable=!1),r=0;r<u.length&&!window.requestAnimationFrame;r++)window.requestAnimationFrame=window[u[r]+"RequestAnimationFrame"];typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=typeof"test".__proto__=="object"?function(n){return n.__proto__}:function(n){return n.constructor.prototype});n._domNode.nextElementSibling===t&&Object.defineProperty(Element.prototype,"nextElementSibling",{get:function(){for(var n=this.nextSibling;n;){if(n.nodeType===1)return n;n=n.nextSibling}return null}});n._execAction("_platformDetect",1)},_refresh:function(n,i){var r=this,e,h,f,u;for(r._execAction("_refresh",0,arguments),r._$targets=r._$container.find(r.selectors.target),f=0;f<r._$targets.length;f++){if(u=r._$targets[f],u.dataset===t||i)for(u.dataset={},e=0;e<u.attributes.length;e++){var s=u.attributes[e],o=s.name,c=s.value;o.indexOf("data-")>-1&&(h=r._helpers._camelCase(o.substring(5,o.length)),u.dataset[h]=c)}u.mixParent===t&&(u.mixParent=r._id)}if(r._$targets.length&&n||!r._origOrder.length&&r._$targets.length)for(r._origOrder=[],f=0;f<r._$targets.length;f++)u=r._$targets[f],r._origOrder.push(u);r._execAction("_refresh",1,arguments)},_bindHandlers:function(){var i=this,r=n.MixItUp.prototype._bound._filter,u=n.MixItUp.prototype._bound._sort;if(i._execAction("_bindHandlers",0),i.controls.live)i._$body.on("click.mixItUp."+i._id,i.selectors.sort,function(){i._processClick(n(this),"sort")}).on("click.mixItUp."+i._id,i.selectors.filter,function(){i._processClick(n(this),"filter")});else{i._$sortButtons=n(i.selectors.sort);i._$filterButtons=n(i.selectors.filter);i._$sortButtons.on("click.mixItUp."+i._id,function(){i._processClick(n(this),"sort")});i._$filterButtons.on("click.mixItUp."+i._id,function(){i._processClick(n(this),"filter")})}r[i.selectors.filter]=r[i.selectors.filter]===t?1:r[i.selectors.filter]+1;u[i.selectors.sort]=u[i.selectors.sort]===t?1:u[i.selectors.sort]+1;i._execAction("_bindHandlers",1)},_processClick:function(i,r){var u=this,f=function(i,r,f){var e=n.MixItUp.prototype;e._handled["_"+r][u.selectors[r]]=e._handled["_"+r][u.selectors[r]]===t?1:e._handled["_"+r][u.selectors[r]]+1;e._handled["_"+r][u.selectors[r]]===e._bound["_"+r][u.selectors[r]]&&(i[(f?"remove":"add")+"Class"](u.controls.activeClass),delete e._handled["_"+r][u.selectors[r]])},o,e,s,h;u._execAction("_processClick",0,arguments);!u._mixing||u.animation.queue&&u._queue.length<u.animation.queueLimit?(u._clicking=!0,r==="sort"&&(o=i.attr("data-sort"),(!i.hasClass(u.controls.activeClass)||o.indexOf("random")>-1)&&(n(u.selectors.sort).removeClass(u.controls.activeClass),f(i,r),u.sort(o))),r==="filter"&&(e=i.attr("data-filter"),h=u.controls.toggleLogic==="or"?",":"",u.controls.toggleFilterButtons?(u._buildToggleArray(),i.hasClass(u.controls.activeClass)?(f(i,r,!0),s=u._toggleArray.indexOf(e),u._toggleArray.splice(s,1)):(f(i,r),u._toggleArray.push(e)),u._toggleArray=n.grep(u._toggleArray,function(n){return n}),u._toggleString=u._toggleArray.join(h),u.filter(u._toggleString)):i.hasClass(u.controls.activeClass)||(n(u.selectors.filter).removeClass(u.controls.activeClass),f(i,r),u.filter(e))),u._execAction("_processClick",1,arguments)):(typeof u.callbacks.onMixBusy=="function"&&u.callbacks.onMixBusy.call(u._domNode,u._state,u),u._execAction("_processClickBusy",1,arguments))},_buildToggleArray:function(){var n=this,i=n._activeFilter.replace(/\s/g,""),t,r;if(n._execAction("_buildToggleArray",0,arguments),n.controls.toggleLogic==="or")n._toggleArray=i.split(",");else for(n._toggleArray=i.split("."),n._toggleArray[0]||n._toggleArray.shift(),t=0;r=n._toggleArray[t];t++)n._toggleArray[t]="."+r;n._execAction("_buildToggleArray",1,arguments)},_updateControls:function(i,r){var u=this,f={filter:i.filter,sort:i.sort},h=function(n,t){try{r&&e==="filter"&&!(f.filter==="none"||f.filter==="")?n.filter(t).addClass(u.controls.activeClass):n.removeClass(u.controls.activeClass).filter(t).addClass(u.controls.activeClass)}catch(i){}},e="filter",o=null,s;for(u._execAction("_updateControls",0,arguments),i.filter===t&&(f.filter=u._activeFilter),i.sort===t&&(f.sort=u._activeSort),f.filter===u.selectors.target&&(f.filter="all"),s=0;s<2;s++)o=u.controls.live?n(u.selectors[e]):u["_$"+e+"Buttons"],o&&h(o,"[data-"+e+'="'+f[e]+'"]'),e="sort";u._execAction("_updateControls",1,arguments)},_filter:function(){var t=this,i,r;for(t._execAction("_filter",0),i=0;i<t._$targets.length;i++)r=n(t._$targets[i]),r.is(t._activeFilter)?t._$show=t._$show.add(r):t._$hide=t._$hide.add(r);t._execAction("_filter",1)},_sort:function(){var n=this,r=function(n){for(var t=n.slice(),u=t.length,i=u,r,f;i--;)r=parseInt(Math.random()*u),f=t[i],t[i]=t[r],t[r]=f;return t},t,i;for(n._execAction("_sort",0),n._startOrder=[],t=0;t<n._$targets.length;t++)i=n._$targets[t],n._startOrder.push(i);switch(n._newSort[0].sortBy){case"default":n._newOrder=n._origOrder;break;case"random":n._newOrder=r(n._startOrder);break;case"custom":n._newOrder=n._newSort[0].order;break;default:n._newOrder=n._startOrder.concat().sort(function(t,i){return n._compare(t,i)})}n._execAction("_sort",1)},_compare:function(n,t,i){i=i?i:0;var u=this,o=u._newSort[i].order,r=function(n){return n.dataset[u._newSort[i].sortBy]||0},f=isNaN(r(n)*1)?r(n).toLowerCase():r(n)*1,e=isNaN(r(t)*1)?r(t).toLowerCase():r(t)*1;return f<e?o==="asc"?-1:1:f>e?o==="asc"?1:-1:f===e&&u._newSort.length>i+1?u._compare(n,t,i+1):0},_printSort:function(n){var t=this,s=n?t._startOrder:t._newOrder,u=t._$parent[0].querySelectorAll(t.selectors.target),h=u.length?u[u.length-1].nextElementSibling:null,r=document.createDocumentFragment(),f,e,i,o,c;for(t._execAction("_printSort",0,arguments),i=0;i<u.length;i++)(f=u[i],e=f.nextSibling,f.style.position!=="absolute")&&(e&&e.nodeName==="#text"&&t._$parent[0].removeChild(e),t._$parent[0].removeChild(f));for(i=0;i<s.length;i++)o=s[i],t._newSort[0].sortBy!=="default"||t._newSort[0].order!=="desc"||n?(r.appendChild(o),r.appendChild(document.createTextNode(" "))):(c=r.firstChild,r.insertBefore(o,c),r.insertBefore(document.createTextNode(" "),o));h?t._$parent[0].insertBefore(r,h):t._$parent[0].appendChild(r);t._execAction("_printSort",1,arguments)},_parseSort:function(n){for(var u,i,f=this,r=typeof n=="string"?n.split(" "):[n],e=[],t=0;t<r.length;t++)if(u=typeof n=="string"?r[t].split(":"):["custom",r[t]],i={sortBy:f._helpers._camelCase(u[0]),order:u[1]||"asc"},e.push(i),i.sortBy==="default"||i.sortBy==="random")break;return f._execFilter("_parseSort",e,arguments)},_parseEffects:function(){var n=this,i={opacity:"",transformIn:"",transformOut:"",filter:""},t=function(t,i){var r;if(n.animation.effects.indexOf(t)>-1){if(i&&(r=n.animation.effects.indexOf(t+"("),r>-1)){var u=n.animation.effects.substring(r),f=/\(([^)]+)\)/.exec(u),e=f[1];return{val:e}}return!0}return!1},u=function(n,t){return t?n.charAt(0)==="-"?n.substr(1,n.length):"-"+n:n},r=function(n,r){for(var o=[["scale",".01"],["translateX","20px"],["translateY","20px"],["translateZ","20px"],["rotateX","90deg"],["rotateY","90deg"],["rotateZ","180deg"],],f=0;f<o.length;f++){var e=o[f][0],s=o[f][1],h=r&&e!=="scale";i[n]+=t(e)?e+"("+u(t(e,!0).val||s,h)+") ":""}};return i.opacity=t("fade")?t("fade",!0).val||"0":"1",r("transformIn"),n.animation.reverseOut?r("transformOut",!0):i.transformOut=i.transformIn,i.transition={},i.transition=n._getPrefixedCSS("transition","all "+n.animation.duration+"ms "+n.animation.easing+", opacity "+n.animation.duration+"ms linear"),n.animation.stagger=t("stagger")?!0:!1,n.animation.staggerDuration=parseInt(t("stagger")?t("stagger",!0).val?t("stagger",!0).val:100:100),n._execFilter("_parseEffects",i)},_buildState:function(n){var t=this,i={};if(t._execAction("_buildState",0),i={activeFilter:t._activeFilter===""?"none":t._activeFilter,activeSort:n&&t._newSortString?t._newSortString:t._activeSort,fail:!t._$show.length&&t._activeFilter!=="",$targets:t._$targets,$show:t._$show,$hide:t._$hide,totalTargets:t._$targets.length,totalShow:t._$show.length,totalHide:t._$hide.length,display:n&&t._newDisplay?t._newDisplay:t.layout.display},n)return t._execFilter("_buildState",i);t._state=i;t._execAction("_buildState",1)},_goMix:function(n){var t=this,i=function(){t._chrome&&t._chrome===31&&e(t._$parent[0]);t._setInter();f()},f=function(){var n=window.pageYOffset,i=window.pageXOffset,u=document.documentElement.scrollHeight;t._getInterMixData();t._setFinal();t._getFinalMixData();window.pageYOffset!==n&&window.scrollTo(i,n);t._prepTargets();window.requestAnimationFrame?requestAnimationFrame(r):setTimeout(function(){r()},20)},r=function(){t._animateTargets();t._targetsBound===0&&t._cleanUp()},e=function(n){var t=n.parentElement,i=document.createElement("div"),r=document.createDocumentFragment();t.insertBefore(i,n);r.appendChild(n);t.replaceChild(n,i)},u=t._buildState(!0);t._execAction("_goMix",0,arguments);t.animation.duration||(n=!1);t._mixing=!0;t._$container.removeClass(t.layout.containerClassFail);typeof t.callbacks.onMixStart=="function"&&t.callbacks.onMixStart.call(t._domNode,t._state,u,t);t._$container.trigger("mixStart",[t._state,u,t]);t._getOrigMixData();n&&!t._suckMode?window.requestAnimationFrame?requestAnimationFrame(i):i():t._cleanUp();t._execAction("_goMix",1,arguments)},_getTargetData:function(n,t){var r=this,i;n.dataset[t+"PosX"]=n.offsetLeft;n.dataset[t+"PosY"]=n.offsetTop;r.animation.animateResizeTargets&&(i=r._suckMode?{marginBottom:"",marginRight:""}:window.getComputedStyle(n),n.dataset[t+"MarginBottom"]=parseInt(i.marginBottom),n.dataset[t+"MarginRight"]=parseInt(i.marginRight),n.dataset[t+"Width"]=n.offsetWidth,n.dataset[t+"Height"]=n.offsetHeight)},_getOrigMixData:function(){var n=this,i=n._suckMode?{boxSizing:""}:window.getComputedStyle(n._$parent[0]),u=i.boxSizing||i[n._vendor+"BoxSizing"],t,r;for(n._incPadding=u==="border-box",n._execAction("_getOrigMixData",0),n._suckMode||(n.effects=n._parseEffects()),n._$toHide=n._$hide.filter(":visible"),n._$toShow=n._$show.filter(":hidden"),n._$pre=n._$targets.filter(":visible"),n._startHeight=n._incPadding?n._$parent.outerHeight():n._$parent.height(),t=0;t<n._$pre.length;t++)r=n._$pre[t],n._getTargetData(r,"orig");n._execAction("_getOrigMixData",1)},_setInter:function(){var n=this;n._execAction("_setInter",0);n._changingLayout&&n.animation.animateChangeLayout?(n._$toShow.css("display",n._newDisplay),n._changingClass&&n._$container.removeClass(n.layout.containerClass).addClass(n._newClass)):n._$toShow.css("display",n.layout.display);n._execAction("_setInter",1)},_getInterMixData:function(){var n=this,t,i;for(n._execAction("_getInterMixData",0),t=0;t<n._$toShow.length;t++)i=n._$toShow[t],n._getTargetData(i,"inter");for(t=0;t<n._$pre.length;t++)i=n._$pre[t],n._getTargetData(i,"inter");n._execAction("_getInterMixData",1)},_setFinal:function(){var n=this;n._execAction("_setFinal",0);n._sorting&&n._printSort();n._$toHide.removeStyle("display");n._changingLayout&&n.animation.animateChangeLayout&&n._$pre.css("display",n._newDisplay);n._execAction("_setFinal",1)},_getFinalMixData:function(){var n=this,t,i;for(n._execAction("_getFinalMixData",0),t=0;t<n._$toShow.length;t++)i=n._$toShow[t],n._getTargetData(i,"final");for(t=0;t<n._$pre.length;t++)i=n._$pre[t],n._getTargetData(i,"final");n._newHeight=n._incPadding?n._$parent.outerHeight():n._$parent.height();n._sorting&&n._printSort(!0);n._$toShow.removeStyle("display");n._$pre.css("display",n.layout.display);n._changingClass&&n.animation.animateChangeLayout&&n._$container.removeClass(n._newClass).addClass(n.layout.containerClass);n._execAction("_getFinalMixData",1)},_prepTargets:function(){var i=this,f={_in:i._getPrefixedCSS("transform",i.effects.transformIn),_out:i._getPrefixedCSS("transform",i.effects.transformOut)},t,u,r;for(i._execAction("_prepTargets",0),i.animation.animateResizeContainer&&i._$parent.css("height",i._startHeight+"px"),r=0;r<i._$toShow.length;r++)t=i._$toShow[r],u=n(t),t.style.opacity=i.effects.opacity,t.style.display=i._changingLayout&&i.animation.animateChangeLayout?i._newDisplay:i.layout.display,u.css(f._in),i.animation.animateResizeTargets&&(t.style.width=t.dataset.finalWidth+"px",t.style.height=t.dataset.finalHeight+"px",t.style.marginRight=-(t.dataset.finalWidth-t.dataset.interWidth)+t.dataset.finalMarginRight*1+"px",t.style.marginBottom=-(t.dataset.finalHeight-t.dataset.interHeight)+t.dataset.finalMarginBottom*1+"px");for(r=0;r<i._$pre.length;r++){var t=i._$pre[r],u=n(t),e={x:t.dataset.origPosX-t.dataset.interPosX,y:t.dataset.origPosY-t.dataset.interPosY},f=i._getPrefixedCSS("transform","translate("+e.x+"px,"+e.y+"px)");u.css(f);i.animation.animateResizeTargets&&(t.style.width=t.dataset.origWidth+"px",t.style.height=t.dataset.origHeight+"px",t.dataset.origWidth-t.dataset.finalWidth&&(t.style.marginRight=-(t.dataset.origWidth-t.dataset.interWidth)+t.dataset.origMarginRight*1+"px"),t.dataset.origHeight-t.dataset.finalHeight&&(t.style.marginBottom=-(t.dataset.origHeight-t.dataset.interHeight)+t.dataset.origMarginBottom*1+"px"))}i._execAction("_prepTargets",1)},_animateTargets:function(){var t=this,r,e,u;for(t._execAction("_animateTargets",0),t._targetsDone=0,t._targetsBound=0,t._$parent.css(t._getPrefixedCSS("perspective",t.animation.perspectiveDistance+"px")).css(t._getPrefixedCSS("perspective-origin",t.animation.perspectiveOrigin)),t.animation.animateResizeContainer&&t._$parent.css(t._getPrefixedCSS("transition","height "+t.animation.duration+"ms ease")).css("height",t._newHeight+"px"),r=0;r<t._$toShow.length;r++){var i=t._$toShow[r],f=n(i),s={x:i.dataset.finalPosX-i.dataset.interPosX,y:i.dataset.finalPosY-i.dataset.interPosY},c=t._getDelay(r),o={};for(i.style.opacity="",e=0;e<2;e++)u=e===0?u=t._prefix:"",t._ff&&t._ff<=20&&(o[u+"transition-property"]="all",o[u+"transition-timing-function"]=t.animation.easing+"ms",o[u+"transition-duration"]=t.animation.duration+"ms"),o[u+"transition-delay"]=c+"ms",o[u+"transform"]="translate("+s.x+"px,"+s.y+"px)";(t.effects.transform||t.effects.opacity)&&t._bindTargetDone(f);t._ff&&t._ff<=20?f.css(o):f.css(t.effects.transition).css(o)}for(r=0;r<t._$pre.length;r++){var i=t._$pre[r],f=n(i),s={x:i.dataset.finalPosX-i.dataset.interPosX,y:i.dataset.finalPosY-i.dataset.interPosY},c=t._getDelay(r);i.dataset.finalPosX===i.dataset.origPosX&&i.dataset.finalPosY===i.dataset.origPosY||t._bindTargetDone(f);f.css(t._getPrefixedCSS("transition","all "+t.animation.duration+"ms "+t.animation.easing+" "+c+"ms"));f.css(t._getPrefixedCSS("transform","translate("+s.x+"px,"+s.y+"px)"));t.animation.animateResizeTargets&&(i.dataset.origWidth-i.dataset.finalWidth&&i.dataset.finalWidth*1&&(i.style.width=i.dataset.finalWidth+"px",i.style.marginRight=-(i.dataset.finalWidth-i.dataset.interWidth)+i.dataset.finalMarginRight*1+"px"),i.dataset.origHeight-i.dataset.finalHeight&&i.dataset.finalHeight*1&&(i.style.height=i.dataset.finalHeight+"px",i.style.marginBottom=-(i.dataset.finalHeight-i.dataset.interHeight)+i.dataset.finalMarginBottom*1+"px"))}for(t._changingClass&&t._$container.removeClass(t.layout.containerClass).addClass(t._newClass),r=0;r<t._$toHide.length;r++){var i=t._$toHide[r],f=n(i),c=t._getDelay(r),h={};for(e=0;e<2;e++)u=e===0?u=t._prefix:"",h[u+"transition-delay"]=c+"ms",h[u+"transform"]=t.effects.transformOut,h.opacity=t.effects.opacity;f.css(t.effects.transition).css(h);(t.effects.transform||t.effects.opacity)&&t._bindTargetDone(f)}t._execAction("_animateTargets",1)},_bindTargetDone:function(t){var i=this,r=t[0];if(i._execAction("_bindTargetDone",0,arguments),!r.dataset.bound){r.dataset.bound=!0;i._targetsBound++;t.on("webkitTransitionEnd.mixItUp transitionend.mixItUp",function(u){(u.originalEvent.propertyName.indexOf("transform")>-1||u.originalEvent.propertyName.indexOf("opacity")>-1)&&n(u.originalEvent.target).is(i.selectors.target)&&(t.off(".mixItUp"),r.dataset.bound="",i._targetDone())})}i._execAction("_bindTargetDone",1,arguments)},_targetDone:function(){var n=this;n._execAction("_targetDone",0);n._targetsDone++;n._targetsDone===n._targetsBound&&n._cleanUp();n._execAction("_targetDone",1)},_cleanUp:function(){var t=this,i=t.animation.animateResizeTargets?"transform opacity width height margin-bottom margin-right":"transform opacity",r=function(){t._$targets.removeStyle("transition",t._prefix)};t._execAction("_cleanUp",0);t._changingLayout?t._$show.css("display",t._newDisplay):t._$show.css("display",t.layout.display);t._$targets.css(t._brake);t._$targets.removeStyle(i,t._prefix).removeAttr("data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom");t._$hide.removeStyle("display");t._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin",t._prefix);t._sorting&&(t._printSort(),t._activeSort=t._newSortString,t._sorting=!1);t._changingLayout&&(t._changingDisplay&&(t.layout.display=t._newDisplay,t._changingDisplay=!1),t._changingClass&&(t._$parent.removeClass(t.layout.containerClass).addClass(t._newClass),t.layout.containerClass=t._newClass,t._changingClass=!1),t._changingLayout=!1);t._refresh();t._buildState();t._state.fail&&t._$container.addClass(t.layout.containerClassFail);t._$show=n();t._$hide=n();window.requestAnimationFrame&&requestAnimationFrame(r);t._mixing=!1;typeof t.callbacks._user=="function"&&t.callbacks._user.call(t._domNode,t._state,t);typeof t.callbacks.onMixEnd=="function"&&t.callbacks.onMixEnd.call(t._domNode,t._state,t);t._$container.trigger("mixEnd",[t._state,t]);t._state.fail&&(typeof t.callbacks.onMixFail=="function"&&t.callbacks.onMixFail.call(t._domNode,t._state,t),t._$container.trigger("mixFail",[t._state,t]));t._loading&&(typeof t.callbacks.onMixLoad=="function"&&t.callbacks.onMixLoad.call(t._domNode,t._state,t),t._$container.trigger("mixLoad",[t._state,t]));t._queue.length&&(t._execAction("_queue",0),t.multiMix(t._queue[0][0],t._queue[0][1],t._queue[0][2]),t._queue.splice(0,1));t._execAction("_cleanUp",1);t._loading=!1},_getPrefixedCSS:function(n,t,i){for(var f=this,e={},u="",r=-1,r=0;r<2;r++)u=r===0?f._prefix:"",e[u+n]=i?u+t:t;return f._execFilter("_getPrefixedCSS",e,arguments)},_getDelay:function(n){var t=this,i=typeof t.animation.staggerSequence=="function"?t.animation.staggerSequence.call(t._domNode,n,t._state):n,r=t.animation.stagger?i*t.animation.staggerDuration:0;return t._execFilter("_getDelay",r,arguments)},_parseMultiMixArgs:function(n){for(var t,u=this,i={command:null,animate:u.animation.enable,callback:null},r=0;r<n.length;r++)t=n[r],t!==null&&(typeof t=="object"||typeof t=="string"?i.command=t:typeof t=="boolean"?i.animate=t:typeof t=="function"&&(i.callback=t));return u._execFilter("_parseMultiMixArgs",i,arguments)},_parseInsertArgs:function(t){for(var i,u=this,r={index:0,$object:n(),multiMix:{filter:u._state.activeFilter},callback:null},f=0;f<t.length;f++)i=t[f],typeof i=="number"?r.index=i:typeof i=="object"&&i instanceof n?r.$object=i:typeof i=="object"&&u._helpers._isElement(i)?r.$object=n(i):typeof i=="object"&&i!==null?r.multiMix=i:typeof i!="boolean"||i?typeof i=="function"&&(r.callback=i):r.multiMix=!1;return u._execFilter("_parseInsertArgs",r,arguments)},_execAction:function(n,t,i){var r=this,u=t?"post":"pre",f;if(!r._actions.isEmptyObject&&r._actions.hasOwnProperty(n))for(f in r._actions[n][u])r._actions[n][u][f].call(r,i)},_execFilter:function(n,t,i){var r=this,u;if(!r._filters.isEmptyObject&&r._filters.hasOwnProperty(n))for(u in r._filters[n])return r._filters[n][u].call(r,i);else return t},_helpers:{_camelCase:function(n){return n.replace(/-([a-z])/g,function(n){return n[1].toUpperCase()})},_isElement:function(n){return window.HTMLElement?n instanceof HTMLElement:n!==null&&n.nodeType===1&&n.nodeName==="string"}},isMixing:function(){var n=this;return n._execFilter("isMixing",n._mixing)},filter:function(){var n=this,t=n._parseMultiMixArgs(arguments);n._clicking&&(n._toggleString="");n.multiMix({filter:t.command},t.animate,t.callback)},sort:function(){var t=this,n=t._parseMultiMixArgs(arguments);t.multiMix({sort:n.command},n.animate,n.callback)},changeLayout:function(){var t=this,n=t._parseMultiMixArgs(arguments);t.multiMix({changeLayout:n.command},n.animate,n.callback)},multiMix:function(){var n=this,i=n._parseMultiMixArgs(arguments);if(n._execAction("multiMix",0,arguments),n._mixing)n.animation.queue&&n._queue.length<n.animation.queueLimit?(n._queue.push(arguments),n.controls.enable&&!n._clicking&&n._updateControls(i.command),n._execAction("multiMixQueue",1,arguments)):(typeof n.callbacks.onMixBusy=="function"&&n.callbacks.onMixBusy.call(n._domNode,n._state,n),n._$container.trigger("mixBusy",[n._state,n]),n._execAction("multiMixBusy",1,arguments));else{n.controls.enable&&!n._clicking&&(n.controls.toggleFilterButtons&&n._buildToggleArray(),n._updateControls(i.command,n.controls.toggleFilterButtons));n._queue.length<2&&(n._clicking=!1);delete n.callbacks._user;i.callback&&(n.callbacks._user=i.callback);var f=i.command.sort,r=i.command.filter,u=i.command.changeLayout;n._refresh();f&&(n._newSort=n._parseSort(f),n._newSortString=f,n._sorting=!0,n._sort());r!==t&&(r=r==="all"?n.selectors.target:r,n._activeFilter=r);n._filter();u&&(n._newDisplay=typeof u=="string"?u:u.display||n.layout.display,n._newClass=u.containerClass||"",(n._newDisplay!==n.layout.display||n._newClass!==n.layout.containerClass)&&(n._changingLayout=!0,n._changingClass=n._newClass!==n.layout.containerClass,n._changingDisplay=n._newDisplay!==n.layout.display));n._$targets.css(n._brake);n._goMix(i.animate^n.animation.enable?i.animate:n.animation.enable);n._execAction("multiMix",1,arguments)}},insert:function(){var n=this,t=n._parseInsertArgs(arguments),f=typeof t.callback=="function"?t.callback:null,r=document.createDocumentFragment(),e=function(){return n._refresh(),n._$targets.length?t.index<n._$targets.length||!n._$targets.length?n._$targets[t.index]:n._$targets[n._$targets.length-1].nextElementSibling:n._$parent[0].children[0]}(),i,u;if(n._execAction("insert",0,arguments),t.$object){for(i=0;i<t.$object.length;i++)u=t.$object[i],r.appendChild(u),r.appendChild(document.createTextNode(" "));n._$parent[0].insertBefore(r,e)}n._execAction("insert",1,arguments);typeof t.multiMix=="object"&&n.multiMix(t.multiMix,f)},prepend:function(){var t=this,n=t._parseInsertArgs(arguments);t.insert(0,n.$object,n.multiMix,n.callback)},append:function(){var n=this,t=n._parseInsertArgs(arguments);n.insert(n._state.totalTargets,t.$object,t.multiMix,t.callback)},getOption:function(n){var i=this,r=function(n,i){for(var r=i.split("."),f=r.pop(),o=r.length,u=1,e=r[0]||i;(n=n[e])&&u<o;)e=r[u],u++;if(n!==t)return n[f]!==t?n[f]:n};return n?i._execFilter("getOption",r(i,n),arguments):i},setOptions:function(t){var i=this;i._execAction("setOptions",0,arguments);typeof t=="object"&&n.extend(!0,i,t);i._execAction("setOptions",1,arguments)},getState:function(){var n=this;return n._execFilter("getState",n._state,n)},forceRefresh:function(){var n=this;n._refresh(!1,!0)},destroy:function(t){var i=this,r=n.MixItUp.prototype._bound._filter,u=n.MixItUp.prototype._bound._sort,f,e;for(i._execAction("destroy",0,arguments),i._$body.add(n(i.selectors.sort)).add(n(i.selectors.filter)).off(".mixItUp"),f=0;f<i._$targets.length;f++)e=i._$targets[f],t&&(e.style.display=""),delete e.mixParent;i._execAction("destroy",1,arguments);r[i.selectors.filter]&&r[i.selectors.filter]>1?r[i.selectors.filter]--:r[i.selectors.filter]===1&&delete r[i.selectors.filter];u[i.selectors.sort]&&u[i.selectors.sort]>1?u[i.selectors.sort]--:u[i.selectors.sort]===1&&delete u[i.selectors.sort];delete n.MixItUp.prototype._instances[i._id]}};n.fn.mixItUp=function(){var i=arguments,r=[],u,f=function(t,i){var r=new n.MixItUp,u=function(){return("00000"+(Math.random()*16777216<<0).toString(16)).substr(-6).toUpperCase()};r._execAction("_instantiate",0,arguments);t.id=t.id?t.id:"MixItUp"+u();r._instances[t.id]||(r._instances[t.id]=r,r._init(t,i));r._execAction("_instantiate",1,arguments)};return u=this.each(function(){var u,e;i&&typeof i[0]=="string"?(u=n.MixItUp.prototype._instances[this.id],i[0]==="isLoaded"?r.push(u?!0:!1):(e=u[i[0]](i[1],i[2],i[3]),e!==t&&r.push(e))):f(this,i[0])}),r.length?r.length>1?r:r[0]:u};n.fn.removeStyle=function(i,r){return r=r?r:"",this.each(function(){for(var o,f,u=this,s=i.split(" "),e=0;e<s.length;e++)for(o=0;o<4;o++){switch(o){case 0:f=s[e];break;case 1:f=n.MixItUp.prototype._helpers._camelCase(f);break;case 2:f=r+s[e];break;case 3:f=n.MixItUp.prototype._helpers._camelCase(r+s[e])}if(u.style[f]!==t&&typeof u.style[f]!="unknown"&&u.style[f].length>0&&(u.style[f]=""),!r&&o===1)break}u.attributes&&u.attributes.style&&u.attributes.style!==t&&u.attributes.style.value===""&&u.attributes.removeNamedItem("style")})}})(jQuery);