fomantic-ui 2.9.3-beta.1 → 2.9.3-beta.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.
Files changed (187) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/CONTRIBUTORS.md +102 -99
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +1 -5
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +14 -8
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +6 -6
  16. package/dist/components/calendar.js +1 -6
  17. package/dist/components/calendar.min.css +2 -2
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +1 -5
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +1 -5
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +29 -14
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +1 -6
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +38 -27
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +2 -2
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +31 -23
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +2 -2
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +38 -26
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +2 -2
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +16 -8
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +18 -12
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +2 -2
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +1 -6
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +2 -2
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -5
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +1 -5
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +3 -2
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -5
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +2 -2
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +15 -8
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +2 -2
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +1 -1
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +1 -6
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +2 -2
  129. package/dist/components/state.js +23 -20
  130. package/dist/components/state.min.js +2 -2
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +17 -16
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +2 -2
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +14 -6
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +2 -2
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +17 -9
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +2 -2
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +1 -5
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +2 -2
  155. package/dist/components/visibility.js +15 -6
  156. package/dist/components/visibility.min.js +2 -2
  157. package/dist/semantic.css +60 -59
  158. package/dist/semantic.js +298 -244
  159. package/dist/semantic.min.css +2 -2
  160. package/dist/semantic.min.js +2 -2
  161. package/package.json +1 -1
  162. package/src/definitions/behaviors/api.js +13 -7
  163. package/src/definitions/behaviors/form.js +30 -22
  164. package/src/definitions/behaviors/state.js +22 -19
  165. package/src/definitions/behaviors/visibility.js +14 -5
  166. package/src/definitions/elements/segment.less +2 -1
  167. package/src/definitions/modules/accordion.js +0 -4
  168. package/src/definitions/modules/calendar.js +0 -5
  169. package/src/definitions/modules/calendar.less +1 -1
  170. package/src/definitions/modules/checkbox.js +0 -4
  171. package/src/definitions/modules/dimmer.js +0 -4
  172. package/src/definitions/modules/dropdown.js +28 -13
  173. package/src/definitions/modules/embed.js +0 -5
  174. package/src/definitions/modules/flyout.js +37 -26
  175. package/src/definitions/modules/modal.js +37 -25
  176. package/src/definitions/modules/nag.js +15 -7
  177. package/src/definitions/modules/popup.js +17 -11
  178. package/src/definitions/modules/progress.js +0 -5
  179. package/src/definitions/modules/rating.js +0 -4
  180. package/src/definitions/modules/search.js +0 -4
  181. package/src/definitions/modules/shape.js +0 -4
  182. package/src/definitions/modules/sidebar.js +14 -7
  183. package/src/definitions/modules/slider.js +0 -5
  184. package/src/definitions/modules/sticky.js +16 -15
  185. package/src/definitions/modules/tab.js +13 -5
  186. package/src/definitions/modules/toast.js +16 -8
  187. package/src/definitions/modules/transition.js +0 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Tab
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Tab
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Tab
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Tab
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -30,14 +30,25 @@
30
30
  ? $(window)
31
31
  : $(this),
32
32
  $document = $(document),
33
- moduleSelector = $allModules.selector || '',
34
33
  time = Date.now(),
35
34
  performance = [],
36
35
 
37
36
  query = arguments[0],
38
37
  methodInvoked = typeof query === 'string',
39
38
  queryArguments = [].slice.call(arguments, 1),
39
+ contextCheck = function (context, win) {
40
+ var $context;
41
+ if ([window, document].indexOf(context) >= 0) {
42
+ $context = $(context);
43
+ } else {
44
+ $context = $(win.document).find(context);
45
+ if ($context.length === 0) {
46
+ $context = win.frameElement ? contextCheck(context, win.parent) : window;
47
+ }
48
+ }
40
49
 
50
+ return $context;
51
+ },
41
52
  initializedHistory = false,
42
53
  returnedValue
43
54
  ;
@@ -152,7 +163,7 @@
152
163
  $context = $reference.parent();
153
164
  module.verbose('Determined parent element for creating context', $context);
154
165
  } else if (settings.context) {
155
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context);
166
+ $context = contextCheck(settings.context, window);
156
167
  module.verbose('Using selector for tab context', settings.context, $context);
157
168
  } else {
158
169
  $context = $('body');
@@ -788,9 +799,6 @@
788
799
  totalTime += data['Execution Time'];
789
800
  });
790
801
  title += ' ' + totalTime + 'ms';
