materialize-sass 1.0.0.alpha2 → 1.0.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +5 -5
  2. data/assets/javascripts/materialize-sprockets.js +1 -0
  3. data/assets/javascripts/materialize.js +1337 -1281
  4. data/assets/javascripts/materialize/autocomplete.js +27 -27
  5. data/assets/javascripts/materialize/buttons.js +58 -58
  6. data/assets/javascripts/materialize/carousel.js +47 -49
  7. data/assets/javascripts/materialize/cash.js +4 -4
  8. data/assets/javascripts/materialize/characterCounter.js +20 -20
  9. data/assets/javascripts/materialize/chips.js +42 -38
  10. data/assets/javascripts/materialize/collapsible.js +27 -27
  11. data/assets/javascripts/materialize/component.js +57 -0
  12. data/assets/javascripts/materialize/datepicker.js +59 -53
  13. data/assets/javascripts/materialize/dropdown.js +43 -43
  14. data/assets/javascripts/materialize/extras/nouislider.js +1 -1
  15. data/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
  16. data/assets/javascripts/materialize/forms.js +8 -2
  17. data/assets/javascripts/materialize/global.js +11 -13
  18. data/assets/javascripts/materialize/materialbox.js +72 -44
  19. data/assets/javascripts/materialize/modal.js +55 -38
  20. data/assets/javascripts/materialize/parallax.js +61 -24
  21. data/assets/javascripts/materialize/pushpin.js +37 -21
  22. data/assets/javascripts/materialize/range.js +19 -21
  23. data/assets/javascripts/materialize/scrollspy.js +23 -23
  24. data/assets/javascripts/materialize/select.js +42 -36
  25. data/assets/javascripts/materialize/sidenav.js +34 -34
  26. data/assets/javascripts/materialize/slider.js +37 -39
  27. data/assets/javascripts/materialize/tabs.js +42 -49
  28. data/assets/javascripts/materialize/tapTarget.js +39 -22
  29. data/assets/javascripts/materialize/timepicker.js +579 -579
  30. data/assets/javascripts/materialize/tooltip.js +34 -31
  31. data/assets/stylesheets/materialize/components/_cards.scss +0 -2
  32. data/assets/stylesheets/materialize/components/_global.scss +4 -14
  33. data/assets/stylesheets/materialize/components/_typography.scss +0 -1
  34. data/assets/stylesheets/materialize/components/_variables.scss +1 -1
  35. data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +0 -10
  36. data/assets/stylesheets/materialize/extras/nouislider.css +1 -1
  37. data/lib/materialize-sass/version.rb +1 -1
  38. metadata +4 -3
@@ -1,7 +1,13 @@
1
1
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
2
 
3
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
4
+
3
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
6
 
