!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../Task","../activities/main"],e)}(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=e("tslib"),u=e("../Task"),s=a.__importStar(e("../activities/main"));function c(){return"require"}function l(n,r,i){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(e){return"function"!=typeof r&&(r=o.global[c()]),t=new u.Task(function(t){r([n],function(e){t(e),"function"==typeof i&&i(e)})}),[2,u.Task.race([t,new u.Task(function(e,t){return setTimeout(t,9e4)})])]})})}o.global=new Function("return this")(),"function"!=typeof o.global.Promise&&(o.global.Promise=Promise),o.load=l;var i=0,f={};o.registerModuleName=function(e){var t;if(void 0!==(n=f[e]))return n;var n="@geocortex/workflow/externals/ext-"+i++,r="/"===e[e.length-1]?e.substring(0,e.length-1):e;return o.global[c()]({paths:((t={})[n]=r,t)}),f[e]=n},o.importModule=function(n,r,i){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(e){switch(e.label){case 0:return"@geocortex/workflow/runtime/activities/main"!==n?[3,1]:(t=s,[3,3]);case 1:return[4,l(n)];case 2:t=e.sent(),e.label=3;case 3:return null==t||"function"!=typeof t.main?[3,5]:[4,t.main.call(o.global,l,r,i)];case 4:return[2,e.sent()];case 5:return[2,t]}})})}});