!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/repeat.js"),require("lit/directives/style-map.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/if-defined.js","lit/directives/repeat.js","lit/directives/style-map.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/repeat.js"),require("lit/directives/style-map.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/if-defined.js"],e["lit/directives/repeat.js"],e["lit/directives/style-map.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,r)=>(()=>{"use strict";var n,o={3773(e,t,i){i.r(t),i.d(t,{Slider:()=>s});var s,r=i(2900),n=i(7704),o=i(9609),l=i(4084),a=i(7161),d=i(429),h=i(291),p=i(8175),c=i(318),u=i(2297),m=function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o};!function(e){let t=class extends((0,n.yC)(a.LitElement)){constructor(){super(...arguments),this._disabled=!1,this._now=0,this.min=0,this.max=100,this.hideValue=!1,this.text=0,this.label="slider",this.step=0,this.dragging=!1}get now(){return this._now}set now(e){const t=this._now;e<this.min||e>this.max?console.warn("Please select correct value"):(this._now=Math.round(e),this.requestUpdate("now",t))}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",`${e}`),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get pointerPosition(){const e=this.max-this.min;return(this.now-this.min)/e*100}get isRtl(){return"rtl"===getComputedStyle(this).direction}calculateHandlePosition(e){const{width:t,left:i}=this.getBoundingClientRect(),{clientX:s}=e;let r=(s-i)/t;return this.isRtl&&(r=1-r),this.min+(this.max-this.min)*r}moveSliderTo(e){this.disabled||(e>this.max?this.now=this.max:e<this.min?this.now=this.min:this.now=e)}trackMouseEvent(){if(!this.currentMouseEvent||!this.dragging)return;const e=this.calculateHandlePosition(this.currentMouseEvent),t=this.now;this.moveSliderTo(e),this.notifyChanging(t,this.now),requestAnimationFrame(()=>{this.trackMouseEvent()})}ticksTemplate(){const{min:e,max:t,step:i}=this,s=Math.round((t-e)/i),r=new Array(s+1).fill(0,0,s+1).map((t,s)=>e+s*i).filter(i=>i>=e&&i<=t);return a.html`
        <div class="md-slider__hashlabel">${(0,p.repeat)(r,e=>a.html` <div class="tick">${e}</div> `)}</div>
      `}displayValueTemplate(){return a.html` <span class="md-slider__value"> ${this.now} </span> `}notifyChanges(){this.dispatchEvent(new CustomEvent("slider-change",{bubbles:!0,composed:!0,detail:{value:this.now}}))}notifyChanging(e,t){e!==t&&this.dispatchEvent(new CustomEvent("slider-changing",{bubbles:!0,composed:!0,detail:{oldValue:e,newValue:t}}))}handleMouseDown(e){if(e.preventDefault(),this.disabled)return;const t=e=>{this.currentMouseEvent=e},i=e=>{this.focus(),this.currentMouseEvent=e,document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",i),requestAnimationFrame(()=>{this.dragging=!1,this.notifyChanges()})};document.addEventListener("mousemove",t),document.addEventListener("mouseup",i),this.focus(),this.dragging=!0,this.currentMouseEvent=e,requestAnimationFrame(()=>{this.trackMouseEvent()})}handleKeyDown(e){const{code:t}=e,i=this.now;switch(t){case r.Uz.ArrowLeft:this.moveSliderTo(this.now+(this.isRtl?1:-1));break;case r.Uz.ArrowRight:this.moveSliderTo(this.now+(this.isRtl?-1:1));break;case r.Uz.ArrowDown:this.moveSliderTo(this.now-1);break;case r.Uz.ArrowUp:this.moveSliderTo(this.now+1);break;case r.Uz.Home:this.moveSliderTo(this.min);break;case r.Uz.End:this.moveSliderTo(this.max)}this.notifyChanging(i,this.now);const s=()=>{document.removeEventListener("keyup",s),this.notifyChanges()};document.addEventListener("keyup",s)}get sliderPointerStyleMap(){return{"inset-inline-start":`${this.pointerPosition}%`}}get sliderSelectionStyleMap(){return{"inset-inline-end":`calc(100% - ${this.pointerPosition}%)`}}static get styles(){return[l.A,u.A]}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex",this.disabled?"-1":"0")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.handleMouseDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mousedown",this.handleMouseDown)}render(){return a.html`
        <div class="md-slider">
          <span class="md-slider__bar"></span>
          <span class="md-slider__selection" style=${(0,c.styleMap)(this.sliderSelectionStyleMap)}></span>
          <span
            class="md-slider__pointer"
            role="slider"
            part="slider"
            aria-valuemin=${this.min}
            aria-valuemax=${this.max}
            aria-valuenow=${this.now}
            aria-label=${(0,h.ifDefined)(this.label)}
            style=${(0,c.styleMap)(this.sliderPointerStyleMap)}
          ></span>
          ${this.step?this.ticksTemplate():a.nothing} ${this.hideValue?a.nothing:this.displayValueTemplate()}
        </div>
      `}};m([(0,d.property)({type:Number,reflect:!0})],t.prototype,"min",void 0),m([(0,d.property)({type:Number,reflect:!0})],t.prototype,"max",void 0),m([(0,d.property)({type:Boolean,attribute:"hide-value"})],t.prototype,"hideValue",void 0),m([(0,d.property)({type:Number,reflect:!0})],t.prototype,"now",null),m([(0,d.property)({type:Number})],t.prototype,"text",void 0),m([(0,d.property)({type:String})],t.prototype,"label",void 0),m([(0,d.property)({type:Number,reflect:!0})],t.prototype,"step",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),m([(0,d.state)()],t.prototype,"dragging",void 0),t=m([(0,o.w)("md-slider")],t),e.ELEMENT=t}(s||(s={}))},7161(t){t.exports=e},429(e){e.exports=t},291(e){e.exports=i},8175(e){e.exports=s},318(e){e.exports=r}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[e]={exports:{}};return o[e](i,i.exports,a),i.exports}a.m=o,n=[],a.O=(e,t,i,s)=>{if(!t){var r=1/0;for(h=0;h<n.length;h++){for(var[t,i,s]=n[h],o=!0,l=0;l<t.length;l++)(!1&s||r>=s)&&Object.keys(a.O).every(e=>a.O[e](t[l]))?t.splice(l--,1):(o=!1,s<r&&(r=s));if(o){n.splice(h--,1);var d=i();void 0!==d&&(e=d)}}return e}s=s||0;for(var h=n.length;h>0&&n[h-1][2]>s;h--)n[h]=n[h-1];n[h]=[t,i,s]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1459:0};a.O.j=t=>0===e[t];var t=(t,i)=>{var s,r,[n,o,l]=i,d=0;if(n.some(t=>0!==e[t])){for(s in o)a.o(o,s)&&(a.m[s]=o[s]);if(l)var h=l(a)}for(t&&t(i);d<n.length;d++)r=n[d],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var d=a.O(void 0,[9609,4084,2364,9938,4781,5201,5584,8227,2900,7704,2297],()=>a(3773));return a.O(d)})());