7
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
8
+
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
+
5
11
  (function ($) {
6
12
  'use strict';
7
13
 
@@ -83,7 +89,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
83
89
  *
84
90
  */
85
91
 
86
- var Datepicker = function () {
92
+ var Datepicker = function (_Component) {
93
+ _inherits(Datepicker, _Component);
94
+
87
95
  /**
88
96
  * Construct Datepicker instance and set up overlay
89
97
  * @constructor
@@ -93,51 +101,48 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
93
101
  function Datepicker(el, options) {
94
102
  _classCallCheck(this, Datepicker);
95
103
 
96
- // If exists, destroy and reinitialize
97
- if (!!el.M_Datepicker) {
98
- el.M_Datepicker.destroy();
99
- }
104
+ var _this = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
100
105
 
101
- this.el = el;
102
- this.$el = $(el);
103
- this.el.M_Datepicker = this;
106
+ _this.el.M_Datepicker = _this;
104
107
 
105
- this.options = $.extend({}, Datepicker.defaults, options);
108
+ _this.options = $.extend({}, Datepicker.defaults, options);
106
109
 
107
110
  // Remove time component from minDate and maxDate options
108
- if (this.options.minDate) this.options.minDate.setHours(0, 0, 0, 0);
109
- if (this.options.maxDate) this.options.maxDate.setHours(0, 0, 0, 0);
111
+ if (_this.options.minDate) _this.options.minDate.setHours(0, 0, 0, 0);
112
+ if (_this.options.maxDate) _this.options.maxDate.setHours(0, 0, 0, 0);
110
113
 
111
- this.id = M.guid();
114
+ _this.id = M.guid();
112
115
 
113
- this._setupVariables();
114
- this._insertHTMLIntoDOM();
115
- this._setupModal();
116
+ _this._setupVariables();
117
+ _this._insertHTMLIntoDOM();
118
+ _this._setupModal();
116
119
 
117
- this._setupEventHandlers();
120
+ _this._setupEventHandlers();
118
121
 
119
- if (!this.options.defaultDate) {
120
- this.options.defaultDate = new Date(Date.parse(this.el.value));
121
- this.options.setDefaultDate = true;
122
+ if (!_this.options.defaultDate) {
123
+ _this.options.defaultDate = new Date(Date.parse(_this.el.value));
124
+ _this.options.setDefaultDate = true;
122
125
  }
123
126
 
124
- var defDate = this.options.defaultDate;
127
+ var defDate = _this.options.defaultDate;
125
128
 
126
129
  if (Datepicker._isDate(defDate)) {
127
- if (this.options.setDefaultDate) {
128
- this.setDate(defDate, true);
130
+ if (_this.options.setDefaultDate) {
131
+ _this.setDate(defDate, true);
129
132
  } else {
130
- this.gotoDate(defDate);
133
+ _this.gotoDate(defDate);
131
134
  }
132
135
  } else {
133
- this.gotoDate(new Date());
136
+ _this.gotoDate(new Date());
134
137
  }
135
138
 
136
139
  /**
137
140
  * Describes open/close state of datepicker
138
141
  * @type {Boolean}
139
142
  */
140
- this.isOpen = false;
143
+ _this.isOpen = false;
144
+
145
+ return _this;
141
146
  }
142
147
 
143
148
  _createClass(Datepicker, [{
@@ -147,7 +152,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
147
152
  /**
148
153
  * Teardown component
149
154
  */
150
- value: function destroy() {}
155
+ value: function destroy() {
156
+ this._removeEventHandlers();
157
+ this.modal.destroy();
158
+ $(this.modalEl).remove();
159
+ this.el.M_Datepicker = undefined;
160
+ }
151
161
  }, {
152
162
  key: '_insertHTMLIntoDOM',
153
163
  value: function _insertHTMLIntoDOM() {
@@ -165,19 +175,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
165
175
  }, {
166
176
  key: '_setupModal',
167
177
  value: function _setupModal() {
168
- var _this = this;
178
+ var _this2 = this;
169
179
 
170
180
  this.modalEl.id = 'modal-' + this.id;
171
- this.modal = new M.Modal(this.modalEl, {
172
- complete: function () {
173
- _this.isOpen = false;
181
+ this.modal = M.Modal.init(this.modalEl, {
182
+ onCloseEnd: function () {
183
+ _this2.isOpen = false;
174
184
  }
175
185
  });
176
186
  }
177
187
  }, {
178
188
  key: 'toString',
179
189
  value: function toString(format) {
180
- var _this2 = this;
190
+ var _this3 = this;
181
191
 
182
192
  format = format || this.options.format;
183
193
  if (!Datepicker._isDate(this.date)) {
@@ -186,11 +196,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
186
196
 
187
197
  var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
188
198
  var formattedDate = formatArray.map(function (label) {
189
- if (_this2.formats[label]) {
190
- return _this2.formats[label]();
191
- } else {
192
- return label;
199
+ if (_this3.formats[label]) {
200
+ return _this3.formats[label]();
193
201
  }
202
+
203
+ return label;
194
204
  }).join('');
195
205
  return formattedDate;
196
206
  }
@@ -569,8 +579,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
569
579
  // Init Materialize Select
570
580
  var yearSelect = this.calendarEl.querySelector('.pika-select-year');
571
581
  var monthSelect = this.calendarEl.querySelector('.pika-select-month');
572
- new M.Select(yearSelect, { classes: 'select-year' });
573
- new M.Select(monthSelect, { classes: 'select-month' });
582
+ M.Select.init(yearSelect, { classes: 'select-year' });
583
+ M.Select.init(monthSelect, { classes: 'select-month' });
574
584
 
575
585
  // Add change handlers for select
576
586
  yearSelect.addEventListener('change', this._handleYearChange.bind(this));
@@ -608,7 +618,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
608
618
  }, {
609
619
  key: '_setupVariables',
610
620
  value: function _setupVariables() {
611
- var _this3 = this;
621
+ var _this4 = this;
612
622
 
613
623
  this.$modalEl = $(Datepicker._template);
614
624
  this.modalEl = this.$modalEl[0];
@@ -624,28 +634,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
624
634
  this.formats = {
625
635
 
626
636
  dd: function () {
627
- return _this3.date.getDate();
637
+ return _this4.date.getDate();
628
638
  },
629
639
  ddd: function () {
630
- return _this3.options.i18n.weekdaysShort[_this3.date.getDay()];
640
+ return _this4.options.i18n.weekdaysShort[_this4.date.getDay()];
631
641
  },
632
642
  dddd: function () {
633
- return _this3.options.i18n.weekdays[_this3.date.getDay()];
643
+ return _this4.options.i18n.weekdays[_this4.date.getDay()];
634
644
  },
635
645
  mm: function () {
636
- return _this3.date.getMonth() + 1;
646
+ return _this4.date.getMonth() + 1;
637
647
  },
638
648
  mmm: function () {
639
- return _this3.options.i18n.monthsShort[_this3.date.getMonth()];
649
+ return _this4.options.i18n.monthsShort[_this4.date.getMonth()];
640
650
  },
641
651
  mmmm: function () {
642
- return _this3.options.i18n.monthsShort[_this3.date.getMonth()];
652
+ return _this4.options.i18n.monthsShort[_this4.date.getMonth()];
643
653
  },
644
654
  yy: function () {
645
- return _this3.date.getFullYear().slice(2);
655
+ return _this4.date.getFullYear().slice(2);
646
656
  },
647
657
  yyyy: function () {
648
- return _this3.date.getFullYear();
658
+ return _this4.date.getFullYear();
649
659
  }
650
660
  };
651
661
  }
@@ -837,12 +847,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
837
847
  }
838
848
  }], [{
839
849
  key: 'init',
840
- value: function init($els, options) {
841
- var arr = [];
842
- $els.each(function () {
843
- arr.push(new Datepicker(this, options));
844
- });
845
- return arr;
850
+ value: function init(els, options) {
851
+ return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), 'init', this).call(this, this, els, options);
846
852
  }
847
853
  }, {
848
854
  key: '_isDate',
@@ -902,7 +908,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
902
908
  }]);
903
909
 
904
910
  return Datepicker;
905
- }();
911
+ }(Component);
906
912
 
907
913
  Datepicker._template = ['<div class= "modal datepicker-modal">', '<div class="modal-content datepicker-container">', '<div class="datepicker-date-display">', '<span class="year-text"></span>', '<span class="date-text"></span>', '</div>', '<div class="datepicker-calendar-container">', '<div class="pika-single"></div>', '<div class="datepicker-footer">', '<button class="btn-flat datepicker-clear waves-effect" type="button"></button>', '<div class="confirmation-btns">', '<button class="btn-flat datepicker-today waves-effect" type="button"></button>', '<button class="btn-flat datepicker-done waves-effect" type="button"></button>', '</div>', '</div>', '</div>', '</div>', '</div>'].join('');
908
914
 
@@ -1,7 +1,13 @@
1
1
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
2
 
3
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
4
+
3
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
6
 
7
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
8
+
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
+
5
11
  (function ($, anim) {
6
12
  'use strict';
7
13
 
@@ -23,23 +29,20 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
23
29
  * @class
24
30
  */
25
31
 
26
- var Dropdown = function () {
32
+ var Dropdown = function (_Component) {
33
+ _inherits(Dropdown, _Component);
34
+
27
35
  function Dropdown(el, options) {
28
36
  _classCallCheck(this, Dropdown);
29
37
 
30
- // If exists, destroy and reinitialize
31
- if (!!el.M_Dropdown) {
32
- el.M_Dropdown.destroy();
33
- }
38
+ var _this = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options));
34
39
 
35
- this.el = el;
36
- this.$el = $(el);
37
- this.el.M_Dropdown = this;
38
- Dropdown._dropdowns.push(this);
40
+ _this.el.M_Dropdown = _this;
41
+ Dropdown._dropdowns.push(_this);
39
42
 
40
- this.id = M.getIdFromTrigger(el);
41
- this.dropdownEl = document.getElementById(this.id);
42
- this.$dropdownEl = $(this.dropdownEl);
43
+ _this.id = M.getIdFromTrigger(el);
44
+ _this.dropdownEl = document.getElementById(_this.id);
45
+ _this.$dropdownEl = $(_this.dropdownEl);
43
46
 
44
47
  /**
45
48
  * Options for the dropdown
@@ -49,26 +52,27 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
49
52
  * @prop {Function} onCloseStart - Function called when sidenav starts exiting
50
53
  * @prop {Function} onCloseEnd - Function called when sidenav finishes exiting
51
54
  */
52
- this.options = $.extend({}, Dropdown.defaults, options);
55
+ _this.options = $.extend({}, Dropdown.defaults, options);
53
56
 
54
57
  /**
55
58
  * Describes open/close state of dropdown
56
59
  * @type {Boolean}
57
60
  */
58
- this.isOpen = false;
61
+ _this.isOpen = false;
59
62
 
60
- this.focusedIndex = -1;
61
- this.filterQuery = [];
63
+ _this.focusedIndex = -1;
64
+ _this.filterQuery = [];
62
65
 
63
66
  // Move dropdown-content after dropdown-trigger
64
- this.$el.after(this.dropdownEl);
65
-
66
- this._makeDropdownFocusable();
67
- this._resetFilterQueryBound = this._resetFilterQuery.bind(this);
68
- this._handleDocumentClickBound = this._handleDocumentClick.bind(this);
69
- this._handleDropdownKeydownBound = this._handleDropdownKeydown.bind(this);
70
- this._handleTriggerKeydownBound = this._handleTriggerKeydown.bind(this);
71
- this._setupEventHandlers();
67
+ _this.$el.after(_this.dropdownEl);
68
+
69
+ _this._makeDropdownFocusable();
70
+ _this._resetFilterQueryBound = _this._resetFilterQuery.bind(_this);
71
+ _this._handleDocumentClickBound = _this._handleDocumentClick.bind(_this);
72
+ _this._handleDropdownKeydownBound = _this._handleDropdownKeydown.bind(_this);
73
+ _this._handleTriggerKeydownBound = _this._handleTriggerKeydown.bind(_this);
74
+ _this._setupEventHandlers();
75
+ return _this;
72
76
  }
73
77
 
74
78
  _createClass(Dropdown, [{
@@ -173,20 +177,20 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
173
177
  }, {
174
178
  key: '_handleDocumentClick',
175
179
  value: function _handleDocumentClick(e) {
176
- var _this = this;
180
+ var _this2 = this;
177
181
 
178
182
  var $target = $(e.target);
179
183
  if (this.options.closeOnClick && $target.closest('.dropdown-content').length) {
180
184
  setTimeout(function () {
181
- _this.close();
185
+ _this2.close();
182
186
  }, 0);
183
187
  } else if ($target.closest('.dropdown-trigger').length) {
184
188
  setTimeout(function () {
185
- _this.close();
189
+ _this2.close();
186
190
  }, 0);
187
191
  } else if (!$target.closest('.dropdown-content').length) {
188
192
  setTimeout(function () {
189
- _this.close();
193
+ _this2.close();
190
194
  }, 0);
191
195
  }
192
196
  }
@@ -375,7 +379,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
375
379
  }, {
376
380
  key: '_animateIn',
377
381
  value: function _animateIn(positionInfo) {
378
- var _this2 = this;
382
+ var _this3 = this;
379
383
 
380
384
  // Place dropdown
381
385
  this.dropdownEl.style.left = positionInfo.x + 'px';
@@ -396,12 +400,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
396
400
  duration: this.options.inDuration,
397
401
  easing: 'easeOutQuint',
398
402
  complete: function (anim) {
399
- _this2.dropdownEl.focus();
403
+ _this3.dropdownEl.focus();
400
404
 
401
405
  // onOpenEnd callback
402
- if (typeof _this2.options.onOpenEnd === 'function') {
406
+ if (typeof _this3.options.onOpenEnd === 'function') {
403
407
  var elem = anim.animatables[0].target;
404
- _this2.options.onOpenEnd.call(elem, _this2.el);
408
+ _this3.options.onOpenEnd.call(elem, _this3.el);
405
409
  }
406
410
  }
407
411
  });
@@ -414,7 +418,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
414
418
  }, {
415
419
  key: '_animateOut',
416
420
  value: function _animateOut() {
417
- var _this3 = this;
421
+ var _this4 = this;
418
422
 
419
423
  anim.remove(this.dropdownEl);
420
424
  anim({
@@ -428,12 +432,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
428
432
  duration: this.options.outDuration,
429
433
  easing: 'easeOutQuint',
430
434
  complete: function (anim) {
431
- _this3._resetDropdownStyles();
435
+ _this4._resetDropdownStyles();
432
436
 
433
437
  // onCloseEnd callback
434
- if (typeof _this3.options.onCloseEnd === 'function') {
438
+ if (typeof _this4.options.onCloseEnd === 'function') {
435
439
  var elem = anim.animatables[0].target;
436
- _this3.options.onCloseEnd.call(_this3, _this3.el);
440
+ _this4.options.onCloseEnd.call(_this4, _this4.el);
437
441
  }
438
442
  }
439
443
  });
@@ -493,12 +497,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
493
497
  }
494
498
  }], [{
495
499
  key: 'init',
496
- value: function init($els, options) {
497
- var arr = [];
498
- $els.each(function () {
499
- arr.push(new Dropdown(this, options));
500
- });
501
- return arr;
500
+ value: function init(els, options) {
501
+ return _get(Dropdown.__proto__ || Object.getPrototypeOf(Dropdown), 'init', this).call(this, this, els, options);
502
502
  }
503
503
 
504
504
  /**
@@ -519,7 +519,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
519
519
  }]);
520
520
 
521
521
  return Dropdown;
522
- }();
522
+ }(Component);
523
523
 
524
524
  /**
525
525
  * @static
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v1.0.0-alpha.2 (http://materializecss.com)
2
+ * Materialize v1.0.0-alpha.3 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -1 +1 @@
1
- !function(){function t(t){return t.split("").reverse().join("")}function e(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(e,n,r,i,o,s,a,u,l,c,f,p){a=p;var d,h=f="";return s&&(p=s(p)),!("number"!=typeof p||!isFinite(p))&&(e&&0===parseFloat(p.toFixed(e))&&(p=0),0>p&&(d=!0,p=Math.abs(p)),e&&(s=Math.pow(10,e),p=(Math.round(p*s)/s).toFixed(e)),-1!==(p=p.toString()).indexOf(".")&&(e=p.split("."),p=e[0],r&&(f=r+e[1])),n&&(p=t(p).match(/.{1,3}/g),p=t(p.join(t(n)))),d&&u&&(h+=u),i&&(h+=i),d&&l&&(h+=l),h=h+p+f,o&&(h+=o),c&&(h=c(h,a)),h)}function r(t,e,n,r,i,o,s,a,u,l,c,f){var p;return t="",c&&(f=c(f)),!(!f||"string"!=typeof f)&&(a&&f.substring(0,a.length)===a&&(f=f.replace(a,""),p=!0),r&&f.substring(0,r.length)===r&&(f=f.replace(r,"")),u&&f.substring(0,u.length)===u&&(f=f.replace(u,""),p=!0),i&&f.slice(-1*i.length)===i&&(f=f.slice(0,-1*i.length)),e&&(f=f.split(e).join("")),n&&(f=f.replace(n,".")),p&&(t+="-"),t=Number((t+f).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t){var n,r,i,o={};for(n=0;n<a.length;n+=1)r=a[n],i=t[r],void 0===i?o[r]="negative"!==r||o.negativeBefore?"mark"===r&&"."!==o.thousand&&".":"-":"decimals"===r?0<i&&8>i&&(o[r]=i):"encoder"===r||"decoder"===r||"edit"===r||"undo"===r?"function"==typeof i&&(o[r]=i):"string"==typeof i&&(o[r]=i);return e(o,"mark","thousand"),e(o,"prefix","negative"),e(o,"prefix","negativeBefore"),o}function o(t,e,n){var r,i=[];for(r=0;r<a.length;r+=1)i.push(t[a[r]]);return i.push(n),e.apply("",i)}function s(t){if(!(this instanceof s))return new s(t);"object"==typeof t&&(t=i(t),this.to=function(e){return o(t,n,e)},this.from=function(e){return o(t,r,e)})}var a="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=s}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t,e){var n=document.createElement("div");return l(n,e),t.appendChild(n),n}function e(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function n(t,e){return Math.round(t/e)*e}function r(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument.documentElement,i=p();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0),e?n.top+i.y-r.clientTop:n.left+i.x-r.clientLeft}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){n>0&&(l(t,e),setTimeout(function(){c(t,e)},n))}function s(t){return Math.max(Math.min(t,100),0)}function a(t){return Array.isArray(t)?t:[t]}function u(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function l(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function c(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function f(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function p(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function d(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function h(t,e){return 100/(e-t)}function m(t,e){return 100*e/(t[1]-t[0])}function g(t,e){return m(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function v(t,e){return e*(t[1]-t[0])/100+t[0]}function b(t,e){for(var n=1;t>=e[n];)n+=1;return n}function w(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=b(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+g([r,i],n)/h(o,s)}function S(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=b(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],v([r,i],(n-o)*h(o,s))}function x(t,e,r,i){if(100===i)return i;var o,s,a=b(i,t);return r?(o=t[a-1],s=t[a],i-o>(s-o)/2?s:o):e[a-1]?t[a-1]+n(i-t[a-1],e[a-1]):i}function y(t,e,n){var r;if("number"==typeof e&&(e=[e]),"[object Array]"!==Object.prototype.toString.call(e))throw new Error("noUiSlider: 'range' contains invalid value.");if(r="min"===t?0:"max"===t?100:parseFloat(t),!i(r)||!i(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");n.xPct.push(r),n.xVal.push(e[0]),r?n.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(n.xSteps[0]=e[1]),n.xHighestCompleteStep.push(0)}function E(t,e,n){if(!e)return!0;n.xSteps[t]=m([n.xVal[t],n.xVal[t+1]],e)/h(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function C(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i<o.length;i++)y(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)E(i,this.xNumSteps[i],this)}function N(t,e){if(!i(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function U(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new C(e,t.snap,t.dir,t.singleStep)}function M(t,e){if(e=a(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function P(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function k(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function O(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function V(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=e}t.connect=r}function A(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function L(t,e){if(!i(e))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function F(t,e){if(!i(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function j(t,e){if(!i(e))throw new Error("noUiSlider: 'padding' option must be numeric.");if(0!==e){if(t.padding=t.spectrum.getMargin(e),!t.padding)throw new Error("noUiSlider: 'padding' option is only supported on linear sliders.");if(t.padding<0)throw new Error("noUiSlider: 'padding' option must be a positive number.");if(t.padding>=50)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function z(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function H(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");L(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function D(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(!0)}else{if(t.tooltips=a(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function T(t,e){if(t.format=e,"function"==typeof e.to&&"function"==typeof e.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function q(t,e){if(void 0!==e&&"string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function R(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix){t.cssClasses={};for(var n in e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n])}else t.cssClasses=e}function B(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function X(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,format:I},n={step:{r:!1,t:N},start:{r:!0,t:M},connect:{r:!0,t:V},direction:{r:!0,t:z},snap:{r:!1,t:P},animate:{r:!1,t:k},animationDuration:{r:!1,t:O},range:{r:!0,t:U},orientation:{r:!1,t:A},margin:{r:!1,t:L},limit:{r:!1,t:F},padding:{r:!1,t:j},behaviour:{r:!0,t:H},format:{r:!1,t:T},tooltips:{r:!1,t:D},cssPrefix:{r:!1,t:q},cssClasses:{r:!1,t:R},useRequestAnimationFrame:{r:!1,t:B}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleTouchArea:"handle-touch-area",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};Object.keys(n).forEach(function(i){if(void 0===t[i]&&void 0===r[i]){if(n[i].r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}n[i].t(e,void 0===t[i]?r[i]:t[i])}),e.pips=t.pips;var i=[["left","top"],["right","bottom"]];return e.style=i[e.dir][e.ort],e.styleOposite=i[e.dir?0:1][e.ort],e}function Y(n,i,u){function h(e,n){var r=t(e,i.cssClasses.origin),o=t(r,i.cssClasses.handle);return t(o,i.cssClasses.handleTouchArea),o.setAttribute("data-handle",n),0===n?l(o,i.cssClasses.handleLower):n===i.handles-1&&l(o,i.cssClasses.handleUpper),r}function m(e,n){return!!n&&t(e,i.cssClasses.connect)}function g(e,n){return!!i.tooltips[n]&&t(e.firstChild,i.cssClasses.tooltip)}function v(t,e,n){if("range"===t||"steps"===t)return tt.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return tt.fromStepping(n?tt.getStep(t):t)}):"values"===t?n?e.map(function(t){return tt.fromStepping(tt.getStep(tt.toStepping(t)))}):e:void 0}function b(t,n,r){function i(t,e){return(t+e).toFixed(7)/1}var o={},s=tt.xVal[0],a=tt.xVal[tt.xVal.length-1],u=!1,l=!1,c=0;return(r=e(r.slice().sort(function(t,e){return t-e})))[0]!==s&&(r.unshift(s),u=!0),r[r.length-1]!==a&&(r.push(a),l=!0),r.forEach(function(e,s){var a,f,p,d,h,m,g,v,b,w=e,S=r[s+1];if("steps"===n&&(a=tt.xNumSteps[s]),a||(a=S-w),!1!==w&&void 0!==S)for(a=Math.max(a,1e-7),f=w;f<=S;f=i(f,a)){for(g=(h=(d=tt.toStepping(f))-c)/t,b=h/(v=Math.round(g)),p=1;p<=v;p+=1)o[(c+p*b).toFixed(5)]=["x",0];m=r.indexOf(f)>-1?1:"steps"===n?2:0,!s&&u&&(m=0),f===S&&l||(o[d.toFixed(5)]=[f,m]),c=d}}),o}function w(t,e,n){function r(t,e){var n=e===i.cssClasses.value,r=n?p:d,o=n?c:f;return e+" "+r[i.ort]+" "+o[t]}function o(t,e,n){return'class="'+r(n[1],e)+'" style="'+i.style+": "+t+'%"'}function s(t,r){r[1]=r[1]&&e?e(r[0],r[1]):r[1],u+="<div "+o(t,i.cssClasses.marker,r)+"></div>",r[1]&&(u+="<div "+o(t,i.cssClasses.value,r)+">"+n.to(r[0])+"</div>")}var a=document.createElement("div"),u="",c=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],f=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],p=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],d=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return l(a,i.cssClasses.pips),l(a,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){s(e,t[e])}),a.innerHTML=u,a}function S(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=b(n,e,v(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return J.appendChild(w(i,r,o))}function x(){var t=I.getBoundingClientRect(),e="offset"+["Width","Height"][i.ort];return 0===i.ort?t.width||I[e]:t.height||I[e]}function y(t,e,n,r){var o=function(e){return!J.hasAttribute("disabled")&&(!f(J,i.cssClasses.tap)&&(!!(e=E(e,r.pageOffset))&&(!(t===G.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[i.ort],void n(e,r))))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!1),s.push([t,o])}),s}function E(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");if(0===t.type.indexOf("MSPointer")&&(s=!0),i){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}return e=e||p(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y),t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}function C(t){var e=100*(t-r(I,i.ort))/x();return i.dir?100-e:e}function N(t){var e=100,n=!1;return _.forEach(function(r,i){if(!r.hasAttribute("disabled")){var o=Math.abs(K[i]-t);o<e&&(n=i,e=o)}}),n}function U(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=F(i,t,i[t]+e,o[n],s[n]);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=D(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){M("update",t),M("slide",t)})}function M(t,e,n){Object.keys(nt).forEach(function(r){var o=r.split(".")[0];t===o&&nt[r].forEach(function(t){t.call($,et.map(i.format.to),e,et.slice(),n||!1,K.slice())})})}function P(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&O(t,e)}function k(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return O(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint);U(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function O(t,e){Z&&(c(Z,i.cssClasses.active),Z=!1),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener)),document.documentElement.noUiListeners.forEach(function(t){document.documentElement.removeEventListener(t[0],t[1])}),c(J,i.cssClasses.drag),H(),e.handleNumbers.forEach(function(t){M("set",t),M("change",t),M("end",t)})}function V(t,e){if(1===e.handleNumbers.length){var n=_[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;l(Z=n.children[0],i.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=y(G.move,document.documentElement,k,{startCalcPoint:t.calcPoint,baseSize:x(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:K.slice()}),o=y(G.end,document.documentElement,O,{handleNumbers:e.handleNumbers}),s=y("mouseout",document.documentElement,P,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(o,s),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,_.length>1&&l(J,i.cssClasses.drag);var a=function(){return!1};document.body.noUiListener=a,document.body.addEventListener("selectstart",a,!1)}e.handleNumbers.forEach(function(t){M("start",t)})}function A(t){t.stopPropagation();var e=C(t.calcPoint),n=N(e);if(!1===n)return!1;i.events.snap||o(J,i.cssClasses.tap,i.animationDuration),D(n,e,!0,!0),H(),M("slide",n,!0),M("set",n,!0),M("change",n,!0),M("update",n,!0),i.events.snap&&V(t,{handleNumbers:[n]})}function L(t){var e=C(t.calcPoint),n=tt.getStep(e),r=tt.fromStepping(n);Object.keys(nt).forEach(function(t){"hover"===t.split(".")[0]&&nt[t].forEach(function(t){t.call($,r)})})}function F(t,e,n,r,o){return _.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e<_.length-1&&(n=Math.min(n,t[e+1]-i.margin))),_.length>1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e<_.length-1&&(n=Math.max(n,t[e+1]-i.limit))),i.padding&&(0===e&&(n=Math.max(n,i.padding)),e===_.length-1&&(n=Math.min(n,100-i.padding))),n=tt.getStep(n),(n=s(n))!==t[e]&&n}function j(t){return t+"%"}function z(t,e){K[t]=e,et[t]=tt.fromStepping(e);var n=function(){_[t].style[i.style]=j(e),T(t),T(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}function H(){Q.forEach(function(t){var e=K[t]>50?-1:1,n=3+(_.length+e*t);_[t].childNodes[0].style.zIndex=n})}function D(t,e,n,r){return!1!==(e=F(K,t,e,n,r))&&(z(t,e),!0)}function T(t){if(W[t]){var e=0,n=100;0!==t&&(e=K[t-1]),t!==W.length-1&&(n=K[t]),W[t].style[i.style]=j(e),W[t].style[i.styleOposite]=j(100-n)}}function q(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=i.format.from(t))||isNaN(t)||D(e,tt.toStepping(t),!1,!1))}function R(t,e){var n=a(t),r=void 0===K[0];e=void 0===e||!!e,n.forEach(q),i.animate&&!r&&o(J,i.cssClasses.tap,i.animationDuration),Q.forEach(function(t){D(t,K[t],!0,!1)}),H(),Q.forEach(function(t){M("update",t),null!==n[t]&&e&&M("set",t)})}function B(){var t=et.map(i.format.to);return 1===t.length?t[0]:t}function Y(t,e){nt[t]=nt[t]||[],nt[t].push(e),"update"===t.split(".")[0]&&_.forEach(function(t,e){M("update",e)})}var I,_,W,$,G=d(),J=n,K=[],Q=[],Z=!1,tt=i.spectrum,et=[],nt={};if(J.noUiSlider)throw new Error("Slider was already initialized.");return function(e){l(e,i.cssClasses.target),0===i.dir?l(e,i.cssClasses.ltr):l(e,i.cssClasses.rtl),0===i.ort?l(e,i.cssClasses.horizontal):l(e,i.cssClasses.vertical),I=t(e,i.cssClasses.base)}(J),function(t,e){_=[],(W=[]).push(m(e,t[0]));for(var n=0;n<i.handles;n++)_.push(h(e,n)),Q[n]=n,W.push(m(e,t[n+1]))}(i.connect,I),$={destroy:function(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&c(J,i.cssClasses[t]);for(;J.firstChild;)J.removeChild(J.firstChild);delete J.noUiSlider},steps:function(){return K.map(function(t,e){var n=tt.getNearbySteps(t),r=et[e],i=n.thisStep.step,o=null;!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=tt.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:Y,off:function(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(nt).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete nt[t]})},get:B,set:R,reset:function(t){R(i.start,t)},__moveHandles:function(t,e,n){U(t,e,K,n)},options:u,updateOptions:function(t,e){var n=B(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=X(u);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),o.spectrum.direction=tt.direction,tt=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,K=[],R(t.start||n,e)},target:J,pips:S},function(t){t.fixed||_.forEach(function(t,e){y(G.start,t.children[0],V,{handleNumbers:[e]})}),t.tap&&y(G.start,I,A,{}),t.hover&&y(G.move,I,L,{hover:!0}),t.drag&&W.forEach(function(e,n){if(!1!==e&&0!==n&&n!==W.length-1){var r=_[n-1],o=_[n],s=[e];l(e,i.cssClasses.draggable),t.fixed&&(s.push(r.children[0]),s.push(o.children[0])),s.forEach(function(t){y(G.start,t,V,{handles:[r,o],handleNumbers:[n-1,n]})})}})}(i.events),R(i.start),i.pips&&S(i.pips),i.tooltips&&function(){var t=_.map(g);Y("update",function(e,n,r){if(t[n]){var o=e[n];!0!==i.tooltips[n]&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML="<span>"+o+"</span>"}})}(),$}C.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider: 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&m(this.xVal,t)},C.prototype.toStepping=function(t){return t=w(this.xVal,this.xPct,t)},C.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},C.prototype.getStep=function(t){return t=x(this.xPct,this.xSteps,this.snap,t)},C.prototype.getNearbySteps=function(t){var e=b(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},C.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},C.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var I={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=Y(t,X(e,t),e);return t.noUiSlider=n,n}}});
1
+ !function(){function t(t){return t.split("").reverse().join("")}function e(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(e,n,r,i,o,s,a,u,l,c,p,f){a=f;var d,h=p="";return s&&(f=s(f)),!("number"!=typeof f||!isFinite(f))&&(e&&0===parseFloat(f.toFixed(e))&&(f=0),0>f&&(d=!0,f=Math.abs(f)),e&&(s=Math.pow(10,e),f=(Math.round(f*s)/s).toFixed(e)),-1!==(f=f.toString()).indexOf(".")&&(e=f.split("."),f=e[0],r&&(p=r+e[1])),n&&(f=t(f).match(/.{1,3}/g),f=t(f.join(t(n)))),d&&u&&(h+=u),i&&(h+=i),d&&l&&(h+=l),h=h+f+p,o&&(h+=o),c&&(h=c(h,a)),h)}function r(t,e,n,r,i,o,s,a,u,l,c,p){var f;return t="",c&&(p=c(p)),!(!p||"string"!=typeof p)&&(a&&p.substring(0,a.length)===a&&(p=p.replace(a,""),f=!0),r&&p.substring(0,r.length)===r&&(p=p.replace(r,"")),u&&p.substring(0,u.length)===u&&(p=p.replace(u,""),f=!0),i&&p.slice(-1*i.length)===i&&(p=p.slice(0,-1*i.length)),e&&(p=p.split(e).join("")),n&&(p=p.replace(n,".")),f&&(t+="-"),t=Number((t+p).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t,e,n){var r,i=[];for(r=0;r<o.length;r+=1)i.push(t[o[r]]);return i.push(n),e.apply("",i)}var o="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=function t(s){if(!(this instanceof t))return new t(s);"object"==typeof s&&(s=function(t){var n,r,i,s={};for(n=0;n<o.length;n+=1)r=o[n],i=t[r],void 0===i?s[r]="negative"!==r||s.negativeBefore?"mark"===r&&"."!==s.thousand&&".":"-":"decimals"===r?0<i&&8>i&&(s[r]=i):"encoder"===r||"decoder"===r||"edit"===r||"undo"===r?"function"==typeof i&&(s[r]=i):"string"==typeof i&&(s[r]=i);return e(s,"mark","thousand"),e(s,"prefix","negative"),e(s,"prefix","negativeBefore"),s}(s),this.to=function(t){return i(s,n,t)},this.from=function(t){return i(s,r,t)})}}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t,e){var n=document.createElement("div");return o(n,e),t.appendChild(n),n}function e(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,n){n>0&&(o(t,e),setTimeout(function(){s(t,e)},n))}function r(t){return Array.isArray(t)?t:[t]}function i(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function o(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function s(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function a(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function u(t,e){return 100/(e-t)}function l(t,e){return 100*e/(t[1]-t[0])}function c(t,e){for(var n=1;t>=e[n];)n+=1;return n}function p(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=c(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+(p=[r,i],f=n,l(p,p[0]<0?f+Math.abs(p[0]):f-p[0])/u(o,s));var p,f}function f(t,e,n,r){if(100===r)return r;var i,o,s=c(r,t);return n?r-(i=t[s-1])>((o=t[s])-i)/2?o:i:e[s-1]?t[s-1]+(a=r-t[s-1],u=e[s-1],Math.round(a/u)*u):r;var a,u}function d(t,n,r){var i;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider: 'range' contains invalid value.");if(!e(i="min"===t?0:"max"===t?100:parseFloat(t))||!e(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");r.xPct.push(i),r.xVal.push(n[0]),i?r.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(r.xSteps[0]=n[1]),r.xHighestCompleteStep.push(0)}function h(t,e,n){if(!e)return!0;n.xSteps[t]=l([n.xVal[t],n.xVal[t+1]],e)/u(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function m(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i<o.length;i++)d(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)h(i,this.xNumSteps[i],this)}m.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider: 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&l(this.xVal,t)},m.prototype.toStepping=function(t){return t=p(this.xVal,this.xPct,t)},m.prototype.fromStepping=function(t){return function(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=c(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],l=[r,i],(n-o)*u(o,s)*(l[1]-l[0])/100+l[0];var l}(this.xVal,this.xPct,t)},m.prototype.getStep=function(t){return t=f(this.xPct,this.xSteps,this.snap,t)},m.prototype.getNearbySteps=function(t){var e=c(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},m.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(i);return Math.max.apply(null,t)},m.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var g={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function v(t,n){if(!e(n))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=n}function b(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new m(e,t.snap,t.dir,t.singleStep)}function w(t,e){if(e=r(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function S(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function x(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function y(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function E(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=e}t.connect=r}function C(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function N(t,n){if(!e(n))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==n&&(t.margin=t.spectrum.getMargin(n),!t.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function U(t,n){if(!e(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(n),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function M(t,n){if(!e(n))throw new Error("noUiSlider: 'padding' option must be numeric.");if(0!==n){if(t.padding=t.spectrum.getMargin(n),!t.padding)throw new Error("noUiSlider: 'padding' option is only supported on linear sliders.");if(t.padding<0)throw new Error("noUiSlider: 'padding' option must be a positive number.");if(t.padding>=50)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function P(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function k(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");N(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function O(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(!0)}else{if(t.tooltips=r(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function V(t,e){if(t.format=e,"function"==typeof e.to&&"function"==typeof e.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function A(t,e){if(void 0!==e&&"string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function L(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix){t.cssClasses={};for(var n in e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n])}else t.cssClasses=e}function F(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function j(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,format:g},n={step:{r:!1,t:v},start:{r:!0,t:w},connect:{r:!0,t:E},direction:{r:!0,t:P},snap:{r:!1,t:S},animate:{r:!1,t:x},animationDuration:{r:!1,t:y},range:{r:!0,t:b},orientation:{r:!1,t:C},margin:{r:!1,t:N},limit:{r:!1,t:U},padding:{r:!1,t:M},behaviour:{r:!0,t:k},format:{r:!1,t:V},tooltips:{r:!1,t:O},cssPrefix:{r:!1,t:A},cssClasses:{r:!1,t:L},useRequestAnimationFrame:{r:!1,t:F}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleTouchArea:"handle-touch-area",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};Object.keys(n).forEach(function(i){if(void 0===t[i]&&void 0===r[i]){if(n[i].r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}n[i].t(e,void 0===t[i]?r[i]:t[i])}),e.pips=t.pips;var i=[["left","top"],["right","bottom"]];return e.style=i[e.dir][e.ort],e.styleOposite=i[e.dir?0:1][e.ort],e}function z(e,i,u){var l,c,p,f,d=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},h=e,m=[],g=[],v=!1,b=i.spectrum,w=[],S={};function x(e,n){var r=t(e,i.cssClasses.origin),s=t(r,i.cssClasses.handle);return t(s,i.cssClasses.handleTouchArea),s.setAttribute("data-handle",n),0===n?o(s,i.cssClasses.handleLower):n===i.handles-1&&o(s,i.cssClasses.handleUpper),r}function y(e,n){return!!n&&t(e,i.cssClasses.connect)}function E(e,n){return!!i.tooltips[n]&&t(e.firstChild,i.cssClasses.tooltip)}function C(t,e,n){var r=document.createElement("div"),s="",a=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],u=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],l=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],c=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];o(r,i.cssClasses.pips),o(r,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical);function p(t,e,n){return'class="'+function(t,e){var n=e===i.cssClasses.value,r=n?a:u;return e+" "+(n?l:c)[i.ort]+" "+r[t]}(n[1],e)+'" style="'+i.style+": "+t+'%"'}return Object.keys(t).forEach(function(r){o=r,(a=t[r])[1]=a[1]&&e?e(a[0],a[1]):a[1],s+="<div "+p(o,i.cssClasses.marker,a)+"></div>",a[1]&&(s+="<div "+p(o,i.cssClasses.value,a)+">"+n.to(a[0])+"</div>");var o,a}),r.innerHTML=s,r}function N(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=function(t,e,n){var r={},i=b.xVal[0],o=b.xVal[b.xVal.length-1],s=!1,a=!1,u=0;l=n.slice().sort(function(t,e){return t-e});var l;return(n=l.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==i&&(n.unshift(i),s=!0),n[n.length-1]!==o&&(n.push(o),a=!0),n.forEach(function(i,o){var l,c,p,f,d,h,m,g,v,w=i,S=n[o+1];if("steps"===e&&(l=b.xNumSteps[o]),l||(l=S-w),!1!==w&&void 0!==S){for(l=Math.max(l,1e-7),c=w;c<=S;x=c,y=l,c=(x+y).toFixed(7)/1){for(m=(d=(f=b.toStepping(c))-u)/t,v=d/(g=Math.round(m)),p=1;p<=g;p+=1)r[(u+p*v).toFixed(5)]=["x",0];h=n.indexOf(c)>-1?1:"steps"===e?2:0,!o&&s&&(h=0),c===S&&a||(r[f.toFixed(5)]=[c,h]),u=f}var x,y}}),r}(n,e,function(t,e,n){if("range"===t||"steps"===t)return b.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return b.fromStepping(n?b.getStep(t):t)}):"values"===t?n?e.map(function(t){return b.fromStepping(b.getStep(b.toStepping(t)))}):e:void 0}(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return h.appendChild(C(i,r,o))}function U(){var t=l.getBoundingClientRect(),e="offset"+["Width","Height"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}function M(t,e,n,r){var o=function(e){if(h.hasAttribute("disabled"))return!1;if(o=h,s=i.cssClasses.tap,o.classList?o.classList.contains(s):new RegExp("\\b"+s+"\\b").test(o.className))return!1;var o,s;return!!(e=function(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(s=!0);if(i){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}e=e||a(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y);return t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}(e,r.pageOffset))&&(!(t===d.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[i.ort],void n(e,r))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!1),s.push([t,o])}),s}function P(t){var e=100*(t-function(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument.documentElement,i=a();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0),e?n.top+i.y-r.clientTop:n.left+i.x-r.clientLeft}(l,i.ort))/U();return i.dir?100-e:e}function k(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=D(i,t,i[t]+e,o[n],s[n]);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=R(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){O("update",t),O("slide",t)})}function O(t,e,n){Object.keys(S).forEach(function(r){var o=r.split(".")[0];t===o&&S[r].forEach(function(t){t.call(f,w.map(i.format.to),e,w.slice(),n||!1,m.slice())})})}function V(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&L(t,e)}function A(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return L(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint);k(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function L(t,e){v&&(s(v,i.cssClasses.active),v=!1),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener)),document.documentElement.noUiListeners.forEach(function(t){document.documentElement.removeEventListener(t[0],t[1])}),s(h,i.cssClasses.drag),q(),e.handleNumbers.forEach(function(t){O("set",t),O("change",t),O("end",t)})}function F(t,e){if(1===e.handleNumbers.length){var n=c[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;o(v=n.children[0],i.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=M(d.move,document.documentElement,A,{startCalcPoint:t.calcPoint,baseSize:U(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:m.slice()}),s=M(d.end,document.documentElement,L,{handleNumbers:e.handleNumbers}),a=M("mouseout",document.documentElement,V,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(s,a),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,c.length>1&&o(h,i.cssClasses.drag);var u=function(){return!1};document.body.noUiListener=u,document.body.addEventListener("selectstart",u,!1)}e.handleNumbers.forEach(function(t){O("start",t)})}function z(t){t.stopPropagation();var e=P(t.calcPoint),r=function(t){var e=100,n=!1;return c.forEach(function(r,i){if(!r.hasAttribute("disabled")){var o=Math.abs(m[i]-t);o<e&&(n=i,e=o)}}),n}(e);if(!1===r)return!1;i.events.snap||n(h,i.cssClasses.tap,i.animationDuration),R(r,e,!0,!0),q(),O("slide",r,!0),O("set",r,!0),O("change",r,!0),O("update",r,!0),i.events.snap&&F(t,{handleNumbers:[r]})}function H(t){var e=P(t.calcPoint),n=b.getStep(e),r=b.fromStepping(n);Object.keys(S).forEach(function(t){"hover"===t.split(".")[0]&&S[t].forEach(function(t){t.call(f,r)})})}function D(t,e,n,r,o){c.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e<c.length-1&&(n=Math.min(n,t[e+1]-i.margin))),c.length>1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e<c.length-1&&(n=Math.max(n,t[e+1]-i.limit))),i.padding&&(0===e&&(n=Math.max(n,i.padding)),e===c.length-1&&(n=Math.min(n,100-i.padding))),n=b.getStep(n),s=n;var s;return(n=Math.max(Math.min(s,100),0))!==t[e]&&n}function T(t){return t+"%"}function q(){g.forEach(function(t){var e=m[t]>50?-1:1,n=3+(c.length+e*t);c[t].childNodes[0].style.zIndex=n})}function R(t,e,n,r){return!1!==(e=D(m,t,e,n,r))&&(function(t,e){m[t]=e,w[t]=b.fromStepping(e);var n=function(){c[t].style[i.style]=T(e),B(t),B(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}(t,e),!0)}function B(t){if(p[t]){var e=0,n=100;0!==t&&(e=m[t-1]),t!==p.length-1&&(n=m[t]),p[t].style[i.style]=T(e),p[t].style[i.styleOposite]=T(100-n)}}function X(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=i.format.from(t))||isNaN(t)||R(e,b.toStepping(t),!1,!1))}function Y(t,e){var o=r(t),s=void 0===m[0];e=void 0===e||!!e,o.forEach(X),i.animate&&!s&&n(h,i.cssClasses.tap,i.animationDuration),g.forEach(function(t){R(t,m[t],!0,!1)}),q(),g.forEach(function(t){O("update",t),null!==o[t]&&e&&O("set",t)})}function I(){var t=w.map(i.format.to);return 1===t.length?t[0]:t}function _(t,e){S[t]=S[t]||[],S[t].push(e),"update"===t.split(".")[0]&&c.forEach(function(t,e){O("update",e)})}if(h.noUiSlider)throw new Error("Slider was already initialized.");o(W=h,i.cssClasses.target),0===i.dir?o(W,i.cssClasses.ltr):o(W,i.cssClasses.rtl),0===i.ort?o(W,i.cssClasses.horizontal):o(W,i.cssClasses.vertical),l=t(W,i.cssClasses.base);var W;!function(t,e){c=[],(p=[]).push(y(e,t[0]));for(var n=0;n<i.handles;n++)c.push(x(e,n)),g[n]=n,p.push(y(e,t[n+1]))}(i.connect,l),f={destroy:function(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&s(h,i.cssClasses[t]);for(;h.firstChild;)h.removeChild(h.firstChild);delete h.noUiSlider},steps:function(){return m.map(function(t,e){var n=b.getNearbySteps(t),r=w[e],i=n.thisStep.step,o=null;!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=b.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:_,off:function(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(S).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete S[t]})},get:I,set:Y,reset:function(t){Y(i.start,t)},__moveHandles:function(t,e,n){k(t,e,m,n)},options:u,updateOptions:function(t,e){var n=I(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=j(u);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),o.spectrum.direction=b.direction,b=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,m=[],Y(t.start||n,e)},target:h,pips:N},($=i.events).fixed||c.forEach(function(t,e){M(d.start,t.children[0],F,{handleNumbers:[e]})}),$.tap&&M(d.start,l,z,{}),$.hover&&M(d.move,l,H,{hover:!0}),$.drag&&p.forEach(function(t,e){if(!1!==t&&0!==e&&e!==p.length-1){var n=c[e-1],r=c[e],s=[t];o(t,i.cssClasses.draggable),$.fixed&&(s.push(n.children[0]),s.push(r.children[0])),s.forEach(function(t){M(d.start,t,F,{handles:[n,r],handleNumbers:[e-1,e]})})}});var $;return Y(i.start),i.pips&&N(i.pips),i.tooltips&&function(){var t=c.map(E);_("update",function(e,n,r){if(t[n]){var o=e[n];!0!==i.tooltips[n]&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML="<span>"+o+"</span>"}})}(),f}return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=z(t,j(e),e);return t.noUiSlider=n,n}}});
@@ -39,6 +39,11 @@
39
39
  };
40
40
 
41
41
  M.textareaAutoResize = function ($textarea) {
42
+ // Wrap if native element
43
+ if ($textarea instanceof Element) {
44
+ $textarea = $($textarea);
45
+ }
46
+
42
47
  // Textarea Auto Resize
43
48
  var hiddenDiv = $('.hiddendiv').first();
44
49
  if (!hiddenDiv.length) {
@@ -204,11 +209,12 @@
204
209
  $(text_area_selector).each(function () {
205
210
  var $textarea = $(this);
206
211
  /**
207
- * Instead of resizing textarea on document load,
208
- * store the original height and the original length
212
+ * Resize textarea on document load after storing
213
+ * the original height and the original length
209
214
  */
210
215
  $textarea.data('original-height', $textarea.height());
211
216
  $textarea.data('previous-length', this.value.length);
217
+ M.textareaAutoResize($textarea);
212
218
  });
213
219
 
214
220
  $(document).on('keyup', text_area_selector, function () {