|
|
/* * # Semantic UI - 1.8.0 * https://github.com/Semantic-Org/Semantic-UI
* http://www.semantic-ui.com/
* * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT
* */ !function(n,i,e,t){"use strict";n.fn.transition=function(){{var a,o=n(this),s=o.selector||"",r=(new Date).getTime(),l=[],m=arguments,d=m[0],c=[].slice.call(arguments,1),u="string"==typeof d;i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(n){setTimeout(n,0)}}return o.each(function(){var i,f,p,g,v,b,y,h,C,w,A,T,S=n(this),x=this;T={initialize:function(){w="module-"+C,i=T.get.settings.apply(x,m),g=i.className,v=i.metadata,b=T.get.animationStartEvent(),y=T.get.animationEndEvent(),h=T.get.animationName(),p=i.error,C=i.namespace,A="."+i.namespace,f=S.data(w)||T,u&&(u=T.invoke(d)),u===!1&&(T.verbose("Converted arguments into settings object",i),T.animate(),T.instantiate())},instantiate:function(){T.verbose("Storing instance of module",T),S.data(w,f)},destroy:function(){T.verbose("Destroying previous module for",x),S.removeData(w)},refresh:function(){T.verbose("Refreshing display type on next animation"),delete T.displayType},forceRepaint:function(){T.verbose("Forcing element repaint");var n=S.parent(),i=S.next();0===i.length?S.detach().appendTo(n):S.detach().insertBefore(i)},repaint:function(){T.verbose("Repainting element");x.offsetWidth},animate:function(n){if(i=n||i,!T.is.supported())return T.error(p.support),!1;if(T.debug("Preparing animation",i.animation),T.is.animating()){if(i.queue)return!i.allowRepeats&&T.has.direction()&&T.is.occurring()&&T.queuing!==!0?T.debug("Animation is currently occurring, preventing queueing same animation",i.animation):T.queue(i.animation),!1;if(!i.allowRepeats&&T.is.occurring())return T.debug("Animation is already occurring, will not execute repeated animation",i.animation),!1}T.can.animate()?T.set.animating(i.animation):T.error(p.noAnimation,i.animation,x)},reset:function(){T.debug("Resetting animation to beginning conditions"),T.remove.animationEndCallback(),T.restore.conditions(),T.remove.animating()},queue:function(n){T.debug("Queueing animation of",n),T.queuing=!0,S.one(y+A,function(){T.queuing=!1,T.repaint(),T.animate.apply(this,i)})},complete:function(){T.verbose("CSS animation complete",i.animation),T.remove.animationEndCallback(),T.remove.failSafe(),T.is.looping()||(T.is.outward()?(T.verbose("Animation is outward, hiding element"),T.restore.conditions(),T.hide(),i.onHide.call(this)):T.is.inward()?(T.verbose("Animation is outward, showing element"),T.restore.conditions(),T.show(),T.set.display(),i.onShow.call(this)):T.restore.conditions(),T.remove.animation(),T.remove.animating()),i.onComplete.call(this)},has:{direction:function(e){var t=!1;return e=e||i.animation,"string"==typeof e&&(e=e.split(" "),n.each(e,function(n,i){(i===g.inward||i===g.outward)&&(t=!0)})),t},inlineDisplay:function(){var i=S.attr("style")||"";return n.isArray(i.match(/display.*?;/,""))}},set:{animating:function(n){n=n||i.animation,T.is.animating()||T.save.conditions(),T.remove.direction(),T.remove.animationEndCallback(),T.can.transition()&&!T.has.direction()&&T.set.direction(),T.remove.hidden(),T.set.display(),S.addClass(g.animating+" "+g.transition+" "+n).addClass(n).one(y+".complete"+A,T.complete),i.useFailSafe&&T.add.failSafe(),T.set.duration(i.duration),i.onStart.call(this),T.debug("Starting tween",n,S.attr("class"))},duration:function(n,e){e=e||i.duration,e="number"==typeof e?e+"ms":e,T.verbose("Setting animation duration",e),(e||0===e)&&S.css({"-webkit-animation-duration":e,"-moz-animation-duration":e,"-ms-animation-duration":e,"-o-animation-duration":e,"animation-duration":e})},display:function(){var n=T.get.style(),i=T.get.displayType(),e=n+"display: "+i+" !important;";S.css("display",""),T.refresh(),S.css("display")!==i&&(T.verbose("Setting inline visibility to",i),S.attr("style",e))},direction:function(){S.is(":visible")&&!T.is.hidden()?(T.debug("Automatically determining the direction of animation","Outward"),S.removeClass(g.inward).addClass(g.outward)):(T.debug("Automatically determining the direction of animation","Inward"),S.removeClass(g.outward).addClass(g.inward))},looping:function(){T.debug("Transition set to loop"),S.addCla
|