text: !function(e,i,n,t){"use strict";i=void 0!==i&&i.Math==Math?i:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dimmer=function(i){var t,o=e(this),a=(new Date).getTime(),r=[],s=arguments[0],d="string"==typeof s,m=[].slice.call(arguments,1);return o.each(function(){var c,l,u,f=e.isPlainObject(i)?e.extend(!0,{},e.fn.dimmer.settings,i):e.extend({},e.fn.dimmer.settings),v=f.selector,g=f.namespace,p=f.className,h=f.error,b="."+g,y="module-"+g,C=o.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",S=e(this),D=this,T=S.data(y);(u={preinitialize:function(){u.is.dimmer()?(l=S.parent(),c=S):(l=S,c=u.has.dimmer()?f.dimmerName?l.find(v.dimmer).filter("."+f.dimmerName):l.find(v.dimmer):u.create(),u.set.variation())},initialize:function(){u.debug("Initializing dimmer",f),u.bind.events(),u.set.dimmable(),u.instantiate()},instantiate:function(){u.verbose("Storing instance of module",u),T=u,S.data(y,T)},destroy:function(){u.verbose("Destroying previous module",c),u.unbind.events(),u.remove.variation(),l.off(b)},bind:{events:function(){u.is.page()&&l.get(0).addEventListener("touchmove",u.event.preventScroll,{passive:!1}),"hover"==f.on?l.on("mouseenter"+b,u.show).on("mouseleave"+b,u.hide):"click"==f.on&&l.on(w+b,u.toggle),u.is.page()&&(u.debug("Setting as a page dimmer",l),u.set.pageDimmer()),u.is.closable()&&(u.verbose("Adding dimmer close event",c),l.on(w+b,v.dimmer,u.event.click))}},unbind:{events:function(){u.is.page()&&l.get(0).removeEventListener("touchmove",u.event.preventScroll,{passive:!1}),S.removeData(y),l.off(b)}},event:{click:function(i){u.verbose("Determining if event occured on dimmer",i),(0===c.find(i.target).length||e(i.target).is(v.content))&&(u.hide(),i.stopImmediatePropagation())},preventScroll:function(e){e.preventDefault()}},addContent:function(i){var n=e(i);u.debug("Add content to dimmer",n),n.parent()[0]!==c[0]&&n.detach().appendTo(c)},create:function(){var i=e(f.template.dimmer());return f.dimmerName&&(u.debug("Creating named dimmer",f.dimmerName),i.addClass(f.dimmerName)),i.appendTo(l),i},show:function(i){i=e.isFunction(i)?i:function(){},u.debug("Showing dimmer",c,f),u.is.dimmed()&&!u.is.animating()||!u.is.enabled()?u.debug("Dimmer is already shown or disabled"):(u.animate.show(i),f.onShow.call(D),f.onChange.call(D))},hide:function(i){i=e.isFunction(i)?i:function(){},u.is.dimmed()||u.is.animating()?(u.debug("Hiding dimmer",c),u.animate.hide(i),f.onHide.call(D),f.onChange.call(D)):u.debug("Dimmer is not visible")},toggle:function(){u.verbose("Toggling dimmer visibility",c),u.is.dimmed()?u.hide():u.show()},animate:{show:function(i){i=e.isFunction(i)?i:function(){},f.useCSS&&void 0!==e.fn.transition&&c.transition("is supported")?("auto"!==f.opacity&&u.set.opacity(),c.transition({displayType:"flex",animation:f.transition+" in",queue:!1,duration:u.get.duration(),useFailSafe:!0,onStart:function(){u.set.dimmed()},onComplete:function(){u.set.active(),i()}})):(u.verbose("Showing dimmer animation with javascript"),u.set.dimmed(),"auto"==f.opacity&&(f.opacity=.8),c.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(u.get.duration(),f.opacity,function(){c.removeAttr("style"),u.set.active(),i()}))},hide:function(i){i=e.isFunction(i)?i:function(){},f.useCSS&&void 0!==e.fn.transition&&c.transition("is supported")?(u.verbose("Hiding dimmer with css"),c.transition({displayType:"flex",animation:f.transition+" out",queue:!1,duration:u.get.duration(),useFailSafe:!0,onStart:function(){u.remove.dimmed()},onComplete:function(){u.remove.active(),i()}})):(u.verbose("Hiding dimmer with javascript"),u.remove.dimmed(),c.stop().fadeOut(u.get.duration(),function(){u.remove.active(),c.removeAttr("style"),i()}))}},get:{dimmer:function(){return c},duration:function(){return"object"==typeof f.duration?u.is.active()?f.duration.hide:f.duration.show:f.duration}},has:{dimmer:function(){return f.dimmerName?S.find(v.dimmer).filter("."+f.dimmerName).length>0:S.find(v.dimmer).length>0}},is:{active:function(){return c.hasClass(p.active)},animating:function(){return c.is(":animated")||c.hasClass(p.animating)},closable:function(){return"auto"==f.closable?"hover"!=f.on:f.closable},dimmer:function(){return S.hasClass(p.dimmer)},dimmable:function(){return S.hasClass(p.dimmable)},dimmed:function(){return l.hasClass(p.dimmed)},disabled:function(){return l.hasClass(p.disabled)},enabled:function(){return!u.is.disabled()},page:function(){return l.is("body")},pageDimmer:function(){return c.hasClass(p.pageDimmer)}},can:{show:function(){return!c.hasClass(p.disabled)}},set:{opacity:function(e){var i=c.css("background-color"),n=i.split(","),t=n&&3==n.length,o=n&&4==n.length;e=0===f.opacity?0:f.opacity||e,t||o?(n[3]=e+")",i=n.join(",")):i="rgba(0, 0, 0, "+e+")",u.debug("Setting opacity to",e),c.css("background-color",i)},active:function(){c.addClass(p.active)},dimmable:function(){l.addClass(p.dimmable)},dimmed:function(){l.addClass(p.dimmed)},pageDimmer:function(){c.addClass(p.pageDimmer)},disabled:function(){c.addClass(p.disabled)},variation:function(e){(e=e||f.variation)&&c.addClass(e)}},remove:{active:function(){c.removeClass(p.active)},dimmed:function(){l.removeClass(p.dimmed)},disabled:function(){c.removeClass(p.disabled)},variation:function(e){(e=e||f.variation)&&c.removeClass(e)}},setting:function(i,n){if(u.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,f,i);else{if(void 0===n)return f[i];e.isPlainObject(f[i])?e.extend(!0,f[i],n):f[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,u,i);else{if(void 0===n)return u[i];u[i]=n}},debug:function(){!f.silent&&f.debug&&(f.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,f.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),u.verbose.apply(console,arguments)))},error:function(){f.silent||(u.error=Function.prototype.bind.call(console.error,console,f.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var i,n;f.performance&&(n=(i=(new Date).getTime())-(a||i),a=i,r.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:D,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var i=f.name+":",n=0;a=!1,clearTimeout(u.performance.timer),e.each(r,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",C&&(i+=" '"+C+"'"),o.length>1&&(i+=" ("+o.length+")"),(void 0!==console.group||void 0!==console.table)&&r.length>0&&(console.groupCollapsed(i),console.table?console.table(r):e.each(r,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(i,n,o){var a,r,s,d=T;return n=n||m,o=D||o,"string"==typeof i&&void 0!==d&&(i=i.split(/[\. ]/),a=i.length-1,e.each(i,function(n,t){var o=n!=a?t+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(d[o])&&n!=a)d=d[o];else{if(void 0!==d[o])return r=d[o],!1;if(!e.isPlainObject(d[t])||n==a)return void 0!==d[t]?(r=d[t],!1):(u.error(h.method,i),!1);d=d[t]}})),e.isFunction(r)?s=r.apply(o,n):void 0!==r&&(s=r),e.isArray(t)?t.push(s):void 0!==t?t=[t,s]:void 0!==s&&(t=s),r}}).preinitialize(),d?(void 0===T&&u.initialize(),u.invoke(s)):(void 0!==T&&T.invoke("destroy"),u.initialize())}),void 0!==t?t:this},e.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return e("<div />").attr("class","ui dimmer")}}}}(jQuery,window,document);