791
- if (moduleSelector) {
792
- title += ' \'' + moduleSelector + '\'';
793
- }
794
802
  if (performance.length > 0) {
795
803
  console.groupCollapsed(title);
796
804
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Tab
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Tab
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
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(j,U,k){"use strict";function D(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,j.fn.tab=function(c){var l,d=D(this)?j(U):j(this),u=j(k),g=d.selector||"",L=Date.now(),S=[],E=c,w="string"==typeof E,O=[].slice.call(arguments,1),F=!1;return d.each(function(){var b,i,f,h,p,v=j.isPlainObject(c)?j.extend(!0,{},j.fn.tab.settings,c):j.extend({},j.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,T=v.error,a=v.regExp,n="."+v.namespace,e="module-"+v.namespace,A=j(this),o={},C=!0,r=0,x=this,s=A.data(e),P={initialize:function(){P.debug("Initializing tab menu item",A),P.determineTabs(),P.debug("Determining tabs",v.context,i),v.auto&&P.set.auto(),P.bind.events(),v.history&&!F&&(P.initializeHistory(),F=!0);var e,t=P.determine.activeTab();v.autoTabActivation&&void 0===s&&null===t&&(t=!0===v.autoTabActivation?P.get.initialPath():v.autoTabActivation,P.debug("No active tab detected, setting tab active",t),P.changeTab(t)),null!==t&&v.history&&(e=j.address.autoUpdate(),j.address.autoUpdate(!1),j.address.value(t),j.address.autoUpdate(e)),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),s=P,A.data(e,P)},destroy:function(){P.debug("Destroying tabs",A),A.removeData(e).off(n)},bind:{events:function(){var e;null!==(e=x)&&e===e.window||(P.debug("Attaching tab activation events to element",A),A.on("click"+n,P.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<A.closest(t.ui).length?(e=A.closest(t.ui),P.verbose("Using closest UI element as parent",e)):e=A,b=e.parent(),P.verbose("Determined parent element for creating context",b)):v.context?(b=[U,k].indexOf(v.context)<0?u.find(v.context):j(v.context),P.verbose("Using selector for tab context",v.context,b)):b=j("body"),v.childrenOnly?(i=b.children(t.tabs),P.debug("Searching tab context children for tabs",b,i)):(i=b.find(t.tabs),P.debug("Searching tab context for tabs",b,i))},initializeHistory:function(){if(P.debug("Initializing page state"),void 0===j.address)return P.error(T.state),!1;if("state"===v.historyType){if(P.debug("Using HTML5 to manage state"),!1===v.path)return P.error(T.path),!1;j.address.history(!0).state(v.path),j(U).trigger("popstate")}j.address.bind("change",P.event.history.change)},event:{click:function(e){var t=j(this).data(y.tab);void 0!==t?(v.history?(P.verbose("Updating page state",e),j.address.value(t)):(P.verbose("Changing tab",e),P.changeTab(t)),e.preventDefault()):P.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||P.get.initialPath(),a=v.templates.determineTitle(t)||!1;P.performance.display(),P.debug("History change event",t,e),p=e,void 0!==t&&P.changeTab(t),a&&j.address.title(a)}}},refresh:function(){f&&(P.debug("Refreshing tab",f),P.changeTab(f))},cache:{read:function(e){return void 0!==e&&o[e]},add:function(e,t){e=e||f,P.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||f,P.debug("Removing cached content for",e),delete o[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";P.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=P.get.tabElement(e);t.hasClass(m.loading)||(P.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(i).removeClass(m.active+" "+m.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(l){var d=U.history&&U.history.pushState&&v.ignoreFirstLoad&&C,u=v.auto||j.isPlainObject(v.apiSettings),g=u&&!d?P.utilities.pathToArray(l):P.get.defaultPathArray(l);l=P.utilities.arrayToPath(g),j.each(g,function(e,t){var a,n,i=g.slice(0,e+1),o=P.utilities.arrayToPath(i),r=P.is.tab(o),s=e+1===g.length,c=P.get.tabElement(o);return P.verbose("Looking for tab",t),r?(P.verbose("Tab was found",t),f=o,h=P.utilities.filterArray(g,i),s?n=!0:(r=g.slice(0,e+2),t=P.utilities.arrayToPath(r),(n=!P.is.tab(t))&&P.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(x,o)?(P.debug("onBeforeChange returned false, cancelling tab change",c),!1):n&&u?(d?(P.debug("Ignoring remote content on first tab load",o),C=!1,P.cache.add(l,c.html()),P.activate.all(o),v.onFirstLoad.call(c[0],o,h,p),v.onLoad.call(c[0],o,h,p)):(P.activate.navigation(o),P.fetch.content(o,l)),!1):(P.debug("Opened local tab",o),P.activate.all(o),P.cache.read(o)||(P.cache.add(o,!0),P.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),void v.onLoad.call(c[0],o,h,p))):-1!==l.search("/")||""===l?(P.error(T.missingTab,A,b,o),!1):(l=P.escape.string(l),o=(a=j("#"+l+', a[name="'+l+'"]')).closest("[data-tab]").data(y.tab),c=P.get.tabElement(o),a&&0<a.length&&o?(P.debug("Anchor link used, opening parent tab",c,a),!1===v.onBeforeChange.call(x,o)?P.debug("onBeforeChange returned false, cancelling tab change",c):(c.hasClass(m.active)||setTimeout(function(){P.scrollTo(a)},0),P.activate.all(o),P.cache.read(o)||(P.cache.add(o,!0),P.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),v.onLoad.call(c[0],o,h,p)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(P.debug("Forcing scroll to an in-page link in a hidden tab",t,e),u.scrollTop(t))},update:{content:function(e,t,a){var n=P.get.tabElement(e),i=n[0];a=void 0!==a?a:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&"string"!=typeof t?n.empty().append(j(t).clone(!0)):a?(P.debug("Updating HTML and evaluating inline scripts",e,t),n.html(t)):(P.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(t,a){var e,n=P.get.tabElement(t),i={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"===v.cacheType&&P.cache.add(a,e),P.update.content(t,e),t==f?(P.debug("Content loaded",t),P.activate.tab(t)):P.debug("Content loaded in background",t),v.onFirstLoad.call(n[0],t,h,p),v.onLoad.call(n[0],t,h,p),v.loadOnce?P.cache.add(a,!0):"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&0<n.children().length?setTimeout(function(){var e=(e=n.children().clone(!0)).not("script");P.cache.add(a,e)},0):P.cache.add(a,n.html())},urlData:{tab:a}},o=n.api("get request")||!1,o=o&&"pending"===o.state();a=a||t,e=P.cache.read(a),v.cache&&e?(P.activate.tab(t),P.debug("Adding cached content",a),v.loadOnce||("once"===v.evaluateScripts?P.update.content(t,e,!1):P.update.content(t,e)),v.onLoad.call(n[0],t,h,p)):o?(P.set.loading(t),P.debug("Content is already loading",a)):void 0!==j.api?(e=j.extend(!0,{},v.apiSettings,i),P.debug("Retrieving remote content",a,e),P.set.loading(t),n.api(e)):P.error(T.api)}},activate:{all:function(e){P.activate.tab(e),P.activate.navigation(e)},tab:function(e){var t=P.get.tabElement(e),a="siblings"===v.deactivate?t.siblings(i):i.not(t),n=t.hasClass(m.active);P.verbose("Showing tab content for",t),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=P.get.navElement(e),a="siblings"===v.deactivate?t.siblings(d):d.not(t),n=t.hasClass(m.active);P.verbose("Activating tab navigation for",t,e),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading))}},deactivate:{all:function(){P.deactivate.navigation(),P.deactivate.tabs()},navigation:function(){d.removeClass(m.active)},tabs:function(){i.removeClass(m.active+" "+m.loading)}},is:{tab:function(e){return void 0!==e&&0<P.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||i.eq(0).data(y.tab)},path:function(){return j.address.value()},defaultPathArray:function(e){return P.utilities.pathToArray(P.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+P.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(P.debug("Found default tab",t),r<v.maxDepth)return r++,P.get.defaultPath(t);P.error(T.recursion)}else P.debug("No default tabs found for",e,i);return r=0,e},navElement:function(e){return e=e||f,d.filter("[data-"+y.tab+'="'+P.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||f,t=P.utilities.pathToArray(e),t=P.utilities.last(t),e=i.filter("[data-"+y.tab+'="'+P.escape.string(e)+'"]'),t=i.filter("[data-"+y.tab+'="'+P.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return f}},determine:{activeTab:function(){var a=null;return i.each(function(e,t){j(t).hasClass(m.active)&&(t=j(this).data(y.tab),d.filter("[data-"+y.tab+'="'+P.escape.string(t)+'"]').hasClass(m.active)&&(a=t))}),a}},utilities:{filterArray:function(e,t){return j.grep(e,function(e){return-1===j.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?f:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(P.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,v,e);else{if(void 0===t)return v[e];j.isPlainObject(v[e])?j.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,v.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),P.verbose.apply(console,arguments)))},error:function(){v.silent||(P.error=Function.prototype.bind.call(console.error,console,v.name+":"),P.error.apply(console,arguments))},performance:{log:function(e){var t,a;v.performance&&(a=(t=Date.now())-(L||t),L=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":a})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var e=v.name+":",a=0;L=!1,clearTimeout(P.performance.timer),j.each(S,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",g&&(e+=" '"+g+"'"),0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):j.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var i,o,a,r=s;return e=e||O,t=t||x,"string"==typeof n&&void 0!==r&&(n=n.split(/[ .]/),i=n.length-1,j.each(n,function(e,t){var a=e!==i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(j.isPlainObject(r[a])&&e!==i)r=r[a];else{if(void 0!==r[a])return o=r[a],!1;{if(!j.isPlainObject(r[t])||e===i)return void 0!==r[t]?o=r[t]:P.error(T.method,n),!1;r=r[t]}}})),D(o)?a=o.apply(t,e):void 0!==o&&(a=o),Array.isArray(l)?l.push(a):void 0!==l?l=[l,a]:void 0!==a&&(l=a),o}};w?(void 0===s&&P.initialize(),P.invoke(E)):(void 0!==s&&s.invoke("destroy"),P.initialize())}),void 0!==l?l:this},j.tab=function(){j(U).tab.apply(this,arguments)},j.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,a){},onLoad:function(e,t,a){},onVisible:function(e,t,a){},onRequest:function(e,t,a){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document);
11
+ !function(j,U,n){"use strict";function k(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,j.fn.tab=function(c){var l,d=k(this)?j(U):j(this),u=j(n),g=Date.now(),L=[],E=c,S="string"==typeof E,w=[].slice.call(arguments,1),O=function(e,t){var a;return 0<=[U,n].indexOf(e)?a=j(e):0===(a=j(t.document).find(e)).length&&(a=t.frameElement?O(e,t.parent):U),a},F=!1;return d.each(function(){var b,i,f,h,p,v=j.isPlainObject(c)?j.extend(!0,{},j.fn.tab.settings,c):j.extend({},j.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,T=v.error,a=v.regExp,n="."+v.namespace,e="module-"+v.namespace,A=j(this),o={},C=!0,r=0,x=this,s=A.data(e),P={initialize:function(){P.debug("Initializing tab menu item",A),P.determineTabs(),P.debug("Determining tabs",v.context,i),v.auto&&P.set.auto(),P.bind.events(),v.history&&!F&&(P.initializeHistory(),F=!0);var e,t=P.determine.activeTab();v.autoTabActivation&&void 0===s&&null===t&&(t=!0===v.autoTabActivation?P.get.initialPath():v.autoTabActivation,P.debug("No active tab detected, setting tab active",t),P.changeTab(t)),null!==t&&v.history&&(e=j.address.autoUpdate(),j.address.autoUpdate(!1),j.address.value(t),j.address.autoUpdate(e)),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),s=P,A.data(e,P)},destroy:function(){P.debug("Destroying tabs",A),A.removeData(e).off(n)},bind:{events:function(){var e;null!==(e=x)&&e===e.window||(P.debug("Attaching tab activation events to element",A),A.on("click"+n,P.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<A.closest(t.ui).length?(e=A.closest(t.ui),P.verbose("Using closest UI element as parent",e)):e=A,b=e.parent(),P.verbose("Determined parent element for creating context",b)):v.context?(b=O(v.context,U),P.verbose("Using selector for tab context",v.context,b)):b=j("body"),v.childrenOnly?(i=b.children(t.tabs),P.debug("Searching tab context children for tabs",b,i)):(i=b.find(t.tabs),P.debug("Searching tab context for tabs",b,i))},initializeHistory:function(){if(P.debug("Initializing page state"),void 0===j.address)return P.error(T.state),!1;if("state"===v.historyType){if(P.debug("Using HTML5 to manage state"),!1===v.path)return P.error(T.path),!1;j.address.history(!0).state(v.path),j(U).trigger("popstate")}j.address.bind("change",P.event.history.change)},event:{click:function(e){var t=j(this).data(y.tab);void 0!==t?(v.history?(P.verbose("Updating page state",e),j.address.value(t)):(P.verbose("Changing tab",e),P.changeTab(t)),e.preventDefault()):P.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||P.get.initialPath(),a=v.templates.determineTitle(t)||!1;P.performance.display(),P.debug("History change event",t,e),p=e,void 0!==t&&P.changeTab(t),a&&j.address.title(a)}}},refresh:function(){f&&(P.debug("Refreshing tab",f),P.changeTab(f))},cache:{read:function(e){return void 0!==e&&o[e]},add:function(e,t){e=e||f,P.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||f,P.debug("Removing cached content for",e),delete o[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";P.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=P.get.tabElement(e);t.hasClass(m.loading)||(P.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(i).removeClass(m.active+" "+m.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(l){var d=U.history&&U.history.pushState&&v.ignoreFirstLoad&&C,u=v.auto||j.isPlainObject(v.apiSettings),g=u&&!d?P.utilities.pathToArray(l):P.get.defaultPathArray(l);l=P.utilities.arrayToPath(g),j.each(g,function(e,t){var a,n,i=g.slice(0,e+1),o=P.utilities.arrayToPath(i),r=P.is.tab(o),s=e+1===g.length,c=P.get.tabElement(o);return P.verbose("Looking for tab",t),r?(P.verbose("Tab was found",t),f=o,h=P.utilities.filterArray(g,i),s?n=!0:(r=g.slice(0,e+2),t=P.utilities.arrayToPath(r),(n=!P.is.tab(t))&&P.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(x,o)?(P.debug("onBeforeChange returned false, cancelling tab change",c),!1):n&&u?(d?(P.debug("Ignoring remote content on first tab load",o),C=!1,P.cache.add(l,c.html()),P.activate.all(o),v.onFirstLoad.call(c[0],o,h,p),v.onLoad.call(c[0],o,h,p)):(P.activate.navigation(o),P.fetch.content(o,l)),!1):(P.debug("Opened local tab",o),P.activate.all(o),P.cache.read(o)||(P.cache.add(o,!0),P.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),void v.onLoad.call(c[0],o,h,p))):-1!==l.search("/")||""===l?(P.error(T.missingTab,A,b,o),!1):(l=P.escape.string(l),o=(a=j("#"+l+', a[name="'+l+'"]')).closest("[data-tab]").data(y.tab),c=P.get.tabElement(o),a&&0<a.length&&o?(P.debug("Anchor link used, opening parent tab",c,a),!1===v.onBeforeChange.call(x,o)?P.debug("onBeforeChange returned false, cancelling tab change",c):(c.hasClass(m.active)||setTimeout(function(){P.scrollTo(a)},0),P.activate.all(o),P.cache.read(o)||(P.cache.add(o,!0),P.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(c[0],o,h,p)),v.onLoad.call(c[0],o,h,p)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(P.debug("Forcing scroll to an in-page link in a hidden tab",t,e),u.scrollTop(t))},update:{content:function(e,t,a){var n=P.get.tabElement(e),i=n[0];a=void 0!==a?a:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&"string"!=typeof t?n.empty().append(j(t).clone(!0)):a?(P.debug("Updating HTML and evaluating inline scripts",e,t),n.html(t)):(P.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(t,a){var e,n=P.get.tabElement(t),i={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"===v.cacheType&&P.cache.add(a,e),P.update.content(t,e),t==f?(P.debug("Content loaded",t),P.activate.tab(t)):P.debug("Content loaded in background",t),v.onFirstLoad.call(n[0],t,h,p),v.onLoad.call(n[0],t,h,p),v.loadOnce?P.cache.add(a,!0):"string"==typeof v.cacheType&&"dom"===v.cacheType.toLowerCase()&&0<n.children().length?setTimeout(function(){var e=(e=n.children().clone(!0)).not("script");P.cache.add(a,e)},0):P.cache.add(a,n.html())},urlData:{tab:a}},o=n.api("get request")||!1,o=o&&"pending"===o.state();a=a||t,e=P.cache.read(a),v.cache&&e?(P.activate.tab(t),P.debug("Adding cached content",a),v.loadOnce||("once"===v.evaluateScripts?P.update.content(t,e,!1):P.update.content(t,e)),v.onLoad.call(n[0],t,h,p)):o?(P.set.loading(t),P.debug("Content is already loading",a)):void 0!==j.api?(e=j.extend(!0,{},v.apiSettings,i),P.debug("Retrieving remote content",a,e),P.set.loading(t),n.api(e)):P.error(T.api)}},activate:{all:function(e){P.activate.tab(e),P.activate.navigation(e)},tab:function(e){var t=P.get.tabElement(e),a="siblings"===v.deactivate?t.siblings(i):i.not(t),n=t.hasClass(m.active);P.verbose("Showing tab content for",t),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=P.get.navElement(e),a="siblings"===v.deactivate?t.siblings(d):d.not(t),n=t.hasClass(m.active);P.verbose("Activating tab navigation for",t,e),n||(t.addClass(m.active),a.removeClass(m.active+" "+m.loading))}},deactivate:{all:function(){P.deactivate.navigation(),P.deactivate.tabs()},navigation:function(){d.removeClass(m.active)},tabs:function(){i.removeClass(m.active+" "+m.loading)}},is:{tab:function(e){return void 0!==e&&0<P.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||i.eq(0).data(y.tab)},path:function(){return j.address.value()},defaultPathArray:function(e){return P.utilities.pathToArray(P.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+P.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(P.debug("Found default tab",t),r<v.maxDepth)return r++,P.get.defaultPath(t);P.error(T.recursion)}else P.debug("No default tabs found for",e,i);return r=0,e},navElement:function(e){return e=e||f,d.filter("[data-"+y.tab+'="'+P.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||f,t=P.utilities.pathToArray(e),t=P.utilities.last(t),e=i.filter("[data-"+y.tab+'="'+P.escape.string(e)+'"]'),t=i.filter("[data-"+y.tab+'="'+P.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return f}},determine:{activeTab:function(){var a=null;return i.each(function(e,t){j(t).hasClass(m.active)&&(t=j(this).data(y.tab),d.filter("[data-"+y.tab+'="'+P.escape.string(t)+'"]').hasClass(m.active)&&(a=t))}),a}},utilities:{filterArray:function(e,t){return j.grep(e,function(e){return-1===j.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?f:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(P.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,v,e);else{if(void 0===t)return v[e];j.isPlainObject(v[e])?j.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,v.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),P.verbose.apply(console,arguments)))},error:function(){v.silent||(P.error=Function.prototype.bind.call(console.error,console,v.name+":"),P.error.apply(console,arguments))},performance:{log:function(e){var t,a;v.performance&&(a=(t=Date.now())-(g||t),g=t,L.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":a})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var e=v.name+":",a=0;g=!1,clearTimeout(P.performance.timer),j.each(L,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",0<L.length&&(console.groupCollapsed(e),console.table?console.table(L):j.each(L,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),L=[]}},invoke:function(n,e,t){var i,o,a,r=s;return e=e||w,t=t||x,"string"==typeof n&&void 0!==r&&(n=n.split(/[ .]/),i=n.length-1,j.each(n,function(e,t){var a=e!==i?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(j.isPlainObject(r[a])&&e!==i)r=r[a];else{if(void 0!==r[a])return o=r[a],!1;{if(!j.isPlainObject(r[t])||e===i)return void 0!==r[t]?o=r[t]:P.error(T.method,n),!1;r=r[t]}}})),k(o)?a=o.apply(t,e):void 0!==o&&(a=o),Array.isArray(l)?l.push(a):void 0!==l?l=[l,a]:void 0!==a&&(l=a),o}};S?(void 0===s&&P.initialize(),P.invoke(E)):(void 0!==s&&s.invoke("destroy"),P.initialize())}),void 0!==l?l:this},j.tab=function(){j(U).tab.apply(this,arguments)},j.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,a){},onLoad:function(e,t,a){},onVisible:function(e,t,a){},onRequest:function(e,t,a){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Table
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Table
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Table
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Table
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Text
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Text
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Text
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Text
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Toast
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Toast
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Toast
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Toast
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,7 @@
22
22
  $.fn.toast = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
25
+ $body = $('body'),
26
26
 
27
27
  time = Date.now(),
28
28
  performance = [],
@@ -30,6 +30,19 @@
30
30
  query = arguments[0],
31
31
  methodInvoked = typeof query === 'string',
32
32
  queryArguments = [].slice.call(arguments, 1),
33
+ contextCheck = function (context, win) {
34
+ var $context;
35
+ if ([window, document].indexOf(context) >= 0) {
36
+ $context = $(context);
37
+ } else {
38
+ $context = $(win.document).find(context);
39
+ if ($context.length === 0) {
40
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
41
+ }
42
+ }
43
+
44
+ return $context;
45
+ },
33
46
  returnedValue
34
47
  ;
35
48
  $allModules.each(function () {
@@ -55,9 +68,7 @@
55
68
  $progressBar,
56
69
  $animationObject,
57
70
  $close,
58
- $context = settings.context
59
- ? ([window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
60
- : $('body'),
71
+ $context = settings.context ? contextCheck(settings.context, window) : $body,
61
72
 
62
73
  isToastComponent = $module.hasClass('toast') || $module.hasClass('message') || $module.hasClass('card'),
63
74
 
@@ -106,11 +117,11 @@
106
117
  if ($toastBox) {
107
118
  module.debug('Removing toast', $toastBox);
108
119
  module.unbind.events();
120
+ settings.onRemove.call($toastBox, element);
109
121
  $toastBox.remove();
110
122
  $toastBox = undefined;
111
123
  $toast = undefined;
112
124
  $animationObject = undefined;
113
- settings.onRemove.call($toastBox, element);
114
125
  $progress = undefined;
115
126
  $progressBar = undefined;
116
127
  $close = undefined;
@@ -704,9 +715,6 @@
704
715
  totalTime += data['Execution Time'];
705
716
  });
706
717
  title += ' ' + totalTime + 'ms';
707
- if (moduleSelector) {
708
- title += ' \'' + moduleSelector + '\'';
709
- }
710
718
  if (performance.length > 0) {
711
719
  console.groupCollapsed(title);
712
720
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Toast
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Toast
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
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(D,E,H){"use strict";function z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}E=void 0!==E&&E.Math===Math?E:globalThis,D.fn.toast=function(x){var k,e=D(this),T=e.selector||"",I=Date.now(),P=[],O=x,M="string"==typeof O,A=[].slice.call(arguments,1);return e.each(function(){var t,o,a,s,i,c,l,e,r=D.isPlainObject(x)?D.extend(!0,{},D.fn.toast.settings,x):D.extend({},D.fn.toast.settings),d=r.className,u=r.selector,p=r.error,n=r.namespace,f=r.fields,g="."+n,m=n+"-module",h=D(this),v=r.context?[E,H].indexOf(r.context)<0?D(H).find(r.context):D(r.context):D("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=b?h.data(m):void 0,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(b||""!==r.message||""!==r.title||""!==w.get.iconClass()||r.showImage||w.has.configActions())&&("string"==typeof r.showProgress&&-1!==[d.top,d.bottom].indexOf(r.showProgress)||(r.showProgress=!1),w.create.toast(),r.closeOnClick&&(r.closeIcon||0<D(o).find(u.input).length||w.has.configActions())&&(r.closeOnClick=!1),r.closeOnClick||t.addClass(d.unclickable),w.bind.events()),w.instantiate(),t&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,h.data(m,y)},destroy:function(){t&&(w.debug("Removing toast",t),w.unbind.events(),t.remove(),c=o=t=void 0,r.onRemove.call(t,C),l=i=s=void 0),h.removeData(m)},show:function(e){!1===r.onShow.call(t,C)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===r.onHide.call(t,C)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),v.append(D("<div/>",{class:r.position+" "+d.container+" "+(r.horizontal?d.horizontal:"")+" "+(r.context&&"body"!==r.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){t=D("<div/>",{class:d.box});var e,n=w.get.iconClass();b?(o=r.cloneModule?h.clone().removeAttr("id"):h,l=o.find("> i"+w.helpers.toClass(d.close)),r.closeIcon=0<l.length,""!==n&&o.find(u.icon).attr("class",n+" "+d.icon),r.showImage&&o.find(u.image).attr("src",r.showImage),""!==r.title&&o.find(u.title).html(w.helpers.escape(r.title,r.preserveHTML)),""!==r.message&&o.find(u.message).html(w.helpers.escape(r.message,r.preserveHTML))):(w.verbose("Creating toast"),o=D("<div/>",{role:"alert"}),e=D("<div/>",{class:d.content}),""!==n&&o.append(D("<i/>",{class:n+" "+d.icon})),r.showImage&&o.append(D("<img>",{class:d.image+" "+r.classImage,src:r.showImage})),""!==r.title&&(n="_"+w.get.id()+"title",o.attr("aria-labelledby",n),e.append(D("<div/>",{class:d.title,id:n,html:w.helpers.escape(r.title,r.preserveHTML)}))),n="_"+w.get.id()+"desc",o.attr("aria-describedby",n),e.append(D("<div/>",{class:d.message,id:n,html:w.helpers.escape(r.message,r.preserveHTML)})),o.addClass(r.class+" "+d.toast).append(e),o.css("opacity",String(r.opacity)),r.closeIcon&&((l=D("<i/>",{class:d.close+" "+("string"==typeof r.closeIcon?r.closeIcon:""),role:"button",tabindex:0,"aria-label":r.text.close})).hasClass(d.left)?o.prepend(l):o.append(l))),o.hasClass(d.compact)&&(r.compact=!0),o.hasClass("card")&&(r.compact=!1),a=o.find(".actions"),w.has.configActions()&&(0===a.length&&(a=D("<div/>",{class:d.actions+" "+(r.classActions||"")}).appendTo(o)),o.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical)&&(a.removeClass(d.vertical),w.error(p.verticalCard))),r.actions.forEach(function(e){var n=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[f.icon])+' icon"></i>':"",t=w.helpers.escape(e[f.text]||"",r.preserveHTML),o=w.helpers.deQuote(e[f.class]||""),s=e[f.click]&&z(e[f.click])?e[f.click]:function(){};a.append(D("<button/>",{html:n+t,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+o,on:{click:function(){var e=D(this);e.is(u.approve)||e.is(u.deny)||!1===s.call(C,h)||w.close()}}}))})),a&&a.hasClass(d.vertical)&&o.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||o.addClass(d.actions)),"auto"===r.displayTime&&(r.displayTime=Math.max(r.minDisplayTime,o.text().split(" ").length/r.wordsPerMinute*6e4)),t.append(o),0<a.length&&a.hasClass(d.attached)&&(a.addClass(d.buttons),a.detach(),o.addClass(d.attached),a.hasClass(d.vertical)?(o.wrap(D("<div/>",{class:d.vertical+" "+d.attached+" "+(r.compact?d.compact:"")})),a.hasClass(d.left)?o.addClass(d.left).parent().addClass(d.left).prepend(a):o.parent().append(a)):a.hasClass(d.top)?(t.prepend(a),o.addClass(d.bottom)):(t.append(a),o.addClass(d.top))),h!==o&&(C=(h=o)[0]),0<r.displayTime&&(n=d.progressing+" "+(r.pauseOnHover?d.pausable:""),r.showProgress&&(s=D("<div/>",{class:d.progress+" "+(r.classProgress||r.class),"data-percent":""}),r.classProgress||(o.hasClass("toast")&&!o.hasClass(d.inverted)?s.addClass(d.inverted):s.removeClass(d.inverted)),i=D("<div/>",{class:"bar "+(r.progressUp?"up ":"down ")+n}),s.addClass(r.showProgress).append(i),s.hasClass(d.top)?t.prepend(s):t.append(s),i.css("animation-duration",r.displayTime/1e3+"s")),(c=D("<span/>",{class:"wait "+n})).css("animation-duration",r.displayTime/1e3+"s"),c.appendTo(o)),r.compact&&(t.addClass(d.compact),o.addClass(d.compact),s&&s.addClass(d.compact)),r.newestOnTop?t.prependTo(w.get.container()):t.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),r.closeIcon&&l.on("click"+g,w.event.close),o.on("click"+g,w.event.click),c&&c.on("animationend"+g,w.event.close),t.on("click"+g,u.approve,w.event.approve).on("click"+g,u.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),r.closeIcon&&l.off("click"+g),o.off("click"+g),c&&c.off("animationend"+g),t.off("click"+g)}},animate:{show:function(e){e=z(e)?e:function(){},r.transition&&w.can.useElement("transition")&&(w.set.visible(),t.transition({animation:r.transition.showMethod+" in",queue:!1,debug:r.debug,verbose:r.verbose,silent:r.silent,duration:r.transition.showDuration,onComplete:function(){e.call(t,C),r.onVisible.call(t,C)}}))},close:function(e){e=z(e)?e:function(){},r.transition&&void 0!==D.fn.transition?t.transition({animation:r.transition.hideMethod+" out",queue:!1,duration:r.transition.hideDuration,debug:r.debug,verbose:r.verbose,silent:r.silent,interval:50,onBeforeHide:function(e){e=z(e)?e:function(){},""!==r.transition.closeEasing?t&&(t.css("opacity","0"),t.wrap("<div/>").parent().hide(r.transition.closeDuration,r.transition.closeEasing,function(){t&&(t.parent().remove(),e.call(t))})):e.call(t)},onComplete:function(){e.call(t,C),r.onHidden.call(t,C),w.destroy()}}):w.error(p.noTransition)},pause:function(){c.css("animationPlayState","paused"),i&&i.css("animationPlayState","paused")},continue:function(){c.css("animationPlayState","running"),i&&i.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},get:{id:function(){return e},containers:function(){return v.children(w.helpers.toClass(r.position)+u.container+(r.horizontal?w.helpers.toClass(d.horizontal):":not("+w.helpers.toClass(d.horizontal)+")")+(r.context&&"body"!==r.context?w.helpers.toClass(d.absolute):":not("+w.helpers.toClass(d.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return t||null},toast:function(){return o||null},toasts:function(){return D(w.get.container()).find(u.box)},iconClass:function(){return"string"==typeof r.showIcon?r.showIcon:r.showIcon&&r.icons[r.class]?r.icons[r.class]:""},remainingTime:function(){return c?c.css("opacity")*r.displayTime:0}},set:{visible:function(){o.addClass(d.visible)}},remove:{visible:function(){o.removeClass(d.visible)}},event:{close:function(){w.close()},click:function(e){0===D(e.target).closest(u.clickable).length&&(!1!==r.onClick.call(t,C)&&r.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===r.onApprove.call(C,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===r.onDeny.call(C,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),n="";return e.forEach(function(e){n+="."+e}),n},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,n){if(n)return e;var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return t[e]}):e}},can:{useElement:function(e){return void 0!==D.fn[e]||(w.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,n){if(w.debug("Changing setting",e,n),D.isPlainObject(e))D.extend(!0,r,e);else{if(void 0===n)return r[e];D.isPlainObject(r[e])?D.extend(!0,r[e],n):r[e]=n}},internal:function(e,n){if(D.isPlainObject(e))D.extend(!0,w,e);else{if(void 0===n)return w[e];w[e]=n}},debug:function(){!r.silent&&r.debug&&(r.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,r.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),w.verbose.apply(console,arguments)))},error:function(){r.silent||(w.error=Function.prototype.bind.call(console.error,console,r.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var n,t;r.performance&&(t=(n=Date.now())-(I||n),I=n,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":t})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=r.name+":",t=0;I=!1,clearTimeout(w.performance.timer),D.each(P,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",T&&(e+=" '"+T+"'"),0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):D.each(P,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(o,e,n){var s,a,t,i=y;return e=e||A,n=n||C,"string"==typeof o&&void 0!==i&&(o=o.split(/[ .]/),s=o.length-1,D.each(o,function(e,n){var t=e!==s?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(D.isPlainObject(i[t])&&e!==s)i=i[t];else{if(void 0!==i[t])return a=i[t],!1;{if(!D.isPlainObject(i[n])||e===s)return void 0!==i[n]?a=i[n]:w.error(p.method,o),!1;i=i[n]}}})),z(a)?t=a.apply(n,e):void 0!==a&&(t=a),Array.isArray(k)?k.push(t):void 0!==k?k=[k,t]:void 0!==t&&(k=t),a}};M?(void 0===y&&w.initialize(),w.invoke(O)):(void 0!==y&&y.invoke("destroy"),w.initialize(),k=h)}),void 0!==k?k:this},D.toast=D.fn.toast,D.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},D.extend(D.easing,{easeOutBounce:function(e){var n=7.5625,t=2.75;return e<1/t?n*e*e:e<2/t?n*(e-=1.5/t)*e+.75:e<2.5/t?n*(e-=2.25/t)*e+.9375:n*(e-=2.625/t)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);
11
+ !function(E,H,o){"use strict";function z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}H=void 0!==H&&H.Math===Math?H:globalThis,E.fn.toast=function(x){var k,e=E(this),T=E("body"),I=Date.now(),P=[],O=x,M="string"==typeof O,A=[].slice.call(arguments,1),D=function(e,n){var t;return 0<=[H,o].indexOf(e)?t=E(e):0===(t=E(n.document).find(e)).length&&(t=n.frameElement?D(e,n.parent):T),t};return e.each(function(){var t,o,a,s,i,c,l,e,r=E.isPlainObject(x)?E.extend(!0,{},E.fn.toast.settings,x):E.extend({},E.fn.toast.settings),d=r.className,u=r.selector,p=r.error,n=r.namespace,f=r.fields,g="."+n,m=n+"-module",h=E(this),v=r.context?D(r.context,H):T,b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=b?h.data(m):void 0,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(b||""!==r.message||""!==r.title||""!==w.get.iconClass()||r.showImage||w.has.configActions())&&("string"==typeof r.showProgress&&-1!==[d.top,d.bottom].indexOf(r.showProgress)||(r.showProgress=!1),w.create.toast(),r.closeOnClick&&(r.closeIcon||0<E(o).find(u.input).length||w.has.configActions())&&(r.closeOnClick=!1),r.closeOnClick||t.addClass(d.unclickable),w.bind.events()),w.instantiate(),t&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,h.data(m,y)},destroy:function(){t&&(w.debug("Removing toast",t),w.unbind.events(),r.onRemove.call(t,C),t.remove(),l=i=s=c=o=t=void 0),h.removeData(m)},show:function(e){!1===r.onShow.call(t,C)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===r.onHide.call(t,C)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),v.append(E("<div/>",{class:r.position+" "+d.container+" "+(r.horizontal?d.horizontal:"")+" "+(r.context&&"body"!==r.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){t=E("<div/>",{class:d.box});var e,n=w.get.iconClass();b?(o=r.cloneModule?h.clone().removeAttr("id"):h,l=o.find("> i"+w.helpers.toClass(d.close)),r.closeIcon=0<l.length,""!==n&&o.find(u.icon).attr("class",n+" "+d.icon),r.showImage&&o.find(u.image).attr("src",r.showImage),""!==r.title&&o.find(u.title).html(w.helpers.escape(r.title,r.preserveHTML)),""!==r.message&&o.find(u.message).html(w.helpers.escape(r.message,r.preserveHTML))):(w.verbose("Creating toast"),o=E("<div/>",{role:"alert"}),e=E("<div/>",{class:d.content}),""!==n&&o.append(E("<i/>",{class:n+" "+d.icon})),r.showImage&&o.append(E("<img>",{class:d.image+" "+r.classImage,src:r.showImage})),""!==r.title&&(n="_"+w.get.id()+"title",o.attr("aria-labelledby",n),e.append(E("<div/>",{class:d.title,id:n,html:w.helpers.escape(r.title,r.preserveHTML)}))),n="_"+w.get.id()+"desc",o.attr("aria-describedby",n),e.append(E("<div/>",{class:d.message,id:n,html:w.helpers.escape(r.message,r.preserveHTML)})),o.addClass(r.class+" "+d.toast).append(e),o.css("opacity",String(r.opacity)),r.closeIcon&&((l=E("<i/>",{class:d.close+" "+("string"==typeof r.closeIcon?r.closeIcon:""),role:"button",tabindex:0,"aria-label":r.text.close})).hasClass(d.left)?o.prepend(l):o.append(l))),o.hasClass(d.compact)&&(r.compact=!0),o.hasClass("card")&&(r.compact=!1),a=o.find(".actions"),w.has.configActions()&&(0===a.length&&(a=E("<div/>",{class:d.actions+" "+(r.classActions||"")}).appendTo(o)),o.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical)&&(a.removeClass(d.vertical),w.error(p.verticalCard))),r.actions.forEach(function(e){var n=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[f.icon])+' icon"></i>':"",t=w.helpers.escape(e[f.text]||"",r.preserveHTML),o=w.helpers.deQuote(e[f.class]||""),s=e[f.click]&&z(e[f.click])?e[f.click]:function(){};a.append(E("<button/>",{html:n+t,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+o,on:{click:function(){var e=E(this);e.is(u.approve)||e.is(u.deny)||!1===s.call(C,h)||w.close()}}}))})),a&&a.hasClass(d.vertical)&&o.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||o.addClass(d.actions)),"auto"===r.displayTime&&(r.displayTime=Math.max(r.minDisplayTime,o.text().split(" ").length/r.wordsPerMinute*6e4)),t.append(o),0<a.length&&a.hasClass(d.attached)&&(a.addClass(d.buttons),a.detach(),o.addClass(d.attached),a.hasClass(d.vertical)?(o.wrap(E("<div/>",{class:d.vertical+" "+d.attached+" "+(r.compact?d.compact:"")})),a.hasClass(d.left)?o.addClass(d.left).parent().addClass(d.left).prepend(a):o.parent().append(a)):a.hasClass(d.top)?(t.prepend(a),o.addClass(d.bottom)):(t.append(a),o.addClass(d.top))),h!==o&&(C=(h=o)[0]),0<r.displayTime&&(n=d.progressing+" "+(r.pauseOnHover?d.pausable:""),r.showProgress&&(s=E("<div/>",{class:d.progress+" "+(r.classProgress||r.class),"data-percent":""}),r.classProgress||(o.hasClass("toast")&&!o.hasClass(d.inverted)?s.addClass(d.inverted):s.removeClass(d.inverted)),i=E("<div/>",{class:"bar "+(r.progressUp?"up ":"down ")+n}),s.addClass(r.showProgress).append(i),s.hasClass(d.top)?t.prepend(s):t.append(s),i.css("animation-duration",r.displayTime/1e3+"s")),(c=E("<span/>",{class:"wait "+n})).css("animation-duration",r.displayTime/1e3+"s"),c.appendTo(o)),r.compact&&(t.addClass(d.compact),o.addClass(d.compact),s&&s.addClass(d.compact)),r.newestOnTop?t.prependTo(w.get.container()):t.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),r.closeIcon&&l.on("click"+g,w.event.close),o.on("click"+g,w.event.click),c&&c.on("animationend"+g,w.event.close),t.on("click"+g,u.approve,w.event.approve).on("click"+g,u.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),r.closeIcon&&l.off("click"+g),o.off("click"+g),c&&c.off("animationend"+g),t.off("click"+g)}},animate:{show:function(e){e=z(e)?e:function(){},r.transition&&w.can.useElement("transition")&&(w.set.visible(),t.transition({animation:r.transition.showMethod+" in",queue:!1,debug:r.debug,verbose:r.verbose,silent:r.silent,duration:r.transition.showDuration,onComplete:function(){e.call(t,C),r.onVisible.call(t,C)}}))},close:function(e){e=z(e)?e:function(){},r.transition&&void 0!==E.fn.transition?t.transition({animation:r.transition.hideMethod+" out",queue:!1,duration:r.transition.hideDuration,debug:r.debug,verbose:r.verbose,silent:r.silent,interval:50,onBeforeHide:function(e){e=z(e)?e:function(){},""!==r.transition.closeEasing?t&&(t.css("opacity","0"),t.wrap("<div/>").parent().hide(r.transition.closeDuration,r.transition.closeEasing,function(){t&&(t.parent().remove(),e.call(t))})):e.call(t)},onComplete:function(){e.call(t,C),r.onHidden.call(t,C),w.destroy()}}):w.error(p.noTransition)},pause:function(){c.css("animationPlayState","paused"),i&&i.css("animationPlayState","paused")},continue:function(){c.css("animationPlayState","running"),i&&i.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},get:{id:function(){return e},containers:function(){return v.children(w.helpers.toClass(r.position)+u.container+(r.horizontal?w.helpers.toClass(d.horizontal):":not("+w.helpers.toClass(d.horizontal)+")")+(r.context&&"body"!==r.context?w.helpers.toClass(d.absolute):":not("+w.helpers.toClass(d.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return t||null},toast:function(){return o||null},toasts:function(){return E(w.get.container()).find(u.box)},iconClass:function(){return"string"==typeof r.showIcon?r.showIcon:r.showIcon&&r.icons[r.class]?r.icons[r.class]:""},remainingTime:function(){return c?c.css("opacity")*r.displayTime:0}},set:{visible:function(){o.addClass(d.visible)}},remove:{visible:function(){o.removeClass(d.visible)}},event:{close:function(){w.close()},click:function(e){0===E(e.target).closest(u.clickable).length&&(!1!==r.onClick.call(t,C)&&r.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===r.onApprove.call(C,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===r.onDeny.call(C,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),n="";return e.forEach(function(e){n+="."+e}),n},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,n){if(n)return e;var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return t[e]}):e}},can:{useElement:function(e){return void 0!==E.fn[e]||(w.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,n){if(w.debug("Changing setting",e,n),E.isPlainObject(e))E.extend(!0,r,e);else{if(void 0===n)return r[e];E.isPlainObject(r[e])?E.extend(!0,r[e],n):r[e]=n}},internal:function(e,n){if(E.isPlainObject(e))E.extend(!0,w,e);else{if(void 0===n)return w[e];w[e]=n}},debug:function(){!r.silent&&r.debug&&(r.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,r.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),w.verbose.apply(console,arguments)))},error:function(){r.silent||(w.error=Function.prototype.bind.call(console.error,console,r.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var n,t;r.performance&&(t=(n=Date.now())-(I||n),I=n,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":t})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=r.name+":",t=0;I=!1,clearTimeout(w.performance.timer),E.each(P,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):E.each(P,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(o,e,n){var s,a,t,i=y;return e=e||A,n=n||C,"string"==typeof o&&void 0!==i&&(o=o.split(/[ .]/),s=o.length-1,E.each(o,function(e,n){var t=e!==s?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(E.isPlainObject(i[t])&&e!==s)i=i[t];else{if(void 0!==i[t])return a=i[t],!1;{if(!E.isPlainObject(i[n])||e===s)return void 0!==i[n]?a=i[n]:w.error(p.method,o),!1;i=i[n]}}})),z(a)?t=a.apply(n,e):void 0!==a&&(t=a),Array.isArray(k)?k.push(t):void 0!==k?k=[k,t]:void 0!==t&&(k=t),a}};M?(void 0===y&&w.initialize(),w.invoke(O)):(void 0!==y&&y.invoke("destroy"),w.initialize(),k=h)}),void 0!==k?k:this},E.toast=E.fn.toast,E.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},E.extend(E.easing,{easeOutBounce:function(e){var n=7.5625,t=2.75;return e<1/t?n*e*e:e<2/t?n*(e-=1.5/t)*e+.75:e<2.5/t?n*(e-=2.25/t)*e+.9375:n*(e-=2.625/t)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Transition
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Transition
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Transition
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Transition
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,6 @@
22
22
  $.fn.transition = function () {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
26
25
 
27
26
  time = Date.now(),
28
27
  performance = [],
@@ -863,9 +862,6 @@
863
862
  totalTime += data['Execution Time'];
864
863
  });
865
864
  title += ' ' + totalTime + 'ms';
866
- if (moduleSelector) {
867
- title += ' \'' + moduleSelector + '\'';
868
- }
869
865
  if ($allModules.length > 1) {
870
866
  title += ' (' + $allModules.length + ')';
871
867
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Transition
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Transition
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
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(w,n){"use strict";n=void 0!==n&&n.Math===Math?n:globalThis,w.fn.transition=function(){var p,o=w(this),r=o.selector||"",s=Date.now(),g=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),h="string"==typeof b;return o.each(function(i){var l,d,e,c,t,n,a,u=w(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,v),c=l.className,e=l.error,t=l.metadata,a="."+l.namespace,n="module-"+l.namespace,d=u.data(n)||f,!1===(h=h&&f.invoke(b))&&(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),d=f,u.data(n,d)},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=void 0!==n?n:l.interval,e="auto"===l.reverse&&e===c.outward||!0===l.reverse?(o.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,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),d.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("animationend.queue"+a,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 inward, 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"),n=void 0===n||""===n;"none"===u.css("display")||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(" "),w.each(n,function(n,e){e!==c.inward&&e!==c.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())===c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one("animationend.complete"+a,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){w.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("animationend")},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+a)},completeCallback:function(){u.off(".complete"+a)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.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(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?w.extend(!0,{},w.fn.transition.settings,n):"function"==typeof i?w.extend({},w.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?w.extend({},w.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?w.extend({},w.fn.transition.settings,e,{animation:n}):"function"==typeof e?w.extend({},w.fn.transition.settings,{animation:n,onComplete:e}):w.extend({},w.fn.transition.settings,{animation:n})},animationClass:function(n){var n=n||l.animation,e=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||void 0===f.cache.animation)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),w.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)?u.css("animation-duration")||0:n)?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return l.displayType||((n=void 0===n||n)&&void 0===u.data(t.displayType)&&(""===(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 w.fn.transition.exists[n]}},can:{transition:function(n){var e,i,t,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(void 0===r||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=w("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(c.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(c.hidden).removeClass(c.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 void 0!==r?r:a},animate:function(){return void 0!==f.can.transition()}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.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!0}},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("animationend")},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler("animationend")},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(n,e){if(f.debug("Changing setting",n,e),w.isPlainObject(n))w.extend(!0,l,n);else{if(void 0===e)return l[n];w.isPlainObject(l[n])?w.extend(!0,l[n],e):l[n]=e}},internal:function(n,e){if(w.isPlainObject(n))w.extend(!0,f,n);else{if(void 0===e)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())-(s||e),s=e,g.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;s=!1,clearTimeout(f.performance.timer),w.each(g,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",r&&(n+=" '"+r+"'"),1<o.length&&(n+=" ("+o.length+")"),0<g.length&&(console.groupCollapsed(n),console.table?console.table(g):w.each(g,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),g=[]}},invoke:function(t,n,e){var a,o,i,r,s=d;return n=n||y,e=e||m,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),a=t.length-1,w.each(t,function(n,e){var i=n!==a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(w.isPlainObject(s[i])&&n!==a)s=s[i];else{if(void 0!==s[i])return o=s[i],!1;{if(!w.isPlainObject(s[e])||n===a)return void 0!==s[e]&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):void 0!==o&&(i=o),Array.isArray(p)?p.push(i):void 0!==p?p=[p,i]:void 0!==i&&(p=i),void 0!==o&&o}};f.initialize()}),void 0!==p?p:this},w.fn.transition.exists={},w.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."}}}(jQuery,window,document);
11
+ !function(h,n){"use strict";n=void 0!==n&&n.Math===Math?n:globalThis,h.fn.transition=function(){var p,o=h(this),r=Date.now(),s=[],g=arguments,v=g[0],b=[].slice.call(arguments,1),y="string"==typeof v;return o.each(function(i){var l,d,e,c,t,n,a,u=h(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,g),c=l.className,e=l.error,t=l.metadata,a="."+l.namespace,n="module-"+l.namespace,d=u.data(n)||f,!1===(y=y&&f.invoke(v))&&(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),d=f,u.data(n,d)},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=void 0!==n?n:l.interval,e="auto"===l.reverse&&e===c.outward||!0===l.reverse?(o.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,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),d.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("animationend.queue"+a,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 inward, 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"),n=void 0===n||""===n;"none"===u.css("display")||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(" "),h.each(n,function(n,e){e!==c.inward&&e!==c.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())===c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one("animationend.complete"+a,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){h.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("animationend")},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+a)},completeCallback:function(){u.off(".complete"+a)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.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(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?h.extend(!0,{},h.fn.transition.settings,n):"function"==typeof i?h.extend({},h.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?h.extend({},h.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?h.extend({},h.fn.transition.settings,e,{animation:n}):"function"==typeof e?h.extend({},h.fn.transition.settings,{animation:n,onComplete:e}):h.extend({},h.fn.transition.settings,{animation:n})},animationClass:function(n){var n=n||l.animation,e=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||void 0===f.cache.animation)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),h.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)?u.css("animation-duration")||0:n)?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return l.displayType||((n=void 0===n||n)&&void 0===u.data(t.displayType)&&(""===(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 h.fn.transition.exists[n]}},can:{transition:function(n){var e,i,t,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(void 0===r||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=h("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(c.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(c.hidden).removeClass(c.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 void 0!==r?r:a},animate:function(){return void 0!==f.can.transition()}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.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!0}},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("animationend")},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler("animationend")},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(n,e){if(f.debug("Changing setting",n,e),h.isPlainObject(n))h.extend(!0,l,n);else{if(void 0===e)return l[n];h.isPlainObject(l[n])?h.extend(!0,l[n],e):l[n]=e}},internal:function(n,e){if(h.isPlainObject(n))h.extend(!0,f,n);else{if(void 0===e)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())-(r||e),r=e,s.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;r=!1,clearTimeout(f.performance.timer),h.each(s,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",1<o.length&&(n+=" ("+o.length+")"),0<s.length&&(console.groupCollapsed(n),console.table?console.table(s):h.each(s,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,e){var a,o,i,r,s=d;return n=n||b,e=e||m,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),a=t.length-1,h.each(t,function(n,e){var i=n!==a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(h.isPlainObject(s[i])&&n!==a)s=s[i];else{if(void 0!==s[i])return o=s[i],!1;{if(!h.isPlainObject(s[e])||n===a)return void 0!==s[e]&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):void 0!==o&&(i=o),Array.isArray(p)?p.push(i):void 0!==p?p=[p,i]:void 0!==i&&(p=i),void 0!==o&&o}};f.initialize()}),void 0!==p?p:this},h.fn.transition.exists={},h.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."}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Visibility
2
+ * # Fomantic-UI 2.9.3-beta.3+880333c - Visibility
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,6 @@
22
22
  $.fn.visibility = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
26
25
 
27
26
  time = Date.now(),
28
27
  performance = [],
@@ -30,6 +29,19 @@
30
29
  query = arguments[0],
31
30
  methodInvoked = typeof query === 'string',
32
31
  queryArguments = [].slice.call(arguments, 1),
32
+ contextCheck = function (context, win) {
33
+ var $context;
34
+ if ([window, document].indexOf(context) >= 0) {
35
+ $context = $(context);
36
+ } else {
37
+ $context = $(win.document).find(context);
38
+ if ($context.length === 0) {
39
+ $context = win.frameElement ? contextCheck(context, win.parent) : window;
40
+ }
41
+ }
42
+
43
+ return $context;
44
+ },
33
45
  returnedValue,
34
46
 
35
47
  moduleCount = $allModules.length,
@@ -53,7 +65,7 @@
53
65
  $window = $(window),
54
66
 
55
67
  $module = $(this),
56
- $context = [window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
68
+ $context = contextCheck(settings.context, window),
57
69
 
58
70
  $placeholder,
59
71
 
@@ -1089,9 +1101,6 @@
1089
1101
  totalTime += data['Execution Time'];
1090
1102
  });
1091
1103
  title += ' ' + totalTime + 'ms';
1092
- if (moduleSelector) {
1093
- title += ' \'' + moduleSelector + '\'';
1094
- }
1095
1104
  if (performance.length > 0) {
1096
1105
  console.groupCollapsed(title);
1097
1106
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.1+d8dd970
2
+ * # Fomantic UI - 2.9.3-beta.3+880333c
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(T,O,A){"use strict";function z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}O=void 0!==O&&O.Math===Math?O:globalThis,T.fn.visibility=function(p){var h,e=T(this),x=e.selector||"",P=Date.now(),y=[],C=p,S="string"==typeof C,V=[].slice.call(arguments,1),R=e.length,k=0;return e.each(function(){var e,o,n,i=T.isPlainObject(p)?T.extend(!0,{},T.fn.visibility.settings,p):T.extend({},T.fn.visibility.settings),t=i.className,s=i.namespace,r=i.error,c=i.metadata,a="."+s,l="module-"+s,d=T(O),u=T(this),f=[O,A].indexOf(i.context)<0?T(A).find(i.context):T(i.context),v=u.data(l),b=this,g=!1,m={initialize:function(){m.debug("Initializing",i),m.setup.cache(),m.should.trackChanges()&&("image"===i.type&&m.setup.image(),"fixed"===i.type&&m.setup.fixed(),i.observeChanges&&m.observeChanges(),m.bind.events()),m.save.position(),m.is.visible()||m.error(r.visible,u),i.initialCheck&&m.checkVisibility(),m.instantiate()},instantiate:function(){m.debug("Storing instance",m),u.data(l,m),v=m},destroy:function(){m.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),d.off("load"+a,m.event.load).off("resize"+a,m.event.resize),f.off("scroll"+a,m.event.scroll).off("scrollchange"+a,m.event.scrollchange),"fixed"===i.type&&(m.resetFixed(),m.remove.placeholder()),u.off(a).removeData(l)},observeChanges:function(){"MutationObserver"in O&&(o=new MutationObserver(m.event.contextChanged),n=new MutationObserver(m.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(b,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",n))},bind:{events:function(){m.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&d.on("load"+a,m.event.load),d.on("resize"+a,m.event.resize),f.off("scroll"+a).on("scroll"+a,m.event.scroll).on("scrollchange"+a,m.event.scrollchange)}},event:{changed:function(e){m.verbose("DOM tree modified, updating visibility calculations"),m.timer=setTimeout(function(){m.verbose("DOM tree modified, updating sticky menu"),m.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===b||0<T(e).find(b).length)&&(m.debug("Element removed from DOM, tearing down events"),m.destroy())})})},resize:function(){m.debug("Window resized"),i.refreshOnResize&&requestAnimationFrame(m.refresh)},load:function(){m.debug("Page finished loading"),requestAnimationFrame(m.refresh)},scroll:function(){i.throttle?(clearTimeout(m.timer),m.timer=setTimeout(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])},i.throttle)):requestAnimationFrame(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])})},scrollchange:function(e,o){m.checkVisibility(o)}},precache:function(e,o){for(var n=(e=Array.isArray(e)?e:[e]).length,t=0,i=[],s=A.createElement("img"),c=function(){++t>=e.length&&z(o)&&o()};n--;)(s=A.createElement("img")).addEventListener("load",c),s.addEventListener("error",c),s.src=e[n],i.push(s)},enableCallbacks:function(){m.debug("Allowing callbacks to occur"),g=!1},disableCallbacks:function(){m.debug("Disabling all callbacks temporarily"),g=!0},should:{trackChanges:function(){return S?(m.debug("One time query, no need to bind events"),!1):(m.debug("Callbacks being attached"),!0)}},setup:{cache:function(){m.cache={occurred:{},screen:{},element:{}}},image:function(){var e=u.data(c.src);e&&(m.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){m.debug("Image on screen",b),m.precache(e,function(){m.set.image(e,function(){++k===R&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){m.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,p.transition||(i.transition=!1),m.create.placeholder(),m.debug("Added placeholder",e),i.onTopPassed=function(){m.debug("Element passed, adding fixed position",u),m.show.placeholder(),m.set.fixed(),i.transition&&void 0!==T.fn.transition&&u.transition(i.transition,i.duration)},i.onTopPassedReverse=function(){m.debug("Element returned to position, removing fixed",u),m.hide.placeholder(),m.remove.fixed()}}},create:{placeholder:function(){m.verbose("Creating fixed position placeholder"),e=u.clone(!1).css("display","none").addClass(t.placeholder).insertAfter(u)}},show:{placeholder:function(){m.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){m.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){m.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(b)},image:function(e,o){u.attr("src",e),i.transition?void 0!==T.fn.transition?u.hasClass(t.visible)?m.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 m.get.elementCalculations().onScreen},offScreen:function(){return m.get.elementCalculations().offScreen},visible:function(){return!(!m.cache||!m.cache.element)&&!(0===m.cache.element.width&&0===m.cache.element.offset.top)},verticallyScrollableContext:function(){var e=f[0]!==O&&f.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=f[0]!==O&&f.css("overflow-x");return"auto"===e||"scroll"===e}},refresh:function(){m.debug("Refreshing constants (width/height)"),"fixed"===i.type&&m.resetFixed(),m.reset(),m.save.position(),i.checkOnRefresh&&m.checkVisibility(),i.onRefresh.call(b)},resetFixed:function(){m.remove.fixed(),m.remove.occurred()},reset:function(){m.verbose("Resetting all cached values"),T.isPlainObject(m.cache)&&(m.cache.screen={},m.cache.element={})},checkVisibility:function(e){m.verbose("Checking visibility of element",m.cache.element),!g&&m.is.visible()&&(m.save.scroll(e),m.save.calculations(),m.passed(),m.passingReverse(),m.topVisibleReverse(),m.bottomVisibleReverse(),m.topPassedReverse(),m.bottomPassedReverse(),m.onScreen(),m.offScreen(),m.passing(),m.topVisible(),m.bottomVisible(),m.topPassed(),m.bottomPassed(),i.onUpdate&&i.onUpdate.call(b,m.get.elementCalculations()))},passed:function(e,o){var n=m.get.elementCalculations();if(e&&o)i.onPassed[e]=o;else{if(void 0!==e)return m.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&T.each(i.onPassed,function(e,o){n.bottomVisible||n.pixelsPassed>m.get.pixelsPassed(e)?m.execute(o,e):i.once||m.remove.occurred(o)})}},onScreen:function(e){var o=m.get.elementCalculations(),n=e||i.onOnScreen,t="onScreen";if(e&&(m.debug("Adding callback for onScreen",e),i.onOnScreen=e),o.onScreen?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.onOnScreen},offScreen:function(e){var o=m.get.elementCalculations(),n=e||i.onOffScreen,t="offScreen";if(e&&(m.debug("Adding callback for offScreen",e),i.onOffScreen=e),o.offScreen?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.onOffScreen},passing:function(e){var o=m.get.elementCalculations(),n=e||i.onPassing,t="passing";if(e&&(m.debug("Adding callback for passing",e),i.onPassing=e),o.passing?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.passing},topVisible:function(e){var o=m.get.elementCalculations(),n=e||i.onTopVisible,t="topVisible";if(e&&(m.debug("Adding callback for top visible",e),i.onTopVisible=e),o.topVisible?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.topVisible},bottomVisible:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomVisible,t="bottomVisible";if(e&&(m.debug("Adding callback for bottom visible",e),i.onBottomVisible=e),o.bottomVisible?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.bottomVisible},topPassed:function(e){var o=m.get.elementCalculations(),n=e||i.onTopPassed,t="topPassed";if(e&&(m.debug("Adding callback for top passed",e),i.onTopPassed=e),o.topPassed?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.topPassed},bottomPassed:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomPassed,t="bottomPassed";if(e&&(m.debug("Adding callback for bottom passed",e),i.onBottomPassed=e),o.bottomPassed?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.bottomPassed},passingReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onPassingReverse,t="passingReverse";if(e&&(m.debug("Adding callback for passing reverse",e),i.onPassingReverse=e),o.passing?i.once||m.remove.occurred(t):m.get.occurred("passing")&&m.execute(n,t),void 0!==e)return!o.passing},topVisibleReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onTopVisibleReverse,t="topVisibleReverse";if(e&&(m.debug("Adding callback for top visible reverse",e),i.onTopVisibleReverse=e),o.topVisible?i.once||m.remove.occurred(t):m.get.occurred("topVisible")&&m.execute(n,t),void 0===e)return!o.topVisible},bottomVisibleReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomVisibleReverse,t="bottomVisibleReverse";if(e&&(m.debug("Adding callback for bottom visible reverse",e),i.onBottomVisibleReverse=e),o.bottomVisible?i.once||m.remove.occurred(t):m.get.occurred("bottomVisible")&&m.execute(n,t),void 0===e)return!o.bottomVisible},topPassedReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onTopPassedReverse,t="topPassedReverse";if(e&&(m.debug("Adding callback for top passed reverse",e),i.onTopPassedReverse=e),o.topPassed?i.once||m.remove.occurred(t):m.get.occurred("topPassed")&&m.execute(n,t),void 0===e)return!o.onTopPassed},bottomPassedReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomPassedReverse,t="bottomPassedReverse";if(e&&(m.debug("Adding callback for bottom passed reverse",e),i.onBottomPassedReverse=e),o.bottomPassed?i.once||m.remove.occurred(t):m.get.occurred("bottomPassed")&&m.execute(n,t),void 0===e)return!o.bottomPassed},execute:function(e,o){var n=m.get.elementCalculations(),t=m.get.screenCalculations();(e=e||!1)&&(i.continuous?(m.debug("Callback being called continuously",o,n),e.call(b,n,t)):m.get.occurred(o)||(m.debug("Conditions met",o,n),e.call(b,n,t))),m.save.occurred(o)},remove:{fixed:function(){m.debug("Removing fixed position"),u.removeClass(t.fixed).css({position:"",top:"",left:"",zIndex:""}),i.onUnfixed.call(b)},placeholder:function(){m.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var o;e?void 0!==(o=m.cache.occurred)[e]&&!0===o[e]&&(m.debug("Callback can now be called again",e),m.cache.occurred[e]=!1):m.cache.occurred={}}},save:{calculations:function(){m.verbose("Saving all calculations necessary to determine positioning"),m.save.direction(),m.save.screenCalculations(),m.save.elementCalculations()},occurred:function(e){!e||void 0!==m.cache.occurred[e]&&!0===m.cache.occurred[e]||(m.verbose("Saving callback occurred",e),m.cache.occurred[e]=!0)},scroll:function(e){e=e+i.offset||f.scrollTop()+i.offset,m.cache.scroll=e},direction:function(){var e=m.get.scroll(),o=m.get.lastScroll(),e=o<e&&o?"down":e<o&&o?"up":"static";return m.cache.direction=e,m.cache.direction},elementPosition:function(){var e=m.cache.element,o=m.get.screenSize();return m.verbose("Saving element position"),e.fits=e.height<o.height,e.offset=u.offset(),e.width=u.outerWidth(),e.height=u.outerHeight(),m.is.verticallyScrollableContext()&&(e.offset.top+=f.scrollTop()-f.offset().top),m.is.horizontallyScrollableContext()&&(e.offset.left+=f.scrollLeft()-f.offset().left),m.cache.element=e},elementCalculations:function(){var e=m.get.screenCalculations(),o=m.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),m.cache.element=o,m.verbose("Updated element calculations",o),o},screenCalculations:function(){var e=m.get.scroll();return m.save.direction(),m.cache.screen.top=e,m.cache.screen.bottom=e+m.cache.screen.height,m.cache.screen},screenSize:function(){m.verbose("Saving window position"),m.cache.screen={height:f.height()}},position:function(){m.save.screenSize(),m.save.elementPosition()}},get:{pixelsPassed:function(e){var o=m.get.elementCalculations();return-1<e.search("%")?o.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==m.cache.occurred&&m.cache.occurred[e]||!1},direction:function(){return void 0===m.cache.direction&&m.save.direction(),m.cache.direction},elementPosition:function(){return void 0===m.cache.element&&m.save.elementPosition(),m.cache.element},elementCalculations:function(){return void 0===m.cache.element&&m.save.elementCalculations(),m.cache.element},screenCalculations:function(){return void 0===m.cache.screen&&m.save.screenCalculations(),m.cache.screen},screenSize:function(){return void 0===m.cache.screen&&m.save.screenSize(),m.cache.screen},scroll:function(){return void 0===m.cache.scroll&&m.save.scroll(),m.cache.scroll},lastScroll:function(){return void 0===m.cache.screen?(m.debug("First scroll event, no last scroll could be found"),!1):m.cache.screen.top}},setting:function(e,o){if(T.isPlainObject(e))T.extend(!0,i,e);else{if(void 0===o)return i[e];i[e]=o}},internal:function(e,o){if(T.isPlainObject(e))T.extend(!0,m,e);else{if(void 0===o)return m[e];m[e]=o}},debug:function(){!i.silent&&i.debug&&(i.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,i.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),m.verbose.apply(console,arguments)))},error:function(){i.silent||(m.error=Function.prototype.bind.call(console.error,console,i.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var o,n;i.performance&&(n=(o=Date.now())-(P||o),P=o,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=i.name+":",n=0;P=!1,clearTimeout(m.performance.timer),T.each(y,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",x&&(e+=" '"+x+"'"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):T.each(y,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(t,e,o){var i,s,n,c=v;return e=e||V,o=o||b,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),i=t.length-1,T.each(t,function(e,o){var n=e!==i?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(T.isPlainObject(c[n])&&e!==i)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;{if(!T.isPlainObject(c[o])||e===i)return void 0!==c[o]?s=c[o]:m.error(r.method,t),!1;c=c[o]}}})),z(s)?n=s.apply(o,e):void 0!==s&&(n=s),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),s}};S?(void 0===v&&m.initialize(),v.save.scroll(),v.save.calculations(),m.invoke(C)):(void 0!==v&&v.invoke("destroy"),m.initialize())}),void 0!==h?h:this},T.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:O,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(T,O,A){"use strict";function z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}O=void 0!==O&&O.Math===Math?O:globalThis,T.fn.visibility=function(p){var h,e=T(this),P=Date.now(),x=[],y=p,C="string"==typeof y,S=[].slice.call(arguments,1),V=function(e,o){var n;return 0<=[O,A].indexOf(e)?n=T(e):0===(n=T(o.document).find(e)).length&&(n=o.frameElement?V(e,o.parent):O),n},R=e.length,k=0;return e.each(function(){var e,o,n,i=T.isPlainObject(p)?T.extend(!0,{},T.fn.visibility.settings,p):T.extend({},T.fn.visibility.settings),t=i.className,s=i.namespace,r=i.error,c=i.metadata,a="."+s,l="module-"+s,d=T(O),u=T(this),f=V(i.context,O),v=u.data(l),b=this,g=!1,m={initialize:function(){m.debug("Initializing",i),m.setup.cache(),m.should.trackChanges()&&("image"===i.type&&m.setup.image(),"fixed"===i.type&&m.setup.fixed(),i.observeChanges&&m.observeChanges(),m.bind.events()),m.save.position(),m.is.visible()||m.error(r.visible,u),i.initialCheck&&m.checkVisibility(),m.instantiate()},instantiate:function(){m.debug("Storing instance",m),u.data(l,m),v=m},destroy:function(){m.verbose("Destroying previous module"),n&&n.disconnect(),o&&o.disconnect(),d.off("load"+a,m.event.load).off("resize"+a,m.event.resize),f.off("scroll"+a,m.event.scroll).off("scrollchange"+a,m.event.scrollchange),"fixed"===i.type&&(m.resetFixed(),m.remove.placeholder()),u.off(a).removeData(l)},observeChanges:function(){"MutationObserver"in O&&(o=new MutationObserver(m.event.contextChanged),n=new MutationObserver(m.event.changed),o.observe(A,{childList:!0,subtree:!0}),n.observe(b,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",n))},bind:{events:function(){m.verbose("Binding visibility events to scroll and resize"),i.refreshOnLoad&&d.on("load"+a,m.event.load),d.on("resize"+a,m.event.resize),f.off("scroll"+a).on("scroll"+a,m.event.scroll).on("scrollchange"+a,m.event.scrollchange)}},event:{changed:function(e){m.verbose("DOM tree modified, updating visibility calculations"),m.timer=setTimeout(function(){m.verbose("DOM tree modified, updating sticky menu"),m.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e===b||0<T(e).find(b).length)&&(m.debug("Element removed from DOM, tearing down events"),m.destroy())})})},resize:function(){m.debug("Window resized"),i.refreshOnResize&&requestAnimationFrame(m.refresh)},load:function(){m.debug("Page finished loading"),requestAnimationFrame(m.refresh)},scroll:function(){i.throttle?(clearTimeout(m.timer),m.timer=setTimeout(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])},i.throttle)):requestAnimationFrame(function(){f.triggerHandler("scrollchange"+a,[f.scrollTop()])})},scrollchange:function(e,o){m.checkVisibility(o)}},precache:function(e,o){for(var n=(e=Array.isArray(e)?e:[e]).length,t=0,i=[],s=A.createElement("img"),c=function(){++t>=e.length&&z(o)&&o()};n--;)(s=A.createElement("img")).addEventListener("load",c),s.addEventListener("error",c),s.src=e[n],i.push(s)},enableCallbacks:function(){m.debug("Allowing callbacks to occur"),g=!1},disableCallbacks:function(){m.debug("Disabling all callbacks temporarily"),g=!0},should:{trackChanges:function(){return C?(m.debug("One time query, no need to bind events"),!1):(m.debug("Callbacks being attached"),!0)}},setup:{cache:function(){m.cache={occurred:{},screen:{},element:{}}},image:function(){var e=u.data(c.src);e&&(m.verbose("Lazy loading image",e),i.once=!0,i.observeChanges=!1,i.onOnScreen=function(){m.debug("Image on screen",b),m.precache(e,function(){m.set.image(e,function(){++k===R&&i.onAllLoaded.call(this),i.onLoad.call(this)})})})},fixed:function(){m.debug("Setting up fixed"),i.once=!1,i.observeChanges=!1,i.initialCheck=!0,i.refreshOnLoad=!0,p.transition||(i.transition=!1),m.create.placeholder(),m.debug("Added placeholder",e),i.onTopPassed=function(){m.debug("Element passed, adding fixed position",u),m.show.placeholder(),m.set.fixed(),i.transition&&void 0!==T.fn.transition&&u.transition(i.transition,i.duration)},i.onTopPassedReverse=function(){m.debug("Element returned to position, removing fixed",u),m.hide.placeholder(),m.remove.fixed()}}},create:{placeholder:function(){m.verbose("Creating fixed position placeholder"),e=u.clone(!1).css("display","none").addClass(t.placeholder).insertAfter(u)}},show:{placeholder:function(){m.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){m.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){m.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(b)},image:function(e,o){u.attr("src",e),i.transition?void 0!==T.fn.transition?u.hasClass(t.visible)?m.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 m.get.elementCalculations().onScreen},offScreen:function(){return m.get.elementCalculations().offScreen},visible:function(){return!(!m.cache||!m.cache.element)&&!(0===m.cache.element.width&&0===m.cache.element.offset.top)},verticallyScrollableContext:function(){var e=f[0]!==O&&f.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=f[0]!==O&&f.css("overflow-x");return"auto"===e||"scroll"===e}},refresh:function(){m.debug("Refreshing constants (width/height)"),"fixed"===i.type&&m.resetFixed(),m.reset(),m.save.position(),i.checkOnRefresh&&m.checkVisibility(),i.onRefresh.call(b)},resetFixed:function(){m.remove.fixed(),m.remove.occurred()},reset:function(){m.verbose("Resetting all cached values"),T.isPlainObject(m.cache)&&(m.cache.screen={},m.cache.element={})},checkVisibility:function(e){m.verbose("Checking visibility of element",m.cache.element),!g&&m.is.visible()&&(m.save.scroll(e),m.save.calculations(),m.passed(),m.passingReverse(),m.topVisibleReverse(),m.bottomVisibleReverse(),m.topPassedReverse(),m.bottomPassedReverse(),m.onScreen(),m.offScreen(),m.passing(),m.topVisible(),m.bottomVisible(),m.topPassed(),m.bottomPassed(),i.onUpdate&&i.onUpdate.call(b,m.get.elementCalculations()))},passed:function(e,o){var n=m.get.elementCalculations();if(e&&o)i.onPassed[e]=o;else{if(void 0!==e)return m.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&T.each(i.onPassed,function(e,o){n.bottomVisible||n.pixelsPassed>m.get.pixelsPassed(e)?m.execute(o,e):i.once||m.remove.occurred(o)})}},onScreen:function(e){var o=m.get.elementCalculations(),n=e||i.onOnScreen,t="onScreen";if(e&&(m.debug("Adding callback for onScreen",e),i.onOnScreen=e),o.onScreen?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.onOnScreen},offScreen:function(e){var o=m.get.elementCalculations(),n=e||i.onOffScreen,t="offScreen";if(e&&(m.debug("Adding callback for offScreen",e),i.onOffScreen=e),o.offScreen?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.onOffScreen},passing:function(e){var o=m.get.elementCalculations(),n=e||i.onPassing,t="passing";if(e&&(m.debug("Adding callback for passing",e),i.onPassing=e),o.passing?m.execute(n,t):i.once||m.remove.occurred(t),void 0!==e)return o.passing},topVisible:function(e){var o=m.get.elementCalculations(),n=e||i.onTopVisible,t="topVisible";if(e&&(m.debug("Adding callback for top visible",e),i.onTopVisible=e),o.topVisible?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.topVisible},bottomVisible:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomVisible,t="bottomVisible";if(e&&(m.debug("Adding callback for bottom visible",e),i.onBottomVisible=e),o.bottomVisible?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.bottomVisible},topPassed:function(e){var o=m.get.elementCalculations(),n=e||i.onTopPassed,t="topPassed";if(e&&(m.debug("Adding callback for top passed",e),i.onTopPassed=e),o.topPassed?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.topPassed},bottomPassed:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomPassed,t="bottomPassed";if(e&&(m.debug("Adding callback for bottom passed",e),i.onBottomPassed=e),o.bottomPassed?m.execute(n,t):i.once||m.remove.occurred(t),void 0===e)return o.bottomPassed},passingReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onPassingReverse,t="passingReverse";if(e&&(m.debug("Adding callback for passing reverse",e),i.onPassingReverse=e),o.passing?i.once||m.remove.occurred(t):m.get.occurred("passing")&&m.execute(n,t),void 0!==e)return!o.passing},topVisibleReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onTopVisibleReverse,t="topVisibleReverse";if(e&&(m.debug("Adding callback for top visible reverse",e),i.onTopVisibleReverse=e),o.topVisible?i.once||m.remove.occurred(t):m.get.occurred("topVisible")&&m.execute(n,t),void 0===e)return!o.topVisible},bottomVisibleReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomVisibleReverse,t="bottomVisibleReverse";if(e&&(m.debug("Adding callback for bottom visible reverse",e),i.onBottomVisibleReverse=e),o.bottomVisible?i.once||m.remove.occurred(t):m.get.occurred("bottomVisible")&&m.execute(n,t),void 0===e)return!o.bottomVisible},topPassedReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onTopPassedReverse,t="topPassedReverse";if(e&&(m.debug("Adding callback for top passed reverse",e),i.onTopPassedReverse=e),o.topPassed?i.once||m.remove.occurred(t):m.get.occurred("topPassed")&&m.execute(n,t),void 0===e)return!o.onTopPassed},bottomPassedReverse:function(e){var o=m.get.elementCalculations(),n=e||i.onBottomPassedReverse,t="bottomPassedReverse";if(e&&(m.debug("Adding callback for bottom passed reverse",e),i.onBottomPassedReverse=e),o.bottomPassed?i.once||m.remove.occurred(t):m.get.occurred("bottomPassed")&&m.execute(n,t),void 0===e)return!o.bottomPassed},execute:function(e,o){var n=m.get.elementCalculations(),t=m.get.screenCalculations();(e=e||!1)&&(i.continuous?(m.debug("Callback being called continuously",o,n),e.call(b,n,t)):m.get.occurred(o)||(m.debug("Conditions met",o,n),e.call(b,n,t))),m.save.occurred(o)},remove:{fixed:function(){m.debug("Removing fixed position"),u.removeClass(t.fixed).css({position:"",top:"",left:"",zIndex:""}),i.onUnfixed.call(b)},placeholder:function(){m.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var o;e?void 0!==(o=m.cache.occurred)[e]&&!0===o[e]&&(m.debug("Callback can now be called again",e),m.cache.occurred[e]=!1):m.cache.occurred={}}},save:{calculations:function(){m.verbose("Saving all calculations necessary to determine positioning"),m.save.direction(),m.save.screenCalculations(),m.save.elementCalculations()},occurred:function(e){!e||void 0!==m.cache.occurred[e]&&!0===m.cache.occurred[e]||(m.verbose("Saving callback occurred",e),m.cache.occurred[e]=!0)},scroll:function(e){e=e+i.offset||f.scrollTop()+i.offset,m.cache.scroll=e},direction:function(){var e=m.get.scroll(),o=m.get.lastScroll(),e=o<e&&o?"down":e<o&&o?"up":"static";return m.cache.direction=e,m.cache.direction},elementPosition:function(){var e=m.cache.element,o=m.get.screenSize();return m.verbose("Saving element position"),e.fits=e.height<o.height,e.offset=u.offset(),e.width=u.outerWidth(),e.height=u.outerHeight(),m.is.verticallyScrollableContext()&&(e.offset.top+=f.scrollTop()-f.offset().top),m.is.horizontallyScrollableContext()&&(e.offset.left+=f.scrollLeft()-f.offset().left),m.cache.element=e},elementCalculations:function(){var e=m.get.screenCalculations(),o=m.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),m.cache.element=o,m.verbose("Updated element calculations",o),o},screenCalculations:function(){var e=m.get.scroll();return m.save.direction(),m.cache.screen.top=e,m.cache.screen.bottom=e+m.cache.screen.height,m.cache.screen},screenSize:function(){m.verbose("Saving window position"),m.cache.screen={height:f.height()}},position:function(){m.save.screenSize(),m.save.elementPosition()}},get:{pixelsPassed:function(e){var o=m.get.elementCalculations();return-1<e.search("%")?o.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==m.cache.occurred&&m.cache.occurred[e]||!1},direction:function(){return void 0===m.cache.direction&&m.save.direction(),m.cache.direction},elementPosition:function(){return void 0===m.cache.element&&m.save.elementPosition(),m.cache.element},elementCalculations:function(){return void 0===m.cache.element&&m.save.elementCalculations(),m.cache.element},screenCalculations:function(){return void 0===m.cache.screen&&m.save.screenCalculations(),m.cache.screen},screenSize:function(){return void 0===m.cache.screen&&m.save.screenSize(),m.cache.screen},scroll:function(){return void 0===m.cache.scroll&&m.save.scroll(),m.cache.scroll},lastScroll:function(){return void 0===m.cache.screen?(m.debug("First scroll event, no last scroll could be found"),!1):m.cache.screen.top}},setting:function(e,o){if(T.isPlainObject(e))T.extend(!0,i,e);else{if(void 0===o)return i[e];i[e]=o}},internal:function(e,o){if(T.isPlainObject(e))T.extend(!0,m,e);else{if(void 0===o)return m[e];m[e]=o}},debug:function(){!i.silent&&i.debug&&(i.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,i.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),m.verbose.apply(console,arguments)))},error:function(){i.silent||(m.error=Function.prototype.bind.call(console.error,console,i.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var o,n;i.performance&&(n=(o=Date.now())-(P||o),P=o,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=i.name+":",n=0;P=!1,clearTimeout(m.performance.timer),T.each(x,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(t,e,o){var i,s,n,c=v;return e=e||S,o=o||b,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),i=t.length-1,T.each(t,function(e,o){var n=e!==i?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(T.isPlainObject(c[n])&&e!==i)c=c[n];else{if(void 0!==c[n])return s=c[n],!1;{if(!T.isPlainObject(c[o])||e===i)return void 0!==c[o]?s=c[o]:m.error(r.method,t),!1;c=c[o]}}})),z(s)?n=s.apply(o,e):void 0!==s&&(n=s),Array.isArray(h)?h.push(n):void 0!==h?h=[h,n]:void 0!==n&&(h=n),s}};C?(void 0===v&&m.initialize(),v.save.scroll(),v.save.calculations(),m.invoke(y)):(void 0!==v&&v.invoke("destroy"),m.initialize())}),void 0!==h?h:this},T.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:O,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);