/* * # Fomantic UI - 2.8.4 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(I,R,N,P){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.modal=function(M){var H,e=I(this),T=I(R),D=I(N),A=I("body"),E=e.selector||"",O=(new Date).getTime(),L=[],z=M,j="string"==typeof z,q=[].slice.call(arguments,1),B=R.requestAnimationFrame||R.mozRequestAnimationFrame||R.webkitRequestAnimationFrame||R.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,t,n,a,s,i,c,l,d=I.isPlainObject(M)?I.extend(!0,{},I.fn.modal.settings,M):I.extend({},I.fn.modal.settings),u=d.selector,m=d.className,f=d.namespace,g=d.error,h="."+f,v="module-"+f,b=I(this),p=I(d.context),y=b.find(u.close),w=this,S=b.data(v),C=!1,x="",k="",F={initialize:function(){F.cache={},F.verbose("Initializing dimmer",p),F.create.id(),F.create.dimmer(),d.allowMultiple&&F.create.innerDimmer(),d.centered||b.addClass("top aligned"),F.refreshModals(),F.bind.events(),d.observeChanges&&F.observeChanges(),F.instantiate()},instantiate:function(){F.verbose("Storing instance of modal"),S=F,b.data(v,S)},create:{dimmer:function(){var e={debug:d.debug,dimmerName:"modals"},i=I.extend(!0,e,d.dimmerSettings);I.fn.dimmer!==P?(F.debug("Creating dimmer"),t=p.dimmer(i),d.detachable?(F.verbose("Modal is detachable, moving content into dimmer"),t.dimmer("add content",b)):F.set.undetached(),n=t.dimmer("get dimmer")):F.error(g.dimmer)},id:function(){c=(Math.random().toString(16)+"000000000").substr(2,8),i="."+c,F.verbose("Creating unique id for element",c)},innerDimmer:function(){0==b.find(u.dimmer).length&&b.prepend('
')}},destroy:function(){l&&l.disconnect(),F.verbose("Destroying previous modal"),b.removeData(v).off(h),T.off(i),n.off(i),y.off(h),p.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((l=new MutationObserver(function(e){F.debug("DOM tree modified, refreshing"),F.refresh()})).observe(w,{childList:!0,subtree:!0}),F.debug("Setting up mutation observer",l))},refresh:function(){F.remove.scrolling(),F.cacheSizes(),F.can.useFlex()||F.set.modalOffset(),F.set.screenHeight(),F.set.type()},refreshModals:function(){r=b.siblings(u.modal),o=r.add(b)},attachEvents:function(e,i){var n=I(e);i=I.isFunction(F[i])?F[i]:F.toggle,0