/*! * jQuery Form Plugin * version: 3.51.0-2014.06.20 * Requires jQuery v1.5 or later * Copyright (c) 2014 M. Alsup * Examples and documentation at: http://malsup.com/jquery/form/ * Project repository: https://github.com/malsup/form * Dual licensed under the MIT and GPL licenses. * https://github.com/malsup/form#copyright-and-license */ /*global ActiveXObject */(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):b("undefined"!=typeof jQuery?jQuery:window.Zepto)})(function(b){function z(a){var h=a.data;a.isDefaultPrevented()||(a.preventDefault(),b(a.target).ajaxSubmit(h))}function v(a){var h=a.target,d=b(h);if(!d.is("[type\x3dsubmit],[type\x3dimage]")){h=d.closest("[type\x3dsubmit]");if(0===h.length)return;h=h[0]}var c=this;c.clk=h;"image"==h.type&&(void 0!==a.offsetX?(c.clk_x=a.offsetX,c.clk_y=a.offsetY):"function"==typeof b.fn.offset?(d=d.offset(),c.clk_x=a.pageX-d.left,c.clk_y=a.pageY-d.top):(c.clk_x=a.pageX-h.offsetLeft,c.clk_y=a.pageY-h.offsetTop));setTimeout(function(){c.clk=c.clk_x=c.clk_y=null},100)}function r(){if(b.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(a):window.opera&&window.opera.postError&&window.opera.postError(a)}}var B,C;B=void 0!==b("\x3cinput type\x3d'file'/\x3e").get(0).files;C=void 0!==window.FormData;var F=!!b.fn.prop;b.fn.attr2=function(){if(!F)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"===typeof a?a:this.attr.apply(this,arguments)};b.fn.ajaxSubmit=function(a){function h(c){c=b.param(c,a.traditional).split("\x26");var f=c.length,h=[],g,d;for(g=0;gk.status||304===k.status?"success":"error");"success"===a?(e.success&&e.success.call(e.context,A,"success",k),y.resolve(k.responseText,"success",k),u&&b.event.trigger("ajaxSuccess",[k,e])):a&&(void 0===c&&(c=k.statusText),e.error&&e.error.call(e.context,k,a,c),y.reject(k,"error",c),u&&b.event.trigger("ajaxError",[k,e,c]));u&&b.event.trigger("ajaxComplete",[k,e]);u&&!--b.active&&b.event.trigger("ajaxStop");e.complete&&e.complete.call(e.context,k,a);C=!0;e.timeout&&clearTimeout(v);setTimeout(function(){e.iframeTarget?x.attr("src",e.iframeSrc):x.remove();k.responseXML=null},100)}}var l=n[0],m,e,u,t,x,w,k,z,v,y=b.Deferred();y.abort=function(a){k.abort(a)};if(c)for(m=0;mf)return null;for(var d=[],g=a.options,n=(c="select-one"==c)?f+1:g.length,f=c?f:0;f