home/wwgoat/public_html/blog/wp-includes/js/jquery/jquery.form.min.js 0000644 00000037151 14720705540 0022032 0 ustar 00 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(jQuery)}(function(O){"use strict";var d=/\r?\n/g,h={},X=(h.fileapi=void 0!==O('').get(0).files,h.formdata=void 0!==window.FormData,!!O.fn.prop);function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),O(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,a=O(t);if(!a.is("[type=submit],[type=image]")){var r=a.closest("[type=submit]");if(0===r.length)return;t=r[0]}var n=t.form;"image"===(n.clk=t).type&&(void 0!==e.offsetX?(n.clk_x=e.offsetX,n.clk_y=e.offsetY):"function"==typeof O.fn.offset?(r=a.offset(),n.clk_x=e.pageX-r.left,n.clk_y=e.pageY-r.top):(n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function C(){var e;O.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}O.fn.attr2=function(){var e;return X&&((e=this.prop.apply(this,arguments))&&e.jquery||"string"==typeof e)?e:this.attr.apply(this,arguments)},O.fn.ajaxSubmit=function(F,e,t,a){if(this.length){var E,L=this,e=("function"==typeof F?F={success:F}:"string"==typeof F||!1===F&&0',c)).css({position:"absolute",top:"-1000px",left:"-1000px"}),d=f[0],m={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";C("aborting upload... "+t),this.aborted=1;try{d.contentWindow.document.execCommand&&d.contentWindow.document.execCommand("Stop")}catch(e){}f.attr("src",l.iframeSrc),m.error=t,l.error&&l.error.call(l.context,m,t,e),u&&O.event.trigger("ajaxError",[m,l,t]),l.complete&&l.complete.call(l.context,m,t)}},(u=l.global)&&0==O.active++&&O.event.trigger("ajaxStart"),u&&O.event.trigger("ajaxSend",[m,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,m,l)?(l.global&&O.active--,g.reject()):m.aborted?g.reject():((e=o.clk)&&(r=e.name)&&!e.disabled&&(l.extraData=l.extraData||{},l.extraData[r]=e.value,"image"===e.type)&&(l.extraData[r+".x"]=o.clk_x,l.extraData[r+".y"]=o.clk_y),v=1,x=2,e=O("meta[name=csrf-token]").attr("content"),(r=O("meta[name=csrf-param]").attr("content"))&&e&&(l.extraData=l.extraData||{},l.extraData[r]=e),l.forceSync?n():setTimeout(n,10),T=50,w=O.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},i=O.parseJSON||function(e){return window.eval("("+e+")")},S=function(e,t,a){var r=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=r.indexOf("xml"),e=n?e.responseXML:e.responseText;return n&&"parsererror"===e.documentElement.nodeName&&O.error&&O.error("parsererror"),"string"==typeof(e=a&&a.dataFilter?a.dataFilter(e,t):e)&&(("json"===t||!t)&&0<=r.indexOf("json")?e=i(e):("script"===t||!t)&&0<=r.indexOf("javascript")&&O.globalEval(e)),e}),g;function D(t){var a=null;try{t.contentWindow&&(a=t.contentWindow.document)}catch(e){C("cannot get iframe.contentWindow document: "+e)}if(!a)try{a=t.contentDocument||t.document}catch(e){C("cannot get iframe.contentDocument: "+e),a=t.document}return a}function n(){var e=L.attr2("target"),t=L.attr2("action"),a=L.attr("enctype")||L.attr("encoding")||"multipart/form-data";o.setAttribute("target",s),E&&!/post/i.test(E)||o.setAttribute("method","POST"),t!==l.url&&o.setAttribute("action",l.url),l.skipEncodingOverride||E&&!/post/i.test(E)||L.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(h=setTimeout(function(){p=!0,A(v)},l.timeout));var r=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(O.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?r.push(O('',c).val(l.extraData[n].value).appendTo(o)[0]):r.push(O('',c).val(l.extraData[n]).appendTo(o)[0]));l.iframeTarget||f.appendTo(k),d.attachEvent?d.attachEvent("onload",A):d.addEventListener("load",A,!1),setTimeout(function e(){try{var t=D(d).readyState;C("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){C("Server abort: ",e," (",e.name,")"),A(x),h&&clearTimeout(h),h=void 0}},15);try{o.submit()}catch(e){document.createElement("form").submit.apply(o)}}finally{o.setAttribute("action",t),o.setAttribute("enctype",a),e?o.setAttribute("target",e):L.removeAttr("target"),O(r).remove()}}function A(t){if(!m.aborted&&!j)if((b=D(d))||(C("cannot access response document"),t=x),t===v&&m)m.abort("timeout"),g.reject(m,"timeout");else if(t===x&&m)m.abort("server abort"),g.reject(m,"error","server abort");else if(b&&b.location.href!==l.iframeSrc||p){d.detachEvent?d.detachEvent("onload",A):d.removeEventListener("load",A,!1);var a,t="success";try{if(p)throw"timeout";var e="xml"===l.dataType||b.XMLDocument||O.isXMLDoc(b);if(C("isXml="+e),!e&&window.opera&&(null===b.body||!b.body.innerHTML)&&--T)return C("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var r,n,o,i=b.body||b.documentElement,s=(m.responseText=i?i.innerHTML:null,m.responseXML=b.XMLDocument||b,e&&(l.dataType="xml"),m.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},i&&(m.status=Number(i.getAttribute("status"))||m.status,m.statusText=i.getAttribute("statusText")||m.statusText),(l.dataType||"").toLowerCase()),c=/(json|script|text)/.test(s);c||l.textarea?(r=b.getElementsByTagName("textarea")[0])?(m.responseText=r.value,m.status=Number(r.getAttribute("status"))||m.status,m.statusText=r.getAttribute("statusText")||m.statusText):c&&(n=b.getElementsByTagName("pre")[0],o=b.getElementsByTagName("body")[0],n?m.responseText=n.textContent||n.innerText:o&&(m.responseText=o.textContent||o.innerText)):"xml"===s&&!m.responseXML&&m.responseText&&(m.responseXML=w(m.responseText));try{y=S(m,s,l)}catch(e){t="parsererror",m.error=a=e||t}}catch(e){C("error caught: ",e),t="error",m.error=a=e||t}m.aborted&&(C("upload aborted"),t=null),"success"===(t=m.status?200<=m.status&&m.status<300||304===m.status?"success":"error":t)?(l.success&&l.success.call(l.context,y,"success",m),g.resolve(m.responseText,"success",m),u&&O.event.trigger("ajaxSuccess",[m,l])):t&&(void 0===a&&(a=m.statusText),l.error&&l.error.call(l.context,m,t,a),g.reject(m,"error",a),u)&&O.event.trigger("ajaxError",[m,l,a]),u&&O.event.trigger("ajaxComplete",[m,l]),u&&!--O.active&&O.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,m,t),j=!0,l.timeout&&clearTimeout(h),setTimeout(function(){l.iframeTarget?f.attr("src",l.iframeSrc):f.remove(),m.responseXML=null},100)}}}},O.fn.ajaxForm=function(e,t,a,r){var n;return("string"==typeof e||!1===e&&0