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