dispatch.to("Foundry/2.1 Core Plugins").at(function(e,t){e.ajaxPrefilter(function(e,t,n){if(e.iframe)return"iframe"}),e.ajaxTransport("iframe",function(t,n,r){function l(){a&&f.replaceWith(function(e){return u.get(e)}),i.remove(),s.attr("src","javascript:false;").remove()}var i=null,s=null,o="iframe-"+e.now(),u=e(t.files).filter(":file:enabled"),a=u.length>0,f=null;return t.dataTypes.shift(),i=e("<form enctype='multipart/form-data' method='post'></form>").hide().attr({action:t.url,target:o}),typeof t.data=="string"&&t.data.length>0&&e.error("data must not be serialized"),e.each(t.data||{},function(t,n){e.isPlainObject(n)&&(t=n.name,n=n.value),e.isArray(n)||(n=[n]),e.each(n,function(n,r){e("<input type='hidden' />").attr({name:t,value:r}).appendTo(i)})}),e("<input type='hidden' value='IFrame' name='X-Requested-With' />").appendTo(i),a&&(f=u.after(function(t){return e(this).clone().prop("disabled",!0)}).next(),u.appendTo(i)),{send:function(t,n){s=e("<iframe src='javascript:false;' name='"+o+"' id='"+o+"' style='display:none'></iframe>"),s.bind("load",function(){s.unbind("load").bind("load",function(){var e=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,t=e.documentElement?e.documentElement:e.body,r=t.getElementsByTagName("textarea")[0],i=r?r.getAttribute("data-type"):null,s=r?r.getAttribute("data-status"):200,o=r?r.getAttribute("data-statusText"):"OK",u={html:t.innerHTML,text:i?r.value:t?t.textContent||t.innerText:null};l(),n(s,o,u,i?"Content-Type: "+i:null)}),i[0].submit()}),e("body").append(i,s)},abort:function(){s!==null&&(s.unbind("load").attr("src","javascript:false;"),l())}}})});