define(["jquery.tiny"],function(){function N(t){var n=t.getBoundingClientRect(),e=t.ownerDocument,i=e.defaultView||e.parentWindow,r=e.documentElement,o=i.pageXOffset;return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o=0),{top:n.top+i.pageYOffset-r.clientTop,left:n.left+o-r.clientLeft}}function r(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function P(t,n,e){k(t,n),setTimeout(function(){A(t,n)},e)}function O(t){return Math.max(Math.min(t,100),0)}function L(t){return Array.isArray(t)?t:[t]}function k(t,n){t.classList?t.classList.add(n):t.className+=" "+n}function A(t,n){t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}var V=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"},j=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];function c(t,n){return 100/(n-t)}function u(t,n){return 100*n/(t[1]-t[0])}function l(t,n){for(var e=1;t>=n[e];)e+=1;return e}function n(t,n,e){if(e>=t.slice(-1)[0])return 100;var i,r,o,a,s=l(e,t);return i=t[s-1],r=t[s],o=n[s-1],a=n[s],o+function(t,n){return u(t,t[0]<0?n+Math.abs(t[0]):n-t[0])}([i,r],e)/c(o,a)}function e(t,n,e,i){if(100===i)return i;var r,o,a=l(i,t);return e?(r=t[a-1],((o=t[a])-r)/2<i-r?o:r):n[a-1]?t[a-1]+function(t,n){return Math.round(t/n)*n}(i-t[a-1],n[a-1]):i}function a(t,n,e){var i;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider: 'range' contains invalid value.");if(!r(i="min"===t?0:"max"===t?100:parseFloat(t))||!r(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");e.xPct.push(i),e.xVal.push(n[0]),i?e.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(e.xSteps[0]=n[1])}function s(t,n,e){if(!n)return!0;e.xSteps[t]=u([e.xVal[t],e.xVal[t+1]],n)/c(e.xPct[t],e.xPct[t+1])}function i(t,n,e,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=n,this.direction=e;var r,o=[];for(r in t)t.hasOwnProperty(r)&&o.push([t[r],r]);for(o.sort(function(t,n){return t[0]-n[0]}),r=0;r<o.length;r++)a(o[r][1],o[r][0],this);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)s(r,this.xNumSteps[r],this)}i.prototype.getMargin=function(t){return 2===this.xPct.length&&u(this.xVal,t)},i.prototype.toStepping=function(t){return t=n(this.xVal,this.xPct,t),this.direction&&(t=100-t),t},i.prototype.fromStepping=function(t){return this.direction&&(t=100-t),function(t){var n=Math.pow(10,7);return Number((Math.round(t*n)/n).toFixed(7))}(function(t,n,e){if(100<=e)return t.slice(-1)[0];var i,r=l(e,n);return function(t,n){return n*(t[1]-t[0])/100+t[0]}([t[r-1],t[r]],(e-(i=n[r-1]))*c(i,n[r]))}(this.xVal,this.xPct,t))},i.prototype.getStep=function(t){return this.direction&&(t=100-t),t=e(this.xPct,this.xSteps,this.snap,t),this.direction&&(t=100-t),t},i.prototype.getApplicableStep=function(t){var n=l(t,this.xPct),e=100===t?2:1;return[this.xNumSteps[n-2],this.xVal[n-e],this.xNumSteps[n-e]]},i.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var o={to:function(t){return t.toFixed(2)},from:Number};function f(t,n){if(!r(n))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=n}function d(t,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new i(n,t.snap,t.dir,t.singleStep)}function p(t,n){if(n=L(n),!Array.isArray(n)||!n.length||2<n.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=n.length,t.start=n}function h(t,n){if("boolean"!=typeof(t.snap=n))throw new Error("noUiSlider: 'snap' option must be a boolean.")}function m(t,n){if("boolean"!=typeof(t.animate=n))throw new Error("noUiSlider: 'animate' option must be a boolean.")}function g(t,n){if("lower"===n&&1===t.handles)t.connect=1;else if("upper"===n&&1===t.handles)t.connect=2;else if(!0===n&&2===t.handles)t.connect=3;else{if(!1!==n)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t.connect=0}}function v(t,n){switch(n){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function w(t,n){if(!r(n))throw new Error("noUiSlider: 'margin' option must be numeric.");if(t.margin=t.spectrum.getMargin(n),!t.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function b(t,n){if(!r(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(n),!t.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function S(t,n){switch(n){case"ltr":t.dir=0;break;case"rtl":t.dir=1,t.connect=[0,2,1,3][t.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function x(t,n){if("string"!=typeof n)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var e=0<=n.indexOf("tap"),i=0<=n.indexOf("drag"),r=0<=n.indexOf("fixed"),o=0<=n.indexOf("snap");t.events={tap:e||o,drag:i,fixed:r,snap:o}}function y(t,n){if("function"==typeof(t.format=n).to&&"function"==typeof n.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function E(t,c){var o,u,n,e,i,r,a,s,l=t,f=[-1,-1],S=c.spectrum,d=[],p={};function h(n,e,i){var r=["horizontal","vertical"][c.ort],o=document.createElement("div");function a(t,n,e){return'class="'+n+" "+n+"-"+r+" "+n+function(t){return["-normal","-large","-sub"][t]}(e[1])+'" style="'+c.style+": "+t+'%"'}return k(o,"noUi-pips"),k(o,"noUi-pips-"+r),Object.keys(n).forEach(function(t){!function(t,n){S.direction&&(t=100-t),n[1]=n[1]&&e?e(n[0],n[1]):n[1],o.innerHTML+="<div "+a(t,"noUi-marker",n)+"></div>",n[1]&&(o.innerHTML+="<div "+a(t,"noUi-value",n)+">"+i.to(n[0])+"</div>")}(t,n[t])}),o}function m(){return o["offset"+["Width","Height"][c.ort]]}function g(e,i){void 0!==i&&(i=Math.abs(i-c.dir)),Object.keys(p).forEach(function(t){var n=t.split(".")[0];e===n&&p[t].forEach(function(t){t(L(M()),i,v(Array.prototype.slice.call(d)))})})}function v(t){return 1===t.length?t[0]:c.dir?t.reverse():t}function w(n,e,i,r){function o(t){return!l.hasAttribute("disabled")&&(!function(t,n){t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className)}(l,j[14])&&(t=function(t){t.preventDefault();var n,e,i=0===t.type.indexOf("touch"),r=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),a=t;return 0===t.type.indexOf("MSPointer")&&(o=!0),i&&(n=t.changedTouches[0].pageX,e=t.changedTouches[0].pageY),(r||o)&&(n=t.clientX+window.pageXOffset,e=t.clientY+window.pageYOffset),a.points=[n,e],a.cursor=r||o,a}(t),!(n===V.start&&void 0!==t.buttons&&1<t.buttons)&&(t.calcPoint=t.points[c.ort],void i(t,r))))}var a=[];return n.split(" ").forEach(function(t){e.addEventListener(t,o,{passive:"touchmove"!=t&&"touchend"!=t&&"touchstart"!=t}),a.push([t,o])}),a}function b(t,n){var e,i,r=n.handles||u,o=!1,a=100*(t.calcPoint-n.start)/m(),s=r[0]===u[0]?0:1;if(e=function(t,n,e){var i=t+n[0],r=t+n[1];return e?(i<0&&(r+=Math.abs(i)),100<r&&(i-=r-100),[O(i),O(r)]):[i,r]}(a,n.positions,1<r.length),o=U(r[0],e[s],1===r.length),1<r.length){if(o=U(r[1],e[s?0:1],!1)||o)for(i=0;i<n.handles.length;i++)g("slide",i)}else o&&g("slide",s)}function x(t,n){var e=o.getElementsByClassName(j[15]),i=n.handles[0]===u[0]?0:1;e.length&&A(e[0],j[15]),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var r=document.documentElement;r.noUiListeners.forEach(function(t){r.removeEventListener(t[0],t[1])}),A(l,j[12]),g("set",i),g("change",i)}function y(t,n){var e=document.documentElement;if(1===n.handles.length&&(k(n.handles[0].children[0],j[15]),n.handles[0].hasAttribute("disabled")))return!1;t.stopPropagation();var i=w(V.move,e,b,{start:t.calcPoint,handles:n.handles,positions:[f[0],f[u.length-1]]}),r=w(V.end,e,x,{handles:n.handles});if(e.noUiListeners=i.concat(r),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,1<u.length&&k(l,j[12]);function o(){return!1}document.body.noUiListener=o,document.body.addEventListener("selectstart",o,!1)}}function E(t){var n,e,i=t.calcPoint,r=0;if(t.stopPropagation(),u.forEach(function(t){r+=N(t)[c.style]}),n=i<r/2||1===u.length?0:1,e=100*(i-=N(o)[c.style])/m(),c.events.snap||P(l,j[14],300),u[n].hasAttribute("disabled"))return!1;U(u[n],e),g("slide",n),g("set",n),g("change",n),c.events.snap&&y(t,{handles:[u[r]]})}function U(t,n,e){var i=t!==u[0]?1:0,r=f[0]+c.margin,o=f[1]-c.margin,a=f[0]+c.limit,s=f[1]-c.limit;return 1<u.length&&(n=i?Math.max(n,r):Math.min(n,o)),!1!==e&&c.limit&&1<u.length&&(n=i?Math.min(n,a):Math.max(n,s)),n=S.getStep(n),(n=O(parseFloat(n.toFixed(7))))!==f[i]&&(t.style[c.style]=n+"%",t.previousSibling||(A(t,j[17]),50<n&&k(t,j[17])),f[i]=n,d[i]=S.fromStepping(n),g("update",i),!0)}function M(){var t,n=[];for(t=0;t<c.handles;t+=1)n[t]=c.format.to(d[t]);return v(n)}if(l.noUiSlider)throw new Error("Slider was already initialized.");return o=function(t,n,e){k(e,j[0]),k(e,j[8+t]),k(e,j[4+n]);var i=document.createElement("div");return k(i,j[1]),e.appendChild(i),i}(c.dir,c.ort,l),u=function(t,n,e){var i,r,o,a,s,c,u=[];for(i=0;i<t;i+=1)u.push(e.appendChild((r=n,o=i,c=a=void 0,a=document.createElement("div"),s=document.createElement("div"),c=["-lower","-upper"],r&&c.reverse(),k(s,j[3]),k(s,j[3]+c[o]),k(a,j[2]),a.appendChild(s),a)));return u}(c.handles,c.dir,o),function(t,n,e){switch(t){case 1:k(n,j[7]),k(e[0],j[6]);break;case 3:k(e[1],j[6]);case 2:k(e[0],j[7]);case 0:k(n,j[6])}}(c.connect,l,u),function(t){var n,e;if(!t.fixed)for(n=0;n<u.length;n+=1)w(V.start,u[n].children[0],y,{handles:[u[n]]});t.tap&&w(V.start,o,E,{handles:u}),t.drag&&(k((e=[o.getElementsByClassName(j[7])[0]])[0],j[10]),t.fixed&&e.push(u[e[0]===u[0]?1:0].children[0]),e.forEach(function(t){w(V.start,t,y,{handles:u})}))}(c.events),c.pips&&(n=c.pips,e=n.mode,i=n.density||1,r=n.filter||!1,a=function(p,h,m){var t=S.direction,g={},n=S.xVal[0],e=S.xVal[S.xVal.length-1],v=!1,w=!1,b=0;return S.direction=0,(m=function(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}(m.slice().sort(function(t,n){return t-n})))[0]!==n&&(m.unshift(n),v=!0),m[m.length-1]!==e&&(m.push(e),w=!0),m.forEach(function(t,n){var e,i,r,o,a,s,c,u,l,f=t,d=m[n+1];if("steps"===h&&(e=S.xNumSteps[n]),e=e||d-f,!1!==f&&void 0!==d)for(i=f;i<=d;i+=e){for(c=(a=(o=S.toStepping(i))-b)/p,l=a/(u=Math.round(c)),r=1;r<=u;r+=1)g[(b+r*l).toFixed(5)]=["x",0];s=-1<m.indexOf(i)?1:"steps"===h?2:0,!n&&v&&(s=0),i===d&&w||(g[o.toFixed(5)]=[i,s]),b=o}}),S.direction=t,g}(i,e,function(t,n,e){if("range"===t||"steps"===t)return S.xVal;if("count"===t){var i,r=100/(n-1),o=0;for(n=[];(i=o++*r)<=100;)n.push(i);t="positions"}return"positions"===t?n.map(function(t){return S.fromStepping(e?S.getStep(t):t)}):"values"===t?e?n.map(function(t){return S.fromStepping(S.getStep(S.toStepping(t)))}):n:void 0}(e,n.values||!1,n.stepped||!1)),s=n.format||{to:Math.round},l.appendChild(h(a,r,s))),{destroy:function(){j.forEach(function(t){t&&A(l,t)}),l.innerHTML="",delete l.noUiSlider},steps:function(){return v(f.map(function(t,n){var e=S.getApplicableStep(t),i=function(t){var n=t.split(".");return 1<n.length?n[1].length:0}(String(e[2])),r=d[n],o=100===t?null:e[2],a=Number((r-e[2]).toFixed(i));return[0===t?null:a>=e[1]?e[2]:e[0]||!1,o]}))},on:function(t,n){p[t]=p[t]||[],p[t].push(n),"update"===t.split(".")[0]&&u.forEach(function(t,n){g("update",n)})},off:function(t){var i=t.split(".")[0],r=t.substring(i.length);Object.keys(p).forEach(function(t){var n=t.split(".")[0],e=t.substring(n.length);i&&i!==n||r&&r!==e||delete p[t]})},get:M,set:function(t){var n,e,i=L(t);for(c.dir&&1<c.handles&&i.reverse(),c.animate&&-1!==f[0]&&P(l,j[14],300),n=1<u.length?3:1,1===i.length&&(n=1),function(t,n){var e,i,r;for(c.limit&&(t+=1),e=0;e<t;e+=1)null!==(r=n[i=e%2])&&!1!==r&&("number"==typeof r&&(r=String(r)),!1!==(r=c.format.from(r))&&!isNaN(r)&&!1!==U(u[i],S.toStepping(r),e===3-c.dir)||g("update",i))}(n,i),e=0;e<u.length;e++)g("set",e)}}}return{create:function(t,n){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");var e=function(e){var i,r={margin:0,limit:0,animate:!0,format:o},n={connect:!(i={step:{r:!1,t:f},start:{r:!0,t:p},connect:{r:!0,t:g},direction:{r:!0,t:S},snap:{r:!1,t:h},animate:{r:!1,t:m},range:{r:!0,t:d},orientation:{r:!1,t:v},margin:{r:!1,t:w},limit:{r:!1,t:b},behaviour:{r:!0,t:x},format:{r:!1,t:y}}),direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(n).forEach(function(t){void 0===e[t]&&(e[t]=n[t])}),Object.keys(i).forEach(function(t){var n=i[t];if(void 0===e[t]){if(n.r)throw new Error("noUiSlider: '"+t+"' is required.");return!0}n.t(r,e[t])}),r.pips=e.pips,r.style=r.ort?"top":"left",r}(n),i=E(t,e);i.set(e.start),t.noUiSlider=i}}});