PageSourceSearch

https://0hm.cn/resource/js/validate.js

js 0hm.cn collected 2026-10-09 04:34:53 UTC 25,908 bytes, 601 lines download raw bytes

1/*! jQuery Validation Plugin - v1.11.0 - 2/4/2013
2 * https://github.com/jzaefferer/jquery-validation
3 * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */
4(function(e) {
5	e.extend(e.fn, {
6		validate: function(t) {
7			if (!this.length) {
8				t && t.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing.");
9				return
10			}
11			var n = e.data(this[0], "validator");
12			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) {
13				n.settings.submitHandler && (n.submitButton = t.target), e(t.target).hasClass("cancel") && (n.cancelSubmit = !0)
14			}), this.submit(function(t) {
15				function r() {
16					var r;
17					return n.settings.submitHandler ? (n.submitButton && (r = e("<input type='hidden'/>").attr("name", n.submitButton.name).val(n.submitButton.value).appendTo(n.currentForm)), n.settings.submitHandler.call(n, n.currentForm, t), n.submitButton && r.remove(), !1) : !0
18				}
19				return n.settings.debug && t.preventDefault(), n.cancelSubmit ? (n.cancelSubmit = !1, r()) : n.form() ? n.pendingRequest ? (n.formSubmitted = !0, !1) : r() : (n.focusInvalid(), !1)
20			})), n)
21		},
22		valid: function() {
23			if (e(this[0]).is("form")) return this.validate().form();
24			var t = !0,
25				n = e(this[0].form).validate();
26			return this.each(function() {
27				t &= n.element(this)
28			}), t
29		},
30		removeAttrs: function(t) {
31			var n = {},
32				r = this;
33			return e.each(t.split(/\s/), function(e, t) {
34				n[t] = r.attr(t), r.removeAttr(t)
35			}), n
36		},
37		rules: function(t, n) {
38			var r = this[0];
39			if (t) {
40				var i = e.data(r.form, "validator").settings,
41					s = i.rules,
42					o = e.validator.staticRules(r);
43				switch (t) {
44				case "add":
45					e.extend(o, e.validator.normalizeRule(n)), s[r.name] = o, n.messages && (i.messages[r.name] = e.extend(i.messages[r.name], n.messages));
46					break;
47				case "remove":
48					if (!n) return delete s[r.name], o;
49					var u = {};
50					return e.each(n.split(/\s/), function(e, t) {
51						u[t] = o[t], delete o[t]
52					}), u
53				}
54			}
55			var a = e.validator.normalizeRules(e.extend({}, e.validator.classRules(r), e.validator.attributeRules(r), e.validator.dataRules(r), e.validator.staticRules(r)), r);
56			if (a.required) {
57				var f = a.required;
58				delete a.required, a = e.extend({
59					required: f
60				}, a)
61			}
62			return a
63		}
64	}), e.extend(e.expr[":"], {
65		blank: function(t) {
66			return !e.trim("" + t.value)
67		},
68		filled: function(t) {
69			return !!e.trim("" + t.value)
70		},
71		unchecked: function(e) {
72			return !e.checked
73		}
74	}), e.validator = function(t, n) {
75		this.settings = e.extend(!0, {}, e.validator.defaults, t), this.currentForm = n, this.init()
76	}, e.validator.format = function(t, n) {
77		return arguments.length === 1 ?
78		function() {
79			var n = e.makeArray(arguments);
80			return n.unshift(t), e.validator.format.apply(this, n)
81		} : (arguments.length > 2 && n.constructor !== Array && (n = e.makeArray(arguments).slice(1)), n.constructor !== Array && (n = [n]), e.each(n, function(e, n) {
82			t = t.replace(new RegExp("\\{" + e + "\\}", "g"), function() {
83				return n
84			})
85		}), t)
86	}, e.extend(e.validator, {
87		defaults: {
88			messages: {},
89			groups: {},
90			rules: {},
91			errorClass: "error",
92			validClass: "valid",
93			errorElement: "label",
94			focusInvalid: !0,
95			errorContainer: e([]),
96			errorLabelContainer: e([]),
97			onsubmit: !0,
98			ignore: ":hidden",
99			ignoreTitle: !1,
100			onfocusin: function(e, t) {
101				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())
102			},
103			onfocusout: function(e, t) {
104				!this.checkable(e) && (e.name in this.submitted || !this.optional(e)) && this.element(e)
105			},
106			onkeyup: function(e, t) {
107				if (t.which === 9 && this.elementValue(e) === "") return;
108				(e.name in this.submitted || e === this.lastElement) && this.element
108(e)
109			},
110			onclick: function(e, t) {
111				e.name in this.submitted ? this.element(e) : e.parentNode.name in this.submitted && this.element(e.parentNode)
112			},
113			highlight: function(t, n, r) {
114				t.type === "radio" ? this.findByName(t.name).addClass(n).removeClass(r) : e(t).addClass(n).removeClass(r)
115			},
116			unhighlight: function(t, n, r) {
117				t.type === "radio" ? this.findByName(t.name).removeClass(n).addClass(r) : e(t).removeClass(n).addClass(r)
118			}
119		},
120		setDefaults: function(t) {
121			e.extend(e.validator.defaults, t)
122		},
123		messages: {
124			required: "请填写该字段.",
125			remote: "Please fix this field.",
126			email: "请填写正确的邮箱地址.",
127			url: "Please enter a valid URL.",
128			date: "Please enter a valid date.",
129			dateISO: "Please enter a valid date (ISO).",
130			number: "Please enter a valid number.",
131			digits: "Please enter only digits.",
132			creditcard: "Please enter a valid credit card number.",
133			equalTo: "Please enter the same value again.",
134			maxlength: e.validator.format("Please enter no more than {0} characters."),
135			minlength: e.validator.format("Please enter at least {0} characters."),
136			rangelength: e.validator.format("Please enter a value between {0} and {1} characters long."),
137			range: e.validator.format("Please enter a value between {0} and {1}."),
138			max: e.validator.format("Please enter a value less than or equal to {0}."),
139			min: e.validator.format("Please enter a value greater than or equal to {0}.")
140		},
141		autoCreateRanges: !1,
142		prototype: {
143			init: function() {
144				function r(t) {
145					var n = e.data(this[0].form, "validator"),
146						r = "on" + t.type.replace(/^validate/, "");
147					n.settings[r] && n.settings[r].call(n, this[0], t)
148				}
149				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();
150				var t = this.groups = {};
151				e.each(this.settings.groups, function(n, r) {
152					typeof r == "string" && (r = r.split(/\s/)), e.each(r, function(e, r) {
153						t[r] = n
154					})
155				});
156				var n = this.settings.rules;
157				e.each(n, function(t, r) {
158					n[t] = e.validator.normalizeRule(r)
159				}), 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", r).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", r), this.settings.invalidHandler && e(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler)
160			},
161			form: function() {
162				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()
163			},
164			checkForm: function() {
165				this.prepareForm();
166				for (var e = 0, t = this.currentElements = this.elements(); t[e]; e++) this.check(t[e]);
167				return this.valid()
168			},
169			element: function(t) {
170				t = this.validationTargetFor(this.clean(t)), this.lastElement = t, this.prepareElement(t), this.currentElements = e(t);
171				var n = this.check(t) !== !1;
172				return n ? delete this.invalid[t.name] : this.invalid[t.name] = !0, this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), n
173			},
174			showErrors: function(t) {
175				if (t) {
176					e.extend(this.errorMap, t), this.errorList = [];
177					for (var n in t) this.errorList.push({
178						message: t[n],
179						element: this.findByName(n)[0]
180					});
181					this.successList = e.grep(this.successList, function(e) {
182						return !(e.name in t)
183					})
184				}
185				this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
186			},
187			resetForm: function() {
188				e.fn.resetForm && e(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null, this.prepareForm(), this.hideErrors(), this.elements().removeClass(this.settings.errorClass).removeData("previousValue")
189			},
190			numberOfInvalids: function() {
191				return this.objectLength(this.invalid)
192			},
193			objectLength: function(e) {
194				var t = 0;
195				for (var n in e) t++;
196				return t
197			},
198			hideErrors: function() {
199				this.addWrapper(this.toHide).hide()
200			},
201			valid: function() {
202				return this.size() === 0
203			},
204			size: function() {
205				return this.errorList.length
206			},
207			focusInvalid: function() {
208				if (this.settings.focusInvalid) try {
209					e(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
210				} catch (t) {}
211			},
212			findLastActive: function() {
213				var t = this.lastActive;
214				return t && e.grep(this.errorList, function(e) {
215					return e.element.name === t.name
216				}).length === 1 && t
217			},
218			elements: function() {
219				var t = this,
220					n = {};
221				return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function() {
222					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()) ? !1 : (n[this.name] = !0, !0)
223				})
224			},
225			clean: function(t) {
226				return e(t)[0]
227			},
228			errors: function() {
229				var t = this.settings.errorClass.replace(" ", ".");
230				return e(this.settings.errorElement + "." + t, this.errorContext)
231			},
232			reset: function() {
233				this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = e([]), this.toHide = e([]), this.currentElements = e([])
234			},
235			prepareForm: function() {
236				this.reset(), this.toHide = this.errors().add(this.containers
236)
237			},
238			prepareElement: function(e) {
239				this.reset(), this.toHide = this.errorsFor(e)
240			},
241			elementValue: function(t) {
242				var n = e(t).attr("type"),
243					r = e(t).val();
244				return n === "radio" || n === "checkbox" ? e("input[name='" + e(t).attr("name") + "']:checked").val() : typeof r == "string" ? r.replace(/\r/g, "") : r
245			},
246			check: function(t) {
247				t = this.validationTargetFor(this.clean(t));
248				var n = e(t).rules(),
249					r = !1,
250					i = this.elementValue(t),
251					s;
252				for (var o in n) {
253					var u = {
254						method: o,
255						parameters: n[o]
256					};
257					try {
258						s = e.validator.methods[o].call(this, i, t, u.parameters);
259						if (s === "dependency-mismatch") {
260							r = !0;
261							continue
262						}
263						r = !1;
264						if (s === "pending") {
265							this.toHide = this.toHide.not(this.errorsFor(t));
266							return
267						}
268						if (!s) return this.formatAndAdd(t, u), !1
269					} catch (a) {
270						throw this.settings.debug && window.console && console.log("Exception occured when checking element " + t.id + ", check the '" + u.method + "' method.", a), a
271					}
272				}
273				if (r) return;
274				return this.objectLength(n) && this.successList.push(t), !0
275			},
276			customDataMessage: function(t, n) {
277				return e(t).data("msg-" + n.toLowerCase()) || t.attributes && e(t).attr("data-msg-" + n.toLowerCase())
278			},
279			customMessage: function(e, t) {
280				var n = this.settings.messages[e];
281				return n && (n.constructor === String ? n : n[t])
282			},
283			findDefined: function() {
284				for (var e = 0; e < arguments.length; e++) if (arguments[e] !== undefined) return arguments[e];
285				return undefined
286			},
287			defaultMessage: function(t, n) {
288				return this.findDefined(this.customMessage(t.name, n), this.customDataMessage(t, n), !this.settings.ignoreTitle && t.title || undefined, e.validator.messages[n], "<strong>Warning: No message defined for " + t.name + "</strong>")
289			},
290			formatAndAdd: function(t, n) {
291				var r = this.defaultMessage(t, n.method),
292					i = /\$?\{(\d+)\}/g;
293				typeof r == "function" ? r = r.call(this, n.parameters, t) : i.test(r) && (r = e.validator.format(r.replace(i, "{$1}"), n.parameters)), this.errorList.push({
294					message: r,
295					element: t
296				}), this.errorMap[t.name] = r, this.submitted[t.name] = r
297			},
298			addWrapper: function(e) {
299				return this.settings.wrapper && (e = e.add(e.parent(this.settings.wrapper))), e
300			},
301			defaultShowErrors: function() {
302				var e, t;
303				for (e = 0; this.errorList[e]; e++) {
304					var n = this.errorList[e];
305					this.settings.highlight && this.settings.highlight.call(this, n.element, this.settings.errorClass, this.settings.validClass), this.showLabel(n.element, n.message)
306				}
307				this.errorList.length && (this.toShow = this.toShow.add(this.containers));
308				if (this.settings.success) for (e = 0; this.successList[e]; e++) this.showLabel(this.successList[e]);
309				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);
310				this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show()
311			},
312			validElements: function() {
313				return this.currentElements.not(this.invalidElements())
314			},
315			invalidElements: function() {
316				return e(this.errorList).map(function() {
317					return this.element
318				})
319			},
320			showLabel: function(t, n) {
321				var r = this.errorsFor(t);
322				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(""), typeof this.settings.success == "string" ? r.addClass(this.settings.success) : this.settings.success(r, t)), this.toShow = this.toShow.add(r)
323			},
324			errorsFor: function(t) {
325				var n = this.idOrName(t);
326				return this.errors().filter(function() {
327					return e(this).attr("for") === n
328				})
329			},
330			idOrName: function(e) {
331				return this.groups[e.name] || (this.checkable(e) ? e.name : e.id || e.name)
332			},
333			validationTargetFor: function(e) {
334				return this.checkable(e) && (e = this.findByName(e.name).not(this.settings.ignore)[0]), e
335			},
336			checkable: function(e) {
337				return /radio|checkbox/i.test(e.type)
338			},
339			findByName: function(t) {
340				return e(this.currentForm).find("[name='" + t + "']")
341			},
342			getLength: function(t, n) {
343				switch (n.nodeName.toLowerCase()) {
344				case "select":
345					return e("option:selected", n).length;
346				case "input":
347					if (this.checkable(n)) return this.findByName(n.name).filter(":checked").length
348				}
349				return t.length
350			},
351			depend: function(e, t) {
352				return this.dependTypes[typeof e] ? this.dependTypes[typeof e](e, t) : !0
353			},
354			dependTypes: {
355				"boolean": function(e, t) {
356					return e
357				},
358				string: function(t, n) {
359					return !!e(t, n.form).length
360				},
361				"function": function(e, t) {
362					return e(t)
363				}
364			},
365			optional: function(t) {
366				var n = this.elementValue(t);
367				return !e.validator.methods.required.call(this, n, t) && "dependency-mismatch"
368			},
369			startRequest: function(e) {
370				this.pending[e.name] || (this.pendingRequest++, this.pending[e.name] = !0)
371			},
372			stopRequest: function(t, n) {
373				this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[t.name], n && this.pendingRequest === 0 && this.formSubmitted && this.form() ? (e(this.currentForm).submit(), this.formSubmitted = !1) : !n && this.pendingRequest === 0 && this.formSubmitted && (e(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1)
374			},
375			previousValue: function(t) {
376				return e.data(t, "previousValue") || e.data(t, "previousValue", {
377					old: null,
378					valid: !0,
379					message: this.defaultMessage(t, "remote")
380				})
381			}
382		},
383		classRuleSettings: {
384			required: {
385				required: !0
386			},
387			email: {
388				email: !0
389			},
390			url: {
391				url: !0
392			},
393			date: {
394				date: !0
395			},
396			dateISO: {
397				dateISO: !0
398			},
399			number: {
400				number: !0
401			},
402			digits: {
403				digits: !0
404			},
405			creditcard: {
406				creditcard: !0
407			}
408		},
409		addClassRules: function(t, n) {
410			t.constructor === String ? this.classRuleSettings[t] = n : e.extend(this.classRuleSettings, t)
411		},
412		classRules: function(t) {
413			var n = {},
414				r = e(t).attr("class");
415			return r && e.each(r.split(" "), function() {
416				this in e.validator.classRuleSettings && e.extend(n, e.validator.classRuleSettings[this])
417			}), n
418		},
419		attributeRules: function(t) {
420			var n = {},
421				r = e(t);
422			for (var i in e.validator.methods) {
423				var s;
424				i === "required" ? (s = r.get(0).getAttribute(i), s === "" && (s = !0), s = !! s) : s = r.attr(i), s ? n[i] = s : r[0].getAttribute("type") === i && (n[i] = !0)
425			}
426			return n.maxlength && /-1|2147483647|524288/.test(n.maxlength) && delete n.maxlength, n
427		},
428		dataRules: function(t) {
429			var n, r, i = {},
430				s = e(t);
431			for (n in e.validator.methods) r = s.data("rule-" + n.toLowerCase()), r !== undefined && (i[n] = r);
432			return i
433		},
434		staticRules: function(t) {
435			var n = {},
436				r = e.data(t.form, "validator");
437			return r.settings.rules && (n = e.validator.normalizeRule(r.settings.rules[t.name]) || {}), n
438		},
439		normalizeRules: function(t, n) {
440			return e.each(t, function(r, i) {
441				if (i === !1) {
442					delete t[r];
443					return
444				}
445				if (i.param || i.depends) {
446					var s = !0;
447					switch (typeof i.depends) {
448					case "string":
449						s = !! e(i.depends, n.form).length;
450						break;
451					case "function":
452						s = i.depends.call(n, n)
453					}
454					s ? t[r] = i.param !== undefined ? i.param : !0 : delete t[r]
455				}
456			}), e.each(t, function(r, i) {
457				t[r] = e.isFunction(i) ? i(n) : i
458			}), e.each(["minlength", "maxlength"], function() {
459				t[this] && (t[this] = Number(t[this]))
460			}), e.each(["rangelength"], function() {
461				var n;
462				t[this] && (e.isArray(t[this]) ? t[this] = [Number(t[this][0]), Number(t[this][1])] : typeof t[this] == "string" && (n = t[this].split(/[\s,]+/), t[this] = [Number(n[0]), Number(n[1])]))
463			}), 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
464		},
465		normalizeRule: function(t) {
466			if (typeof t == "string") {
467				var n = {};
468				e.each(t.split(/\s/), function() {
469					n[this] = !0
470				}), t = n
471			}
472			return t
473		},
474		addMethod: function(t, n, r) {
475			e.validator.methods[t] = n, e.validator.messages[t] = r !== undefined ? r : e.validator.messages[t], n.length < 3 && e.validator.addClassRules(t, e.validator.normalizeRule(t))
476		},
477		methods: {
478			required: function(t, n, r) {
479				if (!this.depend(r, n)) return "dependency-mismatch";
480				if (n.nodeName.toLowerCase() === "select") {
481					var i = e(n).val();
482					return i && i.length > 0
483				}
484				return this.checkable(n) ? this.getLength(t, n) > 0 : e.trim(t).length > 0
485			},
486			remote: function(t, n, r) {
487				if (this.optional(n)) return "dependency-mismatch";
488				var i = this.previousValue(n);
489				this.settings.messages[n.name] || (this.settings.messages[n.name] = {}), i.originalMessage = this.settings.messages[n.name].remote, this.settings.messages[n.name].remote = i.message, r = typeof r == "string" && {
490					url: r
491				} || r;
492				if (i.old === t) return i.valid;
493				i.old = t;
494				var s = this;
495				this.startRequest(n);
496				var o = {};
497				return o[n.name] = t, e.ajax(e.extend(!0, {
498					url: r,
499					mode: "abort",
500					port: "validate" + n.name,
501					dataType: "json",
502					data: o,
503					success: function(r) {
504						s.settings.messages[n.name].remote = i.originalMessage;
505						var o = r === !0 || r === "true";
506						if (o) {
507							var u = s.formSubmitted;
508							s.prepareElement(n), s.formSubmitted = u, s.successList.push(n), delete s.invalid[n.name], s.showErrors()
509						} else {
510							var a = {},
511								f = r || s.defaultMessage(n, "remote");
512							a[n.name] = i.message = e.isFunction(f) ? f(t) : f, s.invalid[n.name] = !0, s.showErrors(a)
513						}
514						i.valid = o, s.stopRequest(n, o)
515					}
516				}, r)), "pending"
517			},
518			minlength: function(t, n, r) {
519				var i = e.isArray(t) ? t.length : this.getLength(e.trim(t), n);
520				return this.optional(n) || i >= r
521			},
522			maxlength: function(t, n, r) {
523				var i = e.isArray(t) ? t.length : this.getLength(e.trim(t), n);
524				return this.optional(n) || i <= r
525			},
526			rangelength: function(t, n, r) {
527				var i = e.isArray(t) ? t.length : this.getLength(e.trim(t), n);
528				return this.optional(n) || i >= r[0] && i <= r[1]
529			},
530			min: function(e, t, n) {
531				return this.optional(t) || e >= n
532			},
533			max: function(e, t, n) {
534				return this.optional(t) || e <= n
535			},
536			range: function(e, t, n) {
537				return this.optional(t) || e >= n[0] && e <= n[1]
538			},
539			email: function(e, t) {
540				return this.optional(t) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i.test(e)
541			},
542			url: function(e, t) {
543				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)
544			},
545			date: function(e, t) {
546				return this.optional(t) || !/Invalid|NaN/.test((new Date(e)).toString())
547			},
548			dateISO: function(e, t) {
549				return this.optional(t) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)
550			},
551			number: function(e, t) {
552				return this.optional(t) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)
553			},
554			digits: function(e, t) {
555				return this.optional(t) || /^\d+$/.test(e)
556			},
557			creditcard: function(e, t) {
558				if (this.optional(t)) return "dependency-mismatch";
559				if (/[^0-9 \-]+/.test(e)) return !1;
560				var n = 0,
561					r = 0,
562					i = !1;
563				e = e.replace(/\D/g, "");
564				for (var s = e.length - 1; s >= 0; s--) {
565					var o = e.charAt(s);
566					r = parseInt(o, 10), i && (r *= 2) > 9 && (r -= 9), n += r, i = !i
567				}
568				return n % 10 === 0
569			},
570			equalTo: function(t, n, r) {
571				var i = e(r);
572				return this.settings.onfocusout && i.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
573					e(n).valid()
574				}), t === i.val()
575			}
576		}
577	}), e.format = e.validator.format
578})(jQuery), function(e) {
579	var t = {};
580	if (e.ajaxPrefilter) e.ajaxPrefilter(function(e, n, r) {
581		var i = e.port;
582		e.mode === "abort" && (t[i] && t[i].abort(), t[i] = r)
583	});
584	else {
585		var n = e.ajax;
586		e.ajax = function(r) {
587			var i = ("mode" in r ? r : e.ajaxSettings).mode,
588				s = ("port" in r ? r : e.ajaxSettings).port;
589			return i === "abort" ? (t[s] && t[s].abort(), t[s] = n.apply(this, arguments)) : n.apply(this, arguments)
590		}
591	}
592}(jQuery), function(e) {
593	e.extend(e.fn, {
594		validateDelegate: function(t, n, r) {
595			return this.bind(n, function(n) {
596				var i = e(n.target);
597				if (i.is(t)) return r.apply(i, arguments)
598			})
599		}
600	})
601}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.