//>>built define("dojox/mobile/Carousel",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dijit/registry","dijit/_Contained","dijit/_Container","dijit/_WidgetBase","./lazyLoadUtils","./CarouselItem","./PageIndicator","./SwapView","require"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11){ return _3("dojox.mobile.Carousel",[_c,_b,_a],{numVisible:2,itemWidth:0,title:"",pageIndicator:true,navButton:false,height:"",selectable:true,baseClass:"mblCarousel",buildRendering:function(){ this.containerNode=_7.create("div",{className:"mblCarouselPages"}); this.inherited(arguments); if(this.srcNodeRef){ for(var i=0,len=this.srcNodeRef.childNodes.length;i0){ this.onComplete(this.items); this.select(this.selectedItemIndex); } },fillPages:function(){ _1.forEach(this.getChildren(),function(_17,i){ var s=""; for(var j=0;j_1e-1?_1e-1:pg+1; for(i=_20;i<=to;i++){ this.instantiateView(_1f[i]); } },onError:function(){ },onUpdate:function(){ },onDelete:function(){ },onSet:function(_21,_22,_23,_24){ },onNew:function(_25,_26){ },onStoreClose:function(_27){ },getParentView:function(_28){ for(var w=_9.getEnclosingWidget(_28);w;w=w.getParent()){ if(w.getParent() instanceof _10){ return w; } } return null; },getIndexByItemWidget:function(w){ if(!w){ return -1; } var _29=w.getParent(); return _1.indexOf(this.getChildren(),_29)*this.numVisible+_1.indexOf(_29.getChildren(),w); },getItemWidgetByIndex:function(_2a){ if(_2a===-1){ return null; } var _2b=this.getChildren()[Math.floor(_2a/this.numVisible)]; return _2b.getChildren()[_2a%this.numVisible]; },onPrevBtnClick:function(){ if(this.currentView){ this.currentView.goTo(-1); } },onNextBtnClick:function(){ if(this.currentView){ this.currentView.goTo(1); } },_onClick:function(e){ if(this.onClick(e)===false){ return; } if(e&&e.type==="keydown"){ if(e.keyCode===39){ this.onNextBtnClick(); }else{ if(e.keyCode===37){ this.onPrevBtnClick(); }else{ if(e.keyCode!==13){ return; } } } } var w; for(w=_9.getEnclosingWidget(e.target);;w=w.getParent()){ if(!w){ return; } if(w.getParent() instanceof _10){ break; } } this.select(w); var idx=this.getIndexByItemWidget(w); _2.publish("/dojox/mobile/carouselSelect",[this,w,this.items[idx],idx]); },select:function(_2c){ if(typeof (_2c)==="number"){ _2c=this.getItemWidgetByIndex(_2c); } if(this.selectable){ if(this.selectedItem){ this.selectedItem.set("selected",false); _6.remove(this.selectedItem.domNode,"mblCarouselSlotSelected"); } if(_2c){ _2c.set("selected",true); _6.add(_2c.domNode,"mblCarouselSlotSelected"); } this.selectedItem=_2c; } },onClick:function(){ },instantiateView:function(_2d){ if(_2d&&!_2d._instantiated){ var _2e=(_8.get(_2d.domNode,"display")==="none"); if(_2e){ _8.set(_2d.domNode,{visibility:"hidden",display:""}); } _d.instantiateLazyWidgets(_2d.containerNode,null,function(_2f){ if(_2e){ _8.set(_2d.domNode,{visibility:"visible",display:"none"}); } }); _2d._instantiated=true; } },handleViewChanged:function(_30){ if(_30.getParent()!==this){ return; } if(this.currentView.nextView(this.currentView.domNode)===_30){ this.instantiateView(_30.nextView(_30.domNode)); }else{ this.instantiateView(_30.previousView(_30.domNode)); } this.currentView=_30; },_setTitleAttr:function(_31){ this.titleNode.innerHTML=this._cv?this._cv(_31):_31; this._set("title",_31); }}); });