//>>built
define("dojox/mobile/ComboBox","dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/window dojo/dom-geometry dojo/dom-style dojo/dom-attr dojo/window dojo/touch dijit/form/_AutoCompleterMixin dijit/popup ./_ComboBoxMenu ./TextBox ./sniff".split(" "),function(D,E,F,r,f,t,g,G,u,H,v,J,I,h){D.experimental("dojox.mobile.ComboBox");return E("dojox.mobile.ComboBox",[I,H],{dropDownClass:"dojox.mobile._ComboBoxMenu",selectOnClick:!1,autoComplete:!1,dropDown:null,maxHeight:-1,dropDownPosition:["below",
"above"],_throttleOpenClose:function(){this._throttleHandler&&this._throttleHandler.remove();this._throttleHandler=this.defer(function(){this._throttleHandler=null},500)},_onFocus:function(){this.inherited(arguments);this._opened||this._throttleHandler||this._startSearchAll();h("windows-theme")&&this.domNode.blur()},onInput:function(c){c&&0===c.charCode||(this._onKey(c),this.inherited(arguments))},_setListAttr:function(c){this._set("list",c)},closeDropDown:function(){this._throttleOpenClose();this.endHandler&&
(this.disconnect(this.startHandler),this.disconnect(this.endHandler),this.disconnect(this.moveHandler),clearInterval(this.repositionTimer),this.repositionTimer=this.endHandler=null);this.inherited(arguments);g.remove(this.domNode,"aria-owns");g.set(this.domNode,"aria-expanded","false");v.close(this.dropDown);this._opened=!1;h("windows-theme")&&this.domNode.disabled&&this.defer(function(){this.domNode.removeAttribute("disabled")},300)},openDropDown:function(){var c=!this._opened,d=this.dropDown,k=
d.domNode,l=this.domNode,w=this;g.set(d.domNode,"role","listbox");g.set(this.domNode,"aria-expanded","true");d.id&&g.set(this.domNode,"aria-owns",d.id);h("touch")&&(!h("ios")||8>h("ios"))&&r.global.scrollBy(0,f.position(l,!1).y);this._preparedNode||(this._preparedNode=!0,k.style.width&&(this._explicitDDWidth=!0),k.style.height&&(this._explicitDDHeight=!0));var a={display:"",overflow:"hidden",visibility:"hidden"};this._explicitDDWidth||(a.width="");this._explicitDDHeight||(a.height="");t.set(k,a);
a=this.maxHeight;if(-1==a){a=G.getBox();var e=f.position(l,!1);a=Math.floor(Math.max(e.y,a.h-(e.y+e.h)))}v.moveOffScreen(d);d.startup&&!d._started&&d.startup();e=f.position(this.dropDown.containerNode,!1);a&&e.h>a&&(e.h=a);e.w=Math.max(e.w,l.offsetWidth);f.setMarginBox(k,e);k=v.open({parent:this,popup:d,around:l,orient:h("windows-theme")?["above"]:this.dropDownPosition,onExecute:function(){w.closeDropDown()},onCancel:function(){w.closeDropDown()},onClose:function(){w._opened=!1}});this._opened=!0;
if(c){var p=!1,m=!1,n=!1,q=d.domNode.parentNode;c=f.position(l,!1);a=f.position(q,!1);var x=a.x-c.x,y=a.y-c.y,z=-1,A=-1;this.startHandler=this.connect(r.doc.documentElement,u.press,function(b){n=m=!0;p=!1;z=b.clientX;A=b.clientY});this.moveHandler=this.connect(r.doc.documentElement,u.move,function(b){m=!0;b.touches?n=p=!0:!n||b.clientX==z&&b.clientY==A||(p=!0)});this.clickHandler=this.connect(d.domNode,"onclick",function(){m=!0;n=p=!1});this.endHandler=this.connect(r.doc.documentElement,u.release,
function(){this.defer(function(){m=!0;!p&&n&&this.closeDropDown();n=!1})});this.repositionTimer=setInterval(F.hitch(this,function(){if(m)m=!1;else{var b=f.position(l,!1),B=f.position(q,!1),C=B.x-b.x;b=B.y-b.y;(1<=Math.abs(C-x)||1<=Math.abs(b-y))&&t.set(q,{left:parseInt(t.get(q,"left"))+x-C+"px",top:parseInt(t.get(q,"top"))+y-b+"px"})}}),50)}h("windows-theme")&&this.domNode.setAttribute("disabled",!0);return k},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onclick","_onClick");
g.set(this.domNode,"role","combobox");g.set(this.domNode,"aria-expanded","false")},destroy:function(){this.repositionTimer&&clearInterval(this.repositionTimer);this.inherited(arguments)},_onClick:function(c){this._throttleHandler||(this.opened?this.closeDropDown():this._startSearchAll())}})});