A Pen by Kevin Isom

Developer
Size
146,248 Kb
Views
10,120

How do I make an a pen by kevin isom?

What is a a pen by kevin isom? How do you make a a pen by kevin isom? This script and codes were developed by Kevin Isom on 19 November 2022, Saturday.

A Pen by Kevin Isom Previews

A Pen by Kevin Isom - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Kevin Isom</title>
</head>
<body> <h1>Nope</h1> <script src="js/index.js"></script>
</body>
</html>

A Pen by Kevin Isom - Script Codes JS Codes

(function( global, factory ) {	if ( typeof module === "object" && typeof module.exports === "object" ) {	// For CommonJS and CommonJS-like environments where a proper window is present,	// execute the factory and get jQuery	// For environments that do not inherently posses a window with a document	// (such as Node.js), expose a jQuery-making factory as module.exports	// This accentuates the need for the creation of a real window	// e.g. var jQuery = require("jquery")(window);	// See ticket #14549 for more info	module.exports = global.document ?	factory( global, true ) :	function( w ) {	if ( !w.document ) {	throw new Error( "jQuery requires a window with a document" );	}	return factory( w );	};	} else {	factory( global );	}
// Pass this if window is not defined yet
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
// Can't do this because several apps including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//
var arr = [];
var slice = arr.slice;
var concat = arr.concat;
var push = arr.push;
var indexOf = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var trim = "".trim;
var support = {};
var	// Use the correct document accordingly with window argument (sandbox)	document = window.document,	version = "2.1.0",	// Define a local copy of jQuery	jQuery = function( selector, context ) {	// The jQuery object is actually just the init constructor 'enhanced'	// Need init if jQuery is called (just allow error to be thrown if not included)	return new jQuery.fn.init( selector, context );	},	// Matches dashed string for camelizing	rmsPrefix = /^-ms-/,	rdashAlpha = /-([\da-z])/gi,	// Used by jQuery.camelCase as callback to replace()	fcamelCase = function( all, letter ) {	return letter.toUpperCase();	};
jQuery.fn = jQuery.prototype = {	// The current version of jQuery being used	jquery: version,	constructor: jQuery,	// Start with an empty selector	selector: "",	// The default length of a jQuery object is 0	length: 0,	toArray: function() {	return slice.call( this );	},	// Get the Nth element in the matched element set OR	// Get the whole matched element set as a clean array	get: function( num ) {	return num != null ?	// Return a 'clean' array	( num < 0 ? this[ num + this.length ] : this[ num ] ) :	// Return just the object	slice.call( this );	},	// Take an array of elements and push it onto the stack	// (returning the new matched element set)	pushStack: function( elems ) {	// Build a new jQuery matched element set	var ret = jQuery.merge( this.constructor(), elems );	// Add the old object onto the stack (as a reference)	ret.prevObject = this;	ret.context = this.context;	// Return the newly-formed element set	return ret;	},	// Execute a callback for every element in the matched set.	// (You can seed the arguments with an array of args, but this is	// only used internally.)	each: function( callback, args ) {	return jQuery.each( this, callback, args );	},	map: function( callback ) {	return this.pushStack( jQuery.map(this, function( elem, i ) {	return callback.call( elem, i, elem );	}));	},	slice: function() {	return this.pushStack( slice.apply( this, arguments ) );	},	first: function() {	return this.eq( 0 );	},	last: function() {	return this.eq( -1 );	},	eq: function( i ) {	var len = this.length,	j = +i + ( i < 0 ? len : 0 );	return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );	},	end: function() {	return this.prevObject || this.constructor(null);	},	// For internal use only.	// Behaves like an Array's method, not like a jQuery method.	push: push,	sort: arr.sort,	splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function() {	var options, name, src, copy, copyIsArray, clone,	target = arguments[0] || {},	i = 1,	length = arguments.length,	deep = false;	// Handle a deep copy situation	if ( typeof target === "boolean" ) {	deep = target;	// skip the boolean and the target	target = arguments[ i ] || {};	i++;	}	// Handle case when target is a string or something (possible in deep copy)	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {	target = {};	}	// extend jQuery itself if only one argument is passed	if ( i === length ) {	target = this;	i--;	}	for ( ; i < length; i++ ) {	// Only deal with non-null/undefined values	if ( (options = arguments[ i ]) != null ) {	// Extend the base object	for ( name in options ) {	src = target[ name ];	copy = options[ name ];	// Prevent never-ending loop	if ( target === copy ) {	continue;	}	// Recurse if we're merging plain objects or arrays	if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {	if ( copyIsArray ) {	copyIsArray = false;	clone = src && jQuery.isArray(src) ? src : [];	} else {	clone = src && jQuery.isPlainObject(src) ? src : {};	}	// Never move original objects, clone them	target[ name ] = jQuery.extend( deep, clone, copy );	// Don't bring in undefined values	} else if ( copy !== undefined ) {	target[ name ] = copy;	}	}	}	}	// Return the modified object	return target;
};
jQuery.extend({	// Unique for each copy of jQuery on the page	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),	// Assume jQuery is ready without the ready module	isReady: true,	error: function( msg ) {	throw new Error( msg );	},	noop: function() {},	// See test/unit/core.js for details concerning isFunction.	// Since version 1.3, DOM methods and functions like alert	// aren't supported. They return false on IE (#2968).	isFunction: function( obj ) {	return jQuery.type(obj) === "function";	},	isArray: Array.isArray,	isWindow: function( obj ) {	return obj != null && obj === obj.window;	},	isNumeric: function( obj ) {	// parseFloat NaNs numeric-cast false positives (null|true|false|"")	// ...but misinterprets leading-number strings, particularly hex literals ("0x...")	// subtraction forces infinities to NaN	return obj - parseFloat( obj ) >= 0;	},	isPlainObject: function( obj ) {	// Not plain objects:	// - Any object or value whose internal [[Class]] property is not "[object Object]"	// - DOM nodes	// - window	if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {	return false;	}	// Support: Firefox <20	// The try/catch suppresses exceptions thrown when attempting to access	// the "constructor" property of certain host objects, ie. |window.location|	// https://bugzilla.mozilla.org/show_bug.cgi?id=814622	try {	if ( obj.constructor &&	!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {	return false;	}	} catch ( e ) {	return false;	}	// If the function hasn't returned already, we're confident that	// |obj| is a plain object, created by {} or constructed with new Object	return true;	},	isEmptyObject: function( obj ) {	var name;	for ( name in obj ) {	return false;	}	return true;	},	type: function( obj ) {	if ( obj == null ) {	return obj + "";	}	// Support: Android < 4.0, iOS < 6 (functionish RegExp)	return typeof obj === "object" || typeof obj === "function" ?	class2type[ toString.call(obj) ] || "object" :	typeof obj;	},	// Evaluates a script in a global context	globalEval: function( code ) {	var script,	indirect = eval;	code = jQuery.trim( code );	if ( code ) {	// If the code includes a valid, prologue position	// strict mode pragma, execute code by injecting a	// script tag into the document.	if ( code.indexOf("use strict") === 1 ) {	script = document.createElement("script");	script.text = code;	document.head.appendChild( script ).parentNode.removeChild( script );	} else {	// Otherwise, avoid the DOM node creation, insertion	// and removal by using an indirect global eval	indirect( code );	}	}	},	// Convert dashed to camelCase; used by the css and data modules	// Microsoft forgot to hump their vendor prefix (#9572)	camelCase: function( string ) {	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );	},	nodeName: function( elem, name ) {	return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();	},	// args is for internal usage only	each: function( obj, callback, args ) {	var value,	i = 0,	length = obj.length,	isArray = isArraylike( obj );	if ( args ) {	if ( isArray ) {	for ( ; i < length; i++ ) {	value = callback.apply( obj[ i ], args );	if ( value === false ) {	break;	}	}	} else {	for ( i in obj ) {	value = callback.apply( obj[ i ], args );	if ( value === false ) {	break;	}	}	}	// A special, fast, case for the most common use of each	} else {	if ( isArray ) {	for ( ; i < length; i++ ) {	value = callback.call( obj[ i ], i, obj[ i ] );	if ( value === false ) {	break;	}	}	} else {	for ( i in obj ) {	value = callback.call( obj[ i ], i, obj[ i ] );	if ( value === false ) {	break;	}	}	}	}	return obj;	},	trim: function( text ) {	return text == null ? "" : trim.call( text );	},	// results is for internal usage only	makeArray: function( arr, results ) {	var ret = results || [];	if ( arr != null ) {	if ( isArraylike( Object(arr) ) ) {	jQuery.merge( ret,	typeof arr === "string" ?	[ arr ] : arr	);	} else {	push.call( ret, arr );	}	}	return ret;	},	inArray: function( elem, arr, i ) {	return arr == null ? -1 : indexOf.call( arr, elem, i );	},	merge: function( first, second ) {	var len = +second.length,	j = 0,	i = first.length;	for ( ; j < len; j++ ) {	first[ i++ ] = second[ j ];	}	first.length = i;	return first;	},	grep: function( elems, callback, invert ) {	var callbackInverse,	matches = [],	i = 0,	length = elems.length,	callbackExpect = !invert;	// Go through the array, only saving the items	// that pass the validator function	for ( ; i < length; i++ ) {	callbackInverse = !callback( elems[ i ], i );	if ( callbackInverse !== callbackExpect ) {	matches.push( elems[ i ] );	}	}	return matches;	},	// arg is for internal usage only	map: function( elems, callback, arg ) {	var value,	i = 0,	length = elems.length,	isArray = isArraylike( elems ),	ret = [];	// Go through the array, translating each of the items to their new values	if ( isArray ) {	for ( ; i < length; i++ ) {	value = callback( elems[ i ], i, arg );	if ( value != null ) {	ret.push( value );	}	}	// Go through every key on the object,	} else {	for ( i in elems ) {	value = callback( elems[ i ], i, arg );	if ( value != null ) {	ret.push( value );	}	}	}	// Flatten any nested arrays	return concat.apply( [], ret );	},	// A global GUID counter for objects	guid: 1,	// Bind a function to a context, optionally partially applying any	// arguments.	proxy: function( fn, context ) {	var tmp, args, proxy;	if ( typeof context === "string" ) {	tmp = fn[ context ];	context = fn;	fn = tmp;	}	// Quick check to determine if target is callable, in the spec	// this throws a TypeError, but we will just return undefined.	if ( !jQuery.isFunction( fn ) ) {	return undefined;	}	// Simulated bind	args = slice.call( arguments, 2 );	proxy = function() {	return fn.apply( context || this, args.concat( slice.call( arguments ) ) );	};	// Set the guid of unique handler to the same of original handler, so it can be removed	proxy.guid = fn.guid = fn.guid || jQuery.guid++;	return proxy;	},	now: Date.now,	// jQuery.support is not used in Core but other projects attach their	// properties to it so it needs to exist.	support: support
});
// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {	class2type[ "[object " + name + "]" ] = name.toLowerCase();
});
function isArraylike( obj ) {	var length = obj.length,	type = jQuery.type( obj );	if ( type === "function" || jQuery.isWindow( obj ) ) {	return false;	}	if ( obj.nodeType === 1 && length ) {	return true;	}	return type === "array" || length === 0 ||	typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*! * Sizzle CSS Selector Engine v1.10.16 * http://sizzlejs.com/ * * Copyright 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-01-13 */
(function( window ) {
var i,	support,	Expr,	getText,	isXML,	compile,	outermostContext,	sortInput,	hasDuplicate,	// Local document vars	setDocument,	document,	docElem,	documentIsHTML,	rbuggyQSA,	rbuggyMatches,	matches,	contains,	// Instance-specific data	expando = "sizzle" + -(new Date()),	preferredDoc = window.document,	dirruns = 0,	done = 0,	classCache = createCache(),	tokenCache = createCache(),	compilerCache = createCache(),	sortOrder = function( a, b ) {	if ( a === b ) {	hasDuplicate = true;	}	return 0;	},	// General-purpose constants	strundefined = typeof undefined,	MAX_NEGATIVE = 1 << 31,	// Instance methods	hasOwn = ({}).hasOwnProperty,	arr = [],	pop = arr.pop,	push_native = arr.push,	push = arr.push,	slice = arr.slice,	// Use a stripped-down indexOf if we can't use a native one	indexOf = arr.indexOf || function( elem ) {	var i = 0,	len = this.length;	for ( ; i < len; i++ ) {	if ( this[i] === elem ) {	return i;	}	}	return -1;	},	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",	// Regular expressions	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace	whitespace = "[\\x20\\t\\r\\n\\f]",	// http://www.w3.org/TR/css3-syntax/#characters	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",	// Loosely modeled on CSS identifier characters	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier	identifier = characterEncoding.replace( "w", "w#" ),	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +	"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",	// Prefer arguments quoted,	// then not containing pseudos/brackets,	// then attribute selectors/non-parenthetical expressions,	// then anything else	// These preferences are here to reduce the number of selectors	// needing tokenize in the PSEUDO preFilter	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),	rpseudo = new RegExp( pseudos ),	ridentifier = new RegExp( "^" + identifier + "$" ),	matchExpr = {	"ID": new RegExp( "^#(" + characterEncoding + ")" ),	"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),	"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),	"ATTR": new RegExp( "^" + attributes ),	"PSEUDO": new RegExp( "^" + pseudos ),	"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +	"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +	"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),	"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),	// For use in libraries implementing .is()	// We use this for POS matching in `select`	"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +	whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )	},	rinputs = /^(?:input|select|textarea|button)$/i,	rheader = /^h\d$/i,	rnative = /^[^{]+\{\s*\[native \w/,	// Easily-parseable/retrievable ID or TAG or CLASS selectors	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,	rsibling = /[+~]/,	rescape = /'|\\/g,	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),	funescape = function( _, escaped, escapedWhitespace ) {	var high = "0x" + escaped - 0x10000;	// NaN means non-codepoint	// Support: Firefox	// Workaround erroneous numeric interpretation of +"0x"	return high !== high || escapedWhitespace ?	escaped :	high < 0 ?	// BMP codepoint	String.fromCharCode( high + 0x10000 ) :	// Supplemental Plane codepoint (surrogate pair)	String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );	};
// Optimize for push.apply( _, NodeList )
try {	push.apply(	(arr = slice.call( preferredDoc.childNodes )),	preferredDoc.childNodes	);	// Support: Android<4.0	// Detect silently failing push.apply	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {	push = { apply: arr.length ?	// Leverage slice if possible	function( target, els ) {	push_native.apply( target, slice.call(els) );	} :	// Support: IE<9	// Otherwise append directly	function( target, els ) {	var j = target.length,	i = 0;	// Can't trust NodeList.length	while ( (target[j++] = els[i++]) ) {}	target.length = j - 1;	}	};
}
function Sizzle( selector, context, results, seed ) {	var match, elem, m, nodeType,	// QSA vars	i, groups, old, nid, newContext, newSelector;	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {	setDocument( context );	}	context = context || document;	results = results || [];	if ( !selector || typeof selector !== "string" ) {	return results;	}	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {	return [];	}	if ( documentIsHTML && !seed ) {	// Shortcuts	if ( (match = rquickExpr.exec( selector )) ) {	// Speed-up: Sizzle("#ID")	if ( (m = match[1]) ) {	if ( nodeType === 9 ) {	elem = context.getElementById( m );	// Check parentNode to catch when Blackberry 4.6 returns	// nodes that are no longer in the document (jQuery #6963)	if ( elem && elem.parentNode ) {	// Handle the case where IE, Opera, and Webkit return items	// by name instead of ID	if ( elem.id === m ) {	results.push( elem );	return results;	}	} else {	return results;	}	} else {	// Context is not a document	if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&	contains( context, elem ) && elem.id === m ) {	results.push( elem );	return results;	}	}	// Speed-up: Sizzle("TAG")	} else if ( match[2] ) {	push.apply( results, context.getElementsByTagName( selector ) );	return results;	// Speed-up: Sizzle(".CLASS")	} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {	push.apply( results, context.getElementsByClassName( m ) );	return results;	}	}	// QSA path	if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {	nid = old = expando;	newContext = context;	newSelector = nodeType === 9 && selector;	// qSA works strangely on Element-rooted queries	// We can work around this by specifying an extra ID on the root	// and working up from there (Thanks to Andrew Dupont for the technique)	// IE 8 doesn't work on object elements	if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {	groups = tokenize( selector );	if ( (old = context.getAttribute("id")) ) {	nid = old.replace( rescape, "\\$&" );	} else {	context.setAttribute( "id", nid );	}	nid = "[id='" + nid + "'] ";	i = groups.length;	while ( i-- ) {	groups[i] = nid + toSelector( groups[i] );	}	newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;	newSelector = groups.join(",");	}	if ( newSelector ) {	try {	push.apply( results,	newContext.querySelectorAll( newSelector )	);	return results;	} catch(qsaError) {	} finally {	if ( !old ) {	context.removeAttribute("id");	}	}	}	}	}	// All others	return select( selector.replace( rtrim, "$1" ), context, results, seed );
}
/** * Create key-value caches of limited size * @returns {Function(string, Object)} Returns the Object data after storing it on itself with *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) *	deleting the oldest entry */
function createCache() {	var keys = [];	function cache( key, value ) {	// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)	if ( keys.push( key + " " ) > Expr.cacheLength ) {	// Only keep the most recent entries	delete cache[ keys.shift() ];	}	return (cache[ key + " " ] = value);	}	return cache;
}
/** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */
function markFunction( fn ) {	fn[ expando ] = true;	return fn;
}
/** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */
function assert( fn ) {	var div = document.createElement("div");	try {	return !!fn( div );	} catch (e) {	return false;	} finally {	// Remove from its parent by default	if ( div.parentNode ) {	div.parentNode.removeChild( div );	}	// release memory in IE	div = null;	}
}
/** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */
function addHandle( attrs, handler ) {	var arr = attrs.split("|"),	i = attrs.length;	while ( i-- ) {	Expr.attrHandle[ arr[i] ] = handler;	}
}
/** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */
function siblingCheck( a, b ) {	var cur = b && a,	diff = cur && a.nodeType === 1 && b.nodeType === 1 &&	( ~b.sourceIndex || MAX_NEGATIVE ) -	( ~a.sourceIndex || MAX_NEGATIVE );	// Use IE sourceIndex if available on both nodes	if ( diff ) {	return diff;	}	// Check if b follows a	if ( cur ) {	while ( (cur = cur.nextSibling) ) {	if ( cur === b ) {	return -1;	}	}	}	return a ? 1 : -1;
}
/** * Returns a function to use in pseudos for input types * @param {String} type */
function createInputPseudo( type ) {	return function( elem ) {	var name = elem.nodeName.toLowerCase();	return name === "input" && elem.type === type;	};
}
/** * Returns a function to use in pseudos for buttons * @param {String} type */
function createButtonPseudo( type ) {	return function( elem ) {	var name = elem.nodeName.toLowerCase();	return (name === "input" || name === "button") && elem.type === type;	};
}
/** * Returns a function to use in pseudos for positionals * @param {Function} fn */
function createPositionalPseudo( fn ) {	return markFunction(function( argument ) {	argument = +argument;	return markFunction(function( seed, matches ) {	var j,	matchIndexes = fn( [], seed.length, argument ),	i = matchIndexes.length;	// Match elements found at the specified indexes	while ( i-- ) {	if ( seed[ (j = matchIndexes[i]) ] ) {	seed[j] = !(matches[j] = seed[j]);	}	}	});	});
}
/** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */
function testContext( context ) {	return context && typeof context.getElementsByTagName !== strundefined && context;
}
// Expose support vars for convenience
support = Sizzle.support = {};
/** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */
isXML = Sizzle.isXML = function( elem ) {	// documentElement is verified for cases where it doesn't yet exist	// (such as loading iframes in IE - #4833)	var documentElement = elem && (elem.ownerDocument || elem).documentElement;	return documentElement ? documentElement.nodeName !== "HTML" : false;
};
/** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */
setDocument = Sizzle.setDocument = function( node ) {	var hasCompare,	doc = node ? node.ownerDocument || node : preferredDoc,	parent = doc.defaultView;	// If no document and documentElement is available, return	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {	return document;	}	// Set our document	document = doc;	docElem = doc.documentElement;	// Support tests	documentIsHTML = !isXML( doc );	// Support: IE>8	// If iframe document is assigned to "document" variable and if iframe has been reloaded,	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936	// IE6-8 do not support the defaultView property so parent will be undefined	if ( parent && parent !== parent.top ) {	// IE11 does not have attachEvent, so all must suffer	if ( parent.addEventListener ) {	parent.addEventListener( "unload", function() {	setDocument();	}, false );	} else if ( parent.attachEvent ) {	parent.attachEvent( "onunload", function() {	setDocument();	});	}	}	/* Attributes	---------------------------------------------------------------------- */	// Support: IE<8	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)	support.attributes = assert(function( div ) {	div.className = "i";	return !div.getAttribute("className");	});	/* getElement(s)By*	---------------------------------------------------------------------- */	// Check if getElementsByTagName("*") returns only elements	support.getElementsByTagName = assert(function( div ) {	div.appendChild( doc.createComment("") );	return !div.getElementsByTagName("*").length;	});	// Check if getElementsByClassName can be trusted	support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {	div.innerHTML = "<div class='a'></div><div class='a i'></div>";	// Support: Safari<4	// Catch class over-caching	div.firstChild.className = "i";	// Support: Opera<10	// Catch gEBCN failure to find non-leading classes	return div.getElementsByClassName("i").length === 2;	});	// Support: IE<10	// Check if getElementById returns elements by name	// The broken getElementById methods don't pick up programatically-set names,	// so use a roundabout getElementsByName test	support.getById = assert(function( div ) {	docElem.appendChild( div ).id = expando;	return !doc.getElementsByName || !doc.getElementsByName( expando ).length;	});	// ID find and filter	if ( support.getById ) {	Expr.find["ID"] = function( id, context ) {	if ( typeof context.getElementById !== strundefined && documentIsHTML ) {	var m = context.getElementById( id );	// Check parentNode to catch when Blackberry 4.6 returns	// nodes that are no longer in the document #6963	return m && m.parentNode ? [m] : [];	}	};	Expr.filter["ID"] = function( id ) {	var attrId = id.replace( runescape, funescape );	return function( elem ) {	return elem.getAttribute("id") === attrId;	};	};	} else {	// Support: IE6/7	// getElementById is not reliable as a find shortcut	delete Expr.find["ID"];	Expr.filter["ID"] = function( id ) {	var attrId = id.replace( runescape, funescape );	return function( elem ) {	var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");	return node && node.value === attrId;	};	};	}	// Tag	Expr.find["TAG"] = support.getElementsByTagName ?	function( tag, context ) {	if ( typeof context.getElementsByTagName !== strundefined ) {	return context.getElementsByTagName( tag );	}	} :	function( tag, context ) {	var elem,	tmp = [],	i = 0,	results = context.getElementsByTagName( tag );	// Filter out possible comments	if ( tag === "*" ) {	while ( (elem = results[i++]) ) {	if ( elem.nodeType === 1 ) {	tmp.push( elem );	}	}	return tmp;	}	return results;	};	// Class	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {	if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {	return context.getElementsByClassName( className );	}	};	/* QSA/matchesSelector	---------------------------------------------------------------------- */	// QSA and matchesSelector support	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)	rbuggyMatches = [];	// qSa(:focus) reports false when true (Chrome 21)	// We allow this because of a bug in IE8/9 that throws an error	// whenever `document.activeElement` is accessed on an iframe	// So, we allow :focus to pass through QSA all the time to avoid the IE error	// See https://bugs.jquery.com/ticket/13378	rbuggyQSA = [];	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {	// Build QSA regex	// Regex strategy adopted from Diego Perini	assert(function( div ) {	// Select is set to empty string on purpose	// This is to test IE's treatment of not explicitly	// setting a boolean content attribute,	// since its presence should be enough	// https://bugs.jquery.com/ticket/12359	div.innerHTML = "<select t=''><option selected=''></option></select>";	// Support: IE8, Opera 10-12	// Nothing should be selected when empty strings follow ^= or $= or *=	if ( div.querySelectorAll("[t^='']").length ) {	rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );	}	// Support: IE8	// Boolean attributes and "value" are not treated correctly	if ( !div.querySelectorAll("[selected]").length ) {	rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );	}	// Webkit/Opera - :checked should return selected option elements	// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked	// IE8 throws error here and will not see later tests	if ( !div.querySelectorAll(":checked").length ) {	rbuggyQSA.push(":checked");	}	});	assert(function( div ) {	// Support: Windows 8 Native Apps	// The type and name attributes are restricted during .innerHTML assignment	var input = doc.createElement("input");	input.setAttribute( "type", "hidden" );	div.appendChild( input ).setAttribute( "name", "D" );	// Support: IE8	// Enforce case-sensitivity of name attribute	if ( div.querySelectorAll("[name=d]").length ) {	rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );	}	// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)	// IE8 throws error here and will not see later tests	if ( !div.querySelectorAll(":enabled").length ) {	rbuggyQSA.push( ":enabled", ":disabled" );	}	// Opera 10-11 does not throw on post-comma invalid pseudos	div.querySelectorAll("*,:x");	rbuggyQSA.push(",.*:");	});	}	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||	docElem.mozMatchesSelector ||	docElem.oMatchesSelector ||	docElem.msMatchesSelector) )) ) {	assert(function( div ) {	// Check to see if it's possible to do matchesSelector	// on a disconnected node (IE 9)	support.disconnectedMatch = matches.call( div, "div" );	// This should fail with an exception	// Gecko does not error, returns false instead	matches.call( div, "[s!='']:x" );	rbuggyMatches.push( "!=", pseudos );	});	}	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );	/* Contains	---------------------------------------------------------------------- */	hasCompare = rnative.test( docElem.compareDocumentPosition );	// Element contains another	// Purposefully does not implement inclusive descendent	// As in, an element does not contain itself	contains = hasCompare || rnative.test( docElem.contains ) ?	function( a, b ) {	var adown = a.nodeType === 9 ? a.documentElement : a,	bup = b && b.parentNode;	return a === bup || !!( bup && bup.nodeType === 1 && (	adown.contains ?	adown.contains( bup ) :	a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16	));	} :	function( a, b ) {	if ( b ) {	while ( (b = b.parentNode) ) {	if ( b === a ) {	return true;	}	}	}	return false;	};	/* Sorting	---------------------------------------------------------------------- */	// Document order sorting	sortOrder = hasCompare ?	function( a, b ) {	// Flag for duplicate removal	if ( a === b ) {	hasDuplicate = true;	return 0;	}	// Sort on method existence if only one input has compareDocumentPosition	var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;	if ( compare ) {	return compare;	}	// Calculate position if both inputs belong to the same document	compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?	a.compareDocumentPosition( b ) :	// Otherwise we know they are disconnected	1;	// Disconnected nodes	if ( compare & 1 ||	(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {	// Choose the first element that is related to our preferred document	if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {	return -1;	}	if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {	return 1;	}	// Maintain original order	return sortInput ?	( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :	0;	}	return compare & 4 ? -1 : 1;	} :	function( a, b ) {	// Exit early if the nodes are identical	if ( a === b ) {	hasDuplicate = true;	return 0;	}	var cur,	i = 0,	aup = a.parentNode,	bup = b.parentNode,	ap = [ a ],	bp = [ b ];	// Parentless nodes are either documents or disconnected	if ( !aup || !bup ) {	return a === doc ? -1 :	b === doc ? 1 :	aup ? -1 :	bup ? 1 :	sortInput ?	( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :	0;	// If the nodes are siblings, we can do a quick check	} else if ( aup === bup ) {	return siblingCheck( a, b );	}	// Otherwise we need full lists of their ancestors for comparison	cur = a;	while ( (cur = cur.parentNode) ) {	ap.unshift( cur );	}	cur = b;	while ( (cur = cur.parentNode) ) {	bp.unshift( cur );	}	// Walk down the tree looking for a discrepancy	while ( ap[i] === bp[i] ) {	i++;	}	return i ?	// Do a sibling check if the nodes have a common ancestor	siblingCheck( ap[i], bp[i] ) :	// Otherwise nodes in our document sort first	ap[i] === preferredDoc ? -1 :	bp[i] === preferredDoc ? 1 :	0;	};	return doc;
};
Sizzle.matches = function( expr, elements ) {	return Sizzle( expr, null, null, elements );
};
Sizzle.matchesSelector = function( elem, expr ) {	// Set document vars if needed	if ( ( elem.ownerDocument || elem ) !== document ) {	setDocument( elem );	}	// Make sure that attribute selectors are quoted	expr = expr.replace( rattributeQuotes, "='$1']" );	if ( support.matchesSelector && documentIsHTML &&	( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&	( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {	try {	var ret = matches.call( elem, expr );	// IE 9's matchesSelector returns false on disconnected nodes	if ( ret || support.disconnectedMatch ||	// As well, disconnected nodes are said to be in a document	// fragment in IE 9	elem.document && elem.document.nodeType !== 11 ) {	return ret;	}	} catch(e) {}	}	return Sizzle( expr, document, null, [elem] ).length > 0;
};
Sizzle.contains = function( context, elem ) {	// Set document vars if needed	if ( ( context.ownerDocument || context ) !== document ) {	setDocument( context );	}	return contains( context, elem );
};
Sizzle.attr = function( elem, name ) {	// Set document vars if needed	if ( ( elem.ownerDocument || elem ) !== document ) {	setDocument( elem );	}	var fn = Expr.attrHandle[ name.toLowerCase() ],	// Don't get fooled by Object.prototype properties (jQuery #13807)	val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?	fn( elem, name, !documentIsHTML ) :	undefined;	return val !== undefined ?	val :	support.attributes || !documentIsHTML ?	elem.getAttribute( name ) :	(val = elem.getAttributeNode(name)) && val.specified ?	val.value :	null;
};
Sizzle.error = function( msg ) {	throw new Error( "Syntax error, unrecognized expression: " + msg );
};
/** * Document sorting and removing duplicates * @param {ArrayLike} results */
Sizzle.uniqueSort = function( results ) {	var elem,	duplicates = [],	j = 0,	i = 0;	// Unless we *know* we can detect duplicates, assume their presence	hasDuplicate = !support.detectDuplicates;	sortInput = !support.sortStable && results.slice( 0 );	results.sort( sortOrder );	if ( hasDuplicate ) {	while ( (elem = results[i++]) ) {	if ( elem === results[ i ] ) {	j = duplicates.push( i );	}	}	while ( j-- ) {	results.splice( duplicates[ j ], 1 );	}	}	// Clear input after sorting to release objects	// See https://github.com/jquery/sizzle/pull/225	sortInput = null;	return results;
};
/** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */
getText = Sizzle.getText = function( elem ) {	var node,	ret = "",	i = 0,	nodeType = elem.nodeType;	if ( !nodeType ) {	// If no nodeType, this is expected to be an array	while ( (node = elem[i++]) ) {	// Do not traverse comment nodes	ret += getText( node );	}	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {	// Use textContent for elements	// innerText usage removed for consistency of new lines (jQuery #11153)	if ( typeof elem.textContent === "string" ) {	return elem.textContent;	} else {	// Traverse its children	for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {	ret += getText( elem );	}	}	} else if ( nodeType === 3 || nodeType === 4 ) {	return elem.nodeValue;	}	// Do not include comment or processing instruction nodes	return ret;
};
Expr = Sizzle.selectors = {	// Can be adjusted by the user	cacheLength: 50,	createPseudo: markFunction,	match: matchExpr,	attrHandle: {},	find: {},	relative: {	">": { dir: "parentNode", first: true },	" ": { dir: "parentNode" },	"+": { dir: "previousSibling", first: true },	"~": { dir: "previousSibling" }	},	preFilter: {	"ATTR": function( match ) {	match[1] = match[1].replace( runescape, funescape );	// Move the given value to match[3] whether quoted or unquoted	match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );	if ( match[2] === "~=" ) {	match[3] = " " + match[3] + " ";	}	return match.slice( 0, 4 );	},	"CHILD": function( match ) {	/* matches from matchExpr["CHILD"]	1 type (only|nth|...)	2 what (child|of-type)	3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)	4 xn-component of xn+y argument ([+-]?\d*n|)	5 sign of xn-component	6 x of xn-component	7 sign of y-component	8 y of y-component	*/	match[1] = match[1].toLowerCase();	if ( match[1].slice( 0, 3 ) === "nth" ) {	// nth-* requires argument	if ( !match[3] ) {	Sizzle.error( match[0] );	}	// numeric x and y parameters for Expr.filter.CHILD	// remember that false/true cast respectively to 0/1	match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );	match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );	// other types prohibit arguments	} else if ( match[3] ) {	Sizzle.error( match[0] );	}	return match;	},	"PSEUDO": function( match ) {	var excess,	unquoted = !match[5] && match[2];	if ( matchExpr["CHILD"].test( match[0] ) ) {	return null;	}	// Accept quoted arguments as-is	if ( match[3] && match[4] !== undefined ) {	match[2] = match[4];	// Strip excess characters from unquoted arguments	} else if ( unquoted && rpseudo.test( unquoted ) &&	// Get excess from tokenize (recursively)	(excess = tokenize( unquoted, true )) &&	// advance to the next closing parenthesis	(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {	// excess is a negative index	match[0] = match[0].slice( 0, excess );	match[2] = unquoted.slice( 0, excess );	}	// Return only captures needed by the pseudo filter method (type and argument)	return match.slice( 0, 3 );	}	},	filter: {	"TAG": function( nodeNameSelector ) {	var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();	return nodeNameSelector === "*" ?	function() { return true; } :	function( elem ) {	return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;	};	},	"CLASS": function( className ) {	var pattern = classCache[ className + " " ];	return pattern ||	(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&	classCache( className, function( elem ) {	return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );	});	},	"ATTR": function( name, operator, check ) {	return function( elem ) {	var result = Sizzle.attr( elem, name );	if ( result == null ) {	return operator === "!=";	}	if ( !operator ) {	return true;	}	result += "";	return operator === "=" ? result === check :	operator === "!=" ? result !== check :	operator === "^=" ? check && result.indexOf( check ) === 0 :	operator === "*=" ? check && result.indexOf( check ) > -1 :	operator === "$=" ? check && result.slice( -check.length ) === check :	operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :	operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :	false;	};	},	"CHILD": function( type, what, argument, first, last ) {	var simple = type.slice( 0, 3 ) !== "nth",	forward = type.slice( -4 ) !== "last",	ofType = what === "of-type";	return first === 1 && last === 0 ?	// Shortcut for :nth-*(n)	function( elem ) {	return !!elem.parentNode;	} :	function( elem, context, xml ) {	var cache, outerCache, node, diff, nodeIndex, start,	dir = simple !== forward ? "nextSibling" : "previousSibling",	parent = elem.parentNode,	name = ofType && elem.nodeName.toLowerCase(),	useCache = !xml && !ofType;	if ( parent ) {	// :(first|last|only)-(child|of-type)	if ( simple ) {	while ( dir ) {	node = elem;	while ( (node = node[ dir ]) ) {	if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {	return false;	}	}	// Reverse direction for :only-* (if we haven't yet done so)	start = dir = type === "only" && !start && "nextSibling";	}	return true;	}	start = [ forward ? parent.firstChild : parent.lastChild ];	// non-xml :nth-child(...) stores cache data on `parent`	if ( forward && useCache ) {	// Seek `elem` from a previously-cached index	outerCache = parent[ expando ] || (parent[ expando ] = {});	cache = outerCache[ type ] || [];	nodeIndex = cache[0] === dirruns && cache[1];	diff = cache[0] === dirruns && cache[2];	node = nodeIndex && parent.childNodes[ nodeIndex ];	while ( (node = ++nodeIndex && node && node[ dir ] ||	// Fallback to seeking `elem` from the start	(diff = nodeIndex = 0) || start.pop()) ) {	// When found, cache indexes on `parent` and break	if ( node.nodeType === 1 && ++diff && node === elem ) {	outerCache[ type ] = [ dirruns, nodeIndex, diff ];	break;	}	}	// Use previously-cached element index if available	} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {	diff = cache[1];	// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)	} else {	// Use the same loop as above to seek `elem` from the start	while ( (node = ++nodeIndex && node && node[ dir ] ||	(diff = nodeIndex = 0) || start.pop()) ) {	if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {	// Cache the index of each encountered element	if ( useCache ) {	(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];	}	if ( node === elem ) {	break;	}	}	}	}	// Incorporate the offset, then check against cycle size	diff -= last;	return diff === first || ( diff % first === 0 && diff / first >= 0 );	}	};	},	"PSEUDO": function( pseudo, argument ) {	// pseudo-class names are case-insensitive	// http://www.w3.org/TR/selectors/#pseudo-classes	// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters	// Remember that setFilters inherits from pseudos	var args,	fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||	Sizzle.error( "unsupported pseudo: " + pseudo );	// The user may use createPseudo to indicate that	// arguments are needed to create the filter function	// just as Sizzle does	if ( fn[ expando ] ) {	return fn( argument );	}	// But maintain support for old signatures	if ( fn.length > 1 ) {	args = [ pseudo, pseudo, "", argument ];	return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?	markFunction(function( seed, matches ) {	var idx,	matched = fn( seed, argument ),	i = matched.length;	while ( i-- ) {	idx = indexOf.call( seed, matched[i] );	seed[ idx ] = !( matches[ idx ] = matched[i] );	}	}) :	function( elem ) {	return fn( elem, 0, args );	};	}	return fn;	}	},	pseudos: {	// Potentially complex pseudos	"not": markFunction(function( selector ) {	// Trim the selector passed to compile	// to avoid treating leading and trailing	// spaces as combinators	var input = [],	results = [],	matcher = compile( selector.replace( rtrim, "$1" ) );	return matcher[ expando ] ?	markFunction(function( seed, matches, context, xml ) {	var elem,	unmatched = matcher( seed, null, xml, [] ),	i = seed.length;	// Match elements unmatched by `matcher`	while ( i-- ) {	if ( (elem = unmatched[i]) ) {	seed[i] = !(matches[i] = elem);	}	}	}) :	function( elem, context, xml ) {	input[0] = elem;	matcher( input, null, xml, results );	return !results.pop();	};	}),	"has": markFunction(function( selector ) {	return function( elem ) {	return Sizzle( selector, elem ).length > 0;	};	}),	"contains": markFunction(function( text ) {	return function( elem ) {	return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;	};	}),	// "Whether an element is represented by a :lang() selector	// is based solely on the element's language value	// being equal to the identifier C,	// or beginning with the identifier C immediately followed by "-".	// The matching of C against the element's language value is performed case-insensitively.	// The identifier C does not have to be a valid language name."	// http://www.w3.org/TR/selectors/#lang-pseudo	"lang": markFunction( function( lang ) {	// lang value must be a valid identifier	if ( !ridentifier.test(lang || "") ) {	Sizzle.error( "unsupported lang: " + lang );	}	lang = lang.replace( runescape, funescape ).toLowerCase();	return function( elem ) {	var elemLang;	do {	if ( (elemLang = documentIsHTML ?	elem.lang :	elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {	elemLang = elemLang.toLowerCase();	return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;	}	} while ( (elem = elem.parentNode) && elem.nodeType === 1 );	return false;	};	}),	// Miscellaneous	"target": function( elem ) {	var hash = window.location && window.location.hash;	return hash && hash.slice( 1 ) === elem.id;	},	"root": function( elem ) {	return elem === docElem;	},	"focus": function( elem ) {	return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);	},	// Boolean properties	"enabled": function( elem ) {	return elem.disabled === false;	},	"disabled": function( elem ) {	return elem.disabled === true;	},	"checked": function( elem ) {	// In CSS3, :checked should return both checked and selected elements	// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked	var nodeName = elem.nodeName.toLowerCase();	return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);	},	"selected": function( elem ) {	// Accessing this property makes selected-by-default	// options in Safari work properly	if ( elem.parentNode ) {	elem.parentNode.selectedIndex;	}	return elem.selected === true;	},	// Contents	"empty": function( elem ) {	// http://www.w3.org/TR/selectors/#empty-pseudo	// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),	// but not by others (comment: 8; processing instruction: 7; etc.)	// nodeType < 6 works because attributes (2) do not appear as children	for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {	if ( elem.nodeType < 6 ) {	return false;	}	}	return true;	},	"parent": function( elem ) {	return !Expr.pseudos["empty"]( elem );	},	// Element/input types	"header": function( elem ) {	return rheader.test( elem.nodeName );	},	"input": function( elem ) {	return rinputs.test( elem.nodeName );	},	"button": function( elem ) {	var name = elem.nodeName.toLowerCase();	return name === "input" && elem.type === "button" || name === "button";	},	"text": function( elem ) {	var attr;	return elem.nodeName.toLowerCase() === "input" &&	elem.type === "text" &&	// Support: IE<8	// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"	( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );	},	// Position-in-collection	"first": createPositionalPseudo(function() {	return [ 0 ];	}),	"last": createPositionalPseudo(function( matchIndexes, length ) {	return [ length - 1 ];	}),	"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {	return [ argument < 0 ? argument + length : argument ];	}),	"even": createPositionalPseudo(function( matchIndexes, length ) {	var i = 0;	for ( ; i < length; i += 2 ) {	matchIndexes.push( i );	}	return matchIndexes;	}),	"odd": createPositionalPseudo(function( matchIndexes, length ) {	var i = 1;	for ( ; i < length; i += 2 ) {	matchIndexes.push( i );	}	return matchIndexes;	}),	"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {	var i = argument < 0 ? argument + length : argument;	for ( ; --i >= 0; ) {	matchIndexes.push( i );	}	return matchIndexes;	}),	"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {	var i = argument < 0 ? argument + length : argument;	for ( ; ++i < length; ) {	matchIndexes.push( i );	}	return matchIndexes;	})	}
};
Expr.pseudos["nth"] = Expr.pseudos["eq"];
// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {	Expr.pseudos[ i ] = createButtonPseudo( i );
}
// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
function tokenize( selector, parseOnly ) {	var matched, match, tokens, type,	soFar, groups, preFilters,	cached = tokenCache[ selector + " " ];	if ( cached ) {	return parseOnly ? 0 : cached.slice( 0 );	}	soFar = selector;	groups = [];	preFilters = Expr.preFilter;	while ( soFar ) {	// Comma and first run	if ( !matched || (match = rcomma.exec( soFar )) ) {	if ( match ) {	// Don't consume trailing commas as valid	soFar = soFar.slice( match[0].length ) || soFar;	}	groups.push( (tokens = []) );	}	matched = false;	// Combinators	if ( (match = rcombinators.exec( soFar )) ) {	matched = match.shift();	tokens.push({	value: matched,	// Cast descendant combinators to space	type: match[0].replace( rtrim, " " )	});	soFar = soFar.slice( matched.length );	}	// Filters	for ( type in Expr.filter ) {	if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||	(match = preFilters[ type ]( match ))) ) {	matched = match.shift();	tokens.push({	value: matched,	type: type,	matches: match	});	soFar = soFar.slice( matched.length );	}	}	if ( !matched ) {	break;	}	}	// Return the length of the invalid excess	// if we're just parsing	// Otherwise, throw an error or return tokens	return parseOnly ?	soFar.length :	soFar ?	Sizzle.error( selector ) :	// Cache the tokens	tokenCache( selector, groups ).slice( 0 );
}
function toSelector( tokens ) {	var i = 0,	len = tokens.length,	selector = "";	for ( ; i < len; i++ ) {	selector += tokens[i].value;	}	return selector;
}
function addCombinator( matcher, combinator, base ) {	var dir = combinator.dir,	checkNonElements = base && dir === "parentNode",	doneName = done++;	return combinator.first ?	// Check against closest ancestor/preceding element	function( elem, context, xml ) {	while ( (elem = elem[ dir ]) ) {	if ( elem.nodeType === 1 || checkNonElements ) {	return matcher( elem, context, xml );	}	}	} :	// Check against all ancestor/preceding elements	function( elem, context, xml ) {	var oldCache, outerCache,	newCache = [ dirruns, doneName ];	// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching	if ( xml ) {	while ( (elem = elem[ dir ]) ) {	if ( elem.nodeType === 1 || checkNonElements ) {	if ( matcher( elem, context, xml ) ) {	return true;	}	}	}	} else {	while ( (elem = elem[ dir ]) ) {	if ( elem.nodeType === 1 || checkNonElements ) {	outerCache = elem[ expando ] || (elem[ expando ] = {});	if ( (oldCache = outerCache[ dir ]) &&	oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {	// Assign to newCache so results back-propagate to previous elements	return (newCache[ 2 ] = oldCache[ 2 ]);	} else {	// Reuse newcache so results back-propagate to previous elements	outerCache[ dir ] = newCache;	// A match means we're done; a fail means we have to keep checking	if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {	return true;	}	}	}	}	}	};
}
function elementMatcher( matchers ) {	return matchers.length > 1 ?	function( elem, context, xml ) {	var i = matchers.length;	while ( i-- ) {	if ( !matchers[i]( elem, context, xml ) ) {	return false;	}	}	return true;	} :	matchers[0];
}
function condense( unmatched, map, filter, context, xml ) {	var elem,	newUnmatched = [],	i = 0,	len = unmatched.length,	mapped = map != null;	for ( ; i < len; i++ ) {	if ( (elem = unmatched[i]) ) {	if ( !filter || filter( elem, context, xml ) ) {	newUnmatched.push( elem );	if ( mapped ) {	map.push( i );	}	}	}	}	return newUnmatched;
}
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {	if ( postFilter && !postFilter[ expando ] ) {	postFilter = setMatcher( postFilter );	}	if ( postFinder && !postFinder[ expando ] ) {	postFinder = setMatcher( postFinder, postSelector );	}	return markFunction(function( seed, results, context, xml ) {	var temp, i, elem,	preMap = [],	postMap = [],	preexisting = results.length,	// Get initial elements from seed or context	elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),	// Prefilter to get matcher input, preserving a map for seed-results synchronization	matcherIn = preFilter && ( seed || !selector ) ?	condense( elems, preMap, preFilter, context, xml ) :	elems,	matcherOut = matcher ?	// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,	postFinder || ( seed ? preFilter : preexisting || postFilter ) ?	// ...intermediate processing is necessary	[] :	// ...otherwise use results directly	results :	matcherIn;	// Find primary matches	if ( matcher ) {	matcher( matcherIn, matcherOut, context, xml );	}	// Apply postFilter	if ( postFilter ) {	temp = condense( matcherOut, postMap );	postFilter( temp, [], context, xml );	// Un-match failing elements by moving them back to matcherIn	i = temp.length;	while ( i-- ) {	if ( (elem = temp[i]) ) {	matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);	}	}	}	if ( seed ) {	if ( postFinder || preFilter ) {	if ( postFinder ) {	// Get the final matcherOut by condensing this intermediate into postFinder contexts	temp = [];	i = matcherOut.length;	while ( i-- ) {	if ( (elem = matcherOut[i]) ) {	// Restore matcherIn since elem is not yet a final match	temp.push( (matcherIn[i] = elem) );	}	}	postFinder( null, (matcherOut = []), temp, xml );	}	// Move matched elements from seed to results to keep them synchronized	i = matcherOut.length;	while ( i-- ) {	if ( (elem = matcherOut[i]) &&	(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {	seed[temp] = !(results[temp] = elem);	}	}	}	// Add elements to results, through postFinder if defined	} else {	matcherOut = condense(	matcherOut === results ?	matcherOut.splice( preexisting, matcherOut.length ) :	matcherOut	);	if ( postFinder ) {	postFinder( null, results, matcherOut, xml );	} else {	push.apply( results, matcherOut );	}	}	});
}
function matcherFromTokens( tokens ) {	var checkContext, matcher, j,	len = tokens.length,	leadingRelative = Expr.relative[ tokens[0].type ],	implicitRelative = leadingRelative || Expr.relative[" "],	i = leadingRelative ? 1 : 0,	// The foundational matcher ensures that elements are reachable from top-level context(s)	matchContext = addCombinator( function( elem ) {	return elem === checkContext;	}, implicitRelative, true ),	matchAnyContext = addCombinator( function( elem ) {	return indexOf.call( checkContext, elem ) > -1;	}, implicitRelative, true ),	matchers = [ function( elem, context, xml ) {	return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (	(checkContext = context).nodeType ?	matchContext( elem, context, xml ) :	matchAnyContext( elem, context, xml ) );	} ];	for ( ; i < len; i++ ) {	if ( (matcher = Expr.relative[ tokens[i].type ]) ) {	matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];	} else {	matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );	// Return special upon seeing a positional matcher	if ( matcher[ expando ] ) {	// Find the next relative operator (if any) for proper handling	j = ++i;	for ( ; j < len; j++ ) {	if ( Expr.relative[ tokens[j].type ] ) {	break;	}	}	return setMatcher(	i > 1 && elementMatcher( matchers ),	i > 1 && toSelector(	// If the preceding token was a descendant combinator, insert an implicit any-element `*`	tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })	).replace( rtrim, "$1" ),	matcher,	i < j && matcherFromTokens( tokens.slice( i, j ) ),	j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),	j < len && toSelector( tokens )	);	}	matchers.push( matcher );	}	}	return elementMatcher( matchers );
}
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {	var bySet = setMatchers.length > 0,	byElement = elementMatchers.length > 0,	superMatcher = function( seed, context, xml, results, outermost ) {	var elem, j, matcher,	matchedCount = 0,	i = "0",	unmatched = seed && [],	setMatched = [],	contextBackup = outermostContext,	// We must always have either seed elements or outermost context	elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),	// Use integer dirruns iff this is the outermost matcher	dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),	len = elems.length;	if ( outermost ) {	outermostContext = context !== document && context;	}	// Add elements passing elementMatchers directly to results	// Keep `i` a string if there are no elements so `matchedCount` will be "00" below	// Support: IE<9, Safari	// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id	for ( ; i !== len && (elem = elems[i]) != null; i++ ) {	if ( byElement && elem ) {	j = 0;	while ( (matcher = elementMatchers[j++]) ) {	if ( matcher( elem, context, xml ) ) {	results.push( elem );	break;	}	}	if ( outermost ) {	dirruns = dirrunsUnique;	}	}	// Track unmatched elements for set filters	if ( bySet ) {	// They will have gone through all possible matchers	if ( (elem = !matcher && elem) ) {	matchedCount--;	}	// Lengthen the array for every element, matched or not	if ( seed ) {	unmatched.push( elem );	}	}	}	// Apply set filters to unmatched elements	matchedCount += i;	if ( bySet && i !== matchedCount ) {	j = 0;	while ( (matcher = setMatchers[j++]) ) {	matcher( unmatched, setMatched, context, xml );	}	if ( seed ) {	// Reintegrate element matches to eliminate the need for sorting	if ( matchedCount > 0 ) {	while ( i-- ) {	if ( !(unmatched[i] || setMatched[i]) ) {	setMatched[i] = pop.call( results );	}	}	}	// Discard index placeholder values to get only actual matches	setMatched = condense( setMatched );	}	// Add matches to results	push.apply( results, setMatched );	// Seedless set matches succeeding multiple successful matchers stipulate sorting	if ( outermost && !seed && setMatched.length > 0 &&	( matchedCount + setMatchers.length ) > 1 ) {	Sizzle.uniqueSort( results );	}	}	// Override manipulation of globals by nested matchers	if ( outermost ) {	dirruns = dirrunsUnique;	outermostContext = contextBackup;	}	return unmatched;	};	return bySet ?	markFunction( superMatcher ) :	superMatcher;
}
compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {	var i,	setMatchers = [],	elementMatchers = [],	cached = compilerCache[ selector + " " ];	if ( !cached ) {	// Generate a function of recursive functions that can be used to check each element	if ( !group ) {	group = tokenize( selector );	}	i = group.length;	while ( i-- ) {	cached = matcherFromTokens( group[i] );	if ( cached[ expando ] ) {	setMatchers.push( cached );	} else {	elementMatchers.push( cached );	}	}	// Cache the compiled function	cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );	}	return cached;
};
function multipleContexts( selector, contexts, results ) {	var i = 0,	len = contexts.length;	for ( ; i < len; i++ ) {	Sizzle( selector, contexts[i], results );	}	return results;
}
function select( selector, context, results, seed ) {	var i, tokens, token, type, find,	match = tokenize( selector );	if ( !seed ) {	// Try to minimize operations if there is only one group	if ( match.length === 1 ) {	// Take a shortcut and set the context if the root selector is an ID	tokens = match[0] = match[0].slice( 0 );	if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&	support.getById && context.nodeType === 9 && documentIsHTML &&	Expr.relative[ tokens[1].type ] ) {	context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];	if ( !context ) {	return results;	}	selector = selector.slice( tokens.shift().value.length );	}	// Fetch a seed set for right-to-left matching	i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;	while ( i-- ) {	token = tokens[i];	// Abort if we hit a combinator	if ( Expr.relative[ (type = token.type) ] ) {	break;	}	if ( (find = Expr.find[ type ]) ) {	// Search, expanding context for leading sibling combinators	if ( (seed = find(	token.matches[0].replace( runescape, funescape ),	rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context	)) ) {	// If seed is empty or no tokens remain, we can return early	tokens.splice( i, 1 );	selector = seed.length && toSelector( tokens );	if ( !selector ) {	push.apply( results, seed );	return results;	}	break;	}	}	}	}	}	// Compile and execute a filtering function	// Provide `match` to avoid retokenization if we modified the selector above	compile( selector, match )(	seed,	context,	!documentIsHTML,	results,	rsibling.test( selector ) && testContext( context.parentNode ) || context	);	return results;
}
// One-time assignments
// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
// Support: Chrome<14
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;
// Initialize against the default document
setDocument();
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( div1 ) {	// Should return 1, but returns 4 (following)	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
});
// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( div ) {	div.innerHTML = "<a href='#'></a>";	return div.firstChild.getAttribute("href") === "#" ;
}) ) {	addHandle( "type|href|height|width", function( elem, name, isXML ) {	if ( !isXML ) {	return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );	}	});
}
// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( div ) {	div.innerHTML = "<input/>";	div.firstChild.setAttribute( "value", "" );	return div.firstChild.getAttribute( "value" ) === "";
}) ) {	addHandle( "value", function( elem, name, isXML ) {	if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {	return elem.defaultValue;	}	});
}
// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( div ) {	return div.getAttribute("disabled") == null;
}) ) {	addHandle( booleans, function( elem, name, isXML ) {	var val;	if ( !isXML ) {	return elem[ name ] === true ? name.toLowerCase() :	(val = elem.getAttributeNode( name )) && val.specified ?	val.value :	null;	}	});
}
return Sizzle;
})( window );
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
var rneedsContext = jQuery.expr.match.needsContext;
var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
var risSimple = /^.[^:#\[\.,]*$/;
// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {	if ( jQuery.isFunction( qualifier ) ) {	return jQuery.grep( elements, function( elem, i ) {	/* jshint -W018 */	return !!qualifier.call( elem, i, elem ) !== not;	});	}	if ( qualifier.nodeType ) {	return jQuery.grep( elements, function( elem ) {	return ( elem === qualifier ) !== not;	});	}	if ( typeof qualifier === "string" ) {	if ( risSimple.test( qualifier ) ) {	return jQuery.filter( qualifier, elements, not );	}	qualifier = jQuery.filter( qualifier, elements );	}	return jQuery.grep( elements, function( elem ) {	return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;	});
}
jQuery.filter = function( expr, elems, not ) {	var elem = elems[ 0 ];	if ( not ) {	expr = ":not(" + expr + ")";	}	return elems.length === 1 && elem.nodeType === 1 ?	jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :	jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {	return elem.nodeType === 1;	}));
};
jQuery.fn.extend({	find: function( selector ) {	var i,	len = this.length,	ret = [],	self = this;	if ( typeof selector !== "string" ) {	return this.pushStack( jQuery( selector ).filter(function() {	for ( i = 0; i < len; i++ ) {	if ( jQuery.contains( self[ i ], this ) ) {	return true;	}	}	}) );	}	for ( i = 0; i < len; i++ ) {	jQuery.find( selector, self[ i ], ret );	}	// Needed because $( selector, context ) becomes $( context ).find( selector )	ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );	ret.selector = this.selector ? this.selector + " " + selector : selector;	return ret;	},	filter: function( selector ) {	return this.pushStack( winnow(this, selector || [], false) );	},	not: function( selector ) {	return this.pushStack( winnow(this, selector || [], true) );	},	is: function( selector ) {	return !!winnow(	this,	// If this is a positional/relative selector, check membership in the returned set	// so $("p:first").is("p:last") won't return true for a doc with two "p".	typeof selector === "string" && rneedsContext.test( selector ) ?	jQuery( selector ) :	selector || [],	false	).length;	}
});
// Initialize a jQuery object
// A central reference to the root jQuery(document)
var rootjQuery,	// A simple way to check for HTML strings	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)	// Strict HTML recognition (#11290: must start with <)	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,	init = jQuery.fn.init = function( selector, context ) {	var match, elem;	// HANDLE: $(""), $(null), $(undefined), $(false)	if ( !selector ) {	return this;	}	// Handle HTML strings	if ( typeof selector === "string" ) {	if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {	// Assume that strings that start and end with <> are HTML and skip the regex check	match = [ null, selector, null ];	} else {	match = rquickExpr.exec( selector );	}	// Match html or make sure no context is specified for #id	if ( match && (match[1] || !context) ) {	// HANDLE: $(html) -> $(array)	if ( match[1] ) {	context = context instanceof jQuery ? context[0] : context;	// scripts is true for back-compat	// Intentionally let the error be thrown if parseHTML is not present	jQuery.merge( this, jQuery.parseHTML(	match[1],	context && context.nodeType ? context.ownerDocument || context : document,	true	) );	// HANDLE: $(html, props)	if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {	for ( match in context ) {	// Properties of context are called as methods if possible	if ( jQuery.isFunction( this[ match ] ) ) {	this[ match ]( context[ match ] );	// ...and otherwise set as attributes	} else {	this.attr( match, context[ match ] );	}	}	}	return this;	// HANDLE: $(#id)	} else {	elem = document.getElementById( match[2] );	// Check parentNode to catch when Blackberry 4.6 returns	// nodes that are no longer in the document #6963	if ( elem && elem.parentNode ) {	// Inject the element directly into the jQuery object	this.length = 1;	this[0] = elem;	}	this.context = document;	this.selector = selector;	return this;	}	// HANDLE: $(expr, $(...))	} else if ( !context || context.jquery ) {	return ( context || rootjQuery ).find( selector );	// HANDLE: $(expr, context)	// (which is just equivalent to: $(context).find(expr)	} else {	return this.constructor( context ).find( selector );	}	// HANDLE: $(DOMElement)	} else if ( selector.nodeType ) {	this.context = this[0] = selector;	this.length = 1;	return this;	// HANDLE: $(function)	// Shortcut for document ready	} else if ( jQuery.isFunction( selector ) ) {	return typeof rootjQuery.ready !== "undefined" ?	rootjQuery.ready( selector ) :	// Execute immediately if ready is not present	selector( jQuery );	}	if ( selector.selector !== undefined ) {	this.selector = selector.selector;	this.context = selector.context;	}	return jQuery.makeArray( selector, this );	};
// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;
// Initialize central reference
rootjQuery = jQuery( document );
var rparentsprev = /^(?:parents|prev(?:Until|All))/,	// methods guaranteed to produce a unique set when starting from a unique set	guaranteedUnique = {	children: true,	contents: true,	next: true,	prev: true	};
jQuery.extend({	dir: function( elem, dir, until ) {	var matched = [],	truncate = until !== undefined;	while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {	if ( elem.nodeType === 1 ) {	if ( truncate && jQuery( elem ).is( until ) ) {	break;	}	matched.push( elem );	}	}	return matched;	},	sibling: function( n, elem ) {	var matched = [];	for ( ; n; n = n.nextSibling ) {	if ( n.nodeType === 1 && n !== elem ) {	matched.push( n );	}	}	return matched;	}
});
jQuery.fn.extend({	has: function( target ) {	var targets = jQuery( target, this ),	l = targets.length;	return this.filter(function() {	var i = 0;	for ( ; i < l; i++ ) {	if ( jQuery.contains( this, targets[i] ) ) {	return true;	}	}	});	},	closest: function( selectors, context ) {	var cur,	i = 0,	l = this.length,	matched = [],	pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?	jQuery( selectors, context || this.context ) :	0;	for ( ; i < l; i++ ) {	for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {	// Always skip document fragments	if ( cur.nodeType < 11 && (pos ?	pos.index(cur) > -1 :	// Don't pass non-elements to Sizzle	cur.nodeType === 1 &&	jQuery.find.matchesSelector(cur, selectors)) ) {	matched.push( cur );	break;	}	}	}	return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );	},	// Determine the position of an element within	// the matched set of elements	index: function( elem ) {	// No argument, return index in parent	if ( !elem ) {	return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;	}	// index in selector	if ( typeof elem === "string" ) {	return indexOf.call( jQuery( elem ), this[ 0 ] );	}	// Locate the position of the desired element	return indexOf.call( this,	// If it receives a jQuery object, the first element is used	elem.jquery ? elem[ 0 ] : elem	);	},	add: function( selector, context ) {	return this.pushStack(	jQuery.unique(	jQuery.merge( this.get(), jQuery( selector, context ) )	)	);	},	addBack: function( selector ) {	return this.add( selector == null ?	this.prevObject : this.prevObject.filter(selector)	);	}
});
function sibling( cur, dir ) {	while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}	return cur;
}
jQuery.each({	parent: function( elem ) {	var parent = elem.parentNode;	return parent && parent.nodeType !== 11 ? parent : null;	},	parents: function( elem ) {	return jQuery.dir( elem, "parentNode" );	},	parentsUntil: function( elem, i, until ) {	return jQuery.dir( elem, "parentNode", until );	},	next: function( elem ) {	return sibling( elem, "nextSibling" );	},	prev: function( elem ) {	return sibling( elem, "previousSibling" );	},	nextAll: function( elem ) {	return jQuery.dir( elem, "nextSibling" );	},	prevAll: function( elem ) {	return jQuery.dir( elem, "previousSibling" );	},	nextUntil: function( elem, i, until ) {	return jQuery.dir( elem, "nextSibling", until );	},	prevUntil: function( elem, i, until ) {	return jQuery.dir( elem, "previousSibling", until );	},	siblings: function( elem ) {	return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );	},	children: function( elem ) {	return jQuery.sibling( elem.firstChild );	},	contents: function( elem ) {	return elem.contentDocument || jQuery.merge( [], elem.childNodes );	}
}, function( name, fn ) {	jQuery.fn[ name ] = function( until, selector ) {	var matched = jQuery.map( this, fn, until );	if ( name.slice( -5 ) !== "Until" ) {	selector = until;	}	if ( selector && typeof selector === "string" ) {	matched = jQuery.filter( selector, matched );	}	if ( this.length > 1 ) {	// Remove duplicates	if ( !guaranteedUnique[ name ] ) {	jQuery.unique( matched );	}	// Reverse order for parents* and prev-derivatives	if ( rparentsprev.test( name ) ) {	matched.reverse();	}	}	return this.pushStack( matched );	};
});
var rnotwhite = (/\S+/g);
// String to Object options format cache
var optionsCache = {};
// Convert String-formatted options into Object-formatted ones and store in cache
function createOptions( options ) {	var object = optionsCache[ options ] = {};	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {	object[ flag ] = true;	});	return object;
}
/* * Create a callback list using the following parameters: * *	options: an optional list of space-separated options that will change how *	the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * *	once:	will ensure the callback list can only be fired once (like a Deferred) * *	memory:	will keep track of previous values and will call any callback added *	after the list has been fired right away with the latest "memorized" *	values (like a Deferred) * *	unique:	will ensure a callback can only be added once (no duplicate in the list) * *	stopOnFalse:	interrupt callings when a callback returns false * */
jQuery.Callbacks = function( options ) {	// Convert options from String-formatted to Object-formatted if needed	// (we check in cache first)	options = typeof options === "string" ?	( optionsCache[ options ] || createOptions( options ) ) :	jQuery.extend( {}, options );	var // Last fire value (for non-forgettable lists)	memory,	// Flag to know if list was already fired	fired,	// Flag to know if list is currently firing	firing,	// First callback to fire (used internally by add and fireWith)	firingStart,	// End of the loop when firing	firingLength,	// Index of currently firing callback (modified by remove if needed)	firingIndex,	// Actual callback list	list = [],	// Stack of fire calls for repeatable lists	stack = !options.once && [],	// Fire callbacks	fire = function( data ) {	memory = options.memory && data;	fired = true;	firingIndex = firingStart || 0;	firingStart = 0;	firingLength = list.length;	firing = true;	for ( ; list && firingIndex < firingLength; firingIndex++ ) {	if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {	memory = false; // To prevent further calls using add	break;	}	}	firing = false;	if ( list ) {	if ( stack ) {	if ( stack.length ) {	fire( stack.shift() );	}	} else if ( memory ) {	list = [];	} else {	self.disable();	}	}	},	// Actual Callbacks object	self = {	// Add a callback or a collection of callbacks to the list	add: function() {	if ( list ) {	// First, we save the current length	var start = list.length;	(function add( args ) {	jQuery.each( args, function( _, arg ) {	var type = jQuery.type( arg );	if ( type === "function" ) {	if ( !options.unique || !self.has( arg ) ) {	list.push( arg );	}	} else if ( arg && arg.length && type !== "string" ) {	// Inspect recursively	add( arg );	}	});	})( arguments );	// Do we need to add the callbacks to the	// current firing batch?	if ( firing ) {	firingLength = list.length;	// With memory, if we're not firing then	// we should call right away	} else if ( memory ) {	firingStart = start;	fire( memory );	}	}	return this;	},	// Remove a callback from the list	remove: function() {	if ( list ) {	jQuery.each( arguments, function( _, arg ) {	var index;	while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {	list.splice( index, 1 );	// Handle firing indexes	if ( firing ) {	if ( index <= firingLength ) {	firingLength--;	}	if ( index <= firingIndex ) {	firingIndex--;	}	}	}	});	}	return this;	},	// Check if a given callback is in the list.	// If no argument is given, return whether or not list has callbacks attached.	has: function( fn ) {	return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );	},	// Remove all callbacks from the list	empty: function() {	list = [];	firingLength = 0;	return this;	},	// Have the list do nothing anymore	disable: function() {	list = stack = memory = undefined;	return this;	},	// Is it disabled?	disabled: function() {	return !list;	},	// Lock the list in its current state	lock: function() {	stack = undefined;	if ( !memory ) {	self.disable();	}	return this;	},	// Is it locked?	locked: function() {	return !stack;	},	// Call all callbacks with the given context and arguments	fireWith: function( context, args ) {	if ( list && ( !fired || stack ) ) {	args = args || [];	args = [ context, args.slice ? args.slice() : args ];	if ( firing ) {	stack.push( args );	} else {	fire( args );	}	}	return this;	},	// Call all the callbacks with the given arguments	fire: function() {	self.fireWith( this, arguments );	return this;	},	// To know if the callbacks have already been called at least once	fired: function() {	return !!fired;	}	};	return self;
};
jQuery.extend({	Deferred: function( func ) {	var tuples = [	// action, add listener, listener list, final state	[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],	[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],	[ "notify", "progress", jQuery.Callbacks("memory") ]	],	state = "pending",	promise = {	state: function() {	return state;	},	always: function() {	deferred.done( arguments ).fail( arguments );	return this;	},	then: function( /* fnDone, fnFail, fnProgress */ ) {	var fns = arguments;	return jQuery.Deferred(function( newDefer ) {	jQuery.each( tuples, function( i, tuple ) {	var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];	// deferred[ done | fail | progress ] for forwarding actions to newDefer	deferred[ tuple[1] ](function() {	var returned = fn && fn.apply( this, arguments );	if ( returned && jQuery.isFunction( returned.promise ) ) {	returned.promise()	.done( newDefer.resolve )	.fail( newDefer.reject )	.progress( newDefer.notify );	} else {	newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );	}	});	});	fns = null;	}).promise();	},	// Get a promise for this deferred	// If obj is provided, the promise aspect is added to the object	promise: function( obj ) {	return obj != null ? jQuery.extend( obj, promise ) : promise;	}	},	deferred = {};	// Keep pipe for back-compat	promise.pipe = promise.then;	// Add list-specific methods	jQuery.each( tuples, function( i, tuple ) {	var list = tuple[ 2 ],	stateString = tuple[ 3 ];	// promise[ done | fail | progress ] = list.add	promise[ tuple[1] ] = list.add;	// Handle state	if ( stateString ) {	list.add(function() {	// state = [ resolved | rejected ]	state = stateString;	// [ reject_list | resolve_list ].disable; progress_list.lock	}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );	}	// deferred[ resolve | reject | notify ]	deferred[ tuple[0] ] = function() {	deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );	return this;	};	deferred[ tuple[0] + "With" ] = list.fireWith;	});	// Make the deferred a promise	promise.promise( deferred );	// Call given func if any	if ( func ) {	func.call( deferred, deferred );	}	// All done!	return deferred;	},	// Deferred helper	when: function( subordinate /* , ..., subordinateN */ ) {	var i = 0,	resolveValues = slice.call( arguments ),	length = resolveValues.length,	// the count of uncompleted subordinates	remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,	// the master Deferred. If resolveValues consist of only a single Deferred, just use that.	deferred = remaining === 1 ? subordinate : jQuery.Deferred(),	// Update function for both resolve and progress values	updateFunc = function( i, contexts, values ) {	return function( value ) {	contexts[ i ] = this;	values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;	if ( values === progressValues ) {	deferred.notifyWith( contexts, values );	} else if ( !( --remaining ) ) {	deferred.resolveWith( contexts, values );	}	};	},	progressValues, progressContexts, resolveContexts;	// add listeners to Deferred subordinates; treat others as resolved	if ( length > 1 ) {	progressValues = new Array( length );	progressContexts = new Array( length );	resolveContexts = new Array( length );	for ( ; i < length; i++ ) {	if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {	resolveValues[ i ].promise()	.done( updateFunc( i, resolveContexts, resolveValues ) )	.fail( deferred.reject )	.progress( updateFunc( i, progressContexts, progressValues ) );	} else {	--remaining;	}	}	}	// if we're not waiting on anything, resolve the master	if ( !remaining ) {	deferred.resolveWith( resolveContexts, resolveValues );	}	return deferred.promise();	}
});
// The deferred used on DOM ready
var readyList;
jQuery.fn.ready = function( fn ) {	// Add the callback	jQuery.ready.promise().done( fn );	return this;
};
jQuery.extend({	// Is the DOM ready to be used? Set to true once it occurs.	isReady: false,	// A counter to track how many items to wait for before	// the ready event fires. See #6781	readyWait: 1,	// Hold (or release) the ready event	holdReady: function( hold ) {	if ( hold ) {	jQuery.readyWait++;	} else {	jQuery.ready( true );	}	},	// Handle when the DOM is ready	ready: function( wait ) {	// Abort if there are pending holds or we're already ready	if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {	return;	}	// Remember that the DOM is ready	jQuery.isReady = true;	// If a normal DOM Ready event fired, decrement, and wait if need be	if ( wait !== true && --jQuery.readyWait > 0 ) {	return;	}	// If there are functions bound, to execute	readyList.resolveWith( document, [ jQuery ] );	// Trigger any bound ready events	if ( jQuery.fn.trigger ) {	jQuery( document ).trigger("ready").off("ready");	}	}
});
/** * The ready event handler and self cleanup method */
function completed() {	document.removeEventListener( "DOMContentLoaded", completed, false );	window.removeEventListener( "load", completed, false );	jQuery.ready();
}
jQuery.ready.promise = function( obj ) {	if ( !readyList ) {	readyList = jQuery.Deferred();	// Catch cases where $(document).ready() is called after the browser event has already occurred.	// we once tried to use readyState "interactive" here, but it caused issues like the one	// discovered by ChrisS here: https://bugs.jquery.com/ticket/12282#comment:15	if ( document.readyState === "complete" ) {	// Handle it asynchronously to allow scripts the opportunity to delay ready	setTimeout( jQuery.ready );	} else {	// Use the handy event callback	document.addEventListener( "DOMContentLoaded", completed, false );	// A fallback to window.onload, that will always work	window.addEventListener( "load", completed, false );	}	}	return readyList.promise( obj );
};
// Kick off the DOM ready check even if the user does not
jQuery.ready.promise();
// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {	var i = 0,	len = elems.length,	bulk = key == null;	// Sets many values	if ( jQuery.type( key ) === "object" ) {	chainable = true;	for ( i in key ) {	jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );	}	// Sets one value	} else if ( value !== undefined ) {	chainable = true;	if ( !jQuery.isFunction( value ) ) {	raw = true;	}	if ( bulk ) {	// Bulk operations run against the entire set	if ( raw ) {	fn.call( elems, value );	fn = null;	// ...except when executing function values	} else {	bulk = fn;	fn = function( elem, key, value ) {	return bulk.call( jQuery( elem ), value );	};	}	}	if ( fn ) {	for ( ; i < len; i++ ) {	fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );	}	}	}	return chainable ?	elems :	// Gets	bulk ?	fn.call( elems ) :	len ? fn( elems[0], key ) : emptyGet;
};
/** * Determines whether an object can have data */
jQuery.acceptData = function( owner ) {	// Accepts only:	// - Node	// - Node.ELEMENT_NODE	// - Node.DOCUMENT_NODE	// - Object	// - Any	/* jshint -W018 */	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};
function Data() {	// Support: Android < 4,	// Old WebKit does not have Object.preventExtensions/freeze method,	// return new empty object instead with no [[set]] accessor	Object.defineProperty( this.cache = {}, 0, {	get: function() {	return {};	}	});	this.expando = jQuery.expando + Math.random();
}
Data.uid = 1;
Data.accepts = jQuery.acceptData;
Data.prototype = {	key: function( owner ) {	// We can accept data for non-element nodes in modern browsers,	// but we should not, see #8335.	// Always return the key for a frozen object.	if ( !Data.accepts( owner ) ) {	return 0;	}	var descriptor = {},	// Check if the owner object already has a cache key	unlock = owner[ this.expando ];	// If not, create one	if ( !unlock ) {	unlock = Data.uid++;	// Secure it in a non-enumerable, non-writable property	try {	descriptor[ this.expando ] = { value: unlock };	Object.defineProperties( owner, descriptor );	// Support: Android < 4	// Fallback to a less secure definition	} catch ( e ) {	descriptor[ this.expando ] = unlock;	jQuery.extend( owner, descriptor );	}	}	// Ensure the cache object	if ( !this.cache[ unlock ] ) {	this.cache[ unlock ] = {};	}	return unlock;	},	set: function( owner, data, value ) {	var prop,	// There may be an unlock assigned to this node,	// if there is no entry for this "owner", create one inline	// and set the unlock as though an owner entry had always existed	unlock = this.key( owner ),	cache = this.cache[ unlock ];	// Handle: [ owner, key, value ] args	if ( typeof data === "string" ) {	cache[ data ] = value;	// Handle: [ owner, { properties } ] args	} else {	// Fresh assignments by object are shallow copied	if ( jQuery.isEmptyObject( cache ) ) {	jQuery.extend( this.cache[ unlock ], data );	// Otherwise, copy the properties one-by-one to the cache object	} else {	for ( prop in data ) {	cache[ prop ] = data[ prop ];	}	}	}	return cache;	},	get: function( owner, key ) {	// Either a valid cache is found, or will be created.	// New caches will be created and the unlock returned,	// allowing direct access to the newly created	// empty data object. A valid owner object must be provided.	var cache = this.cache[ this.key( owner ) ];	return key === undefined ?	cache : cache[ key ];	},	access: function( owner, key, value ) {	var stored;	// In cases where either:	//	// 1. No key was specified	// 2. A string key was specified, but no value provided	//	// Take the "read" path and allow the get method to determine	// which value to return, respectively either:	//	// 1. The entire cache object	// 2. The data stored at the key	//	if ( key === undefined ||	((key && typeof key === "string") && value === undefined) ) {	stored = this.get( owner, key );	return stored !== undefined ?	stored : this.get( owner, jQuery.camelCase(key) );	}	// [*]When the key is not a string, or both a key and value	// are specified, set or extend (existing objects) with either:	//	// 1. An object of properties	// 2. A key and value	//	this.set( owner, key, value );	// Since the "set" path can have two possible entry points	// return the expected data based on which path was taken[*]	return value !== undefined ? value : key;	},	remove: function( owner, key ) {	var i, name, camel,	unlock = this.key( owner ),	cache = this.cache[ unlock ];	if ( key === undefined ) {	this.cache[ unlock ] = {};	} else {	// Support array or space separated string of keys	if ( jQuery.isArray( key ) ) {	// If "name" is an array of keys...	// When data is initially created, via ("key", "val") signature,	// keys will be converted to camelCase.	// Since there is no way to tell _how_ a key was added, remove	// both plain key and camelCase key. #12786	// This will only penalize the array argument path.	name = key.concat( key.map( jQuery.camelCase ) );	} else {	camel = jQuery.camelCase( key );	// Try the string as a key before any manipulation	if ( key in cache ) {	name = [ key, camel ];	} else {	// If a key with the spaces exists, use it.	// Otherwise, create an array by matching non-whitespace	name = camel;	name = name in cache ?	[ name ] : ( name.match( rnotwhite ) || [] );	}	}	i = name.length;	while ( i-- ) {	delete cache[ name[ i ] ];	}	}	},	hasData: function( owner ) {	return !jQuery.isEmptyObject(	this.cache[ owner[ this.expando ] ] || {}	);	},	discard: function( owner ) {	if ( owner[ this.expando ] ) {	delete this.cache[ owner[ this.expando ] ];	}	}
};
var data_priv = new Data();
var data_user = new Data();
/*	Implementation Summary	1. Enforce API surface and semantic compatibility with 1.9.x branch	2. Improve the module's maintainability by reducing the storage	paths to a single mechanism.	3. Use the same single mechanism to support "private" and "user" data.	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)	5. Avoid exposing implementation details on user objects (eg. expando properties)	6. Provide a clear path for implementation upgrade to WeakMap in 2014
*/
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,	rmultiDash = /([A-Z])/g;
function dataAttr( elem, key, data ) {	var name;	// If nothing was found internally, try to fetch any	// data from the HTML5 data-* attribute	if ( data === undefined && elem.nodeType === 1 ) {	name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();	data = elem.getAttribute( name );	if ( typeof data === "string" ) {	try {	data = data === "true" ? true :	data === "false" ? false :	data === "null" ? null :	// Only convert to a number if it doesn't change the string	+data + "" === data ? +data :	rbrace.test( data ) ? jQuery.parseJSON( data ) :	data;	} catch( e ) {}	// Make sure we set the data so it isn't changed later	data_user.set( elem, key, data );	} else {	data = undefined;	}	}	return data;
}
jQuery.extend({	hasData: function( elem ) {	return data_user.hasData( elem ) || data_priv.hasData( elem );	},	data: function( elem, name, data ) {	return data_user.access( elem, name, data );	},	removeData: function( elem, name ) {	data_user.remove( elem, name );	},	// TODO: Now that all calls to _data and _removeData have been replaced	// with direct calls to data_priv methods, these can be deprecated.	_data: function( elem, name, data ) {	return data_priv.access( elem, name, data );	},	_removeData: function( elem, name ) {	data_priv.remove( elem, name );	}
});
jQuery.fn.extend({	data: function( key, value ) {	var i, name, data,	elem = this[ 0 ],	attrs = elem && elem.attributes;	// Gets all values	if ( key === undefined ) {	if ( this.length ) {	data = data_user.get( elem );	if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {	i = attrs.length;	while ( i-- ) {	name = attrs[ i ].name;	if ( name.indexOf( "data-" ) === 0 ) {	name = jQuery.camelCase( name.slice(5) );	dataAttr( elem, name, data[ name ] );	}	}	data_priv.set( elem, "hasDataAttrs", true );	}	}	return data;	}	// Sets multiple values	if ( typeof key === "object" ) {	return this.each(function() {	data_user.set( this, key );	});	}	return access( this, function( value ) {	var data,	camelKey = jQuery.camelCase( key );	// The calling jQuery object (element matches) is not empty	// (and therefore has an element appears at this[ 0 ]) and the	// `value` parameter was not undefined. An empty jQuery object	// will result in `undefined` for elem = this[ 0 ] which will	// throw an exception if an attempt to read a data cache is made.	if ( elem && value === undefined ) {	// Attempt to get data from the cache	// with the key as-is	data = data_user.get( elem, key );	if ( data !== undefined ) {	return data;	}	// Attempt to get data from the cache	// with the key camelized	data = data_user.get( elem, camelKey );	if ( data !== undefined ) {	return data;	}	// Attempt to "discover" the data in	// HTML5 custom data-* attrs	data = dataAttr( elem, camelKey, undefined );	if ( data !== undefined ) {	return data;	}	// We tried really hard, but the data doesn't exist.	return;	}	// Set the data...	this.each(function() {	// First, attempt to store a copy or reference of any	// data that might've been store with a camelCased key.	var data = data_user.get( this, camelKey );	// For HTML5 data-* attribute interop, we have to	// store property names with dashes in a camelCase form.	// This might not apply to all properties...*	data_user.set( this, camelKey, value );	// *... In the case of properties that might _actually_	// have dashes, we need to also store a copy of that	// unchanged property.	if ( key.indexOf("-") !== -1 && data !== undefined ) {	data_user.set( this, key, value );	}	});	}, null, value, arguments.length > 1, null, true );	},	removeData: function( key ) {	return this.each(function() {	data_user.remove( this, key );	});	}
});
jQuery.extend({	queue: function( elem, type, data ) {	var queue;	if ( elem ) {	type = ( type || "fx" ) + "queue";	queue = data_priv.get( elem, type );	// Speed up dequeue by getting out quickly if this is just a lookup	if ( data ) {	if ( !queue || jQuery.isArray( data ) ) {	queue = data_priv.access( elem, type, jQuery.makeArray(data) );	} else {	queue.push( data );	}	}	return queue || [];	}	},	dequeue: function( elem, type ) {	type = type || "fx";	var queue = jQuery.queue( elem, type ),	startLength = queue.length,	fn = queue.shift(),	hooks = jQuery._queueHooks( elem, type ),	next = function() {	jQuery.dequeue( elem, type );	};	// If the fx queue is dequeued, always remove the progress sentinel	if ( fn === "inprogress" ) {	fn = queue.shift();	startLength--;	}	if ( fn ) {	// Add a progress sentinel to prevent the fx queue from being	// automatically dequeued	if ( type === "fx" ) {	queue.unshift( "inprogress" );	}	// clear up the last queue stop function	delete hooks.stop;	fn.call( elem, next, hooks );	}	if ( !startLength && hooks ) {	hooks.empty.fire();	}	},	// not intended for public consumption - generates a queueHooks object, or returns the current one	_queueHooks: function( elem, type ) {	var key = type + "queueHooks";	return data_priv.get( elem, key ) || data_priv.access( elem, key, {	empty: jQuery.Callbacks("once memory").add(function() {	data_priv.remove( elem, [ type + "queue", key ] );	})	});	}
});
jQuery.fn.extend({	queue: function( type, data ) {	var setter = 2;	if ( typeof type !== "string" ) {	data = type;	type = "fx";	setter--;	}	if ( arguments.length < setter ) {	return jQuery.queue( this[0], type );	}	return data === undefined ?	this :	this.each(function() {	var queue = jQuery.queue( this, type, data );	// ensure a hooks for this queue	jQuery._queueHooks( this, type );	if ( type === "fx" && queue[0] !== "inprogress" ) {	jQuery.dequeue( this, type );	}	});	},	dequeue: function( type ) {	return this.each(function() {	jQuery.dequeue( this, type );	});	},	clearQueue: function( type ) {	return this.queue( type || "fx", [] );	},	// Get a promise resolved when queues of a certain type	// are emptied (fx is the type by default)	promise: function( type, obj ) {	var tmp,	count = 1,	defer = jQuery.Deferred(),	elements = this,	i = this.length,	resolve = function() {	if ( !( --count ) ) {	defer.resolveWith( elements, [ elements ] );	}	};	if ( typeof type !== "string" ) {	obj = type;	type = undefined;	}	type = type || "fx";	while ( i-- ) {	tmp = data_priv.get( elements[ i ], type + "queueHooks" );	if ( tmp && tmp.empty ) {	count++;	tmp.empty.add( resolve );	}	}	resolve();	return defer.promise( obj );	}
});
var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
var isHidden = function( elem, el ) {	// isHidden might be called from jQuery#filter function;	// in that case, element will be second argument	elem = el || elem;	return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );	};
var rcheckableType = (/^(?:checkbox|radio)$/i);
(function() {	var fragment = document.createDocumentFragment(),	div = fragment.appendChild( document.createElement( "div" ) );	// #11217 - WebKit loses check when the name is after the checked attribute	div.innerHTML = "<input type='radio' checked='checked' name='t'/>";	// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3	// old WebKit doesn't clone checked state correctly in fragments	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;	// Make sure textarea (and checkbox) defaultValue is properly cloned	// Support: IE9-IE11+	div.innerHTML = "<textarea>x</textarea>";	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
})();
var strundefined = typeof undefined;
support.focusinBubbles = "onfocusin" in window;
var	rkeyEvent = /^key/,	rmouseEvent = /^(?:mouse|contextmenu)|click/,	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
function returnTrue() {	return true;
}
function returnFalse() {	return false;
}
function safeActiveElement() {	try {	return document.activeElement;	} catch ( err ) { }
}
/* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */
jQuery.event = {	global: {},	add: function( elem, types, handler, data, selector ) {	var handleObjIn, eventHandle, tmp,	events, t, handleObj,	special, handlers, type, namespaces, origType,	elemData = data_priv.get( elem );	// Don't attach events to noData or text/comment nodes (but allow plain objects)	if ( !elemData ) {	return;	}	// Caller can pass in an object of custom data in lieu of the handler	if ( handler.handler ) {	handleObjIn = handler;	handler = handleObjIn.handler;	selector = handleObjIn.selector;	}	// Make sure that the handler has a unique ID, used to find/remove it later	if ( !handler.guid ) {	handler.guid = jQuery.guid++;	}	// Init the element's event structure and main handler, if this is the first	if ( !(events = elemData.events) ) {	events = elemData.events = {};	}	if ( !(eventHandle = elemData.handle) ) {	eventHandle = elemData.handle = function( e ) {	// Discard the second event of a jQuery.event.trigger() and	// when an event is called after a page has unloaded	return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?	jQuery.event.dispatch.apply( elem, arguments ) : undefined;	};	}	// Handle multiple events separated by a space	types = ( types || "" ).match( rnotwhite ) || [ "" ];	t = types.length;	while ( t-- ) {	tmp = rtypenamespace.exec( types[t] ) || [];	type = origType = tmp[1];	namespaces = ( tmp[2] || "" ).split( "." ).sort();	// There *must* be a type, no attaching namespace-only handlers	if ( !type ) {	continue;	}	// If event changes its type, use the special event handlers for the changed type	special = jQuery.event.special[ type ] || {};	// If selector defined, determine special event api type, otherwise given type	type = ( selector ? special.delegateType : special.bindType ) || type;	// Update special based on newly reset type	special = jQuery.event.special[ type ] || {};	// handleObj is passed to all event handlers	handleObj = jQuery.extend({	type: type,	origType: origType,	data: data,	handler: handler,	guid: handler.guid,	selector: selector,	needsContext: selector && jQuery.expr.match.needsContext.test( selector ),	namespace: namespaces.join(".")	}, handleObjIn );	// Init the event handler queue if we're the first	if ( !(handlers = events[ type ]) ) {	handlers = events[ type ] = [];	handlers.delegateCount = 0;	// Only use addEventListener if the special events handler returns false	if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {	if ( elem.addEventListener ) {	elem.addEventListener( type, eventHandle, false );	}	}	}	if ( special.add ) {	special.add.call( elem, handleObj );	if ( !handleObj.handler.guid ) {	handleObj.handler.guid = handler.guid;	}	}	// Add to the element's handler list, delegates in front	if ( selector ) {	handlers.splice( handlers.delegateCount++, 0, handleObj );	} else {	handlers.push( handleObj );	}	// Keep track of which events have ever been used, for event optimization	jQuery.event.global[ type ] = true;	}	},	// Detach an event or set of events from an element	remove: function( elem, types, handler, selector, mappedTypes ) {	var j, origCount, tmp,	events, t, handleObj,	special, handlers, type, namespaces, origType,	elemData = data_priv.hasData( elem ) && data_priv.get( elem );	if ( !elemData || !(events = elemData.events) ) {	return;	}	// Once for each type.namespace in types; type may be omitted	types = ( types || "" ).match( rnotwhite ) || [ "" ];	t = types.length;	while ( t-- ) {	tmp = rtypenamespace.exec( types[t] ) || [];	type = origType = tmp[1];	namespaces = ( tmp[2] || "" ).split( "." ).sort();	// Unbind all events (on this namespace, if provided) for the element	if ( !type ) {	for ( type in events ) {	jQuery.event.remove( elem, type + types[ t ], handler, selector, true );	}	continue;	}	special = jQuery.event.special[ type ] || {};	type = ( selector ? special.delegateType : special.bindType ) || type;	handlers = events[ type ] || [];	tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );	// Remove matching events	origCount = j = handlers.length;	while ( j-- ) {	handleObj = handlers[ j ];	if ( ( mappedTypes || origType === handleObj.origType ) &&	( !handler || handler.guid === handleObj.guid ) &&	( !tmp || tmp.test( handleObj.namespace ) ) &&	( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {	handlers.splice( j, 1 );	if ( handleObj.selector ) {	handlers.delegateCount--;	}	if ( special.remove ) {	special.remove.call( elem, handleObj );	}	}	}	// Remove generic event handler if we removed something and no more handlers exist	// (avoids potential for endless recursion during removal of special event handlers)	if ( origCount && !handlers.length ) {	if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {	jQuery.removeEvent( elem, type, elemData.handle );	}	delete events[ type ];	}	}	// Remove the expando if it's no longer used	if ( jQuery.isEmptyObject( events ) ) {	delete elemData.handle;	data_priv.remove( elem, "events" );	}	},	trigger: function( event, data, elem, onlyHandlers ) {	var i, cur, tmp, bubbleType, ontype, handle, special,	eventPath = [ elem || document ],	type = hasOwn.call( event, "type" ) ? event.type : event,	namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];	cur = tmp = elem = elem || document;	// Don't do events on text and comment nodes	if ( elem.nodeType === 3 || elem.nodeType === 8 ) {	return;	}	// focus/blur morphs to focusin/out; ensure we're not firing them right now	if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {	return;	}	if ( type.indexOf(".") >= 0 ) {	// Namespaced trigger; create a regexp to match event type in handle()	namespaces = type.split(".");	type = namespaces.shift();	namespaces.sort();	}	ontype = type.indexOf(":") < 0 && "on" + type;	// Caller can pass in a jQuery.Event object, Object, or just an event type string	event = event[ jQuery.expando ] ?	event :	new jQuery.Event( type, typeof event === "object" && event );	// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)	event.isTrigger = onlyHandlers ? 2 : 3;	event.namespace = namespaces.join(".");	event.namespace_re = event.namespace ?	new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :	null;	// Clean up the event in case it is being reused	event.result = undefined;	if ( !event.target ) {	event.target = elem;	}	// Clone any incoming data and prepend the event, creating the handler arg list	data = data == null ?	[ event ] :	jQuery.makeArray( data, [ event ] );	// Allow special events to draw outside the lines	special = jQuery.event.special[ type ] || {};	if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {	return;	}	// Determine event propagation path in advance, per W3C events spec (#9951)	// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)	if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {	bubbleType = special.delegateType || type;	if ( !rfocusMorph.test( bubbleType + type ) ) {	cur = cur.parentNode;	}	for ( ; cur; cur = cur.parentNode ) {	eventPath.push( cur );	tmp = cur;	}	// Only add window if we got to document (e.g., not plain obj or detached DOM)	if ( tmp === (elem.ownerDocument || document) ) {	eventPath.push( tmp.defaultView || tmp.parentWindow || window );	}	}	// Fire handlers on the event path	i = 0;	while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {	event.type = i > 1 ?	bubbleType :	special.bindType || type;	// jQuery handler	handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );	if ( handle ) {	handle.apply( cur, data );	}	// Native handler	handle = ontype && cur[ ontype ];	if ( handle && handle.apply && jQuery.acceptData( cur ) ) {	event.result = handle.apply( cur, data );	if ( event.result === false ) {	event.preventDefault();	}	}	}	event.type = type;	// If nobody prevented the default action, do it now	if ( !onlyHandlers && !event.isDefaultPrevented() ) {	if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&	jQuery.acceptData( elem ) ) {	// Call a native DOM method on the target with the same name name as the event.	// Don't do default actions on window, that's where global variables be (#6170)	if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {	// Don't re-trigger an onFOO event when we call its FOO() method	tmp = elem[ ontype ];	if ( tmp ) {	elem[ ontype ] = null;	}	// Prevent re-triggering of the same event, since we already bubbled it above	jQuery.event.triggered = type;	elem[ type ]();	jQuery.event.triggered = undefined;	if ( tmp ) {	elem[ ontype ] = tmp;	}	}	}	}	return event.result;	},	dispatch: function( event ) {	// Make a writable jQuery.Event from the native event object	event = jQuery.event.fix( event );	var i, j, ret, matched, handleObj,	handlerQueue = [],	args = slice.call( arguments ),	handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],	special = jQuery.event.special[ event.type ] || {};	// Use the fix-ed jQuery.Event rather than the (read-only) native event	args[0] = event;	event.delegateTarget = this;	// Call the preDispatch hook for the mapped type, and let it bail if desired	if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {	return;	}	// Determine handlers	handlerQueue = jQuery.event.handlers.call( this, event, handlers );	// Run delegates first; they may want to stop propagation beneath us	i = 0;	while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {	event.currentTarget = matched.elem;	j = 0;	while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {	// Triggered event must either 1) have no namespace, or	// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).	if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {	event.handleObj = handleObj;	event.data = handleObj.data;	ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )	.apply( matched.elem, args );	if ( ret !== undefined ) {	if ( (event.result = ret) === false ) {	event.preventDefault();	event.stopPropagation();	}	}	}	}	}	// Call the postDispatch hook for the mapped type	if ( special.postDispatch ) {	special.postDispatch.call( this, event );	}	return event.result;	},	handlers: function( event, handlers ) {	var i, matches, sel, handleObj,	handlerQueue = [],	delegateCount = handlers.delegateCount,	cur = event.target;	// Find delegate handlers	// Black-hole SVG <use> instance trees (#13180)	// Avoid non-left-click bubbling in Firefox (#3861)	if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {	for ( ; cur !== this; cur = cur.parentNode || this ) {	// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)	if ( cur.disabled !== true || event.type !== "click" ) {	matches = [];	for ( i = 0; i < delegateCount; i++ ) {	handleObj = handlers[ i ];	// Don't conflict with Object.prototype properties (#13203)	sel = handleObj.selector + " ";	if ( matches[ sel ] === undefined ) {	matches[ sel ] = handleObj.needsContext ?	jQuery( sel, this ).index( cur ) >= 0 :	jQuery.find( sel, this, null, [ cur ] ).length;	}	if ( matches[ sel ] ) {	matches.push( handleObj );	}	}	if ( matches.length ) {	handlerQueue.push({ elem: cur, handlers: matches });	}	}	}	}	// Add the remaining (directly-bound) handlers	if ( delegateCount < handlers.length ) {	handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });	}	return handlerQueue;	},	// Includes some event props shared by KeyEvent and MouseEvent	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),	fixHooks: {},	keyHooks: {	props: "char charCode key keyCode".split(" "),	filter: function( event, original ) {	// Add which for key events	if ( event.which == null ) {	event.which = original.charCode != null ? original.charCode : original.keyCode;	}	return event;	}	},	mouseHooks: {	props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),	filter: function( event, original ) {	var eventDoc, doc, body,	button = original.button;	// Calculate pageX/Y if missing and clientX/Y available	if ( event.pageX == null && original.clientX != null ) {	eventDoc = event.target.ownerDocument || document;	doc = eventDoc.documentElement;	body = eventDoc.body;	event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );	event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );	}	// Add which for click: 1 === left; 2 === middle; 3 === right	// Note: button is not normalized, so don't use it	if ( !event.which && button !== undefined ) {	event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );	}	return event;	}	},	fix: function( event ) {	if ( event[ jQuery.expando ] ) {	return event;	}	// Create a writable copy of the event object and normalize some properties	var i, prop, copy,	type = event.type,	originalEvent = event,	fixHook = this.fixHooks[ type ];	if ( !fixHook ) {	this.fixHooks[ type ] = fixHook =	rmouseEvent.test( type ) ? this.mouseHooks :	rkeyEvent.test( type ) ? this.keyHooks :	{};	}	copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;	event = new jQuery.Event( originalEvent );	i = copy.length;	while ( i-- ) {	prop = copy[ i ];	event[ prop ] = originalEvent[ prop ];	}	// Support: Cordova 2.5 (WebKit) (#13255)	// All events should have a target; Cordova deviceready doesn't	if ( !event.target ) {	event.target = document;	}	// Support: Safari 6.0+, Chrome < 28	// Target should not be a text node (#504, #13143)	if ( event.target.nodeType === 3 ) {	event.target = event.target.parentNode;	}	return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;	},	special: {	load: {	// Prevent triggered image.load events from bubbling to window.load	noBubble: true	},	focus: {	// Fire native event if possible so blur/focus sequence is correct	trigger: function() {	if ( this !== safeActiveElement() && this.focus ) {	this.focus();	return false;	}	},	delegateType: "focusin"	},	blur: {	trigger: function() {	if ( this === safeActiveElement() && this.blur ) {	this.blur();	return false;	}	},	delegateType: "focusout"	},	click: {	// For checkbox, fire native event so checked state will be right	trigger: function() {	if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {	this.click();	return false;	}	},	// For cross-browser consistency, don't fire native .click() on links	_default: function( event ) {	return jQuery.nodeName( event.target, "a" );	}	},	beforeunload: {	postDispatch: function( event ) {	// Support: Firefox 20+	// Firefox doesn't alert if the returnValue field is not set.	if ( event.result !== undefined ) {	event.originalEvent.returnValue = event.result;	}	}	}	},	simulate: function( type, elem, event, bubble ) {	// Piggyback on a donor event to simulate a different one.	// Fake originalEvent to avoid donor's stopPropagation, but if the	// simulated event prevents default then we do the same on the donor.	var e = jQuery.extend(	new jQuery.Event(),	event,	{	type: type,	isSimulated: true,	originalEvent: {}	}	);	if ( bubble ) {	jQuery.event.trigger( e, null, elem );	} else {	jQuery.event.dispatch.call( elem, e );	}	if ( e.isDefaultPrevented() ) {	event.preventDefault();	}	}
};
jQuery.removeEvent = function( elem, type, handle ) {	if ( elem.removeEventListener ) {	elem.removeEventListener( type, handle, false );	}
};
jQuery.Event = function( src, props ) {	// Allow instantiation without the 'new' keyword	if ( !(this instanceof jQuery.Event) ) {	return new jQuery.Event( src, props );	}	// Event object	if ( src && src.type ) {	this.originalEvent = src;	this.type = src.type;	// Events bubbling up the document may have been marked as prevented	// by a handler lower down the tree; reflect the correct value.	this.isDefaultPrevented = src.defaultPrevented ||	// Support: Android < 4.0	src.defaultPrevented === undefined &&	src.getPreventDefault && src.getPreventDefault() ?	returnTrue :	returnFalse;	// Event type	} else {	this.type = src;	}	// Put explicitly provided properties onto the event object	if ( props ) {	jQuery.extend( this, props );	}	// Create a timestamp if incoming event doesn't have one	this.timeStamp = src && src.timeStamp || jQuery.now();	// Mark it as fixed	this[ jQuery.expando ] = true;
};
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {	isDefaultPrevented: returnFalse,	isPropagationStopped: returnFalse,	isImmediatePropagationStopped: returnFalse,	preventDefault: function() {	var e = this.originalEvent;	this.isDefaultPrevented = returnTrue;	if ( e && e.preventDefault ) {	e.preventDefault();	}	},	stopPropagation: function() {	var e = this.originalEvent;	this.isPropagationStopped = returnTrue;	if ( e && e.stopPropagation ) {	e.stopPropagation();	}	},	stopImmediatePropagation: function() {	this.isImmediatePropagationStopped = returnTrue;	this.stopPropagation();	}
};
// Create mouseenter/leave events using mouseover/out and event-time checks
// Support: Chrome 15+
jQuery.each({	mouseenter: "mouseover",	mouseleave: "mouseout"
}, function( orig, fix ) {	jQuery.event.special[ orig ] = {	delegateType: fix,	bindType: fix,	handle: function( event ) {	var ret,	target = this,	related = event.relatedTarget,	handleObj = event.handleObj;	// For mousenter/leave call the handler if related is outside the target.	// NB: No relatedTarget if the mouse left/entered the browser window	if ( !related || (related !== target && !jQuery.contains( target, related )) ) {	event.type = handleObj.origType;	ret = handleObj.handler.apply( this, arguments );	event.type = fix;	}	return ret;	}	};
});
// Create "bubbling" focus and blur events
// Support: Firefox, Chrome, Safari
if ( !support.focusinBubbles ) {	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {	// Attach a single capturing handler on the document while someone wants focusin/focusout	var handler = function( event ) {	jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );	};	jQuery.event.special[ fix ] = {	setup: function() {	var doc = this.ownerDocument || this,	attaches = data_priv.access( doc, fix );	if ( !attaches ) {	doc.addEventListener( orig, handler, true );	}	data_priv.access( doc, fix, ( attaches || 0 ) + 1 );	},	teardown: function() {	var doc = this.ownerDocument || this,	attaches = data_priv.access( doc, fix ) - 1;	if ( !attaches ) {	doc.removeEventListener( orig, handler, true );	data_priv.remove( doc, fix );	} else {	data_priv.access( doc, fix, attaches );	}	}	};	});
}
jQuery.fn.extend({	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {	var origFn, type;	// Types can be a map of types/handlers	if ( typeof types === "object" ) {	// ( types-Object, selector, data )	if ( typeof selector !== "string" ) {	// ( types-Object, data )	data = data || selector;	selector = undefined;	}	for ( type in types ) {	this.on( type, selector, data, types[ type ], one );	}	return this;	}	if ( data == null && fn == null ) {	// ( types, fn )	fn = selector;	data = selector = undefined;	} else if ( fn == null ) {	if ( typeof selector === "string" ) {	// ( types, selector, fn )	fn = data;	data = undefined;	} else {	// ( types, data, fn )	fn = data;	data = selector;	selector = undefined;	}	}	if ( fn === false ) {	fn = returnFalse;	} else if ( !fn ) {	return this;	}	if ( one === 1 ) {	origFn = fn;	fn = function( event ) {	// Can use an empty set, since event contains the info	jQuery().off( event );	return origFn.apply( this, arguments );	};	// Use same guid so caller can remove using origFn	fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );	}	return this.each( function() {	jQuery.event.add( this, types, fn, data, selector );	});	},	one: function( types, selector, data, fn ) {	return this.on( types, selector, data, fn, 1 );	},	off: function( types, selector, fn ) {	var handleObj, type;	if ( types && types.preventDefault && types.handleObj ) {	// ( event ) dispatched jQuery.Event	handleObj = types.handleObj;	jQuery( types.delegateTarget ).off(	handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,	handleObj.selector,	handleObj.handler	);	return this;	}	if ( typeof types === "object" ) {	// ( types-object [, selector] )	for ( type in types ) {	this.off( type, selector, types[ type ] );	}	return this;	}	if ( selector === false || typeof selector === "function" ) {	// ( types [, fn] )	fn = selector;	selector = undefined;	}	if ( fn === false ) {	fn = returnFalse;	}	return this.each(function() {	jQuery.event.remove( this, types, fn, selector );	});	},	trigger: function( type, data ) {	return this.each(function() {	jQuery.event.trigger( type, data, this );	});	},	triggerHandler: function( type, data ) {	var elem = this[0];	if ( elem ) {	return jQuery.event.trigger( type, data, elem, true );	}	}
});
var	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,	rtagName = /<([\w:]+)/,	rhtml = /<|&#?\w+;/,	rnoInnerhtml = /<(?:script|style|link)/i,	// checked="checked" or checked	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,	rscriptType = /^$|\/(?:java|ecma)script/i,	rscriptTypeMasked = /^true\/(.*)/,	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,	// We have to close these tags to support XHTML (#13200)	wrapMap = {	// Support: IE 9	option: [ 1, "<select multiple='multiple'>", "</select>" ],	thead: [ 1, "<table>", "</table>" ],	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],	tr: [ 2, "<table><tbody>", "</tbody></table>" ],	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],	_default: [ 0, "", "" ]	};
// Support: IE 9
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
// Support: 1.x compatibility
// Manipulating tables requires a tbody
function manipulationTarget( elem, content ) {	return jQuery.nodeName( elem, "table" ) &&	jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?	elem.getElementsByTagName("tbody")[0] ||	elem.appendChild( elem.ownerDocument.createElement("tbody") ) :	elem;
}
// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {	elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;	return elem;
}
function restoreScript( elem ) {	var match = rscriptTypeMasked.exec( elem.type );	if ( match ) {	elem.type = match[ 1 ];	} else {	elem.removeAttribute("type");	}	return elem;
}
// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {	var i = 0,	l = elems.length;	for ( ; i < l; i++ ) {	data_priv.set(	elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )	);	}
}
function cloneCopyEvent( src, dest ) {	var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;	if ( dest.nodeType !== 1 ) {	return;	}	// 1. Copy private data: events, handlers, etc.	if ( data_priv.hasData( src ) ) {	pdataOld = data_priv.access( src );	pdataCur = data_priv.set( dest, pdataOld );	events = pdataOld.events;	if ( events ) {	delete pdataCur.handle;	pdataCur.events = {};	for ( type in events ) {	for ( i = 0, l = events[ type ].length; i < l; i++ ) {	jQuery.event.add( dest, type, events[ type ][ i ] );	}	}	}	}	// 2. Copy user data	if ( data_user.hasData( src ) ) {	udataOld = data_user.access( src );	udataCur = jQuery.extend( {}, udataOld );	data_user.set( dest, udataCur );	}
}
function getAll( context, tag ) {	var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :	context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :	[];	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?	jQuery.merge( [ context ], ret ) :	ret;
}
// Support: IE >= 9
function fixInput( src, dest ) {	var nodeName = dest.nodeName.toLowerCase();	// Fails to persist the checked state of a cloned checkbox or radio button.	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {	dest.checked = src.checked;	// Fails to return the selected option to the default selected state when cloning options	} else if ( nodeName === "input" || nodeName === "textarea" ) {	dest.defaultValue = src.defaultValue;	}
}
jQuery.extend({	clone: function( elem, dataAndEvents, deepDataAndEvents ) {	var i, l, srcElements, destElements,	clone = elem.cloneNode( true ),	inPage = jQuery.contains( elem.ownerDocument, elem );	// Support: IE >= 9	// Fix Cloning issues	if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&	!jQuery.isXMLDoc( elem ) ) {	// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2	destElements = getAll( clone );	srcElements = getAll( elem );	for ( i = 0, l = srcElements.length; i < l; i++ ) {	fixInput( srcElements[ i ], destElements[ i ] );	}	}	// Copy the events from the original to the clone	if ( dataAndEvents ) {	if ( deepDataAndEvents ) {	srcElements = srcElements || getAll( elem );	destElements = destElements || getAll( clone );	for ( i = 0, l = srcElements.length; i < l; i++ ) {	cloneCopyEvent( srcElements[ i ], destElements[ i ] );	}	} else {	cloneCopyEvent( elem, clone );	}	}	// Preserve script evaluation history	destElements = getAll( clone, "script" );	if ( destElements.length > 0 ) {	setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );	}	// Return the cloned set	return clone;	},	buildFragment: function( elems, context, scripts, selection ) {	var elem, tmp, tag, wrap, contains, j,	fragment = context.createDocumentFragment(),	nodes = [],	i = 0,	l = elems.length;	for ( ; i < l; i++ ) {	elem = elems[ i ];	if ( elem || elem === 0 ) {	// Add nodes directly	if ( jQuery.type( elem ) === "object" ) {	// Support: QtWebKit	// jQuery.merge because push.apply(_, arraylike) throws	jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );	// Convert non-html into a text node	} else if ( !rhtml.test( elem ) ) {	nodes.push( context.createTextNode( elem ) );	// Convert html into DOM nodes	} else {	tmp = tmp || fragment.appendChild( context.createElement("div") );	// Deserialize a standard representation	tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();	wrap = wrapMap[ tag ] || wrapMap._default;	tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];	// Descend through wrappers to the right content	j = wrap[ 0 ];	while ( j-- ) {	tmp = tmp.lastChild;	}	// Support: QtWebKit	// jQuery.merge because push.apply(_, arraylike) throws	jQuery.merge( nodes, tmp.childNodes );	// Remember the top-level container	tmp = fragment.firstChild;	// Fixes #12346	// Support: Webkit, IE	tmp.textContent = "";	}	}	}	// Remove wrapper from fragment	fragment.textContent = "";	i = 0;	while ( (elem = nodes[ i++ ]) ) {	// #4087 - If origin and destination elements are the same, and this is	// that element, do not do anything	if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {	continue;	}	contains = jQuery.contains( elem.ownerDocument, elem );	// Append to fragment	tmp = getAll( fragment.appendChild( elem ), "script" );	// Preserve script evaluation history	if ( contains ) {	setGlobalEval( tmp );	}	// Capture executables	if ( scripts ) {	j = 0;	while ( (elem = tmp[ j++ ]) ) {	if ( rscriptType.test( elem.type || "" ) ) {	scripts.push( elem );	}	}	}	}	return fragment;	},	cleanData: function( elems ) {	var data, elem, events, type, key, j,	special = jQuery.event.special,	i = 0;	for ( ; (elem = elems[ i ]) !== undefined; i++ ) {	if ( jQuery.acceptData( elem ) ) {	key = elem[ data_priv.expando ];	if ( key && (data = data_priv.cache[ key ]) ) {	events = Object.keys( data.events || {} );	if ( events.length ) {	for ( j = 0; (type = events[j]) !== undefined; j++ ) {	if ( special[ type ] ) {	jQuery.event.remove( elem, type );	// This is a shortcut to avoid jQuery.event.remove's overhead	} else {	jQuery.removeEvent( elem, type, data.handle );	}	}	}	if ( data_priv.cache[ key ] ) {	// Discard any remaining `private` data	delete data_priv.cache[ key ];	}	}	}	// Discard any remaining `user` data	delete data_user.cache[ elem[ data_user.expando ] ];	}	}
});
jQuery.fn.extend({	text: function( value ) {	return access( this, function( value ) {	return value === undefined ?	jQuery.text( this ) :	this.empty().each(function() {	if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {	this.textContent = value;	}	});	}, null, value, arguments.length );	},	append: function() {	return this.domManip( arguments, function( elem ) {	if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {	var target = manipulationTarget( this, elem );	target.appendChild( elem );	}	});	},	prepend: function() {	return this.domManip( arguments, function( elem ) {	if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {	var target = manipulationTarget( this, elem );	target.insertBefore( elem, target.firstChild );	}	});	},	before: function() {	return this.domManip( arguments, function( elem ) {	if ( this.parentNode ) {	this.parentNode.insertBefore( elem, this );	}	});	},	after: function() {	return this.domManip( arguments, function( elem ) {	if ( this.parentNode ) {	this.parentNode.insertBefore( elem, this.nextSibling );	}	});	},	remove: function( selector, keepData /* Internal Use Only */ ) {	var elem,	elems = selector ? jQuery.filter( selector, this ) : this,	i = 0;	for ( ; (elem = elems[i]) != null; i++ ) {	if ( !keepData && elem.nodeType === 1 ) {	jQuery.cleanData( getAll( elem ) );	}	if ( elem.parentNode ) {	if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {	setGlobalEval( getAll( elem, "script" ) );	}	elem.parentNode.removeChild( elem );	}	}	return this;	},	empty: function() {	var elem,	i = 0;	for ( ; (elem = this[i]) != null; i++ ) {	if ( elem.nodeType === 1 ) {	// Prevent memory leaks	jQuery.cleanData( getAll( elem, false ) );	// Remove any remaining nodes	elem.textContent = "";	}	}	return this;	},	clone: function( dataAndEvents, deepDataAndEvents ) {	dataAndEvents = dataAndEvents == null ? false : dataAndEvents;	deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;	return this.map(function() {	return jQuery.clone( this, dataAndEvents, deepDataAndEvents );	});	},	html: function( value ) {	return access( this, function( value ) {	var elem = this[ 0 ] || {},	i = 0,	l = this.length;	if ( value === undefined && elem.nodeType === 1 ) {	return elem.innerHTML;	}	// See if we can take a shortcut and just use innerHTML	if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&	!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {	value = value.replace( rxhtmlTag, "<$1></$2>" );	try {	for ( ; i < l; i++ ) {	elem = this[ i ] || {};	// Remove element nodes and prevent memory leaks	if ( elem.nodeType === 1 ) {	jQuery.cleanData( getAll( elem, false ) );	elem.innerHTML = value;	}	}	elem = 0;	// If using innerHTML throws an exception, use the fallback method	} catch( e ) {}	}	if ( elem ) {	this.empty().append( value );	}	}, null, value, arguments.length );	},	replaceWith: function() {	var arg = arguments[ 0 ];	// Make the changes, replacing each context element with the new content	this.domManip( arguments, function( elem ) {	arg = this.parentNode;	jQuery.cleanData( getAll( this ) );	if ( arg ) {	arg.replaceChild( elem, this );	}	});	// Force removal if there was no new content (e.g., from empty arguments)	return arg && (arg.length || arg.nodeType) ? this : this.remove();	},	detach: function( selector ) {	return this.remove( selector, true );	},	domManip: function( args, callback ) {	// Flatten any nested arrays	args = concat.apply( [], args );	var fragment, first, scripts, hasScripts, node, doc,	i = 0,	l = this.length,	set = this,	iNoClone = l - 1,	value = args[ 0 ],	isFunction = jQuery.isFunction( value );	// We can't cloneNode fragments that contain checked, in WebKit	if ( isFunction ||	( l > 1 && typeof value === "string" &&	!support.checkClone && rchecked.test( value ) ) ) {	return this.each(function( index ) {	var self = set.eq( index );	if ( isFunction ) {	args[ 0 ] = value.call( this, index, self.html() );	}	self.domManip( args, callback );	});	}	if ( l ) {	fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );	first = fragment.firstChild;	if ( fragment.childNodes.length === 1 ) {	fragment = first;	}	if ( first ) {	scripts = jQuery.map( getAll( fragment, "script" ), disableScript );	hasScripts = scripts.length;	// Use the original fragment for the last item instead of the first because it can end up	// being emptied incorrectly in certain situations (#8070).	for ( ; i < l; i++ ) {	node = fragment;	if ( i !== iNoClone ) {	node = jQuery.clone( node, true, true );	// Keep references to cloned scripts for later restoration	if ( hasScripts ) {	// Support: QtWebKit	// jQuery.merge because push.apply(_, arraylike) throws	jQuery.merge( scripts, getAll( node, "script" ) );	}	}	callback.call( this[ i ], node, i );	}	if ( hasScripts ) {	doc = scripts[ scripts.length - 1 ].ownerDocument;	// Reenable scripts	jQuery.map( scripts, restoreScript );	// Evaluate executable scripts on first document insertion	for ( i = 0; i < hasScripts; i++ ) {	node = scripts[ i ];	if ( rscriptType.test( node.type || "" ) &&	!data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {	if ( node.src ) {	// Optional AJAX dependency, but won't run scripts if not present	if ( jQuery._evalUrl ) {	jQuery._evalUrl( node.src );	}	} else {	jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );	}	}	}	}	}	}	return this;	}
});
jQuery.each({	appendTo: "append",	prependTo: "prepend",	insertBefore: "before",	insertAfter: "after",	replaceAll: "replaceWith"
}, function( name, original ) {	jQuery.fn[ name ] = function( selector ) {	var elems,	ret = [],	insert = jQuery( selector ),	last = insert.length - 1,	i = 0;	for ( ; i <= last; i++ ) {	elems = i === last ? this : this.clone( true );	jQuery( insert[ i ] )[ original ]( elems );	// Support: QtWebKit	// .get() because push.apply(_, arraylike) throws	push.apply( ret, elems.get() );	}	return this.pushStack( ret );	};
});
var iframe,	elemdisplay = {};
/** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */
// Called only from within defaultDisplay
function actualDisplay( name, doc ) {	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),	// getDefaultComputedStyle might be reliably used only on attached element	display = window.getDefaultComputedStyle ?	// Use of this method is a temporary fix (more like optmization) until something better comes along,	// since it was removed from specification and supported only in FF	window.getDefaultComputedStyle( elem[ 0 ] ).display : jQuery.css( elem[ 0 ], "display" );	// We don't have any data stored on the element,	// so use "detach" method as fast way to get rid of the element	elem.detach();	return display;
}
/** * Try to determine the default display value of an element * @param {String} nodeName */
function defaultDisplay( nodeName ) {	var doc = document,	display = elemdisplay[ nodeName ];	if ( !display ) {	display = actualDisplay( nodeName, doc );	// If the simple way fails, read from inside an iframe	if ( display === "none" || !display ) {	// Use the already-created iframe if possible	iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );	// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse	doc = iframe[ 0 ].contentDocument;	// Support: IE	doc.write();	doc.close();	display = actualDisplay( nodeName, doc );	iframe.detach();	}	// Store the correct default display	elemdisplay[ nodeName ] = display;	}	return display;
}
var rmargin = (/^margin/);
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
var getStyles = function( elem ) {	return elem.ownerDocument.defaultView.getComputedStyle( elem, null );	};
function curCSS( elem, name, computed ) {	var width, minWidth, maxWidth, ret,	style = elem.style;	computed = computed || getStyles( elem );	// Support: IE9	// getPropertyValue is only needed for .css('filter') in IE9, see #12537	if ( computed ) {	ret = computed.getPropertyValue( name ) || computed[ name ];	}	if ( computed ) {	if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {	ret = jQuery.style( elem, name );	}	// Support: iOS < 6	// A tribute to the "awesome hack by Dean Edwards"	// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels	// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values	if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {	// Remember the original values	width = style.width;	minWidth = style.minWidth;	maxWidth = style.maxWidth;	// Put in the new values to get a computed value out	style.minWidth = style.maxWidth = style.width = ret;	ret = computed.width;	// Revert the changed values	style.width = width;	style.minWidth = minWidth;	style.maxWidth = maxWidth;	}	}	return ret !== undefined ?	// Support: IE	// IE returns zIndex value as an integer.	ret + "" :	ret;
}
function addGetHookIf( conditionFn, hookFn ) {	// Define the hook, we'll check on the first run if it's really needed.	return {	get: function() {	if ( conditionFn() ) {	// Hook not needed (or it's not possible to use it due to missing dependency),	// remove it.	// Since there are no other hooks for marginRight, remove the whole object.	delete this.get;	return;	}	// Hook needed; redefine it so that the support test is not executed again.	return (this.get = hookFn).apply( this, arguments );	}	};
}
(function() {	var pixelPositionVal, boxSizingReliableVal,	// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).	divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;" +	"-moz-box-sizing:content-box;box-sizing:content-box",	docElem = document.documentElement,	container = document.createElement( "div" ),	div = document.createElement( "div" );	div.style.backgroundClip = "content-box";	div.cloneNode( true ).style.backgroundClip = "";	support.clearCloneStyle = div.style.backgroundClip === "content-box";	container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;" +	"margin-top:1px";	container.appendChild( div );	// Executing both pixelPosition & boxSizingReliable tests require only one layout	// so they're executed at the same time to save the second computation.	function computePixelPositionAndBoxSizingReliable() {	// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).	div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +	"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;" +	"position:absolute;top:1%";	docElem.appendChild( container );	var divStyle = window.getComputedStyle( div, null );	pixelPositionVal = divStyle.top !== "1%";	boxSizingReliableVal = divStyle.width === "4px";	docElem.removeChild( container );	}	// Use window.getComputedStyle because jsdom on node.js will break without it.	if ( window.getComputedStyle ) {	jQuery.extend(support, {	pixelPosition: function() {	// This test is executed only once but we still do memoizing	// since we can use the boxSizingReliable pre-computing.	// No need to check if the test was already performed, though.	computePixelPositionAndBoxSizingReliable();	return pixelPositionVal;	},	boxSizingReliable: function() {	if ( boxSizingReliableVal == null ) {	computePixelPositionAndBoxSizingReliable();	}	return boxSizingReliableVal;	},	reliableMarginRight: function() {	// Support: Android 2.3	// Check if div with explicit width and no margin-right incorrectly	// gets computed margin-right based on width of container. (#3333)	// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right	// This support function is only executed once so no memoizing is needed.	var ret,	marginDiv = div.appendChild( document.createElement( "div" ) );	marginDiv.style.cssText = div.style.cssText = divReset;	marginDiv.style.marginRight = marginDiv.style.width = "0";	div.style.width = "1px";	docElem.appendChild( container );	ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );	docElem.removeChild( container );	// Clean up the div for other support tests.	div.innerHTML = "";	return ret;	}	});	}
})();
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {	var ret, name,	old = {};	// Remember the old values, and insert the new ones	for ( name in options ) {	old[ name ] = elem.style[ name ];	elem.style[ name ] = options[ name ];	}	ret = callback.apply( elem, args || [] );	// Revert the old values	for ( name in options ) {	elem.style[ name ] = old[ name ];	}	return ret;
};
var	// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"	// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display	rdisplayswap = /^(none|table(?!-c[ea]).+)/,	rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),	rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),	cssShow = { position: "absolute", visibility: "hidden", display: "block" },	cssNormalTransform = {	letterSpacing: 0,	fontWeight: 400	},	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
// return a css property mapped to a potentially vendor prefixed property
function vendorPropName( style, name ) {	// shortcut for names that are not vendor prefixed	if ( name in style ) {	return name;	}	// check for vendor prefixed names	var capName = name[0].toUpperCase() + name.slice(1),	origName = name,	i = cssPrefixes.length;	while ( i-- ) {	name = cssPrefixes[ i ] + capName;	if ( name in style ) {	return name;	}	}	return origName;
}
function setPositiveNumber( elem, value, subtract ) {	var matches = rnumsplit.exec( value );	return matches ?	// Guard against undefined "subtract", e.g., when used as in cssHooks	Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :	value;
}
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {	var i = extra === ( isBorderBox ? "border" : "content" ) ?	// If we already have the right measurement, avoid augmentation	4 :	// Otherwise initialize for horizontal or vertical properties	name === "width" ? 1 : 0,	val = 0;	for ( ; i < 4; i += 2 ) {	// both box models exclude margin, so add it if we want it	if ( extra === "margin" ) {	val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );	}	if ( isBorderBox ) {	// border-box includes padding, so remove it if we want content	if ( extra === "content" ) {	val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );	}	// at this point, extra isn't border nor margin, so remove border	if ( extra !== "margin" ) {	val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );	}	} else {	// at this point, extra isn't content, so add padding	val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );	// at this point, extra isn't content nor padding, so add border	if ( extra !== "padding" ) {	val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );	}	}	}	return val;
}
function getWidthOrHeight( elem, name, extra ) {	// Start with offset property, which is equivalent to the border-box value	var valueIsBorderBox = true,	val = name === "width" ? elem.offsetWidth : elem.offsetHeight,	styles = getStyles( elem ),	isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";	// some non-html elements return undefined for offsetWidth, so check for null/undefined	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668	if ( val <= 0 || val == null ) {	// Fall back to computed then uncomputed css if necessary	val = curCSS( elem, name, styles );	if ( val < 0 || val == null ) {	val = elem.style[ name ];	}	// Computed unit is not pixels. Stop here and return.	if ( rnumnonpx.test(val) ) {	return val;	}	// we need the check for style in case a browser which returns unreliable values	// for getComputedStyle silently falls back to the reliable elem.style	valueIsBorderBox = isBorderBox &&	( support.boxSizingReliable() || val === elem.style[ name ] );	// Normalize "", auto, and prepare for extra	val = parseFloat( val ) || 0;	}	// use the active box-sizing model to add/subtract irrelevant styles	return ( val +	augmentWidthOrHeight(	elem,	name,	extra || ( isBorderBox ? "border" : "content" ),	valueIsBorderBox,	styles	)	) + "px";
}
function showHide( elements, show ) {	var display, elem, hidden,	values = [],	index = 0,	length = elements.length;	for ( ; index < length; index++ ) {	elem = elements[ index ];	if ( !elem.style ) {	continue;	}	values[ index ] = data_priv.get( elem, "olddisplay" );	display = elem.style.display;	if ( show ) {	// Reset the inline display of this element to learn if it is	// being hidden by cascaded rules or not	if ( !values[ index ] && display === "none" ) {	elem.style.display = "";	}	// Set elements which have been overridden with display: none	// in a stylesheet to whatever the default browser style is	// for such an element	if ( elem.style.display === "" && isHidden( elem ) ) {	values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );	}	} else {	if ( !values[ index ] ) {	hidden = isHidden( elem );	if ( display && display !== "none" || !hidden ) {	data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css(elem, "display") );	}	}	}	}	// Set the display of most of the elements in a second loop	// to avoid the constant reflow	for ( index = 0; index < length; index++ ) {	elem = elements[ index ];	if ( !elem.style ) {	continue;	}	if ( !show || elem.style.display === "none" || elem.style.display === "" ) {	elem.style.display = show ? values[ index ] || "" : "none";	}	}	return elements;
}
jQuery.extend({	// Add in style property hooks for overriding the default	// behavior of getting and setting a style property	cssHooks: {	opacity: {	get: function( elem, computed ) {	if ( computed ) {	// We should always get a number back from opacity	var ret = curCSS( elem, "opacity" );	return ret === "" ? "1" : ret;	}	}	}	},	// Don't automatically add "px" to these possibly-unitless properties	cssNumber: {	"columnCount": true,	"fillOpacity": true,	"fontWeight": true,	"lineHeight": true,	"opacity": true,	"order": true,	"orphans": true,	"widows": true,	"zIndex": true,	"zoom": true	},	// Add in properties whose names you wish to fix before	// setting or getting the value	cssProps: {	// normalize float css property	"float": "cssFloat"	},	// Get and set the style property on a DOM Node	style: function( elem, name, value, extra ) {	// Don't set styles on text and comment nodes	if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {	return;	}	// Make sure that we're working with the right name	var ret, type, hooks,	origName = jQuery.camelCase( name ),	style = elem.style;	name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );	// gets hook for the prefixed version	// followed by the unprefixed version	hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];	// Check if we're setting a value	if ( value !== undefined ) {	type = typeof value;	// convert relative number strings (+= or -=) to relative numbers. #7345	if ( type === "string" && (ret = rrelNum.exec( value )) ) {	value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );	// Fixes bug #9237	type = "number";	}	// Make sure that null and NaN values aren't set. See: #7116	if ( value == null || value !== value ) {	return;	}	// If a number was passed in, add 'px' to the (except for certain CSS properties)	if ( type === "number" && !jQuery.cssNumber[ origName ] ) {	value += "px";	}	// Fixes #8908, it can be done more correctly by specifying setters in cssHooks,	// but it would mean to define eight (for every problematic property) identical functions	if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {	style[ name ] = "inherit";	}	// If a hook was provided, use that value, otherwise just set the specified value	if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {	// Support: Chrome, Safari	// Setting style to blank string required to delete "style: x !important;"	style[ name ] = "";	style[ name ] = value;	}	} else {	// If a hook was provided get the non-computed value from there	if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {	return ret;	}	// Otherwise just get the value from the style object	return style[ name ];	}	},	css: function( elem, name, extra, styles ) {	var val, num, hooks,	origName = jQuery.camelCase( name );	// Make sure that we're working with the right name	name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );	// gets hook for the prefixed version	// followed by the unprefixed version	hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];	// If a hook was provided get the computed value from there	if ( hooks && "get" in hooks ) {	val = hooks.get( elem, true, extra );	}	// Otherwise, if a way to get the computed value exists, use that	if ( val === undefined ) {	val = curCSS( elem, name, styles );	}	//convert "normal" to computed value	if ( val === "normal" && name in cssNormalTransform ) {	val = cssNormalTransform[ name ];	}	// Return, converting to number if forced or a qualifier was provided and val looks numeric	if ( extra === "" || extra ) {	num = parseFloat( val );	return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;	}	return val;	}
});
jQuery.each([ "height", "width" ], function( i, name ) {	jQuery.cssHooks[ name ] = {	get: function( elem, computed, extra ) {	if ( computed ) {	// certain elements can have dimension info if we invisibly show them	// however, it must have a current display style that would benefit from this	return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?	jQuery.swap( elem, cssShow, function() {	return getWidthOrHeight( elem, name, extra );	}) :	getWidthOrHeight( elem, name, extra );	}	},	set: function( elem, value, extra ) {	var styles = extra && getStyles( elem );	return setPositiveNumber( elem, value, extra ?	augmentWidthOrHeight(	elem,	name,	extra,	jQuery.css( elem, "boxSizing", false, styles ) === "border-box",	styles	) : 0	);	}	};
});
// Support: Android 2.3
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,	function( elem, computed ) {	if ( computed ) {	// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right	// Work around by temporarily setting element display to inline-block	return jQuery.swap( elem, { "display": "inline-block" },	curCSS, [ elem, "marginRight" ] );	}	}
);
// These hooks are used by animate to expand properties
jQuery.each({	margin: "",	padding: "",	border: "Width"
}, function( prefix, suffix ) {	jQuery.cssHooks[ prefix + suffix ] = {	expand: function( value ) {	var i = 0,	expanded = {},	// assumes a single number if not a string	parts = typeof value === "string" ? value.split(" ") : [ value ];	for ( ; i < 4; i++ ) {	expanded[ prefix + cssExpand[ i ] + suffix ] =	parts[ i ] || parts[ i - 2 ] || parts[ 0 ];	}	return expanded;	}	};	if ( !rmargin.test( prefix ) ) {	jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;	}
});
jQuery.fn.extend({	css: function( name, value ) {	return access( this, function( elem, name, value ) {	var styles, len,	map = {},	i = 0;	if ( jQuery.isArray( name ) ) {	styles = getStyles( elem );	len = name.length;	for ( ; i < len; i++ ) {	map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );	}	return map;	}	return value !== undefined ?	jQuery.style( elem, name, value ) :	jQuery.css( elem, name );	}, name, value, arguments.length > 1 );	},	show: function() {	return showHide( this, true );	},	hide: function() {	return showHide( this );	},	toggle: function( state ) {	if ( typeof state === "boolean" ) {	return state ? this.show() : this.hide();	}	return this.each(function() {	if ( isHidden( this ) ) {	jQuery( this ).show();	} else {	jQuery( this ).hide();	}	});	}
});
function Tween( elem, options, prop, end, easing ) {	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;
Tween.prototype = {	constructor: Tween,	init: function( elem, options, prop, end, easing, unit ) {	this.elem = elem;	this.prop = prop;	this.easing = easing || "swing";	this.options = options;	this.start = this.now = this.cur();	this.end = end;	this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );	},	cur: function() {	var hooks = Tween.propHooks[ this.prop ];	return hooks && hooks.get ?	hooks.get( this ) :	Tween.propHooks._default.get( this );	},	run: function( percent ) {	var eased,	hooks = Tween.propHooks[ this.prop ];	if ( this.options.duration ) {	this.pos = eased = jQuery.easing[ this.easing ](	percent, this.options.duration * percent, 0, 1, this.options.duration	);	} else {	this.pos = eased = percent;	}	this.now = ( this.end - this.start ) * eased + this.start;	if ( this.options.step ) {	this.options.step.call( this.elem, this.now, this );	}	if ( hooks && hooks.set ) {	hooks.set( this );	} else {	Tween.propHooks._default.set( this );	}	return this;	}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {	_default: {	get: function( tween ) {	var result;	if ( tween.elem[ tween.prop ] != null &&	(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {	return tween.elem[ tween.prop ];	}	// passing an empty string as a 3rd parameter to .css will automatically	// attempt a parseFloat and fallback to a string if the parse fails	// so, simple values such as "10px" are parsed to Float.	// complex values such as "rotate(1rad)" are returned as is.	result = jQuery.css( tween.elem, tween.prop, "" );	// Empty strings, null, undefined and "auto" are converted to 0.	return !result || result === "auto" ? 0 : result;	},	set: function( tween ) {	// use step hook for back compat - use cssHook if its there - use .style if its	// available and use plain properties where available	if ( jQuery.fx.step[ tween.prop ] ) {	jQuery.fx.step[ tween.prop ]( tween );	} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {	jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );	} else {	tween.elem[ tween.prop ] = tween.now;	}	}	}
};
// Support: IE9
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {	set: function( tween ) {	if ( tween.elem.nodeType && tween.elem.parentNode ) {	tween.elem[ tween.prop ] = tween.now;	}	}
};
jQuery.easing = {	linear: function( p ) {	return p;	},	swing: function( p ) {	return 0.5 - Math.cos( p * Math.PI ) / 2;	}
};
jQuery.fx = Tween.prototype.init;
// Back Compat <1.8 extension point
jQuery.fx.step = {};
var	fxNow, timerId,	rfxtypes = /^(?:toggle|show|hide)$/,	rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),	rrun = /queueHooks$/,	animationPrefilters = [ defaultPrefilter ],	tweeners = {	"*": [ function( prop, value ) {	var tween = this.createTween( prop, value ),	target = tween.cur(),	parts = rfxnum.exec( value ),	unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),	// Starting value computation is required for potential unit mismatches	start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&	rfxnum.exec( jQuery.css( tween.elem, prop ) ),	scale = 1,	maxIterations = 20;	if ( start && start[ 3 ] !== unit ) {	// Trust units reported by jQuery.css	unit = unit || start[ 3 ];	// Make sure we update the tween properties later on	parts = parts || [];	// Iteratively approximate from a nonzero starting point	start = +target || 1;	do {	// If previous iteration zeroed out, double until we get *something*	// Use a string for doubling factor so we don't accidentally see scale as unchanged below	scale = scale || ".5";	// Adjust and apply	start = start / scale;	jQuery.style( tween.elem, prop, start + unit );	// Update scale, tolerating zero or NaN from tween.cur()	// And breaking the loop if scale is unchanged or perfect, or if we've just had enough	} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );	}	// Update tween properties	if ( parts ) {	start = tween.start = +start || +target || 0;	tween.unit = unit;	// If a +=/-= token was provided, we're doing a relative animation	tween.end = parts[ 1 ] ?	start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :	+parts[ 2 ];	}	return tween;	} ]	};
// Animations created synchronously will run synchronously
function createFxNow() {	setTimeout(function() {	fxNow = undefined;	});	return ( fxNow = jQuery.now() );
}
// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {	var which,	i = 0,	attrs = { height: type };	// if we include width, step value is 1 to do all cssExpand values,	// if we don't include width, step value is 2 to skip over Left and Right	includeWidth = includeWidth ? 1 : 0;	for ( ; i < 4 ; i += 2 - includeWidth ) {	which = cssExpand[ i ];	attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;	}	if ( includeWidth ) {	attrs.opacity = attrs.width = type;	}	return attrs;
}
function createTween( value, prop, animation ) {	var tween,	collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),	index = 0,	length = collection.length;	for ( ; index < length; index++ ) {	if ( (tween = collection[ index ].call( animation, prop, value )) ) {	// we're done with this property	return tween;	}	}
}
function defaultPrefilter( elem, props, opts ) {	/* jshint validthis: true */	var prop, value, toggle, tween, hooks, oldfire, display,	anim = this,	orig = {},	style = elem.style,	hidden = elem.nodeType && isHidden( elem ),	dataShow = data_priv.get( elem, "fxshow" );	// handle queue: false promises	if ( !opts.queue ) {	hooks = jQuery._queueHooks( elem, "fx" );	if ( hooks.unqueued == null ) {	hooks.unqueued = 0;	oldfire = hooks.empty.fire;	hooks.empty.fire = function() {	if ( !hooks.unqueued ) {	oldfire();	}	};	}	hooks.unqueued++;	anim.always(function() {	// doing this makes sure that the complete handler will be called	// before this completes	anim.always(function() {	hooks.unqueued--;	if ( !jQuery.queue( elem, "fx" ).length ) {	hooks.empty.fire();	}	});	});	}	// height/width overflow pass	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {	// Make sure that nothing sneaks out	// Record all 3 overflow attributes because IE9-10 do not	// change the overflow attribute when overflowX and	// overflowY are set to the same value	opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];	// Set display property to inline-block for height/width	// animations on inline elements that are having width/height animated	display = jQuery.css( elem, "display" );	// Get default display if display is currently "none"	if ( display === "none" ) {	display = defaultDisplay( elem.nodeName );	}	if ( display === "inline" &&	jQuery.css( elem, "float" ) === "none" ) {	style.display = "inline-block";	}	}	if ( opts.overflow ) {	style.overflow = "hidden";	anim.always(function() {	style.overflow = opts.overflow[ 0 ];	style.overflowX = opts.overflow[ 1 ];	style.overflowY = opts.overflow[ 2 ];	});	}	// show/hide pass	for ( prop in props ) {	value = props[ prop ];	if ( rfxtypes.exec( value ) ) {	delete props[ prop ];	toggle = toggle || value === "toggle";	if ( value === ( hidden ? "hide" : "show" ) ) {	// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden	if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {	hidden = true;	} else {	continue;	}	}	orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );	}	}	if ( !jQuery.isEmptyObject( orig ) ) {	if ( dataShow ) {	if ( "hidden" in dataShow ) {	hidden = dataShow.hidden;	}	} else {	dataShow = data_priv.access( elem, "fxshow", {} );	}	// store state if its toggle - enables .stop().toggle() to "reverse"	if ( toggle ) {	dataShow.hidden = !hidden;	}	if ( hidden ) {	jQuery( elem ).show();	} else {	anim.done(function() {	jQuery( elem ).hide();	});	}	anim.done(function() {	var prop;	data_priv.remove( elem, "fxshow" );	for ( prop in orig ) {	jQuery.style( elem, prop, orig[ prop ] );	}	});	for ( prop in orig ) {	tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );	if ( !( prop in dataShow ) ) {	dataShow[ prop ] = tween.start;	if ( hidden ) {	tween.end = tween.start;	tween.start = prop === "width" || prop === "height" ? 1 : 0;	}	}	}	}
}
function propFilter( props, specialEasing ) {	var index, name, easing, value, hooks;	// camelCase, specialEasing and expand cssHook pass	for ( index in props ) {	name = jQuery.camelCase( index );	easing = specialEasing[ name ];	value = props[ index ];	if ( jQuery.isArray( value ) ) {	easing = value[ 1 ];	value = props[ index ] = value[ 0 ];	}	if ( index !== name ) {	props[ name ] = value;	delete props[ index ];	}	hooks = jQuery.cssHooks[ name ];	if ( hooks && "expand" in hooks ) {	value = hooks.expand( value );	delete props[ name ];	// not quite $.extend, this wont overwrite keys already present.	// also - reusing 'index' from above because we have the correct "name"	for ( index in value ) {	if ( !( index in props ) ) {	props[ index ] = value[ index ];	specialEasing[ index ] = easing;	}	}	} else {	specialEasing[ name ] = easing;	}	}
}
function Animation( elem, properties, options ) {	var result,	stopped,	index = 0,	length = animationPrefilters.length,	deferred = jQuery.Deferred().always( function() {	// don't match elem in the :animated selector	delete tick.elem;	}),	tick = function() {	if ( stopped ) {	return false;	}	var currentTime = fxNow || createFxNow(),	remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),	// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)	temp = remaining / animation.duration || 0,	percent = 1 - temp,	index = 0,	length = animation.tweens.length;	for ( ; index < length ; index++ ) {	animation.tweens[ index ].run( percent );	}	deferred.notifyWith( elem, [ animation, percent, remaining ]);	if ( percent < 1 && length ) {	return remaining;	} else {	deferred.resolveWith( elem, [ animation ] );	return false;	}	},	animation = deferred.promise({	elem: elem,	props: jQuery.extend( {}, properties ),	opts: jQuery.extend( true, { specialEasing: {} }, options ),	originalProperties: properties,	originalOptions: options,	startTime: fxNow || createFxNow(),	duration: options.duration,	tweens: [],	createTween: function( prop, end ) {	var tween = jQuery.Tween( elem, animation.opts, prop, end,	animation.opts.specialEasing[ prop ] || animation.opts.easing );	animation.tweens.push( tween );	return tween;	},	stop: function( gotoEnd ) {	var index = 0,	// if we are going to the end, we want to run all the tweens	// otherwise we skip this part	length = gotoEnd ? animation.tweens.length : 0;	if ( stopped ) {	return this;	}	stopped = true;	for ( ; index < length ; index++ ) {	animation.tweens[ index ].run( 1 );	}	// resolve when we played the last frame	// otherwise, reject	if ( gotoEnd ) {	deferred.resolveWith( elem, [ animation, gotoEnd ] );	} else {	deferred.rejectWith( elem, [ animation, gotoEnd ] );	}	return this;	}	}),	props = animation.props;	propFilter( props, animation.opts.specialEasing );	for ( ; index < length ; index++ ) {	result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );	if ( result ) {	return result;	}	}	jQuery.map( props, createTween, animation );	if ( jQuery.isFunction( animation.opts.start ) ) {	animation.opts.start.call( elem, animation );	}	jQuery.fx.timer(	jQuery.extend( tick, {	elem: elem,	anim: animation,	queue: animation.opts.queue	})	);	// attach callbacks from options	return animation.progress( animation.opts.progress )	.done( animation.opts.done, animation.opts.complete )	.fail( animation.opts.fail )	.always( animation.opts.always );
}
jQuery.Animation = jQuery.extend( Animation, {	tweener: function( props, callback ) {	if ( jQuery.isFunction( props ) ) {	callback = props;	props = [ "*" ];	} else {	props = props.split(" ");	}	var prop,	index = 0,	length = props.length;	for ( ; index < length ; index++ ) {	prop = props[ index ];	tweeners[ prop ] = tweeners[ prop ] || [];	tweeners[ prop ].unshift( callback );	}	},	prefilter: function( callback, prepend ) {	if ( prepend ) {	animationPrefilters.unshift( callback );	} else {	animationPrefilters.push( callback );	}	}
});
jQuery.speed = function( speed, easing, fn ) {	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {	complete: fn || !fn && easing ||	jQuery.isFunction( speed ) && speed,	duration: speed,	easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing	};	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :	opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;	// normalize opt.queue - true/undefined/null -> "fx"	if ( opt.queue == null || opt.queue === true ) {	opt.queue = "fx";	}	// Queueing	opt.old = opt.complete;	opt.complete = function() {	if ( jQuery.isFunction( opt.old ) ) {	opt.old.call( this );	}	if ( opt.queue ) {	jQuery.dequeue( this, opt.queue );	}	};	return opt;
};
jQuery.fn.extend({	fadeTo: function( speed, to, easing, callback ) {	// show any hidden elements after setting opacity to 0	return this.filter( isHidden ).css( "opacity", 0 ).show()	// animate to the value specified	.end().animate({ opacity: to }, speed, easing, callback );	},	animate: function( prop, speed, easing, callback ) {	var empty = jQuery.isEmptyObject( prop ),	optall = jQuery.speed( speed, easing, callback ),	doAnimation = function() {	// Operate on a copy of prop so per-property easing won't be lost	var anim = Animation( this, jQuery.extend( {}, prop ), optall );	// Empty animations, or finishing resolves immediately	if ( empty || data_priv.get( this, "finish" ) ) {	anim.stop( true );	}	};	doAnimation.finish = doAnimation;	return empty || optall.queue === false ?	this.each( doAnimation ) :	this.queue( optall.queue, doAnimation );	},	stop: function( type, clearQueue, gotoEnd ) {	var stopQueue = function( hooks ) {	var stop = hooks.stop;	delete hooks.stop;	stop( gotoEnd );	};	if ( typeof type !== "string" ) {	gotoEnd = clearQueue;	clearQueue = type;	type = undefined;	}	if ( clearQueue && type !== false ) {	this.queue( type || "fx", [] );	}	return this.each(function() {	var dequeue = true,	index = type != null && type + "queueHooks",	timers = jQuery.timers,	data = data_priv.get( this );	if ( index ) {	if ( data[ index ] && data[ index ].stop ) {	stopQueue( data[ index ] );	}	} else {	for ( index in data ) {	if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {	stopQueue( data[ index ] );	}	}	}	for ( index = timers.length; index--; ) {	if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {	timers[ index ].anim.stop( gotoEnd );	dequeue = false;	timers.splice( index, 1 );	}	}	// start the next in the queue if the last step wasn't forced	// timers currently will call their complete callbacks, which will dequeue	// but only if they were gotoEnd	if ( dequeue || !gotoEnd ) {	jQuery.dequeue( this, type );	}	});	},	finish: function( type ) {	if ( type !== false ) {	type = type || "fx";	}	return this.each(function() {	var index,	data = data_priv.get( this ),	queue = data[ type + "queue" ],	hooks = data[ type + "queueHooks" ],	timers = jQuery.timers,	length = queue ? queue.length : 0;	// enable finishing flag on private data	data.finish = true;	// empty the queue first	jQuery.queue( this, type, [] );	if ( hooks && hooks.stop ) {	hooks.stop.call( this, true );	}	// look for any active animations, and finish them	for ( index = timers.length; index--; ) {	if ( timers[ index ].elem === this && timers[ index ].queue === type ) {	timers[ index ].anim.stop( true );	timers.splice( index, 1 );	}	}	// look for any animations in the old queue and finish them	for ( index = 0; index < length; index++ ) {	if ( queue[ index ] && queue[ index ].finish ) {	queue[ index ].finish.call( this );	}	}	// turn off finishing flag	delete data.finish;	});	}
});
jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {	var cssFn = jQuery.fn[ name ];	jQuery.fn[ name ] = function( speed, easing, callback ) {	return speed == null || typeof speed === "boolean" ?	cssFn.apply( this, arguments ) :	this.animate( genFx( name, true ), speed, easing, callback );	};
});
// Generate shortcuts for custom animations
jQuery.each({	slideDown: genFx("show"),	slideUp: genFx("hide"),	slideToggle: genFx("toggle"),	fadeIn: { opacity: "show" },	fadeOut: { opacity: "hide" },	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {	jQuery.fn[ name ] = function( speed, easing, callback ) {	return this.animate( props, speed, easing, callback );	};
});
jQuery.timers = [];
jQuery.fx.tick = function() {	var timer,	i = 0,	timers = jQuery.timers;	fxNow = jQuery.now();	for ( ; i < timers.length; i++ ) {	timer = timers[ i ];	// Checks the timer has not already been removed	if ( !timer() && timers[ i ] === timer ) {	timers.splice( i--, 1 );	}	}	if ( !timers.length ) {	jQuery.fx.stop();	}	fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {	jQuery.timers.push( timer );	if ( timer() ) {	jQuery.fx.start();	} else {	jQuery.timers.pop();	}
};
jQuery.fx.interval = 13;
jQuery.fx.start = function() {	if ( !timerId ) {	timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );	}
};
jQuery.fx.stop = function() {	clearInterval( timerId );	timerId = null;
};
jQuery.fx.speeds = {	slow: 600,	fast: 200,	// Default speed	_default: 400
};
// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;	type = type || "fx";	return this.queue( type, function( next, hooks ) {	var timeout = setTimeout( next, time );	hooks.stop = function() {	clearTimeout( timeout );	};	});
};
(function() {	var input = document.createElement( "input" ),	select = document.createElement( "select" ),	opt = select.appendChild( document.createElement( "option" ) );	input.type = "checkbox";	// Support: iOS 5.1, Android 4.x, Android 2.3	// Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)	support.checkOn = input.value !== "";	// Must access the parent to make an option select properly	// Support: IE9, IE10	support.optSelected = opt.selected;	// Make sure that the options inside disabled selects aren't marked as disabled	// (WebKit marks them as disabled)	select.disabled = true;	support.optDisabled = !opt.disabled;	// Check if an input maintains its value after becoming a radio	// Support: IE9, IE10	input = document.createElement( "input" );	input.value = "t";	input.type = "radio";	support.radioValue = input.value === "t";
})();
var nodeHook, boolHook,	attrHandle = jQuery.expr.attrHandle;
jQuery.fn.extend({	attr: function( name, value ) {	return access( this, jQuery.attr, name, value, arguments.length > 1 );	},	removeAttr: function( name ) {	return this.each(function() {	jQuery.removeAttr( this, name );	});	}
});
jQuery.extend({	attr: function( elem, name, value ) {	var hooks, ret,	nType = elem.nodeType;	// don't get/set attributes on text, comment and attribute nodes	if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {	return;	}	// Fallback to prop when attributes are not supported	if ( typeof elem.getAttribute === strundefined ) {	return jQuery.prop( elem, name, value );	}	// All attributes are lowercase	// Grab necessary hook if one is defined	if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {	name = name.toLowerCase();	hooks = jQuery.attrHooks[ name ] ||	( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );	}	if ( value !== undefined ) {	if ( value === null ) {	jQuery.removeAttr( elem, name );	} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {	return ret;	} else {	elem.setAttribute( name, value + "" );	return value;	}	} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {	return ret;	} else {	ret = jQuery.find.attr( elem, name );	// Non-existent attributes return null, we normalize to undefined	return ret == null ?	undefined :	ret;	}	},	removeAttr: function( elem, value ) {	var name, propName,	i = 0,	attrNames = value && value.match( rnotwhite );	if ( attrNames && elem.nodeType === 1 ) {	while ( (name = attrNames[i++]) ) {	propName = jQuery.propFix[ name ] || name;	// Boolean attributes get special treatment (#10870)	if ( jQuery.expr.match.bool.test( name ) ) {	// Set corresponding property to false	elem[ propName ] = false;	}	elem.removeAttribute( name );	}	}	},	attrHooks: {	type: {	set: function( elem, value ) {	if ( !support.radioValue && value === "radio" &&	jQuery.nodeName( elem, "input" ) ) {	// Setting the type on a radio button after the value resets the value in IE6-9	// Reset value to default in case type is set after value during creation	var val = elem.value;	elem.setAttribute( "type", value );	if ( val ) {	elem.value = val;	}	return value;	}	}	}	}
});
// Hooks for boolean attributes
boolHook = {	set: function( elem, value, name ) {	if ( value === false ) {	// Remove boolean attributes when set to false	jQuery.removeAttr( elem, name );	} else {	elem.setAttribute( name, name );	}	return name;	}
};
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {	var getter = attrHandle[ name ] || jQuery.find.attr;	attrHandle[ name ] = function( elem, name, isXML ) {	var ret, handle;	if ( !isXML ) {	// Avoid an infinite loop by temporarily removing this function from the getter	handle = attrHandle[ name ];	attrHandle[ name ] = ret;	ret = getter( elem, name, isXML ) != null ?	name.toLowerCase() :	null;	attrHandle[ name ] = handle;	}	return ret;	};
});
var rfocusable = /^(?:input|select|textarea|button)$/i;
jQuery.fn.extend({	prop: function( name, value ) {	return access( this, jQuery.prop, name, value, arguments.length > 1 );	},	removeProp: function( name ) {	return this.each(function() {	delete this[ jQuery.propFix[ name ] || name ];	});	}
});
jQuery.extend({	propFix: {	"for": "htmlFor",	"class": "className"	},	prop: function( elem, name, value ) {	var ret, hooks, notxml,	nType = elem.nodeType;	// don't get/set properties on text, comment and attribute nodes	if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {	return;	}	notxml = nType !== 1 || !jQuery.isXMLDoc( elem );	if ( notxml ) {	// Fix name and attach hooks	name = jQuery.propFix[ name ] || name;	hooks = jQuery.propHooks[ name ];	}	if ( value !== undefined ) {	return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?	ret :	( elem[ name ] = value );	} else {	return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?	ret :	elem[ name ];	}	},	propHooks: {	tabIndex: {	get: function( elem ) {	return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?	elem.tabIndex :	-1;	}	}	}
});
// Support: IE9+
// Selectedness for an option in an optgroup can be inaccurate
if ( !support.optSelected ) {	jQuery.propHooks.selected = {	get: function( elem ) {	var parent = elem.parentNode;	if ( parent && parent.parentNode ) {	parent.parentNode.selectedIndex;	}	return null;	}	};
}
jQuery.each([	"tabIndex",	"readOnly",	"maxLength",	"cellSpacing",	"cellPadding",	"rowSpan",	"colSpan",	"useMap",	"frameBorder",	"contentEditable"
], function() {	jQuery.propFix[ this.toLowerCase() ] = this;
});
var rclass = /[\t\r\n\f]/g;
jQuery.fn.extend({	addClass: function( value ) {	var classes, elem, cur, clazz, j, finalValue,	proceed = typeof value === "string" && value,	i = 0,	len = this.length;	if ( jQuery.isFunction( value ) ) {	return this.each(function( j ) {	jQuery( this ).addClass( value.call( this, j, this.className ) );	});	}	if ( proceed ) {	// The disjunction here is for better compressibility (see removeClass)	classes = ( value || "" ).match( rnotwhite ) || [];	for ( ; i < len; i++ ) {	elem = this[ i ];	cur = elem.nodeType === 1 && ( elem.className ?	( " " + elem.className + " " ).replace( rclass, " " ) :	" "	);	if ( cur ) {	j = 0;	while ( (clazz = classes[j++]) ) {	if ( cur.indexOf( " " + clazz + " " ) < 0 ) {	cur += clazz + " ";	}	}	// only assign if different to avoid unneeded rendering.	finalValue = jQuery.trim( cur );	if ( elem.className !== finalValue ) {	elem.className = finalValue;	}	}	}	}	return this;	},	removeClass: function( value ) {	var classes, elem, cur, clazz, j, finalValue,	proceed = arguments.length === 0 || typeof value === "string" && value,	i = 0,	len = this.length;	if ( jQuery.isFunction( value ) ) {	return this.each(function( j ) {	jQuery( this ).removeClass( value.call( this, j, this.className ) );	});	}	if ( proceed ) {	classes = ( value || "" ).match( rnotwhite ) || [];	for ( ; i < len; i++ ) {	elem = this[ i ];	// This expression is here for better compressibility (see addClass)	cur = elem.nodeType === 1 && ( elem.className ?	( " " + elem.className + " " ).replace( rclass, " " ) :	""	);	if ( cur ) {	j = 0;	while ( (clazz = classes[j++]) ) {	// Remove *all* instances	while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {	cur = cur.replace( " " + clazz + " ", " " );	}	}	// only assign if different to avoid unneeded rendering.	finalValue = value ? jQuery.trim( cur ) : "";	if ( elem.className !== finalValue ) {	elem.className = finalValue;	}	}	}	}	return this;	},	toggleClass: function( value, stateVal ) {	var type = typeof value;	if ( typeof stateVal === "boolean" && type === "string" ) {	return stateVal ? this.addClass( value ) : this.removeClass( value );	}	if ( jQuery.isFunction( value ) ) {	return this.each(function( i ) {	jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );	});	}	return this.each(function() {	if ( type === "string" ) {	// toggle individual class names	var className,	i = 0,	self = jQuery( this ),	classNames = value.match( rnotwhite ) || [];	while ( (className = classNames[ i++ ]) ) {	// check each className given, space separated list	if ( self.hasClass( className ) ) {	self.removeClass( className );	} else {	self.addClass( className );	}	}	// Toggle whole class name	} else if ( type === strundefined || type === "boolean" ) {	if ( this.className ) {	// store className if set	data_priv.set( this, "__className__", this.className );	}	// If the element has a class name or if we're passed "false",	// then remove the whole classname (if there was one, the above saved it).	// Otherwise bring back whatever was previously saved (if anything),	// falling back to the empty string if nothing was stored.	this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";	}	});	},	hasClass: function( selector ) {	var className = " " + selector + " ",	i = 0,	l = this.length;	for ( ; i < l; i++ ) {	if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {	return true;	}	}	return false;	}
});
var rreturn = /\r/g;
jQuery.fn.extend({	val: function( value ) {	var hooks, ret, isFunction,	elem = this[0];	if ( !arguments.length ) {	if ( elem ) {	hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];	if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {	return ret;	}	ret = elem.value;	return typeof ret === "string" ?	// handle most common string cases	ret.replace(rreturn, "") :	// handle cases where value is null/undef or number	ret == null ? "" : ret;	}	return;	}	isFunction = jQuery.isFunction( value );	return this.each(function( i ) {	var val;	if ( this.nodeType !== 1 ) {	return;	}	if ( isFunction ) {	val = value.call( this, i, jQuery( this ).val() );	} else {	val = value;	}	// Treat null/undefined as ""; convert numbers to string	if ( val == null ) {	val = "";	} else if ( typeof val === "number" ) {	val += "";	} else if ( jQuery.isArray( val ) ) {	val = jQuery.map( val, function( value ) {	return value == null ? "" : value + "";	});	}	hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];	// If set returns undefined, fall back to normal setting	if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {	this.value = val;	}	});	}
});
jQuery.extend({	valHooks: {	select: {	get: function( elem ) {	var value, option,	options = elem.options,	index = elem.selectedIndex,	one = elem.type === "select-one" || index < 0,	values = one ? null : [],	max = one ? index + 1 : options.length,	i = index < 0 ?	max :	one ? index : 0;	// Loop through all the selected options	for ( ; i < max; i++ ) {	option = options[ i ];	// IE6-9 doesn't update selected after form reset (#2551)	if ( ( option.selected || i === index ) &&	// Don't return options that are disabled or in a disabled optgroup	( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&	( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {	// Get the specific value for the option	value = jQuery( option ).val();	// We don't need an array for one selects	if ( one ) {	return value;	}	// Multi-Selects return an array	values.push( value );	}	}	return values;	},	set: function( elem, value ) {	var optionSet, option,	options = elem.options,	values = jQuery.makeArray( value ),	i = options.length;	while ( i-- ) {	option = options[ i ];	if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {	optionSet = true;	}	}	// force browsers to behave consistently when non-matching value is set	if ( !optionSet ) {	elem.selectedIndex = -1;	}	return values;	}	}	}
});
// Radios and checkboxes getter/setter
jQuery.each([ "radio", "checkbox" ], function() {	jQuery.valHooks[ this ] = {	set: function( elem, value ) {	if ( jQuery.isArray( value ) ) {	return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );	}	}	};	if ( !support.checkOn ) {	jQuery.valHooks[ this ].get = function( elem ) {	// Support: Webkit	// "" is returned instead of "on" if a value isn't specified	return elem.getAttribute("value") === null ? "on" : elem.value;	};	}
});
// Return jQuery for attributes-only inclusion
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {	// Handle event binding	jQuery.fn[ name ] = function( data, fn ) {	return arguments.length > 0 ?	this.on( name, null, data, fn ) :	this.trigger( name );	};
});
jQuery.fn.extend({	hover: function( fnOver, fnOut ) {	return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );	},	bind: function( types, data, fn ) {	return this.on( types, null, data, fn );	},	unbind: function( types, fn ) {	return this.off( types, null, fn );	},	delegate: function( selector, types, data, fn ) {	return this.on( types, selector, data, fn );	},	undelegate: function( selector, types, fn ) {	// ( namespace ) or ( selector, types [, fn] )	return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );	}
});
var nonce = jQuery.now();
var rquery = (/\?/);
// Support: Android 2.3
// Workaround failure to string-cast null input
jQuery.parseJSON = function( data ) {	return JSON.parse( data + "" );
};
// Cross-browser xml parsing
jQuery.parseXML = function( data ) {	var xml, tmp;	if ( !data || typeof data !== "string" ) {	return null;	}	// Support: IE9	try {	tmp = new DOMParser();	xml = tmp.parseFromString( data, "text/xml" );	} catch ( e ) {	xml = undefined;	}	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {	jQuery.error( "Invalid XML: " + data );	}	return xml;
};
var	// Document location	ajaxLocParts,	ajaxLocation,	rhash = /#.*$/,	rts = /([?&])_=[^&]*/,	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,	// #7653, #8125, #8152: local protocol detection	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,	rnoContent = /^(?:GET|HEAD)$/,	rprotocol = /^\/\//,	rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,	/* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */	prefilters = {},	/* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */	transports = {},	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression	allTypes = "*/".concat("*");
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {	ajaxLocation = location.href;
} catch( e ) {	// Use the href attribute of an A element	// since IE will modify it given document.location	ajaxLocation = document.createElement( "a" );	ajaxLocation.href = "";	ajaxLocation = ajaxLocation.href;
}
// Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {	// dataTypeExpression is optional and defaults to "*"	return function( dataTypeExpression, func ) {	if ( typeof dataTypeExpression !== "string" ) {	func = dataTypeExpression;	dataTypeExpression = "*";	}	var dataType,	i = 0,	dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];	if ( jQuery.isFunction( func ) ) {	// For each dataType in the dataTypeExpression	while ( (dataType = dataTypes[i++]) ) {	// Prepend if requested	if ( dataType[0] === "+" ) {	dataType = dataType.slice( 1 ) || "*";	(structure[ dataType ] = structure[ dataType ] || []).unshift( func );	// Otherwise append	} else {	(structure[ dataType ] = structure[ dataType ] || []).push( func );	}	}	}	};
}
// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {	var inspected = {},	seekingTransport = ( structure === transports );	function inspect( dataType ) {	var selected;	inspected[ dataType ] = true;	jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {	var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );	if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {	options.dataTypes.unshift( dataTypeOrTransport );	inspect( dataTypeOrTransport );	return false;	} else if ( seekingTransport ) {	return !( selected = dataTypeOrTransport );	}	});	return selected;	}	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {	var key, deep,	flatOptions = jQuery.ajaxSettings.flatOptions || {};	for ( key in src ) {	if ( src[ key ] !== undefined ) {	( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];	}	}	if ( deep ) {	jQuery.extend( true, target, deep );	}	return target;
}
/* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */
function ajaxHandleResponses( s, jqXHR, responses ) {	var ct, type, finalDataType, firstDataType,	contents = s.contents,	dataTypes = s.dataTypes;	// Remove auto dataType and get content-type in the process	while ( dataTypes[ 0 ] === "*" ) {	dataTypes.shift();	if ( ct === undefined ) {	ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");	}	}	// Check if we're dealing with a known content-type	if ( ct ) {	for ( type in contents ) {	if ( contents[ type ] && contents[ type ].test( ct ) ) {	dataTypes.unshift( type );	break;	}	}	}	// Check to see if we have a response for the expected dataType	if ( dataTypes[ 0 ] in responses ) {	finalDataType = dataTypes[ 0 ];	} else {	// Try convertible dataTypes	for ( type in responses ) {	if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {	finalDataType = type;	break;	}	if ( !firstDataType ) {	firstDataType = type;	}	}	// Or just use first one	finalDataType = finalDataType || firstDataType;	}	// If we found a dataType	// We add the dataType to the list if needed	// and return the corresponding response	if ( finalDataType ) {	if ( finalDataType !== dataTypes[ 0 ] ) {	dataTypes.unshift( finalDataType );	}	return responses[ finalDataType ];	}
}
/* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */
function ajaxConvert( s, response, jqXHR, isSuccess ) {	var conv2, current, conv, tmp, prev,	converters = {},	// Work with a copy of dataTypes in case we need to modify it for conversion	dataTypes = s.dataTypes.slice();	// Create converters map with lowercased keys	if ( dataTypes[ 1 ] ) {	for ( conv in s.converters ) {	converters[ conv.toLowerCase() ] = s.converters[ conv ];	}	}	current = dataTypes.shift();	// Convert to each sequential dataType	while ( current ) {	if ( s.responseFields[ current ] ) {	jqXHR[ s.responseFields[ current ] ] = response;	}	// Apply the dataFilter if provided	if ( !prev && isSuccess && s.dataFilter ) {	response = s.dataFilter( response, s.dataType );	}	prev = current;	current = dataTypes.shift();	if ( current ) {	// There's only work to do if current dataType is non-auto	if ( current === "*" ) {	current = prev;	// Convert response if prev dataType is non-auto and differs from current	} else if ( prev !== "*" && prev !== current ) {	// Seek a direct converter	conv = converters[ prev + " " + current ] || converters[ "* " + current ];	// If none found, seek a pair	if ( !conv ) {	for ( conv2 in converters ) {	// If conv2 outputs current	tmp = conv2.split( " " );	if ( tmp[ 1 ] === current ) {	// If prev can be converted to accepted input	conv = converters[ prev + " " + tmp[ 0 ] ] ||	converters[ "* " + tmp[ 0 ] ];	if ( conv ) {	// Condense equivalence converters	if ( conv === true ) {	conv = converters[ conv2 ];	// Otherwise, insert the intermediate dataType	} else if ( converters[ conv2 ] !== true ) {	current = tmp[ 0 ];	dataTypes.unshift( tmp[ 1 ] );	}	break;	}	}	}	}	// Apply converter (if not an equivalence)	if ( conv !== true ) {	// Unless errors are allowed to bubble, catch and return them	if ( conv && s[ "throws" ] ) {	response = conv( response );	} else {	try {	response = conv( response );	} catch ( e ) {	return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };	}	}	}	}	}	}	return { state: "success", data: response };
}
jQuery.extend({	// Counter for holding the number of active queries	active: 0,	// Last-Modified header cache for next request	lastModified: {},	etag: {},	ajaxSettings: {	url: ajaxLocation,	type: "GET",	isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),	global: true,	processData: true,	async: true,	contentType: "application/x-www-form-urlencoded; charset=UTF-8",	/*	timeout: 0,	data: null,	dataType: null,	username: null,	password: null,	cache: null,	throws: false,	traditional: false,	headers: {},	*/	accepts: {	"*": allTypes,	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",	json: "responseJSON"	},	// Data converters	// Keys separate source (or catchall "*") and destination types with a single space	converters: {	// Convert anything to text	"* text": String,	// Text to html (true = no transformation)	"text html": true,	// Evaluate text as a json expression	"text json": jQuery.parseJSON,	// Parse text as xml	"text xml": jQuery.parseXML	},	// For options that shouldn't be deep extended:	// you can add your own custom options here if	// and when you create one that shouldn't be	// deep extended (see ajaxExtend)	flatOptions: {	url: true,	context: true	}	},	// Creates a full fledged settings object into target	// with both ajaxSettings and settings fields.	// If target is omitted, writes into ajaxSettings.	ajaxSetup: function( target, settings ) {	return settings ?	// Building a settings object	ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :	// Extending ajaxSettings	ajaxExtend( jQuery.ajaxSettings, target );	},	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),	ajaxTransport: addToPrefiltersOrTransports( transports ),	// Main method	ajax: function( url, options ) {	// If url is an object, simulate pre-1.5 signature	if ( typeof url === "object" ) {	options = url;	url = undefined;	}	// Force options to be an object	options = options || {};	var transport,	// URL without anti-cache param	cacheURL,	// Response headers	responseHeadersString,	responseHeaders,	// timeout handle	timeoutTimer,	// Cross-domain detection vars	parts,	// To know if global events are to be dispatched	fireGlobals,	// Loop variable	i,	// Create the final options object	s = jQuery.ajaxSetup( {}, options ),	// Callbacks context	callbackContext = s.context || s,	// Context for global events is callbackContext if it is a DOM node or jQuery collection	globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?	jQuery( callbackContext ) :	jQuery.event,	// Deferreds	deferred = jQuery.Deferred(),	completeDeferred = jQuery.Callbacks("once memory"),	// Status-dependent callbacks	statusCode = s.statusCode || {},	// Headers (they are sent all at once)	requestHeaders = {},	requestHeadersNames = {},	// The jqXHR state	state = 0,	// Default abort message	strAbort = "canceled",	// Fake xhr	jqXHR = {	readyState: 0,	// Builds headers hashtable if needed	getResponseHeader: function( key ) {	var match;	if ( state === 2 ) {	if ( !responseHeaders ) {	responseHeaders = {};	while ( (match = rheaders.exec( responseHeadersString )) ) {	responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];	}	}	match = responseHeaders[ key.toLowerCase() ];	}	return match == null ? null : match;	},	// Raw string	getAllResponseHeaders: function() {	return state === 2 ? responseHeadersString : null;	},	// Caches the header	setRequestHeader: function( name, value ) {	var lname = name.toLowerCase();	if ( !state ) {	name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;	requestHeaders[ name ] = value;	}	return this;	},	// Overrides response content-type header	overrideMimeType: function( type ) {	if ( !state ) {	s.mimeType = type;	}	return this;	},	// Status-dependent callbacks	statusCode: function( map ) {	var code;	if ( map ) {	if ( state < 2 ) {	for ( code in map ) {	// Lazy-add the new callback in a way that preserves old ones	statusCode[ code ] = [ statusCode[ code ], map[ code ] ];	}	} else {	// Execute the appropriate callbacks	jqXHR.always( map[ jqXHR.status ] );	}	}	return this;	},	// Cancel the request	abort: function( statusText ) {	var finalText = statusText || strAbort;	if ( transport ) {	transport.abort( finalText );	}	done( 0, finalText );	return this;	}	};	// Attach deferreds	deferred.promise( jqXHR ).complete = completeDeferred.add;	jqXHR.success = jqXHR.done;	jqXHR.error = jqXHR.fail;	// Remove hash character (#7531: and string promotion)	// Add protocol if not provided (prefilters might expect it)	// Handle falsy url in the settings object (#10093: consistency with old signature)	// We also use the url parameter if available	s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )	.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );	// Alias method option to type as per ticket #12004	s.type = options.method || options.type || s.method || s.type;	// Extract dataTypes list	s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];	// A cross-domain request is in order when we have a protocol:host:port mismatch	if ( s.crossDomain == null ) {	parts = rurl.exec( s.url.toLowerCase() );	s.crossDomain = !!( parts &&	( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||	( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==	( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )	);	}	// Convert data if not already a string	if ( s.data && s.processData && typeof s.data !== "string" ) {	s.data = jQuery.param( s.data, s.traditional );	}	// Apply prefilters	inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );	// If request was aborted inside a prefilter, stop there	if ( state === 2 ) {	return jqXHR;	}	// We can fire global events as of now if asked to	fireGlobals = s.global;	// Watch for a new set of requests	if ( fireGlobals && jQuery.active++ === 0 ) {	jQuery.event.trigger("ajaxStart");	}	// Uppercase the type	s.type = s.type.toUpperCase();	// Determine if request has content	s.hasContent = !rnoContent.test( s.type );	// Save the URL in case we're toying with the If-Modified-Since	// and/or If-None-Match header later on	cacheURL = s.url;	// More options handling for requests with no content	if ( !s.hasContent ) {	// If data is available, append data to url	if ( s.data ) {	cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );	// #9682: remove data so that it's not used in an eventual retry	delete s.data;	}	// Add anti-cache in url if needed	if ( s.cache === false ) {	s.url = rts.test( cacheURL ) ?	// If there is already a '_' parameter, set its value	cacheURL.replace( rts, "$1_=" + nonce++ ) :	// Otherwise add one to the end	cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;	}	}	// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.	if ( s.ifModified ) {	if ( jQuery.lastModified[ cacheURL ] ) {	jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );	}	if ( jQuery.etag[ cacheURL ] ) {	jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );	}	}	// Set the correct header, if data is being sent	if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {	jqXHR.setRequestHeader( "Content-Type", s.contentType );	}	// Set the Accepts header for the server, depending on the dataType	jqXHR.setRequestHeader(	"Accept",	s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?	s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :	s.accepts[ "*" ]	);	// Check for headers option	for ( i in s.headers ) {	jqXHR.setRequestHeader( i, s.headers[ i ] );	}	// Allow custom headers/mimetypes and early abort	if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {	// Abort if not done already and return	return jqXHR.abort();	}	// aborting is no longer a cancellation	strAbort = "abort";	// Install callbacks on deferreds	for ( i in { success: 1, error: 1, complete: 1 } ) {	jqXHR[ i ]( s[ i ] );	}	// Get transport	transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );	// If no transport, we auto-abort	if ( !transport ) {	done( -1, "No Transport" );	} else {	jqXHR.readyState = 1;	// Send global event	if ( fireGlobals ) {	globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );	}	// Timeout	if ( s.async && s.timeout > 0 ) {	timeoutTimer = setTimeout(function() {	jqXHR.abort("timeout");	}, s.timeout );	}	try {	state = 1;	transport.send( requestHeaders, done );	} catch ( e ) {	// Propagate exception as error if not done	if ( state < 2 ) {	done( -1, e );	// Simply rethrow otherwise	} else {	throw e;	}	}	}	// Callback for when everything is done	function done( status, nativeStatusText, responses, headers ) {	var isSuccess, success, error, response, modified,	statusText = nativeStatusText;	// Called once	if ( state === 2 ) {	return;	}	// State is "done" now	state = 2;	// Clear timeout if it exists	if ( timeoutTimer ) {	clearTimeout( timeoutTimer );	}	// Dereference transport for early garbage collection	// (no matter how long the jqXHR object will be used)	transport = undefined;	// Cache response headers	responseHeadersString = headers || "";	// Set readyState	jqXHR.readyState = status > 0 ? 4 : 0;	// Determine if successful	isSuccess = status >= 200 && status < 300 || status === 304;	// Get response data	if ( responses ) {	response = ajaxHandleResponses( s, jqXHR, responses );	}	// Convert no matter what (that way responseXXX fields are always set)	response = ajaxConvert( s, response, jqXHR, isSuccess );	// If successful, handle type chaining	if ( isSuccess ) {	// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.	if ( s.ifModified ) {	modified = jqXHR.getResponseHeader("Last-Modified");	if ( modified ) {	jQuery.lastModified[ cacheURL ] = modified;	}	modified = jqXHR.getResponseHeader("etag");	if ( modified ) {	jQuery.etag[ cacheURL ] = modified;	}	}	// if no content	if ( status === 204 || s.type === "HEAD" ) {	statusText = "nocontent";	// if not modified	} else if ( status === 304 ) {	statusText = "notmodified";	// If we have data, let's convert it	} else {	statusText = response.state;	success = response.data;	error = response.error;	isSuccess = !error;	}	} else {	// We extract error from statusText	// then normalize statusText and status for non-aborts	error = statusText;	if ( status || !statusText ) {	statusText = "error";	if ( status < 0 ) {	status = 0;	}	}	}	// Set data for the fake xhr object	jqXHR.status = status;	jqXHR.statusText = ( nativeStatusText || statusText ) + "";	// Success/Error	if ( isSuccess ) {	deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );	} else {	deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );	}	// Status-dependent callbacks	jqXHR.statusCode( statusCode );	statusCode = undefined;	if ( fireGlobals ) {	globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",	[ jqXHR, s, isSuccess ? success : error ] );	}	// Complete	completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );	if ( fireGlobals ) {	globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );	// Handle the global AJAX counter	if ( !( --jQuery.active ) ) {	jQuery.event.trigger("ajaxStop");	}	}	}	return jqXHR;	},	getJSON: function( url, data, callback ) {	return jQuery.get( url, data, callback, "json" );	},	getScript: function( url, callback ) {	return jQuery.get( url, undefined, callback, "script" );	}
});
jQuery.each( [ "get", "post" ], function( i, method ) {	jQuery[ method ] = function( url, data, callback, type ) {	// shift arguments if data argument was omitted	if ( jQuery.isFunction( data ) ) {	type = type || callback;	callback = data;	data = undefined;	}	return jQuery.ajax({	url: url,	type: method,	dataType: type,	data: data,	success: callback	});	};
});
// Attach a bunch of functions for handling common AJAX events
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {	jQuery.fn[ type ] = function( fn ) {	return this.on( type, fn );	};
});
jQuery._evalUrl = function( url ) {	return jQuery.ajax({	url: url,	type: "GET",	dataType: "script",	async: false,	global: false,	"throws": true	});
};
jQuery.fn.extend({	wrapAll: function( html ) {	var wrap;	if ( jQuery.isFunction( html ) ) {	return this.each(function( i ) {	jQuery( this ).wrapAll( html.call(this, i) );	});	}	if ( this[ 0 ] ) {	// The elements to wrap the target around	wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );	if ( this[ 0 ].parentNode ) {	wrap.insertBefore( this[ 0 ] );	}	wrap.map(function() {	var elem = this;	while ( elem.firstElementChild ) {	elem = elem.firstElementChild;	}	return elem;	}).append( this );	}	return this;	},	wrapInner: function( html ) {	if ( jQuery.isFunction( html ) ) {	return this.each(function( i ) {	jQuery( this ).wrapInner( html.call(this, i) );	});	}	return this.each(function() {	var self = jQuery( this ),	contents = self.contents();	if ( contents.length ) {	contents.wrapAll( html );	} else {	self.append( html );	}	});	},	wrap: function( html ) {	var isFunction = jQuery.isFunction( html );	return this.each(function( i ) {	jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );	});	},	unwrap: function() {	return this.parent().each(function() {	if ( !jQuery.nodeName( this, "body" ) ) {	jQuery( this ).replaceWith( this.childNodes );	}	}).end();	}
});
jQuery.expr.filters.hidden = function( elem ) {	// Support: Opera <= 12.12	// Opera reports offsetWidths and offsetHeights less than zero on some elements	return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
};
jQuery.expr.filters.visible = function( elem ) {	return !jQuery.expr.filters.hidden( elem );
};
var r20 = /%20/g,	rbracket = /\[\]$/,	rCRLF = /\r?\n/g,	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,	rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams( prefix, obj, traditional, add ) {	var name;	if ( jQuery.isArray( obj ) ) {	// Serialize array item.	jQuery.each( obj, function( i, v ) {	if ( traditional || rbracket.test( prefix ) ) {	// Treat each array item as a scalar.	add( prefix, v );	} else {	// Item is non-scalar (array or object), encode its numeric index.	buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );	}	});	} else if ( !traditional && jQuery.type( obj ) === "object" ) {	// Serialize object item.	for ( name in obj ) {	buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );	}	} else {	// Serialize scalar item.	add( prefix, obj );	}
}
// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {	var prefix,	s = [],	add = function( key, value ) {	// If value is a function, invoke it and return its value	value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );	s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );	};	// Set traditional to true for jQuery <= 1.3.2 behavior.	if ( traditional === undefined ) {	traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;	}	// If an array was passed in, assume that it is an array of form elements.	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {	// Serialize the form elements	jQuery.each( a, function() {	add( this.name, this.value );	});	} else {	// If traditional, encode the "old" way (the way 1.3.2 or older	// did it), otherwise encode params recursively.	for ( prefix in a ) {	buildParams( prefix, a[ prefix ], traditional, add );	}	}	// Return the resulting serialization	return s.join( "&" ).replace( r20, "+" );
};
jQuery.fn.extend({	serialize: function() {	return jQuery.param( this.serializeArray() );	},	serializeArray: function() {	return this.map(function() {	// Can add propHook for "elements" to filter or add form elements	var elements = jQuery.prop( this, "elements" );	return elements ? jQuery.makeArray( elements ) : this;	})	.filter(function() {	var type = this.type;	// Use .is( ":disabled" ) so that fieldset[disabled] works	return this.name && !jQuery( this ).is( ":disabled" ) &&	rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&	( this.checked || !rcheckableType.test( type ) );	})	.map(function( i, elem ) {	var val = jQuery( this ).val();	return val == null ?	null :	jQuery.isArray( val ) ?	jQuery.map( val, function( val ) {	return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };	}) :	{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };	}).get();	}
});
jQuery.ajaxSettings.xhr = function() {	try {	return new XMLHttpRequest();	} catch( e ) {}
};
var xhrId = 0,	xhrCallbacks = {},	xhrSuccessStatus = {	// file protocol always yields status code 0, assume 200	0: 200,	// Support: IE9	// #1450: sometimes IE returns 1223 when it should be 204	1223: 204	},	xhrSupported = jQuery.ajaxSettings.xhr();
// Support: IE9
// Open requests must be manually aborted on unload (#5280)
if ( window.ActiveXObject ) {	jQuery( window ).on( "unload", function() {	for ( var key in xhrCallbacks ) {	xhrCallbacks[ key ]();	}	});
}
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;
jQuery.ajaxTransport(function( options ) {	var callback;	// Cross domain only allowed if supported through XMLHttpRequest	if ( support.cors || xhrSupported && !options.crossDomain ) {	return {	send: function( headers, complete ) {	var i,	xhr = options.xhr(),	id = ++xhrId;	xhr.open( options.type, options.url, options.async, options.username, options.password );	// Apply custom fields if provided	if ( options.xhrFields ) {	for ( i in options.xhrFields ) {	xhr[ i ] = options.xhrFields[ i ];	}	}	// Override mime type if needed	if ( options.mimeType && xhr.overrideMimeType ) {	xhr.overrideMimeType( options.mimeType );	}	// X-Requested-With header	// For cross-domain requests, seeing as conditions for a preflight are	// akin to a jigsaw puzzle, we simply never set it to be sure.	// (it can always be set on a per-request basis or even using ajaxSetup)	// For same-domain requests, won't change header if already provided.	if ( !options.crossDomain && !headers["X-Requested-With"] ) {	headers["X-Requested-With"] = "XMLHttpRequest";	}	// Set headers	for ( i in headers ) {	xhr.setRequestHeader( i, headers[ i ] );	}	// Callback	callback = function( type ) {	return function() {	if ( callback ) {	delete xhrCallbacks[ id ];	callback = xhr.onload = xhr.onerror = null;	if ( type === "abort" ) {	xhr.abort();	} else if ( type === "error" ) {	complete(	// file: protocol always yields status 0; see #8605, #14207	xhr.status,	xhr.statusText	);	} else {	complete(	xhrSuccessStatus[ xhr.status ] || xhr.status,	xhr.statusText,	// Support: IE9	// Accessing binary-data responseText throws an exception	// (#11426)	typeof xhr.responseText === "string" ? {	text: xhr.responseText	} : undefined,	xhr.getAllResponseHeaders()	);	}	}	};	};	// Listen to events	xhr.onload = callback();	xhr.onerror = callback("error");	// Create the abort callback	callback = xhrCallbacks[ id ] = callback("abort");	// Do send the request	// This may raise an exception which is actually	// handled in jQuery.ajax (so no try/catch here)	xhr.send( options.hasContent && options.data || null );	},	abort: function() {	if ( callback ) {	callback();	}	}	};	}
});
// Install script dataType
jQuery.ajaxSetup({	accepts: {	script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"	},	contents: {	script: /(?:java|ecma)script/	},	converters: {	"text script": function( text ) {	jQuery.globalEval( text );	return text;	}	}
});
// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {	if ( s.cache === undefined ) {	s.cache = false;	}	if ( s.crossDomain ) {	s.type = "GET";	}
});
// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {	// This transport only deals with cross domain requests	if ( s.crossDomain ) {	var script, callback;	return {	send: function( _, complete ) {	script = jQuery("<script>").prop({	async: true,	charset: s.scriptCharset,	src: s.url	}).on(	"load error",	callback = function( evt ) {	script.remove();	callback = null;	if ( evt ) {	complete( evt.type === "error" ? 404 : 200, evt.type );	}	}	);	document.head.appendChild( script[ 0 ] );	},	abort: function() {	if ( callback ) {	callback();	}	}	};	}
});
var oldCallbacks = [],	rjsonp = /(=)\?(?=&|$)|\?\?/;
// Default jsonp settings
jQuery.ajaxSetup({	jsonp: "callback",	jsonpCallback: function() {	var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );	this[ callback ] = true;	return callback;	}
});
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {	var callbackName, overwritten, responseContainer,	jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?	"url" :	typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"	);	// Handle iff the expected data type is "jsonp" or we have a parameter to set	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {	// Get callback name, remembering preexisting value associated with it	callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?	s.jsonpCallback() :	s.jsonpCallback;	// Insert callback into url or form data	if ( jsonProp ) {	s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );	} else if ( s.jsonp !== false ) {	s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;	}	// Use data converter to retrieve json after script execution	s.converters["script json"] = function() {	if ( !responseContainer ) {	jQuery.error( callbackName + " was not called" );	}	return responseContainer[ 0 ];	};	// force json dataType	s.dataTypes[ 0 ] = "json";	// Install callback	overwritten = window[ callbackName ];	window[ callbackName ] = function() {	responseContainer = arguments;	};	// Clean-up function (fires after converters)	jqXHR.always(function() {	// Restore preexisting value	window[ callbackName ] = overwritten;	// Save back as free	if ( s[ callbackName ] ) {	// make sure that re-using the options doesn't screw things around	s.jsonpCallback = originalSettings.jsonpCallback;	// save the callback name for future use	oldCallbacks.push( callbackName );	}	// Call if it was a function and we have a response	if ( responseContainer && jQuery.isFunction( overwritten ) ) {	overwritten( responseContainer[ 0 ] );	}	responseContainer = overwritten = undefined;	});	// Delegate to script	return "script";	}
});
// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {	if ( !data || typeof data !== "string" ) {	return null;	}	if ( typeof context === "boolean" ) {	keepScripts = context;	context = false;	}	context = context || document;	var parsed = rsingleTag.exec( data ),	scripts = !keepScripts && [];	// Single tag	if ( parsed ) {	return [ context.createElement( parsed[1] ) ];	}	parsed = jQuery.buildFragment( [ data ], context, scripts );	if ( scripts && scripts.length ) {	jQuery( scripts ).remove();	}	return jQuery.merge( [], parsed.childNodes );
};
// Keep a copy of the old load method
var _load = jQuery.fn.load;
/** * Load a url into a page */
jQuery.fn.load = function( url, params, callback ) {	if ( typeof url !== "string" && _load ) {	return _load.apply( this, arguments );	}	var selector, type, response,	self = this,	off = url.indexOf(" ");	if ( off >= 0 ) {	selector = url.slice( off );	url = url.slice( 0, off );	}	// If it's a function	if ( jQuery.isFunction( params ) ) {	// We assume that it's the callback	callback = params;	params = undefined;	// Otherwise, build a param string	} else if ( params && typeof params === "object" ) {	type = "POST";	}	// If we have elements to modify, make the request	if ( self.length > 0 ) {	jQuery.ajax({	url: url,	// if "type" variable is undefined, then "GET" method will be used	type: type,	dataType: "html",	data: params	}).done(function( responseText ) {	// Save response for use in complete callback	response = arguments;	self.html( selector ?	// If a selector was specified, locate the right elements in a dummy div	// Exclude scripts to avoid IE 'Permission Denied' errors	jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :	// Otherwise use the full result	responseText );	}).complete( callback && function( jqXHR, status ) {	self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );	});	}	return this;
};
jQuery.expr.filters.animated = function( elem ) {	return jQuery.grep(jQuery.timers, function( fn ) {	return elem === fn.elem;	}).length;
};
var docElem = window.document.documentElement;
/** * Gets a window from an element */
function getWindow( elem ) {	return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
}
jQuery.offset = {	setOffset: function( elem, options, i ) {	var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,	position = jQuery.css( elem, "position" ),	curElem = jQuery( elem ),	props = {};	// Set position first, in-case top/left are set even on static elem	if ( position === "static" ) {	elem.style.position = "relative";	}	curOffset = curElem.offset();	curCSSTop = jQuery.css( elem, "top" );	curCSSLeft = jQuery.css( elem, "left" );	calculatePosition = ( position === "absolute" || position === "fixed" ) &&	( curCSSTop + curCSSLeft ).indexOf("auto") > -1;	// Need to be able to calculate position if either top or left is auto and position is either absolute or fixed	if ( calculatePosition ) {	curPosition = curElem.position();	curTop = curPosition.top;	curLeft = curPosition.left;	} else {	curTop = parseFloat( curCSSTop ) || 0;	curLeft = parseFloat( curCSSLeft ) || 0;	}	if ( jQuery.isFunction( options ) ) {	options = options.call( elem, i, curOffset );	}	if ( options.top != null ) {	props.top = ( options.top - curOffset.top ) + curTop;	}	if ( options.left != null ) {	props.left = ( options.left - curOffset.left ) + curLeft;	}	if ( "using" in options ) {	options.using.call( elem, props );	} else {	curElem.css( props );	}	}
};
jQuery.fn.extend({	offset: function( options ) {	if ( arguments.length ) {	return options === undefined ?	this :	this.each(function( i ) {	jQuery.offset.setOffset( this, options, i );	});	}	var docElem, win,	elem = this[ 0 ],	box = { top: 0, left: 0 },	doc = elem && elem.ownerDocument;	if ( !doc ) {	return;	}	docElem = doc.documentElement;	// Make sure it's not a disconnected DOM node	if ( !jQuery.contains( docElem, elem ) ) {	return box;	}	// If we don't have gBCR, just use 0,0 rather than error	// BlackBerry 5, iOS 3 (original iPhone)	if ( typeof elem.getBoundingClientRect !== strundefined ) {	box = elem.getBoundingClientRect();	}	win = getWindow( doc );	return {	top: box.top + win.pageYOffset - docElem.clientTop,	left: box.left + win.pageXOffset - docElem.clientLeft	};	},	position: function() {	if ( !this[ 0 ] ) {	return;	}	var offsetParent, offset,	elem = this[ 0 ],	parentOffset = { top: 0, left: 0 };	// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent	if ( jQuery.css( elem, "position" ) === "fixed" ) {	// We assume that getBoundingClientRect is available when computed position is fixed	offset = elem.getBoundingClientRect();	} else {	// Get *real* offsetParent	offsetParent = this.offsetParent();	// Get correct offsets	offset = this.offset();	if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {	parentOffset = offsetParent.offset();	}	// Add offsetParent borders	parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );	parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );	}	// Subtract parent offsets and element margins	return {	top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),	left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )	};	},	offsetParent: function() {	return this.map(function() {	var offsetParent = this.offsetParent || docElem;	while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {	offsetParent = offsetParent.offsetParent;	}	return offsetParent || docElem;	});	}
});
// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {	var top = "pageYOffset" === prop;	jQuery.fn[ method ] = function( val ) {	return access( this, function( elem, method, val ) {	var win = getWindow( elem );	if ( val === undefined ) {	return win ? win[ prop ] : elem[ method ];	}	if ( win ) {	win.scrollTo(	!top ? val : window.pageXOffset,	top ? val : window.pageYOffset	);	} else {	elem[ method ] = val;	}	}, method, val, arguments.length, null );	};
});
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// getComputedStyle returns percent when specified for top/left/bottom/right
// rather than make the css module depend on the offset module, we just check for it here
jQuery.each( [ "top", "left" ], function( i, prop ) {	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,	function( elem, computed ) {	if ( computed ) {	computed = curCSS( elem, prop );	// if curCSS returns percentage, fallback to offset	return rnumnonpx.test( computed ) ?	jQuery( elem ).position()[ prop ] + "px" :	computed;	}	}	);
});
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {	// margin is only for outerHeight, outerWidth	jQuery.fn[ funcName ] = function( margin, value ) {	var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),	extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );	return access( this, function( elem, type, value ) {	var doc;	if ( jQuery.isWindow( elem ) ) {	// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there	// isn't a whole lot we can do. See pull request at this URL for discussion:	// https://github.com/jquery/jquery/pull/764	return elem.document.documentElement[ "client" + name ];	}	// Get document width or height	if ( elem.nodeType === 9 ) {	doc = elem.documentElement;	// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],	// whichever is greatest	return Math.max(	elem.body[ "scroll" + name ], doc[ "scroll" + name ],	elem.body[ "offset" + name ], doc[ "offset" + name ],	doc[ "client" + name ]	);	}	return value === undefined ?	// Get width or height on the element, requesting but not forcing parseFloat	jQuery.css( elem, type, extra ) :	// Set width or height on the element	jQuery.style( elem, type, value, extra );	}, type, chainable ? margin : undefined, chainable, null );	};	});
});
// The number of elements contained in the matched element set
jQuery.fn.size = function() {	return this.length;
};
jQuery.fn.andSelf = jQuery.fn.addBack;
// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.
if ( typeof define === "function" && define.amd ) {	define( "jquery", [], function() {	return jQuery;	});
}
var	// Map over jQuery in case of overwrite	_jQuery = window.jQuery,	// Map over the $ in case of overwrite	_$ = window.$;
jQuery.noConflict = function( deep ) {	if ( window.$ === jQuery ) {	window.$ = _$;	}	if ( deep && window.jQuery === jQuery ) {	window.jQuery = _jQuery;	}	return jQuery;
};
// Expose jQuery and $ identifiers, even in
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeof noGlobal === strundefined ) {	window.jQuery = window.$ = jQuery;
}
return jQuery;
}));
/*! * jQuery Validation Plugin 1.11.1 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * https://docs.jquery.com/Plugins/Validation * * Copyright 2013 Jörn Zaefferer * Released under the MIT license: * https://www.opensource.org/licenses/mit-license.php */
(function($) {
$.extend($.fn, {	// https://docs.jquery.com/Plugins/Validation/validate	validate: function( options ) {	// if nothing is selected, return nothing; can't chain anyway	if ( !this.length ) {	if ( options && options.debug && window.console ) {	console.warn( "Nothing selected, can't validate, returning nothing." );	}	return;	}	// check if a validator for this form was already created	var validator = $.data( this[0], "validator" );	if ( validator ) {	return validator;	}	// Add novalidate tag if HTML5.	this.attr( "novalidate", "novalidate" );	validator = new $.validator( options, this[0] );	$.data( this[0], "validator", validator );	if ( validator.settings.onsubmit ) {	this.validateDelegate( ":submit", "click", function( event ) {	if ( validator.settings.submitHandler ) {	validator.submitButton = event.target;	}	// allow suppressing validation by adding a cancel class to the submit button	if ( $(event.target).hasClass("cancel") ) {	validator.cancelSubmit = true;	}	// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button	if ( $(event.target).attr("formnovalidate") !== undefined ) {	validator.cancelSubmit = true;	}	});	// validate the form on submit	this.submit( function( event ) {	if ( validator.settings.debug ) {	// prevent form submit to be able to see console output	event.preventDefault();	}	function handle() {	var hidden;	if ( validator.settings.submitHandler ) {	if ( validator.submitButton ) {	// insert a hidden input as a replacement for the missing submit button	hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);	}	validator.settings.submitHandler.call( validator, validator.currentForm, event );	if ( validator.submitButton ) {	// and clean up afterwards; thanks to no-block-scope, hidden can be referenced	hidden.remove();	}	return false;	}	return true;	}	// prevent submit for invalid forms or custom submit handlers	if ( validator.cancelSubmit ) {	validator.cancelSubmit = false;	return handle();	}	if ( validator.form() ) {	if ( validator.pendingRequest ) {	validator.formSubmitted = true;	return false;	}	return handle();	} else {	validator.focusInvalid();	return false;	}	});	}	return validator;	},	// https://docs.jquery.com/Plugins/Validation/valid	valid: function() {	if ( $(this[0]).is("form")) {	return this.validate().form();	} else {	var valid = true;	var validator = $(this[0].form).validate();	this.each(function() {	valid = valid && validator.element(this);	});	return valid;	}	},	// attributes: space seperated list of attributes to retrieve and remove	removeAttrs: function( attributes ) {	var result = {},	$element = this;	$.each(attributes.split(/\s/), function( index, value ) {	result[value] = $element.attr(value);	$element.removeAttr(value);	});	return result;	},	// https://docs.jquery.com/Plugins/Validation/rules	rules: function( command, argument ) {	var element = this[0];	if ( command ) {	var settings = $.data(element.form, "validator").settings;	var staticRules = settings.rules;	var existingRules = $.validator.staticRules(element);	switch(command) {	case "add":	$.extend(existingRules, $.validator.normalizeRule(argument));	// remove messages from rules, but allow them to be set separetely	delete existingRules.messages;	staticRules[element.name] = existingRules;	if ( argument.messages ) {	settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );	}	break;	case "remove":	if ( !argument ) {	delete staticRules[element.name];	return existingRules;	}	var filtered = {};	$.each(argument.split(/\s/), function( index, method ) {	filtered[method] = existingRules[method];	delete existingRules[method];	});	return filtered;	}	}	var data = $.validator.normalizeRules(	$.extend(	{},	$.validator.classRules(element),	$.validator.attributeRules(element),	$.validator.dataRules(element),	$.validator.staticRules(element)	), element);	// make sure required is at front	if ( data.required ) {	var param = data.required;	delete data.required;	data = $.extend({required: param}, data);	}	return data;	}
});
// Custom selectors
$.extend($.expr[":"], {	// https://docs.jquery.com/Plugins/Validation/blank	blank: function( a ) { return !$.trim("" + $(a).val()); },	// https://docs.jquery.com/Plugins/Validation/filled	filled: function( a ) { return !!$.trim("" + $(a).val()); },	// https://docs.jquery.com/Plugins/Validation/unchecked	unchecked: function( a ) { return !$(a).prop("checked"); }
});
// constructor for validator
$.validator = function( options, form ) {	this.settings = $.extend( true, {}, $.validator.defaults, options );	this.currentForm = form;	this.init();
};
$.validator.format = function( source, params ) {	if ( arguments.length === 1 ) {	return function() {	var args = $.makeArray(arguments);	args.unshift(source);	return $.validator.format.apply( this, args );	};	}	if ( arguments.length > 2 && params.constructor !== Array ) {	params = $.makeArray(arguments).slice(1);	}	if ( params.constructor !== Array ) {	params = [ params ];	}	$.each(params, function( i, n ) {	source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {	return n;	});	});	return source;
};
$.extend($.validator, {	defaults: {	messages: {},	groups: {},	rules: {},	errorClass: "error",	validClass: "valid",	errorElement: "label",	focusInvalid: true,	errorContainer: $([]),	errorLabelContainer: $([]),	onsubmit: true,	ignore: ":hidden",	ignoreTitle: false,	onfocusin: function( element, event ) {	this.lastActive = element;	// hide error label and remove error class on focus if enabled	if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {	if ( this.settings.unhighlight ) {	this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );	}	this.addWrapper(this.errorsFor(element)).hide();	}	},	onfocusout: function( element, event ) {	if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {	this.element(element);	}	},	onkeyup: function( element, event ) {	if ( event.which === 9 && this.elementValue(element) === "" ) {	return;	} else if ( element.name in this.submitted || element === this.lastElement ) {	this.element(element);	}	},	onclick: function( element, event ) {	// click on selects, radiobuttons and checkboxes	if ( element.name in this.submitted ) {	this.element(element);	}	// or option elements, check parent select in that case	else if ( element.parentNode.name in this.submitted ) {	this.element(element.parentNode);	}	},	highlight: function( element, errorClass, validClass ) {	if ( element.type === "radio" ) {	this.findByName(element.name).addClass(errorClass).removeClass(validClass);	} else {	$(element).addClass(errorClass).removeClass(validClass);	}	},	unhighlight: function( element, errorClass, validClass ) {	if ( element.type === "radio" ) {	this.findByName(element.name).removeClass(errorClass).addClass(validClass);	} else {	$(element).removeClass(errorClass).addClass(validClass);	}	}	},	// https://docs.jquery.com/Plugins/Validation/Validator/setDefaults	setDefaults: function( settings ) {	$.extend( $.validator.defaults, settings );	},	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: $.validator.format("Please enter no more than {0} characters."),	minlength: $.validator.format("Please enter at least {0} characters."),	rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),	range: $.validator.format("Please enter a value between {0} and {1}."),	max: $.validator.format("Please enter a value less than or equal to {0}."),	min: $.validator.format("Please enter a value greater than or equal to {0}.")	},	autoCreateRanges: false,	prototype: {	init: function() {	this.labelContainer = $(this.settings.errorLabelContainer);	this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);	this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );	this.submitted = {};	this.valueCache = {};	this.pendingRequest = 0;	this.pending = {};	this.invalid = {};	this.reset();	var groups = (this.groups = {});	$.each(this.settings.groups, function( key, value ) {	if ( typeof value === "string" ) {	value = value.split(/\s/);	}	$.each(value, function( index, name ) {	groups[name] = key;	});	});	var rules = this.settings.rules;	$.each(rules, function( key, value ) {	rules[key] = $.validator.normalizeRule(value);	});	function delegate(event) {	var validator = $.data(this[0].form, "validator"),	eventType = "on" + event.type.replace(/^validate/, "");	if ( validator.settings[eventType] ) {	validator.settings[eventType].call(validator, this[0], event);	}	}	$(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", delegate)	.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);	if ( this.settings.invalidHandler ) {	$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);	}	},	// https://docs.jquery.com/Plugins/Validation/Validator/form	form: function() {	this.checkForm();	$.extend(this.submitted, this.errorMap);	this.invalid = $.extend({}, this.errorMap);	if ( !this.valid() ) {	$(this.currentForm).triggerHandler("invalid-form", [this]);	}	this.showErrors();	return this.valid();	},	checkForm: function() {	this.prepareForm();	for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {	this.check( elements[i] );	}	return this.valid();	},	// https://docs.jquery.com/Plugins/Validation/Validator/element	element: function( element ) {	element = this.validationTargetFor( this.clean( element ) );	this.lastElement = element;	this.prepareElement( element );	this.currentElements = $(element);	var result = this.check( element ) !== false;	if ( result ) {	delete this.invalid[element.name];	} else {	this.invalid[element.name] = true;	}	if ( !this.numberOfInvalids() ) {	// Hide error containers on last error	this.toHide = this.toHide.add( this.containers );	}	this.showErrors();	return result;	},	// https://docs.jquery.com/Plugins/Validation/Validator/showErrors	showErrors: function( errors ) {	if ( errors ) {	// add items to error list and map	$.extend( this.errorMap, errors );	this.errorList = [];	for ( var name in errors ) {	this.errorList.push({	message: errors[name],	element: this.findByName(name)[0]	});	}	// remove items from success list	this.successList = $.grep( this.successList, function( element ) {	return !(element.name in errors);	});	}	if ( this.settings.showErrors ) {	this.settings.showErrors.call( this, this.errorMap, this.errorList );	} else {	this.defaultShowErrors();	}	},	// https://docs.jquery.com/Plugins/Validation/Validator/resetForm	resetForm: function() {	if ( $.fn.resetForm ) {	$(this.currentForm).resetForm();	}	this.submitted = {};	this.lastElement = null;	this.prepareForm();	this.hideErrors();	this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );	},	numberOfInvalids: function() {	return this.objectLength(this.invalid);	},	objectLength: function( obj ) {	var count = 0;	for ( var i in obj ) {	count++;	}	return count;	},	hideErrors: function() {	this.addWrapper( this.toHide ).hide();	},	valid: function() {	return this.size() === 0;	},	size: function() {	return this.errorList.length;	},	focusInvalid: function() {	if ( this.settings.focusInvalid ) {	try {	$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])	.filter(":visible")	.focus()	// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find	.trigger("focusin");	} catch(e) {	// ignore IE throwing errors when focusing hidden elements	}	}	},	findLastActive: function() {	var lastActive = this.lastActive;	return lastActive && $.grep(this.errorList, function( n ) {	return n.element.name === lastActive.name;	}).length === 1 && lastActive;	},	elements: function() {	var validator = this,	rulesCache = {};	// select all valid inputs inside the form (no submit or reset buttons)	return $(this.currentForm)	.find("input, select, textarea")	.not(":submit, :reset, :image, [disabled]")	.not( this.settings.ignore )	.filter(function() {	if ( !this.name && validator.settings.debug && window.console ) {	console.error( "%o has no name assigned", this);	}	// select only the first element for each name, and only those with rules specified	if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {	return false;	}	rulesCache[this.name] = true;	return true;	});	},	clean: function( selector ) {	return $(selector)[0];	},	errors: function() {	var errorClass = this.settings.errorClass.replace(" ", ".");	return $(this.settings.errorElement + "." + errorClass, this.errorContext);	},	reset: function() {	this.successList = [];	this.errorList = [];	this.errorMap = {};	this.toShow = $([]);	this.toHide = $([]);	this.currentElements = $([]);	},	prepareForm: function() {	this.reset();	this.toHide = this.errors().add( this.containers );	},	prepareElement: function( element ) {	this.reset();	this.toHide = this.errorsFor(element);	},	elementValue: function( element ) {	var type = $(element).attr("type"),	val = $(element).val();	if ( type === "radio" || type === "checkbox" ) {	return $("input[name='" + $(element).attr("name") + "']:checked").val();	}	if ( typeof val === "string" ) {	return val.replace(/\r/g, "");	}	return val;	},	check: function( element ) {	element = this.validationTargetFor( this.clean( element ) );	var rules = $(element).rules();	var dependencyMismatch = false;	var val = this.elementValue(element);	var result;	for (var method in rules ) {	var rule = { method: method, parameters: rules[method] };	try {	result = $.validator.methods[method].call( this, val, element, rule.parameters );	// if a method indicates that the field is optional and therefore valid,	// don't mark it as valid when there are no other rules	if ( result === "dependency-mismatch" ) {	dependencyMismatch = true;	continue;	}	dependencyMismatch = false;	if ( result === "pending" ) {	this.toHide = this.toHide.not( this.errorsFor(element) );	return;	}	if ( !result ) {	this.formatAndAdd( element, rule );	return false;	}	} catch(e) {	if ( this.settings.debug && window.console ) {	console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );	}	throw e;	}	}	if ( dependencyMismatch ) {	return;	}	if ( this.objectLength(rules) ) {	this.successList.push(element);	}	return true;	},	// return the custom message for the given element and validation method	// specified in the element's HTML5 data attribute	customDataMessage: function( element, method ) {	return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));	},	// return the custom message for the given element name and validation method	customMessage: function( name, method ) {	var m = this.settings.messages[name];	return m && (m.constructor === String ? m : m[method]);	},	// return the first defined argument, allowing empty strings	findDefined: function() {	for(var i = 0; i < arguments.length; i++) {	if ( arguments[i] !== undefined ) {	return arguments[i];	}	}	return undefined;	},	defaultMessage: function( element, method ) {	return this.findDefined(	this.customMessage( element.name, method ),	this.customDataMessage( element, method ),	// title is never undefined, so handle empty string as undefined	!this.settings.ignoreTitle && element.title || undefined,	$.validator.messages[method],	"<strong>Warning: No message defined for " + element.name + "</strong>"	);	},	formatAndAdd: function( element, rule ) {	var message = this.defaultMessage( element, rule.method ),	theregex = /\$?\{(\d+)\}/g;	if ( typeof message === "function" ) {	message = message.call(this, rule.parameters, element);	} else if (theregex.test(message)) {	message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);	}	this.errorList.push({	message: message,	element: element	});	this.errorMap[element.name] = message;	this.submitted[element.name] = message;	},	addWrapper: function( toToggle ) {	if ( this.settings.wrapper ) {	toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );	}	return toToggle;	},	defaultShowErrors: function() {	var i, elements;	for ( i = 0; this.errorList[i]; i++ ) {	var error = this.errorList[i];	if ( this.settings.highlight ) {	this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );	}	this.showLabel( error.element, error.message );	}	if ( this.errorList.length ) {	this.toShow = this.toShow.add( this.containers );	}	if ( this.settings.success ) {	for ( i = 0; this.successList[i]; i++ ) {	this.showLabel( this.successList[i] );	}	}	if ( this.settings.unhighlight ) {	for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {	this.settings.unhighlight.call( this, elements[i], 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 $(this.errorList).map(function() {	return this.element;	});	},	showLabel: function( element, message ) {	var label = this.errorsFor( element );	if ( label.length ) {	// refresh error/success class	label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );	// replace message on existing label	label.html(message);	} else {	// create label	label = $("<" + this.settings.errorElement + ">")	.attr("for", this.idOrName(element))	.addClass(this.settings.errorClass)	.html(message || "");	if ( this.settings.wrapper ) {	// make sure the element is visible, even in IE	// actually showing the wrapped element is handled elsewhere	label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();	}	if ( !this.labelContainer.append(label).length ) {	if ( this.settings.errorPlacement ) {	this.settings.errorPlacement(label, $(element) );	} else {	label.insertAfter(element);	}	}	}	if ( !message && this.settings.success ) {	label.text("");	if ( typeof this.settings.success === "string" ) {	label.addClass( this.settings.success );	} else {	this.settings.success( label, element );	}	}	this.toShow = this.toShow.add(label);	},	errorsFor: function( element ) {	var name = this.idOrName(element);	return this.errors().filter(function() {	return $(this).attr("for") === name;	});	},	idOrName: function( element ) {	return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);	},	validationTargetFor: function( element ) {	// if radio/checkbox, validate first element in group instead	if ( this.checkable(element) ) {	element = this.findByName( element.name ).not(this.settings.ignore)[0];	}	return element;	},	checkable: function( element ) {	return (/radio|checkbox/i).test(element.type);	},	findByName: function( name ) {	return $(this.currentForm).find("[name='" + name + "']");	},	getLength: function( value, element ) {	switch( element.nodeName.toLowerCase() ) {	case "select":	return $("option:selected", element).length;	case "input":	if ( this.checkable( element) ) {	return this.findByName(element.name).filter(":checked").length;	}	}	return value.length;	},	depend: function( param, element ) {	return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;	},	dependTypes: {	"boolean": function( param, element ) {	return param;	},	"string": function( param, element ) {	return !!$(param, element.form).length;	},	"function": function( param, element ) {	return param(element);	}	},	optional: function( element ) {	var val = this.elementValue(element);	return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";	},	startRequest: function( element ) {	if ( !this.pending[element.name] ) {	this.pendingRequest++;	this.pending[element.name] = true;	}	},	stopRequest: function( element, valid ) {	this.pendingRequest--;	// sometimes synchronization fails, make sure pendingRequest is never < 0	if ( this.pendingRequest < 0 ) {	this.pendingRequest = 0;	}	delete this.pending[element.name];	if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {	$(this.currentForm).submit();	this.formSubmitted = false;	} else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {	$(this.currentForm).triggerHandler("invalid-form", [this]);	this.formSubmitted = false;	}	},	previousValue: function( element ) {	return $.data(element, "previousValue") || $.data(element, "previousValue", {	old: null,	valid: true,	message: this.defaultMessage( element, "remote" )	});	}	},	classRuleSettings: {	required: {required: true},	email: {email: true},	url: {url: true},	date: {date: true},	dateISO: {dateISO: true},	number: {number: true},	digits: {digits: true},	creditcard: {creditcard: true}	},	addClassRules: function( className, rules ) {	if ( className.constructor === String ) {	this.classRuleSettings[className] = rules;	} else {	$.extend(this.classRuleSettings, className);	}	},	classRules: function( element ) {	var rules = {};	var classes = $(element).attr("class");	if ( classes ) {	$.each(classes.split(" "), function() {	if ( this in $.validator.classRuleSettings ) {	$.extend(rules, $.validator.classRuleSettings[this]);	}	});	}	return rules;	},	attributeRules: function( element ) {	var rules = {};	var $element = $(element);	var type = $element[0].getAttribute("type");	for (var method in $.validator.methods) {	var value;	// support for <input required> in both html5 and older browsers	if ( method === "required" ) {	value = $element.get(0).getAttribute(method);	// Some browsers return an empty string for the required attribute	// and non-HTML5 browsers might have required="" markup	if ( value === "" ) {	value = true;	}	// force non-HTML5 browsers to return bool	value = !!value;	} else {	value = $element.attr(method);	}	// convert the value to a number for number inputs, and for text for backwards compability	// allows type="date" and others to be compared as strings	if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {	value = Number(value);	}	if ( value ) {	rules[method] = value;	} else if ( type === method && type !== 'range' ) {	// exception: the jquery validate 'range' method	// does not test for the html5 'range' type	rules[method] = true;	}	}	// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs	if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {	delete rules.maxlength;	}	return rules;	},	dataRules: function( element ) {	var method, value,	rules = {}, $element = $(element);	for (method in $.validator.methods) {	value = $element.data("rule-" + method.toLowerCase());	if ( value !== undefined ) {	rules[method] = value;	}	}	return rules;	},	staticRules: function( element ) {	var rules = {};	var validator = $.data(element.form, "validator");	if ( validator.settings.rules ) {	rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};	}	return rules;	},	normalizeRules: function( rules, element ) {	// handle dependency check	$.each(rules, function( prop, val ) {	// ignore rule when param is explicitly false, eg. required:false	if ( val === false ) {	delete rules[prop];	return;	}	if ( val.param || val.depends ) {	var keepRule = true;	switch (typeof val.depends) {	case "string":	keepRule = !!$(val.depends, element.form).length;	break;	case "function":	keepRule = val.depends.call(element, element);	break;	}	if ( keepRule ) {	rules[prop] = val.param !== undefined ? val.param : true;	} else {	delete rules[prop];	}	}	});	// evaluate parameters	$.each(rules, function( rule, parameter ) {	rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;	});	// clean number parameters	$.each(['minlength', 'maxlength'], function() {	if ( rules[this] ) {	rules[this] = Number(rules[this]);	}	});	$.each(['rangelength', 'range'], function() {	var parts;	if ( rules[this] ) {	if ( $.isArray(rules[this]) ) {	rules[this] = [Number(rules[this][0]), Number(rules[this][1])];	} else if ( typeof rules[this] === "string" ) {	parts = rules[this].split(/[\s,]+/);	rules[this] = [Number(parts[0]), Number(parts[1])];	}	}	});	if ( $.validator.autoCreateRanges ) {	// auto-create ranges	if ( rules.min && rules.max ) {	rules.range = [rules.min, rules.max];	delete rules.min;	delete rules.max;	}	if ( rules.minlength && rules.maxlength ) {	rules.rangelength = [rules.minlength, rules.maxlength];	delete rules.minlength;	delete rules.maxlength;	}	}	return rules;	},	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}	normalizeRule: function( data ) {	if ( typeof data === "string" ) {	var transformed = {};	$.each(data.split(/\s/), function() {	transformed[this] = true;	});	data = transformed;	}	return data;	},	// https://docs.jquery.com/Plugins/Validation/Validator/addMethod	addMethod: function( name, method, message ) {	$.validator.methods[name] = method;	$.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];	if ( method.length < 3 ) {	$.validator.addClassRules(name, $.validator.normalizeRule(name));	}	},	methods: {	// https://docs.jquery.com/Plugins/Validation/Methods/required	required: function( value, element, param ) {	// check if dependency is met	if ( !this.depend(param, element) ) {	return "dependency-mismatch";	}	if ( element.nodeName.toLowerCase() === "select" ) {	// could be an array for select-multiple or a string, both are fine this way	var val = $(element).val();	return val && val.length > 0;	}	if ( this.checkable(element) ) {	return this.getLength(value, element) > 0;	}	return $.trim(value).length > 0;	},	// https://docs.jquery.com/Plugins/Validation/Methods/email	email: function( value, element ) {	// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/	return this.optional(element) || /^((([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(value);	},	// https://docs.jquery.com/Plugins/Validation/Methods/url	url: function( value, element ) {	// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/	return this.optional(element) || /^(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(value);	},	// https://docs.jquery.com/Plugins/Validation/Methods/date	date: function( value, element ) {	return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());	},	// https://docs.jquery.com/Plugins/Validation/Methods/dateISO	dateISO: function( value, element ) {	return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);	},	// https://docs.jquery.com/Plugins/Validation/Methods/number	number: function( value, element ) {	return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);	},	// https://docs.jquery.com/Plugins/Validation/Methods/digits	digits: function( value, element ) {	return this.optional(element) || /^\d+$/.test(value);	},	// https://docs.jquery.com/Plugins/Validation/Methods/creditcard	// based on http://en.wikipedia.org/wiki/Luhn	creditcard: function( value, element ) {	if ( this.optional(element) ) {	return "dependency-mismatch";	}	// accept only spaces, digits and dashes	if ( /[^0-9 \-]+/.test(value) ) {	return false;	}	var nCheck = 0,	nDigit = 0,	bEven = false;	value = value.replace(/\D/g, "");	for (var n = value.length - 1; n >= 0; n--) {	var cDigit = value.charAt(n);	nDigit = parseInt(cDigit, 10);	if ( bEven ) {	if ( (nDigit *= 2) > 9 ) {	nDigit -= 9;	}	}	nCheck += nDigit;	bEven = !bEven;	}	return (nCheck % 10) === 0;	},	// https://docs.jquery.com/Plugins/Validation/Methods/minlength	minlength: function( value, element, param ) {	var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);	return this.optional(element) || length >= param;	},	// https://docs.jquery.com/Plugins/Validation/Methods/maxlength	maxlength: function( value, element, param ) {	var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);	return this.optional(element) || length <= param;	},	// https://docs.jquery.com/Plugins/Validation/Methods/rangelength	rangelength: function( value, element, param ) {	var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);	return this.optional(element) || ( length >= param[0] && length <= param[1] );	},	// https://docs.jquery.com/Plugins/Validation/Methods/min	min: function( value, element, param ) {	return this.optional(element) || value >= param;	},	// https://docs.jquery.com/Plugins/Validation/Methods/max	max: function( value, element, param ) {	return this.optional(element) || value <= param;	},	// https://docs.jquery.com/Plugins/Validation/Methods/range	range: function( value, element, param ) {	return this.optional(element) || ( value >= param[0] && value <= param[1] );	},	// https://docs.jquery.com/Plugins/Validation/Methods/equalTo	equalTo: function( value, element, param ) {	// bind to the blur event of the target in order to revalidate whenever the target field is updated	// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead	var target = $(param);	if ( this.settings.onfocusout ) {	target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {	$(element).valid();	});	}	return value === target.val();	},	// https://docs.jquery.com/Plugins/Validation/Methods/remote	remote: function( value, element, param ) {	if ( this.optional(element) ) {	return "dependency-mismatch";	}	var previous = this.previousValue(element);	if (!this.settings.messages[element.name] ) {	this.settings.messages[element.name] = {};	}	previous.originalMessage = this.settings.messages[element.name].remote;	this.settings.messages[element.name].remote = previous.message;	param = typeof param === "string" && {url:param} || param;	if ( previous.old === value ) {	return previous.valid;	}	previous.old = value;	var validator = this;	this.startRequest(element);	var data = {};	data[element.name] = value;	$.ajax($.extend(true, {	url: param,	mode: "abort",	port: "validate" + element.name,	dataType: "json",	data: data,	success: function( response ) {	validator.settings.messages[element.name].remote = previous.originalMessage;	var valid = response === true || response === "true";	if ( valid ) {	var submitted = validator.formSubmitted;	validator.prepareElement(element);	validator.formSubmitted = submitted;	validator.successList.push(element);	delete validator.invalid[element.name];	validator.showErrors();	} else {	var errors = {};	var message = response || validator.defaultMessage( element, "remote" );	errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;	validator.invalid[element.name] = true;	validator.showErrors(errors);	}	previous.valid = valid;	validator.stopRequest(element, valid);	}	}, param));	return "pending";	}	}
});
// deprecated, use $.validator.format instead
$.format = $.validator.format;
}(jQuery));
// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
(function($) {	var pendingRequests = {};	// Use a prefilter if available (1.5+)	if ( $.ajaxPrefilter ) {	$.ajaxPrefilter(function( settings, _, xhr ) {	var port = settings.port;	if ( settings.mode === "abort" ) {	if ( pendingRequests[port] ) {	pendingRequests[port].abort();	}	pendingRequests[port] = xhr;	}	});	} else {	// Proxy ajax	var ajax = $.ajax;	$.ajax = function( settings ) {	var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,	port = ( "port" in settings ? settings : $.ajaxSettings ).port;	if ( mode === "abort" ) {	if ( pendingRequests[port] ) {	pendingRequests[port].abort();	}	pendingRequests[port] = ajax.apply(this, arguments);	return pendingRequests[port];	}	return ajax.apply(this, arguments);	};	}
}(jQuery));
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
(function($) {	$.extend($.fn, {	validateDelegate: function( delegate, type, handler ) {	return this.bind(type, function( event ) {	var target = $(event.target);	if ( target.is(delegate) ) {	return handler.apply(target, arguments);	}	});	}	});
}(jQuery));
/* NUGET: BEGIN LICENSE TEXT * * Microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the Microsoft * website or online service, subject to the applicable licensing or use * terms; or (ii) using the files as included with a Microsoft product subject * to that product's license terms. Microsoft reserves all other rights to the * files not expressly granted by Microsoft, whether by implication, estoppel * or otherwise. Insofar as a script file is dual licensed under GPL, * Microsoft neither took the code under GPL nor distributes it thereunder but * under the terms set out in this paragraph. All notices and licenses * below are for informational purposes only. * * NUGET: END LICENSE TEXT */
/*!
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */
(function ($) { var $jQval = $.validator, adapters, data_validation = "unobtrusiveValidation"; function setValidationValues(options, ruleName, value) { options.rules[ruleName] = value; if (options.message) { options.messages[ruleName] = options.message; } } function splitAndTrim(value) { return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); } function escapeAttributeValue(value) { // As mentioned on https://api.jquery.com/category/selectors/ return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); } function getModelPrefix(fieldName) { return fieldName.substr(0, fieldName.lastIndexOf(".") + 1); } function appendModelPrefix(value, prefix) { if (value.indexOf("*.") === 0) { value = value.replace("*.", prefix); } return value; } function onError(error, inputElement) { // 'this' is the form element var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), replaceAttrValue = container.attr("data-valmsg-replace"), replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null; container.removeClass("field-validation-valid").addClass("field-validation-error"); error.data("unobtrusiveContainer", container); if (replace) { container.empty(); error.removeClass("input-validation-error").appendTo(container); } else { error.hide(); } } function onErrors(event, validator) { // 'this' is the form element var container = $(this).find("[data-valmsg-summary=true]"), list = container.find("ul"); if (list && list.length && validator.errorList.length) { list.empty(); container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); $.each(validator.errorList, function () { $("<li />").html(this.message).appendTo(list); }); } } function onSuccess(error) { // 'this' is the form element var container = error.data("unobtrusiveContainer"), replaceAttrValue = container.attr("data-valmsg-replace"), replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; if (container) { container.addClass("field-validation-valid").removeClass("field-validation-error"); error.removeData("unobtrusiveContainer"); if (replace) { container.empty(); } } } function onReset(event) { // 'this' is the form element var $form = $(this); $form.data("validator").resetForm(); $form.find(".validation-summary-errors") .addClass("validation-summary-valid") .removeClass("validation-summary-errors"); $form.find(".field-validation-error") .addClass("field-validation-valid") .removeClass("field-validation-error") .removeData("unobtrusiveContainer") .find(">*") // If we were using valmsg-replace, get the underlying error .removeData("unobtrusiveContainer"); } function validationInfo(form) { var $form = $(form), result = $form.data(data_validation), onResetProxy = $.proxy(onReset, form); if (!result) { result = { options: { // options structure passed to jQuery Validate's validate() method errorClass: "input-validation-error", errorElement: "span", errorPlacement: $.proxy(onError, form), invalidHandler: $.proxy(onErrors, form), messages: {}, rules: {}, success: $.proxy(onSuccess, form) }, attachValidation: function () { $form .unbind("reset." + data_validation, onResetProxy) .bind("reset." + data_validation, onResetProxy) .validate(this.options); }, validate: function () { // a validation function that is called by unobtrusive Ajax $form.validate(); return $form.valid(); } }; $form.data(data_validation, result); } return result; } $jQval.unobtrusive = { adapters: [], parseElement: function (element, skipAttach) { /// <summary> /// Parses a single HTML element for unobtrusive validation attributes. /// </summary> /// <param name="element" domElement="true">The HTML element to be parsed.</param> /// <param name="skipAttach" type="Boolean">[Optional] true to skip attaching the /// validation to the form. If parsing just this single element, you should specify true. /// If parsing several elements, you should specify false, and manually attach the validation /// to the form when you are finished. The default is false.</param> var $element = $(element), form = $element.parents("form")[0], valInfo, rules, messages; if (!form) { // Cannot do client-side validation without a form return; } valInfo = validationInfo(form); valInfo.options.rules[element.name] = rules = {}; valInfo.options.messages[element.name] = messages = {}; $.each(this.adapters, function () { var prefix = "data-val-" + this.name, message = $element.attr(prefix), paramValues = {}; if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy) prefix += "-"; $.each(this.params, function () { paramValues[this] = $element.attr(prefix + this); }); this.adapt({ element: element, form: form, message: message, params: paramValues, rules: rules, messages: messages }); } }); $.extend(rules, { "__dummy__": true }); if (!skipAttach) { valInfo.attachValidation(); } }, parse: function (selector) { /// <summary> /// Parses all the HTML elements in the specified selector. It looks for input elements decorated /// with the [data-val=true] attribute value and enables validation according to the data-val-* /// attribute values. /// </summary> /// <param name="selector" type="String">Any valid jQuery selector.</param> var $forms = $(selector) .parents("form") .andSelf() .add($(selector).find("form")) .filter("form"); // :input is a psuedoselector provided by jQuery which selects input and input-like elements // combining :input with other selectors significantly decreases performance. $(selector).find(":input").filter("[data-val=true]").each(function () { $jQval.unobtrusive.parseElement(this, true); }); $forms.each(function () { var info = validationInfo(this); if (info) { info.attachValidation(); } }); } }; adapters = $jQval.unobtrusive.adapters; adapters.add = function (adapterName, params, fn) { /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary> /// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param> /// <param name="params" type="Array" optional="true">[Optional] An array of parameter names (strings) that will /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and /// mmmm is the parameter name).</param> /// <param name="fn" type="Function">The function to call, which adapts the values from the HTML /// attributes into jQuery Validate rules and/or messages.</param> /// <returns type="jQuery.validator.unobtrusive.adapters" /> if (!fn) { // Called with no params, just a function fn = params; params = []; } this.push({ name: adapterName, params: params, adapt: fn }); return this; }; adapters.addBool = function (adapterName, ruleName) { /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where /// the jQuery Validate validation rule has no parameter values.</summary> /// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param> /// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value /// of adapterName will be used instead.</param> /// <returns type="jQuery.validator.unobtrusive.adapters" /> return this.add(adapterName, function (options) { setValidationValues(options, ruleName || adapterName, true); }); }; adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) { /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and /// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary> /// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param> /// <param name="minRuleName" type="String">The name of the jQuery Validate rule to be used when you only /// have a minimum value.</param> /// <param name="maxRuleName" type="String">The name of the jQuery Validate rule to be used when you only /// have a maximum value.</param> /// <param name="minMaxRuleName" type="String">The name of the jQuery Validate rule to be used when you /// have both a minimum and maximum value.</param> /// <param name="minAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that /// contains the minimum value. The default is "min".</param> /// <param name="maxAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that /// contains the maximum value. The default is "max".</param> /// <returns type="jQuery.validator.unobtrusive.adapters" /> return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) { var min = options.params.min, max = options.params.max; if (min && max) { setValidationValues(options, minMaxRuleName, [min, max]); } else if (min) { setValidationValues(options, minRuleName, min); } else if (max) { setValidationValues(options, maxRuleName, max); } }); }; adapters.addSingleVal = function (adapterName, attribute, ruleName) { /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where /// the jQuery Validate validation rule has a single value.</summary> /// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param> /// <param name="attribute" type="String">[Optional] The name of the HTML attribute that contains the value. /// The default is "val".</param> /// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value /// of adapterName will be used instead.</param> /// <returns type="jQuery.validator.unobtrusive.adapters" /> return this.add(adapterName, [attribute || "val"], function (options) { setValidationValues(options, ruleName || adapterName, options.params[attribute]); }); }; $jQval.addMethod("__dummy__", function (value, element, params) { return true; }); $jQval.addMethod("regex", function (value, element, params) { var match; if (this.optional(element)) { return true; } match = new RegExp(params).exec(value); return (match && (match.index === 0) && (match[0].length === value.length)); }); $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) { var match; if (nonalphamin) { match = value.match(/\W/g); match = match && match.length >= nonalphamin; } return match; }); if ($jQval.methods.extension) { adapters.addSingleVal("accept", "mimtype"); adapters.addSingleVal("extension", "extension"); } else { // for backward compatibility, when the 'extension' validation method does not exist, such as with versions // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for // validating the extension, and ignore mime-type validations as they are not supported. adapters.addSingleVal("extension", "extension", "accept"); } adapters.addSingleVal("regex", "pattern"); adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"); adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range"); adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength"); adapters.add("equalto", ["other"], function (options) { var prefix = getModelPrefix(options.element.name), other = options.params.other, fullOtherName = appendModelPrefix(other, prefix), element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0]; setValidationValues(options, "equalTo", element); }); adapters.add("required", function (options) { // jQuery Validate equates "required" with "mandatory" for checkbox elements if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") { setValidationValues(options, "required", true); } }); adapters.add("remote", ["url", "type", "additionalfields"], function (options) { var value = { url: options.params.url, type: options.params.type || "GET", data: {} }, prefix = getModelPrefix(options.element.name); $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { var paramName = appendModelPrefix(fieldName, prefix); value.data[paramName] = function () { return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val(); }; }); setValidationValues(options, "remote", value); }); adapters.add("password", ["min", "nonalphamin", "regex"], function (options) { if (options.params.min) { setValidationValues(options, "minlength", options.params.min); } if (options.params.nonalphamin) { setValidationValues(options, "nonalphamin", options.params.nonalphamin); } if (options.params.regex) { setValidationValues(options, "regex", options.params.regex); } }); $(function () { $jQval.unobtrusive.parse(document); });
}(jQuery));
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29343964-1']);
_gaq.push(['_trackPageview']);
(function () {	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;	ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
var ppTracking = (function () {	var init = function () {	// Track pixel density ratio	var pixelRatio = window.devicePixelRatio ? String(window.devicePixelRatio) : "1";	_gaq.push(['_setCustomVar', 1, 'Pixel Ratio', pixelRatio, 1]);	};	return { init: init };
}());
(function($) {	$(function() {	ppTracking.init();	});
})(jQuery);
(function ($) {	$(function () {	// Add auto-selection to some input:text fields that want it.	$('input:text.selectOnFocus').mouseup(function ( ) { return false; });	$("input:text.selectOnFocus").focus(function () { $(this).select(); });	// Setup autofocus on form fields	var autoFocusField = $("[data-action='autoFocus']");	if (autoFocusField.length) {	if (!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)) { // autoFocus doesn't work so well on touch devices - namely iOS	autoFocusField.focus();	}	}	// Go back using browser history	$(".go-back").click(function (e) {	e.preventDefault();	history.go(-1);	});	$("#SearchExpression").keypress(function (event) {	if (event.which === 13) {	$(".filterButton").click();	}	});	$(".filterButton").click(function () {	var searchExpression = $('#SearchExpression').val();	var searchUrl = document.location.protocol + '//' + document.location.host + document.location.pathname + "?expression=" + searchExpression;	document.location.replace(searchUrl);	});	// Auto-jump credit card fields	var $ccFields = $(".card-entry input");	if($ccFields.length) {	$ccFields.eq(0).autoSkip($ccFields.eq(1));	$ccFields.eq(1).autoSkip($ccFields.eq(2));	$ccFields.eq(2).autoSkip($ccFields.eq(3));	$ccFields.eq(3).autoSkip($ccFields.eq(4));	}	// Setup confirmation function for buttons	$("[data-action='confirm']").click(function () {	var val = $(this).attr("data-value");	return confirm(val);	});	// Auto-populate placeholder text field if empty	$("[data-action='autopopulate']").blur(function () {	var val = $(this).val();	var $placeholderText = $("input." + $(this).attr("data-value"));	if ($placeholderText.length && !$placeholderText.val().length) {	$placeholderText.val(val);	}	});	// Toggle paymeht method visability	$('[data-action="add-payment-method"]').click(function() {	$('.available-payment-methods').toggleClass('hidden');	$("html, body").animate({ scrollTop: $(document).height() - $(window).height() }, 500);	});	$("form").on('submit', function (event) {	if (!event.result) {	//submit was cancelled, i.e. validate failed.	return;	}	var $form = $(event.target);	var $button = $form.find("input[data-action='preventdoubleclick']");	$button	.prop("disabled", true)	.attr("value", "Sending...")	.click(function(e) {	//for safety	e.preventDefault();	return false;	});	$form.find("[data-action='hideonsubmit']").hide();	});	});
})(jQuery);
//! moment.js
//! version : 2.3.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function (a) { function b(a, b) { return function (c) { return i(a.call(this, c), b) } } function c(a, b) { return function (c) { return this.lang().ordinal(a.call(this, c), b) } } function d() { } function e(a) { u(a), g(this, a) } function f(a) { var b = o(a), c = b.year || 0, d = b.month || 0, e = b.week || 0, f = b.day || 0, g = b.hour || 0, h = b.minute || 0, i = b.second || 0, j = b.millisecond || 0; this._input = a, this._milliseconds = +j + 1e3 * i + 6e4 * h + 36e5 * g, this._days = +f + 7 * e, this._months = +d + 12 * c, this._data = {}, this._bubble() } function g(a, b) { for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]); return b.hasOwnProperty("toString") && (a.toString = b.toString), b.hasOwnProperty("valueOf") && (a.valueOf = b.valueOf), a } function h(a) { return 0 > a ? Math.ceil(a) : Math.floor(a) } function i(a, b) { for (var c = a + ""; c.length < b;) c = "0" + c; return c } function j(a, b, c, d) { var e, f, g = b._milliseconds, h = b._days, i = b._months; g && a._d.setTime(+a._d + g * c), (h || i) && (e = a.minute(), f = a.hour()), h && a.date(a.date() + h * c), i && a.month(a.month() + i * c), g && !d && bb.updateOffset(a), (h || i) && (a.minute(e), a.hour(f)) } function k(a) { return "[object Array]" === Object.prototype.toString.call(a) } function l(a) { return "[object Date]" === Object.prototype.toString.call(a) } function m(a, b, c) { var d, e = Math.min(a.length, b.length), f = Math.abs(a.length - b.length), g = 0; for (d = 0; e > d; d++) (c && a[d] !== b[d] || !c && q(a[d]) !== q(b[d])) && g++; return g + f } function n(a) { if (a) { var b = a.toLowerCase().replace(/(.)s$/, "$1"); a = Jb[a] || Kb[b] || b } return a } function o(a) { var b, c, d = {}; for (c in a) a.hasOwnProperty(c) && (b = n(c), b && (d[b] = a[c])); return d } function p(b) { var c, d; if (0 === b.indexOf("week")) c = 7, d = "day"; else { if (0 !== b.indexOf("month")) return; c = 12, d = "month" } bb[b] = function (e, f) { var g, h, i = bb.fn._lang[b], j = []; if ("number" == typeof e && (f = e, e = a), h = function (a) { var b = bb().utc().set(d, a); return i.call(bb.fn._lang, b, e || "") }, null != f) return h(f); for (g = 0; c > g; g++) j.push(h(g)); return j } } function q(a) { var b = +a, c = 0; return 0 !== b && isFinite(b) && (c = b >= 0 ? Math.floor(b) : Math.ceil(b)), c } function r(a, b) { return new Date(Date.UTC(a, b + 1, 0)).getUTCDate() } function s(a) { return t(a) ? 366 : 365 } function t(a) { return 0 === a % 4 && 0 !== a % 100 || 0 === a % 400 } function u(a) { var b; a._a && -2 === a._pf.overflow && (b = a._a[gb] < 0 || a._a[gb] > 11 ? gb : a._a[hb] < 1 || a._a[hb] > r(a._a[fb], a._a[gb]) ? hb : a._a[ib] < 0 || a._a[ib] > 23 ? ib : a._a[jb] < 0 || a._a[jb] > 59 ? jb : a._a[kb] < 0 || a._a[kb] > 59 ? kb : a._a[lb] < 0 || a._a[lb] > 999 ? lb : -1, a._pf._overflowDayOfYear && (fb > b || b > hb) && (b = hb), a._pf.overflow = b) } function v(a) { a._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidMonth: null, invalidFormat: !1, userInvalidated: !1 } } function w(a) { return null == a._isValid && (a._isValid = !isNaN(a._d.getTime()) && a._pf.overflow < 0 && !a._pf.empty && !a._pf.invalidMonth && !a._pf.nullInput && !a._pf.invalidFormat && !a._pf.userInvalidated, a._strict && (a._isValid = a._isValid && 0 === a._pf.charsLeftOver && 0 === a._pf.unusedTokens.length)), a._isValid } function x(a) { return a ? a.toLowerCase().replace("_", "-") : a } function y(a, b) { return b.abbr = a, mb[a] || (mb[a] = new d), mb[a].set(b), mb[a] } function z(a) { delete mb[a] } function A(a) { var b, c, d, e, f = 0, g = function (a) { if (!mb[a] && nb) try { require("./lang/" + a) } catch (b) { } return mb[a] }; if (!a) return bb.fn._lang; if (!k(a)) { if (c = g(a)) return c; a = [a] } for (; f < a.length;) { for (e = x(a[f]).split("-"), b = e.length, d = x(a[f + 1]), d = d ? d.split("-") : null; b > 0;) { if (c = g(e.slice(0, b).join("-"))) return c; if (d && d.length >= b && m(e, d, !0) >= b - 1) break; b-- } f++ } return bb.fn._lang } function B(a) { return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "") } function C(a) { var b, c, d = a.match(rb); for (b = 0, c = d.length; c > b; b++) d[b] = Ob[d[b]] ? Ob[d[b]] : B(d[b]); return function (e) { var f = ""; for (b = 0; c > b; b++) f += d[b] instanceof Function ? d[b].call(e, a) : d[b]; return f } } function D(a, b) { return a.isValid() ? (b = E(b, a.lang()), Lb[b] || (Lb[b] = C(b)), Lb[b](a)) : a.lang().invalidDate() } function E(a, b) { function c(a) { return b.longDateFormat(a) || a } var d = 5; for (sb.lastIndex = 0; d >= 0 && sb.test(a) ;) a = a.replace(sb, c), sb.lastIndex = 0, d -= 1; return a } function F(a, b) { var c; switch (a) { case "DDDD": return vb; case "YYYY": case "GGGG": case "gggg": return wb; case "YYYYY": case "GGGGG": case "ggggg": return xb; case "S": case "SS": case "SSS": case "DDD": return ub; case "MMM": case "MMMM": case "dd": case "ddd": case "dddd": return yb; case "a": case "A": return A(b._l)._meridiemParse; case "X": return Bb; case "Z": case "ZZ": return zb; case "T": return Ab; case "MM": case "DD": case "YY": case "GG": case "gg": case "HH": case "hh": case "mm": case "ss": case "M": case "D": case "d": case "H": case "h": case "m": case "s": case "w": case "ww": case "W": case "WW": case "e": case "E": return tb; default: return c = new RegExp(N(M(a.replace("\\", "")), "i")) } } function G(a) { var b = (zb.exec(a) || [])[0], c = (b + "").match(Gb) || ["-", 0, 0], d = +(60 * c[1]) + q(c[2]); return "+" === c[0] ? -d : d } function H(a, b, c) { var d, e = c._a; switch (a) { case "M": case "MM": null != b && (e[gb] = q(b) - 1); break; case "MMM": case "MMMM": d = A(c._l).monthsParse(b), null != d ? e[gb] = d : c._pf.invalidMonth = b; break; case "D": case "DD": null != b && (e[hb] = q(b)); break; case "DDD": case "DDDD": null != b && (c._dayOfYear = q(b)); break; case "YY": e[fb] = q(b) + (q(b) > 68 ? 1900 : 2e3); break; case "YYYY": case "YYYYY": e[fb] = q(b); break; case "a": case "A": c._isPm = A(c._l).isPM(b); break; case "H": case "HH": case "h": case "hh": e[ib] = q(b); break; case "m": case "mm": e[jb] = q(b); break; case "s": case "ss": e[kb] = q(b); break; case "S": case "SS": case "SSS": e[lb] = q(1e3 * ("0." + b)); break; case "X": c._d = new Date(1e3 * parseFloat(b)); break; case "Z": case "ZZ": c._useUTC = !0, c._tzm = G(b); break; case "w": case "ww": case "W": case "WW": case "d": case "dd": case "ddd": case "dddd": case "e": case "E": a = a.substr(0, 1); case "gg": case "gggg": case "GG": case "GGGG": case "GGGGG": a = a.substr(0, 2), b && (c._w = c._w || {}, c._w[a] = b) } } function I(a) { var b, c, d, e, f, g, h, i, j, k, l = []; if (!a._d) { for (d = K(a), a._w && null == a._a[hb] && null == a._a[gb] && (f = function (b) { return b ? b.length < 3 ? parseInt(b, 10) > 68 ? "19" + b : "20" + b : b : null == a._a[fb] ? bb().weekYear() : a._a[fb] }, g = a._w, null != g.GG || null != g.W || null != g.E ? h = X(f(g.GG), g.W || 1, g.E, 4, 1) : (i = A(a._l), j = null != g.d ? T(g.d, i) : null != g.e ? parseInt(g.e, 10) + i._week.dow : 0, k = parseInt(g.w, 10) || 1, null != g.d && j < i._week.dow && k++, h = X(f(g.gg), k, j, i._week.doy, i._week.dow)), a._a[fb] = h.year, a._dayOfYear = h.dayOfYear), a._dayOfYear && (e = null == a._a[fb] ? d[fb] : a._a[fb], a._dayOfYear > s(e) && (a._pf._overflowDayOfYear = !0), c = S(e, 0, a._dayOfYear), a._a[gb] = c.getUTCMonth(), a._a[hb] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = l[b] = d[b]; for (; 7 > b; b++) a._a[b] = l[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b]; l[ib] += q((a._tzm || 0) / 60), l[jb] += q((a._tzm || 0) % 60), a._d = (a._useUTC ? S : R).apply(null, l) } } function J(a) { var b; a._d || (b = o(a._i), a._a = [b.year, b.month, b.day, b.hour, b.minute, b.second, b.millisecond], I(a)) } function K(a) { var b = new Date; return a._useUTC ? [b.getUTCFullYear(), b.getUTCMonth(), b.getUTCDate()] : [b.getFullYear(), b.getMonth(), b.getDate()] } function L(a) { a._a = [], a._pf.empty = !0; var b, c, d, e, f, g = A(a._l), h = "" + a._i, i = h.length, j = 0; for (d = E(a._f, g).match(rb) || [], b = 0; b < d.length; b++) e = d[b], c = (F(e, a).exec(h) || [])[0], c && (f = h.substr(0, h.indexOf(c)), f.length > 0 && a._pf.unusedInput.push(f), h = h.slice(h.indexOf(c) + c.length), j += c.length), Ob[e] ? (c ? a._pf.empty = !1 : a._pf.unusedTokens.push(e), H(e, c, a)) : a._strict && !c && a._pf.unusedTokens.push(e); a._pf.charsLeftOver = i - j, h.length > 0 && a._pf.unusedInput.push(h), a._isPm && a._a[ib] < 12 && (a._a[ib] += 12), a._isPm === !1 && 12 === a._a[ib] && (a._a[ib] = 0), I(a), u(a) } function M(a) { return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (a, b, c, d, e) { return b || c || d || e }) } function N(a) { return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") } function O(a) { var b, c, d, e, f; if (0 === a._f.length) return a._pf.invalidFormat = !0, a._d = new Date(0 / 0), void 0; for (e = 0; e < a._f.length; e++) f = 0, b = g({}, a), v(b), b._f = a._f[e], L(b), w(b) && (f += b._pf.charsLeftOver, f += 10 * b._pf.unusedTokens.length, b._pf.score = f, (null == d || d > f) && (d = f, c = b)); g(a, c || b) } function P(a) { var b, c = a._i, d = Cb.exec(c); if (d) { for (b = 4; b > 0; b--) if (d[b]) { a._f = Eb[b - 1] + (d[6] || " "); break } for (b = 0; 4 > b; b++) if (Fb[b][1].exec(c)) { a._f += Fb[b][0]; break } zb.exec(c) && (a._f += " Z"), L(a) } else a._d = new Date(c) } function Q(b) { var c = b._i, d = ob.exec(c); c === a ? b._d = new Date : d ? b._d = new Date(+d[1]) : "string" == typeof c ? P(b) : k(c) ? (b._a = c.slice(0), I(b)) : l(c) ? b._d = new Date(+c) : "object" == typeof c ? J(b) : b._d = new Date(c) } function R(a, b, c, d, e, f, g) { var h = new Date(a, b, c, d, e, f, g); return 1970 > a && h.setFullYear(a), h } function S(a) { var b = new Date(Date.UTC.apply(null, arguments)); return 1970 > a && b.setUTCFullYear(a), b } function T(a, b) { if ("string" == typeof a) if (isNaN(a)) { if (a = b.weekdaysParse(a), "number" != typeof a) return null } else a = parseInt(a, 10); return a } function U(a, b, c, d, e) { return e.relativeTime(b || 1, !!c, a, d) } function V(a, b, c) { var d = eb(Math.abs(a) / 1e3), e = eb(d / 60), f = eb(e / 60), g = eb(f / 24), h = eb(g / 365), i = 45 > d && ["s", d] || 1 === e && ["m"] || 45 > e && ["mm", e] || 1 === f && ["h"] || 22 > f && ["hh", f] || 1 === g && ["d"] || 25 >= g && ["dd", g] || 45 >= g && ["M"] || 345 > g && ["MM", eb(g / 30)] || 1 === h && ["y"] || ["yy", h]; return i[2] = b, i[3] = a > 0, i[4] = c, U.apply({}, i) } function W(a, b, c) { var d, e = c - b, f = c - a.day(); return f > e && (f -= 7), e - 7 > f && (f += 7), d = bb(a).add("d", f), { week: Math.ceil(d.dayOfYear() / 7), year: d.year() } } function X(a, b, c, d, e) { var f, g, h = new Date(Date.UTC(a, 0)).getUTCDay(); return c = null != c ? c : e, f = e - h + (h > d ? 7 : 0), g = 7 * (b - 1) + (c - e) + f + 1, { year: g > 0 ? a : a - 1, dayOfYear: g > 0 ? g : s(a - 1) + g } } function Y(a) { var b = a._i, c = a._f; return "undefined" == typeof a._pf && v(a), null === b ? bb.invalid({ nullInput: !0 }) : ("string" == typeof b && (a._i = b = A().preparse(b)), bb.isMoment(b) ? (a = g({}, b), a._d = new Date(+b._d)) : c ? k(c) ? O(a) : L(a) : Q(a), new e(a)) } function Z(a, b) { bb.fn[a] = bb.fn[a + "s"] = function (a) { var c = this._isUTC ? "UTC" : ""; return null != a ? (this._d["set" + c + b](a), bb.updateOffset(this), this) : this._d["get" + c + b]() } } function $(a) { bb.duration.fn[a] = function () { return this._data[a] } } function _(a, b) { bb.duration.fn["as" + a] = function () { return +this / b } } function ab() { "undefined" == typeof ender && (this.moment = bb) } for (var bb, cb, db = "2.3.1", eb = Math.round, fb = 0, gb = 1, hb = 2, ib = 3, jb = 4, kb = 5, lb = 6, mb = {}, nb = "undefined" != typeof module && module.exports, ob = /^\/?Date\((\-?\d+)/i, pb = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/, qb = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, rb = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g, sb = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, tb = /\d\d?/, ub = /\d{1,3}/, vb = /\d{3}/, wb = /\d{1,4}/, xb = /[+\-]?\d{1,6}/, yb = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, zb = /Z|[\+\-]\d\d:?\d\d/i, Ab = /T/i, Bb = /[\+\-]?\d+(\.\d{1,3})?/, Cb = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?$/, Db = "YYYY-MM-DDTHH:mm:ssZ", Eb = ["YYYY-MM-DD", "GGGG-[W]WW", "GGGG-[W]WW-E", "YYYY-DDD"], Fb = [["HH:mm:ss.S", /(T| )\d\d:\d\d:\d\d\.\d{1,3}/], ["HH:mm:ss", /(T| )\d\d:\d\d:\d\d/], ["HH:mm", /(T| )\d\d:\d\d/], ["HH", /(T| )\d\d/]], Gb = /([\+\-]|\d\d)/gi, Hb = "Date|Hours|Minutes|Seconds|Milliseconds".split("|"), Ib = { Milliseconds: 1, Seconds: 1e3, Minutes: 6e4, Hours: 36e5, Days: 864e5, Months: 2592e6, Years: 31536e6 }, Jb = { ms: "millisecond", s: "second", m: "minute", h: "hour", d: "day", D: "date", w: "week", W: "isoWeek", M: "month", y: "year", DDD: "dayOfYear", e: "weekday", E: "isoWeekday", gg: "weekYear", GG: "isoWeekYear" }, Kb = { dayofyear: "dayOfYear", isoweekday: "isoWeekday", isoweek: "isoWeek", weekyear: "weekYear", isoweekyear: "isoWeekYear" }, Lb = {}, Mb = "DDD w W M D d".split(" "), Nb = "M D H h m s w W".split(" "), Ob = { M: function () { return this.month() + 1 }, MMM: function (a) { return this.lang().monthsShort(this, a) }, MMMM: function (a) { return this.lang().months(this, a) }, D: function () { return this.date() }, DDD: function () { return this.dayOfYear() }, d: function () { return this.day() }, dd: function (a) { return this.lang().weekdaysMin(this, a) }, ddd: function (a) { return this.lang().weekdaysShort(this, a) }, dddd: function (a) { return this.lang().weekdays(this, a) }, w: function () { return this.week() }, W: function () { return this.isoWeek() }, YY: function () { return i(this.year() % 100, 2) }, YYYY: function () { return i(this.year(), 4) }, YYYYY: function () { return i(this.year(), 5) }, gg: function () { return i(this.weekYear() % 100, 2) }, gggg: function () { return this.weekYear() }, ggggg: function () { return i(this.weekYear(), 5) }, GG: function () { return i(this.isoWeekYear() % 100, 2) }, GGGG: function () { return this.isoWeekYear() }, GGGGG: function () { return i(this.isoWeekYear(), 5) }, e: function () { return this.weekday() }, E: function () { return this.isoWeekday() }, a: function () { return this.lang().meridiem(this.hours(), this.minutes(), !0) }, A: function () { return this.lang().meridiem(this.hours(), this.minutes(), !1) }, H: function () { return this.hours() }, h: function () { return this.hours() % 12 || 12 }, m: function () { return this.minutes() }, s: function () { return this.seconds() }, S: function () { return q(this.milliseconds() / 100) }, SS: function () { return i(q(this.milliseconds() / 10), 2) }, SSS: function () { return i(this.milliseconds(), 3) }, Z: function () { var a = -this.zone(), b = "+"; return 0 > a && (a = -a, b = "-"), b + i(q(a / 60), 2) + ":" + i(q(a) % 60, 2) }, ZZ: function () { var a = -this.zone(), b = "+"; return 0 > a && (a = -a, b = "-"), b + i(q(10 * a / 6), 4) }, z: function () { return this.zoneAbbr() }, zz: function () { return this.zoneName() }, X: function () { return this.unix() } }, Pb = ["months", "monthsShort", "weekdays", "weekdaysShort", "weekdaysMin"]; Mb.length;) cb = Mb.pop(), Ob[cb + "o"] = c(Ob[cb], cb); for (; Nb.length;) cb = Nb.pop(), Ob[cb + cb] = b(Ob[cb], 2); for (Ob.DDDD = b(Ob.DDD, 3), g(d.prototype, { set: function (a) { var b, c; for (c in a) b = a[c], "function" == typeof b ? this[c] = b : this["_" + c] = b }, _months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), months: function (a) { return this._months[a.month()] }, _monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), monthsShort: function (a) { return this._monthsShort[a.month()] }, monthsParse: function (a) { var b, c, d; for (this._monthsParse || (this._monthsParse = []), b = 0; 12 > b; b++) if (this._monthsParse[b] || (c = bb.utc([2e3, b]), d = "^" + this.months(c, "") + "|^" + this.monthsShort(c, ""), this._monthsParse[b] = new RegExp(d.replace(".", ""), "i")), this._monthsParse[b].test(a)) return b }, _weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), weekdays: function (a) { return this._weekdays[a.day()] }, _weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), weekdaysShort: function (a) { return this._weekdaysShort[a.day()] }, _weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), weekdaysMin: function (a) { return this._weekdaysMin[a.day()] }, weekdaysParse: function (a) { var b, c, d; for (this._weekdaysParse || (this._weekdaysParse = []), b = 0; 7 > b; b++) if (this._weekdaysParse[b] || (c = bb([2e3, 1]).day(b), d = "^" + this.weekdays(c, "") + "|^" + this.weekdaysShort(c, "") + "|^" + this.weekdaysMin(c, ""), this._weekdaysParse[b] = new RegExp(d.replace(".", ""), "i")), this._weekdaysParse[b].test(a)) return b }, _longDateFormat: { LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D YYYY", LLL: "MMMM D YYYY LT", LLLL: "dddd, MMMM D YYYY LT" }, longDateFormat: function (a) { var b = this._longDateFormat[a]; return !b && this._longDateFormat[a.toUpperCase()] && (b = this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (a) { return a.slice(1) }), this._longDateFormat[a] = b), b }, isPM: function (a) { return "p" === (a + "").toLowerCase().charAt(0) }, _meridiemParse: /[ap]\.?m?\.?/i, meridiem: function (a, b, c) { return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM" }, _calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, calendar: function (a, b) { var c = this._calendar[a]; return "function" == typeof c ? c.apply(b) : c }, _relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, relativeTime: function (a, b, c, d) { var e = this._relativeTime[c]; return "function" == typeof e ? e(a, b, c, d) : e.replace(/%d/i, a) }, pastFuture: function (a, b) { var c = this._relativeTime[a > 0 ? "future" : "past"]; return "function" == typeof c ? c(b) : c.replace(/%s/i, b) }, ordinal: function (a) { return this._ordinal.replace("%d", a) }, _ordinal: "%d", preparse: function (a) { return a }, postformat: function (a) { return a }, week: function (a) { return W(a, this._week.dow, this._week.doy).week }, _week: { dow: 0, doy: 6 }, _invalidDate: "Invalid date", invalidDate: function () { return this._invalidDate } }), bb = function (b, c, d, e) { return "boolean" == typeof d && (e = d, d = a), Y({ _i: b, _f: c, _l: d, _strict: e, _isUTC: !1 }) }, bb.utc = function (b, c, d, e) { var f; return "boolean" == typeof d && (e = d, d = a), f = Y({ _useUTC: !0, _isUTC: !0, _l: d, _i: b, _f: c, _strict: e }).utc() }, bb.unix = function (a) { return bb(1e3 * a) }, bb.duration = function (a, b) { var c, d, e, g = bb.isDuration(a), h = "number" == typeof a, i = g ? a._input : h ? {} : a, j = null; return h ? b ? i[b] = a : i.milliseconds = a : (j = pb.exec(a)) ? (c = "-" === j[1] ? -1 : 1, i = { y: 0, d: q(j[hb]) * c, h: q(j[ib]) * c, m: q(j[jb]) * c, s: q(j[kb]) * c, ms: q(j[lb]) * c }) : (j = qb.exec(a)) && (c = "-" === j[1] ? -1 : 1, e = function (a) { var b = a && parseFloat(a.replace(",", ".")); return (isNaN(b) ? 0 : b) * c }, i = { y: e(j[2]), M: e(j[3]), d: e(j[4]), h: e(j[5]), m: e(j[6]), s: e(j[7]), w: e(j[8]) }), d = new f(i), g && a.hasOwnProperty("_lang") && (d._lang = a._lang), d }, bb.version = db, bb.defaultFormat = Db, bb.updateOffset = function () { }, bb.lang = function (a, b) { var c; return a ? (b ? y(x(a), b) : null === b ? (z(a), a = "en") : mb[a] || A(a), c = bb.duration.fn._lang = bb.fn._lang = A(a), c._abbr) : bb.fn._lang._abbr }, bb.langData = function (a) { return a && a._lang && a._lang._abbr && (a = a._lang._abbr), A(a) }, bb.isMoment = function (a) { return a instanceof e }, bb.isDuration = function (a) { return a instanceof f }, cb = Pb.length - 1; cb >= 0; --cb) p(Pb[cb]); for (bb.normalizeUnits = function (a) { return n(a) }, bb.invalid = function (a) { var b = bb.utc(0 / 0); return null != a ? g(b._pf, a) : b._pf.userInvalidated = !0, b }, bb.parseZone = function (a) { return bb(a).parseZone() }, g(bb.fn = e.prototype, { clone: function () { return bb(this) }, valueOf: function () { return +this._d + 6e4 * (this._offset || 0) }, unix: function () { return Math.floor(+this / 1e3) }, toString: function () { return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") }, toDate: function () { return this._offset ? new Date(+this) : this._d }, toISOString: function () { return D(bb(this).utc(), "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") }, toArray: function () { var a = this; return [a.year(), a.month(), a.date(), a.hours(), a.minutes(), a.seconds(), a.milliseconds()] }, isValid: function () { return w(this) }, isDSTShifted: function () { return this._a ? this.isValid() && m(this._a, (this._isUTC ? bb.utc(this._a) : bb(this._a)).toArray()) > 0 : !1 }, parsingFlags: function () { return g({}, this._pf) }, invalidAt: function () { return this._pf.overflow }, utc: function () { return this.zone(0) }, local: function () { return this.zone(0), this._isUTC = !1, this }, format: function (a) { var b = D(this, a || bb.defaultFormat); return this.lang().postformat(b) }, add: function (a, b) { var c; return c = "string" == typeof a ? bb.duration(+b, a) : bb.duration(a, b), j(this, c, 1), this }, subtract: function (a, b) { var c; return c = "string" == typeof a ? bb.duration(+b, a) : bb.duration(a, b), j(this, c, -1), this }, diff: function (a, b, c) { var d, e, f = this._isUTC ? bb(a).zone(this._offset || 0) : bb(a).local(), g = 6e4 * (this.zone() - f.zone()); return b = n(b), "year" === b || "month" === b ? (d = 432e5 * (this.daysInMonth() + f.daysInMonth()), e = 12 * (this.year() - f.year()) + (this.month() - f.month()), e += (this - bb(this).startOf("month") - (f - bb(f).startOf("month"))) / d, e -= 6e4 * (this.zone() - bb(this).startOf("month").zone() - (f.zone() - bb(f).startOf("month").zone())) / d, "year" === b && (e /= 12)) : (d = this - f, e = "second" === b ? d / 1e3 : "minute" === b ? d / 6e4 : "hour" === b ? d / 36e5 : "day" === b ? (d - g) / 864e5 : "week" === b ? (d - g) / 6048e5 : d), c ? e : h(e) }, from: function (a, b) { return bb.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b) }, fromNow: function (a) { return this.from(bb(), a) }, calendar: function () { var a = this.diff(bb().zone(this.zone()).startOf("day"), "days", !0), b = -6 > a ? "sameElse" : -1 > a ? "lastWeek" : 0 > a ? "lastDay" : 1 > a ? "sameDay" : 2 > a ? "nextDay" : 7 > a ? "nextWeek" : "sameElse"; return this.format(this.lang().calendar(b, this)) }, isLeapYear: function () { return t(this.year()) }, isDST: function () { return this.zone() < this.clone().month(0).zone() || this.zone() < this.clone().month(5).zone() }, day: function (a) { var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); return null != a ? (a = T(a, this.lang()), this.add({ d: a - b })) : b }, month: function (a) { var b, c = this._isUTC ? "UTC" : ""; return null != a ? "string" == typeof a && (a = this.lang().monthsParse(a), "number" != typeof a) ? this : (b = this.date(), this.date(1), this._d["set" + c + "Month"](a), this.date(Math.min(b, this.daysInMonth())), bb.updateOffset(this), this) : this._d["get" + c + "Month"]() }, startOf: function (a) { switch (a = n(a)) { case "year": this.month(0); case "month": this.date(1); case "week": case "isoWeek": case "day": this.hours(0); case "hour": this.minutes(0); case "minute": this.seconds(0); case "second": this.milliseconds(0) } return "week" === a ? this.weekday(0) : "isoWeek" === a && this.isoWeekday(1), this }, endOf: function (a) { return a = n(a), this.startOf(a).add("isoWeek" === a ? "week" : a, 1).subtract("ms", 1) }, isAfter: function (a, b) { return b = "undefined" != typeof b ? b : "millisecond", +this.clone().startOf(b) > +bb(a).startOf(b) }, isBefore: function (a, b) { return b = "undefined" != typeof b ? b : "millisecond", +this.clone().startOf(b) < +bb(a).startOf(b) }, isSame: function (a, b) { return b = "undefined" != typeof b ? b : "millisecond", +this.clone().startOf(b) === +bb(a).startOf(b) }, min: function (a) { return a = bb.apply(null, arguments), this > a ? this : a }, max: function (a) { return a = bb.apply(null, arguments), a > this ? this : a }, zone: function (a) { var b = this._offset || 0; return null == a ? this._isUTC ? b : this._d.getTimezoneOffset() : ("string" == typeof a && (a = G(a)), Math.abs(a) < 16 && (a = 60 * a), this._offset = a, this._isUTC = !0, b !== a && j(this, bb.duration(b - a, "m"), 1, !0), this) }, zoneAbbr: function () { return this._isUTC ? "UTC" : "" }, zoneName: function () { return this._isUTC ? "Coordinated Universal Time" : "" }, parseZone: function () { return "string" == typeof this._i && this.zone(this._i), this }, hasAlignedHourOffset: function (a) { return a = a ? bb(a).zone() : 0, 0 === (this.zone() - a) % 60 }, daysInMonth: function () { return r(this.year(), this.month()) }, dayOfYear: function (a) { var b = eb((bb(this).startOf("day") - bb(this).startOf("year")) / 864e5) + 1; return null == a ? b : this.add("d", a - b) }, weekYear: function (a) { var b = W(this, this.lang()._week.dow, this.lang()._week.doy).year; return null == a ? b : this.add("y", a - b) }, isoWeekYear: function (a) { var b = W(this, 1, 4).year; return null == a ? b : this.add("y", a - b) }, week: function (a) { var b = this.lang().week(this); return null == a ? b : this.add("d", 7 * (a - b)) }, isoWeek: function (a) { var b = W(this, 1, 4).week; return null == a ? b : this.add("d", 7 * (a - b)) }, weekday: function (a) { var b = (this.day() + 7 - this.lang()._week.dow) % 7; return null == a ? b : this.add("d", a - b) }, isoWeekday: function (a) { return null == a ? this.day() || 7 : this.day(this.day() % 7 ? a : a - 7) }, get: function (a) { return a = n(a), this[a]() }, set: function (a, b) { return a = n(a), "function" == typeof this[a] && this[a](b), this }, lang: function (b) { return b === a ? this._lang : (this._lang = A(b), this) } }), cb = 0; cb < Hb.length; cb++) Z(Hb[cb].toLowerCase().replace(/s$/, ""), Hb[cb]); Z("year", "FullYear"), bb.fn.days = bb.fn.day, bb.fn.months = bb.fn.month, bb.fn.weeks = bb.fn.week, bb.fn.isoWeeks = bb.fn.isoWeek, bb.fn.toJSON = bb.fn.toISOString, g(bb.duration.fn = f.prototype, { _bubble: function () { var a, b, c, d, e = this._milliseconds, f = this._days, g = this._months, i = this._data; i.milliseconds = e % 1e3, a = h(e / 1e3), i.seconds = a % 60, b = h(a / 60), i.minutes = b % 60, c = h(b / 60), i.hours = c % 24, f += h(c / 24), i.days = f % 30, g += h(f / 30), i.months = g % 12, d = h(g / 12), i.years = d }, weeks: function () { return h(this.days() / 7) }, valueOf: function () { return this._milliseconds + 864e5 * this._days + 2592e6 * (this._months % 12) + 31536e6 * q(this._months / 12) }, humanize: function (a) { var b = +this, c = V(b, !a, this.lang()); return a && (c = this.lang().pastFuture(b, c)), this.lang().postformat(c) }, add: function (a, b) { var c = bb.duration(a, b); return this._milliseconds += c._milliseconds, this._days += c._days, this._months += c._months, this._bubble(), this }, subtract: function (a, b) { var c = bb.duration(a, b); return this._milliseconds -= c._milliseconds, this._days -= c._days, this._months -= c._months, this._bubble(), this }, get: function (a) { return a = n(a), this[a.toLowerCase() + "s"]() }, as: function (a) { return a = n(a), this["as" + a.charAt(0).toUpperCase() + a.slice(1) + "s"]() }, lang: bb.fn.lang, toIsoString: function () { var a = Math.abs(this.years()), b = Math.abs(this.months()), c = Math.abs(this.days()), d = Math.abs(this.hours()), e = Math.abs(this.minutes()), f = Math.abs(this.seconds() + this.milliseconds() / 1e3); return this.asSeconds() ? (this.asSeconds() < 0 ? "-" : "") + "P" + (a ? a + "Y" : "") + (b ? b + "M" : "") + (c ? c + "D" : "") + (d || e || f ? "T" : "") + (d ? d + "H" : "") + (e ? e + "M" : "") + (f ? f + "S" : "") : "P0D" } }); for (cb in Ib) Ib.hasOwnProperty(cb) && (_(cb, Ib[cb]), $(cb.toLowerCase())); _("Weeks", 6048e5), bb.duration.fn.asMonths = function () { return (+this - 31536e6 * this.years()) / 2592e6 + 12 * this.years() }, bb.lang("en", { ordinal: function (a) { var b = a % 10, c = 1 === q(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th"; return a + c } }), nb ? (module.exports = bb, ab()) : "function" == typeof define && define.amd ? define("moment", function (a, b, c) { return c.config().noGlobal !== !0 && ab(), bb }) : ab() }).call(this);
/*! * Pikaday * * Copyright © 2013 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday */
(function(root, factory) {	'use strict';	var moment;	if (typeof exports === 'object') {	// CommonJS module	// Load moment.js as an optional dependency	try {	moment = require('moment');	} catch(e) {	}	module.exports = factory(moment);	} else if (typeof define === 'function' && define.amd) {	// AMD. Register as an anonymous module.	define(function(req) {	// Load moment.js as an optional dependency	var id = 'moment';	moment = req.defined && req.defined(id) ? req(id) : undefined;	return factory(moment);	});	} else {	root.Pikaday = factory(root.moment);	}
}(this, function(moment) {	'use strict';	/** * feature detection and helper functions */	var hasMoment = typeof moment === 'function', hasEventListeners = !!window.addEventListener, document = window.document, sto = window.setTimeout, addEvent = function(el, e, callback, capture) { if (hasEventListeners) { el.addEventListener(e, callback, !!capture); } else { el.attachEvent('on' + e, callback); } }, removeEvent = function(el, e, callback, capture) { if (hasEventListeners) { el.removeEventListener(e, callback, !!capture); } else { el.detachEvent('on' + e, callback); } }, fireEvent = function(el, eventName, data) { var ev; if (document.createEvent) { ev = document.createEvent('HTMLEvents'); ev.initEvent(eventName, true, false); ev = extend(ev, data); el.dispatchEvent(ev); } else if (document.createEventObject) { ev = document.createEventObject(); ev = extend(ev, data); el.fireEvent('on' + eventName, ev); } }, trim = function(str) { return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); }, hasClass = function(el, cn) { return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1; }, addClass = function(el, cn) { if (!hasClass(el, cn)) { el.className = (el.className === '') ? cn : el.className + ' ' + cn; } }, removeClass = function(el, cn) { el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' ')); }, isArray = function(obj) { return (/Array/).test(Object.prototype.toString.call(obj)); }, isDate = function(obj) { return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()); }, isLeapYear = function(year) { // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951 return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; }, getDaysInMonth = function(year, month) { return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, setToStartOfDay = function(date) { if (isDate(date)) date.setHours(0, 0, 0, 0); }, compareDates = function(a, b) { // weak date comparison (use setToStartOfDay(date) to ensure correct result) return a.getTime() === b.getTime(); }, extend = function(to, from, overwrite) { var prop, hasProp; for (prop in from) { hasProp = to[prop] !== undefined; if (hasProp && typeof from[prop] === 'object' && from[prop].nodeName === undefined) { if (isDate(from[prop])) { if (overwrite) { to[prop] = new Date(from[prop].getTime()); } } else if (isArray(from[prop])) { if (overwrite) { to[prop] = from[prop].slice(0); } } else { to[prop] = extend({}, from[prop], overwrite); } } else if (overwrite || !hasProp) { to[prop] = from[prop]; } } return to; }, /** * defaults and localisation */ defaults = { // bind the picker to a form field field: null, // automatically show/hide the picker on `field` focus (default `true` if `field` is set) bound: undefined, // the default output format for `.toString()` and `field` value format: 'YYYY-MM-DD', // the initial date to view when first opened defaultDate: null, // make the `defaultDate` the initial selected value setDefaultDate: false, // first day of week (0: Sunday, 1: Monday etc) firstDay: 0, // the minimum/earliest date that can be selected minDate: null, // the maximum/latest date that can be selected maxDate: null, // number of years either side, or array of upper/lower range yearRange: 10, // used internally (don't config outside) minYear: 0, maxYear: 9999, minMonth: undefined, maxMonth: undefined, isRTL: false, // Additional text to append to the year in the calendar title yearSuffix: '', // Render the month after year in the calendar title showMonthAfterYear: false, // how many months are visible (not implemented yet) numberOfMonths: 1, // internationalization i18n: { previousMonth: 'Previous Month', nextMonth: 'Next Month', months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] }, // callback function onSelect: null, onOpen: null, onClose: null, onDraw: null }, /** * templating functions to abstract HTML rendering */ renderDayName = function(opts, day, abbr) { day += opts.firstDay; while (day >= 7) { day -= 7; } return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day]; }, renderDay = function(i, isSelected, isToday, isDisabled, isEmpty) { if (isEmpty) { return '<td class="is-empty"></td>'; } var arr = []; if (isDisabled) { arr.push('is-disabled'); } if (isToday) { arr.push('is-today'); } if (isSelected) { arr.push('is-selected'); } return '<td data-day="' + i + '" class="' + arr.join(' ') + '"><button class="pika-button" type="button">' + i + '</button>' + '</td>'; }, renderRow = function(days, isRTL) { return '<tr>' + (isRTL ? days.reverse() : days).join('') + '</tr>'; }, renderBody = function(rows) { return '<tbody>' + rows.join('') + '</tbody>'; }, renderHead = function(opts) { var i, arr = []; for (i = 0; i < 7; i++) { arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>'); } return '<thead>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</thead>'; }, renderTitle = function(instance) { var i, j, arr, opts = instance._o, month = instance._m, year = instance._y, isMinYear = year === opts.minYear, isMaxYear = year === opts.maxYear, html = '<div class="pika-title">', monthHtml, yearHtml, prev = true, next = true; for (arr = [], i = 0; i < 12; i++) { arr.push('<option value="' + i + '"' + (i === month ? ' selected' : '') + ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled' : '') + '>' + opts.i18n.months[i] + '</option>'); } monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month">' + arr.join('') + '</select></div>'; if (isArray(opts.yearRange)) { i = opts.yearRange[0]; j = opts.yearRange[1] + 1; } else { i = year - opts.yearRange; j = 1 + year + opts.yearRange; } for (arr = []; i < j && i <= opts.maxYear; i++) { if (i >= opts.minYear) { arr.push('<option value="' + i + '"' + (i === year ? ' selected' : '') + '>' + (i) + '</option>'); } } yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year">' + arr.join('') + '</select></div>'; if (opts.showMonthAfterYear) { html += yearHtml + monthHtml; } else { html += monthHtml + yearHtml; } if (isMinYear && (month === 0 || opts.minMonth >= month)) { prev = false; } if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { next = false; } html += '<button class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>'; html += '<button class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>'; return html += '</div>'; }, renderTable = function(opts, data) { return '<table cellpadding="0" cellspacing="0" class="pika-table">' + renderHead(opts) + renderBody(data) + '</table>'; }, /** * Pikaday constructor */ Pikaday = function(options) { var self = this, opts = self.config(options); self._onMouseDown = function(e) { if (!self._v) { return; } e = e || window.event; var target = e.target || e.srcElement; if (!target) { return; } if (!hasClass(target, 'is-disabled')) { if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty')) { self.setDate(new Date(self._y, self._m, parseInt(target.innerHTML, 10))); if (opts.bound) { sto(function() { self.hide(); }, 100); } return; } else if (hasClass(target, 'pika-prev')) { self.prevMonth(); } else if (hasClass(target, 'pika-next')) { self.nextMonth(); } } if (!hasClass(target, 'pika-select')) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; return false; } } else { self._c = true; } }; self._onChange = function(e) { e = e || window.event; var target = e.target || e.srcElement; if (!target) { return; } if (hasClass(target, 'pika-select-month')) { self.gotoMonth(target.value); } else if (hasClass(target, 'pika-select-year')) { self.gotoYear(target.value); } }; self._onInputChange = function(e) { var date; if (e.firedBy === self) { return; } if (hasMoment) { date = moment(opts.field.value, opts.format); date = (date && date.isValid()) ? date.toDate() : null; } else { date = new Date(Date.parse(opts.field.value)); } self.setDate(isDate(date) ? date : null); if (!self._v) { self.show(); } }; self._onInputFocus = function() { self.show(); }; self._onInputClick = function() { self.show(); }; self._onInputBlur = function() { if (!self._c) { self._b = sto(function() { self.hide(); }, 50); } self._c = false; }; self._onClick = function(e) { e = e || window.event; var target = e.target || e.srcElement, pEl = target; if (!target) { return; } if (!hasEventListeners && hasClass(target, 'pika-select')) { if (!target.onchange) { target.setAttribute('onchange', 'return;'); addEvent(target, 'change', self._onChange); } } do { if (hasClass(pEl, 'pika-single')) { return; } } while ((pEl = pEl.parentNode)); if (self._v && target !== opts.trigger) { self.hide(); } }; self.el = document.createElement('div'); self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : ''); addEvent(self.el, 'mousedown', self._onMouseDown, true);	//custom: https://github.com/dbushell/Pikaday/issues/101 addEvent(self.el, 'touchstart', self._onMouseDown, true); addEvent(self.el, 'change', self._onChange); if (opts.field) { if (opts.bound) { document.body.appendChild(self.el); } else { opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling); } addEvent(opts.field, 'change', self._onInputChange); if (!opts.defaultDate) { if (hasMoment && opts.field.value) { opts.defaultDate = moment(opts.field.value, opts.format).toDate(); } else { opts.defaultDate = new Date(Date.parse(opts.field.value)); } opts.setDefaultDate = true; } } var defDate = opts.defaultDate; if (isDate(defDate)) { if (opts.setDefaultDate) { self.setDate(defDate, true); } else { self.gotoDate(defDate); } } else { self.gotoDate(new Date()); } if (opts.bound) { this.hide(); self.el.className += ' is-bound'; addEvent(opts.trigger, 'click', self._onInputClick); addEvent(opts.trigger, 'focus', self._onInputFocus); addEvent(opts.trigger, 'blur', self._onInputBlur); } else { this.show(); } };	/** * public Pikaday API */	Pikaday.prototype = {	/** * configure functionality */	config: function(options) {	if (!this._o) {	this._o = extend({}, defaults, true);	}	var opts = extend(this._o, options, true);	opts.isRTL = !!opts.isRTL;	opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;	opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);	opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;	var nom = parseInt(opts.numberOfMonths, 10) || 1;	opts.numberOfMonths = nom > 4 ? 4 : nom;	if (!isDate(opts.minDate)) {	opts.minDate = false;	}	if (!isDate(opts.maxDate)) {	opts.maxDate = false;	}	if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {	opts.maxDate = opts.minDate = false;	}	if (opts.minDate) {	setToStartOfDay(opts.minDate);	opts.minYear = opts.minDate.getFullYear();	opts.minMonth = opts.minDate.getMonth();	}	if (opts.maxDate) {	setToStartOfDay(opts.maxDate);	opts.maxYear = opts.maxDate.getFullYear();	opts.maxMonth = opts.maxDate.getMonth();	}	if (isArray(opts.yearRange)) {	var fallback = new Date().getFullYear() - 10;	opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;	opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;	} else {	opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;	if (opts.yearRange > 100) {	opts.yearRange = 100;	}	}	return opts;	},	/** * return a formatted string of the current selection (using Moment.js if available) */	toString: function(format) {	return !isDate(this._d) ? '' : hasMoment ? moment(this._d).format(format || this._o.format) : this._d.toDateString();	},	/** * return a Moment.js object of the current selection (if available) */	getMoment: function() {	return hasMoment ? moment(this._d) : null;	},	/** * set the current selection from a Moment.js object (if available) */	setMoment: function(date) {	if (hasMoment && moment.isMoment(date)) {	this.setDate(date.toDate());	}	},	/** * return a Date object of the current selection */	getDate: function() {	return isDate(this._d) ? new Date(this._d.getTime()) : null;	},	/** * set the current selection */	setDate: function(date, preventOnSelect) {	if (!date) {	this._d = null;	return this.draw();	}	if (typeof date === 'string') {	date = new Date(Date.parse(date));	}	if (!isDate(date)) {	return;	}	var min = this._o.minDate, max = this._o.maxDate;	if (isDate(min) && date < min) {	date = min;	} else if (isDate(max) && date > max) {	date = max;	}	this._d = new Date(date.getTime());	setToStartOfDay(this._d);	this.gotoDate(this._d);	if (this._o.field) {	this._o.field.value = this.toString();	fireEvent(this._o.field, 'change', { firedBy: this });	}	if (!preventOnSelect && typeof this._o.onSelect === 'function') {	this._o.onSelect.call(this, this.getDate());	}	},	/** * change view to a specific date */	gotoDate: function(date) {	if (!isDate(date)) {	return;	}	this._y = date.getFullYear();	this._m = date.getMonth();	this.draw();	},	gotoToday: function() {	this.gotoDate(new Date());	},	/** * change view to a specific month (zero-index, e.g. 0: January) */	gotoMonth: function(month) {	if (!isNaN((month = parseInt(month, 10)))) {	this._m = month < 0 ? 0 : month > 11 ? 11 : month;	this.draw();	}	},	nextMonth: function() {	if (++this._m > 11) {	this._m = 0;	this._y++;	}	this.draw();	},	prevMonth: function() {	if (--this._m < 0) {	this._m = 11;	this._y--;	}	this.draw();	},	/** * change view to a specific full year (e.g. "2012") */	gotoYear: function(year) {	if (!isNaN(year)) {	this._y = parseInt(year, 10);	this.draw();	}	},	/** * change the minDate */	setMinDate: function(value) {	this._o.minDate = value;	},	/** * change the maxDate */	setMaxDate: function(value) {	this._o.maxDate = value;	},	/** * refresh the HTML */	draw: function(force) {	if (!this._v && !force) {	return;	}	var opts = this._o, minYear = opts.minYear, maxYear = opts.maxYear, minMonth = opts.minMonth, maxMonth = opts.maxMonth;	if (this._y <= minYear) {	this._y = minYear;	if (!isNaN(minMonth) && this._m < minMonth) {	this._m = minMonth;	}	}	if (this._y >= maxYear) {	this._y = maxYear;	if (!isNaN(maxMonth) && this._m > maxMonth) {	this._m = maxMonth;	}	}	this.el.innerHTML = renderTitle(this) + this.render(this._y, this._m);	if (opts.bound) {	this.adjustPosition();	if (opts.field.type !== 'hidden') {	sto(function() {	opts.trigger.focus();	}, 1);	}	}	if (typeof this._o.onDraw === 'function') {	var self = this;	sto(function() {	self._o.onDraw.call(self);	}, 0);	}	},	adjustPosition: function() {	var field = this._o.trigger, pEl = field, width = this.el.offsetWidth, height = this.el.offsetHeight, viewportWidth = window.innerWidth || document.documentElement.clientWidth, viewportHeight = window.innerHeight || document.documentElement.clientHeight, scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop, left, top, clientRect;	if (typeof field.getBoundingClientRect === 'function') {	clientRect = field.getBoundingClientRect();	left = clientRect.left + window.pageXOffset;	top = clientRect.bottom + window.pageYOffset;	} else {	left = pEl.offsetLeft;	top = pEl.offsetTop + pEl.offsetHeight;	while ((pEl = pEl.offsetParent)) {	left += pEl.offsetLeft;	top += pEl.offsetTop;	}	}	if (left + width > viewportWidth) {	left = left - width + field.offsetWidth;	}	if (top + height > viewportHeight + scrollTop) {	top = top - height - field.offsetHeight;	}	this.el.style.cssText = 'position:absolute;left:' + left + 'px;top:' + top + 'px;';	},	/** * render HTML for a particular month */	render: function(year, month) {	var opts = this._o, now = new Date(), days = getDaysInMonth(year, month), before = new Date(year, month, 1).getDay(), data = [], row = [];	setToStartOfDay(now);	if (opts.firstDay > 0) {	before -= opts.firstDay;	if (before < 0) {	before += 7;	}	}	var cells = days + before, after = cells;	while (after > 7) {	after -= 7;	}	cells += 7 - after;	for (var i = 0, r = 0; i < cells; i++) {	var day = new Date(year, month, 1 + (i - before)), isDisabled = (opts.minDate && day < opts.minDate) || (opts.maxDate && day > opts.maxDate), isSelected = isDate(this._d) ? compareDates(day, this._d) : false, isToday = compareDates(day, now), isEmpty = i < before || i >= (days + before);	row.push(renderDay(1 + (i - before), isSelected, isToday, isDisabled, isEmpty));	if (++r === 7) {	data.push(renderRow(row, opts.isRTL));	row = [];	r = 0;	}	}	return renderTable(opts, data);	},	isVisible: function() {	return this._v;	},	show: function() {	if (!this._v) {	if (this._o.bound) {	addEvent(document, 'click', this._onClick);	}	removeClass(this.el, 'is-hidden');	this._v = true;	this.draw();	if (typeof this._o.onOpen === 'function') {	this._o.onOpen.call(this);	}	}	},	hide: function() {	var v = this._v;	if (v !== false) {	if (this._o.bound) {	removeEvent(document, 'click', this._onClick);	}	this.el.style.cssText = '';	addClass(this.el, 'is-hidden');	this._v = false;	if (v !== undefined && typeof this._o.onClose === 'function') {	this._o.onClose.call(this);	}	}	},	/** * GAME OVER */	destroy: function() {	this.hide();	removeEvent(this.el, 'mousedown', this._onMouseDown, true);	removeEvent(this.el, 'change', this._onChange);	if (this._o.field) {	removeEvent(this._o.field, 'change', this._onInputChange);	if (this._o.bound) {	removeEvent(this._o.trigger, 'click', this._onInputClick);	removeEvent(this._o.trigger, 'focus', this._onInputFocus);	removeEvent(this._o.trigger, 'blur', this._onInputBlur);	}	}	if (this.el.parentNode) {	this.el.parentNode.removeChild(this.el);	}	}	};	return Pikaday;
}));
// Override some settings from jquery.unobtrusive
$(function() {	$("form").each(function() {	var $form = $(this);	var validator = $form.data("validator");	if (!validator){	return;	}	var settings = validator.settings;	settings.highlight = function (element) { //also passed, not used - errorClass, validClass	$(element).attr("data-error-highlight", "y");	var $field = $(element).closest("li");	$field.addClass("field-error");	};	settings.unhighlight = function (element) { //also passed, not used - errorClass, validClass	$(element).attr("data-error-highlight", "n");	var $field = $(element).closest("li");	if ($field.find("[data-error-highlight=y]").length === 0) {	$field.removeClass("field-error");	}	};	// Override standard keyup/focus events to prevent annoying behavior on mobiles	settings.onkeyup = false;	settings.onfocusout = false;	// Hide custom error message when form validates - as two error messages looks clumsy	$form.on("submit", function(event) {	if (event.result) {	//validate suceeded	return;	}	if (!$form.valid()) {	$(".custom-error-message").hide();	}	});	});
});
$(function() {	// Setup info popups (lightbox)	infoPopup.init();
});
var infoPopup = (function () {	var init = function () {	var $infoPopupLinks = $("[data-action='display-popup']");	var $infoPopups = $(".info-popup");	var $body = $("body");	// Init info popups	$infoPopups.each(function () {	var $popup = $(this);	var $closeButton = $popup.find(".close");	if ($closeButton.length) {	$closeButton.click(function () {	$body.removeClass("popped");	$popup.removeClass("visible");	});	}	if ($popup.hasClass("kiosk-mode")) {	$popup.find(".content a").each(function () {	var $link = $(this);	$link.click(function () {	return false;	});	});	}	});	// Init popup links	$infoPopupLinks.each(function () {	var $link = $(this);	// Assign click handler to link	$link.click(function (e) {	e.preventDefault();	var popupId = $link.attr("href");	var $popupToShow = $infoPopups.filter(popupId);	if ($popupToShow) {	$popupToShow.addClass("visible");	$body.addClass("popped");	}	});	});	};	return { init: init };
}());
var cardSelector = (function() {	var $cardSelector, $selectedIndex, $selectCardButton, $selectedMethodContainer, $methodSelectList;	var methodSelectListOpen = false;	var init = function () {	$cardSelector = $(".card-selector");	if (!$cardSelector.length) {	return;	}	$selectedIndex = $cardSelector.find("input.selected-index");	$selectCardButton = $("[data-action=select-card]");	$selectedMethodContainer = $cardSelector.find(".selected-card-container");	$methodSelectList = $cardSelector.find(".selector-box");	// Show selected card reference on load	$methodSelectList.find(".card-reference").each(function () {	if (getPaymentMethodIndex($(this)) === $selectedIndex.val()) {	showSelectedCardReference($(this));	return false;	}	});	if (!$selectCardButton.length) {	return; // No payment selector present	}	// Setup showing of payment methods	$selectCardButton.on("click", showPaymentMethods);	// Setup selection of paymnet methods	$methodSelectList.on("click touch", ".selector-item", selectPaymentMethod);	};	var showPaymentMethods = function ( ) { //this has e as an arugment but not used	if (!methodSelectListOpen) {	$selectedMethodContainer.hide();	$methodSelectList.show();	} else {	$selectedMethodContainer.show();	$methodSelectList.hide();	}	toggleMethodList();	};	var selectPaymentMethod = function ( ) {//this has e as an arugment but not used	var $cardReference = $(this).find(".card-reference");	var selectedPaymentMethodIndex = $cardReference.attr("data-payment-method-index");	updateSelectedIndex(selectedPaymentMethodIndex);	showSelectedCardReference($cardReference);	toggleMethodList();	};	var updateSelectedIndex = function(index) {	$selectedIndex.val(index);	};	var showSelectedCardReference = function (cardReference) {	$methodSelectList.hide();	$selectedMethodContainer	.html(cardReference.parent().html())	.show();	};	var getPaymentMethodIndex = function(cardReference) {	return cardReference.attr("data-payment-method-index");	};	var toggleMethodList = function() {	methodSelectListOpen = !methodSelectListOpen;	};	return { init: init };
}());
$(function() {	cardSelector.init();
});
var paymentSelector = (function() {	var $paymentSelector, $selectedIndex, $selectedType, $selectMethodButton, $selectedMethodContainer, $methodSelectList, $paymentTermsContainer;	var methodSelectListOpen = false;	var paymentMethodTypeTermsFormat = "terms-confirm-static-";	var init = function () {	$paymentSelector = $(".payment-selector");	$selectedMethodContainer = $(".selected-method-container");	if (!$paymentSelector.length && !$selectedMethodContainer.length) {	return;	}	$selectedIndex = $("[data-payment-method-selector-role=hidden-field]");	$selectedType = $("[data-payment-method-type-selector-role=hidden-field]");	$selectMethodButton = $("[data-action=selected-method]");	$paymentTermsContainer = $(".terms-confirm-container");	// Setup the payment selector if present	if ($selectMethodButton.length) {	$methodSelectList = $paymentSelector.find(".selector-box");	// Setup showing of payment methods	$selectMethodButton.on("click", togglePaymentMethods);	// Setup selection of paymnet methods	$methodSelectList.on("click touch", ".selector-item:not(.unavailable)", selectPaymentMethod);	}	// Setup initial visiblity on payment terms	togglePaymentMethodTypeTermsToDisplay();	if ($paymentTermsContainer.length) { // if page has a terms container then check what terms (if any) the loaded payment method has to display	var $paymentTermsSource = $selectedMethodContainer.find("[data-pp-confirm-terms]");	togglePaymentMethodTermsToConfirm($paymentTermsSource);	}	};	var togglePaymentMethods = function ( ) { //this has e as an arugment but not used	if (!methodSelectListOpen) {	$methodSelectList.addClass("visible");	} else {	$methodSelectList.removeClass("visible");	}	methodSelectListOpen = !methodSelectListOpen;	};	var selectPaymentMethod = function ( ) {//this has e as an arugment but not used	var $cardReference = $(this).find(".card-reference");	var selectedPaymentMethodIndex = $cardReference.attr("data-payment-method-index");	var selectedPaymentMethodType = $cardReference.attr("data-payment-method-type");	updateSelectedPaymentInfo(selectedPaymentMethodIndex, selectedPaymentMethodType);	showSelectedCardReference($cardReference);	togglePaymentMethods();	togglePaymentMethodTypeTermsToDisplay();	if ($paymentTermsContainer.length) { // if page has a terms container then check what terms (if any) this payment method has to display	var $paymentTermsSource = $(this).find("[data-pp-confirm-terms]");	togglePaymentMethodTermsToConfirm($paymentTermsSource);	}	};	var updateSelectedPaymentInfo = function (index, type) {	$selectedIndex.val(index);	$selectedType.val(type);	};	var showSelectedCardReference = function (cardReference) {	$selectedMethodContainer	.html(cardReference.parent().html())	.show();	};	var togglePaymentMethodTermsToConfirm = function (paymentTermsSource) {	if (!paymentTermsSource.length) { // the selected payment method doesn't have terms so hide the payment method terms confirmation container	$paymentTermsContainer.hide();	return;	}	// show the payment method terms text that the user needs to confirm	var $termsToDisplay = $paymentTermsContainer.find("[data-pp-terms-confirm-text]");	$termsToDisplay.html(paymentTermsSource.html());	$paymentTermsContainer.show();	};	var togglePaymentMethodTypeTermsToDisplay = function() {	// hide all payment method type terms text	$("[class^='" + paymentMethodTypeTermsFormat + "']").hide();	// show the active payment method type terms text	$("." + paymentMethodTypeTermsFormat + $selectedType.val().toLowerCase()).show();	};	return { init: init };
}());
$(function() {	paymentSelector.init();
});
/*jshint quotmark:false */
/*jshint camelcase:false */
/*jshint immed:false */
/*jshint maxlen:250 */
/*jshint eqeqeq: false */
/*jshint unused:false */
/* global: Pikaday:true,DocumentTouch:true,bby_app:true,bby_ui:true, init:true,FastClick:true */
(function(undefined){	jQuery(function() {	bby_app.init();	bby_ui.init();	});	// APP OBJECT =================================================================================	var app = (function () {	var iOS	= ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false );	// NOTE: agent sniffing not ideal, but used so we know whether we can use input[type=date] - android does not support	init = function () {	};	return { init: init, iOS: iOS };	}());	// DATA OBJECT ================================================================================	var data = (function ( app ) {	var isLoading	= false,	loadData = function( _endpoint, _dataType, _handler ) {	// handler for routing data requests & responses.	// _endpoint is where to get the data from, _dataType is specified in case we need it,	// and _handler is the method to pass the returned data to on success	isLoading = true;	$.ajax({	url	: _endpoint, // + '?modifier=' + scriptUtils.randRange(0,10000),	//dataType	: _dataType,	//async	: false,	success	: function( returnedData ) {	// if success, return data to the specified handler function	isLoading = false;	_handler( returnedData );	},	error	: function( e ) {	// else something dun went wrong	isLoading = false;	handleError( e );	}	});	},	handleError = function( e ) {	// handle error from a data load	if( console.error ) { console.error("oops - error was " + e.status + ": " + e.statusText); }	};	return { loadData: loadData };	}( app ));	// UI OBJECT ==================================================================================	var ui = function (data,app) {	var isMobile = {	Android: function () {	return navigator.userAgent.match(/Android/i);	},	BlackBerry: function () {	return navigator.userAgent.match(/BlackBerry/i);	},	iOS: function () {	return navigator.userAgent.match(/iPhone|iPad|iPod/i);	},	Opera: function () {	return navigator.userAgent.match(/Opera Mini/i);	},	Windows: function () {	return navigator.userAgent.match(/IEMobile/i);	},	any: function () {	return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());	}	};	//	GLOBAL UI VARS ------------------------------------------------------------------------	var isTouch = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,	isOldIe	= ( $('.ie8').length ) ? true : false,	isTablet	= ( $(window).width() < 1100 ),	isMob	= ( $(window).width() < 700 ),	$win	= $(window),	$body	= $('body'),	$header	= $('.body-header'),	$mainNav	= $('.main-nav'),	$userMenu	= $('.user');	if (isTouch) { // chrome in a vm responds to touch need to verify it is an actual device.	isTouch = isMobile.Android() || isMobile.iOS();	}	/*	UI.MAINNAV ----------------------------------------------------------------------------	menu behaviours on desktop / tablet	*/	var MainNav = function(){	var $col_ico	= null,	$col_txt	= null,	$col_sub	= null,	$itm_ico	= null,	$itm_txt	= null,	$itm_all	= null,	$itm_sub	= null,	$subNavSelected	= null,	frag_collapser	= '<div class="collapser"></div>',	frag_revealer	= '<div class="revealer"></div>',	$collapser	= null,	$revealer	= null,	init = function() {	buildNav();	// add behaviours to both text & icon elements	if( !isTouch ) {	$itm_all	.on('mouseenter', highlightItem)	.on('mouseleave', resetStates)	.on('click', clickItem);	}	else {	// for touch devices, we need to do a bit more work	// resize the main page container	$('#container').addClass('expanded');	$('.user').addClass('expanded');	// add a class to collapse the nav into just the icon bar	$header.addClass('for-touch');	// add a couple of divs to the DOM to expand & collapse the nav	$body	.append(frag_collapser)	.append(frag_revealer);	$collapser	= $('.collapser');	$revealer	= $('.revealer');	// add behaviours to nav items	$itm_all	.on('touchstart', clickItem)	.on('touchstart', highlightItem);	// add behaviours to expand / collapse the nav	$revealer.on('touchstart', function(){	$(this).hide();	$collapser.show();	$header.removeClass('for-touch');	if( $subNavSelected.length ) {	$itm_ico.parent().find('.active').trigger('touchstart').trigger('touchstart');	}	});	$collapser.on('touchend', hideSubnav);	}	// does a second level item have a 'selected' state?	$subNavSelected = $itm_sub.find('.selected');	revealSelected();	// when mousing off the nav entirely, return to selected item if applicable	$header.on('mouseleave', revealSelected);	setTimeout(function() { $("body").removeClass("no-transitions"); }, 100);	},	buildNav = function() {	var frag_icon	= '',	frag_text	= '',	frag_sub	= '';	// create columns	$header.append('<div class="nav-col col-icons"><ul></ul></div><div class="nav-col col-text"><ul></ul></div><div class="nav-col col-subnav"></div>');	$col_ico = $('.col-icons');	$col_txt = $('.col-text');	$col_sub = $('.col-subnav');	// split content into appropriate columns	$('.main-nav > ul > li > a, .main-nav > ul > li > strong').each( function( i ){	var subClass	= ( $(this).siblings('ul').length ) ? 'has-sub' : '',	rel	= '',	url	= $(this).attr('href');	if( $(this).hasClass('selected') ) {	subClass += ' selected';	}	if( subClass.length > 0 ) {	frag_sub += '<ul id="subnav' + i + '">' + $(this).siblings('ul').html() + '</ul>';	rel = 'subnav' + i;	}	frag_icon += '<li class="' + subClass + '" rel="' + rel + '" data-url="' + url + '"><span class="' + $(this).attr('class') + '"></span></li>';	frag_text += '<li class="' + subClass + '" rel="' + rel + '" data-url="' + url + '"><span>' + $(this).text() + '</span></li>';	});	$col_ico.find('ul').append( frag_icon );	$col_txt.find('ul').append( frag_text );	$col_sub.append( frag_sub );	// define objects for use	$itm_ico = $col_ico.find('li');	$itm_txt = $col_txt.find('li');	$itm_all = $('.col-icons li, .col-text li');	$itm_sub = $col_sub.find('ul');	// walk the text column to see if we have any overly long (and hence high) items that need adjusting	$itm_txt.each( function( i ){	// if we do find a long one	if( $(this).height() > 70 ) {	// add a class to amend the line height	$(this).addClass('long');	// and resize the corresponding ico container to match	$itm_ico.eq(i).height( $(this).height() );	}	});	// finally, add the stripe spans	$header.append('<span class="stripe"></span><span class="stripe stripe2"></span>');	},	highlightItem = function() {	resetStates();	// get the index of the item touched / hovered (either ico or text)	var i = $(this).index();	// then add the hover class to both ico & text at that index in their respective columns	$itm_ico.eq(i).addClass('hover');	$itm_txt.eq(i).addClass('hover');	// if this item has a subnav, show it	if( $(this).hasClass('has-sub') ) {	// ...as long as it's not an item that ALREADY has its subnav shown	if( !$(this).hasClass('active') ) {	$itm_ico.removeClass('active');	$itm_ico.eq(i).addClass('active');	showSubnav( $(this).attr('rel') );	}	else {	// because if so, we want to return to the default state on tablet	$header.removeClass('show-subnav');	$itm_ico.removeClass('active');	}	}	// otherwise, kill the subnav column	else {	hideSubnav();	}	},	resetStates = function() {	$itm_ico.removeClass('hover');	$itm_txt.removeClass('hover');	},	showSubnav = function( _whichSubnav ) {	// hide all subnavs (not the column)	$itm_sub.removeClass('active');	// and add class to reveal subnav col	$header.addClass('show-subnav');	// find the relevant subnav and add class to show that	$('#' + _whichSubnav).addClass('active');	if( isTouch ) {	$collapser.show();	}	},	hideSubnav = function() {	$header.removeClass('show-subnav');	$itm_ico.removeClass('active');	if( isTouch ) {	// on tablets, reset all the things	$collapser.hide();	$itm_ico.removeClass('hover');	$header.addClass('for-touch');	$revealer.show();	revealSelected();	}	return false;	},	clickItem = function() {	// if this is a top level item (i.e it has a data-url attribute) go to that link	var url = $(this).attr('data-url');	if (url != 'null' && url != 'undefined') {	window.location = url;	}	},	revealSelected = function() {	// if one of the subnav links is selected, reveal it	if( $subNavSelected.length ) {	var $subTrigger = $itm_ico.filter('[rel=' + $subNavSelected.parents('ul').attr('id') + ']');	//if( isTouch ) {	if( $header.hasClass('for-touch') ) {	//$subTrigger.trigger('touchstart');	$subTrigger.addClass('active');	}	else {	if( !$subTrigger.hasClass('active') ) {	$subTrigger.trigger('mouseover');	$subTrigger.trigger('touchstart');	}	}	return true;	}	else {	return false;	}	};	return { init: init };	}();	/*	UI.MOBMAINNAV -------------------------------------------------------------------------	menu behaviours on phone	*/	var MobMainNav = function(){	var $open	= $header.find('.open-menu'),	$close	= $header.find('.close-menu'),	init = function() {	// attach behaviours to the open & close buttons	$header	.on('click', '.open-menu', function(){	$mainNav.addClass('show');	// disable scrolling while menu is open	$win.on('touchmove', function(e){	//e.preventDefault();	});	return false;	})	.on('click', '.close-menu', function(){	$mainNav.removeClass('show');	// re-enable scrolling	$win.off('touchmove');	return false;	});	};	return { init: init };	}();	/*	UI.USERMENU ---------------------------------------------------------------------------	show / hide the user details menu	*/	var userMenu = function(){	var $menu	= $('.user-menu'),	init = function() {	$userMenu.on('click', '.open-user-menu', toggleUserMenu);	$userMenu.on('click', '.close-menu', toggleUserMenu);	},	toggleUserMenu = function() {	/*jshint ignore:start */	( $menu.hasClass('show') ) ? $menu.removeClass('show') : $menu.addClass('show');	/*jshint ignore:end */	return false;	};	return { init: init };	}();	/*	UI.MOBPODS ----------------------------------------------------------------------------	behaviours for 'pods' on mobile	*/	var MobPods = function(){	var $pods	= $('.pod').not('footer .pod'),	init = function() {	/*$pods	.on('touchstart', function() {	$(this)	.addClass('active')	.on('touchend', function() {	$(this).removeClass('active')	window.location = $(this).find('a').eq(0).attr('href');	});	})	.on('touchmove', function() {	$(this).removeClass('active')	$(this).off('touchend');	});*/	},	toggleUserMenu = function() {	};	return { init: init };	}();	/*	UI.MOBTABLES --------------------------------------------------------------------------	re-rendering tables on mobile	*/	var MobTables = function(){	var $dataList	= $('.data-list'),	$rows	= $dataList.find('tr'),	$ths	= $dataList.find('th'),	colHeads	= [],	init = function() {	// get the text out of the THs to use when labeling info	$ths.each( function(){	colHeads.push( $(this).text() );	});	// process each row & add reveal behaviours	$rows.each(processRow);	$('.reveal-ind').on('click', function() {	return false;	});	},	processRow = function() {	// for each row in the table, chop up the non-essential data to be shown on click	var frag = '<div class="more">';	$(this).find('td').each( function( i ){	if( !$(this).hasClass('mob-show') && !$(this).hasClass('mob-hide')) {	frag += '<span><strong>' + colHeads[i] + ':</strong> ' + $(this).text() + '</span>';	}	});	frag += '</div><a href="" class="reveal-ind">o</a>';	$(this).append(frag);	$(this).on('click', function () {	/*jshint ignore:start */	($(this).hasClass('show-more')) ? $(this).removeClass('show-more') : $(this).addClass('show-more');	/*jshint ignore:end */	});	},	newData = function( _obj ) {	_obj.each( processRow );	};	return { init: init, newData: newData };	}();	/*	UI.EXPANDCOLLAPSE ---------------------------------------------------------------------	adds behaviours to expand & collapse an associated target	*/	var expandCollapse = function(){	var $triggers = $('.exp-col'),	init = function() {	$triggers.on('click', function(){	if( $(this).hasClass('collapsed') ) {	$(this).removeClass('collapsed');	$('#' + $(this).data('target')).removeClass('collapsed');	}	else {	$(this).addClass('collapsed');	$( '#' + $(this).data('target') ).addClass('collapsed');	}	return false;	});	};	return { init: init };	}();	/*	UI.FORMPROGRESS -----------------------------------------------------------------------	behaviours for the 'progress' menu on new merchant application	*/	var formProgress = function(){	var $prog	= $('.form-progress'),	$trig	= $prog.find('.inds, h4'),	$uTicks	= $prog.find('.user-tick'),	init = function() {	$uTicks.on('click', function(){	/*jshint ignore:start */	( $(this).hasClass('complete') ) ? $(this).removeClass('complete') : $(this).addClass('complete');	/*jshint ignore:end */	});	if( isTouch ) {	$trig.on('touchend', function(e) {	/*jshint ignore:start */	($prog.hasClass('active')) ? $prog.removeClass('active') : $prog.addClass('active');	/*jshint ignore:end */	e.preventDefault();	return false;	});	}	};	return { init: init };	}();	/*	UI.FORMS ------------------------------------------------------------------------------	handling for Date fields in forms	*/	var forms = function(){	var $datePickers	= $('.date input[type=text]'),	init = function() {	// set up datepicker if existent	if( $datePickers.length ) {	var dateFormat = 'YYYY-MM-DD';	$datePickers.attr('placeholder', dateFormat);	/*jshint ignore:start */	$datePickers.each(function() {	new Pikaday({	field: $(this)[0],	format: dateFormat,	firstDay: 1	});	});	/*jshint ignore:end */	}	};	return { init: init };	}();	/*	UI.MOBTABS ----------------------------------------------------------------------------	behaviours for showing / hiding tabbed navigation on mobile	*/	var MobTabs = function(){	var $tabNav	= $('.tabs'),	init = function() {	$tabNav.on('click', '.mob-ind', function() {	/*jshint ignore:start */	($tabNav.hasClass('active')) ? $tabNav.removeClass('active') : $tabNav.addClass('active');	/*jshint ignore:end */	});	};	return { init: init };	}();	/*	UI.SEARCH ----------------------------------------------------------------------------	behaviours for organisation search	*/	var search = function () {	var minimumSearchCharacters = 1;	var $search = $('.org-search'), searchUrl, $input = $search.find('input.merchant-search'),	$locationInput = $search.find('input.pp-data-browser-location'), $resultsContainer = null, $items = null, $trigger = $('.mob-trigger-search'),	currActive = -1,	init = function (isMob) {	var pauseTime = 300,	pauseTimeout = null;	// SHIFT + A keyboard shortcut to show nav	$win.on('keyup', function (e) {	if (e.which === 83 && e.shiftKey) {	$input.focus();	}	});	// Set placeholder for search field	if (!isMob) {	$input.attr('placeholder', 'Search for an organisation (SHIFT + S)');	}	// Setup variables	$resultsContainer = $search.find(".results");	searchUrl = $search.data("search-url");	// Handle triggering of mobile search icon	if (isMob) {	$trigger.on('click', function () {	if ($search.hasClass('onscreen')) {	$search.removeClass('onscreen');	$(this).removeClass('active');	} else {	$search.addClass('onscreen');	$(this).addClass('active');	$input.focus();	}	return false;	});	}	// Handle input on search field	$search	.on('keyup', 'input', function(e) {	if (e.keyCode === 40) {	// down arrow	currActive++;	highlight(currActive);	} else if (e.keyCode === 38) {	// up arrow	currActive--;	highlight(currActive);	} else if (e.keyCode === 13) {	e.preventDefault();	e.stopPropagation();	if ($items.length) {	navigateToItem($items.eq(currActive));	}	} else {	clearTimeout(pauseTimeout);	pauseTimeout = setTimeout(doSearch, pauseTime);	}	})	.on('mousedown', 'a', function() {	navigateToItem($(this));	})	.on('blur', 'input', function() {	$search.removeClass('active');	})	.on('mousedown', 'input', function() {	// Ask for the browsers location if supported, and only once	if (navigator.geolocation	&& $locationInput.length == 1	&& $locationInput.val() == '') {	navigator.geolocation.getCurrentPosition(function(pos) {	$locationInput.val(pos.coords.latitude + ', ' + pos.coords.longitude);	});	}	});	},	doSearch = function () {	if ($input.val().length > minimumSearchCharacters) {	// Clear results first	$resultsContainer.empty();	//Perform search	$.get(searchUrl + "?name=" + $input.val() + "&location=" + $locationInput.val(), function (html) {	$search.addClass('active');	$resultsContainer.empty();	$resultsContainer.append(html);	$items = $resultsContainer.find('a');	});	}	},	highlight = function (_which) {	if (_which === -1) {	_which = $items.length - 1;	}	if (_which === $items.length) {	_which = 0;	}	currActive = _which;	$items	.removeClass('hi')	.eq(_which)	.addClass('hi');	},	navigateToItem = function ($anchor) {	window.location = $anchor.attr("href");	};	return { init: init };	}();	/*	UI.OLDIE ------------------------------------------------------------------------------	helper methods for oldIE	*/	var oldIe = function(){	var $cols = $('.columns'),	init = function() {	// no nth-child in IE8 - force it	$cols.find('.col:nth-child(2n+1)').css('margin-left',0);	$('table tr:nth-child(2n+1)').addClass('alt');	};	return { init: init };	}();	/*	UI.INIT -------------------------------------------------------------------------------	UI all inits here	*/	var init = function () {	if( !isMob ) {	MainNav.init();	search.init(false);	}	else {	MobMainNav.init();	MobPods.init();	MobTables.init();	search.init(true);	if( $('.tabs').length ) {	MobTabs.init();	}	}	expandCollapse.init();	userMenu.init();	if( $('.form-progress').length ){ formProgress.init();}	if( $('fieldset').length ) { forms.init(); }	if( isOldIe ) { oldIe.init(); }	// remove 300ms delay on links	FastClick.attach(document.body);	};	return { init: init, MobTables: MobTables };	}( data, app );	window.bby_app	= app;	window.bby_ui	= ui;
})();

$(function() {	$('body').toggleClass('cookies-disabled', !navigator.cookieEnabled);
});
var dropdown = function() {	var options = {	openClass: 'open'	};	var _dropdown = null;	var _internal = {};	var init = function(element) {	_dropdown = $(element);	$(document).on('click', _internal.documentClick);	};	_internal.documentClick = function(e) {	if (_dropdown.is(e.target) || _dropdown.has(e.target).length > 0)	{	_dropdown.toggleClass(options.openClass);	} else {	_dropdown.removeClass(options.openClass);	}	};	return {	init: init,	_internal: _internal	};
};
$(function() {	$('.dropdown').each(function() {	var dd = new dropdown();	dd.init(this);	});
});
if ($.validator && $.validator.unobtrusive) {	$.validator.unobtrusive.adapters.addSingleVal("confirmpaymentmethodterms", "paymentmethodtype");	$.validator.addMethod("confirmpaymentmethodterms", function (value, element, paymentmethodtype) {	var $paymentmethodtype = $('#' + paymentmethodtype);	if ($paymentmethodtype.val() == "ACH" && !$(element).is(":checked")) {	return false;	}	return true;	});
}
jQuery.validator.unobtrusive.adapters.add('requiredcheckbox', function(options) {	if (!$(options.element).is(':checked')) {	options.rules["required"] = true;	if (options.message) {	options.messages["required"] = options.message;	}	}
});
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
var AccountHandler = function AccountHandler() {	this.Bank = this.Branch = this.Unique = this.Suffix = "";
};
AccountHandler.prototype.strip = function (txt) {	return txt.replace(/[^0-9]+/g, "");
};
AccountHandler.prototype.parse = function (txt) {	txt = this.strip(txt);	if (txt.length === 15 || txt.length === 16) {	//12 1234 1234567 12	this.Bank = txt.substring(0, 2);	this.Branch = txt.substring(2, 6);	this.Unique = txt.substring(6, 13);	this.Suffix = txt.substring(13, txt.length);	} else if (txt.length === 13 || txt.length === 14) {	this.parseFromBranch(txt);	} else if (txt.length === 8 || txt.length === 9) {	this.parseFromUnique(txt);	}
};
AccountHandler.prototype.parseFromBranch = function (txt) {	txt = this.strip(txt);	this.Branch = txt.substring(0, 4);	this.Unique = txt.substring(4, 11);	this.Suffix = txt.substring(11, txt.length);
};
AccountHandler.prototype.parseFromUnique = function (txt) {	txt = this.strip(txt);	this.Unique = txt.substring(0, 7);	this.Suffix = txt.substring(7, txt.length);
};
module.exports = AccountHandler;
},{}],2:[function(require,module,exports){
"use strict";
var AccountIndicators = function AccountIndicators(opts) {	this.accounts = [];	this._container = $(opts.container);	this.$bank = this._container.children("input").first();	this.$branch = this._container.children("input").first().next("input");	this.$imgContainer = $(".logo-container");	this.$bank.on("blur", this.bankBlur.bind(this));	this.$branch.on("blur", this.branchBlur.bind(this));
};
AccountIndicators.prototype.bankBlur = function (e) {	if (!e) {	return;	}	var targ = e.currentTarget;	$("[data-pp-bank-numbers]").addClass("hidden").filter("*[data-pp-bank-numbers~=" + $(targ).val() + "]").removeClass("hidden");
};
AccountIndicators.prototype.branchBlur = function () {	var branch = this.$branch.val();	var bank = this.$bank.val();	this.getBranchInfo(bank, branch);
};
AccountIndicators.prototype.getBranchInfo = function (bank, branch) {	$.getJSON("/nzbanks/branch", {	bankNumber: bank,	branchNumber: branch	}, this.setBranchInfo);
};
AccountIndicators.prototype.setBranchInfo = function (data) {	if (data.ErrorMessage) {	$("#branch-name").text("");	} else {	$("#branch-name").text(data.BranchName);	}
};
AccountIndicators.prototype.init = function () {	this.bankBlur();	this.branchBlur();
};
module.exports = AccountIndicators;
},{}],3:[function(require,module,exports){
//private vars
"use strict";
var _container;
var AccountHandler = require("./AccountHandler");
var AccountIndicators = require("./AccountIndicators");
var postion = require("../Utilities/position");
var _accountHandler;
var platform = require("platform");
$.fn.isAtMaxlength = function () {	return this.data("maxlength") == this.val().length;
};
var allowedCodes = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57];
var typedCodes = {	48: 0,	49: 1,	50: 2,	51: 3,	52: 4,	53: 5,	54: 6,	55: 7,	56: 8,	57: 9
};
var LEFT_ARROW = 37;
var RIGHT_ARROW = 39;
var BACKSPACE = 8;
var IS_IOS = platform.ua !== null && platform.os.family.indexOf("iOS") > -1;
var nextAndSetValue = function nextAndSetValue($this, val) {	;	var next = $this.next("input");	$this.blur();	next.focus();	var currentVal = next.val();	next.val(currentVal + "" + val);	return next;
};
var prev = function prev($this) {	var $prev = $this.prev("input");	$this.blur();	$prev.focus();	return $prev;
};
var getCurrentPosition = postion.getCurrentPosition;
var setCurrentPosition = postion.setCurrentPosition;
var isValidInput = function isValidInput(charCode) {	return allowedCodes.indexOf(charCode) > -1;
};
var _touchFocusHandler = function _touchFocusHandler(e) {	;	$(e.currentTarget).focus();	$(e.currentTarget).click();
};
var InputHandler = function InputHandler(opts) {	_accountHandler = new AccountHandler();	this.fields = [];	_container = $(opts.container);	;	if (_container.length === 0) {	return;	}	this.active = true;	$(opts.container + " input").each((function (index, el) {	var $el = $(el);	$el.data("index");	if (platform.os.family === "Android") {	$el.attr("type", "number");	}	this.fields.push($el);	}).bind(this));	this.indicator = new AccountIndicators(opts);
};
InputHandler.prototype.active = false;
InputHandler.prototype.init = function () {	if (IS_IOS) {	return;	}	if (!this.active) {	return;	}	for (var i = 0; i < this.fields.length; i++) {	var el = $(this.fields[i]);	var lengthTrigger = el.attr("maxlength");	el.data("maxlength", lengthTrigger);	if (i < this.fields.length - 1) {	el.removeAttr("maxlength");	} else {	el.removeAttr("maxlength");	el.attr("maxlength", 2);	el.attr("placeholder", "●●");	}	this.bindElement(el, i);	}	this.indicator.init();
};
InputHandler.prototype.bindElement = function (el, index) {	el.on("keydown", this._keydownHandler.bind(this));	el.on("keyup", this._keyupHandler.bind(this));	el.on("paste", this._pasteHandler.bind(this));	el.on("focus", function () {	;	});	el.on("blur", function () {	;	});	if (index !== 3 && platform.ua !== null && platform.os.family.indexOf("iOS") > -1) {	el.on("touchstart", _touchFocusHandler.bind(this));	}
};
InputHandler.prototype.fields = [];
InputHandler.prototype.set = function () {	$(this.fields[0]).val(_accountHandler.Bank);	$(this.fields[1]).val(_accountHandler.Branch);	$(this.fields[2]).val(_accountHandler.Unique);	$(this.fields[3]).val(_accountHandler.Suffix);	//$(this.fields[3]).focus();	var accountname = $("#NzBankAccount_AccountName");	if (accountname.length === 0) {	accountname = $("#AccountName");	}	accountname.focus();
};
InputHandler.prototype.setPastedText = function (text) {	_accountHandler.parse(text);	this.set();
};
InputHandler.prototype._keydownHandler = function (e) {	;	var charCode = e.which ? e.which : event.keyCode;	var $this = $(e.currentTarget);	var currentPos = getCurrentPosition(e.currentTarget);	if ($this.val().length === 0 && charCode === BACKSPACE) {	;	$this.prev().focus();	e.preventDefault();	return;	}	//just handle valid numbers for this	if (isValidInput(charCode) && $this.isAtMaxlength()) {	;	nextAndSetValue($this, typedCodes[charCode]);	e.preventDefault();	}	if (charCode === LEFT_ARROW && currentPos === 0) {	;	var $prev = prev($(e.currentTarget));	var prevDom = $prev.get(0);	setCurrentPosition(prevDom, $prev.data("maxlength"));	e.preventDefault();	}	if (charCode === RIGHT_ARROW) {	;	e.preventDefault();	if ($this.data("maxlength") <= currentPos) {	var next = $this.next("input");	$this.blur();	next.focus();	} else {	setCurrentPosition(e.currentTarget, currentPos + 1);	}	return;	}
};
InputHandler.prototype._keyupHandler = function (e) {	var $this = $(e.currentTarget);	;	var charCode = e.which ? e.which : event.keyCode;	;	if (charCode === LEFT_ARROW || charCode === RIGHT_ARROW) {	e.preventDefault();	return;	}	if ($this.isAtMaxlength() && charCode !== BACKSPACE) {	var next = $this.next("input");	$this.blur();	next.focus();	}
};
InputHandler.prototype._pasteHandler = function (event) {	var e = event.originalEvent;	var pastedText;	if (window.clipboardData && window.clipboardData.getData) {	// IE	pastedText = window.clipboardData.getData("Text");	} else if (e.clipboardData && e.clipboardData.getData) {	pastedText = e.clipboardData.getData("text/plain");	} else {	pastedText = "";	}	this.setPastedText(pastedText);	e.preventDefault();
};
module.exports = InputHandler;
},{"../Utilities/position":6,"./AccountHandler":1,"./AccountIndicators":2,"platform":11}],4:[function(require,module,exports){
"use strict";
exports.init = init;
Object.defineProperty(exports, "__esModule", {	value: true
});
/*
pollArgs: {"Status":"processing","NextPollUrl":"/hpp/payment-status?key=testfail1","KeepPolling":true,"PollingIntervalMilliseconds":2000}
$c (container): a jquery object to update the [data-pp-status] of.
*/
var previousStatus = "StillGoing";
function poll($c, pollInfo) {	var pollData = pollInfo;	try {	pollInfo = JSON.parse(pollInfo);	} catch (e) {	pollInfo = pollData;	}	if (typeof pollInfo === "string") {	;	return;	}	if (previousStatus !== pollInfo.Status) {	$c.addClass("changed");	}	$c.attr("data-pp-status", pollInfo.Status);	if (pollInfo.KeepPolling && pollInfo.NextPollUrl && pollInfo.PollingIntervalMilliseconds) {	setTimeout(function () {	return $.post(pollInfo.NextPollUrl).done(function (x) {	return poll($c, x);	}).fail(function (e) {	return poll($c, { Status: "Disconnected" });	});	}, pollInfo.PollingIntervalMilliseconds);	}
}
function init() {	$("[data-pp-poll-for-status]").each(function (i, x) {	var $t = $(x);	previousStatus = $t.data("pp-poll-for-status").Status;	poll($t, $t.data("pp-poll-for-status"));	});
}
},{}],5:[function(require,module,exports){
//this could be applied even more globally, currently just inited from guestpayments.js
"use strict";
exports.init = init;
Object.defineProperty(exports, "__esModule", {	value: true
});
function init() {	$.ajaxPrefilter(addCsrfTokenToPost);
}
//assume this doesn't need to be re-evaluated as it's generated on the server
var tok = $("input[name=__RequestVerificationToken]").first().serialize();
function addCsrfTokenToPost(options) {	if (options.type.toUpperCase() !== "POST") {	return;	}	if (!tok) {	;	return;	}	if (options.data) {	options.data += "&" + tok;	} else {	options.data = tok;	}
}
},{}],6:[function(require,module,exports){
"use strict";
module.exports = {	getCurrentPosition: function getCurrentPosition(input) {	;	var pos = 0; // IE Support	if (document.selection) {	;	input.focus();	var Sel = document.selection.createRange();	Sel.moveStart("character", -input.value.length);	pos = Sel.text.length;	} else if (input.selectionStart || input.selectionStart === 0) {	;	pos = input.selectionStart;	}	return pos;	},	setCurrentPosition: function setCurrentPosition(input, pos) {	;	if (input.setSelectionRange) {	;	input.focus();	input.setSelectionRange(pos, pos);	} else if (input.createTextRange) {	;	var range = input.createTextRange();	range.collapse(true);	range.moveEnd("character", pos);	range.moveStart("character", pos);	range.select();	}	}
};
},{}],7:[function(require,module,exports){
"use strict";
var numericOnly = require("./utilities/numericonly");
/*
'element'	<span>	<div>
'flag'	<span></span>	<span>
'select'	<select>	1+ <option></option>	</select>	</span>
'input'	<input></input>	</div>	</span>
*/
(function ($) {	"use strict";	$.internationalMobileInput = function (el, options) {	var _plugin = this;	_plugin.wrapper = null;	_plugin.element = null;	_plugin.select = null;	_plugin.flag = null;	_plugin.selectedPlaceholder = null;	_plugin.selectedFlagIcon = null;	_plugin.selectedOption = null;	_plugin.input = null;	var _internal = {};	var init = function init() {	_plugin.element = $(el);	_internal.findElements();	_internal.wireEvents();	_internal.changeTriggers(); // set default state	//Trigger default icon & placeholders	_internal.selectOnChange();	;	};	_internal.findElements = function () {	_plugin.wrapper = _plugin.element.find("div.email-phone-input-control");	_plugin.select = _plugin.element.find("select");	_plugin.input = _plugin.element.find("input");	_plugin.flag = _plugin.element.find("span.dynamic-country-icon");	};	_internal.wireEvents = function () {	_plugin.select.change(_internal.selectOnChange);	$(window).resize(_internal.adjustInputWidth);	};	_internal.selectOnChange = function () {	_plugin.selectedOption = _plugin.select.find("option:selected");	var selCountry = _plugin.select.val();	_plugin.selectedPlaceholder = _plugin.selectedOption.attr("data-pp-country-placeholder");	_plugin.selectedFlagIcon = _plugin.selectedOption.attr("data-pp-country-icon-class");	;	_internal.changeTriggers();	};	_internal.changeTriggers = function () {	_plugin.input.attr("placeholder", _plugin.selectedPlaceholder);	_plugin.flag.attr("class", _plugin.selectedFlagIcon); // We already have the flag element, so no need to preserve it's class	};	// explicitly set with for mobile	// we want the input as wide as possible	_internal.adjustInputWidth = function () {	if ($(document).width() <= 700) {	_plugin.element.width(_plugin.wrapper.width() - _plugin.select.outerWidth() - 10);	} else {	_plugin.element.attr("style", null);	}	};	init();	};
})(jQuery);
$(document).ready(function () {	$(".phone-group-control").each(function () {	new $.internationalMobileInput(this);	});
});
},{"./utilities/numericonly":10}],8:[function(require,module,exports){
//bank accounts:
"use strict";
var InputHandler = require("./BankAccounts/InputHandler");
var inputs = new InputHandler({ container: ".grouped-input" });
inputs.init();
require("./PushpayWeb/putRequestVerificationTokenIntoAllJQueryAjaxPosts").init();
require("./PushpayWeb/pollForStatus").init();
require("./internationalMobileInput.js");
require("./money-input.js");
},{"./BankAccounts/InputHandler":3,"./PushpayWeb/pollForStatus":4,"./PushpayWeb/putRequestVerificationTokenIntoAllJQueryAjaxPosts":5,"./internationalMobileInput.js":7,"./money-input.js":9}],9:[function(require,module,exports){
"use strict";
var numericOnly = require("./utilities/numericonly");
(function ($) {	$.moneyInput = function (el) {	var _plugin = this;	var _internal = {};	_plugin.settings = {};	var init = function init() {	_plugin.element = $(el);	_internal.bindEvents();	_internal.addOn();	};	_internal.bindEvents = function () {	_plugin.element.bind("keydown", numericOnly);	_plugin.element.bind("blur", _internal.lostFocus);	};	_internal.lostFocus = function () {	_internal.completeDecimal();	};	_internal.completeDecimal = function (e) {	var val = _plugin.element.val();	// ends with .	if (val.match(/\.$/)) {	_plugin.element.val(val + "00");	return;	}	// begin .	if (val.match(/^\./)) {	_plugin.element.val("0.00");	}	};	_internal.addOn = function () {	var currencyAttr = _plugin.element.attr("currency");	if (currencyAttr === undefined || currencyAttr.length === 0) {	return;	}	// create wrapper	var wrapper = $("<div class=\"input-with-addon\"></div>");	_plugin.element.parent().append(wrapper);	// add add on	var addOn = $("<span>" + currencyAttr + "</span>");	wrapper.append(addOn);	_plugin.element.appendTo(wrapper);	};	init();	};
})(jQuery);
$(document).ready(function () {	$(".money-input").each(function () {	new $.moneyInput(this);	});
});
},{"./utilities/numericonly":10}],10:[function(require,module,exports){
"use strict";
/**
Use
<input type="number" numericonly/>
// allow decimal
<input type="number" numericonly="decimal"/>
// allow currencies - note type change
<input type="type" numericonly="decimal currency"/>
*/
var numericOnly = function numericOnly(ev) {	var $this = $(this);	function allowedCharacters(e) {	var unicodeIdentifier = e.originalEvent.keyIdentifier;	if (unicodeIdentifier === "U+0008" || // backspace	unicodeIdentifier === "U+0030" || // 0	unicodeIdentifier === "U+0031" || // 1	unicodeIdentifier === "U+0032" || // 2	unicodeIdentifier === "U+0033" || // 3	unicodeIdentifier === "U+0034" || // 4	unicodeIdentifier === "U+0035" || // 5	unicodeIdentifier === "U+0036" || // 6	unicodeIdentifier === "U+0037" || // 7	unicodeIdentifier === "U+0038" || // 8	unicodeIdentifier === "U+0039") {	// 9	return true;	}	// allows decimals	if ($this.attr("numericonly").indexOf("decimal") !== -1 && $this.val().indexOf(".") === -1 && unicodeIdentifier === "U+002E") {	// .	return true;	}	// allows currencies	// this is a bad idea as it only works on text input types	// text input types will not bring up the numeric keyboard on mobile	if ($this.attr("numericonly").indexOf("currency") !== -1 && $this.val().length === 0 && (unicodeIdentifier === "U+0024" || // $	unicodeIdentifier === "U+00A3" || // �	unicodeIdentifier === "U+00A5")) {	// �	return true;	}	return false;	}	function allowedModifer(e) {	var ctrlA = e.ctrlKey && e.keyCode === 65, ctrlX = e.ctrlKey && e.keyCode === 88, ctrlC = e.ctrlKey && e.keyCode === 67, ctrlV = e.ctrlKey && e.keyCode === 86, cmdA = e.metaKey && e.keyCode === 65, cmdX = e.metaKey && e.keyCode === 88, cmdC = e.metaKey && e.keyCode === 67, cmdV = e.metaKey && e.keyCode === 86, tab = e.keyCode === 9;	return ctrlA || ctrlX || ctrlC || ctrlV || cmdA || cmdX || cmdC || cmdV || tab;	}	if (!allowedCharacters(ev) && !allowedModifer(ev)) {	ev.preventDefault();	}
};
module.exports = numericOnly;
// only allow it as the first character
},{}],11:[function(require,module,exports){
(function (global){
/*! * Platform.js v1.1.0 <http://mths.be/platform> * Copyright 2010-2014 John-David Dalton <http://allyoucanleet.com/> * Available under MIT license <http://mths.be/mit> */
;(function() { 'use strict'; /** Used to determine if values are of the language type Object */ var objectTypes = { 'function': true, 'object': true }; /** Used as a reference to the global object */ var root = (objectTypes[typeof window] && window) || this; /** Backup possible global object */ var oldRoot = root; /** Detect free variable `exports` */ var freeExports = objectTypes[typeof exports] && exports; /** Detect free variable `module` */ var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { root = freeGlobal; } /** * Used as the maximum length of an array-like object. * See the [ES6 spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) * for more details. */ var maxSafeInteger = Math.pow(2, 53) - 1; /** Opera regexp */ var reOpera = /Opera/; /** Possible global object */ var thisBinding = this; /** Used for native method references */ var objectProto = Object.prototype; /** Used to check for own properties of an object */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to resolve the internal `[[Class]]` of values */ var toString = objectProto.toString; /*--------------------------------------------------------------------------*/ /** * Capitalizes a string value. * * @private * @param {string} string The string to capitalize. * @returns {string} The capitalized string. */ function capitalize(string) { string = String(string); return string.charAt(0).toUpperCase() + string.slice(1); } /** * An iteration utility for arrays and objects. * * @private * @param {Array|Object} object The object to iterate over. * @param {Function} callback The function called per iteration. */ function each(object, callback) { var index = -1, length = object ? object.length : 0; if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { while (++index < length) { callback(object[index], index, object); } } else { forOwn(object, callback); } } /** * Trim and conditionally capitalize string values. * * @private * @param {string} string The string to format. * @returns {string} The formatted string. */ function format(string) { string = trim(string); return /^(?:webOS|i(?:OS|P))/.test(string) ? string : capitalize(string); } /** * Iterates over an object's own properties, executing the `callback` for each. * * @private * @param {Object} object The object to iterate over. * @param {Function} callback The function executed per own property. */ function forOwn(object, callback) { for (var key in object) { if (hasOwnProperty.call(object, key)) { callback(object[key], key, object); } } } /** * Gets the internal [[Class]] of a value. * * @private * @param {*} value The value. * @returns {string} The [[Class]]. */ function getClassOf(value) { return value == null ? capitalize(value) : toString.call(value).slice(8, -1); } /** * Host objects can return type values that are different from their actual * data type. The objects we are concerned with usually return non-primitive * types of "object", "function", or "unknown". * * @private * @param {*} object The owner of the property. * @param {string} property The property to check. * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. */ function isHostType(object, property) { var type = object != null ? typeof object[property] : 'number'; return !/^(?:boolean|number|string|undefined)$/.test(type) && (type == 'object' ? !!object[property] : true); } /** * Prepares a string for use in a `RegExp` by making hyphens and spaces optional. * * @private * @param {string} string The string to qualify. * @returns {string} The qualified string. */ function qualify(string) { return String(string).replace(/([ -])(?!$)/g, '$1?'); } /** * A bare-bones `Array#reduce` like utility function. * * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function called per iteration. * @returns {*} The accumulated result. */ function reduce(array, callback) { var accumulator = null; each(array, function(value, index) { accumulator = callback(accumulator, value, index, array); }); return accumulator; } /** * Removes leading and trailing whitespace from a string. * * @private * @param {string} string The string to trim. * @returns {string} The trimmed string. */ function trim(string) { return String(string).replace(/^ +| +$/g, ''); } /*--------------------------------------------------------------------------*/ /** * Creates a new platform object. * * @memberOf platform * @param {Object|string} [ua=navigator.userAgent] The user agent string or * context object. * @returns {Object} A platform object. */ function parse(ua) { /** The environment context object */ var context = root; /** Used to flag when a custom context is provided */ var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String'; // juggle arguments if (isCustomContext) { context = ua; ua = null; } /** Browser navigator object */ var nav = context.navigator || {}; /** Browser user agent string */ var userAgent = nav.userAgent || ''; ua || (ua = userAgent); /** Used to flag when `thisBinding` is the [ModuleScope] */ var isModuleScope = isCustomContext || thisBinding == oldRoot; /** Used to detect if browser is like Chrome */ var likeChrome = isCustomContext ? !!nav.likeChrome : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString()); /** Internal [[Class]] value shortcuts */ var objectClass = 'Object', airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject', enviroClass = isCustomContext ? objectClass : 'Environment', javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java), phantomClass = isCustomContext ? objectClass : 'RuntimeObject'; /** Detect Java environment */ var java = /Java/.test(javaClass) && context.java; /** Detect Rhino */ var rhino = java && getClassOf(context.environment) == enviroClass; /** A character to represent alpha */ var alpha = java ? 'a' : '\u03b1'; /** A character to represent beta */ var beta = java ? 'b' : '\u03b2'; /** Browser document object */ var doc = context.document || {}; /** * Detect Opera browser * https://www.howtocreate.co.uk/operaStuff/operaObject.html * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini */ var opera = context.operamini || context.opera; /** Opera [[Class]] */ var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera)) ? operaClass : (opera = null); /*------------------------------------------------------------------------*/ /** Temporary variable used over the script's lifetime */ var data; /** The CPU architecture */ var arch = ua; /** Platform description array */ var description = []; /** Platform alpha/beta indicator */ var prerelease = null; /** A flag to indicate that environment features should be used to resolve the platform */ var useFeatures = ua == userAgent; /** The browser/environment version */ var version = useFeatures && opera && typeof opera.version == 'function' && opera.version(); /* Detectable layout engines (order is important) */ var layout = getLayout([ { 'label': 'WebKit', 'pattern': 'AppleWebKit' }, 'iCab', 'Presto', 'NetFront', 'Tasman', 'Trident', 'KHTML', 'Gecko' ]); /* Detectable browser names (order is important) */ var name = getName([ 'Adobe AIR', 'Arora', 'Avant Browser', 'Camino', 'Epiphany', 'Fennec', 'Flock', 'Galeon', 'GreenBrowser', 'iCab', 'Iceweasel', { 'label': 'SRWare Iron', 'pattern': 'Iron' }, 'K-Meleon', 'Konqueror', 'Lunascape', 'Maxthon', 'Midori', 'Nook Browser', 'PhantomJS', 'Raven', 'Rekonq', 'RockMelt', 'SeaMonkey', { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, 'Sleipnir', 'SlimBrowser', 'Sunrise', 'Swiftfox', 'WebPositive', 'Opera Mini', 'Opera', { 'label': 'Opera', 'pattern': 'OPR' }, 'Chrome', { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' }, { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' }, { 'label': 'IE', 'pattern': 'MSIE' }, 'Safari' ]); /* Detectable products (order is important) */ var product = getProduct([ { 'label': 'BlackBerry', 'pattern': 'BB10' }, 'BlackBerry', { 'label': 'Galaxy S', 'pattern': 'GT-I9000' }, { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' }, { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' }, { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' }, 'Google TV', 'iPad', 'iPod', 'iPhone', 'Kindle', { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, 'Nook', 'PlayBook', 'PlayStation 4', 'PlayStation 3', 'PlayStation Vita', 'TouchPad', 'Transformer', { 'label': 'Wii U', 'pattern': 'WiiU' }, 'Wii', 'Xbox One', { 'label': 'Xbox 360', 'pattern': 'Xbox' }, 'Xoom' ]); /* Detectable manufacturers */ var manufacturer = getManufacturer({ 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 }, 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 }, 'Asus': { 'Transformer': 1 }, 'Barnes & Noble': { 'Nook': 1 }, 'BlackBerry': { 'PlayBook': 1 }, 'Google': { 'Google TV': 1 }, 'HP': { 'TouchPad': 1 }, 'HTC': { }, 'LG': { }, 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 }, 'Motorola': { 'Xoom': 1 }, 'Nintendo': { 'Wii U': 1, 'Wii': 1 }, 'Nokia': { }, 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 }, 'Sony': { 'PlayStation 4': 1, 'PlayStation 3': 1, 'PlayStation Vita': 1 } }); /* Detectable OSes (order is important) */ var os = getOS([ 'Android', 'CentOS', 'Debian', 'Fedora', 'FreeBSD', 'Gentoo', 'Haiku', 'Kubuntu', 'Linux Mint', 'Red Hat', 'SuSE', 'Ubuntu', 'Xubuntu', 'Cygwin', 'Symbian OS', 'hpwOS', 'webOS ', 'webOS', 'Tablet OS', 'Linux', 'Mac OS X', 'Macintosh', 'Mac', 'Windows 98;', 'Windows ' ]); /*------------------------------------------------------------------------*/ /** * Picks the layout engine from an array of guesses. * * @private * @param {Array} guesses An array of guesses. * @returns {null|string} The detected layout engine. */ function getLayout(guesses) { return reduce(guesses, function(result, guess) { return result || RegExp('\\b' + ( guess.pattern || qualify(guess) ) + '\\b', 'i').exec(ua) && (guess.label || guess); }); } /** * Picks the manufacturer from an array of guesses. * * @private * @param {Object} guesses An object of guesses. * @returns {null|string} The detected manufacturer. */ function getManufacturer(guesses) { return reduce(guesses, function(result, value, key) { // lookup the manufacturer by product or scan the UA for the manufacturer return result || ( value[product] || value[0/*Opera 9.25 fix*/, /^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] || RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua) ) && key; }); } /** * Picks the browser name from an array of guesses. * * @private * @param {Array} guesses An array of guesses. * @returns {null|string} The detected browser name. */ function getName(guesses) { return reduce(guesses, function(result, guess) { return result || RegExp('\\b' + ( guess.pattern || qualify(guess) ) + '\\b', 'i').exec(ua) && (guess.label || guess); }); } /** * Picks the OS name from an array of guesses. * * @private * @param {Array} guesses An array of guesses. * @returns {null|string} The detected OS name. */ function getOS(guesses) { return reduce(guesses, function(result, guess) { var pattern = guess.pattern || qualify(guess); if (!result && (result = RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua) )) { // platform tokens defined at // https://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx // https://web.archive.org/web/20081122053950/https://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx data = { '6.3': '8.1', '6.2': '8', '6.1': 'Server 2008 R2 / 7', '6.0': 'Server 2008 / Vista', '5.2': 'Server 2003 / XP 64-bit', '5.1': 'XP', '5.01': '2000 SP1', '5.0': '2000', '4.0': 'NT', '4.90': 'ME' }; // detect Windows version from platform tokens if (/^Win/i.test(result) && (data = data[0/*Opera 9.25 fix*/, /[\d.]+$/.exec(result)])) { result = 'Windows ' + data; } // correct character case and cleanup result = format(String(result) .replace(RegExp(pattern, 'i'), guess.label || guess) .replace(/ ce$/i, ' CE') .replace(/hpw/i, 'web') .replace(/Macintosh/, 'Mac OS') .replace(/_PowerPC/i, ' OS') .replace(/(OS X) [^ \d]+/i, '$1') .replace(/Mac (OS X)/, '$1') .replace(/\/(\d)/, ' $1') .replace(/_/g, '.') .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '') .replace(/x86\.64/gi, 'x86_64') .split(' on ')[0]); } return result; }); } /** * Picks the product name from an array of guesses. * * @private * @param {Array} guesses An array of guesses. * @returns {null|string} The detected product name. */ function getProduct(guesses) { return reduce(guesses, function(result, guess) { var pattern = guess.pattern || qualify(guess); if (!result && (result = RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) || RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua) )) { // split by forward slash and append product version if needed if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) { result[0] += ' ' + result[1]; } // correct character case and cleanup guess = guess.label || guess; result = format(result[0] .replace(RegExp(pattern, 'i'), guess) .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ') .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2')); } return result; }); } /** * Resolves the version using an array of UA patterns. * * @private * @param {Array} patterns An array of UA patterns. * @returns {null|string} The detected version. */ function getVersion(patterns) { return reduce(patterns, function(result, pattern) { return result || (RegExp(pattern + '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null; }); } /** * Returns `platform.description` when the platform object is coerced to a string. * * @name toString * @memberOf platform * @returns {string} Returns `platform.description` if available, else an empty string. */ function toStringPlatform() { return this.description || ''; } /*------------------------------------------------------------------------*/ // convert layout to an array so we can add extra details layout && (layout = [layout]); // detect product names that contain their manufacturer's name if (manufacturer && !product) { product = getProduct([manufacturer]); } // clean up Google TV if ((data = /Google TV/.exec(product))) { product = data[0]; } // detect simulators if (/\bSimulator\b/i.test(ua)) { product = (product ? product + ' ' : '') + 'Simulator'; } // detect iOS if (/^iP/.test(product)) { name || (name = 'Safari'); os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua)) ? ' ' + data[1].replace(/_/g, '.') : ''); } // detect Kubuntu else if (name == 'Konqueror' && !/buntu/i.test(os)) { os = 'Kubuntu'; } // detect Android browsers else if (manufacturer && manufacturer != 'Google' && ((/Chrome/.test(name) && !/Mobile Safari/.test(ua)) || /Vita/.test(product))) { name = 'Android Browser'; os = /Android/.test(os) ? os : 'Android'; } // detect false positives for Firefox/Safari else if (!name || (data = !/\bMinefield\b|\(Android;/i.test(ua) && /Firefox|Safari/.exec(name))) { // escape the `/` for Firefox 1 if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) { // clear name of false positives name = null; } // reassign a generic name if ((data = product || manufacturer || os) && (product || manufacturer || /Android|Symbian OS|Tablet OS|webOS/.test(os))) { name = /[a-z]+(?: Hat)?/i.exec(/Android/.test(os) ? os : data) + ' Browser'; } } // detect Firefox OS if ((data = /\((Mobile|Tablet).*?Firefox/i.exec(ua)) && data[1]) { os = 'Firefox OS'; if (!product) { product = data[1]; } } // detect non-Opera versions (order is important) if (!version) { version = getVersion([ '(?:Cloud9|CriOS|CrMo|Iron|Opera ?Mini|OPR|Raven|Silk(?!/[\\d.]+$))', 'Version', qualify(name), '(?:Firefox|Minefield|NetFront)' ]); } // detect stubborn layout engines if (layout == 'iCab' && parseFloat(version) > 3) { layout = ['WebKit']; } else if ((data = /Opera/.test(name) && (/OPR/.test(ua) ? 'Blink' : 'Presto') || /\b(?:Midori|Nook|Safari)\b/i.test(ua) && 'WebKit' || !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') )) { layout = [data]; } // detect NetFront on PlayStation else if (/PlayStation(?! Vita)/i.test(name) && layout == 'WebKit') { layout = ['NetFront']; } // detect IE 11 and above if (!name && layout == 'Trident') { name = 'IE'; version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]; } // leverage environment features if (useFeatures) { // detect server-side environments // Rhino has a global function while others have a global object if (isHostType(context, 'global')) { if (java) { data = java.lang.System; arch = data.getProperty('os.arch'); os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version'); } if (isHostType(context, 'exports')) { if (isModuleScope && isHostType(context, 'system') && (data = [context.system])[0]) { os || (os = data[0].os || null); try { data[1] = (data[1] = context.require) && data[1]('ringo/engine').version; version = data[1].join('.'); name = 'RingoJS'; } catch(e) { if (data[0].global.system == context.system) { name = 'Narwhal'; } } } else if (typeof context.process == 'object' && (data = context.process)) { name = 'Node.js'; arch = data.arch; os = data.platform; version = /[\d.]+/.exec(data.version)[0]; } else if (rhino) { name = 'Rhino'; } } else if (rhino) { name = 'Rhino'; } } // detect Adobe AIR else if (getClassOf((data = context.runtime)) == airRuntimeClass) { name = 'Adobe AIR'; os = data.flash.system.Capabilities.os; } // detect PhantomJS else if (getClassOf((data = context.phantom)) == phantomClass) { name = 'PhantomJS'; version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch); } // detect IE compatibility modes else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) { // we're in compatibility mode when the Trident version + 4 doesn't // equal the document mode version = [version, doc.documentMode]; if ((data = +data[1] + 4) != version[1]) { description.push('IE ' + version[1] + ' mode'); layout && (layout[1] = ''); version[1] = data; } version = name == 'IE' ? String(version[1].toFixed(1)) : version[0]; } os = os && format(os); } // detect prerelease phases if (version && (data = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) || /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) || /\bMinefield\b/i.test(ua) && 'a' )) { prerelease = /b/i.test(data) ? 'beta' : 'alpha'; version = version.replace(RegExp(data + '\\+?$'), '') + (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || ''); } // detect Firefox Mobile if (name == 'Fennec' || name == 'Firefox' && /Android|Firefox OS/.test(os)) { name = 'Firefox Mobile'; } // obscure Maxthon's unreliable version else if (name == 'Maxthon' && version) { version = version.replace(/\.[\d.]+/, '.x'); } // detect Silk desktop/accelerated modes else if (name == 'Silk') { if (!/Mobi/i.test(ua)) { os = 'Android'; description.unshift('desktop mode'); } if (/Accelerated *= *true/i.test(ua)) { description.unshift('accelerated'); } } // detect Windows Phone desktop mode else if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { name += ' Mobile'; os = 'Windows Phone OS ' + data + '.x'; description.unshift('desktop mode'); } // detect Xbox 360 and Xbox One else if (/Xbox/i.test(product)) { os = null; if (product == 'Xbox 360' && /IEMobile/.test(ua)) { description.unshift('mobile mode'); } } // add mobile postfix else if ((name == 'Chrome' || name == 'IE' || name && !product && !/Browser|Mobi/.test(name)) && (os == 'Windows CE' || /Mobi/i.test(ua))) { name += ' Mobile'; } // detect IE platform preview else if (name == 'IE' && useFeatures && context.external === null) { description.unshift('platform preview'); } // detect BlackBerry OS version // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp else if ((/BlackBerry/.test(product) || /BB10/.test(ua)) && (data = (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] || version )) { data = [data, /BB10/.test(ua)]; os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0]; version = null; } // detect Opera identifying/masking itself as another browser // http://www.opera.com/support/kb/view/843/ else if (this != forOwn && ( product != 'Wii' && ( (useFeatures && opera) || (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) || (name == 'Firefox' && /OS X (?:\d+\.){2,}/.test(os)) || (name == 'IE' && ( (os && !/^Win/.test(os) && version > 5.5) || /Windows XP/.test(os) && version > 8 || version == 8 && !/Trident/.test(ua) )) ) ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) { // when "indentifying", the UA contains both Opera and the other browser's name data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : ''); if (reOpera.test(name)) { if (/IE/.test(data) && os == 'Mac OS') { os = null; } data = 'identify' + data; } // when "masking", the UA contains only the other browser's name else { data = 'mask' + data; if (operaClass) { name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2')); } else { name = 'Opera'; } if (/IE/.test(data)) { os = null; } if (!useFeatures) { version = null; } } layout = ['Presto']; description.push(data); } // detect WebKit Nightly and approximate Chrome/Safari versions if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { // correct build for numeric comparison // (e.g. "532.5" becomes "532.05") data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data]; // nightly builds are postfixed with a `+` if (name == 'Safari' && data[1].slice(-1) == '+') { name = 'WebKit Nightly'; prerelease = 'alpha'; version = data[1].slice(0, -1); } // clear incorrect browser versions else if (version == data[1] || version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { version = null; } // use the full Chrome version when available data[1] = (/\bChrome\/([\d.]+)/i.exec(ua) || 0)[1]; // detect Blink layout engine if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28) { layout = ['Blink']; } // detect JavaScriptCore // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi if (!useFeatures || (!likeChrome && !data[1])) { layout && (layout[1] = 'like Safari'); data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : '7'); } else { layout && (layout[1] = 'like Chrome'); data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28'); } // add the postfix of ".x" or "+" for approximate versions layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+')); // obscure version for some Safari 1-2 releases if (name == 'Safari' && (!version || parseInt(version) > 45)) { version = data; } } // detect Opera desktop modes if (name == 'Opera' && (data = /(?:zbov|zvav)$/.exec(os))) { name += ' '; description.unshift('desktop mode'); if (data == 'zvav') { name += 'Mini'; version = null; } else { name += 'Mobile'; } } // detect Chrome desktop mode else if (name == 'Safari' && /Chrome/.exec(layout && layout[1])) { description.unshift('desktop mode'); name = 'Chrome Mobile'; version = null; if (/OS X/.test(os)) { manufacturer = 'Apple'; os = 'iOS 4.3+'; } else { os = null; } } // strip incorrect OS versions if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 && ua.indexOf('/' + data + '-') > -1) { os = trim(os.replace(data, '')); } // add layout engine if (layout && !/Avant|Nook/.test(name) && ( /Browser|Lunascape|Maxthon/.test(name) || /^(?:Adobe|Arora|Midori|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(name) && layout[1])) { // don't add layout details to description if they are falsey (data = layout[layout.length - 1]) && description.push(data); } // combine contextual information if (description.length) { description = ['(' + description.join('; ') + ')']; } // append manufacturer if (manufacturer && product && product.indexOf(manufacturer) < 0) { description.push('on ' + manufacturer); } // append product if (product) { description.push((/^on /.test(description[description.length -1]) ? '' : 'on ') + product); } // parse OS into an object if (os) { data = / ([\d.+]+)$/.exec(os); os = { 'architecture': 32, 'family': data ? os.replace(data[0], '') : os, 'version': data ? data[1] : null, 'toString': function() { var version = this.version; return this.family + (version ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : ''); } }; } // add browser/OS architecture if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) { if (os) { os.architecture = 64; os.family = os.family.replace(RegExp(' *' + data), ''); } if (name && (/WOW64/i.test(ua) || (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform)))) { description.unshift('32-bit'); } } ua || (ua = null); /*------------------------------------------------------------------------*/ /** * The platform object. * * @name platform * @type Object */ var platform = {}; /** * The platform description. * * @memberOf platform * @type string|null */ platform.description = ua; /** * The name of the browser's layout engine. * * @memberOf platform * @type string|null */ platform.layout = layout && layout[0]; /** * The name of the product's manufacturer. * * @memberOf platform * @type string|null */ platform.manufacturer = manufacturer; /** * The name of the browser/environment. * * @memberOf platform * @type string|null */ platform.name = name; /** * The alpha/beta release indicator. * * @memberOf platform * @type string|null */ platform.prerelease = prerelease; /** * The name of the product hosting the browser. * * @memberOf platform * @type string|null */ platform.product = product; /** * The browser's user agent string. * * @memberOf platform * @type string|null */ platform.ua = ua; /** * The browser/environment version. * * @memberOf platform * @type string|null */ platform.version = name && version; /** * The name of the operating system. * * @memberOf platform * @type Object */ platform.os = os || { /** * The CPU architecture the OS is built for. * * @memberOf platform.os * @type number|null */ 'architecture': null, /** * The family of the OS. * * @memberOf platform.os * @type string|null */ 'family': null, /** * The version of the OS. * * @memberOf platform.os * @type string|null */ 'version': null, /** * Returns the OS string. * * @memberOf platform.os * @returns {string} The OS string. */ 'toString': function() { return 'null'; } }; platform.parse = parse; platform.toString = toStringPlatform; if (platform.version) { description.unshift(version); } if (platform.name) { description.unshift(name); } if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) { description.push(product ? '(' + os + ')' : 'on ' + os); } if (description.length) { platform.description = description.join(' '); } return platform; } /*--------------------------------------------------------------------------*/ // export platform // some AMD build optimizers, like r.js, check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // define as an anonymous module so, through path mapping, it can be aliased define(function() { return parse(); }); } // check for `exports` after `define` in case a build optimizer adds an `exports` object else if (freeExports && freeModule) { // in Narwhal, Node.js, Rhino -require, or RingoJS forOwn(parse(), function(value, key) { freeExports[key] = value; }); } // in a browser or Rhino else { root.platform = parse(); }
}.call(this));
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}]},{},[8])
//# sourceMappingURL=loggedInWeb.js.map
/* * SimpleModal 1.4.4 - jQuery Plugin * http://simplemodal.com/ * Copyright (c) 2013 Eric Martin * Licensed under MIT and GPL * Date: Sun, Jan 20 2013 15:58:56 -0800 */
/** * SimpleModal is a lightweight jQuery plugin that provides a simple * interface to create a modal dialog. * * The goal of SimpleModal is to provide developers with a cross-browser * overlay and container that will be populated with data provided to * SimpleModal. * * There are two ways to call SimpleModal: * 1) As a chained function on a jQuery object, like $('#myDiv').modal();. * This call would place the DOM object, #myDiv, inside a modal dialog. * Chaining requires a jQuery object. An optional options object can be * passed as a parameter. * * @example $('<div>my data</div>').modal({options}); * @example $('#myDiv').modal({options}); * @example jQueryObject.modal({options}); * * 2) As a stand-alone function, like $.modal(data). The data parameter * is required and an optional options object can be passed as a second * parameter. This method provides more flexibility in the types of data * that are allowed. The data could be a DOM object, a jQuery object, HTML * or a string. * * @example $.modal('<div>my data</div>', {options}); * @example $.modal('my data', {options}); * @example $.modal($('#myDiv'), {options}); * @example $.modal(jQueryObject, {options}); * @example $.modal(document.getElementById('myDiv'), {options}); * * A SimpleModal call can contain multiple elements, but only one modal * dialog can be created at a time. Which means that all of the matched * elements will be displayed within the modal container. * * SimpleModal internally sets the CSS needed to display the modal dialog * properly in all browsers, yet provides the developer with the flexibility * to easily control the look and feel. The styling for SimpleModal can be * done through external stylesheets, or through SimpleModal, using the * overlayCss, containerCss, and dataCss options. * * SimpleModal has been tested in the following browsers: * - IE 6+ * - Firefox 2+ * - Opera 9+ * - Safari 3+ * - Chrome 1+ * * @name SimpleModal * @type jQuery * @requires jQuery v1.3 * @cat Plugins/Windows and Overlays * @author Eric Martin (http://ericmmartin.com) * @version 1.4.4 */
;(function (factory) {	if (typeof define === 'function' && define.amd) {	// AMD. Register as an anonymous module.	define(['jquery'], factory);	} else {	// Browser globals	factory(jQuery);	}
}
(function ($) {	var d = [],	doc = $(document),	ua = navigator.userAgent.toLowerCase(),	wndw = $(window),	w = [];	var browser = {	ieQuirks: null,	msie: /msie/.test(ua) && !/opera/.test(ua),	opera: /opera/.test(ua)	};	browser.ie6 = browser.msie && /msie 6./.test(ua) && typeof window['XMLHttpRequest'] !== 'object';	browser.ie7 = browser.msie && /msie 7.0/.test(ua);	/* * Create and display a modal dialog. * * @param {string, object} data A string, jQuery object or DOM object * @param {object} [options] An optional object containing options overrides */	$.modal = function (data, options) {	return $.modal.impl.init(data, options);	};	/* * Close the modal dialog. */	$.modal.close = function () {	$.modal.impl.close();	};	/* * Set focus on first or last visible input in the modal dialog. To focus on the last * element, call $.modal.focus('last'). If no input elements are found, focus is placed * on the data wrapper element. */	$.modal.focus = function (pos) {	$.modal.impl.focus(pos);	};	/* * Determine and set the dimensions of the modal dialog container. * setPosition() is called if the autoPosition option is true. */	$.modal.setContainerDimensions = function () {	$.modal.impl.setContainerDimensions();	};	/* * Re-position the modal dialog. */	$.modal.setPosition = function () {	$.modal.impl.setPosition();	};	/* * Update the modal dialog. If new dimensions are passed, they will be used to determine * the dimensions of the container. * * setContainerDimensions() is called, which in turn calls setPosition(), if enabled. * Lastly, focus() is called is the focus option is true. */	$.modal.update = function (height, width) {	$.modal.impl.update(height, width);	};	/* * Chained function to create a modal dialog. * * @param {object} [options] An optional object containing options overrides */	$.fn.modal = function (options) {	return $.modal.impl.init(this, options);	};	/* * SimpleModal default options * * appendTo:	(String:'body') The jQuery selector to append the elements to. For .NET, use 'form'. * focus:	(Boolean:true) Focus in the first visible, enabled element? * opacity:	(Number:50) The opacity value for the overlay div, from 0 - 100 * overlayId:	(String:'simplemodal-overlay') The DOM element id for the overlay div * overlayCss:	(Object:{}) The CSS styling for the overlay div * containerId:	(String:'simplemodal-container') The DOM element id for the container div * containerCss:	(Object:{}) The CSS styling for the container div * dataId:	(String:'simplemodal-data') The DOM element id for the data div * dataCss:	(Object:{}) The CSS styling for the data div * minHeight:	(Number:null) The minimum height for the container * minWidth:	(Number:null) The minimum width for the container * maxHeight:	(Number:null) The maximum height for the container. If not specified, the window height is used. * maxWidth:	(Number:null) The maximum width for the container. If not specified, the window width is used. * autoResize:	(Boolean:false) Automatically resize the container if it exceeds the browser window dimensions? * autoPosition:	(Boolean:true) Automatically position the container upon creation and on window resize? * zIndex:	(Number: 1000) Starting z-index value * close:	(Boolean:true) If true, closeHTML, escClose and overClose will be used if set.	If false, none of them will be used. * closeHTML:	(String:'<a class="modalCloseImg" title="Close"></a>') The HTML for the default close link.	SimpleModal will automatically add the closeClass to this element. * closeClass:	(String:'simplemodal-close') The CSS class used to bind to the close event * escClose:	(Boolean:true) Allow Esc keypress to close the dialog? * overlayClose:	(Boolean:false) Allow click on overlay to close the dialog? * fixed:	(Boolean:true) If true, the container will use a fixed position. If false, it will use a	absolute position (the dialog will scroll with the page) * position:	(Array:null) Position of container [top, left]. Can be number of pixels or percentage * persist:	(Boolean:false) Persist the data across modal calls? Only used for existing	DOM elements. If true, the data will be maintained across modal calls, if false,	the data will be reverted to its original state. * modal:	(Boolean:true) User will be unable to interact with the page below the modal or tab away from the dialog.	If false, the overlay, iframe, and certain events will be disabled allowing the user to interact	with the page below the dialog. * onOpen:	(Function:null) The callback function used in place of SimpleModal's open * onShow:	(Function:null) The callback function used after the modal dialog has opened * onClose:	(Function:null) The callback function used in place of SimpleModal's close */	$.modal.defaults = {	appendTo: 'body',	focus: true,	opacity: 50,	overlayId: 'simplemodal-overlay',	overlayCss: {},	containerId: 'simplemodal-container',	containerCss: {},	dataId: 'simplemodal-data',	dataCss: {},	minHeight: null,	minWidth: null,	maxHeight: null,	maxWidth: null,	autoResize: false,	autoPosition: true,	zIndex: 1000,	close: true,	closeHTML: '<a class="modalCloseImg" title="Close"></a>',	closeClass: 'simplemodal-close',	escClose: true,	overlayClose: false,	fixed: true,	position: null,	persist: false,	modal: true,	onOpen: null,	onShow: null,	onClose: null	};	/* * Main modal object * o = options */	$.modal.impl = {	/* * Contains the modal dialog elements and is the object passed * back to the callback (onOpen, onShow, onClose) functions */	d: {},	/* * Initialize the modal dialog */	init: function (data, options) {	var s = this;	// don't allow multiple calls	if (s.d.data) {	return false;	}	// $.support.boxModel is undefined if checked earlier	browser.ieQuirks = browser.msie && !$.support.boxModel;	// merge defaults and user options	s.o = $.extend({}, $.modal.defaults, options);	// keep track of z-index	s.zIndex = s.o.zIndex;	// set the onClose callback flag	s.occb = false;	// determine how to handle the data based on its type	if (typeof data === 'object') {	// convert DOM object to a jQuery object	data = data instanceof $ ? data : $(data);	s.d.placeholder = false;	// if the object came from the DOM, keep track of its parent	if (data.parent().parent().size() > 0) {	data.before($('<span></span>')	.attr('id', 'simplemodal-placeholder')	.css({display: 'none'}));	s.d.placeholder = true;	s.display = data.css('display');	// persist changes? if not, make a clone of the element	if (!s.o.persist) {	s.d.orig = data.clone(true);	}	}	}	else if (typeof data === 'string' || typeof data === 'number') {	// just insert the data as innerHTML	data = $('<div></div>').html(data);	}	else {	// unsupported data type!	alert('SimpleModal Error: Unsupported data type: ' + typeof data);	return s;	}	// create the modal overlay, container and, if necessary, iframe	s.create(data);	data = null;	// display the modal dialog	s.open();	// useful for adding events/manipulating data in the modal dialog	if ($.isFunction(s.o.onShow)) {	s.o.onShow.apply(s, [s.d]);	}	// don't break the chain =)	return s;	},	/* * Create and add the modal overlay and container to the page */	create: function (data) {	var s = this;	// get the window properties	s.getDimensions();	// add an iframe to prevent select options from bleeding through	if (s.o.modal && browser.ie6) {	s.d.iframe = $('<iframe src="javascript:false;"></iframe>')	.css($.extend(s.o.iframeCss, {	display: 'none',	opacity: 0,	position: 'fixed',	height: w[0],	width: w[1],	zIndex: s.o.zIndex,	top: 0,	left: 0	}))	.appendTo(s.o.appendTo);	}	// create the overlay	s.d.overlay = $('<div></div>')	.attr('id', s.o.overlayId)	.addClass('simplemodal-overlay')	.css($.extend(s.o.overlayCss, {	display: 'none',	opacity: s.o.opacity / 100,	height: s.o.modal ? d[0] : 0,	width: s.o.modal ? d[1] : 0,	position: 'fixed',	left: 0,	top: 0,	zIndex: s.o.zIndex + 1	}))	.appendTo(s.o.appendTo);	// create the container	s.d.container = $('<div></div>')	.attr('id', s.o.containerId)	.addClass('simplemodal-container')	.css($.extend(	{position: s.o.fixed ? 'fixed' : 'absolute'},	s.o.containerCss,	{display: 'none', zIndex: s.o.zIndex + 2}	))	.append(s.o.close && s.o.closeHTML	? $(s.o.closeHTML).addClass(s.o.closeClass)	: '')	.appendTo(s.o.appendTo);	s.d.wrap = $('<div></div>')	.attr('tabIndex', -1)	.addClass('simplemodal-wrap')	.css({height: '100%', outline: 0, width: '100%'})	.appendTo(s.d.container);	// add styling and attributes to the data	// append to body to get correct dimensions, then move to wrap	s.d.data = data	.attr('id', data.attr('id') || s.o.dataId)	.addClass('simplemodal-data')	.css($.extend(s.o.dataCss, {	display: 'none'	}))	.appendTo('body');	data = null;	s.setContainerDimensions();	s.d.data.appendTo(s.d.wrap);	// fix issues with IE	if (browser.ie6 || browser.ieQuirks) {	s.fixIE();	}	},	/* * Bind events */	bindEvents: function () {	var s = this;	// bind the close event to any element with the closeClass class	$('.' + s.o.closeClass).bind('click.simplemodal', function (e) {	e.preventDefault();	s.close();	});	// bind the overlay click to the close function, if enabled	if (s.o.modal && s.o.close && s.o.overlayClose) {	s.d.overlay.bind('click.simplemodal', function (e) {	e.preventDefault();	s.close();	});	}	// bind keydown events	doc.bind('keydown.simplemodal', function (e) {	if (s.o.modal && e.keyCode === 9) { // TAB	s.watchTab(e);	}	else if ((s.o.close && s.o.escClose) && e.keyCode === 27) { // ESC	e.preventDefault();	s.close();	}	});	// update window size	wndw.bind('resize.simplemodal orientationchange.simplemodal', function () {	// redetermine the window width/height	s.getDimensions();	// reposition the dialog	s.o.autoResize ? s.setContainerDimensions() : s.o.autoPosition && s.setPosition();	if (browser.ie6 || browser.ieQuirks) {	s.fixIE();	}	else if (s.o.modal) {	// update the iframe & overlay	s.d.iframe && s.d.iframe.css({height: w[0], width: w[1]});	s.d.overlay.css({height: d[0], width: d[1]});	}	});	},	/* * Unbind events */	unbindEvents: function () {	$('.' + this.o.closeClass).unbind('click.simplemodal');	doc.unbind('keydown.simplemodal');	wndw.unbind('.simplemodal');	this.d.overlay.unbind('click.simplemodal');	},	/* * Fix issues in IE6 and IE7 in quirks mode */	fixIE: function () {	var s = this, p = s.o.position;	// simulate fixed position - adapted from BlockUI	$.each([s.d.iframe || null, !s.o.modal ? null : s.d.overlay, s.d.container.css('position') === 'fixed' ? s.d.container : null], function (i, el) {	if (el) {	var bch = 'document.body.clientHeight', bcw = 'document.body.clientWidth',	bsh = 'document.body.scrollHeight', bsl = 'document.body.scrollLeft',	bst = 'document.body.scrollTop', bsw = 'document.body.scrollWidth',	ch = 'document.documentElement.clientHeight', cw = 'document.documentElement.clientWidth',	sl = 'document.documentElement.scrollLeft', st = 'document.documentElement.scrollTop',	s = el[0].style;	s.position = 'absolute';	if (i < 2) {	s.removeExpression('height');	s.removeExpression('width');	s.setExpression('height','' + bsh + ' > ' + bch + ' ? ' + bsh + ' : ' + bch + ' + "px"');	s.setExpression('width','' + bsw + ' > ' + bcw + ' ? ' + bsw + ' : ' + bcw + ' + "px"');	}	else {	var te, le;	if (p && p.constructor === Array) {	var top = p[0]	? typeof p[0] === 'number' ? p[0].toString() : p[0].replace(/px/, '')	: el.css('top').replace(/px/, '');	te = top.indexOf('%') === -1	? top + ' + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'	: parseInt(top.replace(/%/, '')) + ' * ((' + ch + ' || ' + bch + ') / 100) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"';	if (p[1]) {	var left = typeof p[1] === 'number' ? p[1].toString() : p[1].replace(/px/, '');	le = left.indexOf('%') === -1	? left + ' + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'	: parseInt(left.replace(/%/, '')) + ' * ((' + cw + ' || ' + bcw + ') / 100) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"';	}	}	else {	te = '(' + ch + ' || ' + bch + ') / 2 - (this.offsetHeight / 2) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"';	le = '(' + cw + ' || ' + bcw + ') / 2 - (this.offsetWidth / 2) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"';	}	s.removeExpression('top');	s.removeExpression('left');	s.setExpression('top', te);	s.setExpression('left', le);	}	}	});	},	/* * Place focus on the first or last visible input */	focus: function (pos) {	var s = this, p = pos && $.inArray(pos, ['first', 'last']) !== -1 ? pos : 'first';	// focus on dialog or the first visible/enabled input element	var input = $(':input:enabled:visible:' + p, s.d.wrap);	setTimeout(function () {	input.length > 0 ? input.focus() : s.d.wrap.focus();	}, 10);	},	getDimensions: function () {	// fix a jQuery bug with determining the window height - use innerHeight if available	var s = this,	h = typeof window.innerHeight === 'undefined' ? wndw.height() : window.innerHeight;	d = [doc.height(), doc.width()];	w = [h, wndw.width()];	},	getVal: function (v, d) {	return v ? (typeof v === 'number' ? v	: v === 'auto' ? 0	: v.indexOf('%') > 0 ? ((parseInt(v.replace(/%/, '')) / 100) * (d === 'h' ? w[0] : w[1]))	: parseInt(v.replace(/px/, '')))	: null;	},	/* * Update the container. Set new dimensions, if provided. * Focus, if enabled. Re-bind events. */	update: function (height, width) {	var s = this;	// prevent update if dialog does not exist	if (!s.d.data) {	return false;	}	// reset orig values	s.d.origHeight = s.getVal(height, 'h');	s.d.origWidth = s.getVal(width, 'w');	// hide data to prevent screen flicker	s.d.data.hide();	height && s.d.container.css('height', height);	width && s.d.container.css('width', width);	s.setContainerDimensions();	s.d.data.show();	s.o.focus && s.focus();	// rebind events	s.unbindEvents();	s.bindEvents();	},	setContainerDimensions: function () {	var s = this,	badIE = browser.ie6 || browser.ie7;	// get the dimensions for the container and data	var ch = s.d.origHeight ? s.d.origHeight : browser.opera ? s.d.container.height() : s.getVal(badIE ? s.d.container[0].currentStyle['height'] : s.d.container.css('height'), 'h'),	cw = s.d.origWidth ? s.d.origWidth : browser.opera ? s.d.container.width() : s.getVal(badIE ? s.d.container[0].currentStyle['width'] : s.d.container.css('width'), 'w'),	dh = s.d.data.outerHeight(true), dw = s.d.data.outerWidth(true);	s.d.origHeight = s.d.origHeight || ch;	s.d.origWidth = s.d.origWidth || cw;	// mxoh = max option height, mxow = max option width	var mxoh = s.o.maxHeight ? s.getVal(s.o.maxHeight, 'h') : null,	mxow = s.o.maxWidth ? s.getVal(s.o.maxWidth, 'w') : null,	mh = mxoh && mxoh < w[0] ? mxoh : w[0],	mw = mxow && mxow < w[1] ? mxow : w[1];	// moh = min option height	var moh = s.o.minHeight ? s.getVal(s.o.minHeight, 'h') : 'auto';	if (!ch) {	if (!dh) {ch = moh;}	else {	if (dh > mh) {ch = mh;}	else if (s.o.minHeight && moh !== 'auto' && dh < moh) {ch = moh;}	else {ch = dh;}	}	}	else {	ch = s.o.autoResize && ch > mh ? mh : ch < moh ? moh : ch;	}	// mow = min option width	var mow = s.o.minWidth ? s.getVal(s.o.minWidth, 'w') : 'auto';	if (!cw) {	if (!dw) {cw = mow;}	else {	if (dw > mw) {cw = mw;}	else if (s.o.minWidth && mow !== 'auto' && dw < mow) {cw = mow;}	else {cw = dw;}	}	}	else {	cw = s.o.autoResize && cw > mw ? mw : cw < mow ? mow : cw;	}	s.d.container.css({height: ch, width: cw});	s.d.wrap.css({overflow: (dh > ch || dw > cw) ? 'auto' : 'visible'});	s.o.autoPosition && s.setPosition();	},	setPosition: function () {	var s = this, top, left,	hc = (w[0]/2) - (s.d.container.outerHeight(true)/2),	vc = (w[1]/2) - (s.d.container.outerWidth(true)/2),	st = s.d.container.css('position') !== 'fixed' ? wndw.scrollTop() : 0;	if (s.o.position && Object.prototype.toString.call(s.o.position) === '[object Array]') {	top = st + (s.o.position[0] || hc);	left = s.o.position[1] || vc;	} else {	top = st + hc;	left = vc;	}	s.d.container.css({left: left, top: top});	},	watchTab: function (e) {	var s = this;	if ($(e.target).parents('.simplemodal-container').length > 0) {	// save the list of inputs	s.inputs = $(':input:enabled:visible:first, :input:enabled:visible:last', s.d.data[0]);	// if it's the first or last tabbable element, refocus	if ((!e.shiftKey && e.target === s.inputs[s.inputs.length -1]) ||	(e.shiftKey && e.target === s.inputs[0]) ||	s.inputs.length === 0) {	e.preventDefault();	var pos = e.shiftKey ? 'last' : 'first';	s.focus(pos);	}	}	else {	// might be necessary when custom onShow callback is used	e.preventDefault();	s.focus();	}	},	/* * Open the modal dialog elements * - Note: If you use the onOpen callback, you must "show" the * overlay and container elements manually * (the iframe will be handled by SimpleModal) */	open: function () {	var s = this;	// display the iframe	s.d.iframe && s.d.iframe.show();	if ($.isFunction(s.o.onOpen)) {	// execute the onOpen callback	s.o.onOpen.apply(s, [s.d]);	}	else {	// display the remaining elements	s.d.overlay.show();	s.d.container.show();	s.d.data.show();	}	s.o.focus && s.focus();	// bind default events	s.bindEvents();	},	/* * Close the modal dialog * - Note: If you use an onClose callback, you must remove the * overlay, container and iframe elements manually * * @param {boolean} external Indicates whether the call to this * function was internal or external. If it was external, the * onClose callback will be ignored */	close: function () {	var s = this;	// prevent close when dialog does not exist	if (!s.d.data) {	return false;	}	// remove the default events	s.unbindEvents();	if ($.isFunction(s.o.onClose) && !s.occb) {	// set the onClose callback flag	s.occb = true;	// execute the onClose callback	s.o.onClose.apply(s, [s.d]);	}	else {	// if the data came from the DOM, put it back	if (s.d.placeholder) {	var ph = $('#simplemodal-placeholder');	// save changes to the data?	if (s.o.persist) {	// insert the (possibly) modified data back into the DOM	ph.replaceWith(s.d.data.removeClass('simplemodal-data').css('display', s.display));	}	else {	// remove the current and insert the original,	// unmodified data back into the DOM	s.d.data.hide().remove();	ph.replaceWith(s.d.orig);	}	}	else {	// otherwise, remove it	s.d.data.hide().remove();	}	// remove the remaining elements	s.d.container.hide().remove();	s.d.overlay.hide();	s.d.iframe && s.d.iframe.hide().remove();	s.d.overlay.remove();	// reset the dialog object	s.d = {};	}	}	};
}));
/*! Raygun4js - v1.11.1 - 2014-08-28
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2014 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
var TraceKit = {};
var _oldTraceKit = window.TraceKit;
// global reference to slice
var _slice = [].slice;
var UNKNOWN_FUNCTION = '?';
/** * _has, a better form of hasOwnProperty * Example: _has(MainHostObject, property) === true/false * * @param {Object} host object to check property * @param {string} key to check */
function _has(object, key) { return Object.prototype.hasOwnProperty.call(object, key);
}
function _isUndefined(what) { return typeof what === 'undefined';
}
/** * TraceKit.noConflict: Export TraceKit out to another variable * Example: var TK = TraceKit.noConflict() */
TraceKit.noConflict = function noConflict() { window.TraceKit = _oldTraceKit; return TraceKit;
};
/** * TraceKit.wrap: Wrap any function in a TraceKit reporter * Example: func = TraceKit.wrap(func); * * @param {Function} func Function to be wrapped * @return {Function} The wrapped func */
TraceKit.wrap = function traceKitWrapper(func) { function wrapped() { try { return func.apply(this, arguments); } catch (e) { TraceKit.report(e); throw e; } } return wrapped;
};
/** * TraceKit.report: cross-browser processing of unhandled exceptions * * Syntax: * TraceKit.report.subscribe(function(stackInfo) { ... }) * TraceKit.report.unsubscribe(function(stackInfo) { ... }) * TraceKit.report(exception) * try { ...code... } catch(ex) { TraceKit.report(ex); } * * Supports: * - Firefox: full stack trace with line numbers, plus column number * on top frame; column number is not guaranteed * - Opera: full stack trace with line and column numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * - IE: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * * In theory, TraceKit should work on all of the following versions: * - IE5.5+ (only 8.0 tested) * - Firefox 0.9+ (only 3.5+ tested) * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require * Exceptions Have Stacktrace to be enabled in opera:config) * - Safari 3+ (only 4+ tested) * - Chrome 1+ (only 5+ tested) * - Konqueror 3.5+ (untested) * * Requires TraceKit.computeStackTrace. * * Tries to catch all unhandled exceptions and report them to the * subscribed handlers. Please note that TraceKit.report will rethrow the * exception. This is REQUIRED in order to get a useful stack trace in IE. * If the exception does not reach the top of the browser, you will only * get a stack trace from the point where TraceKit.report was called. * * Handlers receive a stackInfo object as described in the * TraceKit.computeStackTrace docs. */
TraceKit.report = (function reportModuleWrapper() { var handlers = [], lastException = null, lastExceptionStack = null; /** * Add a crash handler. * @param {Function} handler */ function subscribe(handler) { installGlobalHandler(); handlers.push(handler); } /** * Remove a crash handler. * @param {Function} handler */ function unsubscribe(handler) { for (var i = handlers.length - 1; i >= 0; --i) { if (handlers[i] === handler) { handlers.splice(i, 1); } } } /** * Dispatch stack information to all handlers. * @param {Object.<string, *>} stack */ function notifyHandlers(stack, windowError) { var exception = null; if (windowError && !TraceKit.collectWindowErrors) { return; } for (var i in handlers) { if (_has(handlers, i)) { try { handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2))); } catch (inner) { exception = inner; } } } if (exception) { throw exception; } } var _oldOnerrorHandler, _onErrorHandlerInstalled; /** * Ensures all global unhandled exceptions are recorded. * Supported by Gecko and IE. * @param {string} message Error message. * @param {string} url URL of script that generated the exception. * @param {(number|string)} lineNo The line number at which the error * occurred. */ function traceKitWindowOnError(message, url, lineNo, columnNo, errorObj) { var stack = null; if (errorObj) { stack = TraceKit.computeStackTrace(errorObj); } else { if (lastExceptionStack) { TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message); stack = lastExceptionStack; lastExceptionStack = null; lastException = null; } else { var location = { 'url': url, 'line': lineNo, 'column': columnNo }; location.func = TraceKit.computeStackTrace.guessFunctionName(location.url, location.line); location.context = TraceKit.computeStackTrace.gatherContext(location.url, location.line); stack = { 'mode': 'onerror', 'message': message, 'url': document.location.href, 'stack': [location], 'useragent': navigator.userAgent }; } } notifyHandlers(stack, 'from window.onerror'); if (_oldOnerrorHandler) { return _oldOnerrorHandler.apply(this, arguments); } return false; } function installGlobalHandler () { if (_onErrorHandlerInstalled === true) { return; } _oldOnerrorHandler = window.onerror; window.onerror = traceKitWindowOnError; _onErrorHandlerInstalled = true; } /** * Reports an unhandled Error to TraceKit. * @param {Error} ex */ function report(ex) { var args = _slice.call(arguments, 1); if (lastExceptionStack) { if (lastException === ex) { return; // already caught by an inner catch block, ignore } else { var s = lastExceptionStack; lastExceptionStack = null; lastException = null; notifyHandlers.apply(null, [s, null].concat(args)); } } var stack = TraceKit.computeStackTrace(ex); lastExceptionStack = stack; lastException = ex; // If the stack trace is incomplete, wait for 2 seconds for // slow slow IE to see if onerror occurs or not before reporting // this exception; otherwise, we will end up with an incomplete // stack trace window.setTimeout(function () { if (lastException === ex) { lastExceptionStack = null; lastException = null; notifyHandlers.apply(null, [stack, null].concat(args)); } }, (stack.incomplete ? 2000 : 0)); throw ex; // re-throw to propagate to the top level (and cause window.onerror) } report.subscribe = subscribe; report.unsubscribe = unsubscribe; return report;
}());
/** * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript * * Syntax: * s = TraceKit.computeStackTrace.ofCaller([depth]) * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below) * Returns: * s.name - exception name * s.message - exception message * s.stack[i].url - JavaScript or HTML file URL * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work) * s.stack[i].args - arguments passed to the function, if known * s.stack[i].line - line number, if known * s.stack[i].column - column number, if known * s.stack[i].context - an array of source code lines; the middle element corresponds to the correct line# * s.mode - 'stack', 'stacktrace', 'multiline', 'callers', 'onerror', or 'failed' -- method used to collect the stack trace * * Supports: * - Firefox: full stack trace with line numbers and unreliable column * number on top frame * - Opera 10: full stack trace with line and column numbers * - Opera 9-: full stack trace with line numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the topmost stacktrace element * only * - IE: no line numbers whatsoever * * Tries to guess names of anonymous functions by looking for assignments * in the source code. In IE and Safari, we have to guess source file names * by searching for function bodies inside all page scripts. This will not * work for scripts that are loaded cross-domain. * Here be dragons: some function names may be guessed incorrectly, and * duplicate functions may be mismatched. * * TraceKit.computeStackTrace should only be used for tracing purposes. * Logging of unhandled exceptions should be done with TraceKit.report, * which builds on top of TraceKit.computeStackTrace and provides better * IE support by utilizing the window.onerror event to retrieve information * about the top of the stack. * * Note: In IE and Safari, no stack trace is recorded on the Error object, * so computeStackTrace instead walks its *own* chain of callers. * This means that: * * in Safari, some methods may be missing from the stack trace; * * in IE, the topmost function in the stack trace will always be the * caller of computeStackTrace. * * This is okay for tracing (because you are likely to be calling * computeStackTrace from the function you want to be the topmost element * of the stack trace anyway), but not okay for logging unhandled * exceptions (because your catch block will likely be far away from the * inner function that actually caused the exception). * * Tracing example: * function trace(message) { * var stackInfo = TraceKit.computeStackTrace.ofCaller(); * var data = message + "\n"; * for(var i in stackInfo.stack) { * var item = stackInfo.stack[i]; * data += (item.func || '[anonymous]') + "() in " + item.url + ":" + (item.line || '0') + "\n"; * } * if (window.console) * console.info(data); * else * alert(data); * } */
TraceKit.computeStackTrace = (function computeStackTraceWrapper() { var debug = false, sourceCache = {}; /** * Attempts to retrieve source code via XMLHttpRequest, which is used * to look up anonymous function names. * @param {string} url URL of source code. * @return {string} Source contents. */ function loadSource(url) { if (!TraceKit.remoteFetching) { //Only attempt request if remoteFetching is on. return ''; } try { var getXHR = function() { try { return new window.XMLHttpRequest(); } catch (e) { // explicitly bubble up the exception if not found return new window.ActiveXObject('Microsoft.XMLHTTP'); } }; var request = getXHR(); request.open('GET', url, false); request.send(''); return request.responseText; } catch (e) { return ''; } } /** * Retrieves source code from the source code cache. * @param {string} url URL of source code. * @return {Array.<string>} Source contents. */ function getSource(url) { if (!_has(sourceCache, url)) { // URL needs to be able to fetched within the acceptable domain. Otherwise, // cross-domain errors will be triggered. var source = ''; url = url || ""; if (url.indexOf && url.indexOf(document.domain) !== -1) { source = loadSource(url); } sourceCache[url] = source ? source.split('\n') : []; } return sourceCache[url]; } /** * Tries to use an externally loaded copy of source code to determine * the name of a function by looking at the name of the variable it was * assigned to, if any. * @param {string} url URL of source code. * @param {(string|number)} lineNo Line number in source code. * @return {string} The function name, if discoverable. */ function guessFunctionName(url, lineNo) { var reFunctionArgNames = /function ([^(]*)\(([^)]*)\)/, reGuessFunction = /['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/, line = '', maxLines = 10, source = getSource(url), m; if (!source.length) { return UNKNOWN_FUNCTION; } // Walk backwards from the first line in the function until we find the line which // matches the pattern above, which is the function definition for (var i = 0; i < maxLines; ++i) { line = source[lineNo - i] + line; if (!_isUndefined(line)) { if ((m = reGuessFunction.exec(line))) { return m[1]; } else if ((m = reFunctionArgNames.exec(line))) { return m[1]; } } } return UNKNOWN_FUNCTION; } /** * Retrieves the surrounding lines from where an exception occurred. * @param {string} url URL of source code. * @param {(string|number)} line Line number in source code to centre * around for context. * @return {?Array.<string>} Lines of source code. */ function gatherContext(url, line) { var source = getSource(url); if (!source.length) { return null; } var context = [], // linesBefore & linesAfter are inclusive with the offending line. // if linesOfContext is even, there will be one extra line // *before* the offending line. linesBefore = Math.floor(TraceKit.linesOfContext / 2), // Add one extra line if linesOfContext is odd linesAfter = linesBefore + (TraceKit.linesOfContext % 2), start = Math.max(0, line - linesBefore - 1), end = Math.min(source.length, line + linesAfter - 1); line -= 1; // convert to 0-based index for (var i = start; i < end; ++i) { if (!_isUndefined(source[i])) { context.push(source[i]); } } return context.length > 0 ? context : null; } /** * Escapes special characters, except for whitespace, in a string to be * used inside a regular expression as a string literal. * @param {string} text The string. * @return {string} The escaped string literal. */ function escapeRegExp(text) { return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, '\\$&'); } /** * Escapes special characters in a string to be used inside a regular * expression as a string literal. Also ensures that HTML entities will * be matched the same as their literal friends. * @param {string} body The string. * @return {string} The escaped string. */ function escapeCodeAsRegExpForMatchingInsideHTML(body) { return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('"', '(?:"|&quot;)').replace(/\s+/g, '\\s+'); } /** * Determines where a code fragment occurs in the source code. * @param {RegExp} re The function definition. * @param {Array.<string>} urls A list of URLs to search. * @return {?Object.<string, (string|number)>} An object containing * the url, line, and column number of the defined function. */ function findSourceInUrls(re, urls) { var source, m; for (var i = 0, j = urls.length; i < j; ++i) { // console.log('searching', urls[i]); if ((source = getSource(urls[i])).length) { source = source.join('\n'); if ((m = re.exec(source))) { // console.log('Found function in ' + urls[i]); return { 'url': urls[i], 'line': source.substring(0, m.index).split('\n').length, 'column': m.index - source.lastIndexOf('\n', m.index) - 1 }; } } } // console.log('no match'); return null; } /** * Determines at which column a code fragment occurs on a line of the * source code. * @param {string} fragment The code fragment. * @param {string} url The URL to search. * @param {(string|number)} line The line number to examine. * @return {?number} The column number. */ function findSourceInLine(fragment, url, line) { var source = getSource(url), re = new RegExp('\\b' + escapeRegExp(fragment) + '\\b'), m; line -= 1; if (source && source.length > line && (m = re.exec(source[line]))) { return m.index; } return null; } /** * Determines where a function was defined within the source code. * @param {(Function|string)} func A function reference or serialized * function definition. * @return {?Object.<string, (string|number)>} An object containing * the url, line, and column number of the defined function. */ function findSourceByFunctionBody(func) { var urls = [window.location.href], scripts = document.getElementsByTagName('script'), body, code = '' + func, codeRE = /^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/, eventRE = /^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/, re, parts, result; for (var i = 0; i < scripts.length; ++i) { var script = scripts[i]; if (script.src) { urls.push(script.src); } } if (!(parts = codeRE.exec(code))) { re = new RegExp(escapeRegExp(code).replace(/\s+/g, '\\s+')); } // not sure if this is really necessary, but I don’t have a test // corpus large enough to confirm that and it was in the original. else { var name = parts[1] ? '\\s+' + parts[1] : '', args = parts[2].split(',').join('\\s*,\\s*'); body = escapeRegExp(parts[3]).replace(/;$/, ';?'); // semicolon is inserted if the function ends with a comment.replace(/\s+/g, '\\s+'); re = new RegExp('function' + name + '\\s*\\(\\s*' + args + '\\s*\\)\\s*{\\s*' + body + '\\s*}'); } // look for a normal function definition if ((result = findSourceInUrls(re, urls))) { return result; } // look for an old-school event handler function if ((parts = eventRE.exec(code))) { var event = parts[1]; body = escapeCodeAsRegExpForMatchingInsideHTML(parts[2]); // look for a function defined in HTML as an onXXX handler re = new RegExp('on' + event + '=[\\\'"]\\s*' + body + '\\s*[\\\'"]', 'i'); if ((result = findSourceInUrls(re, urls[0]))) { return result; } // look for ??? re = new RegExp(body); if ((result = findSourceInUrls(re, urls))) { return result; } } return null; } // Contents of Exception in various browsers. // // SAFARI: // ex.message = Can't find variable: qq // ex.line = 59 // ex.sourceId = 580238192 // ex.sourceURL = http://... // ex.expressionBeginOffset = 96 // ex.expressionCaretOffset = 98 // ex.expressionEndOffset = 98 // ex.name = ReferenceError // // FIREFOX: // ex.message = qq is not defined // ex.fileName = http://... // ex.lineNumber = 59 // ex.stack = ...stack trace... (see the example below) // ex.name = ReferenceError // // CHROME: // ex.message = qq is not defined // ex.name = ReferenceError // ex.type = not_defined // ex.arguments = ['aa'] // ex.stack = ...stack trace... // // INTERNET EXPLORER: // ex.message = ... // ex.name = ReferenceError // // OPERA: // ex.message = ...message... (see the example below) // ex.name = ReferenceError // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message) // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace' /** * Computes stack trace information from the stack property. * Chrome and Gecko use this property. * Added WinJS regex for Raygun4JS's offline caching support * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceFromStackProp(ex) { if (!ex.stack) { return null; } var chrome = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?((?:file|http|https|chrome-extension):.*?):(\d+)(?::(\d+))?\)?\s*$/i, gecko = /^\s*(\S*)(?:\((.*?)\))?@((?:file|http|https).*?):(\d+)(?::(\d+))?\s*$/i, winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i, lines = ex.stack.split('\n'), stack = [], parts, element, reference = /^(.*) is undefined$/.exec(ex.message); for (var i = 0, j = lines.length; i < j; ++i) { if ((parts = gecko.exec(lines[i]))) { element = { 'url': parts[3], 'func': parts[1] || UNKNOWN_FUNCTION, 'args': parts[2] ? parts[2].split(',') : '', 'line': +parts[4], 'column': parts[5] ? +parts[5] : null }; } else if ((parts = chrome.exec(lines[i]))) { element = { 'url': parts[2], 'func': parts[1] || UNKNOWN_FUNCTION, 'line': +parts[3], 'column': parts[4] ? +parts[4] : null }; } else if ((parts = winjs.exec(lines[i]))) { element = { 'url': parts[2], 'func': parts[1] || UNKNOWN_FUNCTION, 'line': +parts[3], 'column': parts[4] ? +parts[4] : null }; } else { continue; } if (!element.func && element.line) { element.func = guessFunctionName(element.url, element.line); } if (element.line) { element.context = gatherContext(element.url, element.line); } stack.push(element); } if (stack[0] && stack[0].line && !stack[0].column && reference) { stack[0].column = findSourceInLine(reference[1], stack[0].url, stack[0].line); } if (!stack.length) { return null; } return { 'mode': 'stack', 'name': ex.name, 'message': ex.message, 'url': document.location.href, 'stack': stack, 'useragent': navigator.userAgent }; } /** * Computes stack trace information from the stacktrace property. * Opera 10 uses this property. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceFromStacktraceProp(ex) { // Access and store the stacktrace property before doing ANYTHING // else to it because Opera is not very good at providing it // reliably in other circumstances. var stacktrace = ex.stacktrace; var testRE = / line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i, lines = stacktrace.split('\n'), stack = [], parts; for (var i = 0, j = lines.length; i < j; i += 2) { if ((parts = testRE.exec(lines[i]))) { var element = { 'line': +parts[1], 'column': +parts[2], 'func': parts[3] || parts[4], 'args': parts[5] ? parts[5].split(',') : [], 'url': parts[6] }; if (!element.func && element.line) { element.func = guessFunctionName(element.url, element.line); } if (element.line) { try { element.context = gatherContext(element.url, element.line); } catch (exc) {} } if (!element.context) { element.context = [lines[i + 1]]; } stack.push(element); } } if (!stack.length) { return null; } return { 'mode': 'stacktrace', 'name': ex.name, 'message': ex.message, 'url': document.location.href, 'stack': stack, 'useragent': navigator.userAgent }; } /** * NOT TESTED. * Computes stack trace information from an error message that includes * the stack trace. * Opera 9 and earlier use this method if the option to show stack * traces is turned on in opera:config. * @param {Error} ex * @return {?Object.<string, *>} Stack information. */ function computeStackTraceFromOperaMultiLineMessage(ex) { // Opera includes a stack trace into the exception message. An example is: // // Statement on line 3: Undefined variable: undefinedFunc // Backtrace: // Line 3 of linked script file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.js: In function zzz // undefinedFunc(a); // Line 7 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function yyy // zzz(x, y, z); // Line 3 of inline#1 script in file://localhost/Users/andreyvit/Projects/TraceKit/javascript-client/sample.html: In function xxx // yyy(a, a, a); // Line 1 of function script // try { xxx('hi'); return false; } catch(ex) { TraceKit.report(ex); } // ... var lines = ex.message.split('\n'); if (lines.length < 4) { return null; } var lineRE1 = /^\s*Line (\d+) of linked script ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i, lineRE2 = /^\s*Line (\d+) of inline#(\d+) script in ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i, lineRE3 = /^\s*Line (\d+) of function script\s*$/i, stack = [], scripts = document.getElementsByTagName('script'), inlineScriptBlocks = [], parts, i, len, source; for (i in scripts) { if (_has(scripts, i) && !scripts[i].src) { inlineScriptBlocks.push(scripts[i]); } } for (i = 2, len = lines.length; i < len; i += 2) { var item = null; if ((parts = lineRE1.exec(lines[i]))) { item = { 'url': parts[2], 'func': parts[3], 'line': +parts[1] }; } else if ((parts = lineRE2.exec(lines[i]))) { item = { 'url': parts[3], 'func': parts[4] }; var relativeLine = (+parts[1]); // relative to the start of the <SCRIPT> block var script = inlineScriptBlocks[parts[2] - 1]; if (script) { source = getSource(item.url); if (source) { source = source.join('\n'); var pos = source.indexOf(script.innerText); if (pos >= 0) { item.line = relativeLine + source.substring(0, pos).split('\n').length; } } } } else if ((parts = lineRE3.exec(lines[i]))) { var url = window.location.href.replace(/#.*$/, ''), line = parts[1]; var re = new RegExp(escapeCodeAsRegExpForMatchingInsideHTML(lines[i + 1])); source = findSourceInUrls(re, [url]); item = { 'url': url, 'line': source ? source.line : line, 'func': '' }; } if (item) { if (!item.func) { item.func = guessFunctionName(item.url, item.line); } var context = gatherContext(item.url, item.line); var midline = (context ? context[Math.floor(context.length / 2)] : null); if (context && midline.replace(/^\s*/, '') === lines[i + 1].replace(/^\s*/, '')) { item.context = context; } else { // if (context) alert("Context mismatch. Correct midline:\n" + lines[i+1] + "\n\nMidline:\n" + midline + "\n\nContext:\n" + context.join("\n") + "\n\nURL:\n" + item.url); item.context = [lines[i + 1]]; } stack.push(item); } } if (!stack.length) { return null; // could not parse multiline exception message as Opera stack trace } return { 'mode': 'multiline', 'name': ex.name, 'message': lines[0], 'url': document.location.href, 'stack': stack, 'useragent': navigator.userAgent }; } /** * Adds information about the first frame to incomplete stack traces. * Safari and IE require this to get complete data on the first frame. * @param {Object.<string, *>} stackInfo Stack trace information from * one of the compute* methods. * @param {string} url The URL of the script that caused an error. * @param {(number|string)} lineNo The line number of the script that * caused an error. * @param {string=} message The error generated by the browser, which * hopefully contains the name of the object that caused the error. * @return {boolean} Whether or not the stack information was * augmented. */ function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) { var initial = { 'url': url, 'line': lineNo }; if (initial.url && initial.line) { stackInfo.incomplete = false; if (!initial.func) { initial.func = guessFunctionName(initial.url, initial.line); } if (!initial.context) { initial.context = gatherContext(initial.url, initial.line); } var reference = / '([^']+)' /.exec(message); if (reference) { initial.column = findSourceInLine(reference[1], initial.url, initial.line); } if (stackInfo.stack.length > 0) { if (stackInfo.stack[0].url === initial.url) { if (stackInfo.stack[0].line === initial.line) { return false; // already in stack trace } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) { stackInfo.stack[0].line = initial.line; stackInfo.stack[0].context = initial.context; return false; } } } stackInfo.stack.unshift(initial); stackInfo.partial = true; return true; } else { stackInfo.incomplete = true; } return false; } /** * Computes stack trace information by walking the arguments.caller * chain at the time the exception occurred. This will cause earlier * frames to be missed but is the only way to get any stack trace in * Safari and IE. The top frame is restored by * {@link augmentStackTraceWithInitialElement}. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceByWalkingCallerChain(ex, depth) { var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, stack = [], funcs = {}, recursion = false, parts, item, source; for (var curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) { if (curr === computeStackTrace || curr === TraceKit.report) { // console.log('skipping internal function'); continue; } item = { 'url': null, 'func': UNKNOWN_FUNCTION, 'line': null, 'column': null }; if (curr.name) { item.func = curr.name; } else if ((parts = functionName.exec(curr.toString()))) { item.func = parts[1]; } if ((source = findSourceByFunctionBody(curr))) { item.url = source.url; item.line = source.line; if (item.func === UNKNOWN_FUNCTION) { item.func = guessFunctionName(item.url, item.line); } var reference = / '([^']+)' /.exec(ex.message || ex.description); if (reference) { item.column = findSourceInLine(reference[1], source.url, source.line); } } if (funcs['' + curr]) { recursion = true; }else{ funcs['' + curr] = true; } stack.push(item); } if (depth) { // console.log('depth is ' + depth); // console.log('stack is ' + stack.length); stack.splice(0, depth); } var result = { 'mode': 'callers', 'name': ex.name, 'message': ex.message, 'url': document.location.href, 'stack': stack, 'useragent': navigator.userAgent }; augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description); return result; } /** * Computes a stack trace for an exception. * @param {Error} ex * @param {(string|number)=} depth */ function computeStackTrace(ex, depth) { var stack = null; depth = (depth == null ? 0 : +depth); try { // This must be tried first because Opera 10 *destroys* // its stacktrace property if you try to access the stack // property first!! stack = computeStackTraceFromStacktraceProp(ex); if (stack) { return stack; } } catch (e) { if (debug) { throw e; } } try { stack = computeStackTraceFromStackProp(ex); if (stack) { return stack; } } catch (e) { if (debug) { throw e; } } try { stack = computeStackTraceFromOperaMultiLineMessage(ex); if (stack) { return stack; } } catch (e) { if (debug) { throw e; } } try { stack = computeStackTraceByWalkingCallerChain(ex, depth + 1); if (stack) { return stack; } } catch (e) { if (debug) { throw e; } } return { 'mode': 'failed' }; } /** * Logs a stacktrace starting from the previous call and working down. * @param {(number|string)=} depth How many frames deep to trace. * @return {Object.<string, *>} Stack trace information. */ function computeStackTraceOfCaller(depth) { depth = (depth == null ? 0 : +depth) + 1; // "+ 1" because "ofCaller" should drop one frame try { throw new Error(); } catch (ex) { return computeStackTrace(ex, depth + 1); } } computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement; computeStackTrace.guessFunctionName = guessFunctionName; computeStackTrace.gatherContext = gatherContext; computeStackTrace.ofCaller = computeStackTraceOfCaller; return computeStackTrace;
}());
/** * Extends support for global error handling for asynchronous browser * functions. Adopted from Closure Library's errorhandler.js */
(function extendToAsynchronousCallbacks() { var _helper = function _helper(fnName) { var originalFn = window[fnName]; window[fnName] = function traceKitAsyncExtension() { // Make a copy of the arguments var args = _slice.call(arguments); var originalCallback = args[0]; if (typeof (originalCallback) === 'function') { args[0] = TraceKit.wrap(originalCallback); } // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it // also only supports 2 argument and doesn't care what "this" is, so we // can just call the original function directly. if (originalFn.apply) { return originalFn.apply(this, args); } else { return originalFn(args[0], args[1]); } }; }; _helper('setTimeout'); _helper('setInterval');
}());
//Default options:
if (!TraceKit.remoteFetching) { TraceKit.remoteFetching = true;
}
if (!TraceKit.collectWindowErrors) { TraceKit.collectWindowErrors = true;
}
if (!TraceKit.linesOfContext || TraceKit.linesOfContext < 1) { // 5 lines before, the offending line, 5 lines after TraceKit.linesOfContext = 11;
}
// Export to global object
window.TraceKit = TraceKit;
}(window));
(function traceKitAsyncForjQuery($, TraceKit) { 'use strict'; // quit if jQuery isn't on the page if (!$) { return; } var _oldEventAdd = $.event.add; $.event.add = function traceKitEventAdd(elem, types, handler, data, selector) { var _handler; if (handler.handler) { _handler = handler.handler; handler.handler = TraceKit.wrap(handler.handler); } else { _handler = handler; handler = TraceKit.wrap(handler); } // If the handler we are attaching doesn’t have the same guid as // the original, it will never be removed when someone tries to // unbind the original function later. Technically as a result of // this our guids are no longer globally unique, but whatever, that // never hurt anybody RIGHT?! if (_handler.guid) { handler.guid = _handler.guid; } else { handler.guid = _handler.guid = $.guid++; } return _oldEventAdd.call(this, elem, types, handler, data, selector); }; var _oldReady = $.fn.ready; $.fn.ready = function traceKitjQueryReadyWrapper(fn) { return _oldReady.call(this, TraceKit.wrap(fn)); }; var _oldAjax = $.ajax; $.ajax = function traceKitAjaxWrapper(url, options) { if (typeof url === "object") { options = url; url = undefined; } options = options || {}; var keys = ['complete', 'error', 'success'], key; while(key = keys.pop()) { if ($.isFunction(options[key])) { options[key] = TraceKit.wrap(options[key]); } } try { return (url) ? _oldAjax.call(this, url, options) : _oldAjax.call(this, options); } catch (e) { TraceKit.report(e); throw e; } };
}(window.jQuery, window.TraceKit));
(function (window, $, undefined) { // pull local copy of TraceKit to handle stack trace collection var _traceKit = TraceKit.noConflict(), _raygun = window.Raygun, _raygunApiKey, _debugMode = false, _allowInsecureSubmissions = false, _ignoreAjaxAbort = false, _enableOfflineSave = false, _ignore3rdPartyErrors = false, _customData = {}, _tags = [], _user, _version, _filteredKeys, _raygunApiUrl = 'https://api.raygun.io', $document; if ($) { $document = $(document); } var Raygun = { noConflict: function () { window.Raygun = _raygun; return Raygun; }, init: function(key, options, customdata) { _raygunApiKey = key; _traceKit.remoteFetching = false; _customData = customdata; if (options) { _allowInsecureSubmissions = options.allowInsecureSubmissions || false; _ignoreAjaxAbort = options.ignoreAjaxAbort || false; if (options.debugMode) { _debugMode = options.debugMode; } if(options.ignore3rdPartyErrors) { _ignore3rdPartyErrors = true; } } sendSavedErrors(); return Raygun; }, withCustomData: function (customdata) { _customData = customdata; return Raygun; }, withTags: function (tags) { _tags = tags; }, attach: function () { if (!isApiKeyConfigured()) { return; } _traceKit.report.subscribe(processUnhandledException); if ($document) { $document.ajaxError(processJQueryAjaxError); } return Raygun; }, detach: function () { _traceKit.report.unsubscribe(processUnhandledException); if ($document) { $document.unbind('ajaxError', processJQueryAjaxError); } return Raygun; }, send: function (ex, customData, tags) { try { processUnhandledException(_traceKit.computeStackTrace(ex), { customData: typeof _customData === 'function' ? merge(_customData(), customData) : merge(_customData, customData), tags: mergeArray(_tags, tags) }); } catch (traceKitException) { if (ex !== traceKitException) { throw traceKitException; } } return Raygun; }, setUser: function (user, isAnonymous, email, fullName, firstName, uuid) { _user = { 'Identifier': user }; if(isAnonymous) { _user['IsAnonymous'] = isAnonymous; } if(email) { _user['Email'] = email; } if(fullName) { _user['FullName'] = fullName; } if(firstName) { _user['FirstName'] = firstName; } if(uuid) { _user['UUID'] = uuid; } return Raygun; }, setVersion: function (version) { _version = version; return Raygun; }, saveIfOffline: function (enableOffline) { if (typeof enableOffline !== 'undefined' && typeof enableOffline === 'boolean') { _enableOfflineSave = enableOffline; } return Raygun; }, filterSensitiveData: function (filteredKeys) { _filteredKeys = filteredKeys; return Raygun; } }; /* internals */ function truncateURL(url){ // truncate after fourth /, or 24 characters, whichever is shorter // /api/1/diagrams/xyz/server becomes // /api/1/diagrams/... var truncated = url; var path = url.split('//')[1]; if (path) { var queryStart = path.indexOf('?'); var sanitizedPath = path.toString().substring(0, queryStart); var truncated_parts = sanitizedPath.split('/').slice(0, 4).join('/'); var truncated_length = sanitizedPath.substring(0, 48); truncated = truncated_parts.length < truncated_length.length? truncated_parts : truncated_length; if (truncated !== sanitizedPath) { truncated += '..'; } } return truncated; } function processJQueryAjaxError(event, jqXHR, ajaxSettings, thrownError) { var message = 'AJAX Error: ' + (jqXHR.statusText || 'unknown') +' '+ (ajaxSettings.type || 'unknown') + ' '+ (truncateURL(ajaxSettings.url) || 'unknown'); // ignore ajax abort if set in the options if (_ignoreAjaxAbort) { if (!jqXHR.getAllResponseHeaders()) { return; } } Raygun.send(thrownError || event.type, { status: jqXHR.status, statusText: jqXHR.statusText, type: ajaxSettings.type, url: ajaxSettings.url, ajaxErrorMessage: message, contentType: ajaxSettings.contentType, requestData: ajaxSettings.data ? ajaxSettings.data.slice(0, 10240) : undefined, responseData: jqXHR.responseText ? jqXHR.responseText.slice(0, 10240) : undefined }); } function log(message, data) { if (window.console && window.console.log && _debugMode) { window.console.log(message); if (data) { window.console.log(data); } } } function isApiKeyConfigured() { if (_raygunApiKey && _raygunApiKey !== '') { return true; } log("Raygun API key has not been configured, make sure you call Raygun.init(yourApiKey)"); return false; } function merge(o1, o2) { var a, o3 = {}; for (a in o1) { o3[a] = o1[a]; } for (a in o2) { o3[a] = o2[a]; } return o3; } function mergeArray(t0, t1) { if (t1 != null) { return t0.concat(t1); } return t0; } function forEach(set, func) { for (var i = 0; i < set.length; i++) { func.call(null, i, set[i]); } } function isEmpty(o) { for (var p in o) { if (o.hasOwnProperty(p)) { return false; } } return true; } function getRandomInt() { return Math.floor(Math.random() * 9007199254740993); } function getViewPort() { var e = document.documentElement, g = document.getElementsByTagName('body')[0], x = window.innerWidth || e.clientWidth || g.clientWidth, y = window.innerHeight || e.clientHeight || g.clientHeight; return { width: x, height: y }; } function offlineSave (data) { var dateTime = new Date().toJSON(); try { var key = 'raygunjs=' + dateTime + '=' + getRandomInt(); if (typeof localStorage[key] === 'undefined') { localStorage[key] = data; } } catch (e) { log('Raygun4JS: LocalStorage full, cannot save exception'); } } function localStorageAvailable(){ try { return ('localStorage' in window) && window['localStorage'] !== null; } catch(e){ return false; } } function sendSavedErrors() { if (localStorageAvailable() && localStorage.length > 0) { for (var key in localStorage) { if (key.substring(0, 9) === 'raygunjs=') { sendToRaygun(JSON.parse(localStorage[key])); localStorage.removeItem(key); } } } } function processUnhandledException(stackTrace, options) { var stack = [], qs = {}; if (_ignore3rdPartyErrors && (!stackTrace.stack || !stackTrace.stack.length)) { return; } if (stackTrace.stack && stackTrace.stack.length) { forEach(stackTrace.stack, function (i, frame) { stack.push({ 'LineNumber': frame.line, 'ColumnNumber': frame.column, 'ClassName': 'line ' + frame.line + ', column ' + frame.column, 'FileName': frame.url, 'MethodName': frame.func || '[anonymous]' }); }); } if (window.location.search && window.location.search.length > 1) { forEach(window.location.search.substring(1).split('&'), function (i, segment) { var parts = segment.split('='); if (parts && parts.length === 2) { var key = decodeURIComponent(parts[0]); var value = parts[1]; if (_filteredKeys) { if (Array.prototype.indexOf && _filteredKeys.indexOf === Array.prototype.indexOf) { if (_filteredKeys.indexOf(key) === -1) { qs[key] = value; } } else { var included = true; for (i = 0; i < _filteredKeys.length; i++) { if (_filteredKeys[i] === key) { included = false; break; } } if (included) { qs[key] = value; } else { qs[key] = '<removed by filter>'; } } } else { qs[key] = value; } } }); } if (options === undefined) { options = {}; } if (isEmpty(options.customData)) { if (typeof _customData === 'function') { options.customData = _customData(); } else { options.customData = _customData; } } if (isEmpty(options.tags)) { options.tags = _tags; } var screen = window.screen || { width: getViewPort().width, height: getViewPort().height, colorDepth: 8 }; var custom_message = options.customData && options.customData.ajaxErrorMessage; var finalCustomData = options.customData; try { JSON.stringify(finalCustomData); } catch (e) { var msg = 'Cannot add custom data; may contain circular reference'; finalCustomData = { error: msg }; log('Raygun4JS: ' + msg); } var payload = { 'OccurredOn': new Date(), 'Details': { 'Error': { 'ClassName': stackTrace.name, 'Message': custom_message || stackTrace.message || options.status || 'Script error', 'StackTrace': stack }, 'Environment': { 'UtcOffset': new Date().getTimezoneOffset() / -60.0, 'User-Language': navigator.userLanguage, 'Document-Mode': document.documentMode, 'Browser-Width': getViewPort().width, 'Browser-Height': getViewPort().height, 'Screen-Width': screen.width, 'Screen-Height': screen.height, 'Color-Depth': screen.colorDepth, 'Browser': navigator.appCodeName, 'Browser-Name': navigator.appName, 'Browser-Version': navigator.appVersion, 'Platform': navigator.platform }, 'Client': { 'Name': 'raygun-js', 'Version': '1.11.2' }, 'UserCustomData': finalCustomData, 'Tags': options.tags, 'Request': { 'Url': document.location.href, 'QueryString': qs, 'Headers': { 'User-Agent': navigator.userAgent, 'Referer': document.referrer, 'Host': document.domain } }, 'Version': _version || 'Not supplied' } }; if (_user) { payload.Details.User = _user; } sendToRaygun(payload); } function sendToRaygun(data) { if (!isApiKeyConfigured()) { return; } log('Sending exception data to Raygun:', data); var url = _raygunApiUrl + '/entries?apikey=' + encodeURIComponent(_raygunApiKey); makePostCorsRequest(url, JSON.stringify(data)); } // Create the XHR object. function createCORSRequest(method, url) { var xhr; xhr = new window.XMLHttpRequest(); if ("withCredentials" in xhr) { // XHR for Chrome/Firefox/Opera/Safari. xhr.open(method, url, true); } else if (window.XDomainRequest) { // XDomainRequest for IE. if (_allowInsecureSubmissions) { // remove 'https:' and use relative protocol // this allows IE8 to post messages when running // on http url = url.slice(6); } xhr = new window.XDomainRequest(); xhr.open(method, url); } xhr.timeout = 10000; return xhr; } // Make the actual CORS request. function makePostCorsRequest(url, data) { var xhr = createCORSRequest('POST', url, data); if ('withCredentials' in xhr) { xhr.onreadystatechange = function() { if (xhr.readyState !== 4) { return; } if (xhr.status === 202) { sendSavedErrors(); } else if (_enableOfflineSave && xhr.status !== 403 && xhr.status !== 400) { offlineSave(data); } }; xhr.onload = function () { log('logged error to Raygun'); }; } else if (window.XDomainRequest) { xhr.ontimeout = function () { if (_enableOfflineSave) { log('Raygun: saved error locally'); offlineSave(data); } }; xhr.onload = function () { log('logged error to Raygun'); sendSavedErrors(); }; } xhr.onerror = function () { log('failed to log error to Raygun'); }; if (!xhr) { log('CORS not supported'); return; } xhr.send(data); } window.Raygun = Raygun;
})(window, window.jQuery);
A Pen by Kevin Isom - Script Codes
A Pen by Kevin Isom - Script Codes
Home Page Home
Developer Kevin Isom
Username Kevnz
Uploaded November 19, 2022
Rating 3
Size 146,248 Kb
Views 10,120
Do you need developer help for A Pen by Kevin Isom?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Kevin Isom (Kevnz) Script Codes
Name
IFrame sandbox
Tuna and Alice
Pay
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!