/* * # 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(O,z,A,w){"use strict";O.isFunction=O.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},z=void 0!==z&&z.Math==Math?z:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.fn.visibility=function(h){var P,e=O(this),x=e.selector||"",y=(new Date).getTime(),C=[],S=h,R="string"==typeof S,V=[].slice.call(arguments,1),k=e.length,T=0;return e.each(function(){var e,o,n,i=O.isPlainObject(h)?O.extend(!0,{},O.fn.visibility.settings,h):O.extend({},O.fn.visibility.settings),d=i.className,u=i.namespace,f=i.error,b=i.metadata,t="."+u,g="module-"+u,m=O(z),s=O(this),c=O(i.context),r=s.data(g),p=z.requestAnimationFrame||z.mozRequestAnimationFrame||z.webkitRequestAnimationFrame||z.msRequestAnimationFrame||function(e){setTimeout(e,0)},a=this,v=!1,l={initialize:function(){l.debug("Initializing",i),l.setup.cache(),l.should.trackChanges()&&("image"==i.type&&l.setup.image(),"fixed"==i.type&&l.setup.fixed(),i.observeChanges&&l.observeChanges(),l.bind.events()),l.save.position(),l.is.visible()||l.error(f.visible,s),i.initialCheck&&l.checkVisibility(),l.instantiate()},instantiate:function(){l.debug("Storing instance",l),s.data(g,l),r=l},destroy:function(){l.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),m.off("load"+t,l.event.load).off("resize"+t,l.event.resize),c.off("scroll"+t,l.event.scroll).off("scrollchange"+t,l.event.scrollchange),"fixed"==i.type&&(l.resetFixed(),l.remove.placeholder()),s.off(t).removeData(g)},observeChanges:function(){"MutationObserver"in z&&(o=new MutationObserver(l.event.contextChanged),n=new MutationObserver(l.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(a,{childList:!0,subtree:!0}),l.debug("Setting up mutation observer",n))},bind:{events:function(){l.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&m.on("load"+t,l.event.load),m.on("resize"+t,l.event.resize),c.off("scroll"+t).on("scroll"+t,l.event.scroll).on("scrollchange"+t,l.event.scrollchange)}},event:{changed:function(e){l.verbose("DOM tree modified, updating visibility calculations"),l.timer=setTimeout(function(){l.verbose("DOM tree modified, updating sticky menu"),l.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==a||0=e.length&&O.isFunction(o)&&o()};n--;)(s=A.createElement("img")).onload=c,s.onerror=c,s.src=e[n],i.push(s)},enableCallbacks:function(){l.debug("Allowing callbacks to occur"),v=!1},disableCallbacks:function(){l.debug("Disabling all callbacks temporarily"),v=!0},should:{trackChanges:function(){return R?(l.debug("One time query, no need to bind events"),!1):(l.debug("Callbacks being attached"),!0)}},setup:{cache:function(){l.cache={occurred:{},screen:{},element:{}}},image:function(){var e=s.data(b.src);e&&(l.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){l.debug("Image on screen",a),l.precache(e,function(){l.set.image(e,function(){++T==k&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){l.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,h.transition||(i.transition=!1),l.create.placeholder(),l.debug("Added placeholder",e),i.onTopPassed=function(){l.debug("Element passed, adding fixed position",s),l.show.placeholder(),l.set.fixed(),i.transition&&O.fn.transition!==w&&s.transition(i.transition,i.duration)},i.onTopPassedReverse=function(){l.debug("Element returned to position, removing fixed",s),l.hide.placeholder(),l.remove.fixed()}}},create:{placeholder:function(){l.verbose("Creating fixed position placeholder"),e=s.clone(!1).css("display","none").addClass(d.placeholder).insertAfter(s)}},show:{placeholder:function(){l.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){l.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){l.verbose("Setting element to fixed position"),s.addClass(d.fixed).css({position:"fixed",top:i.offset+"px",left:"auto",zIndex:i.zIndex}),i.onFixed.call(a)},image:function(e,o){s.attr("src",e),i.transition?O.fn.transition!==w?s.hasClass(d.visible)?l.debug("Transition already occurred on this image, skipping animation"):s.transition(i.transition,i.duration,o):s.fadeIn(i.duration,o):s.show()}},is:{onScreen:function(){return l.get.elementCalculations().onScreen},offScreen:function(){return l.get.elementCalculations().offScreen},visible:function(){return!(!l.cache||!l.cache.element)&&!(0===l.cache.element.width&&0===l.cache.element.offset.top)},verticallyScrollableContext:function(){var e=c.get(0)!==z&&c.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=c.get(0)!==z&&c.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){l.debug("Refreshing constants (width/height)"),"fixed"==i.type&&l.resetFixed(),l.reset(),l.save.position(),i.checkOnRefresh&&l.checkVisibility(),i.onRefresh.call(a)},resetFixed:function(){l.remove.fixed(),l.remove.occurred()},reset:function(){l.verbose("Resetting all cached values"),O.isPlainObject(l.cache)&&(l.cache.screen={},l.cache.element={})},checkVisibility:function(e){l.verbose("Checking visibility of element",l.cache.element),!v&&l.is.visible()&&(l.save.scroll(e),l.save.calculations(),l.passed(),l.passingReverse(),l.topVisibleReverse(),l.bottomVisibleReverse(),l.topPassedReverse(),l.bottomPassedReverse(),l.onScreen(),l.offScreen(),l.passing(),l.topVisible(),l.bottomVisible(),l.topPassed(),l.bottomPassed(),i.onUpdate&&i.onUpdate.call(a,l.get.elementCalculations()))},passed:function(e,o){var n=l.get.elementCalculations();if(e&&o)i.onPassed[e]=o;else{if(e!==w)return l.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&O.each(i.onPassed,function(e,o){n.bottomVisible||n.pixelsPassed>l.get.pixelsPassed(e)?l.execute(o,e):i.once||l.remove.occurred(o)})}},onScreen:function(e){var o=l.get.elementCalculations(),n=e||i.onOnScreen,t="onScreen";if(e&&(l.debug("Adding callback for onScreen",e),i.onOnScreen=e),o.onScreen?l.execute(n,t):i.once||l.remove.occurred(t),e!==w)return o.onOnScreen},offScreen:function(e){var o=l.get.elementCalculations(),n=e||i.onOffScreen,t="offScreen";if(e&&(l.debug("Adding callback for offScreen",e),i.onOffScreen=e),o.offScreen?l.execute(n,t):i.once||l.remove.occurred(t),e!==w)return o.onOffScreen},passing:function(e){var o=l.get.elementCalculations(),n=e||i.onPassing,t="passing";if(e&&(l.debug("Adding callback for passing",e),i.onPassing=e),o.passing?l.execute(n,t):i.once||l.remove.occurred(t),e!==w)return o.passing},topVisible:function(e){var o=l.get.elementCalculations(),n=e||i.onTopVisible,t="topVisible";if(e&&(l.debug("Adding callback for top visible",e),i.onTopVisible=e),o.topVisible?l.execute(n,t):i.once||l.remove.occurred(t),e===w)return o.topVisible},bottomVisible:function(e){var o=l.get.elementCalculations(),n=e||i.onBottomVisible,t="bottomVisible";if(e&&(l.debug("Adding callback for bottom visible",e),i.onBottomVisible=e),o.bottomVisible?l.execute(n,t):i.once||l.remove.occurred(t),e===w)return o.bottomVisible},topPassed:function(e){var o=l.get.elementCalculations(),n=e||i.onTopPassed,t="topPassed";if(e&&(l.debug("Adding callback for top passed",e),i.onTopPassed=e),o.topPassed?l.execute(n,t):i.once||l.remove.occurred(t),e===w)return o.topPassed},bottomPassed:function(e){var o=l.get.elementCalculations(),n=e||i.onBottomPassed,t="bottomPassed";if(e&&(l.debug("Adding callback for bottom passed",e),i.onBottomPassed=e),o.bottomPassed?l.execute(n,t):i.once||l.remove.occurred(t),e===w)return o.bottomPassed},passingReverse:function(e){var o=l.get.elementCalculations(),n=e||i.onPassingReverse,t="passingReverse";if(e&&(l.debug("Adding callback for passing reverse",e),i.onPassingReverse=e),o.passing?i.once||l.remove.occurred(t):l.get.occurred("passing")&&l.execute(n,t),e!==w)return!o.passing},topVisibleReverse:function(e){var o=l.get.elementCalculations(),n=e||i.onTopVisibleReverse,t="topVisibleReverse";if(e&&(l.debug("Adding callback for top visible reverse",e),i.onTopVisibleReverse=e),o.topVisible?i.once||l.remove.occurred(t):l.get.occurred("topVisible")&&l.execute(n,t),e===w)return!o.topVisible},bottomVisibleReverse:function(e){var o=l.get.elementCalculations(),n=e||i.onBottomVisibleReverse,t="bottomVisibleReverse";if(e&&(l.debug("Adding callback for bottom visible reverse",e),i.onBottomVisibleReverse=e),o.bottomVisible?i.once||l.remove.occurred(t):l.get.occurred("bottomVisible")&&l.execute(n,t),e===w)return!o.bottomVisible},topPassedReverse:function(e){var o=l.get.elementCalculations(),n=e||i.onTopPassedReverse,t="topPassedReverse";if(e&&(l.debug("Adding callback for top passed reverse",e),i.onTopPassedReverse=e),o.topPassed?i.once||l.remove.occurred(t):l.get.occurred("topPassed")&&l.execute(n,t),e===w)return!o.onTopPassed},bottomPassedReverse:function(e){var o=l.get.elementCalculations(),n=e||i.onBottomPassedReverse,t="bottomPassedReverse";if(e&&(l.debug("Adding callback for bottom passed reverse",e),i.onBottomPassedReverse=e),o.bottomPassed?i.once||l.remove.occurred(t):l.get.occurred("bottomPassed")&&l.execute(n,t),e===w)return!o.bottomPassed},execute:function(e,o){var n=l.get.elementCalculations(),t=l.get.screenCalculations();(e=e||!1)&&(i.continuous?(l.debug("Callback being called continuously",o,n),e.call(a,n,t)):l.get.occurred(o)||(l.debug("Conditions met",o,n),e.call(a,n,t))),l.save.occurred(o)},remove:{fixed:function(){l.debug("Removing fixed position"),s.removeClass(d.fixed).css({position:"",top:"",left:"",zIndex:""}),i.onUnfixed.call(a)},placeholder:function(){l.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var o;e?(o=l.cache.occurred)[e]!==w&&!0===o[e]&&(l.debug("Callback can now be called again",e),l.cache.occurred[e]=!1):l.cache.occurred={}}},save:{calculations:function(){l.verbose("Saving all calculations necessary to determine positioning"),l.save.direction(),l.save.screenCalculations(),l.save.elementCalculations()},occurred:function(e){e&&(l.cache.occurred[e]!==w&&!0===l.cache.occurred[e]||(l.verbose("Saving callback occurred",e),l.cache.occurred[e]=!0))},scroll:function(e){e=e+i.offset||c.scrollTop()+i.offset,l.cache.scroll=e},direction:function(){var e=l.get.scroll(),o=l.get.lastScroll(),e=o=o.top,o.bottomPassed=e.top>=o.bottom,o.topVisible=e.bottom>=o.top&&!o.topPassed,o.bottomVisible=e.bottom>=o.bottom&&!o.bottomPassed,o.pixelsPassed=0,o.percentagePassed=0,o.onScreen=(o.topVisible||o.passing)&&!o.bottomPassed,o.passing=o.topPassed&&!o.bottomPassed,o.offScreen=!o.onScreen,o.passing&&(o.pixelsPassed=e.top-o.top,o.percentagePassed=(e.top-o.top)/o.height),l.cache.element=o,l.verbose("Updated element calculations",o),o},screenCalculations:function(){var e=l.get.scroll();return l.save.direction(),l.cache.screen.top=e,l.cache.screen.bottom=e+l.cache.screen.height,l.cache.screen},screenSize:function(){l.verbose("Saving window position"),l.cache.screen={height:c.height()}},position:function(){l.save.screenSize(),l.save.elementPosition()}},get:{pixelsPassed:function(e){var o=l.get.elementCalculations();return-1