/* * # Fomantic UI - 2.9.3 * https://github.com/fomantic/Fomantic-UI * https://fomantic-ui.com/ * * Copyright 2023 Contributors * Released under the MIT license * https://opensource.org/licenses/MIT * */ !function(R,U,V){"use strict";function _(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,R.fn.modal=function(N){var I,e=R(this),j=R(U),z=R(V),q=R("body"),B=Date.now(),W=[],P=N,K="string"==typeof P,Q=[].slice.call(arguments,1),X=function(e,t){var i;return 0<=[U,V].indexOf(e)?i=q:0===(i=R(t.document).find(e)).length&&(i=t.frameElement?X(e,t.parent):q),i};return e.each(function(){var i,o,a,e,n,t,s,r,c,l,d,u=R.isPlainObject(N)?R.extend(!0,{},R.fn.modal.settings,N):R.extend({},R.fn.modal.settings),f=u.selector,m=u.className,h=u.namespace,g=u.fields,v=u.error,p="."+h,b="module-"+h,y=R(this),x=X(u.context,U),k=x[0]===q[0],w=y.find(f.closeIcon),C=y.hasClass("modal"),S=this,M=C?y.data(b):void 0,A=!1,D="",T="",H=!1,F=!1,E=!1,O=!1,L={initialize:function(){var a;L.create.id(),C||(L.create.modal(),_(u.onHidden)||(u.onHidden=function(){L.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(f.title).html(L.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(L.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),L.has.configActions()&&(0===(a=y.find(f.actions).addClass(u.classActions)).length?a=R("
",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):a.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"':"",i=L.helpers.escape(e[g.text]||"",u.preserveHTML),n=L.helpers.deQuote(e[g.class]||""),o=e[g.click]&&_(e[g.click])?e[g.click]:function(){};a.append(R("",{html:t+i,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+n,on:{click:function(){var e=R(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(S,y)||L.hide()}}}))})),L.cache={},L.verbose("Initializing dimmer",x),L.create.dimmer(),u.allowMultiple&&L.create.innerDimmer(),u.centered||y.addClass("top aligned"),L.refreshModals(),L.bind.events(),L.observeChanges(),L.instantiate(),u.autoShow&&L.show()},instantiate:function(){L.verbose("Storing instance of modal"),M=L,y.data(b,M)},create:{modal:function(){var e;y=R("",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(w=R("",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(w)),""!==u.title&&(e="_"+L.get.id()+"title",y.attr("aria-labelledby",e),R("",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+L.get.id()+"desc",y.attr("aria-describedby",e),R("",{class:m.content,id:e}).appendTo(y)),L.has.configActions()&&R("",{class:m.actions}).appendTo(y),x.append(y),S=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=R.extend(!0,e,u.dimmerSettings);void 0===R.fn.dimmer?L.error(v.dimmer):(L.debug("Creating dimmer"),n=x.dimmer(e),H=L.is.scrolling(),u.detachable?(L.verbose("Modal is detachable, moving content into dimmer"),n.dimmer("add content",y)):L.set.undetached(),t=n.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),c="."+l,L.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&R("",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),L.verbose("Destroying previous modal"),y.removeData(b).off(p),j.off(c),x.off(c),t.off(c),w.off(c),i&&i.off(c),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in U&&((d=new MutationObserver(function(e){function o(e){for(var t=[],i=0,n=e.length;i