@frangoteam/fuxa
Version:
Web-based Process Visualization (SCADA/HMI/Dashboard) software
1 lines • 27.6 kB
JavaScript
(function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()})(function(){"use strict";function t(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}function e(t){t.parentElement.removeChild(t)}function r(t){return null!=t}function n(t){t.preventDefault()}function i(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function o(t,e){return Math.round(t/e)*e}function a(t,e){var r=t.getBoundingClientRect(),n=t.ownerDocument,i=n.documentElement,o=m(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),e?r.top+o.y-i.clientTop:r.left+o.x-i.clientLeft}function s(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function l(t,e,r){r>0&&(p(t,e),setTimeout(function(){d(t,e)},r))}function u(t){return Math.max(Math.min(t,100),0)}function c(t){return Array.isArray(t)?t:[t]}function f(t){t=String(t);var e=t.split(".");return e.length>1?e[1].length:0}function p(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function d(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function h(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function m(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||""),n=e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,i=e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop;return{x:n,y:i}}function g(){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 v(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function b(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function x(t,e){return 100/(e-t)}function S(t,e){return 100*e/(t[1]-t[0])}function w(t,e){return S(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function y(t,e){return e*(t[1]-t[0])/100+t[0]}function E(t,e){for(var r=1;t>=e[r];)r+=1;return r}function C(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=E(r,t),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return a+w([i,o],r)/x(a,s)}function k(t,e,r){if(r>=100)return t.slice(-1)[0];var n=E(r,e),i=t[n-1],o=t[n],a=e[n-1],s=e[n];return y([i,o],(r-a)*x(a,s))}function N(t,e,r,n){if(100===n)return n;var i=E(n,t),a=t[i-1],s=t[i];return r?n-a>(s-a)/2?s:a:e[i-1]?t[i-1]+o(n-t[i-1],e[i-1]):n}function U(t,e,r){var n;if("number"==typeof e&&(e=[e]),!Array.isArray(e))throw new Error("noUiSlider ("+tt+"): 'range' contains invalid value.");if(n="min"===t?0:"max"===t?100:parseFloat(t),!s(n)||!s(e[0]))throw new Error("noUiSlider ("+tt+"): 'range' value isn't numeric.");r.xPct.push(n),r.xVal.push(e[0]),n?r.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(r.xSteps[0]=e[1]),r.xHighestCompleteStep.push(0)}function P(t,e,r){if(e)if(r.xVal[t]!==r.xVal[t+1]){r.xSteps[t]=S([r.xVal[t],r.xVal[t+1]],e)/x(r.xPct[t],r.xPct[t+1]);var n=(r.xVal[t+1]-r.xVal[t])/r.xNumSteps[t],i=Math.ceil(Number(n.toFixed(3))-1),o=r.xVal[t]+r.xNumSteps[t]*i;r.xHighestCompleteStep[t]=o}else r.xSteps[t]=r.xHighestCompleteStep[t]=r.xVal[t]}function V(t,e,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i=[];for(n in t)t.hasOwnProperty(n)&&i.push([t[n],n]);for(i.length&&"object"==typeof i[0][0]?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),n=0;n<i.length;n++)U(i[n][1],i[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)P(n,this.xNumSteps[n],this)}function A(e){if(t(e))return!0;throw new Error("noUiSlider ("+tt+"): 'format' requires 'to' and 'from' methods.")}function M(t,e){if(!s(e))throw new Error("noUiSlider ("+tt+"): 'step' is not numeric.");t.singleStep=e}function O(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider ("+tt+"): 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider ("+tt+"): Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider ("+tt+"): 'range' 'min' and 'max' cannot be equal.");t.spectrum=new V(e,t.snap,t.singleStep)}function L(t,e){if(e=c(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider ("+tt+"): 'start' option is incorrect.");t.handles=e.length,t.start=e}function j(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+tt+"): 'snap' option must be a boolean.")}function z(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+tt+"): 'animate' option must be a boolean.")}function H(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider ("+tt+"): 'animationDuration' option must be a number.")}function D(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r<t.handles;r++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider ("+tt+"): 'connect' option doesn't match handle count.");n=e}t.connect=n}function F(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider ("+tt+"): 'orientation' option is invalid.")}}function R(t,e){if(!s(e))throw new Error("noUiSlider ("+tt+"): 'margin' option must be numeric.");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error("noUiSlider ("+tt+"): 'margin' option is only supported on linear sliders.")}function T(t,e){if(!s(e))throw new Error("noUiSlider ("+tt+"): 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error("noUiSlider ("+tt+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function B(t,e){if(!s(e)&&!Array.isArray(e))throw new Error("noUiSlider ("+tt+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!s(e[0])&&!s(e[1]))throw new Error("noUiSlider ("+tt+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){if(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getMargin(e[0]),t.spectrum.getMargin(e[1])],!1===t.padding[0]||!1===t.padding[1])throw new Error("noUiSlider ("+tt+"): 'padding' option is only supported on linear sliders.");if(t.padding[0]<0||t.padding[1]<0)throw new Error("noUiSlider ("+tt+"): 'padding' option must be a positive number(s).");if(t.padding[0]+t.padding[1]>100)throw new Error("noUiSlider ("+tt+"): 'padding' option must not exceed 100% of the range.")}}function q(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider ("+tt+"): 'direction' option was not recognized.")}}function X(t,e){if("string"!=typeof e)throw new Error("noUiSlider ("+tt+"): '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;if(i){if(2!==t.handles)throw new Error("noUiSlider ("+tt+"): 'fixed' behaviour must be used with 2 handles");R(t,t.start[1]-t.start[0])}if(s&&(t.margin||t.limit))throw new Error("noUiSlider ("+tt+"): 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||o,drag:n,fixed:i,snap:o,hover:a,unconstrained:s}}function W(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var r=0;r<t.handles;r++)t.tooltips.push(!0)}else{if(t.tooltips=c(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider ("+tt+"): must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider ("+tt+"): 'tooltips' must be passed a formatter or 'false'.")})}}function Y(t,e){t.ariaFormat=e,A(e)}function _(t,e){t.format=e,A(e)}function I(t,e){if(t.keyboardSupport=e,"boolean"!=typeof e)throw new Error("noUiSlider ("+tt+"): 'keyboardSupport' option must be a boolean.")}function $(t,e){t.documentElement=e}function G(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider ("+tt+"): 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function J(t,e){if("object"!=typeof e)throw new Error("noUiSlider ("+tt+"): 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix)for(var r in t.cssClasses={},e)e.hasOwnProperty(r)&&(t.cssClasses[r]=t.cssPrefix+e[r]);else t.cssClasses=e}function K(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:et,format:et},n={step:{r:!1,t:M},start:{r:!0,t:L},connect:{r:!0,t:D},direction:{r:!0,t:q},snap:{r:!1,t:j},animate:{r:!1,t:z},animationDuration:{r:!1,t:H},range:{r:!0,t:O},orientation:{r:!1,t:F},margin:{r:!1,t:R},limit:{r:!1,t:T},padding:{r:!1,t:B},behaviour:{r:!0,t:X},ariaFormat:{r:!1,t:Y},format:{r:!1,t:_},tooltips:{r:!1,t:W},keyboardSupport:{r:!0,t:I},documentElement:{r:!1,t:$},cssPrefix:{r:!0,t:G},cssClasses:{r:!0,t:J}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:{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"}};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(n).forEach(function(o){if(!r(t[o])&&void 0===i[o]){if(n[o].r)throw new Error("noUiSlider ("+tt+"): '"+o+"' is required.");return!0}n[o].t(e,r(t[o])?t[o]:i[o])}),e.pips=t.pips;var o=document.createElement("div"),a=void 0!==o.style.msTransform,s=void 0!==o.style.transform;e.transformRule=s?"transform":a?"msTransform":"webkitTransform";var l=[["left","top"],["right","bottom"]];return e.style=l[e.dir][e.ort],e.shape=t.shape,e.marker=t.marker,e}function Q(t,r,o){function s(t,e){var r=Mt.createElement("div");return e&&p(r,e),t.appendChild(r),r}function f(t,e){var n=s(t,r.cssClasses.origin),i=s(n,r.cssClasses.handle);return s(i,r.cssClasses.touchArea),i.setAttribute("data-handle",e),r.keyboardSupport&&(i.setAttribute("tabindex","0"),i.addEventListener("keydown",function(t){return W(t,e)})),i.setAttribute("role","slider"),i.setAttribute("aria-orientation",r.ort?"vertical":"horizontal"),0===e?p(i,r.cssClasses.handleLower):e===r.handles-1&&p(i,r.cssClasses.handleUpper),r.shape&&void 0!==r.shape.handleColor&&(i.style.background=r.shape.handleColor),n}function x(t,e){return!!e&&s(t,r.cssClasses.connect)}function S(t,e){var n=s(e,r.cssClasses.connects);gt=[],vt=[];var i=x(n,t[0]);vt.push(i),r.shape&&(void 0!==r.shape.baseColor&&(n.style.background=r.shape.baseColor),void 0!==r.shape.connectColor&&(i.style.background=r.shape.connectColor));for(var o=0;o<r.handles;o++)gt.push(f(e,o)),Pt[o]=o,vt.push(x(n,t[o+1]))}function w(t){p(t,r.cssClasses.target),0===r.dir?p(t,r.cssClasses.ltr):p(t,r.cssClasses.rtl),0===r.ort?p(t,r.cssClasses.horizontal):p(t,r.cssClasses.vertical);var e=getComputedStyle(t).direction;return p(t,"rtl"===e?r.cssClasses.textDirectionRtl:r.cssClasses.textDirectionLtr),s(t,r.cssClasses.base)}function y(t,e){return!!r.tooltips[e]&&s(t.firstChild,r.cssClasses.tooltip)}function E(){return Ct.hasAttribute("disabled")}function C(t){var e=gt[t];return e.hasAttribute("disabled")}function k(){xt&&(I("update.tooltips"),xt.forEach(function(t){t&&e(t)}),xt=null)}function N(){k(),xt=gt.map(y),_("update.tooltips",function(t,e,n){if(xt[e]){var i=t[e];!0!==r.tooltips[e]&&(i=r.tooltips[e].to(n[e])),xt[e].innerHTML=i}})}function U(){_("update",function(t,e,n,i,o){Pt.forEach(function(t){var e=gt[t],i=G(Ut,t,0,!0,!0,!0),a=G(Ut,t,100,!0,!0,!0),s=o[t],l=r.ariaFormat.to(n[t]);i=kt.fromStepping(i).toFixed(1),a=kt.fromStepping(a).toFixed(1),s=kt.fromStepping(s).toFixed(1),e.children[0].setAttribute("aria-valuemin",i),e.children[0].setAttribute("aria-valuemax",a),e.children[0].setAttribute("aria-valuenow",s),e.children[0].setAttribute("aria-valuetext",l)})})}function P(t,e,r){if("range"===t||"steps"===t)return kt.xVal;if("count"===t){if(e<2)throw new Error("noUiSlider ("+tt+"): 'values' (>= 2) required for mode 'count'.");var n=e-1,i=100/n;for(e=[];n--;)e[n]=n*i;e.push(100),t="positions"}return"positions"===t?e.map(function(t){return kt.fromStepping(r?kt.getStep(t):t)}):"values"===t?r?e.map(function(t){return kt.fromStepping(kt.getStep(kt.toStepping(t)))}):e:void 0}function V(t,e,r){function n(t,e){return(t+e).toFixed(7)/1}var o={},a=kt.xVal[0],s=kt.xVal[kt.xVal.length-1],l=!1,u=!1,c=0;return r=i(r.slice().sort(function(t,e){return t-e})),r[0]!==a&&(r.unshift(a),l=!0),r[r.length-1]!==s&&(r.push(s),u=!0),r.forEach(function(i,a){var s,f,p,d,h,m,g,v,b,x,S=i,w=r[a+1],y="steps"===e;if(y&&(s=kt.xNumSteps[a]),s||(s=w-S),!1!==S&&void 0!==w)for(s=Math.max(s,1e-7),f=S;f<=w;f=n(f,s)){for(d=kt.toStepping(f),h=d-c,v=h/t,b=Math.round(v),x=h/b,p=1;p<=b;p+=1)m=c+p*x,o[m.toFixed(5)]=[kt.fromStepping(m),0];g=r.indexOf(f)>-1?Ht:y?Dt:zt,!a&&l&&f!==w&&(g=0),f===w&&u||(o[d.toFixed(5)]=[f,g]),c=d}}),o}function A(t,e,n){function i(t,e){var n=e===r.cssClasses.value,i=n?c:f,o=n?l:u;return e+" "+i[r.ort]+" "+o[t]}function o(t,o,l){if(l=e?e(o,l):l,l!==jt){var u=s(a,!1);if(u.className=i(l,r.cssClasses.marker),u.style[r.style]=t+"%",r.marker){r.marker.color&&(u.style.background=r.marker.color);var c=1===l?"div":"sub";void 0!==r.marker[c+"Width"]&&(u.style.width=r.marker[c+"Width"]+"px"),void 0!==r.marker[c+"Height"]&&(u.style.height=r.marker[c+"Height"]+"px")}l>zt&&(u=s(a,!1),u.className=i(l,r.cssClasses.value),u.setAttribute("data-value",o),u.style[r.style]=t+"%",u.innerHTML=n.to(o),0===r.ort?u.style["padding-top"]=r.marker.divHeight/2+"px":u.style["padding-left"]=3+r.marker.divWidth+"px",r.marker&&(void 0!==r.marker.fontSize&&(u.style["font-size"]=r.marker.fontSize+"px"),void 0!==r.marker.color&&(u.style.color=r.marker.color)))}}var a=Mt.createElement("div"),l=[];l[zt]=r.cssClasses.valueNormal,l[Ht]=r.cssClasses.valueLarge,l[Dt]=r.cssClasses.valueSub;var u=[];u[zt]=r.cssClasses.markerNormal,u[Ht]=r.cssClasses.markerLarge,u[Dt]=r.cssClasses.markerSub;var c=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],f=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];return p(a,r.cssClasses.pips),p(a,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){o(e,t[e][0],t[e][1])}),a}function M(){bt&&(e(bt),bt=null)}function O(t){M();var e=t.mode,r=t.density||1,n=t.filter||!1,i=t.values||!1,o=t.stepped||!1,a=P(e,i,o),s=V(r,e,a),l=t.format||{to:Math.round};return t.density>0&&(bt=Ct.appendChild(A(s,n,l))),bt}function L(){var t=mt.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||mt[e]:t.height||mt[e]}function j(t,e,n,i){var o=function(o){return o=z(o,i.pageOffset,i.target||e),!!o&&(!(E()&&!i.doNotReject)&&(!(h(Ct,r.cssClasses.tap)&&!i.doNotReject)&&(!(t===wt.start&&void 0!==o.buttons&&o.buttons>1)&&((!i.hover||!o.buttons)&&(Et||o.preventDefault(),o.calcPoint=o.points[r.ort],void n(o,i))))))},a=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!!Et&&{passive:!0}),a.push([t,o])}),a}function z(t,e,r){var n,i,o=0===t.type.indexOf("touch"),a=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");if(0===t.type.indexOf("MSPointer")&&(s=!0),o){var l=function(t){return t.target===r||r.contains(t.target)||t.target.shadowRoot&&t.target.shadowRoot.contains(r)};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;n=u[0].pageX,i=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;n=c.pageX,i=c.pageY}}return e=e||m(Mt),(a||s)&&(n=t.clientX+e.x,i=t.clientY+e.y),t.pageOffset=e,t.points=[n,i],t.cursor=a||s,t}function H(t){var e=t-a(mt,r.ort),n=100*e/L();return n=u(n),r.dir?100-n:n}function D(t){var e=100,r=!1;return gt.forEach(function(n,i){if(!C(i)){var o=Ut[i],a=Math.abs(o-t),s=100===a&&100===e,l=a<e,u=a<=e&&t>o;(l||u||s)&&(r=i,e=a)}}),r}function F(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&T(t,e)}function R(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return T(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint),i=100*n/e.baseSize;Q(n>0,i,e.locations,e.handleNumbers)}function T(t,e){e.handle&&(d(e.handle,r.cssClasses.active),Vt-=1),e.listeners.forEach(function(t){Ot.removeEventListener(t[0],t[1])}),0===Vt&&(d(Ct,r.cssClasses.drag),rt(),t.cursor&&(Lt.style.cursor="",Lt.removeEventListener("selectstart",n))),e.handleNumbers.forEach(function(t){$("change",t),$("set",t),$("end",t)})}function B(t,e){if(e.handleNumbers.some(C))return!1;var i;if(1===e.handleNumbers.length){var o=gt[e.handleNumbers[0]];i=o.children[0],Vt+=1,p(i,r.cssClasses.active)}t.stopPropagation();var a=[],s=j(wt.move,Ot,R,{target:t.target,handle:i,listeners:a,startCalcPoint:t.calcPoint,baseSize:L(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:Ut.slice()}),l=j(wt.end,Ot,T,{target:t.target,handle:i,listeners:a,doNotReject:!0,handleNumbers:e.handleNumbers}),u=j("mouseout",Ot,F,{target:t.target,handle:i,listeners:a,doNotReject:!0,handleNumbers:e.handleNumbers});a.push.apply(a,s.concat(l,u)),t.cursor&&(Lt.style.cursor=getComputedStyle(t.target).cursor,gt.length>1&&p(Ct,r.cssClasses.drag),Lt.addEventListener("selectstart",n,!1)),e.handleNumbers.forEach(function(t){$("start",t)})}function q(t){t.stopPropagation();var e=H(t.calcPoint),n=D(e);if(!1===n)return!1;r.events.snap||l(Ct,r.cssClasses.tap,r.animationDuration),nt(n,e,!0,!0),rt(),$("slide",n,!0),$("update",n,!0),$("change",n,!0),$("set",n,!0),r.events.snap&&B(t,{handleNumbers:[n]})}function X(t){var e=H(t.calcPoint),r=kt.getStep(e),n=kt.fromStepping(r);Object.keys(At).forEach(function(t){"hover"===t.split(".")[0]&&At[t].forEach(function(t){t.call(St,n)})})}function W(t,e){if(E()||C(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],f=l===i[0]||l===n[0]||u,p=l===i[1]||l===n[1]||c,d=l===a[0],h=l===a[1];if(!(f||p||d||h))return!0;if(t.preventDefault(),p||f){var m=5,g=f?0:1,v=ft(e),b=v[g];if(null===b)return!1;!1===b&&(b=kt.getDefaultStep(Ut[e],f,10)),(c||u)&&(b*=m),b=Math.max(b,1e-7),b*=f?-1:1,s=Nt[e]+b}else s=h?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return nt(e,kt.toStepping(s),!0,!0),$("slide",e),$("update",e),$("change",e),$("set",e),!1}function Y(t){t.fixed||gt.forEach(function(t,e){j(wt.start,t.children[0],B,{handleNumbers:[e]})}),t.tap&&j(wt.start,mt,q,{}),t.hover&&j(wt.move,mt,X,{hover:!0}),t.drag&&vt.forEach(function(e,n){if(!1!==e&&0!==n&&n!==vt.length-1){var i=gt[n-1],o=gt[n],a=[e];p(e,r.cssClasses.draggable),t.fixed&&(a.push(i.children[0]),a.push(o.children[0])),a.forEach(function(t){j(wt.start,t,B,{handles:[i,o],handleNumbers:[n-1,n]})})}})}function _(t,e){At[t]=At[t]||[],At[t].push(e),"update"===t.split(".")[0]&>.forEach(function(t,e){$("update",e)})}function I(t){var e=t&&t.split(".")[0],r=e&&t.substring(e.length);Object.keys(At).forEach(function(t){var n=t.split(".")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||delete At[t]})}function $(t,e,n){Object.keys(At).forEach(function(i){var o=i.split(".")[0];t===o&&At[i].forEach(function(t){t.call(St,Nt.map(r.format.to),e,Nt.slice(),n||!1,Ut.slice(),St)})})}function G(t,e,n,i,o,a){return gt.length>1&&!r.events.unconstrained&&(i&&e>0&&(n=Math.max(n,t[e-1]+r.margin)),o&&e<gt.length-1&&(n=Math.min(n,t[e+1]-r.margin))),gt.length>1&&r.limit&&(i&&e>0&&(n=Math.min(n,t[e-1]+r.limit)),o&&e<gt.length-1&&(n=Math.max(n,t[e+1]-r.limit))),r.padding&&(0===e&&(n=Math.max(n,r.padding[0])),e===gt.length-1&&(n=Math.min(n,100-r.padding[1]))),n=kt.getStep(n),n=u(n),!(n===t[e]&&!a)&&n}function J(t,e){var n=r.ort;return(n?e:t)+", "+(n?t:e)}function Q(t,e,r,n){var i=r.slice(),o=[!t,t],a=[t,!t];n=n.slice(),t&&n.reverse(),n.length>1?n.forEach(function(t,r){var n=G(i,t,i[t]+e,o[r],a[r],!1);!1===n?e=0:(e=n-i[t],i[t]=n)}):o=a=[!0];var s=!1;n.forEach(function(t,n){s=nt(t,r[t]+e,o[n],a[n])||s}),s&&n.forEach(function(t){$("update",t),$("slide",t)})}function Z(t,e){return r.dir?100-t-e:t}function et(t,e){Ut[t]=e,Nt[t]=kt.fromStepping(e);var n=10*(Z(e,0)-Ft),i="translate("+J(n+"%","0")+")";gt[t].style[r.transformRule]=i,it(t),it(t+1)}function rt(){Pt.forEach(function(t){var e=Ut[t]>50?-1:1,r=3+(gt.length+e*t);gt[t].style.zIndex=r})}function nt(t,e,r,n){return e=G(Ut,t,e,r,n,!1),!1!==e&&(et(t,e),!0)}function it(t){if(vt[t]){var e=0,n=100;0!==t&&(e=Ut[t-1]),t!==vt.length-1&&(n=Ut[t]);var i=n-e,o="translate("+J(Z(e,i)+"%","0")+")",a="scale("+J(i/100,"1")+")";vt[t].style[r.transformRule]=o+" "+a}}function ot(t,e){return null===t||!1===t||void 0===t?Ut[e]:("number"==typeof t&&(t=String(t)),t=r.format.from(t),t=kt.toStepping(t),!1===t||isNaN(t)?Ut[e]:t)}function at(t,e){var n=c(t),i=void 0===Ut[0];e=void 0===e||!!e,r.animate&&!i&&l(Ct,r.cssClasses.tap,r.animationDuration),Pt.forEach(function(t){nt(t,ot(n[t],t),!0,!1)});for(var o=1===Pt.length?0:1;o<Pt.length;++o)Pt.forEach(function(t){nt(t,Ut[t],!0,!0)});rt(),Pt.forEach(function(t){$("update",t),null!==n[t]&&e&&$("set",t)})}function st(t){at(r.start,t)}function lt(t,e,r){if(t=Number(t),!(t>=0&&t<Pt.length))throw new Error("noUiSlider ("+tt+"): invalid handle number, got: "+t);nt(t,ot(e,t),!0,!0),$("update",t),r&&$("set",t)}function ut(){var t=Nt.map(r.format.to);return 1===t.length?t[0]:t}function ct(){for(var t in r.cssClasses)r.cssClasses.hasOwnProperty(t)&&d(Ct,r.cssClasses[t]);for(;Ct.firstChild;)Ct.removeChild(Ct.firstChild);delete Ct.noUiSlider}function ft(t){var e=Ut[t],n=kt.getNearbySteps(e),i=Nt[t],o=n.thisStep.step,a=null;if(r.snap)return[i-n.stepBefore.startValue||null,n.stepAfter.startValue-i||null];!1!==o&&i+o>n.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=kt.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}function pt(){return Pt.map(ft)}function dt(t,e){var n=ut(),i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];i.forEach(function(e){void 0!==t[e]&&(o[e]=t[e])});var a=K(o);i.forEach(function(e){void 0!==t[e]&&(r[e]=a[e])}),kt=a.spectrum,r.margin=a.margin,r.limit=a.limit,r.padding=a.padding,r.pips?O(r.pips):M(),r.tooltips?N():k(),Ut=[],at(t.start||n,e)}function ht(){mt=w(Ct),S(r.connect,mt),Y(r.events),at(r.start),r.pips&&O(r.pips),r.tooltips&&N(),U()}var mt,gt,vt,bt,xt,St,wt=g(),yt=b(),Et=yt&&v(),Ct=t,kt=r.spectrum,Nt=[],Ut=[],Pt=[],Vt=0,At={},Mt=t.ownerDocument,Ot=r.documentElement||Mt.documentElement,Lt=Mt.body,jt=-1,zt=0,Ht=1,Dt=2,Ft="rtl"===Mt.dir||1===r.ort?0:100;return ht(),St={destroy:ct,steps:pt,on:_,off:I,get:ut,set:at,setHandle:lt,reset:st,__moveHandles:function(t,e,r){Q(t,e,Ut,r)},options:o,updateOptions:dt,target:Ct,removePips:M,removeTooltips:k,pips:O},St}function Z(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider ("+tt+"): create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider ("+tt+"): Slider was already initialized.");var r=K(e,t),n=Q(t,r,e);return t.noUiSlider=n,n}var tt="14.2.0";V.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider ("+tt+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&S(this.xVal,t)},V.prototype.toStepping=function(t){return t=C(this.xVal,this.xPct,t),t},V.prototype.fromStepping=function(t){return k(this.xVal,this.xPct,t)},V.prototype.getStep=function(t){return t=N(this.xPct,this.xSteps,this.snap,t),t},V.prototype.getDefaultStep=function(t,e,r){var n=E(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},V.prototype.getNearbySteps=function(t){var e=E(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]}}},V.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(f);return Math.max.apply(null,t)},V.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var et={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{__spectrum:V,version:tt,create:Z}}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.wNumb=t()}(function(){"use strict";function t(t){return t.split("").reverse().join("")}function e(t,e){return t.substring(0,e.length)===e}function r(t,e){return t.slice(-1*e.length)===e}function n(t,e,r){if((t[e]||t[r])&&t[e]===t[r])throw new Error(e)}function i(t){return"number"==typeof t&&isFinite(t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]+e:e))),t=t.toString().split("e"),(+(t[0]+"e"+(t[1]?+t[1]-e:-e))).toFixed(e)}function a(e,r,n,a,s,l,u,c,f,p,d,h){var m,g,v,b=h,x="",S="";return l&&(h=l(h)),!!i(h)&&(!1!==e&&0===parseFloat(h.toFixed(e))&&(h=0),h<0&&(m=!0,h=Math.abs(h)),!1!==e&&(h=o(h,e)),h=h.toString(),-1!==h.indexOf(".")?(g=h.split("."),v=g[0],n&&(x=n+g[1])):v=h,r&&(v=t(v).match(/.{1,3}/g),v=t(v.join(t(r)))),m&&c&&(S+=c),a&&(S+=a),m&&f&&(S+=f),S+=v,S+=x,s&&(S+=s),p&&(S=p(S,b)),S)}function s(t,n,o,a,s,l,u,c,f,p,d,h){var m,g="";return d&&(h=d(h)),!(!h||"string"!=typeof h)&&(c&&e(h,c)&&(h=h.replace(c,""),m=!0),a&&e(h,a)&&(h=h.replace(a,"")),f&&e(h,f)&&(h=h.replace(f,""),m=!0),s&&r(h,s)&&(h=h.slice(0,-1*s.length)),n&&(h=h.split(n).join("")),o&&(h=h.replace(o,".")),m&&(g+="-"),g+=h,g=g.replace(/[^0-9\.\-.]/g,""),""!==g&&(g=Number(g),u&&(g=u(g)),!!i(g)&&g))}function l(t){var e,r,i,o={};for(void 0===t.suffix&&(t.suffix=t.postfix),e=0;e<f.length;e+=1)if(r=f[e],i=t[r],void 0===i)"negative"!==r||o.negativeBefore?"mark"===r&&"."!==o.thousand?o[r]=".":o[r]=!1:o[r]="-";else if("decimals"===r){if(!(i>=0&&i<8))throw new Error(r);o[r]=i}else if("encoder"===r||"decoder"===r||"edit"===r||"undo"===r){if("function"!=typeof i)throw new Error(r);o[r]=i}else{if("string"!=typeof i)throw new Error(r);o[r]=i}return n(o,"mark","thousand"),n(o,"prefix","negative"),n(o,"prefix","negativeBefore"),o}function u(t,e,r){var n,i=[];for(n=0;n<f.length;n+=1)i.push(t[f[n]]);return i.push(r),e.apply("",i)}function c(t){if(!(this instanceof c))return new c(t);"object"==typeof t&&(t=l(t),this.to=function(e){return u(t,a,e)},this.from=function(e){return u(t,s,e)})}var f=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];return c});