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