//>>built
define("dojox/mobile/scrollable","dojo/_base/kernel dojo/_base/connect dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-class dojo/dom-construct dojo/dom-style dojo/dom-geometry dojo/touch dijit/registry dijit/form/_TextBoxMixin ./sniff ./_css3 ./_maskUtils ./common dojo/_base/declare dojo/has!dojo-bidi?dojox/mobile/bidi/Scrollable".split(" "),function(w,t,y,B,l,r,x,p,C,z,E,F,k,g,D,G,H,I){var n=B.getObject("dojox.mobile",!0);k.add("translate3d",function(){if(k("css3-animations")){var a=
l.doc.createElement("div");a.style[g.name("transform")]="translate3d(0px,1px,0px)";l.doc.documentElement.appendChild(a);var c=l.doc.defaultView.getComputedStyle(a,"")[g.name("transform",!0)];c=c&&0===c.indexOf("matrix");l.doc.documentElement.removeChild(a);return c}});var v=function(){};B.extend(v,{fixedHeaderHeight:0,fixedFooterHeight:0,isLocalFooter:!1,scrollBar:!0,scrollDir:"v",weight:.6,fadeScrollBar:!0,disableFlashScrollBar:!1,threshold:4,constraint:!0,touchNode:null,propagatable:!0,dirLock:!1,
height:"",scrollType:0,_parentPadBorderExtentsBottom:0,_moved:!1,init:function(a){if(a)for(var c in a)a.hasOwnProperty(c)&&(this[c]="domNode"!=c&&"containerNode"!=c||"string"!=typeof a[c]?a[c]:l.doc.getElementById(a[c]));G._setTouchAction(this.domNode,"none");this.touchNode=this.touchNode||this.containerNode;this._v=-1!=this.scrollDir.indexOf("v");this._h=-1!=this.scrollDir.indexOf("h");this._f="f"==this.scrollDir;this._ch=[];this._ch.push(t.connect(this.touchNode,z.press,this,"onTouchStart"));if(k("css3-animations"))if(this._useTopLeft=
this.scrollType?2===this.scrollType:!1,this._useTopLeft||(this._useTransformTransition=this.scrollType?3===this.scrollType:6<=k("ios")||k("android")||k("bb")),this._useTopLeft)this._ch.push(t.connect(this.containerNode,g.name("transitionEnd"),this,"onFlickAnimationEnd"));else{if(this._useTransformTransition)this._ch.push(t.connect(this.containerNode,g.name("transitionEnd"),this,"onFlickAnimationEnd"));else for(this._ch.push(t.connect(this.containerNode,g.name("animationEnd"),this,"onFlickAnimationEnd")),
this._ch.push(t.connect(this.containerNode,g.name("animationStart"),this,"onFlickAnimationStart")),a=0;3>a;a++)this.setKeyframes(null,null,a);k("translate3d")&&p.set(this.containerNode,g.name("transform"),"translate3d(0,0,0)")}this._speed={x:0,y:0};this._appFooterHeight=0;this.isTopLevel()&&!this.noResize&&this.resize();var b=this;setTimeout(function(){b.flashScrollBar()},600);l.global.addEventListener&&(this._onScroll=function(d){if(b.domNode&&"none"!==b.domNode.style.display){d=b.domNode.scrollTop;
var e=b.domNode.scrollLeft;if(0<d||0<e){var f=b.getPos();b.domNode.scrollLeft=0;b.domNode.scrollTop=0;b.scrollTo({x:f.x-e,y:f.y-d})}}},l.global.addEventListener("scroll",this._onScroll,!0));!this.disableTouchScroll&&this.domNode.addEventListener&&(this._onFocusScroll=function(d){if(b.domNode&&"none"!==b.domNode.style.display&&(d=l.doc.activeElement,d)){var e=d.getBoundingClientRect();var f=b.domNode.getBoundingClientRect();e.height<b.getDim().d.h&&(e.top<f.top+b.fixedHeaderHeight?b.scrollIntoView(d,
!0):e.top+e.height>f.top+f.height-b.fixedFooterHeight&&b.scrollIntoView(d,!1))}},this.domNode.addEventListener("focus",this._onFocusScroll,!0))},isTopLevel:function(){return!0},cleanup:function(){if(this._ch){for(var a=0;a<this._ch.length;a++)t.disconnect(this._ch[a]);this._ch=null}this._onScroll&&l.global.removeEventListener&&(l.global.removeEventListener("scroll",this._onScroll,!0),this._onScroll=null);this._onFocusScroll&&this.domNode.removeEventListener&&(this.domNode.removeEventListener("focus",
this._onFocusScroll,!0),this._onFocusScroll=null)},findDisp:function(a){if(!a.parentNode)return null;if(1===a.nodeType&&r.contains(a,"mblSwapView")&&"none"!==a.style.display)return a;for(var c=a.parentNode.childNodes,b=0;b<c.length;b++){var d=c[b];if(1===d.nodeType&&r.contains(d,"mblView")&&"none"!==d.style.display)return d}return a},getScreenSize:function(){return{h:l.global.innerHeight||l.doc.documentElement.clientHeight||l.doc.documentElement.offsetHeight,w:l.global.innerWidth||l.doc.documentElement.clientWidth||
l.doc.documentElement.offsetWidth}},resize:function(a){this._appFooterHeight=this._fixedAppFooter?this._fixedAppFooter.offsetHeight:0;this.isLocalHeader&&(this.containerNode.style.marginTop=this.fixedHeaderHeight+"px");var c=0;for(a=this.domNode;a&&"BODY"!=a.tagName;a=a.offsetParent){a=this.findDisp(a);if(!a)break;c+=a.offsetTop+C.getBorderExtents(a).h}var b;a=this.getScreenSize().h;c=a-c-this._appFooterHeight;if("inherit"===this.height)this.domNode.offsetParent&&(b=C.getContentBox(this.domNode.offsetParent).h-
C.getBorderExtents(this.domNode).h+"px");else if("auto"===this.height){if(b=this.domNode.offsetParent){this.domNode.style.height="0px";b=b.getBoundingClientRect();c=this.domNode.getBoundingClientRect();var d=b.bottom-this._appFooterHeight-this._parentPadBorderExtentsBottom;c=c.bottom>=d?a-(c.top-b.top)-this._appFooterHeight-this._parentPadBorderExtentsBottom:d-c.bottom}a=Math.max(this.domNode.scrollHeight,this.containerNode.scrollHeight);b=(a?Math.min(a,c):c)+"px"}else this.height&&(b=this.height);
b||(b=c+"px");"-"!==b.charAt(0)&&"default"!==b&&(this.domNode.style.height=b);if(!this._conn)this.onTouchEnd()},onFlickAnimationStart:function(a){a&&y.stop(a)},onFlickAnimationEnd:function(a){k("ios")&&this._keepInputCaretInActiveElement();if(a){var c=a.animationName;if(c&&-1===c.indexOf("scrollableViewScroll2")){-1!==c.indexOf("scrollableViewScroll0")?this._scrollBarNodeV&&r.remove(this._scrollBarNodeV,"mblScrollableScrollTo0"):-1!==c.indexOf("scrollableViewScroll1")?this._scrollBarNodeH&&r.remove(this._scrollBarNodeH,
"mblScrollableScrollTo1"):(this._scrollBarNodeV&&(this._scrollBarNodeV.className=""),this._scrollBarNodeH&&(this._scrollBarNodeH.className=""));return}if(this._useTransformTransition||this._useTopLeft)if(c=a.target,c===this._scrollBarV||c===this._scrollBarH){a="mblScrollableScrollTo"+(c===this._scrollBarV?"0":"1");r.contains(c,a)?r.remove(c,a):c.className="";return}a.srcElement&&y.stop(a)}this.stopAnimation();if(this._bounce){var b=this,d=b._bounce;setTimeout(function(){b.slideTo(d,.3,"ease-out")},
0);b._bounce=void 0}else this.hideScrollBar(),this.removeCover()},isFormElement:function(a){a&&1!==a.nodeType&&(a=a.parentNode);if(!a||1!==a.nodeType)return!1;a=a.tagName;return"SELECT"===a||"INPUT"===a||"TEXTAREA"===a||"BUTTON"===a},onTouchStart:function(a){this.disableTouchScroll||this._conn&&500>(new Date).getTime()-this.startTime||(this._conn||(this._conn=[],this._conn.push(t.connect(l.doc,z.move,this,"onTouchMove")),this._conn.push(t.connect(l.doc,z.release,this,"onTouchEnd"))),this._aborted=
!1,r.contains(this.containerNode,"mblScrollableScrollTo2")?this.abort():(this._scrollBarNodeV&&(this._scrollBarNodeV.className=""),this._scrollBarNodeH&&(this._scrollBarNodeH.className="")),this.touchStartX=a.touches?a.touches[0].pageX:a.clientX,this.touchStartY=a.touches?a.touches[0].pageY:a.clientY,this.startTime=(new Date).getTime(),this.startPos=this.getPos(),this._dim=this.getDim(),this._time=[0],this._posX=[this.touchStartX],this._posY=[this.touchStartY],this._moved=this._locked=!1,this._preventDefaultInNextTouchMove=
!0,this.isFormElement(a.target)||(this.propagatable?a.preventDefault():y.stop(a),this._preventDefaultInNextTouchMove=!1))},onTouchMove:function(a){if(!this._locked){if(this._preventDefaultInNextTouchMove){this._preventDefaultInNextTouchMove=!1;var c=E.getEnclosingWidget((a.targetTouches&&1===a.targetTouches.length?a.targetTouches[0]:a).target);c&&c.isInstanceOf(F)&&(this.propagatable?a.preventDefault():y.stop(a))}c=a.touches?a.touches[0].pageX:a.clientX;a=a.touches?a.touches[0].pageY:a.clientY;var b=
c-this.touchStartX,d=a-this.touchStartY,e={x:this.startPos.x+b,y:this.startPos.y+d},f=this._dim;b=Math.abs(b);d=Math.abs(d);if(1==this._time.length){if(this.dirLock&&(this._v&&!this._h&&b>=this.threshold&&b>=d||(this._h||this._f)&&!this._v&&d>=this.threshold&&d>=b)){this._locked=!0;return}if(this._v&&this._h){if(d<this.threshold&&b<this.threshold)return}else if(this._v&&d<this.threshold||(this._h||this._f)&&b<this.threshold)return;this._moved=!0;this.addCover();this.showScrollBar()}b=this.weight;
this._v&&this.constraint&&(0<e.y?e.y=Math.round(e.y*b):e.y<-f.o.h&&(e.y=f.c.h<f.d.h?Math.round(e.y*b):-f.o.h-Math.round((-f.o.h-e.y)*b)));(this._h||this._f)&&this.constraint&&(0<e.x?e.x=Math.round(e.x*b):e.x<-f.o.w&&(e.x=f.c.w<f.d.w?Math.round(e.x*b):-f.o.w-Math.round((-f.o.w-e.x)*b)));this.scrollTo(e);e=this._time.length;if(2<=e){this._moved=!0;if(this._v&&!this._h){var h=this._posY[e-1]-this._posY[e-2];var m=a-this._posY[e-1]}else!this._v&&this._h&&(h=this._posX[e-1]-this._posX[e-2],m=c-this._posX[e-
1]);0>h*m&&(this._time=[this._time[e-1]],this._posX=[this._posX[e-1]],this._posY=[this._posY[e-1]],e=1)}10==e&&(this._time.shift(),this._posX.shift(),this._posY.shift());this._time.push((new Date).getTime()-this.startTime);this._posX.push(c);this._posY.push(a)}},_keepInputCaretInActiveElement:function(){var a=l.doc.activeElement;if(a&&("INPUT"==a.tagName||"TEXTAREA"==a.tagName)){var c=a.value;a.value="number"==a.type||"week"==a.type?c?a.value+1:"week"==a.type?"2013-W10":1:a.value+" ";a.value=c}},
onTouchEnd:function(a){if(!this._locked){var c=this._speed={x:0,y:0},b=this._dim,d=this.getPos(),e={};if(a){if(!this._conn)return;for(c=0;c<this._conn.length;c++)t.disconnect(this._conn[c]);this._conn=null;c=!1;this._aborted||this._moved||(c=!0);if(c){this.hideScrollBar();this.removeCover();if(k("touch")&&k("clicks-prevented")&&!this.isFormElement(a.target)){var f=a.target;1!=f.nodeType&&(f=f.parentNode);setTimeout(function(){n._sendClick(f,a)})}return}c=this._speed=this.getSpeed()}else{if(0==d.x&&
0==d.y)return;b=this.getDim()}this._v&&(e.y=d.y+c.y);if(this._h||this._f)e.x=d.x+c.x;if(!1!==this.adjustDestination(e,d,b)){if(this.constraint){if("v"==this.scrollDir&&b.c.h<b.d.h){this.slideTo({y:0},.3,"ease-out");return}if("h"==this.scrollDir&&b.c.w<b.d.w){this.slideTo({x:0},.3,"ease-out");return}if(this._v&&this._h&&b.c.h<b.d.h&&b.c.w<b.d.w){this.slideTo({x:0,y:0},.3,"ease-out");return}}var h="ease-out",m={};if(this._v&&this.constraint)if(0<e.y)if(0<d.y){var q=.3;e.y=0}else e.y=Math.min(e.y,20),
h="linear",m.y=0;else-c.y>b.o.h- -d.y&&(d.y<-b.o.h?(q=.3,e.y=b.c.h<=b.d.h?0:-b.o.h):(e.y=Math.max(e.y,-b.o.h-20),h="linear",m.y=-b.o.h));(this._h||this._f)&&this.constraint&&(0<e.x?0<d.x?(q=.3,e.x=0):(e.x=Math.min(e.x,20),h="linear",m.x=0):-c.x>b.o.w- -d.x&&(d.x<-b.o.w?(q=.3,e.x=b.c.w<=b.d.w?0:-b.o.w):(e.x=Math.max(e.x,-b.o.w-20),h="linear",m.x=-b.o.w)));this._bounce=void 0!==m.x||void 0!==m.y?m:void 0;if(void 0===q){if(this._v&&this._h){var u=Math.sqrt(c.x*c.x+c.y*c.y);var A=Math.sqrt(Math.pow(e.y-
d.y,2)+Math.pow(e.x-d.x,2))}else this._v?(u=c.y,A=e.y-d.y):this._h&&(u=c.x,A=e.x-d.x);if(0===A&&!a)return;q=0!==u?Math.abs(A/u):.01}this.slideTo(e,q,h)}}},adjustDestination:function(a,c,b){return!0},abort:function(){this._aborted=!0;this.scrollTo(this.getPos());this.stopAnimation()},stopAnimation:function(){r.remove(this.containerNode,"mblScrollableScrollTo2");this.containerNode.className=this.containerNode.className.replace(/mblScrollableScrollTo2-[^ ]+/,"");this._scrollBarV&&(this._scrollBarV.className=
"");this._scrollBarH&&(this._scrollBarH.className="");if(this._useTransformTransition||this._useTopLeft)this.containerNode.style[g.name("transition")]="",this._scrollBarV&&(this._scrollBarV.style[g.name("transition")]=""),this._scrollBarH&&(this._scrollBarH.style[g.name("transition")]="")},scrollIntoView:function(a,c,b){if(this._v){for(var d=this.containerNode,e=this.getDim().d.h,f=0,h=a;h!==d;h=h.offsetParent){if(!h||"BODY"===h.tagName)return;f+=h.offsetTop}a=c?Math.max(e-d.offsetHeight,-f):Math.min(0,
e-f-a.offsetHeight);b&&"number"===typeof b?this.slideTo({y:a},b,"ease-out"):this.scrollTo({y:a})}},getSpeed:function(){var a=0,c=0,b=this._time.length;if(2<=b&&500>(new Date).getTime()-this.startTime-this._time[b-1]){a=this._posX[b-(3<b?2:1)]-this._posX[0<=b-6?b-6:0];var d=this._time[b-(3<b?2:1)]-this._time[0<=b-6?b-6:0];c=this.calcSpeed(this._posY[b-(3<b?2:1)]-this._posY[0<=b-6?b-6:0],d);a=this.calcSpeed(a,d)}return{x:a,y:c}},calcSpeed:function(a,c){return 4*Math.round(a/c*100)},scrollTo:function(a,
c,b){var d=!0;if(!this._aborted&&this._conn){this._dim||(this._dim=this.getDim());var e=0<a.y?a.y:0;d=0>this._dim.o.h+a.y?-1*(this._dim.o.h+a.y):0;e={bubbles:!1,cancelable:!1,x:a.x,y:a.y,beforeTop:0<e,beforeTopHeight:e,afterBottom:0<d,afterBottomHeight:d};d=this.onBeforeScroll(e)}if(d){b=(b||this.containerNode).style;if(k("css3-animations"))if(this._useTopLeft){if(b[g.name("transition")]="",this._v&&(b.top=a.y+"px"),this._h||this._f)b.left=a.x+"px"}else this._useTransformTransition&&(b[g.name("transition")]=
""),b[g.name("transform")]=this.makeTranslateStr(a);else if(this._v&&(b.top=a.y+"px"),this._h||this._f)b.left=a.x+"px";k("ios")&&this._keepInputCaretInActiveElement();c||this.scrollScrollBarTo(this.calcScrollBarPos(a));if(e)this.onAfterScroll(e)}},onBeforeScroll:function(a){return!0},onAfterScroll:function(a){},slideTo:function(a,c,b){this._runSlideAnimation(this.getPos(),a,c,b,this.containerNode,2);this.slideScrollBarTo(a,c,b)},makeTranslateStr:function(a){var c=this._v&&"number"==typeof a.y?a.y+
"px":"0px";a=(this._h||this._f)&&"number"==typeof a.x?a.x+"px":"0px";return k("translate3d")?"translate3d("+a+","+c+",0px)":"translate("+a+","+c+")"},getPos:function(){if(k("css3-animations")){var a=l.doc.defaultView.getComputedStyle(this.containerNode,"");if(this._useTopLeft)return{x:parseInt(a.left)||0,y:parseInt(a.top)||0};var c=a[g.name("transform")];return c&&0===c.indexOf("matrix")?(a=c.split(/[,\s\)]+/),c=0===c.indexOf("matrix3d")?12:4,{y:a[c+1]-0,x:a[c]-0}):{x:0,y:0}}return{y:parseInt(this.containerNode.style.top)||
0,x:this.containerNode.offsetLeft}},getDim:function(){var a={};a.c={h:this.containerNode.offsetHeight,w:this.containerNode.offsetWidth};a.v={h:this.domNode.offsetHeight+this._appFooterHeight,w:this.domNode.offsetWidth};a.d={h:a.v.h-this.fixedHeaderHeight-this.fixedFooterHeight-this._appFooterHeight,w:a.v.w};a.o={h:a.c.h-a.v.h+this.fixedHeaderHeight+this.fixedFooterHeight+this._appFooterHeight,w:a.c.w-a.v.w};return a},showScrollBar:function(){if(this.scrollBar){var a=this._dim;"v"==this.scrollDir&&
a.c.h<=a.d.h||"h"==this.scrollDir&&a.c.w<=a.d.w||this._v&&this._h&&a.c.h<=a.d.h&&a.c.w<=a.d.w||(a=function(c,b){var d=c["_scrollBarNode"+b];if(!d){d=x.create("div",null,c.domNode);var e={position:"absolute",overflow:"hidden"};"V"==b?(e.right="2px",e.width="5px"):(e.bottom=(c.isLocalFooter?c.fixedFooterHeight:0)+2+"px",e.height="5px");p.set(d,e);d.className="mblScrollBarWrapper";c["_scrollBarWrapper"+b]=d;d=x.create("div",null,d);p.set(d,g.add({opacity:.6,position:"absolute",backgroundColor:"#606060",
fontSize:"1px",MozBorderRadius:"2px",zIndex:2147483647},{borderRadius:"2px",transformOrigin:"0 0"}));p.set(d,"V"==b?{width:"5px"}:{height:"5px"});c["_scrollBarNode"+b]=d}return d},this._v&&!this._scrollBarV&&(this._scrollBarV=a(this,"V")),this._h&&!this._scrollBarH&&(this._scrollBarH=a(this,"H")),this.resetScrollBar())}},hideScrollBar:function(){if(this.fadeScrollBar&&k("css3-animations")&&!n._fadeRule){var a=x.create("style",null,l.doc.getElementsByTagName("head")[0]);a.textContent=".mblScrollableFadeScrollBar{  "+
g.name("animation-duration",!0)+": 1s;  "+g.name("animation-name",!0)+": scrollableViewFadeScrollBar;}@"+g.name("keyframes",!0)+" scrollableViewFadeScrollBar{  from { opacity: 0.6; }  to { opacity: 0; }}";n._fadeRule=a.sheet.cssRules[1]}this.scrollBar&&(a=function(c,b){p.set(c,g.add({opacity:0},{animationDuration:""}));b._useTopLeft&&k("android")||(c.className="mblScrollableFadeScrollBar")},this._scrollBarV&&(a(this._scrollBarV,this),this._scrollBarV=null),this._scrollBarH&&(a(this._scrollBarH,this),
this._scrollBarH=null))},calcScrollBarPos:function(a){var c={},b=this._dim,d=function(e,f,h,m,q){h=Math.round((m-f-8)/(m-q)*h);h<-f+5&&(h=-f+5);h>e-5&&(h=e-5);return h};"number"==typeof a.y&&this._scrollBarV&&(c.y=d(this._scrollBarWrapperV.offsetHeight,this._scrollBarV.offsetHeight,a.y,b.d.h,b.c.h));"number"==typeof a.x&&this._scrollBarH&&(c.x=d(this._scrollBarWrapperH.offsetWidth,this._scrollBarH.offsetWidth,a.x,b.d.w,b.c.w));return c},scrollScrollBarTo:function(a){this.scrollBar&&(this._v&&this._scrollBarV&&
"number"==typeof a.y&&(k("css3-animations")?this._useTopLeft?p.set(this._scrollBarV,g.add({top:a.y+"px"},{transition:""})):(this._useTransformTransition&&(this._scrollBarV.style[g.name("transition")]=""),this._scrollBarV.style[g.name("transform")]=this.makeTranslateStr({y:a.y})):this._scrollBarV.style.top=a.y+"px"),this._h&&this._scrollBarH&&"number"==typeof a.x&&(k("css3-animations")?this._useTopLeft?p.set(this._scrollBarH,g.add({left:a.x+"px"},{transition:""})):(this._useTransformTransition&&(this._scrollBarH.style[g.name("transition")]=
""),this._scrollBarH.style[g.name("transform")]=this.makeTranslateStr({x:a.x})):this._scrollBarH.style.left=a.x+"px"))},slideScrollBarTo:function(a,c,b){if(this.scrollBar){var d=this.calcScrollBarPos(this.getPos());a=this.calcScrollBarPos(a);this._v&&this._scrollBarV&&this._runSlideAnimation({y:d.y},{y:a.y},c,b,this._scrollBarV,0);this._h&&this._scrollBarH&&this._runSlideAnimation({x:d.x},{x:a.x},c,b,this._scrollBarH,1)}},_runSlideAnimation:function(a,c,b,d,e,f){if(k("css3-animations"))if(!this._useTopLeft)if(this._useTransformTransition)if(void 0===
c.x&&(c.x=a.x),void 0===c.y&&(c.y=a.y),c.x!==a.x||c.y!==a.y){this.onFlickAnimationStart();p.set(e,g.add({},{transitionProperty:g.name("transform"),transitionDuration:b+"s",transitionTimingFunction:d}));var h=this.makeTranslateStr(c);setTimeout(function(){p.set(e,g.add({},{transform:h}))},0);r.add(e,"mblScrollableScrollTo"+f)}else this.hideScrollBar(),this.removeCover();else{var m=this.findDisp(this.domNode)===this.domNode;a=this.setKeyframes(a,c,f,m);p.set(e,g.add({},{animationDuration:b+"s",animationTimingFunction:d}));
r.add(e,a);r.add(e,"mblScrollableScrollTo"+f);2==f?this.scrollTo(c,!0,e):this.scrollScrollBarTo(c)}else{if(void 0!==c.x||void 0!==c.y)this.onFlickAnimationStart(),p.set(e,g.add({},{transitionProperty:void 0!==c.x&&void 0!==c.y?"top, left":void 0!==c.y?"top":"left",transitionDuration:b+"s",transitionTimingFunction:d})),setTimeout(function(){var u={};void 0!==c.x&&(u.left=c.x+"px");void 0!==c.y&&(u.top=c.y+"px");p.set(e,u)},0),r.add(e,"mblScrollableScrollTo"+f)}else if(w.fx&&w.fx.easing&&b){var q=this;
w.fx.slideTo({node:e,duration:1E3*b,left:c.x,top:c.y,easing:"ease-out"==d?w.fx.easing.quadOut:w.fx.easing.linear,onBegin:function(){if(2==f)q.onFlickAnimationStart()},onEnd:function(){if(2==f)q.onFlickAnimationEnd()}}).play()}else 2==f?(this.onFlickAnimationStart(),this.scrollTo(c,!1,e),this.onFlickAnimationEnd()):this.scrollScrollBarTo(c)},resetScrollBar:function(){var a=function(b,d,e,f,h,m){if(d){var q={};q[m?"top":"left"]=h+4+"px";h=0>=e-8?1:e-8;q[m?"height":"width"]=h+"px";p.set(b,q);b=Math.round(e*
e/f);b=Math.min(Math.max(b-8,5),h);d.style[m?"height":"width"]=b+"px";p.set(d,{opacity:.6})}},c=this.getDim();a(this._scrollBarWrapperV,this._scrollBarV,c.d.h,c.c.h,this.fixedHeaderHeight,!0);a(this._scrollBarWrapperH,this._scrollBarH,c.d.w,c.c.w,0);this.createMask()},createMask:function(){k("mask-image")&&(this._scrollBarWrapperV&&D.createRoundMask(this._scrollBarWrapperV,0,0,0,0,5,this._scrollBarWrapperV.offsetHeight,2,2,.5),this._scrollBarWrapperH&&D.createRoundMask(this._scrollBarWrapperH,0,0,
0,0,this._scrollBarWrapperH.offsetWidth,5,2,2,.5))},flashScrollBar:function(){if(!this.disableFlashScrollBar&&this.domNode&&(this._dim=this.getDim(),!(0>=this._dim.d.h))){this.showScrollBar();var a=this;setTimeout(function(){a.hideScrollBar()},300)}},addCover:function(){k("touch")||k("pointer-events")||k("MSPointer")||this.noCover||(n._cover?n._cover.style.display="":(n._cover=x.create("div",null,l.doc.body),n._cover.className="mblScrollableCover",p.set(n._cover,{backgroundColor:"#ffff00",opacity:0,
position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",zIndex:2147483647}),this._ch.push(t.connect(n._cover,z.press,this,"onTouchEnd"))),this.setSelectable(n._cover,!1),this.setSelectable(this.domNode,!1))},removeCover:function(){!k("touch")&&n._cover&&(n._cover.style.display="none",this.setSelectable(n._cover,!0),this.setSelectable(this.domNode,!0))},setKeyframes:function(a,c,b,d){n._rule||(n._rule=[]);b+=d?"-in":"-out";n._rule[b]||(d=x.create("style",null,l.doc.getElementsByTagName("head")[0]),
d.textContent=".mblScrollableScrollTo"+b+"{"+g.name("animation-name",!0)+": scrollableViewScroll"+b+";}@"+g.name("keyframes",!0)+" scrollableViewScroll"+b+"{}",n._rule[b]=d.sheet.cssRules[1]);if(d=n._rule[b])a&&(d.deleteRule(k("webkit")?"from":0),(d.insertRule||d.appendRule).call(d,"from { "+g.name("transform",!0)+": "+this.makeTranslateStr(a)+"; }")),c&&(void 0===c.x&&(c.x=a.x),void 0===c.y&&(c.y=a.y),d.deleteRule(k("webkit")?"to":1),(d.insertRule||d.appendRule).call(d,"to { "+g.name("transform",
!0)+": "+this.makeTranslateStr(c)+"; }"));return"mblScrollableScrollTo"+b},setSelectable:function(a,c){a.style.KhtmlUserSelect=c?"auto":"none";a.style.MozUserSelect=c?"":"none";a.onselectstart=c?null:function(){return!1};if(k("ie")){a.unselectable=c?"":"on";for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)b[d].unselectable=c?"":"on"}}});v=k("dojo-bidi")?H("dojox.mobile.Scrollable",[v,I]):v;B.setObject("dojox.mobile.scrollable",v);return v});