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/site.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Site
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,20 +15,20 @@
|
|
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
|
|
22
|
-
$.
|
22
|
+
$.fn.site = function (parameters) {
|
23
23
|
var
|
24
|
-
time =
|
24
|
+
time = Date.now(),
|
25
25
|
performance = [],
|
26
26
|
|
27
27
|
query = arguments[0],
|
28
|
-
methodInvoked =
|
28
|
+
methodInvoked = typeof query === 'string',
|
29
29
|
queryArguments = [].slice.call(arguments, 1),
|
30
30
|
|
31
|
-
settings =
|
31
|
+
settings = $.isPlainObject(parameters)
|
32
32
|
? $.extend(true, {}, $.site.settings, parameters)
|
33
33
|
: $.extend({}, $.site.settings),
|
34
34
|
|
@@ -71,13 +71,13 @@
|
|
71
71
|
module.verbose('Console not available, normalizing events');
|
72
72
|
module.disable.console();
|
73
73
|
}
|
74
|
-
if (
|
74
|
+
if (console.group === undefined || console.groupEnd === undefined || console.groupCollapsed === undefined) {
|
75
75
|
module.verbose('Console group not available, normalizing events');
|
76
76
|
window.console.group = function () {};
|
77
77
|
window.console.groupEnd = function () {};
|
78
78
|
window.console.groupCollapsed = function () {};
|
79
79
|
}
|
80
|
-
if (
|
80
|
+
if (console.markTimeline === undefined) {
|
81
81
|
module.verbose('Mark timeline not available, normalizing events');
|
82
82
|
window.console.markTimeline = function () {};
|
83
83
|
}
|
@@ -102,7 +102,7 @@
|
|
102
102
|
},
|
103
103
|
|
104
104
|
moduleExists: function (name) {
|
105
|
-
return
|
105
|
+
return $.fn[name] !== undefined && $.fn[name].settings !== undefined;
|
106
106
|
},
|
107
107
|
|
108
108
|
enabled: {
|
@@ -139,17 +139,17 @@
|
|
139
139
|
|
140
140
|
change: {
|
141
141
|
setting: function (setting, value, modules, modifyExisting) {
|
142
|
-
modules =
|
143
|
-
? (modules === 'all'
|
142
|
+
modules = typeof modules === 'string'
|
143
|
+
? (modules === 'all'
|
144
144
|
? settings.modules
|
145
|
-
: [modules]
|
145
|
+
: [modules])
|
146
146
|
: modules || settings.modules;
|
147
|
-
modifyExisting =
|
147
|
+
modifyExisting = modifyExisting !== undefined
|
148
148
|
? modifyExisting
|
149
149
|
: true;
|
150
150
|
$.each(modules, function (index, name) {
|
151
151
|
var
|
152
|
-
namespace =
|
152
|
+
namespace = module.moduleExists(name)
|
153
153
|
? $.fn[name].settings.namespace || false
|
154
154
|
: true,
|
155
155
|
$existingModules
|
@@ -168,10 +168,10 @@
|
|
168
168
|
});
|
169
169
|
},
|
170
170
|
settings: function (newSettings, modules, modifyExisting) {
|
171
|
-
modules =
|
171
|
+
modules = typeof modules === 'string'
|
172
172
|
? [modules]
|
173
173
|
: modules || settings.modules;
|
174
|
-
modifyExisting =
|
174
|
+
modifyExisting = modifyExisting !== undefined
|
175
175
|
? modifyExisting
|
176
176
|
: true;
|
177
177
|
$.each(modules, function (index, name) {
|
@@ -309,7 +309,7 @@
|
|
309
309
|
previousTime
|
310
310
|
;
|
311
311
|
if (settings.performance) {
|
312
|
-
currentTime =
|
312
|
+
currentTime = Date.now();
|
313
313
|
previousTime = time || currentTime;
|
314
314
|
executionTime = currentTime - previousTime;
|
315
315
|
time = currentTime;
|
@@ -357,11 +357,11 @@
|
|
357
357
|
;
|
358
358
|
passedArguments = passedArguments || queryArguments;
|
359
359
|
context = context || element;
|
360
|
-
if (typeof query
|
361
|
-
query = query.split(/[
|
360
|
+
if (typeof query === 'string' && object !== undefined) {
|
361
|
+
query = query.split(/[ .]/);
|
362
362
|
maxDepth = query.length - 1;
|
363
363
|
$.each(query, function (depth, value) {
|
364
|
-
var camelCaseValue =
|
364
|
+
var camelCaseValue = depth != maxDepth
|
365
365
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
366
366
|
: query
|
367
367
|
;
|
@@ -413,10 +413,11 @@
|
|
413
413
|
module.initialize();
|
414
414
|
}
|
415
415
|
|
416
|
-
return
|
416
|
+
return returnedValue !== undefined
|
417
417
|
? returnedValue
|
418
418
|
: this;
|
419
419
|
};
|
420
|
+
$.site = $.fn.site;
|
420
421
|
|
421
422
|
$.site.settings = {
|
422
423
|
|
@@ -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(b,p,v,h){"use strict";p=p!==h&&p.Math
|
11
|
+
!function(b,p,v,h){"use strict";p=p!==h&&p.Math===Math?p:globalThis,b.fn.site=function(e){var c,i=Date.now(),t=[],n=e,o="string"==typeof n,l=[].slice.call(arguments,1),r=b.isPlainObject(e)?b.extend(!0,{},b.site.settings,e):b.extend({},b.site.settings),s=r.namespace,u=r.error,a="module-"+s,m=b(v),d=this,f=m.data(a),g={initialize:function(){g.instantiate()},instantiate:function(){g.verbose("Storing instance of site",g),f=g,m.data(a,g)},normalize:function(){g.fix.console(),g.fix.requestAnimationFrame()},fix:{console:function(){g.debug("Normalizing window.console"),console!==h&&console.log!==h||(g.verbose("Console not available, normalizing events"),g.disable.console()),console.group!==h&&console.groupEnd!==h&&console.groupCollapsed!==h||(g.verbose("Console group not available, normalizing events"),p.console.group=function(){},p.console.groupEnd=function(){},p.console.groupCollapsed=function(){}),console.markTimeline===h&&(g.verbose("Mark timeline not available, normalizing events"),p.console.markTimeline=function(){})},consoleClear:function(){g.debug("Disabling programmatic console clearing"),p.console.clear=function(){}},requestAnimationFrame:function(){g.debug("Normalizing requestAnimationFrame"),p.requestAnimationFrame===h&&(g.debug("RequestAnimationFrame not available, normalizing event"),p.requestAnimationFrame=p.requestAnimationFrame||p.mozRequestAnimationFrame||p.webkitRequestAnimationFrame||p.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return b.fn[e]!==h&&b.fn[e].settings!==h},enabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){g.moduleExists(n)&&o.push(n)}),o}},disabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){g.moduleExists(n)||o.push(n)}),o}},change:{setting:function(i,t,e,s){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,s=s===h||s,b.each(e,function(e,n){var o=!g.moduleExists(n)||(b.fn[n].settings.namespace||!1);g.moduleExists(n)&&(g.verbose("Changing default setting",i,t,n),b.fn[n].settings[i]=t,s&&o&&0<(o=b(":data(module-"+o+")")).length&&(g.verbose("Modifying existing settings",o),o[n]("setting",i,t)))})},settings:function(i,e,t){e="string"==typeof e?[e]:e||r.modules,t=t===h||t,b.each(e,function(e,n){var o;g.moduleExists(n)&&(g.verbose("Changing default setting",i,n),b.extend(!0,b.fn[n].settings,i),t&&s&&0<(o=b(":data(module-"+s+")")).length&&(g.verbose("Modifying existing settings",o),o[n]("setting",i)))})}},enable:{console:function(){g.console(!0)},debug:function(e,n){e=e||r.modules,g.debug("Enabling debug for modules",e),g.change.setting("debug",!0,e,n)},verbose:function(e,n){e=e||r.modules,g.debug("Enabling verbose debug for modules",e),g.change.setting("verbose",!0,e,n)}},disable:{console:function(){g.console(!1)},debug:function(e,n){e=e||r.modules,g.debug("Disabling debug for modules",e),g.change.setting("debug",!1,e,n)},verbose:function(e,n){e=e||r.modules,g.debug("Disabling verbose debug for modules",e),g.change.setting("verbose",!1,e,n)}},console:function(e){e?f.cache.console===h?g.error(u.console):(g.debug("Restoring console function"),p.console=f.cache.console):(g.debug("Disabling console function"),f.cache.console=p.console,p.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){g.verbose("Destroying previous site for",m),m.removeData(a)},cache:{},setting:function(e,n){if(b.isPlainObject(e))b.extend(!0,r,e);else{if(n===h)return r[e];r[e]=n}},internal:function(e,n){if(b.isPlainObject(e))b.extend(!0,g,e);else{if(n===h)return g[e];g[e]=n}},debug:function(){r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var n,o;r.performance&&(o=(n=Date.now())-(i||n),i=n,t.push({Element:d,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":o})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",o=0;i=!1,clearTimeout(g.performance.timer),b.each(t,function(e,n){o+=n["Execution Time"]}),e+=" "+o+"ms",(console.group!==h||console.table!==h)&&0<t.length&&(console.groupCollapsed(e),console.table?console.table(t):b.each(t,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),t=[]}},invoke:function(i,e,n){var t,s,o,r,a=f;return e=e||l,n=n||d,"string"==typeof i&&a!==h&&(i=i.split(/[ .]/),t=i.length-1,b.each(i,function(e,n){var o=e!=t?n+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(b.isPlainObject(a[o])&&e!=t)a=a[o];else{if(a[o]!==h)return s=a[o],!1;{if(!b.isPlainObject(a[n])||e==t)return a[n]!==h?s=a[n]:g.error(u.method,i),!1;a=a[n]}}})),"function"==typeof(r=s)&&"number"!=typeof r.nodeType?o=s.apply(n,e):s!==h&&(o=s),Array.isArray(c)?c.push(o):c!==h?c=[c,o]:o!==h&&(c=o),s}};return o?(f===h&&g.initialize(),g.invoke(n)):(f!==h&&g.destroy(),g.initialize()),c!==h?c:this},b.site=b.fn.site,b.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},b.extend(b.expr.pseudos,{data:b.expr.createPseudo(function(n){return function(e){return!!b.data(e,n)}})})}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Slider
|
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
|
|
@@ -27,11 +27,11 @@
|
|
27
27
|
|
28
28
|
moduleSelector = $allModules.selector || '',
|
29
29
|
|
30
|
-
time =
|
30
|
+
time = Date.now(),
|
31
31
|
performance = [],
|
32
32
|
|
33
33
|
query = arguments[0],
|
34
|
-
methodInvoked =
|
34
|
+
methodInvoked = typeof query === 'string',
|
35
35
|
queryArguments = [].slice.call(arguments, 1),
|
36
36
|
|
37
37
|
alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
|
@@ -51,7 +51,7 @@
|
|
51
51
|
|
52
52
|
$allModules.each(function () {
|
53
53
|
var
|
54
|
-
settings =
|
54
|
+
settings = $.isPlainObject(parameters)
|
55
55
|
? $.extend(true, {}, $.fn.slider.settings, parameters)
|
56
56
|
: $.extend({}, $.fn.slider.settings),
|
57
57
|
|
@@ -138,7 +138,7 @@
|
|
138
138
|
if ($module.attr('tabindex') === undefined) {
|
139
139
|
$module.attr('tabindex', 0);
|
140
140
|
}
|
141
|
-
if ($module.find('.inner').length
|
141
|
+
if ($module.find('.inner').length === 0) {
|
142
142
|
$module.append("<div class='inner'>"
|
143
143
|
+ "<div class='track'></div>"
|
144
144
|
+ "<div class='track-fill'></div>"
|
@@ -149,7 +149,7 @@
|
|
149
149
|
$thumb = $module.find('.thumb:not(.second)');
|
150
150
|
$currThumb = $thumb;
|
151
151
|
if (module.is.range()) {
|
152
|
-
if ($module.find('.thumb.second').length
|
152
|
+
if ($module.find('.thumb.second').length === 0) {
|
153
153
|
$module.find('.inner').append("<div class='thumb second'></div>");
|
154
154
|
}
|
155
155
|
$secondThumb = $module.find('.thumb.second');
|
@@ -161,7 +161,7 @@
|
|
161
161
|
labels: function () {
|
162
162
|
if (module.is.labeled()) {
|
163
163
|
$labels = $module.find('.labels:not(.auto)');
|
164
|
-
if ($labels.length
|
164
|
+
if ($labels.length > 0) {
|
165
165
|
module.setup.customLabel();
|
166
166
|
} else {
|
167
167
|
module.setup.autoLabel();
|
@@ -186,7 +186,9 @@
|
|
186
186
|
attrValue = $child.attr('data-value')
|
187
187
|
;
|
188
188
|
if (attrValue) {
|
189
|
-
attrValue = attrValue > max
|
189
|
+
attrValue = attrValue > max
|
190
|
+
? max
|
191
|
+
: (attrValue < min ? min : attrValue);
|
190
192
|
ratio = (attrValue - min) / (max - min);
|
191
193
|
} else {
|
192
194
|
ratio = (index + 1) / (numChildren + 1);
|
@@ -196,7 +198,7 @@
|
|
196
198
|
},
|
197
199
|
autoLabel: function () {
|
198
200
|
$labels = $module.find('.labels');
|
199
|
-
if ($labels.length
|
201
|
+
if ($labels.length > 0) {
|
200
202
|
$labels.empty();
|
201
203
|
} else {
|
202
204
|
$labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
|
@@ -204,10 +206,10 @@
|
|
204
206
|
for (var i = 0, len = module.get.numLabels(); i <= len; i++) {
|
205
207
|
var
|
206
208
|
labelText = module.get.label(i),
|
207
|
-
$label =
|
208
|
-
? !(i % module.get.gapRatio())
|
209
|
+
$label = labelText !== ''
|
210
|
+
? (!(i % module.get.gapRatio())
|
209
211
|
? $('<li class="label">' + labelText + '</li>')
|
210
|
-
: $('<li class="halftick label"></li>')
|
212
|
+
: $('<li class="halftick label"></li>'))
|
211
213
|
: null,
|
212
214
|
ratio = i / len
|
213
215
|
;
|
@@ -523,23 +525,23 @@
|
|
523
525
|
trackOffset: function () {
|
524
526
|
if (module.is.vertical()) {
|
525
527
|
return $track.offset().top;
|
526
|
-
} else {
|
527
|
-
return $track.offset().left;
|
528
528
|
}
|
529
|
+
|
530
|
+
return $track.offset().left;
|
529
531
|
},
|
530
532
|
trackLength: function () {
|
531
533
|
if (module.is.vertical()) {
|
532
534
|
return $track.height();
|
533
|
-
} else {
|
534
|
-
return $track.width();
|
535
535
|
}
|
536
|
+
|
537
|
+
return $track.width();
|
536
538
|
},
|
537
539
|
trackLeft: function () {
|
538
540
|
if (module.is.vertical()) {
|
539
541
|
return $track.position().top;
|
540
|
-
} else {
|
541
|
-
return $track.position().left;
|
542
542
|
}
|
543
|
+
|
544
|
+
return $track.position().left;
|
543
545
|
},
|
544
546
|
trackStartPos: function () {
|
545
547
|
return module.is.reversed() ? module.get.trackLeft() + module.get.trackLength() : module.get.trackLeft();
|
@@ -574,11 +576,7 @@
|
|
574
576
|
;
|
575
577
|
if (step != 0) {
|
576
578
|
var split = String(step).split('.');
|
577
|
-
|
578
|
-
decimalPlaces = split[1].length;
|
579
|
-
} else {
|
580
|
-
decimalPlaces = 0;
|
581
|
-
}
|
579
|
+
decimalPlaces = split.length == 2 ? split[1].length : 0;
|
582
580
|
} else {
|
583
581
|
decimalPlaces = settings.decimalPlaces;
|
584
582
|
}
|
@@ -621,7 +619,7 @@
|
|
621
619
|
case settings.labelTypes.number:
|
622
620
|
return Math.round(((value * (module.get.step() === 0 ? 1 : module.get.step())) + module.get.min()) * precision) / precision;
|
623
621
|
case settings.labelTypes.letter:
|
624
|
-
return alphabet[
|
622
|
+
return alphabet[value % 26];
|
625
623
|
default:
|
626
624
|
return value;
|
627
625
|
}
|
@@ -637,12 +635,12 @@
|
|
637
635
|
case 'second':
|
638
636
|
if (module.is.range()) {
|
639
637
|
return module.secondThumbVal;
|
640
|
-
} else {
|
641
|
-
module.error(error.notrange);
|
642
|
-
|
643
|
-
break;
|
644
638
|
}
|
645
|
-
|
639
|
+
|
640
|
+
module.error(error.notrange);
|
641
|
+
|
642
|
+
break;
|
643
|
+
|
646
644
|
default:
|
647
645
|
return module.thumbVal;
|
648
646
|
}
|
@@ -655,12 +653,12 @@
|
|
655
653
|
case 'second':
|
656
654
|
if (module.is.range()) {
|
657
655
|
return secondPos;
|
658
|
-
} else {
|
659
|
-
module.error(error.notrange);
|
660
|
-
|
661
|
-
break;
|
662
656
|
}
|
663
|
-
|
657
|
+
|
658
|
+
module.error(error.notrange);
|
659
|
+
|
660
|
+
break;
|
661
|
+
|
664
662
|
default:
|
665
663
|
return position;
|
666
664
|
}
|
@@ -724,8 +722,8 @@
|
|
724
722
|
thumbPos: function ($element) {
|
725
723
|
var
|
726
724
|
pos = module.is.vertical()
|
727
|
-
? module.is.reversed() ? $element.css('bottom') : $element.css('top')
|
728
|
-
: module.is.reversed() ? $element.css('right') : $element.css('left')
|
725
|
+
? (module.is.reversed() ? $element.css('bottom') : $element.css('top'))
|
726
|
+
: (module.is.reversed() ? $element.css('right') : $element.css('left'))
|
729
727
|
;
|
730
728
|
|
731
729
|
return pos;
|
@@ -734,7 +732,9 @@
|
|
734
732
|
var
|
735
733
|
min = module.get.min(),
|
736
734
|
max = module.get.max(),
|
737
|
-
value = val > max
|
735
|
+
value = val > max
|
736
|
+
? max
|
737
|
+
: (val < min ? min : val),
|
738
738
|
trackLength = module.get.trackLength(),
|
739
739
|
ratio = (value - min) / (max - min),
|
740
740
|
position = Math.round(ratio * trackLength)
|
@@ -748,7 +748,7 @@
|
|
748
748
|
trackLength = module.get.trackLength(),
|
749
749
|
step = module.get.step(),
|
750
750
|
position = Math.round(ratio * trackLength),
|
751
|
-
adjustedPos =
|
751
|
+
adjustedPos = step == 0 ? position : Math.round(position / step) * step
|
752
752
|
;
|
753
753
|
|
754
754
|
return adjustedPos;
|
@@ -779,7 +779,9 @@
|
|
779
779
|
ratio,
|
780
780
|
value
|
781
781
|
;
|
782
|
-
newPos = newPos < 0
|
782
|
+
newPos = newPos < 0
|
783
|
+
? 0
|
784
|
+
: (newPos > trackLength ? trackLength : newPos);
|
783
785
|
ratio = newPos / trackLength;
|
784
786
|
if (module.is.reversed()) {
|
785
787
|
ratio = 1 - ratio;
|
@@ -821,8 +823,8 @@
|
|
821
823
|
ratio = (position - startPos) / (endPos - startPos),
|
822
824
|
range = module.get.max() - module.get.min(),
|
823
825
|
step = module.get.step(),
|
824
|
-
value =
|
825
|
-
difference =
|
826
|
+
value = ratio * range,
|
827
|
+
difference = step == 0 ? value : Math.round(value / step) * step
|
826
828
|
;
|
827
829
|
module.verbose('Determined value based upon position: ' + position + ' as: ' + value);
|
828
830
|
if (value != difference) {
|
@@ -838,29 +840,32 @@
|
|
838
840
|
var
|
839
841
|
key = event.which,
|
840
842
|
downArrow = module.is.vertical()
|
841
|
-
? module.is.reversed() ? keys.downArrow : keys.upArrow
|
843
|
+
? (module.is.reversed() ? keys.downArrow : keys.upArrow)
|
842
844
|
: keys.downArrow,
|
843
845
|
upArrow = module.is.vertical()
|
844
|
-
? module.is.reversed() ? keys.upArrow : keys.downArrow
|
846
|
+
? (module.is.reversed() ? keys.upArrow : keys.downArrow)
|
845
847
|
: keys.upArrow,
|
846
848
|
leftArrow = !module.is.vertical()
|
847
|
-
? module.is.reversed() ? keys.rightArrow : keys.leftArrow
|
849
|
+
? (module.is.reversed() ? keys.rightArrow : keys.leftArrow)
|
848
850
|
: keys.leftArrow,
|
849
851
|
rightArrow = !module.is.vertical()
|
850
|
-
? module.is.reversed() ? keys.leftArrow : keys.rightArrow
|
852
|
+
? (module.is.reversed() ? keys.leftArrow : keys.rightArrow)
|
851
853
|
: keys.rightArrow
|
852
854
|
;
|
853
855
|
if (key == downArrow || key == leftArrow) {
|
854
856
|
return SINGLE_BACKSTEP;
|
855
|
-
}
|
857
|
+
}
|
858
|
+
if (key == upArrow || key == rightArrow) {
|
856
859
|
return SINGLE_STEP;
|
857
|
-
}
|
860
|
+
}
|
861
|
+
if (key == keys.pageDown) {
|
858
862
|
return BIG_BACKSTEP;
|
859
|
-
}
|
863
|
+
}
|
864
|
+
if (key == keys.pageUp) {
|
860
865
|
return BIG_STEP;
|
861
|
-
} else {
|
862
|
-
return NO_STEP;
|
863
866
|
}
|
867
|
+
|
868
|
+
return NO_STEP;
|
864
869
|
},
|
865
870
|
},
|
866
871
|
|
@@ -1009,8 +1014,8 @@
|
|
1009
1014
|
thumbPosValue,
|
1010
1015
|
min = module.get.min(),
|
1011
1016
|
max = module.get.max(),
|
1012
|
-
thumbPosPercent = 100 * (newValue - min) / (max - min),
|
1013
|
-
trackStartPosPercent = 100 * (Math.min(thumbVal, secondThumbVal) - min) / (max - min),
|
1017
|
+
thumbPosPercent = 100 * ((newValue - min) / (max - min)),
|
1018
|
+
trackStartPosPercent = 100 * ((Math.min(thumbVal, secondThumbVal) - min) / (max - min)),
|
1014
1019
|
trackEndPosPercent = 100 * (1 - (Math.max(thumbVal, secondThumbVal) - min) / (max - min))
|
1015
1020
|
;
|
1016
1021
|
if (module.is.vertical()) {
|
@@ -1039,9 +1044,11 @@
|
|
1039
1044
|
startMargin = module.get.trackStartMargin(),
|
1040
1045
|
endMargin = module.get.trackEndMargin(),
|
1041
1046
|
posDir = module.is.vertical()
|
1042
|
-
? module.is.reversed() ? 'bottom' : 'top'
|
1043
|
-
: module.is.reversed() ? 'right' : 'left',
|
1044
|
-
startMarginMod = module.is.reversed() && !module.is.vertical()
|
1047
|
+
? (module.is.reversed() ? 'bottom' : 'top')
|
1048
|
+
: (module.is.reversed() ? 'right' : 'left'),
|
1049
|
+
startMarginMod = module.is.reversed() && !module.is.vertical()
|
1050
|
+
? ' - '
|
1051
|
+
: ' + '
|
1045
1052
|
;
|
1046
1053
|
var position = '(100% - ' + startMargin + ' - ' + endMargin + ') * ' + ratio;
|
1047
1054
|
$label.css(posDir, 'calc(' + position + startMarginMod + startMargin + ')');
|
@@ -1146,7 +1153,7 @@
|
|
1146
1153
|
previousTime
|
1147
1154
|
;
|
1148
1155
|
if (settings.performance) {
|
1149
|
-
currentTime =
|
1156
|
+
currentTime = Date.now();
|
1150
1157
|
previousTime = time || currentTime;
|
1151
1158
|
executionTime = currentTime - previousTime;
|
1152
1159
|
time = currentTime;
|
@@ -1198,11 +1205,11 @@
|
|
1198
1205
|
;
|
1199
1206
|
passedArguments = passedArguments || queryArguments;
|
1200
1207
|
context = context || element;
|
1201
|
-
if (typeof query
|
1202
|
-
query = query.split(/[
|
1208
|
+
if (typeof query === 'string' && object !== undefined) {
|
1209
|
+
query = query.split(/[ .]/);
|
1203
1210
|
maxDepth = query.length - 1;
|
1204
1211
|
$.each(query, function (depth, value) {
|
1205
|
-
var camelCaseValue =
|
1212
|
+
var camelCaseValue = depth != maxDepth
|
1206
1213
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1207
1214
|
: query
|
1208
1215
|
;
|
@@ -1255,7 +1262,7 @@
|
|
1255
1262
|
}
|
1256
1263
|
});
|
1257
1264
|
|
1258
|
-
return
|
1265
|
+
return returnedValue !== undefined
|
1259
1266
|
? returnedValue
|
1260
1267
|
: this;
|
1261
1268
|
};
|
@@ -1300,9 +1307,7 @@
|
|
1300
1307
|
// page up/down multiplier. How many more times the steps to take on page up/down press
|
1301
1308
|
pageMultiplier: 2,
|
1302
1309
|
|
1303
|
-
selector: {
|
1304
|
-
|
1305
|
-
},
|
1310
|
+
selector: {},
|
1306
1311
|
|
1307
1312
|
className: {
|
1308
1313
|
reversed: 'reversed',
|
@@ -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(Y,t,n,K){"use strict";t=void 0!==t&&t.Math==Math?t:globalThis,Y.fn.slider=function(S){var A,e=Y(this),F=Y(n),O=Y(t),N=e.selector||"",j=(new Date).getTime(),z=[],I=S,R="string"==typeof I,B=[].slice.call(arguments,1),U=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],X=0;return e.each(function(){var l,s,i,u,e,c,d,t,m,g,f,v,o,b,r,h,p=Y.isPlainObject(S)?Y.extend(!0,{},Y.fn.slider.settings,S):Y.extend({},Y.fn.slider.settings),n=p.className,a=p.metadata,k=p.namespace,V=p.error,T=p.keys,y=p.interpretLabel,w=!1,M="."+k,x="module-"+k,P=Y(this),E=this,C=P.data(x),L=1,D={initialize:function(){D.debug("Initializing slider",p),h=!0,t=X+=1,D.setup.layout(),D.setup.labels(),D.is.disabled()||D.bind.events(),D.read.metadata(),D.read.settings(),h=!1,D.instantiate()},instantiate:function(){D.verbose("Storing instance of slider",D),C=D,P.data(x,D)},destroy:function(){D.verbose("Destroying previous slider for",P),clearInterval(C.interval),D.unbind.events(),D.unbind.slidingEvents(),P.removeData(x),C=K},setup:{layout:function(){P.attr("tabindex")===K&&P.attr("tabindex",0),0==P.find(".inner").length&&P.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=D.get.precision(),i=P.find(".thumb:not(.second)"),l=i,D.is.range()&&(0==P.find(".thumb.second").length&&P.find(".inner").append("<div class='thumb second'></div>"),u=P.find(".thumb.second")),e=P.find(".track"),c=P.find(".track-fill"),v=i.width()/2},labels:function(){D.is.labeled()&&(0!=(d=P.find(".labels:not(.auto)")).length?D.setup.customLabel():D.setup.autoLabel(),p.showLabelTicks&&P.addClass(n.ticked))},customLabel:function(){var n,e=d.find(".label"),a=e.length,o=D.get.min(),r=D.get.max();e.each(function(e){var t=Y(this).attr("data-value");n=t?((t=r<t?r:t<o?o:t)-o)/(r-o):(e+1)/(a+1),D.update.labelPosition(n,Y(this))})},autoLabel:function(){0!=(d=P.find(".labels")).length?d.empty():d=P.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=D.get.numLabels();e<=t;e++){var n=D.get.label(e),n=""!==n?e%D.get.gapRatio()?Y('<li class="halftick label"></li>'):Y('<li class="label">'+n+"</li>"):null;n&&(D.update.labelPosition(e/t,n),d.append(n))}}},bind:{events:function(){D.bind.globalKeyboardEvents(),D.bind.keyboardEvents(),D.bind.mouseEvents(),p.autoAdjustLabels&&D.bind.windowEvents()},keyboardEvents:function(){D.verbose("Binding keyboard events"),P.on("keydown"+M,D.event.keydown)},globalKeyboardEvents:function(){F.on("keydown"+M+t,D.event.activateFocus)},mouseEvents:function(){D.verbose("Binding mouse and touch events"),P.find(".track, .thumb, .inner").on("mousedown"+M,function(e){e.stopImmediatePropagation(),e.preventDefault(),D.event.down(e)}),P.on("mousedown"+M,D.event.down),P.on("mouseenter"+M,function(e){w=!0}),P.on("mouseleave"+M,function(e){w=!1}),P.find(".thumb").on("touchstart"+M,D.event.touchDown).on("touchmove"+M,D.event.move).on("touchend"+M,D.event.up).on("touchcancel"+M,D.event.touchCancel)},slidingEvents:function(){D.verbose("Binding page wide events while handle is being draged"),F.on("mousemove"+M,D.event.move),F.on("mouseup"+M,D.event.up)},windowEvents:function(){O.on("resize"+M,D.event.resize)}},unbind:{events:function(){P.find(".track, .thumb, .inner").off("mousedown"+M),P.off("mousedown"+M),P.off("mouseenter"+M),P.off("mouseleave"+M),P.find(".thumb").off("touchstart"+M).off("touchmove"+M).off("touchend"+M).off("touchcancel"+M),P.off("keydown"+M),P.off("focusout"+M),F.off("keydown"+M+t,D.event.activateFocus),O.off("resize"+M)},slidingEvents:function(){F.off("mousemove"+M),F.off("mouseup"+M)}},event:{down:function(e){e.preventDefault(),D.is.range()?(e=D.determine.eventPos(e),e=D.determine.pos(e),l=p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal?(r=e,K):D.determine.closestThumb(e),b===K&&(b=D.get.currentThumbValue())):b===K&&(b=D.get.value()),D.is.disabled()||D.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),s===K&&(l=Y(e.target),e=e.touches?e:e.originalEvent,s=e.targetTouches[0].identifier,b===K&&(b=D.get.currentThumbValue()))},move:function(e){var t,n,a;"mousemove"==e.type&&e.preventDefault(),D.is.disabled()||(t=D.determine.valueFromEvent(e),"mousemove"==e.type&&l===K&&(n=D.determine.eventPos(e),n=D.determine.pos(n),l=n<r?i:u),0==D.get.step()||D.is.smooth()?(n=D.thumbVal,a=D.secondThumbVal,e=D.determine.smoothValueFromEvent(e),l.hasClass("second")?(p.preventCrossover&&D.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),a=t):(p.preventCrossover&&D.is.range()&&(t=Math.min(a,t),e=Math.min(a,e)),n=t),t=Math.abs(n-(a||0)),D.update.position(e),p.onMove.call(E,t,n,a)):D.update.value(t,function(e,t,n){p.onMove.call(E,e,t,n)}))},up:function(e){e.preventDefault(),D.is.disabled()||(e=D.determine.valueFromEvent(e),D.set.value(e),D.unbind.slidingEvents(),b!==(s=K)&&(b=K))},touchCancel:function(e){e.preventDefault(),b!==(s=K)&&(D.update.value(b),b=K)},keydown:function(e,t){if(p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal&&(l=K),D.is.focused()&&F.trigger(e),t||D.is.focused()){t=D.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:D.takeStep();break;case 2:D.takeStep(D.get.multiplier());break;case-1:D.backStep();break;case-2:D.backStep(D.get.multiplier())}}},activateFocus:function(e){!D.is.focused()&&D.is.hover()&&0!=D.determine.keyMovement(e)&&(e.preventDefault(),D.event.keydown(e,!0),P.trigger("focus"))},resize:function(e){L!=D.get.gapRatio()&&(D.setup.labels(),L=D.get.gapRatio())}},resync:function(){D.verbose("Resyncing thumb position based on value"),D.is.range()&&D.update.position(D.secondThumbVal,u),D.update.position(D.thumbVal,i),D.setup.labels()},takeStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Taking a step"),0<t?D.set.value(n+t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Going back a step"),0<t?D.set.value(n-t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return P.hasClass(p.className.range)},hover:function(){return w},focused:function(){return P.is(":focus")},disabled:function(){return P.hasClass(p.className.disabled)},labeled:function(){return P.hasClass(p.className.labeled)},reversed:function(){return P.hasClass(p.className.reversed)},vertical:function(){return P.hasClass(p.className.vertical)},smooth:function(){return p.smooth||P.hasClass(p.className.smooth)}},get:{trackOffset:function(){return D.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return D.is.vertical()?e.height():e.width()},trackLeft:function(){return D.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return D.is.reversed()?D.get.trackLeft()+D.get.trackLength():D.get.trackLeft()},trackEndPos:function(){return D.is.reversed()?D.get.trackLeft():D.get.trackLeft()+D.get.trackLength()},trackStartMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-bottom"):P.css("padding-top"):D.is.reversed()?P.css("padding-right"):P.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-top"):P.css("padding-bottom"):D.is.reversed()?P.css("padding-left"):P.css("padding-right");return e||"0px"},precision:function(){var e=D.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:p.decimalPlaces,Math.pow(10,e));return D.debug("Precision determined",e),e},min:function(){return p.min},max:function(){var e=D.get.step(),t=D.get.min(),n=0===e?0:Math.floor((p.max-t)/e);return 0==(0===e?0:(p.max-t)%e)?p.max:t+n*e},step:function(){return p.step},numLabels:function(){var e=Math.round((D.get.max()-D.get.min())/(0===D.get.step()?1:D.get.step()));return D.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return p.labelType},label:function(e){if(y)return y(e);switch(p.labelType){case p.labelTypes.number:return Math.round((e*(0===D.get.step()?1:D.get.step())+D.get.min())*o)/o;case p.labelTypes.letter:return U[e%26];default:return e}},value:function(){return m},currentThumbValue:function(){return l!==K&&l.hasClass("second")?D.secondThumbVal:D.thumbVal},thumbValue:function(e){return"second"!==e?D.thumbVal:D.is.range()?D.secondThumbVal:void D.error(V.notrange)},multiplier:function(){return p.pageMultiplier},thumbPosition:function(e){return"second"!==e?g:D.is.range()?f:void D.error(V.notrange)},gapRatio:function(){var e=1;if(p.autoAdjustLabels){var t=D.get.numLabels(),n=D.get.trackLength(),a=1;if(0<n)for(;n/t*a<p.labelDistance;)t%a||(e=a),a+=1}return e}},determine:{pos:function(e){return D.is.reversed()?D.get.trackStartPos()-e+D.get.trackOffset():e-D.get.trackOffset()-D.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(D.determine.thumbPos(i)),t=Math.abs(e-t),n=parseFloat(D.determine.thumbPos(u)),e=Math.abs(e-n);return(t!==e||D.get.thumbValue()!==D.get.min())&&t<=e?i:u},closestThumbPos:function(e){var t=parseFloat(D.determine.thumbPos(i)),n=Math.abs(e-t),a=parseFloat(D.determine.thumbPos(u));return n<=Math.abs(e-a)?t:a},thumbPos:function(e){return D.is.vertical()?D.is.reversed()?e.css("bottom"):e.css("top"):D.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=D.get.min(),n=D.get.max(),e=n<e?n:e<t?t:e,a=D.get.trackLength(),n=Math.round((e-t)/(n-t)*a);return D.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=D.get.trackLength(),n=D.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=D.determine.eventPos(e),t=D.determine.pos(e),e=e<D.get.trackOffset()?D.is.reversed()?D.get.max():D.get.min():e>D.get.trackOffset()+D.get.trackLength()?D.is.reversed()?D.get.min():D.get.max():D.determine.value(t);return e},smoothValueFromEvent:function(e){var t=D.get.min(),n=D.get.max(),a=D.get.trackLength(),e=D.determine.eventPos(e)-D.get.trackOffset(),e=(e=e<0?0:a<e?a:e)/a;return(e=D.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],a=0;a<t.touches.length;a++)if(t.touches[a].identifier===s){n=t.touches[a];break}var o=n.pageY,r=n.pageX;return D.is.vertical()?o:r}o=e.pageY||e.originalEvent.pageY,r=e.pageX||e.originalEvent.pageX;return D.is.vertical()?o:r},value:function(e){var t=D.is.reversed()?D.get.trackEndPos():D.get.trackStartPos(),t=(e-t)/((D.is.reversed()?D.get.trackStartPos():D.get.trackEndPos())-t),n=D.get.max()-D.get.min(),a=D.get.step(),t=t*n,n=0==a?t:Math.round(t/a)*a;return D.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&D.verbose("Rounding value to closest step: "+n),D.verbose("Cutting off additional decimal places"),Math.round((n+D.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!D.is.vertical()||D.is.reversed()?T.downArrow:T.upArrow,n=!D.is.vertical()||D.is.reversed()?T.upArrow:T.downArrow,a=!D.is.vertical()&&D.is.reversed()?T.rightArrow:T.leftArrow,o=!D.is.vertical()&&D.is.reversed()?T.leftArrow:T.rightArrow;return e==t||e==a?-1:e==n||e==o?1:e==T.pageDown?-2:e==T.pageUp?2:0}},handleNewValuePosition:function(e){var t=D.get.min(),n=D.get.max();return e<=t?e=t:n<=e&&(e=n),D.determine.positionFromValue(e)},set:{value:function(a,o){o=!1!==o;var r=b===K;b=b===K?D.get.value():b,D.update.value(a,function(e,t,n){h&&!p.fireOnInit||!o||(a!==b&&p.onChange.call(E,e,t,n),p.onMove.call(E,e,t,n)),r&&(b=K)})},rangeValue:function(e,t,n){var a,o,r;n=!1!==n,D.is.range()?(a=D.get.min(),o=D.get.max(),b=(r=b===K)?D.get.value():b,e<=a?e=a:o<=e&&(e=o),t<=a?t=a:o<=t&&(t=o),D.thumbVal=e,D.secondThumbVal=t,m=Math.abs(D.thumbVal-D.secondThumbVal),D.update.position(D.thumbVal,i),D.update.position(D.secondThumbVal,u),h&&!p.fireOnInit||!n||(m!==b&&p.onChange.call(E,m,D.thumbVal,D.secondThumbVal),p.onMove.call(E,m,D.thumbVal,D.secondThumbVal)),r&&(b=K)):D.error(V.notrange)},position:function(e,t){e=D.determine.value(e);"second"===t?(D.secondThumbVal=e,D.update.position(e,u)):(D.thumbVal=e,D.update.position(e,i)),m=Math.abs(D.thumbVal-(D.secondThumbVal||0)),D.set.value(m)}},update:{value:function(e,t){var n=D.get.min(),a=D.get.max();e<=n?e=n:a<=e&&(e=a),D.is.range()?((l=l===K?e<=D.get.currentThumbValue()?i:u:l).hasClass("second")?(p.preventCrossover&&D.is.range()&&(e=Math.max(D.thumbVal,e)),D.secondThumbVal=e):(p.preventCrossover&&D.is.range()&&(e=Math.min(D.secondThumbVal,e)),D.thumbVal=e),m=Math.abs(D.thumbVal-D.secondThumbVal)):(m=e,D.thumbVal=m),D.update.position(e),D.debug("Setting slider value to "+m),"function"==typeof t&&t(m,D.thumbVal,D.secondThumbVal)},position:function(e,t){var n=D.handleNewValuePosition(e),t=t!=K?t:l,a=D.thumbVal||D.get.min(),o=D.secondThumbVal||D.get.min();D.is.range()&&t.hasClass("second")?(f=n,o=e):(g=n,a=e);var r,s=D.get.min(),i=D.get.max(),e=100*(e-s)/(i-s),u=100*(Math.min(a,o)-s)/(i-s),a=100*(1-(Math.max(a,o)-s)/(i-s)),o=D.is.vertical()?D.is.reversed()?(r={bottom:"calc("+e+"% - "+v+"px)",top:"auto"},{bottom:u+"%",top:a+"%"}):(r={top:"calc("+e+"% - "+v+"px)",bottom:"auto"},{top:u+"%",bottom:a+"%"}):D.is.reversed()?(r={right:"calc("+e+"% - "+v+"px)",left:"auto"},{right:u+"%",left:a+"%"}):(r={left:"calc("+e+"% - "+v+"px)",right:"auto"},{left:u+"%",right:a+"%"});t.css(r),c.css(o),D.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=D.get.trackStartMargin(),a=D.get.trackEndMargin(),o=D.is.vertical()?D.is.reversed()?"bottom":"top":D.is.reversed()?"right":"left",r=D.is.reversed()&&!D.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+a+") * "+e)+r+n+")")}},goto:{max:function(){D.set.value(D.get.max())},min:function(){D.set.value(D.get.min())}},read:{metadata:function(){var e={thumbVal:P.data(a.thumbVal),secondThumbVal:P.data(a.secondThumbVal)};e.thumbVal&&(D.is.range()&&e.secondThumbVal?(D.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),D.set.rangeValue(e.thumbVal,e.secondThumbVal)):(D.debug("Current value set from metadata",e.thumbVal),D.set.value(e.thumbVal)))},settings:function(){!1!==p.start&&(D.is.range()?(D.debug("Start position set from settings",p.start,p.end),D.set.rangeValue(p.start,p.end)):(D.debug("Start position set from settings",p.start),D.set.value(p.start)))}},setting:function(e,t){if(D.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,p,e);else{if(t===K)return p[e];Y.isPlainObject(p[e])?Y.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,D,e);else{if(t===K)return D[e];D[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,p.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),D.verbose.apply(console,arguments)))},error:function(){p.silent||(D.error=Function.prototype.bind.call(console.error,console,p.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(j||t),j=t,z.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var e=p.name+":",n=0;j=!1,clearTimeout(D.performance.timer),Y.each(z,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),(console.group!==K||console.table!==K)&&0<z.length&&(console.groupCollapsed(e),console.table?console.table(z):Y.each(z,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),z=[]}},invoke:function(a,e,t){var o,r,n,s,i=C;return e=e||B,t=t||E,"string"==typeof a&&i!==K&&(a=a.split(/[\. ]/),o=a.length-1,Y.each(a,function(e,t){var n=e!=o?t+a[e+1].charAt(0).toUpperCase()+a[e+1].slice(1):a;if(Y.isPlainObject(i[n])&&e!=o)i=i[n];else{if(i[n]!==K)return r=i[n],!1;{if(!Y.isPlainObject(i[t])||e==o)return i[t]!==K?r=i[t]:D.error(V.method,a),!1;i=i[t]}}})),"function"==typeof(s=r)&&"number"!=typeof s.nodeType?n=r.apply(t,e):r!==K&&(n=r),Array.isArray(A)?A.push(n):A!==K?A=[A,n]:n!==K&&(A=n),r}};R?(C===K&&D.initialize(),D.invoke(I)):(C!==K&&C.invoke("destroy"),D.initialize())}),A!==K?A:this},Y.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document);
|
11
|
+
!function(Y,t,n,K){"use strict";t=t!==K&&t.Math===Math?t:globalThis,Y.fn.slider=function(S){var A,e=Y(this),F=Y(n),O=Y(t),N=e.selector||"",j=Date.now(),z=[],I=S,R="string"==typeof I,B=[].slice.call(arguments,1),U=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],X=0;return e.each(function(){var l,s,i,u,e,c,d,t,m,f,g,v,o,b,r,h,p=Y.isPlainObject(S)?Y.extend(!0,{},Y.fn.slider.settings,S):Y.extend({},Y.fn.slider.settings),n=p.className,a=p.metadata,k=p.namespace,V=p.error,T=p.keys,y=p.interpretLabel,w=!1,M="."+k,x="module-"+k,P=Y(this),E=this,C=P.data(x),L=1,D={initialize:function(){D.debug("Initializing slider",p),h=!0,t=X+=1,D.setup.layout(),D.setup.labels(),D.is.disabled()||D.bind.events(),D.read.metadata(),D.read.settings(),h=!1,D.instantiate()},instantiate:function(){D.verbose("Storing instance of slider",D),C=D,P.data(x,D)},destroy:function(){D.verbose("Destroying previous slider for",P),clearInterval(C.interval),D.unbind.events(),D.unbind.slidingEvents(),P.removeData(x),C=K},setup:{layout:function(){P.attr("tabindex")===K&&P.attr("tabindex",0),0===P.find(".inner").length&&P.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=D.get.precision(),i=P.find(".thumb:not(.second)"),l=i,D.is.range()&&(0===P.find(".thumb.second").length&&P.find(".inner").append("<div class='thumb second'></div>"),u=P.find(".thumb.second")),e=P.find(".track"),c=P.find(".track-fill"),v=i.width()/2},labels:function(){D.is.labeled()&&(0<(d=P.find(".labels:not(.auto)")).length?D.setup.customLabel():D.setup.autoLabel(),p.showLabelTicks&&P.addClass(n.ticked))},customLabel:function(){var n,e=d.find(".label"),a=e.length,o=D.get.min(),r=D.get.max();e.each(function(e){var t=Y(this).attr("data-value");n=t?((t=r<t?r:t<o?o:t)-o)/(r-o):(e+1)/(a+1),D.update.labelPosition(n,Y(this))})},autoLabel:function(){0<(d=P.find(".labels")).length?d.empty():d=P.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=D.get.numLabels();e<=t;e++){var n=D.get.label(e),n=""!==n?e%D.get.gapRatio()?Y('<li class="halftick label"></li>'):Y('<li class="label">'+n+"</li>"):null;n&&(D.update.labelPosition(e/t,n),d.append(n))}}},bind:{events:function(){D.bind.globalKeyboardEvents(),D.bind.keyboardEvents(),D.bind.mouseEvents(),p.autoAdjustLabels&&D.bind.windowEvents()},keyboardEvents:function(){D.verbose("Binding keyboard events"),P.on("keydown"+M,D.event.keydown)},globalKeyboardEvents:function(){F.on("keydown"+M+t,D.event.activateFocus)},mouseEvents:function(){D.verbose("Binding mouse and touch events"),P.find(".track, .thumb, .inner").on("mousedown"+M,function(e){e.stopImmediatePropagation(),e.preventDefault(),D.event.down(e)}),P.on("mousedown"+M,D.event.down),P.on("mouseenter"+M,function(e){w=!0}),P.on("mouseleave"+M,function(e){w=!1}),P.find(".thumb").on("touchstart"+M,D.event.touchDown).on("touchmove"+M,D.event.move).on("touchend"+M,D.event.up).on("touchcancel"+M,D.event.touchCancel)},slidingEvents:function(){D.verbose("Binding page wide events while handle is being draged"),F.on("mousemove"+M,D.event.move),F.on("mouseup"+M,D.event.up)},windowEvents:function(){O.on("resize"+M,D.event.resize)}},unbind:{events:function(){P.find(".track, .thumb, .inner").off("mousedown"+M),P.off("mousedown"+M),P.off("mouseenter"+M),P.off("mouseleave"+M),P.find(".thumb").off("touchstart"+M).off("touchmove"+M).off("touchend"+M).off("touchcancel"+M),P.off("keydown"+M),P.off("focusout"+M),F.off("keydown"+M+t,D.event.activateFocus),O.off("resize"+M)},slidingEvents:function(){F.off("mousemove"+M),F.off("mouseup"+M)}},event:{down:function(e){e.preventDefault(),D.is.range()?(e=D.determine.eventPos(e),e=D.determine.pos(e),l=p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal?(r=e,K):D.determine.closestThumb(e),b===K&&(b=D.get.currentThumbValue())):b===K&&(b=D.get.value()),D.is.disabled()||D.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),s===K&&(l=Y(e.target),e=e.touches?e:e.originalEvent,s=e.targetTouches[0].identifier,b===K&&(b=D.get.currentThumbValue()))},move:function(e){var t,n,a;"mousemove"==e.type&&e.preventDefault(),D.is.disabled()||(t=D.determine.valueFromEvent(e),"mousemove"==e.type&&l===K&&(n=D.determine.eventPos(e),n=D.determine.pos(n),l=n<r?i:u),0==D.get.step()||D.is.smooth()?(n=D.thumbVal,a=D.secondThumbVal,e=D.determine.smoothValueFromEvent(e),l.hasClass("second")?(p.preventCrossover&&D.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),a=t):(p.preventCrossover&&D.is.range()&&(t=Math.min(a,t),e=Math.min(a,e)),n=t),t=Math.abs(n-(a||0)),D.update.position(e),p.onMove.call(E,t,n,a)):D.update.value(t,function(e,t,n){p.onMove.call(E,e,t,n)}))},up:function(e){e.preventDefault(),D.is.disabled()||(e=D.determine.valueFromEvent(e),D.set.value(e),D.unbind.slidingEvents(),b!==(s=K)&&(b=K))},touchCancel:function(e){e.preventDefault(),b!==(s=K)&&(D.update.value(b),b=K)},keydown:function(e,t){if(p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal&&(l=K),D.is.focused()&&F.trigger(e),t||D.is.focused()){t=D.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:D.takeStep();break;case 2:D.takeStep(D.get.multiplier());break;case-1:D.backStep();break;case-2:D.backStep(D.get.multiplier())}}},activateFocus:function(e){!D.is.focused()&&D.is.hover()&&0!=D.determine.keyMovement(e)&&(e.preventDefault(),D.event.keydown(e,!0),P.trigger("focus"))},resize:function(e){L!=D.get.gapRatio()&&(D.setup.labels(),L=D.get.gapRatio())}},resync:function(){D.verbose("Resyncing thumb position based on value"),D.is.range()&&D.update.position(D.secondThumbVal,u),D.update.position(D.thumbVal,i),D.setup.labels()},takeStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Taking a step"),0<t?D.set.value(n+t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Going back a step"),0<t?D.set.value(n-t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return P.hasClass(p.className.range)},hover:function(){return w},focused:function(){return P.is(":focus")},disabled:function(){return P.hasClass(p.className.disabled)},labeled:function(){return P.hasClass(p.className.labeled)},reversed:function(){return P.hasClass(p.className.reversed)},vertical:function(){return P.hasClass(p.className.vertical)},smooth:function(){return p.smooth||P.hasClass(p.className.smooth)}},get:{trackOffset:function(){return D.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return D.is.vertical()?e.height():e.width()},trackLeft:function(){return D.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return D.is.reversed()?D.get.trackLeft()+D.get.trackLength():D.get.trackLeft()},trackEndPos:function(){return D.is.reversed()?D.get.trackLeft():D.get.trackLeft()+D.get.trackLength()},trackStartMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-bottom"):P.css("padding-top"):D.is.reversed()?P.css("padding-right"):P.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-top"):P.css("padding-bottom"):D.is.reversed()?P.css("padding-left"):P.css("padding-right");return e||"0px"},precision:function(){var e=D.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:p.decimalPlaces,Math.pow(10,e));return D.debug("Precision determined",e),e},min:function(){return p.min},max:function(){var e=D.get.step(),t=D.get.min(),n=0===e?0:Math.floor((p.max-t)/e);return 0==(0===e?0:(p.max-t)%e)?p.max:t+n*e},step:function(){return p.step},numLabels:function(){var e=Math.round((D.get.max()-D.get.min())/(0===D.get.step()?1:D.get.step()));return D.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return p.labelType},label:function(e){if(y)return y(e);switch(p.labelType){case p.labelTypes.number:return Math.round((e*(0===D.get.step()?1:D.get.step())+D.get.min())*o)/o;case p.labelTypes.letter:return U[e%26];default:return e}},value:function(){return m},currentThumbValue:function(){return l!==K&&l.hasClass("second")?D.secondThumbVal:D.thumbVal},thumbValue:function(e){return"second"!==e?D.thumbVal:D.is.range()?D.secondThumbVal:void D.error(V.notrange)},multiplier:function(){return p.pageMultiplier},thumbPosition:function(e){return"second"!==e?f:D.is.range()?g:void D.error(V.notrange)},gapRatio:function(){var e=1;if(p.autoAdjustLabels){var t=D.get.numLabels(),n=D.get.trackLength(),a=1;if(0<n)for(;n/t*a<p.labelDistance;)t%a||(e=a),a+=1}return e}},determine:{pos:function(e){return D.is.reversed()?D.get.trackStartPos()-e+D.get.trackOffset():e-D.get.trackOffset()-D.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(D.determine.thumbPos(i)),t=Math.abs(e-t),n=parseFloat(D.determine.thumbPos(u)),e=Math.abs(e-n);return(t!==e||D.get.thumbValue()!==D.get.min())&&t<=e?i:u},closestThumbPos:function(e){var t=parseFloat(D.determine.thumbPos(i)),n=Math.abs(e-t),a=parseFloat(D.determine.thumbPos(u));return n<=Math.abs(e-a)?t:a},thumbPos:function(e){return D.is.vertical()?D.is.reversed()?e.css("bottom"):e.css("top"):D.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=D.get.min(),n=D.get.max(),e=n<e?n:e<t?t:e,a=D.get.trackLength(),n=Math.round((e-t)/(n-t)*a);return D.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=D.get.trackLength(),n=D.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=D.determine.eventPos(e),t=D.determine.pos(e),e=e<D.get.trackOffset()?D.is.reversed()?D.get.max():D.get.min():e>D.get.trackOffset()+D.get.trackLength()?D.is.reversed()?D.get.min():D.get.max():D.determine.value(t);return e},smoothValueFromEvent:function(e){var t=D.get.min(),n=D.get.max(),a=D.get.trackLength(),e=D.determine.eventPos(e)-D.get.trackOffset(),e=(e=e<0?0:a<e?a:e)/a;return(e=D.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],a=0;a<t.touches.length;a++)if(t.touches[a].identifier===s){n=t.touches[a];break}var o=n.pageY,r=n.pageX;return D.is.vertical()?o:r}o=e.pageY||e.originalEvent.pageY,r=e.pageX||e.originalEvent.pageX;return D.is.vertical()?o:r},value:function(e){var t=D.is.reversed()?D.get.trackEndPos():D.get.trackStartPos(),t=(e-t)/((D.is.reversed()?D.get.trackStartPos():D.get.trackEndPos())-t),n=D.get.max()-D.get.min(),a=D.get.step(),t=t*n,n=0==a?t:Math.round(t/a)*a;return D.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&D.verbose("Rounding value to closest step: "+n),D.verbose("Cutting off additional decimal places"),Math.round((n+D.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!D.is.vertical()||D.is.reversed()?T.downArrow:T.upArrow,n=!D.is.vertical()||D.is.reversed()?T.upArrow:T.downArrow,a=!D.is.vertical()&&D.is.reversed()?T.rightArrow:T.leftArrow,o=!D.is.vertical()&&D.is.reversed()?T.leftArrow:T.rightArrow;return e==t||e==a?-1:e==n||e==o?1:e==T.pageDown?-2:e==T.pageUp?2:0}},handleNewValuePosition:function(e){var t=D.get.min(),n=D.get.max();return e<=t?e=t:n<=e&&(e=n),D.determine.positionFromValue(e)},set:{value:function(a,o){o=!1!==o;var r=b===K;b=b===K?D.get.value():b,D.update.value(a,function(e,t,n){h&&!p.fireOnInit||!o||(a!==b&&p.onChange.call(E,e,t,n),p.onMove.call(E,e,t,n)),r&&(b=K)})},rangeValue:function(e,t,n){var a,o,r;n=!1!==n,D.is.range()?(a=D.get.min(),o=D.get.max(),b=(r=b===K)?D.get.value():b,e<=a?e=a:o<=e&&(e=o),t<=a?t=a:o<=t&&(t=o),D.thumbVal=e,D.secondThumbVal=t,m=Math.abs(D.thumbVal-D.secondThumbVal),D.update.position(D.thumbVal,i),D.update.position(D.secondThumbVal,u),h&&!p.fireOnInit||!n||(m!==b&&p.onChange.call(E,m,D.thumbVal,D.secondThumbVal),p.onMove.call(E,m,D.thumbVal,D.secondThumbVal)),r&&(b=K)):D.error(V.notrange)},position:function(e,t){e=D.determine.value(e);"second"===t?(D.secondThumbVal=e,D.update.position(e,u)):(D.thumbVal=e,D.update.position(e,i)),m=Math.abs(D.thumbVal-(D.secondThumbVal||0)),D.set.value(m)}},update:{value:function(e,t){var n=D.get.min(),a=D.get.max();e<=n?e=n:a<=e&&(e=a),D.is.range()?((l=l===K?e<=D.get.currentThumbValue()?i:u:l).hasClass("second")?(p.preventCrossover&&D.is.range()&&(e=Math.max(D.thumbVal,e)),D.secondThumbVal=e):(p.preventCrossover&&D.is.range()&&(e=Math.min(D.secondThumbVal,e)),D.thumbVal=e),m=Math.abs(D.thumbVal-D.secondThumbVal)):(m=e,D.thumbVal=m),D.update.position(e),D.debug("Setting slider value to "+m),"function"==typeof t&&t(m,D.thumbVal,D.secondThumbVal)},position:function(e,t){var n=D.handleNewValuePosition(e),t=t!=K?t:l,a=D.thumbVal||D.get.min(),o=D.secondThumbVal||D.get.min();D.is.range()&&t.hasClass("second")?(g=n,o=e):(f=n,a=e);var r,s=D.get.min(),i=D.get.max(),e=(e-s)/(i-s)*100,u=(Math.min(a,o)-s)/(i-s)*100,a=100*(1-(Math.max(a,o)-s)/(i-s)),o=D.is.vertical()?D.is.reversed()?(r={bottom:"calc("+e+"% - "+v+"px)",top:"auto"},{bottom:u+"%",top:a+"%"}):(r={top:"calc("+e+"% - "+v+"px)",bottom:"auto"},{top:u+"%",bottom:a+"%"}):D.is.reversed()?(r={right:"calc("+e+"% - "+v+"px)",left:"auto"},{right:u+"%",left:a+"%"}):(r={left:"calc("+e+"% - "+v+"px)",right:"auto"},{left:u+"%",right:a+"%"});t.css(r),c.css(o),D.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=D.get.trackStartMargin(),a=D.get.trackEndMargin(),o=D.is.vertical()?D.is.reversed()?"bottom":"top":D.is.reversed()?"right":"left",r=D.is.reversed()&&!D.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+a+") * "+e)+r+n+")")}},goto:{max:function(){D.set.value(D.get.max())},min:function(){D.set.value(D.get.min())}},read:{metadata:function(){var e={thumbVal:P.data(a.thumbVal),secondThumbVal:P.data(a.secondThumbVal)};e.thumbVal&&(D.is.range()&&e.secondThumbVal?(D.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),D.set.rangeValue(e.thumbVal,e.secondThumbVal)):(D.debug("Current value set from metadata",e.thumbVal),D.set.value(e.thumbVal)))},settings:function(){!1!==p.start&&(D.is.range()?(D.debug("Start position set from settings",p.start,p.end),D.set.rangeValue(p.start,p.end)):(D.debug("Start position set from settings",p.start),D.set.value(p.start)))}},setting:function(e,t){if(D.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,p,e);else{if(t===K)return p[e];Y.isPlainObject(p[e])?Y.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,D,e);else{if(t===K)return D[e];D[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,p.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),D.verbose.apply(console,arguments)))},error:function(){p.silent||(D.error=Function.prototype.bind.call(console.error,console,p.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=Date.now())-(j||t),j=t,z.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var e=p.name+":",n=0;j=!1,clearTimeout(D.performance.timer),Y.each(z,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),(console.group!==K||console.table!==K)&&0<z.length&&(console.groupCollapsed(e),console.table?console.table(z):Y.each(z,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),z=[]}},invoke:function(a,e,t){var o,r,n,s,i=C;return e=e||B,t=t||E,"string"==typeof a&&i!==K&&(a=a.split(/[ .]/),o=a.length-1,Y.each(a,function(e,t){var n=e!=o?t+a[e+1].charAt(0).toUpperCase()+a[e+1].slice(1):a;if(Y.isPlainObject(i[n])&&e!=o)i=i[n];else{if(i[n]!==K)return r=i[n],!1;{if(!Y.isPlainObject(i[t])||e==o)return i[t]!==K?r=i[t]:D.error(V.method,a),!1;i=i[t]}}})),"function"==typeof(s=r)&&"number"!=typeof s.nodeType?n=r.apply(t,e):r!==K&&(n=r),Array.isArray(A)?A.push(n):A!==K?A=[A,n]:n!==K&&(A=n),r}};R?(C===K&&D.initialize(),D.invoke(I)):(C!==K&&C.invoke("destroy"),D.initialize())}),A!==K?A:this},Y.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document);
|