@materializecss/materialize 1.2.1 → 1.2.2

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Materialize v1.2.1 (https://materializecss.github.io/materialize)
3
- * Copyright 2014-2022 Materialize
2
+ * Materialize v1.2.2 (https://materializecss.github.io/materialize)
3
+ * Copyright 2014-2023 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
5
5
  */
6
6
  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); } };
@@ -1695,7 +1695,7 @@ if (typeof define === 'function' && define.amd) {
1695
1695
  exports.default = M;
1696
1696
  }
1697
1697
 
1698
- M.version = '1.2.0';
1698
+ M.version = '1.2.1';
1699
1699
 
1700
1700
  M.keys = {
1701
1701
  TAB: 9,
@@ -3385,7 +3385,7 @@ $jscomp.polyfill = function (e, r, p, m) {
3385
3385
 
3386
3386
  // Container here will be closest ancestor with overflow: hidden
3387
3387
  var closestOverflowParent = getClosestAncestor(this.dropdownEl, function (ancestor) {
3388
- return $(ancestor).css('overflow') !== 'visible';
3388
+ return !$(ancestor).is('html,body') && $(ancestor).css('overflow') !== 'visible';
3389
3389
  });
3390
3390
  // Fallback
3391
3391
  if (!closestOverflowParent) {
@@ -7550,7 +7550,10 @@ $jscomp.polyfill = function (e, r, p, m) {
7550
7550
  indicators: true,
7551
7551
  height: 400,
7552
7552
  duration: 500,
7553
- interval: 6000
7553
+ interval: 6000,
7554
+ pauseOnFocus: true,
7555
+ pauseOnHover: true,
7556
+ indicatorLabelFunc: null // Function which will generate a label for the indicators (ARIA)
7554
7557
  };
7555
7558
 
7556
7559
  /**
@@ -7581,9 +7584,19 @@ $jscomp.polyfill = function (e, r, p, m) {
7581
7584
  * @prop {Number} [height=400] - height of slider
7582
7585
  * @prop {Number} [duration=500] - Length in ms of slide transition
7583
7586
  * @prop {Number} [interval=6000] - Length in ms of slide interval
7587
+ * @prop {Boolean} [pauseOnFocus=true] - Pauses transition when slider receives keyboard focus
7588
+ * @prop {Boolean} [pauseOnHover=true] - Pauses transition while mouse hovers the slider
7589
+ * @prop {Function} [indicatorLabelFunc=null] - Function used to generate ARIA label to indicators (for accessibility purposes).
7584
7590
  */
7585
7591
  _this40.options = $.extend({}, Slider.defaults, options);
7586
7592
 
7593
+ // init props
7594
+ _this40.interval = null;
7595
+ _this40.eventPause = false;
7596
+ _this40._hovered = false;
7597
+ _this40._focused = false;
7598
+ _this40._focusCurrent = false;
7599
+
7587
7600
  // setup
7588
7601
  _this40.$slider = _this40.$el.find('.slides');
7589
7602
  _this40.$slides = _this40.$slider.children('li');
@@ -7596,6 +7609,12 @@ $jscomp.polyfill = function (e, r, p, m) {
7596
7609
 
7597
7610
  _this40._setSliderHeight();
7598
7611
 
7612
+ // Sets element id if it does not have one
7613
+ if (_this40.$slider.attr('id')) _this40._sliderId = _this40.$slider.attr('id');else {
7614
+ _this40._sliderId = 'slider-' + M.guid();
7615
+ _this40.$slider.attr('id', _this40._sliderId);
7616
+ }
7617
+
7599
7618
  // Set initial positions of captions
7600
7619
  _this40.$slides.find('.caption').each(function (el) {
7601
7620
  _this40._animateCaptionIn(el, 0);
@@ -7609,12 +7628,18 @@ $jscomp.polyfill = function (e, r, p, m) {
7609
7628
  $(el).attr('src', placeholderBase64);
7610
7629
  }
7611
7630
  });
7631
+ _this40.$slides.each(function (el) {
7632
+ // Sets slide as focusable by code
7633
+ if (!el.hasAttribute('tabindex')) el.setAttribute('tabindex', -1);
7634
+ // Removes initial visibility from "inactive" slides
7635
+ el.style.visibility = 'hidden';
7636
+ });
7612
7637
 
7613
7638
  _this40._setupIndicators();
7614
7639
 
7615
7640
  // Show active slide
7616
7641
  if (_this40.$active) {
7617
- _this40.$active.css('display', 'block');
7642
+ _this40.$active.css('display', 'block').css('visibility', 'visible');
7618
7643
  } else {
7619
7644
  _this40.$slides.first().addClass('active');
7620
7645
  anim({
@@ -7623,13 +7648,14 @@ $jscomp.polyfill = function (e, r, p, m) {
7623
7648
  duration: _this40.options.duration,
7624
7649
  easing: 'easeOutQuad'
7625
7650
  });
7651
+ _this40.$slides.first().css('visibility', 'visible');
7626
7652
 
7627
7653
  _this40.activeIndex = 0;
7628
7654
  _this40.$active = _this40.$slides.eq(_this40.activeIndex);
7629
7655
 
7630
7656
  // Update indicators
7631
7657
  if (_this40.options.indicators) {
7632
- _this40.$indicators.eq(_this40.activeIndex).addClass('active');
7658
+ _this40.$indicators.eq(_this40.activeIndex).children().first().addClass('active');
7633
7659
  }
7634
7660
  }
7635
7661
 
@@ -7673,15 +7699,24 @@ $jscomp.polyfill = function (e, r, p, m) {
7673
7699
  }, {
7674
7700
  key: "_setupEventHandlers",
7675
7701
  value: function _setupEventHandlers() {
7676
- var _this41 = this;
7677
-
7678
7702
  this._handleIntervalBound = this._handleInterval.bind(this);
7679
7703
  this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
7704
+ this._handleAutoPauseFocusBound = this._handleAutoPauseFocus.bind(this);
7705
+ this._handleAutoStartFocusBound = this._handleAutoStartFocus.bind(this);
7706
+ this._handleAutoPauseHoverBound = this._handleAutoPauseHover.bind(this);
7707
+ this._handleAutoStartHoverBound = this._handleAutoStartHover.bind(this);
7708
+
7709
+ if (this.options.pauseOnFocus) {
7710
+ this.el.addEventListener('focusin', this._handleAutoPauseFocusBound);
7711
+ this.el.addEventListener('focusout', this._handleAutoStartFocusBound);
7712
+ }
7713
+ if (this.options.pauseOnHover) {
7714
+ this.el.addEventListener('mouseenter', this._handleAutoPauseHoverBound);
7715
+ this.el.addEventListener('mouseleave', this._handleAutoStartHoverBound);
7716
+ }
7680
7717
 
7681
7718
  if (this.options.indicators) {
7682
- this.$indicators.each(function (el) {
7683
- el.addEventListener('click', _this41._handleIndicatorClickBound);
7684
- });
7719
+ this.$indicators.children().on('click', this._handleIndicatorClickBound);
7685
7720
  }
7686
7721
  }
7687
7722
 
@@ -7692,12 +7727,16 @@ $jscomp.polyfill = function (e, r, p, m) {
7692
7727
  }, {
7693
7728
  key: "_removeEventHandlers",
7694
7729
  value: function _removeEventHandlers() {
7695
- var _this42 = this;
7696
-
7730
+ if (this.options.pauseOnFocus) {
7731
+ this.el.removeEventListener('focusin', this._handleAutoPauseFocusBound);
7732
+ this.el.removeEventListener('focusout', this._handleAutoStartFocusBound);
7733
+ }
7734
+ if (this.options.pauseOnHover) {
7735
+ this.el.removeEventListener('mouseenter', this._handleAutoPauseHoverBound);
7736
+ this.el.removeEventListener('mouseleave', this._handleAutoStartHoverBound);
7737
+ }
7697
7738
  if (this.options.indicators) {
7698
- this.$indicators.each(function (el) {
7699
- el.removeEventListener('click', _this42._handleIndicatorClickBound);
7700
- });
7739
+ this.$indicators.children().off('click', this._handleIndicatorClickBound);
7701
7740
  }
7702
7741
  }
7703
7742
 
@@ -7709,10 +7748,63 @@ $jscomp.polyfill = function (e, r, p, m) {
7709
7748
  }, {
7710
7749
  key: "_handleIndicatorClick",
7711
7750
  value: function _handleIndicatorClick(e) {
7712
- var currIndex = $(e.target).index();
7751
+ var currIndex = $(e.target).parent().index();
7752
+ this._focusCurrent = true;
7713
7753
  this.set(currIndex);
7714
7754
  }
7715
7755
 
7756
+ /**
7757
+ * Mouse enter event handler
7758
+ */
7759
+
7760
+ }, {
7761
+ key: "_handleAutoPauseHover",
7762
+ value: function _handleAutoPauseHover() {
7763
+ this._hovered = true;
7764
+ if (this.interval != null) {
7765
+ this._pause(true);
7766
+ }
7767
+ }
7768
+
7769
+ /**
7770
+ * Focus in event handler
7771
+ */
7772
+
7773
+ }, {
7774
+ key: "_handleAutoPauseFocus",
7775
+ value: function _handleAutoPauseFocus() {
7776
+ this._focused = true;
7777
+ if (this.interval != null) {
7778
+ this._pause(true);
7779
+ }
7780
+ }
7781
+
7782
+ /**
7783
+ * Mouse enter event handler
7784
+ */
7785
+
7786
+ }, {
7787
+ key: "_handleAutoStartHover",
7788
+ value: function _handleAutoStartHover() {
7789
+ this._hovered = false;
7790
+ if (!(this.options.pauseOnFocus && this._focused) && this.eventPause) {
7791
+ this.start();
7792
+ }
7793
+ }
7794
+
7795
+ /**
7796
+ * Focus out leave event handler
7797
+ */
7798
+
7799
+ }, {
7800
+ key: "_handleAutoStartFocus",
7801
+ value: function _handleAutoStartFocus() {
7802
+ this._focused = false;
7803
+ if (!(this.options.pauseOnHover && this._hovered) && this.eventPause) {
7804
+ this.start();
7805
+ }
7806
+ }
7807
+
7716
7808
  /**
7717
7809
  * Handle Interval
7718
7810
  */
@@ -7781,13 +7873,14 @@ $jscomp.polyfill = function (e, r, p, m) {
7781
7873
  }, {
7782
7874
  key: "_setupIndicators",
7783
7875
  value: function _setupIndicators() {
7784
- var _this43 = this;
7876
+ var _this41 = this;
7785
7877
 
7786
7878
  if (this.options.indicators) {
7787
7879
  this.$indicators = $('<ul class="indicators"></ul>');
7788
- this.$slides.each(function (el, index) {
7789
- var $indicator = $('<li class="indicator-item"></li>');
7790
- _this43.$indicators.append($indicator[0]);
7880
+ this.$slides.each(function (el, i) {
7881
+ var label = _this41.options.indicatorLabelFunc ? _this41.options.indicatorLabelFunc.call(_this41, i + 1, i === 0) : "" + (i + 1);
7882
+ var $indicator = $("<li class=\"indicator-item\">\n <button type=\"button\" class=\"indicator-item-btn\" aria-label=\"" + label + "\" aria-controls=\"" + _this41._sliderId + "\"></button>\n </li>");
7883
+ _this41.$indicators.append($indicator[0]);
7791
7884
  });
7792
7885
  this.$el.append(this.$indicators[0]);
7793
7886
  this.$indicators = this.$indicators.children('li.indicator-item');
@@ -7812,7 +7905,7 @@ $jscomp.polyfill = function (e, r, p, m) {
7812
7905
  }, {
7813
7906
  key: "set",
7814
7907
  value: function set(index) {
7815
- var _this44 = this;
7908
+ var _this42 = this;
7816
7909
 
7817
7910
  // Wrap around indices.
7818
7911
  if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1;
@@ -7822,6 +7915,8 @@ $jscomp.polyfill = function (e, r, p, m) {
7822
7915
  this.$active = this.$slides.eq(this.activeIndex);
7823
7916
  var $caption = this.$active.find('.caption');
7824
7917
  this.$active.removeClass('active');
7918
+ // Enables every slide
7919
+ this.$slides.css('visibility', 'visible');
7825
7920
 
7826
7921
  anim({
7827
7922
  targets: this.$active[0],
@@ -7829,7 +7924,7 @@ $jscomp.polyfill = function (e, r, p, m) {
7829
7924
  duration: this.options.duration,
7830
7925
  easing: 'easeOutQuad',
7831
7926
  complete: function () {
7832
- _this44.$slides.not('.active').each(function (el) {
7927
+ _this42.$slides.not('.active').each(function (el) {
7833
7928
  anim({
7834
7929
  targets: el,
7835
7930
  opacity: 0,
@@ -7838,6 +7933,8 @@ $jscomp.polyfill = function (e, r, p, m) {
7838
7933
  duration: 0,
7839
7934
  easing: 'easeOutQuad'
7840
7935
  });
7936
+ // Disables invisible slides (for assistive technologies)
7937
+ el.style.visibility = 'hidden';
7841
7938
  });
7842
7939
  }
7843
7940
  });
@@ -7846,8 +7943,14 @@ $jscomp.polyfill = function (e, r, p, m) {
7846
7943
 
7847
7944
  // Update indicators
7848
7945
  if (this.options.indicators) {
7849
- this.$indicators.eq(this.activeIndex).removeClass('active');
7850
- this.$indicators.eq(index).addClass('active');
7946
+ var activeIndicator = this.$indicators.eq(this.activeIndex).children().first();
7947
+ var nextIndicator = this.$indicators.eq(index).children().first();
7948
+ activeIndicator.removeClass('active');
7949
+ nextIndicator.addClass('active');
7950
+ if (typeof this.options.indicatorLabelFunc === "function") {
7951
+ activeIndicator.attr('aria-label', this.options.indicatorLabelFunc.call(this, this.$indicators.eq(this.activeIndex).index(), false));
7952
+ nextIndicator.attr('aria-label', this.options.indicatorLabelFunc.call(this, this.$indicators.eq(index).index(), true));
7953
+ }
7851
7954
  }
7852
7955
 
7853
7956
  anim({
@@ -7868,13 +7971,33 @@ $jscomp.polyfill = function (e, r, p, m) {
7868
7971
  });
7869
7972
 
7870
7973
  this.$slides.eq(index).addClass('active');
7974
+ if (this._focusCurrent) {
7975
+ this.$slides.eq(index)[0].focus();
7976
+ this._focusCurrent = false;
7977
+ }
7871
7978
  this.activeIndex = index;
7872
7979
 
7873
- // Reset interval
7874
- this.start();
7980
+ // Reset interval, if allowed. This check prevents autostart
7981
+ // when slider is paused, since it can be changed though indicators.
7982
+ if (this.interval != null) {
7983
+ this.start();
7984
+ }
7875
7985
  }
7876
7986
  }
7877
7987
 
7988
+ /**
7989
+ * "Protected" function which pauses current interval
7990
+ * @param {boolean} fromEvent Specifies if request came from event
7991
+ */
7992
+
7993
+ }, {
7994
+ key: "_pause",
7995
+ value: function _pause(fromEvent) {
7996
+ clearInterval(this.interval);
7997
+ this.eventPause = fromEvent;
7998
+ this.interval = null;
7999
+ }
8000
+
7878
8001
  /**
7879
8002
  * Pause slider interval
7880
8003
  */
@@ -7882,7 +8005,7 @@ $jscomp.polyfill = function (e, r, p, m) {
7882
8005
  }, {
7883
8006
  key: "pause",
7884
8007
  value: function pause() {
7885
- clearInterval(this.interval);
8008
+ this._pause(false);
7886
8009
  }
7887
8010
 
7888
8011
  /**
@@ -7894,6 +8017,7 @@ $jscomp.polyfill = function (e, r, p, m) {
7894
8017
  value: function start() {
7895
8018
  clearInterval(this.interval);
7896
8019
  this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval);
8020
+ this.eventPause = false;
7897
8021
  }
7898
8022
 
7899
8023
  /**
@@ -8029,9 +8153,9 @@ $jscomp.polyfill = function (e, r, p, m) {
8029
8153
  function Chips(el, options) {
8030
8154
  _classCallCheck(this, Chips);
8031
8155
 
8032
- var _this45 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options));
8156
+ var _this43 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options));
8033
8157
 
8034
- _this45.el.M_Chips = _this45;
8158
+ _this43.el.M_Chips = _this43;
8035
8159
 
8036
8160
  /**
8037
8161
  * Options for the modal
@@ -8041,34 +8165,34 @@ $jscomp.polyfill = function (e, r, p, m) {
8041
8165
  * @prop {String} secondaryPlaceholder
8042
8166
  * @prop {Object} autocompleteOptions
8043
8167
  */
8044
- _this45.options = $.extend({}, Chips.defaults, options);
8168
+ _this43.options = $.extend({}, Chips.defaults, options);
8045
8169
 
8046
- _this45.$el.addClass('chips input-field');
8047
- _this45.chipsData = [];
8048
- _this45.$chips = $();
8049
- _this45._setupInput();
8050
- _this45.hasAutocomplete = Object.keys(_this45.options.autocompleteOptions).length > 0;
8170
+ _this43.$el.addClass('chips input-field');
8171
+ _this43.chipsData = [];
8172
+ _this43.$chips = $();
8173
+ _this43._setupInput();
8174
+ _this43.hasAutocomplete = Object.keys(_this43.options.autocompleteOptions).length > 0;
8051
8175
 
8052
8176
  // Set input id
8053
- if (!_this45.$input.attr('id')) {
8054
- _this45.$input.attr('id', M.guid());
8177
+ if (!_this43.$input.attr('id')) {
8178
+ _this43.$input.attr('id', M.guid());
8055
8179
  }
8056
8180
 
8057
8181
  // Render initial chips
8058
- if (_this45.options.data.length) {
8059
- _this45.chipsData = _this45.options.data;
8060
- _this45._renderChips(_this45.chipsData);
8182
+ if (_this43.options.data.length) {
8183
+ _this43.chipsData = _this43.options.data;
8184
+ _this43._renderChips(_this43.chipsData);
8061
8185
  }
8062
8186
 
8063
8187
  // Setup autocomplete if needed
8064
- if (_this45.hasAutocomplete) {
8065
- _this45._setupAutocomplete();
8188
+ if (_this43.hasAutocomplete) {
8189
+ _this43._setupAutocomplete();
8066
8190
  }
8067
8191
 
8068
- _this45._setPlaceholder();
8069
- _this45._setupLabel();
8070
- _this45._setupEventHandlers();
8071
- return _this45;
8192
+ _this43._setPlaceholder();
8193
+ _this43._setupLabel();
8194
+ _this43._setupEventHandlers();
8195
+ return _this43;
8072
8196
  }
8073
8197
 
8074
8198
  _createClass(Chips, [{
@@ -8273,14 +8397,14 @@ $jscomp.polyfill = function (e, r, p, m) {
8273
8397
  }, {
8274
8398
  key: "_setupAutocomplete",
8275
8399
  value: function _setupAutocomplete() {
8276
- var _this46 = this;
8400
+ var _this44 = this;
8277
8401
 
8278
8402
  this.options.autocompleteOptions.onAutocomplete = function (val) {
8279
- _this46.addChip({
8403
+ _this44.addChip({
8280
8404
  tag: val
8281
8405
  });
8282
- _this46.$input[0].value = '';
8283
- _this46.$input[0].focus();
8406
+ _this44.$input[0].value = '';
8407
+ _this44.$input[0].focus();
8284
8408
  };
8285
8409
 
8286
8410
  this.autocomplete = M.Autocomplete.init(this.$input[0], this.options.autocompleteOptions);
@@ -8577,21 +8701,21 @@ $jscomp.polyfill = function (e, r, p, m) {
8577
8701
  function Pushpin(el, options) {
8578
8702
  _classCallCheck(this, Pushpin);
8579
8703
 
8580
- var _this47 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options));
8704
+ var _this45 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options));
8581
8705
 
8582
- _this47.el.M_Pushpin = _this47;
8706
+ _this45.el.M_Pushpin = _this45;
8583
8707
 
8584
8708
  /**
8585
8709
  * Options for the modal
8586
8710
  * @member Pushpin#options
8587
8711
  */
8588
- _this47.options = $.extend({}, Pushpin.defaults, options);
8712
+ _this45.options = $.extend({}, Pushpin.defaults, options);
8589
8713
 
8590
- _this47.originalOffset = _this47.el.offsetTop;
8591
- Pushpin._pushpins.push(_this47);
8592
- _this47._setupEventHandlers();
8593
- _this47._updatePosition();
8594
- return _this47;
8714
+ _this45.originalOffset = _this45.el.offsetTop;
8715
+ Pushpin._pushpins.push(_this45);
8716
+ _this45._setupEventHandlers();
8717
+ _this45._updatePosition();
8718
+ return _this45;
8595
8719
  }
8596
8720
 
8597
8721
  _createClass(Pushpin, [{
@@ -8747,9 +8871,9 @@ $jscomp.polyfill = function (e, r, p, m) {
8747
8871
  function FloatingActionButton(el, options) {
8748
8872
  _classCallCheck(this, FloatingActionButton);
8749
8873
 
8750
- var _this48 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));
8874
+ var _this46 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));
8751
8875
 
8752
- _this48.el.M_FloatingActionButton = _this48;
8876
+ _this46.el.M_FloatingActionButton = _this46;
8753
8877
 
8754
8878
  /**
8755
8879
  * Options for the fab
@@ -8758,28 +8882,28 @@ $jscomp.polyfill = function (e, r, p, m) {
8758
8882
  * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
8759
8883
  * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
8760
8884
  */
8761
- _this48.options = $.extend({}, FloatingActionButton.defaults, options);
8762
-
8763
- _this48.isOpen = false;
8764
- _this48.$anchor = _this48.$el.children('a').first();
8765
- _this48.$menu = _this48.$el.children('ul').first();
8766
- _this48.$floatingBtns = _this48.$el.find('ul .btn-floating');
8767
- _this48.$floatingBtnsReverse = _this48.$el.find('ul .btn-floating').reverse();
8768
- _this48.offsetY = 0;
8769
- _this48.offsetX = 0;
8770
-
8771
- _this48.$el.addClass("direction-" + _this48.options.direction);
8772
- if (_this48.options.direction === 'top') {
8773
- _this48.offsetY = 40;
8774
- } else if (_this48.options.direction === 'right') {
8775
- _this48.offsetX = -40;
8776
- } else if (_this48.options.direction === 'bottom') {
8777
- _this48.offsetY = -40;
8885
+ _this46.options = $.extend({}, FloatingActionButton.defaults, options);
8886
+
8887
+ _this46.isOpen = false;
8888
+ _this46.$anchor = _this46.$el.children('a').first();
8889
+ _this46.$menu = _this46.$el.children('ul').first();
8890
+ _this46.$floatingBtns = _this46.$el.find('ul .btn-floating');
8891
+ _this46.$floatingBtnsReverse = _this46.$el.find('ul .btn-floating').reverse();
8892
+ _this46.offsetY = 0;
8893
+ _this46.offsetX = 0;
8894
+
8895
+ _this46.$el.addClass("direction-" + _this46.options.direction);
8896
+ if (_this46.options.direction === 'top') {
8897
+ _this46.offsetY = 40;
8898
+ } else if (_this46.options.direction === 'right') {
8899
+ _this46.offsetX = -40;
8900
+ } else if (_this46.options.direction === 'bottom') {
8901
+ _this46.offsetY = -40;
8778
8902
  } else {
8779
- _this48.offsetX = 40;
8903
+ _this46.offsetX = 40;
8780
8904
  }
8781
- _this48._setupEventHandlers();
8782
- return _this48;
8905
+ _this46._setupEventHandlers();
8906
+ return _this46;
8783
8907
  }
8784
8908
 
8785
8909
  _createClass(FloatingActionButton, [{
@@ -8902,7 +9026,7 @@ $jscomp.polyfill = function (e, r, p, m) {
8902
9026
  }, {
8903
9027
  key: "_animateInFAB",
8904
9028
  value: function _animateInFAB() {
8905
- var _this49 = this;
9029
+ var _this47 = this;
8906
9030
 
8907
9031
  this.$el.addClass('active');
8908
9032
 
@@ -8912,8 +9036,8 @@ $jscomp.polyfill = function (e, r, p, m) {
8912
9036
  targets: el,
8913
9037
  opacity: 1,
8914
9038
  scale: [0.4, 1],
8915
- translateY: [_this49.offsetY, 0],
8916
- translateX: [_this49.offsetX, 0],
9039
+ translateY: [_this47.offsetY, 0],
9040
+ translateX: [_this47.offsetX, 0],
8917
9041
  duration: 275,
8918
9042
  delay: time,
8919
9043
  easing: 'easeInOutQuad'
@@ -8929,7 +9053,7 @@ $jscomp.polyfill = function (e, r, p, m) {
8929
9053
  }, {
8930
9054
  key: "_animateOutFAB",
8931
9055
  value: function _animateOutFAB() {
8932
- var _this50 = this;
9056
+ var _this48 = this;
8933
9057
 
8934
9058
  this.$floatingBtnsReverse.each(function (el) {
8935
9059
  anim.remove(el);
@@ -8937,12 +9061,12 @@ $jscomp.polyfill = function (e, r, p, m) {
8937
9061
  targets: el,
8938
9062
  opacity: 0,
8939
9063
  scale: 0.4,
8940
- translateY: _this50.offsetY,
8941
- translateX: _this50.offsetX,
9064
+ translateY: _this48.offsetY,
9065
+ translateX: _this48.offsetX,
8942
9066
  duration: 175,
8943
9067
  easing: 'easeOutQuad',
8944
9068
  complete: function () {
8945
- _this50.$el.removeClass('active');
9069
+ _this48.$el.removeClass('active');
8946
9070
  }
8947
9071
  });
8948
9072
  });
@@ -8955,7 +9079,7 @@ $jscomp.polyfill = function (e, r, p, m) {
8955
9079
  }, {
8956
9080
  key: "_animateInToolbar",
8957
9081
  value: function _animateInToolbar() {
8958
- var _this51 = this;
9082
+ var _this49 = this;
8959
9083
 
8960
9084
  var scaleFactor = void 0;
8961
9085
  var windowWidth = window.innerWidth;
@@ -8991,18 +9115,18 @@ $jscomp.polyfill = function (e, r, p, m) {
8991
9115
  });
8992
9116
 
8993
9117
  setTimeout(function () {
8994
- _this51.$el.css({
9118
+ _this49.$el.css({
8995
9119
  transform: '',
8996
9120
  transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
8997
9121
  });
8998
- _this51.$anchor.css({
9122
+ _this49.$anchor.css({
8999
9123
  overflow: 'visible',
9000
9124
  transform: '',
9001
9125
  transition: 'transform .2s'
9002
9126
  });
9003
9127
 
9004
9128
  setTimeout(function () {
9005
- _this51.$el.css({
9129
+ _this49.$el.css({
9006
9130
  overflow: 'hidden',
9007
9131
  'background-color': fabColor
9008
9132
  });
@@ -9010,14 +9134,14 @@ $jscomp.polyfill = function (e, r, p, m) {
9010
9134
  transform: 'scale(' + scaleFactor + ')',
9011
9135
  transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
9012
9136
  });
9013
- _this51.$menu.children('li').children('a').css({
9137
+ _this49.$menu.children('li').children('a').css({
9014
9138
  opacity: 1
9015
9139
  });
9016
9140
 
9017
9141
  // Scroll to close.
9018
- _this51._handleDocumentClickBound = _this51._handleDocumentClick.bind(_this51);
9019
- window.addEventListener('scroll', _this51._handleCloseBound, true);
9020
- document.body.addEventListener('click', _this51._handleDocumentClickBound, true);
9142
+ _this49._handleDocumentClickBound = _this49._handleDocumentClick.bind(_this49);
9143
+ window.addEventListener('scroll', _this49._handleCloseBound, true);
9144
+ document.body.addEventListener('click', _this49._handleDocumentClickBound, true);
9021
9145
  }, 100);
9022
9146
  }, 0);
9023
9147
  }
@@ -9029,7 +9153,7 @@ $jscomp.polyfill = function (e, r, p, m) {
9029
9153
  }, {
9030
9154
  key: "_animateOutToolbar",
9031
9155
  value: function _animateOutToolbar() {
9032
- var _this52 = this;
9156
+ var _this50 = this;
9033
9157
 
9034
9158
  var windowWidth = window.innerWidth;
9035
9159
  var windowHeight = window.innerHeight;
@@ -9060,26 +9184,26 @@ $jscomp.polyfill = function (e, r, p, m) {
9060
9184
  backdrop.remove();
9061
9185
 
9062
9186
  // Set initial state.
9063
- _this52.$el.css({
9187
+ _this50.$el.css({
9064
9188
  'text-align': '',
9065
9189
  width: '',
9066
9190
  bottom: '',
9067
9191
  left: '',
9068
9192
  overflow: '',
9069
9193
  'background-color': '',
9070
- transform: 'translate3d(' + -_this52.offsetX + 'px,0,0)'
9194
+ transform: 'translate3d(' + -_this50.offsetX + 'px,0,0)'
9071
9195
  });
9072
- _this52.$anchor.css({
9196
+ _this50.$anchor.css({
9073
9197
  overflow: '',
9074
- transform: 'translate3d(0,' + _this52.offsetY + 'px,0)'
9198
+ transform: 'translate3d(0,' + _this50.offsetY + 'px,0)'
9075
9199
  });
9076
9200
 
9077
9201
  setTimeout(function () {
9078
- _this52.$el.css({
9202
+ _this50.$el.css({
9079
9203
  transform: 'translate3d(0,0,0)',
9080
9204
  transition: 'transform .2s'
9081
9205
  });
9082
- _this52.$anchor.css({
9206
+ _this50.$anchor.css({
9083
9207
  transform: 'translate3d(0,0,0)',
9084
9208
  transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
9085
9209
  });
@@ -9216,51 +9340,51 @@ $jscomp.polyfill = function (e, r, p, m) {
9216
9340
  function Datepicker(el, options) {
9217
9341
  _classCallCheck(this, Datepicker);
9218
9342
 
9219
- var _this53 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
9343
+ var _this51 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
9220
9344
 
9221
- _this53.el.M_Datepicker = _this53;
9345
+ _this51.el.M_Datepicker = _this51;
9222
9346
 
9223
- _this53.options = $.extend({}, Datepicker.defaults, options);
9347
+ _this51.options = $.extend({}, Datepicker.defaults, options);
9224
9348
 
9225
9349
  // make sure i18n defaults are not lost when only few i18n option properties are passed
9226
9350
  if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') {
9227
- _this53.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n);
9351
+ _this51.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n);
9228
9352
  }
9229
9353
 
9230
9354
  // Remove time component from minDate and maxDate options
9231
- if (_this53.options.minDate) _this53.options.minDate.setHours(0, 0, 0, 0);
9232
- if (_this53.options.maxDate) _this53.options.maxDate.setHours(0, 0, 0, 0);
9355
+ if (_this51.options.minDate) _this51.options.minDate.setHours(0, 0, 0, 0);
9356
+ if (_this51.options.maxDate) _this51.options.maxDate.setHours(0, 0, 0, 0);
9233
9357
 
9234
- _this53.id = M.guid();
9358
+ _this51.id = M.guid();
9235
9359
 
9236
- _this53._setupVariables();
9237
- _this53._insertHTMLIntoDOM();
9238
- _this53._setupModal();
9360
+ _this51._setupVariables();
9361
+ _this51._insertHTMLIntoDOM();
9362
+ _this51._setupModal();
9239
9363
 
9240
- _this53._setupEventHandlers();
9364
+ _this51._setupEventHandlers();
9241
9365
 
9242
- if (!_this53.options.defaultDate) {
9243
- _this53.options.defaultDate = new Date(Date.parse(_this53.el.value));
9366
+ if (!_this51.options.defaultDate) {
9367
+ _this51.options.defaultDate = new Date(Date.parse(_this51.el.value));
9244
9368
  }
9245
9369
 
9246
- var defDate = _this53.options.defaultDate;
9370
+ var defDate = _this51.options.defaultDate;
9247
9371
  if (Datepicker._isDate(defDate)) {
9248
- if (_this53.options.setDefaultDate) {
9249
- _this53.setDate(defDate, true);
9250
- _this53.setInputValue();
9372
+ if (_this51.options.setDefaultDate) {
9373
+ _this51.setDate(defDate, true);
9374
+ _this51.setInputValue();
9251
9375
  } else {
9252
- _this53.gotoDate(defDate);
9376
+ _this51.gotoDate(defDate);
9253
9377
  }
9254
9378
  } else {
9255
- _this53.gotoDate(new Date());
9379
+ _this51.gotoDate(new Date());
9256
9380
  }
9257
9381
 
9258
9382
  /**
9259
9383
  * Describes open/close state of datepicker
9260
9384
  * @type {Boolean}
9261
9385
  */
9262
- _this53.isOpen = false;
9263
- return _this53;
9386
+ _this51.isOpen = false;
9387
+ return _this51;
9264
9388
  }
9265
9389
 
9266
9390
  _createClass(Datepicker, [{
@@ -9311,19 +9435,19 @@ $jscomp.polyfill = function (e, r, p, m) {
9311
9435
  }, {
9312
9436
  key: "_setupModal",
9313
9437
  value: function _setupModal() {
9314
- var _this54 = this;
9438
+ var _this52 = this;
9315
9439
 
9316
9440
  this.modalEl.id = 'modal-' + this.id;
9317
9441
  this.modal = M.Modal.init(this.modalEl, {
9318
9442
  onCloseEnd: function () {
9319
- _this54.isOpen = false;
9443
+ _this52.isOpen = false;
9320
9444
  }
9321
9445
  });
9322
9446
  }
9323
9447
  }, {
9324
9448
  key: "toString",
9325
9449
  value: function toString(format) {
9326
- var _this55 = this;
9450
+ var _this53 = this;
9327
9451
 
9328
9452
  format = format || this.options.format;
9329
9453
  if (typeof format === 'function') {
@@ -9336,8 +9460,8 @@ $jscomp.polyfill = function (e, r, p, m) {
9336
9460
 
9337
9461
  var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
9338
9462
  var formattedDate = formatArray.map(function (label) {
9339
- if (_this55.formats[label]) {
9340
- return _this55.formats[label]();
9463
+ if (_this53.formats[label]) {
9464
+ return _this53.formats[label]();
9341
9465
  }
9342
9466
 
9343
9467
  return label;
@@ -9761,7 +9885,7 @@ $jscomp.polyfill = function (e, r, p, m) {
9761
9885
  }, {
9762
9886
  key: "_setupVariables",
9763
9887
  value: function _setupVariables() {
9764
- var _this56 = this;
9888
+ var _this54 = this;
9765
9889
 
9766
9890
  this.$modalEl = $(Datepicker._template);
9767
9891
  this.modalEl = this.$modalEl[0];
@@ -9778,36 +9902,36 @@ $jscomp.polyfill = function (e, r, p, m) {
9778
9902
 
9779
9903
  this.formats = {
9780
9904
  d: function () {
9781
- return _this56.date.getDate();
9905
+ return _this54.date.getDate();
9782
9906
  },
9783
9907
  dd: function () {
9784
- var d = _this56.date.getDate();
9908
+ var d = _this54.date.getDate();
9785
9909
  return (d < 10 ? '0' : '') + d;
9786
9910
  },
9787
9911
  ddd: function () {
9788
- return _this56.options.i18n.weekdaysShort[_this56.date.getDay()];
9912
+ return _this54.options.i18n.weekdaysShort[_this54.date.getDay()];
9789
9913
  },
9790
9914
  dddd: function () {
9791
- return _this56.options.i18n.weekdays[_this56.date.getDay()];
9915
+ return _this54.options.i18n.weekdays[_this54.date.getDay()];
9792
9916
  },
9793
9917
  m: function () {
9794
- return _this56.date.getMonth() + 1;
9918
+ return _this54.date.getMonth() + 1;
9795
9919
  },
9796
9920
  mm: function () {
9797
- var m = _this56.date.getMonth() + 1;
9921
+ var m = _this54.date.getMonth() + 1;
9798
9922
  return (m < 10 ? '0' : '') + m;
9799
9923
  },
9800
9924
  mmm: function () {
9801
- return _this56.options.i18n.monthsShort[_this56.date.getMonth()];
9925
+ return _this54.options.i18n.monthsShort[_this54.date.getMonth()];
9802
9926
  },
9803
9927
  mmmm: function () {
9804
- return _this56.options.i18n.months[_this56.date.getMonth()];
9928
+ return _this54.options.i18n.months[_this54.date.getMonth()];
9805
9929
  },
9806
9930
  yy: function () {
9807
- return ('' + _this56.date.getFullYear()).slice(2);
9931
+ return ('' + _this54.date.getFullYear()).slice(2);
9808
9932
  },
9809
9933
  yyyy: function () {
9810
- return _this56.date.getFullYear();
9934
+ return _this54.date.getFullYear();
9811
9935
  }
9812
9936
  };
9813
9937
  }
@@ -10096,21 +10220,21 @@ $jscomp.polyfill = function (e, r, p, m) {
10096
10220
  function Timepicker(el, options) {
10097
10221
  _classCallCheck(this, Timepicker);
10098
10222
 
10099
- var _this57 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options));
10223
+ var _this55 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options));
10100
10224
 
10101
- _this57.el.M_Timepicker = _this57;
10225
+ _this55.el.M_Timepicker = _this55;
10102
10226
 
10103
- _this57.options = $.extend({}, Timepicker.defaults, options);
10227
+ _this55.options = $.extend({}, Timepicker.defaults, options);
10104
10228
 
10105
- _this57.id = M.guid();
10106
- _this57._insertHTMLIntoDOM();
10107
- _this57._setupModal();
10108
- _this57._setupVariables();
10109
- _this57._setupEventHandlers();
10229
+ _this55.id = M.guid();
10230
+ _this55._insertHTMLIntoDOM();
10231
+ _this55._setupModal();
10232
+ _this55._setupVariables();
10233
+ _this55._setupEventHandlers();
10110
10234
 
10111
- _this57._clockSetup();
10112
- _this57._pickerSetup();
10113
- return _this57;
10235
+ _this55._clockSetup();
10236
+ _this55._pickerSetup();
10237
+ return _this55;
10114
10238
  }
10115
10239
 
10116
10240
  _createClass(Timepicker, [{
@@ -10215,7 +10339,7 @@ $jscomp.polyfill = function (e, r, p, m) {
10215
10339
  }, {
10216
10340
  key: "_handleDocumentClickEnd",
10217
10341
  value: function _handleDocumentClickEnd(e) {
10218
- var _this58 = this;
10342
+ var _this56 = this;
10219
10343
 
10220
10344
  e.preventDefault();
10221
10345
  document.removeEventListener('mouseup', this._handleDocumentClickEndBound);
@@ -10232,7 +10356,7 @@ $jscomp.polyfill = function (e, r, p, m) {
10232
10356
  } else if (this.options.autoClose) {
10233
10357
  $(this.minutesView).addClass('timepicker-dial-out');
10234
10358
  setTimeout(function () {
10235
- _this58.done();
10359
+ _this56.done();
10236
10360
  }, this.options.duration / 2);
10237
10361
  }
10238
10362
 
@@ -10263,17 +10387,17 @@ $jscomp.polyfill = function (e, r, p, m) {
10263
10387
  }, {
10264
10388
  key: "_setupModal",
10265
10389
  value: function _setupModal() {
10266
- var _this59 = this;
10390
+ var _this57 = this;
10267
10391
 
10268
10392
  this.modal = M.Modal.init(this.modalEl, {
10269
10393
  onOpenStart: this.options.onOpenStart,
10270
10394
  onOpenEnd: this.options.onOpenEnd,
10271
10395
  onCloseStart: this.options.onCloseStart,
10272
10396
  onCloseEnd: function () {
10273
- if (typeof _this59.options.onCloseEnd === 'function') {
10274
- _this59.options.onCloseEnd.call(_this59);
10397
+ if (typeof _this57.options.onCloseEnd === 'function') {
10398
+ _this57.options.onCloseEnd.call(_this57);
10275
10399
  }
10276
- _this59.isOpen = false;
10400
+ _this57.isOpen = false;
10277
10401
  }
10278
10402
  });
10279
10403
  }
@@ -10559,7 +10683,7 @@ $jscomp.polyfill = function (e, r, p, m) {
10559
10683
  }, {
10560
10684
  key: "setHand",
10561
10685
  value: function setHand(x, y, roundBy5) {
10562
- var _this60 = this;
10686
+ var _this58 = this;
10563
10687
 
10564
10688
  var radian = Math.atan2(x, -y),
10565
10689
  isHours = this.currentView === 'hours',
@@ -10614,7 +10738,7 @@ $jscomp.polyfill = function (e, r, p, m) {
10614
10738
  if (!this.vibrateTimer) {
10615
10739
  navigator[this.vibrate](10);
10616
10740
  this.vibrateTimer = setTimeout(function () {
10617
- _this60.vibrateTimer = null;
10741
+ _this58.vibrateTimer = null;
10618
10742
  }, 100);
10619
10743
  }
10620
10744
  }
@@ -10779,20 +10903,20 @@ $jscomp.polyfill = function (e, r, p, m) {
10779
10903
  function CharacterCounter(el, options) {
10780
10904
  _classCallCheck(this, CharacterCounter);
10781
10905
 
10782
- var _this61 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
10906
+ var _this59 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
10783
10907
 
10784
- _this61.el.M_CharacterCounter = _this61;
10908
+ _this59.el.M_CharacterCounter = _this59;
10785
10909
 
10786
10910
  /**
10787
10911
  * Options for the character counter
10788
10912
  */
10789
- _this61.options = $.extend({}, CharacterCounter.defaults, options);
10913
+ _this59.options = $.extend({}, CharacterCounter.defaults, options);
10790
10914
 
10791
- _this61.isInvalid = false;
10792
- _this61.isValidLength = false;
10793
- _this61._setupCounter();
10794
- _this61._setupEventHandlers();
10795
- return _this61;
10915
+ _this59.isInvalid = false;
10916
+ _this59.isValidLength = false;
10917
+ _this59._setupCounter();
10918
+ _this59._setupEventHandlers();
10919
+ return _this59;
10796
10920
  }
10797
10921
 
10798
10922
  _createClass(CharacterCounter, [{
@@ -10959,9 +11083,9 @@ $jscomp.polyfill = function (e, r, p, m) {
10959
11083
  function Carousel(el, options) {
10960
11084
  _classCallCheck(this, Carousel);
10961
11085
 
10962
- var _this62 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options));
11086
+ var _this60 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options));
10963
11087
 
10964
- _this62.el.M_Carousel = _this62;
11088
+ _this60.el.M_Carousel = _this60;
10965
11089
 
10966
11090
  /**
10967
11091
  * Options for the carousel
@@ -10976,38 +11100,38 @@ $jscomp.polyfill = function (e, r, p, m) {
10976
11100
  * @prop {Boolean} noWrap
10977
11101
  * @prop {Function} onCycleTo
10978
11102
  */
10979
- _this62.options = $.extend({}, Carousel.defaults, options);
11103
+ _this60.options = $.extend({}, Carousel.defaults, options);
10980
11104
 
10981
11105
  // Setup
10982
- _this62.hasMultipleSlides = _this62.$el.find('.carousel-item').length > 1;
10983
- _this62.showIndicators = _this62.options.indicators && _this62.hasMultipleSlides;
10984
- _this62.noWrap = _this62.options.noWrap || !_this62.hasMultipleSlides;
10985
- _this62.pressed = false;
10986
- _this62.dragged = false;
10987
- _this62.offset = _this62.target = 0;
10988
- _this62.images = [];
10989
- _this62.itemWidth = _this62.$el.find('.carousel-item').first().innerWidth();
10990
- _this62.itemHeight = _this62.$el.find('.carousel-item').first().innerHeight();
10991
- _this62.dim = _this62.itemWidth * 2 + _this62.options.padding || 1; // Make sure dim is non zero for divisions.
10992
- _this62._autoScrollBound = _this62._autoScroll.bind(_this62);
10993
- _this62._trackBound = _this62._track.bind(_this62);
11106
+ _this60.hasMultipleSlides = _this60.$el.find('.carousel-item').length > 1;
11107
+ _this60.showIndicators = _this60.options.indicators && _this60.hasMultipleSlides;
11108
+ _this60.noWrap = _this60.options.noWrap || !_this60.hasMultipleSlides;
11109
+ _this60.pressed = false;
11110
+ _this60.dragged = false;
11111
+ _this60.offset = _this60.target = 0;
11112
+ _this60.images = [];
11113
+ _this60.itemWidth = _this60.$el.find('.carousel-item').first().innerWidth();
11114
+ _this60.itemHeight = _this60.$el.find('.carousel-item').first().innerHeight();
11115
+ _this60.dim = _this60.itemWidth * 2 + _this60.options.padding || 1; // Make sure dim is non zero for divisions.
11116
+ _this60._autoScrollBound = _this60._autoScroll.bind(_this60);
11117
+ _this60._trackBound = _this60._track.bind(_this60);
10994
11118
 
10995
11119
  // Full Width carousel setup
10996
- if (_this62.options.fullWidth) {
10997
- _this62.options.dist = 0;
10998
- _this62._setCarouselHeight();
11120
+ if (_this60.options.fullWidth) {
11121
+ _this60.options.dist = 0;
11122
+ _this60._setCarouselHeight();
10999
11123
 
11000
11124
  // Offset fixed items when indicators.
11001
- if (_this62.showIndicators) {
11002
- _this62.$el.find('.carousel-fixed-item').addClass('with-indicators');
11125
+ if (_this60.showIndicators) {
11126
+ _this60.$el.find('.carousel-fixed-item').addClass('with-indicators');
11003
11127
  }
11004
11128
  }
11005
11129
 
11006
11130
  // Iterate through slides
11007
- _this62.$indicators = $('<ul class="indicators"></ul>');
11008
- _this62.$el.find('.carousel-item').each(function (el, i) {
11009
- _this62.images.push(el);
11010
- if (_this62.showIndicators) {
11131
+ _this60.$indicators = $('<ul class="indicators"></ul>');
11132
+ _this60.$el.find('.carousel-item').each(function (el, i) {
11133
+ _this60.images.push(el);
11134
+ if (_this60.showIndicators) {
11011
11135
  var $indicator = $('<li class="indicator-item"></li>');
11012
11136
 
11013
11137
  // Add active to first by default.
@@ -11015,31 +11139,31 @@ $jscomp.polyfill = function (e, r, p, m) {
11015
11139
  $indicator[0].classList.add('active');
11016
11140
  }
11017
11141
 
11018
- _this62.$indicators.append($indicator);
11142
+ _this60.$indicators.append($indicator);
11019
11143
  }
11020
11144
  });
11021
- if (_this62.showIndicators) {
11022
- _this62.$el.append(_this62.$indicators);
11145
+ if (_this60.showIndicators) {
11146
+ _this60.$el.append(_this60.$indicators);
11023
11147
  }
11024
- _this62.count = _this62.images.length;
11148
+ _this60.count = _this60.images.length;
11025
11149
 
11026
11150
  // Cap numVisible at count
11027
- _this62.options.numVisible = Math.min(_this62.count, _this62.options.numVisible);
11151
+ _this60.options.numVisible = Math.min(_this60.count, _this60.options.numVisible);
11028
11152
 
11029
11153
  // Setup cross browser string
11030
- _this62.xform = 'transform';
11154
+ _this60.xform = 'transform';
11031
11155
  ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {
11032
11156
  var e = prefix + 'Transform';
11033
11157
  if (typeof document.body.style[e] !== 'undefined') {
11034
- _this62.xform = e;
11158
+ _this60.xform = e;
11035
11159
  return false;
11036
11160
  }
11037
11161
  return true;
11038
11162
  });
11039
11163
 
11040
- _this62._setupEventHandlers();
11041
- _this62._scroll(_this62.offset);
11042
- return _this62;
11164
+ _this60._setupEventHandlers();
11165
+ _this60._scroll(_this60.offset);
11166
+ return _this60;
11043
11167
  }
11044
11168
 
11045
11169
  _createClass(Carousel, [{
@@ -11061,7 +11185,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11061
11185
  }, {
11062
11186
  key: "_setupEventHandlers",
11063
11187
  value: function _setupEventHandlers() {
11064
- var _this63 = this;
11188
+ var _this61 = this;
11065
11189
 
11066
11190
  this._handleCarouselTapBound = this._handleCarouselTap.bind(this);
11067
11191
  this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);
@@ -11083,7 +11207,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11083
11207
  if (this.showIndicators && this.$indicators) {
11084
11208
  this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
11085
11209
  this.$indicators.find('.indicator-item').each(function (el, i) {
11086
- el.addEventListener('click', _this63._handleIndicatorClickBound);
11210
+ el.addEventListener('click', _this61._handleIndicatorClickBound);
11087
11211
  });
11088
11212
  }
11089
11213
 
@@ -11101,7 +11225,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11101
11225
  }, {
11102
11226
  key: "_removeEventHandlers",
11103
11227
  value: function _removeEventHandlers() {
11104
- var _this64 = this;
11228
+ var _this62 = this;
11105
11229
 
11106
11230
  if (typeof window.ontouchstart !== 'undefined') {
11107
11231
  this.el.removeEventListener('touchstart', this._handleCarouselTapBound);
@@ -11116,7 +11240,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11116
11240
 
11117
11241
  if (this.showIndicators && this.$indicators) {
11118
11242
  this.$indicators.find('.indicator-item').each(function (el, i) {
11119
- el.removeEventListener('click', _this64._handleIndicatorClickBound);
11243
+ el.removeEventListener('click', _this62._handleIndicatorClickBound);
11120
11244
  });
11121
11245
  }
11122
11246
 
@@ -11313,7 +11437,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11313
11437
  }, {
11314
11438
  key: "_setCarouselHeight",
11315
11439
  value: function _setCarouselHeight(imageOnly) {
11316
- var _this65 = this;
11440
+ var _this63 = this;
11317
11441
 
11318
11442
  var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first();
11319
11443
  var firstImage = firstSlide.find('img').first();
@@ -11333,7 +11457,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11333
11457
  } else {
11334
11458
  // Get height when image is loaded normally
11335
11459
  firstImage.one('load', function (el, i) {
11336
- _this65.$el.css('height', el.offsetHeight + 'px');
11460
+ _this63.$el.css('height', el.offsetHeight + 'px');
11337
11461
  });
11338
11462
  }
11339
11463
  } else if (!imageOnly) {
@@ -11439,7 +11563,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11439
11563
  }, {
11440
11564
  key: "_scroll",
11441
11565
  value: function _scroll(x) {
11442
- var _this66 = this;
11566
+ var _this64 = this;
11443
11567
 
11444
11568
  // Track scrolling state
11445
11569
  if (!this.$el.hasClass('scrolling')) {
@@ -11449,7 +11573,7 @@ $jscomp.polyfill = function (e, r, p, m) {
11449
11573
  window.clearTimeout(this.scrollingTimeout);
11450
11574
  }
11451
11575
  this.scrollingTimeout = window.setTimeout(function () {
11452
- _this66.$el.removeClass('scrolling');
11576
+ _this64.$el.removeClass('scrolling');
11453
11577
  }, this.options.duration);
11454
11578
 
11455
11579
  // Start actual scroll
@@ -11750,9 +11874,9 @@ $jscomp.polyfill = function (e, r, p, m) {
11750
11874
  function TapTarget(el, options) {
11751
11875
  _classCallCheck(this, TapTarget);
11752
11876
 
11753
- var _this67 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options));
11877
+ var _this65 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options));
11754
11878
 
11755
- _this67.el.M_TapTarget = _this67;
11879
+ _this65.el.M_TapTarget = _this65;
11756
11880
 
11757
11881
  /**
11758
11882
  * Options for the select
@@ -11760,17 +11884,17 @@ $jscomp.polyfill = function (e, r, p, m) {
11760
11884
  * @prop {Function} onOpen - Callback function called when feature discovery is opened
11761
11885
  * @prop {Function} onClose - Callback function called when feature discovery is closed
11762
11886
  */
11763
- _this67.options = $.extend({}, TapTarget.defaults, options);
11887
+ _this65.options = $.extend({}, TapTarget.defaults, options);
11764
11888
 
11765
- _this67.isOpen = false;
11889
+ _this65.isOpen = false;
11766
11890
 
11767
11891
  // setup
11768
- _this67.$origin = $('#' + _this67.$el.attr('data-target'));
11769
- _this67._setup();
11892
+ _this65.$origin = $('#' + _this65.$el.attr('data-target'));
11893
+ _this65._setup();
11770
11894
 
11771
- _this67._calculatePositioning();
11772
- _this67._setupEventHandlers();
11773
- return _this67;
11895
+ _this65._calculatePositioning();
11896
+ _this65._setupEventHandlers();
11897
+ return _this65;
11774
11898
  }
11775
11899
 
11776
11900
  _createClass(TapTarget, [{
@@ -12094,19 +12218,19 @@ $jscomp.polyfill = function (e, r, p, m) {
12094
12218
  function FormSelect(el, options) {
12095
12219
  _classCallCheck(this, FormSelect);
12096
12220
 
12097
- var _this68 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options));
12098
-
12099
- if (_this68.$el.hasClass('browser-default')) return _possibleConstructorReturn(_this68);
12100
- _this68.el.M_FormSelect = _this68;
12101
- _this68.options = $.extend({}, FormSelect.defaults, options);
12102
- _this68.isMultiple = _this68.$el.prop('multiple');
12103
- _this68.el.tabIndex = -1;
12104
- _this68._values = [];
12105
- _this68.labelEl = null;
12106
- _this68._labelFor = false;
12107
- _this68._setupDropdown();
12108
- _this68._setupEventHandlers();
12109
- return _this68;
12221
+ var _this66 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options));
12222
+
12223
+ if (_this66.$el.hasClass('browser-default')) return _possibleConstructorReturn(_this66);
12224
+ _this66.el.M_FormSelect = _this66;
12225
+ _this66.options = $.extend({}, FormSelect.defaults, options);
12226
+ _this66.isMultiple = _this66.$el.prop('multiple');
12227
+ _this66.el.tabIndex = -1;
12228
+ _this66._values = [];
12229
+ _this66.labelEl = null;
12230
+ _this66._labelFor = false;
12231
+ _this66._setupDropdown();
12232
+ _this66._setupEventHandlers();
12233
+ return _this66;
12110
12234
  }
12111
12235
 
12112
12236
  _createClass(FormSelect, [{
@@ -12121,15 +12245,15 @@ $jscomp.polyfill = function (e, r, p, m) {
12121
12245
  }, {
12122
12246
  key: "_setupEventHandlers",
12123
12247
  value: function _setupEventHandlers() {
12124
- var _this69 = this;
12248
+ var _this67 = this;
12125
12249
 
12126
12250
  this._handleSelectChangeBound = this._handleSelectChange.bind(this);
12127
12251
  this._handleOptionClickBound = this._handleOptionClick.bind(this);
12128
12252
  this._handleInputClickBound = this._handleInputClick.bind(this);
12129
12253
  $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
12130
- el.addEventListener('click', _this69._handleOptionClickBound);
12254
+ el.addEventListener('click', _this67._handleOptionClickBound);
12131
12255
  el.addEventListener('keydown', function (e) {
12132
- if (e.key === " " || e.key === "Enter") _this69._handleOptionClickBound(e);
12256
+ if (e.key === " " || e.key === "Enter") _this67._handleOptionClickBound(e);
12133
12257
  });
12134
12258
  });
12135
12259
  this.el.addEventListener('change', this._handleSelectChangeBound);
@@ -12138,10 +12262,10 @@ $jscomp.polyfill = function (e, r, p, m) {
12138
12262
  }, {
12139
12263
  key: "_removeEventHandlers",
12140
12264
  value: function _removeEventHandlers() {
12141
- var _this70 = this;
12265
+ var _this68 = this;
12142
12266
 
12143
12267
  $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
12144
- el.removeEventListener('click', _this70._handleOptionClickBound);
12268
+ el.removeEventListener('click', _this68._handleOptionClickBound);
12145
12269
  });
12146
12270
  this.el.removeEventListener('change', this._handleSelectChangeBound);
12147
12271
  this.input.removeEventListener('click', this._handleInputClickBound);
@@ -12205,7 +12329,7 @@ $jscomp.polyfill = function (e, r, p, m) {
12205
12329
  }, {
12206
12330
  key: "_setupDropdown",
12207
12331
  value: function _setupDropdown() {
12208
- var _this71 = this;
12332
+ var _this69 = this;
12209
12333
 
12210
12334
  this.wrapper = document.createElement('div');
12211
12335
  $(this.wrapper).addClass('select-wrapper ' + this.options.classes);
@@ -12231,21 +12355,21 @@ $jscomp.polyfill = function (e, r, p, m) {
12231
12355
  this.$selectOptions.each(function (realOption) {
12232
12356
  if ($(realOption).is('option')) {
12233
12357
  // Option
12234
- var virtualOption = _this71._createAndAppendOptionWithIcon(realOption, _this71.isMultiple ? 'multiple' : undefined);
12235
- _this71._addOptionToValues(realOption, virtualOption);
12358
+ var virtualOption = _this69._createAndAppendOptionWithIcon(realOption, _this69.isMultiple ? 'multiple' : undefined);
12359
+ _this69._addOptionToValues(realOption, virtualOption);
12236
12360
  } else if ($(realOption).is('optgroup')) {
12237
12361
  // Optgroup
12238
12362
  var selectOptions = $(realOption).children('option');
12239
12363
  var lId = "opt-group-" + M.guid();
12240
12364
  var groupParent = $("<li class=\"optgroup\" role=\"group\" aria-labelledby=\"" + lId + "\" tabindex=\"-1\"><span id=\"" + lId + "\" role=\"presentation\">" + realOption.getAttribute('label') + "</span></li>")[0];
12241
12365
  var groupChildren = [];
12242
- $(_this71.dropdownOptions).append(groupParent);
12366
+ $(_this69.dropdownOptions).append(groupParent);
12243
12367
  selectOptions.each(function (realOption) {
12244
- var virtualOption = _this71._createAndAppendOptionWithIcon(realOption, 'optgroup-option');
12368
+ var virtualOption = _this69._createAndAppendOptionWithIcon(realOption, 'optgroup-option');
12245
12369
  var cId = "opt-child-" + M.guid();
12246
12370
  virtualOption.id = cId;
12247
12371
  groupChildren.push(cId);
12248
- _this71._addOptionToValues(realOption, virtualOption);
12372
+ _this69._addOptionToValues(realOption, virtualOption);
12249
12373
  });
12250
12374
  groupParent.setAttribute("aria-owns", groupChildren.join(" "));
12251
12375
  }
@@ -12317,31 +12441,31 @@ $jscomp.polyfill = function (e, r, p, m) {
12317
12441
  var userOnCloseEnd = dropdownOptions.onCloseEnd;
12318
12442
  // Add callback for centering selected option when dropdown content is scrollable
12319
12443
  dropdownOptions.onOpenEnd = function (el) {
12320
- var selectedOption = $(_this71.dropdownOptions).find('.selected').first();
12444
+ var selectedOption = $(_this69.dropdownOptions).find('.selected').first();
12321
12445
  if (selectedOption.length) {
12322
12446
  // Focus selected option in dropdown
12323
12447
  M.keyDown = true;
12324
- _this71.dropdown.focusedIndex = selectedOption.index();
12325
- _this71.dropdown._focusFocusedItem();
12448
+ _this69.dropdown.focusedIndex = selectedOption.index();
12449
+ _this69.dropdown._focusFocusedItem();
12326
12450
  M.keyDown = false;
12327
12451
  // Handle scrolling to selected option
12328
- if (_this71.dropdown.isScrollable) {
12329
- var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
12330
- scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown
12331
- _this71.dropdownOptions.scrollTop = scrollOffset;
12452
+ if (_this69.dropdown.isScrollable) {
12453
+ var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this69.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
12454
+ scrollOffset -= _this69.dropdownOptions.clientHeight / 2; // center in dropdown
12455
+ _this69.dropdownOptions.scrollTop = scrollOffset;
12332
12456
  }
12333
12457
  }
12334
12458
  // Sets "aria-expanded" to "true"
12335
- _this71.input.setAttribute("aria-expanded", true);
12459
+ _this69.input.setAttribute("aria-expanded", true);
12336
12460
  // Handle user declared onOpenEnd if needed
12337
- if (userOnOpenEnd && typeof userOnOpenEnd === 'function') userOnOpenEnd.call(_this71.dropdown, _this71.el);
12461
+ if (userOnOpenEnd && typeof userOnOpenEnd === 'function') userOnOpenEnd.call(_this69.dropdown, _this69.el);
12338
12462
  };
12339
12463
  // Add callback for reseting "expanded" state
12340
12464
  dropdownOptions.onCloseEnd = function (el) {
12341
12465
  // Sets "aria-expanded" to "false"
12342
- _this71.input.setAttribute("aria-expanded", false);
12466
+ _this69.input.setAttribute("aria-expanded", false);
12343
12467
  // Handle user declared onOpenEnd if needed
12344
- if (userOnCloseEnd && typeof userOnCloseEnd === 'function') userOnCloseEnd.call(_this71.dropdown, _this71.el);
12468
+ if (userOnCloseEnd && typeof userOnCloseEnd === 'function') userOnCloseEnd.call(_this69.dropdown, _this69.el);
12345
12469
  };
12346
12470
  // Prevent dropdown from closing too early
12347
12471
  dropdownOptions.closeOnClick = false;
@@ -12411,10 +12535,10 @@ $jscomp.polyfill = function (e, r, p, m) {
12411
12535
  }, {
12412
12536
  key: "_deselectAll",
12413
12537
  value: function _deselectAll() {
12414
- var _this72 = this;
12538
+ var _this70 = this;
12415
12539
 
12416
12540
  this._values.forEach(function (value) {
12417
- _this72._deselectValue(value);
12541
+ _this70._deselectValue(value);
12418
12542
  });
12419
12543
  }
12420
12544
  }, {
@@ -12461,13 +12585,13 @@ $jscomp.polyfill = function (e, r, p, m) {
12461
12585
  }, {
12462
12586
  key: "_setSelectedStates",
12463
12587
  value: function _setSelectedStates() {
12464
- var _this73 = this;
12588
+ var _this71 = this;
12465
12589
 
12466
12590
  this._values.forEach(function (value) {
12467
12591
  var optionIsSelected = $(value.el).prop('selected');
12468
12592
  $(value.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected);
12469
12593
  if (optionIsSelected) {
12470
- _this73._activateOption($(_this73.dropdownOptions), $(value.optionEl));
12594
+ _this71._activateOption($(_this71.dropdownOptions), $(value.optionEl));
12471
12595
  } else {
12472
12596
  $(value.optionEl).removeClass('selected');
12473
12597
  $(value.optionEl).attr("aria-selected", false);
@@ -12536,23 +12660,23 @@ $jscomp.polyfill = function (e, r, p, m) {
12536
12660
  function Range(el, options) {
12537
12661
  _classCallCheck(this, Range);
12538
12662
 
12539
- var _this74 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options));
12663
+ var _this72 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options));
12540
12664
 
12541
- _this74.el.M_Range = _this74;
12665
+ _this72.el.M_Range = _this72;
12542
12666
 
12543
12667
  /**
12544
12668
  * Options for the range
12545
12669
  * @member Range#options
12546
12670
  */
12547
- _this74.options = $.extend({}, Range.defaults, options);
12671
+ _this72.options = $.extend({}, Range.defaults, options);
12548
12672
 
12549
- _this74._mousedown = false;
12673
+ _this72._mousedown = false;
12550
12674
 
12551
12675
  // Setup
12552
- _this74._setupThumb();
12676
+ _this72._setupThumb();
12553
12677
 
12554
- _this74._setupEventHandlers();
12555
- return _this74;
12678
+ _this72._setupEventHandlers();
12679
+ return _this72;
12556
12680
  }
12557
12681
 
12558
12682
  _createClass(Range, [{