fomantic-ui 2.9.3-beta.1 → 2.9.3-beta.11

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 (246) 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 +19 -2
  36. package/dist/components/dropdown.js +29 -14
  37. package/dist/components/dropdown.min.css +2 -2
  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 +40 -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 +52 -5
  54. package/dist/components/form.js +32 -24
  55. package/dist/components/form.min.css +2 -2
  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 +21 -2
  70. package/dist/components/label.min.css +2 -2
  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 +9 -3
  76. package/dist/components/menu.min.css +2 -2
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +6 -3
  80. package/dist/components/modal.js +44 -32
  81. package/dist/components/modal.min.css +2 -2
  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 +41 -40
  90. package/dist/components/popup.js +25 -17
  91. package/dist/components/popup.min.css +2 -2
  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 +3 -6
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +29 -6
  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 +122 -31
  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 +6 -1
  148. package/dist/components/toast.js +17 -9
  149. package/dist/components/toast.min.css +2 -2
  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 +264 -114
  158. package/dist/semantic.js +437 -282
  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 +31 -23
  164. package/src/definitions/behaviors/state.js +22 -19
  165. package/src/definitions/behaviors/visibility.js +14 -5
  166. package/src/definitions/collections/breadcrumb.less +2 -1
  167. package/src/definitions/collections/form.less +26 -5
  168. package/src/definitions/collections/grid.less +2 -1
  169. package/src/definitions/collections/menu.less +29 -21
  170. package/src/definitions/collections/message.less +2 -1
  171. package/src/definitions/collections/table.less +2 -1
  172. package/src/definitions/elements/button.less +3 -1
  173. package/src/definitions/elements/container.less +2 -1
  174. package/src/definitions/elements/divider.less +2 -1
  175. package/src/definitions/elements/emoji.less +2 -1
  176. package/src/definitions/elements/flag.less +2 -1
  177. package/src/definitions/elements/header.less +2 -1
  178. package/src/definitions/elements/icon.less +2 -1
  179. package/src/definitions/elements/image.less +2 -1
  180. package/src/definitions/elements/input.less +2 -1
  181. package/src/definitions/elements/label.less +23 -2
  182. package/src/definitions/elements/list.less +2 -1
  183. package/src/definitions/elements/loader.less +2 -1
  184. package/src/definitions/elements/placeholder.less +2 -1
  185. package/src/definitions/elements/rail.less +2 -1
  186. package/src/definitions/elements/reveal.less +2 -1
  187. package/src/definitions/elements/segment.less +37 -11
  188. package/src/definitions/elements/step.less +2 -1
  189. package/src/definitions/elements/text.less +2 -1
  190. package/src/definitions/globals/reset.less +2 -1
  191. package/src/definitions/globals/site.less +2 -1
  192. package/src/definitions/modules/accordion.js +0 -4
  193. package/src/definitions/modules/accordion.less +2 -1
  194. package/src/definitions/modules/calendar.js +0 -5
  195. package/src/definitions/modules/calendar.less +3 -2
  196. package/src/definitions/modules/checkbox.js +0 -4
  197. package/src/definitions/modules/checkbox.less +2 -1
  198. package/src/definitions/modules/dimmer.js +0 -4
  199. package/src/definitions/modules/dimmer.less +2 -1
  200. package/src/definitions/modules/dropdown.js +28 -13
  201. package/src/definitions/modules/dropdown.less +22 -2
  202. package/src/definitions/modules/embed.js +0 -5
  203. package/src/definitions/modules/embed.less +2 -1
  204. package/src/definitions/modules/flyout.js +39 -26
  205. package/src/definitions/modules/flyout.less +2 -1
  206. package/src/definitions/modules/modal.js +43 -31
  207. package/src/definitions/modules/modal.less +7 -3
  208. package/src/definitions/modules/nag.js +15 -7
  209. package/src/definitions/modules/nag.less +3 -1
  210. package/src/definitions/modules/popup.js +24 -16
  211. package/src/definitions/modules/popup.less +42 -39
  212. package/src/definitions/modules/progress.js +0 -5
  213. package/src/definitions/modules/progress.less +2 -1
  214. package/src/definitions/modules/rating.js +0 -4
  215. package/src/definitions/modules/rating.less +2 -1
  216. package/src/definitions/modules/search.js +2 -5
  217. package/src/definitions/modules/search.less +2 -1
  218. package/src/definitions/modules/shape.js +0 -4
  219. package/src/definitions/modules/shape.less +2 -1
  220. package/src/definitions/modules/sidebar.js +14 -7
  221. package/src/definitions/modules/sidebar.less +2 -1
  222. package/src/definitions/modules/slider.js +121 -30
  223. package/src/definitions/modules/slider.less +2 -1
  224. package/src/definitions/modules/sticky.js +16 -15
  225. package/src/definitions/modules/sticky.less +2 -1
  226. package/src/definitions/modules/tab.js +13 -5
  227. package/src/definitions/modules/tab.less +2 -1
  228. package/src/definitions/modules/toast.js +16 -8
  229. package/src/definitions/modules/toast.less +9 -1
  230. package/src/definitions/modules/transition.js +0 -4
  231. package/src/definitions/modules/transition.less +2 -1
  232. package/src/definitions/views/ad.less +2 -1
  233. package/src/definitions/views/card.less +2 -1
  234. package/src/definitions/views/comment.less +2 -1
  235. package/src/definitions/views/feed.less +2 -1
  236. package/src/definitions/views/item.less +2 -1
  237. package/src/definitions/views/statistic.less +2 -1
  238. package/src/overrides.less +7 -0
  239. package/src/theme.less +7 -6
  240. package/src/themes/default/elements/label.variables +5 -0
  241. package/src/themes/default/elements/segment.variables +4 -0
  242. package/src/themes/default/globals/site.variables +3 -0
  243. package/src/themes/default/modules/dropdown.variables +3 -0
  244. package/src/themes/default/modules/modal.variables +1 -0
  245. package/src/themes/default/modules/popup.variables +3 -1
  246. package/src/themes/default/modules/toast.variables +1 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flyout
