$(function(){"use strict";var e="ltr";"rtl"==$("html").data("textdirection")&&(e="rtl");var t=document.getElementById("slider-handles"),n=document.getElementById("slider-snap"),r=document.getElementById("tap"),i=document.getElementById("drag"),a=document.getElementById("drag-fixed"),o=document.getElementById("hover"),l=document.getElementById("hover-val"),c=document.getElementById("combined"),d=document.getElementById("pips-range"),m=document.getElementById("pips-steps-filter");if(null!==t&&noUiSlider.create(t,{start:[4e3,8e3],direction:e,range:{min:[2e3],max:[1e4]}}),null!==n&&noUiSlider.create(n,{start:[0,500],direction:e,snap:!0,connect:!0,range:{min:0,"10%":50,"20%":100,"30%":150,"40%":500,"50%":800,max:1e3}}),null!==r&&noUiSlider.create(r,{start:40,direction:e,behaviour:"tap",connect:"upper",range:{min:20,max:80}}),null!==i&&noUiSlider.create(i,{start:[40,60],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}}),null!==a&&noUiSlider.create(a,{start:[40,60],direction:e,behaviour:"drag-fixed",connect:!0,range:{min:20,max:80}}),null!==o&&(noUiSlider.create(o,{start:20,direction:e,behaviour:"hover-snap",range:{min:0,max:10}}),o.noUiSlider.on("hover",function(e){l.innerHTML=e})),null!==c&&noUiSlider.create(c,{start:[40,60],direction:e,behaviour:"drag-tap",connect:!0,range:{min:20,max:80}}),null!==d){var u={min:[0],"10%":[5,5],"50%":[40,10],max:[100]};noUiSlider.create(d,{range:u,direction:e,start:0,pips:{mode:"range",density:3}})}if(null!==m){noUiSlider.create(m,{range:{min:[0],"10%":[5,5],"50%":[25,20],max:[50,50]},direction:e,start:0,pips:{mode:"steps",density:5,filter:function(e,t){return 0===t?e<50?-1:0:e%50?2:1},format:wNumb({decimals:0,prefix:"$"})}})}var g=document.getElementById("default-color-slider"),s=(document.getElementById("secondary-color-slider"),document.getElementById("success-color-slider")),v=document.getElementById("info-color-slider"),y=document.getElementById("warning-color-slider"),E=document.getElementById("danger-color-slider");noUiSlider.create(g,{start:[45,55],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}}),null!==s&&noUiSlider.create(s,{start:[40,60],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}}),null!==v&&noUiSlider.create(v,{start:[35,65],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}}),null!==y&&noUiSlider.create(y,{start:[45,55],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}}),null!==E&&noUiSlider.create(E,{start:[40,60],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}});var S=document.getElementById("colored-connect");noUiSlider.create(S,{start:[4e3,8e3,12e3,16e3],direction:e,connect:[!1,!0,!0,!0,!0],range:{min:[2e3],max:[2e4]}});for(var p=S.querySelectorAll(".noUi-connect"),B=["bg-primary","bg-success","bg-info","bg-danger","bg-warning"],I=0;I<p.length;I++)p[I].classList.add(B[I]);var U={start:[45,55],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}},x={start:[40,60],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}},h={start:[35,65],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}},b={start:[30,70],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}},f={start:[25,75],direction:e,behaviour:"drag",connect:!0,range:{min:20,max:80}},w=document.getElementById("extra-large-slider"),D=document.getElementById("circle-extra-large-slider"),M=document.getElementById("square-extra-large-slider");noUiSlider.create(w,U),noUiSlider.create(D,U),noUiSlider.create(M,U);var q=document.getElementById("large-slider"),T=document.getElementById("circle-large-slider"),L=document.getElementById("square-large-slider");noUiSlider.create(q,x),noUiSlider.create(T,x),noUiSlider.create(L,x);var N=document.getElementById("default-slider"),A=document.getElementById("circle-default-slider"),F=document.getElementById("square-default-slider");noUiSlider.create(N,h),noUiSlider.create(A,h),noUiSlider.create(F,h);var J=document.getElementById("small-slider"),H=document.getElementById("circle-small-slider"),C=document.getElementById("square-small-slider");noUiSlider.create(J,b),noUiSlider.create(H,b),noUiSlider.create(C,b);var O=document.getElementById("extra-small-slider"),W=document.getElementById("circle-extra-small-slider"),Y=document.getElementById("square-extra-small-slider");noUiSlider.create(O,f),noUiSlider.create(W,f),noUiSlider.create(Y,f);var j=document.getElementById("slider-vertical-1"),k=document.getElementById("slider-vertical-2"),z=document.getElementById("slider-vertical-3"),G=document.getElementById("slider-vertical-4"),K=document.getElementById("slider-vertical-5");null!==j&&noUiSlider.create(j,{start:20,direction:e,orientation:"vertical",range:{min:0,max:100}}),null!==k&&noUiSlider.create(k,{start:50,direction:e,orientation:"vertical",range:{min:0,max:100}}),null!==z&&noUiSlider.create(z,{start:20,direction:e,orientation:"vertical",range:{min:0,max:100}}),null!==G&&noUiSlider.create(G,{start:50,direction:e,orientation:"vertical",range:{min:0,max:100}}),null!==K&&noUiSlider.create(K,{start:20,direction:e,orientation:"vertical",range:{min:0,max:100}});var P=document.getElementById("connect-lower-1"),Q=document.getElementById("connect-lower-2"),R=document.getElementById("connect-lower-3"),V=document.getElementById("connect-lower-4"),X=document.getElementById("connect-lower-5");null!==P&&noUiSlider.create(P,{start:30,direction:e,orientation:"vertical",connect:"lower",range:{min:0,max:100}}),null!==Q&&noUiSlider.create(Q,{start:40,direction:e,orientation:"vertical",connect:"lower",range:{min:0,max:100}}),null!==R&&noUiSlider.create(R,{start:50,direction:e,orientation:"vertical",connect:"lower",range:{min:0,max:100}}),null!==V&&noUiSlider.create(V,{start:60,direction:e,orientation:"vertical",connect:"lower",range:{min:0,max:100}}),null!==X&&noUiSlider.create(X,{start:70,direction:e,orientation:"vertical",connect:"lower",range:{min:0,max:100}});var Z=document.getElementById("connect-upper-1"),_=document.getElementById("connect-upper-2"),ee=document.getElementById("connect-upper-3"),te=document.getElementById("connect-upper-4"),ne=document.getElementById("connect-upper-5");null!==Z&&noUiSlider.create(Z,{start:30,direction:e,orientation:"vertical",connect:"upper",range:{min:0,max:100}}),null!==_&&noUiSlider.create(_,{start:40,direction:e,orientation:"vertical",connect:"upper",range:{min:0,max:100}}),null!==ee&&noUiSlider.create(ee,{start:50,direction:e,orientation:"vertical",connect:"upper",range:{min:0,max:100}}),null!==te&&noUiSlider.create(te,{start:60,direction:e,orientation:"vertical",connect:"upper",range:{min:0,max:100}}),null!==ne&&noUiSlider.create(ne,{start:70,direction:e,orientation:"vertical",connect:"upper",range:{min:0,max:100}});var re=document.getElementById("slider-tooltips-1"),ie=document.getElementById("slider-tooltips-2"),ae=document.getElementById("slider-tooltips-3");null!==re&&noUiSlider.create(re,{start:[20,80],direction:e,orientation:"vertical",tooltips:[!1,wNumb({decimals:1})],range:{min:0,max:100}}),null!==ie&&noUiSlider.create(ie,{start:[20,80],direction:e,orientation:"vertical",tooltips:[!1,wNumb({decimals:1})],range:{min:0,max:100}}),null!==ae&&noUiSlider.create(ae,{start:[20,80],direction:e,orientation:"vertical",tooltips:[!1,wNumb({decimals:1})],range:{min:0,max:100}});var oe=document.getElementById("slider-direction-top-bottom-1"),le=document.getElementById("slider-direction-top-bottom-2"),ce=document.getElementById("slider-direction-top-bottom-3");null!==oe&&noUiSlider.create(oe,{range:u,start:30,direction:e,connect:"lower",orientation:"vertical",pips:{mode:"range",density:5}}),null!==le&&noUiSlider.create(le,{range:u,start:50,direction:e,connect:"lower",orientation:"vertical",pips:{mode:"range",density:5}}),null!==ce&&noUiSlider.create(ce,{range:u,start:70,direction:e,connect:"lower",orientation:"vertical",pips:{mode:"range",density:5}});var de=document.getElementById("vertical-limit-1"),me=document.getElementById("vertical-limit-2"),ue=document.getElementById("vertical-limit-3"),ge=document.getElementById("vertical-limit-4"),se=document.getElementById("vertical-limit-5");function ve(e){return new Date(e).getTime()}function ve(e){return new Date(e).getTime()}null!==de&&noUiSlider.create(de,{start:[40,60],direction:e,orientation:"vertical",limit:40,behaviour:"drag",connect:!0,range:{min:0,max:100}}),null!==me&&noUiSlider.create(me,{start:[35,65],direction:e,orientation:"vertical",limit:40,behaviour:"drag",connect:!0,range:{min:0,max:100}}),null!==ue&&noUiSlider.create(ue,{start:[30,70],direction:e,orientation:"vertical",limit:50,behaviour:"drag",connect:!0,range:{min:0,max:100}}),null!==ge&&noUiSlider.create(ge,{start:[25,75],direction:e,orientation:"vertical",limit:50,behaviour:"drag",connect:!0,range:{min:0,max:100}}),null!==se&&noUiSlider.create(se,{start:[20,80],direction:e,orientation:"vertical",limit:70,behaviour:"drag",connect:!0,range:{min:0,max:100}});var ye=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ee=["January","February","March","April","May","June","July","August","September","October","November","December"];function Se(e){return ye[e.getDay()]+", "+e.getDate()+function(e){if(3<e&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(e.getDate())+" "+Ee[e.getMonth()]+" "+e.getFullYear()}var pe=new Date,Be=new Date;Be.setMonth(Be.getMonth()-1);var Ie=document.getElementById("slider-with-date");noUiSlider.create(Ie,{behaviour:"tap",direction:e,connect:!0,range:{min:ve("2016-06-01")+864e5,max:ve(pe)},step:864e5,start:[ve(Be),ve(pe)]});var Ue=[document.getElementById("event-start"),document.getElementById("event-end")];Ie.noUiSlider.on("update",function(e,t){Ue[t].innerHTML=Se(new Date(+e[t]))});var xe=document.getElementById("slider-select");for(I=-20;I<=40;I++){var he=document.createElement("option");he.text=I,he.value=I,xe.appendChild(he)}var be=document.getElementById("slider-with-input");noUiSlider.create(be,{start:[10,30],direction:e,connect:!0,range:{min:-20,max:40}});var fe=document.getElementById("slider-input-number");be.noUiSlider.on("update",function(e,t){var n=e[t];t?fe.value=n:xe.value=Math.round(n)}),xe.addEventListener("change",function(){be.noUiSlider.set([this.value,null])}),fe.addEventListener("change",function(){be.noUiSlider.set([null,this.value])})});