@ntlab/ntjs-assets 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/jquery/jquery.js +10909 -10881
- package/assets/js/jquery/jquery.min.js +2 -2
- package/assets/js/jquery/jquery.slim.js +8810 -0
- package/assets/js/jquery/jquery.slim.min.js +2 -0
- package/assets/js/jquery/jquery.slim.min.map +1 -0
- package/assets/js/semantic-ui/components/accordion.css +177 -37
- package/assets/js/semantic-ui/components/accordion.js +10 -4
- package/assets/js/semantic-ui/components/accordion.min.css +2 -2
- package/assets/js/semantic-ui/components/accordion.min.js +3 -3
- package/assets/js/semantic-ui/components/ad.css +4 -4
- package/assets/js/semantic-ui/components/ad.min.css +2 -2
- package/assets/js/semantic-ui/components/api.js +93 -34
- package/assets/js/semantic-ui/components/api.min.js +3 -3
- package/assets/js/semantic-ui/components/breadcrumb.css +1 -1
- package/assets/js/semantic-ui/components/breadcrumb.min.css +1 -1
- package/assets/js/semantic-ui/components/button.css +204 -157
- package/assets/js/semantic-ui/components/button.min.css +2 -2
- package/assets/js/semantic-ui/components/calendar.css +18 -1
- package/assets/js/semantic-ui/components/calendar.js +201 -83
- package/assets/js/semantic-ui/components/calendar.min.css +2 -2
- package/assets/js/semantic-ui/components/calendar.min.js +3 -3
- package/assets/js/semantic-ui/components/card.css +754 -117
- package/assets/js/semantic-ui/components/card.min.css +2 -2
- package/assets/js/semantic-ui/components/checkbox.css +93 -92
- package/assets/js/semantic-ui/components/checkbox.js +21 -14
- package/assets/js/semantic-ui/components/checkbox.min.css +2 -2
- package/assets/js/semantic-ui/components/checkbox.min.js +3 -3
- package/assets/js/semantic-ui/components/comment.css +12 -12
- package/assets/js/semantic-ui/components/comment.min.css +2 -2
- package/assets/js/semantic-ui/components/container.css +98 -4
- package/assets/js/semantic-ui/components/container.min.css +2 -2
- package/assets/js/semantic-ui/components/dimmer.css +33 -18
- package/assets/js/semantic-ui/components/dimmer.js +25 -10
- package/assets/js/semantic-ui/components/dimmer.min.css +2 -2
- package/assets/js/semantic-ui/components/dimmer.min.js +3 -3
- package/assets/js/semantic-ui/components/divider.css +31 -31
- package/assets/js/semantic-ui/components/divider.min.css +2 -2
- package/assets/js/semantic-ui/components/dropdown.css +101 -51
- package/assets/js/semantic-ui/components/dropdown.js +250 -205
- package/assets/js/semantic-ui/components/dropdown.min.css +2 -2
- package/assets/js/semantic-ui/components/dropdown.min.js +3 -3
- package/assets/js/semantic-ui/components/embed.css +5 -5
- package/assets/js/semantic-ui/components/embed.js +14 -10
- package/assets/js/semantic-ui/components/embed.min.css +2 -2
- package/assets/js/semantic-ui/components/embed.min.js +3 -3
- package/assets/js/semantic-ui/components/emoji.css +10799 -8841
- package/assets/js/semantic-ui/components/emoji.min.css +1 -1
- package/assets/js/semantic-ui/components/feed.css +29 -29
- package/assets/js/semantic-ui/components/feed.min.css +2 -2
- package/assets/js/semantic-ui/components/flag.css +1021 -915
- package/assets/js/semantic-ui/components/flag.min.css +2 -2
- package/assets/js/semantic-ui/components/flyout.css +592 -0
- package/assets/js/semantic-ui/components/flyout.js +1530 -0
- package/assets/js/semantic-ui/components/flyout.min.css +9 -0
- package/assets/js/semantic-ui/components/flyout.min.js +11 -0
- package/assets/js/semantic-ui/components/form.css +160 -83
- package/assets/js/semantic-ui/components/form.js +48 -42
- package/assets/js/semantic-ui/components/form.min.css +2 -2
- package/assets/js/semantic-ui/components/form.min.js +3 -3
- package/assets/js/semantic-ui/components/grid.css +25 -21
- package/assets/js/semantic-ui/components/grid.min.css +2 -2
- package/assets/js/semantic-ui/components/header.css +6 -4
- package/assets/js/semantic-ui/components/header.min.css +2 -2
- package/assets/js/semantic-ui/components/icon.css +2110 -2061
- package/assets/js/semantic-ui/components/icon.min.css +2 -2
- package/assets/js/semantic-ui/components/image.css +1 -1
- package/assets/js/semantic-ui/components/image.min.css +1 -1
- package/assets/js/semantic-ui/components/input.css +759 -22
- package/assets/js/semantic-ui/components/input.min.css +2 -2
- package/assets/js/semantic-ui/components/item.css +17 -17
- package/assets/js/semantic-ui/components/item.min.css +2 -2
- package/assets/js/semantic-ui/components/label.css +72 -68
- package/assets/js/semantic-ui/components/label.min.css +2 -2
- package/assets/js/semantic-ui/components/list.css +31 -31
- package/assets/js/semantic-ui/components/list.min.css +2 -2
- package/assets/js/semantic-ui/components/loader.css +352 -352
- package/assets/js/semantic-ui/components/loader.min.css +2 -2
- package/assets/js/semantic-ui/components/menu.css +108 -76
- package/assets/js/semantic-ui/components/menu.min.css +1 -1
- package/assets/js/semantic-ui/components/message.css +43 -43
- package/assets/js/semantic-ui/components/message.min.css +2 -2
- package/assets/js/semantic-ui/components/modal.css +37 -6
- package/assets/js/semantic-ui/components/modal.js +188 -84
- package/assets/js/semantic-ui/components/modal.min.css +2 -2
- package/assets/js/semantic-ui/components/modal.min.js +3 -3
- package/assets/js/semantic-ui/components/nag.css +1 -1
- package/assets/js/semantic-ui/components/nag.js +3 -3
- package/assets/js/semantic-ui/components/nag.min.css +1 -1
- package/assets/js/semantic-ui/components/nag.min.js +3 -3
- package/assets/js/semantic-ui/components/placeholder.css +33 -33
- package/assets/js/semantic-ui/components/placeholder.min.css +2 -2
- package/assets/js/semantic-ui/components/popup.css +103 -105
- package/assets/js/semantic-ui/components/popup.js +17 -23
- package/assets/js/semantic-ui/components/popup.min.css +2 -2
- package/assets/js/semantic-ui/components/popup.min.js +3 -3
- package/assets/js/semantic-ui/components/progress.css +1 -1
- package/assets/js/semantic-ui/components/progress.js +6 -3
- package/assets/js/semantic-ui/components/progress.min.css +1 -1
- package/assets/js/semantic-ui/components/progress.min.js +3 -3
- package/assets/js/semantic-ui/components/rail.css +1 -1
- package/assets/js/semantic-ui/components/rail.min.css +1 -1
- package/assets/js/semantic-ui/components/rating.css +7 -46
- package/assets/js/semantic-ui/components/rating.js +8 -4
- package/assets/js/semantic-ui/components/rating.min.css +2 -2
- package/assets/js/semantic-ui/components/rating.min.js +3 -3
- package/assets/js/semantic-ui/components/reset.css +5 -4
- package/assets/js/semantic-ui/components/reset.min.css +2 -2
- package/assets/js/semantic-ui/components/reveal.css +1 -1
- package/assets/js/semantic-ui/components/reveal.min.css +1 -1
- package/assets/js/semantic-ui/components/search.css +6 -6
- package/assets/js/semantic-ui/components/search.js +48 -21
- package/assets/js/semantic-ui/components/search.min.css +2 -2
- package/assets/js/semantic-ui/components/search.min.js +3 -3
- package/assets/js/semantic-ui/components/segment.css +118 -34
- package/assets/js/semantic-ui/components/segment.min.css +2 -2
- package/assets/js/semantic-ui/components/shape.css +1 -1
- package/assets/js/semantic-ui/components/shape.js +4 -4
- package/assets/js/semantic-ui/components/shape.min.css +1 -1
- package/assets/js/semantic-ui/components/shape.min.js +3 -3
- package/assets/js/semantic-ui/components/sidebar.css +23 -9
- package/assets/js/semantic-ui/components/sidebar.js +141 -44
- package/assets/js/semantic-ui/components/sidebar.min.css +2 -2
- package/assets/js/semantic-ui/components/sidebar.min.js +3 -3
- package/assets/js/semantic-ui/components/site.css +139 -42
- package/assets/js/semantic-ui/components/site.js +2 -2
- package/assets/js/semantic-ui/components/site.min.css +2 -2
- package/assets/js/semantic-ui/components/site.min.js +3 -3
- package/assets/js/semantic-ui/components/slider.css +17 -17
- package/assets/js/semantic-ui/components/slider.js +79 -64
- package/assets/js/semantic-ui/components/slider.min.css +1 -1
- package/assets/js/semantic-ui/components/slider.min.js +3 -3
- package/assets/js/semantic-ui/components/state.js +3 -3
- package/assets/js/semantic-ui/components/state.min.js +3 -3
- package/assets/js/semantic-ui/components/statistic.css +4 -4
- package/assets/js/semantic-ui/components/statistic.min.css +2 -2
- package/assets/js/semantic-ui/components/step.css +32 -32
- package/assets/js/semantic-ui/components/step.min.css +2 -2
- package/assets/js/semantic-ui/components/sticky.css +1 -1
- package/assets/js/semantic-ui/components/sticky.js +31 -20
- package/assets/js/semantic-ui/components/sticky.min.css +1 -1
- package/assets/js/semantic-ui/components/sticky.min.js +3 -3
- package/assets/js/semantic-ui/components/tab.css +5 -5
- package/assets/js/semantic-ui/components/tab.js +25 -7
- package/assets/js/semantic-ui/components/tab.min.css +2 -2
- package/assets/js/semantic-ui/components/tab.min.js +3 -3
- package/assets/js/semantic-ui/components/table.css +1684 -272
- package/assets/js/semantic-ui/components/table.min.css +2 -2
- package/assets/js/semantic-ui/components/text.css +1 -1
- package/assets/js/semantic-ui/components/text.min.css +1 -1
- package/assets/js/semantic-ui/components/toast.css +49 -1
- package/assets/js/semantic-ui/components/toast.js +68 -34
- package/assets/js/semantic-ui/components/toast.min.css +2 -2
- package/assets/js/semantic-ui/components/toast.min.js +3 -3
- package/assets/js/semantic-ui/components/transition.css +1 -1
- package/assets/js/semantic-ui/components/transition.js +27 -22
- package/assets/js/semantic-ui/components/transition.min.css +1 -1
- package/assets/js/semantic-ui/components/transition.min.js +3 -3
- package/assets/js/semantic-ui/components/visibility.js +5 -5
- package/assets/js/semantic-ui/components/visibility.min.js +3 -3
- package/assets/js/semantic-ui/semantic.css +41970 -34600
- package/assets/js/semantic-ui/semantic.js +2859 -756
- package/assets/js/semantic-ui/semantic.min.css +3 -3
- package/assets/js/semantic-ui/semantic.min.js +3 -3
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/brand-icons.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/brand-icons.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/icons.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/icons.woff2 +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/outline-icons.woff +0 -0
- package/assets/js/semantic-ui/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- package/assets/js/semantic-ui/themes/famfamfam/assets/images/flags.png +0 -0
- package/assets/js/socket.io/socket.io.esm.min.js +2 -2
- package/assets/js/socket.io/socket.io.esm.min.js.map +1 -1
- package/assets/js/socket.io/socket.io.js +232 -102
- package/assets/js/socket.io/socket.io.js.map +1 -1
- package/assets/js/socket.io/socket.io.min.js +2 -2
- package/assets/js/socket.io/socket.io.min.js.map +1 -1
- package/assets/js/socket.io/socket.io.msgpack.min.js +2 -2
- package/assets/js/socket.io/socket.io.msgpack.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* # Fomantic UI - 2.
|
|
2
|
+
* # Fomantic UI - 2.9.0
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* http://fomantic-ui.com/
|
|
5
5
|
*
|
|
6
|
-
* Copyright
|
|
6
|
+
* Copyright 2022 Contributors
|
|
7
7
|
* Released under the MIT license
|
|
8
8
|
* http://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(C,n,S,T){"use strict";C.isFunction=C.isFunction||function(n){return"function"==typeof n&&"number"!=typeof n.nodeType},n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),C.fn.transition=function(){var d,r=C(this),p=r.selector||"",g=(new Date).getTime(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(t){var u,s,e,c,i,a,n,o,m,f=C(this),l=this;(m={initialize:function(){u=m.get.settings.apply(l,b),c=u.className,e=u.error,i=u.metadata,o="."+u.namespace,n="module-"+u.namespace,s=f.data(n)||m,a=m.get.animationEndEvent(),!1===(w=w&&m.invoke(y))&&(m.verbose("Converted arguments into settings object",u),u.interval?m.delay(u.animate):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),s=m,f.data(n,s)},destroy:function(){m.verbose("Destroying previous module for",l),f.removeData(n)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var n=f.parent(),e=f.next();0===e.length?f.detach().appendTo(n):f.detach().insertBefore(e)},repaint:function(){m.verbose("Repainting element");l.offsetWidth},delay:function(n){var e,i=m.get.animationDirection();i=i||(m.can.transition()?m.get.direction():"static"),n=n!==T?n:u.interval,e="auto"==u.reverse&&i==c.outward||1==u.reverse?(r.length-t)*u.interval:t*u.interval,m.debug("Delaying animation by",e),setTimeout(m.animate,e)},animate:function(n){if(u=n||u,!m.is.supported())return m.error(e.support),!1;if(m.debug("Preparing animation",u.animation),m.is.animating()){if(u.queue)return!u.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",u.animation):m.queue(u.animation),!1;if(!u.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",u.animation),!1;m.debug("New animation started, completing previous early",u.animation),s.complete()}m.can.animate()?m.set.animating(u.animation):m.error(e.noAnimation,u.animation,l)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(n){m.debug("Queueing animation of",n),m.queuing=!0,f.one(a+".queue"+o,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,u)})},complete:function(n){n&&n.target===l&&n.stopPropagation(),m.debug("Animation complete",u.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is outward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),u.onComplete.call(l)))},force:{visible:function(){var n=f.attr("style"),e=m.get.userStyle(n),i=m.get.displayType(),t=e+"display: "+i+" !important;",a=f[0].style.display;return!i||"none"===a&&u.skipInlineHidden||f[0].tagName.match(/(script|link|style)/i)?(m.remove.transition(),!1):(m.verbose("Overriding default display to show element",i),f.attr("style",t),!0)},hidden:function(){var n=f.attr("style"),e=f.css("display"),i=n===T||""===n;"none"===e||m.is.hidden()?i&&f.removeAttr("style"):(m.verbose("Overriding default display to hide element"),f.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||u.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==c.inward&&e!==c.outward||(i=!0)})),i},inlineDisplay:function(){var n=f.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){m.remove.completeCallback(),n=n||u.animation;var e=m.get.animationClass(n);m.save.animation(e),m.force.visible()&&(m.remove.hidden(),m.remove.direction(),m.start.animation(e))},duration:function(n,e){!(e="number"==typeof(e=e||u.duration)?e+"ms":e)&&0!==e||(m.verbose("Setting animation duration",e),f.css({"animation-duration":e}))},direction:function(n){(n=n||m.get.direction())==c.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),f.addClass(c.looping)},hidden:function(){f.addClass(c.transition).addClass(c.hidden)},inward:function(){m.debug("Setting direction to inward"),f.removeClass(c.outward).addClass(c.inward)},outward:function(){m.debug("Setting direction to outward"),f.removeClass(c.inward).addClass(c.outward)},visible:function(){f.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||m.get.animationClass(),m.debug("Starting tween",n),f.addClass(n).one(a+".complete"+o,m.complete),u.useFailSafe&&m.add.failSafe(),m.set.duration(u.duration),u.onStart.call(l)}},save:{animation:function(n){m.cache||(m.cache={}),m.cache.animation=n},displayType:function(n){"none"!==n&&f.data(i.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,m.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=m.get.currentAnimation();n&&(f.removeClass(n),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var n=m.get.duration();m.timer=setTimeout(function(){f.triggerHandler(a)},n+u.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){f.removeClass(c.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){f.off(".queue"+o)},completeCallback:function(){f.off(".complete"+o)},display:function(){f.css("display","")},direction:function(){f.removeClass(c.inward).removeClass(c.outward)},duration:function(){f.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){f.removeClass(c.hidden)},visible:function(){f.removeClass(c.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),f.removeClass(c.looping))},transition:function(){f.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var e=n||u.animation,i=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return c.animating+" "+c.transition+" "+i+e},currentAnimation:function(){return!(!m.cache||m.cache.animation===T)&&m.cache.animation},currentDirection:function(){return m.is.inward()?c.inward:c.outward},direction:function(){return m.is.hidden()||!m.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||u.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===c.inward?i=c.inward:e===c.outward&&(i=c.outward)})),i||!1},duration:function(n){return!1===(n=n||u.duration)&&(n=f.css("animation-duration")||0),"string"==typeof n?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){if(n=n===T||n,u.displayType)return u.displayType;if(n&&f.data(i.displayType)===T){var e=f.css("display");""===e||"none"===e?m.can.transition(!0):m.save.displayType(e)}return f.data(i.displayType)},userStyle:function(n){return(n=n||f.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(n){return C.fn.transition.exists[n]},animationStartEvent:function(){var n,e=S.createElement("div"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in i)if(e.style[n]!==T)return i[n];return!1},animationEndEvent:function(){var n,e=S.createElement("div"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in i)if(e.style[n]!==T)return i[n];return!1}},can:{transition:function(n){var e,i,t,a,o,r,s=u.animation,l=m.get.transitionExists(s),d=m.get.displayType(!1);if(l===T||n){if(m.verbose("Determining whether animation exists"),e=f.attr("class"),i=f.prop("tagName"),a=(t=C("<"+i+" />").addClass(e).insertAfter(f)).addClass(s).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),o=t.addClass(c.inward).css("animationName"),d||(d=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),m.verbose("Determining final display state",d),m.save.displayType(d)),t.remove(),a!=o)m.debug("Direction exists for animation",s),r=!0;else{if("none"==a||!a)return void m.debug("No animation defined in css",s);m.debug("Static animation found",s,d),r=!1}m.save.transitionExists(s,r)}return l!==T?l:r},animate:function(){return m.can.transition()!==T}},is:{animating:function(){return f.hasClass(c.animating)},inward:function(){return f.hasClass(c.inward)},outward:function(){return f.hasClass(c.outward)},looping:function(){return f.hasClass(c.looping)},occurring:function(n){return n="."+(n=n||u.animation).replace(" ","."),0<f.filter(n).length},visible:function(){return f.is(":visible")},hidden:function(){return"hidden"===f.css("visibility")},supported:function(){return!1!==a}},hide:function(){m.verbose("Hiding element"),m.is.animating()&&m.reset(),l.blur(),m.remove.display(),m.remove.visible(),C.isFunction(u.onBeforeHide)?u.onBeforeHide.call(l,function(){m.hideNow()}):m.hideNow()},hideNow:function(){m.set.hidden(),m.force.hidden(),u.onHide.call(l),u.onComplete.call(l)},show:function(n){m.verbose("Showing element",n),m.force.visible()&&(m.remove.hidden(),m.set.visible(),u.onShow.call(l),u.onComplete.call(l))},toggle:function(){m.is.visible()?m.hide():m.show()},stop:function(){m.debug("Stopping current animation"),f.triggerHandler(a)},stopAll:function(){m.debug("Stopping all animation"),m.remove.queueCallback(),f.triggerHandler(a)},clear:{queue:function(){m.debug("Clearing animation queue"),m.remove.queueCallback()}},enable:function(){m.verbose("Starting animation"),f.removeClass(c.disabled)},disable:function(){m.debug("Stopping animation"),f.addClass(c.disabled)},setting:function(n,e){if(m.debug("Changing setting",n,e),C.isPlainObject(n))C.extend(!0,u,n);else{if(e===T)return u[n];C.isPlainObject(u[n])?C.extend(!0,u[n],e):u[n]=e}},internal:function(n,e){if(C.isPlainObject(n))C.extend(!0,m,n);else{if(e===T)return m[n];m[n]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,u.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),m.verbose.apply(console,arguments)))},error:function(){u.silent||(m.error=Function.prototype.bind.call(console.error,console,u.name+":"),m.error.apply(console,arguments))},performance:{log:function(n){var e,i;u.performance&&(i=(e=(new Date).getTime())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:l,"Execution Time":i})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var n=u.name+":",i=0;g=!1,clearTimeout(m.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",p&&(n+=" '"+p+"'"),1<r.length&&(n+=" ("+r.length+")"),(console.group!==T||console.table!==T)&&0<v.length&&(console.groupCollapsed(n),console.table?console.table(v):C.each(v,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,e){var a,o,i,r=s;return n=n||h,e=l||e,"string"==typeof t&&r!==T&&(t=t.split(/[\. ]/),a=t.length-1,C.each(t,function(n,e){var i=n!=a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(C.isPlainObject(r[i])&&n!=a)r=r[i];else{if(r[i]!==T)return o=r[i],!1;if(!C.isPlainObject(r[e])||n==a)return r[e]!==T&&(o=r[e]),!1;r=r[e]}})),C.isFunction(o)?i=o.apply(e,n):o!==T&&(i=o),Array.isArray(d)?d.push(i):d!==T?d=[d,i]:i!==T&&(d=i),o!==T&&o}}).initialize()}),d!==T?d:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document);
|
|
11
|
+
!function(C,n,S,A){"use strict";C.isFunction=C.isFunction||function(n){return"function"==typeof n&&"number"!=typeof n.nodeType},n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),C.fn.transition=function(){var f,r=C(this),p=r.selector||"",g=(new Date).getTime(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(i){var l,s,e,c,t,a,n,o,d=C(this),u=this,m={initialize:function(){l=m.get.settings.apply(u,b),c=l.className,e=l.error,t=l.metadata,o="."+l.namespace,n="module-"+l.namespace,s=d.data(n)||m,a=m.get.animationEndEvent(),!1===(w=w&&m.invoke(y))&&(m.verbose("Converted arguments into settings object",l),l.interval?m.delay(l.interval):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),s=m,d.data(n,s)},destroy:function(){m.verbose("Destroying previous module for",u),d.removeData(n)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var n=d.parent(),e=d.next();0===e.length?d.detach().appendTo(n):d.detach().insertBefore(e)},repaint:function(){m.verbose("Repainting element");u.offsetWidth},delay:function(n){var e=(e=m.get.animationDirection())||(m.can.transition()?m.get.direction():"static");n=n!==A?n:l.interval,e="auto"==l.reverse&&e==c.outward||!0===l.reverse?(r.length-i)*n:i*n,m.debug("Delaying animation by",e),setTimeout(m.animate,e)},animate:function(n){if(l=n||l,!m.is.supported())return m.error(e.support),!1;if(m.debug("Preparing animation",l.animation),m.is.animating()){if(l.queue)return!l.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",l.animation):m.queue(l.animation),!1;if(!l.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;m.debug("New animation started, completing previous early",l.animation),s.complete()}m.can.animate()?m.set.animating(l.animation):m.error(e.noAnimation,l.animation,u)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(n){m.debug("Queueing animation of",n),m.queuing=!0,d.one(a+".queue"+o,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,l)})},complete:function(n){n&&n.target===u&&n.stopPropagation(),m.debug("Animation complete",l.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is outward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),l.onComplete.call(u)))},force:{visible:function(){var n=d.attr("style"),n=m.get.userStyle(n),e=m.get.displayType(),n=n+"display: "+e+" !important;",i=d[0].style.display;return!e||"none"===i&&l.skipInlineHidden||d[0].tagName.match(/(script|link|style)/i)?(m.remove.transition(),!1):(m.verbose("Overriding default display to show element",e),d.attr("style",n),!0)},hidden:function(){var n=d.attr("style"),e=d.css("display"),n=n===A||""===n;"none"===e||m.is.hidden()?n&&d.removeAttr("style"):(m.verbose("Overriding default display to hide element"),d.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==c.inward&&e!==c.outward||(i=!0)})),i},inlineDisplay:function(){var n=d.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){m.remove.completeCallback(),n=n||l.animation;n=m.get.animationClass(n);m.save.animation(n),m.force.visible()&&(m.remove.hidden(),m.remove.direction(),m.start.animation(n))},duration:function(n,e){!(e="number"==typeof(e=e||l.duration)?e+"ms":e)&&0!==e||(m.verbose("Setting animation duration",e),d.css({"animation-duration":e}))},direction:function(n){(n=n||m.get.direction())==c.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),d.addClass(c.looping)},hidden:function(){d.addClass(c.transition).addClass(c.hidden)},inward:function(){m.debug("Setting direction to inward"),d.removeClass(c.outward).addClass(c.inward)},outward:function(){m.debug("Setting direction to outward"),d.removeClass(c.inward).addClass(c.outward)},visible:function(){d.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||m.get.animationClass(),m.debug("Starting tween",n),d.addClass(n).one(a+".complete"+o,m.complete),l.useFailSafe&&m.add.failSafe(),m.set.duration(l.duration),l.onStart.call(u)}},save:{animation:function(n){m.cache||(m.cache={}),m.cache.animation=n},displayType:function(n){"none"!==n&&d.data(t.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,m.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=m.get.currentAnimation();n&&(d.removeClass(n),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var n=m.get.duration();m.timer=setTimeout(function(){d.triggerHandler(a)},n+l.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){d.removeClass(c.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){d.off(".queue"+o)},completeCallback:function(){d.off(".complete"+o)},display:function(){d.css("display","")},direction:function(){d.removeClass(c.inward).removeClass(c.outward)},duration:function(){d.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){d.removeClass(c.hidden)},visible:function(){d.removeClass(c.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),d.removeClass(c.looping))},transition:function(){d.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var n=n||l.animation,e=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return c.animating+" "+c.transition+" "+e+n},currentAnimation:function(){return!(!m.cache||m.cache.animation===A)&&m.cache.animation},currentDirection:function(){return m.is.inward()?c.inward:c.outward},direction:function(){return m.is.hidden()||!m.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===c.inward?i=c.inward:e===c.outward&&(i=c.outward)})),i||!1},duration:function(n){return"string"==typeof(n=!1===(n=n||l.duration)?d.css("animation-duration")||0:n)?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return l.displayType||((n=n===A||n)&&d.data(t.displayType)===A&&(""===(n=d.css("display"))||"none"===n?m.can.transition(!0):m.save.displayType(n)),d.data(t.displayType))},userStyle:function(n){return(n=n||d.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(n){return C.fn.transition.exists[n]},animationStartEvent:function(){var n,e=S.createElement("div"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in i)if(e.style[n]!==A)return i[n];return!1},animationEndEvent:function(){var n,e=S.createElement("div"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in i)if(e.style[n]!==A)return i[n];return!1}},can:{transition:function(n){var e,i,t,a,o=l.animation,r=m.get.transitionExists(o),s=m.get.displayType(!1);if(r===A||n){if(m.verbose("Determining whether animation exists"),n=d.attr("class"),e=d.prop("tagName"),i=(e=C("<"+e+" />").addClass(n).insertAfter(d)).addClass(o).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),e.detach().insertAfter(d),t=e.addClass(c.inward).css("animationName"),s||(e.detach().insertAfter(d),s=e.attr("class",n).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),m.verbose("Determining final display state",s),m.save.displayType(s)),e.remove(),i!=t)m.debug("Direction exists for animation",o),a=!0;else{if("none"==i||!i)return void m.debug("No animation defined in css",o);m.debug("Static animation found",o,s),a=!1}m.save.transitionExists(o,a)}return r!==A?r:a},animate:function(){return m.can.transition()!==A}},is:{animating:function(){return d.hasClass(c.animating)},inward:function(){return d.hasClass(c.inward)},outward:function(){return d.hasClass(c.outward)},looping:function(){return d.hasClass(c.looping)},occurring:function(n){return n="."+(n=n||l.animation).replace(" ","."),0<d.filter(n).length},visible:function(){return d.is(":visible")},hidden:function(){return"hidden"===d.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(u))return m.verbose("Hide callback returned false cancelling hide"),!1;m.verbose("Hiding element"),m.is.animating()&&m.reset(),u.blur(),m.remove.display(),m.remove.visible(),l.onBeforeHide.call(u,m.hideNow)},hideNow:function(){m.set.hidden(),m.force.hidden(),l.onHidden.call(u),l.onComplete.call(u)},show:function(n){m.force.visible()&&!1!==l.onShow.call(u)&&(m.verbose("Showing element",n),m.remove.hidden(),l.onBeforeShow.call(u,m.showNow))},showNow:function(){m.set.visible(),l.onVisible.call(u),l.onComplete.call(u)},toggle:function(){m.is.visible()?m.hide():m.show()},stop:function(){m.debug("Stopping current animation"),d.triggerHandler(a)},stopAll:function(){m.debug("Stopping all animation"),m.remove.queueCallback(),d.triggerHandler(a)},clear:{queue:function(){m.debug("Clearing animation queue"),m.remove.queueCallback()}},enable:function(){m.verbose("Starting animation"),d.removeClass(c.disabled)},disable:function(){m.debug("Stopping animation"),d.addClass(c.disabled)},setting:function(n,e){if(m.debug("Changing setting",n,e),C.isPlainObject(n))C.extend(!0,l,n);else{if(e===A)return l[n];C.isPlainObject(l[n])?C.extend(!0,l[n],e):l[n]=e}},internal:function(n,e){if(C.isPlainObject(n))C.extend(!0,m,n);else{if(e===A)return m[n];m[n]=e}},debug:function(){!l.silent&&l.debug&&(l.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,l.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),m.verbose.apply(console,arguments)))},error:function(){l.silent||(m.error=Function.prototype.bind.call(console.error,console,l.name+":"),m.error.apply(console,arguments))},performance:{log:function(n){var e,i;l.performance&&(i=(e=(new Date).getTime())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:u,"Execution Time":i})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var n=l.name+":",i=0;g=!1,clearTimeout(m.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",p&&(n+=" '"+p+"'"),1<r.length&&(n+=" ("+r.length+")"),(console.group!==A||console.table!==A)&&0<v.length&&(console.groupCollapsed(n),console.table?console.table(v):C.each(v,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,e){var a,o,i,r=s;return n=n||h,e=e||u,"string"==typeof t&&r!==A&&(t=t.split(/[\. ]/),a=t.length-1,C.each(t,function(n,e){var i=n!=a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(C.isPlainObject(r[i])&&n!=a)r=r[i];else{if(r[i]!==A)return o=r[i],!1;{if(!C.isPlainObject(r[e])||n==a)return r[e]!==A&&(o=r[e]),!1;r=r[e]}}})),C.isFunction(o)?i=o.apply(e,n):o!==A&&(i=o),Array.isArray(f)?f.push(i):f!==A?f=[f,i]:i!==A&&(f=i),o!==A&&o}};m.initialize()}),f!==A?f:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onBeforeShow:function(n){n.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(n){n.call(this)},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI 2.
|
|
2
|
+
* # Fomantic-UI 2.9.0 - Visibility
|
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -58,7 +58,7 @@ $.fn.visibility = function(parameters) {
|
|
|
58
58
|
$window = $(window),
|
|
59
59
|
|
|
60
60
|
$module = $(this),
|
|
61
|
-
$context = $(settings.context),
|
|
61
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
|
|
62
62
|
|
|
63
63
|
$placeholder,
|
|
64
64
|
|
|
@@ -428,7 +428,7 @@ $.fn.visibility = function(parameters) {
|
|
|
428
428
|
},
|
|
429
429
|
verticallyScrollableContext: function() {
|
|
430
430
|
var
|
|
431
|
-
overflowY = ($context
|
|
431
|
+
overflowY = ($context[0] !== window)
|
|
432
432
|
? $context.css('overflow-y')
|
|
433
433
|
: false
|
|
434
434
|
;
|
|
@@ -436,7 +436,7 @@ $.fn.visibility = function(parameters) {
|
|
|
436
436
|
},
|
|
437
437
|
horizontallyScrollableContext: function() {
|
|
438
438
|
var
|
|
439
|
-
overflowX = ($context
|
|
439
|
+
overflowX = ($context[0] !== window)
|
|
440
440
|
? $context.css('overflow-x')
|
|
441
441
|
: false
|
|
442
442
|
;
|
|
@@ -1139,7 +1139,7 @@ $.fn.visibility = function(parameters) {
|
|
|
1139
1139
|
response
|
|
1140
1140
|
;
|
|
1141
1141
|
passedArguments = passedArguments || queryArguments;
|
|
1142
|
-
context =
|
|
1142
|
+
context = context || element;
|
|
1143
1143
|
if(typeof query == 'string' && object !== undefined) {
|
|
1144
1144
|
query = query.split(/[\. ]/);
|
|
1145
1145
|
maxDepth = query.length - 1;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* # Fomantic UI - 2.
|
|
2
|
+
* # Fomantic UI - 2.9.0
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* http://fomantic-ui.com/
|
|
5
5
|
*
|
|
6
|
-
* Copyright
|
|
6
|
+
* Copyright 2022 Contributors
|
|
7
7
|
* Released under the MIT license
|
|
8
8
|
* http://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!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,r,i=O.isPlainObject(h)?O.extend(!0,{},O.fn.visibility.settings,h):O.extend({},O.fn.visibility.settings),t=i.className,s=i.namespace,a=i.error,c=i.metadata,l="."+s,d="module-"+s,u=O(z),f=O(this),b=O(i.context),g=f.data(d),m=z.requestAnimationFrame||z.mozRequestAnimationFrame||z.webkitRequestAnimationFrame||z.msRequestAnimationFrame||function(e){setTimeout(e,0)},p=this,v=!1;r={initialize:function(){r.debug("Initializing",i),r.setup.cache(),r.should.trackChanges()&&("image"==i.type&&r.setup.image(),"fixed"==i.type&&r.setup.fixed(),i.observeChanges&&r.observeChanges(),r.bind.events()),r.save.position(),r.is.visible()||r.error(a.visible,f),i.initialCheck&&r.checkVisibility(),r.instantiate()},instantiate:function(){r.debug("Storing instance",r),f.data(d,r),g=r},destroy:function(){r.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),u.off("load"+l,r.event.load).off("resize"+l,r.event.resize),b.off("scroll"+l,r.event.scroll).off("scrollchange"+l,r.event.scrollchange),"fixed"==i.type&&(r.resetFixed(),r.remove.placeholder()),f.off(l).removeData(d)},observeChanges:function(){"MutationObserver"in z&&(o=new MutationObserver(r.event.contextChanged),n=new MutationObserver(r.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(p,{childList:!0,subtree:!0}),r.debug("Setting up mutation observer",n))},bind:{events:function(){r.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&u.on("load"+l,r.event.load),u.on("resize"+l,r.event.resize),b.off("scroll"+l).on("scroll"+l,r.event.scroll).on("scrollchange"+l,r.event.scrollchange)}},event:{changed:function(e){r.verbose("DOM tree modified, updating visibility calculations"),r.timer=setTimeout(function(){r.verbose("DOM tree modified, updating sticky menu"),r.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==p||0<O(e).find(p).length)&&(r.debug("Element removed from DOM, tearing down events"),r.destroy())})})},resize:function(){r.debug("Window resized"),i.refreshOnResize&&m(r.refresh)},load:function(){r.debug("Page finished loading"),m(r.refresh)},scroll:function(){i.throttle?(clearTimeout(r.timer),r.timer=setTimeout(function(){b.triggerHandler("scrollchange"+l,[b.scrollTop()])},i.throttle)):m(function(){b.triggerHandler("scrollchange"+l,[b.scrollTop()])})},scrollchange:function(e,o){r.checkVisibility(o)}},precache:function(e,o){e instanceof Array||(e=[e]);for(var n=e.length,t=0,i=[],s=A.createElement("img"),c=function(){++t>=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(){r.debug("Allowing callbacks to occur"),v=!1},disableCallbacks:function(){r.debug("Disabling all callbacks temporarily"),v=!0},should:{trackChanges:function(){return R?(r.debug("One time query, no need to bind events"),!1):(r.debug("Callbacks being attached"),!0)}},setup:{cache:function(){r.cache={occurred:{},screen:{},element:{}}},image:function(){var e=f.data(c.src);e&&(r.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){r.debug("Image on screen",p),r.precache(e,function(){r.set.image(e,function(){++T==k&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){r.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,h.transition||(i.transition=!1),r.create.placeholder(),r.debug("Added placeholder",e),i.onTopPassed=function(){r.debug("Element passed, adding fixed position",f),r.show.placeholder(),r.set.fixed(),i.transition&&O.fn.transition!==w&&f.transition(i.transition,i.duration)},i.onTopPassedReverse=function(){r.debug("Element returned to position, removing fixed",f),r.hide.placeholder(),r.remove.fixed()}}},create:{placeholder:function(){r.verbose("Creating fixed position placeholder"),e=f.clone(!1).css("display","none").addClass(t.placeholder).insertAfter(f)}},show:{placeholder:function(){r.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){r.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){r.verbose("Setting element to fixed position"),f.addClass(t.fixed).css({position:"fixed",top:i.offset+"px",left:"auto",zIndex:i.zIndex}),i.onFixed.call(p)},image:function(e,o){if(f.attr("src",e),i.transition)if(O.fn.transition!==w){if(f.hasClass(t.visible))return void r.debug("Transition already occurred on this image, skipping animation");f.transition(i.transition,i.duration,o)}else f.fadeIn(i.duration,o);else f.show()}},is:{onScreen:function(){return r.get.elementCalculations().onScreen},offScreen:function(){return r.get.elementCalculations().offScreen},visible:function(){return!(!r.cache||!r.cache.element)&&!(0===r.cache.element.width&&0===r.cache.element.offset.top)},verticallyScrollableContext:function(){var e=b.get(0)!==z&&b.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=b.get(0)!==z&&b.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){r.debug("Refreshing constants (width/height)"),"fixed"==i.type&&r.resetFixed(),r.reset(),r.save.position(),i.checkOnRefresh&&r.checkVisibility(),i.onRefresh.call(p)},resetFixed:function(){r.remove.fixed(),r.remove.occurred()},reset:function(){r.verbose("Resetting all cached values"),O.isPlainObject(r.cache)&&(r.cache.screen={},r.cache.element={})},checkVisibility:function(e){r.verbose("Checking visibility of element",r.cache.element),!v&&r.is.visible()&&(r.save.scroll(e),r.save.calculations(),r.passed(),r.passingReverse(),r.topVisibleReverse(),r.bottomVisibleReverse(),r.topPassedReverse(),r.bottomPassedReverse(),r.onScreen(),r.offScreen(),r.passing(),r.topVisible(),r.bottomVisible(),r.topPassed(),r.bottomPassed(),i.onUpdate&&i.onUpdate.call(p,r.get.elementCalculations()))},passed:function(e,o){var n=r.get.elementCalculations();if(e&&o)i.onPassed[e]=o;else{if(e!==w)return r.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&O.each(i.onPassed,function(e,o){n.bottomVisible||n.pixelsPassed>r.get.pixelsPassed(e)?r.execute(o,e):i.once||r.remove.occurred(o)})}},onScreen:function(e){var o=r.get.elementCalculations(),n=e||i.onOnScreen,t="onScreen";if(e&&(r.debug("Adding callback for onScreen",e),i.onOnScreen=e),o.onScreen?r.execute(n,t):i.once||r.remove.occurred(t),e!==w)return o.onOnScreen},offScreen:function(e){var o=r.get.elementCalculations(),n=e||i.onOffScreen,t="offScreen";if(e&&(r.debug("Adding callback for offScreen",e),i.onOffScreen=e),o.offScreen?r.execute(n,t):i.once||r.remove.occurred(t),e!==w)return o.onOffScreen},passing:function(e){var o=r.get.elementCalculations(),n=e||i.onPassing,t="passing";if(e&&(r.debug("Adding callback for passing",e),i.onPassing=e),o.passing?r.execute(n,t):i.once||r.remove.occurred(t),e!==w)return o.passing},topVisible:function(e){var o=r.get.elementCalculations(),n=e||i.onTopVisible,t="topVisible";if(e&&(r.debug("Adding callback for top visible",e),i.onTopVisible=e),o.topVisible?r.execute(n,t):i.once||r.remove.occurred(t),e===w)return o.topVisible},bottomVisible:function(e){var o=r.get.elementCalculations(),n=e||i.onBottomVisible,t="bottomVisible";if(e&&(r.debug("Adding callback for bottom visible",e),i.onBottomVisible=e),o.bottomVisible?r.execute(n,t):i.once||r.remove.occurred(t),e===w)return o.bottomVisible},topPassed:function(e){var o=r.get.elementCalculations(),n=e||i.onTopPassed,t="topPassed";if(e&&(r.debug("Adding callback for top passed",e),i.onTopPassed=e),o.topPassed?r.execute(n,t):i.once||r.remove.occurred(t),e===w)return o.topPassed},bottomPassed:function(e){var o=r.get.elementCalculations(),n=e||i.onBottomPassed,t="bottomPassed";if(e&&(r.debug("Adding callback for bottom passed",e),i.onBottomPassed=e),o.bottomPassed?r.execute(n,t):i.once||r.remove.occurred(t),e===w)return o.bottomPassed},passingReverse:function(e){var o=r.get.elementCalculations(),n=e||i.onPassingReverse,t="passingReverse";if(e&&(r.debug("Adding callback for passing reverse",e),i.onPassingReverse=e),o.passing?i.once||r.remove.occurred(t):r.get.occurred("passing")&&r.execute(n,t),e!==w)return!o.passing},topVisibleReverse:function(e){var o=r.get.elementCalculations(),n=e||i.onTopVisibleReverse,t="topVisibleReverse";if(e&&(r.debug("Adding callback for top visible reverse",e),i.onTopVisibleReverse=e),o.topVisible?i.once||r.remove.occurred(t):r.get.occurred("topVisible")&&r.execute(n,t),e===w)return!o.topVisible},bottomVisibleReverse:function(e){var o=r.get.elementCalculations(),n=e||i.onBottomVisibleReverse,t="bottomVisibleReverse";if(e&&(r.debug("Adding callback for bottom visible reverse",e),i.onBottomVisibleReverse=e),o.bottomVisible?i.once||r.remove.occurred(t):r.get.occurred("bottomVisible")&&r.execute(n,t),e===w)return!o.bottomVisible},topPassedReverse:function(e){var o=r.get.elementCalculations(),n=e||i.onTopPassedReverse,t="topPassedReverse";if(e&&(r.debug("Adding callback for top passed reverse",e),i.onTopPassedReverse=e),o.topPassed?i.once||r.remove.occurred(t):r.get.occurred("topPassed")&&r.execute(n,t),e===w)return!o.onTopPassed},bottomPassedReverse:function(e){var o=r.get.elementCalculations(),n=e||i.onBottomPassedReverse,t="bottomPassedReverse";if(e&&(r.debug("Adding callback for bottom passed reverse",e),i.onBottomPassedReverse=e),o.bottomPassed?i.once||r.remove.occurred(t):r.get.occurred("bottomPassed")&&r.execute(n,t),e===w)return!o.bottomPassed},execute:function(e,o){var n=r.get.elementCalculations(),t=r.get.screenCalculations();(e=e||!1)&&(i.continuous?(r.debug("Callback being called continuously",o,n),e.call(p,n,t)):r.get.occurred(o)||(r.debug("Conditions met",o,n),e.call(p,n,t))),r.save.occurred(o)},remove:{fixed:function(){r.debug("Removing fixed position"),f.removeClass(t.fixed).css({position:"",top:"",left:"",zIndex:""}),i.onUnfixed.call(p)},placeholder:function(){r.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){if(e){var o=r.cache.occurred;o[e]!==w&&!0===o[e]&&(r.debug("Callback can now be called again",e),r.cache.occurred[e]=!1)}else r.cache.occurred={}}},save:{calculations:function(){r.verbose("Saving all calculations necessary to determine positioning"),r.save.direction(),r.save.screenCalculations(),r.save.elementCalculations()},occurred:function(e){e&&(r.cache.occurred[e]!==w&&!0===r.cache.occurred[e]||(r.verbose("Saving callback occurred",e),r.cache.occurred[e]=!0))},scroll:function(e){e=e+i.offset||b.scrollTop()+i.offset,r.cache.scroll=e},direction:function(){var e,o=r.get.scroll(),n=r.get.lastScroll();return e=n<o&&n?"down":o<n&&n?"up":"static",r.cache.direction=e,r.cache.direction},elementPosition:function(){var e=r.cache.element,o=r.get.screenSize();return r.verbose("Saving element position"),e.fits=e.height<o.height,e.offset=f.offset(),e.width=f.outerWidth(),e.height=f.outerHeight(),r.is.verticallyScrollableContext()&&(e.offset.top+=b.scrollTop()-b.offset().top),r.is.horizontallyScrollableContext()&&(e.offset.left+=b.scrollLeft()-b.offset().left),r.cache.element=e},elementCalculations:function(){var e=r.get.screenCalculations(),o=r.get.elementPosition();return i.includeMargin?(o.margin={},o.margin.top=parseInt(f.css("margin-top"),10),o.margin.bottom=parseInt(f.css("margin-bottom"),10),o.top=o.offset.top-o.margin.top,o.bottom=o.offset.top+o.height+o.margin.bottom):(o.top=o.offset.top,o.bottom=o.offset.top+o.height),o.topPassed=e.top>=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),r.cache.element=o,r.verbose("Updated element calculations",o),o},screenCalculations:function(){var e=r.get.scroll();return r.save.direction(),r.cache.screen.top=e,r.cache.screen.bottom=e+r.cache.screen.height,r.cache.screen},screenSize:function(){r.verbose("Saving window position"),r.cache.screen={height:b.height()}},position:function(){r.save.screenSize(),r.save.elementPosition()}},get:{pixelsPassed:function(e){var o=r.get.elementCalculations();return-1<e.search("%")?o.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return r.cache.occurred!==w&&r.cache.occurred[e]||!1},direction:function(){return r.cache.direction===w&&r.save.direction(),r.cache.direction},elementPosition:function(){return r.cache.element===w&&r.save.elementPosition(),r.cache.element},elementCalculations:function(){return r.cache.element===w&&r.save.elementCalculations(),r.cache.element},screenCalculations:function(){return r.cache.screen===w&&r.save.screenCalculations(),r.cache.screen},screenSize:function(){return r.cache.screen===w&&r.save.screenSize(),r.cache.screen},scroll:function(){return r.cache.scroll===w&&r.save.scroll(),r.cache.scroll},lastScroll:function(){return r.cache.screen===w?(r.debug("First scroll event, no last scroll could be found"),!1):r.cache.screen.top}},setting:function(e,o){if(O.isPlainObject(e))O.extend(!0,i,e);else{if(o===w)return i[e];i[e]=o}},internal:function(e,o){if(O.isPlainObject(e))O.extend(!0,r,e);else{if(o===w)return r[e];r[e]=o}},debug:function(){!i.silent&&i.debug&&(i.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,i.name+":"),r.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),r.verbose.apply(console,arguments)))},error:function(){i.silent||(r.error=Function.prototype.bind.call(console.error,console,i.name+":"),r.error.apply(console,arguments))},performance:{log:function(e){var o,n;i.performance&&(n=(o=(new Date).getTime())-(y||o),y=o,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,500)},display:function(){var e=i.name+":",n=0;y=!1,clearTimeout(r.performance.timer),O.each(C,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",x&&(e+=" '"+x+"'"),(console.group!==w||console.table!==w)&&0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):O.each(C,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(t,e,o){var i,s,n,c=g;return e=e||V,o=p||o,"string"==typeof t&&c!==w&&(t=t.split(/[\. ]/),i=t.length-1,O.each(t,function(e,o){var n=e!=i?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(O.isPlainObject(c[n])&&e!=i)c=c[n];else{if(c[n]!==w)return s=c[n],!1;if(!O.isPlainObject(c[o])||e==i)return c[o]!==w?s=c[o]:r.error(a.method,t),!1;c=c[o]}})),O.isFunction(s)?n=s.apply(o,e):s!==w&&(n=s),Array.isArray(P)?P.push(n):P!==w?P=[P,n]:n!==w&&(P=n),s}},R?(g===w&&r.initialize(),g.save.scroll(),g.save.calculations(),r.invoke(S)):(g!==w&&g.invoke("destroy"),r.initialize())}),P!==w?P:this},O.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:z,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(jQuery,window,document);
|
|
11
|
+
!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 x,e=O(this),P=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),t=i.className,s=i.namespace,r=i.error,c=i.metadata,a="."+s,l="module-"+s,d=O(z),u=O(this),f=[z,A].indexOf(i.context)<0?O(A).find(i.context):O(i.context),b=u.data(l),m=z.requestAnimationFrame||z.mozRequestAnimationFrame||z.webkitRequestAnimationFrame||z.msRequestAnimationFrame||function(e){setTimeout(e,0)},g=this,p=!1,v={initialize:function(){v.debug("Initializing",i),v.setup.cache(),v.should.trackChanges()&&("image"==i.type&&v.setup.image(),"fixed"==i.type&&v.setup.fixed(),i.observeChanges&&v.observeChanges(),v.bind.events()),v.save.position(),v.is.visible()||v.error(r.visible,u),i.initialCheck&&v.checkVisibility(),v.instantiate()},instantiate:function(){v.debug("Storing instance",v),u.data(l,v),b=v},destroy:function(){v.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),d.off("load"+a,v.event.load).off("resize"+a,v.event.resize),f.off("scroll"+a,v.event.scroll).off("scrollchange"+a,v.event.scrollchange),"fixed"==i.type&&(v.resetFixed(),v.remove.placeholder()),u.off(a).removeData(l)},observeChanges:function(){"MutationObserver"in z&&(o=new MutationObserver(v.event.contextChanged),n=new MutationObserver(v.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(g,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",n))},bind:{events:function(){v.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&d.on("load"+a,v.event.load),d.on("resize"+a,v.event.resize),f.off("scroll"+a).on("scroll"+a,v.event.scroll).on("scrollchange"+a,v.event.scrollchange)}},event:{changed:function(e){v.verbose("DOM tree modified, updating visibility calculations"),v.timer=setTimeout(function(){v.verbose("DOM tree modified, updating sticky menu"),v.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==g||0<O(e).find(g).length)&&(v.debug("Element removed from DOM, tearing down events"),v.destroy())})})},resize:function(){v.debug("Window resized"),i.refreshOnResize&&m(v.refresh)},load:function(){v.debug("Page finished loading"),m(v.refresh)},scroll:function(){i.throttle?(clearTimeout(v.timer),v.timer=setTimeout(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])},i.throttle)):m(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])})},scrollchange:function(e,o){v.checkVisibility(o)}},precache:function(e,o){for(var n=(e=e instanceof Array?e:[e]).length,t=0,i=[],s=A.createElement("img"),c=function(){++t>=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(){v.debug("Allowing callbacks to occur"),p=!1},disableCallbacks:function(){v.debug("Disabling all callbacks temporarily"),p=!0},should:{trackChanges:function(){return R?(v.debug("One time query, no need to bind events"),!1):(v.debug("Callbacks being attached"),!0)}},setup:{cache:function(){v.cache={occurred:{},screen:{},element:{}}},image:function(){var e=u.data(c.src);e&&(v.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){v.debug("Image on screen",g),v.precache(e,function(){v.set.image(e,function(){++T==k&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){v.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,h.transition||(i.transition=!1),v.create.placeholder(),v.debug("Added placeholder",e),i.onTopPassed=function(){v.debug("Element passed, adding fixed position",u),v.show.placeholder(),v.set.fixed(),i.transition&&O.fn.transition!==w&&u.transition(i.transition,i.duration)},i.onTopPassedReverse=function(){v.debug("Element returned to position, removing fixed",u),v.hide.placeholder(),v.remove.fixed()}}},create:{placeholder:function(){v.verbose("Creating fixed position placeholder"),e=u.clone(!1).css("display","none").addClass(t.placeholder).insertAfter(u)}},show:{placeholder:function(){v.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){v.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){v.verbose("Setting element to fixed position"),u.addClass(t.fixed).css({position:"fixed",top:i.offset+"px",left:"auto",zIndex:i.zIndex}),i.onFixed.call(g)},image:function(e,o){u.attr("src",e),i.transition?O.fn.transition!==w?u.hasClass(t.visible)?v.debug("Transition already occurred on this image, skipping animation"):u.transition(i.transition,i.duration,o):u.fadeIn(i.duration,o):u.show()}},is:{onScreen:function(){return v.get.elementCalculations().onScreen},offScreen:function(){return v.get.elementCalculations().offScreen},visible:function(){return!(!v.cache||!v.cache.element)&&!(0===v.cache.element.width&&0===v.cache.element.offset.top)},verticallyScrollableContext:function(){var e=f[0]!==z&&f.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=f[0]!==z&&f.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){v.debug("Refreshing constants (width/height)"),"fixed"==i.type&&v.resetFixed(),v.reset(),v.save.position(),i.checkOnRefresh&&v.checkVisibility(),i.onRefresh.call(g)},resetFixed:function(){v.remove.fixed(),v.remove.occurred()},reset:function(){v.verbose("Resetting all cached values"),O.isPlainObject(v.cache)&&(v.cache.screen={},v.cache.element={})},checkVisibility:function(e){v.verbose("Checking visibility of element",v.cache.element),!p&&v.is.visible()&&(v.save.scroll(e),v.save.calculations(),v.passed(),v.passingReverse(),v.topVisibleReverse(),v.bottomVisibleReverse(),v.topPassedReverse(),v.bottomPassedReverse(),v.onScreen(),v.offScreen(),v.passing(),v.topVisible(),v.bottomVisible(),v.topPassed(),v.bottomPassed(),i.onUpdate&&i.onUpdate.call(g,v.get.elementCalculations()))},passed:function(e,o){var n=v.get.elementCalculations();if(e&&o)i.onPassed[e]=o;else{if(e!==w)return v.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&O.each(i.onPassed,function(e,o){n.bottomVisible||n.pixelsPassed>v.get.pixelsPassed(e)?v.execute(o,e):i.once||v.remove.occurred(o)})}},onScreen:function(e){var o=v.get.elementCalculations(),n=e||i.onOnScreen,t="onScreen";if(e&&(v.debug("Adding callback for onScreen",e),i.onOnScreen=e),o.onScreen?v.execute(n,t):i.once||v.remove.occurred(t),e!==w)return o.onOnScreen},offScreen:function(e){var o=v.get.elementCalculations(),n=e||i.onOffScreen,t="offScreen";if(e&&(v.debug("Adding callback for offScreen",e),i.onOffScreen=e),o.offScreen?v.execute(n,t):i.once||v.remove.occurred(t),e!==w)return o.onOffScreen},passing:function(e){var o=v.get.elementCalculations(),n=e||i.onPassing,t="passing";if(e&&(v.debug("Adding callback for passing",e),i.onPassing=e),o.passing?v.execute(n,t):i.once||v.remove.occurred(t),e!==w)return o.passing},topVisible:function(e){var o=v.get.elementCalculations(),n=e||i.onTopVisible,t="topVisible";if(e&&(v.debug("Adding callback for top visible",e),i.onTopVisible=e),o.topVisible?v.execute(n,t):i.once||v.remove.occurred(t),e===w)return o.topVisible},bottomVisible:function(e){var o=v.get.elementCalculations(),n=e||i.onBottomVisible,t="bottomVisible";if(e&&(v.debug("Adding callback for bottom visible",e),i.onBottomVisible=e),o.bottomVisible?v.execute(n,t):i.once||v.remove.occurred(t),e===w)return o.bottomVisible},topPassed:function(e){var o=v.get.elementCalculations(),n=e||i.onTopPassed,t="topPassed";if(e&&(v.debug("Adding callback for top passed",e),i.onTopPassed=e),o.topPassed?v.execute(n,t):i.once||v.remove.occurred(t),e===w)return o.topPassed},bottomPassed:function(e){var o=v.get.elementCalculations(),n=e||i.onBottomPassed,t="bottomPassed";if(e&&(v.debug("Adding callback for bottom passed",e),i.onBottomPassed=e),o.bottomPassed?v.execute(n,t):i.once||v.remove.occurred(t),e===w)return o.bottomPassed},passingReverse:function(e){var o=v.get.elementCalculations(),n=e||i.onPassingReverse,t="passingReverse";if(e&&(v.debug("Adding callback for passing reverse",e),i.onPassingReverse=e),o.passing?i.once||v.remove.occurred(t):v.get.occurred("passing")&&v.execute(n,t),e!==w)return!o.passing},topVisibleReverse:function(e){var o=v.get.elementCalculations(),n=e||i.onTopVisibleReverse,t="topVisibleReverse";if(e&&(v.debug("Adding callback for top visible reverse",e),i.onTopVisibleReverse=e),o.topVisible?i.once||v.remove.occurred(t):v.get.occurred("topVisible")&&v.execute(n,t),e===w)return!o.topVisible},bottomVisibleReverse:function(e){var o=v.get.elementCalculations(),n=e||i.onBottomVisibleReverse,t="bottomVisibleReverse";if(e&&(v.debug("Adding callback for bottom visible reverse",e),i.onBottomVisibleReverse=e),o.bottomVisible?i.once||v.remove.occurred(t):v.get.occurred("bottomVisible")&&v.execute(n,t),e===w)return!o.bottomVisible},topPassedReverse:function(e){var o=v.get.elementCalculations(),n=e||i.onTopPassedReverse,t="topPassedReverse";if(e&&(v.debug("Adding callback for top passed reverse",e),i.onTopPassedReverse=e),o.topPassed?i.once||v.remove.occurred(t):v.get.occurred("topPassed")&&v.execute(n,t),e===w)return!o.onTopPassed},bottomPassedReverse:function(e){var o=v.get.elementCalculations(),n=e||i.onBottomPassedReverse,t="bottomPassedReverse";if(e&&(v.debug("Adding callback for bottom passed reverse",e),i.onBottomPassedReverse=e),o.bottomPassed?i.once||v.remove.occurred(t):v.get.occurred("bottomPassed")&&v.execute(n,t),e===w)return!o.bottomPassed},execute:function(e,o){var n=v.get.elementCalculations(),t=v.get.screenCalculations();(e=e||!1)&&(i.continuous?(v.debug("Callback being called continuously",o,n),e.call(g,n,t)):v.get.occurred(o)||(v.debug("Conditions met",o,n),e.call(g,n,t))),v.save.occurred(o)},remove:{fixed:function(){v.debug("Removing fixed position"),u.removeClass(t.fixed).css({position:"",top:"",left:"",zIndex:""}),i.onUnfixed.call(g)},placeholder:function(){v.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var o;e?(o=v.cache.occurred)[e]!==w&&!0===o[e]&&(v.debug("Callback can now be called again",e),v.cache.occurred[e]=!1):v.cache.occurred={}}},save:{calculations:function(){v.verbose("Saving all calculations necessary to determine positioning"),v.save.direction(),v.save.screenCalculations(),v.save.elementCalculations()},occurred:function(e){!e||v.cache.occurred[e]!==w&&!0===v.cache.occurred[e]||(v.verbose("Saving callback occurred",e),v.cache.occurred[e]=!0)},scroll:function(e){e=e+i.offset||f.scrollTop()+i.offset,v.cache.scroll=e},direction:function(){var e=v.get.scroll(),o=v.get.lastScroll(),e=o<e&&o?"down":e<o&&o?"up":"static";return v.cache.direction=e,v.cache.direction},elementPosition:function(){var e=v.cache.element,o=v.get.screenSize();return v.verbose("Saving element position"),e.fits=e.height<o.height,e.offset=u.offset(),e.width=u.outerWidth(),e.height=u.outerHeight(),v.is.verticallyScrollableContext()&&(e.offset.top+=f.scrollTop()-f.offset().top),v.is.horizontallyScrollableContext()&&(e.offset.left+=f.scrollLeft()-f.offset().left),v.cache.element=e},elementCalculations:function(){var e=v.get.screenCalculations(),o=v.get.elementPosition();return i.includeMargin?(o.margin={},o.margin.top=parseInt(u.css("margin-top"),10),o.margin.bottom=parseInt(u.css("margin-bottom"),10),o.top=o.offset.top-o.margin.top,o.bottom=o.offset.top+o.height+o.margin.bottom):(o.top=o.offset.top,o.bottom=o.offset.top+o.height),o.topPassed=e.top>=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),v.cache.element=o,v.verbose("Updated element calculations",o),o},screenCalculations:function(){var e=v.get.scroll();return v.save.direction(),v.cache.screen.top=e,v.cache.screen.bottom=e+v.cache.screen.height,v.cache.screen},screenSize:function(){v.verbose("Saving window position"),v.cache.screen={height:f.height()}},position:function(){v.save.screenSize(),v.save.elementPosition()}},get:{pixelsPassed:function(e){var o=v.get.elementCalculations();return-1<e.search("%")?o.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return v.cache.occurred!==w&&v.cache.occurred[e]||!1},direction:function(){return v.cache.direction===w&&v.save.direction(),v.cache.direction},elementPosition:function(){return v.cache.element===w&&v.save.elementPosition(),v.cache.element},elementCalculations:function(){return v.cache.element===w&&v.save.elementCalculations(),v.cache.element},screenCalculations:function(){return v.cache.screen===w&&v.save.screenCalculations(),v.cache.screen},screenSize:function(){return v.cache.screen===w&&v.save.screenSize(),v.cache.screen},scroll:function(){return v.cache.scroll===w&&v.save.scroll(),v.cache.scroll},lastScroll:function(){return v.cache.screen===w?(v.debug("First scroll event, no last scroll could be found"),!1):v.cache.screen.top}},setting:function(e,o){if(O.isPlainObject(e))O.extend(!0,i,e);else{if(o===w)return i[e];i[e]=o}},internal:function(e,o){if(O.isPlainObject(e))O.extend(!0,v,e);else{if(o===w)return v[e];v[e]=o}},debug:function(){!i.silent&&i.debug&&(i.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,i.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),v.verbose.apply(console,arguments)))},error:function(){i.silent||(v.error=Function.prototype.bind.call(console.error,console,i.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var o,n;i.performance&&(n=(o=(new Date).getTime())-(y||o),y=o,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var e=i.name+":",n=0;y=!1,clearTimeout(v.performance.timer),O.each(C,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",P&&(e+=" '"+P+"'"),(console.group!==w||console.table!==w)&&0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):O.each(C,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(t,e,o){var i,s,n,c=b;return e=e||V,o=o||g,"string"==typeof t&&c!==w&&(t=t.split(/[\. ]/),i=t.length-1,O.each(t,function(e,o){var n=e!=i?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(O.isPlainObject(c[n])&&e!=i)c=c[n];else{if(c[n]!==w)return s=c[n],!1;{if(!O.isPlainObject(c[o])||e==i)return c[o]!==w?s=c[o]:v.error(r.method,t),!1;c=c[o]}}})),O.isFunction(s)?n=s.apply(o,e):s!==w&&(n=s),Array.isArray(x)?x.push(n):x!==w?x=[x,n]:n!==w&&(x=n),s}};R?(b===w&&v.initialize(),b.save.scroll(),b.save.calculations(),v.invoke(S)):(b!==w&&b.invoke("destroy"),v.initialize())}),x!==w?x:this},O.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:z,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(jQuery,window,document);
|