text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.25/esri/copyright.txt for details.
  //>>built
  define("esri/dijit/geoenrichment/utils/PopupUtil","dojo/_base/lang dojo/aspect esri/dijit/geoenrichment/utils/onClickTouch dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/when dojo/touch dojo/sniff dijit/popup dijit/place ./DnDUtil ./MouseUtil dojo/domReady!".split(" "),function(B,H,u,C,d,q,v,w,D,E,l,r,F,x){var h={makePopup:function(b,G,m,c){function r(a){if(c.overlay&&a._popupWrapper){var b=d.create("div",{"class":c.overlay.overlayClass});if(c.overlay.overlayParent)d.place(b,
  c.overlay.overlayParent);else{d.place(b,f,"before");var e=v.get(a._popupWrapper,"zIndex");v.set(b,"zIndex",e)}a.__popupOverlay=b}}function y(a){a.__popupOverlay&&(d.destroy(a.__popupOverlay),a.__popupOverlay=null)}function z(a){n=!1;a.__bodyClickHandler&&a.__bodyClickHandler.remove();a.__bodyClickHandler=null;a.__popupWidgetOpenFlag=!1;y(a);c.onClose&&c.onClose()}function g(e){e&&c.stopEventPropagation&&e.stopPropagation();n||(n=!0,w(a||("function"==typeof b?b():b),function(b){a=b;a.domNode?(a.__openPopupWidgetFunc=
  g,f=l.moveOffScreen(a),w(c.onPreShow&&c.onPreShow(),function(){var b=c.orient||["below"];if(f&&!1!==c.allowAutoOrientation){var e=-1!==b.indexOf("below"),d=q.position(m),g=q.position(f);e&&d.y+d.h+g.h>document.body.clientHeight&&(e=!e);b=b.map(function(a){return"below"!=a||e?a:"above"})}c.noOverflow&&(a.baseClass="esriGENoOverflow "+a.baseClass);l.open({parent:G,popup:a,around:m,orient:b,onClose:function(){z(a)}});c.noOverflow&&(a.baseClass=a.baseClass.replace("esriGENoOverflow ",""));f&&c.wrapperClass&&
  C.add(f,c.wrapperClass);a.__popupInfo=B.mixin({},l.getTopPopup());a.__popupInfo.orient=b;a.__popupInfo.around=m;y(a);r(a);c.onShow&&c.onShow();a.__popupWidgetOpenFlag=!0;p&&a.own&&a.own(p);if(!1!==c.closeOnClickOutside){var k="function"===typeof c.closeOnClickOutside?c.closeOnClickOutside:null;setTimeout(function(){a.__bodyClickHandler&&a.__bodyClickHandler.remove();a.__bodyClickHandler=u(document.body,A,function(b){n&&(x.fixTouchEvent(b),k&&!k(b)||x.isMouseOver(f)||c.isMouseOver&&c.isMouseOver()||
  a.isMouseOver&&a.isMouseOver()||a.__lockPopupWidgetFlag||h.close(a))})})}})):n=!1}))}if(b){c=c||{};var A=c.openMouseEvent?c.openMouseEvent:E("touch")?D.release:"click, mouseup",a="function"!==typeof b?b:null;if(a)var f=l.moveOffScreen(a);var n=!1;a&&(a.__openPopupWidgetFunc=g);var p;if(!1!==c.openOnMouseEvent){var k=g;if(c.toggleOnClick)var t,k=function(b){t=t||b.type;a?t==b.type&&h.toggle(a):g()};p=!1===c.onClickComponent?null:void 0!==c.noDragClickTolerance?F.addNoDragClickHandler(c.onClickComponent||
  m,k,{tolerance:c.noDragClickTolerance}):u(c.onClickComponent||m,A,k)}c.openPopup&&g();return{remove:function(){a&&"function"!==typeof a&&(h.close(a),z(a),a._popupWrapper&&(a.domNode&&a.domNode.parentNode===a._popupWrapper&&a._popupWrapper.removeChild(a.domNode),d.destroy(a._popupWrapper),delete a._popupWrapper),delete a.__openPopupWidgetFunc,delete a.__popupWidgetOpenFlag);p&&p.remove()}}}},setLocked:function(b,d){b.__lockPopupWidgetFlag=d},open:function(b){b&&!b.__lockPopupWidgetFlag&&!b.__popupWidgetOpenFlag&&
  b.__openPopupWidgetFunc&&b.__openPopupWidgetFunc()},close:function(b){b&&!b.__lockPopupWidgetFlag&&l.close(b)},isOpen:function(b){return!(!b||!b.__popupWidgetOpenFlag)},toggle:function(b){h.isOpen(b)?h.close(b):h.open(b)},refresh:function(b){if(b){b=b.__popupInfo;var d=q.isBodyLtr();b&&r.around(b.wrapper,b.around,b.orient,d)}},getWrapper:function(b){return b&&b._popupWrapper}};return h});