2
+ * # Fomantic-UI 2.9.3-beta.11+980ea5e - Flyout
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -28,15 +28,25 @@
28
28
  $head = $('head'),
29
29
  $body = $('body'),
30
30
 
31
- moduleSelector = $allModules.selector || '',
32
-
33
31
  time = Date.now(),
34
32
  performance = [],
35
33
 
36
34
  query = arguments[0],
37
35
  methodInvoked = typeof query === 'string',
38
36
  queryArguments = [].slice.call(arguments, 1),
37
+ contextCheck = function (context, win) {
38
+ var $context;
39
+ if ([window, document].indexOf(context) >= 0) {
40
+ $context = $body;
41
+ } else {
42
+ $context = $(win.document).find(context);
43
+ if ($context.length === 0) {
44
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
45
+ }
46
+ }
39
47
 
48
+ return $context;
49
+ },
40
50
  returnedValue
41
51
  ;
42
52
 
@@ -57,7 +67,7 @@
57
67
  moduleNamespace = 'module-' + namespace,
58
68
 
59
69
  $module = $(this),
60
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
70
+ $context = contextCheck(settings.context, window),
61
71
  $closeIcon = $module.find(selector.close),
62
72
  $inputs,
63
73
  $focusedElement,
@@ -76,6 +86,7 @@
76
86
  initialBodyMargin = '',
77
87
  tempBodyMargin = '',
78
88
  hadScrollbar = false,
89
+ windowRefocused = false,
79
90
 
80
91
  elementNamespace,
81
92
  id,
@@ -254,9 +265,13 @@
254
265
  module.setup.heights();
255
266
  },
256
267
  focus: function () {
257
- if (module.is.visible() && settings.autofocus && settings.dimPage) {
268
+ windowRefocused = true;
269
+ },
270
+ click: function (event) {
271
+ if (windowRefocused && document.activeElement !== event.target && module.is.visible() && settings.autofocus && settings.dimPage && $(document.activeElement).closest(selector.flyout).length === 0) {
258
272
  requestAnimationFrame(module.set.autofocus);
259
273
  }
274
+ windowRefocused = false;
260
275
  },
261
276
  clickaway: function (event) {
262
277
  if (settings.closable) {
@@ -363,6 +378,9 @@
363
378
  $window
364
379
  .on('focus' + elementNamespace, module.event.focus)
365
380
  ;
381
+ $context
382
+ .on('click' + elementNamespace, module.event.click)
383
+ ;
366
384
  },
367
385
  clickaway: function () {
368
386
  module.verbose('Adding clickaway events to context', $context);
@@ -492,11 +510,12 @@
492
510
 
493
511
  return nodes;
494
512
  },
495
- shouldRefreshInputs = false
513
+ shouldRefreshInputs = false,
514
+ ignoreAutofocus = true
496
515
  ;
497
516
  mutations.every(function (mutation) {
498
517
  if (mutation.type === 'attributes') {
499
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
518
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
500
519
  shouldRefreshInputs = true;
501
520
  }
502
521
  } else {
@@ -506,6 +525,9 @@
506
525
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
507
526
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
508
527
  shouldRefreshInputs = true;
528
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
529
+ ignoreAutofocus = false;
530
+ }
509
531
  }
510
532
  }
511
533
 
@@ -513,7 +535,7 @@
513
535
  });
514
536
 
515
537
  if (shouldRefreshInputs) {
516
- module.refreshInputs();
538
+ module.refreshInputs(ignoreAutofocus);
517
539
  }
518
540
  });
