fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +13 -70
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +26 -26
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +95 -94
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +181 -151
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +14 -14
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +23 -25
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +252 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +27 -33
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -2
- package/dist/components/flyout.js +50 -44
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +187 -163
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +49 -45
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +22 -20
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +71 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +46 -46
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +15 -15
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +69 -74
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +39 -39
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +39 -37
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +22 -21
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +69 -64
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +15 -15
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +25 -25
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +55 -57
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +57 -30
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +45 -39
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +25 -25
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +1518 -1427
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +6 -4
- package/src/definitions/behaviors/api.js +94 -93
- package/src/definitions/behaviors/form.js +186 -162
- package/src/definitions/behaviors/state.js +14 -14
- package/src/definitions/behaviors/visibility.js +24 -24
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +21 -20
- package/src/definitions/modules/accordion.js +25 -25
- package/src/definitions/modules/calendar.js +180 -150
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +13 -13
- package/src/definitions/modules/dimmer.js +22 -24
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +251 -253
- package/src/definitions/modules/embed.js +26 -32
- package/src/definitions/modules/flyout.js +49 -43
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +48 -44
- package/src/definitions/modules/nag.js +21 -19
- package/src/definitions/modules/popup.js +70 -70
- package/src/definitions/modules/progress.js +45 -45
- package/src/definitions/modules/rating.js +14 -14
- package/src/definitions/modules/search.js +68 -73
- package/src/definitions/modules/shape.js +38 -38
- package/src/definitions/modules/sidebar.js +38 -36
- package/src/definitions/modules/slider.js +68 -63
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +54 -56
- package/src/definitions/modules/toast.js +56 -29
- package/src/definitions/modules/transition.js +44 -38
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +10 -10
- package/tasks/admin/distributions/create.js +16 -18
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +10 -10
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +6 -6
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +6 -8
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +14 -19
- package/tasks/config/project/install.js +35 -34
- package/tasks/config/project/release.js +15 -16
- package/tasks/config/tasks.js +18 -20
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +6 -3
- package/tasks/install.js +39 -39
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
- package/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
package/dist/components/popup.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Popup
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -28,22 +28,22 @@
|
|
28
28
|
|
29
29
|
moduleSelector = $allModules.selector || '',
|
30
30
|
|
31
|
-
clickEvent =
|
31
|
+
clickEvent = 'ontouchstart' in document.documentElement
|
32
32
|
? 'touchstart'
|
33
33
|
: 'click',
|
34
34
|
|
35
|
-
time =
|
35
|
+
time = Date.now(),
|
36
36
|
performance = [],
|
37
37
|
|
38
38
|
query = arguments[0],
|
39
|
-
methodInvoked =
|
39
|
+
methodInvoked = typeof query === 'string',
|
40
40
|
queryArguments = [].slice.call(arguments, 1),
|
41
41
|
|
42
42
|
returnedValue
|
43
43
|
;
|
44
44
|
$allModules.each(function () {
|
45
45
|
var
|
46
|
-
settings =
|
46
|
+
settings = $.isPlainObject(parameters)
|
47
47
|
? $.extend(true, {}, $.fn.popup.settings, parameters)
|
48
48
|
: $.extend({}, $.fn.popup.settings),
|
49
49
|
|
@@ -60,7 +60,7 @@
|
|
60
60
|
$context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context),
|
61
61
|
$scrollContext = [window, document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
|
62
62
|
$boundary = [window, document].indexOf(settings.boundary) < 0 ? $document.find(settings.boundary) : $(settings.boundary),
|
63
|
-
$target =
|
63
|
+
$target = settings.target
|
64
64
|
? ([window, document].indexOf(settings.target) < 0 ? $document.find(settings.target) : $(settings.target))
|
65
65
|
: $module,
|
66
66
|
|
@@ -136,11 +136,11 @@
|
|
136
136
|
;
|
137
137
|
}
|
138
138
|
} else {
|
139
|
-
$offsetParent =
|
139
|
+
$offsetParent = settings.inline
|
140
140
|
? module.get.offsetParent($target)
|
141
|
-
: module.has.popup()
|
141
|
+
: (module.has.popup()
|
142
142
|
? module.get.offsetParent($popup)
|
143
|
-
: $body;
|
143
|
+
: $body);
|
144
144
|
}
|
145
145
|
if ($offsetParent.is('html') && $offsetParent[0] !== $body[0]) {
|
146
146
|
module.debug('Setting page as offset parent');
|
@@ -179,7 +179,7 @@
|
|
179
179
|
event: {
|
180
180
|
start: function (event) {
|
181
181
|
var
|
182
|
-
delay =
|
182
|
+
delay = $.isPlainObject(settings.delay)
|
183
183
|
? settings.delay.show
|
184
184
|
: settings.delay
|
185
185
|
;
|
@@ -190,7 +190,7 @@
|
|
190
190
|
},
|
191
191
|
end: function () {
|
192
192
|
var
|
193
|
-
delay =
|
193
|
+
delay = $.isPlainObject(settings.delay)
|
194
194
|
? settings.delay.hide
|
195
195
|
: settings.delay
|
196
196
|
;
|
@@ -224,7 +224,7 @@
|
|
224
224
|
var
|
225
225
|
$target = $(event.target),
|
226
226
|
isInDOM = $.contains(document.documentElement, event.target),
|
227
|
-
inPopup =
|
227
|
+
inPopup = $target.closest(selector.popup).length > 0
|
228
228
|
;
|
229
229
|
// don't close on clicks inside popup
|
230
230
|
if (event && !inPopup && isInDOM) {
|
@@ -282,7 +282,7 @@
|
|
282
282
|
if (settings.hoverable) {
|
283
283
|
module.bind.popup();
|
284
284
|
}
|
285
|
-
} else if ($target.next(selector.popup).length
|
285
|
+
} else if ($target.next(selector.popup).length > 0) {
|
286
286
|
module.verbose('Pre-existing popup found');
|
287
287
|
settings.inline = true;
|
288
288
|
settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
|
@@ -325,7 +325,8 @@
|
|
325
325
|
module.debug('onShow callback returned false, cancelling popup animation');
|
326
326
|
|
327
327
|
return;
|
328
|
-
}
|
328
|
+
}
|
329
|
+
if (!settings.preserve && !settings.popup) {
|
329
330
|
module.refresh();
|
330
331
|
}
|
331
332
|
if ($popup && module.set.position()) {
|
@@ -369,12 +370,10 @@
|
|
369
370
|
return false;
|
370
371
|
}
|
371
372
|
if (settings.inline || settings.popup) {
|
372
|
-
return
|
373
|
-
} else {
|
374
|
-
return ($popup.closest($context).length >= 1)
|
375
|
-
? true
|
376
|
-
: false;
|
373
|
+
return module.has.popup();
|
377
374
|
}
|
375
|
+
|
376
|
+
return $popup.closest($context).length > 0;
|
378
377
|
},
|
379
378
|
|
380
379
|
removePopup: function () {
|
@@ -409,7 +408,7 @@
|
|
409
408
|
},
|
410
409
|
supports: {
|
411
410
|
svg: function () {
|
412
|
-
return
|
411
|
+
return typeof SVGGraphicsElement !== 'undefined';
|
413
412
|
},
|
414
413
|
},
|
415
414
|
animate: {
|
@@ -498,16 +497,16 @@
|
|
498
497
|
var
|
499
498
|
$popupOffsetParent = module.get.offsetParent($popup),
|
500
499
|
targetElement = $target[0],
|
501
|
-
isWindowEl =
|
500
|
+
isWindowEl = $boundary[0] == window,
|
502
501
|
targetOffset = $target.offset(),
|
503
502
|
parentOffset = settings.inline || (settings.popup && settings.movePopup)
|
504
503
|
? $target.offsetParent().offset()
|
505
504
|
: { top: 0, left: 0 },
|
506
|
-
screenPosition =
|
505
|
+
screenPosition = isWindowEl
|
507
506
|
? { top: 0, left: 0 }
|
508
507
|
: $boundary.offset(),
|
509
508
|
calculations = {},
|
510
|
-
scroll =
|
509
|
+
scroll = isWindowEl
|
511
510
|
? { top: $window.scrollTop(), left: $window.scrollLeft() }
|
512
511
|
: { top: 0, left: 0 },
|
513
512
|
screen
|
@@ -565,13 +564,13 @@
|
|
565
564
|
}
|
566
565
|
|
567
566
|
// add in margins if inline
|
568
|
-
calculations.target.margin.top =
|
567
|
+
calculations.target.margin.top = settings.inline
|
569
568
|
? parseInt(window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)
|
570
569
|
: 0;
|
571
|
-
calculations.target.margin.left =
|
572
|
-
? module.is.rtl()
|
570
|
+
calculations.target.margin.left = settings.inline
|
571
|
+
? (module.is.rtl()
|
573
572
|
? parseInt(window.getComputedStyle(targetElement).getPropertyValue('margin-right'), 10)
|
574
|
-
: parseInt(window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10)
|
573
|
+
: parseInt(window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10))
|
575
574
|
: 0;
|
576
575
|
// calculate screen boundaries
|
577
576
|
screen = calculations.screen;
|
@@ -590,7 +589,8 @@
|
|
590
589
|
startEvent: function () {
|
591
590
|
if (settings.on == 'hover') {
|
592
591
|
return 'mouseenter';
|
593
|
-
}
|
592
|
+
}
|
593
|
+
if (settings.on == 'focus') {
|
594
594
|
return 'focus';
|
595
595
|
}
|
596
596
|
|
@@ -602,7 +602,8 @@
|
|
602
602
|
endEvent: function () {
|
603
603
|
if (settings.on == 'hover') {
|
604
604
|
return 'mouseleave';
|
605
|
-
}
|
605
|
+
}
|
606
|
+
if (settings.on == 'focus') {
|
606
607
|
return 'blur';
|
607
608
|
}
|
608
609
|
|
@@ -622,10 +623,10 @@
|
|
622
623
|
|
623
624
|
if (offset) {
|
624
625
|
distanceFromBoundary = {
|
625
|
-
top:
|
626
|
-
left:
|
627
|
-
right:
|
628
|
-
bottom:
|
626
|
+
top: offset.top - boundary.top,
|
627
|
+
left: offset.left - boundary.left,
|
628
|
+
right: boundary.right - (offset.left + popup.width),
|
629
|
+
bottom: boundary.bottom - (offset.top + popup.height),
|
629
630
|
};
|
630
631
|
module.verbose('Distance from boundaries determined', offset, distanceFromBoundary);
|
631
632
|
}
|
@@ -634,7 +635,7 @@
|
|
634
635
|
},
|
635
636
|
offsetParent: function ($element) {
|
636
637
|
var
|
637
|
-
element =
|
638
|
+
element = $element !== undefined
|
638
639
|
? $element[0]
|
639
640
|
: $target[0],
|
640
641
|
parentNode = element.parentNode,
|
@@ -642,20 +643,20 @@
|
|
642
643
|
;
|
643
644
|
if (parentNode) {
|
644
645
|
var
|
645
|
-
is2D =
|
646
|
-
isStatic =
|
646
|
+
is2D = $node.css('transform') === 'none',
|
647
|
+
isStatic = $node.css('position') === 'static',
|
647
648
|
isBody = $node.is('body')
|
648
649
|
;
|
649
650
|
while (parentNode && !isBody && isStatic && is2D) {
|
650
651
|
parentNode = parentNode.parentNode;
|
651
652
|
$node = $(parentNode);
|
652
|
-
is2D =
|
653
|
-
isStatic =
|
653
|
+
is2D = $node.css('transform') === 'none';
|
654
|
+
isStatic = $node.css('position') === 'static';
|
654
655
|
isBody = $node.is('body');
|
655
656
|
}
|
656
657
|
}
|
657
658
|
|
658
|
-
return
|
659
|
+
return $node && $node.length > 0
|
659
660
|
? $node
|
660
661
|
: $();
|
661
662
|
},
|
@@ -697,7 +698,7 @@
|
|
697
698
|
'bottom left': 'left center',
|
698
699
|
'left center': 'top left',
|
699
700
|
},
|
700
|
-
adjacentsAvailable =
|
701
|
+
adjacentsAvailable = verticalPosition == 'top' || verticalPosition == 'bottom',
|
701
702
|
oppositeTried = false,
|
702
703
|
adjacentTried = false,
|
703
704
|
nextPosition = false
|
@@ -713,13 +714,13 @@
|
|
713
714
|
if (settings.prefer === 'opposite') {
|
714
715
|
nextPosition = [opposite[verticalPosition], horizontalPosition];
|
715
716
|
nextPosition = nextPosition.join(' ');
|
716
|
-
oppositeTried =
|
717
|
+
oppositeTried = triedPositions[nextPosition] === true;
|
717
718
|
module.debug('Trying opposite strategy', nextPosition);
|
718
719
|
}
|
719
720
|
if ((settings.prefer === 'adjacent') && adjacentsAvailable) {
|
720
721
|
nextPosition = [verticalPosition, adjacent[horizontalPosition]];
|
721
722
|
nextPosition = nextPosition.join(' ');
|
722
|
-
adjacentTried =
|
723
|
+
adjacentTried = triedPositions[nextPosition] === true;
|
723
724
|
module.debug('Trying adjacent strategy', nextPosition);
|
724
725
|
}
|
725
726
|
if (adjacentTried || oppositeTried) {
|
@@ -764,11 +765,11 @@
|
|
764
765
|
if (module.should.centerArrow(calculations)) {
|
765
766
|
module.verbose('Adjusting offset to center arrow on small target element');
|
766
767
|
if (position == 'top left' || position == 'bottom left') {
|
767
|
-
offset +=
|
768
|
+
offset += target.width / 2;
|
768
769
|
offset -= settings.arrowPixelsFromEdge;
|
769
770
|
}
|
770
771
|
if (position == 'top right' || position == 'bottom right') {
|
771
|
-
offset -=
|
772
|
+
offset -= target.width / 2;
|
772
773
|
offset += settings.arrowPixelsFromEdge;
|
773
774
|
}
|
774
775
|
}
|
@@ -797,7 +798,7 @@
|
|
797
798
|
|
798
799
|
if (module.is.rtl()) {
|
799
800
|
position = position.replace(/left|right/g, function (match) {
|
800
|
-
return
|
801
|
+
return match == 'left'
|
801
802
|
? 'right'
|
802
803
|
: 'left';
|
803
804
|
});
|
@@ -909,22 +910,21 @@
|
|
909
910
|
position = module.get.nextPosition(position);
|
910
911
|
module.debug('Trying new position', position);
|
911
912
|
|
912
|
-
return
|
913
|
+
return $popup
|
913
914
|
? module.set.position(position, calculations)
|
914
915
|
: false;
|
916
|
+
}
|
917
|
+
if (settings.lastResort) {
|
918
|
+
module.debug('No position found, showing with last position');
|
915
919
|
} else {
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
settings.onUnplaceable.call($popup, element);
|
925
|
-
|
926
|
-
return false;
|
927
|
-
}
|
920
|
+
module.debug('Popup could not find a position to display', $popup);
|
921
|
+
module.error(error.cannotPlace, element);
|
922
|
+
module.remove.attempts();
|
923
|
+
module.remove.loading();
|
924
|
+
module.reset();
|
925
|
+
settings.onUnplaceable.call($popup, element);
|
926
|
+
|
927
|
+
return false;
|
928
928
|
}
|
929
929
|
}
|
930
930
|
module.debug('Position is on stage', position);
|
@@ -1067,7 +1067,7 @@
|
|
1067
1067
|
|
1068
1068
|
has: {
|
1069
1069
|
popup: function () {
|
1070
|
-
return
|
1070
|
+
return $popup && $popup.length > 0;
|
1071
1071
|
},
|
1072
1072
|
},
|
1073
1073
|
|
@@ -1109,13 +1109,13 @@
|
|
1109
1109
|
return $module.hasClass(className.active);
|
1110
1110
|
},
|
1111
1111
|
animating: function () {
|
1112
|
-
return
|
1112
|
+
return $popup !== undefined && $popup.hasClass(className.animating);
|
1113
1113
|
},
|
1114
1114
|
fluid: function () {
|
1115
|
-
return
|
1115
|
+
return $popup !== undefined && $popup.hasClass(className.fluid);
|
1116
1116
|
},
|
1117
1117
|
visible: function () {
|
1118
|
-
return
|
1118
|
+
return $popup !== undefined && $popup.hasClass(className.popupVisible);
|
1119
1119
|
},
|
1120
1120
|
dropdown: function () {
|
1121
1121
|
return $module.hasClass(className.dropdown);
|
@@ -1193,7 +1193,7 @@
|
|
1193
1193
|
previousTime
|
1194
1194
|
;
|
1195
1195
|
if (settings.performance) {
|
1196
|
-
currentTime =
|
1196
|
+
currentTime = Date.now();
|
1197
1197
|
previousTime = time || currentTime;
|
1198
1198
|
executionTime = currentTime - previousTime;
|
1199
1199
|
time = currentTime;
|
@@ -1244,11 +1244,11 @@
|
|
1244
1244
|
;
|
1245
1245
|
passedArguments = passedArguments || queryArguments;
|
1246
1246
|
context = context || element;
|
1247
|
-
if (typeof query
|
1248
|
-
query = query.split(/[
|
1247
|
+
if (typeof query === 'string' && object !== undefined) {
|
1248
|
+
query = query.split(/[ .]/);
|
1249
1249
|
maxDepth = query.length - 1;
|
1250
1250
|
$.each(query, function (depth, value) {
|
1251
|
-
var camelCaseValue =
|
1251
|
+
var camelCaseValue = depth != maxDepth
|
1252
1252
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1253
1253
|
: query
|
1254
1254
|
;
|
@@ -1299,7 +1299,7 @@
|
|
1299
1299
|
}
|
1300
1300
|
});
|
1301
1301
|
|
1302
|
-
return
|
1302
|
+
return returnedValue !== undefined
|
1303
1303
|
? returnedValue
|
1304
1304
|
: this;
|
1305
1305
|
};
|
@@ -1471,8 +1471,8 @@
|
|
1471
1471
|
templates: {
|
1472
1472
|
escape: function (string) {
|
1473
1473
|
var
|
1474
|
-
badChars = /[
|
1475
|
-
shouldEscape = /[
|
1474
|
+
badChars = /["'<>`]/g,
|
1475
|
+
shouldEscape = /["&'<>`]/,
|
1476
1476
|
escape = {
|
1477
1477
|
'<': '<',
|
1478
1478
|
'>': '>',
|
@@ -1485,7 +1485,7 @@
|
|
1485
1485
|
}
|
1486
1486
|
;
|
1487
1487
|
if (shouldEscape.test(string)) {
|
1488
|
-
string = string.replace(/&(?![a-
|
1488
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1489
1489
|
|
1490
1490
|
return string.replace(badChars, escapedChar);
|
1491
1491
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.24+029436f
|
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(V,W,M,z){"use strict";function G(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=void 0!==W&&W.Math==Math?W:globalThis,V.fn.popup=function(x){var E,t=V(this),k=V(M),S=V(W),O=V("body"),A=t.selector||"",D="ontouchstart"in M.documentElement?"touchstart":"click",j=(new Date).getTime(),F=[],R=x,H="string"==typeof R,N=[].slice.call(arguments,1);return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(x)?V.extend(!0,{},V.fn.popup.settings,x):V.extend({},V.fn.popup.settings),n=u.selector,c=u.className,d=u.error,f=u.metadata,i=u.namespace,r="."+u.namespace,a="module-"+i,h=V(this),l=[W,M].indexOf(u.context)<0?k.find(u.context):V(u.context),g=[W,M].indexOf(u.scrollContext)<0?k.find(u.scrollContext):V(u.scrollContext),m=[W,M].indexOf(u.boundary)<0?k.find(u.boundary):V(u.boundary),v=u.target?[W,M].indexOf(u.target)<0?k.find(u.target):V(u.target):h,b=0,w=!1,y=!1,P=this,C=h.data(a),T={initialize:function(){T.debug("Initializing",h),T.createID(),T.bind.events(),!T.exists()&&u.preserve&&T.create(),u.observeChanges&&T.observeChanges(),T.instantiate()},instantiate:function(){T.verbose("Storing instance",T),C=T,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(T.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=v.nextAll(n.popup).eq(0),u.popup=p),u.popup?(p.addClass(c.loading),s=T.get.offsetParent(),p.removeClass(c.loading),u.movePopup&&T.has.popup()&&T.get.offsetParent(p)[0]!==s[0]&&(T.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?T.get.offsetParent(v):T.has.popup()?T.get.offsetParent(p):O,s.is("html")&&s[0]!==O[0]&&(T.debug("Setting page as offset parent"),s=O),T.get.variation()&&T.set.variation()},reposition:function(){T.refresh(),T.set.position()},destroy:function(){T.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&T.removePopup(),clearTimeout(T.hideTimer),clearTimeout(T.showTimer),T.unbind.close(),T.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(T.hideTimer),y&&!u.addTouchEvents||(T.showTimer=setTimeout(T.show,e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(T.showTimer),T.hideTimer=setTimeout(T.hide,t)},touchstart:function(t){y=!0,u.addTouchEvents&&T.show()},resize:function(){T.is.visible()&&T.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==P||0<V(t).find(P).length)&&(T.debug("Element removed from DOM, tearing down events"),T.destroy())})})},hideGracefully:function(t){var e=V(t.target),o=V.contains(M.documentElement,t.target),e=0<e.closest(n.popup).length;t&&!e&&o?(T.debug("Click occurred outside popup hiding popup"),T.hide()):T.debug("Click was inside popup, keeping popup open")}},create:function(){var t=T.get.html(),e=T.get.title(),o=T.get.content();t||o||e?(T.debug("Creating pop-up html"),t=t||u.templates.popup({title:e,content:o}),p=V("<div/>").addClass(c.popup).data(f.activator,h).html(t),u.inline?(T.verbose("Inserting popup element inline",p),p.insertAfter(h)):(T.verbose("Appending popup element to body",p),p.appendTo(l)),T.refresh(),T.set.variation(),u.hoverable&&T.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),T.verbose("Used popup specified in settings"),T.refresh(),u.hoverable&&T.bind.popup()):0!==v.next(n.popup).length?(T.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(n.popup).data(f.activator,h),T.refresh(),u.hoverable&&T.bind.popup()):T.debug("No content specified skipping display",P)},createID:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),e="."+o,T.verbose("Creating unique id for element",o)},toggle:function(){T.debug("Toggling pop-up"),T.is.hidden()?(T.debug("Popup is hidden, showing pop-up"),T.unbind.close(),T.show()):(T.debug("Popup is visible, hiding pop-up"),T.hide())},show:function(t){t=t||function(){},T.debug("Showing pop-up",u.transition),!T.is.hidden()||T.is.active()&&T.is.dropdown()||(T.exists()||T.create(),!1===u.onShow.call(p,P)?T.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||T.refresh(),p&&T.set.position()&&(T.save.conditions(),u.exclusive&&T.hideAll(),T.animate.show(t))))},hide:function(t){t=t||function(){},(T.is.visible()||T.is.animating())&&(!1===u.onHide.call(p,P)?T.debug("onHide callback returned false, cancelling popup animation"):(T.remove.visible(),T.unbind.close(),T.restore.conditions(),T.animate.hide(t)))},hideAll:function(){k.find(n.popup).filter("."+c.popupVisible).each(function(){V(this).data(f.activator).popup("hide")})},exists:function(){return!!p&&(u.inline||u.popup?T.has.popup():1<=p.closest(l).length)},removePopup:function(){T.has.popup()&&!u.popup&&(T.debug("Removing popup",p),p.remove(),p=z,u.onRemove.call(p,P))},save:{conditions:function(){T.cache={title:h.attr("title")},T.cache.title&&h.removeAttr("title"),T.verbose("Saving original attributes",T.cache.title)}},restore:{conditions:function(){return T.cache&&T.cache.title&&(h.attr("title",T.cache.title),T.verbose("Restoring original attributes",T.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=G(t)?t:function(){},u.transition&&V.fn.transition!==z&&h.transition("is supported")?(T.set.visible(),p.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){T.bind.close(),t.call(p,P),u.onVisible.call(p,P)}})):T.error(d.noTransition)},hide:function(t){t=G(t)?t:function(){},T.debug("Hiding pop-up"),u.transition&&V.fn.transition!==z&&h.transition("is supported")?p.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){T.reset(),t.call(p,P),u.onHidden.call(p,P)}}):T.error(d.noTransition)}},change:{content:function(t){p.html(t)}},get:{html:function(){return h.removeData(f.html),h.data(f.html)||u.html},title:function(){return h.removeData(f.title),h.data(f.title)||u.title},content:function(){return h.removeData(f.content),h.data(f.content)||u.content||h.attr("title")},variation:function(){return h.removeData(f.variation),h.data(f.variation)||u.variation},popup:function(){return p},popupOffset:function(){return p.offset()},calculations:function(){var t=T.get.offsetParent(p),e=v[0],o=m[0]==W,n=v.offset(),i=u.inline||u.popup&&u.movePopup?v.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:m.offset(),a={},o=o?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0},a={target:{element:v[0],width:v.outerWidth(),height:v.outerHeight(),top:n.top-i.top,left:n.left-i.left,margin:{}},popup:{width:p.outerWidth(),height:p.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:o.top,left:o.left},width:m.width(),height:m.height()}};return t[0]!==s[0]&&(n=t.offset(),a.target.top-=n.top,a.target.left-=n.left,a.parent.width=t.outerWidth(),a.parent.height=t.outerHeight()),u.setFluidWidth&&T.is.fluid()&&(a.container={width:p.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=u.inline?parseInt(W.getComputedStyle(e).getPropertyValue("margin-top"),10):0,a.target.margin.left=u.inline?T.is.rtl()?parseInt(W.getComputedStyle(e).getPropertyValue("margin-right"),10):parseInt(W.getComputedStyle(e).getPropertyValue("margin-left"),10):0,i=a.screen,a.boundary={top:i.top+i.scroll.top,bottom:i.top+i.scroll.top+i.height,left:i.left+i.scroll.left,right:i.left+i.scroll.left+i.width},a},id:function(){return o},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(t,e){var o={},n=(e=e||T.get.calculations()).popup,e=e.boundary;return t&&(o={top:t.top-e.top,left:t.left-e.left,right:e.right-(t.left+n.width),bottom:e.bottom-(t.top+n.height)},T.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){var e=(t!==z?t:v)[0].parentNode,o=V(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=V(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],e=e[1],n="top"==o||"bottom"==o,i=!1,r=!1,a=!1;return w||(T.verbose("All available positions available"),w=T.get.positions()),T.debug("Recording last position tried",t),w[t]=!0,"opposite"===u.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],e]).join(" "),i=!0===w[a],T.debug("Trying opposite strategy",a)),"adjacent"===u.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===w[a],T.debug("Trying adjacent strategy",a)),(r||i)&&(T.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[t]),a}},set:{position:function(t,e){if(0!==v.length&&0!==p.length){var o,n,i,r,a,s,l;if(e=e||T.get.calculations(),t=t||h.data(f.position)||u.position,o=h.data(f.offset)||u.offset,n=u.distanceAway,i=e.target,r=e.popup,a=e.parent,T.should.centerArrow(e)&&(T.verbose("Adjusting offset to center arrow on small target element"),"top left"!=t&&"bottom left"!=t||(o=(o+=i.width/2)-u.arrowPixelsFromEdge),"top right"!=t&&"bottom right"!=t||(o=(o-=i.width/2)+u.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!T.is.svg(i.element))return T.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(T.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),T.debug("Determining popup position from calculations",t,e),T.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),T.debug("RTL: Popup position updated",t)),t=b==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===z&&T.error(d.invalidPosition,t),T.debug("Calculated popup positioning values",s),p.css(s).removeClass(c.position).addClass(t).addClass(c.loading),l=T.get.popupOffset(),l=T.get.distanceFromBoundary(l,e),!u.forcePosition&&T.is.offstage(l,t)){if(T.debug("Position is outside viewport",t),b<u.maxSearchDepth)return b++,t=T.get.nextPosition(t),T.debug("Trying new position",t),!!p&&T.set.position(t,e);if(!u.lastResort)return T.debug("Popup could not find a position to display",p),T.error(d.cannotPlace,P),T.remove.attempts(),T.remove.loading(),T.reset(),u.onUnplaceable.call(p,P),!1;T.debug("No position found, showing with last position")}return T.debug("Position is on stage",t),T.remove.attempts(),T.remove.loading(),u.setFluidWidth&&T.is.fluid()&&T.set.fluidWidth(e),!0}T.error(d.notFound)},fluidWidth:function(t){t=t||T.get.calculations(),T.debug("Automatically setting element width to parent width",t.parent.width),p.css("width",t.container.width)},variation:function(t){(t=t||T.get.variation())&&T.has.popup()&&(T.verbose("Adding variation to popup",t),p.addClass(t))},visible:function(){h.addClass(c.visible)}},remove:{loading:function(){p.removeClass(c.loading)},variation:function(t){(t=t||T.get.variation())&&(T.verbose("Removing variation",t),p.removeClass(t))},visible:function(){h.removeClass(c.visible)},attempts:function(){T.verbose("Resetting all searched positions"),b=0,w=!1}},bind:{events:function(){T.debug("Binding popup events to module"),"click"==u.on&&h.on(D+r,T.toggle),"hover"==u.on&&h.on("touchstart"+r,T.event.touchstart),T.get.startEvent()&&h.on(T.get.startEvent()+r,T.event.start).on(T.get.endEvent()+r,T.event.end),u.target&&T.debug("Target set to element",v),S.on("resize"+e,T.event.resize)},popup:function(){T.verbose("Allowing hover events on popup to prevent closing"),p&&T.has.popup()&&p.on("mouseenter"+r,T.event.start).on("mouseleave"+r,T.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&T.bind.closeOnScroll(),T.is.closable()?T.bind.clickaway():"hover"==u.on&&y&&T.bind.touchClose()},closeOnScroll:function(){T.verbose("Binding scroll close event to document"),g.one(T.get.scrollEvent()+e,T.event.hideGracefully)},touchClose:function(){T.verbose("Binding popup touchclose event to document"),k.on("touchstart"+e,function(t){T.verbose("Touched away from popup"),T.event.hideGracefully.call(P,t)})},clickaway:function(){T.verbose("Binding popup close event to document"),k.on(D+e,function(t){T.verbose("Clicked away from popup"),T.event.hideGracefully.call(P,t)})}},unbind:{events:function(){S.off(e),h.off(r)},close:function(){k.off(e),g.off(e)}},has:{popup:function(){return p&&0<p.length}},should:{centerArrow:function(t){return!T.is.basic()&&t.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(t,o){var n=[];return V.each(t,function(t,e){e<-u.jitter&&(T.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return T.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return h.hasClass(c.basic)},active:function(){return h.hasClass(c.active)},animating:function(){return p!==z&&p.hasClass(c.animating)},fluid:function(){return p!==z&&p.hasClass(c.fluid)},visible:function(){return p!==z&&p.hasClass(c.popupVisible)},dropdown:function(){return h.hasClass(c.dropdown)},hidden:function(){return!T.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===O.attr("dir")||"rtl"===O.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){T.remove.visible(),u.preserve?V.fn.transition!==z&&p.transition("remove transition"):T.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,u,t);else{if(e===z)return u[t];u[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,T,t);else{if(e===z)return T[t];T[t]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,u.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),T.verbose.apply(console,arguments)))},error:function(){u.silent||(T.error=Function.prototype.bind.call(console.error,console,u.name+":"),T.error.apply(console,arguments))},performance:{log:function(t){var e,o;u.performance&&(o=(e=(new Date).getTime())-(j||e),j=e,F.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:P,"Execution Time":o})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var t=u.name+":",o=0;j=!1,clearTimeout(T.performance.timer),V.each(F,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",A&&(t+=" '"+A+"'"),(console.group!==z||console.table!==z)&&0<F.length&&(console.groupCollapsed(t),console.table?console.table(F):V.each(F,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),F=[]}},invoke:function(n,t,e){var i,r,o,a=C;return t=t||N,e=e||P,"string"==typeof n&&a!==z&&(n=n.split(/[\. ]/),i=n.length-1,V.each(n,function(t,e){var o=t!=i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(V.isPlainObject(a[o])&&t!=i)a=a[o];else{if(a[o]!==z)return r=a[o],!1;{if(!V.isPlainObject(a[e])||t==i)return a[e]!==z&&(r=a[e]),!1;a=a[e]}}})),G(r)?o=r.apply(e,t):r!==z&&(o=r),Array.isArray(E)?E.push(o):E!==z?E=[E,o]:o!==z&&(E=o),r}};H?(C===z&&T.initialize(),T.invoke(R)):(C!==z&&C.invoke("destroy"),T.initialize())}),E!==z?E:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:W,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:W,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(t)?(t=t.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=V.fn.popup.settings.templates.escape;return t!==z&&(t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
|
11
|
+
!function(V,W,M,z){"use strict";function G(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=W!==z&&W.Math===Math?W:globalThis,V.fn.popup=function(T){var E,t=V(this),k=V(M),S=V(W),O=V("body"),A=t.selector||"",D="ontouchstart"in M.documentElement?"touchstart":"click",j=Date.now(),F=[],R=T,H="string"==typeof R,N=[].slice.call(arguments,1);return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),n=u.selector,c=u.className,d=u.error,f=u.metadata,i=u.namespace,r="."+u.namespace,a="module-"+i,h=V(this),l=[W,M].indexOf(u.context)<0?k.find(u.context):V(u.context),g=[W,M].indexOf(u.scrollContext)<0?k.find(u.scrollContext):V(u.scrollContext),m=[W,M].indexOf(u.boundary)<0?k.find(u.boundary):V(u.boundary),b=u.target?[W,M].indexOf(u.target)<0?k.find(u.target):V(u.target):h,v=0,w=!1,y=!1,P=this,C=h.data(a),x={initialize:function(){x.debug("Initializing",h),x.createID(),x.bind.events(),!x.exists()&&u.preserve&&x.create(),u.observeChanges&&x.observeChanges(),x.instantiate()},instantiate:function(){x.verbose("Storing instance",x),C=x,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(x.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),x.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=b.nextAll(n.popup).eq(0),u.popup=p),u.popup?(p.addClass(c.loading),s=x.get.offsetParent(),p.removeClass(c.loading),u.movePopup&&x.has.popup()&&x.get.offsetParent(p)[0]!==s[0]&&(x.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?x.get.offsetParent(b):x.has.popup()?x.get.offsetParent(p):O,s.is("html")&&s[0]!==O[0]&&(x.debug("Setting page as offset parent"),s=O),x.get.variation()&&x.set.variation()},reposition:function(){x.refresh(),x.set.position()},destroy:function(){x.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&x.removePopup(),clearTimeout(x.hideTimer),clearTimeout(x.showTimer),x.unbind.close(),x.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(x.hideTimer),y&&!u.addTouchEvents||(x.showTimer=setTimeout(x.show,e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(x.showTimer),x.hideTimer=setTimeout(x.hide,t)},touchstart:function(t){y=!0,u.addTouchEvents&&x.show()},resize:function(){x.is.visible()&&x.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==P||0<V(t).find(P).length)&&(x.debug("Element removed from DOM, tearing down events"),x.destroy())})})},hideGracefully:function(t){var e=V(t.target),o=V.contains(M.documentElement,t.target),e=0<e.closest(n.popup).length;t&&!e&&o?(x.debug("Click occurred outside popup hiding popup"),x.hide()):x.debug("Click was inside popup, keeping popup open")}},create:function(){var t=x.get.html(),e=x.get.title(),o=x.get.content();t||o||e?(x.debug("Creating pop-up html"),t=t||u.templates.popup({title:e,content:o}),p=V("<div/>").addClass(c.popup).data(f.activator,h).html(t),u.inline?(x.verbose("Inserting popup element inline",p),p.insertAfter(h)):(x.verbose("Appending popup element to body",p),p.appendTo(l)),x.refresh(),x.set.variation(),u.hoverable&&x.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),x.verbose("Used popup specified in settings"),x.refresh(),u.hoverable&&x.bind.popup()):0<b.next(n.popup).length?(x.verbose("Pre-existing popup found"),u.inline=!0,u.popup=b.next(n.popup).data(f.activator,h),x.refresh(),u.hoverable&&x.bind.popup()):x.debug("No content specified skipping display",P)},createID:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),e="."+o,x.verbose("Creating unique id for element",o)},toggle:function(){x.debug("Toggling pop-up"),x.is.hidden()?(x.debug("Popup is hidden, showing pop-up"),x.unbind.close(),x.show()):(x.debug("Popup is visible, hiding pop-up"),x.hide())},show:function(t){t=t||function(){},x.debug("Showing pop-up",u.transition),!x.is.hidden()||x.is.active()&&x.is.dropdown()||(x.exists()||x.create(),!1===u.onShow.call(p,P)?x.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||x.refresh(),p&&x.set.position()&&(x.save.conditions(),u.exclusive&&x.hideAll(),x.animate.show(t))))},hide:function(t){t=t||function(){},(x.is.visible()||x.is.animating())&&(!1===u.onHide.call(p,P)?x.debug("onHide callback returned false, cancelling popup animation"):(x.remove.visible(),x.unbind.close(),x.restore.conditions(),x.animate.hide(t)))},hideAll:function(){k.find(n.popup).filter("."+c.popupVisible).each(function(){V(this).data(f.activator).popup("hide")})},exists:function(){return!!p&&(u.inline||u.popup?x.has.popup():0<p.closest(l).length)},removePopup:function(){x.has.popup()&&!u.popup&&(x.debug("Removing popup",p),p.remove(),p=z,u.onRemove.call(p,P))},save:{conditions:function(){x.cache={title:h.attr("title")},x.cache.title&&h.removeAttr("title"),x.verbose("Saving original attributes",x.cache.title)}},restore:{conditions:function(){return x.cache&&x.cache.title&&(h.attr("title",x.cache.title),x.verbose("Restoring original attributes",x.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=G(t)?t:function(){},u.transition&&V.fn.transition!==z&&h.transition("is supported")?(x.set.visible(),p.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){x.bind.close(),t.call(p,P),u.onVisible.call(p,P)}})):x.error(d.noTransition)},hide:function(t){t=G(t)?t:function(){},x.debug("Hiding pop-up"),u.transition&&V.fn.transition!==z&&h.transition("is supported")?p.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){x.reset(),t.call(p,P),u.onHidden.call(p,P)}}):x.error(d.noTransition)}},change:{content:function(t){p.html(t)}},get:{html:function(){return h.removeData(f.html),h.data(f.html)||u.html},title:function(){return h.removeData(f.title),h.data(f.title)||u.title},content:function(){return h.removeData(f.content),h.data(f.content)||u.content||h.attr("title")},variation:function(){return h.removeData(f.variation),h.data(f.variation)||u.variation},popup:function(){return p},popupOffset:function(){return p.offset()},calculations:function(){var t=x.get.offsetParent(p),e=b[0],o=m[0]==W,n=b.offset(),i=u.inline||u.popup&&u.movePopup?b.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:m.offset(),a={},o=o?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0},a={target:{element:b[0],width:b.outerWidth(),height:b.outerHeight(),top:n.top-i.top,left:n.left-i.left,margin:{}},popup:{width:p.outerWidth(),height:p.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:o.top,left:o.left},width:m.width(),height:m.height()}};return t[0]!==s[0]&&(n=t.offset(),a.target.top-=n.top,a.target.left-=n.left,a.parent.width=t.outerWidth(),a.parent.height=t.outerHeight()),u.setFluidWidth&&x.is.fluid()&&(a.container={width:p.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=u.inline?parseInt(W.getComputedStyle(e).getPropertyValue("margin-top"),10):0,a.target.margin.left=u.inline?x.is.rtl()?parseInt(W.getComputedStyle(e).getPropertyValue("margin-right"),10):parseInt(W.getComputedStyle(e).getPropertyValue("margin-left"),10):0,i=a.screen,a.boundary={top:i.top+i.scroll.top,bottom:i.top+i.scroll.top+i.height,left:i.left+i.scroll.left,right:i.left+i.scroll.left+i.width},a},id:function(){return o},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(t,e){var o={},n=(e=e||x.get.calculations()).popup,e=e.boundary;return t&&(o={top:t.top-e.top,left:t.left-e.left,right:e.right-(t.left+n.width),bottom:e.bottom-(t.top+n.height)},x.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){var e=(t!==z?t:b)[0].parentNode,o=V(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=V(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],e=e[1],n="top"==o||"bottom"==o,i=!1,r=!1,a=!1;return w||(x.verbose("All available positions available"),w=x.get.positions()),x.debug("Recording last position tried",t),w[t]=!0,"opposite"===u.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],e]).join(" "),i=!0===w[a],x.debug("Trying opposite strategy",a)),"adjacent"===u.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===w[a],x.debug("Trying adjacent strategy",a)),(r||i)&&(x.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[t]),a}},set:{position:function(t,e){if(0!==b.length&&0!==p.length){var o,n,i,r,a,s,l;if(e=e||x.get.calculations(),t=t||h.data(f.position)||u.position,o=h.data(f.offset)||u.offset,n=u.distanceAway,i=e.target,r=e.popup,a=e.parent,x.should.centerArrow(e)&&(x.verbose("Adjusting offset to center arrow on small target element"),"top left"!=t&&"bottom left"!=t||(o=(o+=i.width/2)-u.arrowPixelsFromEdge),"top right"!=t&&"bottom right"!=t||(o=(o-=i.width/2)+u.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!x.is.svg(i.element))return x.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(x.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),x.debug("Determining popup position from calculations",t,e),x.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),x.debug("RTL: Popup position updated",t)),t=v==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===z&&x.error(d.invalidPosition,t),x.debug("Calculated popup positioning values",s),p.css(s).removeClass(c.position).addClass(t).addClass(c.loading),l=x.get.popupOffset(),l=x.get.distanceFromBoundary(l,e),!u.forcePosition&&x.is.offstage(l,t)){if(x.debug("Position is outside viewport",t),v<u.maxSearchDepth)return v++,t=x.get.nextPosition(t),x.debug("Trying new position",t),!!p&&x.set.position(t,e);if(!u.lastResort)return x.debug("Popup could not find a position to display",p),x.error(d.cannotPlace,P),x.remove.attempts(),x.remove.loading(),x.reset(),u.onUnplaceable.call(p,P),!1;x.debug("No position found, showing with last position")}return x.debug("Position is on stage",t),x.remove.attempts(),x.remove.loading(),u.setFluidWidth&&x.is.fluid()&&x.set.fluidWidth(e),!0}x.error(d.notFound)},fluidWidth:function(t){t=t||x.get.calculations(),x.debug("Automatically setting element width to parent width",t.parent.width),p.css("width",t.container.width)},variation:function(t){(t=t||x.get.variation())&&x.has.popup()&&(x.verbose("Adding variation to popup",t),p.addClass(t))},visible:function(){h.addClass(c.visible)}},remove:{loading:function(){p.removeClass(c.loading)},variation:function(t){(t=t||x.get.variation())&&(x.verbose("Removing variation",t),p.removeClass(t))},visible:function(){h.removeClass(c.visible)},attempts:function(){x.verbose("Resetting all searched positions"),v=0,w=!1}},bind:{events:function(){x.debug("Binding popup events to module"),"click"==u.on&&h.on(D+r,x.toggle),"hover"==u.on&&h.on("touchstart"+r,x.event.touchstart),x.get.startEvent()&&h.on(x.get.startEvent()+r,x.event.start).on(x.get.endEvent()+r,x.event.end),u.target&&x.debug("Target set to element",b),S.on("resize"+e,x.event.resize)},popup:function(){x.verbose("Allowing hover events on popup to prevent closing"),p&&x.has.popup()&&p.on("mouseenter"+r,x.event.start).on("mouseleave"+r,x.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&x.bind.closeOnScroll(),x.is.closable()?x.bind.clickaway():"hover"==u.on&&y&&x.bind.touchClose()},closeOnScroll:function(){x.verbose("Binding scroll close event to document"),g.one(x.get.scrollEvent()+e,x.event.hideGracefully)},touchClose:function(){x.verbose("Binding popup touchclose event to document"),k.on("touchstart"+e,function(t){x.verbose("Touched away from popup"),x.event.hideGracefully.call(P,t)})},clickaway:function(){x.verbose("Binding popup close event to document"),k.on(D+e,function(t){x.verbose("Clicked away from popup"),x.event.hideGracefully.call(P,t)})}},unbind:{events:function(){S.off(e),h.off(r)},close:function(){k.off(e),g.off(e)}},has:{popup:function(){return p&&0<p.length}},should:{centerArrow:function(t){return!x.is.basic()&&t.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(t,o){var n=[];return V.each(t,function(t,e){e<-u.jitter&&(x.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return x.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return h.hasClass(c.basic)},active:function(){return h.hasClass(c.active)},animating:function(){return p!==z&&p.hasClass(c.animating)},fluid:function(){return p!==z&&p.hasClass(c.fluid)},visible:function(){return p!==z&&p.hasClass(c.popupVisible)},dropdown:function(){return h.hasClass(c.dropdown)},hidden:function(){return!x.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===O.attr("dir")||"rtl"===O.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){x.remove.visible(),u.preserve?V.fn.transition!==z&&p.transition("remove transition"):x.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,u,t);else{if(e===z)return u[t];u[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,x,t);else{if(e===z)return x[t];x[t]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,u.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),x.verbose.apply(console,arguments)))},error:function(){u.silent||(x.error=Function.prototype.bind.call(console.error,console,u.name+":"),x.error.apply(console,arguments))},performance:{log:function(t){var e,o;u.performance&&(o=(e=Date.now())-(j||e),j=e,F.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:P,"Execution Time":o})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var t=u.name+":",o=0;j=!1,clearTimeout(x.performance.timer),V.each(F,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",A&&(t+=" '"+A+"'"),(console.group!==z||console.table!==z)&&0<F.length&&(console.groupCollapsed(t),console.table?console.table(F):V.each(F,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),F=[]}},invoke:function(n,t,e){var i,r,o,a=C;return t=t||N,e=e||P,"string"==typeof n&&a!==z&&(n=n.split(/[ .]/),i=n.length-1,V.each(n,function(t,e){var o=t!=i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(V.isPlainObject(a[o])&&t!=i)a=a[o];else{if(a[o]!==z)return r=a[o],!1;{if(!V.isPlainObject(a[e])||t==i)return a[e]!==z&&(r=a[e]),!1;a=a[e]}}})),G(r)?o=r.apply(e,t):r!==z&&(o=r),Array.isArray(E)?E.push(o):E!==z?E=[E,o]:o!==z&&(E=o),r}};H?(C===z&&x.initialize(),x.invoke(R)):(C!==z&&C.invoke("destroy"),x.initialize())}),E!==z?E:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:W,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:W,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(t)?(t=t.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=V.fn.popup.settings.templates.escape;return t!==z&&(t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
|