(function(){var moduleFactory=function($){var module=this,exports=function(){var self=$.server=function(e){var t=$.Deferred(),n=$.extend(!0,{},self.defaultOptions,e,{success:function(){}});return t.xhr=$.Ajax(n).done(function(n){if(typeof n=="string")try{n=$.parseJSON(n)}catch(r){}$.isArray(n)?$.each(n,function(n,r){var i=r.type,s=self.parsers[i]||e[i];$.isFunction(s)&&s.apply(t,r.data)}):t.rejectWith(t,["Invalid server response."]),t.state()==="pending"&&t.resolveWith(t)}).fail(function(e,n,r){r=r||["Error retrieving data from server."],t.rejectWith(t,r)}),t};self.defaultOptions={type:"POST",data:{tmpl:"component",format:"ajax",no_html:1},dataType:"json"},self.parsers={script:function(){var data=$.makeArray(arguments);if(typeof data[0]=="string"){try{eval(data[0])}catch(err){}return}var chain=window,chainBroken=!1;$.each(data,function(e,t){t.property==="Foundry"&&(t.property=$.globalNamespace),t.method==="Foundry"&&(t.method=$.globalNamespace);try{switch(t.type){case"get":chain=chain[t.property];break;case"set":chain[t.property]=t.value,chainBroken=!0;break;case"call":chain=chain[t.method].apply(chain,t.args)}}catch(n){chainBroken=!0}})},resolve:function(){this.resolveWith(this,arguments)},reject:function(e){this.rejectWith(this,arguments)}}};exports(),module.resolveWith(exports)};dispatch("server").containing(moduleFactory).to("Foundry/2.1 Modules")})();