Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/slider

Package Overview
Dependencies
Maintainers
10
Versions
1675
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/slider - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

22

dist/mdc.slider.js

@@ -78,3 +78,3 @@ /*!

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 74);
/******/ return __webpack_require__(__webpack_require__.s = 77);
/******/ })

@@ -414,6 +414,6 @@ /************************************************************************/

/***/ 74:
/***/ 77:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(75);
module.exports = __webpack_require__(78);

@@ -423,3 +423,3 @@

/***/ 75:
/***/ 78:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -432,3 +432,3 @@

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation__ = __webpack_require__(79);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCSliderFoundation", function() { return __WEBPACK_IMPORTED_MODULE_2__foundation__["a"]; });

@@ -658,3 +658,3 @@ 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; }; }();

/***/ 76:
/***/ 79:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -664,3 +664,3 @@

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__material_base_foundation__ = __webpack_require__(0);

@@ -886,3 +886,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var lastStepRatio = (max - numMarkers * step) / step + 1;
var flex = __WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectPropertyName"](window, 'flex');
var flex = Object(__WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectPropertyName"])(window, 'flex');
this.adapter_.setLastTrackMarkersStyleProperty(flex, lastStepRatio);

@@ -1189,4 +1189,4 @@ }

var transformProp = __WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectPropertyName"](window, 'transform');
var transitionendEvtName = __WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectEventName"](window, 'transitionend');
var transformProp = Object(__WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectPropertyName"])(window, 'transform');
var transitionendEvtName = Object(__WEBPACK_IMPORTED_MODULE_1__material_animation__["getCorrectEventName"])(window, 'transitionend');

@@ -1247,3 +1247,3 @@ if (this.inTransit_) {

/***/ 8:
/***/ 9:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -1250,0 +1250,0 @@

@@ -6,2 +6,2 @@ /*!

*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.slider=e():(t.mdc=t.mdc||{},t.mdc.slider=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=74)}({0:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=a},1:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=o},18:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});var r={ACTIVE:"mdc-slider--active",DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",FOCUS:"mdc-slider--focus",IN_TRANSIT:"mdc-slider--in-transit",OFF:"mdc-slider--off",IS_DISCRETE:"mdc-slider--discrete",HAS_TRACK_MARKER:"mdc-slider--display-markers"},i={TRACK_SELECTOR:".mdc-slider__track",TRACK_MARKER_CONTAINER_SELECTOR:".mdc-slider__track-marker-container",LAST_TRACK_MARKER_SELECTOR:".mdc-slider__track-marker:last-child",THUMB_CONTAINER_SELECTOR:".mdc-slider__thumb-container",PIN_VALUE_MARKER_SELECTOR:".mdc-slider__pin-value-marker",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUENOW:"aria-valuenow",ARIA_DISABLED:"aria-disabled",STEP_DATA_ATTR:"data-step",CHANGE_EVENT:"MDCSlider:change",INPUT_EVENT:"MDCSlider:input"},a={PAGE_FACTOR:4}},74:function(t,e,n){t.exports=n(75)},75:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSlider",function(){return l});var o=n(1),s=n(18),u=n(76);n.d(e,"MDCSliderFoundation",function(){return u.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),c(e,[{key:"initialize",value:function(){this.thumbContainer_=this.root_.querySelector(s.c.THUMB_CONTAINER_SELECTOR),this.track_=this.root_.querySelector(s.c.TRACK_SELECTOR),this.pinValueMarker_=this.root_.querySelector(s.c.PIN_VALUE_MARKER_SELECTOR),this.trackMarkerContainer_=this.root_.querySelector(s.c.TRACK_MARKER_CONTAINER_SELECTOR)}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a({hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getAttribute:function(e){return t.root_.getAttribute(e)},setAttribute:function(e,n){return t.root_.setAttribute(e,n)},removeAttribute:function(e){return t.root_.removeAttribute(e)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getTabIndex:function(){return t.root_.tabIndex},registerInteractionHandler:function(e,n){t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){t.root_.removeEventListener(e,n)},registerThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.addEventListener(e,n)},deregisterThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.removeEventListener(e,n)},registerBodyInteractionHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyInteractionHandler:function(t,e){document.body.removeEventListener(t,e)},registerResizeHandler:function(t){window.addEventListener("resize",t)},deregisterResizeHandler:function(t){window.removeEventListener("resize",t)},notifyInput:function(){t.emit(s.c.INPUT_EVENT,t)},notifyChange:function(){t.emit(s.c.CHANGE_EVENT,t)},setThumbContainerStyleProperty:function(e,n){t.thumbContainer_.style.setProperty(e,n)},setTrackStyleProperty:function(e,n){t.track_.style.setProperty(e,n)},setMarkerValue:function(e){t.pinValueMarker_.innerText=e},appendTrackMarkers:function(e){for(var n=document.createDocumentFragment(),r=0;r<e;r++){var i=document.createElement("div");i.classList.add("mdc-slider__track-marker"),n.appendChild(i)}t.trackMarkerContainer_.appendChild(n)},removeTrackMarkers:function(){for(;t.trackMarkerContainer_.firstChild;)t.trackMarkerContainer_.removeChild(t.trackMarkerContainer_.firstChild)},setLastTrackMarkersStyleProperty:function(e,n){t.root_.querySelector(s.c.LAST_TRACK_MARKER_SELECTOR).style.setProperty(e,n)},isRTL:function(){return"rtl"===getComputedStyle(t.root_).direction}})}},{key:"initialSyncWithDOM",value:function(){var t=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUENOW));this.min=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUEMIN))||this.min,this.max=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUEMAX))||this.max,this.step=parseFloat(this.root_.getAttribute(s.c.STEP_DATA_ATTR))||this.step,this.value=t||this.value,this.disabled=this.root_.hasAttribute(s.c.ARIA_DISABLED)&&"false"!==this.root_.getAttribute(s.c.ARIA_DISABLED),this.foundation_.setupTrackMarker()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"stepUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value+=t}},{key:"stepDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value-=t}},{key:"value",get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)}},{key:"min",get:function(){return this.foundation_.getMin()},set:function(t){this.foundation_.setMin(t)}},{key:"max",get:function(){return this.foundation_.getMax()},set:function(t){this.foundation_.setMax(t)}},{key:"step",get:function(){return this.foundation_.getStep()},set:function(t){this.foundation_.setStep(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},76:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(18),s=n(8),u=n(0),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d={ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"},_=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.rect_=null,n.savedTabIndex_=NaN,n.off_=!1,n.active_=!1,n.inTransit_=!1,n.isDiscrete_=!1,n.hasTrackMarker_=!1,n.handlingThumbTargetEvt_=!1,n.min_=0,n.max_=100,n.step_=0,n.value_=0,n.disabled_=!1,n.preventFocusState_=!1,n.updateUIFrame_=0,n.thumbContainerPointerHandler_=function(){n.handlingThumbTargetEvt_=!0},n.mousedownHandler_=n.createDownHandler_("mousemove","mouseup"),n.pointerdownHandler_=n.createDownHandler_("pointermove","pointerup"),n.touchstartHandler_=n.createDownHandler_("touchmove","touchend",function(t){return t.targetTouches[0].pageX}),n.keydownHandler_=function(t){return n.handleKeydown_(t)},n.focusHandler_=function(){return n.handleFocus_()},n.blurHandler_=function(){return n.handleBlur_()},n.resizeHandler_=function(){return n.layout()},n}return a(e,t),l(e,null,[{key:"cssClasses",get:function(){return o.a}},{key:"strings",get:function(){return o.c}},{key:"numbers",get:function(){return o.b}},{key:"defaultAdapter",get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabIndex:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerThumbContainerInteractionHandler:function(){},deregisterThumbContainerInteractionHandler:function(){},registerBodyInteractionHandler:function(){},deregisterBodyInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},notifyInput:function(){},notifyChange:function(){},setThumbContainerStyleProperty:function(){},setTrackStyleProperty:function(){},setMarkerValue:function(){},appendTrackMarkers:function(){},removeTrackMarkers:function(){},setLastTrackMarkersStyleProperty:function(){},isRTL:function(){return!1}}}}]),l(e,[{key:"init",value:function(){var t=this;this.isDiscrete_=this.adapter_.hasClass(o.a.IS_DISCRETE),this.hasTrackMarker_=this.adapter_.hasClass(o.a.HAS_TRACK_MARKER),this.adapter_.registerInteractionHandler("mousedown",this.mousedownHandler_),this.adapter_.registerInteractionHandler("pointerdown",this.pointerdownHandler_),this.adapter_.registerInteractionHandler("touchstart",this.touchstartHandler_),this.adapter_.registerInteractionHandler("keydown",this.keydownHandler_),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),["mousedown","pointerdown","touchstart"].forEach(function(e){t.adapter_.registerThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.registerResizeHandler(this.resizeHandler_),this.layout(),this.isDiscrete_&&0==this.getStep()&&this.setStep(1)}},{key:"destroy",value:function(){var t=this;this.adapter_.deregisterInteractionHandler("mousedown",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("pointerdown",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("touchstart",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("keydown",this.keydownHandler_),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),["mousedown","pointerdown","touchstart"].forEach(function(e){t.adapter_.deregisterThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"setupTrackMarker",value:function(){if(this.isDiscrete_&&this.hasTrackMarker_&&0!=this.getStep()){var t=this.getMin(),e=this.getMax(),n=this.getStep(),r=(e-t)/n,i=Math.ceil(r)!==r;if(i&&(r=Math.ceil(r)),this.adapter_.removeTrackMarkers(),this.adapter_.appendTrackMarkers(r),i){var a=(e-r*n)/n+1,o=s.getCorrectPropertyName(window,"flex");this.adapter_.setLastTrackMarkersStyleProperty(o,a)}}}},{key:"layout",value:function(){this.rect_=this.adapter_.computeBoundingRect(),this.updateUIForCurrentValue_()}},{key:"getValue",value:function(){return this.value_}},{key:"setValue",value:function(t){this.setValue_(t,!1)}},{key:"getMax",value:function(){return this.max_}},{key:"setMax",value:function(t){if(t<this.min_)throw new Error("Cannot set max to be less than the slider's minimum value");this.max_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.c.ARIA_VALUEMAX,String(this.max_)),this.setupTrackMarker()}},{key:"getMin",value:function(){return this.min_}},{key:"setMin",value:function(t){if(t>this.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.c.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()}},{key:"getStep",value:function(){return this.step_}},{key:"setStep",value:function(t){if(t<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof t||t<1)&&(t=1),this.step_=t,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(t){this.disabled_=t,this.toggleClass_(o.a.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setAttribute(o.c.ARIA_DISABLED,"true"),this.adapter_.removeAttribute("tabindex")):(this.adapter_.removeAttribute(o.c.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter_.setAttribute("tabindex",String(this.savedTabIndex_)))}},{key:"createDownHandler_",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return t.pageX},i=function(t){t.preventDefault(),n.setValueFromEvt_(t,r)},a=function r(){n.setActive_(!1),n.adapter_.deregisterBodyInteractionHandler(t,i),n.adapter_.deregisterBodyInteractionHandler(e,r),n.adapter_.notifyChange()};return function(o){n.disabled_||(n.preventFocusState_=!0,n.setInTransit_(!n.handlingThumbTargetEvt_),n.handlingThumbTargetEvt_=!1,n.setActive_(!0),n.adapter_.registerBodyInteractionHandler(t,i),n.adapter_.registerBodyInteractionHandler(e,a),n.setValueFromEvt_(o,r))}}},{key:"setValueFromEvt_",value:function(t,e){var n=e(t),r=this.computeValueFromPageX_(n);this.setValue_(r,!0)}},{key:"computeValueFromPageX_",value:function(t){var e=this.max_,n=this.min_,r=t-this.rect_.left,i=r/this.rect_.width;return this.adapter_.isRTL()&&(i=1-i),n+i*(e-n)}},{key:"handleKeydown_",value:function(t){var e=this.getKeyId_(t),n=this.getValueForKeyId_(e);isNaN(n)||(t.preventDefault(),this.adapter_.addClass(o.a.FOCUS),this.setValue_(n,!0),this.adapter_.notifyChange())}},{key:"getKeyId_",value:function(t){switch(t.key||t.keyCode){case d.ARROW_LEFT:case 37:return d.ARROW_LEFT;case d.ARROW_RIGHT:case 39:return d.ARROW_RIGHT;case d.ARROW_UP:case 38:return d.ARROW_UP;case d.ARROW_DOWN:case 40:return d.ARROW_DOWN;case d.HOME:case 36:return d.HOME;case d.END:case 35:return d.END;case d.PAGE_UP:case 33:return d.PAGE_UP;case d.PAGE_DOWN:case 34:return d.PAGE_DOWN;default:return""}}},{key:"getValueForKeyId_",value:function(t){var e=this.max_,n=this.min_,r=this.step_,i=r||(e-n)/100;switch(this.adapter_.isRTL()&&(t===d.ARROW_LEFT||t===d.ARROW_RIGHT)&&(i=-i),t){case d.ARROW_LEFT:case d.ARROW_DOWN:return this.value_-i;case d.ARROW_RIGHT:case d.ARROW_UP:return this.value_+i;case d.HOME:return this.min_;case d.END:return this.max_;case d.PAGE_UP:return this.value_+i*o.b.PAGE_FACTOR;case d.PAGE_DOWN:return this.value_-i*o.b.PAGE_FACTOR;default:return NaN}}},{key:"handleFocus_",value:function(){this.preventFocusState_||this.adapter_.addClass(o.a.FOCUS)}},{key:"handleBlur_",value:function(){this.preventFocusState_=!1,this.adapter_.removeClass(o.a.FOCUS)}},{key:"setValue_",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t!==this.value_||n){var r=this.min_,i=this.max_,a=t===r||t===i;this.step_&&!a&&(t=this.quantize_(t)),t<r?t=r:t>i&&(t=i),this.value_=t,this.adapter_.setAttribute(o.c.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),e&&(this.adapter_.notifyInput(),this.isDiscrete_&&this.adapter_.setMarkerValue(t))}}},{key:"quantize_",value:function(t){return Math.round(t/this.step_)*this.step_}},{key:"updateUIForCurrentValue_",value:function(){var t=this,e=this.max_,n=this.min_,r=this.value_,i=(r-n)/(e-n),a=i*this.rect_.width;this.adapter_.isRTL()&&(a=this.rect_.width-a);var o=s.getCorrectPropertyName(window,"transform"),u=s.getCorrectEventName(window,"transitionend");if(this.inTransit_){var c=function e(){t.setInTransit_(!1),t.adapter_.deregisterThumbContainerInteractionHandler(u,e)};this.adapter_.registerThumbContainerInteractionHandler(u,c)}this.updateUIFrame_=requestAnimationFrame(function(){t.setOff_(0===i),t.adapter_.setThumbContainerStyleProperty(o,"translateX("+a+"px) translateX(-50%)"),t.adapter_.setTrackStyleProperty(o,"scaleX("+i+")")})}},{key:"setOff_",value:function(t){this.off_=t,this.toggleClass_(o.a.OFF,this.off_)}},{key:"setActive_",value:function(t){this.active_=t,this.toggleClass_(o.a.ACTIVE,this.active_)}},{key:"setInTransit_",value:function(t){this.inTransit_=t,this.toggleClass_(o.a.IN_TRANSIT,this.inTransit_)}},{key:"toggleClass_",value:function(t,e){e?this.adapter_.addClass(t):this.adapter_.removeClass(t)}}]),e}(u.a);e.a=_},8:function(t,e,n){"use strict";function r(t){return void 0!==t.document&&"function"==typeof t.document.createElement}function i(t){return t in c||t in l}function a(t,e,n){return e[t].styleProperty in n.style?e[t].noPrefix:e[t].webkitPrefix}function o(t,e){if(!r(t)||!i(e))return e;var n=e in c?c:l,o=t.document.createElement("div");return n===c?a(e,n,o):n[e].noPrefix in o.style?n[e].noPrefix:n[e].webkitPrefix}function s(t,e){return o(t,e)}function u(t,e){return o(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"transformStyleProperties",function(){return d}),e.getCorrectEventName=s,e.getCorrectPropertyName=u;var c={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},l={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},d=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]}})});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.slider=e():(t.mdc=t.mdc||{},t.mdc.slider=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=77)}({0:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=a},1:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),a(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=o},18:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});var r={ACTIVE:"mdc-slider--active",DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",FOCUS:"mdc-slider--focus",IN_TRANSIT:"mdc-slider--in-transit",OFF:"mdc-slider--off",IS_DISCRETE:"mdc-slider--discrete",HAS_TRACK_MARKER:"mdc-slider--display-markers"},i={TRACK_SELECTOR:".mdc-slider__track",TRACK_MARKER_CONTAINER_SELECTOR:".mdc-slider__track-marker-container",LAST_TRACK_MARKER_SELECTOR:".mdc-slider__track-marker:last-child",THUMB_CONTAINER_SELECTOR:".mdc-slider__thumb-container",PIN_VALUE_MARKER_SELECTOR:".mdc-slider__pin-value-marker",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUENOW:"aria-valuenow",ARIA_DISABLED:"aria-disabled",STEP_DATA_ATTR:"data-step",CHANGE_EVENT:"MDCSlider:change",INPUT_EVENT:"MDCSlider:input"},a={PAGE_FACTOR:4}},77:function(t,e,n){t.exports=n(78)},78:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCSlider",function(){return l});var o=n(1),s=n(18),u=n(79);n.d(e,"MDCSliderFoundation",function(){return u.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),c(e,[{key:"initialize",value:function(){this.thumbContainer_=this.root_.querySelector(s.c.THUMB_CONTAINER_SELECTOR),this.track_=this.root_.querySelector(s.c.TRACK_SELECTOR),this.pinValueMarker_=this.root_.querySelector(s.c.PIN_VALUE_MARKER_SELECTOR),this.trackMarkerContainer_=this.root_.querySelector(s.c.TRACK_MARKER_CONTAINER_SELECTOR)}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.a({hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getAttribute:function(e){return t.root_.getAttribute(e)},setAttribute:function(e,n){return t.root_.setAttribute(e,n)},removeAttribute:function(e){return t.root_.removeAttribute(e)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getTabIndex:function(){return t.root_.tabIndex},registerInteractionHandler:function(e,n){t.root_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){t.root_.removeEventListener(e,n)},registerThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.addEventListener(e,n)},deregisterThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.removeEventListener(e,n)},registerBodyInteractionHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyInteractionHandler:function(t,e){document.body.removeEventListener(t,e)},registerResizeHandler:function(t){window.addEventListener("resize",t)},deregisterResizeHandler:function(t){window.removeEventListener("resize",t)},notifyInput:function(){t.emit(s.c.INPUT_EVENT,t)},notifyChange:function(){t.emit(s.c.CHANGE_EVENT,t)},setThumbContainerStyleProperty:function(e,n){t.thumbContainer_.style.setProperty(e,n)},setTrackStyleProperty:function(e,n){t.track_.style.setProperty(e,n)},setMarkerValue:function(e){t.pinValueMarker_.innerText=e},appendTrackMarkers:function(e){for(var n=document.createDocumentFragment(),r=0;r<e;r++){var i=document.createElement("div");i.classList.add("mdc-slider__track-marker"),n.appendChild(i)}t.trackMarkerContainer_.appendChild(n)},removeTrackMarkers:function(){for(;t.trackMarkerContainer_.firstChild;)t.trackMarkerContainer_.removeChild(t.trackMarkerContainer_.firstChild)},setLastTrackMarkersStyleProperty:function(e,n){t.root_.querySelector(s.c.LAST_TRACK_MARKER_SELECTOR).style.setProperty(e,n)},isRTL:function(){return"rtl"===getComputedStyle(t.root_).direction}})}},{key:"initialSyncWithDOM",value:function(){var t=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUENOW));this.min=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUEMIN))||this.min,this.max=parseFloat(this.root_.getAttribute(s.c.ARIA_VALUEMAX))||this.max,this.step=parseFloat(this.root_.getAttribute(s.c.STEP_DATA_ATTR))||this.step,this.value=t||this.value,this.disabled=this.root_.hasAttribute(s.c.ARIA_DISABLED)&&"false"!==this.root_.getAttribute(s.c.ARIA_DISABLED),this.foundation_.setupTrackMarker()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"stepUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value+=t}},{key:"stepDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.step||1;this.value-=t}},{key:"value",get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)}},{key:"min",get:function(){return this.foundation_.getMin()},set:function(t){this.foundation_.setMin(t)}},{key:"max",get:function(){return this.foundation_.getMax()},set:function(t){this.foundation_.setMax(t)}},{key:"step",get:function(){return this.foundation_.getStep()},set:function(t){this.foundation_.setStep(t)}},{key:"disabled",get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.a)},79:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(18),s=n(9),u=n(0),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d={ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"},_=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.rect_=null,n.savedTabIndex_=NaN,n.off_=!1,n.active_=!1,n.inTransit_=!1,n.isDiscrete_=!1,n.hasTrackMarker_=!1,n.handlingThumbTargetEvt_=!1,n.min_=0,n.max_=100,n.step_=0,n.value_=0,n.disabled_=!1,n.preventFocusState_=!1,n.updateUIFrame_=0,n.thumbContainerPointerHandler_=function(){n.handlingThumbTargetEvt_=!0},n.mousedownHandler_=n.createDownHandler_("mousemove","mouseup"),n.pointerdownHandler_=n.createDownHandler_("pointermove","pointerup"),n.touchstartHandler_=n.createDownHandler_("touchmove","touchend",function(t){return t.targetTouches[0].pageX}),n.keydownHandler_=function(t){return n.handleKeydown_(t)},n.focusHandler_=function(){return n.handleFocus_()},n.blurHandler_=function(){return n.handleBlur_()},n.resizeHandler_=function(){return n.layout()},n}return a(e,t),l(e,null,[{key:"cssClasses",get:function(){return o.a}},{key:"strings",get:function(){return o.c}},{key:"numbers",get:function(){return o.b}},{key:"defaultAdapter",get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabIndex:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerThumbContainerInteractionHandler:function(){},deregisterThumbContainerInteractionHandler:function(){},registerBodyInteractionHandler:function(){},deregisterBodyInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},notifyInput:function(){},notifyChange:function(){},setThumbContainerStyleProperty:function(){},setTrackStyleProperty:function(){},setMarkerValue:function(){},appendTrackMarkers:function(){},removeTrackMarkers:function(){},setLastTrackMarkersStyleProperty:function(){},isRTL:function(){return!1}}}}]),l(e,[{key:"init",value:function(){var t=this;this.isDiscrete_=this.adapter_.hasClass(o.a.IS_DISCRETE),this.hasTrackMarker_=this.adapter_.hasClass(o.a.HAS_TRACK_MARKER),this.adapter_.registerInteractionHandler("mousedown",this.mousedownHandler_),this.adapter_.registerInteractionHandler("pointerdown",this.pointerdownHandler_),this.adapter_.registerInteractionHandler("touchstart",this.touchstartHandler_),this.adapter_.registerInteractionHandler("keydown",this.keydownHandler_),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),["mousedown","pointerdown","touchstart"].forEach(function(e){t.adapter_.registerThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.registerResizeHandler(this.resizeHandler_),this.layout(),this.isDiscrete_&&0==this.getStep()&&this.setStep(1)}},{key:"destroy",value:function(){var t=this;this.adapter_.deregisterInteractionHandler("mousedown",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("pointerdown",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("touchstart",this.mousedownHandler_),this.adapter_.deregisterInteractionHandler("keydown",this.keydownHandler_),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),["mousedown","pointerdown","touchstart"].forEach(function(e){t.adapter_.deregisterThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"setupTrackMarker",value:function(){if(this.isDiscrete_&&this.hasTrackMarker_&&0!=this.getStep()){var t=this.getMin(),e=this.getMax(),n=this.getStep(),r=(e-t)/n,i=Math.ceil(r)!==r;if(i&&(r=Math.ceil(r)),this.adapter_.removeTrackMarkers(),this.adapter_.appendTrackMarkers(r),i){var a=(e-r*n)/n+1,o=Object(s.getCorrectPropertyName)(window,"flex");this.adapter_.setLastTrackMarkersStyleProperty(o,a)}}}},{key:"layout",value:function(){this.rect_=this.adapter_.computeBoundingRect(),this.updateUIForCurrentValue_()}},{key:"getValue",value:function(){return this.value_}},{key:"setValue",value:function(t){this.setValue_(t,!1)}},{key:"getMax",value:function(){return this.max_}},{key:"setMax",value:function(t){if(t<this.min_)throw new Error("Cannot set max to be less than the slider's minimum value");this.max_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.c.ARIA_VALUEMAX,String(this.max_)),this.setupTrackMarker()}},{key:"getMin",value:function(){return this.min_}},{key:"setMin",value:function(t){if(t>this.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.c.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()}},{key:"getStep",value:function(){return this.step_}},{key:"setStep",value:function(t){if(t<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof t||t<1)&&(t=1),this.step_=t,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()}},{key:"isDisabled",value:function(){return this.disabled_}},{key:"setDisabled",value:function(t){this.disabled_=t,this.toggleClass_(o.a.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setAttribute(o.c.ARIA_DISABLED,"true"),this.adapter_.removeAttribute("tabindex")):(this.adapter_.removeAttribute(o.c.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter_.setAttribute("tabindex",String(this.savedTabIndex_)))}},{key:"createDownHandler_",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return t.pageX},i=function(t){t.preventDefault(),n.setValueFromEvt_(t,r)},a=function r(){n.setActive_(!1),n.adapter_.deregisterBodyInteractionHandler(t,i),n.adapter_.deregisterBodyInteractionHandler(e,r),n.adapter_.notifyChange()};return function(o){n.disabled_||(n.preventFocusState_=!0,n.setInTransit_(!n.handlingThumbTargetEvt_),n.handlingThumbTargetEvt_=!1,n.setActive_(!0),n.adapter_.registerBodyInteractionHandler(t,i),n.adapter_.registerBodyInteractionHandler(e,a),n.setValueFromEvt_(o,r))}}},{key:"setValueFromEvt_",value:function(t,e){var n=e(t),r=this.computeValueFromPageX_(n);this.setValue_(r,!0)}},{key:"computeValueFromPageX_",value:function(t){var e=this.max_,n=this.min_,r=t-this.rect_.left,i=r/this.rect_.width;return this.adapter_.isRTL()&&(i=1-i),n+i*(e-n)}},{key:"handleKeydown_",value:function(t){var e=this.getKeyId_(t),n=this.getValueForKeyId_(e);isNaN(n)||(t.preventDefault(),this.adapter_.addClass(o.a.FOCUS),this.setValue_(n,!0),this.adapter_.notifyChange())}},{key:"getKeyId_",value:function(t){switch(t.key||t.keyCode){case d.ARROW_LEFT:case 37:return d.ARROW_LEFT;case d.ARROW_RIGHT:case 39:return d.ARROW_RIGHT;case d.ARROW_UP:case 38:return d.ARROW_UP;case d.ARROW_DOWN:case 40:return d.ARROW_DOWN;case d.HOME:case 36:return d.HOME;case d.END:case 35:return d.END;case d.PAGE_UP:case 33:return d.PAGE_UP;case d.PAGE_DOWN:case 34:return d.PAGE_DOWN;default:return""}}},{key:"getValueForKeyId_",value:function(t){var e=this.max_,n=this.min_,r=this.step_,i=r||(e-n)/100;switch(this.adapter_.isRTL()&&(t===d.ARROW_LEFT||t===d.ARROW_RIGHT)&&(i=-i),t){case d.ARROW_LEFT:case d.ARROW_DOWN:return this.value_-i;case d.ARROW_RIGHT:case d.ARROW_UP:return this.value_+i;case d.HOME:return this.min_;case d.END:return this.max_;case d.PAGE_UP:return this.value_+i*o.b.PAGE_FACTOR;case d.PAGE_DOWN:return this.value_-i*o.b.PAGE_FACTOR;default:return NaN}}},{key:"handleFocus_",value:function(){this.preventFocusState_||this.adapter_.addClass(o.a.FOCUS)}},{key:"handleBlur_",value:function(){this.preventFocusState_=!1,this.adapter_.removeClass(o.a.FOCUS)}},{key:"setValue_",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t!==this.value_||n){var r=this.min_,i=this.max_,a=t===r||t===i;this.step_&&!a&&(t=this.quantize_(t)),t<r?t=r:t>i&&(t=i),this.value_=t,this.adapter_.setAttribute(o.c.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),e&&(this.adapter_.notifyInput(),this.isDiscrete_&&this.adapter_.setMarkerValue(t))}}},{key:"quantize_",value:function(t){return Math.round(t/this.step_)*this.step_}},{key:"updateUIForCurrentValue_",value:function(){var t=this,e=this.max_,n=this.min_,r=this.value_,i=(r-n)/(e-n),a=i*this.rect_.width;this.adapter_.isRTL()&&(a=this.rect_.width-a);var o=Object(s.getCorrectPropertyName)(window,"transform"),u=Object(s.getCorrectEventName)(window,"transitionend");if(this.inTransit_){var c=function e(){t.setInTransit_(!1),t.adapter_.deregisterThumbContainerInteractionHandler(u,e)};this.adapter_.registerThumbContainerInteractionHandler(u,c)}this.updateUIFrame_=requestAnimationFrame(function(){t.setOff_(0===i),t.adapter_.setThumbContainerStyleProperty(o,"translateX("+a+"px) translateX(-50%)"),t.adapter_.setTrackStyleProperty(o,"scaleX("+i+")")})}},{key:"setOff_",value:function(t){this.off_=t,this.toggleClass_(o.a.OFF,this.off_)}},{key:"setActive_",value:function(t){this.active_=t,this.toggleClass_(o.a.ACTIVE,this.active_)}},{key:"setInTransit_",value:function(t){this.inTransit_=t,this.toggleClass_(o.a.IN_TRANSIT,this.inTransit_)}},{key:"toggleClass_",value:function(t,e){e?this.adapter_.addClass(t):this.adapter_.removeClass(t)}}]),e}(u.a);e.a=_},9:function(t,e,n){"use strict";function r(t){return void 0!==t.document&&"function"==typeof t.document.createElement}function i(t){return t in c||t in l}function a(t,e,n){return e[t].styleProperty in n.style?e[t].noPrefix:e[t].webkitPrefix}function o(t,e){if(!r(t)||!i(e))return e;var n=e in c?c:l,o=t.document.createElement("div");return n===c?a(e,n,o):n[e].noPrefix in o.style?n[e].noPrefix:n[e].webkitPrefix}function s(t,e){return o(t,e)}function u(t,e){return o(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"transformStyleProperties",function(){return d}),e.getCorrectEventName=s,e.getCorrectPropertyName=u;var c={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},l={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},d=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]}})});
{
"name": "@material/slider",
"version": "0.2.0",
"version": "0.2.1",
"description": "The Material Components for the web slider component",

@@ -20,7 +20,7 @@ "main": "index.js",

"dependencies": {
"@material/animation": "^0.2.2",
"@material/base": "^0.2.2",
"@material/rtl": "^0.1.6",
"@material/theme": "^0.1.5"
"@material/animation": "^0.3.0",
"@material/base": "^0.2.3",
"@material/rtl": "^0.1.7",
"@material/theme": "^0.1.6"
}
}

@@ -208,3 +208,3 @@ <!--docs:

| `stepUp(amount = 1) => void` | Increases the slider value by the given `amount`, or `1` if no amount is given |
| `stepDown(amount = 1) => void` | Increases the slider value by the given `amount`, or `1` if no amount is given |
| `stepDown(amount = 1) => void` | Decrease the slider value by the given `amount`, or `1` if no amount is given |

@@ -211,0 +211,0 @@ #### Events

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc