dispatch.to("Foundry/2.1 Core Plugins").at(function(e,t){e.module=function(){var t=function(n,r){var i;if(typeof n=="string"){i=t.get(n);if(r===undefined)return i;if(e.isFunction(r))return i.factory=r,i.status="loading",r.call(i,e),i}var s=this;if(e.isArray(n)){var o=e.map(n,function(n){if(e.isFunction(n))return n;if(e.isPlainObject(n)){var r=t.get(n.name);return r===undefined?null:(r.status==="pending"&&(r.status="loading"),n.module=r,n)}});e.each(o,function(n,r){if(e.isFunction(r)){r();return}e.isPlainObject(r)&&t.apply(s,[r.name,r.factory])})}};return e.extend(t,{registry:{},get:function(e){if(e===undefined)return;return t.registry[e]||t.create(e)},create:function(n){var r=e.Deferred();return e.extend(r,{name:n,type:"module",status:"pending"}),r.done(function(){r.exports=this,r.status="ready"}),t.registry[n]=r},remove:function(e){delete t.registry[e]}}),t}(),dispatch.to("Foundry/2.1 Modules").at(function(t,n){e.module(n.name,t)})});