diff --git a/CHANGELOG.md b/CHANGELOG.md index 423dfec..c9639be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v2.1.0 + +> `2022-07-11` + +### 🎉 Features + - Vue.js `2.7` compatibility + ## v2.0.10 > `2022-05-11` diff --git a/README.md b/README.md index 6ab96c5..c5727ed 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,6 @@ Learn more: [https://vueform.com](https://vueform.com) * [Installation](#installation) * [Using with Vue 3](#using-with-vue-3) * [Using with Vue 2](#using-with-vue-2) - * [Using with Nuxt.js](#using-with-nuxtjs) * [Support](#support) * [Configuration](#configuration) * [Basic props](#basic-props) @@ -147,52 +146,34 @@ npm install @vueform/slider ### Using with Vue 2 -When using Vue 2 install [@vue/composition-api](https://github.com/vuejs/composition-api#npm) via npm/yarn first: - -``` bash -npm i @vue/composition-api --save-dev -``` - -Then install the plugin for Vue: - -``` js -import Vue from 'vue' -import VueCompositionAPI from '@vue/composition-api' - -Vue.use(VueCompositionAPI) -``` - -After that make sure to change the imported Slider module to: - -``` js -import Slider from '@vueform/slider/dist/slider.vue2.js' -``` - -### Using with Nuxt.js - -First you need install [@nuxtjs/composition-api](https://composition-api.nuxtjs.org/getting-started/setup): +``` vue + -``` bash -npm i @nuxtjs/composition-api --save -``` + -``` js -{ - buildModules: [ - '@nuxtjs/composition-api/module' - ] -} + ``` -After that make sure to change the imported module to Vue 2 version of Slider: - -``` js -import Slider from '@vueform/slider/dist/slider.vue2' -``` +#### Using with < Vue 2.7 -For more information on using `@nuxtjs/composition-api` read [their documentation](https://composition-api.nuxtjs.org/). +Switch to [`<= 2.0.10`](https://github.com/vueform/slider/tree/2.0.10) to use the Slider with Vue.js `< 2.7`. ## Support diff --git a/build/vue2.rollup.config.js b/build/vue2.rollup.config.js index 1b7318f..464ca44 100644 --- a/build/vue2.rollup.config.js +++ b/build/vue2.rollup.config.js @@ -16,7 +16,7 @@ export default [ vue(), alias({ entries: [ - { find: 'composition-api', replacement: '@vue/composition-api' }, + { find: 'composition-api', replacement: 'vue' }, ] }), nodeResolve({ @@ -29,7 +29,7 @@ export default [ }), terser(), ], - external: ['@vue/composition-api'], + external: ['vue'], }, { input: 'src/Slider.vue', @@ -38,7 +38,7 @@ export default [ format: 'iife', name: 'VueformSlider', globals: { - 'composition-api': 'VueCompositionAPI', + 'composition-api': 'Vue', 'vue': 'Vue', } }, diff --git a/dist/slider.global.js b/dist/slider.global.js index 70bc517..ca2b924 100644 --- a/dist/slider.global.js +++ b/dist/slider.global.js @@ -1 +1 @@ -var VueformSlider=function(t,e){"use strict";function r(t){return-1!==[null,void 0,!1].indexOf(t)}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e=0&&o<8))throw new Error(n);a[n]=o}else if("encoder"===n||"decoder"===n||"edit"===n||"undo"===n){if("function"!=typeof o)throw new Error(n);a[n]=o}else{if("string"!=typeof o)throw new Error(n);a[n]=o}return i(a,"mark","thousand"),i(a,"prefix","negative"),i(a,"prefix","negativeBefore"),a}function p(e,r,n){var i,o=[];for(i=0;i0&&(m(t,e),setTimeout((function(){v(t,e)}),r))}function f(t){return Math.max(Math.min(t,100),0)}function d(t){return Array.isArray(t)?t:[t]}function h(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function m(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function v(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function g(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function b(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function y(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function S(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function x(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function w(t,e){return 100/(e-t)}function E(t,e,r){return 100*e/(t[r+1]-t[r])}function P(t,e){return E(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function N(t,e){return e*(t[1]-t[0])/100+t[0]}function C(t,e){for(var r=1;t>=e[r];)r+=1;return r}function k(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=C(r,t),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return a+P([i,o],r)/w(a,s)}function V(t,e,r){if(r>=100)return t.slice(-1)[0];var n=C(r,e),i=t[n-1],o=t[n],a=e[n-1];return N([i,o],(r-a)*w(a,e[n]))}function A(t,e,r,n){if(100===n)return n;var i=C(n,t),o=t[i-1],a=t[i];return r?n-o>(a-o)/2?a:o:e[i-1]?t[i-1]+l(n-t[i-1],e[i-1]):n}var O,M;t.PipsMode=void 0,(M=t.PipsMode||(t.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",t.PipsType=void 0,(O=t.PipsType||(t.PipsType={}))[O.None=-1]="None",O[O.NoValue=0]="NoValue",O[O.LargeValue=1]="LargeValue",O[O.SmallValue=2]="SmallValue";var U=function(){function t(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([d(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),n=0;nthis.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++,null===e&&(e=[]);var o=1,a=e[i],s=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=s*n,o=(a-100*n)/e[i+c],n=1):(l=e[i+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[i+c]*o;return t+u},t.prototype.toStepping=function(t){return t=k(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return V(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=A(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=C(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){var e=C(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(h);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){var r;if(!c(r="min"===t?0:"max"===t?100:parseFloat(t))||!c(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(e[0]);var n=Number(e[1]);r?this.xSteps.push(!isNaN(n)&&n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){if(e)if(this.xVal[t]!==this.xVal[t+1]){this.xSteps[t]=E([this.xVal[t],this.xVal[t+1]],e,0)/w(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(r.toFixed(3))-1),i=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=i}else this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t]},t}(),j={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},L={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function T(t,e){if(!c(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function z(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function F(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function H(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function R(t,e){if("object"!==o(e)||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new U(e,t.snap||!1,t.singleStep)}function q(t,e){if(e=d(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function B(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function _(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function X(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function Y(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function J(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function K(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,a=e.indexOf("hover")>=0,s=e.indexOf("unconstrained")>=0,l=e.indexOf("drag-all")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");$(t,t.start[1]-t.start[0])}if(s&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,dragAll:l,fixed:i,snap:o,hover:a,unconstrained:s}}function Q(t,e){if(!1!==e)if(!0===e||r(e)){t.tooltips=[];for(var n=0;n= 2) required for mode 'count'.");for(var r=e.values-1,n=100/r,i=[];r--;)i[r]=r*n;return i.push(100),J(i,e.stepped)}return e.mode===t.PipsMode.Positions?J(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return k.fromStepping(k.getStep(k.toStepping(t)))})):e.values:[]}function J(t,e){return t.map((function(t){return k.fromStepping(e?k.getStep(t):t)}))}function K(e){function r(t,e){return Number((t+e).toFixed(7))}var n=G(e),i={},o=k.xVal[0],a=k.xVal[k.xVal.length-1],l=!1,u=!1,c=0;return(n=s(n.slice().sort((function(t,e){return t-e}))))[0]!==o&&(n.unshift(o),l=!0),n[n.length-1]!==a&&(n.push(a),u=!0),n.forEach((function(o,a){var s,p,f,d,h,m,v,g,b,y,S=o,x=n[a+1],w=e.mode===t.PipsMode.Steps;for(w&&(s=k.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(d=k.toStepping(p))-c)/(e.density||1),y=h/(b=Math.round(g)),f=1;f<=b;f+=1)i[(m=c+f*y).toFixed(5)]=[k.fromStepping(m),0];v=n.indexOf(p)>-1?t.PipsType.LargeValue:w?t.PipsType.SmallValue:t.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(i[d.toFixed(5)]=[p,v]),c=d}})),i}function Q(e,n,i){var o,a,s=j.createElement("div"),l=((o={})[t.PipsType.None]="",o[t.PipsType.NoValue]=r.cssClasses.valueNormal,o[t.PipsType.LargeValue]=r.cssClasses.valueLarge,o[t.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[t.PipsType.None]="",a[t.PipsType.NoValue]=r.cssClasses.markerNormal,a[t.PipsType.LargeValue]=r.cssClasses.markerLarge,a[t.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function f(t,e){var n=e===r.cssClasses.value,i=n?l:u;return e+" "+(n?c:p)[r.ort]+" "+i[t]}function d(e,o,a){if((a=n?n(o,a):a)!==t.PipsType.None){var l=F(s,!1);l.className=f(a,r.cssClasses.marker),l.style[r.style]=e+"%",a>t.PipsType.NoValue&&((l=F(s,!1)).className=f(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=e+"%",l.innerHTML=String(i.to(o)))}}return m(s,r.cssClasses.pips),m(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(e).forEach((function(t){d(t,e[t][0],e[t][1])})),s}function Z(){w&&(n(w),w=null)}function tt(t){Z();var e=K(t),r=t.filter,n=t.format||{to:function(t){return String(Math.round(t))}};return w=C.appendChild(Q(e,r,n))}function et(){var t=l.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||l[e]:t.height||l[e]}function rt(t,e,n,i){var o=function(o){var a=nt(o,i.pageOffset,i.target||e);return!!a&&!(X()&&!i.doNotReject)&&!(g(C,r.cssClasses.tap)&&!i.doNotReject)&&!(t===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!i.hover||!a.buttons)&&(N||a.preventDefault(),a.calcPoint=a.points[r.ort],void n(a,i))},a=[];return t.split(" ").forEach((function(t){e.addEventListener(t,o,!!N&&{passive:!0}),a.push([t,o])})),a}function nt(t,e,r){var n=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=0,s=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var l=function(e){var n=e.target;return n===r||r.contains(n)||t.composed&&t.composedPath().shift()===r};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return e=e||b(j),(i||o)&&(a=t.clientX+e.x,s=t.clientY+e.y),t.pageOffset=e,t.points=[a,s],t.cursor=i||o,t}function it(t){var e=100*(t-u(l,r.ort))/et();return e=f(e),r.dir?100-e:e}function ot(t){var e=100,r=!1;return c.forEach((function(n,i){if(!Y(i)){var o=A[i],a=Math.abs(o-t);(ao||100===a&&100===e)&&(r=i,e=a)}})),r}function st(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&ut(t,e)}function lt(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return ut(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);xt(n>0,100*n/e.baseSize,e.locations,e.handleNumbers,e.connect)}function ut(t,e){e.handle&&(v(e.handle,r.cssClasses.active),M-=1),e.listeners.forEach((function(t){L.removeEventListener(t[0],t[1])})),0===M&&(v(C,r.cssClasses.drag),Pt(),t.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",a))),e.handleNumbers.forEach((function(t){bt("change",t),bt("set",t),bt("end",t)}))}function ct(t,e){if(!e.handleNumbers.some(Y)){var n;1===e.handleNumbers.length&&(n=c[e.handleNumbers[0]].children[0],M+=1,m(n,r.cssClasses.active)),t.stopPropagation();var i=[],o=rt(P.move,L,lt,{target:t.target,handle:n,connect:e.connect,listeners:i,startCalcPoint:t.calcPoint,baseSize:et(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:A.slice()}),s=rt(P.end,L,ut,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers}),l=rt("mouseout",L,st,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers});i.push.apply(i,o.concat(s,l)),t.cursor&&(T.style.cursor=getComputedStyle(t.target).cursor,c.length>1&&m(C,r.cssClasses.drag),T.addEventListener("selectstart",a,!1)),e.handleNumbers.forEach((function(t){bt("start",t)}))}}function pt(t){t.stopPropagation();var e=it(t.calcPoint),n=ot(e);!1!==n&&(r.events.snap||p(C,r.cssClasses.tap,r.animationDuration),Nt(n,e,!0,!0),Pt(),bt("slide",n,!0),bt("update",n,!0),r.events.snap?ct(t,{handleNumbers:[n]}):(bt("change",n,!0),bt("set",n,!0)))}function ft(t){var e=it(t.calcPoint),r=k.getStep(e),n=k.fromStepping(r);Object.keys(U).forEach((function(t){"hover"===t.split(".")[0]&&U[t].forEach((function(t){t.call(zt,n)}))}))}function dt(t,e){if(X()||Y(e))return!1;var n=["Left","Right"],i=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?n.reverse():r.ort&&!r.dir&&(i.reverse(),o.reverse());var s,l=t.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===i[0]||l===n[0]||u,f=l===i[1]||l===n[1]||c,d=l===a[0],h=l===a[1];if(!(p||f||d||h))return!0;if(t.preventDefault(),f||p){var m=p?0:1,v=jt(e)[m];if(null===v)return!1;!1===v&&(v=k.getDefaultStep(A[e],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=V[e]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Nt(e,k.toStepping(s),!0,!0),bt("slide",e),bt("update",e),bt("change",e),bt("set",e),!1}function ht(t){t.fixed||c.forEach((function(t,e){rt(P.start,t.children[0],ct,{handleNumbers:[e]})})),t.tap&&rt(P.start,l,pt,{}),t.hover&&rt(P.move,l,ft,{hover:!0}),t.drag&&h.forEach((function(e,n){if(!1!==e&&0!==n&&n!==h.length-1){var i=c[n-1],o=c[n],a=[e],s=[i,o],l=[n-1,n];m(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(o.children[0])),t.dragAll&&(s=c,l=O),a.forEach((function(t){rt(P.start,t,ct,{handles:s,handleNumbers:l,connect:e})}))}}))}function mt(t,e){U[t]=U[t]||[],U[t].push(e),"update"===t.split(".")[0]&&c.forEach((function(t,e){bt("update",e)}))}function vt(t){return t===D.aria||t===D.tooltips}function gt(t){var e=t&&t.split(".")[0],r=e?t.substring(e.length):t;Object.keys(U).forEach((function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||vt(i)&&r!==i||delete U[t]}))}function bt(t,e,n){Object.keys(U).forEach((function(i){var o=i.split(".")[0];t===o&&U[i].forEach((function(t){t.call(zt,V.map(r.format.to),e,V.slice(),n||!1,A.slice(),zt)}))}))}function yt(t,e,n,i,o,a){var s;return c.length>1&&!r.events.unconstrained&&(i&&e>0&&(s=k.getAbsoluteDistance(t[e-1],r.margin,!1),n=Math.max(n,s)),o&&e1&&r.limit&&(i&&e>0&&(s=k.getAbsoluteDistance(t[e-1],r.limit,!1),n=Math.min(n,s)),o&&e1?n.forEach((function(t,r){var n=yt(o,t,o[t]+e,s[r],l[r],!1);!1===n?e=0:(e=n-o[t],o[t]=n)})):s=l=[!0];var u=!1;n.forEach((function(t,n){u=Nt(t,r[t]+e,s[n],l[n])||u})),u&&(n.forEach((function(t){bt("update",t),bt("slide",t)})),null!=i&&bt("drag",a))}function wt(t,e){return r.dir?100-t-e:t}function Et(t,e){A[t]=e,V[t]=k.fromStepping(e);var n="translate("+St(wt(e,0)-z+"%","0")+")";c[t].style[r.transformRule]=n,Ct(t),Ct(t+1)}function Pt(){O.forEach((function(t){var e=A[t]>50?-1:1,r=3+(c.length+e*t);c[t].style.zIndex=String(r)}))}function Nt(t,e,r,n,i){return i||(e=yt(A,t,e,r,n,!1)),!1!==e&&(Et(t,e),!0)}function Ct(t){if(h[t]){var e=0,n=100;0!==t&&(e=A[t-1]),t!==h.length-1&&(n=A[t]);var i=n-e,o="translate("+St(wt(e,i)+"%","0")+")",a="scale("+St(i/100,"1")+")";h[t].style[r.transformRule]=o+" "+a}}function kt(t,e){return null===t||!1===t||void 0===t?A[e]:("number"==typeof t&&(t=String(t)),!1!==(t=r.format.from(t))&&(t=k.toStepping(t)),!1===t||isNaN(t)?A[e]:t)}function Vt(t,e,n){var i=d(t),o=void 0===A[0];e=void 0===e||e,r.animate&&!o&&p(C,r.cssClasses.tap,r.animationDuration),O.forEach((function(t){Nt(t,kt(i[t],t),!0,!1,n)}));var a=1===O.length?0:1;if(o&&k.hasNoSize()&&(n=!0,A[0]=0,O.length>1)){var s=100/(O.length-1);O.forEach((function(t){A[t]=t*s}))}for(;a=0&&tn.stepAfter.startValue&&(o=n.stepAfter.startValue-i),a=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(a=null);var s=k.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function Lt(){return O.map(jt)}function Dt(t,e){var n=Mt(),a=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];a.forEach((function(e){void 0!==t[e]&&(o[e]=t[e])}));var s=at(o);a.forEach((function(e){void 0!==t[e]&&(r[e]=s[e])})),k=s.spectrum,r.margin=s.margin,r.limit=s.limit,r.padding=s.padding,r.pips?tt(r.pips):Z(),r.tooltips?$():I(),A=[],Vt(i(t.start)?t.start:n,e)}function Tt(){l=B(C),q(r.connect,l),ht(r.events),Vt(r.start),r.pips&&tt(r.pips),r.tooltips&&$(),W()}Tt();var zt={destroy:Ut,steps:Lt,on:mt,off:gt,get:Mt,set:Vt,setHandle:Ot,reset:At,__moveHandles:function(t,e,r){xt(t,e,A,r)},options:o,updateOptions:Dt,target:C,removePips:Z,removeTooltips:I,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return c},pips:tt};return zt}function lt(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=st(t,at(e),e);return t.noUiSlider=r,r}var ut={__spectrum:U,cssClasses:L,create:lt};t.create=lt,t.cssClasses=L,t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})}(e)})));function p(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;var r=e.slice().sort();return t.length===e.length&&t.slice().sort().every((function(t,e){return t===r[e]}))}var f={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1},modelValue:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(e,n){const a=function(e,n,i){var o=t.toRefs(e),a=o.value,s=o.modelValue,l=void 0!==n.expose?s:a,u=t.ref(l.value);if(r(l.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(l.value)&&0==l.value.length)throw new Error("Slider v-model must not be an empty array");return{value:l,initialValue:u}}(e,n),s=function(e,r,n){var o=t.toRefs(e),a=o.classes,s=o.showTooltip,l=o.tooltipPosition,u=o.orientation,c=t.computed((function(){return i({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub"},a.value)}));return{classList:t.computed((function(){var t=i({},c.value);return Object.keys(t).forEach((function(e){t[e]=Array.isArray(t[e])?t[e].filter((function(t){return null!==t})).join(" "):t[e]})),"always"!==s.value&&(t.target+=" ".concat("drag"===s.value?t.tooltipDrag:t.tooltipFocus)),"horizontal"===u.value&&(t.tooltip+="bottom"===l.value?" ".concat(t.tooltipBottom):" ".concat(t.tooltipTop)),"vertical"===u.value&&(t.tooltip+="right"===l.value?" ".concat(t.tooltipRight):" ".concat(t.tooltipLeft)),t}))}}(e),l=function(e,r,n){var o=t.toRefs(e),a=o.format,s=o.step,l=n.value,c=n.classList,p=t.computed((function(){return a&&a.value?"function"==typeof a.value?{to:a.value}:u(i({},a.value)):u({decimals:s.value>=0?0:2})}));return{tooltipsFormat:t.computed((function(){return Array.isArray(l.value)?l.value.map((function(t){return p.value})):p.value})),tooltipsMerge:function(t,e,r){var n="rtl"===getComputedStyle(t).direction,i="rtl"===t.noUiSlider.options.direction,o="vertical"===t.noUiSlider.options.orientation,a=t.noUiSlider.getTooltips(),s=t.noUiSlider.getOrigins();a.forEach((function(t,e){t&&s[e].appendChild(t)})),t.noUiSlider.on("update",(function(t,s,l,u,f){var d=[[]],h=[[]],m=[[]],v=0;a[0]&&(d[0][0]=0,h[0][0]=f[0],m[0][0]=p.value.to(parseFloat(t[0])));for(var g=1;ge)&&(d[++v]=[],m[v]=[],h[v]=[]),a[g]&&(d[v].push(g),m[v].push(p.value.to(parseFloat(t[g]))),h[v].push(f[g]));d.forEach((function(t,e){for(var s=t.length,l=0;l0&&(t.step=f.value),Array.isArray(w.value)&&(t.connect=!0),t})),M=t.computed((function(){var t={id:v&&v.value?v.value:void 0};return g.value&&(t.disabled=!0),t})),U=t.computed((function(){return Array.isArray(w.value)})),j=function(){var t=V.value.get();return Array.isArray(t)?t.map((function(t){return parseFloat(t)})):parseFloat(t)},L=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];V.value.set(t,e)},D=function(t){n.emit("input",t),n.emit("update:modelValue",t),n.emit("update",t)},T=function(){V.value=c.create(k.value,Object.assign({},O.value,b.value)),u.value&&U.value&&m.value>=0&&N(k.value,m.value," - "),V.value.on("set",(function(t){var e=j();n.emit("change",e),x.value&&D(e)})),V.value.on("update",(function(t){if(A.value){var e=j();U.value&&p(w.value,e)||!U.value&&w.value==e?n.emit("update",e):x.value||D(e)}})),k.value.querySelectorAll("[data-handle]").forEach((function(t){t.onblur=function(){C.value.focused.split(" ").forEach((function(t){k.value.classList.remove(t)}))},t.onfocus=function(){C.value.focused.split(" ").forEach((function(t){k.value.classList.add(t)}))}})),A.value=!0},z=function(){V.value.off(),V.value.destroy(),V.value=null},F=function(t,e){A.value=!1,z(),T()};return t.onMounted(T),t.onUnmounted(z),t.watch(w,(function(t,e){e&&("object"===o(e)&&"object"===o(t)&&t&&Object.keys(e)>Object.keys(t)||"object"===o(e)&&"object"!==o(t)||!t)&&F()}),{immediate:!1}),t.watch(U,F,{immediate:!1}),t.watch(d,F,{immediate:!1}),t.watch(h,F,{immediate:!1}),t.watch(f,F,{immediate:!1}),t.watch(s,F,{immediate:!1}),t.watch(l,F,{immediate:!1}),t.watch(u,F,{immediate:!1}),t.watch(m,F,{immediate:!1}),t.watch(S,F,{immediate:!1,deep:!0}),t.watch(b,F,{immediate:!1,deep:!0}),t.watch(y,F,{immediate:!1,deep:!0}),t.watch(w,(function(t){if(r(t))L(d.value,!1);else{var e=j();U.value&&!Array.isArray(e)&&(e=[e]),(U.value&&!p(t,e)||!U.value&&t!=e)&&L(t,!1)}}),{deep:!0}),{slider:k,slider$:V,isRange:U,sliderProps:M,init:T,destroy:z,refresh:F,update:L,reset:function(){D(E.value)}}}(e,n,{value:a.value,initialValue:a.initialValue,tooltipsFormat:l.tooltipsFormat,tooltipsMerge:l.tooltipsMerge,classList:s.classList});return{...s,...l,...f}}};return f.render=function(t,r,n,i,o,a){return e.openBlock(),e.createElementBlock("div",e.mergeProps(t.sliderProps,{ref:"slider"}),null,16)},f.__file="src/Slider.vue",f}(Vue,Vue); +var VueformSlider=function(e,t){"use strict";function r(e){return-1!==[null,void 0,!1].indexOf(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){var t={exports:{}};return e(t,t.exports),t.exports}var o=n((function(e,t){e.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function r(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function n(e,t,r){if((e[t]||e[r])&&e[t]===e[r])throw new Error(t)}function o(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,r,i,n,s,l,u,c,p,d,f,h){var m,v,g,b=h,y="",S="";return l&&(h=l(h)),!!o(h)&&(!1!==e&&0===parseFloat(h.toFixed(e))&&(h=0),h<0&&(m=!0,h=Math.abs(h)),!1!==e&&(h=a(h,e)),-1!==(h=h.toString()).indexOf(".")?(g=(v=h.split("."))[0],i&&(y=i+v[1])):g=h,r&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(r)))),m&&c&&(S+=c),n&&(S+=n),m&&p&&(S+=p),S+=g,S+=y,s&&(S+=s),d&&(S=d(S,b)),S)}function l(e,t,n,a,s,l,u,c,p,d,f,h){var m,v="";return f&&(h=f(h)),!(!h||"string"!=typeof h)&&(c&&r(h,c)&&(h=h.replace(c,""),m=!0),a&&r(h,a)&&(h=h.replace(a,"")),p&&r(h,p)&&(h=h.replace(p,""),m=!0),s&&i(h,s)&&(h=h.slice(0,-1*s.length)),t&&(h=h.split(t).join("")),n&&(h=h.replace(n,".")),m&&(v+="-"),""!==(v=(v+=h).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),u&&(v=u(v)),!!o(v)&&v))}function u(t){var r,i,o,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),r=0;r=0&&o<8))throw new Error(i);a[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);a[i]=o}else{if("string"!=typeof o)throw new Error(i);a[i]=o}return n(a,"mark","thousand"),n(a,"prefix","negative"),n(a,"prefix","negativeBefore"),a}function c(t,r,i){var n,o=[];for(n=0;n0&&(h(e,t),setTimeout((function(){m(e,t)}),r))}function p(e){return Math.max(Math.min(e,100),0)}function d(e){return Array.isArray(e)?e:[e]}function f(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function h(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function m(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function g(e){var t=void 0!==window.pageXOffset,r="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function y(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}function S(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function x(e,t){return 100/(t-e)}function w(e,t,r){return 100*t/(e[r+1]-e[r])}function E(e,t){return w(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function P(e,t){return t*(e[1]-e[0])/100+e[0]}function N(e,t){for(var r=1;e>=t[r];)r+=1;return r}function C(e,t,r){if(r>=e.slice(-1)[0])return 100;var i=N(r,e),n=e[i-1],o=e[i],a=t[i-1],s=t[i];return a+E([n,o],r)/x(a,s)}function k(e,t,r){if(r>=100)return e.slice(-1)[0];var i=N(r,t),n=e[i-1],o=e[i],a=t[i-1];return P([n,o],(r-a)*x(a,t[i]))}function V(e,t,r,i){if(100===i)return i;var n=N(i,e),o=e[n-1],a=e[n];return r?i-o>(a-o)/2?a:o:t[n-1]?e[n-1]+s(i-e[n-1],t[n-1]):i}var A,M;e.PipsMode=void 0,(M=e.PipsMode||(e.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",e.PipsType=void 0,(A=e.PipsType||(e.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var U=function(){function e(e,t,r){var i;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var n=[];for(Object.keys(e).forEach((function(t){n.push([d(e[t]),t])})),n.sort((function(e,t){return e[0][0]-t[0][0]})),i=0;ithis.xPct[n+1];)n++;else e===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||e!==this.xPct[n+1]||n++,null===t&&(t=[]);var o=1,a=t[n],s=0,l=0,u=0,c=0;for(i=r?(e-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-e)/(this.xPct[n+1]-this.xPct[n]);a>0;)s=this.xPct[n+1+c]-this.xPct[n+c],t[n+c]*o+100-100*i>100?(l=s*i,o=(a-100*i)/t[n+c],i=1):(l=t[n+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=t[n+c]*o;return e+u},e.prototype.toStepping=function(e){return e=C(this.xVal,this.xPct,e)},e.prototype.fromStepping=function(e){return k(this.xVal,this.xPct,e)},e.prototype.getStep=function(e){return e=V(this.xPct,this.xSteps,this.snap,e)},e.prototype.getDefaultStep=function(e,t,r){var i=N(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(e){var t=N(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(f);return Math.max.apply(null,e)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(e){return this.getStep(this.toStepping(e))},e.prototype.handleEntryPoint=function(e,t){var r;if(!u(r="min"===e?0:"max"===e?100:parseFloat(e))||!u(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(t[0]);var i=Number(t[1]);r?this.xSteps.push(!isNaN(i)&&i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=w([this.xVal[e],this.xVal[e+1]],t,0)/x(this.xPct[e],this.xPct[e+1]);var r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],i=Math.ceil(Number(r.toFixed(3))-1),n=this.xVal[e]+this.xNumSteps[e]*i;this.xHighestCompleteStep[e]=n}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]},e}(),L={to:function(e){return void 0===e?"":e.toFixed(2)},from:Number},O={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function j(e,t){if(!u(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function T(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function z(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function F(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function H(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new U(t,e.snap||!1,e.singleStep)}function R(e,t){if(t=d(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function q(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function B(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function _(e,t){if("number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function $(e,t){var r,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function G(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,n=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,u=t.indexOf("smooth-steps")>=0;if(n){if(2!==e.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Y(e,e.start[1]-e.start[0])}if(s&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||o,drag:i,dragAll:l,smoothSteps:u,fixed:n,snap:o,hover:a,unconstrained:s}}function K(e,t){if(!1!==t)if(!0===t||r(t)){e.tooltips=[];for(var i=0;i= 2) required for mode 'count'.");for(var r=t.values-1,i=100/r,n=[];r--;)n[r]=r*i;return n.push(100),J(n,t.stepped)}return t.mode===e.PipsMode.Positions?J(t.values,t.stepped):t.mode===e.PipsMode.Values?t.stepped?t.values.map((function(e){return k.fromStepping(k.getStep(k.toStepping(e)))})):t.values:[]}function J(e,t){return e.map((function(e){return k.fromStepping(t?k.getStep(e):e)}))}function K(t){function r(e,t){return Number((e+t).toFixed(7))}var i=G(t),n={},o=k.xVal[0],s=k.xVal[k.xVal.length-1],l=!1,u=!1,c=0;return(i=a(i.slice().sort((function(e,t){return e-t}))))[0]!==o&&(i.unshift(o),l=!0),i[i.length-1]!==s&&(i.push(s),u=!0),i.forEach((function(o,a){var s,p,d,f,h,m,v,g,b,y,S=o,x=i[a+1],w=t.mode===e.PipsMode.Steps;for(w&&(s=k.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(f=k.toStepping(p))-c)/(t.density||1),y=h/(b=Math.round(g)),d=1;d<=b;d+=1)n[(m=c+d*y).toFixed(5)]=[k.fromStepping(m),0];v=i.indexOf(p)>-1?e.PipsType.LargeValue:w?e.PipsType.SmallValue:e.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(n[f.toFixed(5)]=[p,v]),c=f}})),n}function Q(t,i,n){var o,a,s=O.createElement("div"),l=((o={})[e.PipsType.None]="",o[e.PipsType.NoValue]=r.cssClasses.valueNormal,o[e.PipsType.LargeValue]=r.cssClasses.valueLarge,o[e.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[e.PipsType.None]="",a[e.PipsType.NoValue]=r.cssClasses.markerNormal,a[e.PipsType.LargeValue]=r.cssClasses.markerLarge,a[e.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function d(e,t){var i=t===r.cssClasses.value,n=i?l:u;return t+" "+(i?c:p)[r.ort]+" "+n[e]}function f(t,o,a){if((a=i?i(o,a):a)!==e.PipsType.None){var l=F(s,!1);l.className=d(a,r.cssClasses.marker),l.style[r.style]=t+"%",a>e.PipsType.NoValue&&((l=F(s,!1)).className=d(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=t+"%",l.innerHTML=String(n.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach((function(e){f(e,t[e][0],t[e][1])})),s}function Z(){w&&(i(w),w=null)}function ee(e){Z();var t=K(e),r=e.filter,i=e.format||{to:function(e){return String(Math.round(e))}};return w=C.appendChild(Q(t,r,i))}function te(){var e=u.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||u[t]:e.height||u[t]}function re(e,t,i,n){var o=function(o){var a=ie(o,n.pageOffset,n.target||t);return!!a&&!($()&&!n.doNotReject)&&!(v(C,r.cssClasses.tap)&&!n.doNotReject)&&!(e===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!n.hover||!a.buttons)&&(N||a.preventDefault(),a.calcPoint=a.points[r.ort],void i(a,n))},a=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!N&&{passive:!0}),a.push([e,o])})),a}function ie(e,t,r){var i=0===e.type.indexOf("touch"),n=0===e.type.indexOf("mouse"),o=0===e.type.indexOf("pointer"),a=0,s=0;if(0===e.type.indexOf("MSPointer")&&(o=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(i){var l=function(t){var i=t.target;return i===r||r.contains(i)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(e.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return t=t||g(O),(n||o)&&(a=e.clientX+t.x,s=e.clientY+t.y),e.pageOffset=t,e.points=[a,s],e.cursor=n||o,e}function ne(e){var t=100*(e-l(u,r.ort))/te();return t=p(t),r.dir?100-t:t}function ae(e){var t=100,r=!1;return f.forEach((function(i,n){if(!X(n)){var o=A[n],a=Math.abs(o-e);(ao||100===a&&100===t)&&(r=n,t=a)}})),r}function se(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&ue(e,t)}function le(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return ue(e,t);var i=(r.dir?-1:1)*(e.calcPoint-t.startCalcPoint);xe(i>0,100*i/t.baseSize,t.locations,t.handleNumbers,t.connect)}function ue(e,t){t.handle&&(m(t.handle,r.cssClasses.active),U-=1),t.listeners.forEach((function(e){j.removeEventListener(e[0],e[1])})),0===U&&(m(C,r.cssClasses.drag),Pe(),e.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",o))),r.events.smoothSteps&&(t.handleNumbers.forEach((function(e){Ne(e,A[e],!0,!0,!1,!1)})),t.handleNumbers.forEach((function(e){be("update",e)}))),t.handleNumbers.forEach((function(e){be("change",e),be("set",e),be("end",e)}))}function ce(e,t){if(!t.handleNumbers.some(X)){var i;1===t.handleNumbers.length&&(i=f[t.handleNumbers[0]].children[0],U+=1,h(i,r.cssClasses.active)),e.stopPropagation();var n=[],a=re(P.move,j,le,{target:e.target,handle:i,connect:t.connect,listeners:n,startCalcPoint:e.calcPoint,baseSize:te(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:A.slice()}),s=re(P.end,j,ue,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers}),l=re("mouseout",j,se,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers});n.push.apply(n,a.concat(s,l)),e.cursor&&(T.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&h(C,r.cssClasses.drag),T.addEventListener("selectstart",o,!1)),t.handleNumbers.forEach((function(e){be("start",e)}))}}function pe(e){e.stopPropagation();var t=ne(e.calcPoint),i=ae(t);!1!==i&&(r.events.snap||c(C,r.cssClasses.tap,r.animationDuration),Ne(i,t,!0,!0),Pe(),be("slide",i,!0),be("update",i,!0),r.events.snap?ce(e,{handleNumbers:[i]}):(be("change",i,!0),be("set",i,!0)))}function de(e){var t=ne(e.calcPoint),r=k.getStep(t),i=k.fromStepping(r);Object.keys(L).forEach((function(e){"hover"===e.split(".")[0]&&L[e].forEach((function(e){e.call(ze,i)}))}))}function fe(e,t){if($()||X(t))return!1;var i=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?i.reverse():r.ort&&!r.dir&&(n.reverse(),o.reverse());var s,l=e.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===n[0]||l===i[0]||u,d=l===n[1]||l===i[1]||c,f=l===a[0],h=l===a[1];if(!(p||d||f||h))return!0;if(e.preventDefault(),d||p){var m=p?0:1,v=Oe(t)[m];if(null===v)return!1;!1===v&&(v=k.getDefaultStep(A[t],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=V[t]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ne(t,k.toStepping(s),!0,!0),be("slide",t),be("update",t),be("change",t),be("set",t),!1}function he(e){e.fixed||f.forEach((function(e,t){re(P.start,e.children[0],ce,{handleNumbers:[t]})})),e.tap&&re(P.start,u,pe,{}),e.hover&&re(P.move,u,de,{hover:!0}),e.drag&&x.forEach((function(t,i){if(!1!==t&&0!==i&&i!==x.length-1){var n=f[i-1],o=f[i],a=[t],s=[n,o],l=[i-1,i];h(t,r.cssClasses.draggable),e.fixed&&(a.push(n.children[0]),a.push(o.children[0])),e.dragAll&&(s=f,l=M),a.forEach((function(e){re(P.start,e,ce,{handles:s,handleNumbers:l,connect:t})}))}}))}function me(e,t){L[e]=L[e]||[],L[e].push(t),"update"===e.split(".")[0]&&f.forEach((function(e,t){be("update",t)}))}function ve(e){return e===D.aria||e===D.tooltips}function ge(e){var t=e&&e.split(".")[0],r=t?e.substring(t.length):e;Object.keys(L).forEach((function(e){var i=e.split(".")[0],n=e.substring(i.length);t&&t!==i||r&&r!==n||ve(n)&&r!==n||delete L[e]}))}function be(e,t,i){Object.keys(L).forEach((function(n){var o=n.split(".")[0];e===o&&L[n].forEach((function(e){e.call(ze,V.map(r.format.to),t,V.slice(),i||!1,A.slice(),ze)}))}))}function ye(e,t,i,n,o,a,s){var l;return f.length>1&&!r.events.unconstrained&&(n&&t>0&&(l=k.getAbsoluteDistance(e[t-1],r.margin,!1),i=Math.max(i,l)),o&&t1&&r.limit&&(n&&t>0&&(l=k.getAbsoluteDistance(e[t-1],r.limit,!1),i=Math.min(i,l)),o&&t1?n.forEach((function(e,r){var i=ye(a,e,a[e]+t,u[r],c[r],!1,l);!1===i?t=0:(t=i-a[e],a[e]=i)})):u=c=[!0];var p=!1;n.forEach((function(e,r){p=Ne(e,i[e]+t,u[r],c[r],!1,l)||p})),p&&(n.forEach((function(e){be("update",e),be("slide",e)})),null!=o&&be("drag",s))}function we(e,t){return r.dir?100-e-t:e}function Ee(e,t){A[e]=t,V[e]=k.fromStepping(t);var i="translate("+Se(we(t,0)-z+"%","0")+")";f[e].style[r.transformRule]=i,Ce(e),Ce(e+1)}function Pe(){M.forEach((function(e){var t=A[e]>50?-1:1,r=3+(f.length+t*e);f[e].style.zIndex=String(r)}))}function Ne(e,t,r,i,n,o){return n||(t=ye(A,e,t,r,i,!1,o)),!1!==t&&(Ee(e,t),!0)}function Ce(e){if(x[e]){var t=0,i=100;0!==e&&(t=A[e-1]),e!==x.length-1&&(i=A[e]);var n=i-t,o="translate("+Se(we(t,n)+"%","0")+")",a="scale("+Se(n/100,"1")+")";x[e].style[r.transformRule]=o+" "+a}}function ke(e,t){return null===e||!1===e||void 0===e?A[t]:("number"==typeof e&&(e=String(e)),!1!==(e=r.format.from(e))&&(e=k.toStepping(e)),!1===e||isNaN(e)?A[t]:e)}function Ve(e,t,i){var n=d(e),o=void 0===A[0];t=void 0===t||t,r.animate&&!o&&c(C,r.cssClasses.tap,r.animationDuration),M.forEach((function(e){Ne(e,ke(n[e],e),!0,!1,i)}));var a=1===M.length?0:1;if(o&&k.hasNoSize()&&(i=!0,A[0]=0,M.length>1)){var s=100/(M.length-1);M.forEach((function(e){A[e]=e*s}))}for(;a=0&&ei.stepAfter.startValue&&(o=i.stepAfter.startValue-n),a=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?o=null:0===t&&(a=null);var s=k.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function De(){return M.map(Oe)}function je(e,t){var i=Ue(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(t){void 0!==e[t]&&(s[t]=e[t])}));var a=oe(s);o.forEach((function(t){void 0!==e[t]&&(r[t]=a[t])})),k=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?ee(r.pips):Z(),r.tooltips?I():Y(),A=[],Ve(n(e.start)?e.start:i,t)}function Te(){u=B(C),q(r.connect,u),he(r.events),Ve(r.start),r.pips&&ee(r.pips),r.tooltips&&I(),W()}Te();var ze={destroy:Le,steps:De,on:me,off:ge,get:Ue,set:Ve,setHandle:Me,reset:Ae,__moveHandles:function(e,t,r){xe(e,t,A,r)},options:s,updateOptions:je,target:C,removePips:Z,removeTooltips:Y,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return f},pips:ee};return ze}function se(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=ae(e,oe(t),t);return e.noUiSlider=r,r}var le={__spectrum:U,cssClasses:O,create:se};e.create=se,e.cssClasses=O,e.default=le,Object.defineProperty(e,"__esModule",{value:!0})}(t)})));function s(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===r[t]}))}var l={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1},modelValue:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(t,i){const n=function(t,i,n){const{value:o,modelValue:a}=e.toRefs(t),s=a&&void 0!==a.value?a:o,l=e.ref(s.value);if(r(s.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(s.value)&&0==s.value.length)throw new Error("Slider v-model must not be an empty array");return{value:s,initialValue:l}}(t),l=function(t,r,i){const{classes:n,showTooltip:o,tooltipPosition:a,orientation:s}=e.toRefs(t),l=e.computed((()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...n.value})));return{classList:e.computed((()=>{const e={...l.value};return Object.keys(e).forEach((t=>{e[t]=Array.isArray(e[t])?e[t].filter((e=>null!==e)).join(" "):e[t]})),"always"!==o.value&&(e.target+=` ${"drag"===o.value?e.tooltipDrag:e.tooltipFocus}`),"horizontal"===s.value&&(e.tooltip+="bottom"===a.value?` ${e.tooltipBottom}`:` ${e.tooltipTop}`),"vertical"===s.value&&(e.tooltip+="right"===a.value?` ${e.tooltipRight}`:` ${e.tooltipLeft}`),e}))}}(t),u=function(t,r,i){const{format:n,step:a}=e.toRefs(t),s=i.value,l=i.classList,u=e.computed((()=>n&&n.value?"function"==typeof n.value?{to:n.value}:o({...n.value}):o({decimals:a.value>=0?0:2})));return{tooltipsFormat:e.computed((()=>Array.isArray(s.value)?s.value.map((e=>u.value)):u.value)),tooltipsMerge:(e,t,r)=>{var i="rtl"===getComputedStyle(e).direction,n="rtl"===e.noUiSlider.options.direction,o="vertical"===e.noUiSlider.options.orientation,a=e.noUiSlider.getTooltips(),s=e.noUiSlider.getOrigins();a.forEach((function(e,t){e&&s[t].appendChild(e)})),e.noUiSlider.on("update",(function(e,s,c,p,d){var f=[[]],h=[[]],m=[[]],v=0;a[0]&&(f[0][0]=0,h[0][0]=d[0],m[0][0]=u.value.to(parseFloat(e[0])));for(var g=1;gt)&&(f[++v]=[],m[v]=[],h[v]=[]),a[g]&&(f[v].push(g),m[v].push(u.value.to(parseFloat(e[g]))),h[v].push(d[g]));f.forEach((function(e,t){for(var s=e.length,u=0;u{a[c].classList.contains(e)&&a[c].classList.remove(e)}))}else a[c].style.display="none",l.value.tooltipHidden.split(" ").forEach((e=>{a[c].classList.add(e)}))}}))}))}}}(t,0,{value:n.value,classList:l.classList}),c=function(t,i,n){const{orientation:o,direction:l,tooltips:u,step:c,min:p,max:d,merge:f,id:h,disabled:m,options:v,classes:g,format:b,lazy:y}=e.toRefs(t),S=n.value,x=n.initialValue,w=n.tooltipsFormat,E=n.tooltipsMerge,P=n.classList,N=e.ref(null),C=e.ref(null),k=e.ref(!1),V=e.computed((()=>{let e={cssPrefix:"",cssClasses:P.value,orientation:o.value,direction:l.value,tooltips:!!u.value&&w.value,connect:"lower",start:r(S.value)?p.value:S.value,range:{min:p.value,max:d.value}};return c.value>0&&(e.step=c.value),Array.isArray(S.value)&&(e.connect=!0),e})),A=e.computed((()=>{let e={id:h&&h.value?h.value:void 0};return m.value&&(e.disabled=!0),e})),M=e.computed((()=>Array.isArray(S.value))),U=()=>{let e=C.value.get();return Array.isArray(e)?e.map((e=>parseFloat(e))):parseFloat(e)},L=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];C.value.set(e,t)},O=e=>{i.emit("input",e),i.emit("update:modelValue",e),i.emit("update",e)},D=()=>{C.value=a.create(N.value,Object.assign({},V.value,v.value)),u.value&&M.value&&f.value>=0&&E(N.value,f.value," - "),C.value.on("set",(e=>{const t=U();i.emit("change",t),y.value&&O(t)})),C.value.on("update",(e=>{if(!k.value)return;const t=U();M.value&&s(S.value,t)||!M.value&&S.value==t?i.emit("update",t):y.value||O(t)})),N.value.querySelectorAll("[data-handle]").forEach((e=>{e.onblur=()=>{P.value.focused.split(" ").forEach((e=>{N.value.classList.remove(e)}))},e.onfocus=()=>{P.value.focused.split(" ").forEach((e=>{N.value.classList.add(e)}))}})),k.value=!0},j=()=>{C.value.off(),C.value.destroy(),C.value=null},T=(e,t)=>{k.value=!1,j(),D()};return e.onMounted(D),e.onUnmounted(j),e.watch(S,((e,t)=>{t&&("object"==typeof t&&"object"==typeof e&&e&&Object.keys(t)>Object.keys(e)||"object"==typeof t&&"object"!=typeof e||!e)&&T()}),{immediate:!1}),e.watch(M,T,{immediate:!1}),e.watch(p,T,{immediate:!1}),e.watch(d,T,{immediate:!1}),e.watch(c,T,{immediate:!1}),e.watch(o,T,{immediate:!1}),e.watch(l,T,{immediate:!1}),e.watch(u,T,{immediate:!1}),e.watch(f,T,{immediate:!1}),e.watch(b,T,{immediate:!1,deep:!0}),e.watch(v,T,{immediate:!1,deep:!0}),e.watch(g,T,{immediate:!1,deep:!0}),e.watch(S,(e=>{if(r(e))return void L(p.value,!1);let t=U();M.value&&!Array.isArray(t)&&(t=[t]),(M.value&&!s(e,t)||!M.value&&e!=t)&&L(e,!1)}),{deep:!0}),{slider:N,slider$:C,isRange:M,sliderProps:A,init:D,destroy:j,refresh:T,update:L,reset:()=>{O(x.value)}}}(t,i,{value:n.value,initialValue:n.initialValue,tooltipsFormat:u.tooltipsFormat,tooltipsMerge:u.tooltipsMerge,classList:l.classList});return{...l,...u,...c}}};return l.render=function(e,r,i,n,o,a){return t.openBlock(),t.createElementBlock("div",t.mergeProps(e.sliderProps,{ref:"slider"}),null,16)},l.__file="src/Slider.vue",l}(Vue,Vue); diff --git a/dist/slider.js b/dist/slider.js index e43ce62..89d304b 100644 --- a/dist/slider.js +++ b/dist/slider.js @@ -1 +1 @@ -import{toRefs as t,ref as e,computed as r,onMounted as n,onUnmounted as i,watch as o,openBlock as a,createElementBlock as s,mergeProps as l}from"vue";function u(t){return-1!==[null,void 0,!1].indexOf(t)}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e=0&&o<8))throw new Error(n);a[n]=o}else if("encoder"===n||"decoder"===n||"edit"===n||"undo"===n){if("function"!=typeof o)throw new Error(n);a[n]=o}else{if("string"!=typeof o)throw new Error(n);a[n]=o}return i(a,"mark","thousand"),i(a,"prefix","negative"),i(a,"prefix","negativeBefore"),a}function c(e,r,n){var i,o=[];for(i=0;i=0?0:2})}));return{tooltipsFormat:r((function(){return Array.isArray(l.value)?l.value.map((function(t){return c.value})):c.value})),tooltipsMerge:function(t,e,r){var n="rtl"===getComputedStyle(t).direction,i="rtl"===t.noUiSlider.options.direction,o="vertical"===t.noUiSlider.options.orientation,a=t.noUiSlider.getTooltips(),s=t.noUiSlider.getOrigins();a.forEach((function(t,e){t&&s[e].appendChild(t)})),t.noUiSlider.on("update",(function(t,s,l,p,f){var d=[[]],h=[[]],m=[[]],v=0;a[0]&&(d[0][0]=0,h[0][0]=f[0],m[0][0]=c.value.to(parseFloat(t[0])));for(var g=1;ge)&&(d[++v]=[],m[v]=[],h[v]=[]),a[g]&&(d[v].push(g),m[v].push(c.value.to(parseFloat(t[g]))),h[v].push(f[g]));d.forEach((function(t,e){for(var s=t.length,l=0;l0&&(h(t,e),setTimeout((function(){m(t,e)}),r))}function p(t){return Math.max(Math.min(t,100),0)}function f(t){return Array.isArray(t)?t:[t]}function d(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function h(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function m(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function g(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function y(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function x(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function w(t,e){return 100/(e-t)}function P(t,e,r){return 100*e/(t[r+1]-t[r])}function E(t,e){return P(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function N(t,e){return e*(t[1]-t[0])/100+t[0]}function C(t,e){for(var r=1;t>=e[r];)r+=1;return r}function O(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=C(r,t),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return a+E([i,o],r)/w(a,s)}function k(t,e,r){if(r>=100)return t.slice(-1)[0];var n=C(r,e),i=t[n-1],o=t[n],a=e[n-1];return N([i,o],(r-a)*w(a,e[n]))}function V(t,e,r,n){if(100===n)return n;var i=C(n,t),o=t[i-1],a=t[i];return r?n-o>(a-o)/2?a:o:e[i-1]?t[i-1]+s(n-t[i-1],e[i-1]):n}var A,j;t.PipsMode=void 0,(j=t.PipsMode||(t.PipsMode={})).Range="range",j.Steps="steps",j.Positions="positions",j.Count="count",j.Values="values",t.PipsType=void 0,(A=t.PipsType||(t.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var M=function(){function t(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([f(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),n=0;nthis.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++,null===e&&(e=[]);var o=1,a=e[i],s=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=s*n,o=(a-100*n)/e[i+c],n=1):(l=e[i+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[i+c]*o;return t+u},t.prototype.toStepping=function(t){return t=O(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return k(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=V(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=C(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){var e=C(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(d);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){var r;if(!u(r="min"===t?0:"max"===t?100:parseFloat(t))||!u(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(e[0]);var n=Number(e[1]);r?this.xSteps.push(!isNaN(n)&&n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){if(e)if(this.xVal[t]!==this.xVal[t+1]){this.xSteps[t]=P([this.xVal[t],this.xVal[t+1]],e,0)/w(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(r.toFixed(3))-1),i=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=i}else this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t]},t}(),U={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},D={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},L={tooltips:".__tooltips",aria:".__aria"};function T(t,e){if(!u(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function z(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function F(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function H(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function q(t,e){if("object"!==S(e)||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new M(e,t.snap||!1,t.singleStep)}function R(t,e){if(e=f(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function B(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function _(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function X(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function Y(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function J(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function K(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,a=e.indexOf("hover")>=0,s=e.indexOf("unconstrained")>=0,l=e.indexOf("drag-all")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");$(t,t.start[1]-t.start[0])}if(s&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,dragAll:l,fixed:i,snap:o,hover:a,unconstrained:s}}function Q(t,e){if(!1!==e)if(!0===e||r(e)){t.tooltips=[];for(var n=0;n= 2) required for mode 'count'.");for(var r=e.values-1,n=100/r,i=[];r--;)i[r]=r*n;return i.push(100),J(i,e.stepped)}return e.mode===t.PipsMode.Positions?J(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return O.fromStepping(O.getStep(O.toStepping(t)))})):e.values:[]}function J(t,e){return t.map((function(t){return O.fromStepping(e?O.getStep(t):t)}))}function K(e){function r(t,e){return Number((t+e).toFixed(7))}var n=G(e),i={},o=O.xVal[0],s=O.xVal[O.xVal.length-1],l=!1,u=!1,c=0;return(n=a(n.slice().sort((function(t,e){return t-e}))))[0]!==o&&(n.unshift(o),l=!0),n[n.length-1]!==s&&(n.push(s),u=!0),n.forEach((function(o,a){var s,p,f,d,h,m,v,g,b,y,S=o,x=n[a+1],w=e.mode===t.PipsMode.Steps;for(w&&(s=O.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(d=O.toStepping(p))-c)/(e.density||1),y=h/(b=Math.round(g)),f=1;f<=b;f+=1)i[(m=c+f*y).toFixed(5)]=[O.fromStepping(m),0];v=n.indexOf(p)>-1?t.PipsType.LargeValue:w?t.PipsType.SmallValue:t.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(i[d.toFixed(5)]=[p,v]),c=d}})),i}function Q(e,n,i){var o,a,s=U.createElement("div"),l=((o={})[t.PipsType.None]="",o[t.PipsType.NoValue]=r.cssClasses.valueNormal,o[t.PipsType.LargeValue]=r.cssClasses.valueLarge,o[t.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[t.PipsType.None]="",a[t.PipsType.NoValue]=r.cssClasses.markerNormal,a[t.PipsType.LargeValue]=r.cssClasses.markerLarge,a[t.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function f(t,e){var n=e===r.cssClasses.value,i=n?l:u;return e+" "+(n?c:p)[r.ort]+" "+i[t]}function d(e,o,a){if((a=n?n(o,a):a)!==t.PipsType.None){var l=F(s,!1);l.className=f(a,r.cssClasses.marker),l.style[r.style]=e+"%",a>t.PipsType.NoValue&&((l=F(s,!1)).className=f(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=e+"%",l.innerHTML=String(i.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(e).forEach((function(t){d(t,e[t][0],e[t][1])})),s}function Z(){w&&(n(w),w=null)}function tt(t){Z();var e=K(t),r=t.filter,n=t.format||{to:function(t){return String(Math.round(t))}};return w=C.appendChild(Q(e,r,n))}function et(){var t=u.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||u[e]:t.height||u[e]}function rt(t,e,n,i){var o=function(o){var a=nt(o,i.pageOffset,i.target||e);return!!a&&!(X()&&!i.doNotReject)&&!(v(C,r.cssClasses.tap)&&!i.doNotReject)&&!(t===E.start&&void 0!==a.buttons&&a.buttons>1)&&(!i.hover||!a.buttons)&&(N||a.preventDefault(),a.calcPoint=a.points[r.ort],void n(a,i))},a=[];return t.split(" ").forEach((function(t){e.addEventListener(t,o,!!N&&{passive:!0}),a.push([t,o])})),a}function nt(t,e,r){var n=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=0,s=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var l=function(e){var n=e.target;return n===r||r.contains(n)||t.composed&&t.composedPath().shift()===r};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return e=e||g(U),(i||o)&&(a=t.clientX+e.x,s=t.clientY+e.y),t.pageOffset=e,t.points=[a,s],t.cursor=i||o,t}function it(t){var e=100*(t-l(u,r.ort))/et();return e=p(e),r.dir?100-e:e}function ot(t){var e=100,r=!1;return d.forEach((function(n,i){if(!Y(i)){var o=V[i],a=Math.abs(o-t);(ao||100===a&&100===e)&&(r=i,e=a)}})),r}function st(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&ut(t,e)}function lt(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return ut(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);xt(n>0,100*n/e.baseSize,e.locations,e.handleNumbers,e.connect)}function ut(t,e){e.handle&&(m(e.handle,r.cssClasses.active),j-=1),e.listeners.forEach((function(t){D.removeEventListener(t[0],t[1])})),0===j&&(m(C,r.cssClasses.drag),Et(),t.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",o))),e.handleNumbers.forEach((function(t){bt("change",t),bt("set",t),bt("end",t)}))}function ct(t,e){if(!e.handleNumbers.some(Y)){var n;1===e.handleNumbers.length&&(n=d[e.handleNumbers[0]].children[0],j+=1,h(n,r.cssClasses.active)),t.stopPropagation();var i=[],a=rt(E.move,D,lt,{target:t.target,handle:n,connect:e.connect,listeners:i,startCalcPoint:t.calcPoint,baseSize:et(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:V.slice()}),s=rt(E.end,D,ut,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers}),l=rt("mouseout",D,st,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers});i.push.apply(i,a.concat(s,l)),t.cursor&&(T.style.cursor=getComputedStyle(t.target).cursor,d.length>1&&h(C,r.cssClasses.drag),T.addEventListener("selectstart",o,!1)),e.handleNumbers.forEach((function(t){bt("start",t)}))}}function pt(t){t.stopPropagation();var e=it(t.calcPoint),n=ot(e);!1!==n&&(r.events.snap||c(C,r.cssClasses.tap,r.animationDuration),Nt(n,e,!0,!0),Et(),bt("slide",n,!0),bt("update",n,!0),r.events.snap?ct(t,{handleNumbers:[n]}):(bt("change",n,!0),bt("set",n,!0)))}function ft(t){var e=it(t.calcPoint),r=O.getStep(e),n=O.fromStepping(r);Object.keys(M).forEach((function(t){"hover"===t.split(".")[0]&&M[t].forEach((function(t){t.call(zt,n)}))}))}function dt(t,e){if(X()||Y(e))return!1;var n=["Left","Right"],i=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?n.reverse():r.ort&&!r.dir&&(i.reverse(),o.reverse());var s,l=t.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===i[0]||l===n[0]||u,f=l===i[1]||l===n[1]||c,d=l===a[0],h=l===a[1];if(!(p||f||d||h))return!0;if(t.preventDefault(),f||p){var m=p?0:1,v=Ut(e)[m];if(null===v)return!1;!1===v&&(v=O.getDefaultStep(V[e],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=k[e]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Nt(e,O.toStepping(s),!0,!0),bt("slide",e),bt("update",e),bt("change",e),bt("set",e),!1}function ht(t){t.fixed||d.forEach((function(t,e){rt(E.start,t.children[0],ct,{handleNumbers:[e]})})),t.tap&&rt(E.start,u,pt,{}),t.hover&&rt(E.move,u,ft,{hover:!0}),t.drag&&S.forEach((function(e,n){if(!1!==e&&0!==n&&n!==S.length-1){var i=d[n-1],o=d[n],a=[e],s=[i,o],l=[n-1,n];h(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(o.children[0])),t.dragAll&&(s=d,l=A),a.forEach((function(t){rt(E.start,t,ct,{handles:s,handleNumbers:l,connect:e})}))}}))}function mt(t,e){M[t]=M[t]||[],M[t].push(e),"update"===t.split(".")[0]&&d.forEach((function(t,e){bt("update",e)}))}function vt(t){return t===L.aria||t===L.tooltips}function gt(t){var e=t&&t.split(".")[0],r=e?t.substring(e.length):t;Object.keys(M).forEach((function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||vt(i)&&r!==i||delete M[t]}))}function bt(t,e,n){Object.keys(M).forEach((function(i){var o=i.split(".")[0];t===o&&M[i].forEach((function(t){t.call(zt,k.map(r.format.to),e,k.slice(),n||!1,V.slice(),zt)}))}))}function yt(t,e,n,i,o,a){var s;return d.length>1&&!r.events.unconstrained&&(i&&e>0&&(s=O.getAbsoluteDistance(t[e-1],r.margin,!1),n=Math.max(n,s)),o&&e1&&r.limit&&(i&&e>0&&(s=O.getAbsoluteDistance(t[e-1],r.limit,!1),n=Math.min(n,s)),o&&e1?n.forEach((function(t,r){var n=yt(o,t,o[t]+e,s[r],l[r],!1);!1===n?e=0:(e=n-o[t],o[t]=n)})):s=l=[!0];var u=!1;n.forEach((function(t,n){u=Nt(t,r[t]+e,s[n],l[n])||u})),u&&(n.forEach((function(t){bt("update",t),bt("slide",t)})),null!=i&&bt("drag",a))}function wt(t,e){return r.dir?100-t-e:t}function Pt(t,e){V[t]=e,k[t]=O.fromStepping(e);var n="translate("+St(wt(e,0)-z+"%","0")+")";d[t].style[r.transformRule]=n,Ct(t),Ct(t+1)}function Et(){A.forEach((function(t){var e=V[t]>50?-1:1,r=3+(d.length+e*t);d[t].style.zIndex=String(r)}))}function Nt(t,e,r,n,i){return i||(e=yt(V,t,e,r,n,!1)),!1!==e&&(Pt(t,e),!0)}function Ct(t){if(S[t]){var e=0,n=100;0!==t&&(e=V[t-1]),t!==S.length-1&&(n=V[t]);var i=n-e,o="translate("+St(wt(e,i)+"%","0")+")",a="scale("+St(i/100,"1")+")";S[t].style[r.transformRule]=o+" "+a}}function Ot(t,e){return null===t||!1===t||void 0===t?V[e]:("number"==typeof t&&(t=String(t)),!1!==(t=r.format.from(t))&&(t=O.toStepping(t)),!1===t||isNaN(t)?V[e]:t)}function kt(t,e,n){var i=f(t),o=void 0===V[0];e=void 0===e||e,r.animate&&!o&&c(C,r.cssClasses.tap,r.animationDuration),A.forEach((function(t){Nt(t,Ot(i[t],t),!0,!1,n)}));var a=1===A.length?0:1;if(o&&O.hasNoSize()&&(n=!0,V[0]=0,A.length>1)){var s=100/(A.length-1);A.forEach((function(t){V[t]=t*s}))}for(;a=0&&tn.stepAfter.startValue&&(o=n.stepAfter.startValue-i),a=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(a=null);var s=O.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function Dt(){return A.map(Ut)}function Lt(t,e){var n=jt(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(e){void 0!==t[e]&&(s[e]=t[e])}));var a=at(s);o.forEach((function(e){void 0!==t[e]&&(r[e]=a[e])})),O=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?tt(r.pips):Z(),r.tooltips?$():I(),V=[],kt(i(t.start)?t.start:n,e)}function Tt(){u=B(C),R(r.connect,u),ht(r.events),kt(r.start),r.pips&&tt(r.pips),r.tooltips&&$(),W()}Tt();var zt={destroy:Mt,steps:Dt,on:mt,off:gt,get:jt,set:kt,setHandle:At,reset:Vt,__moveHandles:function(t,e,r){xt(t,e,V,r)},options:s,updateOptions:Lt,target:C,removePips:Z,removeTooltips:I,getPositions:function(){return V.slice()},getTooltips:function(){return P},getOrigins:function(){return d},pips:tt};return zt}function lt(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=st(t,at(e),e);return t.noUiSlider=r,r}var ut={__spectrum:M,cssClasses:D,create:lt};t.create=lt,t.cssClasses=D,t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})}(e)})));function w(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;var r=e.slice().sort();return t.length===e.length&&t.slice().sort().every((function(t,e){return t===r[e]}))}function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}var E={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1},modelValue:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(a,s){const l=function(r,n,i){var o=t(r),a=o.value,s=o.modelValue,l=void 0!==n.expose?s:a,c=e(l.value);if(u(l.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(l.value)&&0==l.value.length)throw new Error("Slider v-model must not be an empty array");return{value:l,initialValue:c}}(a,s),c=function(e,n,i){var o=t(e),a=o.classes,s=o.showTooltip,l=o.tooltipPosition,u=o.orientation,c=r((function(){return p({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub"},a.value)}));return{classList:r((function(){var t=p({},c.value);return Object.keys(t).forEach((function(e){t[e]=Array.isArray(t[e])?t[e].filter((function(t){return null!==t})).join(" "):t[e]})),"always"!==s.value&&(t.target+=" ".concat("drag"===s.value?t.tooltipDrag:t.tooltipFocus)),"horizontal"===u.value&&(t.tooltip+="bottom"===l.value?" ".concat(t.tooltipBottom):" ".concat(t.tooltipTop)),"vertical"===u.value&&(t.tooltip+="right"===l.value?" ".concat(t.tooltipRight):" ".concat(t.tooltipLeft)),t}))}}(a),f=y(a,0,{value:l.value,classList:c.classList}),d=function(a,s,l){var c=t(a),p=c.orientation,f=c.direction,d=c.tooltips,h=c.step,m=c.min,v=c.max,g=c.merge,b=c.id,y=c.disabled,S=c.options,E=c.classes,N=c.format,C=c.lazy,O=l.value,k=l.initialValue,V=l.tooltipsFormat,A=l.tooltipsMerge,j=l.classList,M=e(null),U=e(null),D=e(!1),L=r((function(){var t={cssPrefix:"",cssClasses:j.value,orientation:p.value,direction:f.value,tooltips:!!d.value&&V.value,connect:"lower",start:u(O.value)?m.value:O.value,range:{min:m.value,max:v.value}};return h.value>0&&(t.step=h.value),Array.isArray(O.value)&&(t.connect=!0),t})),T=r((function(){var t={id:b&&b.value?b.value:void 0};return y.value&&(t.disabled=!0),t})),z=r((function(){return Array.isArray(O.value)})),F=function(){var t=U.value.get();return Array.isArray(t)?t.map((function(t){return parseFloat(t)})):parseFloat(t)},H=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];U.value.set(t,e)},q=function(t){s.emit("input",t),s.emit("update:modelValue",t),s.emit("update",t)},R=function(){U.value=x.create(M.value,Object.assign({},L.value,S.value)),d.value&&z.value&&g.value>=0&&A(M.value,g.value," - "),U.value.on("set",(function(t){var e=F();s.emit("change",e),C.value&&q(e)})),U.value.on("update",(function(t){if(D.value){var e=F();z.value&&w(O.value,e)||!z.value&&O.value==e?s.emit("update",e):C.value||q(e)}})),M.value.querySelectorAll("[data-handle]").forEach((function(t){t.onblur=function(){j.value.focused.split(" ").forEach((function(t){M.value.classList.remove(t)}))},t.onfocus=function(){j.value.focused.split(" ").forEach((function(t){M.value.classList.add(t)}))}})),D.value=!0},B=function(){U.value.off(),U.value.destroy(),U.value=null},_=function(t,e){D.value=!1,B(),R()};return n(R),i(B),o(O,(function(t,e){e&&("object"===P(e)&&"object"===P(t)&&t&&Object.keys(e)>Object.keys(t)||"object"===P(e)&&"object"!==P(t)||!t)&&_()}),{immediate:!1}),o(z,_,{immediate:!1}),o(m,_,{immediate:!1}),o(v,_,{immediate:!1}),o(h,_,{immediate:!1}),o(p,_,{immediate:!1}),o(f,_,{immediate:!1}),o(d,_,{immediate:!1}),o(g,_,{immediate:!1}),o(N,_,{immediate:!1,deep:!0}),o(S,_,{immediate:!1,deep:!0}),o(E,_,{immediate:!1,deep:!0}),o(O,(function(t){if(u(t))H(m.value,!1);else{var e=F();z.value&&!Array.isArray(e)&&(e=[e]),(z.value&&!w(t,e)||!z.value&&t!=e)&&H(t,!1)}}),{deep:!0}),{slider:M,slider$:U,isRange:z,sliderProps:T,init:R,destroy:B,refresh:_,update:H,reset:function(){q(k.value)}}}(a,s,{value:l.value,initialValue:l.initialValue,tooltipsFormat:f.tooltipsFormat,tooltipsMerge:f.tooltipsMerge,classList:c.classList});return{...c,...f,...d}}};E.render=function(t,e,r,n,i,o){return a(),s("div",l(t.sliderProps,{ref:"slider"}),null,16)},E.__file="src/Slider.vue";export{E as default}; +import{toRefs as e,ref as t,computed as r,onMounted as i,onUnmounted as n,watch as o,openBlock as a,createElementBlock as s,mergeProps as l}from"vue";function u(e){return-1!==[null,void 0,!1].indexOf(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e){var t={exports:{}};return e(t,t.exports),t.exports}var d=p((function(e,t){e.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function r(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function n(e,t,r){if((e[t]||e[r])&&e[t]===e[r])throw new Error(t)}function o(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,r,i,n,s,l,u,c,p,d,f,h){var m,v,g,b=h,y="",S="";return l&&(h=l(h)),!!o(h)&&(!1!==e&&0===parseFloat(h.toFixed(e))&&(h=0),h<0&&(m=!0,h=Math.abs(h)),!1!==e&&(h=a(h,e)),-1!==(h=h.toString()).indexOf(".")?(g=(v=h.split("."))[0],i&&(y=i+v[1])):g=h,r&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(r)))),m&&c&&(S+=c),n&&(S+=n),m&&p&&(S+=p),S+=g,S+=y,s&&(S+=s),d&&(S=d(S,b)),S)}function l(e,t,n,a,s,l,u,c,p,d,f,h){var m,v="";return f&&(h=f(h)),!(!h||"string"!=typeof h)&&(c&&r(h,c)&&(h=h.replace(c,""),m=!0),a&&r(h,a)&&(h=h.replace(a,"")),p&&r(h,p)&&(h=h.replace(p,""),m=!0),s&&i(h,s)&&(h=h.slice(0,-1*s.length)),t&&(h=h.split(t).join("")),n&&(h=h.replace(n,".")),m&&(v+="-"),""!==(v=(v+=h).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),u&&(v=u(v)),!!o(v)&&v))}function u(t){var r,i,o,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),r=0;r=0&&o<8))throw new Error(i);a[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);a[i]=o}else{if("string"!=typeof o)throw new Error(i);a[i]=o}return n(a,"mark","thousand"),n(a,"prefix","negative"),n(a,"prefix","negativeBefore"),a}function c(t,r,i){var n,o=[];for(n=0;n0&&(h(e,t),setTimeout((function(){m(e,t)}),r))}function p(e){return Math.max(Math.min(e,100),0)}function d(e){return Array.isArray(e)?e:[e]}function f(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function h(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function m(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function g(e){var t=void 0!==window.pageXOffset,r="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function y(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}function S(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function x(e,t){return 100/(t-e)}function w(e,t,r){return 100*t/(e[r+1]-e[r])}function E(e,t){return w(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function P(e,t){return t*(e[1]-e[0])/100+e[0]}function N(e,t){for(var r=1;e>=t[r];)r+=1;return r}function C(e,t,r){if(r>=e.slice(-1)[0])return 100;var i=N(r,e),n=e[i-1],o=e[i],a=t[i-1],s=t[i];return a+E([n,o],r)/x(a,s)}function k(e,t,r){if(r>=100)return e.slice(-1)[0];var i=N(r,t),n=e[i-1],o=e[i],a=t[i-1];return P([n,o],(r-a)*x(a,t[i]))}function V(e,t,r,i){if(100===i)return i;var n=N(i,e),o=e[n-1],a=e[n];return r?i-o>(a-o)/2?a:o:t[n-1]?e[n-1]+s(i-e[n-1],t[n-1]):i}var A,M;e.PipsMode=void 0,(M=e.PipsMode||(e.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",e.PipsType=void 0,(A=e.PipsType||(e.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var U=function(){function e(e,t,r){var i;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var n=[];for(Object.keys(e).forEach((function(t){n.push([d(e[t]),t])})),n.sort((function(e,t){return e[0][0]-t[0][0]})),i=0;ithis.xPct[n+1];)n++;else e===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||e!==this.xPct[n+1]||n++,null===t&&(t=[]);var o=1,a=t[n],s=0,l=0,u=0,c=0;for(i=r?(e-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-e)/(this.xPct[n+1]-this.xPct[n]);a>0;)s=this.xPct[n+1+c]-this.xPct[n+c],t[n+c]*o+100-100*i>100?(l=s*i,o=(a-100*i)/t[n+c],i=1):(l=t[n+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=t[n+c]*o;return e+u},e.prototype.toStepping=function(e){return e=C(this.xVal,this.xPct,e)},e.prototype.fromStepping=function(e){return k(this.xVal,this.xPct,e)},e.prototype.getStep=function(e){return e=V(this.xPct,this.xSteps,this.snap,e)},e.prototype.getDefaultStep=function(e,t,r){var i=N(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(e){var t=N(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(f);return Math.max.apply(null,e)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(e){return this.getStep(this.toStepping(e))},e.prototype.handleEntryPoint=function(e,t){var r;if(!u(r="min"===e?0:"max"===e?100:parseFloat(e))||!u(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(t[0]);var i=Number(t[1]);r?this.xSteps.push(!isNaN(i)&&i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=w([this.xVal[e],this.xVal[e+1]],t,0)/x(this.xPct[e],this.xPct[e+1]);var r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],i=Math.ceil(Number(r.toFixed(3))-1),n=this.xVal[e]+this.xNumSteps[e]*i;this.xHighestCompleteStep[e]=n}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]},e}(),L={to:function(e){return void 0===e?"":e.toFixed(2)},from:Number},O={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function j(e,t){if(!u(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function T(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function z(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function F(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function H(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new U(t,e.snap||!1,e.singleStep)}function q(e,t){if(t=d(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function R(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function B(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function _(e,t){if("number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function $(e,t){var r,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function G(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,n=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,u=t.indexOf("smooth-steps")>=0;if(n){if(2!==e.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Y(e,e.start[1]-e.start[0])}if(s&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||o,drag:i,dragAll:l,smoothSteps:u,fixed:n,snap:o,hover:a,unconstrained:s}}function K(e,t){if(!1!==t)if(!0===t||r(t)){e.tooltips=[];for(var i=0;i= 2) required for mode 'count'.");for(var r=t.values-1,i=100/r,n=[];r--;)n[r]=r*i;return n.push(100),J(n,t.stepped)}return t.mode===e.PipsMode.Positions?J(t.values,t.stepped):t.mode===e.PipsMode.Values?t.stepped?t.values.map((function(e){return k.fromStepping(k.getStep(k.toStepping(e)))})):t.values:[]}function J(e,t){return e.map((function(e){return k.fromStepping(t?k.getStep(e):e)}))}function K(t){function r(e,t){return Number((e+t).toFixed(7))}var i=G(t),n={},o=k.xVal[0],s=k.xVal[k.xVal.length-1],l=!1,u=!1,c=0;return(i=a(i.slice().sort((function(e,t){return e-t}))))[0]!==o&&(i.unshift(o),l=!0),i[i.length-1]!==s&&(i.push(s),u=!0),i.forEach((function(o,a){var s,p,d,f,h,m,v,g,b,y,S=o,x=i[a+1],w=t.mode===e.PipsMode.Steps;for(w&&(s=k.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(f=k.toStepping(p))-c)/(t.density||1),y=h/(b=Math.round(g)),d=1;d<=b;d+=1)n[(m=c+d*y).toFixed(5)]=[k.fromStepping(m),0];v=i.indexOf(p)>-1?e.PipsType.LargeValue:w?e.PipsType.SmallValue:e.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(n[f.toFixed(5)]=[p,v]),c=f}})),n}function Q(t,i,n){var o,a,s=O.createElement("div"),l=((o={})[e.PipsType.None]="",o[e.PipsType.NoValue]=r.cssClasses.valueNormal,o[e.PipsType.LargeValue]=r.cssClasses.valueLarge,o[e.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[e.PipsType.None]="",a[e.PipsType.NoValue]=r.cssClasses.markerNormal,a[e.PipsType.LargeValue]=r.cssClasses.markerLarge,a[e.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function d(e,t){var i=t===r.cssClasses.value,n=i?l:u;return t+" "+(i?c:p)[r.ort]+" "+n[e]}function f(t,o,a){if((a=i?i(o,a):a)!==e.PipsType.None){var l=F(s,!1);l.className=d(a,r.cssClasses.marker),l.style[r.style]=t+"%",a>e.PipsType.NoValue&&((l=F(s,!1)).className=d(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=t+"%",l.innerHTML=String(n.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach((function(e){f(e,t[e][0],t[e][1])})),s}function Z(){w&&(i(w),w=null)}function ee(e){Z();var t=K(e),r=e.filter,i=e.format||{to:function(e){return String(Math.round(e))}};return w=C.appendChild(Q(t,r,i))}function te(){var e=u.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||u[t]:e.height||u[t]}function re(e,t,i,n){var o=function(o){var a=ie(o,n.pageOffset,n.target||t);return!!a&&!($()&&!n.doNotReject)&&!(v(C,r.cssClasses.tap)&&!n.doNotReject)&&!(e===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!n.hover||!a.buttons)&&(N||a.preventDefault(),a.calcPoint=a.points[r.ort],void i(a,n))},a=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!N&&{passive:!0}),a.push([e,o])})),a}function ie(e,t,r){var i=0===e.type.indexOf("touch"),n=0===e.type.indexOf("mouse"),o=0===e.type.indexOf("pointer"),a=0,s=0;if(0===e.type.indexOf("MSPointer")&&(o=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(i){var l=function(t){var i=t.target;return i===r||r.contains(i)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(e.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return t=t||g(O),(n||o)&&(a=e.clientX+t.x,s=e.clientY+t.y),e.pageOffset=t,e.points=[a,s],e.cursor=n||o,e}function ne(e){var t=100*(e-l(u,r.ort))/te();return t=p(t),r.dir?100-t:t}function ae(e){var t=100,r=!1;return f.forEach((function(i,n){if(!X(n)){var o=A[n],a=Math.abs(o-e);(ao||100===a&&100===t)&&(r=n,t=a)}})),r}function se(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&ue(e,t)}function le(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return ue(e,t);var i=(r.dir?-1:1)*(e.calcPoint-t.startCalcPoint);xe(i>0,100*i/t.baseSize,t.locations,t.handleNumbers,t.connect)}function ue(e,t){t.handle&&(m(t.handle,r.cssClasses.active),U-=1),t.listeners.forEach((function(e){j.removeEventListener(e[0],e[1])})),0===U&&(m(C,r.cssClasses.drag),Pe(),e.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",o))),r.events.smoothSteps&&(t.handleNumbers.forEach((function(e){Ne(e,A[e],!0,!0,!1,!1)})),t.handleNumbers.forEach((function(e){be("update",e)}))),t.handleNumbers.forEach((function(e){be("change",e),be("set",e),be("end",e)}))}function ce(e,t){if(!t.handleNumbers.some(X)){var i;1===t.handleNumbers.length&&(i=f[t.handleNumbers[0]].children[0],U+=1,h(i,r.cssClasses.active)),e.stopPropagation();var n=[],a=re(P.move,j,le,{target:e.target,handle:i,connect:t.connect,listeners:n,startCalcPoint:e.calcPoint,baseSize:te(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:A.slice()}),s=re(P.end,j,ue,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers}),l=re("mouseout",j,se,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers});n.push.apply(n,a.concat(s,l)),e.cursor&&(T.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&h(C,r.cssClasses.drag),T.addEventListener("selectstart",o,!1)),t.handleNumbers.forEach((function(e){be("start",e)}))}}function pe(e){e.stopPropagation();var t=ne(e.calcPoint),i=ae(t);!1!==i&&(r.events.snap||c(C,r.cssClasses.tap,r.animationDuration),Ne(i,t,!0,!0),Pe(),be("slide",i,!0),be("update",i,!0),r.events.snap?ce(e,{handleNumbers:[i]}):(be("change",i,!0),be("set",i,!0)))}function de(e){var t=ne(e.calcPoint),r=k.getStep(t),i=k.fromStepping(r);Object.keys(L).forEach((function(e){"hover"===e.split(".")[0]&&L[e].forEach((function(e){e.call(ze,i)}))}))}function fe(e,t){if($()||X(t))return!1;var i=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?i.reverse():r.ort&&!r.dir&&(n.reverse(),o.reverse());var s,l=e.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===n[0]||l===i[0]||u,d=l===n[1]||l===i[1]||c,f=l===a[0],h=l===a[1];if(!(p||d||f||h))return!0;if(e.preventDefault(),d||p){var m=p?0:1,v=Oe(t)[m];if(null===v)return!1;!1===v&&(v=k.getDefaultStep(A[t],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=V[t]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ne(t,k.toStepping(s),!0,!0),be("slide",t),be("update",t),be("change",t),be("set",t),!1}function he(e){e.fixed||f.forEach((function(e,t){re(P.start,e.children[0],ce,{handleNumbers:[t]})})),e.tap&&re(P.start,u,pe,{}),e.hover&&re(P.move,u,de,{hover:!0}),e.drag&&x.forEach((function(t,i){if(!1!==t&&0!==i&&i!==x.length-1){var n=f[i-1],o=f[i],a=[t],s=[n,o],l=[i-1,i];h(t,r.cssClasses.draggable),e.fixed&&(a.push(n.children[0]),a.push(o.children[0])),e.dragAll&&(s=f,l=M),a.forEach((function(e){re(P.start,e,ce,{handles:s,handleNumbers:l,connect:t})}))}}))}function me(e,t){L[e]=L[e]||[],L[e].push(t),"update"===e.split(".")[0]&&f.forEach((function(e,t){be("update",t)}))}function ve(e){return e===D.aria||e===D.tooltips}function ge(e){var t=e&&e.split(".")[0],r=t?e.substring(t.length):e;Object.keys(L).forEach((function(e){var i=e.split(".")[0],n=e.substring(i.length);t&&t!==i||r&&r!==n||ve(n)&&r!==n||delete L[e]}))}function be(e,t,i){Object.keys(L).forEach((function(n){var o=n.split(".")[0];e===o&&L[n].forEach((function(e){e.call(ze,V.map(r.format.to),t,V.slice(),i||!1,A.slice(),ze)}))}))}function ye(e,t,i,n,o,a,s){var l;return f.length>1&&!r.events.unconstrained&&(n&&t>0&&(l=k.getAbsoluteDistance(e[t-1],r.margin,!1),i=Math.max(i,l)),o&&t1&&r.limit&&(n&&t>0&&(l=k.getAbsoluteDistance(e[t-1],r.limit,!1),i=Math.min(i,l)),o&&t1?n.forEach((function(e,r){var i=ye(a,e,a[e]+t,u[r],c[r],!1,l);!1===i?t=0:(t=i-a[e],a[e]=i)})):u=c=[!0];var p=!1;n.forEach((function(e,r){p=Ne(e,i[e]+t,u[r],c[r],!1,l)||p})),p&&(n.forEach((function(e){be("update",e),be("slide",e)})),null!=o&&be("drag",s))}function we(e,t){return r.dir?100-e-t:e}function Ee(e,t){A[e]=t,V[e]=k.fromStepping(t);var i="translate("+Se(we(t,0)-z+"%","0")+")";f[e].style[r.transformRule]=i,Ce(e),Ce(e+1)}function Pe(){M.forEach((function(e){var t=A[e]>50?-1:1,r=3+(f.length+t*e);f[e].style.zIndex=String(r)}))}function Ne(e,t,r,i,n,o){return n||(t=ye(A,e,t,r,i,!1,o)),!1!==t&&(Ee(e,t),!0)}function Ce(e){if(x[e]){var t=0,i=100;0!==e&&(t=A[e-1]),e!==x.length-1&&(i=A[e]);var n=i-t,o="translate("+Se(we(t,n)+"%","0")+")",a="scale("+Se(n/100,"1")+")";x[e].style[r.transformRule]=o+" "+a}}function ke(e,t){return null===e||!1===e||void 0===e?A[t]:("number"==typeof e&&(e=String(e)),!1!==(e=r.format.from(e))&&(e=k.toStepping(e)),!1===e||isNaN(e)?A[t]:e)}function Ve(e,t,i){var n=d(e),o=void 0===A[0];t=void 0===t||t,r.animate&&!o&&c(C,r.cssClasses.tap,r.animationDuration),M.forEach((function(e){Ne(e,ke(n[e],e),!0,!1,i)}));var a=1===M.length?0:1;if(o&&k.hasNoSize()&&(i=!0,A[0]=0,M.length>1)){var s=100/(M.length-1);M.forEach((function(e){A[e]=e*s}))}for(;a=0&&ei.stepAfter.startValue&&(o=i.stepAfter.startValue-n),a=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?o=null:0===t&&(a=null);var s=k.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function De(){return M.map(Oe)}function je(e,t){var i=Ue(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(t){void 0!==e[t]&&(s[t]=e[t])}));var a=oe(s);o.forEach((function(t){void 0!==e[t]&&(r[t]=a[t])})),k=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?ee(r.pips):Z(),r.tooltips?I():Y(),A=[],Ve(n(e.start)?e.start:i,t)}function Te(){u=B(C),R(r.connect,u),he(r.events),Ve(r.start),r.pips&&ee(r.pips),r.tooltips&&I(),W()}Te();var ze={destroy:Le,steps:De,on:me,off:ge,get:Ue,set:Ve,setHandle:Me,reset:Ae,__moveHandles:function(e,t,r){xe(e,t,A,r)},options:s,updateOptions:je,target:C,removePips:Z,removeTooltips:Y,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return f},pips:ee};return ze}function se(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=ae(e,oe(t),t);return e.noUiSlider=r,r}var le={__spectrum:U,cssClasses:O,create:se};e.create=se,e.cssClasses=O,e.default=le,Object.defineProperty(e,"__esModule",{value:!0})}(t)})));function h(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===r[t]}))}var m={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1},modelValue:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(a,s){const l=function(r,i,n){const{value:o,modelValue:a}=e(r),s=a&&void 0!==a.value?a:o,l=t(s.value);if(u(s.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(s.value)&&0==s.value.length)throw new Error("Slider v-model must not be an empty array");return{value:s,initialValue:l}}(a),c=function(t,i,n){const{classes:o,showTooltip:a,tooltipPosition:s,orientation:l}=e(t),u=r((()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...o.value})));return{classList:r((()=>{const e={...u.value};return Object.keys(e).forEach((t=>{e[t]=Array.isArray(e[t])?e[t].filter((e=>null!==e)).join(" "):e[t]})),"always"!==a.value&&(e.target+=` ${"drag"===a.value?e.tooltipDrag:e.tooltipFocus}`),"horizontal"===l.value&&(e.tooltip+="bottom"===s.value?` ${e.tooltipBottom}`:` ${e.tooltipTop}`),"vertical"===l.value&&(e.tooltip+="right"===s.value?` ${e.tooltipRight}`:` ${e.tooltipLeft}`),e}))}}(a),p=function(t,i,n){const{format:o,step:a}=e(t),s=n.value,l=n.classList,u=r((()=>o&&o.value?"function"==typeof o.value?{to:o.value}:d({...o.value}):d({decimals:a.value>=0?0:2})));return{tooltipsFormat:r((()=>Array.isArray(s.value)?s.value.map((e=>u.value)):u.value)),tooltipsMerge:(e,t,r)=>{var i="rtl"===getComputedStyle(e).direction,n="rtl"===e.noUiSlider.options.direction,o="vertical"===e.noUiSlider.options.orientation,a=e.noUiSlider.getTooltips(),s=e.noUiSlider.getOrigins();a.forEach((function(e,t){e&&s[t].appendChild(e)})),e.noUiSlider.on("update",(function(e,s,c,p,d){var f=[[]],h=[[]],m=[[]],v=0;a[0]&&(f[0][0]=0,h[0][0]=d[0],m[0][0]=u.value.to(parseFloat(e[0])));for(var g=1;gt)&&(f[++v]=[],m[v]=[],h[v]=[]),a[g]&&(f[v].push(g),m[v].push(u.value.to(parseFloat(e[g]))),h[v].push(d[g]));f.forEach((function(e,t){for(var s=e.length,u=0;u{a[c].classList.contains(e)&&a[c].classList.remove(e)}))}else a[c].style.display="none",l.value.tooltipHidden.split(" ").forEach((e=>{a[c].classList.add(e)}))}}))}))}}}(a,0,{value:l.value,classList:c.classList}),m=function(a,s,l){const{orientation:c,direction:p,tooltips:d,step:m,min:v,max:g,merge:b,id:y,disabled:S,options:x,classes:w,format:E,lazy:P}=e(a),N=l.value,C=l.initialValue,k=l.tooltipsFormat,V=l.tooltipsMerge,A=l.classList,M=t(null),U=t(null),L=t(!1),O=r((()=>{let e={cssPrefix:"",cssClasses:A.value,orientation:c.value,direction:p.value,tooltips:!!d.value&&k.value,connect:"lower",start:u(N.value)?v.value:N.value,range:{min:v.value,max:g.value}};return m.value>0&&(e.step=m.value),Array.isArray(N.value)&&(e.connect=!0),e})),D=r((()=>{let e={id:y&&y.value?y.value:void 0};return S.value&&(e.disabled=!0),e})),j=r((()=>Array.isArray(N.value))),T=()=>{let e=U.value.get();return Array.isArray(e)?e.map((e=>parseFloat(e))):parseFloat(e)},z=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];U.value.set(e,t)},F=e=>{s.emit("input",e),s.emit("update:modelValue",e),s.emit("update",e)},H=()=>{U.value=f.create(M.value,Object.assign({},O.value,x.value)),d.value&&j.value&&b.value>=0&&V(M.value,b.value," - "),U.value.on("set",(e=>{const t=T();s.emit("change",t),P.value&&F(t)})),U.value.on("update",(e=>{if(!L.value)return;const t=T();j.value&&h(N.value,t)||!j.value&&N.value==t?s.emit("update",t):P.value||F(t)})),M.value.querySelectorAll("[data-handle]").forEach((e=>{e.onblur=()=>{A.value.focused.split(" ").forEach((e=>{M.value.classList.remove(e)}))},e.onfocus=()=>{A.value.focused.split(" ").forEach((e=>{M.value.classList.add(e)}))}})),L.value=!0},q=()=>{U.value.off(),U.value.destroy(),U.value=null},R=(e,t)=>{L.value=!1,q(),H()};return i(H),n(q),o(N,((e,t)=>{t&&("object"==typeof t&&"object"==typeof e&&e&&Object.keys(t)>Object.keys(e)||"object"==typeof t&&"object"!=typeof e||!e)&&R()}),{immediate:!1}),o(j,R,{immediate:!1}),o(v,R,{immediate:!1}),o(g,R,{immediate:!1}),o(m,R,{immediate:!1}),o(c,R,{immediate:!1}),o(p,R,{immediate:!1}),o(d,R,{immediate:!1}),o(b,R,{immediate:!1}),o(E,R,{immediate:!1,deep:!0}),o(x,R,{immediate:!1,deep:!0}),o(w,R,{immediate:!1,deep:!0}),o(N,(e=>{if(u(e))return void z(v.value,!1);let t=T();j.value&&!Array.isArray(t)&&(t=[t]),(j.value&&!h(e,t)||!j.value&&e!=t)&&z(e,!1)}),{deep:!0}),{slider:M,slider$:U,isRange:j,sliderProps:D,init:H,destroy:q,refresh:R,update:z,reset:()=>{F(C.value)}}}(a,s,{value:l.value,initialValue:l.initialValue,tooltipsFormat:p.tooltipsFormat,tooltipsMerge:p.tooltipsMerge,classList:c.classList});return{...c,...p,...m}}};m.render=function(e,t,r,i,n,o){return a(),s("div",l(e.sliderProps,{ref:"slider"}),null,16)},m.__file="src/Slider.vue";export{m as default}; diff --git a/dist/slider.vue2.global.js b/dist/slider.vue2.global.js index 3ca8f1c..8d2110e 100644 --- a/dist/slider.vue2.global.js +++ b/dist/slider.vue2.global.js @@ -1 +1 @@ -var VueformSlider=function(t){"use strict";function e(t){return-1!==[null,void 0,!1].indexOf(t)}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function n(t){for(var e=1;e=0&&i<8))throw new Error(n);a[n]=i}else if("encoder"===n||"decoder"===n||"edit"===n||"undo"===n){if("function"!=typeof i)throw new Error(n);a[n]=i}else{if("string"!=typeof i)throw new Error(n);a[n]=i}return o(a,"mark","thousand"),o(a,"prefix","negative"),o(a,"prefix","negativeBefore"),a}function p(e,r,n){var i,o=[];for(i=0;i0&&(m(t,e),setTimeout((function(){v(t,e)}),r))}function f(t){return Math.max(Math.min(t,100),0)}function d(t){return Array.isArray(t)?t:[t]}function h(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function m(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function v(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function g(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function b(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function y(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function S(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function x(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function w(t,e){return 100/(e-t)}function E(t,e,r){return 100*e/(t[r+1]-t[r])}function P(t,e){return E(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function C(t,e){return e*(t[1]-t[0])/100+t[0]}function N(t,e){for(var r=1;t>=e[r];)r+=1;return r}function V(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=N(r,t),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return a+P([i,o],r)/w(a,s)}function k(t,e,r){if(r>=100)return t.slice(-1)[0];var n=N(r,e),i=t[n-1],o=t[n],a=e[n-1];return C([i,o],(r-a)*w(a,e[n]))}function A(t,e,r,n){if(100===n)return n;var i=N(n,t),o=t[i-1],a=t[i];return r?n-o>(a-o)/2?a:o:e[i-1]?t[i-1]+l(n-t[i-1],e[i-1]):n}var O,M;t.PipsMode=void 0,(M=t.PipsMode||(t.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",t.PipsType=void 0,(O=t.PipsType||(t.PipsType={}))[O.None=-1]="None",O[O.NoValue=0]="NoValue",O[O.LargeValue=1]="LargeValue",O[O.SmallValue=2]="SmallValue";var U=function(){function t(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([d(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),n=0;nthis.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++,null===e&&(e=[]);var o=1,a=e[i],s=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=s*n,o=(a-100*n)/e[i+c],n=1):(l=e[i+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[i+c]*o;return t+u},t.prototype.toStepping=function(t){return t=V(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return k(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=A(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=N(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){var e=N(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(h);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){var r;if(!c(r="min"===t?0:"max"===t?100:parseFloat(t))||!c(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(e[0]);var n=Number(e[1]);r?this.xSteps.push(!isNaN(n)&&n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){if(e)if(this.xVal[t]!==this.xVal[t+1]){this.xSteps[t]=E([this.xVal[t],this.xVal[t+1]],e,0)/w(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(r.toFixed(3))-1),i=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=i}else this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t]},t}(),j={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},L={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function T(t,e){if(!c(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function F(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function z(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function _(t,e){if(!c(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function R(t,e){if("object"!==i(e)||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new U(e,t.snap||!1,t.singleStep)}function H(t,e){if(e=d(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function q(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function B(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function $(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function X(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function J(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function K(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,a=e.indexOf("hover")>=0,s=e.indexOf("unconstrained")>=0,l=e.indexOf("drag-all")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Y(t,t.start[1]-t.start[0])}if(s&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,dragAll:l,fixed:i,snap:o,hover:a,unconstrained:s}}function Q(t,e){if(!1!==e)if(!0===e||r(e)){t.tooltips=[];for(var n=0;n= 2) required for mode 'count'.");for(var r=e.values-1,n=100/r,i=[];r--;)i[r]=r*n;return i.push(100),J(i,e.stepped)}return e.mode===t.PipsMode.Positions?J(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return V.fromStepping(V.getStep(V.toStepping(t)))})):e.values:[]}function J(t,e){return t.map((function(t){return V.fromStepping(e?V.getStep(t):t)}))}function K(e){function r(t,e){return Number((t+e).toFixed(7))}var n=G(e),i={},o=V.xVal[0],a=V.xVal[V.xVal.length-1],l=!1,u=!1,c=0;return(n=s(n.slice().sort((function(t,e){return t-e}))))[0]!==o&&(n.unshift(o),l=!0),n[n.length-1]!==a&&(n.push(a),u=!0),n.forEach((function(o,a){var s,p,f,d,h,m,v,g,b,y,S=o,x=n[a+1],w=e.mode===t.PipsMode.Steps;for(w&&(s=V.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(d=V.toStepping(p))-c)/(e.density||1),y=h/(b=Math.round(g)),f=1;f<=b;f+=1)i[(m=c+f*y).toFixed(5)]=[V.fromStepping(m),0];v=n.indexOf(p)>-1?t.PipsType.LargeValue:w?t.PipsType.SmallValue:t.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(i[d.toFixed(5)]=[p,v]),c=d}})),i}function Q(e,n,i){var o,a,s=j.createElement("div"),l=((o={})[t.PipsType.None]="",o[t.PipsType.NoValue]=r.cssClasses.valueNormal,o[t.PipsType.LargeValue]=r.cssClasses.valueLarge,o[t.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[t.PipsType.None]="",a[t.PipsType.NoValue]=r.cssClasses.markerNormal,a[t.PipsType.LargeValue]=r.cssClasses.markerLarge,a[t.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function f(t,e){var n=e===r.cssClasses.value,i=n?l:u;return e+" "+(n?c:p)[r.ort]+" "+i[t]}function d(e,o,a){if((a=n?n(o,a):a)!==t.PipsType.None){var l=z(s,!1);l.className=f(a,r.cssClasses.marker),l.style[r.style]=e+"%",a>t.PipsType.NoValue&&((l=z(s,!1)).className=f(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=e+"%",l.innerHTML=String(i.to(o)))}}return m(s,r.cssClasses.pips),m(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(e).forEach((function(t){d(t,e[t][0],e[t][1])})),s}function Z(){w&&(n(w),w=null)}function tt(t){Z();var e=K(t),r=t.filter,n=t.format||{to:function(t){return String(Math.round(t))}};return w=N.appendChild(Q(e,r,n))}function et(){var t=l.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||l[e]:t.height||l[e]}function rt(t,e,n,i){var o=function(o){var a=nt(o,i.pageOffset,i.target||e);return!!a&&!($()&&!i.doNotReject)&&!(g(N,r.cssClasses.tap)&&!i.doNotReject)&&!(t===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!i.hover||!a.buttons)&&(C||a.preventDefault(),a.calcPoint=a.points[r.ort],void n(a,i))},a=[];return t.split(" ").forEach((function(t){e.addEventListener(t,o,!!C&&{passive:!0}),a.push([t,o])})),a}function nt(t,e,r){var n=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=0,s=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var l=function(e){var n=e.target;return n===r||r.contains(n)||t.composed&&t.composedPath().shift()===r};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return e=e||b(j),(i||o)&&(a=t.clientX+e.x,s=t.clientY+e.y),t.pageOffset=e,t.points=[a,s],t.cursor=i||o,t}function it(t){var e=100*(t-u(l,r.ort))/et();return e=f(e),r.dir?100-e:e}function ot(t){var e=100,r=!1;return c.forEach((function(n,i){if(!X(i)){var o=A[i],a=Math.abs(o-t);(ao||100===a&&100===e)&&(r=i,e=a)}})),r}function st(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&ut(t,e)}function lt(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return ut(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);xt(n>0,100*n/e.baseSize,e.locations,e.handleNumbers,e.connect)}function ut(t,e){e.handle&&(v(e.handle,r.cssClasses.active),M-=1),e.listeners.forEach((function(t){L.removeEventListener(t[0],t[1])})),0===M&&(v(N,r.cssClasses.drag),Pt(),t.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",a))),e.handleNumbers.forEach((function(t){bt("change",t),bt("set",t),bt("end",t)}))}function ct(t,e){if(!e.handleNumbers.some(X)){var n;1===e.handleNumbers.length&&(n=c[e.handleNumbers[0]].children[0],M+=1,m(n,r.cssClasses.active)),t.stopPropagation();var i=[],o=rt(P.move,L,lt,{target:t.target,handle:n,connect:e.connect,listeners:i,startCalcPoint:t.calcPoint,baseSize:et(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:A.slice()}),s=rt(P.end,L,ut,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers}),l=rt("mouseout",L,st,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers});i.push.apply(i,o.concat(s,l)),t.cursor&&(T.style.cursor=getComputedStyle(t.target).cursor,c.length>1&&m(N,r.cssClasses.drag),T.addEventListener("selectstart",a,!1)),e.handleNumbers.forEach((function(t){bt("start",t)}))}}function pt(t){t.stopPropagation();var e=it(t.calcPoint),n=ot(e);!1!==n&&(r.events.snap||p(N,r.cssClasses.tap,r.animationDuration),Ct(n,e,!0,!0),Pt(),bt("slide",n,!0),bt("update",n,!0),r.events.snap?ct(t,{handleNumbers:[n]}):(bt("change",n,!0),bt("set",n,!0)))}function ft(t){var e=it(t.calcPoint),r=V.getStep(e),n=V.fromStepping(r);Object.keys(U).forEach((function(t){"hover"===t.split(".")[0]&&U[t].forEach((function(t){t.call(Ft,n)}))}))}function dt(t,e){if($()||X(e))return!1;var n=["Left","Right"],i=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?n.reverse():r.ort&&!r.dir&&(i.reverse(),o.reverse());var s,l=t.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===i[0]||l===n[0]||u,f=l===i[1]||l===n[1]||c,d=l===a[0],h=l===a[1];if(!(p||f||d||h))return!0;if(t.preventDefault(),f||p){var m=p?0:1,v=jt(e)[m];if(null===v)return!1;!1===v&&(v=V.getDefaultStep(A[e],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=k[e]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ct(e,V.toStepping(s),!0,!0),bt("slide",e),bt("update",e),bt("change",e),bt("set",e),!1}function ht(t){t.fixed||c.forEach((function(t,e){rt(P.start,t.children[0],ct,{handleNumbers:[e]})})),t.tap&&rt(P.start,l,pt,{}),t.hover&&rt(P.move,l,ft,{hover:!0}),t.drag&&h.forEach((function(e,n){if(!1!==e&&0!==n&&n!==h.length-1){var i=c[n-1],o=c[n],a=[e],s=[i,o],l=[n-1,n];m(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(o.children[0])),t.dragAll&&(s=c,l=O),a.forEach((function(t){rt(P.start,t,ct,{handles:s,handleNumbers:l,connect:e})}))}}))}function mt(t,e){U[t]=U[t]||[],U[t].push(e),"update"===t.split(".")[0]&&c.forEach((function(t,e){bt("update",e)}))}function vt(t){return t===D.aria||t===D.tooltips}function gt(t){var e=t&&t.split(".")[0],r=e?t.substring(e.length):t;Object.keys(U).forEach((function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||vt(i)&&r!==i||delete U[t]}))}function bt(t,e,n){Object.keys(U).forEach((function(i){var o=i.split(".")[0];t===o&&U[i].forEach((function(t){t.call(Ft,k.map(r.format.to),e,k.slice(),n||!1,A.slice(),Ft)}))}))}function yt(t,e,n,i,o,a){var s;return c.length>1&&!r.events.unconstrained&&(i&&e>0&&(s=V.getAbsoluteDistance(t[e-1],r.margin,!1),n=Math.max(n,s)),o&&e1&&r.limit&&(i&&e>0&&(s=V.getAbsoluteDistance(t[e-1],r.limit,!1),n=Math.min(n,s)),o&&e1?n.forEach((function(t,r){var n=yt(o,t,o[t]+e,s[r],l[r],!1);!1===n?e=0:(e=n-o[t],o[t]=n)})):s=l=[!0];var u=!1;n.forEach((function(t,n){u=Ct(t,r[t]+e,s[n],l[n])||u})),u&&(n.forEach((function(t){bt("update",t),bt("slide",t)})),null!=i&&bt("drag",a))}function wt(t,e){return r.dir?100-t-e:t}function Et(t,e){A[t]=e,k[t]=V.fromStepping(e);var n="translate("+St(wt(e,0)-F+"%","0")+")";c[t].style[r.transformRule]=n,Nt(t),Nt(t+1)}function Pt(){O.forEach((function(t){var e=A[t]>50?-1:1,r=3+(c.length+e*t);c[t].style.zIndex=String(r)}))}function Ct(t,e,r,n,i){return i||(e=yt(A,t,e,r,n,!1)),!1!==e&&(Et(t,e),!0)}function Nt(t){if(h[t]){var e=0,n=100;0!==t&&(e=A[t-1]),t!==h.length-1&&(n=A[t]);var i=n-e,o="translate("+St(wt(e,i)+"%","0")+")",a="scale("+St(i/100,"1")+")";h[t].style[r.transformRule]=o+" "+a}}function Vt(t,e){return null===t||!1===t||void 0===t?A[e]:("number"==typeof t&&(t=String(t)),!1!==(t=r.format.from(t))&&(t=V.toStepping(t)),!1===t||isNaN(t)?A[e]:t)}function kt(t,e,n){var i=d(t),o=void 0===A[0];e=void 0===e||e,r.animate&&!o&&p(N,r.cssClasses.tap,r.animationDuration),O.forEach((function(t){Ct(t,Vt(i[t],t),!0,!1,n)}));var a=1===O.length?0:1;if(o&&V.hasNoSize()&&(n=!0,A[0]=0,O.length>1)){var s=100/(O.length-1);O.forEach((function(t){A[t]=t*s}))}for(;a=0&&tn.stepAfter.startValue&&(o=n.stepAfter.startValue-i),a=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(a=null);var s=V.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function Lt(){return O.map(jt)}function Dt(t,e){var n=Mt(),a=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];a.forEach((function(e){void 0!==t[e]&&(i[e]=t[e])}));var s=at(i);a.forEach((function(e){void 0!==t[e]&&(r[e]=s[e])})),V=s.spectrum,r.margin=s.margin,r.limit=s.limit,r.padding=s.padding,r.pips?tt(r.pips):Z(),r.tooltips?Y():I(),A=[],kt(o(t.start)?t.start:n,e)}function Tt(){l=q(N),H(r.connect,l),ht(r.events),kt(r.start),r.pips&&tt(r.pips),r.tooltips&&Y(),W()}Tt();var Ft={destroy:Ut,steps:Lt,on:mt,off:gt,get:Mt,set:kt,setHandle:Ot,reset:At,__moveHandles:function(t,e,r){xt(t,e,A,r)},options:i,updateOptions:Dt,target:N,removePips:Z,removeTooltips:I,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return c},pips:tt};return Ft}function lt(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=st(t,at(e),e);return t.noUiSlider=r,r}var ut={__spectrum:U,cssClasses:L,create:lt};t.create=lt,t.cssClasses=L,t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})}(e)})));function c(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;var r=e.slice().sort();return t.length===e.length&&t.slice().sort().every((function(t,e){return t===r[e]}))}var p={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1},modelValue:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(r,o){const a=function(r,n,i){var o=t.toRefs(r),a=o.value,s=o.modelValue,l=void 0!==n.expose?s:a,u=t.ref(l.value);if(e(l.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(l.value)&&0==l.value.length)throw new Error("Slider v-model must not be an empty array");return{value:l,initialValue:u}}(r,o),s=function(e,r,i){var o=t.toRefs(e),a=o.classes,s=o.showTooltip,l=o.tooltipPosition,u=o.orientation,c=t.computed((function(){return n({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub"},a.value)}));return{classList:t.computed((function(){var t=n({},c.value);return Object.keys(t).forEach((function(e){t[e]=Array.isArray(t[e])?t[e].filter((function(t){return null!==t})).join(" "):t[e]})),"always"!==s.value&&(t.target+=" ".concat("drag"===s.value?t.tooltipDrag:t.tooltipFocus)),"horizontal"===u.value&&(t.tooltip+="bottom"===l.value?" ".concat(t.tooltipBottom):" ".concat(t.tooltipTop)),"vertical"===u.value&&(t.tooltip+="right"===l.value?" ".concat(t.tooltipRight):" ".concat(t.tooltipLeft)),t}))}}(r),p=function(e,r,i){var o=t.toRefs(e),a=o.format,s=o.step,u=i.value,c=i.classList,p=t.computed((function(){return a&&a.value?"function"==typeof a.value?{to:a.value}:l(n({},a.value)):l({decimals:s.value>=0?0:2})}));return{tooltipsFormat:t.computed((function(){return Array.isArray(u.value)?u.value.map((function(t){return p.value})):p.value})),tooltipsMerge:function(t,e,r){var n="rtl"===getComputedStyle(t).direction,i="rtl"===t.noUiSlider.options.direction,o="vertical"===t.noUiSlider.options.orientation,a=t.noUiSlider.getTooltips(),s=t.noUiSlider.getOrigins();a.forEach((function(t,e){t&&s[e].appendChild(t)})),t.noUiSlider.on("update",(function(t,s,l,u,f){var d=[[]],h=[[]],m=[[]],v=0;a[0]&&(d[0][0]=0,h[0][0]=f[0],m[0][0]=p.value.to(parseFloat(t[0])));for(var g=1;ge)&&(d[++v]=[],m[v]=[],h[v]=[]),a[g]&&(d[v].push(g),m[v].push(p.value.to(parseFloat(t[g]))),h[v].push(f[g]));d.forEach((function(t,e){for(var s=t.length,l=0;l0&&(t.step=f.value),Array.isArray(w.value)&&(t.connect=!0),t})),M=t.computed((function(){var t={id:v&&v.value?v.value:void 0};return g.value&&(t.disabled=!0),t})),U=t.computed((function(){return Array.isArray(w.value)})),j=function(){var t=k.value.get();return Array.isArray(t)?t.map((function(t){return parseFloat(t)})):parseFloat(t)},L=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];k.value.set(t,e)},D=function(t){n.emit("input",t),n.emit("update:modelValue",t),n.emit("update",t)},T=function(){k.value=u.create(V.value,Object.assign({},O.value,b.value)),p.value&&U.value&&m.value>=0&&C(V.value,m.value," - "),k.value.on("set",(function(t){var e=j();n.emit("change",e),x.value&&D(e)})),k.value.on("update",(function(t){if(A.value){var e=j();U.value&&c(w.value,e)||!U.value&&w.value==e?n.emit("update",e):x.value||D(e)}})),V.value.querySelectorAll("[data-handle]").forEach((function(t){t.onblur=function(){N.value.focused.split(" ").forEach((function(t){V.value.classList.remove(t)}))},t.onfocus=function(){N.value.focused.split(" ").forEach((function(t){V.value.classList.add(t)}))}})),A.value=!0},F=function(){k.value.off(),k.value.destroy(),k.value=null},z=function(t,e){A.value=!1,F(),T()};return t.onMounted(T),t.onUnmounted(F),t.watch(w,(function(t,e){e&&("object"===i(e)&&"object"===i(t)&&t&&Object.keys(e)>Object.keys(t)||"object"===i(e)&&"object"!==i(t)||!t)&&z()}),{immediate:!1}),t.watch(U,z,{immediate:!1}),t.watch(d,z,{immediate:!1}),t.watch(h,z,{immediate:!1}),t.watch(f,z,{immediate:!1}),t.watch(s,z,{immediate:!1}),t.watch(l,z,{immediate:!1}),t.watch(p,z,{immediate:!1}),t.watch(m,z,{immediate:!1}),t.watch(S,z,{immediate:!1,deep:!0}),t.watch(b,z,{immediate:!1,deep:!0}),t.watch(y,z,{immediate:!1,deep:!0}),t.watch(w,(function(t){if(e(t))L(d.value,!1);else{var r=j();U.value&&!Array.isArray(r)&&(r=[r]),(U.value&&!c(t,r)||!U.value&&t!=r)&&L(t,!1)}}),{deep:!0}),{slider:V,slider$:k,isRange:U,sliderProps:M,init:T,destroy:F,refresh:z,update:L,reset:function(){D(E.value)}}}(r,o,{value:a.value,initialValue:a.initialValue,tooltipsFormat:p.tooltipsFormat,tooltipsMerge:p.tooltipsMerge,classList:s.classList});return{...s,...p,...f}}};function f(t,e,r,n,i,o,a,s,l,u){"boolean"!=typeof a&&(l=s,s=a,a=!1);var c,p="function"==typeof r?r.options:r;if(t&&t.render&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0,i&&(p.functional=!0)),n&&(p._scopeId=n),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},p._ssrRegister=c):e&&(c=a?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),c)if(p.functional){var f=p.render;p.render=function(t,e){return c.call(e),f(t,e)}}else{var d=p.beforeCreate;p.beforeCreate=d?[].concat(d,c):[c]}return r}const d=p;var h=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",t._b({ref:"slider"},"div",t.sliderProps,!1))};h._withStripped=!0;return f({render:h,staticRenderFns:[]},undefined,d,undefined,false,undefined,!1,void 0,void 0,void 0)}(VueCompositionAPI); +var VueformSlider=function(e){"use strict";function t(e){return-1!==[null,void 0,!1].indexOf(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var n=i((function(e,t){e.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function r(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function n(e,t,r){if((e[t]||e[r])&&e[t]===e[r])throw new Error(t)}function o(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,r,i,n,s,l,u,c,p,d,f,h){var m,v,g,b=h,y="",S="";return l&&(h=l(h)),!!o(h)&&(!1!==e&&0===parseFloat(h.toFixed(e))&&(h=0),h<0&&(m=!0,h=Math.abs(h)),!1!==e&&(h=a(h,e)),-1!==(h=h.toString()).indexOf(".")?(g=(v=h.split("."))[0],i&&(y=i+v[1])):g=h,r&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(r)))),m&&c&&(S+=c),n&&(S+=n),m&&p&&(S+=p),S+=g,S+=y,s&&(S+=s),d&&(S=d(S,b)),S)}function l(e,t,n,a,s,l,u,c,p,d,f,h){var m,v="";return f&&(h=f(h)),!(!h||"string"!=typeof h)&&(c&&r(h,c)&&(h=h.replace(c,""),m=!0),a&&r(h,a)&&(h=h.replace(a,"")),p&&r(h,p)&&(h=h.replace(p,""),m=!0),s&&i(h,s)&&(h=h.slice(0,-1*s.length)),t&&(h=h.split(t).join("")),n&&(h=h.replace(n,".")),m&&(v+="-"),""!==(v=(v+=h).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),u&&(v=u(v)),!!o(v)&&v))}function u(t){var r,i,o,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),r=0;r=0&&o<8))throw new Error(i);a[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);a[i]=o}else{if("string"!=typeof o)throw new Error(i);a[i]=o}return n(a,"mark","thousand"),n(a,"prefix","negative"),n(a,"prefix","negativeBefore"),a}function c(t,r,i){var n,o=[];for(n=0;n0&&(h(e,t),setTimeout((function(){m(e,t)}),r))}function p(e){return Math.max(Math.min(e,100),0)}function d(e){return Array.isArray(e)?e:[e]}function f(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function h(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function m(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function g(e){var t=void 0!==window.pageXOffset,r="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function y(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}function S(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function x(e,t){return 100/(t-e)}function w(e,t,r){return 100*t/(e[r+1]-e[r])}function E(e,t){return w(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function P(e,t){return t*(e[1]-e[0])/100+e[0]}function C(e,t){for(var r=1;e>=t[r];)r+=1;return r}function N(e,t,r){if(r>=e.slice(-1)[0])return 100;var i=C(r,e),n=e[i-1],o=e[i],a=t[i-1],s=t[i];return a+E([n,o],r)/x(a,s)}function V(e,t,r){if(r>=100)return e.slice(-1)[0];var i=C(r,t),n=e[i-1],o=e[i],a=t[i-1];return P([n,o],(r-a)*x(a,t[i]))}function k(e,t,r,i){if(100===i)return i;var n=C(i,e),o=e[n-1],a=e[n];return r?i-o>(a-o)/2?a:o:t[n-1]?e[n-1]+s(i-e[n-1],t[n-1]):i}var A,M;e.PipsMode=void 0,(M=e.PipsMode||(e.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",e.PipsType=void 0,(A=e.PipsType||(e.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var U=function(){function e(e,t,r){var i;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var n=[];for(Object.keys(e).forEach((function(t){n.push([d(e[t]),t])})),n.sort((function(e,t){return e[0][0]-t[0][0]})),i=0;ithis.xPct[n+1];)n++;else e===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||e!==this.xPct[n+1]||n++,null===t&&(t=[]);var o=1,a=t[n],s=0,l=0,u=0,c=0;for(i=r?(e-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-e)/(this.xPct[n+1]-this.xPct[n]);a>0;)s=this.xPct[n+1+c]-this.xPct[n+c],t[n+c]*o+100-100*i>100?(l=s*i,o=(a-100*i)/t[n+c],i=1):(l=t[n+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=t[n+c]*o;return e+u},e.prototype.toStepping=function(e){return e=N(this.xVal,this.xPct,e)},e.prototype.fromStepping=function(e){return V(this.xVal,this.xPct,e)},e.prototype.getStep=function(e){return e=k(this.xPct,this.xSteps,this.snap,e)},e.prototype.getDefaultStep=function(e,t,r){var i=C(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(e){var t=C(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(f);return Math.max.apply(null,e)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(e){return this.getStep(this.toStepping(e))},e.prototype.handleEntryPoint=function(e,t){var r;if(!u(r="min"===e?0:"max"===e?100:parseFloat(e))||!u(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(t[0]);var i=Number(t[1]);r?this.xSteps.push(!isNaN(i)&&i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=w([this.xVal[e],this.xVal[e+1]],t,0)/x(this.xPct[e],this.xPct[e+1]);var r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],i=Math.ceil(Number(r.toFixed(3))-1),n=this.xVal[e]+this.xNumSteps[e]*i;this.xHighestCompleteStep[e]=n}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]},e}(),L={to:function(e){return void 0===e?"":e.toFixed(2)},from:Number},O={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function T(e,t){if(!u(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function j(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function F(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function z(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function _(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new U(t,e.snap||!1,e.singleStep)}function R(e,t){if(t=d(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function H(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function q(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function B(e,t){if("number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function $(e,t){var r,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function G(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,n=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,u=t.indexOf("smooth-steps")>=0;if(n){if(2!==e.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Y(e,e.start[1]-e.start[0])}if(s&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||o,drag:i,dragAll:l,smoothSteps:u,fixed:n,snap:o,hover:a,unconstrained:s}}function K(e,t){if(!1!==t)if(!0===t||r(t)){e.tooltips=[];for(var i=0;i= 2) required for mode 'count'.");for(var r=t.values-1,i=100/r,n=[];r--;)n[r]=r*i;return n.push(100),J(n,t.stepped)}return t.mode===e.PipsMode.Positions?J(t.values,t.stepped):t.mode===e.PipsMode.Values?t.stepped?t.values.map((function(e){return V.fromStepping(V.getStep(V.toStepping(e)))})):t.values:[]}function J(e,t){return e.map((function(e){return V.fromStepping(t?V.getStep(e):e)}))}function K(t){function r(e,t){return Number((e+t).toFixed(7))}var i=G(t),n={},o=V.xVal[0],s=V.xVal[V.xVal.length-1],l=!1,u=!1,c=0;return(i=a(i.slice().sort((function(e,t){return e-t}))))[0]!==o&&(i.unshift(o),l=!0),i[i.length-1]!==s&&(i.push(s),u=!0),i.forEach((function(o,a){var s,p,d,f,h,m,v,g,b,y,S=o,x=i[a+1],w=t.mode===e.PipsMode.Steps;for(w&&(s=V.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(f=V.toStepping(p))-c)/(t.density||1),y=h/(b=Math.round(g)),d=1;d<=b;d+=1)n[(m=c+d*y).toFixed(5)]=[V.fromStepping(m),0];v=i.indexOf(p)>-1?e.PipsType.LargeValue:w?e.PipsType.SmallValue:e.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(n[f.toFixed(5)]=[p,v]),c=f}})),n}function Q(t,i,n){var o,a,s=O.createElement("div"),l=((o={})[e.PipsType.None]="",o[e.PipsType.NoValue]=r.cssClasses.valueNormal,o[e.PipsType.LargeValue]=r.cssClasses.valueLarge,o[e.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[e.PipsType.None]="",a[e.PipsType.NoValue]=r.cssClasses.markerNormal,a[e.PipsType.LargeValue]=r.cssClasses.markerLarge,a[e.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function d(e,t){var i=t===r.cssClasses.value,n=i?l:u;return t+" "+(i?c:p)[r.ort]+" "+n[e]}function f(t,o,a){if((a=i?i(o,a):a)!==e.PipsType.None){var l=z(s,!1);l.className=d(a,r.cssClasses.marker),l.style[r.style]=t+"%",a>e.PipsType.NoValue&&((l=z(s,!1)).className=d(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=t+"%",l.innerHTML=String(n.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach((function(e){f(e,t[e][0],t[e][1])})),s}function Z(){w&&(i(w),w=null)}function ee(e){Z();var t=K(e),r=e.filter,i=e.format||{to:function(e){return String(Math.round(e))}};return w=N.appendChild(Q(t,r,i))}function te(){var e=u.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||u[t]:e.height||u[t]}function re(e,t,i,n){var o=function(o){var a=ie(o,n.pageOffset,n.target||t);return!!a&&!($()&&!n.doNotReject)&&!(v(N,r.cssClasses.tap)&&!n.doNotReject)&&!(e===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!n.hover||!a.buttons)&&(C||a.preventDefault(),a.calcPoint=a.points[r.ort],void i(a,n))},a=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!C&&{passive:!0}),a.push([e,o])})),a}function ie(e,t,r){var i=0===e.type.indexOf("touch"),n=0===e.type.indexOf("mouse"),o=0===e.type.indexOf("pointer"),a=0,s=0;if(0===e.type.indexOf("MSPointer")&&(o=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(i){var l=function(t){var i=t.target;return i===r||r.contains(i)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(e.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return t=t||g(O),(n||o)&&(a=e.clientX+t.x,s=e.clientY+t.y),e.pageOffset=t,e.points=[a,s],e.cursor=n||o,e}function ne(e){var t=100*(e-l(u,r.ort))/te();return t=p(t),r.dir?100-t:t}function ae(e){var t=100,r=!1;return f.forEach((function(i,n){if(!X(n)){var o=A[n],a=Math.abs(o-e);(ao||100===a&&100===t)&&(r=n,t=a)}})),r}function se(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&ue(e,t)}function le(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return ue(e,t);var i=(r.dir?-1:1)*(e.calcPoint-t.startCalcPoint);xe(i>0,100*i/t.baseSize,t.locations,t.handleNumbers,t.connect)}function ue(e,t){t.handle&&(m(t.handle,r.cssClasses.active),U-=1),t.listeners.forEach((function(e){T.removeEventListener(e[0],e[1])})),0===U&&(m(N,r.cssClasses.drag),Pe(),e.cursor&&(j.style.cursor="",j.removeEventListener("selectstart",o))),r.events.smoothSteps&&(t.handleNumbers.forEach((function(e){Ce(e,A[e],!0,!0,!1,!1)})),t.handleNumbers.forEach((function(e){be("update",e)}))),t.handleNumbers.forEach((function(e){be("change",e),be("set",e),be("end",e)}))}function ce(e,t){if(!t.handleNumbers.some(X)){var i;1===t.handleNumbers.length&&(i=f[t.handleNumbers[0]].children[0],U+=1,h(i,r.cssClasses.active)),e.stopPropagation();var n=[],a=re(P.move,T,le,{target:e.target,handle:i,connect:t.connect,listeners:n,startCalcPoint:e.calcPoint,baseSize:te(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:A.slice()}),s=re(P.end,T,ue,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers}),l=re("mouseout",T,se,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers});n.push.apply(n,a.concat(s,l)),e.cursor&&(j.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&h(N,r.cssClasses.drag),j.addEventListener("selectstart",o,!1)),t.handleNumbers.forEach((function(e){be("start",e)}))}}function pe(e){e.stopPropagation();var t=ne(e.calcPoint),i=ae(t);!1!==i&&(r.events.snap||c(N,r.cssClasses.tap,r.animationDuration),Ce(i,t,!0,!0),Pe(),be("slide",i,!0),be("update",i,!0),r.events.snap?ce(e,{handleNumbers:[i]}):(be("change",i,!0),be("set",i,!0)))}function de(e){var t=ne(e.calcPoint),r=V.getStep(t),i=V.fromStepping(r);Object.keys(L).forEach((function(e){"hover"===e.split(".")[0]&&L[e].forEach((function(e){e.call(Fe,i)}))}))}function fe(e,t){if($()||X(t))return!1;var i=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?i.reverse():r.ort&&!r.dir&&(n.reverse(),o.reverse());var s,l=e.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===n[0]||l===i[0]||u,d=l===n[1]||l===i[1]||c,f=l===a[0],h=l===a[1];if(!(p||d||f||h))return!0;if(e.preventDefault(),d||p){var m=p?0:1,v=Oe(t)[m];if(null===v)return!1;!1===v&&(v=V.getDefaultStep(A[t],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=k[t]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ce(t,V.toStepping(s),!0,!0),be("slide",t),be("update",t),be("change",t),be("set",t),!1}function he(e){e.fixed||f.forEach((function(e,t){re(P.start,e.children[0],ce,{handleNumbers:[t]})})),e.tap&&re(P.start,u,pe,{}),e.hover&&re(P.move,u,de,{hover:!0}),e.drag&&x.forEach((function(t,i){if(!1!==t&&0!==i&&i!==x.length-1){var n=f[i-1],o=f[i],a=[t],s=[n,o],l=[i-1,i];h(t,r.cssClasses.draggable),e.fixed&&(a.push(n.children[0]),a.push(o.children[0])),e.dragAll&&(s=f,l=M),a.forEach((function(e){re(P.start,e,ce,{handles:s,handleNumbers:l,connect:t})}))}}))}function me(e,t){L[e]=L[e]||[],L[e].push(t),"update"===e.split(".")[0]&&f.forEach((function(e,t){be("update",t)}))}function ve(e){return e===D.aria||e===D.tooltips}function ge(e){var t=e&&e.split(".")[0],r=t?e.substring(t.length):e;Object.keys(L).forEach((function(e){var i=e.split(".")[0],n=e.substring(i.length);t&&t!==i||r&&r!==n||ve(n)&&r!==n||delete L[e]}))}function be(e,t,i){Object.keys(L).forEach((function(n){var o=n.split(".")[0];e===o&&L[n].forEach((function(e){e.call(Fe,k.map(r.format.to),t,k.slice(),i||!1,A.slice(),Fe)}))}))}function ye(e,t,i,n,o,a,s){var l;return f.length>1&&!r.events.unconstrained&&(n&&t>0&&(l=V.getAbsoluteDistance(e[t-1],r.margin,!1),i=Math.max(i,l)),o&&t1&&r.limit&&(n&&t>0&&(l=V.getAbsoluteDistance(e[t-1],r.limit,!1),i=Math.min(i,l)),o&&t1?n.forEach((function(e,r){var i=ye(a,e,a[e]+t,u[r],c[r],!1,l);!1===i?t=0:(t=i-a[e],a[e]=i)})):u=c=[!0];var p=!1;n.forEach((function(e,r){p=Ce(e,i[e]+t,u[r],c[r],!1,l)||p})),p&&(n.forEach((function(e){be("update",e),be("slide",e)})),null!=o&&be("drag",s))}function we(e,t){return r.dir?100-e-t:e}function Ee(e,t){A[e]=t,k[e]=V.fromStepping(t);var i="translate("+Se(we(t,0)-F+"%","0")+")";f[e].style[r.transformRule]=i,Ne(e),Ne(e+1)}function Pe(){M.forEach((function(e){var t=A[e]>50?-1:1,r=3+(f.length+t*e);f[e].style.zIndex=String(r)}))}function Ce(e,t,r,i,n,o){return n||(t=ye(A,e,t,r,i,!1,o)),!1!==t&&(Ee(e,t),!0)}function Ne(e){if(x[e]){var t=0,i=100;0!==e&&(t=A[e-1]),e!==x.length-1&&(i=A[e]);var n=i-t,o="translate("+Se(we(t,n)+"%","0")+")",a="scale("+Se(n/100,"1")+")";x[e].style[r.transformRule]=o+" "+a}}function Ve(e,t){return null===e||!1===e||void 0===e?A[t]:("number"==typeof e&&(e=String(e)),!1!==(e=r.format.from(e))&&(e=V.toStepping(e)),!1===e||isNaN(e)?A[t]:e)}function ke(e,t,i){var n=d(e),o=void 0===A[0];t=void 0===t||t,r.animate&&!o&&c(N,r.cssClasses.tap,r.animationDuration),M.forEach((function(e){Ce(e,Ve(n[e],e),!0,!1,i)}));var a=1===M.length?0:1;if(o&&V.hasNoSize()&&(i=!0,A[0]=0,M.length>1)){var s=100/(M.length-1);M.forEach((function(e){A[e]=e*s}))}for(;a=0&&ei.stepAfter.startValue&&(o=i.stepAfter.startValue-n),a=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?o=null:0===t&&(a=null);var s=V.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function De(){return M.map(Oe)}function Te(e,t){var i=Ue(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(t){void 0!==e[t]&&(s[t]=e[t])}));var a=oe(s);o.forEach((function(t){void 0!==e[t]&&(r[t]=a[t])})),V=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?ee(r.pips):Z(),r.tooltips?I():Y(),A=[],ke(n(e.start)?e.start:i,t)}function je(){u=q(N),H(r.connect,u),he(r.events),ke(r.start),r.pips&&ee(r.pips),r.tooltips&&I(),W()}je();var Fe={destroy:Le,steps:De,on:me,off:ge,get:Ue,set:ke,setHandle:Me,reset:Ae,__moveHandles:function(e,t,r){xe(e,t,A,r)},options:s,updateOptions:Te,target:N,removePips:Z,removeTooltips:Y,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return f},pips:ee};return Fe}function se(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=ae(e,oe(t),t);return e.noUiSlider=r,r}var le={__spectrum:U,cssClasses:O,create:se};e.create=se,e.cssClasses=O,e.default=le,Object.defineProperty(e,"__esModule",{value:!0})}(t)})));function a(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===r[t]}))}var s={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1},modelValue:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(r,i){const s=function(r,i,n){const{value:o,modelValue:a}=e.toRefs(r),s=a&&void 0!==a.value?a:o,l=e.ref(s.value);if(t(s.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(s.value)&&0==s.value.length)throw new Error("Slider v-model must not be an empty array");return{value:s,initialValue:l}}(r),l=function(t,r,i){const{classes:n,showTooltip:o,tooltipPosition:a,orientation:s}=e.toRefs(t),l=e.computed((()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...n.value})));return{classList:e.computed((()=>{const e={...l.value};return Object.keys(e).forEach((t=>{e[t]=Array.isArray(e[t])?e[t].filter((e=>null!==e)).join(" "):e[t]})),"always"!==o.value&&(e.target+=` ${"drag"===o.value?e.tooltipDrag:e.tooltipFocus}`),"horizontal"===s.value&&(e.tooltip+="bottom"===a.value?` ${e.tooltipBottom}`:` ${e.tooltipTop}`),"vertical"===s.value&&(e.tooltip+="right"===a.value?` ${e.tooltipRight}`:` ${e.tooltipLeft}`),e}))}}(r),u=function(t,r,i){const{format:o,step:a}=e.toRefs(t),s=i.value,l=i.classList,u=e.computed((()=>o&&o.value?"function"==typeof o.value?{to:o.value}:n({...o.value}):n({decimals:a.value>=0?0:2})));return{tooltipsFormat:e.computed((()=>Array.isArray(s.value)?s.value.map((e=>u.value)):u.value)),tooltipsMerge:(e,t,r)=>{var i="rtl"===getComputedStyle(e).direction,n="rtl"===e.noUiSlider.options.direction,o="vertical"===e.noUiSlider.options.orientation,a=e.noUiSlider.getTooltips(),s=e.noUiSlider.getOrigins();a.forEach((function(e,t){e&&s[t].appendChild(e)})),e.noUiSlider.on("update",(function(e,s,c,p,d){var f=[[]],h=[[]],m=[[]],v=0;a[0]&&(f[0][0]=0,h[0][0]=d[0],m[0][0]=u.value.to(parseFloat(e[0])));for(var g=1;gt)&&(f[++v]=[],m[v]=[],h[v]=[]),a[g]&&(f[v].push(g),m[v].push(u.value.to(parseFloat(e[g]))),h[v].push(d[g]));f.forEach((function(e,t){for(var s=e.length,u=0;u{a[c].classList.contains(e)&&a[c].classList.remove(e)}))}else a[c].style.display="none",l.value.tooltipHidden.split(" ").forEach((e=>{a[c].classList.add(e)}))}}))}))}}}(r,0,{value:s.value,classList:l.classList}),c=function(r,i,n){const{orientation:s,direction:l,tooltips:u,step:c,min:p,max:d,merge:f,id:h,disabled:m,options:v,classes:g,format:b,lazy:y}=e.toRefs(r),S=n.value,x=n.initialValue,w=n.tooltipsFormat,E=n.tooltipsMerge,P=n.classList,C=e.ref(null),N=e.ref(null),V=e.ref(!1),k=e.computed((()=>{let e={cssPrefix:"",cssClasses:P.value,orientation:s.value,direction:l.value,tooltips:!!u.value&&w.value,connect:"lower",start:t(S.value)?p.value:S.value,range:{min:p.value,max:d.value}};return c.value>0&&(e.step=c.value),Array.isArray(S.value)&&(e.connect=!0),e})),A=e.computed((()=>{let e={id:h&&h.value?h.value:void 0};return m.value&&(e.disabled=!0),e})),M=e.computed((()=>Array.isArray(S.value))),U=()=>{let e=N.value.get();return Array.isArray(e)?e.map((e=>parseFloat(e))):parseFloat(e)},L=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];N.value.set(e,t)},O=e=>{i.emit("input",e),i.emit("update:modelValue",e),i.emit("update",e)},D=()=>{N.value=o.create(C.value,Object.assign({},k.value,v.value)),u.value&&M.value&&f.value>=0&&E(C.value,f.value," - "),N.value.on("set",(e=>{const t=U();i.emit("change",t),y.value&&O(t)})),N.value.on("update",(e=>{if(!V.value)return;const t=U();M.value&&a(S.value,t)||!M.value&&S.value==t?i.emit("update",t):y.value||O(t)})),C.value.querySelectorAll("[data-handle]").forEach((e=>{e.onblur=()=>{P.value.focused.split(" ").forEach((e=>{C.value.classList.remove(e)}))},e.onfocus=()=>{P.value.focused.split(" ").forEach((e=>{C.value.classList.add(e)}))}})),V.value=!0},T=()=>{N.value.off(),N.value.destroy(),N.value=null},j=(e,t)=>{V.value=!1,T(),D()};return e.onMounted(D),e.onUnmounted(T),e.watch(S,((e,t)=>{t&&("object"==typeof t&&"object"==typeof e&&e&&Object.keys(t)>Object.keys(e)||"object"==typeof t&&"object"!=typeof e||!e)&&j()}),{immediate:!1}),e.watch(M,j,{immediate:!1}),e.watch(p,j,{immediate:!1}),e.watch(d,j,{immediate:!1}),e.watch(c,j,{immediate:!1}),e.watch(s,j,{immediate:!1}),e.watch(l,j,{immediate:!1}),e.watch(u,j,{immediate:!1}),e.watch(f,j,{immediate:!1}),e.watch(b,j,{immediate:!1,deep:!0}),e.watch(v,j,{immediate:!1,deep:!0}),e.watch(g,j,{immediate:!1,deep:!0}),e.watch(S,(e=>{if(t(e))return void L(p.value,!1);let r=U();M.value&&!Array.isArray(r)&&(r=[r]),(M.value&&!a(e,r)||!M.value&&e!=r)&&L(e,!1)}),{deep:!0}),{slider:C,slider$:N,isRange:M,sliderProps:A,init:D,destroy:T,refresh:j,update:L,reset:()=>{O(x.value)}}}(r,i,{value:s.value,initialValue:s.initialValue,tooltipsFormat:u.tooltipsFormat,tooltipsMerge:u.tooltipsMerge,classList:l.classList});return{...l,...u,...c}}};function l(e,t,r,i,n,o,a,s,l,u){"boolean"!=typeof a&&(l=s,s=a,a=!1);const c="function"==typeof r?r.options:r;let p;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,n&&(c.functional=!0)),i&&(c._scopeId=i),o?(p=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=p):t&&(p=a?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),p)if(c.functional){const e=c.render;c.render=function(t,r){return p.call(r),e(t,r)}}else{const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,p):[p]}return r}const u=s;var c=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",e._b({ref:"slider"},"div",e.sliderProps,!1))};c._withStripped=!0;return l({render:c,staticRenderFns:[]},undefined,u,undefined,false,undefined,!1,void 0,void 0,void 0)}(Vue); diff --git a/dist/slider.vue2.js b/dist/slider.vue2.js index 93170f8..6167aab 100644 --- a/dist/slider.vue2.js +++ b/dist/slider.vue2.js @@ -1 +1 @@ -import{toRefs as t,ref as e,computed as r,onMounted as n,onUnmounted as i,watch as o}from"@vue/composition-api";function a(t){return-1!==[null,void 0,!1].indexOf(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e=0&&o<8))throw new Error(n);a[n]=o}else if("encoder"===n||"decoder"===n||"edit"===n||"undo"===n){if("function"!=typeof o)throw new Error(n);a[n]=o}else{if("string"!=typeof o)throw new Error(n);a[n]=o}return i(a,"mark","thousand"),i(a,"prefix","negative"),i(a,"prefix","negativeBefore"),a}function c(e,r,n){var i,o=[];for(i=0;i=0?0:2})}));return{tooltipsFormat:r((function(){return Array.isArray(l.value)?l.value.map((function(t){return c.value})):c.value})),tooltipsMerge:function(t,e,r){var n="rtl"===getComputedStyle(t).direction,i="rtl"===t.noUiSlider.options.direction,o="vertical"===t.noUiSlider.options.orientation,a=t.noUiSlider.getTooltips(),s=t.noUiSlider.getOrigins();a.forEach((function(t,e){t&&s[e].appendChild(t)})),t.noUiSlider.on("update",(function(t,s,l,p,f){var d=[[]],h=[[]],m=[[]],v=0;a[0]&&(d[0][0]=0,h[0][0]=f[0],m[0][0]=c.value.to(parseFloat(t[0])));for(var g=1;ge)&&(d[++v]=[],m[v]=[],h[v]=[]),a[g]&&(d[v].push(g),m[v].push(c.value.to(parseFloat(t[g]))),h[v].push(f[g]));d.forEach((function(t,e){for(var s=t.length,l=0;l0&&(h(t,e),setTimeout((function(){m(t,e)}),r))}function p(t){return Math.max(Math.min(t,100),0)}function f(t){return Array.isArray(t)?t:[t]}function d(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function h(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function m(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function b(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function y(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function S(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function x(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function w(t,e){return 100/(e-t)}function E(t,e,r){return 100*e/(t[r+1]-t[r])}function P(t,e){return E(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function C(t,e){return e*(t[1]-t[0])/100+t[0]}function N(t,e){for(var r=1;t>=e[r];)r+=1;return r}function O(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=N(r,t),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return a+P([i,o],r)/w(a,s)}function k(t,e,r){if(r>=100)return t.slice(-1)[0];var n=N(r,e),i=t[n-1],o=t[n],a=e[n-1];return C([i,o],(r-a)*w(a,e[n]))}function V(t,e,r,n){if(100===n)return n;var i=N(n,t),o=t[i-1],a=t[i];return r?n-o>(a-o)/2?a:o:e[i-1]?t[i-1]+s(n-t[i-1],e[i-1]):n}var A,j;t.PipsMode=void 0,(j=t.PipsMode||(t.PipsMode={})).Range="range",j.Steps="steps",j.Positions="positions",j.Count="count",j.Values="values",t.PipsType=void 0,(A=t.PipsType||(t.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var M=function(){function t(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([f(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),n=0;nthis.xPct[i+1];)i++;else t===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);r||t!==this.xPct[i+1]||i++,null===e&&(e=[]);var o=1,a=e[i],s=0,l=0,u=0,c=0;for(n=r?(t-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-t)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+c]-this.xPct[i+c],e[i+c]*o+100-100*n>100?(l=s*n,o=(a-100*n)/e[i+c],n=1):(l=e[i+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[i+c]*o;return t+u},t.prototype.toStepping=function(t){return t=O(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return k(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=V(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=N(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){var e=N(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(d);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){var r;if(!u(r="min"===t?0:"max"===t?100:parseFloat(t))||!u(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(e[0]);var n=Number(e[1]);r?this.xSteps.push(!isNaN(n)&&n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){if(e)if(this.xVal[t]!==this.xVal[t+1]){this.xSteps[t]=E([this.xVal[t],this.xVal[t+1]],e,0)/w(this.xPct[t],this.xPct[t+1]);var r=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(r.toFixed(3))-1),i=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=i}else this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t]},t}(),U={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},D={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},L={tooltips:".__tooltips",aria:".__aria"};function T(t,e){if(!u(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function F(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function z(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function _(t,e){if(!u(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function H(t,e){if("object"!==g(e)||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new M(e,t.snap||!1,t.singleStep)}function R(t,e){if(e=f(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function q(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function B(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function $(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function X(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function J(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function K(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,a=e.indexOf("hover")>=0,s=e.indexOf("unconstrained")>=0,l=e.indexOf("drag-all")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");I(t,t.start[1]-t.start[0])}if(s&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,dragAll:l,fixed:i,snap:o,hover:a,unconstrained:s}}function Q(t,e){if(!1!==e)if(!0===e||r(e)){t.tooltips=[];for(var n=0;n= 2) required for mode 'count'.");for(var r=e.values-1,n=100/r,i=[];r--;)i[r]=r*n;return i.push(100),J(i,e.stepped)}return e.mode===t.PipsMode.Positions?J(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return O.fromStepping(O.getStep(O.toStepping(t)))})):e.values:[]}function J(t,e){return t.map((function(t){return O.fromStepping(e?O.getStep(t):t)}))}function K(e){function r(t,e){return Number((t+e).toFixed(7))}var n=G(e),i={},o=O.xVal[0],s=O.xVal[O.xVal.length-1],l=!1,u=!1,c=0;return(n=a(n.slice().sort((function(t,e){return t-e}))))[0]!==o&&(n.unshift(o),l=!0),n[n.length-1]!==s&&(n.push(s),u=!0),n.forEach((function(o,a){var s,p,f,d,h,m,v,g,b,y,S=o,x=n[a+1],w=e.mode===t.PipsMode.Steps;for(w&&(s=O.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(d=O.toStepping(p))-c)/(e.density||1),y=h/(b=Math.round(g)),f=1;f<=b;f+=1)i[(m=c+f*y).toFixed(5)]=[O.fromStepping(m),0];v=n.indexOf(p)>-1?t.PipsType.LargeValue:w?t.PipsType.SmallValue:t.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(i[d.toFixed(5)]=[p,v]),c=d}})),i}function Q(e,n,i){var o,a,s=U.createElement("div"),l=((o={})[t.PipsType.None]="",o[t.PipsType.NoValue]=r.cssClasses.valueNormal,o[t.PipsType.LargeValue]=r.cssClasses.valueLarge,o[t.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[t.PipsType.None]="",a[t.PipsType.NoValue]=r.cssClasses.markerNormal,a[t.PipsType.LargeValue]=r.cssClasses.markerLarge,a[t.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function f(t,e){var n=e===r.cssClasses.value,i=n?l:u;return e+" "+(n?c:p)[r.ort]+" "+i[t]}function d(e,o,a){if((a=n?n(o,a):a)!==t.PipsType.None){var l=z(s,!1);l.className=f(a,r.cssClasses.marker),l.style[r.style]=e+"%",a>t.PipsType.NoValue&&((l=z(s,!1)).className=f(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=e+"%",l.innerHTML=String(i.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(e).forEach((function(t){d(t,e[t][0],e[t][1])})),s}function Z(){w&&(n(w),w=null)}function tt(t){Z();var e=K(t),r=t.filter,n=t.format||{to:function(t){return String(Math.round(t))}};return w=N.appendChild(Q(e,r,n))}function et(){var t=u.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||u[e]:t.height||u[e]}function rt(t,e,n,i){var o=function(o){var a=nt(o,i.pageOffset,i.target||e);return!!a&&!($()&&!i.doNotReject)&&!(v(N,r.cssClasses.tap)&&!i.doNotReject)&&!(t===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!i.hover||!a.buttons)&&(C||a.preventDefault(),a.calcPoint=a.points[r.ort],void n(a,i))},a=[];return t.split(" ").forEach((function(t){e.addEventListener(t,o,!!C&&{passive:!0}),a.push([t,o])})),a}function nt(t,e,r){var n=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=0,s=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var l=function(e){var n=e.target;return n===r||r.contains(n)||t.composed&&t.composedPath().shift()===r};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return e=e||b(U),(i||o)&&(a=t.clientX+e.x,s=t.clientY+e.y),t.pageOffset=e,t.points=[a,s],t.cursor=i||o,t}function it(t){var e=100*(t-l(u,r.ort))/et();return e=p(e),r.dir?100-e:e}function ot(t){var e=100,r=!1;return d.forEach((function(n,i){if(!X(i)){var o=V[i],a=Math.abs(o-t);(ao||100===a&&100===e)&&(r=i,e=a)}})),r}function st(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&ut(t,e)}function lt(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return ut(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);xt(n>0,100*n/e.baseSize,e.locations,e.handleNumbers,e.connect)}function ut(t,e){e.handle&&(m(e.handle,r.cssClasses.active),j-=1),e.listeners.forEach((function(t){D.removeEventListener(t[0],t[1])})),0===j&&(m(N,r.cssClasses.drag),Pt(),t.cursor&&(T.style.cursor="",T.removeEventListener("selectstart",o))),e.handleNumbers.forEach((function(t){bt("change",t),bt("set",t),bt("end",t)}))}function ct(t,e){if(!e.handleNumbers.some(X)){var n;1===e.handleNumbers.length&&(n=d[e.handleNumbers[0]].children[0],j+=1,h(n,r.cssClasses.active)),t.stopPropagation();var i=[],a=rt(P.move,D,lt,{target:t.target,handle:n,connect:e.connect,listeners:i,startCalcPoint:t.calcPoint,baseSize:et(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:V.slice()}),s=rt(P.end,D,ut,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers}),l=rt("mouseout",D,st,{target:t.target,handle:n,listeners:i,doNotReject:!0,handleNumbers:e.handleNumbers});i.push.apply(i,a.concat(s,l)),t.cursor&&(T.style.cursor=getComputedStyle(t.target).cursor,d.length>1&&h(N,r.cssClasses.drag),T.addEventListener("selectstart",o,!1)),e.handleNumbers.forEach((function(t){bt("start",t)}))}}function pt(t){t.stopPropagation();var e=it(t.calcPoint),n=ot(e);!1!==n&&(r.events.snap||c(N,r.cssClasses.tap,r.animationDuration),Ct(n,e,!0,!0),Pt(),bt("slide",n,!0),bt("update",n,!0),r.events.snap?ct(t,{handleNumbers:[n]}):(bt("change",n,!0),bt("set",n,!0)))}function ft(t){var e=it(t.calcPoint),r=O.getStep(e),n=O.fromStepping(r);Object.keys(M).forEach((function(t){"hover"===t.split(".")[0]&&M[t].forEach((function(t){t.call(Ft,n)}))}))}function dt(t,e){if($()||X(e))return!1;var n=["Left","Right"],i=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?n.reverse():r.ort&&!r.dir&&(i.reverse(),o.reverse());var s,l=t.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===i[0]||l===n[0]||u,f=l===i[1]||l===n[1]||c,d=l===a[0],h=l===a[1];if(!(p||f||d||h))return!0;if(t.preventDefault(),f||p){var m=p?0:1,v=Ut(e)[m];if(null===v)return!1;!1===v&&(v=O.getDefaultStep(V[e],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=k[e]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ct(e,O.toStepping(s),!0,!0),bt("slide",e),bt("update",e),bt("change",e),bt("set",e),!1}function ht(t){t.fixed||d.forEach((function(t,e){rt(P.start,t.children[0],ct,{handleNumbers:[e]})})),t.tap&&rt(P.start,u,pt,{}),t.hover&&rt(P.move,u,ft,{hover:!0}),t.drag&&g.forEach((function(e,n){if(!1!==e&&0!==n&&n!==g.length-1){var i=d[n-1],o=d[n],a=[e],s=[i,o],l=[n-1,n];h(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(o.children[0])),t.dragAll&&(s=d,l=A),a.forEach((function(t){rt(P.start,t,ct,{handles:s,handleNumbers:l,connect:e})}))}}))}function mt(t,e){M[t]=M[t]||[],M[t].push(e),"update"===t.split(".")[0]&&d.forEach((function(t,e){bt("update",e)}))}function vt(t){return t===L.aria||t===L.tooltips}function gt(t){var e=t&&t.split(".")[0],r=e?t.substring(e.length):t;Object.keys(M).forEach((function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||vt(i)&&r!==i||delete M[t]}))}function bt(t,e,n){Object.keys(M).forEach((function(i){var o=i.split(".")[0];t===o&&M[i].forEach((function(t){t.call(Ft,k.map(r.format.to),e,k.slice(),n||!1,V.slice(),Ft)}))}))}function yt(t,e,n,i,o,a){var s;return d.length>1&&!r.events.unconstrained&&(i&&e>0&&(s=O.getAbsoluteDistance(t[e-1],r.margin,!1),n=Math.max(n,s)),o&&e1&&r.limit&&(i&&e>0&&(s=O.getAbsoluteDistance(t[e-1],r.limit,!1),n=Math.min(n,s)),o&&e1?n.forEach((function(t,r){var n=yt(o,t,o[t]+e,s[r],l[r],!1);!1===n?e=0:(e=n-o[t],o[t]=n)})):s=l=[!0];var u=!1;n.forEach((function(t,n){u=Ct(t,r[t]+e,s[n],l[n])||u})),u&&(n.forEach((function(t){bt("update",t),bt("slide",t)})),null!=i&&bt("drag",a))}function wt(t,e){return r.dir?100-t-e:t}function Et(t,e){V[t]=e,k[t]=O.fromStepping(e);var n="translate("+St(wt(e,0)-F+"%","0")+")";d[t].style[r.transformRule]=n,Nt(t),Nt(t+1)}function Pt(){A.forEach((function(t){var e=V[t]>50?-1:1,r=3+(d.length+e*t);d[t].style.zIndex=String(r)}))}function Ct(t,e,r,n,i){return i||(e=yt(V,t,e,r,n,!1)),!1!==e&&(Et(t,e),!0)}function Nt(t){if(g[t]){var e=0,n=100;0!==t&&(e=V[t-1]),t!==g.length-1&&(n=V[t]);var i=n-e,o="translate("+St(wt(e,i)+"%","0")+")",a="scale("+St(i/100,"1")+")";g[t].style[r.transformRule]=o+" "+a}}function Ot(t,e){return null===t||!1===t||void 0===t?V[e]:("number"==typeof t&&(t=String(t)),!1!==(t=r.format.from(t))&&(t=O.toStepping(t)),!1===t||isNaN(t)?V[e]:t)}function kt(t,e,n){var i=f(t),o=void 0===V[0];e=void 0===e||e,r.animate&&!o&&c(N,r.cssClasses.tap,r.animationDuration),A.forEach((function(t){Ct(t,Ot(i[t],t),!0,!1,n)}));var a=1===A.length?0:1;if(o&&O.hasNoSize()&&(n=!0,V[0]=0,A.length>1)){var s=100/(A.length-1);A.forEach((function(t){V[t]=t*s}))}for(;a=0&&tn.stepAfter.startValue&&(o=n.stepAfter.startValue-i),a=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(a=null);var s=O.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function Dt(){return A.map(Ut)}function Lt(t,e){var n=jt(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(e){void 0!==t[e]&&(s[e]=t[e])}));var a=at(s);o.forEach((function(e){void 0!==t[e]&&(r[e]=a[e])})),O=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?tt(r.pips):Z(),r.tooltips?I():Y(),V=[],kt(i(t.start)?t.start:n,e)}function Tt(){u=q(N),R(r.connect,u),ht(r.events),kt(r.start),r.pips&&tt(r.pips),r.tooltips&&I(),W()}Tt();var Ft={destroy:Mt,steps:Dt,on:mt,off:gt,get:jt,set:kt,setHandle:At,reset:Vt,__moveHandles:function(t,e,r){xt(t,e,V,r)},options:s,updateOptions:Lt,target:N,removePips:Z,removeTooltips:Y,getPositions:function(){return V.slice()},getTooltips:function(){return E},getOrigins:function(){return d},pips:tt};return Ft}function lt(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=st(t,at(e),e);return t.noUiSlider=r,r}var ut={__spectrum:M,cssClasses:D,create:lt};t.create=lt,t.cssClasses=D,t.default=ut,Object.defineProperty(t,"__esModule",{value:!0})}(e)})));function y(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;var r=e.slice().sort();return t.length===e.length&&t.slice().sort().every((function(t,e){return t===r[e]}))}function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function x(t,e,r,n,i,o,a,s,l,u){"boolean"!=typeof a&&(l=s,s=a,a=!1);var c,p="function"==typeof r?r.options:r;if(t&&t.render&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0,i&&(p.functional=!0)),n&&(p._scopeId=n),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},p._ssrRegister=c):e&&(c=a?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),c)if(p.functional){var f=p.render;p.render=function(t,e){return c.call(e),f(t,e)}}else{var d=p.beforeCreate;p.beforeCreate=d?[].concat(d,c):[c]}return r}const w={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1},modelValue:{validator:function(t){return t=>"number"==typeof t||t instanceof Array||null==t||!1===t},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(s,u){const c=function(r,n,i){var o=t(r),s=o.value,l=o.modelValue,u=void 0!==n.expose?l:s,c=e(u.value);if(a(u.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(u.value)&&0==u.value.length)throw new Error("Slider v-model must not be an empty array");return{value:u,initialValue:c}}(s,u),p=function(e,n,i){var o=t(e),a=o.classes,s=o.showTooltip,u=o.tooltipPosition,c=o.orientation,p=r((function(){return l({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub"},a.value)}));return{classList:r((function(){var t=l({},p.value);return Object.keys(t).forEach((function(e){t[e]=Array.isArray(t[e])?t[e].filter((function(t){return null!==t})).join(" "):t[e]})),"always"!==s.value&&(t.target+=" ".concat("drag"===s.value?t.tooltipDrag:t.tooltipFocus)),"horizontal"===c.value&&(t.tooltip+="bottom"===u.value?" ".concat(t.tooltipBottom):" ".concat(t.tooltipTop)),"vertical"===c.value&&(t.tooltip+="right"===u.value?" ".concat(t.tooltipRight):" ".concat(t.tooltipLeft)),t}))}}(s),f=v(s,0,{value:c.value,classList:p.classList}),d=function(s,l,u){var c=t(s),p=c.orientation,f=c.direction,d=c.tooltips,h=c.step,m=c.min,v=c.max,g=c.merge,x=c.id,w=c.disabled,E=c.options,P=c.classes,C=c.format,N=c.lazy,O=u.value,k=u.initialValue,V=u.tooltipsFormat,A=u.tooltipsMerge,j=u.classList,M=e(null),U=e(null),D=e(!1),L=r((function(){var t={cssPrefix:"",cssClasses:j.value,orientation:p.value,direction:f.value,tooltips:!!d.value&&V.value,connect:"lower",start:a(O.value)?m.value:O.value,range:{min:m.value,max:v.value}};return h.value>0&&(t.step=h.value),Array.isArray(O.value)&&(t.connect=!0),t})),T=r((function(){var t={id:x&&x.value?x.value:void 0};return w.value&&(t.disabled=!0),t})),F=r((function(){return Array.isArray(O.value)})),z=function(){var t=U.value.get();return Array.isArray(t)?t.map((function(t){return parseFloat(t)})):parseFloat(t)},_=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];U.value.set(t,e)},H=function(t){l.emit("input",t),l.emit("update:modelValue",t),l.emit("update",t)},R=function(){U.value=b.create(M.value,Object.assign({},L.value,E.value)),d.value&&F.value&&g.value>=0&&A(M.value,g.value," - "),U.value.on("set",(function(t){var e=z();l.emit("change",e),N.value&&H(e)})),U.value.on("update",(function(t){if(D.value){var e=z();F.value&&y(O.value,e)||!F.value&&O.value==e?l.emit("update",e):N.value||H(e)}})),M.value.querySelectorAll("[data-handle]").forEach((function(t){t.onblur=function(){j.value.focused.split(" ").forEach((function(t){M.value.classList.remove(t)}))},t.onfocus=function(){j.value.focused.split(" ").forEach((function(t){M.value.classList.add(t)}))}})),D.value=!0},q=function(){U.value.off(),U.value.destroy(),U.value=null},B=function(t,e){D.value=!1,q(),R()};return n(R),i(q),o(O,(function(t,e){e&&("object"===S(e)&&"object"===S(t)&&t&&Object.keys(e)>Object.keys(t)||"object"===S(e)&&"object"!==S(t)||!t)&&B()}),{immediate:!1}),o(F,B,{immediate:!1}),o(m,B,{immediate:!1}),o(v,B,{immediate:!1}),o(h,B,{immediate:!1}),o(p,B,{immediate:!1}),o(f,B,{immediate:!1}),o(d,B,{immediate:!1}),o(g,B,{immediate:!1}),o(C,B,{immediate:!1,deep:!0}),o(E,B,{immediate:!1,deep:!0}),o(P,B,{immediate:!1,deep:!0}),o(O,(function(t){if(a(t))_(m.value,!1);else{var e=z();F.value&&!Array.isArray(e)&&(e=[e]),(F.value&&!y(t,e)||!F.value&&t!=e)&&_(t,!1)}}),{deep:!0}),{slider:M,slider$:U,isRange:F,sliderProps:T,init:R,destroy:q,refresh:B,update:_,reset:function(){H(k.value)}}}(s,u,{value:c.value,initialValue:c.initialValue,tooltipsFormat:f.tooltipsFormat,tooltipsMerge:f.tooltipsMerge,classList:p.classList});return{...p,...f,...d}}};var E=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",t._b({ref:"slider"},"div",t.sliderProps,!1))};E._withStripped=!0;const P=x({render:E,staticRenderFns:[]},undefined,w,undefined,false,undefined,!1,void 0,void 0,void 0);export{P as default}; +import{toRefs as e,ref as t,computed as r,onMounted as i,onUnmounted as n,watch as o}from"vue";function a(e){return-1!==[null,void 0,!1].indexOf(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){var t={exports:{}};return e(t,t.exports),t.exports}var u=l((function(e,t){e.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function r(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function n(e,t,r){if((e[t]||e[r])&&e[t]===e[r])throw new Error(t)}function o(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,r,i,n,s,l,u,c,p,d,f,h){var m,v,g,b=h,y="",S="";return l&&(h=l(h)),!!o(h)&&(!1!==e&&0===parseFloat(h.toFixed(e))&&(h=0),h<0&&(m=!0,h=Math.abs(h)),!1!==e&&(h=a(h,e)),-1!==(h=h.toString()).indexOf(".")?(g=(v=h.split("."))[0],i&&(y=i+v[1])):g=h,r&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(r)))),m&&c&&(S+=c),n&&(S+=n),m&&p&&(S+=p),S+=g,S+=y,s&&(S+=s),d&&(S=d(S,b)),S)}function l(e,t,n,a,s,l,u,c,p,d,f,h){var m,v="";return f&&(h=f(h)),!(!h||"string"!=typeof h)&&(c&&r(h,c)&&(h=h.replace(c,""),m=!0),a&&r(h,a)&&(h=h.replace(a,"")),p&&r(h,p)&&(h=h.replace(p,""),m=!0),s&&i(h,s)&&(h=h.slice(0,-1*s.length)),t&&(h=h.split(t).join("")),n&&(h=h.replace(n,".")),m&&(v+="-"),""!==(v=(v+=h).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),u&&(v=u(v)),!!o(v)&&v))}function u(t){var r,i,o,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),r=0;r=0&&o<8))throw new Error(i);a[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);a[i]=o}else{if("string"!=typeof o)throw new Error(i);a[i]=o}return n(a,"mark","thousand"),n(a,"prefix","negative"),n(a,"prefix","negativeBefore"),a}function c(t,r,i){var n,o=[];for(n=0;n0&&(h(e,t),setTimeout((function(){m(e,t)}),r))}function p(e){return Math.max(Math.min(e,100),0)}function d(e){return Array.isArray(e)?e:[e]}function f(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function h(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function m(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function v(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function g(e){var t=void 0!==window.pageXOffset,r="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:r?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:r?e.documentElement.scrollTop:e.body.scrollTop}}function b(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function y(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}function S(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function x(e,t){return 100/(t-e)}function w(e,t,r){return 100*t/(e[r+1]-e[r])}function E(e,t){return w(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function P(e,t){return t*(e[1]-e[0])/100+e[0]}function C(e,t){for(var r=1;e>=t[r];)r+=1;return r}function N(e,t,r){if(r>=e.slice(-1)[0])return 100;var i=C(r,e),n=e[i-1],o=e[i],a=t[i-1],s=t[i];return a+E([n,o],r)/x(a,s)}function V(e,t,r){if(r>=100)return e.slice(-1)[0];var i=C(r,t),n=e[i-1],o=e[i],a=t[i-1];return P([n,o],(r-a)*x(a,t[i]))}function k(e,t,r,i){if(100===i)return i;var n=C(i,e),o=e[n-1],a=e[n];return r?i-o>(a-o)/2?a:o:t[n-1]?e[n-1]+s(i-e[n-1],t[n-1]):i}var A,M;e.PipsMode=void 0,(M=e.PipsMode||(e.PipsMode={})).Range="range",M.Steps="steps",M.Positions="positions",M.Count="count",M.Values="values",e.PipsType=void 0,(A=e.PipsType||(e.PipsType={}))[A.None=-1]="None",A[A.NoValue=0]="NoValue",A[A.LargeValue=1]="LargeValue",A[A.SmallValue=2]="SmallValue";var U=function(){function e(e,t,r){var i;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var n=[];for(Object.keys(e).forEach((function(t){n.push([d(e[t]),t])})),n.sort((function(e,t){return e[0][0]-t[0][0]})),i=0;ithis.xPct[n+1];)n++;else e===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||e!==this.xPct[n+1]||n++,null===t&&(t=[]);var o=1,a=t[n],s=0,l=0,u=0,c=0;for(i=r?(e-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-e)/(this.xPct[n+1]-this.xPct[n]);a>0;)s=this.xPct[n+1+c]-this.xPct[n+c],t[n+c]*o+100-100*i>100?(l=s*i,o=(a-100*i)/t[n+c],i=1):(l=t[n+c]*s/100*o,o=0),r?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=t[n+c]*o;return e+u},e.prototype.toStepping=function(e){return e=N(this.xVal,this.xPct,e)},e.prototype.fromStepping=function(e){return V(this.xVal,this.xPct,e)},e.prototype.getStep=function(e){return e=k(this.xPct,this.xSteps,this.snap,e)},e.prototype.getDefaultStep=function(e,t,r){var i=C(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(e){var t=C(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(f);return Math.max.apply(null,e)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(e){return this.getStep(this.toStepping(e))},e.prototype.handleEntryPoint=function(e,t){var r;if(!u(r="min"===e?0:"max"===e?100:parseFloat(e))||!u(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(t[0]);var i=Number(t[1]);r?this.xSteps.push(!isNaN(i)&&i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(e,t){if(t)if(this.xVal[e]!==this.xVal[e+1]){this.xSteps[e]=w([this.xVal[e],this.xVal[e+1]],t,0)/x(this.xPct[e],this.xPct[e+1]);var r=(this.xVal[e+1]-this.xVal[e])/this.xNumSteps[e],i=Math.ceil(Number(r.toFixed(3))-1),n=this.xVal[e]+this.xNumSteps[e]*i;this.xHighestCompleteStep[e]=n}else this.xSteps[e]=this.xHighestCompleteStep[e]=this.xVal[e]},e}(),L={to:function(e){return void 0===e?"":e.toFixed(2)},from:Number},O={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},D={tooltips:".__tooltips",aria:".__aria"};function T(e,t){if(!u(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function j(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function F(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function z(e,t){if(!u(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function _(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new U(t,e.snap||!1,e.singleStep)}function H(e,t){if(t=d(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function R(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function q(e,t){if("boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function B(e,t){if("number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function $(e,t){var r,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(r=1;r1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function G(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,n=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0,l=t.indexOf("drag-all")>=0,u=t.indexOf("smooth-steps")>=0;if(n){if(2!==e.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Y(e,e.start[1]-e.start[0])}if(s&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:r||o,drag:i,dragAll:l,smoothSteps:u,fixed:n,snap:o,hover:a,unconstrained:s}}function K(e,t){if(!1!==t)if(!0===t||r(t)){e.tooltips=[];for(var i=0;i= 2) required for mode 'count'.");for(var r=t.values-1,i=100/r,n=[];r--;)n[r]=r*i;return n.push(100),J(n,t.stepped)}return t.mode===e.PipsMode.Positions?J(t.values,t.stepped):t.mode===e.PipsMode.Values?t.stepped?t.values.map((function(e){return V.fromStepping(V.getStep(V.toStepping(e)))})):t.values:[]}function J(e,t){return e.map((function(e){return V.fromStepping(t?V.getStep(e):e)}))}function K(t){function r(e,t){return Number((e+t).toFixed(7))}var i=G(t),n={},o=V.xVal[0],s=V.xVal[V.xVal.length-1],l=!1,u=!1,c=0;return(i=a(i.slice().sort((function(e,t){return e-t}))))[0]!==o&&(i.unshift(o),l=!0),i[i.length-1]!==s&&(i.push(s),u=!0),i.forEach((function(o,a){var s,p,d,f,h,m,v,g,b,y,S=o,x=i[a+1],w=t.mode===e.PipsMode.Steps;for(w&&(s=V.xNumSteps[a]),s||(s=x-S),void 0===x&&(x=S),s=Math.max(s,1e-7),p=S;p<=x;p=r(p,s)){for(g=(h=(f=V.toStepping(p))-c)/(t.density||1),y=h/(b=Math.round(g)),d=1;d<=b;d+=1)n[(m=c+d*y).toFixed(5)]=[V.fromStepping(m),0];v=i.indexOf(p)>-1?e.PipsType.LargeValue:w?e.PipsType.SmallValue:e.PipsType.NoValue,!a&&l&&p!==x&&(v=0),p===x&&u||(n[f.toFixed(5)]=[p,v]),c=f}})),n}function Q(t,i,n){var o,a,s=O.createElement("div"),l=((o={})[e.PipsType.None]="",o[e.PipsType.NoValue]=r.cssClasses.valueNormal,o[e.PipsType.LargeValue]=r.cssClasses.valueLarge,o[e.PipsType.SmallValue]=r.cssClasses.valueSub,o),u=((a={})[e.PipsType.None]="",a[e.PipsType.NoValue]=r.cssClasses.markerNormal,a[e.PipsType.LargeValue]=r.cssClasses.markerLarge,a[e.PipsType.SmallValue]=r.cssClasses.markerSub,a),c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],p=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function d(e,t){var i=t===r.cssClasses.value,n=i?l:u;return t+" "+(i?c:p)[r.ort]+" "+n[e]}function f(t,o,a){if((a=i?i(o,a):a)!==e.PipsType.None){var l=z(s,!1);l.className=d(a,r.cssClasses.marker),l.style[r.style]=t+"%",a>e.PipsType.NoValue&&((l=z(s,!1)).className=d(a,r.cssClasses.value),l.setAttribute("data-value",String(o)),l.style[r.style]=t+"%",l.innerHTML=String(n.to(o)))}}return h(s,r.cssClasses.pips),h(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach((function(e){f(e,t[e][0],t[e][1])})),s}function Z(){w&&(i(w),w=null)}function ee(e){Z();var t=K(e),r=e.filter,i=e.format||{to:function(e){return String(Math.round(e))}};return w=N.appendChild(Q(t,r,i))}function te(){var e=u.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||u[t]:e.height||u[t]}function re(e,t,i,n){var o=function(o){var a=ie(o,n.pageOffset,n.target||t);return!!a&&!($()&&!n.doNotReject)&&!(v(N,r.cssClasses.tap)&&!n.doNotReject)&&!(e===P.start&&void 0!==a.buttons&&a.buttons>1)&&(!n.hover||!a.buttons)&&(C||a.preventDefault(),a.calcPoint=a.points[r.ort],void i(a,n))},a=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!C&&{passive:!0}),a.push([e,o])})),a}function ie(e,t,r){var i=0===e.type.indexOf("touch"),n=0===e.type.indexOf("mouse"),o=0===e.type.indexOf("pointer"),a=0,s=0;if(0===e.type.indexOf("MSPointer")&&(o=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(i){var l=function(t){var i=t.target;return i===r||r.contains(i)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){var u=Array.prototype.filter.call(e.touches,l);if(u.length>1)return!1;a=u[0].pageX,s=u[0].pageY}else{var c=Array.prototype.find.call(e.changedTouches,l);if(!c)return!1;a=c.pageX,s=c.pageY}}return t=t||g(O),(n||o)&&(a=e.clientX+t.x,s=e.clientY+t.y),e.pageOffset=t,e.points=[a,s],e.cursor=n||o,e}function ne(e){var t=100*(e-l(u,r.ort))/te();return t=p(t),r.dir?100-t:t}function ae(e){var t=100,r=!1;return f.forEach((function(i,n){if(!X(n)){var o=A[n],a=Math.abs(o-e);(ao||100===a&&100===t)&&(r=n,t=a)}})),r}function se(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&ue(e,t)}function le(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return ue(e,t);var i=(r.dir?-1:1)*(e.calcPoint-t.startCalcPoint);xe(i>0,100*i/t.baseSize,t.locations,t.handleNumbers,t.connect)}function ue(e,t){t.handle&&(m(t.handle,r.cssClasses.active),U-=1),t.listeners.forEach((function(e){T.removeEventListener(e[0],e[1])})),0===U&&(m(N,r.cssClasses.drag),Pe(),e.cursor&&(j.style.cursor="",j.removeEventListener("selectstart",o))),r.events.smoothSteps&&(t.handleNumbers.forEach((function(e){Ce(e,A[e],!0,!0,!1,!1)})),t.handleNumbers.forEach((function(e){be("update",e)}))),t.handleNumbers.forEach((function(e){be("change",e),be("set",e),be("end",e)}))}function ce(e,t){if(!t.handleNumbers.some(X)){var i;1===t.handleNumbers.length&&(i=f[t.handleNumbers[0]].children[0],U+=1,h(i,r.cssClasses.active)),e.stopPropagation();var n=[],a=re(P.move,T,le,{target:e.target,handle:i,connect:t.connect,listeners:n,startCalcPoint:e.calcPoint,baseSize:te(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:A.slice()}),s=re(P.end,T,ue,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers}),l=re("mouseout",T,se,{target:e.target,handle:i,listeners:n,doNotReject:!0,handleNumbers:t.handleNumbers});n.push.apply(n,a.concat(s,l)),e.cursor&&(j.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&h(N,r.cssClasses.drag),j.addEventListener("selectstart",o,!1)),t.handleNumbers.forEach((function(e){be("start",e)}))}}function pe(e){e.stopPropagation();var t=ne(e.calcPoint),i=ae(t);!1!==i&&(r.events.snap||c(N,r.cssClasses.tap,r.animationDuration),Ce(i,t,!0,!0),Pe(),be("slide",i,!0),be("update",i,!0),r.events.snap?ce(e,{handleNumbers:[i]}):(be("change",i,!0),be("set",i,!0)))}function de(e){var t=ne(e.calcPoint),r=V.getStep(t),i=V.fromStepping(r);Object.keys(L).forEach((function(e){"hover"===e.split(".")[0]&&L[e].forEach((function(e){e.call(Fe,i)}))}))}function fe(e,t){if($()||X(t))return!1;var i=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?i.reverse():r.ort&&!r.dir&&(n.reverse(),o.reverse());var s,l=e.key.replace("Arrow",""),u=l===o[0],c=l===o[1],p=l===n[0]||l===i[0]||u,d=l===n[1]||l===i[1]||c,f=l===a[0],h=l===a[1];if(!(p||d||f||h))return!0;if(e.preventDefault(),d||p){var m=p?0:1,v=Oe(t)[m];if(null===v)return!1;!1===v&&(v=V.getDefaultStep(A[t],p,r.keyboardDefaultStep)),v*=c||u?r.keyboardPageMultiplier:r.keyboardMultiplier,v=Math.max(v,1e-7),v*=p?-1:1,s=k[t]+v}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return Ce(t,V.toStepping(s),!0,!0),be("slide",t),be("update",t),be("change",t),be("set",t),!1}function he(e){e.fixed||f.forEach((function(e,t){re(P.start,e.children[0],ce,{handleNumbers:[t]})})),e.tap&&re(P.start,u,pe,{}),e.hover&&re(P.move,u,de,{hover:!0}),e.drag&&x.forEach((function(t,i){if(!1!==t&&0!==i&&i!==x.length-1){var n=f[i-1],o=f[i],a=[t],s=[n,o],l=[i-1,i];h(t,r.cssClasses.draggable),e.fixed&&(a.push(n.children[0]),a.push(o.children[0])),e.dragAll&&(s=f,l=M),a.forEach((function(e){re(P.start,e,ce,{handles:s,handleNumbers:l,connect:t})}))}}))}function me(e,t){L[e]=L[e]||[],L[e].push(t),"update"===e.split(".")[0]&&f.forEach((function(e,t){be("update",t)}))}function ve(e){return e===D.aria||e===D.tooltips}function ge(e){var t=e&&e.split(".")[0],r=t?e.substring(t.length):e;Object.keys(L).forEach((function(e){var i=e.split(".")[0],n=e.substring(i.length);t&&t!==i||r&&r!==n||ve(n)&&r!==n||delete L[e]}))}function be(e,t,i){Object.keys(L).forEach((function(n){var o=n.split(".")[0];e===o&&L[n].forEach((function(e){e.call(Fe,k.map(r.format.to),t,k.slice(),i||!1,A.slice(),Fe)}))}))}function ye(e,t,i,n,o,a,s){var l;return f.length>1&&!r.events.unconstrained&&(n&&t>0&&(l=V.getAbsoluteDistance(e[t-1],r.margin,!1),i=Math.max(i,l)),o&&t1&&r.limit&&(n&&t>0&&(l=V.getAbsoluteDistance(e[t-1],r.limit,!1),i=Math.min(i,l)),o&&t1?n.forEach((function(e,r){var i=ye(a,e,a[e]+t,u[r],c[r],!1,l);!1===i?t=0:(t=i-a[e],a[e]=i)})):u=c=[!0];var p=!1;n.forEach((function(e,r){p=Ce(e,i[e]+t,u[r],c[r],!1,l)||p})),p&&(n.forEach((function(e){be("update",e),be("slide",e)})),null!=o&&be("drag",s))}function we(e,t){return r.dir?100-e-t:e}function Ee(e,t){A[e]=t,k[e]=V.fromStepping(t);var i="translate("+Se(we(t,0)-F+"%","0")+")";f[e].style[r.transformRule]=i,Ne(e),Ne(e+1)}function Pe(){M.forEach((function(e){var t=A[e]>50?-1:1,r=3+(f.length+t*e);f[e].style.zIndex=String(r)}))}function Ce(e,t,r,i,n,o){return n||(t=ye(A,e,t,r,i,!1,o)),!1!==t&&(Ee(e,t),!0)}function Ne(e){if(x[e]){var t=0,i=100;0!==e&&(t=A[e-1]),e!==x.length-1&&(i=A[e]);var n=i-t,o="translate("+Se(we(t,n)+"%","0")+")",a="scale("+Se(n/100,"1")+")";x[e].style[r.transformRule]=o+" "+a}}function Ve(e,t){return null===e||!1===e||void 0===e?A[t]:("number"==typeof e&&(e=String(e)),!1!==(e=r.format.from(e))&&(e=V.toStepping(e)),!1===e||isNaN(e)?A[t]:e)}function ke(e,t,i){var n=d(e),o=void 0===A[0];t=void 0===t||t,r.animate&&!o&&c(N,r.cssClasses.tap,r.animationDuration),M.forEach((function(e){Ce(e,Ve(n[e],e),!0,!1,i)}));var a=1===M.length?0:1;if(o&&V.hasNoSize()&&(i=!0,A[0]=0,M.length>1)){var s=100/(M.length-1);M.forEach((function(e){A[e]=e*s}))}for(;a=0&&ei.stepAfter.startValue&&(o=i.stepAfter.startValue-n),a=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?o=null:0===t&&(a=null);var s=V.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function De(){return M.map(Oe)}function Te(e,t){var i=Ue(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(t){void 0!==e[t]&&(s[t]=e[t])}));var a=oe(s);o.forEach((function(t){void 0!==e[t]&&(r[t]=a[t])})),V=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?ee(r.pips):Z(),r.tooltips?I():Y(),A=[],ke(n(e.start)?e.start:i,t)}function je(){u=q(N),R(r.connect,u),he(r.events),ke(r.start),r.pips&&ee(r.pips),r.tooltips&&I(),W()}je();var Fe={destroy:Le,steps:De,on:me,off:ge,get:Ue,set:ke,setHandle:Me,reset:Ae,__moveHandles:function(e,t,r){xe(e,t,A,r)},options:s,updateOptions:Te,target:N,removePips:Z,removeTooltips:Y,getPositions:function(){return A.slice()},getTooltips:function(){return E},getOrigins:function(){return f},pips:ee};return Fe}function se(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var r=ae(e,oe(t),t);return e.noUiSlider=r,r}var le={__spectrum:U,cssClasses:O,create:se};e.create=se,e.cssClasses=O,e.default=le,Object.defineProperty(e,"__esModule",{value:!0})}(t)})));function p(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=t.slice().sort();return e.length===t.length&&e.slice().sort().every((function(e,t){return e===r[t]}))}function d(e,t,r,i,n,o,a,s,l,u){"boolean"!=typeof a&&(l=s,s=a,a=!1);const c="function"==typeof r?r.options:r;let p;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,n&&(c.functional=!0)),i&&(c._scopeId=i),o?(p=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=p):t&&(p=a?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),p)if(c.functional){const e=c.render;c.render=function(t,r){return p.call(r),e(t,r)}}else{const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,p):[p]}return r}const f={name:"Slider",emits:["input","update:modelValue","update","change"],props:{...{value:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1},modelValue:{validator:function(e){return e=>"number"==typeof e||e instanceof Array||null==e||!1===e},required:!1}},id:{type:[String,Number],required:!1},disabled:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},orientation:{type:String,required:!1,default:"horizontal"},direction:{type:String,required:!1,default:"ltr"},tooltips:{type:Boolean,required:!1,default:!0},options:{type:Object,required:!1,default:()=>({})},merge:{type:Number,required:!1,default:-1},format:{type:[Object,Function,Boolean],required:!1,default:null},classes:{type:Object,required:!1,default:()=>({})},showTooltip:{type:String,required:!1,default:"always"},tooltipPosition:{type:String,required:!1,default:null},lazy:{type:Boolean,required:!1,default:!0}},setup(s,l){const d=function(r,i,n){const{value:o,modelValue:s}=e(r),l=s&&void 0!==s.value?s:o,u=t(l.value);if(a(l.value))throw new Error("Slider v-model must be a Number or Array");if(Array.isArray(l.value)&&0==l.value.length)throw new Error("Slider v-model must not be an empty array");return{value:l,initialValue:u}}(s),f=function(t,i,n){const{classes:o,showTooltip:a,tooltipPosition:s,orientation:l}=e(t),u=r((()=>({target:"slider-target",focused:"slider-focused",tooltipFocus:"slider-tooltip-focus",tooltipDrag:"slider-tooltip-drag",ltr:"slider-ltr",rtl:"slider-rtl",horizontal:"slider-horizontal",vertical:"slider-vertical",textDirectionRtl:"slider-txt-dir-rtl",textDirectionLtr:"slider-txt-dir-ltr",base:"slider-base",connects:"slider-connects",connect:"slider-connect",origin:"slider-origin",handle:"slider-handle",handleLower:"slider-handle-lower",handleUpper:"slider-handle-upper",touchArea:"slider-touch-area",tooltip:"slider-tooltip",tooltipTop:"slider-tooltip-top",tooltipBottom:"slider-tooltip-bottom",tooltipLeft:"slider-tooltip-left",tooltipRight:"slider-tooltip-right",tooltipHidden:"slider-tooltip-hidden",active:"slider-active",draggable:"slider-draggable",tap:"slider-state-tap",drag:"slider-state-drag",pips:"slider-pips",pipsHorizontal:"slider-pips-horizontal",pipsVertical:"slider-pips-vertical",marker:"slider-marker",markerHorizontal:"slider-marker-horizontal",markerVertical:"slider-marker-vertical",markerNormal:"slider-marker-normal",markerLarge:"slider-marker-large",markerSub:"slider-marker-sub",value:"slider-value",valueHorizontal:"slider-value-horizontal",valueVertical:"slider-value-vertical",valueNormal:"slider-value-normal",valueLarge:"slider-value-large",valueSub:"slider-value-sub",...o.value})));return{classList:r((()=>{const e={...u.value};return Object.keys(e).forEach((t=>{e[t]=Array.isArray(e[t])?e[t].filter((e=>null!==e)).join(" "):e[t]})),"always"!==a.value&&(e.target+=` ${"drag"===a.value?e.tooltipDrag:e.tooltipFocus}`),"horizontal"===l.value&&(e.tooltip+="bottom"===s.value?` ${e.tooltipBottom}`:` ${e.tooltipTop}`),"vertical"===l.value&&(e.tooltip+="right"===s.value?` ${e.tooltipRight}`:` ${e.tooltipLeft}`),e}))}}(s),h=function(t,i,n){const{format:o,step:a}=e(t),s=n.value,l=n.classList,c=r((()=>o&&o.value?"function"==typeof o.value?{to:o.value}:u({...o.value}):u({decimals:a.value>=0?0:2})));return{tooltipsFormat:r((()=>Array.isArray(s.value)?s.value.map((e=>c.value)):c.value)),tooltipsMerge:(e,t,r)=>{var i="rtl"===getComputedStyle(e).direction,n="rtl"===e.noUiSlider.options.direction,o="vertical"===e.noUiSlider.options.orientation,a=e.noUiSlider.getTooltips(),s=e.noUiSlider.getOrigins();a.forEach((function(e,t){e&&s[t].appendChild(e)})),e.noUiSlider.on("update",(function(e,s,u,p,d){var f=[[]],h=[[]],m=[[]],v=0;a[0]&&(f[0][0]=0,h[0][0]=d[0],m[0][0]=c.value.to(parseFloat(e[0])));for(var g=1;gt)&&(f[++v]=[],m[v]=[],h[v]=[]),a[g]&&(f[v].push(g),m[v].push(c.value.to(parseFloat(e[g]))),h[v].push(d[g]));f.forEach((function(e,t){for(var s=e.length,u=0;u{a[c].classList.contains(e)&&a[c].classList.remove(e)}))}else a[c].style.display="none",l.value.tooltipHidden.split(" ").forEach((e=>{a[c].classList.add(e)}))}}))}))}}}(s,0,{value:d.value,classList:f.classList}),m=function(s,l,u){const{orientation:d,direction:f,tooltips:h,step:m,min:v,max:g,merge:b,id:y,disabled:S,options:x,classes:w,format:E,lazy:P}=e(s),C=u.value,N=u.initialValue,V=u.tooltipsFormat,k=u.tooltipsMerge,A=u.classList,M=t(null),U=t(null),L=t(!1),O=r((()=>{let e={cssPrefix:"",cssClasses:A.value,orientation:d.value,direction:f.value,tooltips:!!h.value&&V.value,connect:"lower",start:a(C.value)?v.value:C.value,range:{min:v.value,max:g.value}};return m.value>0&&(e.step=m.value),Array.isArray(C.value)&&(e.connect=!0),e})),D=r((()=>{let e={id:y&&y.value?y.value:void 0};return S.value&&(e.disabled=!0),e})),T=r((()=>Array.isArray(C.value))),j=()=>{let e=U.value.get();return Array.isArray(e)?e.map((e=>parseFloat(e))):parseFloat(e)},F=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];U.value.set(e,t)},z=e=>{l.emit("input",e),l.emit("update:modelValue",e),l.emit("update",e)},_=()=>{U.value=c.create(M.value,Object.assign({},O.value,x.value)),h.value&&T.value&&b.value>=0&&k(M.value,b.value," - "),U.value.on("set",(e=>{const t=j();l.emit("change",t),P.value&&z(t)})),U.value.on("update",(e=>{if(!L.value)return;const t=j();T.value&&p(C.value,t)||!T.value&&C.value==t?l.emit("update",t):P.value||z(t)})),M.value.querySelectorAll("[data-handle]").forEach((e=>{e.onblur=()=>{A.value.focused.split(" ").forEach((e=>{M.value.classList.remove(e)}))},e.onfocus=()=>{A.value.focused.split(" ").forEach((e=>{M.value.classList.add(e)}))}})),L.value=!0},H=()=>{U.value.off(),U.value.destroy(),U.value=null},R=(e,t)=>{L.value=!1,H(),_()};return i(_),n(H),o(C,((e,t)=>{t&&("object"==typeof t&&"object"==typeof e&&e&&Object.keys(t)>Object.keys(e)||"object"==typeof t&&"object"!=typeof e||!e)&&R()}),{immediate:!1}),o(T,R,{immediate:!1}),o(v,R,{immediate:!1}),o(g,R,{immediate:!1}),o(m,R,{immediate:!1}),o(d,R,{immediate:!1}),o(f,R,{immediate:!1}),o(h,R,{immediate:!1}),o(b,R,{immediate:!1}),o(E,R,{immediate:!1,deep:!0}),o(x,R,{immediate:!1,deep:!0}),o(w,R,{immediate:!1,deep:!0}),o(C,(e=>{if(a(e))return void F(v.value,!1);let t=j();T.value&&!Array.isArray(t)&&(t=[t]),(T.value&&!p(e,t)||!T.value&&e!=t)&&F(e,!1)}),{deep:!0}),{slider:M,slider$:U,isRange:T,sliderProps:D,init:_,destroy:H,refresh:R,update:F,reset:()=>{z(N.value)}}}(s,l,{value:d.value,initialValue:d.initialValue,tooltipsFormat:h.tooltipsFormat,tooltipsMerge:h.tooltipsMerge,classList:f.classList});return{...f,...h,...m}}};var h=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",e._b({ref:"slider"},"div",e.sliderProps,!1))};h._withStripped=!0;const m=d({render:h,staticRenderFns:[]},undefined,f,undefined,false,undefined,!1,void 0,void 0,void 0);export{m as default}; diff --git a/jest/jest.config.vue2.js b/jest/jest.config.vue2.js index 6729ab3..c8bc340 100644 --- a/jest/jest.config.vue2.js +++ b/jest/jest.config.vue2.js @@ -15,7 +15,7 @@ module.exports = { "/node_modules/" ], "moduleNameMapper": { - "^composition-api$": "/node_modules/vue-prev-composition-api", + "^composition-api$": "/node_modules/vue-prev", "^@vue/test-utils$": "/node_modules/vue-prev-test-utils", "^vue$": "/node_modules/vue-prev", '^vue-jest$': "/node_modules/vue-prev-jest", diff --git a/package.json b/package.json index fb53230..21f6d04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vueform/slider", - "version": "2.0.10", + "version": "2.1.0", "private": false, "description": "Vue 3 slider component with multihandles, tooltips merging and formatting.", "license": "MIT", diff --git a/src/composables/useValue.js b/src/composables/useValue.js index fdbd638..8974765 100644 --- a/src/composables/useValue.js +++ b/src/composables/useValue.js @@ -8,7 +8,7 @@ export default function useValue (props, context, dependencies) // ================ DATA ================ /* istanbul ignore next */ - const value = context.expose !== undefined ? modelValue : baseValue + const value = modelValue && modelValue.value !== undefined ? modelValue : baseValue const initialValue = ref(value.value) diff --git a/tests/unit/helpers/vue2.js b/tests/unit/helpers/vue2.js index 1034e8e..436938c 100644 --- a/tests/unit/helpers/vue2.js +++ b/tests/unit/helpers/vue2.js @@ -1,10 +1,8 @@ import { mount, createLocalVue } from '@vue/test-utils' -import CompositionApi from 'composition-api' import Slider from './../../../src/Slider' export const createSlider = (props = {}, options = {}) => { const localVue = createLocalVue() - localVue.use(CompositionApi) let config = { localVue, diff --git a/themes/default.css b/themes/default.css index 0d30467..a98ce14 100644 --- a/themes/default.css +++ b/themes/default.css @@ -1 +1 @@ -.slider-target,.slider-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box;touch-action:none;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none}.slider-target{position:relative}.slider-base,.slider-connects{height:100%;position:relative;width:100%;z-index:1}.slider-connects{overflow:hidden;z-index:0}.slider-connect,.slider-origin{height:100%;position:absolute;right:0;top:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-style:flat;width:100%;will-change:transform;z-index:1}.slider-txt-dir-rtl.slider-horizontal .slider-origin{left:0;right:auto}.slider-vertical .slider-origin{top:-100%;width:0}.slider-horizontal .slider-origin{height:0}.slider-handle{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute}.slider-touch-area{height:100%;width:100%}.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{transition:transform .3s}.slider-state-drag *{cursor:inherit!important}.slider-tooltip-drag .slider-tooltip,.slider-tooltip-focus .slider-tooltip{display:none!important}.slider-tooltip-drag .slider-active .slider-tooltip,.slider-tooltip-drag.slider-state-drag .slider-tooltip:not(.slider-tooltip-hidden),.slider-tooltip-focus.slider-focused .slider-tooltip:not(.slider-tooltip-hidden){display:block!important}.slider-horizontal{height:var(--slider-height,6px)}.slider-horizontal .slider-handle{height:var(--slider-handle-height,16px);right:calc(var(--slider-handle-width, 16px)/2*-1);top:calc(var(--slider-handle-height, 16px)/2*-1 - var(--slider-height, 6px)/2*-1 + -1px);width:var(--slider-handle-width,16px)}.slider-vertical{height:var(--slider-vertical-height,300px);width:var(--slider-height,6px)}.slider-vertical .slider-handle{bottom:calc(var(--slider-handle-width, 16px)/2*-1);height:var(--slider-handle-width,16px);right:calc(var(--slider-handle-height, 16px)/2*-1 - var(--slider-height, 6px)/2*-1 + -1px);width:var(--slider-handle-height,16px)}.slider-txt-dir-rtl.slider-horizontal .slider-handle{left:calc(var(--slider-handle-width, 16px)/2*-1);right:auto}.slider-base{background-color:var(--slider-bg,#d1d5db)}.slider-base,.slider-connects{border-radius:var(--slider-radius,9999px)}.slider-connect{background:var(--slider-connect-bg,#10b981);cursor:pointer}.slider-draggable{cursor:ew-resize}.slider-vertical .slider-draggable{cursor:ns-resize}.slider-handle{background:var(--slider-handle-bg,#fff);border:var(--slider-handle-border,0);border-radius:var(--slider-handle-radius,9999px);box-shadow:var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));cursor:-webkit-grab;cursor:grab;height:var(--slider-handle-height,16px);width:var(--slider-handle-width,16px)}.slider-handle:focus{box-shadow:0 0 0 var(--slider-handle-ring-width,3px) var(--slider-handle-ring-color,#10b98130),var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));outline:none}.slider-active{box-shadow:var(--slider-handle-shadow-active,.5px .5px 2px 1px rgba(0,0,0,.42));cursor:-webkit-grabbing;cursor:grabbing}[disabled] .slider-connect{background:var(--slider-connect-bg-disabled,#9ca3af)}[disabled].slider-handle,[disabled] .slider-handle,[disabled].slider-target{cursor:not-allowed}[disabled] .slider-tooltip{background:var(--slider-tooltip-bg-disabled,#9ca3af);border-color:var(--slider-tooltip-bg-disabled,#9ca3af)}.slider-tooltip{background:var(--slider-tooltip-bg,#10b981);border:1px solid var(--slider-tooltip-bg,#10b981);border-radius:var(--slider-tooltip-radius,5px);color:var(--slider-tooltip-color,#fff);display:block;font-size:var(--slider-tooltip-font-size,.875rem);font-weight:var(--slider-tooltip-font-weight,600);line-height:var(--slider-tooltip-line-height,1.25rem);min-width:var(--slider-tooltip-min-width,20px);padding:var(--slider-tooltip-py,2px) var(--slider-tooltip-px,6px);position:absolute;text-align:center;white-space:nowrap}.slider-horizontal .slider-tooltip-top{bottom:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));left:50%;transform:translate(-50%)}.slider-horizontal .slider-tooltip-top:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-top-color:inherit;bottom:calc(var(--slider-tooltip-arrow-size, 5px)*-2);content:"";height:0;left:50%;position:absolute;transform:translate(-50%);width:0}.slider-horizontal .slider-tooltip-bottom{left:50%;top:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));transform:translate(-50%)}.slider-horizontal .slider-tooltip-bottom:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-bottom-color:inherit;content:"";height:0;left:50%;position:absolute;top:calc(var(--slider-tooltip-arrow-size, 5px)*-2);transform:translate(-50%);width:0}.slider-vertical .slider-tooltip-left{right:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));top:50%;transform:translateY(-50%)}.slider-vertical .slider-tooltip-left:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-left-color:inherit;content:"";height:0;position:absolute;right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);top:50%;transform:translateY(-50%);width:0}.slider-vertical .slider-tooltip-right{left:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));top:50%;transform:translateY(-50%)}.slider-vertical .slider-tooltip-right:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-right-color:inherit;content:"";height:0;left:calc(var(--slider-tooltip-arrow-size, 5px)*-2);position:absolute;top:50%;transform:translateY(-50%);width:0}.slider-horizontal .slider-origin>.slider-tooltip{left:auto;transform:translate(50%)}.slider-horizontal .slider-origin>.slider-tooltip-top{bottom:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-handle-height, 16px)/2 - var(--slider-height, 6px)/2 + var(--slider-tooltip-distance, 3px) + 1px)}.slider-horizontal .slider-origin>.slider-tooltip-bottom{top:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-handle-height, 16px)/2 - var(--slider-height, 6px)/2 + var(--slider-tooltip-distance, 3px) + var(--slider-height, 6px) - 1px)}.slider-vertical .slider-origin>.slider-tooltip{top:auto;transform:translateY(calc(var(--slider-tooltip-line-height, 1.25rem)*-1 - var(--slider-tooltip-py, 2px)*-1 + 1px))}.slider-vertical .slider-origin>.slider-tooltip-left{right:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + var(--slider-handle-height, 16px)/2 - var(--slider-height, 6px)/2 + var(--slider-tooltip-distance, 3px) - 1px)}.slider-vertical .slider-origin>.slider-tooltip-right{left:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + var(--slider-handle-height, 16px)/2 - var(--slider-height, 6px)/2 + var(--slider-tooltip-distance, 3px) - var(--slider-height, 6px) + 1px)} \ No newline at end of file +.slider-target,.slider-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing:border-box;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slider-target{position:relative}.slider-base,.slider-connects{height:100%;position:relative;width:100%;z-index:1}.slider-connects{overflow:hidden;z-index:0}.slider-connect,.slider-origin{height:100%;position:absolute;right:0;top:0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform-style:preserve-3d;transform-style:flat;width:100%;will-change:transform;z-index:1}.slider-txt-dir-rtl.slider-horizontal .slider-origin{left:0;right:auto}.slider-vertical .slider-origin{top:-100%;width:0}.slider-horizontal .slider-origin{height:0}.slider-handle{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute}.slider-touch-area{height:100%;width:100%}.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{transition:transform .3s}.slider-state-drag *{cursor:inherit!important}.slider-tooltip-drag .slider-tooltip,.slider-tooltip-focus .slider-tooltip{display:none!important}.slider-tooltip-drag .slider-active .slider-tooltip,.slider-tooltip-drag.slider-state-drag .slider-tooltip:not(.slider-tooltip-hidden),.slider-tooltip-focus.slider-focused .slider-tooltip:not(.slider-tooltip-hidden){display:block!important}.slider-horizontal{height:var(--slider-height,6px)}.slider-horizontal .slider-handle{height:var(--slider-handle-height,16px);right:calc(var(--slider-handle-width, 16px)/2*-1);top:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);width:var(--slider-handle-width,16px)}.slider-vertical{height:var(--slider-vertical-height,300px);width:var(--slider-height,6px)}.slider-vertical .slider-handle{bottom:calc(var(--slider-handle-width, 16px)/2*-1);height:var(--slider-handle-width,16px);right:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);width:var(--slider-handle-height,16px)}.slider-txt-dir-rtl.slider-horizontal .slider-handle{left:calc(var(--slider-handle-width, 16px)/2*-1);right:auto}.slider-base{background-color:var(--slider-bg,#d1d5db)}.slider-base,.slider-connects{border-radius:var(--slider-radius,9999px)}.slider-connect{background:var(--slider-connect-bg,#10b981);cursor:pointer}.slider-draggable{cursor:ew-resize}.slider-vertical .slider-draggable{cursor:ns-resize}.slider-handle{background:var(--slider-handle-bg,#fff);border:var(--slider-handle-border,0);border-radius:var(--slider-handle-radius,9999px);box-shadow:var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));cursor:-webkit-grab;cursor:grab;height:var(--slider-handle-height,16px);width:var(--slider-handle-width,16px)}.slider-handle:focus{box-shadow:0 0 0 var(--slider-handle-ring-width,3px) var(--slider-handle-ring-color,rgba(16,185,129,.188)),var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));outline:none}.slider-active{box-shadow:var(--slider-handle-shadow-active,.5px .5px 2px 1px rgba(0,0,0,.42));cursor:-webkit-grabbing;cursor:grabbing}[disabled] .slider-connect{background:var(--slider-connect-bg-disabled,#9ca3af)}[disabled] .slider-handle,[disabled].slider-handle,[disabled].slider-target{cursor:not-allowed}[disabled] .slider-tooltip{background:var(--slider-tooltip-bg-disabled,#9ca3af);border-color:var(--slider-tooltip-bg-disabled,#9ca3af)}.slider-tooltip{background:var(--slider-tooltip-bg,#10b981);border:1px solid var(--slider-tooltip-bg,#10b981);border-radius:var(--slider-tooltip-radius,5px);color:var(--slider-tooltip-color,#fff);display:block;font-size:var(--slider-tooltip-font-size,.875rem);font-weight:var(--slider-tooltip-font-weight,600);line-height:var(--slider-tooltip-line-height,1.25rem);min-width:var(--slider-tooltip-min-width,20px);padding:var(--slider-tooltip-py,2px) var(--slider-tooltip-px,6px);position:absolute;text-align:center;white-space:nowrap}.slider-horizontal .slider-tooltip-top{bottom:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));left:50%;transform:translate(-50%)}.slider-horizontal .slider-tooltip-top:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-top-color:inherit;bottom:calc(var(--slider-tooltip-arrow-size, 5px)*-2);content:"";height:0;left:50%;position:absolute;transform:translate(-50%);width:0}.slider-horizontal .slider-tooltip-bottom{left:50%;top:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));transform:translate(-50%)}.slider-horizontal .slider-tooltip-bottom:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-bottom-color:inherit;content:"";height:0;left:50%;position:absolute;top:calc(var(--slider-tooltip-arrow-size, 5px)*-2);transform:translate(-50%);width:0}.slider-vertical .slider-tooltip-left{right:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));top:50%;transform:translateY(-50%)}.slider-vertical .slider-tooltip-left:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-left-color:inherit;content:"";height:0;position:absolute;right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);top:50%;transform:translateY(-50%);width:0}.slider-vertical .slider-tooltip-right{left:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));top:50%;transform:translateY(-50%)}.slider-vertical .slider-tooltip-right:before{border:var(--slider-tooltip-arrow-size,5px) solid transparent;border-right-color:inherit;content:"";height:0;left:calc(var(--slider-tooltip-arrow-size, 5px)*-2);position:absolute;top:50%;transform:translateY(-50%);width:0}.slider-horizontal .slider-origin>.slider-tooltip{left:auto;transform:translate(50%)}.slider-horizontal .slider-origin>.slider-tooltip-top{bottom:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + 1px)}.slider-horizontal .slider-origin>.slider-tooltip-bottom{top:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + var(--slider-height, 6px) - 1px)}.slider-vertical .slider-origin>.slider-tooltip{top:auto;transform:translateY(calc((var(--slider-tooltip-line-height, 1.25rem) - var(--slider-tooltip-py, 2px))*-1 + 1px))}.slider-vertical .slider-origin>.slider-tooltip-left{right:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - 1px)}.slider-vertical .slider-origin>.slider-tooltip-right{left:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - var(--slider-height, 6px) + 1px)} \ No newline at end of file