/*
* # Fomantic UI - 2.8.8
* https://github.com/fomantic/Fomantic-UI
* http://fomantic-ui.com/
*
* Copyright 2021 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(A,e,n,D){"use strict";A.isFunction=A.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),A.fn.toast=function(w){var k,e=A(this),T=e.selector||"",x=(new Date).getTime(),I=[],P=w,O="string"==typeof P,M=[].slice.call(arguments,1);return e.each(function(){var o,s,a,i,c,l,r,u,d=A.isPlainObject(w)?A.extend(!0,{},A.fn.toast.settings,w):A.extend({},A.fn.toast.settings),p=d.className,f=d.selector,m=d.error,e=d.namespace,g=d.fields,n="."+e,t=e+"-module",h=A(this),v=d.context?A(d.context):A("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=b?h.data(t):D;u={initialize:function(){u.verbose("Initializing element"),u.has.container()||u.create.container(),(b||""!==d.message||""!==d.title||""!==u.get.iconClass()||d.showImage||u.has.configActions())&&("string"==typeof d.showProgress&&-1!==[p.top,p.bottom].indexOf(d.showProgress)||(d.showProgress=!1),u.create.toast(),d.closeOnClick&&(d.closeIcon||0",{class:d.position+" "+p.container+" "+(d.horizontal?p.horizontal:"")}))},toast:function(){o=A("
",{class:p.box});var e=u.get.iconClass();if(b)s=d.cloneModule?h.clone().removeAttr("id"):h,r=s.find("> i"+u.helpers.toClass(p.close)),d.closeIcon=0");var n=A("",{class:p.content});""!==e&&s.append(A("",{class:e+" "+p.icon})),d.showImage&&s.append(A("",{class:p.image+" "+d.classImage,src:d.showImage})),""!==d.title&&n.append(A("",{class:p.title,text:d.title})),n.append(A("",{class:p.message,html:u.helpers.escape(d.message,d.preserveHTML)})),s.addClass(d.class+" "+p.toast).append(n),s.css("opacity",d.opacity),d.closeIcon&&((r=A("",{class:p.close+" "+("string"==typeof d.closeIcon?d.closeIcon:"")})).hasClass(p.left)?s.prepend(r):s.append(r))}if(s.hasClass(p.compact)&&(d.compact=!0),s.hasClass("card")&&(d.compact=!1),a=s.find(".actions"),u.has.configActions()&&(0===a.length&&(a=A("",{class:p.actions+" "+(d.classActions||"")}).appendTo(s)),s.hasClass("card")&&!a.hasClass(p.attached)&&(a.addClass(p.extraContent),a.hasClass(p.vertical)&&(a.removeClass(p.vertical),u.error(m.verticalCard))),d.actions.forEach(function(e){var n=e[g.icon]?'':"",t=u.helpers.escape(e[g.text]||"",d.preserveHTML),o=u.helpers.deQuote(e[g.class]||""),s=e[g.click]&&A.isFunction(e[g.click])?e[g.click]:function(){};a.append(A("",{html:n+t,class:p.button+" "+o,click:function(){!1!==s.call(C,h)&&u.close()}}))})),a&&a.hasClass(p.vertical)&&s.addClass(p.vertical),0",{class:p.vertical+" "+p.attached+" "+(d.compact?p.compact:"")})),a.hasClass(p.left)?s.addClass(p.left).parent().addClass(p.left).prepend(a):s.parent().append(a)):a.hasClass(p.top)?(o.prepend(a),s.addClass(p.bottom)):(o.append(a),s.addClass(p.top))),h!==s&&(C=(h=s)[0]),0",{class:p.progress+" "+(d.classProgress||d.class),"data-percent":""}),d.classProgress||(s.hasClass("toast")&&!s.hasClass(p.inverted)?i.addClass(p.inverted):i.removeClass(p.inverted)),c=A("",{class:"bar "+(d.progressUp?"up ":"down ")+t}),i.addClass(d.showProgress).append(c),i.hasClass(p.top)?o.prepend(i):o.append(i),c.css("animation-duration",d.displayTime/1e3+"s")),(l=A("",{class:"wait "+t})).css("animation-duration",d.displayTime/1e3+"s"),l.appendTo(s)}d.compact&&(o.addClass(p.compact),s.addClass(p.compact),i&&i.addClass(p.compact)),d.newestOnTop?o.prependTo(u.get.container()):o.appendTo(u.get.container())}},bind:{events:function(){u.debug("Binding events to toast"),(d.closeOnClick||d.closeIcon)&&(d.closeIcon?r:s).on("click"+n,u.event.click),l&&l.on("animationend"+n,u.close),o.on("click"+n,f.approve,u.event.approve).on("click"+n,f.deny,u.event.deny)}},unbind:{events:function(){u.debug("Unbinding events to toast"),(d.closeOnClick||d.closeIcon)&&(d.closeIcon?r:s).off("click"+n),l&&l.off("animationend"+n),o.off("click"+n)}},animate:{show:function(e){e=A.isFunction(e)?e:function(){},d.transition&&u.can.useElement("transition")&&h.transition("is supported")&&(u.set.visible(),o.transition({animation:d.transition.showMethod+" in",queue:!1,debug:d.debug,verbose:d.verbose,duration:d.transition.showDuration,onComplete:function(){e.call(o,C),d.onVisible.call(o,C)}}))},close:function(e){e=A.isFunction(e)?e:function(){},u.debug("Closing toast"),!1!==d.onHide.call(o,C)?d.transition&&A.fn.transition!==D&&h.transition("is supported")?o.transition({animation:d.transition.hideMethod+" out",queue:!1,duration:d.transition.hideDuration,debug:d.debug,verbose:d.verbose,interval:50,onBeforeHide:function(e){e=A.isFunction(e)?e:function(){},""!==d.transition.closeEasing?o&&(o.css("opacity",0),o.wrap("").parent().hide(d.transition.closeDuration,d.transition.closeEasing,function(){o&&(o.parent().remove(),e.call(o))})):e.call(o)},onComplete:function(){e.call(o,C),d.onHidden.call(o,C),u.destroy()}}):u.error(m.noTransition):u.debug("onHide callback returned false, cancelling toast animation")},pause:function(){l.css("animationPlayState","paused"),c&&c.css("animationPlayState","paused")},continue:function(){l.css("animationPlayState","running"),c&&c.css("animationPlayState","running")}},has:{container:function(){return u.verbose("Determining if there is already a container"),0":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},can:{useElement:function(e){return A.fn[e]!==D||(u.error(m.noElement.replace("{element}",e)),!1)}},setting:function(e,n){if(u.debug("Changing setting",e,n),A.isPlainObject(e))A.extend(!0,d,e);else{if(n===D)return d[e];A.isPlainObject(d[e])?A.extend(!0,d[e],n):d[e]=n}},internal:function(e,n){if(A.isPlainObject(e))A.extend(!0,u,e);else{if(n===D)return u[e];u[e]=n}},debug:function(){!d.silent&&d.debug&&(d.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,d.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),u.verbose.apply(console,arguments)))},error:function(){d.silent||(u.error=Function.prototype.bind.call(console.error,console,d.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var n,t;d.performance&&(t=(n=(new Date).getTime())-(x||n),x=n,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":t})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=d.name+":",t=0;x=!1,clearTimeout(u.performance.timer),A.each(I,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",T&&(e+=" '"+T+"'"),(console.group!==D||console.table!==D)&&0 img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},A.extend(A.easing,{easeOutBounce:function(e,n,t,o,s){return(n/=s)<1/2.75?o*(7.5625*n*n)+t:n<2/2.75?o*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?o*(7.5625*(n-=2.25/2.75)*n+.9375)+t:o*(7.5625*(n-=2.625/2.75)*n+.984375)+t},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);