519
541
  observer.observe(element, {
@@ -527,7 +549,7 @@
527
549
  },
528
550
  refresh: function () {
529
551
  module.verbose('Refreshing selector cache');
530
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body;
552
+ $context = contextCheck(settings.context, window);
531
553
  module.refreshFlyouts();
532
554
  $pusher = $context.children(selector.pusher);
533
555
  module.clear.cache();
@@ -538,7 +560,7 @@
538
560
  $flyouts = $context.children(selector.flyout);
539
561
  },
540
562
 
541
- refreshInputs: function () {
563
+ refreshInputs: function (ignoreAutofocus) {
542
564
  if ($inputs) {
543
565
  $inputs
544
566
  .off('keydown' + elementNamespace)
@@ -550,8 +572,8 @@
550
572
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
551
573
  return $(this).closest('.disabled').length === 0;
552
574
  });
553
- if ($inputs.length === 0) {
554
- $inputs = $module;
575
+ if ($inputs.filter(':input').length === 0) {
576
+ $inputs = $module.add($inputs);
555
577
  $module.attr('tabindex', -1);
556
578
  } else {
557
579
  $module.removeAttr('tabindex');
@@ -562,7 +584,7 @@
562
584
  $inputs.last()
563
585
  .on('keydown' + elementNamespace, module.event.inputKeyDown.last)
564
586
  ;
565
- if (settings.autofocus && $inputs.filter(':focus').length === 0) {
587
+ if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
566
588
  module.set.autofocus();
567
589
  }
568
590
  },
@@ -840,20 +862,14 @@
840
862
  var
841
863
  $autofocus = $inputs.filter('[autofocus]'),
842
864
  $rawInputs = $inputs.filter(':input'),
843
- $input = $autofocus.length > 0
844
- ? $autofocus.first()
865
+ $input = ($autofocus.length > 0
866
+ ? $autofocus
845
867
  : ($rawInputs.length > 0
846
868
  ? $rawInputs
847
- : $inputs.filter(':not(i.close)')
848
- ).first()
869
+ : $module)
870
+ ).first()
849
871
  ;
850
- // check if only the close icon is remaining
851
- if ($input.length === 0 && $inputs.length > 0) {
852
- $input = $inputs.first();
853
- }
854
- if ($input.length > 0) {
855
- $input.trigger('focus');
856
- }
872
+ $input.trigger('focus');
857
873
  },
858
874
  dimmerStyles: function () {
859
875
  if (settings.blurring) {
@@ -1244,9 +1260,6 @@
1244
1260
  totalTime += data['Execution Time'];
1245
1261
  });
1246
1262
  title += ' ' + totalTime + 'ms';
1247
- if (moduleSelector) {
1248
- title += ' \'' + moduleSelector + '\'';
1249
- }
1250
1263
  if (performance.length > 0) {
1251
1264
  console.groupCollapsed(title);
1252
1265
  if (console.table) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Flyout
2
+ * # Fomantic-UI 2.9.3-beta.11+980ea5e - Flyout
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.11+980ea5e
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(Q,W,U){"use strict";function X(e){return"function"==typeof e&&"number"!=typeof e.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,Q.fn.flyout=function(M){var O,e=Q(this),D=Q(W),N=Q(U),L=Q("html"),B=Q("head"),z=Q("body"),I=e.selector||"",j=Date.now(),R=[],q=M,K="string"==typeof q,V=[].slice.call(arguments,1);return e.each(function(){var n,e,o,s,t,i,r,a=Q.isPlainObject(M)?Q.extend(!0,{},Q.fn.flyout.settings,M):Q.extend({},Q.fn.flyout.settings),l=a.selector,c=a.className,u=a.namespace,d=a.fields,f=a.regExp,h=a.error,g="."+u,p="module-"+u,v=Q(this),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,m=v.find(l.close),y=v.children(l.flyout),k=b.children(l.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===z[0],T="",F="",H=!1,P=!1,E={initialize:function(){var s;E.debug("Initializing flyout",M),E.create.id(),x||(E.create.flyout(),X(a.onHidden)||(a.onHidden=function(){E.destroy(),v.remove()}),a.autoShow||(a.autoShow=!0)),v.addClass(a.class),""!==a.title&&v.find(l.header).html(E.helpers.escape(a.title,a.preserveHTML)).addClass(a.classTitle),""!==a.content&&v.find(l.content).html(E.helpers.escape(a.content,a.preserveHTML)).addClass(a.classContent),E.has.configActions()&&(0===(s=v.find(l.actions).addClass(a.classActions)).length?s=Q("<div/>",{class:c.actions+" "+(a.classActions||"")}).appendTo(v):s.empty(),a.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+E.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=E.helpers.escape(e[d.text]||"",a.preserveHTML),i=E.helpers.deQuote(e[d.class]||""),o=e[d.click]&&X(e[d.click])?e[d.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&E.hide()}}}))})),a.delaySetup?requestAnimationFrame(E.setup.layout):E.setup.layout(),requestAnimationFrame(function(){E.setup.cache()}),"left"!==E.get.direction()&&"right"!==E.get.direction()||(E.setup.heights(),E.bind.resize()),E.bind.events(),E.observeChanges(),E.instantiate(),a.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of module",E),A=E,v.data(p,A)},create:{flyout:function(){var e;E.verbose("Programmaticaly create flyout",b),v=Q("<div/>",{class:c.flyout,role:"dialog","aria-modal":a.dimPage}),a.closeIcon&&(m=Q("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":a.text.close}),v.append(m)),""!==a.title&&(e="_"+E.get.id()+"title",v.attr("aria-labelledby",e),Q("<div/>",{class:c.header,id:e}).appendTo(v)),""!==a.content&&(e="_"+E.get.id()+"desc",v.attr("aria-describedby",e),Q("<div/>",{class:c.content,id:e}).appendTo(v)),E.has.configActions()&&Q("<div/>",{class:c.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,E.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),E.verbose("Destroying previous module for",v),v.off(g).removeData(p),E.is.ios()&&E.remove.ios(),m.off(s),n&&n.off(s),b.off(s),D.off(s),N.off(s)},event:{keyboard:function(e){e.which===a.keys.escape&&(a.closable?(E.debug("Escape key pressed hiding flyout"),E.hide()):E.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){E.setup.heights()},focus:function(){E.is.visible()&&a.autofocus&&a.dimPage&&requestAnimationFrame(E.set.autofocus)},clickaway:function(e){var t;a.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.is(e.target),t&&(E.verbose("User clicked on dimmed page"),E.hide()),e&&(E.verbose("User clicked on dimmable context (scaled out page)"),E.hide()))},close:function(e){E.hide()},closeKeyUp:function(e){e=e.which;e!==a.keys.enter&&e!==a.keys.space||E.hide()},inputKeyDown:{first:function(e){e.which===a.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==a.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===a.onApprove.call(E.element,Q(this))?E.verbose("Approve callback returned false cancelling close"):(C=!0,E.hide(function(){C=!1}))},deny:function(e){C||!1===a.onDeny.call(E.element,Q(this))?E.verbose("Deny callback returned false cancelling close"):(C=!0,E.hide(function(){C=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===Q(e.target).closest(l.flyout).length&&e.preventDefault()}},bind:{resize:function(){E.verbose("Adding resize event to window",D),D.on("resize"+s,E.event.resize)},events:function(){E.verbose("Attaching events"),v.on("click"+g,l.close,E.event.close).on("click"+g,l.approve,E.event.approve).on("click"+g,l.deny,E.event.deny),m.on("keyup"+s,E.event.closeKeyUp),D.on("focus"+s,E.event.focus)},clickaway:function(){E.verbose("Adding clickaway events to context",b),b.on("click"+s,E.event.clickaway).on("touchend"+s,E.event.clickaway)},scrollLock:function(){a.scrollLock&&(E.debug("Disabling page scroll"),(H=E.has.scrollbar())&&(E.save.bodyMargin(),E.set.bodyMargin()),b.addClass(c.locked)),E.verbose("Adding events to contain flyout scroll"),N.on("touchmove"+s,E.event.touch),v.on("scroll"+g,E.event.containScroll)}},unbind:{clickaway:function(){E.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){E.verbose("Removing scroll lock from page"),H&&E.restore.bodyMargin(),b.removeClass(c.locked),N.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=E.cache.width||v.outerWidth(),t=E.cache.height||v.outerHeight(),n=E.is.rtl(),i=E.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(E.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),E.is.ie()&&("left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),E.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){E.verbose("Adding keyboard shortcuts"),N.on("keydown"+g,E.event.keyboard)}},observeChanges:function(){"MutationObserver"in W&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<Q(e.target).find(":input").addBack(":input").length)&&(n=!0):(t=Q(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=Q(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0)),!n}),n&&E.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),E.debug("Setting up mutation observer",i))},refresh:function(){E.verbose("Refreshing selector cache"),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,E.refreshFlyouts(),k=b.children(l.pusher),E.clear.cache()},refreshFlyouts:function(){E.verbose("Refreshing other flyouts"),y=b.children(l.flyout)},refreshInputs:function(){n&&n.off("keydown"+s),a.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).length?(n=v).attr("tabindex",-1):v.removeAttr("tabindex"),n.first().on("keydown"+s,E.event.inputKeyDown.first),n.last().on("keydown"+s,E.event.inputKeyDown.last),a.autofocus&&0===n.filter(":focus").length&&E.set.autofocus())},setup:{cache:function(){E.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(l.pusher).length&&(E.debug("Adding wrapper element for flyout"),E.error(h.pusher),k=Q('<div class="pusher" />'),b.children().not(l.omitted).not(y).wrapAll(k),E.refresh()),0!==v.nextAll(l.pusher).length&&v.nextAll(l.pusher)[0]===k[0]||(E.debug("Moved flyout to correct parent element"),E.error(h.movedFlyout,S),v.detach().prependTo(b),E.refresh()),E.is.mobile()&&v.addClass(c.fullscreen),E.clear.cache(),E.set.pushable(),E.set.direction()},heights:function(){E.debug("Setting up heights",v);var e=v.children(l.header),t=v.children(l.content),n=v.children(l.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=Q(e);t=X(E[t])?E[t]:E.toggle,0<n.length?(E.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):E.error(h.notFound,e)},show:function(e){e=X(e)?e:function(){},E.is.hidden()?!1===a.onShow.call(S)?E.verbose("Show callback returned false cancelling show"):(E.refresh(),E.othersActive()&&(E.debug("Other flyouts currently visible"),a.exclusive?E.hideOthers():C=!1),E.set.dimmerStyles(),E.set.observeAttributes(!1),E.pushPage(function(){e.call(S),a.onVisible.call(S),a.keyboardShortcuts&&E.add.keyboardShortcuts(),E.save.focus(),E.refreshInputs(),requestAnimationFrame(E.set.observeAttributes)}),a.onChange.call(S)):E.debug("Flyout is already visible")},hide:function(e){if(e=X(e)?e:function(){},!1===a.onHide.call(S,Q(this)))return E.verbose("Hide callback returned false cancelling hide"),C=!1;(E.is.visible()||E.is.animating())&&(E.debug("Hiding flyout",e),E.refreshFlyouts(),E.set.observeAttributes(!1),E.pullPage(function(){e.call(S),X(a.onHidden)&&a.onHidden.call(S),E.restore.focus()}),a.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+c.visible).length},othersActive:function(){return E.othersVisible()||E.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){E.verbose("Determining toggled direction"),E.is.hidden()?E.show():E.hide()},pushPage:function(t){var e,n,i;t=X(t)?t:function(){},E.set.overlay(),a.returnScroll&&(r=(w?D:b).scrollTop()),E.bind.scrollLock(),e=function(){E.bind.clickaway(),E.add.inlineCSS(),E.set.animating(),E.set.visible()},n=function(){E.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),E.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),a.dimPage&&!E.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=X(t)?t:function(){},E.verbose("Removing context push state",E.get.direction()),E.unbind.clickaway(),E.othersActive()||(E.unbind.scrollLock(),a.keyboardShortcuts&&E.remove.keyboardShortcuts()),e=function(){E.set.overlay(),E.set.animating(),a.dimPage&&!E.othersVisible()&&E.set.closing(),E.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),E.remove.animating(),E.remove.closing(),E.remove.overlay(),E.remove.inlineCSS(),a.returnScroll&&E.scrollBack(),a.dimPage&&!E.othersVisible()&&k.removeClass(c.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){E.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?D:b)[0].scrollTo(0,0)},scrollBack:function(){E.verbose("Scrolling back to original page position"),(w?D:b)[0].scrollTo(0,r)},clear:{cache:function(){E.verbose("Clearing cached dimensions"),E.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},dimmerStyles:function(){a.blurring?k.addClass(c.blurring):k.removeClass(c.blurring)},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(l.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+F+"px)")})},ios:function(){L.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){k.addClass(c.dimmed)},active:function(){v.addClass(c.active)},animating:function(){v.addClass(c.animating)},closing:function(){k.addClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.addClass(c[e])},visible:function(){v.addClass(c.visible)},overlay:function(){v.addClass(c.overlay)}},remove:{inlineCSS:function(){E.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){E.verbose("Removing keyboard shortcuts"),N.off("keydown"+g)},ios:function(){L.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){v.removeClass(c.active)},animating:function(){v.removeClass(c.animating)},closing:function(){k.removeClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.removeClass(c[e])},visible:function(){v.removeClass(c.visible)},overlay:function(){v.removeClass(c.overlay)}},get:{direction:function(){return v.hasClass(c.top)?c.top:v.hasClass(c.right)?c.right:v.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return v},settings:function(){return a}},can:{leftBodyScrollbar:function(){return void 0===E.cache.leftBodyScrollbar&&(E.cache.leftBodyScrollbar=E.is.rtl()&&(E.is.iframe&&!E.is.firefox()||E.is.safari()||E.is.edge()||E.is.ie())),E.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(U.activeElement).closest(v).length||(e=Q(U.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(E.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?W.innerWidth-U.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===E.cache.isSafari&&(E.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),E.cache.isSafari},edge:function(){return void 0===E.cache.isEdge&&(E.cache.isEdge=!!W.setImmediate&&!E.is.ie()),E.cache.isEdge},firefox:function(){return void 0===E.cache.isFirefox&&(E.cache.isFirefox=!!W.InstallTrigger),E.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===E.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,E.cache.isIE=e||t),E.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(E.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(E.verbose("Browser was found to be mobile",e),!0):(E.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!E.is.visible()},visible:function(){return v.hasClass(c.visible)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===E.cache.isRTL&&(E.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),E.cache.isRTL}},has:{configActions:function(){return Array.isArray(a.actions)&&0<a.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&a.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(l.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(E.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,a,e);else{if(void 0===t)return a[e];Q.isPlainObject(a[e])?Q.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,a.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),E.verbose.apply(console,arguments)))},error:function(){a.silent||(E.error=Function.prototype.bind.call(console.error,console,a.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(j||t),j=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var e=a.name+":",n=0;j=!1,clearTimeout(E.performance.timer),Q.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",I&&(e+=" '"+I+"'"),0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):Q.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,Q.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Q.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:E.error(h.method,i),!1;r=r[t]}}})),X(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(O)?O.push(n):void 0!==O?O=[O,n]:void 0!==n&&(O=n),s}};K?(void 0===A&&(X(a.templates[q])&&(a.autoShow=!0,a.className.flyout=a.className.template,a=Q.extend(!0,{},a,a.templates[q].apply(E,V)),c=a.className,a.namespace,d=a.fields,h=a.error),E.initialize()),X(a.templates[q])||E.invoke(q)):(void 0!==A&&A.invoke("destroy"),E.initialize(),O=v)}),void 0!==O?O:this},Q.flyout=Q.fn.flyout,Q.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Q.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return Q.isPlainObject(e[0])?Q.extend({handler:function(){},content:"",title:""},e[0]):(X(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===Q(Q.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(Q(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
11
+ !function(W,U,X){"use strict";function _(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,W.fn.flyout=function(O){var D,e=W(this),N=W(U),L=W(X),B=W("html"),z=W("head"),I=W("body"),j=Date.now(),R=[],q=O,K="string"==typeof q,V=[].slice.call(arguments,1),Q=function(e,t){var n;return 0<=[U,X].indexOf(e)?n=I:0===(n=W(t.document).find(e)).length&&(n=t.frameElement?Q(e,t.parent):I),n};return e.each(function(){var n,e,o,s,t,i,r,l=W.isPlainObject(O)?W.extend(!0,{},W.fn.flyout.settings,O):W.extend({},W.fn.flyout.settings),a=l.selector,c=l.className,u=l.namespace,d=l.fields,f=l.regExp,h=l.error,g="."+u,p="module-"+u,v=W(this),b=Q(l.context,U),m=v.find(a.close),y=v.children(a.flyout),k=b.children(a.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===I[0],T="",F="",E=!1,H=!1,P=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),x||(M.create.flyout(),_(l.onHidden)||(l.onHidden=function(){M.destroy(),v.remove()}),l.autoShow||(l.autoShow=!0)),v.addClass(l.class),""!==l.title&&v.find(a.header).html(M.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&v.find(a.content).html(M.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),M.has.configActions()&&(0===(s=v.find(a.actions).addClass(l.classActions)).length?s=W("<div/>",{class:c.actions+" "+(l.classActions||"")}).appendTo(v):s.empty(),l.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=M.helpers.escape(e[d.text]||"",l.preserveHTML),i=M.helpers.deQuote(e[d.class]||""),o=e[d.click]&&_(e[d.click])?e[d.click]:function(){};s.append(W("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&M.hide()}}}))})),l.delaySetup?requestAnimationFrame(M.setup.layout):M.setup.layout(),requestAnimationFrame(function(){M.setup.cache()}),"left"!==M.get.direction()&&"right"!==M.get.direction()||(M.setup.heights(),M.bind.resize()),M.bind.events(),M.observeChanges(),M.instantiate(),l.autoShow&&M.show()},instantiate:function(){M.verbose("Storing instance of module",M),A=M,v.data(p,A)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",b),v=W("<div/>",{class:c.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(m=W("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":l.text.close}),v.append(m)),""!==l.title&&(e="_"+M.get.id()+"title",v.attr("aria-labelledby",e),W("<div/>",{class:c.header,id:e}).appendTo(v)),""!==l.content&&(e="_"+M.get.id()+"desc",v.attr("aria-describedby",e),W("<div/>",{class:c.content,id:e}).appendTo(v)),M.has.configActions()&&W("<div/>",{class:c.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,M.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",v),v.off(g).removeData(p),M.is.ios()&&M.remove.ios(),m.off(s),n&&n.off(s),b.off(s),N.off(s),L.off(s)},event:{keyboard:function(e){e.which===l.keys.escape&&(l.closable?(M.debug("Escape key pressed hiding flyout"),M.hide()):M.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){M.setup.heights()},focus:function(){H=!0},click:function(e){H&&X.activeElement!==e.target&&M.is.visible()&&l.autofocus&&l.dimPage&&0===W(X.activeElement).closest(a.flyout).length&&requestAnimationFrame(M.set.autofocus),H=!1},clickaway:function(e){var t;l.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.is(e.target),t&&(M.verbose("User clicked on dimmed page"),M.hide()),e&&(M.verbose("User clicked on dimmable context (scaled out page)"),M.hide()))},close:function(e){M.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||M.hide()},inputKeyDown:{first:function(e){e.which===l.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==l.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===l.onApprove.call(M.element,W(this))?M.verbose("Approve callback returned false cancelling close"):(C=!0,M.hide(function(){C=!1}))},deny:function(e){C||!1===l.onDeny.call(M.element,W(this))?M.verbose("Deny callback returned false cancelling close"):(C=!0,M.hide(function(){C=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===W(e.target).closest(a.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",N),N.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),v.on("click"+g,a.close,M.event.close).on("click"+g,a.approve,M.event.approve).on("click"+g,a.deny,M.event.deny),m.on("keyup"+s,M.event.closeKeyUp),N.on("focus"+s,M.event.focus),b.on("click"+s,M.event.click)},clickaway:function(){M.verbose("Adding clickaway events to context",b),b.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){l.scrollLock&&(M.debug("Disabling page scroll"),(E=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),b.addClass(c.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),v.on("scroll"+g,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),E&&M.restore.bodyMargin(),b.removeClass(c.locked),L.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=M.cache.width||v.outerWidth(),t=M.cache.height||v.outerHeight(),n=M.is.rtl(),i=M.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(M.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),M.is.ie()&&("left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=W(n+="</style>").appendTo(z),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+g,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!0;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<W(e.target).find(":input").addBack(":input").filter(":visible").length)&&(n=!0):(t=W(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=W(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0,(0<t.filter(":input").length||0<e.filter(":input").length)&&(i=!1))),!n}),n&&M.refreshInputs(i)})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),b=Q(l.context,U),M.refreshFlyouts(),k=b.children(a.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),y=b.children(a.flyout)},refreshInputs:function(e){n&&n.off("keydown"+s),l.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).filter(":input").length?(n=v.add(n),v.attr("tabindex",-1)):v.removeAttr("tabindex"),n.first().on("keydown"+s,M.event.inputKeyDown.first),n.last().on("keydown"+s,M.event.inputKeyDown.last),!e&&l.autofocus&&0===n.filter(":focus").length&&M.set.autofocus())},setup:{cache:function(){M.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(a.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(h.pusher),k=W('<div class="pusher" />'),b.children().not(a.omitted).not(y).wrapAll(k),M.refresh()),0!==v.nextAll(a.pusher).length&&v.nextAll(a.pusher)[0]===k[0]||(M.debug("Moved flyout to correct parent element"),M.error(h.movedFlyout,S),v.detach().prependTo(b),M.refresh()),M.is.mobile()&&v.addClass(c.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",v);var e=v.children(a.header),t=v.children(a.content),n=v.children(a.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=W(e);t=_(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):M.error(h.notFound,e)},show:function(e){e=_(e)?e:function(){},M.is.hidden()?!1===l.onShow.call(S)?M.verbose("Show callback returned false cancelling show"):(M.refresh(),M.othersActive()&&(M.debug("Other flyouts currently visible"),l.exclusive?M.hideOthers():C=!1),M.set.dimmerStyles(),M.set.observeAttributes(!1),M.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),requestAnimationFrame(M.set.observeAttributes)}),l.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=_(e)?e:function(){},!1===l.onHide.call(S,W(this)))return M.verbose("Hide callback returned false cancelling hide"),C=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.set.observeAttributes(!1),M.pullPage(function(){e.call(S),_(l.onHidden)&&l.onHidden.call(S),M.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+c.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){M.verbose("Determining toggled direction"),M.is.hidden()?M.show():M.hide()},pushPage:function(t){var e,n,i;t=_(t)?t:function(){},M.set.overlay(),l.returnScroll&&(r=(w?N:b).scrollTop()),M.bind.scrollLock(),e=function(){M.bind.clickaway(),M.add.inlineCSS(),M.set.animating(),M.set.visible()},n=function(){M.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),M.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),l.dimPage&&!M.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=_(t)?t:function(){},M.verbose("Removing context push state",M.get.direction()),M.unbind.clickaway(),M.othersActive()||(M.unbind.scrollLock(),l.keyboardShortcuts&&M.remove.keyboardShortcuts()),e=function(){M.set.overlay(),M.set.animating(),l.dimPage&&!M.othersVisible()&&M.set.closing(),M.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),l.returnScroll&&M.scrollBack(),l.dimPage&&!M.othersVisible()&&k.removeClass(c.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?N:b)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(w?N:b)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input");(0<e.length?e:0<t.length?t:v).first().trigger("focus")},dimmerStyles:function(){l.blurring?k.addClass(c.blurring):k.removeClass(c.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(a.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+F+"px)")})},ios:function(){B.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){k.addClass(c.dimmed)},active:function(){v.addClass(c.active)},animating:function(){v.addClass(c.animating)},closing:function(){k.addClass(c.closing)},direction:function(e){e=e||M.get.direction(),v.addClass(c[e])},visible:function(){v.addClass(c.visible)},overlay:function(){v.addClass(c.overlay)}},remove:{inlineCSS:function(){M.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){M.verbose("Removing keyboard shortcuts"),L.off("keydown"+g)},ios:function(){B.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){v.removeClass(c.active)},animating:function(){v.removeClass(c.animating)},closing:function(){k.removeClass(c.closing)},direction:function(e){e=e||M.get.direction(),v.removeClass(c[e])},visible:function(){v.removeClass(c.visible)},overlay:function(){v.removeClass(c.overlay)}},get:{direction:function(){return v.hasClass(c.top)?c.top:v.hasClass(c.right)?c.right:v.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return v},settings:function(){return l}},can:{leftBodyScrollbar:function(){return void 0===M.cache.leftBodyScrollbar&&(M.cache.leftBodyScrollbar=M.is.rtl()&&(M.is.iframe&&!M.is.firefox()||M.is.safari()||M.is.edge()||M.is.ie())),M.cache.leftBodyScrollbar}},save:{focus:function(){0<W(X.activeElement).closest(v).length||(e=W(X.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?U.innerWidth-X.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===M.cache.isSafari&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return void 0===M.cache.isEdge&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return void 0===M.cache.isFirefox&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===M.cache.isIE&&(e=!U.ActiveXObject&&"ActiveXObject"in U,t="ActiveXObject"in U,M.cache.isIE=e||t),M.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(M.verbose("Browser was found to be mobile",e),!0):(M.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!M.is.visible()},visible:function(){return v.hasClass(c.visible)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===M.cache.isRTL&&(M.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===I.attr("dir")||"rtl"===I.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&l.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(a.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,l,e);else{if(void 0===t)return l[e];W.isPlainObject(l[e])?W.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,M,e);else{if(void 0===t)return M[e];M[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,l.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),M.verbose.apply(console,arguments)))},error:function(){l.silent||(M.error=Function.prototype.bind.call(console.error,console,l.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=Date.now())-(j||t),j=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){var e=l.name+":",n=0;j=!1,clearTimeout(M.performance.timer),W.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):W.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,W.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return s=r[n],!1;{if(!W.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:M.error(h.method,i),!1;r=r[t]}}})),_(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),s}};K?(void 0===A&&(_(l.templates[q])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=W.extend(!0,{},l,l.templates[q].apply(M,V)),c=l.className,l.namespace,d=l.fields,h=l.error),M.initialize()),_(l.templates[q])||M.invoke(q)):(void 0!==A&&A.invoke("destroy"),M.initialize(),D=v)}),void 0!==D?D:this},W.flyout=W.fn.flyout,W.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},W.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(_(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===W(W.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(W(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Form
2
+ * # Fomantic-UI 2.9.3-beta.11+980ea5e - Form
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -494,6 +494,11 @@
494
494
  .ui.ui.form .field.error .input {
495
495
  color: #9f3a38;
496
496
  }
497
+ @supports selector(:has(.f)) {
498
+ .ui.form .fields:has(.error) > label {
499
+ color: #9f3a38;
500
+ }
501
+ }
497
502
  .ui.form .fields.error .field .ui.label,
498
503
  .ui.form .field.error .ui.label {
499
504
  background-color: #ecd1d1;
@@ -707,6 +712,11 @@
707
712
  .ui.inverted.form .error.field label {
708
713
  color: #ecd1d1;
709
714
  }
715
+ @supports selector(:has(.f)) {
716
+ .ui.inverted.form .fields:has(.error) > label {
717
+ color: #ecd1d1;
718
+ }
719
+ }
710
720
 
711
721
  /* On Form */
712
722
  .ui.form.info .info.message:not(:empty) {
@@ -740,6 +750,11 @@
740
750
  .ui.ui.form .field.info .input {
741
751
  color: #276f86;
742
752
  }
753
+ @supports selector(:has(.f)) {
754
+ .ui.form .fields:has(.info) > label {
755
+ color: #276f86;
756
+ }
757
+ }
743
758
  .ui.form .fields.info .field .ui.label,
744
759
  .ui.form .field.info .ui.label {
745
760
  background-color: #c6e3e9;
@@ -932,6 +947,11 @@
932
947
  .ui.inverted.form .info.field label {
933
948
  color: #c6e3e9;
934
949
  }
950
+ @supports selector(:has(.f)) {
951
+ .ui.inverted.form .fields:has(.info) > label {
952
+ color: #c6e3e9;
953
+ }
954
+ }
935
955
 
936
956
  /* On Form */
937
957
  .ui.form.success .success.message:not(:empty) {
@@ -965,6 +985,11 @@
965
985
  .ui.ui.form .field.success .input {
966
986
  color: #2c662d;
967
987
  }
988
+ @supports selector(:has(.f)) {
989
+ .ui.form .fields:has(.success) > label {
990
+ color: #2c662d;
991
+ }
992
+ }
968
993
  .ui.form .fields.success .field .ui.label,
969
994
  .ui.form .field.success .ui.label {
970
995
  background-color: #b9d1ad;
@@ -1157,6 +1182,11 @@
1157
1182
  .ui.inverted.form .success.field label {
1158
1183
  color: #b9d1ad;
1159
1184
  }
1185
+ @supports selector(:has(.f)) {
1186
+ .ui.inverted.form .fields:has(.success) > label {
1187
+ color: #b9d1ad;
1188
+ }
1189
+ }
1160
1190
 
1161
1191
  /* On Form */
1162
1192
  .ui.form.warning .warning.message:not(:empty) {
@@ -1190,6 +1220,11 @@
1190
1220
  .ui.ui.form .field.warning .input {
1191
1221
  color: #573a08;
1192
1222
  }
1223
+ @supports selector(:has(.f)) {
1224
+ .ui.form .fields:has(.warning) > label {
1225
+ color: #573a08;
1226
+ }
1227
+ }
1193
1228
  .ui.form .fields.warning .field .ui.label,
1194
1229
  .ui.form .field.warning .ui.label {
1195
1230
  background-color: #d7ccb5;
@@ -1382,6 +1417,11 @@
1382
1417
  .ui.inverted.form .warning.field label {
1383
1418
  color: #d7ccb5;
1384
1419
  }
1420
+ @supports selector(:has(.f)) {
1421
+ .ui.inverted.form .fields:has(.warning) > label {
1422
+ color: #d7ccb5;
1423
+ }
1424
+ }
1385
1425
 
1386
1426
  /* --------------------
1387
1427
  Disabled
@@ -1446,29 +1486,36 @@
1446
1486
  /* --------------------
1447
1487
  Required Field
1448
1488
  --------------------- */
1449
- .ui.form .required.fields:not(.grouped) > .field > label::after,
1489
+ .ui.form .required.fields:not(.grouped):not(.inline) > .field > label::after,
1490
+ .ui.form .required.fields.inline > label::after,
1450
1491
  .ui.form .required.fields.grouped > label::after,
1451
1492
  .ui.form .required.field > label::after,
1452
- .ui.form .required.fields:not(.grouped) > .field > .checkbox::after,
1493
+ .ui.form .required.fields:not(.grouped):not(.inline) > .field > .checkbox::after,
1453
1494
  .ui.form .required.field > .checkbox::after,
1454
1495
  .ui.form label.required::after {
1455
1496
  margin: -0.2em 0 0 0.2em;
1456
1497
  content: "*";
1457
1498
  color: #db2828;
1458
1499
  }
1459
- .ui.form .required.fields:not(.grouped) > .field > label::after,
1500
+ .ui.form .required.fields:not(.grouped):not(.inline) > .field > label::after,
1501
+ .ui.form .required.fields.inline > label::after,
1460
1502
  .ui.form .required.fields.grouped > label::after,
1461
1503
  .ui.form .required.field > label::after,
1462
1504
  .ui.form label.required::after {
1463
1505
  display: inline-block;
1464
1506
  vertical-align: top;
1465
1507
  }
1466
- .ui.form .required.fields:not(.grouped) > .field > .checkbox::after,
1508
+ .ui.form .required.fields:not(.grouped):not(.inline) > .field > .checkbox::after,
1467
1509
  .ui.form .required.field > .checkbox::after {
1468
1510
  position: absolute;
1469
1511
  top: 0;
1470
1512
  left: 100%;
1471
1513
  }
1514
+ .ui.ui.ui.ui.form .fields > label:empty::after,
1515
+ .ui.ui.ui.ui.form .field > label:empty::after {
1516
+ content: " ";
1517
+ display: inline-block;
1518
+ }
1472
1519
 
1473
1520
 
1474
1521
  /*******************************
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.3-beta.1+d8dd970 - Form Validation
2
+ * # Fomantic-UI 2.9.3-beta.11+980ea5e - Form Validation
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -22,7 +22,7 @@
22
22
  $.fn.form = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
25
+ $window = $(window),
26
26
 
27
27
  time = Date.now(),
28
28
  performance = [],
@@ -61,6 +61,8 @@
61
61
  namespace,
62
62
  moduleNamespace,
63
63
  eventNamespace,
64
+ attachEventsSelector,
65
+ attachEventsAction,
64
66
 
65
67
  submitting = false,
66
68
  dirty = false,
@@ -143,6 +145,9 @@
143
145
  module[action]();
144
146
  event.preventDefault();
145
147
  });
148
+
149
+ attachEventsSelector = selector;
150
+ attachEventsAction = action;
146
151
  },
147
152
 
148
153
  bindEvents: function () {
@@ -168,10 +173,14 @@
168
173
 
169
174
  // Dirty events
170
175
  if (settings.preventLeaving) {
171
- $(window).on('beforeunload' + eventNamespace, module.event.beforeUnload);
176
+ $window.on('beforeunload' + eventNamespace, module.event.beforeUnload);
172
177
  }
173
178
 
174
- $field.on('change click keyup keydown blur', function (e) {
179
+ $field.on('change' + eventNamespace
180
+ + ' click' + eventNamespace
181
+ + ' keyup' + eventNamespace
182
+ + ' keydown' + eventNamespace
183
+ + ' blur' + eventNamespace, function (e) {
175
184
  module.determine.isDirty();
176
185
  });
177
186
 
@@ -182,6 +191,9 @@
182
191
  $module.on('clean' + eventNamespace, function (e) {
183
192
  settings.onClean.call();
184
193
  });
194
+ if (attachEventsSelector) {
195
+ module.attachEvents(attachEventsSelector, attachEventsAction);
196
+ }
185
197
  },
186
198
 
187
199
  clear: function () {
@@ -230,6 +242,7 @@
230
242
  isCheckbox = $field.is(selector.checkbox),
231
243
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
232
244
  isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
245
+ isFile = $field.is(selector.file),
233
246
  isErrored = $fieldGroup.hasClass(className.error)
234
247
  ;
235
248
  if (defaultValue === undefined) {
@@ -250,7 +263,7 @@
250
263
  $calendar.calendar('set date', defaultValue);
251
264
  } else {
252
265
  module.verbose('Resetting field value', $field, defaultValue);
253
- $field.val(defaultValue);
266
+ $field.val(isFile ? '' : defaultValue);
254
267
  }
255
268
  });
256
269
  module.remove.states();
@@ -386,6 +399,13 @@
386
399
  $module.off(eventNamespace);
387
400
  $field.off(eventNamespace);
388
401
  $submit.off(eventNamespace);
402
+ if (settings.preventLeaving) {
403
+ $window.off(eventNamespace);
404
+ }
405
+ if (attachEventsSelector) {
406
+ $(attachEventsSelector).off(eventNamespace);
407
+ attachEventsSelector = undefined;
408
+ }
389
409
  },
390
410
 
391
411
  event: {
@@ -487,18 +507,7 @@
487
507
  return rule.type;
488
508
  },
489
509
  changeEvent: function (type, $input) {
490
- if (type === 'checkbox' || type === 'radio' || type === 'hidden' || $input.is('select')) {
491
- return 'change';
492
- }
493
-
494
- return module.get.inputEvent();
495
- },
496
- inputEvent: function () {
497
- return document.createElement('input').oninput !== undefined
498
- ? 'input'
499
- : (document.createElement('input').onpropertychange !== undefined
500
- ? 'propertychange'
501
- : 'keyup');
510
+ return ['file', 'checkbox', 'radio', 'hidden'].indexOf(type) >= 0 || $input.is('select') ? 'change' : 'input';
502
511
  },
503
512
  fieldsFromShorthand: function (fields) {
504
513
  var
@@ -634,7 +643,7 @@
634
643
  var $field = typeof identifier === 'string'
635
644
  ? module.get.field(identifier)
636
645
  : identifier,
637
- $label = $field.closest(selector.group).find('label').eq(0)
646
+ $label = $field.closest(selector.group).find('label:not(:empty)').eq(0)
638
647
  ;
639
648
 
640
649
  return $label.length === 1
@@ -1103,6 +1112,7 @@
1103
1112
  $field = module.get.field(key),
1104
1113
  $element = $field.parent(),
1105
1114
  $calendar = $field.closest(selector.uiCalendar),
1115
+ isFile = $field.is(selector.file),
1106
1116
  isMultiple = Array.isArray(value),
1107
1117
  isCheckbox = $element.is(selector.uiCheckbox) && module.can.useElement('checkbox'),
1108
1118
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
@@ -1145,7 +1155,7 @@
1145
1155
  $calendar.calendar('set date', value);
1146
1156
  } else {
1147
1157
  module.verbose('Setting field value', value, $field);
1148
- $field.val(value);
1158
+ $field.val(isFile ? '' : value);
1149
1159
  }
1150
1160
  }
1151
1161
  });
@@ -1473,9 +1483,6 @@
1473
1483
  totalTime += data['Execution Time'];
1474
1484
  });
1475
1485
  title += ' ' + totalTime + 'ms';
1476
- if (moduleSelector) {
1477
- title += ' \'' + moduleSelector + '\'';
1478
- }
1479
1486
  if ($allModules.length > 1) {
1480
1487
  title += ' (' + $allModules.length + ')';
1481
1488
  }
@@ -1651,9 +1658,10 @@
1651
1658
  selector: {
1652
1659
  checkbox: 'input[type="checkbox"], input[type="radio"]',
1653
1660
  clear: '.clear',
1654
- field: 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
1661
+ field: 'input:not(.search):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
1662
+ file: 'input[type="file"]',
1655
1663
  group: '.field',
1656
- input: 'input:not([type="file"])',
1664
+ input: 'input',
1657
1665
  message: '.error.message',
1658
1666
  prompt: '.prompt.label',
1659
1667
  radio: 'input[type="radio"]',