//>>built
define("dojox/mobile/iconUtils","dojo/_base/array dojo/_base/config dojo/_base/connect dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-class dojo/dom-construct dojo/dom-style ./sniff".split(" "),function(A,B,C,D,E,F,h,l,r,v){var G=E.getObject("dojox.mobile",!0);return new function(){this.setupSpriteIcon=function(b,g){if(b&&g){var a=A.map(g.split(/[ ,]/),function(e){return e-0}),d=a[0],c=a[1];r.set(b,{position:"absolute",clip:"rect("+d+"px "+(a[1]+a[2])+"px "+(a[0]+a[3])+"px "+c+"px)",
top:(b.parentNode?r.get(b,"top"):0)-d+"px",left:-c+"px"});h.add(b,"mblSpriteIcon")}};this.createDomButton=function(b,g,a){if(!this._domButtons)if(v("webkit")){var d=function(w,p){var m;if(!w){var q={};var f=F.doc.styleSheets;for(m=0;m<f.length;m++)f[m]&&d(f[m],q);return q}q=w.cssRules||[];for(m=0;m<q.length;m++)if(f=q[m],f.href&&f.styleSheet)d(f.styleSheet,p);else if(f.selectorText){var x=f.selectorText.split(/,/);for(f=0;f<x.length;f++){var n=x[f],y=n.split(/>/).length-1;n.match(/(mblDomButton\w+)/)&&
(n=RegExp.$1,!p[n]||y>p[n])&&(p[n]=y)}}return p};this._domButtons=d()}else this._domButtons={};var c=b.className,e=a||b;if(c.match(/(mblDomButton\w+)/)&&-1===c.indexOf("/")){var k=RegExp.$1,t=4;c.match(/(mblDomButton\w+_(\d+))/)?t=RegExp.$2-0:void 0!==this._domButtons[k]&&(t=this._domButtons[k]);c=null;v("bb")&&!1!==B.mblBBBoxShadowWorkaround&&(c={style:"-webkit-box-shadow:none"});for(var z=0,u=e;z<t;z++)u=u.firstChild||l.create("div",c,u);a&&(setTimeout(function(){h.remove(b,k)},0),h.add(a,k))}else if(-1!==
c.indexOf("."))l.create("img",{src:c},e);else return null;h.add(e,"mblDomButton");g&&r.set(e,g);return e};this.createIcon=function(b,g,a,d,c,e,k){d=d||"";b&&0===b.indexOf("mblDomButton")?(a?a.className.match(/(mblDomButton\w+)/)&&h.remove(a,RegExp.$1):a=l.create("div",null,e||c,k),a.title=d,h.add(a,b),this.createDomButton(a)):b&&"none"!==b&&(a&&"IMG"===a.nodeName||(a=l.create("img",{alt:d},e||c,k)),a.src=(b||"").replace("${theme}",G.currentTheme),this.setupSpriteIcon(a,g),g&&c&&(b=g.split(/[ ,]/),
r.set(c,{position:"relative",width:b[2]+"px",height:b[3]+"px"}),h.add(c,"mblSpriteIconParent")),C.connect(a,"ondragstart",D,"stop"));return a};this.iconWrapper=!1;this.setIcon=function(b,g,a,d,c,e,k){if(!c||!b&&!a)return null;if(b&&"none"!==b)return this.iconWrapper||0===b.indexOf("mblDomButton")||g?(a&&"IMG"===a.tagName&&(l.destroy(a),a=null),a&&l.empty(a),a||(a=l.create("div",null,e||c,k)),this.createIcon(b,g,null,null,a),d&&(a.title=d)):(a&&"DIV"===a.tagName&&(l.destroy(a),a=null),a=this.createIcon(b,
null,a,d,c,e,k),h.add(a,"mblImageIcon")),h.remove(c,"mblNoIcon"),a;l.destroy(a);h.add(c,"mblNoIcon");return null}}});