!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../../Validation","./tools","./MapProvider","../../Hooks"],e)}(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=e("tslib"),c=e("../../Validation"),u=e("./tools"),n=e("./MapProvider"),e=e("../../Hooks"),n=(i.prototype.execute=function(e,o,t){var n=c.validation.string("url",e.url,c.validation.never),n=u.addToPath(n,"reverseGeocode"),i=c.validation.exists("location",e.location),a=c.validation.number("distance",e.distance,void 0),r=c.validation.string("languageCode",e.languageCode,void 0),l=c.validation.boolean("returnIntersection",e.returnIntersection,!1),d=c.validation.number("timeout",e.timeout,void 0),l={location:i instanceof Array?i.toString():i,distance:a,outSR:t.getOutSR(e.outSpatialReference),langCode:r,returnIntersection:l},d=u.fetch(n,l,d,o.cancellationToken.signal);return u.schedulePromiseCancellation(o,d),u.inline(d,function(e){return{address:e.address,location:e.location}},e.continueOnError?function(){return{address:null,location:null}}:null)},i.action="gcx:wf:arcgis::ReverseGeocode",i.suite="gcx:wf:builtin",t.__decorate([e.activate(n.MapProvider)],i));function i(){}o.ReverseGeocode=n});