@limetech/lime-elements 37.0.0-dev.1 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/limel-slider.cjs.entry.js +6 -3
- package/dist/cjs/limel-slider.cjs.entry.js.map +1 -1
- package/dist/collection/components/slider/slider.js +6 -3
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/esm/limel-slider.entry.js +6 -3
- package/dist/esm/limel-slider.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-4ef9aa7d.entry.js → p-461b5f85.entry.js} +7 -7
- package/dist/lime-elements/p-461b5f85.entry.js.map +1 -0
- package/dist/types/components/slider/slider.d.ts +2 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-4ef9aa7d.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-c8818b66.js";export{s as setNonce}from"./p-c8818b66.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l([["p-28da3c47",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-da25e94d",[[1,"limel-action-bar",{actions:[16],accessibleLabel:[513,"accessible-label"],layout:[513],openDirection:[513,"open-direction"],overflowCutoff:[32]}]]],["p-40b7d717",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-9e78a21c",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[8],searcher:[8],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-30df2bb6",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-d07f1a1f",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[520],format:[513],language:[520],formatter:[16],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-3670f018",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-2359d139",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[8],options:[16],multiple:[4],menuOpen:[32]}]]],["p-a11a971e",[[1,"limel-file",{value:[8],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[8],isDraggingOverDropZone:[32]}]]],["p-715d3252",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[8],progress:[16]}]]],["p-1a80da5e",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[8],show:[64]}]]],["p-9aab2892",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-2118b9ae",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-896043d6",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-55a09930",[[1,"limel-dialog",{heading:[8],fullscreen:[516],open:[1540],closingActions:[520,"closing-actions"]}]]],["p-a8714655",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-e59e0040",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[8]}]]],["p-c647b197",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-d228fd62",[[1,"limel-callout",{heading:[513],icon:[513],type:[513],language:[8]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-c8818b66.js";export{s as setNonce}from"./p-c8818b66.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l([["p-28da3c47",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-da25e94d",[[1,"limel-action-bar",{actions:[16],accessibleLabel:[513,"accessible-label"],layout:[513],openDirection:[513,"open-direction"],overflowCutoff:[32]}]]],["p-40b7d717",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-9e78a21c",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[8],searcher:[8],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-30df2bb6",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-d07f1a1f",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[520],format:[513],language:[520],formatter:[16],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-3670f018",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-2359d139",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[8],options:[16],multiple:[4],menuOpen:[32]}]]],["p-a11a971e",[[1,"limel-file",{value:[8],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[8],isDraggingOverDropZone:[32]}]]],["p-715d3252",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[8],progress:[16]}]]],["p-1a80da5e",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[8],show:[64]}]]],["p-9aab2892",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-2118b9ae",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-896043d6",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-55a09930",[[1,"limel-dialog",{heading:[8],fullscreen:[516],open:[1540],closingActions:[520,"closing-actions"]}]]],["p-a8714655",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-e59e0040",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[8]}]]],["p-c647b197",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-d228fd62",[[1,"limel-callout",{heading:[513],icon:[513],type:[513],language:[8]}]]],["p-461b5f85",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-848437f8",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-7a3f58cd",[[1,"limel-config",{config:[16]}]]],["p-f1d9723a",[[1,"limel-flex-container",{direction:[520],justify:[520],align:[520],reverse:[516]}]]],["p-2565927b",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-9fe3bc64",[[1,"limel-grid"]]],["p-d7c39d02",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-63111b62",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]],["p-a40e05c3",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-e0fa49ca",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-795079c9",[[1,"limel-badge",{label:[520]}]]],["p-5b374246",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-4ed75a11",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-8b339748",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-a3bea367",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-2b0c6ccd",[[1,"limel-flatpickr-adapter",{value:[16],type:[8],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[8],formatter:[16]}]]],["p-0137d2fb",[[0,"limel-action-bar-overflow-menu",{items:[16],openDirection:[513,"open-direction"]}],[0,"limel-action-bar-item",{item:[16],isVisible:[516,"is-visible"]}]]],["p-13ed01eb",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[8],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-1dc042e5",[[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-4114c214",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],prefix:[513],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}],[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-42a24572",[[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[8],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]],["p-b8ed25b3",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],isFocused:[32],isModified:[32],showCompletions:[32]}]]],["p-fb799569",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-623d09d9",[[1,"limel-spinner",{size:[520],limeBranded:[4,"lime-branded"]}]]],["p-753f500b",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"]}],[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[8],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-6b952164",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-popover-surface",{contentCollection:[16]}]]],["p-ca9b383b",[[1,"limel-helper-line",{helperText:[513,"helper-text"],length:[514],maxLength:[514,"max-length"],invalid:[516],helperTextId:[513,"helper-text-id"]}]]],["p-17ac8cca",[[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-648d9057",[[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],open:[32]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}]]]],e)));
|
|
2
2
|
//# sourceMappingURL=lime-elements.esm.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as r,H as i,g as n}from"./p-c8818b66.js";import{
|
|
1
|
+
import{r as t,c as e,h as r,H as i,g as n}from"./p-c8818b66.js";import{c as s}from"./p-6c094f3f.js";import{M as o,a}from"./p-48d4ef20.js";import{M as d,a as c,b as l}from"./p-cbc43682.js";import{m}from"./p-dcc97cc2.js";import{A as h}from"./p-48105d44.js";import{g as u}from"./p-9faad6eb.js";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var
|
|
15
|
+
***************************************************************************** */var f=function(t,e){f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return f(t,e)};function p(t,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");f(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var b=function(){b=Object.assign||function t(e){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))e[s]=r[s]}return e};return b.apply(this,arguments)};
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2020 Google Inc.
|
|
@@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
34
34
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
35
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
36
36
|
* THE SOFTWARE.
|
|
37
|
-
*/var
|
|
37
|
+
*/var v={DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",INPUT:"mdc-slider__input",RANGE:"mdc-slider--range",THUMB:"mdc-slider__thumb",THUMB_FOCUSED:"mdc-slider__thumb--focused",THUMB_KNOB:"mdc-slider__thumb-knob",THUMB_TOP:"mdc-slider__thumb--top",THUMB_WITH_INDICATOR:"mdc-slider__thumb--with-indicator",TICK_MARKS:"mdc-slider--tick-marks",TICK_MARKS_CONTAINER:"mdc-slider__tick-marks",TICK_MARK_ACTIVE:"mdc-slider__tick-mark--active",TICK_MARK_INACTIVE:"mdc-slider__tick-mark--inactive",TRACK:"mdc-slider__track",TRACK_ACTIVE:"mdc-slider__track--active_fill",VALUE_INDICATOR_TEXT:"mdc-slider__value-indicator-text"};var _={STEP_SIZE:1,THUMB_UPDATE_MIN_PX:5};var g={ARIA_VALUETEXT:"aria-valuetext",INPUT_DISABLED:"disabled",INPUT_MIN:"min",INPUT_MAX:"max",INPUT_VALUE:"value",INPUT_STEP:"step"};var y={CHANGE:"MDCSlider:change",INPUT:"MDCSlider:input"};
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright 2020 Google Inc.
|
|
@@ -56,7 +56,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
56
56
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
57
57
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58
58
|
* THE SOFTWARE.
|
|
59
|
-
*/var
|
|
59
|
+
*/var k;(function(t){t[t["ACTIVE"]=0]="ACTIVE";t[t["INACTIVE"]=1]="INACTIVE"})(k||(k={}));var x;(function(t){t[t["START"]=1]="START";t[t["END"]=2]="END"})(x||(x={}));
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2020 Google Inc.
|
|
@@ -78,7 +78,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
78
78
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
79
79
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
80
80
|
* THE SOFTWARE.
|
|
81
|
-
*/var x;(function(t){t["SLIDER_UPDATE"]="slider_update"})(x||(x={}));var w=typeof window!=="undefined";var E=function(t){f(e,t);function e(r){var i=t.call(this,p(p({},e.defaultAdapter),r))||this;i.initialStylesRemoved=false;i.isDisabled=false;i.isDiscrete=false;i.step=v.STEP_SIZE;i.hasTickMarks=false;i.isRange=false;i.thumb=null;i.downEventClientX=null;i.startThumbKnobWidth=0;i.endThumbKnobWidth=0;i.animFrame=new m;return i}Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return false},addClass:function(){return undefined},removeClass:function(){return undefined},addThumbClass:function(){return undefined},removeThumbClass:function(){return undefined},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){return undefined},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){return undefined},isInputFocused:function(){return false},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return false},setThumbStyleProperty:function(){return undefined},removeThumbStyleProperty:function(){return undefined},setTrackActiveStyleProperty:function(){return undefined},removeTrackActiveStyleProperty:function(){return undefined},setValueIndicatorText:function(){return undefined},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){return undefined},setPointerCapture:function(){return undefined},emitChangeEvent:function(){return undefined},emitInputEvent:function(){return undefined},emitDragStartEvent:function(){return undefined},emitDragEndEvent:function(){return undefined},registerEventHandler:function(){return undefined},deregisterEventHandler:function(){return undefined},registerThumbEventHandler:function(){return undefined},deregisterThumbEventHandler:function(){return undefined},registerInputEventHandler:function(){return undefined},deregisterInputEventHandler:function(){return undefined},registerBodyEventHandler:function(){return undefined},deregisterBodyEventHandler:function(){return undefined},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});e.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(b.DISABLED);this.isDiscrete=this.adapter.hasClass(b.DISCRETE);this.hasTickMarks=this.adapter.hasClass(b.TICK_MARKS);this.isRange=this.adapter.hasClass(b.RANGE);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_MIN,this.isRange?k.START:k.END),_.INPUT_MIN);var r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_MAX,k.END),_.INPUT_MAX);var i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_VALUE,k.END),_.INPUT_VALUE);var n=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(_.INPUT_VALUE,k.START),_.INPUT_VALUE):e;var s=this.adapter.getInputAttribute(_.INPUT_STEP,k.END);var o=s?this.convertAttributeValueToNumber(s,_.INPUT_STEP):this.step;this.validateProperties({min:e,max:r,value:i,valueStart:n,step:o});this.min=e;this.max=r;this.value=i;this.valueStart=n;this.step=o;this.numDecimalPlaces=T(this.step);this.valueBeforeDownEvent=i;this.valueStartBeforeDownEvent=n;this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this);this.moveListener=this.handleMove.bind(this);this.pointerdownListener=this.handlePointerdown.bind(this);this.pointerupListener=this.handlePointerup.bind(this);this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this);this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this);this.inputStartChangeListener=function(){t.handleInputChange(k.START)};this.inputEndChangeListener=function(){t.handleInputChange(k.END)};this.inputStartFocusListener=function(){t.handleInputFocus(k.START)};this.inputEndFocusListener=function(){t.handleInputFocus(k.END)};this.inputStartBlurListener=function(){t.handleInputBlur(k.START)};this.inputEndBlurListener=function(){t.handleInputBlur(k.END)};this.resizeListener=this.handleResize.bind(this);this.registerEventHandlers()};e.prototype.destroy=function(){this.deregisterEventHandlers()};e.prototype.setMin=function(t){this.min=t;if(!this.isRange){this.valueStart=t}this.updateUI()};e.prototype.setMax=function(t){this.max=t;this.updateUI()};e.prototype.getMin=function(){return this.min};e.prototype.getMax=function(){return this.max};e.prototype.getValue=function(){return this.value};e.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart){throw new Error("end thumb value ("+t+") must be >= start thumb "+("value ("+this.valueStart+")"))}this.updateValue(t,k.END)};e.prototype.getValueStart=function(){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}return this.valueStart};e.prototype.setValueStart=function(t){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}if(this.isRange&&t>this.value){throw new Error("start thumb value ("+t+") must be <= end thumb "+("value ("+this.value+")"))}this.updateValue(t,k.START)};e.prototype.setStep=function(t){this.step=t;this.numDecimalPlaces=T(t);this.updateUI()};e.prototype.setIsDiscrete=function(t){this.isDiscrete=t;this.updateValueIndicatorUI();this.updateTickMarksUI()};e.prototype.getStep=function(){return this.step};e.prototype.setHasTickMarks=function(t){this.hasTickMarks=t;this.updateTickMarksUI()};e.prototype.getDisabled=function(){return this.isDisabled};e.prototype.setDisabled=function(t){this.isDisabled=t;if(t){this.adapter.addClass(b.DISABLED);if(this.isRange){this.adapter.setInputAttribute(_.INPUT_DISABLED,"",k.START)}this.adapter.setInputAttribute(_.INPUT_DISABLED,"",k.END)}else{this.adapter.removeClass(b.DISABLED);if(this.isRange){this.adapter.removeInputAttribute(_.INPUT_DISABLED,k.START)}this.adapter.removeInputAttribute(_.INPUT_DISABLED,k.END)}};e.prototype.getIsRange=function(){return this.isRange};e.prototype.layout=function(t){var e=t===void 0?{}:t,r=e.skipUpdateUI;this.rect=this.adapter.getBoundingClientRect();if(this.isRange){this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(k.START);this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(k.END)}if(!r){this.updateUI()}};e.prototype.handleResize=function(){this.layout()};e.prototype.handleDown=function(t){if(this.isDisabled)return;this.valueStartBeforeDownEvent=this.valueStart;this.valueBeforeDownEvent=this.value;var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=e;var r=this.mapClientXOnSliderScale(e);this.thumb=this.getThumbFromDownEvent(e,r);if(this.thumb===null)return;this.handleDragStart(t,r,this.thumb);this.updateValue(r,this.thumb,{emitInputEvent:true})};e.prototype.handleMove=function(t){if(this.isDisabled)return;t.preventDefault();var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;var r=this.thumb!=null;this.thumb=this.getThumbFromMoveEvent(e);if(this.thumb===null)return;var i=this.mapClientXOnSliderScale(e);if(!r){this.handleDragStart(t,i,this.thumb);this.adapter.emitDragStartEvent(i,this.thumb)}this.updateValue(i,this.thumb,{emitInputEvent:true})};e.prototype.handleUp=function(){if(this.isDisabled||this.thumb===null)return;var t=this.thumb===k.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent;var e=this.thumb===k.START?this.valueStart:this.value;if(t!==e){this.adapter.emitChangeEvent(e,this.thumb)}this.adapter.emitDragEndEvent(e,this.thumb);this.thumb=null};e.prototype.handleThumbMouseenter=function(){if(!this.isDiscrete||!this.isRange)return;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,k.START);this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,k.END)};e.prototype.handleThumbMouseleave=function(){if(!this.isDiscrete||!this.isRange)return;if(this.adapter.isInputFocused(k.START)||this.adapter.isInputFocused(k.END)){return}this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,k.START);this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,k.END)};e.prototype.handleMousedownOrTouchstart=function(t){var e=this;var r=t.type==="mousedown"?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(r,this.moveListener);var i=function(){e.handleUp();e.adapter.deregisterBodyEventHandler(r,e.moveListener);e.adapter.deregisterEventHandler("mouseup",i);e.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i);this.adapter.registerBodyEventHandler("touchend",i);this.handleDown(t)};e.prototype.handlePointerdown=function(t){this.adapter.setPointerCapture(t.pointerId);this.adapter.registerEventHandler("pointermove",this.moveListener);this.handleDown(t)};e.prototype.handleInputChange=function(t){var e=Number(this.adapter.getInputValue(t));if(t===k.START){this.setValueStart(e)}else{this.setValue(e)}this.adapter.emitChangeEvent(t===k.START?this.valueStart:this.value,t);this.adapter.emitInputEvent(t===k.START?this.valueStart:this.value,t)};e.prototype.handleInputFocus=function(t){this.adapter.addThumbClass(b.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===k.START?k.END:k.START;this.adapter.addThumbClass(b.THUMB_WITH_INDICATOR,e)}};e.prototype.handleInputBlur=function(t){this.adapter.removeThumbClass(b.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===k.START?k.END:k.START;this.adapter.removeThumbClass(b.THUMB_WITH_INDICATOR,e)}};e.prototype.handleDragStart=function(t,e,r){this.adapter.emitDragStartEvent(e,r);this.adapter.focusInput(r);t.preventDefault()};e.prototype.getThumbFromDownEvent=function(t,e){if(!this.isRange)return k.END;var r=this.adapter.getThumbBoundingClientRect(k.START);var i=this.adapter.getThumbBoundingClientRect(k.END);var n=t>=r.left&&t<=r.right;var s=t>=i.left&&t<=i.right;if(n&&s){return null}if(n){return k.START}if(s){return k.END}if(e<this.valueStart){return k.START}if(e>this.value){return k.END}return e-this.valueStart<=this.value-e?k.START:k.END};e.prototype.getThumbFromMoveEvent=function(t){if(this.thumb!==null)return this.thumb;if(this.downEventClientX===null){throw new Error("`downEventClientX` is null after move event.")}var e=Math.abs(this.downEventClientX-t)<v.THUMB_UPDATE_MIN_PX;if(e)return this.thumb;var r=t<this.downEventClientX;if(r){return this.adapter.isRTL()?k.END:k.START}else{return this.adapter.isRTL()?k.START:k.END}};e.prototype.updateUI=function(t){this.updateThumbAndInputAttributes(t);this.updateThumbAndTrackUI(t);this.updateValueIndicatorUI(t);this.updateTickMarksUI()};e.prototype.updateThumbAndInputAttributes=function(t){if(!t)return;var e=this.isRange&&t===k.START?this.valueStart:this.value;var r=String(e);this.adapter.setInputAttribute(_.INPUT_VALUE,r,t);if(this.isRange&&t===k.START){this.adapter.setInputAttribute(_.INPUT_MIN,r,k.END)}else if(this.isRange&&t===k.END){this.adapter.setInputAttribute(_.INPUT_MAX,r,k.START)}if(this.adapter.getInputValue(t)!==r){this.adapter.setInputValue(r,t)}var i=this.adapter.getValueToAriaValueTextFn();if(i){this.adapter.setInputAttribute(_.ARIA_VALUETEXT,i(e),t)}};e.prototype.updateValueIndicatorUI=function(t){if(!this.isDiscrete)return;var e=this.isRange&&t===k.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(e,t===k.START?k.START:k.END);if(!t&&this.isRange){this.adapter.setValueIndicatorText(this.valueStart,k.START)}};e.prototype.updateTickMarksUI=function(){if(!this.isDiscrete||!this.hasTickMarks)return;var t=(this.valueStart-this.min)/this.step;var e=(this.value-this.valueStart)/this.step+1;var r=(this.max-this.value)/this.step;var i=Array.from({length:t}).fill(y.INACTIVE);var n=Array.from({length:e}).fill(y.ACTIVE);var s=Array.from({length:r}).fill(y.INACTIVE);this.adapter.updateTickMarks(i.concat(n).concat(s))};e.prototype.mapClientXOnSliderScale=function(t){var e=t-this.rect.left;var r=e/this.rect.width;if(this.adapter.isRTL()){r=1-r}var i=this.min+r*(this.max-this.min);if(i===this.max||i===this.min){return i}return Number(this.quantize(i).toFixed(this.numDecimalPlaces))};e.prototype.quantize=function(t){var e=Math.round((t-this.min)/this.step);return this.min+e*this.step};e.prototype.updateValue=function(t,e,r){var i=r===void 0?{}:r,n=i.emitInputEvent;t=this.clampValue(t,e);if(this.isRange&&e===k.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(e);if(n){this.adapter.emitInputEvent(e===k.START?this.valueStart:this.value,e)}};e.prototype.clampValue=function(t,e){t=Math.min(Math.max(t,this.min),this.max);var r=this.isRange&&e===k.START&&t>this.value;if(r){return this.value}var i=this.isRange&&e===k.END&&t<this.valueStart;if(i){return this.valueStart}return t};e.prototype.updateThumbAndTrackUI=function(t){var e=this;var r=this,i=r.max,n=r.min;var s=(this.value-this.valueStart)/(i-n);var o=s*this.rect.width;var a=this.adapter.isRTL();var d=w?h(window,"transform"):"transform";if(this.isRange){var c=this.adapter.isRTL()?(i-this.value)/(i-n)*this.rect.width:(this.valueStart-n)/(i-n)*this.rect.width;var l=c+o;this.animFrame.request(x.SLIDER_UPDATE,(function(){var r=!a&&t===k.START||a&&t!==k.START;if(r){e.adapter.setTrackActiveStyleProperty("transform-origin","right");e.adapter.setTrackActiveStyleProperty("left","unset");e.adapter.setTrackActiveStyleProperty("right",e.rect.width-l+"px")}else{e.adapter.setTrackActiveStyleProperty("transform-origin","left");e.adapter.setTrackActiveStyleProperty("right","unset");e.adapter.setTrackActiveStyleProperty("left",c+"px")}e.adapter.setTrackActiveStyleProperty(d,"scaleX("+s+")");var i=a?l:c;var n=e.adapter.isRTL()?c:l;if(t===k.START||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(d,"translateX("+i+"px)",k.START)}if(t===k.END||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(d,"translateX("+n+"px)",k.END)}e.removeInitialStyles(a);e.updateOverlappingThumbsUI(i,n,t)}))}else{this.animFrame.request(x.SLIDER_UPDATE,(function(){var t=a?e.rect.width-o:o;e.adapter.setThumbStyleProperty(d,"translateX("+t+"px)",k.END);e.adapter.setTrackActiveStyleProperty(d,"scaleX("+s+")");e.removeInitialStyles(a)}))}};e.prototype.removeInitialStyles=function(t){if(this.initialStylesRemoved)return;var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,k.END);if(this.isRange){this.adapter.removeThumbStyleProperty(e,k.START)}this.initialStylesRemoved=true;this.resetTrackAndThumbAnimation()};e.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(!this.isDiscrete)return;var e=w?h(window,"transition"):"transition";var r="all 0s ease 0s";this.adapter.setThumbStyleProperty(e,r,k.END);if(this.isRange){this.adapter.setThumbStyleProperty(e,r,k.START)}this.adapter.setTrackActiveStyleProperty(e,r);requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,k.END);t.adapter.removeTrackActiveStyleProperty(e);if(t.isRange){t.adapter.removeThumbStyleProperty(e,k.START)}}))};e.prototype.updateOverlappingThumbsUI=function(t,e,r){var i=false;if(this.adapter.isRTL()){var n=t-this.startThumbKnobWidth/2;var s=e+this.endThumbKnobWidth/2;i=s>=n}else{var o=t+this.startThumbKnobWidth/2;var a=e-this.endThumbKnobWidth/2;i=o>=a}if(i){this.adapter.addThumbClass(b.THUMB_TOP,r||k.END);this.adapter.removeThumbClass(b.THUMB_TOP,r===k.START?k.END:k.START)}else{this.adapter.removeThumbClass(b.THUMB_TOP,k.START);this.adapter.removeThumbClass(b.THUMB_TOP,k.END)}};e.prototype.convertAttributeValueToNumber=function(t,e){if(t===null){throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.")}var r=Number(t);if(isNaN(r)){throw new Error("MDCSliderFoundation: `"+e+"` value is "+("`"+t+"`, but must be a number."))}return r};e.prototype.validateProperties=function(t){var e=t.min,r=t.max,i=t.value,n=t.valueStart,s=t.step;if(e>=r){throw new Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+e+", max: "+r+"]"))}if(s<=0){throw new Error("MDCSliderFoundation: step must be a positive number. "+("Current step: "+this.step))}if(this.isRange){if(i<e||i>r||n<e||n>r){throw new Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+n+", end value: "+i+"]"))}if(n>i){throw new Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+n+", end value: "+i+"]"))}var o=(n-e)/s;var a=(i-e)/s;if(o%1!==0||a%1!==0){throw new Error("MDCSliderFoundation: Slider values must be valid based on the "+("step value. Current values: [start value: "+n+", ")+("end value: "+i+"]"))}}else{if(i<e||i>r){throw new Error("MDCSliderFoundation: value must be in [min, max] range. "+("Current value: "+i))}var a=(i-e)/s;if(a%1!==0){throw new Error("MDCSliderFoundation: Slider value must be valid based on the "+("step value. Current value: "+i))}}};e.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.registerEventHandler("pointerdown",this.pointerdownListener);this.adapter.registerEventHandler("pointerup",this.pointerupListener)}else{this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.registerThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.registerInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.registerInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.registerThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.registerInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.registerInputEventHandler(k.END,"blur",this.inputEndBlurListener)};e.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener);this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)}else{this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.deregisterThumbEventHandler(k.START,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.START,"change",this.inputStartChangeListener);this.adapter.deregisterInputEventHandler(k.START,"focus",this.inputStartFocusListener);this.adapter.deregisterInputEventHandler(k.START,"blur",this.inputStartBlurListener)}this.adapter.deregisterThumbEventHandler(k.END,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(k.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(k.END,"change",this.inputEndChangeListener);this.adapter.deregisterInputEventHandler(k.END,"focus",this.inputEndFocusListener);this.adapter.deregisterInputEventHandler(k.END,"blur",this.inputEndBlurListener)};e.prototype.handlePointerup=function(){this.handleUp();this.adapter.deregisterEventHandler("pointermove",this.moveListener)};e.SUPPORTS_POINTER_EVENTS=w&&Boolean(window.PointerEvent)&&!C();return e}(s);function C(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function T(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var r=e[1]||"";var i=e[2]||0;return Math.max(0,(r==="0"?0:r.length)-Number(i))}
|
|
81
|
+
*/var w;(function(t){t["SLIDER_UPDATE"]="slider_update"})(w||(w={}));var E=typeof window!=="undefined";var T=function(t){p(e,t);function e(r){var i=t.call(this,b(b({},e.defaultAdapter),r))||this;i.initialStylesRemoved=false;i.isDisabled=false;i.isDiscrete=false;i.step=_.STEP_SIZE;i.hasTickMarks=false;i.isRange=false;i.thumb=null;i.downEventClientX=null;i.startThumbKnobWidth=0;i.endThumbKnobWidth=0;i.animFrame=new h;return i}Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return false},addClass:function(){return undefined},removeClass:function(){return undefined},addThumbClass:function(){return undefined},removeThumbClass:function(){return undefined},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){return undefined},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){return undefined},isInputFocused:function(){return false},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return false},setThumbStyleProperty:function(){return undefined},removeThumbStyleProperty:function(){return undefined},setTrackActiveStyleProperty:function(){return undefined},removeTrackActiveStyleProperty:function(){return undefined},setValueIndicatorText:function(){return undefined},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){return undefined},setPointerCapture:function(){return undefined},emitChangeEvent:function(){return undefined},emitInputEvent:function(){return undefined},emitDragStartEvent:function(){return undefined},emitDragEndEvent:function(){return undefined},registerEventHandler:function(){return undefined},deregisterEventHandler:function(){return undefined},registerThumbEventHandler:function(){return undefined},deregisterThumbEventHandler:function(){return undefined},registerInputEventHandler:function(){return undefined},deregisterInputEventHandler:function(){return undefined},registerBodyEventHandler:function(){return undefined},deregisterBodyEventHandler:function(){return undefined},registerWindowEventHandler:function(){return undefined},deregisterWindowEventHandler:function(){return undefined}}},enumerable:false,configurable:true});e.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(v.DISABLED);this.isDiscrete=this.adapter.hasClass(v.DISCRETE);this.hasTickMarks=this.adapter.hasClass(v.TICK_MARKS);this.isRange=this.adapter.hasClass(v.RANGE);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN,this.isRange?x.START:x.END),g.INPUT_MIN);var r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MAX,x.END),g.INPUT_MAX);var i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE,x.END),g.INPUT_VALUE);var n=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE,x.START),g.INPUT_VALUE):e;var s=this.adapter.getInputAttribute(g.INPUT_STEP,x.END);var o=s?this.convertAttributeValueToNumber(s,g.INPUT_STEP):this.step;this.validateProperties({min:e,max:r,value:i,valueStart:n,step:o});this.min=e;this.max=r;this.value=i;this.valueStart=n;this.step=o;this.numDecimalPlaces=I(this.step);this.valueBeforeDownEvent=i;this.valueStartBeforeDownEvent=n;this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this);this.moveListener=this.handleMove.bind(this);this.pointerdownListener=this.handlePointerdown.bind(this);this.pointerupListener=this.handlePointerup.bind(this);this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this);this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this);this.inputStartChangeListener=function(){t.handleInputChange(x.START)};this.inputEndChangeListener=function(){t.handleInputChange(x.END)};this.inputStartFocusListener=function(){t.handleInputFocus(x.START)};this.inputEndFocusListener=function(){t.handleInputFocus(x.END)};this.inputStartBlurListener=function(){t.handleInputBlur(x.START)};this.inputEndBlurListener=function(){t.handleInputBlur(x.END)};this.resizeListener=this.handleResize.bind(this);this.registerEventHandlers()};e.prototype.destroy=function(){this.deregisterEventHandlers()};e.prototype.setMin=function(t){this.min=t;if(!this.isRange){this.valueStart=t}this.updateUI()};e.prototype.setMax=function(t){this.max=t;this.updateUI()};e.prototype.getMin=function(){return this.min};e.prototype.getMax=function(){return this.max};e.prototype.getValue=function(){return this.value};e.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart){throw new Error("end thumb value ("+t+") must be >= start thumb "+("value ("+this.valueStart+")"))}this.updateValue(t,x.END)};e.prototype.getValueStart=function(){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}return this.valueStart};e.prototype.setValueStart=function(t){if(!this.isRange){throw new Error("`valueStart` is only applicable for range sliders.")}if(this.isRange&&t>this.value){throw new Error("start thumb value ("+t+") must be <= end thumb "+("value ("+this.value+")"))}this.updateValue(t,x.START)};e.prototype.setStep=function(t){this.step=t;this.numDecimalPlaces=I(t);this.updateUI()};e.prototype.setIsDiscrete=function(t){this.isDiscrete=t;this.updateValueIndicatorUI();this.updateTickMarksUI()};e.prototype.getStep=function(){return this.step};e.prototype.setHasTickMarks=function(t){this.hasTickMarks=t;this.updateTickMarksUI()};e.prototype.getDisabled=function(){return this.isDisabled};e.prototype.setDisabled=function(t){this.isDisabled=t;if(t){this.adapter.addClass(v.DISABLED);if(this.isRange){this.adapter.setInputAttribute(g.INPUT_DISABLED,"",x.START)}this.adapter.setInputAttribute(g.INPUT_DISABLED,"",x.END)}else{this.adapter.removeClass(v.DISABLED);if(this.isRange){this.adapter.removeInputAttribute(g.INPUT_DISABLED,x.START)}this.adapter.removeInputAttribute(g.INPUT_DISABLED,x.END)}};e.prototype.getIsRange=function(){return this.isRange};e.prototype.layout=function(t){var e=t===void 0?{}:t,r=e.skipUpdateUI;this.rect=this.adapter.getBoundingClientRect();if(this.isRange){this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(x.START);this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(x.END)}if(!r){this.updateUI()}};e.prototype.handleResize=function(){this.layout()};e.prototype.handleDown=function(t){if(this.isDisabled)return;this.valueStartBeforeDownEvent=this.valueStart;this.valueBeforeDownEvent=this.value;var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=e;var r=this.mapClientXOnSliderScale(e);this.thumb=this.getThumbFromDownEvent(e,r);if(this.thumb===null)return;this.handleDragStart(t,r,this.thumb);this.updateValue(r,this.thumb,{emitInputEvent:true})};e.prototype.handleMove=function(t){if(this.isDisabled)return;t.preventDefault();var e=t.clientX!=null?t.clientX:t.targetTouches[0].clientX;var r=this.thumb!=null;this.thumb=this.getThumbFromMoveEvent(e);if(this.thumb===null)return;var i=this.mapClientXOnSliderScale(e);if(!r){this.handleDragStart(t,i,this.thumb);this.adapter.emitDragStartEvent(i,this.thumb)}this.updateValue(i,this.thumb,{emitInputEvent:true})};e.prototype.handleUp=function(){if(this.isDisabled||this.thumb===null)return;var t=this.thumb===x.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent;var e=this.thumb===x.START?this.valueStart:this.value;if(t!==e){this.adapter.emitChangeEvent(e,this.thumb)}this.adapter.emitDragEndEvent(e,this.thumb);this.thumb=null};e.prototype.handleThumbMouseenter=function(){if(!this.isDiscrete||!this.isRange)return;this.adapter.addThumbClass(v.THUMB_WITH_INDICATOR,x.START);this.adapter.addThumbClass(v.THUMB_WITH_INDICATOR,x.END)};e.prototype.handleThumbMouseleave=function(){if(!this.isDiscrete||!this.isRange)return;if(this.adapter.isInputFocused(x.START)||this.adapter.isInputFocused(x.END)){return}this.adapter.removeThumbClass(v.THUMB_WITH_INDICATOR,x.START);this.adapter.removeThumbClass(v.THUMB_WITH_INDICATOR,x.END)};e.prototype.handleMousedownOrTouchstart=function(t){var e=this;var r=t.type==="mousedown"?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(r,this.moveListener);var i=function(){e.handleUp();e.adapter.deregisterBodyEventHandler(r,e.moveListener);e.adapter.deregisterEventHandler("mouseup",i);e.adapter.deregisterEventHandler("touchend",i)};this.adapter.registerBodyEventHandler("mouseup",i);this.adapter.registerBodyEventHandler("touchend",i);this.handleDown(t)};e.prototype.handlePointerdown=function(t){this.adapter.setPointerCapture(t.pointerId);this.adapter.registerEventHandler("pointermove",this.moveListener);this.handleDown(t)};e.prototype.handleInputChange=function(t){var e=Number(this.adapter.getInputValue(t));if(t===x.START){this.setValueStart(e)}else{this.setValue(e)}this.adapter.emitChangeEvent(t===x.START?this.valueStart:this.value,t);this.adapter.emitInputEvent(t===x.START?this.valueStart:this.value,t)};e.prototype.handleInputFocus=function(t){this.adapter.addThumbClass(v.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.addThumbClass(v.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===x.START?x.END:x.START;this.adapter.addThumbClass(v.THUMB_WITH_INDICATOR,e)}};e.prototype.handleInputBlur=function(t){this.adapter.removeThumbClass(v.THUMB_FOCUSED,t);if(!this.isDiscrete)return;this.adapter.removeThumbClass(v.THUMB_WITH_INDICATOR,t);if(this.isRange){var e=t===x.START?x.END:x.START;this.adapter.removeThumbClass(v.THUMB_WITH_INDICATOR,e)}};e.prototype.handleDragStart=function(t,e,r){this.adapter.emitDragStartEvent(e,r);this.adapter.focusInput(r);t.preventDefault()};e.prototype.getThumbFromDownEvent=function(t,e){if(!this.isRange)return x.END;var r=this.adapter.getThumbBoundingClientRect(x.START);var i=this.adapter.getThumbBoundingClientRect(x.END);var n=t>=r.left&&t<=r.right;var s=t>=i.left&&t<=i.right;if(n&&s){return null}if(n){return x.START}if(s){return x.END}if(e<this.valueStart){return x.START}if(e>this.value){return x.END}return e-this.valueStart<=this.value-e?x.START:x.END};e.prototype.getThumbFromMoveEvent=function(t){if(this.thumb!==null)return this.thumb;if(this.downEventClientX===null){throw new Error("`downEventClientX` is null after move event.")}var e=Math.abs(this.downEventClientX-t)<_.THUMB_UPDATE_MIN_PX;if(e)return this.thumb;var r=t<this.downEventClientX;if(r){return this.adapter.isRTL()?x.END:x.START}else{return this.adapter.isRTL()?x.START:x.END}};e.prototype.updateUI=function(t){this.updateThumbAndInputAttributes(t);this.updateThumbAndTrackUI(t);this.updateValueIndicatorUI(t);this.updateTickMarksUI()};e.prototype.updateThumbAndInputAttributes=function(t){if(!t)return;var e=this.isRange&&t===x.START?this.valueStart:this.value;var r=String(e);this.adapter.setInputAttribute(g.INPUT_VALUE,r,t);if(this.isRange&&t===x.START){this.adapter.setInputAttribute(g.INPUT_MIN,r,x.END)}else if(this.isRange&&t===x.END){this.adapter.setInputAttribute(g.INPUT_MAX,r,x.START)}if(this.adapter.getInputValue(t)!==r){this.adapter.setInputValue(r,t)}var i=this.adapter.getValueToAriaValueTextFn();if(i){this.adapter.setInputAttribute(g.ARIA_VALUETEXT,i(e),t)}};e.prototype.updateValueIndicatorUI=function(t){if(!this.isDiscrete)return;var e=this.isRange&&t===x.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(e,t===x.START?x.START:x.END);if(!t&&this.isRange){this.adapter.setValueIndicatorText(this.valueStart,x.START)}};e.prototype.updateTickMarksUI=function(){if(!this.isDiscrete||!this.hasTickMarks)return;var t=(this.valueStart-this.min)/this.step;var e=(this.value-this.valueStart)/this.step+1;var r=(this.max-this.value)/this.step;var i=Array.from({length:t}).fill(k.INACTIVE);var n=Array.from({length:e}).fill(k.ACTIVE);var s=Array.from({length:r}).fill(k.INACTIVE);this.adapter.updateTickMarks(i.concat(n).concat(s))};e.prototype.mapClientXOnSliderScale=function(t){var e=t-this.rect.left;var r=e/this.rect.width;if(this.adapter.isRTL()){r=1-r}var i=this.min+r*(this.max-this.min);if(i===this.max||i===this.min){return i}return Number(this.quantize(i).toFixed(this.numDecimalPlaces))};e.prototype.quantize=function(t){var e=Math.round((t-this.min)/this.step);return this.min+e*this.step};e.prototype.updateValue=function(t,e,r){var i=r===void 0?{}:r,n=i.emitInputEvent;t=this.clampValue(t,e);if(this.isRange&&e===x.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(e);if(n){this.adapter.emitInputEvent(e===x.START?this.valueStart:this.value,e)}};e.prototype.clampValue=function(t,e){t=Math.min(Math.max(t,this.min),this.max);var r=this.isRange&&e===x.START&&t>this.value;if(r){return this.value}var i=this.isRange&&e===x.END&&t<this.valueStart;if(i){return this.valueStart}return t};e.prototype.updateThumbAndTrackUI=function(t){var e=this;var r=this,i=r.max,n=r.min;var s=(this.value-this.valueStart)/(i-n);var o=s*this.rect.width;var a=this.adapter.isRTL();var d=E?u(window,"transform"):"transform";if(this.isRange){var c=this.adapter.isRTL()?(i-this.value)/(i-n)*this.rect.width:(this.valueStart-n)/(i-n)*this.rect.width;var l=c+o;this.animFrame.request(w.SLIDER_UPDATE,(function(){var r=!a&&t===x.START||a&&t!==x.START;if(r){e.adapter.setTrackActiveStyleProperty("transform-origin","right");e.adapter.setTrackActiveStyleProperty("left","unset");e.adapter.setTrackActiveStyleProperty("right",e.rect.width-l+"px")}else{e.adapter.setTrackActiveStyleProperty("transform-origin","left");e.adapter.setTrackActiveStyleProperty("right","unset");e.adapter.setTrackActiveStyleProperty("left",c+"px")}e.adapter.setTrackActiveStyleProperty(d,"scaleX("+s+")");var i=a?l:c;var n=e.adapter.isRTL()?c:l;if(t===x.START||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(d,"translateX("+i+"px)",x.START)}if(t===x.END||!t||!e.initialStylesRemoved){e.adapter.setThumbStyleProperty(d,"translateX("+n+"px)",x.END)}e.removeInitialStyles(a);e.updateOverlappingThumbsUI(i,n,t)}))}else{this.animFrame.request(w.SLIDER_UPDATE,(function(){var t=a?e.rect.width-o:o;e.adapter.setThumbStyleProperty(d,"translateX("+t+"px)",x.END);e.adapter.setTrackActiveStyleProperty(d,"scaleX("+s+")");e.removeInitialStyles(a)}))}};e.prototype.removeInitialStyles=function(t){if(this.initialStylesRemoved)return;var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,x.END);if(this.isRange){this.adapter.removeThumbStyleProperty(e,x.START)}this.initialStylesRemoved=true;this.resetTrackAndThumbAnimation()};e.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(!this.isDiscrete)return;var e=E?u(window,"transition"):"transition";var r="all 0s ease 0s";this.adapter.setThumbStyleProperty(e,r,x.END);if(this.isRange){this.adapter.setThumbStyleProperty(e,r,x.START)}this.adapter.setTrackActiveStyleProperty(e,r);requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,x.END);t.adapter.removeTrackActiveStyleProperty(e);if(t.isRange){t.adapter.removeThumbStyleProperty(e,x.START)}}))};e.prototype.updateOverlappingThumbsUI=function(t,e,r){var i=false;if(this.adapter.isRTL()){var n=t-this.startThumbKnobWidth/2;var s=e+this.endThumbKnobWidth/2;i=s>=n}else{var o=t+this.startThumbKnobWidth/2;var a=e-this.endThumbKnobWidth/2;i=o>=a}if(i){this.adapter.addThumbClass(v.THUMB_TOP,r||x.END);this.adapter.removeThumbClass(v.THUMB_TOP,r===x.START?x.END:x.START)}else{this.adapter.removeThumbClass(v.THUMB_TOP,x.START);this.adapter.removeThumbClass(v.THUMB_TOP,x.END)}};e.prototype.convertAttributeValueToNumber=function(t,e){if(t===null){throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.")}var r=Number(t);if(isNaN(r)){throw new Error("MDCSliderFoundation: `"+e+"` value is "+("`"+t+"`, but must be a number."))}return r};e.prototype.validateProperties=function(t){var e=t.min,r=t.max,i=t.value,n=t.valueStart,s=t.step;if(e>=r){throw new Error("MDCSliderFoundation: min must be strictly less than max. "+("Current: [min: "+e+", max: "+r+"]"))}if(s<=0){throw new Error("MDCSliderFoundation: step must be a positive number. "+("Current step: "+this.step))}if(this.isRange){if(i<e||i>r||n<e||n>r){throw new Error("MDCSliderFoundation: values must be in [min, max] range. "+("Current values: [start value: "+n+", end value: "+i+"]"))}if(n>i){throw new Error("MDCSliderFoundation: start value must be <= end value. "+("Current values: [start value: "+n+", end value: "+i+"]"))}var o=(n-e)/s;var a=(i-e)/s;if(o%1!==0||a%1!==0){throw new Error("MDCSliderFoundation: Slider values must be valid based on the "+("step value. Current values: [start value: "+n+", ")+("end value: "+i+"]"))}}else{if(i<e||i>r){throw new Error("MDCSliderFoundation: value must be in [min, max] range. "+("Current value: "+i))}var a=(i-e)/s;if(a%1!==0){throw new Error("MDCSliderFoundation: Slider value must be valid based on the "+("step value. Current value: "+i))}}};e.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.registerEventHandler("pointerdown",this.pointerdownListener);this.adapter.registerEventHandler("pointerup",this.pointerupListener)}else{this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.registerThumbEventHandler(x.START,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(x.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(x.START,"change",this.inputStartChangeListener);this.adapter.registerInputEventHandler(x.START,"focus",this.inputStartFocusListener);this.adapter.registerInputEventHandler(x.START,"blur",this.inputStartBlurListener)}this.adapter.registerThumbEventHandler(x.END,"mouseenter",this.thumbMouseenterListener);this.adapter.registerThumbEventHandler(x.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.registerInputEventHandler(x.END,"change",this.inputEndChangeListener);this.adapter.registerInputEventHandler(x.END,"focus",this.inputEndFocusListener);this.adapter.registerInputEventHandler(x.END,"blur",this.inputEndBlurListener)};e.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener);if(e.SUPPORTS_POINTER_EVENTS){this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener);this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)}else{this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener);this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)}if(this.isRange){this.adapter.deregisterThumbEventHandler(x.START,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(x.START,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(x.START,"change",this.inputStartChangeListener);this.adapter.deregisterInputEventHandler(x.START,"focus",this.inputStartFocusListener);this.adapter.deregisterInputEventHandler(x.START,"blur",this.inputStartBlurListener)}this.adapter.deregisterThumbEventHandler(x.END,"mouseenter",this.thumbMouseenterListener);this.adapter.deregisterThumbEventHandler(x.END,"mouseleave",this.thumbMouseleaveListener);this.adapter.deregisterInputEventHandler(x.END,"change",this.inputEndChangeListener);this.adapter.deregisterInputEventHandler(x.END,"focus",this.inputEndFocusListener);this.adapter.deregisterInputEventHandler(x.END,"blur",this.inputEndBlurListener)};e.prototype.handlePointerup=function(){this.handleUp();this.adapter.deregisterEventHandler("pointermove",this.moveListener)};e.SUPPORTS_POINTER_EVENTS=E&&Boolean(window.PointerEvent)&&!C();return e}(o);function C(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function I(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var r=e[1]||"";var i=e[2]||0;return Math.max(0,(r==="0"?0:r.length)-Number(i))}
|
|
82
82
|
/**
|
|
83
83
|
* @license
|
|
84
84
|
* Copyright 2020 Google Inc.
|
|
@@ -100,5 +100,5 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
100
100
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
101
101
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
102
102
|
* THE SOFTWARE.
|
|
103
|
-
*/var I=function(t){f(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.skipInitialUIUpdate=false;e.valueToAriaValueTextFn=null;return e}e.attachTo=function(t,r){if(r===void 0){r={}}return new e(t,undefined,r)};e.prototype.getDefaultFoundation=function(){var t=this;var e={hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addThumbClass:function(e,r){t.getThumbEl(r).classList.add(e)},removeThumbClass:function(e,r){t.getThumbEl(r).classList.remove(e)},getAttribute:function(e){return t.root.getAttribute(e)},getInputValue:function(e){return t.getInput(e).value},setInputValue:function(e,r){t.getInput(r).value=e},getInputAttribute:function(e,r){return t.getInput(r).getAttribute(e)},setInputAttribute:function(e,r,i){t.getInput(i).setAttribute(e,r)},removeInputAttribute:function(e,r){t.getInput(r).removeAttribute(e)},focusInput:function(e){t.getInput(e).focus()},isInputFocused:function(e){return t.getInput(e)===document.activeElement},getThumbKnobWidth:function(e){return t.getThumbEl(e).querySelector("."+b.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(e){return t.getThumbEl(e).getBoundingClientRect()},getBoundingClientRect:function(){return t.root.getBoundingClientRect()},isRTL:function(){return getComputedStyle(t.root).direction==="rtl"},setThumbStyleProperty:function(e,r,i){t.getThumbEl(i).style.setProperty(e,r)},removeThumbStyleProperty:function(e,r){t.getThumbEl(r).style.removeProperty(e)},setTrackActiveStyleProperty:function(e,r){t.trackActive.style.setProperty(e,r)},removeTrackActiveStyleProperty:function(e){t.trackActive.style.removeProperty(e)},setValueIndicatorText:function(e,r){var i=t.getThumbEl(r).querySelector("."+b.VALUE_INDICATOR_TEXT);i.textContent=String(e)},getValueToAriaValueTextFn:function(){return t.valueToAriaValueTextFn},updateTickMarks:function(e){var r=t.root.querySelector("."+b.TICK_MARKS_CONTAINER);if(!r){r=document.createElement("div");r.classList.add(b.TICK_MARKS_CONTAINER);var i=t.root.querySelector("."+b.TRACK);i.appendChild(r)}if(e.length!==r.children.length){while(r.firstChild){r.removeChild(r.firstChild)}t.addTickMarks(r,e)}else{t.updateTickMarks(r,e)}},setPointerCapture:function(e){t.root.setPointerCapture(e)},emitChangeEvent:function(e,r){t.emit(g.CHANGE,{value:e,thumb:r})},emitInputEvent:function(e,r){t.emit(g.INPUT,{value:e,thumb:r})},emitDragStartEvent:function(e,r){t.getRipple(r).activate()},emitDragEndEvent:function(e,r){t.getRipple(r).deactivate()},registerEventHandler:function(e,r){t.listen(e,r)},deregisterEventHandler:function(e,r){t.unlisten(e,r)},registerThumbEventHandler:function(e,r,i){t.getThumbEl(e).addEventListener(r,i)},deregisterThumbEventHandler:function(e,r,i){t.getThumbEl(e).removeEventListener(r,i)},registerInputEventHandler:function(e,r,i){t.getInput(e).addEventListener(r,i)},deregisterInputEventHandler:function(e,r,i){t.getInput(e).removeEventListener(r,i)},registerBodyEventHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyEventHandler:function(t,e){document.body.removeEventListener(t,e)},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}};return new E(e)};e.prototype.initialize=function(t){var e=t===void 0?{}:t,r=e.skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+b.INPUT));this.thumbs=[].slice.call(this.root.querySelectorAll("."+b.THUMB));this.trackActive=this.root.querySelector("."+b.TRACK_ACTIVE);this.ripples=this.createRipples();if(r){this.skipInitialUIUpdate=true}};e.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})};e.prototype.layout=function(){this.foundation.layout()};e.prototype.getValueStart=function(){return this.foundation.getValueStart()};e.prototype.setValueStart=function(t){this.foundation.setValueStart(t)};e.prototype.getValue=function(){return this.foundation.getValue()};e.prototype.setValue=function(t){this.foundation.setValue(t)};e.prototype.getDisabled=function(){return this.foundation.getDisabled()};e.prototype.setDisabled=function(t){this.foundation.setDisabled(t)};e.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t};e.prototype.getThumbEl=function(t){return t===k.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]};e.prototype.getInput=function(t){return t===k.END?this.inputs[this.inputs.length-1]:this.inputs[0]};e.prototype.getRipple=function(t){return t===k.END?this.ripples[this.ripples.length-1]:this.ripples[0]};e.prototype.addTickMarks=function(t,e){var r=document.createDocumentFragment();for(var i=0;i<e.length;i++){var n=document.createElement("div");var s=e[i]===y.ACTIVE?b.TICK_MARK_ACTIVE:b.TICK_MARK_INACTIVE;n.classList.add(s);r.appendChild(n)}t.appendChild(r)};e.prototype.updateTickMarks=function(t,e){var r=Array.from(t.children);for(var i=0;i<r.length;i++){if(e[i]===y.ACTIVE){r[i].classList.add(b.TICK_MARK_ACTIVE);r[i].classList.remove(b.TICK_MARK_INACTIVE)}else{r[i].classList.add(b.TICK_MARK_INACTIVE);r[i].classList.remove(b.TICK_MARK_ACTIVE)}}};e.prototype.createRipples=function(){var t=[];var e=[].slice.call(this.root.querySelectorAll("."+b.THUMB));var r=function(r){var n=e[r];var s=i.inputs[r];var o=p(p({},a.createAdapter(i)),{addClass:function(t){n.classList.add(t)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,e){s.removeEventListener(t,e)},isSurfaceActive:function(){return l(s,":active")},isUnbounded:function(){return true},registerInteractionHandler:function(t,e){s.addEventListener(t,e,d())},removeClass:function(t){n.classList.remove(t)},updateCssVariable:function(t,e){n.style.setProperty(t,e)}});var m=new a(n,new c(o));m.unbounded=true;t.push(m)};var i=this;for(var n=0;n<e.length;n++){r(n)}return t};return e}(o);function S(t){const e=.1;const r=.2;const i=.3;const n=.4;const s=.5;const o=.6;const a=.7;const d=.8;const c=.9;if(t===0){return"percent-0"}if(t<e){return"percent-0-10"}if(t<r){return"percent-10-20"}if(t<i){return"percent-20-30"}if(t<n){return"percent-30-40"}if(t<s){return"percent-40-50"}if(t<o){return"percent-50-60"}if(t<a){return"percent-60-70"}if(t<d){return"percent-70-80"}if(t<c){return"percent-80-90"}return"percent-90-100"}const A=':host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-slider__thumb{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-slider__thumb::before,.mdc-slider__thumb::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-slider__thumb::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-slider__thumb::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-slider__thumb.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-slider__thumb.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb::before,.mdc-slider__thumb::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-slider__thumb.mdc-ripple-upgraded::before,.mdc-slider__thumb.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb::before,.mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider__thumb:hover::before,.mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right;}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media (prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.8125rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.8125rem);line-height:1.125rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.125rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:0.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.6}.mdc-slider.mdc-slider--disabled{opacity:0.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media (prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle1-font-size, 0.875rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right;}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required,.mdc-floating-label--required[dir=rtl]{}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}:host(limel-slider){isolation:isolate;position:relative;display:flex;flex-direction:column;margin-top:0.25rem}.slider__label{padding-left:1.25rem;top:0.5625rem;color:rgba(var(--contrast-1200), 1)}:host(limel-slider.disabled:not(.readonly)) .slider__label{color:rgba(var(--contrast-1200), 0.5)}.slider__content-range-container{display:flex;order:2;justify-content:space-between;width:calc(100% - 1.5rem);margin:0 auto;margin-top:-1rem}.slider__content-min-label,.slider__content-max-label{transition:opacity 0.2s ease;opacity:0.7;font-size:0.75rem;top:1.25rem;color:rgba(var(--contrast-1200), 1)}.slider:hover .slider__content-min-label,.slider:hover .slider__content-max-label{opacity:1}.mdc-slider__track:before,.mdc-slider__track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.mdc-slider__track:before{left:-0.75rem}.mdc-slider__track:after{right:-0.75rem}.mdc-slider__track--active_fill,.mdc-slider__track--inactive,.mdc-slider__thumb-knob{transition:background-color 0.5s ease}:host(.displays-percentage-colors[readonly]){--mdc-theme-on-surface:var(--mdc-theme-primary)}:host(.displays-percentage-colors.percent-0){--mdc-theme-primary:var(--color-percent--0)}:host(.displays-percentage-colors.percent-0-10){--mdc-theme-primary:var(--color-percent--0to10)}:host(.displays-percentage-colors.percent-10-20){--mdc-theme-primary:var(--color-percent--10to20)}:host(.displays-percentage-colors.percent-20-30){--mdc-theme-primary:var(--color-percent--20to30)}:host(.displays-percentage-colors.percent-30-40){--mdc-theme-primary:var(--color-percent--30to40)}:host(.displays-percentage-colors.percent-40-50){--mdc-theme-primary:var(--color-percent--40to50)}:host(.displays-percentage-colors.percent-50-60){--mdc-theme-primary:var(--color-percent--50to60)}:host(.displays-percentage-colors.percent-60-70){--mdc-theme-primary:var(--color-percent--60to70)}:host(.displays-percentage-colors.percent-70-80){--mdc-theme-primary:var(--color-percent--70to80)}:host(.displays-percentage-colors.percent-80-90){--mdc-theme-primary:var(--color-percent--80to90)}:host(.displays-percentage-colors.percent-90-100){--mdc-theme-primary:var(--color-percent--90to100)}:host(.displays-percentage-colors.percent-30-40) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-darker))}:host(.displays-percentage-colors.percent-30-40) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-dark))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled{opacity:1}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{height:1rem;border-radius:1rem}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active{top:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{transition:all 0s;transform:translateY(1.75rem)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{opacity:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-theme-primary)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before,.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0.75rem;opacity:0;width:0;height:0;border:0.25rem solid transparent;border-top-color:rgba(var(--contrast-1400), 0.6)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before{left:-1.25rem;transform:rotate(90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{right:-1.25rem;transform:rotate(-90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:before{opacity:0.8;left:-1.75rem}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:after{opacity:0.8;right:-1.75rem}.mdc-slider .mdc-slider__value-indicator-container{z-index:1}.mdc-slider .mdc-slider__value-indicator{transition:transform 0.2s ease-out;opacity:1;transform:scale(1) translateY(2rem);border-radius:1.25rem;padding:0 0.5rem;height:1.5rem}.mdc-slider .mdc-slider__value-indicator:before{border-top-color:transparent}.mdc-slider .mdc-slider__value-indicator-text{color:rgb(var(--color-white))}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator{transform:scale(1.5) translateY(0);box-shadow:var(--shadow-depth-16)}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator:before{border-top-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator{box-shadow:var(--button-shadow-normal)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator,:host(limel-slider[readonly]) .mdc-slider__value-indicator{background-color:var(--mdc-theme-primary)}limel-helper-line{opacity:0;order:3}:host(:focus) limel-helper-line,:host(:focus-visible) limel-helper-line,:host(:focus-within) limel-helper-line{opacity:1}';const M=class{constructor(r){t(this,r);this.change=e(this,"change",7);this.changeHandler=t=>{let e=t.detail.value;const r=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(e,r)){e=this.roundToStep(e,r)}this.change.emit(e/this.factor)};this.disabled=false;this.readonly=false;this.factor=1;this.label=undefined;this.helperText=undefined;this.unit="";this.value=undefined;this.valuemax=100;this.valuemin=0;this.step=undefined;this.percentageClass=undefined;this.inputHandler=this.inputHandler.bind(this);this.getContainerClassList=this.getContainerClassList.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.getInputElement();if(!t){return}const e=this.getValue();t.setAttribute("value",`${this.multiplyByFactor(e)}`);const r=e>=this.valuemin;const i=e<=this.valuemax;if(!r){const r=this.multiplyByFactor(e);t.setAttribute("min",`${r}`)}if(!i){const r=this.multiplyByFactor(e);t.setAttribute("max",`${r}`)}if(!this.isMultipleOfStep(e,this.step)){t.removeAttribute("step")}this.createMDCSlider()}componentWillLoad(){this.setPercentageClass(this.value)}disconnectedCallback(){this.destroyMDCSlider()}getContainerClassList(){return{[this.percentageClass]:true,disabled:this.disabled||this.readonly,readonly:this.readonly}}render(){const t={};if(this.step){t.step=this.multiplyByFactor(this.step)}if(this.disabled||this.readonly){t.disabled=true}return r(i,{class:this.getContainerClassList()},r("label",{class:"slider__label mdc-floating-label mdc-floating-label--float-above"},this.label),r("div",{class:"slider__content-range-container"},r("span",{class:"slider__content-min-label"},this.multiplyByFactor(this.valuemin),this.unit),r("span",{class:"slider__content-max-label"},this.multiplyByFactor(this.valuemax),this.unit)),r("div",{class:{"mdc-slider":true,"mdc-slider--discrete":true,"mdc-slider--disabled":this.disabled||this.readonly}},r("input",Object.assign({class:"mdc-slider__input",type:"range",min:this.multiplyByFactor(this.valuemin),max:this.multiplyByFactor(this.valuemax),value:this.multiplyByFactor(this.value),name:"volume","aria-label":"Discrete slider demo"},t)),r("div",{class:"mdc-slider__track"},r("div",{class:"mdc-slider__track--inactive"}),r("div",{class:"mdc-slider__track--active"},r("div",{class:"mdc-slider__track--active_fill"}))),r("div",{class:"mdc-slider__thumb"},r("div",{class:"mdc-slider__value-indicator-container","aria-hidden":"true"},r("div",{class:"mdc-slider__value-indicator"},r("span",{class:"mdc-slider__value-indicator-text"},this.multiplyByFactor(this.value)))),r("div",{class:"mdc-slider__thumb-knob"}))),this.renderHelperLine())}renderHelperLine(){if(!this.helperText){return}return r("limel-helper-line",{helperText:this.helperText})}watchDisabled(){this.updateDisabledState()}watchReadonly(){this.updateDisabledState()}watchValue(){if(!this.mdcSlider){return}const t=this.multiplyByFactor(this.getValue());this.mdcSlider.setValue(t);if(this.isStepConfigured()){return}const e=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(t,e)){return}this.reCreateSliderWithStep()}updateDisabledState(){if(!this.mdcSlider){return}this.mdcSlider.setDisabled(this.disabled||this.readonly)}multiplyByFactor(t){return Math.round(t*this.factor)}getValue(){let t=this.value;if(!isFinite(t)){t=this.valuemin}return t}inputHandler(t){this.setPercentageClass(t.detail.value/this.factor)}setPercentageClass(t){this.percentageClass=S((t-this.valuemin)/(this.valuemax-this.valuemin))}isMultipleOfStep(t,e){if(!e){return true}return t%e===0}roundToStep(t,e){return Math.round(t/e)*e}getRootElement(){return this.rootElement.shadowRoot.querySelector(".mdc-slider")}getInputElement(){const t=this.getRootElement();if(!t){return}return t.querySelector("input")}isStepConfigured(){if(!this.step){return true}const t=this.getInputElement();if(!t){return true}return t.hasAttribute("step")}reCreateSliderWithStep(){const t=this.getInputElement();const e=`${this.multiplyByFactor(this.step)}`;t.setAttribute("step",e);this.destroyMDCSlider();this.createMDCSlider()}createMDCSlider(){const t=this.getRootElement();this.mdcSlider=new I(t);this.mdcSlider.listen("MDCSlider:change",this.changeHandler);this.mdcSlider.listen("MDCSlider:input",this.inputHandler)}destroyMDCSlider(){this.mdcSlider.unlisten("MDCSlider:change",this.changeHandler);this.mdcSlider.unlisten("MDCSlider:input",this.inputHandler);this.mdcSlider.destroy();this.mdcSlider=undefined}get rootElement(){return n(this)}static get watchers(){return{disabled:["watchDisabled"],readonly:["watchReadonly"],value:["watchValue"]}}};M.style=A;export{M as limel_slider};
|
|
104
|
-
//# sourceMappingURL=p-
|
|
103
|
+
*/var S=function(t){p(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.skipInitialUIUpdate=false;e.valueToAriaValueTextFn=null;return e}e.attachTo=function(t,r){if(r===void 0){r={}}return new e(t,undefined,r)};e.prototype.getDefaultFoundation=function(){var t=this;var e={hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addThumbClass:function(e,r){t.getThumbEl(r).classList.add(e)},removeThumbClass:function(e,r){t.getThumbEl(r).classList.remove(e)},getAttribute:function(e){return t.root.getAttribute(e)},getInputValue:function(e){return t.getInput(e).value},setInputValue:function(e,r){t.getInput(r).value=e},getInputAttribute:function(e,r){return t.getInput(r).getAttribute(e)},setInputAttribute:function(e,r,i){t.getInput(i).setAttribute(e,r)},removeInputAttribute:function(e,r){t.getInput(r).removeAttribute(e)},focusInput:function(e){t.getInput(e).focus()},isInputFocused:function(e){return t.getInput(e)===document.activeElement},getThumbKnobWidth:function(e){return t.getThumbEl(e).querySelector("."+v.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(e){return t.getThumbEl(e).getBoundingClientRect()},getBoundingClientRect:function(){return t.root.getBoundingClientRect()},isRTL:function(){return getComputedStyle(t.root).direction==="rtl"},setThumbStyleProperty:function(e,r,i){t.getThumbEl(i).style.setProperty(e,r)},removeThumbStyleProperty:function(e,r){t.getThumbEl(r).style.removeProperty(e)},setTrackActiveStyleProperty:function(e,r){t.trackActive.style.setProperty(e,r)},removeTrackActiveStyleProperty:function(e){t.trackActive.style.removeProperty(e)},setValueIndicatorText:function(e,r){var i=t.getThumbEl(r).querySelector("."+v.VALUE_INDICATOR_TEXT);i.textContent=String(e)},getValueToAriaValueTextFn:function(){return t.valueToAriaValueTextFn},updateTickMarks:function(e){var r=t.root.querySelector("."+v.TICK_MARKS_CONTAINER);if(!r){r=document.createElement("div");r.classList.add(v.TICK_MARKS_CONTAINER);var i=t.root.querySelector("."+v.TRACK);i.appendChild(r)}if(e.length!==r.children.length){while(r.firstChild){r.removeChild(r.firstChild)}t.addTickMarks(r,e)}else{t.updateTickMarks(r,e)}},setPointerCapture:function(e){t.root.setPointerCapture(e)},emitChangeEvent:function(e,r){t.emit(y.CHANGE,{value:e,thumb:r})},emitInputEvent:function(e,r){t.emit(y.INPUT,{value:e,thumb:r})},emitDragStartEvent:function(e,r){t.getRipple(r).activate()},emitDragEndEvent:function(e,r){t.getRipple(r).deactivate()},registerEventHandler:function(e,r){t.listen(e,r)},deregisterEventHandler:function(e,r){t.unlisten(e,r)},registerThumbEventHandler:function(e,r,i){t.getThumbEl(e).addEventListener(r,i)},deregisterThumbEventHandler:function(e,r,i){t.getThumbEl(e).removeEventListener(r,i)},registerInputEventHandler:function(e,r,i){t.getInput(e).addEventListener(r,i)},deregisterInputEventHandler:function(e,r,i){t.getInput(e).removeEventListener(r,i)},registerBodyEventHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyEventHandler:function(t,e){document.body.removeEventListener(t,e)},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}};return new T(e)};e.prototype.initialize=function(t){var e=t===void 0?{}:t,r=e.skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+v.INPUT));this.thumbs=[].slice.call(this.root.querySelectorAll("."+v.THUMB));this.trackActive=this.root.querySelector("."+v.TRACK_ACTIVE);this.ripples=this.createRipples();if(r){this.skipInitialUIUpdate=true}};e.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})};e.prototype.layout=function(){this.foundation.layout()};e.prototype.getValueStart=function(){return this.foundation.getValueStart()};e.prototype.setValueStart=function(t){this.foundation.setValueStart(t)};e.prototype.getValue=function(){return this.foundation.getValue()};e.prototype.setValue=function(t){this.foundation.setValue(t)};e.prototype.getDisabled=function(){return this.foundation.getDisabled()};e.prototype.setDisabled=function(t){this.foundation.setDisabled(t)};e.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t};e.prototype.getThumbEl=function(t){return t===x.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]};e.prototype.getInput=function(t){return t===x.END?this.inputs[this.inputs.length-1]:this.inputs[0]};e.prototype.getRipple=function(t){return t===x.END?this.ripples[this.ripples.length-1]:this.ripples[0]};e.prototype.addTickMarks=function(t,e){var r=document.createDocumentFragment();for(var i=0;i<e.length;i++){var n=document.createElement("div");var s=e[i]===k.ACTIVE?v.TICK_MARK_ACTIVE:v.TICK_MARK_INACTIVE;n.classList.add(s);r.appendChild(n)}t.appendChild(r)};e.prototype.updateTickMarks=function(t,e){var r=Array.from(t.children);for(var i=0;i<r.length;i++){if(e[i]===k.ACTIVE){r[i].classList.add(v.TICK_MARK_ACTIVE);r[i].classList.remove(v.TICK_MARK_INACTIVE)}else{r[i].classList.add(v.TICK_MARK_INACTIVE);r[i].classList.remove(v.TICK_MARK_ACTIVE)}}};e.prototype.createRipples=function(){var t=[];var e=[].slice.call(this.root.querySelectorAll("."+v.THUMB));var r=function(r){var n=e[r];var s=i.inputs[r];var o=b(b({},d.createAdapter(i)),{addClass:function(t){n.classList.add(t)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(t,e){s.removeEventListener(t,e)},isSurfaceActive:function(){return m(s,":active")},isUnbounded:function(){return true},registerInteractionHandler:function(t,e){s.addEventListener(t,e,c())},removeClass:function(t){n.classList.remove(t)},updateCssVariable:function(t,e){n.style.setProperty(t,e)}});var a=new d(n,new l(o));a.unbounded=true;t.push(a)};var i=this;for(var n=0;n<e.length;n++){r(n)}return t};return e}(a);function A(t){const e=.1;const r=.2;const i=.3;const n=.4;const s=.5;const o=.6;const a=.7;const d=.8;const c=.9;if(t===0){return"percent-0"}if(t<e){return"percent-0-10"}if(t<r){return"percent-10-20"}if(t<i){return"percent-20-30"}if(t<n){return"percent-30-40"}if(t<s){return"percent-40-50"}if(t<o){return"percent-50-60"}if(t<a){return"percent-60-70"}if(t<d){return"percent-70-80"}if(t<c){return"percent-80-90"}return"percent-90-100"}const M=':host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-slider__thumb{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity}.mdc-slider__thumb::before,.mdc-slider__thumb::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-slider__thumb::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-slider__thumb::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-slider__thumb.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-slider__thumb.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-slider__thumb.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-slider__thumb::before,.mdc-slider__thumb::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-slider__thumb.mdc-ripple-upgraded::before,.mdc-slider__thumb.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-slider__thumb::before,.mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider__thumb:hover::before,.mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right;}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media (prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.8125rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.8125rem);line-height:1.125rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.125rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:0.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);border-color:#26a69a;border-color:var(--mdc-theme-primary, #26a69a)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#26a69a;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #26a69a))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:0.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#26a69a;background-color:var(--mdc-theme-primary, #26a69a);opacity:0.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:0.6}.mdc-slider.mdc-slider--disabled{opacity:0.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media (prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle1-font-size, 0.875rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right;}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required,.mdc-floating-label--required[dir=rtl]{}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}:host(limel-slider){isolation:isolate;position:relative;display:flex;flex-direction:column;margin-top:0.25rem}.slider__label{padding-left:1.25rem;top:0.5625rem;color:rgba(var(--contrast-1200), 1)}:host(limel-slider.disabled:not(.readonly)) .slider__label{color:rgba(var(--contrast-1200), 0.5)}.slider__content-range-container{display:flex;order:2;justify-content:space-between;width:calc(100% - 1.5rem);margin:0 auto;margin-top:-1rem}.slider__content-min-label,.slider__content-max-label{transition:opacity 0.2s ease;opacity:0.7;font-size:0.75rem;top:1.25rem;color:rgba(var(--contrast-1200), 1)}.slider:hover .slider__content-min-label,.slider:hover .slider__content-max-label{opacity:1}.mdc-slider__track:before,.mdc-slider__track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.mdc-slider__track:before{left:-0.75rem}.mdc-slider__track:after{right:-0.75rem}.mdc-slider__track--active_fill,.mdc-slider__track--inactive,.mdc-slider__thumb-knob{transition:background-color 0.5s ease}:host(.displays-percentage-colors[readonly]){--mdc-theme-on-surface:var(--mdc-theme-primary)}:host(.displays-percentage-colors.percent-0){--mdc-theme-primary:var(--color-percent--0)}:host(.displays-percentage-colors.percent-0-10){--mdc-theme-primary:var(--color-percent--0to10)}:host(.displays-percentage-colors.percent-10-20){--mdc-theme-primary:var(--color-percent--10to20)}:host(.displays-percentage-colors.percent-20-30){--mdc-theme-primary:var(--color-percent--20to30)}:host(.displays-percentage-colors.percent-30-40){--mdc-theme-primary:var(--color-percent--30to40)}:host(.displays-percentage-colors.percent-40-50){--mdc-theme-primary:var(--color-percent--40to50)}:host(.displays-percentage-colors.percent-50-60){--mdc-theme-primary:var(--color-percent--50to60)}:host(.displays-percentage-colors.percent-60-70){--mdc-theme-primary:var(--color-percent--60to70)}:host(.displays-percentage-colors.percent-70-80){--mdc-theme-primary:var(--color-percent--70to80)}:host(.displays-percentage-colors.percent-80-90){--mdc-theme-primary:var(--color-percent--80to90)}:host(.displays-percentage-colors.percent-90-100){--mdc-theme-primary:var(--color-percent--90to100)}:host(.displays-percentage-colors.percent-30-40) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-darker))}:host(.displays-percentage-colors.percent-30-40) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-40-50) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-70-80) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider__value-indicator-text{color:rgb(var(--color-gray-dark))}:host(.displays-percentage-colors.percent-50-60) .mdc-slider--disabled .mdc-slider__value-indicator-text,:host(.displays-percentage-colors.percent-60-70) .mdc-slider--disabled .mdc-slider__value-indicator-text{color:rgb(var(--contrast-100))}:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled{opacity:1}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{height:1rem;border-radius:1rem}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active{top:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__value-indicator{transition:all 0s;transform:translateY(1.75rem)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{opacity:0}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill,:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-theme-primary)}:host(limel-slider.readonly) .mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before,.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0.75rem;opacity:0;width:0;height:0;border:0.25rem solid transparent;border-top-color:rgba(var(--contrast-1400), 0.6)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:before{left:-1.25rem;transform:rotate(90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:after{right:-1.25rem;transform:rotate(-90deg)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:before{opacity:0.8;left:-1.75rem}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__thumb-knob:hover:after{opacity:0.8;right:-1.75rem}.mdc-slider .mdc-slider__value-indicator-container{z-index:1}.mdc-slider .mdc-slider__value-indicator{transition:transform 0.2s ease-out;opacity:1;transform:scale(1) translateY(2rem);border-radius:1.25rem;padding:0 0.5rem;height:1.5rem}.mdc-slider .mdc-slider__value-indicator:before{border-top-color:transparent}.mdc-slider .mdc-slider__value-indicator-text{color:rgb(var(--color-white))}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator{transform:scale(1.5) translateY(0);box-shadow:var(--shadow-depth-16)}.mdc-slider .mdc-ripple-upgraded--foreground-activation .mdc-slider__value-indicator:before{border-top-color:var(--mdc-theme-primary)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator{box-shadow:var(--button-shadow-normal)}.mdc-slider:not(.mdc-slider--disabled) .mdc-slider__value-indicator,:host(limel-slider[readonly]) .mdc-slider__value-indicator{background-color:var(--mdc-theme-primary)}limel-helper-line{opacity:0;order:3}:host(:focus) limel-helper-line,:host(:focus-visible) limel-helper-line,:host(:focus-within) limel-helper-line{opacity:1}';const z=class{constructor(r){t(this,r);this.change=e(this,"change",7);this.changeHandler=t=>{let e=t.detail.value;const r=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(e,r)){e=this.roundToStep(e,r)}this.change.emit(e/this.factor)};this.disabled=false;this.readonly=false;this.factor=1;this.label=undefined;this.helperText=undefined;this.unit="";this.value=undefined;this.valuemax=100;this.valuemin=0;this.step=undefined;this.percentageClass=undefined;this.inputHandler=this.inputHandler.bind(this);this.getContainerClassList=this.getContainerClassList.bind(this);this.labelId=s();this.helperTextId=s()}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.getInputElement();if(!t){return}const e=this.getValue();t.setAttribute("value",`${this.multiplyByFactor(e)}`);const r=e>=this.valuemin;const i=e<=this.valuemax;if(!r){const r=this.multiplyByFactor(e);t.setAttribute("min",`${r}`)}if(!i){const r=this.multiplyByFactor(e);t.setAttribute("max",`${r}`)}if(!this.isMultipleOfStep(e,this.step)){t.removeAttribute("step")}this.createMDCSlider()}componentWillLoad(){this.setPercentageClass(this.value)}disconnectedCallback(){this.destroyMDCSlider()}getContainerClassList(){return{[this.percentageClass]:true,disabled:this.disabled||this.readonly,readonly:this.readonly}}render(){const t={};if(this.step){t.step=this.multiplyByFactor(this.step)}if(this.disabled||this.readonly){t.disabled=true}return r(i,{class:this.getContainerClassList()},r("label",{class:"slider__label mdc-floating-label mdc-floating-label--float-above",id:this.labelId},this.label),r("div",{class:"slider__content-range-container"},r("span",{class:"slider__content-min-label"},this.multiplyByFactor(this.valuemin),this.unit),r("span",{class:"slider__content-max-label"},this.multiplyByFactor(this.valuemax),this.unit)),r("div",{class:{"mdc-slider":true,"mdc-slider--discrete":true,"mdc-slider--disabled":this.disabled||this.readonly}},r("input",Object.assign({class:"mdc-slider__input",type:"range",min:this.multiplyByFactor(this.valuemin),max:this.multiplyByFactor(this.valuemax),value:this.multiplyByFactor(this.value),name:"volume","aria-labelledby":this.labelId,"aria-controls":this.helperTextId},t)),r("div",{class:"mdc-slider__track"},r("div",{class:"mdc-slider__track--inactive"}),r("div",{class:"mdc-slider__track--active"},r("div",{class:"mdc-slider__track--active_fill"}))),r("div",{class:"mdc-slider__thumb"},r("div",{class:"mdc-slider__value-indicator-container","aria-hidden":"true"},r("div",{class:"mdc-slider__value-indicator"},r("span",{class:"mdc-slider__value-indicator-text"},this.multiplyByFactor(this.value)))),r("div",{class:"mdc-slider__thumb-knob"}))),this.renderHelperLine())}renderHelperLine(){if(!this.helperText){return}return r("limel-helper-line",{helperText:this.helperText,helperTextId:this.helperTextId})}watchDisabled(){this.updateDisabledState()}watchReadonly(){this.updateDisabledState()}watchValue(){if(!this.mdcSlider){return}const t=this.multiplyByFactor(this.getValue());this.mdcSlider.setValue(t);if(this.isStepConfigured()){return}const e=this.multiplyByFactor(this.step);if(!this.isMultipleOfStep(t,e)){return}this.reCreateSliderWithStep()}updateDisabledState(){if(!this.mdcSlider){return}this.mdcSlider.setDisabled(this.disabled||this.readonly)}multiplyByFactor(t){return Math.round(t*this.factor)}getValue(){let t=this.value;if(!isFinite(t)){t=this.valuemin}return t}inputHandler(t){this.setPercentageClass(t.detail.value/this.factor)}setPercentageClass(t){this.percentageClass=A((t-this.valuemin)/(this.valuemax-this.valuemin))}isMultipleOfStep(t,e){if(!e){return true}return t%e===0}roundToStep(t,e){return Math.round(t/e)*e}getRootElement(){return this.rootElement.shadowRoot.querySelector(".mdc-slider")}getInputElement(){const t=this.getRootElement();if(!t){return}return t.querySelector("input")}isStepConfigured(){if(!this.step){return true}const t=this.getInputElement();if(!t){return true}return t.hasAttribute("step")}reCreateSliderWithStep(){const t=this.getInputElement();const e=`${this.multiplyByFactor(this.step)}`;t.setAttribute("step",e);this.destroyMDCSlider();this.createMDCSlider()}createMDCSlider(){const t=this.getRootElement();this.mdcSlider=new S(t);this.mdcSlider.listen("MDCSlider:change",this.changeHandler);this.mdcSlider.listen("MDCSlider:input",this.inputHandler)}destroyMDCSlider(){this.mdcSlider.unlisten("MDCSlider:change",this.changeHandler);this.mdcSlider.unlisten("MDCSlider:input",this.inputHandler);this.mdcSlider.destroy();this.mdcSlider=undefined}get rootElement(){return n(this)}static get watchers(){return{disabled:["watchDisabled"],readonly:["watchReadonly"],value:["watchValue"]}}};z.style=M;export{z as limel_slider};
|
|
104
|
+
//# sourceMappingURL=p-461b5f85.entry.js.map
|