/*! ATOGOV - SPA 2025-03-18, Copyright (c) 2025 Australian Taxation Office */ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery)}(function(m){"use strict";var n=0;m.ajaxTransport("iframe",function(a){var o,i,p,t;if(a["async"])return o=a.initialIframeSrc||"javascript:false;",{send:function(e,r){(i=m('
')).attr("accept-charset",a.formAcceptCharset),t=/\?/.test(a.url)?"&":"?","DELETE"===a.type?(a.url=a.url+t+"_method=DELETE",a.type="POST"):"PUT"===a.type?(a.url=a.url+t+"_method=PUT",a.type="POST"):"PATCH"===a.type&&(a.url=a.url+t+"_method=PATCH",a.type="POST"),p=m('').bind("load",function(){var n,t=m.isArray(a.paramName)?a.paramName:[a.paramName];p.unbind("load").bind("load",function(){var e;try{if(!(e=p.contents()).length||!e[0].firstChild)throw new Error}catch(t){e=undefined}r(200,"success",{iframe:e}),m('').appendTo(i),window.setTimeout(function(){i.remove()},0)}),i.prop("target",p.prop("name")).prop("action",a.url).prop("method",a.type),a.formData&&m.each(a.formData,function(e,t){m('').prop("name",t.name).val(t.value).appendTo(i)}),a.fileInput&&a.fileInput.length&&"POST"===a.type&&(n=a.fileInput.clone(),a.fileInput.after(function(e){return n[e]}),a.paramName&&a.fileInput.each(function(e){m(this).prop("name",t[e]||a.paramName)}),i.append(a.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),a.fileInput.removeAttr("form")),i.submit(),n&&n.length&&a.fileInput.each(function(e,t){var r=m(n[e]);m(t).prop("name",r.prop("name")).attr("form",r.attr("form")),r.replaceWith(t)})}),i.append(p).appendTo(document.body)},abort:function(){p&&p.unbind("load").prop("src",o),i&&i.remove()}}}),m.ajaxSetup({converters:{"iframe text":function(e){return e&&m(e[0].body).text()},"iframe json":function(e){return e&&m.parseJSON(m(e[0].body).text())},"iframe html":function(e){return e&&m(e[0].body).html()},"iframe xml":function(e){var t=e&&e[0];return t&&m.isXMLDoc(t)?t:m.parseXML(t.XMLDocument&&t.XMLDocument.xml||m(t.body).html())},"iframe script":function(e){return e&&m.globalEval(m(e[0].body).text())}}})}); //# sourceMappingURL=jquery.iframe-transport-1.8.2.min.js.map