text: /*! Innerwave Spreadsheet - v0.2.617-SNAPSHOT - 2015-02-13
  * Copyright (c) 2015 innerwave.co.kr; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){return a.widget("iui.scroller",a.ui.slider,{version:"0.2.1233-SNAPSHOT",widgetEventPrefix:"iwscroll",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:10,size:200,_create:function(){this._super();var a=this;setTimeout(function(){var b=a.element.parent();"horizontal"===a.orientation?(a.element.width(b.width()-a.handle.outerWidth()).css("left",a.handle.outerWidth()/2+"px"),a.handle.css("margin-left",-a.handle.outerWidth()/2)):(a.element.height(b.height()-a.handle.outerHeight()).css("top",a.handle.outerHeight()/2+"px"),a.handle.css("margin-top",-a.handle.outerHeight()/2))},10)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._focusable(this.handles)},_createRange:function(){},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),0>d&&(d=0),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_setOption:function(b,c){var d,e=0;switch(a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"top":"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(),d=0;e>d;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1}},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return l.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h===!1?!1:(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_refreshValue:function(){var b,c,d,e,f,g=this.options,h=this,i=this._animateOff?!1:g.animate,j={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(h.values(d)-h._valueMin())/(h._valueMax()-h._valueMin())*100,j["horizontal"===h.orientation?"left":"top"]=c+"%",a(this).stop(1,1)[i?"animate":"css"](j,g.animate),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,j["horizontal"===this.orientation?"left":"top"]=c+"%",this.handle.stop(1,1)[i?"animate":"css"](j,g.animate))},_hoverable:function(b){var c=this;this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).attr("title",c._value()).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).attr("title","").removeClass("ui-state-hover")}})},_handleEvents:{keydown:function(b){var c,d,e,f,g,h=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,h),c===!1))return}switch(g=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(h):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:f=(this._valueMax()-this._valueMin())/this.numPages,e=this._trimAlignValue(d+("horizontal"===this.orientation?f:-f));break;case a.ui.keyCode.PAGE_DOWN:f=(this._valueMax()-this._valueMin())/this.numPages,e=this._trimAlignValue(d+("horizontal"===this.orientation?-f:f));break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if("horizontal"===this.orientation){if(d===this._valueMax())return}else if(d===this._valueMin())return;e=this._trimAlignValue(d+("horizontal"===this.orientation?g:-g));break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if("horizontal"===this.orientation){if(d===this._valueMin())return}else if(d===this._valueMax())return;e=this._trimAlignValue(d+("horizontal"===this.orientation?-g:g))}this._slide(b,h,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})});
  