/** * jQuery serializeObject * @copyright 2014, macek * @link https://github.com/macek/jquery-serialize-object * @license BSD * @version 2.5.0 */ (function(n,t){if(typeof define=="function"&&define.amd)define(["exports","jquery"],function(n,i){return t(n,i)});else if(typeof exports!="undefined"){var i=require("jquery");t(exports,i)}else t(n,n.jQuery||n.Zepto||n.ender||n.$)})(this,function(n,t){function i(n,i){function u(n,t,i){return n[t]=i,n}function s(n,t){for(var e=n.match(r.key),i,f;(i=e.pop())!==undefined;)r.push.test(i)?(f=h(n.replace(/\[\]$/,"")),t=u([],f,t)):r.fixed.test(i)?t=u([],i,t):r.named.test(i)&&(t=u({},i,t));return t}function h(n){return e[n]===undefined&&(e[n]=0),e[n]++}function c(n){switch(t('[name="'+n.name+'"]',i).attr("type")){case"checkbox":return n.value==="on"?!0:n.value;default:var r=t('[name="'+n.name+'"]',i).attr("data-type"),u=t('[name="'+n.name+'"]',i).attr("data-name");return r&&u&&u=="int"||r=="pop"?t('[name="'+n.name+'"]',i).data("value")||t('[name="'+n.name+'"]',i).attr("data-value")||n.value:n.value}}function l(t){if(!r.validate.test(t.name))return this;var i=s(t.name,c(t));return f=n.extend(!0,f,i),this}function a(t){if(!n.isArray(t))throw new Error("formSerializer.addPairs expects an Array");for(var i=0,r=t.length;i