// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/utils/WaitingUtil",["dojo/when","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style"],function(f,k,d,g,h){var e={showProgress:function(a,b){a&&!a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]&&(a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]=d.create("div",{"class":"esriGEProgress esriGEProgressAbsolute "+(b||"")},a))},removeProgress:function(a){a&&a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]&&(d.destroy(a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]),
delete a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"])},showProgressBar:function(a){var b=a.node;if(b){b._progressBar&&d.destroy(b._progressBar);delete b._progressBar;var c=Number(a.value);0>=c||isNaN(c)||(c=Math.min(c,1),b._progressBar=d.create("div",{"class":"esriGEWaitingMessageProgressBar esriGEWaitingMessageProgressBar_"+(a.position||"bottom")},b),h.set(b._progressBar,"width",g.position(b).w*c+"px"))}},showProgressPromise:function(a,b,c){c=c||{};void 0===a.__progressIndex&&(a.__progressIndex=
0);0===a.__progressIndex&&(e.showProgress(a,c.progressClass),c.onShowProgress&&c.onShowProgress());a.__progressIndex++;f(b).always(function(){a.__progressIndex=Math.max(0,--a.__progressIndex);0===a.__progressIndex&&(e.removeProgress(a),c.onRemoveProgress&&c.onRemoveProgress())});return b}};return e});