fomantic-ui 2.9.1-beta.23 → 2.9.1-beta.25
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/.eslint/eqeqeq-rule.js +18 -0
- package/.eslint/index.js +26 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +7 -13
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +24 -24
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +58 -58
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +84 -72
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +17 -17
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +18 -18
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +264 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +19 -19
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +29 -25
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +158 -141
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +32 -28
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +10 -10
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +79 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +40 -42
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +13 -13
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +42 -42
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +36 -36
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +29 -29
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +16 -16
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +79 -58
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +14 -14
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +25 -25
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +34 -34
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +43 -19
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +26 -26
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +29 -29
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +1218 -1120
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +3 -1
- package/src/definitions/behaviors/api.js +57 -57
- package/src/definitions/behaviors/form.js +157 -140
- package/src/definitions/behaviors/state.js +13 -13
- package/src/definitions/behaviors/visibility.js +28 -28
- package/src/definitions/globals/site.js +15 -15
- package/src/definitions/modules/accordion.js +23 -23
- package/src/definitions/modules/calendar.js +83 -71
- package/src/definitions/modules/checkbox.js +16 -16
- package/src/definitions/modules/dimmer.js +17 -17
- package/src/definitions/modules/dropdown.js +263 -253
- package/src/definitions/modules/embed.js +18 -18
- package/src/definitions/modules/flyout.js +28 -24
- package/src/definitions/modules/modal.js +31 -27
- package/src/definitions/modules/nag.js +9 -9
- package/src/definitions/modules/popup.js +78 -70
- package/src/definitions/modules/progress.js +39 -41
- package/src/definitions/modules/rating.js +12 -12
- package/src/definitions/modules/search.js +41 -41
- package/src/definitions/modules/shape.js +35 -35
- package/src/definitions/modules/sidebar.js +28 -28
- package/src/definitions/modules/slider.js +78 -57
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +33 -33
- package/src/definitions/modules/toast.js +42 -18
- package/src/definitions/modules/transition.js +25 -25
- package/tasks/admin/components/create.js +1 -1
- package/tasks/admin/components/init.js +2 -2
- package/tasks/admin/components/update.js +4 -4
- package/tasks/admin/distributions/create.js +6 -7
- package/tasks/admin/distributions/init.js +2 -2
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +5 -5
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +1 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/config/admin/github.js +3 -4
- package/tasks/config/npm/gulpfile.js +1 -1
- package/tasks/config/project/config.js +10 -8
- package/tasks/config/project/install.js +14 -14
- package/tasks/config/project/release.js +3 -2
- package/tasks/config/tasks.js +4 -4
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +1 -1
- package/tasks/docs/metadata.js +2 -2
- package/tasks/docs/serve.js +2 -1
- package/tasks/install.js +3 -3
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
- package/test/modules/module.spec.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.25+bbe4e58
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(C,n,S,A){"use strict";n=n!==A&&n.Math===Math?n:globalThis,C.fn.transition=function(){var p,r=C(this),s=r.selector||"",g=Date.now(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(i){var l,c,e,d,t,a,n,o,u=C(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,b),d=l.className,e=l.error,t=l.metadata,o="."+l.namespace,n="module-"+l.namespace,c=u.data(n)||f,a=f.get.animationEndEvent(),!1===(w=w&&f.invoke(y))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),c=f,u.data(n,c)},destroy:function(){f.verbose("Destroying previous module for",m),u.removeData(n)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var n=u.parent(),e=u.next();0===e.length?u.detach().appendTo(n):u.detach().insertBefore(e)},repaint:function(){f.verbose("Repainting element");m.offsetWidth},delay:function(n){var e=(e=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");n=n!==A?n:l.interval,e="auto"==l.reverse&&e==d.outward||!0===l.reverse?(r.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,!f.is.supported())return f.error(e.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),c.complete()}f.can.animate()?f.set.animating(l.animation):f.error(e.noAnimation,l.animation,m)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(n){f.debug("Queueing animation of",n),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(n){n&&n.target===m&&n.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(m)))},force:{visible:function(){var n=u.attr("style"),n=f.get.userStyle(n),e=f.get.displayType(),n=n+"display: "+e+" !important;",i=u[0].style.display;return!e||"none"===i&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",e),u.attr("style",n),!0)},hidden:function(){var n=u.attr("style"),e=u.css("display"),n=n===A||""===n;"none"===e||f.is.hidden()?n&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.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!==d.inward&&e!==d.outward||(i=!0)})),i},inlineDisplay:function(){var n=u.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){f.remove.completeCallback(),n=n||l.animation;n=f.get.animationClass(n);f.save.animation(n),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(n))},duration:function(n,e){!(e="number"==typeof(e=e||l.duration)?e+"ms":e)&&0!==e||(f.verbose("Setting animation duration",e),u.css({"animation-duration":e}))},direction:function(n){(n=n||f.get.direction())==d.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(m)}},save:{animation:function(n){f.cache||(f.cache={}),f.cache.animation=n},displayType:function(n){"none"!==n&&u.data(t.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,f.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=f.get.currentAnimation();n&&(u.removeClass(n),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var n=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.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=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return d.animating+" "+d.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||f.cache.animation===A)&&f.cache.animation},currentDirection:function(){return f.is.inward()?d.inward:d.outward},direction:function(){return f.is.hidden()||!f.is.visible()?d.inward:d.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===d.inward?i=d.inward:e===d.outward&&(i=d.outward)})),i||!1},duration:function(n){return"string"==typeof(n=!1===(n=n||l.duration)?u.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)&&u.data(t.displayType)===A&&(""===(n=u.css("display"))||"none"===n?f.can.transition(!0):f.save.displayType(n)),u.data(t.displayType))},userStyle:function(n){return(n=n||u.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=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===A||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=C("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(d.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),e.remove(),i!=t)f.debug("Direction exists for animation",o),a=!0;else{if("none"==i||!i)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==A?r:a},animate:function(){return f.can.transition()!==A}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.looping)},occurring:function(n){return n="."+(n=n||l.animation).replace(" ","."),0<u.filter(n).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(m))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),m.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(m,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(m),l.onComplete.call(m)},show:function(n){f.force.visible()&&!1!==l.onShow.call(m)&&(f.verbose("Showing element",n),f.remove.hidden(),l.onBeforeShow.call(m,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(m),l.onComplete.call(m)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(n,e){if(f.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,f,n);else{if(e===A)return f[n];f[n]=e}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(n){var e,i;l.performance&&(i=(e=Date.now())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:m,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var n=l.name+":",i=0;g=!1,clearTimeout(f.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",s&&(n+=" '"+s+"'"),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=c;return n=n||h,e=e||m,"string"==typeof t&&s!==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(s[i])&&n!=a)s=s[i];else{if(s[i]!==A)return o=s[i],!1;{if(!C.isPlainObject(s[e])||n==a)return s[e]!==A&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):o!==A&&(i=o),Array.isArray(p)?p.push(i):p!==A?p=[p,i]:i!==A&&(p=i),o!==A&&o}};f.initialize()}),p!==A?p: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);
|
11
|
+
!function(C,n,S,A){"use strict";n=n!==A&&n.Math===Math?n:globalThis,C.fn.transition=function(){var p,r=C(this),s=r.selector||"",g=Date.now(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(i){var l,c,e,d,t,a,n,o,u=C(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,b),d=l.className,e=l.error,t=l.metadata,o="."+l.namespace,n="module-"+l.namespace,c=u.data(n)||f,a=f.get.animationEndEvent(),!1===(w=w&&f.invoke(y))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),c=f,u.data(n,c)},destroy:function(){f.verbose("Destroying previous module for",m),u.removeData(n)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var n=u.parent(),e=u.next();0===e.length?u.detach().appendTo(n):u.detach().insertBefore(e)},repaint:function(){f.verbose("Repainting element");m.offsetWidth},delay:function(n){var e=(e=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");n=n!==A?n:l.interval,e="auto"===l.reverse&&e===d.outward||!0===l.reverse?(r.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,!f.is.supported())return f.error(e.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),c.complete()}f.can.animate()?f.set.animating(l.animation):f.error(e.noAnimation,l.animation,m)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(n){f.debug("Queueing animation of",n),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(n){n&&n.target===m&&n.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(m)))},force:{visible:function(){var n=u.attr("style"),n=f.get.userStyle(n),e=f.get.displayType(),n=n+"display: "+e+" !important;",i=u[0].style.display;return!e||"none"===i&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",e),u.attr("style",n),!0)},hidden:function(){var n=u.attr("style"),e=u.css("display"),n=n===A||""===n;"none"===e||f.is.hidden()?n&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.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!==d.inward&&e!==d.outward||(i=!0)})),i},inlineDisplay:function(){var n=u.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){f.remove.completeCallback(),n=n||l.animation;n=f.get.animationClass(n);f.save.animation(n),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(n))},duration:function(n,e){!(e="number"==typeof(e=e||l.duration)?e+"ms":e)&&0!==e||(f.verbose("Setting animation duration",e),u.css({"animation-duration":e}))},direction:function(n){(n=n||f.get.direction())===d.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(m)}},save:{animation:function(n){f.cache||(f.cache={}),f.cache.animation=n},displayType:function(n){"none"!==n&&u.data(t.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,f.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=f.get.currentAnimation();n&&(u.removeClass(n),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var n=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.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=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return d.animating+" "+d.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||f.cache.animation===A)&&f.cache.animation},currentDirection:function(){return f.is.inward()?d.inward:d.outward},direction:function(){return f.is.hidden()||!f.is.visible()?d.inward:d.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===d.inward?i=d.inward:e===d.outward&&(i=d.outward)})),i||!1},duration:function(n){return"string"==typeof(n=!1===(n=n||l.duration)?u.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)&&u.data(t.displayType)===A&&(""===(n=u.css("display"))||"none"===n?f.can.transition(!0):f.save.displayType(n)),u.data(t.displayType))},userStyle:function(n){return(n=n||u.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=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===A||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=C("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(d.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),e.remove(),i!==t)f.debug("Direction exists for animation",o),a=!0;else{if("none"===i||!i)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==A?r:a},animate:function(){return f.can.transition()!==A}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.looping)},occurring:function(n){return n="."+(n=n||l.animation).replace(" ","."),0<u.filter(n).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(m))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),m.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(m,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(m),l.onComplete.call(m)},show:function(n){f.force.visible()&&!1!==l.onShow.call(m)&&(f.verbose("Showing element",n),f.remove.hidden(),l.onBeforeShow.call(m,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(m),l.onComplete.call(m)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(n,e){if(f.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,f,n);else{if(e===A)return f[n];f[n]=e}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(n){var e,i;l.performance&&(i=(e=Date.now())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:m,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var n=l.name+":",i=0;g=!1,clearTimeout(f.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",s&&(n+=" '"+s+"'"),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=c;return n=n||h,e=e||m,"string"==typeof t&&s!==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(s[i])&&n!==a)s=s[i];else{if(s[i]!==A)return o=s[i],!1;{if(!C.isPlainObject(s[e])||n===a)return s[e]!==A&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):o!==A&&(i=o),Array.isArray(p)?p.push(i):p!==A?p=[p,i]:i!==A&&(p=i),o!==A&&o}};f.initialize()}),p!==A?p: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.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.25+bbe4e58 - Visibility
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
query = arguments[0],
|
31
|
-
methodInvoked =
|
31
|
+
methodInvoked = typeof query === 'string',
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
33
|
returnedValue,
|
34
34
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
$allModules.each(function () {
|
40
40
|
var
|
41
|
-
settings =
|
41
|
+
settings = $.isPlainObject(parameters)
|
42
42
|
? $.extend(true, {}, $.fn.visibility.settings, parameters)
|
43
43
|
: $.extend({}, $.fn.visibility.settings),
|
44
44
|
|
@@ -83,10 +83,10 @@
|
|
83
83
|
module.setup.cache();
|
84
84
|
|
85
85
|
if (module.should.trackChanges()) {
|
86
|
-
if (settings.type
|
86
|
+
if (settings.type === 'image') {
|
87
87
|
module.setup.image();
|
88
88
|
}
|
89
|
-
if (settings.type
|
89
|
+
if (settings.type === 'fixed') {
|
90
90
|
module.setup.fixed();
|
91
91
|
}
|
92
92
|
|
@@ -131,7 +131,7 @@
|
|
131
131
|
.off('scroll' + eventNamespace, module.event.scroll)
|
132
132
|
.off('scrollchange' + eventNamespace, module.event.scrollchange)
|
133
133
|
;
|
134
|
-
if (settings.type
|
134
|
+
if (settings.type === 'fixed') {
|
135
135
|
module.resetFixed();
|
136
136
|
module.remove.placeholder();
|
137
137
|
}
|
@@ -189,7 +189,7 @@
|
|
189
189
|
[].forEach.call(mutations, function (mutation) {
|
190
190
|
if (mutation.removedNodes) {
|
191
191
|
[].forEach.call(mutation.removedNodes, function (node) {
|
192
|
-
if (node
|
192
|
+
if (node === element || $(node).find(element).length > 0) {
|
193
193
|
module.debug('Element removed from DOM, tearing down events');
|
194
194
|
module.destroy();
|
195
195
|
}
|
@@ -227,7 +227,7 @@
|
|
227
227
|
},
|
228
228
|
|
229
229
|
precache: function (images, callback) {
|
230
|
-
if (!
|
230
|
+
if (!Array.isArray(images)) {
|
231
231
|
images = [images];
|
232
232
|
}
|
233
233
|
var
|
@@ -299,7 +299,7 @@
|
|
299
299
|
module.precache(src, function () {
|
300
300
|
module.set.image(src, function () {
|
301
301
|
loadedCount++;
|
302
|
-
if (loadedCount
|
302
|
+
if (loadedCount === moduleCount) {
|
303
303
|
settings.onAllLoaded.call(this);
|
304
304
|
}
|
305
305
|
settings.onLoad.call(this);
|
@@ -427,27 +427,27 @@
|
|
427
427
|
},
|
428
428
|
verticallyScrollableContext: function () {
|
429
429
|
var
|
430
|
-
overflowY =
|
430
|
+
overflowY = $context[0] !== window
|
431
431
|
? $context.css('overflow-y')
|
432
432
|
: false
|
433
433
|
;
|
434
434
|
|
435
|
-
return
|
435
|
+
return overflowY === 'auto' || overflowY === 'scroll';
|
436
436
|
},
|
437
437
|
horizontallyScrollableContext: function () {
|
438
438
|
var
|
439
|
-
overflowX =
|
439
|
+
overflowX = $context[0] !== window
|
440
440
|
? $context.css('overflow-x')
|
441
441
|
: false
|
442
442
|
;
|
443
443
|
|
444
|
-
return
|
444
|
+
return overflowX === 'auto' || overflowX === 'scroll';
|
445
445
|
},
|
446
446
|
},
|
447
447
|
|
448
448
|
refresh: function () {
|
449
449
|
module.debug('Refreshing constants (width/height)');
|
450
|
-
if (settings.type
|
450
|
+
if (settings.type === 'fixed') {
|
451
451
|
module.resetFixed();
|
452
452
|
}
|
453
453
|
module.reset();
|
@@ -515,7 +515,7 @@
|
|
515
515
|
if (amount && newCallback) {
|
516
516
|
settings.onPassed[amount] = newCallback;
|
517
517
|
} else if (amount !== undefined) {
|
518
|
-
return
|
518
|
+
return module.get.pixelsPassed(amount) > calculations.pixelsPassed;
|
519
519
|
} else if (calculations.passing) {
|
520
520
|
$.each(settings.onPassed, function (amount, callback) {
|
521
521
|
if (calculations.bottomVisible || calculations.pixelsPassed > module.get.pixelsPassed(amount)) {
|
@@ -873,7 +873,7 @@
|
|
873
873
|
;
|
874
874
|
module.verbose('Saving element position');
|
875
875
|
// (quicker than $.extend)
|
876
|
-
element.fits =
|
876
|
+
element.fits = element.height < screen.height;
|
877
877
|
element.offset = $module.offset();
|
878
878
|
element.width = $module.outerWidth();
|
879
879
|
element.height = $module.outerHeight();
|
@@ -907,21 +907,21 @@
|
|
907
907
|
}
|
908
908
|
|
909
909
|
// visibility
|
910
|
-
element.topPassed =
|
911
|
-
element.bottomPassed =
|
910
|
+
element.topPassed = screen.top >= element.top;
|
911
|
+
element.bottomPassed = screen.top >= element.bottom;
|
912
912
|
element.topVisible = (screen.bottom >= element.top) && !element.topPassed;
|
913
913
|
element.bottomVisible = (screen.bottom >= element.bottom) && !element.bottomPassed;
|
914
914
|
element.pixelsPassed = 0;
|
915
915
|
element.percentagePassed = 0;
|
916
916
|
|
917
917
|
// meta calculations
|
918
|
-
element.onScreen = (
|
919
|
-
element.passing =
|
920
|
-
element.offScreen =
|
918
|
+
element.onScreen = (element.topVisible || element.passing) && !element.bottomPassed;
|
919
|
+
element.passing = element.topPassed && !element.bottomPassed;
|
920
|
+
element.offScreen = !element.onScreen;
|
921
921
|
|
922
922
|
// passing calculations
|
923
923
|
if (element.passing) {
|
924
|
-
element.pixelsPassed =
|
924
|
+
element.pixelsPassed = screen.top - element.top;
|
925
925
|
element.percentagePassed = (screen.top - element.top) / element.height;
|
926
926
|
}
|
927
927
|
module.cache.element = element;
|
@@ -957,13 +957,13 @@
|
|
957
957
|
element = module.get.elementCalculations()
|
958
958
|
;
|
959
959
|
if (amount.search('%') > -1) {
|
960
|
-
return
|
960
|
+
return element.height * (parseInt(amount, 10) / 100);
|
961
961
|
}
|
962
962
|
|
963
963
|
return parseInt(amount, 10);
|
964
964
|
},
|
965
965
|
occurred: function (callback) {
|
966
|
-
return
|
966
|
+
return module.cache.occurred !== undefined
|
967
967
|
? module.cache.occurred[callback] || false
|
968
968
|
: false;
|
969
969
|
},
|
@@ -1127,17 +1127,17 @@
|
|
1127
1127
|
query = query.split(/[ .]/);
|
1128
1128
|
maxDepth = query.length - 1;
|
1129
1129
|
$.each(query, function (depth, value) {
|
1130
|
-
var camelCaseValue =
|
1130
|
+
var camelCaseValue = depth !== maxDepth
|
1131
1131
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1132
1132
|
: query
|
1133
1133
|
;
|
1134
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1134
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1135
1135
|
object = object[camelCaseValue];
|
1136
1136
|
} else if (object[camelCaseValue] !== undefined) {
|
1137
1137
|
found = object[camelCaseValue];
|
1138
1138
|
|
1139
1139
|
return false;
|
1140
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1140
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1141
1141
|
object = object[value];
|
1142
1142
|
} else if (object[value] !== undefined) {
|
1143
1143
|
found = object[value];
|
@@ -1182,7 +1182,7 @@
|
|
1182
1182
|
}
|
1183
1183
|
});
|
1184
1184
|
|
1185
|
-
return
|
1185
|
+
return returnedValue !== undefined
|
1186
1186
|
? returnedValue
|
1187
1187
|
: this;
|
1188
1188
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.25+bbe4e58
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(O,A,z,w){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}A=A!==w&&A.Math===Math?A:globalThis,O.fn.visibility=function(h){var x,e=O(this),P=e.selector||"",y=Date.now(),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(A),u=O(this),f=[A,z].indexOf(i.context)<0?O(z).find(i.context):O(i.context),b=u.data(l),m=A.requestAnimationFrame||A.mozRequestAnimationFrame||A.webkitRequestAnimationFrame||A.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 A&&(o=new MutationObserver(v.event.contextChanged),n=new MutationObserver(v.event.changed),o.observe(z,{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=Array.isArray(e)?e:[e]).length,t=0,i=[],s=z.createElement("img"),c=function(){++t>=e.length&&E(o)&&o()};n--;)(s=z.createElement("img")).addEventListener("load",c),s.addEventListener("error",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]!==A&&f.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=f[0]!==A&&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=Date.now())-(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]}}})),E(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:A,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,A,z,w){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}A=A!==w&&A.Math===Math?A:globalThis,O.fn.visibility=function(h){var x,e=O(this),P=e.selector||"",y=Date.now(),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(A),u=O(this),f=[A,z].indexOf(i.context)<0?O(z).find(i.context):O(i.context),b=u.data(l),m=A.requestAnimationFrame||A.mozRequestAnimationFrame||A.webkitRequestAnimationFrame||A.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 A&&(o=new MutationObserver(v.event.contextChanged),n=new MutationObserver(v.event.changed),o.observe(z,{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=Array.isArray(e)?e:[e]).length,t=0,i=[],s=z.createElement("img"),c=function(){++t>=e.length&&E(o)&&o()};n--;)(s=z.createElement("img")).addEventListener("load",c),s.addEventListener("error",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]!==A&&f.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=f[0]!==A&&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=Date.now())-(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]}}})),E(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:A,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);
|