").append(se.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},se.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){se.fn[t]=function(e){return this.on(t,e)}}),se.each(["get","post"],function(e,n){se[n]=function(e,r,i,a){return se.isFunction(r)&&(a=a||i,i=r,r=t),se.ajax({url:e,type:n,dataType:a,data:r,success:i})}}),se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At,type:"GET",isLocal:qt.test(St[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":se.parseJSON,"text xml":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?L(L(e,se.ajaxSettings),t):L(se.ajaxSettings,e)},ajaxPrefilter:D(Bt),ajaxTransport:D(It),ajax:function(e,n){function r(e,n,r,s){var l,d,y,b,w,C=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,o=s||"",T.readyState=e>0?4:0,r&&(b=_(f,T,r)),e>=200&&300>e||304===e?(f.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(se.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(se.etag[a]=w)),304===e?(l=!0,C="notmodified"):(l=M(f,b),C=l.state,d=l.data,y=l.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(n||C)+"",l?m.resolveWith(p,[d,C,T]):m.rejectWith(p,[T,C,y]),T.statusCode(v),v=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[T,f,l?d:y]),g.fireWith(p,[T,C]),c&&(h.trigger("ajaxComplete",[T,f]),--se.active||se.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,a,o,s,u,l,c,d,f=se.ajaxSetup({},n),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?se(p):se.event,m=se.Deferred(),g=se.Callbacks("once memory"),v=f.statusCode||{},y={},b={},x=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=Mt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),r(0,t),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,f.url=((e||f.url||At)+"").replace(Lt,"").replace(Ot,St[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=se.trim(f.dataType||"*").toLowerCase().match(le)||[""],null==f.crossDomain&&(l=Pt.exec(f.url.toLowerCase()),f.crossDomain=!(!l||l[1]===St[1]&&l[2]===St[2]&&(l[3]||("http:"===l[1]?80:443))==(St[3]||("http:"===St[1]?80:443)))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=se.param(f.data,f.traditional)),j(Bt,f,n,T),2===x)return T;c=f.global,c&&0===se.active++&&se.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ht.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(jt.test(a)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=_t.test(a)?a.replace(_t,"$1_="+Dt++):a+(jt.test(a)?"&":"?")+"_="+Dt++)),f.ifModified&&(se.lastModified[a]&&T.setRequestHeader("If-Modified-Since",se.lastModified[a]),se.etag[a]&&T.setRequestHeader("If-None-Match",se.etag[a])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+zt+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(f.beforeSend.call(p,T,f)===!1||2===x))return T.abort();w="abort";for(d in{success:1,error:1,complete:1})T[d](f[d]);if(i=j(It,f,n,T)){T.readyState=1,c&&h.trigger("ajaxSend",[T,f]),f.async&&f.timeout>0&&(u=setTimeout(function(){T.abort("timeout")},f.timeout));try{x=1,i.send(y,r)}catch(C){if(!(2>x))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getScript:function(e,n){return se.get(e,t,n,"script")},getJSON:function(e,t,n){return se.get(e,t,n,"json")}}),se.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return se.globalEval(e),e}}}),se.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),se.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=U.head||se("head")[0]||U.documentElement;return{send:function(t,i){n=U.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var $t=[],Xt=/(=)\?(?=&|$)|\?\?/;se.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||se.expando+"_"+Dt++;return this[e]=!0,e}}),se.ajaxPrefilter("json jsonp",function(n,r,i){var a,o,s,u=n.jsonp!==!1&&(Xt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(a=n.jsonpCallback=se.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Xt,"$1"+a):n.jsonp!==!1&&(n.url+=(jt.test(n.url)?"&":"?")+n.jsonp+"="+a),n.converters["script json"]=function(){return s||se.error(a+" was not called"),s[0]},n.dataTypes[0]="json",o=e[a],e[a]=function(){s=arguments},i.always(function(){e[a]=o,n[a]&&(n.jsonpCallback=r.jsonpCallback,$t.push(a)),s&&se.isFunction(o)&&o(s[0]),s=o=t}),"script"):t});var Vt,Ut,Qt=0,Yt=e.ActiveXObject&&function(){var e;for(e in Vt)Vt[e](t,!0)};se.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&q()||H()}:q,Ut=se.ajaxSettings.xhr(),se.support.cors=!!Ut&&"withCredentials"in Ut,Ut=se.support.ajax=!!Ut,Ut&&se.ajaxTransport(function(n){if(!n.crossDomain||se.support.cors){var r;return{send:function(i,a){var o,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,d,f;try{if(r&&(i||4===u.readyState))if(r=t,o&&(u.onreadystatechange=se.noop,Yt&&delete Vt[o]),i)4!==u.readyState&&u.abort();else{d={},s=u.status,f=u.responseXML,c=u.getAllResponseHeaders(),f&&f.documentElement&&(d.xml=f),"string"==typeof u.responseText&&(d.text=u.responseText);try{l=u.statusText}catch(p){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=d.text?200:404}}catch(h){i||a(-1,h)}d&&a(s,l,d,c)},n.async?4===u.readyState?setTimeout(r):(o=++Qt,Yt&&(Vt||(Vt={},se(e).unload(Yt)),Vt[o]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Gt,Jt,Zt=/^(?:toggle|show|hide)$/,Kt=RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[I],nn={"*":[function(e,t){var n,r,i=this.createTween(e,t),a=Kt.exec(t),o=i.cur(),s=+o||0,u=1,l=20;if(a){if(n=+a[2],r=a[3]||(se.cssNumber[e]?"":"px"),"px"!==r&&s){s=se.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,se.style(i.elem,e,s+r);while(u!==(u=i.cur()/o)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=a[1]?s+(a[1]+1)*n:n}return i}]};se.Animation=se.extend(R,{tweener:function(e,t){se.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],nn[n]=nn[n]||[],nn[n].unshift(t)},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),se.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(se.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.pos=t=this.options.duration?se.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=se.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){se.fx.step[e.prop]?se.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[se.cssProps[e.prop]]||se.cssHooks[e.prop])?se.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},se.each(["toggle","show","hide"],function(e,t){var n=se.fn[t];se.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(W(t,!0),e,r,i)}}),se.fn.extend({fadeTo:function(e,t,n,r){return this.filter(T).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=se.isEmptyObject(e),a=se.speed(t,n,r),o=function(){var t=R(this,se.extend({},e),a);o.finish=function(){t.stop(!0)},(i||se._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",a=se.timers,o=se._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&en.test(n)&&i(o[n]);for(n=a.length;n--;)a[n].elem!==this||null!=e&&a[n].queue!==e||(a[n].anim.stop(r),t=!1,a.splice(n,1));(t||!r)&&se.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=se._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],a=se.timers,o=r?r.length:0;for(n.finish=!0,se.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),se.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){se.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),se.speed=function(e,t,n){var r=e&&"object"==typeof e?se.extend({},e):{complete:n||!n&&t||se.isFunction(e)&&e,duration:e,easing:n&&t||t&&!se.isFunction(t)&&t};return r.duration=se.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in se.fx.speeds?se.fx.speeds[r.duration]:se.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){se.isFunction(r.old)&&r.old.call(this),r.queue&&se.dequeue(this,r.queue)},r},se.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},se.timers=[],se.fx=z.prototype.init,se.fx.tick=function(){var e,n=se.timers,r=0;for(Gt=se.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||se.fx.stop(),Gt=t},se.fx.timer=function(e){e()&&se.timers.push(e)&&se.fx.start()},se.fx.interval=13,se.fx.start=function(){Jt||(Jt=setInterval(se.fx.tick,se.fx.interval))},se.fx.stop=function(){clearInterval(Jt),Jt=null},se.fx.speeds={slow:600,fast:200,_default:400},se.fx.step={},se.expr&&se.expr.filters&&(se.expr.filters.animated=function(e){return se.grep(se.timers,function(t){return e===t.elem}).length}),se.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){se.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},a=this[0],o=a&&a.ownerDocument;return o?(n=o.documentElement,se.contains(n,a)?(a.getBoundingClientRect!==t&&(i=a.getBoundingClientRect()),r=$(o),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i):void 0},se.offset={setOffset:function(e,t,n){var r=se.css(e,"position");"static"===r&&(e.style.position="relative");var i,a,o=se(e),s=o.offset(),u=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===r||"fixed"===r)&&se.inArray("auto",[u,l])>-1,d={},f={};c?(f=o.position(),i=f.top,a=f.left):(i=parseFloat(u)||0,a=parseFloat(l)||0),se.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+i),null!=t.left&&(d.left=t.left-s.left+a),"using"in t?t.using.call(e,d):o.css(d)}},se.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===se.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),se.nodeName(e[0],"html")||(n=e.offset()),n.top+=se.css(e[0],"borderTopWidth",!0),n.left+=se.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-se.css(r,"marginTop",!0),left:t.left-n.left-se.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||U.documentElement;e&&!se.nodeName(e,"html")&&"static"===se.css(e,"position");)e=e.offsetParent;return e||U.documentElement})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);se.fn[e]=function(i){return se.access(this,function(e,i,a){var o=$(e);return a===t?o?n in o?o[n]:o.document.documentElement[i]:e[i]:(o?o.scrollTo(r?se(o).scrollLeft():a,r?a:se(o).scrollTop()):e[i]=a,t)},e,i,arguments.length,null)}}),se.each({Height:"height",Width:"width"},function(e,n){se.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){se.fn[i]=function(i,a){var o=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||a===!0?"margin":"border");return se.access(this,function(n,r,i){var a;return se.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(a=n.documentElement,Math.max(n.body["scroll"+e],a["scroll"+e],n.body["offset"+e],a["offset"+e],a["client"+e])):i===t?se.css(n,r,s):se.style(n,r,i,s)},n,o?i:t,o,null)}})}),e.jQuery=e.$=se,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return se})}(window),!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var n=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(n))}function n(t){var n=t.target,r=e(n);if(!r.is("[type=submit],[type=image]")){var i=r.closest("[type=submit]");if(0===i.length)return;n=i[0]}var a=this;if(a.clk=n,"image"==n.type)if(void 0!==t.offsetX)a.clk_x=t.offsetX,a.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=r.offset();a.clk_x=t.pageX-o.left,a.clk_y=t.pageY-o.top}else a.clk_x=t.pageX-n.offsetLeft,a.clk_y=t.pageY-n.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function r(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var i={};i.fileapi=void 0!==e("
").get(0).files,i.formdata=void 0!==window.FormData;var a=!!e.fn.prop;e.fn.attr2=function(){if(!a)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function n(n){var r,i,a=e.param(n,t.traditional).split("&"),o=a.length,s=[];for(r=0;o>r;r++)a[r]=a[r].replace(/\+/g," "),i=a[r].split("="),s.push([decodeURIComponent(i[0]),decodeURIComponent(i[1])]);return s}function o(r){for(var i=new FormData,a=0;a
').val(f.extraData[p].value).appendTo(C)[0]:e('').val(f.extraData[p]).appendTo(C)[0]);
f.iframeTarget||g.appendTo("body"),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{C.submit()}catch(m){var y=document.createElement("form").submit;y.apply(C)}}finally{C.setAttribute("action",a),C.setAttribute("enctype",l),n?C.setAttribute("target",n):d.removeAttr("target"),e(c).remove()}}function s(t){if(!y.aborted&&!j){if(D=i(v),D||(r("cannot access response document"),t=E),t===F&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(t==E&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(D&&D.location.href!=f.iframeSrc||w){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var n,a="success";try{if(w)throw"timeout";var o="xml"==f.dataType||D.XMLDocument||e.isXMLDoc(D);if(r("isXml="+o),!o&&window.opera&&(null===D.body||!D.body.innerHTML)&&--L)return r("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=D.body?D.body:D.documentElement;y.responseText=u?u.innerHTML:null,y.responseXML=D.XMLDocument?D.XMLDocument:D,o&&(f.dataType="xml"),y.getResponseHeader=function(e){var t={"content-type":f.dataType};return t[e.toLowerCase()]},u&&(y.status=Number(u.getAttribute("status"))||y.status,y.statusText=u.getAttribute("statusText")||y.statusText);var l=(f.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||f.textarea){var d=D.getElementsByTagName("textarea")[0];if(d)y.responseText=d.value,y.status=Number(d.getAttribute("status"))||y.status,y.statusText=d.getAttribute("statusText")||y.statusText;else if(c){var h=D.getElementsByTagName("pre")[0],m=D.getElementsByTagName("body")[0];h?y.responseText=h.textContent?h.textContent:h.innerText:m&&(y.responseText=m.textContent?m.textContent:m.innerText)}}else"xml"==l&&!y.responseXML&&y.responseText&&(y.responseXML=_(y.responseText));try{A=q(y,l,f)}catch(b){a="parsererror",y.error=n=b||a}}catch(b){r("error caught: ",b),a="error",y.error=n=b||a}y.aborted&&(r("upload aborted"),a=null),y.status&&(a=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===a?(f.success&&f.success.call(f.context,A,"success",y),k.resolve(y.responseText,"success",y),p&&e.event.trigger("ajaxSuccess",[y,f])):a&&(void 0===n&&(n=y.statusText),f.error&&f.error.call(f.context,y,a,n),k.reject(y,"error",n),p&&e.event.trigger("ajaxError",[y,f,n])),p&&e.event.trigger("ajaxComplete",[y,f]),p&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,y,a),j=!0,f.timeout&&clearTimeout(T),setTimeout(function(){f.iframeTarget?g.attr("src",f.iframeSrc):g.remove(),y.responseXML=null},100)}}}var l,c,f,p,h,g,v,y,b,x,w,T,C=d[0],k=e.Deferred();if(k.abort=function(e){y.abort(e)},n)for(c=0;c'),g.css({position:"absolute",top:"-1000px",left:"-1000px"})),v=g[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var n="timeout"===t?"timeout":"aborted";r("aborting upload... "+n),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(i){}g.attr("src",f.iframeSrc),y.error=n,f.error&&f.error.call(f.context,y,n,t),p&&e.event.trigger("ajaxError",[y,f,n]),f.complete&&f.complete.call(f.context,y,n)}},p=f.global,p&&0===e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[y,f]),f.beforeSend&&f.beforeSend.call(f.context,y,f)===!1)return f.global&&e.active--,k.reject(),k;if(y.aborted)return k.reject(),k;b=C.clk,b&&(x=b.name,x&&!b.disabled&&(f.extraData=f.extraData||{},f.extraData[x]=b.value,"image"==b.type&&(f.extraData[x+".x"]=C.clk_x,f.extraData[x+".y"]=C.clk_y)));var F=1,E=2,N=e("meta[name=csrf-token]").attr("content"),S=e("meta[name=csrf-param]").attr("content");S&&N&&(f.extraData=f.extraData||{},f.extraData[S]=N),f.forceSync?o():setTimeout(o,10);var A,D,j,L=50,_=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},M=e.parseJSON||function(e){return window.eval("("+e+")")},q=function(t,n,r){var i=t.getResponseHeader("content-type")||"",a="xml"===n||!n&&i.indexOf("xml")>=0,o=a?t.responseXML:t.responseText;return a&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,n)),"string"==typeof o&&("json"===n||!n&&i.indexOf("json")>=0?o=M(o):("script"===n||!n&&i.indexOf("javascript")>=0)&&e.globalEval(o)),o};return k}if(!this.length)return r("ajaxSubmit: skipping submit process - no element selected"),this;var u,l,c,d=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),l=t.url||this.attr2("action"),c="string"==typeof l?e.trim(l):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:c,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var f={};if(this.trigger("form-pre-serialize",[this,t,f]),f.veto)return r("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return r("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=t.traditional;void 0===p&&(p=e.ajaxSettings.traditional);var h,m=[],g=this.formToArray(t.semantic,m);if(t.data&&(t.extraData=t.data,h=e.param(t.data,p)),t.beforeSubmit&&t.beforeSubmit(g,this,t)===!1)return r("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[g,this,t,f]),f.veto)return r("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=e.param(g,p);h&&(v=v?v+"&"+h:h),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+v,t.data=null):t.data=v;var y=[];if(t.resetForm&&y.push(function(){d.resetForm()}),t.clearForm&&y.push(function(){d.clearForm(t.includeHidden)}),!t.dataType&&t.target){var b=t.success||function(){};y.push(function(n){var r=t.replaceTarget?"replaceWith":"html";e(t.target)[r](n).each(b,arguments)})}else t.success&&y.push(t.success);if(t.success=function(e,n,r){for(var i=t.context||this,a=0,o=y.length;o>a;a++)y[a].apply(i,[e,n,r||d,d])},t.error){var x=t.error;t.error=function(e,n,r){var i=t.context||this;x.apply(i,[e,n,r,d])}}if(t.complete){var w=t.complete;t.complete=function(e,n){var r=t.context||this;w.apply(r,[e,n,d])}}var T=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),C=T.length>0,k="multipart/form-data",F=d.attr("enctype")==k||d.attr("encoding")==k,E=i.fileapi&&i.formdata;r("fileAPI :"+E);var N,S=(C||F)&&!E;t.iframe!==!1&&(t.iframe||S)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){N=s(g)}):N=s(g):N=(C||F)&&E?o(g):e.ajax(t),d.removeData("jqxhr").data("jqxhr",N);for(var A=0;Al;l++)if(p=u[l],d=p.name,d&&!p.disabled)if(t&&o.clk&&"image"==p.type)o.clk==p&&(r.push({name:d,value:e(p).val(),type:p.type}),r.push({name:d+".x",value:o.clk_x},{name:d+".y",value:o.clk_y}));else if(f=e.fieldValue(p,!0),f&&f.constructor==Array)for(n&&n.push(p),c=0,m=f.length;m>c;c++)r.push({name:d,value:f[c]});else if(i.fileapi&&"file"==p.type){n&&n.push(p);var g=p.files;if(g.length)for(c=0;ca;a++)n.push({name:r,value:i[a]});else null!==i&&"undefined"!=typeof i&&n.push({name:this.name,value:i})}}),e.param(n)},e.fn.fieldValue=function(t){for(var n=[],r=0,i=this.length;i>r;r++){var a=this[r],o=e.fieldValue(a,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(n,o):n.push(o))}return n},e.fieldValue=function(t,n){var r=t.name,i=t.type,a=t.tagName.toLowerCase();if(void 0===n&&(n=!0),n&&(!r||t.disabled||"reset"==i||"button"==i||("checkbox"==i||"radio"==i)&&!t.checked||("submit"==i||"image"==i)&&t.form&&t.form.clk!=t||"select"==a&&-1==t.selectedIndex))return null;if("select"==a){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,l="select-one"==i,c=l?o+1:u.length,d=l?o:0;c>d;d++){var f=u[d];if(f.selected){var p=f.value;if(p||(p=f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value),l)return p;s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var r=this.type,i=this.tagName.toLowerCase();n.test(r)||"textarea"==i?this.value="":"checkbox"==r||"radio"==r?this.checked=!1:"select"==i?this.selectedIndex=-1:"file"==r?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(r)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var n=this.type;if("checkbox"==n||"radio"==n)this.checked=t;else if("option"==this.tagName.toLowerCase()){var r=e(this).parent("select");t&&r[0]&&"select-one"==r[0].type&&r.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}),!function(e){e.extend(e.fn,{validate:function(t){if(!this.length)return void(t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var n=e.data(this[0],"validator");return n?n:(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){n.settings.submitHandler&&(n.submitButton=t.target),e(t.target).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==e(t.target).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return!n.settings.submitHandler||(n.submitButton&&(r=e("").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,t),n.submitButton&&r.remove(),!1)}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)})),n)},valid:function(){var t,n;return e(this[0]).is("form")?t=this.validate().form():(t=!0,n=e(this[0].form).validate(),this.each(function(){t=n.element(this)&&t})),t},removeAttrs:function(t){var n={},r=this;return e.each(t.split(/\s/),function(e,t){n[t]=r.attr(t),r.removeAttr(t)}),n},rules:function(t,n){var r,i,a,o,s,u,l=this[0];if(t)switch(r=e.data(l.form,"validator").settings,i=r.rules,a=e.validator.staticRules(l),t){case"add":e.extend(a,e.validator.normalizeRule(n)),delete a.messages,i[l.name]=a,n.messages&&(r.messages[l.name]=e.extend(r.messages[l.name],n.messages));break;case"remove":return n?(u={},e.each(n.split(/\s/),function(t,n){u[n]=a[n],delete a[n],"required"===n&&e(l).removeAttr("aria-required")}),u):(delete i[l.name],a)}return o=e.validator.normalizeRules(e.extend({},e.validator.classRules(l),e.validator.attributeRules(l),e.validator.dataRules(l),e.validator.staticRules(l)),l),o.required&&(s=o.required,delete o.required,o=e.extend({required:s},o),e(l).attr("aria-required","true")),o.remote&&(s=o.remote,delete o.remote,o=e.extend(o,{remote:s})),o}}),e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){return!!e.trim(""+e(t).val())},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return 1===arguments.length?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(e)).hide())},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(e,t){(9!==t.which||""!==this.elementValue(e))&&(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).addClass(n).removeClass(r):e(t).addClass(n).removeClass(r)},unhighlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).removeClass(n).addClass(r):e(t).removeClass(n).addClass(r)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){var n=e.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,""),i=n.settings;i[r]&&!this.is(i.ignore)&&i[r].call(n,this[0],t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n,r=this.groups={};e.each(this.settings.groups,function(t,n){"string"==typeof n&&(n=n.split(/\s/)),e.each(n,function(e,n){r[n]=t})}),n=this.settings.rules,e.each(n,function(t,r){n[t]=e.validator.normalizeRule(r)}),e(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",t).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",t),this.settings.invalidHandler&&e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),e(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var n=this.clean(t),r=this.validationTargetFor(n),i=!0;return this.lastElement=r,void 0===r?delete this.invalid[n.name]:(this.prepareElement(r),this.currentElements=e(r),i=this.check(r)!==!1,i?delete this.invalid[r.name]:this.invalid[r.name]=!0),e(t).attr("aria-invalid",!i),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){e.extend(this.errorMap,t),this.errorList=[];for(var n in t)this.errorList.push({message:t[n],element:this.findByName(n)[0]});this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)n++;return n},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),!(this.name in n||!t.objectLength(e(this).rules()))&&(n[this.name]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([]),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n,r=e(t),i=r.attr("type");return"radio"===i||"checkbox"===i?e("input[name='"+r.attr("name")+"']:checked").val():(n=r.val(),"string"==typeof n?n.replace(/\r/g,""):n)},check:function(t){t=this.validationTargetFor(this.clean(t));var n,r,i,a=e(t).rules(),o=e.map(a,function(e,t){return t}).length,s=!1,u=this.elementValue(t);for(r in a){i={method:r,parameters:a[r]};try{if(n=e.validator.methods[r].call(this,u,t,i.parameters),"dependency-mismatch"===n&&1===o){s=!0;continue}if(s=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!n)return this.formatAndAdd(t,i),!1}catch(l){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+i.method+"' method.",l),l}}if(!s)return this.objectLength(a)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg"+n[0].toUpperCase()+n.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;eWarning: No message defined for "+t.name+"")},formatAndAdd:function(t,n){var r=this.defaultMessage(t,n.method),i=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,n.parameters,t):i.test(r)&&(r=e.validator.format(r.replace(i,"{$1}"),n.parameters)),this.errorList.push({message:r,element:t,method:n.method}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,n;for(e=0;this.errorList[e];e++)n=this.errorList[e],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(n)):(r=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,e(t)):r.insertAfter(t))),!n&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name).not(this.settings.ignore)[0]),e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+t+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{"boolean":function(e){return e},string:function(t,n){return!!e(t,n.form).length},"function":function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,this.pending[e.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},r=e(t).attr("class");return r&&e.each(r.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},attributeRules:function(t){var n,r,i={},a=e(t),o=t.getAttribute("type");for(n in e.validator.methods)"required"===n?(r=t.getAttribute(n),""===r&&(r=!0),r=!!r):r=a.attr(n),/min|max/.test(n)&&(null===o||/number|range|text/.test(o))&&(r=Number(r)),r||0===r?i[n]=r:o===n&&"range"!==o&&(i[n]=!0);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(t){var n,r,i={},a=e(t);for(n in e.validator.methods)r=a.data("rule"+n[0].toUpperCase()+n.substring(1).toLowerCase()),void 0!==r&&(i[n]=r);return i},staticRules:function(t){var n={},r=e.data(t.form,"validator");return r.settings.rules&&(n=e.validator.normalizeRule(r.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(r,i){if(i===!1)return void delete t[r];if(i.param||i.depends){var a=!0;switch(typeof i.depends){case"string":a=!!e(i.depends,n.form).length;break;case"function":a=i.depends.call(n,n)}a?t[r]=void 0===i.param||i.param:delete t[r]}}),e.each(t,function(r,i){t[r]=e.isFunction(i)?i(n):i}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(n=t[this].split(/[\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n,e.validator.messages[t]=void 0!==r?r:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,r){if(!this.depend(r,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var i=e(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(t,n)>0:e.trim(t).length>0},email:function(e,t){return this.optional(t)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(e))return!1;var n,r,i=0,a=0,o=!1;if(e=e.replace(/\D/g,""),e.length<13||e.length>19)return!1;for(n=e.length-1;n>=0;n--)r=e.charAt(n),a=parseInt(r,10),o&&(a*=2)>9&&(a-=9),i+=a,o=!o;return i%10===0},minlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},maxlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||r>=i},rangelength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||n>=e},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},equalTo:function(t,n,r){var i=e(r);return this.settings.onfocusout&&i.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()}),t===i.val()},remote:function(t,n,r){if(this.optional(n))return"dependency-mismatch";var i,a,o=this.previousValue(n);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),o.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=o.message,r="string"==typeof r&&{url:r}||r,o.old===t?o.valid:(o.old=t,i=this,this.startRequest(n),a={},a[n.name]=t,e.ajax(e.extend(!0,{url:r,mode:"abort",port:"validate"+n.name,dataType:"json",data:a,context:i.currentForm,success:function(r){var a,s,u,l=r===!0||"true"===r;i.settings.messages[n.name].remote=o.originalMessage,l?(u=i.formSubmitted,i.prepareElement(n),i.formSubmitted=u,i.successList.push(n),delete i.invalid[n.name],i.showErrors()):(a={},s=r||i.defaultMessage(n,"remote"),a[n.name]=o.message=e.isFunction(s)?s(t):s,i.invalid[n.name]=!0,i.showErrors(a)),o.valid=l,i.stopRequest(n,l)}},r)),"pending")}}}),e.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."}}(jQuery),function(e){var t,n={};e.ajaxPrefilter?e.ajaxPrefilter(function(e,t,r){var i=e.port;"abort"===e.mode&&(n[i]&&n[i].abort(),n[i]=r)}):(t=e.ajax,e.ajax=function(r){var i=("mode"in r?r:e.ajaxSettings).mode,a=("port"in r?r:e.ajaxSettings).port;return"abort"===i?(n[a]&&n[a].abort(),n[a]=t.apply(this,arguments),n[a]):t.apply(this,arguments)})}(jQuery),function(e){e.extend(e.fn,{validateDelegate:function(t,n,r){
return this.bind(n,function(n){var i=e(n.target);return i.is(t)?r.apply(i,arguments):void 0})}})}(jQuery),function(e){e.validator.addMethod("mc_birthday",function(t,n,r){var i=!1,a=e("input:not(:hidden)",e(n).closest(r));if(0==a.filter(":filled").length&&this.optional(n))i=!0;else{var o=new Array;o.month=a.filter("input[name*='[month]']").val(),o.day=a.filter("input[name*='[day]']").val(),o.month=o.month-1;var s=new Date(1970,o.month,o.day);i=s.getDate()==o.day&&s.getMonth()==o.month}return i},"Please enter a valid month and day."),e.validator.addMethod("mc_date",function(t,n,r){var i=!1,a=e("input:not(:hidden)",e(n).closest(r));if(0==a.filter(":filled").length&&this.optional(n))i=!0;else{var o=new Array;o.month=a.filter("input[name*='[month]']").val(),o.day=a.filter("input[name*='[day]']").val(),o.year=a.filter("input[name*='[year]']").val(),o.month=o.month-1,o.year.length<4&&(o.year=parseInt(o.year)<50?2e3+parseInt(o.year):1900+parseInt(o.year));var s=new Date(o.year,o.month,o.day);i=s.getDate()==o.day&&s.getMonth()==o.month&&s.getFullYear()==o.year}return i},"Please enter a valid date"),e.validator.addMethod("mc_phone",function(t,n,r){var i=!1,a=e("input:filled:not(:hidden)",e(n).closest(r));return 0==a.length&&this.optional(n)?i=!0:(t=a.eq(0).val()+a.eq(1).val()+a.eq(2).val(),i=10==t.length&&t.match(/[0-9]{9}/)),i},"Please specify a valid phone number"),e.validator.addMethod("skip_or_complete_group",function(t,n,r){var i=e("input:not(:hidden)",e(n).closest(r)),a=i.eq(0),o=a.data("valid_skip")?a.data("valid_skip"):e.extend({},this),s=i.filter(function(){return o.elementValue(this)}).length,u=0===s||s===i.length;return a.data("valid_skip",o),e(n).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),u},e.validator.format("Please supply missing fields.")),e.validator.addMethod("skip_or_fill_minimum",function(t,n,r){var i=e(r[1],n.form),a=i.eq(0),o=a.data("valid_skip")?a.data("valid_skip"):e.extend({},this),s=i.filter(function(){return o.elementValue(this)}).length,u=0===s||s>=r[0];return console.log(i.eq(0)),a.data("valid_skip",o),e(n).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),u},e.validator.format("Please either skip these fields or fill at least {0} of them.")),e.validator.addMethod("zipcodeUS",function(e,t){return this.optional(t)||/^\d{5}-\d{4}$|^\d{5}$/.test(e)},"The specified US ZIP Code is invalid")}(jQuery),function(e){function t(){e(".email-form__input--email").prop("disabled",!0),e(".email-form__input--sumbit").prop("disabled",!0)}function n(){e(".email-form__input--email").prop("disabled",!1),e(".email-form__input--sumbit").prop("disabled",!1)}function r(){u(),c()}function a(){e(".email-form__input--email").focus()}function o(){d||(e(".email-form").addClass("email-form--error"),d=!0),setTimeout(function(){e(".email-form").removeClass("email-form--error"),d=!1},600)}function s(t){f||(e(".email-form__error-message").addClass("email-form__error-message--shown"),e(".email-form__error-message").html(t),f=!0)}function u(){f&&(e(".email-form__error-message").removeClass("email-form__error-message--shown"),e(".email-form__error-message").html(""),f=!1)}function l(t){p||(e(".email-form__success-message").addClass("email-form__success-message--shown"),e(".email-form__success-message").html(t),p=!0)}function c(){p&&(e(".email-form__success-message").removeClass("email-form__success-message--shown"),e(".email-form__success-message").html(""),p=!1)}window.mc={openPopup:function(){e("#mc_embed_signup a.mc_embed_close").show(),setTimeout(function(){e("#mc_embed_signup").fadeIn()},mc.delayPopup)},closePopup:function(){e("#mc_embed_signup").hide();var t=new Date,n=new Date(t.getTime()+31536e6);document.cookie="MCEvilPopupClosed=yes;expires="+n.toGMTString()+";path=/"},evalPopup:function(){for(e("#mc_embed_signup").hide(),cks=document.cookie.split(";"),i=0;i1){var i=r.first().attr("name"),a=e.map(r,function(e){return e.name});t[i.substring(0,i.indexOf("["))]=a.join(" ")}}),t},isMultiPartField:function(t){return e("input:not(:hidden)",e(t).closest(".mc-field-group")).length>1},isTooEarly:function(t){var n=e("input:not(:hidden)",e(t).closest(".mc-field-group"));return e(n).eq(-1).attr("id")!=e(t).attr("id")},mce_success_cb:function(o){if(r(),"success"==o.result){l(o.msg),e(".email-form__input--email").blur(),e(".email-form").addClass("email-form--valid"),t();try{ga("send","event","Waitlist","Sign Up","Waitlist")}catch(u){}}else{n();var c,d=-1;try{var f=o.msg.split(" - ",2);void 0==f[1]?c=o.msg:(i=parseInt(f[0]),i.toString()==f[0]?(d=f[0],c=f[1]):(d=-1,c=o.msg))}catch(u){d=-1,c=o.msg}try{if(d==-1)e("#mce-"+o.result+"-response").html(c);else{var p=e("input[name*='"+fnames[d]+"']").attr("name"),h={};h[p]=c,mc.mce_validator.showErrors(h)}a(),s()}catch(u){e("#mce-"+o.result+"-response").html(c),s()}}}},window.mc.mce_validator=e("#mc-embedded-subscribe-form").validate({errorClass:"form-error",errorElement:"div",onkeyup:!1,onfocusout:function(e){!mc.isTooEarly(e)},onblur:function(e){!mc.isTooEarly(e)},groups:mc.getGroups(),highlight:function(e,t,n){},errorPlacement:function(e,t){n()},invalidHandler:function(){n(),r()},showErrors:function(e,t){if(e.hasOwnProperty("EMAIL")){o();var n=e.EMAIL;s(n)}},submitHandler:function(n){e(n).ajaxSubmit(mc.ajaxOptions),r(),t()}}),window.mc.ajaxOptions={url:mc.getAjaxSubmitUrl(),type:"GET",dataType:"json",contentType:"application/json; charset=utf-8",success:mc.mce_success_cb},e.validator.addClassRules("birthday",{digits:!0,mc_birthday:".datefield"}),e.validator.addClassRules("datepart",{digits:!0,mc_date:".datefield"}),e.validator.addClassRules("phonepart",{digits:!0,mc_phone:".phonefield"}),e("#mc_embed_signup a.mc_embed_close").click(function(){mc.closePopup()}),e(document).keydown(function(e){keycode=null==e?event.keyCode:e.which,27==keycode&&"undefined"!=typeof mc.showPopup&&mc.closePopup()});var d=!1,f=!1,p=!1}(jQuery),function(e){window.fnames=new Array,window.ftypes=new Array,fnames[0]="EMAIL",ftypes[0]="email",fnames[1]="FNAME",ftypes[1]="text",fnames[2]="LNAME",ftypes[2]="text"}(jQuery);var $mcj=jQuery.noConflict(!0);