",options:{disabled:!1,create:null},_createwidget:function(t,i){i=e(i||this.defaultelement||this)[0],this.element=e(i),this.uuid=s++,this.eventnamespace="."+this.widgetname+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetfullname,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerdocument:i.document||i),this.window=e(this.document[0].defaultview||this.document[0].parentwindow)),this.options=e.widget.extend({},this.options,this._getcreateoptions(),t),this._create(),this._trigger("create",null,this._getcreateeventdata()),this._init()},_getcreateoptions:e.noop,_getcreateeventdata:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventnamespace).removedata(this.widgetfullname).removedata(e.camelcase(this.widgetfullname)),this.widget().unbind(this.eventnamespace).removeattr("aria-disabled").removeclass(this.widgetfullname+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventnamespace),this.hoverable.removeclass("ui-state-hover"),this.focusable.removeclass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setoptions(o),this},_setoptions:function(e){var t;for(t in e)this._setoption(t,e[t]);return this},_setoption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleclass(this.widgetfullname+"-disabled",!!t),t&&(this.hoverable.removeclass("ui-state-hover"),this.focusable.removeclass("ui-state-focus"))),this},enable:function(){return this._setoptions({disabled:!1})},disable:function(){return this._setoptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasclass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventnamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventnamespace+" ")+this.eventnamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return settimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currenttarget).addclass("ui-state-hover")},mouseleave:function(t){e(t.currenttarget).removeclass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currenttarget).addclass("ui-state-focus")},focusout:function(t){e(t.currenttarget).removeclass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.event(i),i.type=(t===this.widgeteventprefix?t:this.widgeteventprefix+t).tolowercase(),i.target=this.element[0],a=i.originalevent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isfunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isdefaultprevented())}},e.each({show:"fadein",hide:"fadeout"},function(t,i){e.widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isemptyobject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var a=!1;e(document).mouseup(function(){a=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseinit:function(){var t=this;this.element.bind("mousedown."+this.widgetname,function(e){return t._mousedown(e)}).bind("click."+this.widgetname,function(i){return!0===e.data(i.target,t.widgetname+".preventclickevent")?(e.removedata(i.target,t.widgetname+".preventclickevent"),i.stopimmediatepropagation(),!1):void 0}),this.started=!1},_mousedestroy:function(){this.element.unbind("."+this.widgetname),this._mousemovedelegate&&this.document.unbind("mousemove."+this.widgetname,this._mousemovedelegate).unbind("mouseup."+this.widgetname,this._mouseupdelegate)},_mousedown:function(t){if(!a){this._mousemoved=!1,this._mousestarted&&this._mouseup(t),this._mousedownevent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodename?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mousecapture(t)?(this.mousedelaymet=!this.options.delay,this.mousedelaymet||(this._mousedelaytimer=settimeout(function(){i.mousedelaymet=!0},this.options.delay)),this._mousedistancemet(t)&&this._mousedelaymet(t)&&(this._mousestarted=this._mousestart(t)!==!1,!this._mousestarted)?(t.preventdefault(),!0):(!0===e.data(t.target,this.widgetname+".preventclickevent")&&e.removedata(t.target,this.widgetname+".preventclickevent"),this._mousemovedelegate=function(e){return i._mousemove(e)},this._mouseupdelegate=function(e){return i._mouseup(e)},this.document.bind("mousemove."+this.widgetname,this._mousemovedelegate).bind("mouseup."+this.widgetname,this._mouseupdelegate),t.preventdefault(),a=!0,!0)):!0}},_mousemove:function(t){if(this._mousemoved){if(e.ui.ie&&(!document.documentmode||9>document.documentmode)&&!t.button)return this._mouseup(t);if(!t.which)return this._mouseup(t)}return(t.which||t.button)&&(this._mousemoved=!0),this._mousestarted?(this._mousedrag(t),t.preventdefault()):(this._mousedistancemet(t)&&this._mousedelaymet(t)&&(this._mousestarted=this._mousestart(this._mousedownevent,t)!==!1,this._mousestarted?this._mousedrag(t):this._mouseup(t)),!this._mousestarted)},_mouseup:function(t){return this.document.unbind("mousemove."+this.widgetname,this._mousemovedelegate).unbind("mouseup."+this.widgetname,this._mouseupdelegate),this._mousestarted&&(this._mousestarted=!1,t.target===this._mousedownevent.target&&e.data(t.target,this.widgetname+".preventclickevent",!0),this._mousestop(t)),a=!1,!1},_mousedistancemet:function(e){return math.max(math.abs(this._mousedownevent.pagex-e.pagex),math.abs(this._mousedownevent.pagey-e.pagey))>=this.options.distance},_mousedelaymet:function(){return this.mousedelaymet},_mousestart:function(){},_mousedrag:function(){},_mousestop:function(){},_mousecapture:function(){return!0}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgeteventprefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numpages:5,_create:function(){this._keysliding=!1,this._mousesliding=!1,this._animateoff=!0,this._handleindex=null,this._detectorientation(),this._mouseinit(),this._calculatenewmax(),this.element.addclass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setoption("disabled",this.options.disabled),this._animateoff=!1},_refresh:function(){this._createrange(),this._createhandles(),this._setupevents(),this._refreshvalue()},_createhandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addclass("ui-state-default ui-corner-all"),a="
",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendto(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createrange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isarray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valuemin(),this._valuemin()]),this.range&&this.range.length?this.range.removeclass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("
").appendto(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addclass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupevents:function(){this._off(this.handles),this._on(this.handles,this._handleevents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeclass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mousedestroy()},_mousecapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementsize={width:this.element.outerwidth(),height:this.element.outerheight()},this.elementoffset=this.element.offset(),i={x:t.pagex,y:t.pagey},s=this._normvaluefrommouse(i),n=this._valuemax()-this._valuemin()+1,this.handles.each(function(t){var i=math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastchangedvalue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mousesliding=!0,this._handleindex=o,a.addclass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addback().is(".ui-slider-handle"),this._clickoffset=l?{left:0,top:0}:{left:t.pagex-h.left-a.width()/2,top:t.pagey-h.top-a.height()/2-(parseint(a.css("bordertopwidth"),10)||0)-(parseint(a.css("borderbottomwidth"),10)||0)+(parseint(a.css("margintop"),10)||0)},this.handles.hasclass("ui-state-hover")||this._slide(t,o,s),this._animateoff=!0,!0))},_mousestart:function(){return!0},_mousedrag:function(e){var t={x:e.pagex,y:e.pagey},i=this._normvaluefrommouse(t);return this._slide(e,this._handleindex,i),!1},_mousestop:function(e){return this.handles.removeclass("ui-state-active"),this._mousesliding=!1,this._stop(e,this._handleindex),this._change(e,this._handleindex),this._handleindex=null,this._clickoffset=null,this._animateoff=!1,!1},_detectorientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normvaluefrommouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementsize.width,i=e.x-this.elementoffset.left-(this._clickoffset?this._clickoffset.left:0)):(t=this.elementsize.height,i=e.y-this.elementoffset.top-(this._clickoffset?this._clickoffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valuemax()-this._valuemin(),a=this._valuemin()+s*n,this._trimalignvalue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keysliding&&!this._mousesliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastchangedvalue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimalignvalue(e),this._refreshvalue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimalignvalue(i),this._refreshvalue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isarray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimalignvalue(n[a]),this._change(null,a);this._refreshvalue()},_setoption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isarray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleclass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectorientation(),this.element.removeclass("ui-slider-horizontal ui-slider-vertical").addclass("ui-slider-"+this.orientation),this._refreshvalue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateoff=!0,this._refreshvalue(),this._change(null,0),this._animateoff=!1;break;case"values":for(this._animateoff=!0,this._refreshvalue(),s=0;n>s;s+=1)this._change(null,s);this._animateoff=!1;break;case"step":case"min":case"max":this._animateoff=!0,this._calculatenewmax(),this._refreshvalue(),this._animateoff=!1;break;case"range":this._animateoff=!0,this._refresh(),this._animateoff=!1}},_value:function(){var e=this.options.value;return e=this._trimalignvalue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimalignvalue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimalignvalue(i[s]);return i}return[]},_trimalignvalue:function(e){if(this._valuemin()>=e)return this._valuemin();if(e>=this._valuemax())return this._valuemax();var t=this.options.step>0?this.options.step:1,i=(e-this._valuemin())%t,s=e-i;return 2*math.abs(i)>=t&&(s+=i>0?t:-t),parsefloat(s.tofixed(5))},_calculatenewmax:function(){var e=this.options.max,t=this._valuemin(),i=this.options.step,s=math.floor(+(e-t).tofixed(this._precision())/i)*i;e=s+t,this.max=parsefloat(e.tofixed(this._precision()))},_precision:function(){var e=this._precisionof(this.options.step);return null!==this.options.min&&(e=math.max(e,this._precisionof(this.options.min))),e},_precisionof:function(e){var t=""+e,i=t.indexof(".");return-1===i?0:t.length-i-1},_valuemin:function(){return this.options.min},_valuemax:function(){return this.max},_refreshvalue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateoff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valuemin())/(h._valuemax()-h._valuemin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valuemin(),a=this._valuemax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleevents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keycode){case e.ui.keycode.home:case e.ui.keycode.end:case e.ui.keycode.page_up:case e.ui.keycode.page_down:case e.ui.keycode.up:case e.ui.keycode.right:case e.ui.keycode.down:case e.ui.keycode.left:if(t.preventdefault(),!this._keysliding&&(this._keysliding=!0,e(t.target).addclass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keycode){case e.ui.keycode.home:n=this._valuemin();break;case e.ui.keycode.end:n=this._valuemax();break;case e.ui.keycode.page_up:n=this._trimalignvalue(s+(this._valuemax()-this._valuemin())/this.numpages);break;case e.ui.keycode.page_down:n=this._trimalignvalue(s-(this._valuemax()-this._valuemin())/this.numpages);break;case e.ui.keycode.up:case e.ui.keycode.right:if(s===this._valuemax())return;n=this._trimalignvalue(s+a);break;case e.ui.keycode.down:case e.ui.keycode.left:if(s===this._valuemin())return;n=this._trimalignvalue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keysliding&&(this._keysliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeclass("ui-state-active"))}}})});