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