/* * # 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(N,V,W,z){"use strict";N.isFunction=N.isFunction||function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},V=void 0!==V&&V.Math==Math?V:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),N.fn.popup=function(x){var E,t=N(this),k=N(W),S=N(V),A=N("body"),F=t.selector||"",D="ontouchstart"in W.documentElement?"touchstart":"click",O=(new Date).getTime(),j=[],R=x,M="string"==typeof R,H=[].slice.call(arguments,1);return t.each(function(){var u,c,t,e,o,d,f=N.isPlainObject(x)?N.extend(!0,{},N.fn.popup.settings,x):N.extend({},N.fn.popup.settings),i=f.selector,h=f.className,g=f.error,m=f.metadata,n=f.namespace,r="."+f.namespace,a="module-"+n,v=N(this),s=N(f.context),p=N(f.scrollContext),b=N(f.boundary),w=f.target?N(f.target):v,y=0,l=!1,P=!1,C=this,T=v.data(a);d={initialize:function(){d.debug("Initializing",v),d.createID(),d.bind.events(),!d.exists()&&f.preserve&&d.create(),f.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){d.verbose("Storing instance",d),T=d,v.data(a,T)},observeChanges:function(){"MutationObserver"in V&&((t=new MutationObserver(d.event.documentChanged)).observe(W,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",t))},refresh:function(){f.popup?u=N(f.popup).eq(0):f.inline&&(u=w.nextAll(i.popup).eq(0),f.popup=u),f.popup?(u.addClass(h.loading),c=d.get.offsetParent(),u.removeClass(h.loading),f.movePopup&&d.has.popup()&&d.get.offsetParent(u)[0]!==c[0]&&(d.debug("Moving popup to the same offset parent as target"),u.detach().appendTo(c))):c=f.inline?d.get.offsetParent(w):d.has.popup()?d.get.offsetParent(u):A,c.is("html")&&c[0]!==A[0]&&(d.debug("Setting page as offset parent"),c=A),d.get.variation()&&d.set.variation()},reposition:function(){d.refresh(),d.set.position()},destroy:function(){d.debug("Destroying previous module"),t&&t.disconnect(),u&&!f.preserve&&d.removePopup(),clearTimeout(d.hideTimer),clearTimeout(d.showTimer),d.unbind.close(),d.unbind.events(),v.removeData(a)},event:{start:function(t){var e=N.isPlainObject(f.delay)?f.delay.show:f.delay;clearTimeout(d.hideTimer),(!P||P&&f.addTouchEvents)&&(d.showTimer=setTimeout(d.show,e))},end:function(){var t=N.isPlainObject(f.delay)?f.delay.hide:f.delay;clearTimeout(d.showTimer),d.hideTimer=setTimeout(d.hide,t)},touchstart:function(t){P=!0,f.addTouchEvents&&d.show()},resize:function(){d.is.visible()&&d.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==C||0").addClass(h.popup).data(m.activator,v).html(t),f.inline?(d.verbose("Inserting popup element inline",u),u.insertAfter(v)):(d.verbose("Appending popup element to body",u),u.appendTo(s)),d.refresh(),d.set.variation(),f.hoverable&&d.bind.popup(),f.onCreate.call(u,C)):f.popup?(N(f.popup).data(m.activator,v),d.verbose("Used popup specified in settings"),d.refresh(),f.hoverable&&d.bind.popup()):0!==w.next(i.popup).length?(d.verbose("Pre-existing popup found"),f.inline=!0,f.popup=w.next(i.popup).data(m.activator,v),d.refresh(),f.hoverable&&d.bind.popup()):d.debug("No content specified skipping display",C)},createID:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),e="."+o,d.verbose("Creating unique id for element",o)},toggle:function(){d.debug("Toggling pop-up"),d.is.hidden()?(d.debug("Popup is hidden, showing pop-up"),d.unbind.close(),d.show()):(d.debug("Popup is visible, hiding pop-up"),d.hide())},show:function(t){if(t=t||function(){},d.debug("Showing pop-up",f.transition),d.is.hidden()&&(!d.is.active()||!d.is.dropdown())){if(d.exists()||d.create(),!1===f.onShow.call(u,C))return void d.debug("onShow callback returned false, cancelling popup animation");f.preserve||f.popup||d.refresh(),u&&d.set.position()&&(d.save.conditions(),f.exclusive&&d.hideAll(),d.animate.show(t))}},hide:function(t){if(t=t||function(){},d.is.visible()||d.is.animating()){if(!1===f.onHide.call(u,C))return void d.debug("onHide callback returned false, cancelling popup animation");d.remove.visible(),d.unbind.close(),d.restore.conditions(),d.animate.hide(t)}},hideAll:function(){N(i.popup).filter("."+h.popupVisible).each(function(){N(this).data(m.activator).popup("hide")})},exists:function(){return!!u&&(f.inline||f.popup?d.has.popup():1<=u.closest(s).length)},removePopup:function(){d.has.popup()&&!f.popup&&(d.debug("Removing popup",u),u.remove(),u=z,f.onRemove.call(u,C))},save:{conditions:function(){d.cache={title:v.attr("title")},d.cache.title&&v.removeAttr("title"),d.verbose("Saving original attributes",d.cache.title)}},restore:{conditions:function(){return d.cache&&d.cache.title&&(v.attr("title",d.cache.title),d.verbose("Restoring original attributes",d.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=N.isFunction(t)?t:function(){},f.transition&&N.fn.transition!==z&&v.transition("is supported")?(d.set.visible(),u.transition({animation:(f.transition.showMethod||f.transition)+" in",queue:!1,debug:f.debug,verbose:f.verbose,duration:f.transition.showDuration||f.duration,onComplete:function(){d.bind.close(),t.call(u,C),f.onVisible.call(u,C)}})):d.error(g.noTransition)},hide:function(t){t=N.isFunction(t)?t:function(){},d.debug("Hiding pop-up"),f.transition&&N.fn.transition!==z&&v.transition("is supported")?u.transition({animation:(f.transition.hideMethod||f.transition)+" out",queue:!1,duration:f.transition.hideDuration||f.duration,debug:f.debug,verbose:f.verbose,onComplete:function(){d.reset(),t.call(u,C),f.onHidden.call(u,C)}}):d.error(g.noTransition)}},change:{content:function(t){u.html(t)}},get:{html:function(){return v.removeData(m.html),v.data(m.html)||f.html},title:function(){return v.removeData(m.title),v.data(m.title)||f.title},content:function(){return v.removeData(m.content),v.data(m.content)||f.content||v.attr("title")},variation:function(){return v.removeData(m.variation),v.data(m.variation)||f.variation},popup:function(){return u},popupOffset:function(){return u.offset()},calculations:function(){var t,e=d.get.offsetParent(u),o=w[0],n=b[0]==V,i=w.offset(),r=f.inline||f.popup&&f.movePopup?w.offsetParent().offset():{top:0,left:0},a=n?{top:0,left:0}:b.offset(),s={},p=n?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0};if(s={target:{element:w[0],width:w.outerWidth(),height:w.outerHeight(),top:i.top-r.top,left:i.left-r.left,margin:{}},popup:{width:u.outerWidth(),height:u.outerHeight()},parent:{width:c.outerWidth(),height:c.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:p.top,left:p.left},width:b.width(),height:b.height()}},e.get(0)!==c.get(0)){var l=e.offset();s.target.top-=l.top,s.target.left-=l.left,s.parent.width=e.outerWidth(),s.parent.height=e.outerHeight()}return f.setFluidWidth&&d.is.fluid()&&(s.container={width:u.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=f.inline?parseInt(V.getComputedStyle(o).getPropertyValue("margin-top"),10):0,s.target.margin.left=f.inline?d.is.rtl()?parseInt(V.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(V.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=s.screen,s.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},s},id:function(){return o},startEvent:function(){return"hover"==f.on?"mouseenter":"focus"==f.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==f.on?"mouseleave":"focus"==f.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return o=(e=e||d.get.calculations()).popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},d.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(t){var e=(t!==z?t[0]:w[0]).parentNode,o=N(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=N(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(t)?(t=t.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=N.fn.popup.settings.templates.escape;return typeof t!==z&&(typeof t.title!==z&&t.title&&(t.title=o(t.title),e+='
'+t.title+"
"),typeof t.content!==z&&t.content&&(t.content=o(t.content),e+='
'+t.content+"
")),e}}}}(jQuery,window,document);